/* Aplicação (área da profissional, entrada e início da criança): "Nintendo em tudo" (specs/14, seção 1). */

.app { min-height: 100vh; display: flex; flex-direction: column; background: var(--papel); }
.app h1, .app h2, .app h3, .app .btn, .app .tile-name, .app .chip, .app .tabs button, .app .round-label { font-family: var(--font-ui); }
.app h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; margin: 0; letter-spacing: -0.01em; }
.app h2 { font-size: 1.25rem; font-weight: 800; margin: 0 0 12px; }
.app h3 { font-size: 1.05rem; font-weight: 800; margin: 0 0 8px; }
.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }

/* Faixa ilustrada em pixel art no topo das telas principais */
.banner { position: relative; height: 150px; background: url('../assets/cenarios/recife-das-vogais.png') center 62% / cover no-repeat;
  image-rendering: pixelated; }
.banner::after { content: ''; position: absolute; inset: auto 0 0 0; height: 48px; background: linear-gradient(to bottom, transparent, var(--papel)); }
.banner.tall { height: 220px; }

/* Barra superior (como a do Switch: perfil à esquerda, ações à direita) */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; position: relative; z-index: 2; }
.topbar .logo-word { background: rgba(255,255,255,0.88); border-radius: 999px; padding: 4px 16px; box-shadow: var(--shadow); font-size: 1.4rem; }
.topbar .who { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.85); border-radius: 999px; padding: 6px 14px 6px 6px;
  box-shadow: var(--shadow); font-family: var(--font-ui); font-weight: 800; }
.logo-word { font-family: var(--font-ui); font-weight: 900; font-size: 1.6rem; color: var(--tinta); letter-spacing: -0.02em; }
.logo-word .dot { color: var(--teal-escuro); }

.page { width: min(1100px, 100%); margin: -40px auto 0; padding: 0 20px 120px; position: relative; z-index: 1; flex: 1; }

