/* anitacat.com: ferramenta Parede dos gatos */
.pg-intro.largura { width: min(1380px, 100% - 1.6rem); padding-top: .8rem; }
.pg-intro h1 { font-size: clamp(1.6rem, 3vw, 2.15rem); margin: .1rem 0 .2rem; }
.pg-intro .lead { font-size: 1rem; max-width: 130ch; margin-bottom: .6rem; }
.pg-intro .trilha ol { margin-bottom: 0; }
.pg-vazio ol { margin-bottom: .7rem; line-height: 1.45; }
.pg.largura { width: min(1380px, 100% - 1.6rem); display: grid; grid-template-columns: minmax(0, 1fr) 348px; grid-template-rows: auto auto auto 1fr auto; gap: .9rem 1rem; align-items: start;
  grid-template-areas: "alerta alerta" "barra barra" "area ajustes" "area lado" "listas listas"; }
.pg-alerta { grid-area: alerta; margin: 0; }
.pg h2 { font-size: 1.2rem; margin: .2rem 0 .6rem; }
.so-impressao { display: none; }
.campo { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.campo label { font-weight: 600; font-size: .9rem; }
.campo input, .campo select { width: 100%; min-height: 2.6rem; }
.pg button { font: 600 .92rem var(--corpo); color: var(--ameixa-escura); background: var(--papel); border: 1.5px solid var(--ameixa); border-radius: 10px; padding: .45rem .75rem; min-height: 2.5rem; cursor: pointer; }
.pg button:hover { background: var(--pessego-claro); }
.pg button[aria-pressed="true"] { background: var(--ameixa); color: #fff; }
.pg button.destaque { background: var(--pessego); color: #2E1B38; border-color: #2E1B38; }
.pg button.perigo { border-color: #8C1D32; color: #8C1D32; }
.pg button:disabled { opacity: .45; cursor: not-allowed; }
.pg-botoes { display: flex; flex-wrap: wrap; gap: .45rem; }
.pg-sub { font-weight: 700; margin: .8rem 0 .35rem; }
.pg-barra { grid-area: barra; display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; background: var(--papel); border-radius: 18px; padding: .75rem 1.1rem; box-shadow: 6px 9px 0 var(--sombra); }
.pg-barra .campo { width: 170px; }
.pg-barra .campo label { font-size: .8rem; }
.pg .pg-barra button { padding: .35rem .65rem; }
.pg-barra .miudo { flex-basis: 100%; margin: 0; font-size: .8rem; line-height: 1.4; }
.pg-ajustes { grid-area: ajustes; display: grid; gap: .8rem; align-items: start; }
.pg-caixa { background: var(--papel); border: 0; border-radius: 18px; padding: .8rem 1.1rem 1rem; margin: 0; min-width: 0; box-shadow: 6px 9px 0 var(--sombra); }
fieldset.pg-caixa legend { float: left; width: 100%; padding: 0; margin-bottom: .5rem; }
fieldset.pg-caixa legend + * { clear: both; }
.pg-caixa legend { font: 750 1.1rem var(--titulos); color: var(--ameixa-escura); }
.pg-par { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .6rem; }
.pg-gato { display: flex; gap: .45rem; align-items: center; margin-bottom: .45rem; }
.pg-gato label { font-weight: 600; min-width: 4.2rem; }
.pg-gato select { flex: 1; min-height: 2.5rem; }
.pg-limites { font-size: .88rem; margin: .6rem 0; }
.pg-limites input { width: 5.2rem; }
.pg-limites th, .pg-limites td { padding: .3rem .4rem; }

.pg-principal { display: contents; }
.pg-area { grid-area: area; min-width: 0; }
.pg-lado { grid-area: lado; display: grid; gap: .8rem; min-width: 0; }
.pg-quadro { position: relative; }
.pg-vazio { position: absolute; z-index: 1; left: 50%; top: 3.8rem; transform: translateX(-50%); width: min(430px, 86%); background: #fff; border-radius: 20px; padding: 1.1rem 1.4rem 1.2rem; box-shadow: 8px 12px 0 var(--sombra); }
.pg-vazio::before { content: ""; position: absolute; right: 1.4rem; bottom: 100%; width: 92px; height: 54px; margin-bottom: -3px; background: url(/assets/img/espia.svg) bottom / contain no-repeat; }
.pg-rolagem { overflow: auto; background: #fff; border-radius: 20px; padding: .6rem; box-shadow: 8px 12px 0 var(--sombra); }
.pg-area > .miudo { margin-top: 1rem; }
#parede { display: block; width: 100%; max-height: 78vh; user-select: none; -webkit-user-select: none; }
#parede.ampliado { min-width: 720px; max-height: none; }
.pg .pg-ampliar { display: none; margin-bottom: .45rem; }
@media (max-width: 700px) { .pg .pg-ampliar { display: inline-block; } }
#parede text { font-family: var(--corpo); pointer-events: none; }
#parede .grade { stroke: #E4CFBA; stroke-width: .6; stroke-dasharray: 2 3; }
#parede .regua { stroke: #8A6D4B; stroke-width: .8; }
#parede .regua-texto { fill: var(--texto-suave); }
#parede .item { cursor: grab; outline: none; }
#parede .item:active { cursor: grabbing; }
#parede .item:hover .forma { filter: brightness(1.06); }
#parede .toque { fill: transparent; }
#parede .selo { fill: var(--ameixa); stroke: #fff; stroke-width: 1.2; }
#parede .selo-texto { fill: #fff; font-weight: 700; }
#parede .nome-obstaculo { fill: #2F2436; font-weight: 600; paint-order: stroke; stroke: #fff; stroke-width: 3; }
#parede .alerta .selo { fill: #A3213B; }
#parede .selecionado .forma { stroke: var(--ameixa); stroke-width: 2.6; }
#parede .item:focus-visible .toque { stroke: var(--ameixa); stroke-width: 2.5; stroke-dasharray: 2 2; }
#parede .caminho { fill: none; stroke: var(--ameixa); stroke-width: 3; stroke-dasharray: .5 7; stroke-linecap: round; pointer-events: none; animation: andar 1.2s linear infinite; }
#parede .caminho.destacado { stroke-width: 4.6; }
#parede .falha { fill: none; stroke: #A3213B; stroke-width: 2.4; stroke-dasharray: 3 5; stroke-linecap: round; pointer-events: none; }
#parede .medida { fill: #2F2436; font-weight: 700; paint-order: stroke; stroke: #fff; stroke-width: 3; }
#parede .guia { stroke: #D1603D; stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
#parede .alca { fill: #fff; stroke: var(--ameixa); stroke-width: 2; cursor: nesw-resize; }
@keyframes andar { to { stroke-dashoffset: -15; } }

.pg-gaveta { position: relative; background: linear-gradient(#E3C38F, #CFA877); border-radius: 18px; padding: 1.5rem 1rem 1rem; margin-top: 1.1rem; box-shadow: inset 0 0 0 5px #B98F5E, 8px 12px 0 var(--sombra); }
.pg-gaveta::before { content: ""; position: absolute; left: 50%; top: .6rem; width: 92px; height: 11px; margin-left: -46px; border-radius: 8px; background: #8D6A48; box-shadow: inset 0 3px 0 #A98459; }
.pg-gaveta h2 { margin-top: .3rem; }
.pg-gaveta .campo { max-width: 320px; margin-bottom: .6rem; }
.pg-filtros { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .7rem; }
.pg-pecas { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: .6rem; }
.pg .pg-pecas button { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .15rem; border: 0; border-radius: 14px; background: #FFFDF9; padding: .6rem .4rem; line-height: 1.25; box-shadow: 0 4px 0 #A97F50; }
.pg .pg-pecas button:hover { background: var(--pessego-claro); transform: translateY(-2px); box-shadow: 0 6px 0 #A97F50; }
.pg .pg-pecas button:active { transform: translateY(2px); box-shadow: 0 2px 0 #A97F50; }
.pg-pecas small { color: var(--texto-suave); font-weight: 400; }

.pg-avisos { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.pg .pg-avisos button { width: 100%; text-align: left; display: grid; grid-template-columns: 1.6rem 1fr; gap: .4rem; align-items: start; border: 0; border-left: 6px solid #A3213B; background: #FBE9EB; color: var(--texto); font-weight: 400; }
.pg .pg-avisos .aviso-saida button { border-left-color: #B4621C; background: #FCEEDD; }
.pg .pg-avisos .aviso-obstaculo button { border-left-color: var(--ameixa); background: #F1EAF5; }
.pg-avisos .icone { font-size: 1.15rem; line-height: 1.3; text-align: center; }
#distancias ul { padding-left: 1.1rem; font-size: .92rem; margin-bottom: 0; }
.pg-listas { grid-area: listas; margin-top: .6rem; min-width: 0; }
.pg-listas table button { min-height: 2rem; padding: .2rem .6rem; text-align: left; }
.pg-texto { margin-top: 1rem; }

@media (max-width: 1040px) {
  .pg.largura { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "alerta" "barra" "ajustes" "area" "lado" "listas"; }
  .pg-ajustes { grid-template-columns: 1fr 1fr; }
  .pg-ajustes .pg-caixa:last-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .pg-vazio { position: relative; left: auto; top: auto; transform: none; width: auto; margin: 3.4rem 0 1rem; }
}
@media (max-width: 560px) {
  .pg-ajustes { grid-template-columns: 1fr; }
  .pg-barra .campo { width: 100%; }
  .pg-pecas { grid-template-columns: 1fr 1fr; }
}
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .nao-imprime, .pg-intro, .pg-texto, .pg-alerta { display: none !important; }
  .so-impressao { display: block; }
  body { font-size: 10pt; line-height: 1.35; }
  .pg.largura { display: block; width: 100%; }
  #cabecalho-impressao h1 { font-size: 16pt; margin: 0 0 1mm; }
  #cabecalho-impressao p { margin: 0 0 2mm; }
  .pg h2 { font-size: 12pt; margin: 2mm 0 1mm; }
  .pg th, .pg td { padding: .8mm 2mm; }
  .pg p, .pg ul { margin-bottom: 1.5mm; }
  .pg-listas { margin-top: 0; break-before: page; }
  .pg-lado { margin-top: 4mm; }
  .pg-rolagem { overflow: visible; border: 0; padding: 0; }
  #parede, #parede.ampliado { min-width: 0; width: 100%; max-height: 140mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #parede .alca, #parede .guia, #parede .medida { display: none; }
  #parede .caminho { animation: none; }
  .pg-caixa { border: 0; padding: 0; box-shadow: none; }
  .pg-rolagem { box-shadow: none; }
  .pg .pg-avisos button { min-height: 0; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pg .pg-listas table button { border: 0; padding: 0; background: none; min-height: 0; }
  .tabela-rolagem { overflow: visible; }
  tr, li { break-inside: avoid; }
}
