/* Taskbar Town — site. Cores tiradas do próprio jogo: o céu, o morro, o fim de tarde, a noite,
   a página do Livro e a luz das janelas. Letra em pixel do jogo nos títulos. */

/* @font-face da letra em pixel: em cada página (só as letras daquele idioma, site/build.py) */

:root {
  --night: #101533;
  --night-2: #1b2150;
  --sky: #5d9fd8;
  --sky-ink: #0d1530;
  --hill: #2f5a40;
  --hill-light: #8fc29a;
  --dusk: #6a5688;
  --dusk-light: #b9a2d8;
  --paper: #f3ead2;
  --wood: #6b3d26;
  --wood-dark: #4a2818;
  --ink: #2b2033;
  --bone: #fbf7ec;
  --lamp: #ffd47a;
  --lamp-dark: #c99a3c;
  --pink: #f0a6c4;
  --leaf: #7cc26a;

  --pixel: "Fusion Pixel", var(--script, "Nunito"), sans-serif;
  --text: "Nunito", var(--script, system-ui), sans-serif;
  --step-small: 0.875rem;
  --step-body: 1.125rem;
  --step-lead: 1.5rem;
  --step-head: clamp(2.25rem, 1.6rem + 2.2vw, 3.75rem);
  --step-hero: clamp(3rem, 2rem + 3.4vw, 5.25rem);

  --margin: clamp(16px, 3vw, 40px);
  --gap: clamp(88px, 9vw, 136px);
  --taskbar: 48px;
  /* largura em que o papel de parede (1920 de largura) é desenhado: nunca menor que 960px,
     senão a rua fica pequena demais no celular */
  --sw: max(100vw, 960px);
  --strip: calc(var(--sw) * 400 / 1920);   /* altura da rua (2x do jogo) */
  --px: calc(var(--sw) * 2 / 1920);        /* um pixel do jogo, na tela */
  /* cantos em degrau de pixel (como as janelas do jogo) */
  --step: 6px;
  --notch: polygon(var(--step) 0, calc(100% - var(--step)) 0, calc(100% - var(--step)) var(--step), 100% var(--step),
    100% calc(100% - var(--step)), calc(100% - var(--step)) calc(100% - var(--step)), calc(100% - var(--step)) 100%,
    var(--step) 100%, var(--step) calc(100% - var(--step)), 0 calc(100% - var(--step)), 0 var(--step), var(--step) var(--step));
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font: 400 var(--step-body)/1.55 var(--text);
}
img, video { display: block; max-width: 100%; height: auto; }
img, video, .wall, .walker i { image-rendering: pixelated; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 3px; }
::selection { background: var(--lamp); color: var(--ink); }
.pixel, h1, h2, h3 { font-family: var(--pixel); font-weight: 400; letter-spacing: 0; line-height: 1.1; }
.skip { position: absolute; top: 0; left: 0; transform: translateY(-120%); }
.skip:focus { transform: translate(16px, 16px); z-index: 10; background: var(--lamp); color: var(--ink); padding: 8px 12px; }

/* ---------------------------------------------------------------- botões (como os do Livro) */
.btn {
  display: inline-block;
  padding: 14px 22px 12px;
  background: var(--lamp);
  color: var(--ink);
  font: 400 1.125rem/1 var(--pixel);
  text-decoration: none;
  border-bottom: 5px solid var(--lamp-dark);
  clip-path: var(--notch);
  transition: transform .18s var(--ease), border-width .18s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); border-bottom-width: 2px; }
.btn-small { padding: 11px 16px 9px; }
.text-link { font-weight: 700; text-underline-offset: 4px; text-decoration-thickness: 2px; transition: color .15s; }
.text-link:hover { color: var(--lamp-dark); }