/* Avatar em pixel art dentro de um círculo */
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--ceu-claro, #C4E8FF); display: grid; place-items: center; overflow: hidden; flex: none; }
.avatar img { width: 80%; height: 80%; object-fit: contain; image-rendering: pixelated; }
.avatar.xl { width: 120px; height: 120px; border: 6px solid #fff; box-shadow: var(--shadow); }
.avatar.lg { width: 72px; height: 72px; }

/* Cartões grandes (como os jogos no menu inicial do Switch) */
.tiles { display: flex; gap: 22px; overflow-x: auto; padding: 18px 8px 22px; scroll-snap-type: x mandatory; }
.tile-card { flex: none; width: 200px; scroll-snap-align: start; border: 0; padding: 0; background: none; cursor: pointer; text-align: left;
  font: inherit; color: inherit; }
.tile-card .art { width: 200px; height: 200px; border-radius: 22px; background: linear-gradient(160deg, #C4E8FF, #74C6F2); display: grid;
  place-items: center; box-shadow: var(--shadow); transition: transform 140ms, box-shadow 140ms; position: relative; overflow: hidden; }
.tile-card .art img { width: 62%; image-rendering: pixelated; }
.tile-card .art .badge { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,0.9); border-radius: 999px; padding: 2px 10px;
  font: 800 0.8rem var(--font-ui); }
.tile-card:hover .art { transform: translateY(-3px); }
.tile-card:focus-visible { outline: none; }
.tile-card:focus-visible .art, .tile-card.selected .art { box-shadow: var(--ring), var(--shadow); animation: ring 1.6s ease-in-out infinite; }
@keyframes ring { 50% { box-shadow: 0 0 0 4px var(--papel), 0 0 0 8px #7fe3d9, var(--shadow); } }
.tile-name { display: block; margin-top: 10px; font-weight: 900; font-size: 1.15rem; }
.tile-meta { display: block; font-size: 0.85rem; color: var(--text-muted); }
.tile-card.add .art { background: #fff; border: 3px dashed var(--linha); box-shadow: none; color: var(--teal-escuro); font-size: 3rem; }

/* Destaque do item escolhido (título grande acima dos botões, como no Switch) */
.spotlight { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 8px 0; }
.spotlight .title { font: 900 1.6rem var(--font-ui); }

/* Botões redondos com ícone (fileira inferior do Switch) */
.round-row { display: flex; justify-content: center; gap: 26px; flex-wrap: wrap; margin-top: 34px; }
.round { display: grid; justify-items: center; gap: 8px; border: 0; background: none; cursor: pointer; color: var(--tinta); font: inherit; }
.round .disc { width: 64px; height: 64px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow);
  font-size: 1.6rem; transition: transform 120ms; }
.round:hover .disc { transform: translateY(-2px); }
.round:focus-visible { outline: none; }
.round:focus-visible .disc { box-shadow: var(--ring), var(--shadow); }
.round .disc.coral { background: var(--polvim); color: #fff; }
.round .disc.teal { background: var(--teal); color: #fff; }
.round-label { font-weight: 800; font-size: 0.9rem; }

/* Botões "gordos" (borda inferior que some ao apertar) */
.app .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 16px; padding: 12px 20px;
  min-height: 52px; font-weight: 900; font-size: 1.05rem; cursor: pointer; background: var(--teal-escuro); color: #fff;
  box-shadow: 0 4px 0 #0b5c55; transition: transform 80ms, box-shadow 80ms; text-decoration: none; }
.app .btn:active { transform: translateY(4px); box-shadow: 0 0 0 transparent; }
.app .btn:focus-visible { outline: none; box-shadow: var(--ring); }
.app .btn.coral { background: var(--polvim); box-shadow: 0 4px 0 var(--polvim-escuro); }
.app .btn.ghost { background: #fff; color: var(--tinta); box-shadow: 0 4px 0 var(--linha); }
.app .btn.big { min-height: 64px; font-size: 1.25rem; padding: 14px 28px; border-radius: 20px; }
.app .btn.block { width: 100%; }
.app .btn.icon-only { width: 52px; padding: 0; border-radius: 50%; }

/* Cartões de conteúdo */
.panel { background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 22px; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: 0.85rem;
  background: var(--papel-2); }
.chip.teal { background: #d6f4f1; color: var(--teal-escuro); }
.chip.sol { background: #fff3c4; color: #7a5a00; }
.chip.coral { background: #ffe1db; color: var(--polvim-escuro); }

/* Abas (controle segmentado arredondado) */
.tabs { display: inline-flex; gap: 6px; background: #fff; padding: 6px; border-radius: 999px; box-shadow: var(--shadow); margin: 18px 0 20px;
  flex-wrap: wrap; }
.tabs button { border: 0; background: none; border-radius: 999px; padding: 10px 18px; font-weight: 800; font-size: 1rem; cursor: pointer;
  color: var(--text-muted); display: inline-flex; gap: 8px; align-items: center; }
.tabs button[aria-selected=true] { background: var(--teal); color: #fff; }
.tabs button:focus-visible { outline: none; box-shadow: var(--ring); }

/* Formulários grandes */
.field { display: grid; gap: 6px; }
.field label { font: 800 0.95rem var(--font-ui); }
.field .hint { font-size: 0.85rem; color: var(--text-muted); }
.input { display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--linha); border-radius: 16px; padding: 0 14px;
  min-height: 56px; transition: border-color 120ms, box-shadow 120ms; }
.input:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px #d6f4f1; }
.input input, .input select { border: 0; outline: none; background: none; font: inherit; font-size: 1.05rem; width: 100%; min-height: 52px; }
.input .i { color: var(--text-muted); }
.input button.reveal { border: 0; background: none; cursor: pointer; color: var(--text-muted); display: grid; place-items: center; padding: 6px; }
.form-error { background: #ffe1db; color: var(--polvim-escuro); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.form-ok { background: #e7f6dd; color: var(--folha-escura); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-weight: 700; font-size: 0.9rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 2px; background: var(--linha); border-radius: 2px; }
.link { background: none; border: 0; padding: 0; color: var(--teal-escuro); font: inherit; font-weight: 800; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; }

/* Opções grandes (escolha por cartão: avatar, teclado, retorno de erro) */
.choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.choice { border: 3px solid transparent; background: #fff; border-radius: 18px; padding: 14px; box-shadow: var(--shadow); cursor: pointer;
  display: grid; gap: 6px; justify-items: center; text-align: center; font: inherit; color: inherit; }
.choice[aria-pressed=true] { border-color: var(--teal); background: #effbf9; }
.choice img { width: 64px; height: 64px; object-fit: contain; image-rendering: pixelated; }
.choice strong { font-family: var(--font-ui); font-weight: 900; }
.choice:focus-visible { outline: none; box-shadow: var(--ring); }

/* Barra de dicas de controle no rodapé (como a do console) */
.hintbar { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.92); backdrop-filter: blur(6px); border-top: 1px solid var(--linha);
  display: flex; justify-content: flex-end; gap: 22px; padding: 10px 22px; font: 800 0.85rem var(--font-ui); color: var(--text-muted); z-index: 5; }
.hintbar kbd { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 6px; background: var(--tinta);
  color: #fff; font: 800 0.75rem var(--font-ui); margin-right: 6px; }

/* Entrada (login): ilustração à esquerda, cartão à direita */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--papel); }
.auth .art { background: url('../assets/historias/mundo-1/q1.png') 16% center / cover no-repeat; image-rendering: pixelated; position: relative; }
.auth .art .tagline { position: absolute; left: 32px; bottom: 32px; right: 32px; background: rgba(255,255,255,0.88); border-radius: 22px; padding: 18px 22px;
  box-shadow: var(--shadow); }
.auth .art .tagline strong { display: block; font: 900 1.3rem var(--font-ui); }
.auth .side { display: grid; place-items: center; padding: 32px 20px; }
.auth .auth-card { width: min(440px, 100%); display: grid; gap: 18px; background: #fff; border-radius: 28px; padding: 32px; box-shadow: var(--shadow); }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth .art { min-height: 220px; } .auth .art .tagline { display: none; } }

/* Mapa de calor do teclado (progresso) */
.heat { display: grid; gap: 6px; justify-content: center; }
.heat-row { display: flex; gap: 6px; justify-content: center; }
.heat-key { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font: 800 1.1rem var(--font); background: #f1eee7;
  color: #a9a3b4; box-shadow: 0 3px 0 #e3ded2; }
.heat-key.mastered { background: #c9ecb6; color: var(--folha-escura); box-shadow: 0 3px 0 #9fd487; }
.heat-key.learning { background: #ffe9a8; color: #7a5a00; box-shadow: 0 3px 0 #f2cf63; }
.heat-key.space { width: 240px; }
.heat-key.wide { width: 74px; }
.legend { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 14px; font-size: 0.85rem; color: var(--text-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

/* Lista de sessões */
.list { display: grid; gap: 10px; }
.list-item { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.list-item .grow { flex: 1; }

/* Assistente em passos */
.steps { display: flex; gap: 8px; justify-content: center; margin: 8px 0 22px; }
.steps span { width: 36px; height: 8px; border-radius: 99px; background: var(--linha); }
.steps span.on { background: var(--teal); }

/* Início da criança (tela cheia sobre o recife) */
.kid { position: fixed; inset: 0; background: url('../assets/cenarios/recife-das-vogais.png') center / cover no-repeat; image-rendering: pixelated;
  display: grid; place-items: center; }
.kid .center { display: grid; justify-items: center; gap: 26px; }
.kid .logo-word { font-size: clamp(3rem, 8vw, 5.5rem); color: #fff; text-shadow: 0 4px 0 rgba(18, 52, 90, 0.35); }
.kid .play-big { width: clamp(140px, 22vw, 200px); height: clamp(140px, 22vw, 200px); border-radius: 50%; border: 0; background: var(--polvim);
  color: #fff; box-shadow: 0 10px 0 var(--polvim-escuro), 0 18px 30px rgba(0,0,0,0.2); cursor: pointer; display: grid; place-items: center;
  font-size: clamp(3rem, 7vw, 5rem); transition: transform 90ms; }
.kid .play-big:active { transform: translateY(8px); box-shadow: 0 2px 0 var(--polvim-escuro); }
.kid .corner { position: fixed; right: 28px; bottom: 36px; }
.kid .round-label { color: #fff; text-shadow: 0 2px 0 rgba(18, 52, 90, 0.5); }
.kid .polvim { position: fixed; left: 6vw; bottom: 8vh; width: clamp(110px, 16vw, 190px); image-rendering: pixelated; }
.kid .round .disc { width: 84px; height: 84px; font-size: 2.2rem; }

.proto-flag { position: fixed; left: 12px; bottom: 12px; z-index: 10; background: var(--tinta); color: #fff; border-radius: 999px; padding: 6px 12px;
  font: 800 0.75rem var(--font-ui); opacity: 0.85; }

@media (prefers-reduced-motion: reduce) {
  .tile-card .art, .round .disc { transition: none; }
  .tile-card.selected .art, .tile-card:focus-visible .art { animation: none; }
}

/* Peças da tela do aprendiz */
.choice .disc, .stat-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--papel-2); display: grid; place-items: center; font-size: 1.4rem;
  color: var(--teal-escuro); flex: none; }
.choice[aria-pressed=true] .disc { background: var(--teal); color: #fff; }
.stat { display: flex; align-items: center; gap: 14px; }
.stat-value { font: 900 1.8rem var(--font-ui); line-height: 1; }
.stage-path { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.stage-path .stop { display: grid; justify-items: center; gap: 4px; color: var(--text-muted); }
.stage-path .dot { width: 46px; height: 46px; border-radius: 50%; background: var(--papel-2); display: grid; place-items: center; font: 900 1.1rem var(--font); }
.stage-path .stop.done .dot { background: var(--teal); color: #fff; }
.stage-path .stop.here .dot { background: var(--polvim); color: #fff; box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--polvim); }
.album-mini { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.album-mini .slot { aspect-ratio: 1; border-radius: 50%; background: var(--papel-2); display: grid; place-items: center; }
.album-mini .slot.owned { background: #d6f4f1; }
.album-mini .slot img { width: 75%; image-rendering: pixelated; }
.legend .lg-mastered { background: #c9ecb6; } .legend .lg-learning { background: #ffe9a8; } .legend .lg-new { background: #f1eee7; outline: 1px solid var(--linha); }
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; }
.chart .axis { font: 700 11px var(--font); fill: var(--tinta-suave); }
.chart .hit { cursor: pointer; outline: none; }
.chart-tip { position: absolute; top: -6px; left: var(--x, 50%); transform: translate(-50%, -100%); white-space: nowrap; pointer-events: none; } /* visual em base.css (.tip) */
.page.narrow { width: min(820px, 100%); }
/* Saída para a área da profissional: visível, discreta, precisa segurar (anel enche) + PIN */
@property --hold { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.prof-exit-wrap { position: fixed; right: 16px; bottom: 16px; z-index: 20; display: grid; justify-items: end; gap: 6px; }
.prof-exit { --hold: 0%; display: flex; align-items: center; gap: 10px; border: 0; cursor: pointer; padding: 6px 16px 6px 6px; border-radius: 99px;
  background: linear-gradient(90deg, #ffd3c9 var(--hold), rgba(255, 253, 248, 0.94) var(--hold)); color: var(--tinta);
  box-shadow: 0 4px 0 rgba(18, 52, 90, 0.28); text-align: left; transition: transform 120ms ease, box-shadow 120ms ease;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; }
.prof-exit:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(18, 52, 90, 0.28); }
.prof-exit:focus-visible { outline: none; box-shadow: var(--ring); }
.prof-exit.holding { transform: scale(1.04); animation: hold-fill 1.5s linear forwards; }
.prof-exit.done { animation: prof-done 400ms ease; }
.prof-exit.nope { animation: prof-nope 380ms ease; }
.prof-ring { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; position: relative;
  background: conic-gradient(var(--polvim) var(--hold), #e3ddd0 var(--hold)); }
.prof-ring::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: #fffdf8; }
.prof-ring .i { position: relative; width: 18px; height: 18px; color: var(--polvim-escuro); }
.prof-exit.holding .prof-ring { --hold: inherit; animation: hold-fill 1.5s linear forwards; }
.prof-text { display: grid; line-height: 1.15; }
.prof-text strong { font: 900 0.9rem var(--font-ui); }
.prof-hint { font: 700 0.75rem var(--font-ui); color: var(--text-muted); }
.prof-exit.holding .prof-hint { color: var(--polvim-escuro); }
.prof-exit.nope .prof-hint { color: var(--polvim-escuro); }
@keyframes hold-fill { from { --hold: 0%; } to { --hold: 100%; } }
@keyframes prof-done { 50% { transform: scale(1.1); } }
@keyframes prof-nope { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .prof-exit.nope, .prof-exit.done { animation: none; } .prof-exit.holding { transform: none; } }
.album .prof-exit-wrap { bottom: auto; top: 18px; }
.kid .prof-exit-wrap { bottom: auto; top: 16px; } /* embaixo à direita fica o Álbum */

/* Celular: sem barra de atalhos de teclado */
@media (max-width: 700px) { .hintbar { display: none; } .page { padding-bottom: 60px; } .tile-card, .tile-card .art { width: 160px; } .tile-card .art { height: 160px; } }

/* ───────── Carta colecionável (figurinha) com brilho holográfico ─────────
   Mesmo efeito da biblioteca hover-tilt usada no site do Psynote (tilt 0.55, escala 1.04, sombra, reflexo dourado
   hue 45 / intensidade 1.4 em overlay) + a película e a trama de pontinhos da carta rara do site.
   Refeito aqui porque a biblioteca injeta estilos inline e quebra a CSP. O JS só escreve --hx, --hy (0..1) e --ho (0..1). */
.sticker-card { --hx: 0.5; --hy: 0.5; --ho: 0; --R: 5.5deg;
  --gx: calc(var(--hx) * 100%); --gy: calc(var(--hy) * 100%); --sx: calc(var(--hx) * 2 - 1); --sy: calc(var(--hy) * 2 - 1);
  position: relative; width: 240px; aspect-ratio: 5 / 7; border-radius: 22px; padding: 10px; isolation: isolate; touch-action: none;
  transform: scale(calc(1 + 0.04 * var(--ho))) rotateX(calc(var(--hy) * var(--R) * 2 - var(--R))) rotateY(calc((1 - var(--hx)) * var(--R) * 2 - var(--R)));
  box-shadow: 0 18px 40px rgba(18, 52, 90, 0.28),
    calc(var(--sx) * 12px) calc(var(--sy) * 6px + 3px) 6px -3px rgb(0 0 0 / calc(var(--ho) * 0.125)),
    calc(var(--sx) * 6px) calc(var(--sy) * 3px + 1.5px) 3px -1.5px rgb(0 0 0 / calc(var(--ho) * 0.125));
  background: linear-gradient(160deg, #fff6d6, #ffd9cf); }
.sticker-card.big { width: min(340px, 80vw); }
.sticker-card.rara { background: linear-gradient(160deg, #ffe48a, #f5c542 40%, #e3a91a); }
.sticker-card.brilhante { /* moldura arco-íris que muda de cor com o dedo */
  background: linear-gradient(115deg, #ffd23f, #ff9a3c, #ff5db1, #a38eff, #3fe3f2, #6dbe4b, #ffd23f, #ff9a3c, #ff5db1);
  background-size: 300% 300%; background-position: var(--gx) var(--gy); }
.card-face { position: relative; height: 100%; /* sem z-index: o bicho pode subir acima do brilho */ border-radius: 14px; background: #fffdf8; padding: 12px; display: grid;
  grid-template-rows: auto 1fr auto auto auto; gap: 8px; box-shadow: inset 0 0 0 3px rgba(42, 39, 51, 0.08); }
.sticker-card.rara .card-face, .sticker-card.brilhante .card-face { background: #fbfaf5; }
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card-name { font: 900 1.05rem/1.1 var(--font-ui); }
.card-number { font: 800 0.8rem var(--font-ui); color: var(--text-muted); }
.sticker-card.rara .card-number { color: #b07d00; }
.card-art { border-radius: 10px; background: var(--card-bg, url('../assets/cenarios/recife-das-vogais.png')) center var(--card-bg-y, 70%) / cover; image-rendering: pixelated;
  display: grid; place-items: center; box-shadow: inset 0 0 0 3px #e6c35a; min-height: 0; overflow: hidden; }
.card-art img { width: 62%; image-rendering: pixelated; filter: drop-shadow(0 4px 0 rgba(18, 52, 90, 0.25));
  position: relative; z-index: 5; } /* o bicho fica por cima da textura e do reflexo: sempre nítido */
.card-rarity { display: flex; justify-content: space-between; align-items: center; }
.card-rarity .star { color: #e3ded2; font-size: 1.1rem; }
.card-rarity .star.on { color: #c99a1c; }
.rarity-label { font: 900 0.75rem var(--font-ui); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.card-desc { margin: 0; font: 600 0.88rem/1.35 var(--font); color: var(--tinta); }
.card-world { display: inline-flex; gap: 6px; align-items: center; font: 800 0.75rem var(--font-ui); color: var(--teal-escuro); }
.sticker-card.big .card-name { font-size: 1.35rem; } .sticker-card.big .card-desc { font-size: 1rem; }

/* Camadas de brilho (todas acompanham o dedo; somem quando a carta descansa) */
.card-glare, .card-foil, .card-sparkle { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
/* Reflexo de luz da biblioteca (todas as cartas) */
.card-glare { z-index: 4; mix-blend-mode: overlay; opacity: var(--ho);
  background-image: radial-gradient(farthest-corner circle at var(--gx) var(--gy),
    lch(95% 2.7 45 / 0.924) 8%, lch(88% 5.5 45 / 0.7) 28%, lch(5% 3.5 45 / 0.35) 90%); }
/* Textura holográfica da carta rara do site: película arco-íris + trama de pontinhos, na carta inteira */
.card-foil { z-index: 2; opacity: calc(var(--ho) * var(--foil, 0.42)); mix-blend-mode: color-dodge;
  background: repeating-linear-gradient(115deg,
    hsl(350 90% 72%) 0%, hsl(45 95% 70%) 4%, hsl(140 80% 70%) 8%, hsl(190 90% 70%) 12%,
    hsl(250 85% 75%) 16%, hsl(310 85% 75%) 20%, hsl(350 90% 72%) 24%);
  background-size: 300% 300%; background-position: var(--gx) var(--gy);
  -webkit-mask-image: radial-gradient(circle at var(--gx) var(--gy), #000 0%, rgba(0, 0, 0, 0.55) 35%, rgba(0, 0, 0, 0.15) 70%);
          mask-image: radial-gradient(circle at var(--gx) var(--gy), #000 0%, rgba(0, 0, 0, 0.55) 35%, rgba(0, 0, 0, 0.15) 70%); }
.card-sparkle { z-index: 3; opacity: calc(var(--ho) * var(--sparkle, 0.5)); mix-blend-mode: overlay;
  background-image: radial-gradient(rgba(255, 255, 255, 0.9) 1px, transparent 1.5px);
  background-size: 9px 9px; background-position: calc(var(--gx) / 3) calc(var(--gy) / 3); }
.sticker-card.brilhante { --sparkle: 0.8; } /* textura na mesma força da rara: mais forte apaga bichos escuros */
/* Movimento reduzido: carta parada, brilho leve e fixo */
.sticker-card.still { --ho: 0.35; --hx: 0.3; --hy: 0.25; transform: none; }

/* Verso: figurinha ainda não encontrada */
.sticker-card.back { background: repeating-linear-gradient(45deg, #2ec4b6 0 12px, #26b3a6 12px 24px); }
.sticker-card.back .card-face { background: #f2fbfa; grid-template-rows: auto 1fr auto; text-align: center; }
.back-mark { display: grid; place-items: center; align-content: center; }
.back-mark .keycap { width: 104px; height: 92px; border-radius: 18px; background: var(--teal); box-shadow: 0 8px 0 var(--teal-escuro);
  display: grid; place-items: center; font: 900 3.4rem var(--font-ui); color: #fff; }

/* Carta aberta por cima da tela */
/* Sem backdrop-filter: junto com a carta inclinada e os modos de mistura, alguns navegadores (Safari) deixavam de pintar a carta.
   will-change: a carta e o palco ganham a própria camada desde o início (sem promoção no meio da animação de entrada): às vezes a
   carta abria sem ser pintada, com o espaço dela vazio, e só aparecia fechando e abrindo de novo (Guilherme, 12/10/2026; não
   reproduz no Chrome sem GPU: provável falha de composição do navegador com a inclinação 3D e os modos de mistura). */
.card-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(18, 52, 90, 0.72); display: grid; place-items: center;
  animation: fade 180ms ease; }
.card-stage { perspective: 600px; animation: pop 320ms cubic-bezier(0.2, 1.4, 0.4, 1); display: grid; justify-items: center; gap: 18px; will-change: transform; }
.card-overlay .sticker-card { will-change: transform; }
.card-listen { background: #fff; color: var(--tinta); box-shadow: 0 4px 0 #d8d2c4; }
.card-close { position: fixed; top: 18px; right: 18px; width: 52px; height: 52px; border-radius: 50%; border: 0; background: #fff; font-size: 1.4rem;
  cursor: pointer; box-shadow: var(--shadow); display: grid; place-items: center; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(0.8) translateY(20px); } }
@media (prefers-reduced-motion: reduce) { .card-overlay, .card-stage { animation: none; } }

/* Álbum (área da criança e miniálbum da profissional) */
.album-mini .slot { border: 0; cursor: pointer; padding: 0; }
.album-mini .slot:focus-visible { outline: none; box-shadow: var(--ring); }
.album-mini .slot.owned.rara { background: linear-gradient(135deg, #d9f7f3, #e3dcff); }
.album-mini .slot.owned.brilhante { background: linear-gradient(135deg, #fff1a8, #ffd9cf); }
.album { position: fixed; inset: 0; overflow-y: auto; background: url('../assets/cenarios/recife-das-vogais.png') center / cover fixed; image-rendering: pixelated; }
.album .sheet { width: min(980px, 94vw); margin: 90px auto 40px; background: rgba(255, 253, 248, 0.94); border-radius: 32px; padding: 28px; box-shadow: var(--shadow); }
.album .sheet h1 { font: 900 2rem var(--font-ui); margin: 0 0 4px; }
.album .count { font: 800 1.1rem var(--font-ui); color: var(--teal-escuro); }
.album .bar { height: 14px; border-radius: 99px; background: var(--papel-2); margin: 10px 0 24px; overflow: hidden; }
.album .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), #7fe3d9); border-radius: inherit; }
.album .grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px; }
.album .slot-card { border: 0; padding: 0; background: none; cursor: pointer; display: grid; justify-items: center; gap: 6px; font: inherit; color: inherit; }
.album .slot-card .disc { width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; background: var(--papel-2);
  box-shadow: inset 0 0 0 4px #fff, var(--shadow); transition: transform 120ms; }
.album .slot-card.owned .disc { background: #d6f4f1; }
.album .slot-card.owned.rara .disc { background: linear-gradient(135deg, #d9f7f3, #e3dcff); }
.album .slot-card.owned.brilhante .disc { background: linear-gradient(135deg, #fff1a8, #ffd9cf); }
.album .slot-card .disc img { width: 70%; image-rendering: pixelated; }
.album .slot-card.missing .disc img { filter: brightness(0) opacity(0.15); }
.album .slot-card .disc .q { font: 900 2.4rem var(--font-ui); color: #cfc7b7; }
.album .slot-card:hover .disc { transform: translateY(-3px); }
.album .slot-card:focus-visible { outline: none; } .album .slot-card:focus-visible .disc { box-shadow: var(--ring); }
.album .slot-card .num { font: 800 0.85rem var(--font-ui); color: var(--text-muted); }
.album .home-btn { position: fixed; top: 18px; left: 18px; }

/* Correção de alinhamento: campos lado a lado alinhados pelo topo */
.field { align-content: start; }

/* ───────── Mapa do mundo (área da criança) ───────── */
.kidmap { position: fixed; inset: 0; background: #1e5ea6; display: grid; place-items: center; overflow: hidden; }
.kidmap .board { position: relative; width: min(100vw, 177.78vh); aspect-ratio: 16 / 9; }
.kidmap .board-bg { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.kidmap .stop, .kidmap .finale, .kidmap .walker { position: absolute; left: calc(var(--x) / 384 * 100%); top: calc(var(--y) / 216 * 100%); }
/* parada alta (o sinal da Estação): o Polvim fica AO LADO dela, não atrás (map.walkerOffset) */
.kidmap .walker { left: calc((var(--x) + var(--wx, 0)) / 384 * 100%); top: calc((var(--y) + var(--wy, 0)) / 216 * 100%); }
.kidmap .finale { width: calc(64 / 384 * 100%); transform: translate(-50%, -78%); image-rendering: pixelated; pointer-events: none; }
.kidmap .stop { width: calc(26 / 384 * 100%); transform: translate(-50%, -55%); border: 0; background: none; padding: 0; cursor: pointer;
  display: grid; justify-items: center; -webkit-tap-highlight-color: transparent; }
.kidmap .stop img { width: 100%; image-rendering: pixelated; }
.kidmap .stop.locked img { filter: saturate(0.4) brightness(0.9); opacity: 0.85; }
.kidmap .stop.here::before { content: ''; position: absolute; inset: -30%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(255, 246, 180, 0.95), rgba(255, 246, 180, 0) 65%); animation: glow 1.8s ease-in-out infinite; }
.kidmap .stop .badge { position: absolute; top: -38%; font: 800 clamp(13px, 1.7vw, 26px)/1 var(--font); background: #fff; color: var(--tinta);
  padding: 0.18em 0.45em; border-radius: 99px; box-shadow: 0 3px 0 rgba(18, 52, 90, 0.25); white-space: nowrap; }
.kidmap .stop.done .badge { background: var(--teal); color: #fff; }
.kidmap .stop.here .badge { background: var(--polvim); color: #fff; top: -125%; z-index: 3; } /* acima da cabeça do Polvim */
.kidmap .stop.locked .badge { background: #e8e3d8; color: #8a8494; }
.kidmap .stop:focus-visible { outline: none; } .kidmap .stop:focus-visible .badge { box-shadow: var(--ring); }
.kidmap .stop.nope { animation: nope 360ms ease; }
.kidmap .walker { width: calc(34 / 384 * 100%); transform: translate(-50%, -92%); pointer-events: none;
  transition: left 700ms ease-in-out, top 700ms ease-in-out; z-index: 2; }
.kidmap .walker img { width: 100%; image-rendering: pixelated; animation: bob 2.4s ease-in-out infinite; transform-origin: bottom center; }
.kidmap .walker.walking img { animation: hop 350ms ease-in-out infinite; }
.kidmap .map-side { position: fixed; top: 16px; left: 16px; display: grid; gap: 10px; }
.kidmap .map-side .round-label { color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
.kidmap .map-album, .kidmap .msg-btn { border: 0; background: rgba(255, 253, 248, 0.92); border-radius: 22px; padding: 8px; cursor: pointer;
  box-shadow: 0 6px 0 rgba(18, 52, 90, 0.3); display: grid; place-items: center; }
.kidmap .map-album { position: static; width: auto; height: auto; padding: 0; background: none; box-shadow: none; }
.kidmap .album-disc { background: #fffdf8; } .kidmap .album-disc img { width: 70%; image-rendering: pixelated; }
.kidmap .map-msg { position: fixed; left: 16px; bottom: 16px; display: grid; gap: 10px; justify-items: start; }
.kidmap .msg-btn { width: 72px; height: 72px; } .kidmap .msg-btn img { width: 52px; image-rendering: pixelated; }
.kidmap .msg-pop { background: #fffdf8; border-radius: 18px; padding: 12px 16px; box-shadow: var(--shadow); }
/* O recado num bilhete de papel (specs/12): papel pautado, um pedaço por linha, o mais novo se escreve ao abrir;
   o endereço (ILHA 12) como carimbo de envelope no canto. A letra encolhe em tela baixa; o papel rola se precisar. */
.kidmap .msg-pop .note { --fs: clamp(1rem, 3.4vh, 1.45rem); position: relative; min-width: min(17em, 70vw); max-height: min(56vh, 22em); overflow-y: auto;
  padding: 0.5em 1.1em 0.6em 1.6em; border-radius: 6px; background:
    linear-gradient(90deg, transparent 1.05em, rgba(230, 120, 120, 0.45) 1.05em, rgba(230, 120, 120, 0.45) calc(1.05em + 2px), transparent calc(1.05em + 2px)),
    repeating-linear-gradient(#fffaf0 0, #fffaf0 calc(var(--fs) * 1.55 - 1px), #d9e6f2 calc(var(--fs) * 1.55 - 1px), #d9e6f2 calc(var(--fs) * 1.55));
  background-position: 0 0, 0 0.5em; box-shadow: inset 0 0 0 1px #eadfca, 0 2px 0 #e2d6bf; transform: rotate(-0.6deg); white-space: normal; }
.kidmap .msg-pop .note-lines { list-style: none; margin: 0; padding: 0; }
.kidmap .msg-pop .note-line { font: 800 var(--fs)/1.55 var(--font); letter-spacing: 0.1em; color: var(--polvim-escuro); white-space: nowrap; }
.kidmap .msg-pop .note-line.latest .note-text { display: inline-block; position: relative; color: #d8452e;
  animation: note-write calc(var(--n, 8) * 70ms + 200ms) steps(var(--n, 8), end) both 250ms; }
/* o pedaço novo ganha um risco de marca-texto por baixo */
.kidmap .msg-pop .note-line.latest .note-text::after { content: ''; position: absolute; left: -0.15em; right: -0.15em; bottom: 0.18em; height: 0.42em; z-index: -1;
  background: rgba(255, 210, 63, 0.55); border-radius: 0.2em; animation: note-mark 400ms ease-out both calc(var(--n, 8) * 70ms + 450ms); transform-origin: left; }
.kidmap .msg-pop .note-address { float: right; margin: 0.35em -0.3em 0 0.8em; padding: 0.2em 0.55em; font: 900 calc(var(--fs) * 0.62)/1 var(--font-ui);
  letter-spacing: 0.12em; color: #2a6fb0; border: 2px dashed #2a6fb0; border-radius: 4px; transform: rotate(4deg); background: rgba(255, 255, 255, 0.7); }
.kidmap .msg-pop .note-address::before { content: '✉ '; }
/* o postal da Tica colado no canto do bilhete (depois do Mundo 3), um pouco torto como num mural */
.kidmap .msg-pop .note-postal { position: absolute; right: 0.4em; bottom: 0.3em; width: 2.2em; image-rendering: pixelated; transform: rotate(8deg); filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.18)); pointer-events: none; }
.kidmap .msg-pop .note.empty { display: flex; gap: 8px; padding: 0.6em 1em; min-width: 0; }
.kidmap .msg-pop .blank { width: 1.4em; height: 1.6em; border: 3px dashed #cfc7b7; border-radius: 8px; font-size: 1.6rem; }
@keyframes note-write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes note-mark { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .kidmap .msg-pop .note-line.latest .note-text, .kidmap .msg-pop .note-line.latest .note-text::after { animation: none; } }
.kidmap .msg-pop { position: relative; } .kidmap .msg-pop::after { content: ''; position: absolute; left: 26px; bottom: -10px; border: 10px solid transparent; border-bottom: 0; border-top-color: #fffdf8; }
@keyframes glow { 50% { transform: scale(1.15); opacity: 0.7; } }
@keyframes bob { 50% { transform: translateY(-4%); } }
@keyframes hop { 50% { transform: translateY(-14%) scaleY(1.04); } }
@keyframes nope { 25% { transform: translate(-56%, -55%); } 75% { transform: translate(-44%, -55%); } }
@media (prefers-reduced-motion: reduce) {
  .kidmap .walker, .kidmap .walker img, .kidmap .stop.here::before, .kidmap .stop.nope { transition: none; animation: none; }
}

/* Tabela tecla por tecla e resumo da sessão */
.table-wrap { overflow-x: auto; }
table.items { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.items th { text-align: left; font: 800 0.8rem var(--font-ui); color: var(--text-muted); padding: 8px 10px; border-bottom: 2px solid var(--papel-2); white-space: nowrap; }
table.items td { padding: 10px; border-bottom: 1px solid var(--papel-2); }
table.items .item-label { font: 800 1.2rem var(--font); }
.panel.summary { border: 3px solid var(--teal); margin-bottom: 18px; }
.panel.summary h2 { display: flex; gap: 8px; align-items: center; }
.app select { font: inherit; border: 0; background: transparent; width: 100%; padding: 12px 0; color: var(--tinta); }

/* PIN para sair do modo criança */
.pin-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(18, 52, 90, 0.72); display: grid; place-items: center; }
.pin-box { background: #fffdf8; border-radius: 24px; padding: 24px; display: grid; gap: 12px; width: min(320px, 90vw); box-shadow: var(--shadow); }
.pin-box input { font: 800 2rem var(--font); letter-spacing: 0.5em; text-align: center; border: 3px solid var(--papel-2); border-radius: 14px; padding: 10px; width: 100%; }
.pin-box input.wrong { border-color: #e4572e; animation: nope-x 300ms ease; }
@keyframes nope-x { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.sticker-card.compact .card-face { grid-template-rows: auto 1fr auto; }

/* Mapa: o caminho fica evidente — parada atual pulsa, setinha pula em cima, toda parada reage ao toque */
.kidmap .stop { transition: transform 120ms ease; }
.kidmap .stop:hover img, .kidmap .stop:active img { transform: scale(1.12); }
.kidmap .stop img { transition: transform 120ms ease; }
/* altura medida em pixels de arte (50 acima da parada): acompanha o mapa em qualquer tamanho de tela */
.kidmap .tap-hint { position: absolute; left: calc(var(--x) / 384 * 100%); top: calc((var(--y) - 50) / 216 * 100%); z-index: 4; pointer-events: none;
  width: 0; height: 0; border: clamp(8px, 1.2vw, 16px) solid transparent; border-top-color: #fff; border-bottom: 0;
  transform: translateX(-50%); filter: drop-shadow(0 3px 0 rgba(18, 52, 90, 0.35)); animation: tap-hint 1.1s ease-in-out infinite; }
@keyframes tap-hint { 50% { margin-top: -10px; } }
/* Bolhas subindo devagar (estímulo baixo: poucas, lentas, translúcidas) */
.kidmap .bubble { position: absolute; left: var(--bx); top: 104%; width: calc(var(--bs) / 384 * 100%); aspect-ratio: 1; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7); background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.05) 60%);
  pointer-events: none; z-index: 1; opacity: 0; animation: bubble-rise var(--bd) linear var(--bdelay) infinite; }
@keyframes bubble-rise {
  0% { top: 104%; transform: translateX(0); opacity: 0; } 10% { opacity: 0.75; } 50% { transform: translateX(12px); }
  90% { opacity: 0.6; } 100% { top: -6%; transform: translateX(-6px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .kidmap .tap-hint { animation: none; } .kidmap .bubble { display: none; } }

/* Janela da fase */
.stage-sheet-overlay { position: fixed; inset: 0; z-index: 55; background: rgba(18, 52, 90, 0.6); display: grid; place-items: center; padding: 16px;
  animation: fade 180ms ease; }
.stage-sheet { position: relative; width: min(440px, 100%); background: #fffdf8; border-radius: 28px; padding: 22px 22px 24px; display: grid; gap: 14px;
  justify-items: center; box-shadow: 0 24px 50px rgba(18, 52, 90, 0.35); border-top: 10px solid var(--polvim); animation: pop 320ms cubic-bezier(0.2, 1.4, 0.4, 1); }
.stage-sheet.done { border-top-color: var(--teal); }
.stage-sheet.locked { border-top-color: #cfc7b7; }
.sheet-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--papel-2);
  font-size: 1.2rem; cursor: pointer; display: grid; place-items: center; }
.sheet-head { display: grid; justify-items: center; gap: 6px; }
.sheet-num { font: 800 0.85rem var(--font-ui); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.sheet-status { display: inline-flex; align-items: center; gap: 6px; font: 900 1.05rem var(--font-ui); padding: 6px 14px; border-radius: 99px; }
.sheet-status img { width: 20px; image-rendering: pixelated; }
.sheet-status.done { background: #d6f4f1; color: var(--teal-escuro); }
.sheet-status.here { background: #ffe1db; color: var(--polvim-escuro); }
.sheet-status.locked { background: var(--papel-2); color: #8a8494; }
.sheet-keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.sheet-key { display: grid; justify-items: center; gap: 4px; }
.sheet-key .keycap { width: 64px; height: 64px; border-radius: 14px; background: #fff; display: grid; place-items: center;
  font: 800 2.2rem var(--font); color: var(--tinta); box-shadow: inset 0 0 0 2px var(--linha), 0 5px 0 var(--linha); }
.sheet-key img { width: 40px; image-rendering: pixelated; }
.sheet-keys { align-items: center; }
.sheet-key.side { grid-auto-flow: column; align-items: center; } /* figura ao lado do 1º exemplo, não embaixo */
.stage-sheet.locked .sheet-keys { opacity: 0.55; }
.sheet-label { font: 800 0.85rem var(--font-ui); color: var(--text-muted); justify-self: start; }
.sheet-history { list-style: none; margin: -6px 0 0; padding: 0; width: 100%; display: grid; gap: 6px; }
.sheet-history li { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 10px; background: var(--papel); border-radius: 14px; padding: 8px 12px; }
.sheet-history .when { font: 800 0.9rem var(--font-ui); }
.hist-pearls { display: flex; gap: 3px; }
.hist-pearl { width: 18px; image-rendering: pixelated; filter: grayscale(1) brightness(0.8); opacity: 0.45; }
.hist-pearl.lit { filter: none; opacity: 1; }
.sheet-history .pct { font-size: 0.8rem; color: var(--text-muted); }
.sheet-empty { margin: 0; font: 800 1.05rem var(--font-ui); color: var(--teal-escuro); }
.sheet-locked { margin: 0; display: flex; gap: 8px; align-items: center; color: #8a8494; font-weight: 700; text-align: center; }
.sheet-play { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 72px; border: 0; border-radius: 99px; cursor: pointer;
  font: 900 1.6rem var(--font-ui); color: #fff; background: var(--polvim); box-shadow: 0 7px 0 var(--polvim-escuro); }
.sheet-play.done { background: var(--teal); box-shadow: 0 7px 0 var(--teal-escuro); }
.sheet-play .i { width: 1.3em; height: 1.3em; }
.sheet-play:active { transform: translateY(6px); box-shadow: 0 1px 0 var(--polvim-escuro); }
.sheet-play:focus-visible { outline: none; box-shadow: var(--ring), 0 7px 0 var(--polvim-escuro); }
/* Janela da fase em tela baixa (celular deitado): rola e fica mais compacta */
.stage-sheet { max-height: calc(100dvh - 32px); overflow-y: auto; }
@media (max-height: 520px) {
  .stage-sheet { gap: 8px; padding: 14px 18px 16px; border-top-width: 6px; }
  .sheet-key .keycap { width: 46px; height: 46px; font-size: 1.6rem; }
  .sheet-key img { width: 30px; }
  .sheet-play { min-height: 56px; font-size: 1.3rem; }
}

/* Álbum: contador de cartas (repetidas contam) */
.album .album-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.album .album-cards { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; font: 800 0.9rem var(--font-ui); color: var(--text-muted); }
.album .album-cards strong { font: 900 1.1rem var(--font-ui); color: var(--tinta); }
.album .rar { padding: 2px 10px; border-radius: 99px; background: #eee8dc; }
.album .rar.rara { background: linear-gradient(135deg, #d9f7f3, #e3dcff); color: #4b3fb0; }
.album .rar.brilhante { background: linear-gradient(115deg, #fff1a8, #ffb4a2, #c9c0ff); color: #8a4a00; }
.album .slot-card .disc { position: relative; }
.album .qty { position: absolute; right: 2px; bottom: 6px; min-width: 40px; padding: 3px 8px; border-radius: 99px; background: #fff; color: var(--tinta);
  font: 900 0.95rem var(--font-ui); box-shadow: 0 3px 0 rgba(18, 52, 90, 0.18), inset 0 0 0 2px #e8e3d8; }
.album .qty.many { background: var(--tinta); color: #fff; box-shadow: 0 3px 0 rgba(18, 52, 90, 0.3); }
.album .album-done { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 8px; padding: 6px 16px; border-radius: 99px;
  background: linear-gradient(115deg, #ffd23f, #ff9a3c); color: #5a3300; font: 900 1.1rem var(--font-ui); box-shadow: 0 4px 0 #d9661f; }
.album .sheet.complete { box-shadow: 0 0 0 6px #ffd23f, var(--shadow); }
.card-count { justify-self: center; padding: 6px 16px; border-radius: 99px; background: #fff; color: var(--tinta); font: 900 1rem var(--font-ui);
  box-shadow: 0 4px 0 rgba(18, 52, 90, 0.3); }
.album-mini .slot { position: relative; }
.album-mini .mini-qty { position: absolute; right: -4px; bottom: -4px; padding: 0 6px; border-radius: 99px; background: var(--tinta); color: #fff; font: 900 0.7rem/1.5 var(--font-ui); }

/* Mapa: estados das paradas (specs/15) — fechada · aberta · atual · passada (concha aberta) · dominada (pérola) */
.kidmap .stop.mini { width: calc(26 / 384 * 100%); } /* mapa v2: toda fase tem clareira do mesmo tamanho */
.kidmap .stop.open img { filter: saturate(0.85); }
.kidmap .stop.open .badge { background: #fff; color: var(--tinta); box-shadow: 0 0 0 2px var(--teal), 0 3px 0 rgba(18, 52, 90, 0.25); }
.kidmap .stop.passed .badge { background: var(--teal); color: #fff; }
.kidmap .stop.mastered .badge { background: linear-gradient(115deg, #ffd23f, #ff9a3c); color: #5a3300; }
.kidmap .stop.mastered::before { content: ''; position: absolute; inset: -25%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 62%); animation: glow 2.6s ease-in-out infinite; }
.kidmap .board.fx .stop.mastered::before { display: none; } /* com a arte, o brilho da pérola é de pixel (map-fx) */
/* Fase bônus: bolha dourada flutuando do outro lado do arco */
.kidmap .stop.bonus { width: calc(16 / 384 * 100%); transform: translate(-50%, -70%); } /* 16 px de arte: escala inteira */
.kidmap .bonus-pearl { animation: bob 2.4s ease-in-out infinite; }
.kidmap .stop.bonus.locked .bonus-pearl { filter: grayscale(0.9) brightness(0.9); animation: none; }
.sheet-note { margin: -4px 0 0; font: 700 0.9rem var(--font-ui); color: var(--teal-escuro); }
.sheet-locked-box { display: grid; gap: 10px; justify-items: center; width: 100%; }
.sheet-key .keycap.wide { width: auto; min-width: 64px; padding: 0 12px; font-size: 1.7rem; letter-spacing: 0.06em; }
.stage-sheet.bonus { border-top-color: #ffd23f; background: linear-gradient(180deg, #fffbe9, #fffdf8 40%); }
.sheet-history .pct { display: grid; text-align: right; font: 800 0.85rem var(--font-ui); color: var(--tinta); }
.sheet-history .pct small { font: 700 0.72rem var(--font-ui); color: var(--text-muted); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 700 0.85rem var(--font-ui); color: var(--text-muted); margin-bottom: 4px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.chart-legend .sw.first { background: #0FA39A; } .chart-legend .sw.solo { background: #6550D6; }
.sess-nums { display: grid; justify-items: end; gap: 2px; }
.sheet-key .keycap.fix s { color: #e4572e; text-decoration-thickness: 3px; }
.sheet-key .keycap.fix .arrow { margin: 0 6px; color: var(--text-muted); font-size: 1.2rem; }
.sheet-key .keycap.fix { display: flex; align-items: center; gap: 2px; padding: 0 14px; font-size: 1.6rem; }
/* Mapa em tela baixa (celular deitado): botões menores para não cobrir o mapa nem um ao outro */
@media (max-height: 500px) {
  .kidmap .map-side { top: 8px; left: 8px; gap: 4px; }
  .kidmap .map-side .disc { width: 40px; height: 40px; }
  .kidmap .map-side .round-label { font-size: 0.7rem; }
  .kidmap .map-msg { left: 8px; bottom: 8px; }
  .kidmap .msg-btn { width: 48px; height: 48px; } .kidmap .msg-btn img { width: 36px; }
  .kidmap .prof-exit-wrap { right: 8px; bottom: 8px; }
  .kidmap .prof-exit { padding: 4px 10px 4px 4px; } .kidmap .prof-ring { width: 30px; height: 30px; }
}
.chart .direct { font: 800 13px var(--font-ui); fill: var(--tinta); } /* texto em cor de texto, não na cor da série */
.chart .goal { font-weight: 800; }
.chart-legend .sw.dot { border-radius: 50%; }
.chart-tip.to-left { transform: translate(calc(-100% + 24px), -100%); }
.chart-tip.to-right { transform: translate(-24px, -100%); }

/* ---------- Conquista do mundo: medalha com 3 estrelas (05/10/2026) ----------
   Medida em em: quem usa escolhe o tamanho pelo font-size. Sem arte do mundo, medalha provisória em CSS. */
.medal { position: relative; display: inline-grid; justify-items: center; font-size: 10px; line-height: 1; }
.medal.small { font-size: 9px; } .medal.mini { font-size: 6.5px; }
.medal-ribbon { width: 4.2em; height: 3.4em; margin-bottom: -1.6em; background: linear-gradient(90deg, var(--polvim) 0 34%, #fff 34% 66%, var(--teal) 66%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }
.medal-disc { position: relative; width: 7em; height: 7em; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 38% 32%, #fff3b8 0 14%, var(--sol) 36%, var(--sol-escuro) 100%);
  border: 0.42em solid #b8730f; box-shadow: inset 0 0 0 0.32em #ffe58a, 0 0.4em 0 #7a4c05;
  transform: perspective(40em) rotateY(calc((var(--hx, 0.5) - 0.5) * 34deg)) rotateX(calc((0.5 - var(--hy, 0.5)) * 34deg)); transition: transform 60ms linear; }
.medal-disc::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; opacity: var(--ho, 0);
  background: radial-gradient(circle at calc(var(--hx, 0.5) * 100%) calc(var(--hy, 0.5) * 100%), rgba(255, 255, 255, 0.85), transparent 45%); mix-blend-mode: overlay; }
.medal-disc > img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.medal-disc .medal-pearl { width: 3.4em; height: 3.4em; margin-top: -0.6em; }
.medal-num { position: absolute; bottom: 0.7em; min-width: 1.9em; height: 1.9em; padding: 0 0.3em; border-radius: 1em; display: grid; place-items: center;
  background: var(--teal-escuro); color: #fff; font: 700 1.1em/1 var(--font-pixel); }
.medal-stars { display: flex; gap: 0.25em; margin-top: 0.45em; }
.medal-star { font-size: 1.9em; color: #cfc7b7; text-shadow: 0 0.06em 0 rgba(42, 39, 51, 0.25); }
.medal-star.on { color: var(--sol); text-shadow: 0 0.06em 0 #b8730f, 0 0 0.3em rgba(255, 210, 63, 0.6); }
.medal.locked .medal-ribbon, .medal.locked .medal-disc { filter: grayscale(1) brightness(1.2); opacity: 0.45; }
.medal.locked .medal-pearl, .medal.locked .medal-num { visibility: hidden; }
.medal.locked .medal-disc::before { content: '?'; position: absolute; font: 700 3.4em/1 var(--font-pixel); color: #fff; }

.star-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; font-size: 0.92rem; color: var(--text-muted); }
.star-list li { display: flex; align-items: center; gap: 6px; }
.star-list li.on { color: var(--tinta); font-weight: 800; }
.star-list .medal-star { font-size: 1.15rem; }
.medal-row { display: grid; gap: 16px; }
.medal-cell { display: flex; align-items: center; gap: 18px; }
.panel h3.sub { margin: 20px 0 8px; font: 800 1rem var(--font-ui); }

/* No mapa: o botão do recado vira a medalha quando ela é ganha; o balão mostra medalha, estrelas e recado */
.kidmap .msg-btn.has-medal { display: grid; place-items: center; }
.kidmap .msg-pop .pop-medal { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.kidmap .msg-pop .pop-label { display: block; font: 800 0.8rem var(--font-ui); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }

/* Título do mundo: fixo no canto de cima, ao lado da coluna de botões (o canto do mapa não tem paradas).
   Na chegada, entra grande no meio e desliza até o canto (escala a partir do canto: crisp no pixel art). */
.kidmap .world-badge { --wb-left: 112px; --wb-top: 14px; --wb-k: 2.4;
  position: fixed; left: var(--wb-left); top: var(--wb-top); z-index: 6; margin: 0; pointer-events: none; transform-origin: 0 0;
  width: clamp(170px, 22vw, 300px); filter: drop-shadow(0 3px 0 rgba(18, 52, 90, 0.4)); }
.kidmap .world-badge img { display: block; width: 100%; image-rendering: pixelated; }
.kidmap .world-badge:not(.has-art) { width: auto; display: grid; gap: 2px; padding: 6px 14px 8px; background: #fffdf8; border: 3px solid var(--tinta); border-radius: 6px; }
.kidmap .world-badge .wt-num { font: 700 0.7rem/1 var(--font-pixel); letter-spacing: 0.2em; text-transform: uppercase; color: var(--teal-escuro); }
.kidmap .world-badge .wt-name { font: 700 1.25rem/1.05 var(--font-pixel); color: var(--polvim-escuro); }
.kidmap .world-badge.intro { animation: wb-intro 3400ms cubic-bezier(0.5, 0, 0.2, 1) both; }
@keyframes wb-intro {
  0% { left: 50%; top: 18%; transform: translateX(calc(-50% * var(--wb-k))) scale(var(--wb-k)); opacity: 0; }
  12%, 68% { left: 50%; top: 18%; transform: translateX(calc(-50% * var(--wb-k))) scale(var(--wb-k)); opacity: 1; }
  100% { left: var(--wb-left); top: var(--wb-top); transform: none; opacity: 1; }
}
@media (max-height: 500px) { .kidmap .world-badge { --wb-left: 68px; --wb-top: 8px; width: clamp(140px, 20vw, 220px); } }
@media (prefers-reduced-motion: reduce) { .kidmap .world-badge.intro { animation: none; } .medal-disc { transition: none; } }
/* Medalha com a arte do mundo (folha do GPT): a arte já traz fita e moldura */
.medal.has-art .medal-disc { width: 9em; height: 9em; background: none; border: 0; box-shadow: none; border-radius: 0; overflow: visible; }
.medal.has-art .medal-disc::after { border-radius: 50%; inset: 12%; }
.medal.has-art.locked .medal-disc { filter: grayscale(1) brightness(0.35); opacity: 0.4; }

/* ---------- Arquipélago do Polvim: tela inicial da criança (05/10/2026) ----------
   Mesmo palco 16:9 do mapa do mundo (384 × 216 pixels de cena). Sem a arte, mar e ilhas por código. */
.kidmap.isles .board.sea { background:
  radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.08) 0 6%, transparent 7%) 0 0 / 18% 26%,
  radial-gradient(ellipse at 50% 40%, #5fc4e8, #2f8fd5 70%, #1e6fb8); }
.isle-route { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.isle-route line { stroke: #fff; stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 0.1 4; opacity: 0.75; }
.isle-route line.done { stroke: var(--sol); opacity: 1; }
.kidmap .isle, .kidmap .isle-polvim { position: absolute; left: calc(var(--x) / 384 * 100%); top: calc(var(--y) / 216 * 100%); }
.kidmap .isle { width: calc(40 / 384 * 100%); aspect-ratio: 1; transform: translate(-50%, -50%); border: 0; padding: 0; background: none;
  cursor: pointer; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; border-radius: 50%; }
.kidmap .isle:focus-visible { outline: 4px solid var(--sol); outline-offset: 4px; }
.isle-blob { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 40% 35%, #fbe7b5, #e9c787 70%); box-shadow: 0 0 0 0.5vw rgba(255, 255, 255, 0.35), 0 0.6vw 0 rgba(18, 52, 90, 0.35); }
.isle-blob img { width: 78%; image-rendering: pixelated; }
.kidmap .isle.here::before { content: ''; position: absolute; inset: -18%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(255, 210, 63, 0.75), transparent 68%); animation: isle-glow 2s ease-in-out infinite; }
@keyframes isle-glow { 50% { transform: scale(1.12); opacity: 0.7; } }
.kidmap .isle:hover, .kidmap .isle:active { transform: translate(-50%, -50%) scale(1.06); }
.kidmap .isle.locked .isle-blob, .kidmap .isle.goal .isle-blob { filter: grayscale(0.8) brightness(1.1); opacity: 0.6; }
.kidmap .isle .fog { position: absolute; inset: -22%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0 38%, rgba(255, 255, 255, 0.45) 55%, transparent 72%); animation: fog-drift 7s ease-in-out infinite; }
.kidmap .isle.goal .fog { opacity: 0.55; }
@keyframes fog-drift { 50% { transform: translateX(6%) scale(1.05); } }
.kidmap .isle-tica { position: absolute; width: 60%; bottom: 40%; image-rendering: pixelated; opacity: 0.55; filter: saturate(0.6); }
.kidmap .isle-medals { position: absolute; top: 72%; display: flex; gap: 2px; pointer-events: none; }
.kidmap .isle-medals .medal { font-size: clamp(4px, 0.55vw, 7px); }
.kidmap .isle.nope { animation: isle-nope 400ms ease; }
@keyframes isle-nope { 25% { transform: translate(-58%, -50%); } 75% { transform: translate(-42%, -50%); } }
.kidmap .isle-polvim { width: calc(30 / 384 * 100%); transform: translate(-50%, -96%); pointer-events: none; z-index: 2;
  margin-top: calc(-12 / 384 * 100%); } /* em pé na beira de cima da ilha, sem cobrir o desenho */
.kidmap .isle-polvim img { width: 100%; image-rendering: pixelated; animation: bob 2.4s ease-in-out infinite; transform-origin: bottom center; }
.kidmap.isles .tap-hint { top: calc((var(--y) - 58) / 216 * 100%); }
.kidmap .isles-logo { position: fixed; left: 112px; top: 18px; margin: 0; z-index: 6; }
.kidmap .isles-logo .logo-word { display: inline-block; font-size: clamp(1.6rem, 3vw, 2.4rem); background: rgba(255, 253, 248, 0.94); padding: 2px 20px 6px;
  border-radius: 999px; box-shadow: 0 4px 0 rgba(18, 52, 90, 0.3); }
@media (max-height: 500px) { .kidmap .isles-logo { left: 68px; top: 8px; } }
@media (prefers-reduced-motion: reduce) { .kidmap .isle.here::before, .kidmap .isle .fog, .kidmap .isle-polvim img, .kidmap .isle.nope { animation: none; } }

/* Com a arte do arquipélago: a área de toque cobre a ilha desenhada; neblina por cima das ilhas que ainda vêm */
.kidmap.isles .board:not(.sea) .isle { width: calc(58 / 384 * 100%); }
.kidmap.isles .board:not(.sea) .isle .fog { inset: -12%; }
.kidmap.isles .board:not(.sea) .isle.goal .fog { opacity: 0.35; }
.kidmap.isles .board:not(.sea) .isle-medals { top: 62%; }
.kidmap.isles .board:not(.sea) .isle-medals .medal { font-size: clamp(5px, 0.75vw, 9px); }
.kidmap .isle-polvim.top { transform: translate(28%, -78%); }
.kidmap.isles .tap-hint.top { top: calc((var(--y) + 30) / 216 * 100%); rotate: 180deg; }
/* Recado: na coluna da esquerda (o canto de baixo é da Praia da Chegada); o balão abre para a direita */
.kidmap.isles .map-msg { top: 232px; bottom: auto; }
.kidmap.isles .msg-pop { position: absolute; left: 84px; top: 0; white-space: nowrap; }
.kidmap.isles .msg-pop::after { display: none; }
@media (max-height: 500px) { .kidmap.isles .map-msg { top: 150px; left: 8px; } .kidmap.isles .msg-pop { left: 56px; } }
/* Neblina suave (specs/04: "em silhueta, coberta de neblina suave"): a ilha continua aparecendo por baixo */
.kidmap.isles .board:not(.sea) .isle .fog { inset: -6%;
  background: radial-gradient(ellipse at 50% 52%, rgba(232, 244, 255, 0.62) 0 42%, rgba(232, 244, 255, 0.3) 60%, transparent 74%); }
.kidmap.isles .board:not(.sea) .isle.goal .fog { opacity: 0.5; }
.kidmap.isles .board:not(.sea) .isle-tica { width: 34%; bottom: 30%; left: 2%; opacity: 0.8; }
/* Efeitos de pixel dos mapas (map-fx.js): canvas 384 × 216 por cima da arte, ampliado sem suavizar */
.kidmap .map-fx { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
.kidmap .board.fx .stop.here::before, .kidmap.isles .board:not(.sea) .isle.here::before { display: none; }
.app .hero-actions { align-items: center; } /* Progresso e Jogar da mesma altura, alinhados */
/* Escolha do bichinho: grade compacta (são muitos) */
.choices.avatars { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.choices.avatars .choice { padding: 10px 6px; gap: 4px; }
.choices.avatars .choice img { width: 56px; height: 56px; }
.choices.avatars .choice strong { font-size: 0.88rem; font-weight: 800; }

/* ---------- Ícones em pixel art nas telas da criança (06/10/2026) ---------- */
.px-icon { display: inline-block; flex: none; width: 1.4em; height: 1.4em; image-rendering: pixelated; object-fit: contain; }
.px-badge { display: inline-grid; place-items: center; flex: none; width: 1.9em; height: 1.9em; border-radius: 50%; background: #fffdf8;
  box-shadow: inset 0 -0.12em 0 rgba(42, 39, 51, 0.12); }
.px-badge .px-icon { width: 1.25em; height: 1.25em; }
.round .disc.art { background: #fffdf8; }
.round .disc.art > .px-icon { width: 62%; height: 62%; }
.kid .round .disc.art > .px-icon { width: 60%; height: 60%; }
/* Recado/medalha: botão redondo com rótulo, igual aos outros do mapa */
.kidmap .msg-round { border: 0; background: none; padding: 0; cursor: pointer; }
.kidmap .msg-round .round-label { color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
.kidmap .msg-round .disc .medal { font-size: 6px; }
.sheet-status .px-icon, .sheet-locked .px-icon { width: 22px; height: 22px; }
.sheet-play .px-badge { font-size: 1.15em; }
.sheet-close .px-icon, .card-close .px-icon { width: 26px; height: 26px; }
.card-world .px-icon { width: 16px; height: 16px; }
.card-listen .px-badge { font-size: 0.95em; }
.prof-ring .px-icon { position: relative; width: 20px; height: 20px; }
.album-done .px-icon { width: 28px; height: 28px; }
/* Avatar próprio (retrato de cabeça e ombros): preenche o círculo, ombros saindo pela borda de baixo */
.avatar.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.tile-card .art img.portrait { width: 78%; }
.choices.avatars .choice img { border-radius: 50%; background: #c4e8ff; }
/* "Próxima ilha": no fim do caminho de um mundo completo (o píer da Praia) */
.kidmap .map-exit { position: absolute; left: calc(var(--x) / 384 * 100%); top: calc(var(--y) / 216 * 100%); transform: translate(-50%, -50%); z-index: 3;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px 8px 10px; border: 0; border-radius: 999px; cursor: pointer;
  background: #fffdf8; color: var(--tinta); font: 900 clamp(0.9rem, 1.4vw, 1.2rem) var(--font-ui); box-shadow: 0 5px 0 rgba(18, 52, 90, 0.35); }
/* o anel pulsa em volta (o botão fica parado: fácil de tocar) */
.kidmap .map-exit::after { content: ''; position: absolute; inset: -6px; border-radius: 999px; border: 4px solid var(--sol); pointer-events: none;
  animation: exit-pulse 1.6s ease-in-out infinite; }
.kidmap .map-exit .px-icon { width: 2em; height: 2em; }
.kidmap .map-exit:focus-visible { outline: 4px solid var(--sol); outline-offset: 3px; }
@keyframes exit-pulse { 50% { transform: scale(1.08); opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .kidmap .map-exit::after { animation: none; } }
/* Viagem pelo arquipélago: o Polvim desliza de ilha em ilha */
.kidmap .isle-polvim.sailing { transition: left 850ms ease-in-out, top 850ms ease-in-out; }
.kidmap .isle-polvim.sailing img { animation: hop 420ms ease-in-out infinite; }
/* Álbum: uma página por mundo, setas para trocar */
.album .album-pager { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 10px; }
.album .album-pager h1 { text-align: center; }
.album .pager-btn { width: 52px; height: 52px; border-radius: 50%; border: 0; background: #fffdf8; box-shadow: 0 4px 0 var(--linha); font: 900 2rem/1 var(--font-ui); color: var(--teal-escuro); cursor: pointer; }
.album .pager-btn.off { visibility: hidden; }
.album .pager-btn:focus-visible { outline: 4px solid var(--sol); outline-offset: 2px; }
.kidmap .stop.here { z-index: 4; } /* a etiqueta da fase de agora fica por cima da parada vizinha */

/* ---------- Livrinho de histórias (07/10/2026, v2): livro de recortes ----------
   Papel com textura (assets/livro), polaroides com fita, figurinhas coladas, fita marcadora, folha que vira em 3D. */
.storybook { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px 96px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #4a7db5, #1d3a66 72%), #1d3a66; }
.storybook::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.25;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0 1px, transparent 1.5px) 0 0 / 46px 46px; }
.storybook .book-side { position: fixed; top: 16px; left: 16px; z-index: 6; }
.storybook .book-side .round-label { color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
.storybook .book { position: relative; width: min(1120px, 100%, calc((100dvh - 64px) * 1.7)); aspect-ratio: 1.7; perspective: 2400px; }
.storybook .book-spread { width: 100%; height: 100%; }
.storybook .book-spread, .storybook .book.cover { position: relative; display: grid; grid-template-columns: 1fr 1fr;
  padding: 12px; border-radius: 16px; background: url('../assets/livro/capa.png') repeat, #2e8078;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.12), 0 12px 0 #164a45, 0 28px 50px rgba(0, 0, 0, 0.5); transform-style: preserve-3d; }
/* lombada: a dobra no meio do livro */
.storybook .book-spread::after, .storybook .book.cover::after { content: ''; position: absolute; top: 12px; bottom: 12px; left: 50%; width: 46px; transform: translateX(-50%);
  pointer-events: none; z-index: 2; background: linear-gradient(90deg, transparent, rgba(80, 55, 30, 0.28) 45%, rgba(80, 55, 30, 0.42) 50%, rgba(80, 55, 30, 0.28) 55%, transparent); }
.storybook .book-page { position: relative; overflow: hidden; background: url('../assets/livro/papel.png') repeat, #faf4e6; }
.storybook .book-page.left { border-radius: 10px 3px 3px 10px; box-shadow: inset -10px 0 20px -12px rgba(90, 58, 34, 0.5); }
.storybook .book-page.right { border-radius: 3px 10px 10px 3px; box-shadow: inset 10px 0 20px -12px rgba(90, 58, 34, 0.5);
  padding: clamp(18px, 3.2vw, 44px) clamp(18px, 3.2vw, 44px) 80px clamp(26px, 4vw, 56px); display: flex; flex-direction: column; gap: clamp(8px, 1.2vw, 14px); }
/* papel pautado com a margem vermelha */
.storybook .book-page.lined { background: repeating-linear-gradient(transparent 0 calc(2.1em - 1px), rgba(98, 158, 214, 0.28) calc(2.1em - 1px) 2.1em) 0 3.2em,
  linear-gradient(90deg, transparent clamp(16px, 2.6vw, 40px), rgba(228, 87, 46, 0.35) 0 calc(clamp(16px, 2.6vw, 40px) + 2px), transparent 0),
  url('../assets/livro/papel.png') repeat, #faf4e6; font-size: clamp(14px, 1.6vw, 20px); }
/* fita marcadora pendurada no alto da página direita */
.storybook .ribbon { position: absolute; top: -6px; right: 14%; width: 22px; height: 26%; z-index: 3; background: linear-gradient(90deg, #c73a3a, #e45a4f 45%, #b52f2f);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); }
/* polaroide com fita adesiva */
.storybook .polaroid { position: relative; margin: 0; background: #fffefb; padding: clamp(6px, 0.9vw, 12px) clamp(6px, 0.9vw, 12px) clamp(22px, 3vw, 40px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06), 0 10px 22px rgba(60, 40, 20, 0.28);
  transform: rotate(var(--tilt, 0deg)); }
.storybook .polaroid .photo-area { position: relative; }
.storybook .polaroid img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; image-rendering: pixelated; background: #12345a; }
.storybook .polaroid img.memory { filter: brightness(1.12) saturate(0.75) sepia(0.2); }
.storybook .polaroid figcaption { position: absolute; left: 0; right: 0; bottom: clamp(4px, 0.8vw, 10px); text-align: center; font: 700 clamp(0.75rem, 1.2vw, 1.05rem) var(--font-ui); color: #6b5a45; }
.storybook .tape { position: absolute; width: 28%; height: 14%; top: -5%; background: rgba(255, 228, 140, 0.72); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 4% 96%, 0 52%); z-index: 2; }
.storybook .tape.t1 { left: -6%; transform: rotate(-24deg); } .storybook .tape.t2 { right: -6%; transform: rotate(22deg); background: rgba(160, 222, 214, 0.7); }
/* página da esquerda: a cena grande, a anterior "atrás", figurinhas nas margens */
.storybook .book-page.left.paper { display: grid; place-items: center; }
.storybook .main-photo { width: 78%; z-index: 1; }
.storybook .back-photo { position: absolute; width: 46%; left: 6%; top: 7%; opacity: 0.9; filter: saturate(0.85); }
.storybook .back-photo .tape.t2 { display: none; }
.storybook .deco-sticker { position: absolute; width: clamp(48px, 7vw, 92px); image-rendering: pixelated; transform: rotate(var(--tilt, 0deg)); z-index: 2;
  filter: drop-shadow(0 0 0 #fff) drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25)); }
.storybook .deco-sticker.s1 { right: 5%; bottom: 7%; } .storybook .deco-sticker.s2 { right: 7%; top: 6%; }
/* o recado sobre a foto: tamanho e linhas de fitMessage (px da cena 384 × 216 → cqw da foto) */
.storybook .polaroid .photo-area { container-type: inline-size; }
.storybook .book-art-message { --u: calc(100cqw / 384); position: absolute; left: var(--mx); top: var(--my); transform: translate(-50%, -50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: calc(3 * var(--u)); }
.storybook .book-art-message .msg-line { display: flex; gap: calc(var(--ms) * 0.7 * var(--u)); }
.storybook .book-art-message .keycaps { gap: calc(2 * var(--u)); }
.storybook .book-art-message .keycap { min-width: 0; padding: 0; width: calc(var(--ms) * var(--u)); height: calc(var(--ms) * var(--u)); font-size: calc(var(--ms) * 0.66 * var(--u));
  border-radius: calc(var(--ms) * 0.16 * var(--u)); }
.storybook .keycaps { display: inline-flex; gap: 3px; }
.storybook .keycap { min-width: 1.5em; height: 1.6em; padding: 0 0.2em; display: grid; place-items: center; border-radius: 5px; background: #fff;
  color: var(--tinta); font: 800 clamp(0.85rem, 1.6vw, 1.4rem) var(--font); box-shadow: 0 3px 0 #cfc7b7; }
.storybook .page-num { font: 700 1rem var(--font-ui); color: #a07a52; }
.storybook .left-num { position: absolute; left: 22px; bottom: 16px; }
/* página da direita: carimbo, título, balão do Polvim, texto com capitular */
.storybook .stamp { display: inline-block; align-self: flex-start; padding: 2px 10px; border: 2px solid #c0513a; border-radius: 6px; color: #c0513a;
  font: 700 0.85em var(--font-ui); text-transform: uppercase; letter-spacing: 0.08em; transform: rotate(-3deg); background: rgba(255, 255, 255, 0.4); }
.storybook .stamp.big { font-size: 0.95em; }
.storybook .chapter-title { margin: 0; font: 900 clamp(1.4rem, 2.6vw, 2.2rem)/1.1 var(--font-ui); color: #2e8078; }
.storybook .book-says { display: flex; align-items: center; gap: 10px; margin: 0; }
.storybook .book-says img { width: clamp(36px, 4.4vw, 56px); image-rendering: pixelated; }
.storybook .book-says .speech { position: relative; padding: 6px 14px; background: #fff; border: 3px solid #0d2440; border-radius: 16px; font: 700 clamp(1rem, 1.7vw, 1.35rem) var(--font-ui); color: var(--polvim-escuro); }
.storybook .book-says .speech::before { content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%); border: 8px solid transparent; border-right: 10px solid #0d2440; }
.storybook .book-text { margin: 0; font: 700 clamp(1.1rem, 2.1vw, 1.75rem)/2.1em var(--font-ui); line-height: 1.55; color: #3b2a1f; }
.storybook .dropcap { float: left; margin: 0.08em 0.14em 0 0; padding: 0.04em 0.2em; font: 900 2.4em/1 var(--font-ui); color: #fff; background: #e4572e; border-radius: 8px;
  box-shadow: 0 4px 0 #b5442f; }
.storybook .book-foot { position: absolute; left: clamp(26px, 4vw, 56px); right: clamp(18px, 3.2vw, 44px); bottom: clamp(14px, 2vw, 24px); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.storybook .book-listen, .storybook .book-next-chapter, .storybook .book-toc-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  border-radius: 999px; padding: 8px 16px 8px 8px; background: #fff; color: var(--tinta); font: 900 clamp(0.85rem, 1.2vw, 1rem) var(--font-ui); box-shadow: 0 4px 0 #d8cbb2; }
.storybook .book-next-chapter { background: var(--teal); color: #fff; box-shadow: 0 4px 0 var(--teal-escuro); }
.storybook .book-toc-btn { padding: 8px 16px; }
.storybook .book-end { display: grid; gap: 10px; margin-top: auto; padding-bottom: 8px; }
.storybook .book-end strong { font: 700 clamp(1rem, 1.6vw, 1.3rem) var(--font-ui); color: #2e8078; }
.storybook .book-end-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.storybook .book-turn { position: absolute; top: 50%; transform: translateY(-50%); width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  background: #fffaf0; color: #8b5a33; font: 900 2.3rem/1 var(--font-ui); box-shadow: 0 5px 0 #5a3a22; z-index: 5; }
.storybook .book-turn.prev { left: -26px; } .storybook .book-turn.next { right: -26px; }
.storybook .book-turn:disabled { opacity: 0.25; cursor: default; }
.storybook button:focus-visible { outline: 4px solid var(--sol); outline-offset: 3px; }
/* a folha que vira: sai da página e gira 180° sobre a lombada, com sombra */
.storybook .leaf { position: absolute; top: 12px; bottom: 12px; width: calc(50% - 12px); z-index: 4; transform-style: preserve-3d; pointer-events: none; }
.storybook .leaf.to-left { left: 50%; transform-origin: 0 50%; animation: leaf-left 650ms cubic-bezier(0.45, 0.05, 0.3, 1) forwards; }
.storybook .leaf.to-right { left: 12px; transform-origin: 100% 50%; animation: leaf-right 650ms cubic-bezier(0.45, 0.05, 0.3, 1) forwards; }
.storybook .leaf-front, .storybook .leaf-back { position: absolute; inset: 0; backface-visibility: hidden; overflow: hidden; }
.storybook .leaf-front > .book-page { height: 100%; }
.storybook .leaf-back { transform: rotateY(180deg); }
.storybook .leaf-front::after, .storybook .leaf-back::after { content: ''; position: absolute; inset: 0; pointer-events: none; animation: leaf-shade 650ms ease forwards;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.25), transparent 40%); }
@keyframes leaf-left { to { transform: rotateY(-180deg); } }
@keyframes leaf-right { to { transform: rotateY(180deg); } }
@keyframes leaf-shade { 50% { opacity: 1; } from, to { opacity: 0.2; } }
/* capa / sumário */
.storybook .cover-page { background: url('../assets/livro/kraft.png') repeat, #c49668; display: grid; place-items: center; align-content: center; }
.storybook .cover-plate { position: relative; z-index: 3; padding: clamp(10px, 1.6vw, 18px) clamp(18px, 3vw, 34px); background: #fffaf0; border-radius: 10px; text-align: center;
  box-shadow: 0 0 0 4px #fffaf0, 0 0 0 7px #2e8078, 0 10px 20px rgba(0, 0, 0, 0.25); outline: 2px dashed #e4b07a; outline-offset: -8px; transform: rotate(-2deg); }
.storybook .book-title { margin: 0; font: 900 clamp(1.8rem, 4vw, 3.3rem)/1 var(--font-ui); color: #e4572e; text-shadow: 3px 3px 0 #ffd9a8; }
.storybook .cover-sub { display: block; margin-top: 6px; font: 800 clamp(0.75rem, 1.1vw, 0.95rem) var(--font-ui); color: #8b5a33; text-transform: uppercase; letter-spacing: 0.14em; }
.storybook .cover-collage { position: absolute; inset: 0; }
.storybook .cover-photo { position: absolute; width: 40%; }
.storybook .cover-photo.p1 { left: 4%; top: 4%; } .storybook .cover-photo.p2 { right: 4%; top: 6%; }
.storybook .cover-photo.p3 { left: 5%; bottom: 8%; } .storybook .cover-photo.p4 { right: 6%; bottom: 10%; }
.storybook .cover-polvim { position: absolute; z-index: 4; width: clamp(64px, 9vw, 120px); right: 38%; bottom: 3%; image-rendering: pixelated; animation: bob 2.4s ease-in-out infinite;
  filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 6px 8px rgba(0, 0, 0, 0.3)); }
.storybook .note { position: absolute; z-index: 4; left: 5%; bottom: 5%; padding: 14px 16px 12px; background: #fff7c2; transform: rotate(-4deg); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); }
.storybook .note small { display: block; margin-bottom: 6px; font: 700 0.8rem var(--font-ui); color: #8b5a33; }
.storybook .note .tape.t1 { left: 30%; top: -10px; width: 40%; height: 18px; transform: rotate(3deg); }
.storybook .note-keys { display: flex; gap: 8px; flex-wrap: wrap; }
.storybook .book-toc-title { margin: 0 0 4px; font: 900 clamp(1.4rem, 2.6vw, 2.2rem) var(--font-ui); color: #2e8078; }
.storybook .book-toc { list-style: none; margin: 0; padding: 4px 6px 12px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 20px); overflow-y: auto; min-height: 0; }
.storybook .toc-item { display: grid; gap: 8px; width: 100%; border: 0; cursor: pointer; text-align: left; background: none; padding: 0; color: inherit; }
.storybook .toc-item .toc-photo { width: 100%; padding: 5% 5% 6%; transition: transform 160ms ease; }
.storybook .toc-item:hover .toc-photo, .storybook .toc-item:focus-visible .toc-photo { transform: rotate(0deg) scale(1.04); }
.storybook .toc-text { display: grid; gap: 4px; padding-left: 6px; justify-items: start; }
.storybook .toc-text strong { font: 900 clamp(0.9rem, 1.4vw, 1.15rem) var(--font-ui); color: var(--tinta); }
.storybook .toc-item.locked { cursor: default; opacity: 0.75; }
.storybook .toc-item.locked .toc-text strong { color: #a07a52; font-weight: 700; }
.storybook .polaroid.mystery { aspect-ratio: 16 / 11; display: grid; place-items: center; background: #efe6d4; box-shadow: inset 0 0 0 2px #d8cbb2, 0 6px 12px rgba(60, 40, 20, 0.15); transform: rotate(1.5deg); }
.storybook .polaroid.mystery .q { font: 700 clamp(1.6rem, 3vw, 2.6rem) var(--font-ui); color: #c4ad86; }
/* abrir o livro: a capa gira ao entrar no sumário */
.storybook .book.cover.opening .cover-page { animation: cover-open 700ms cubic-bezier(0.3, 0.1, 0.2, 1) both; transform-origin: 100% 50%; }
.storybook .book.cover.opening .right { animation: page-fade 700ms ease both; }
@keyframes cover-open { from { transform: perspective(2400px) rotateY(-100deg); } }
@keyframes page-fade { from { opacity: 0; } 40% { opacity: 0; } }
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .storybook { align-items: start; padding: 110px 14px 100px; overflow-y: auto; }
  .storybook .book-side { left: 12px; top: 12px; }
  .storybook .book { aspect-ratio: auto; width: 100%; }
  .storybook .book-spread, .storybook .book.cover { grid-template-columns: 1fr; }
  .storybook .book-spread::after, .storybook .book.cover::after { display: none; }
  .storybook .book-page.left { min-height: 260px; }
  .storybook .book-page.right { padding-bottom: 24px; }
  .storybook .book-foot { position: static; margin-top: 12px; }
  .storybook .book-turn { top: auto; bottom: -28px; } .storybook .book-turn.prev { left: 8px; } .storybook .book-turn.next { right: 8px; }
  .storybook .leaf { display: none; }
  .storybook .book-toc { grid-template-columns: 1fr 1fr; }
  .storybook .cover-page { min-height: 420px; }
}
@media (prefers-reduced-motion: reduce) { .storybook .cover-polvim, .storybook .book.cover.opening .cover-page, .storybook .book.cover.opening .right { animation: none; } }
/* Figurinhas na área da profissional: mini-álbum por mundo (07/10/2026) */
.stickers-panel { display: grid; gap: 14px; align-content: start; }
.stickers-panel .stk-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.stickers-panel .stk-summary strong { font: 900 1.4rem var(--font-ui); }
.stickers-panel .rar-chip { font: 800 0.78rem var(--font-ui); padding: 2px 10px; border-radius: 999px; background: var(--papel-2); color: var(--tinta-suave); }
.stickers-panel .rar-chip.rara { background: linear-gradient(135deg, #d9f7f3, #e3dcff); color: #4a3fa3; }
.stickers-panel .rar-chip.brilhante { background: linear-gradient(135deg, #fff1a8, #ffd9cf); color: #8a5a00; }
.stickers-panel .stk-world { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--linha); }
.stickers-panel .stk-head { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; }
.stickers-panel .stk-bar { height: 8px; border-radius: 99px; background: var(--papel-2); overflow: hidden; }
.stickers-panel .stk-bar span { display: block; height: 100%; background: var(--teal); border-radius: 99px; }
.stickers-panel .album-mini .slot { position: relative; aspect-ratio: 1; border-radius: 14px; background: #f3efe6; box-shadow: inset 0 0 0 2px #e6dfd0; }
.stickers-panel .album-mini .slot.owned { background: #e2f6f3; box-shadow: inset 0 0 0 2px #9fdad2; }
.stickers-panel .album-mini .slot.owned.rara { box-shadow: inset 0 0 0 2px #a99cf0; }
.stickers-panel .album-mini .slot.owned.brilhante { box-shadow: inset 0 0 0 2px #f0c24a; }
/* a que falta: silhueta do desenho, apagada, com o número */
.stickers-panel .album-mini .slot.missing img { filter: brightness(0); opacity: 0.12; }
.stickers-panel .album-mini .mini-num { position: absolute; left: 6px; top: 4px; font: 800 0.72rem var(--font-ui); color: #a99f8c; }
.stickers-panel .album-mini .mini-qty { position: absolute; right: 2px; bottom: 2px; }
/* Tela que não é 16:9 (iPad em pé): em volta do mapa, o próprio mapa desfocado e escurecido (não um azul vazio) */
.kidmap::before { content: ''; position: fixed; inset: -20px; z-index: 0; pointer-events: none;
  background: var(--map-url, none) center / cover; filter: blur(14px) brightness(0.6) saturate(0.9); }
.kidmap > .board { position: relative; z-index: 1; box-shadow: 0 0 40px rgba(0, 0, 0, 0.35); }
.kidmap > :not(.board) { z-index: 2; }

/* Arquipélago: ilha com mais de um mundo, no meio dela (Estação: 3 e 4) — a medalha do mundo de agora aparece apagada,
   mas visível e pulsando, ao lado da já ganha: a ilha não parece terminada */
.isle-medals .medal.locked .medal-disc { opacity: 0.92; filter: grayscale(1) brightness(1.08); animation: medal-next 1.8s ease-in-out infinite; }
.isle-medals .medal.locked .medal-disc::before { text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45); z-index: 1; }
@keyframes medal-next { 50% { transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .isle-medals .medal.locked .medal-disc { animation: none; } }
.kidmap:not(.isles) .tap-hint.below { top: calc((var(--y) + 16) / 216 * 100%); rotate: 180deg; }
/* Ilha com dois mundos: tocar na medalha ganha abre o mapa daquele mundo */
.kidmap .isle-medals.tappable .medal.earned { pointer-events: auto; cursor: pointer; transition: transform 120ms ease; }
.kidmap .isle-medals.tappable .medal.earned:hover { transform: translateY(-2px) scale(1.08); }

/* Carta LENDÁRIA (Mundo 6 em diante, specs/20): a moldura ornamentada inteira, na proporção da arte (160 × 237) e sem
   esticar nada; a carta encaixada no desenho: o nome na faixa (x 50–120, y 29–38, abaixo da estrela), a ilustração animada na janela
   (x 24–135, y 47–167; a janela passa um pouco por baixo da moldura), as estrelas e a curiosidade na placa
   (a parte azul: x 30–130, y 179–203). As letras acompanham a largura da carta (cqw), do tamanho do álbum ao da recompensa. */
.sticker-card.lendaria { padding: 0; background: none; aspect-ratio: 160 / 237; border-radius: 7%; container-type: inline-size;
  box-shadow: none; --foil: 0.45; --sparkle: 0.7; }
.lend-frame { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; z-index: 3;
  filter: drop-shadow(0 12px 18px rgba(18, 30, 80, 0.45)) drop-shadow(0 0 14px rgba(245, 197, 66, 0.45)); }
.lend-window { position: absolute; left: 14%; width: 72%; top: 18.6%; height: 52.4%; overflow: hidden; background: #0b1638; }
.lend-window .card-art { position: absolute; inset: 0; border-radius: 0; box-shadow: none; }
.lend-window .card-art.animated { background: #0b1638; }
.lend-window .card-art.animated img { width: 100%; height: 100%; object-fit: cover; filter: none; }
.lend-window .card-art.animated canvas.live-card { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; position: relative; z-index: 5; }
.lend-name { position: absolute; left: 28%; width: 44%; top: 12.1%; height: 4.6%; z-index: 6; display: grid; place-items: center;
  font: 900 min(5cqw, calc(68cqw / var(--len, 10)))/1 var(--font-ui); letter-spacing: 0.02em; color: #5a330c; white-space: nowrap; overflow: hidden;
  /* letra gravada no pergaminho: luz embaixo, sombra em cima (parece parte da faixa, não um texto colado por cima) */
  text-shadow: 0 0.35cqw 0 rgba(255, 248, 214, 0.95), 0 -0.25cqw 0 rgba(120, 72, 14, 0.35); }
.lend-plaque { position: absolute; left: 18.8%; width: 62.4%; top: 75.6%; height: 10.2%; z-index: 6; display: grid; align-content: center;
  justify-items: center; gap: 0.8cqw; text-align: center; }
.lend-rank { display: flex; align-items: center; gap: 2cqw; }
.lend-rank .stars { display: flex; gap: 0.6cqw; }
.lend-rank .star { font-size: 3.8cqw; line-height: 1; color: #f5c542; text-shadow: 0 0 1.4cqw rgba(255, 220, 120, 0.9); animation: lend-star 1.6s ease-in-out infinite; }
.lend-rank .star:nth-child(2) { animation-delay: 0.2s; } .lend-rank .star:nth-child(3) { animation-delay: 0.4s; } .lend-rank .star:nth-child(4) { animation-delay: 0.6s; }
@keyframes lend-star { 50% { transform: scale(1.25); filter: brightness(1.3); } }
.lend-rank .rarity-label { font: 900 3cqw/1 var(--font-ui); letter-spacing: 0.08em; color: #f5c542; }
.lend-desc { margin: 0; font: 700 3.1cqw/1.18 var(--font); color: #fff6d6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: balance; }
.sticker-card.compact.lendaria .lend-rank { flex-direction: column; gap: 1.2cqw; }
.sticker-card.compact.lendaria .lend-rank .star { font-size: 6cqw; }
.sticker-card.compact.lendaria .lend-rank .rarity-label { font-size: 5cqw; }
.sticker-card.lendaria .card-foil, .sticker-card.lendaria .card-sparkle, .sticker-card.lendaria .card-glare { z-index: 5; border-radius: 0;
  /* o brilho só existe onde há carta: o desenho da moldura + a janela da ilustração (nada vaza nos cantos recortados) */
  mask: url(../assets/sprites/cartas/moldura-lendaria.png) 0 0 / 100% 100% no-repeat, linear-gradient(#000, #000) 50% 39.1% / 72% 52.4% no-repeat; }
.rar.lendaria, .rar-chip.lendaria { background: linear-gradient(135deg, #1b2a5e, #2f4290); color: #f5c542; }
@media (prefers-reduced-motion: reduce) { .lend-rank .star { animation: none; } }
.reward-title.legend { color: #ffe08a; text-shadow: 0 0 calc(8px * var(--k, 1)) rgba(255, 210, 63, 0.9), 0 2px 0 rgba(18, 30, 80, 0.6); }

/* Mapa do Mundo 7: as pontes de corda que o mapa vai construindo entre as ilhotas passadas */
.kidmap .map-bridges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.kidmap .map-bridges .rope { fill: none; stroke: #5a3418; stroke-width: 0.9; stroke-linecap: round; }
.kidmap .map-bridges .plank { stroke: #c98c4a; stroke-width: 1.8; stroke-linecap: round; filter: drop-shadow(0 0.5px 0 #5a3418); }
.kidmap .map-bridges .fresh .rope { stroke-dasharray: 80; stroke-dashoffset: 80; animation: map-rope 700ms ease-out 300ms forwards; }
.kidmap .map-bridges .fresh .plank { opacity: 0; animation: map-plank 260ms ease-out forwards; }
.kidmap .map-bridges .fresh .plank[data-k='1'] { animation-delay: 990ms; }
.kidmap .map-bridges .fresh .plank[data-k='2'] { animation-delay: 1080ms; }
.kidmap .map-bridges .fresh .plank[data-k='3'] { animation-delay: 1170ms; }
.kidmap .map-bridges .fresh .plank[data-k='4'] { animation-delay: 1260ms; }
.kidmap .map-bridges .fresh .plank[data-k='5'] { animation-delay: 1350ms; }
.kidmap .map-bridges .fresh .plank[data-k='6'] { animation-delay: 1440ms; }
.kidmap .map-bridges .fresh .plank[data-k='7'] { animation-delay: 1530ms; }
.kidmap .map-bridges .fresh .plank[data-k='8'] { animation-delay: 1620ms; }
.kidmap .map-bridges .fresh .plank[data-k='9'] { animation-delay: 1710ms; }
.kidmap .map-bridges .fresh .plank[data-k='10'] { animation-delay: 1800ms; }
.kidmap .map-bridges .fresh .plank[data-k='11'] { animation-delay: 1890ms; }
.kidmap .map-bridges .fresh .plank[data-k='12'] { animation-delay: 1980ms; }
.kidmap .map-bridges .fresh .plank[data-k='13'] { animation-delay: 2070ms; }
.kidmap .map-bridges .fresh .plank[data-k='14'] { animation-delay: 2160ms; }
.kidmap .map-bridges .fresh .plank[data-k='15'] { animation-delay: 2250ms; }
.kidmap .map-bridges .fresh .plank[data-k='16'] { animation-delay: 2340ms; }
.kidmap .map-bridges .fresh .plank[data-k='17'] { animation-delay: 2430ms; }
.kidmap .map-bridges .fresh .plank[data-k='18'] { animation-delay: 2520ms; }
.kidmap .map-bridges .fresh .plank[data-k='19'] { animation-delay: 2610ms; }
@keyframes map-rope { to { stroke-dashoffset: 0; } }
@keyframes map-plank { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .kidmap .map-bridges .fresh .rope, .kidmap .map-bridges .fresh .plank { animation: none; opacity: 1; stroke-dashoffset: 0; } }

/* ---------- Carta de JOGO (Mundo 8 em diante, specs/23) ----------
   A moldura de TCG (160 × 240) inteira, sem esticar; o jogo escreve o nome, o golpe, a curiosidade e os números nas
   áreas dela (medidas na arte): nome x 20–128 y 23–32; elemento x 134–150 y 18–34; janela x 20–140 y 41–136;
   golpe x 30–130 y 141–152; texto x 18–144 y 158–199; ATK x 36–72 e DEF x 90–124, y 206–217. Letras em cqw. */
.sticker-card.tcg { padding: 0; background: none; aspect-ratio: 160 / 240; border-radius: 5%; container-type: inline-size; overflow: hidden; /* a bordinha preta da moldura tem cantos retos */ box-shadow: 0 14px 30px rgba(10, 6, 30, 0.45); --foil: 0.4; --sparkle: 0.6; }
.tcg-window { position: absolute; left: 12.5%; width: 75%; top: 17.1%; height: 39.6%; overflow: hidden; background: #10123a; }
.tcg-window img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.tcg-frame { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; z-index: 3; }
.tcg-name { position: absolute; left: 14%; width: 64%; top: 9.4%; height: 4.6%; z-index: 6; display: flex; align-items: center;
  font: 900 min(6cqw, calc(80cqw / var(--len, 12)))/1 var(--font-ui); color: #2a1206; white-space: nowrap; overflow: hidden; }
.tcg-element { position: absolute; left: 84%; width: 9.5%; top: 7.8%; z-index: 6; image-rendering: pixelated; }
.tcg-move { position: absolute; left: 19%; width: 62%; top: 58.8%; height: 4.6%; z-index: 6; display: grid; place-items: center;
  font: 900 4.4cqw/1 var(--font-ui); color: #4a2208; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; }
.tcg-text { position: absolute; left: 13%; width: 74%; top: 66.5%; height: 15.8%; z-index: 6; display: grid; align-content: center; justify-items: center; gap: 1cqw; text-align: center; }
.tcg-text .stars { display: flex; gap: 0.6cqw; } .tcg-text .star { font-size: 4.4cqw; line-height: 1; color: #c98a14; }
.tcg-desc { margin: 0; font: 700 3.6cqw/1.2 var(--font); color: #3a2414; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tcg-number { font: 800 2.8cqw/1 var(--font-ui); color: #8a6a44; }
.tcg-stat { position: absolute; top: 85.8%; height: 4.6%; z-index: 6; display: flex; align-items: center; justify-content: center; gap: 1cqw;
  font: 900 5cqw/1 var(--font-ui); color: #2a1206; }
.tcg-stat img { height: 100%; image-rendering: pixelated; }
.tcg-stat.atk { left: 22.5%; width: 22.5%; } .tcg-stat.def { left: 56%; width: 21.5%; }
.sticker-card.tcg .card-foil, .sticker-card.tcg .card-sparkle, .sticker-card.tcg .card-glare { z-index: 5; border-radius: 5%; }
.sticker-card.tcg.compact .tcg-text { gap: 0.4cqw; }

/* ---------- Lendária "full art" (Mundo 8 em diante) ----------
   A moldura lendária de TCG (200 × 300, specs/prompts-de-arte/mundo-8.md passo 23) por cima da arte em 3 camadas; a arte
   aparece pela janela inteira (x 18–182, y 46–235) e se move em profundidade com a inclinação (--hx/--hy). Áreas medidas
   na arte: nome x 30–158 y 25–45; elemento x 162–180 y 25–47; golpe x 35–165 y 237–253; ATK x 40–87 e DEF x 114–160,
   y 260–273. A curiosidade fica numa faixa escura discreta no pé da janela, sem painel cobrindo a criatura. */
.sticker-card.full-art { padding: 0; background: none; aspect-ratio: 200 / 300; border-radius: 4%; container-type: inline-size; overflow: visible;
  box-shadow: none; filter: drop-shadow(0 14px 22px rgba(10, 6, 30, 0.55)) drop-shadow(0 0 14px rgba(255, 200, 90, 0.35)); --foil: 0.45; --sparkle: 0.6; }
.fa-art { position: absolute; left: 7%; width: 86%; top: 13%; height: 67.5%; overflow: hidden; border-radius: 6%; background: #0a0a20; }
.fa-art > * { position: absolute; image-rendering: pixelated; }
.fa-l1 { left: -6%; top: -4%; width: 112%; height: 108%; object-fit: cover; object-position: 50% 15%;
  transform: translate(calc((var(--hx, 0.5) - 0.5) * -3%), calc((var(--hy, 0.5) - 0.5) * -3%)) scale(1.02); }
/* a criatura inteira, um pouco maior que a janela (a cabeça e a cauda passam por trás da moldura) */
.fa-fx { left: -8%; top: -6%; width: 116%; height: 112%; object-fit: contain;
  transform: translate(calc((var(--hx, 0.5) - 0.5) * 5%), calc((var(--hy, 0.5) - 0.5) * 5%)) scale(1.04); }
/* a camada da criatura do tamanho exato dela (1:2): as pontas que a arte cortou na borda (a asa da fênix) se dissolvem
   no céu do fundo, em vez de terminar numa linha reta */
.fa-l2 { top: -6%; height: 112%; width: auto; aspect-ratio: 1 / 2; left: 50%;
  transform: translate(calc(-50% + (var(--hx, 0.5) - 0.5) * 5%), calc((var(--hy, 0.5) - 0.5) * 5%)) scale(1.04);
  -webkit-mask: linear-gradient(90deg, transparent, #000 13%, #000 87%, transparent), linear-gradient(transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-composite: source-in; mask: linear-gradient(90deg, transparent, #000 13%, #000 87%, transparent), linear-gradient(transparent, #000 4%, #000 96%, transparent);
  mask-composite: intersect; }
.fa-fx { image-rendering: auto; mix-blend-mode: screen; }
.fa-l3 { left: -8%; top: -6%; width: 116%; height: 112%; object-fit: cover; object-position: 50% 60%;
  transform: translate(calc((var(--hx, 0.5) - 0.5) * 10%), calc((var(--hy, 0.5) - 0.5) * 10%)) scale(1.08); }
.fa-shade { left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(rgba(8, 4, 20, 0), rgba(8, 4, 20, 0.62) 45%, rgba(8, 4, 20, 0.85)); }
.fa-frame { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; z-index: 3; }
.fa-name { position: absolute; left: 16.5%; width: 61%; top: 8.4%; height: 6.6%; z-index: 6; display: flex; align-items: center; justify-content: center;
  font: 900 min(5.6cqw, calc(80cqw / var(--len, 12)))/1 var(--font-ui); color: #ffe9b0; white-space: nowrap; overflow: hidden;
  text-shadow: 0 0.35cqw 0 #2a0606, 0 0 1.6cqw rgba(255, 190, 80, 0.6); }
.fa-element { position: absolute; left: 81.5%; width: 8.5%; top: 9.2%; z-index: 6; image-rendering: pixelated; }
.fa-info { position: absolute; left: 12%; width: 76%; top: 66%; height: 12%; z-index: 4; display: grid; align-content: end; justify-items: center; gap: 0.8cqw; text-align: center; }
.fa-rank { display: flex; align-items: center; gap: 1.4cqw; font: 900 2.8cqw/1 var(--font-ui); letter-spacing: 0.14em; color: #ffd23f; text-shadow: 0 0 1.2cqw rgba(255, 200, 60, 0.8); }
.fa-rank .stars { display: flex; gap: 0.3cqw; } .fa-rank .star { font-size: 3.6cqw; color: #ffd23f; text-shadow: 0 0 1.4cqw rgba(255, 210, 63, 0.9); animation: lend-star 1.6s ease-in-out infinite; }
.fa-desc { margin: 0; font: 700 3.3cqw/1.2 var(--font); color: #fff6e0; text-shadow: 0 0.3cqw 0.6cqw rgba(0, 0, 0, 0.8);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fa-move { position: absolute; left: 18.5%; width: 63%; top: 79.2%; height: 5.2%; z-index: 6; display: grid; place-items: center;
  font: 900 4.4cqw/1 var(--font-ui); color: #4a1a06; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; }
.sticker-card.full-art .tcg-stat { top: 86.7%; height: 4.4%; font-size: 4.6cqw; color: #2a1206; }
.sticker-card.full-art .tcg-stat.atk { left: 20.5%; width: 23%; } .sticker-card.full-art .tcg-stat.def { left: 57.5%; width: 22.5%; }
/* o arco-íris holográfico só no ouro da moldura (na arte desbotava a criatura); o reflexo de luz passa pela carta toda.
   (antes herdava a máscara da moldura lendária antiga: trama pontilhada sobre a arte) */
.sticker-card.full-art .card-foil, .sticker-card.full-art .card-sparkle, .sticker-card.full-art .card-glare { z-index: 5; border-radius: 4%; }
.sticker-card.full-art .card-foil, .sticker-card.full-art .card-sparkle {
  -webkit-mask: url(../assets/sprites/cartas/moldura-tcg-lendaria.png) 0 0 / 100% 100% no-repeat;
  mask: url(../assets/sprites/cartas/moldura-tcg-lendaria.png) 0 0 / 100% 100% no-repeat; }
.sticker-card.full-art .card-glare { opacity: calc(var(--ho) * 0.6); }
@media (prefers-reduced-motion: reduce) { .fa-l1, .fa-fx, .fa-l3 { transform: none; } .fa-l2 { transform: translateX(-50%); } .fa-rank .star { animation: none; } }
/* Mundo 9, prólogo no livro: o recado bagunçado pelo vírus (glitch) */
.storybook .keycap.glitch { color: #d8257f; text-shadow: -1px 0 #28dcff, 1px 0 #ff3caa; animation: book-glitch 0.6s steps(2) infinite; }
@keyframes book-glitch { 25% { transform: translate(1px, -1px); } 50% { transform: translate(-1px, 0); } 75% { transform: skewX(-6deg); } }
@media (prefers-reduced-motion: reduce) { .storybook .keycap.glitch { animation: none; } }
/* Lendária neon (Mundo 9): a criatura nada no canvas (fatias com onda); a imagem fica escondida por baixo */
.sticker-card.full-art.neon .fa-l2 { visibility: hidden; }
.sticker-card.full-art.neon .fa-fx.swim { mix-blend-mode: normal; image-rendering: pixelated; top: -6%; height: 112%; width: auto; aspect-ratio: 1 / 2; left: 50%;
  transform: translate(calc(-50% + (var(--hx, 0.5) - 0.5) * 5%), calc((var(--hy, 0.5) - 0.5) * 5%)) scale(1.04);
  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent), linear-gradient(transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-composite: source-in; mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent), linear-gradient(transparent, #000 4%, #000 96%, transparent);
  mask-composite: intersect; }
@media (prefers-reduced-motion: reduce) { .sticker-card.full-art.neon .fa-fx.swim { transform: translateX(-50%); } }
/* Carta neon (Mundo 9): os painéis da moldura são vidro escuro → letra clara com brilho (letra escura sumia) */
.sticker-card.tcg.neon .tcg-name { color: #eafcff; text-shadow: 0 0 1.4cqw rgba(40, 220, 255, 0.8); }
.sticker-card.tcg.neon .tcg-move { color: #ffe08a; text-shadow: 0 0 1.4cqw rgba(255, 200, 60, 0.7); }
.sticker-card.tcg.neon .tcg-desc { color: #d8f6ff; }
.sticker-card.tcg.neon .tcg-number { color: #8ff3ff; }
.sticker-card.tcg.neon .tcg-text .star { color: #ffd23f; text-shadow: 0 0 1.2cqw rgba(255, 210, 63, 0.8); }
.sticker-card.tcg.neon .tcg-stat, .sticker-card.full-art.neon .tcg-stat { color: #eafcff; text-shadow: 0 0 1.2cqw rgba(40, 220, 255, 0.7); }
.sticker-card.full-art.neon .fa-move { color: #ffe08a; text-shadow: 0 0 1.4cqw rgba(255, 200, 60, 0.7); }
/* Moldura neon (Mundo 9): as áreas medidas NA ARTE dela (160 × 240) — não são as mesmas da moldura do Mundo 8:
   nome x 22–122 y 19–31; elemento: círculo com centro (141, 25); golpe x 30–130 y 143–153; texto x 18–142 y 159–204;
   ATK x 34–70 e DEF x 90–126, y 208–221 (o centro das plaquinhas). */
.sticker-card.tcg.neon .tcg-name { left: 13.75%; width: 62.5%; top: 7.9%; height: 5%; }
.sticker-card.tcg.neon .tcg-element { left: 82.5%; width: 11.25%; top: 6.7%; }
.sticker-card.tcg.neon .tcg-move { left: 18.75%; width: 62.5%; top: 59.6%; height: 4.2%; }
.sticker-card.tcg.neon .tcg-text { left: 11.25%; width: 77.5%; top: 66.25%; height: 18.75%; }
.sticker-card.tcg.neon .tcg-stat { top: 86.7%; height: 5.4%; }
.sticker-card.tcg.neon .tcg-stat.atk { left: 21.25%; width: 22.5%; }
.sticker-card.tcg.neon .tcg-stat.def { left: 56.25%; width: 22.5%; }
/* lendária neon: as plaquinhas medidas na arte dela (200 × 300): ATK centro (65, 268), DEF centro (135, 268) */
.sticker-card.full-art.neon .tcg-stat { top: 87%; height: 5%; }
.sticker-card.full-art.neon .tcg-stat.atk { left: 21%; width: 23%; }
.sticker-card.full-art.neon .tcg-stat.def { left: 56%; width: 23%; }
/* Frases longas nos quadros da fase (Mundos 7 a 9): letra menor, quebra entre palavras, o quadro cresce para baixo */
.sheet-key .keycap.wide.long { height: auto; min-height: 64px; max-width: 100%; padding: 8px 14px; font-size: 1.15rem; line-height: 1.25; text-align: center; white-space: normal; letter-spacing: 0.03em; }
/* Conserto (Mundo 9): a frase com defeito riscada em cima, pequena; a certa embaixo, inteira */
.sheet-key .keycap.fix.stack { display: grid; justify-items: center; gap: 2px; height: auto; min-height: 64px; padding: 8px 14px; font-size: 1.5rem; line-height: 1.2; text-align: center; }
.sheet-key .keycap.fix.stack s { font-size: 0.62em; text-decoration-thickness: 2px; }
.sheet-key .keycap.fix.stack .right { font-weight: 900; }
.sheet-key .keycap.fix.stack.long { font-size: 1.1rem; max-width: 100%; }
.sheet-key:has(.keycap.long), .sheet-key:has(.keycap.stack) { max-width: 100%; }
/* Carta de vidro (Mundo 10): as áreas medidas na moldura de vidro (160 × 240): nome x 18–125 y 17–31; elemento centro
   (141, 24); janela x 20–140 y 38–137; golpe x 25–135 y 140–152; texto x 15–145 y 158–205; ATK x 32–75 e DEF x 87–128, y 208–225 */
.sticker-card.tcg.vidro .tcg-name { left: 13%; width: 64%; top: 7.3%; height: 5.6%; }
.sticker-card.tcg.vidro .tcg-element { left: 81.9%; width: 12.5%; top: 5.8%; }
.sticker-card.tcg.vidro .tcg-window { left: 12.5%; width: 75%; top: 15.8%; height: 41.7%; }
.sticker-card.tcg.vidro .tcg-move { left: 15.6%; width: 68.8%; top: 58.4%; height: 5%; }
.sticker-card.tcg.vidro .tcg-text { left: 10.6%; width: 78.8%; top: 66%; height: 19.4%; }
.sticker-card.tcg.vidro .tcg-stat { top: 86.7%; height: 7%; }
.sticker-card.tcg.vidro .tcg-stat.atk { left: 20%; width: 27%; } .sticker-card.tcg.vidro .tcg-stat.def { left: 54.4%; width: 25.6%; }
/* Lendária de vidro (200 × 292): nome x 28–158 y 22–45; elemento centro (172, 36); janela x 20–180 y 48–228; golpe x 30–170
   y 232–248; ATK centro (65, 261) e DEF centro (135, 261) */
.sticker-card.full-art.vidro { aspect-ratio: 200 / 292; }
.sticker-card.full-art.vidro .fa-art { left: 10%; width: 80%; top: 16.4%; height: 61.6%; border-radius: 3%; }
.sticker-card.full-art.vidro .fa-name { left: 14%; width: 65%; top: 7.5%; height: 7.9%; color: #20314d; text-shadow: 0 0 1.4cqw rgba(255, 255, 255, 0.9); }
.sticker-card.full-art.vidro .fa-element { left: 81%; width: 10%; top: 8.9%; }
.sticker-card.full-art.vidro .fa-info { top: 63%; height: 14%; }
.sticker-card.full-art.vidro .fa-move { left: 15%; width: 70%; top: 79.5%; height: 5.5%; color: #20314d; }
.sticker-card.full-art.vidro .tcg-stat { top: 86.3%; height: 6.2%; color: #20314d; }
.sticker-card.full-art.vidro .tcg-stat.atk { left: 20%; width: 25%; } .sticker-card.full-art.vidro .tcg-stat.def { left: 55%; width: 25%; }
.sticker-card.full-art.vidro .fa-l2 { visibility: hidden; }
.sticker-card.full-art.vidro .fa-fx.swim { mix-blend-mode: normal; image-rendering: pixelated; top: -4%; height: 108%; width: auto; aspect-ratio: 2 / 3; left: 50%;
  transform: translate(calc(-50% + (var(--hx, 0.5) - 0.5) * 6%), calc((var(--hy, 0.5) - 0.5) * 6%)) scale(1.04); -webkit-mask: none; mask: none; }
.sticker-card.full-art.vidro .card-foil, .sticker-card.full-art.vidro .card-sparkle {
  -webkit-mask: url(../assets/sprites/cartas/moldura-tcg-lendaria-vidro.png) 0 0 / 100% 100% no-repeat; mask: url(../assets/sprites/cartas/moldura-tcg-lendaria-vidro.png) 0 0 / 100% 100% no-repeat; }
/* O recado passado a limpo (depois do Mundo 10): uma MENSAGEM digitada no tablet, não mais o bilhete de papel */
.kidmap .msg-pop .note.digital { background: linear-gradient(#f4f9ff, #e8f2ff); border-radius: 14px; box-shadow: inset 0 0 0 1px #cfe0f5, 0 4px 14px rgba(30, 60, 110, 0.18); transform: none; padding: 0.5em 0.9em 0.7em; }
.kidmap .msg-pop .note.digital .note-line { font-family: -apple-system, "Helvetica Neue", Arial, sans-serif; font-weight: 600; letter-spacing: 0; color: #1b2a44; }
.kidmap .msg-pop .note.digital .note-line.latest .note-text { color: #1b2a44; }
.kidmap .msg-pop .note-to { display: flex; align-items: center; gap: 0.4em; font: 800 0.8em var(--font-ui); color: #5b6b85; border-bottom: 1px solid #cfe0f5; padding-bottom: 0.35em; margin-bottom: 0.35em; }
.kidmap .msg-pop .note-avatar { width: 1.6em; height: 1.6em; object-fit: contain; image-rendering: pixelated; border-radius: 50%; background: #e7f3ff; }
.kidmap .msg-pop .note-send { margin-left: auto; width: 1em; height: 1em; background-color: #b9c6d8;
  -webkit-mask: url('../assets/sprites/cidade/enviar.svg') center / contain no-repeat; mask: url('../assets/sprites/cidade/enviar.svg') center / contain no-repeat; }
/* Mundo 10: o rótulo da parada é o ícone do app (a arte), sem o balãozinho de texto */
.kidmap .stop .badge.icon-badge { background: none; box-shadow: none; padding: 0; top: -62%; }
.kidmap .stop .badge.icon-badge img { width: clamp(28px, 3.6vw, 52px); height: auto; image-rendering: pixelated; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.25)); display: block; }
/* o recado como mensagem de app sobre a foto do livro (Mundo 10): as regras de game.css, em cqw da foto */
.storybook .photo-area .app-msg, .storybook .photo-area .app-msg-to { --uu: calc(100cqw / 384); z-index: 3; }
/* O poder das lendárias de vidro ao tocar (Mundo 10): o cenário escurece um pouco para a criatura brilhar; o grifo
   ganha um halo de neon que troca de cor; o dragão, um brilho gelado de vidro (o resto é do canvas, sticker-card.js) */
.sticker-card.full-art.vidro .fa-l1, .sticker-card.full-art.vidro .fa-fx { transition: filter 0.3s ease; }
.sticker-card.full-art.vidro.power-holograma .fa-l1 { filter: brightness(0.45) saturate(1.3); }
.sticker-card.full-art.vidro.power-holograma .fa-fx { animation: neon-power 0.9s linear infinite; }
.sticker-card.full-art.vidro.power-prisma .fa-l1 { filter: brightness(0.8) saturate(1.2); }
.sticker-card.full-art.vidro.power-prisma .fa-fx { filter: drop-shadow(0 0 6px rgba(140, 220, 255, 0.75)); }
@keyframes neon-power {
  0% { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px #33f6ff) drop-shadow(0 0 14px #ff3df2) hue-rotate(0deg); }
  50% { filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 9px #33f6ff) drop-shadow(0 0 20px #ff3df2) hue-rotate(180deg); }
  100% { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px #33f6ff) drop-shadow(0 0 14px #ff3df2) hue-rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .sticker-card.full-art.vidro.power-holograma .fa-fx { animation: none; filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px #33f6ff) drop-shadow(0 0 14px #ff3df2); }
}
/* o "uau" do toque: a explosão por cima da carta inteira (passa um pouco das bordas) e o pulo da carta */
.sticker-card .fa-burst { position: absolute; left: -35%; top: -35%; width: 170%; height: 170%; pointer-events: none; z-index: 20; }
.sticker-card.power-pop { animation: power-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes power-pop { 0% { scale: 1; } 30% { scale: 1.07; rotate: -1.2deg; } 60% { scale: 0.985; rotate: 0.6deg; } 100% { scale: 1; rotate: 0deg; } }
/* Carta de papel (Mundo 11): as áreas medidas na moldura de papel (160 × 239): nome x 8–82% y 6,5–12,5%; elemento no carimbo
   (x 81–96%); janela x 10,6–88,8% y 15–57%; golpe na faixa amarela y 59,5–64,5%; texto na ficha pautada y 66–85%;
   ATK x 17–44% e DEF x 55–83%, y 86–95% */
.sticker-card.tcg.papel .tcg-name { left: 10%; width: 69%; top: 7.6%; height: 6.4%; justify-content: center; text-align: center; }
.sticker-card.tcg.papel .tcg-element { left: 81.2%; width: 12%; top: 7.4%; } /* no meio do carimbo */
.sticker-card.tcg.papel .tcg-window { left: 10.6%; width: 78.2%; top: 15.1%; height: 41.8%; }
.sticker-card.tcg.papel .tcg-move { left: 16%; width: 68%; top: 59.6%; height: 4.8%; color: #4a3410; }
.sticker-card.tcg.papel .tcg-text { left: 10%; width: 80%; top: 67%; height: 17%; color: #1f3b6e; }
/* os ovais medidos na moldura (x 17,5–44,5% e 55,5–82,5%, y 87–94,6%) */
.sticker-card.tcg.papel .tcg-stat { top: 87.4%; height: 6.8%; color: #4a3410; }
.sticker-card.tcg.papel .tcg-stat.atk { left: 17.5%; width: 27%; } .sticker-card.tcg.papel .tcg-stat.def { left: 55.5%; width: 27%; }
/* Lendária de papel (200 × 295): nome x 20–78% y 9–15%; elemento no aro (x 80–94%, y 10–17%); a arte atrás de tudo, a
   janela x 10,5–89% y 16–75,6%; o golpe na ficha pautada y 78–86,5%; ATK x 19–46% e DEF x 61–88%, y 88,5–94,5% */
.sticker-card.full-art.papel { aspect-ratio: 200 / 295; }
.sticker-card.full-art.papel .fa-art { left: 10%; width: 80%; top: 15.5%; height: 61%; border-radius: 2%; }
.sticker-card.full-art.papel .fa-name { left: 20%; width: 58%; top: 9.3%; height: 5.4%; color: #4a3410; text-shadow: 0 0 1.2cqw rgba(255, 250, 230, 0.9); }
.sticker-card.full-art.papel .fa-element { left: 81.6%; width: 10.5%; top: 10%; }
.sticker-card.full-art.papel .fa-info { top: 63.5%; height: 12%; }
.sticker-card.full-art.papel .fa-move { left: 16%; width: 68%; top: 79%; height: 6%; color: #1f3b6e; }
/* os ovais de ATK e DEF medidos na moldura (x 15,5–43,5% e 56–84%, y 88–94,5%) */
.sticker-card.full-art.papel .tcg-stat { top: 88.4%; height: 5.6%; color: #4a3410; }
.sticker-card.full-art.papel .tcg-stat.atk { left: 16%; width: 27%; } .sticker-card.full-art.papel .tcg-stat.def { left: 56.5%; width: 27%; }
.sticker-card.full-art.papel .fa-l2 { visibility: hidden; }
.sticker-card.full-art.papel .fa-fx.swim { mix-blend-mode: normal; image-rendering: pixelated; top: -4%; height: 108%; width: auto; aspect-ratio: 2 / 3; left: 50%;
  transform: translate(calc(-50% + (var(--hx, 0.5) - 0.5) * 6%), calc((var(--hy, 0.5) - 0.5) * 6%)) scale(1.04); -webkit-mask: none; mask: none; }
.sticker-card.full-art.papel .card-foil, .sticker-card.full-art.papel .card-sparkle {
  -webkit-mask: url(../assets/sprites/cartas/moldura-tcg-lendaria-papel.png) 0 0 / 100% 100% no-repeat; mask: url(../assets/sprites/cartas/moldura-tcg-lendaria-papel.png) 0 0 / 100% 100% no-repeat; }
.sticker-card.full-art.papel .fa-l1, .sticker-card.full-art.papel .fa-fx { transition: filter 0.3s ease; }
.sticker-card.full-art.papel.power-giz .fa-l1 { filter: brightness(0.75) saturate(1.25); }
.sticker-card.full-art.papel.power-giz .fa-fx { filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.85)); }
.sticker-card.full-art.papel.power-looping .fa-l1 { filter: brightness(0.7) saturate(1.3); }
.sticker-card.full-art.papel.power-looping .fa-fx { filter: drop-shadow(0 0 7px rgba(255, 210, 90, 0.95)); }
/* A carta (depois do Mundo 11): a folha do caderno, pautada, com a margem vermelha e a letra à mão em tinta azul */
.kidmap .msg-pop .note.carta { background: #fffaf0 repeating-linear-gradient(transparent 0 1.55em, #bcd3ef 1.55em calc(1.55em + 1px)); border-radius: 4px;
  box-shadow: inset 2.2em 0 0 -2.1em #e88, 0 4px 14px rgba(60, 40, 10, 0.18); transform: rotate(-1deg); padding: 0.35em 0.9em 0.6em 2.4em; line-height: 1.55em; }
.kidmap .msg-pop .note.carta .note-line { font-family: var(--font-ui); font-style: italic; font-weight: 800; color: #1a2f78; letter-spacing: 0.01em; }
.kidmap .msg-pop .note.carta .note-line.sign { text-align: right; }
/* a frase na janela da fase (Mundo 11): quebra entre as palavras e cabe sempre na janela */
.sheet-key .keycap.wide.long { overflow-wrap: anywhere; letter-spacing: 0.01em; }
.sheet-keys:has(.keycap.long) { flex-direction: column; align-items: stretch; gap: 8px; }
.sheet-keys:has(.keycap.long) .sheet-key, .sheet-keys:has(.keycap.long) .keycap { width: 100%; }

/* ---------- A carta ÚNICA: "Tica" (Mundo 12, specs/31 seção 4.2) — 6 camadas com profundidade, a moldura de
   madrepérola, o verso com a dedicatória. A inclinação (--hx/--hy) vem da mesma mola das outras cartas. ---------- */
.sticker-card.tica-card { aspect-ratio: 640 / 960; container-type: inline-size; background: none; border: 0; box-shadow: 0 1.5cqw 5cqw rgba(120, 40, 110, 0.35);
  border-radius: 4cqw; transform-style: preserve-3d; }
.sticker-card.tica-card.big { width: min(78vw, 46vh); }
.sticker-card.tica-card.small { width: 100%; }
.tica-card .tc-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.9s cubic-bezier(0.3, 1.3, 0.5, 1); }
.tica-card.flipped .tc-inner { transform: rotateY(180deg); }
.tica-card .tc-front, .tica-card .tc-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 4cqw; overflow: hidden; }
.tica-card .tc-back { transform: rotateY(180deg); }
.tica-card .tc-back img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.tica-card .tc-window { position: absolute; left: 12.4%; width: 75.2%; top: 16.6%; height: 58.5%; overflow: hidden; background: #f7b9a8; }
.tica-card .tc-l { position: absolute; left: -3%; width: 106%; aspect-ratio: 1 / 2; top: -65.4%; pointer-events: none; }
.tica-card .tc-l img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.tica-card .tc-ceu { transform: translate(calc((var(--hx, 0.5) - 0.5) * -3%), calc((var(--hy, 0.5) - 0.5) * -2%)); }
.tica-card .tc-ceu img { animation: tc-sky 40s ease-in-out infinite alternate; }
.tica-card .tc-mar { transform: translate(calc((var(--hx, 0.5) - 0.5) * -1.5%), calc((var(--hy, 0.5) - 0.5) * -1%)); }
.tica-card .tc-mar img { animation: tc-sea 5s ease-in-out infinite alternate; }
.tica-card .tc-ilha { transform: translate(calc(-6% + (var(--hx, 0.5) - 0.5) * 1.5%), calc(3% + (var(--hy, 0.5) - 0.5) * 1%)) scale(0.6); transform-origin: 0% 50%; }
.tica-card .tc-tica { transform: translate(calc((var(--hx, 0.5) - 0.5) * 4%), calc(-4% + (var(--hy, 0.5) - 0.5) * 3%)) scale(0.46); transform-origin: 50% 75%; }
.tica-card .tc-tica img { transform-origin: 50% 75%; animation: tc-breathe 3.2s ease-in-out infinite; }
.tica-card.tc-wave .tc-tica img { animation: tc-wave 0.9s cubic-bezier(0.3, 1.6, 0.5, 1), tc-breathe 3.2s ease-in-out 0.9s infinite; }
.tica-card .tc-areia { transform: translate(calc((var(--hx, 0.5) - 0.5) * 5%), calc((var(--hy, 0.5) - 0.5) * 4%)); }
.tica-card .tc-frente { transform: translate(calc((var(--hx, 0.5) - 0.5) * 8%), calc((var(--hy, 0.5) - 0.5) * 6%)) scale(1.03); }
.tica-card .tc-live { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
@keyframes tc-sky { from { translate: -1.5% 0; } to { translate: 1.5% 0; } }
@keyframes tc-sea { from { translate: -1% 0.3%; } to { translate: 1% -0.3%; } }
@keyframes tc-breathe { 50% { scale: 1.015 0.985; } }
@keyframes tc-wave { 0% { scale: 1; rotate: 0deg; } 30% { scale: 1.12; rotate: -4deg; translate: 0 -3%; } 60% { rotate: 3deg; } 100% { scale: 1; rotate: 0deg; translate: 0 0; } }
.tica-card .tc-frame { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
.tica-card .tc-name { position: absolute; left: 18%; width: 58%; top: 10.3%; height: 4.9%; display: grid; place-items: center;
  font: 900 6.6cqw/1 var(--font); color: #8a3d73; letter-spacing: 0.06em; text-shadow: 0 0 1.4cqw rgba(255, 255, 255, 0.95); }
.tica-card .tc-seal { position: absolute; left: 80.55%; width: 10.6%; top: 10.4%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font: 900 5.6cqw/1 var(--font);
  color: #e0559a; text-shadow: 0 0 1.5cqw rgba(255, 255, 255, 0.9); background: radial-gradient(circle at 35% 30%, #fff, #ffe3f1 45%, #e9cdf7);
  box-shadow: inset 0 0 1cqw rgba(160, 80, 140, 0.35); }
.tica-card .tc-seal::before { content: '♥'; animation: tc-beat 1.6s ease-in-out infinite; }
@keyframes tc-beat { 15%, 45% { scale: 1.18; } 30% { scale: 1; } }
.tica-card .tc-desc { position: absolute; left: 19.5%; width: 61%; top: 76.6%; height: 6.8%; margin: 0; display: grid; place-items: center; text-align: center;
  font: 800 3.1cqw/1.15 var(--font); color: #6a3a6a; }
.tica-card .tc-kind, .tica-card .tc-count { position: absolute; top: 85.6%; height: 4%; display: grid; place-items: center; font: 900 3.3cqw/1 var(--font); color: #8a3d73; letter-spacing: 0.05em; }
.tica-card .tc-kind { left: 19.5%; width: 23%; }
.tica-card .tc-count { left: 57.5%; width: 23%; }
.tica-card .tc-dedication { position: absolute; left: 14%; width: 72%; top: 64%; height: 22%; margin: 0; display: grid; place-content: center; text-align: center;
  font: italic 800 6cqw/1.25 var(--font); color: #7a3f8a; transform: rotate(-2deg) skewX(-6deg); }
.tica-card .tc-dedication .tc-sign { font-size: 7.5cqw; color: #c2477f; }
.tica-card.compact .tc-desc, .tica-card.small .tc-desc { font-size: 2.8cqw; }
@media (prefers-reduced-motion: reduce) {
  .tica-card .tc-l, .tica-card .tc-l img, .tica-card .tc-seal { animation: none !important; transform: none; }
  .tica-card .tc-tica { transform: translate(0, -4%) scale(0.46); } .tica-card .tc-ilha { transform: translate(-6%, 3%) scale(0.6); }
}

/* Mundo 12: depois do final, a Tica e o Polvim de mãos dadas na ilha dela (sem neblina, para sempre) */
.kidmap .isle-tica.met, .kidmap.isles .board:not(.sea) .isle-tica.met { opacity: 1; filter: none; width: 44%; bottom: 38%; }
/* a travessia já feita: a parada fica selada (nunca se repete) */
.kidmap .stop.sealed { cursor: default; }
.kidmap .stop.sealed img { filter: drop-shadow(0 0 calc(4px * var(--k, 1)) rgba(255, 200, 240, 0.9)); }

/* ---------- as cartas de jogo da CIDADE (Mundo 12): a moldura com o toldo listrado (o nome, em branco, vai nele), o
   azulejo, o envelope de carta aérea (o golpe e a curiosidade) e os dois medalhões (ataque e defesa). Medidas na arte. */
.sticker-card.tcg.cidade .tcg-name { left: 10.5%; width: 67%; top: 5.8%; height: 7.4%; justify-content: center; text-align: center; color: #fff;
  text-shadow: 0 0 0.8cqw rgba(20, 50, 120, 0.9), 0 0.6cqw 0.8cqw rgba(20, 50, 120, 0.8), 0 0 2cqw rgba(0, 20, 80, 0.6); }
.sticker-card.tcg.cidade .tcg-element { left: 80.2%; width: 12.2%; top: 6.4%; }
.sticker-card.tcg.cidade .tcg-window { left: 13.4%; width: 73.2%; top: 15.5%; height: 41.3%; }
.sticker-card.tcg.cidade .tcg-move { left: 16%; width: 68%; top: 64.6%; height: 4.6%; color: #8a3a1a; }
.sticker-card.tcg.cidade .tcg-text { left: 15%; width: 70%; top: 70%; height: 13%; color: #1f3b6e; }
.sticker-card.tcg.cidade .tcg-number { color: #7a6a5a; }
.sticker-card.tcg.cidade .tcg-stat { top: 86.6%; height: 7.6%; color: #5a3a10; }
.sticker-card.tcg.cidade .tcg-stat.atk { left: 20%; width: 23%; } .sticker-card.tcg.cidade .tcg-stat.def { left: 55%; width: 23%; }

/* a lendária da CIDADE (a moldura passo 55), medida pixel a pixel no arquivo: a faixa do toldo (nome) x 24–76% y 9.7–13.9%;
   o medalhão redondo (elemento) x 81.5–93.5% y 8–16%; a caixa de azulejo (curiosidade) x 19–81% y 76–84%; os medalhões
   de ataque x 21–42% e defesa x 58–79%, y 86–90.4%. */
.sticker-card.full-art.cidade { aspect-ratio: 200 / 300; }
/* o golfinho é desenhado pelo canvas do efeito (o salto, as estrelas): a imagem parada fica escondida, senão são dois */
.sticker-card.full-art.cidade .fa-l2 { visibility: hidden; }
.sticker-card.full-art.cidade .fa-fx.swim { mix-blend-mode: normal; image-rendering: pixelated; top: -6%; height: 112%; width: auto; aspect-ratio: 1 / 2; left: 50%;
  transform: translate(calc(-50% + (var(--hx, 0.5) - 0.5) * 5%), calc((var(--hy, 0.5) - 0.5) * 5%)) scale(1.04); }
.sticker-card.full-art.cidade .fa-art { left: 8%; width: 84%; top: 11%; height: 64%; }
.sticker-card.full-art.cidade .fa-name { left: 25%; width: 50%; top: 9.7%; height: 4.2%; color: #fff; font-size: min(4.6cqw, calc(66cqw / var(--len, 12)));
  text-shadow: 0 0 0.9cqw rgba(20, 50, 120, 0.95), 0 0.4cqw 0.6cqw rgba(20, 50, 120, 0.9); }
.sticker-card.full-art.cidade .fa-element { left: 82.3%; width: 10.4%; top: 8.9%; }
.sticker-card.full-art.cidade .fa-info { left: 21%; width: 58%; top: 76.3%; height: 7.6%; gap: 0.3cqw; }
.sticker-card.full-art.cidade .fa-rank { color: #8a3a1a; text-shadow: none; font-size: 2.4cqw; } .sticker-card.full-art.cidade .fa-rank .star { color: #d98a1a; text-shadow: none; font-size: 3cqw; }
.sticker-card.full-art.cidade .fa-desc { color: #1f3b6e; text-shadow: none; font-size: 2.5cqw; line-height: 1.15; -webkit-line-clamp: 2; }
.sticker-card.full-art.cidade .fa-move { left: 14%; width: 72%; top: 70.8%; height: 4.2%; color: #fff; text-shadow: 0 0 1cqw rgba(20, 40, 90, 0.95), 0 0.4cqw 0.8cqw rgba(0, 0, 0, 0.7); }
.sticker-card.full-art.cidade .tcg-stat { top: 86.1%; height: 4.2%; color: #5a3a10; font-size: 4.2cqw; }
.sticker-card.full-art.cidade .tcg-stat.atk { left: 21%; width: 21%; } .sticker-card.full-art.cidade .tcg-stat.def { left: 58%; width: 21%; }
.sticker-card.full-art.cidade .card-foil, .sticker-card.full-art.cidade .card-sparkle {
  -webkit-mask: url(../assets/sprites/cartas/moldura-tcg-lendaria-cidade.png) 0 0 / 100% 100% no-repeat;
  mask: url(../assets/sprites/cartas/moldura-tcg-lendaria-cidade.png) 0 0 / 100% 100% no-repeat; }
/* ---------- O FOIL GRAVADO das lendárias do Mundo 12 (o Golfinho-Guia e a Tica) ----------
   Uma marca d'água: o padrão (ondas e estrelas / conchas e flores) e o emblema grande no meio, recortados num filme
   arco-íris metálico que corre com a inclinação. Parada, a carta mostra só um traço de luz; inclinando, ele acende. */
.fa-etch, .tc-etch { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge;
  opacity: calc(0.13 + var(--ho, 0) * 0.62);
  background: linear-gradient(115deg, hsl(350 90% 72%) 0%, hsl(45 95% 70%) 12%, hsl(140 80% 70%) 24%, hsl(190 90% 72%) 36%, hsl(250 85% 78%) 48%,
    hsl(310 85% 76%) 60%, hsl(350 90% 72%) 72%, hsl(45 95% 70%) 84%, hsl(190 90% 72%) 100%);
  background-size: 260% 260%;
  background-position: calc(var(--hx, 0.5) * 100%) calc(var(--hy, 0.5) * 100%);
  -webkit-mask-composite: source-over; mask-composite: add; }
.fa-etch {
  -webkit-mask: url(../assets/sprites/cartas/foil/mar-padrao.svg) 0 0 / 14cqw repeat, url(../assets/sprites/cartas/foil/golfinho-emblema.svg) 50% 42% / 62cqw no-repeat;
          mask: url(../assets/sprites/cartas/foil/mar-padrao.svg) 0 0 / 14cqw repeat, url(../assets/sprites/cartas/foil/golfinho-emblema.svg) 50% 42% / 62cqw no-repeat; }
.tc-etch {
  -webkit-mask: url(../assets/sprites/cartas/foil/tica-padrao.svg) 0 0 / 15cqw repeat, url(../assets/sprites/cartas/foil/tica-emblema.svg) 50% 30% / 60cqw no-repeat;
          mask: url(../assets/sprites/cartas/foil/tica-padrao.svg) 0 0 / 15cqw repeat, url(../assets/sprites/cartas/foil/tica-emblema.svg) 50% 30% / 60cqw no-repeat; }
/* um brilho que corre devagar pela gravura mesmo parada (a luz da sala passando) */
.fa-etch::after, .tc-etch::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.85) 50%, transparent 62%);
  background-size: 300% 100%; animation: etch-sweep 6s ease-in-out infinite; }
@keyframes etch-sweep { 0%, 30% { background-position: 120% 0; } 70%, 100% { background-position: -20% 0; } }
@media (prefers-reduced-motion: reduce) { .fa-etch::after, .tc-etch::after { animation: none; opacity: 0; } }