/* ---------------------------------------------------------------- a área de trabalho */
.desk {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0 var(--margin) calc(var(--strip) * 0.82 + var(--taskbar));
  color: var(--ink);
  isolation: isolate;
}
.wall {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-repeat: no-repeat;
  background-position: center calc(100% - var(--taskbar));
  background-size: var(--sw) auto;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.wall-day { background-image: url("/img/wall-dia.png"); background-color: #5d9fd8; }
.wall-dusk { background-image: url("/img/wall-tarde.png"); background-color: #3b3a6e; }
.wall-night { background-image: url("/img/wall-noite.png"); background-color: #101533; }
.desk[data-phase="day"] .wall-day,
.desk[data-phase="dusk"] .wall-dusk,
.desk[data-phase="night"] .wall-night { opacity: 1; }

.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  position: relative;
  z-index: 4;  /* o menu de idiomas abre por cima do bilhete */
}
.mark {
  display: flex; align-items: center; gap: 10px;
  font: 400 var(--step-lead)/1 var(--pixel);
  text-decoration: none;
  color: var(--bone);
  margin-right: auto;
}
.links { display: flex; gap: 22px; }
.links a {
  color: var(--bone);
  text-decoration: none;
  font-weight: 700;
  padding: 6px 2px;
  position: relative;
}
.links a::after { /* sublinhado que cresce */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--lamp);
  transform: scaleX(0); transform-origin: left; transition: transform .2s var(--ease);
}
.links a:hover::after { transform: scaleX(1); }

/* o bilhete: papel do Livro numa moldura de madeira, cantos em degrau */
.note {
  position: relative;
  z-index: 2;
  align-self: center;
  width: min(100%, 720px);
  margin: clamp(0px, 2vh, 24px) auto 0;
  padding: 8px;
  background: var(--wood);
  clip-path: var(--notch);
}
.note > * { position: relative; }
.note::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: var(--paper);
  clip-path: var(--notch);
}
.note h1, .note p, .note .clock, .note .actions { padding-inline: clamp(20px, 3vw, 40px); }
.note h1 { padding-top: clamp(20px, 2.4vw, 30px); font-size: var(--step-hero); line-height: 1; color: var(--ink); }
.note .lead { margin-top: 8px; font-size: var(--step-lead); font-weight: 800; line-height: 1.3; }
.note-text { margin-top: 8px; }
.clock {
  margin: 14px 8px 0;
  padding-block: 10px 10px;
  background: #e6dab9;
  display: grid;
  gap: 6px;
}
.clock-now { font-weight: 700; }
.clock-now strong { font-size: var(--step-lead); font-weight: 400; color: var(--wood); margin-inline: 4px; }
.clock-try { display: flex; align-items: center; gap: 14px; font-size: var(--step-small); font-weight: 700; color: #5a4a3e; }
.clock-try input { flex: 1; accent-color: var(--wood); min-height: 28px; }
.actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px;
  padding-block: 16px clamp(20px, 2.4vw, 28px);
}

/* a rua, os moradores e a barra de tarefas */
.town {
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: var(--taskbar);
  width: calc(var(--sw) * 2560 / 1920);
  height: var(--strip);
  transform: translateX(-50%);
}
.town img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 1.2s ease; }
.town-night { opacity: 0; }
.desk[data-phase="night"] .town-night { opacity: 1; }
.walker {
  position: absolute;
  bottom: calc(var(--px) * 4);
  left: 0;
  width: calc(var(--w) * var(--px));
  height: calc(var(--h) * var(--px));
  animation: stroll var(--dur) linear var(--delay) infinite;
}
.walker[style*="--dir:-1"] { animation-direction: reverse; }
.walker i {
  display: block;
  width: 100%;
  height: 100%;
  background-size: calc(var(--w) * var(--n) * var(--px)) 100%;
  animation: steps-walk .7s steps(var(--n)) infinite;
}
.walker[style*="--dir:-1"] i { transform: scaleX(-1); }
@keyframes stroll { from { transform: translateX(-60px); } to { transform: translateX(calc(var(--sw) * 2560 / 1920)); } }
@keyframes steps-walk { to { background-position: calc(var(--w) * var(--n) * var(--px) * -1) 0; } }

.taskbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--taskbar);
  background: #1c1e28;
  display: flex; align-items: center; justify-content: center;
  color: #eceef4;
}
.apps { display: flex; gap: 14px; }
.apps i { width: 30px; height: 30px; background: #383c4c; position: relative; clip-path: var(--notch); --step: 4px; }
.apps i::after { content: ""; position: absolute; inset: 8px; background: var(--c); }
.apps i:nth-child(1) { --c: #608ce6; } .apps i:nth-child(2) { --c: #e8b03c; } .apps i:nth-child(3) { --c: #6ebe82; }
.apps i:nth-child(4) { --c: #dc6e64; } .apps i:nth-child(5) { --c: #bc6ebe; }
.tray { position: absolute; right: var(--margin); display: flex; align-items: center; gap: 10px; font-size: var(--step-small); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- trabalho (morro verde) */
.work {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 88svh;
  background: var(--hill);
  color: var(--bone);
}
.work-plate { padding: 40px; display: grid; place-items: center; }
.work-plate img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.work-side { display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding: 40px var(--margin) 40px 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs button {
  background: #244a33;
  border: 0;
  padding: 10px 14px 8px;
  font: 400 1.125rem/1 var(--pixel);
  color: var(--bone);
  cursor: pointer;
  clip-path: var(--notch);
  transition: background .15s, color .15s, transform .15s var(--ease);
}
.tabs button:hover { transform: translateY(-2px); }
.tabs button[aria-selected="true"] { background: var(--lamp); color: var(--ink); }
.work-copy h2 { font-size: var(--step-head); }
.work-copy p { max-width: 38ch; margin-top: 20px; }
#tab-text { font-size: var(--step-lead); line-height: 1.4; min-height: 6.5em; margin-top: 32px; }
.cells { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cell {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 72px; padding: 10px 16px;
  font: 400 1.125rem/1.1 var(--pixel);
  text-decoration: none;
  clip-path: var(--notch);
  transition: transform .18s var(--ease), filter .18s;
}
.cell:hover { transform: translateY(-3px); filter: brightness(1.06); }
.cell-ink { background: var(--lamp); color: var(--ink); }
.cell-tone { background: #244a33; color: var(--bone); }

/* ---------------------------------------------------------------- folhas coloridas que se empilham */
.features { padding: var(--gap) var(--margin) 0; }
.big { font-size: var(--step-head); }
.features .big { margin-bottom: 48px; max-width: 16ch; }
.sheets { display: grid; }
.sheet {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 88px auto 1fr;
  align-items: start;
  column-gap: 24px;
  clip-path: polygon(0 var(--step), var(--step) var(--step), var(--step) 0, calc(100% - var(--step)) 0, calc(100% - var(--step)) var(--step), 100% var(--step), 100% 100%, 0 100%);
  margin-bottom: 16px;
}
.sheet h3 { grid-column: 1 / 7; grid-row: 1; align-self: end; padding-left: 28px; font-size: var(--step-head); }
.sheet p { grid-column: 1 / 6; grid-row: 2; padding: 20px 0 36px 28px; max-width: 34ch; font-size: var(--step-lead); line-height: 1.45; }
.sheet-pic { grid-column: 7 / 13; grid-row: 1 / 4; display: grid; place-items: center; padding: 28px 28px 28px 0; }
.sheet-pic img, .sheet-pic video { width: 100%; aspect-ratio: 1; object-fit: cover; }
.sheet-pic video { object-position: 55% 50%; }  /* o meio da rua (o canto esquerdo do vídeo tem carros de antes da correção de 03/11) */
.sheet-book img { aspect-ratio: 960 / 600; object-fit: contain; }  /* reserva o espaço antes de carregar (senão o link #notify parava no lugar errado) */
.sheet-sky { background: var(--sky); color: var(--sky-ink); }
.sheet-dusk { background: var(--dusk); color: var(--bone); }
.sheet-hill { background: var(--hill-light); color: var(--sky-ink); }
.sheet-paper { background: var(--paper); color: var(--ink); }

/* ---------------------------------------------------------------- trailer (céu) */
.trailer {
  margin-top: var(--gap);
  padding: 96px var(--margin);
  background: var(--sky);
  color: var(--sky-ink);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: end;
}
.trailer-head p { margin-top: 20px; max-width: 26ch; font-size: var(--step-lead); }
.trailer-video { width: 100%; aspect-ratio: 16 / 9; background: var(--night); clip-path: var(--notch); }

/* ---------------------------------------------------------------- galeria: postais com etiqueta */
.gallery { padding: var(--gap) var(--margin) 0; }
.gallery h2 { font-size: var(--step-head); margin-bottom: 40px; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 12px; }
.tile { display: flex; flex-direction: column; }
.tile img, .tile video { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .4s var(--ease); }
.tile:hover img, .tile:hover video { transform: scale(1.03); }
.tile { overflow: hidden; }
.tile.wide { grid-column: span 2; }
.tile.wide img { aspect-ratio: auto; flex: 1 1 0; height: 0; min-height: 160px; object-position: 50% 92%; }  /* a altura vem da fileira */
.strip { min-height: 88px; padding: 12px; display: grid; gap: 6px; position: relative; z-index: 1; }
.vals { display: flex; justify-content: space-between; gap: 6px; font-size: var(--step-small); font-weight: 700; }
.name { font: 400 1.125rem/1.1 var(--pixel); }
.t1 .strip { background: var(--lamp); color: var(--ink); }
.t2 .strip { background: var(--sky); color: var(--sky-ink); }
.t3 .strip { background: var(--pink); color: var(--ink); }
.t4 .strip { background: var(--leaf); color: var(--ink); }

/* ---------------------------------------------------------------- perguntas: fichas com aba */
.faq { padding: var(--gap) var(--margin) 0; display: grid; grid-template-columns: repeat(12, 1fr); }
.faq .big, .cards { grid-column: 3 / 11; }
.faq .big { margin-bottom: 48px; }
.card {
  --tab-w: 200px;
  --tab-x: calc(var(--i) * (100% - var(--tab-w)) / 5);  /* as 6 abas se espalham pela ficha */
  position: relative;
  margin-top: -16px;
  padding-top: 40px;
  clip-path: polygon(var(--tab-x) 0, calc(var(--tab-x) + var(--tab-w)) 0, calc(var(--tab-x) + var(--tab-w)) 40px,
    100% 40px, 100% 100%, 0 100%, 0 40px, var(--tab-x) 40px);
}
.card:first-child { margin-top: 0; }
.c1 { background: var(--lamp); color: var(--ink); }
.c2 { background: var(--sky); color: var(--sky-ink); }
.c3 { background: var(--paper); color: var(--ink); }
.card-head {
  display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; padding: 0 28px 28px;
}
.card-tab {
  position: absolute; top: 0; left: var(--tab-x); width: var(--tab-w); height: 40px;
  display: grid; place-items: center; font: 400 var(--step-body)/1 var(--pixel);
}
.card-q { display: block; padding-top: 14px; font-size: var(--step-lead); font-weight: 800; transition: transform .2s var(--ease); }
.card-head:hover .card-q { transform: translateX(6px); }
.card-a { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .35s var(--ease), visibility .35s; }
.card-a > p { overflow: hidden; padding: 0 28px; max-width: calc(50ch + 56px); }
.card.open .card-a { grid-template-rows: 1fr; visibility: visible; }
.card.open .card-a > p { padding-bottom: 32px; }
.card-a a { font-weight: 700; }

/* ---------------------------------------------------------------- dar nome à cidade (luz da janela) */
.notify {
  margin-top: var(--gap);
  min-height: 90svh;
  background: var(--lamp);
  color: var(--ink);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  padding: 40px var(--margin);
  align-items: center;
}
.notify-copy { grid-column: 1 / 6; align-self: end; padding-bottom: 40px; }
.notify-copy h2 { font-size: var(--step-hero); line-height: .95; }
.notify-copy p { margin-top: 24px; max-width: 34ch; }
.dialog {
  grid-column: 7 / 12;
  width: min(100%, 460px);
  justify-self: center;
  padding: 10px;
  background: var(--wood);
  clip-path: var(--notch);
  margin: 0;
  position: relative;
}
.dialog::before { content: ""; position: absolute; inset: 10px; background: var(--paper); clip-path: var(--notch); }
.dialog > * { position: relative; }
.dialog-title { padding: 26px 26px 6px; font-size: var(--step-lead); }
.field { display: grid; gap: 6px; padding: 14px 26px 0; font-weight: 700; font-size: var(--step-small); }
.field input {
  font: 400 var(--step-lead)/1 var(--pixel); color: var(--ink);
  padding: 12px 12px 10px; border: 0; background: #e6dab9; border-bottom: 3px solid #b9a77f; min-width: 0;
}
.field input:focus { outline: 3px solid var(--wood); outline-offset: 0; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.checks { display: grid; gap: 10px; padding: 18px 26px 0; }
.check { display: block; cursor: pointer; font-weight: 700; }
.check span { display: flex; align-items: flex-start; gap: 12px; }
.check input { position: absolute; opacity: 0; }
.check span::before { /* caixinha em pixel, como as do Livro */
  content: ""; flex: none; display: block; width: 22px; height: 22px;
  background: #e6dab9; border-bottom: 3px solid #b9a77f;
}
.check input:checked + span::before {
  background: var(--hill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 11' shape-rendering='crispEdges'%3E%3Cpath fill='%23fbf7ec' d='M8 2h2v2H9v1H8v1H7v1H6v1H5v1H3V8H2V7H1V5h2v1h1v1h1V6h1V5h1V4h1z'/%3E%3C/svg%3E") center / 16px no-repeat;
  border-bottom-color: #24402f;
}
.check input:focus-visible + span::before { outline: 3px solid var(--wood); outline-offset: 2px; }
.dialog-error { margin: 14px 26px 0; padding: 10px 12px; background: #f7d0c8; color: #6a1f14; font-weight: 700; }
.dialog-fine { padding: 0 26px 24px; font-size: var(--step-small); }
.dialog-fine a { font-weight: 700; }
.dialog-done { padding: 0 0 30px; }
.dialog-done p:not(.dialog-title) { padding: 6px 26px 0; }
.dialog-btn:disabled { opacity: .6; cursor: wait; }
.dialog-btn {
  display: block; width: calc(100% - 52px); margin: 22px 26px 14px; min-height: 56px;
  background: var(--hill); color: var(--bone); border: 0; border-bottom: 5px solid #24402f;
  font-size: 1.125rem; cursor: pointer; clip-path: var(--notch);
  transition: transform .15s var(--ease), border-width .15s;
}
.dialog-btn:hover { transform: translateY(-2px); }
.dialog-btn:active { transform: translateY(3px); border-bottom-width: 2px; }

/* ---------------------------------------------------------------- rodapé (cortina: a página sobe e mostra) */
.foot {
  min-height: 0;
  background: var(--pink);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  padding: 40px var(--margin) 28px;
}
.foot-top { display: flex; align-items: flex-start; gap: 16px; }
.foot-top p { margin-right: auto; max-width: 52ch; }
.foot-mail {
  margin-top: 96px;
  font-size: clamp(1.5rem, 4vw, 3.75rem);
  line-height: 1;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .2s;
}
.foot-mail:hover { color: var(--night-2); text-decoration: underline; text-decoration-thickness: 6px; }
.foot-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; font-size: var(--step-small); font-weight: 700; }

/* ---------------------------------------------------------------- entrada das seções */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- celular */
@media (max-width: 860px) {
  .links { display: none; }
  .langs summary { font-size: var(--step-small); }
  .note { margin-top: 4px; }
  .work { grid-template-columns: 1fr; }
  .work-plate { padding: 16px; }
  .work-side { padding: 8px 16px 40px; gap: 32px; }
  #tab-text { min-height: 0; font-size: var(--step-body); }
  .cells { grid-template-columns: 1fr; }
  .cell { min-height: 60px; }
  .sheet { grid-template-columns: 1fr; grid-template-rows: auto auto auto; min-height: 0; }
  .sheet h3 { grid-column: 1; grid-row: 1; padding: 24px 20px 16px; }
  .sheet-pic { grid-column: 1; grid-row: 2; padding: 0 20px; }
  .sheet-pic img, .sheet-pic video { aspect-ratio: 4 / 3; }
  .sheet-book img { aspect-ratio: 960 / 600; }
  .sheet p { grid-column: 1; grid-row: 3; padding: 20px; font-size: var(--step-body); }
  .trailer { grid-template-columns: 1fr; padding: 72px 16px; }
  .tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 8px; }
  .vals { flex-wrap: wrap; }
  .vals span { flex: 1 0 40%; }
  .faq .big, .cards { grid-column: 1 / -1; }
  .card { --tab-w: 120px; }
  .card-tab { font-size: var(--step-small); }
  .card-head { padding: 0 20px 24px; }
  .card-a > p { padding: 0 20px; }
  .card-q { font-size: 1.25rem; }
  .notify { grid-template-columns: 1fr; align-content: space-between; min-height: 84svh; padding: 56px 16px; gap: 40px; }
  .notify-copy, .dialog { grid-column: 1; }
  .notify-copy { align-self: start; padding: 0; }
  .notify-copy h2 { font-size: 13vw; }
  .dialog { width: 100%; }
  .foot-mail { font-size: 6.4vw; }
  .foot-meta { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .walker { display: none; }
}

/* ---------------------------------------------------------------- página de privacidade (uma folha do Livro) */
.doc-page { background: var(--sky); color: var(--ink); }
.doc-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px var(--margin); }
.doc-bar .mark { color: var(--sky-ink); }
.doc { background: var(--sky); padding: 24px var(--margin) 0; }
.doc-paper {
  max-width: 760px; margin: 0 auto; padding: clamp(24px, 5vw, 56px);
  background: var(--paper); clip-path: var(--notch);
}
.doc-paper h1 { font-size: var(--step-head); }
.doc-date { margin-top: 12px; font-weight: 700; color: #5a4a3e; }
.doc-paper h2 { font-size: 1.75rem; margin-top: 40px; }
.doc-paper p { margin-top: 14px; max-width: 64ch; }
.doc-paper a { font-weight: 700; }
.doc-town { margin-top: 48px; overflow: hidden; }
.doc-town img { width: max(100%, 1280px); max-width: none; }

/* ---------------------------------------------------------------- menu de idiomas */
.langs { position: relative; }
.langs summary {
  list-style: none; cursor: pointer; font-weight: 700; color: var(--bone); padding: 6px 2px;
  display: flex; align-items: center; gap: 8px;
}
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: ""; width: 8px; height: 8px; background: currentColor;
  clip-path: polygon(0 0, 100% 0, 50% 100%); transition: transform .2s var(--ease); }
.langs[open] summary::after { transform: rotate(180deg); }
.langs ul {
  position: absolute; z-index: 5; inset-inline-end: 0; top: calc(100% + 8px);
  list-style: none; margin: 0; padding: 8px; min-width: 180px;
  background: var(--paper); clip-path: var(--notch);
  display: grid; gap: 2px;
}
.langs a { display: block; padding: 8px 12px; color: var(--ink); text-decoration: none; font-weight: 700; }
.langs a:hover, .langs a[aria-current] { background: var(--lamp); }
.doc-bar .langs summary { color: var(--sky-ink); }
.doc-bar { gap: 24px; }
.doc-bar .mark { margin-right: auto; }
[dir="rtl"] .doc-bar .mark { margin-right: 0; margin-left: auto; }
[dir="rtl"] .mark { margin-right: 0; margin-left: auto; }

/* ---------------------------------------------------------------- questionário do teste */
.quiz h2 { font-size: var(--step-lead); margin-top: 36px; }
.quiz-q { display: grid; gap: 8px; margin: 18px 0 0; padding: 0; border: 0; font-weight: 700; }
.quiz-q legend { padding: 0; margin-bottom: 8px; }
.quiz textarea, .quiz input[type="text"] {
  font: 400 var(--step-body)/1.45 var(--text); color: var(--ink);
  padding: 10px 12px; border: 0; border-bottom: 3px solid #b9a77f; background: #e6dab9; width: 100%; resize: vertical;
}
.quiz textarea:focus, .quiz input[type="text"]:focus { outline: 3px solid var(--wood); outline-offset: 0; }
.quiz .pills { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz .pills label { position: relative; cursor: pointer; }
.quiz .pills input { position: absolute; opacity: 0; }
.quiz .pills span { display: block; padding: 8px 14px 6px; background: #e6dab9; font-weight: 700; clip-path: var(--notch); --step: 4px; transition: background .15s; }
.quiz .pills input:checked + span { background: var(--hill); color: var(--bone); }
.quiz .pills input:focus-visible + span { outline: 3px solid var(--wood); }
.quiz .scale .pills span { min-width: 40px; text-align: center; padding-inline: 8px; }
.quiz-more { display: grid; gap: 6px; margin-top: 10px; font-weight: 400; font-size: var(--step-small); }
.quiz-send { margin-top: 32px; border: 0; cursor: pointer; }
.quiz .dialog-error { margin: 18px 0 0; }
