/* Clube das Missões
   Layout: mapa de expedição. Os mundos são paradas de uma trilha pontilhada;
   o adulto opera telas limpas, e a fala para a criança aparece em letra de bilhete. */
:root {
  --bg: #edf4f1;
  --bg-deep: #dfeae5;
  --surface: #ffffff;
  --surface-2: #f4f8f6;
  --ink: #15213a;
  --ink-soft: #4d5a72;
  --line: #c9d7d1;
  --sun: #ffb320;
  --sun-ink: #2b1a00;
  --coral: #f2603f;
  --ok: #1f8a57;
  --trail: #9fb4ab;
  --paper: #fff9ea;
  --paper-ink: #3a2a12;

  --ilha: #0c958d;   --ilha-deep: #07534f;
  --detetive: #3b4fb8; --detetive-deep: #1c2766;
  --floresta: #2f8d45; --floresta-deep: #154d24;
  --planeta: #7448dc;  --planeta-deep: #35197f;
  --reino: #d8422f;    --reino-deep: #7a1d12;

  --f-display: "Bagel Fat One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --f-body: "Lexend", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-voice: "Patrick Hand", "Comic Sans MS", "Chalkboard SE", cursive;

  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 1px 0 rgba(21, 33, 58, .06), 0 10px 30px -18px rgba(21, 33, 58, .35);
  --nav-h: 68px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1527; --bg-deep: #0a1120; --surface: #16213a; --surface-2: #1c2946;
    --ink: #eef2fa; --ink-soft: #a7b3c9; --line: #2b3a5a; --sun: #ffc23f; --sun-ink: #2b1a00;
    --coral: #ff7a5c; --ok: #4cc485; --trail: #3c4f74; --paper: #f6edd6; --paper-ink: #3a2a12;
    --ilha: #2bc3b8; --detetive: #8494f7; --floresta: #62c477; --planeta: #a98cff; --reino: #ff7b69;
    --shadow: 0 1px 0 rgba(0,0,0,.2), 0 12px 30px -16px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1527; --bg-deep: #0a1120; --surface: #16213a; --surface-2: #1c2946;
  --ink: #eef2fa; --ink-soft: #a7b3c9; --line: #2b3a5a; --sun: #ffc23f; --sun-ink: #2b1a00;
  --coral: #ff7a5c; --ok: #4cc485; --trail: #3c4f74; --paper: #f6edd6; --paper-ink: #3a2a12;
  --ilha: #2bc3b8; --detetive: #8494f7; --floresta: #62c477; --planeta: #a98cff; --reino: #ff7b69;
  --shadow: 0 1px 0 rgba(0,0,0,.2), 0 12px 30px -16px rgba(0,0,0,.7);
  color-scheme: dark;
}

.w-ilha { --wc: var(--ilha); --wd: var(--ilha-deep); }
.w-detetive { --wc: var(--detetive); --wd: var(--detetive-deep); }
.w-floresta { --wc: var(--floresta); --wd: var(--floresta-deep); }
.w-planeta { --wc: var(--planeta); --wd: var(--planeta-deep); }
.w-reino { --wc: var(--reino); --wd: var(--reino-deep); }

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 30; background: var(--bg);
}
img, svg { max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3, .display {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: .005em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2rem, 6.5vw, 3.4rem); }
h2 { font-size: clamp(1.45rem, 4vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }
.eyebrow {
  font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft);
}
.muted { color: var(--ink-soft); }
.wrap {
  max-width: 1040px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.stack { display: grid; gap: 16px; }
.section { padding-block: 28px; display: grid; gap: 18px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }

/* ── Topo ─────────────────────────────────────────── */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.topbar .wrap { display: flex; align-items: center; gap: 12px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 40px; width: auto; display: block; }
.logo-on-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-on-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-on-dark { display: block !important; }
}
:root[data-theme="dark"] .logo-on-light { display: none !important; }
:root[data-theme="dark"] .logo-on-dark { display: block !important; }
.brand-name { font-family: var(--f-display); font-size: 1.2rem; line-height: 1; }
.brand-name small { display: block; font-family: var(--f-body); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-top: 3px; }
.topnav { margin-left: auto; display: flex; gap: 4px; }
.topnav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: .92rem; color: var(--ink-soft); }
.topnav a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.back {
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font-size: .9rem; color: var(--ink-soft); padding: 6px 0;
}

/* ── Navegação inferior (celular) ─────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
.tabbar ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--nav-h); }
.tabbar a {
  height: 100%; display: grid; place-items: center; align-content: center; gap: 3px;
  text-decoration: none; font-size: .7rem; color: var(--ink-soft);
}
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tabbar a[aria-current="page"] svg { color: var(--coral); }
@media (min-width: 860px) {
  .tabbar { display: none; }
  body { padding-bottom: 0; }
}
@media (max-width: 859px) { .topnav { display: none; } }

/* ── Botões e chips ───────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 999px; border: 0;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  background: var(--sun); color: var(--sun-ink);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--sun) 55%, #000);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--sun) 55%, #000); }
.btn svg, .back svg { width: 20px; height: 20px; flex: none; }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.world { background: var(--wc); color: #fff; box-shadow: 0 3px 0 color-mix(in srgb, var(--wc) 50%, #000); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px; font-size: .8rem;
  background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line);
}
.chip svg { width: 14px; height: 14px; }
.chip.solid { background: var(--wc, var(--ink)); color: #fff; border-color: transparent; }
.chip.soon { background: transparent; border-style: dashed; }
.chip.done { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); font-weight: 600; }

/* ── Início ───────────────────────────────────────── */
.hero { padding-block: 26px 10px; display: grid; gap: 22px; align-items: center; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.1fr .9fr; padding-block: 48px 24px; } }
.hero h1 .hl { color: var(--coral); }
.hero p.lead { font-size: 1.08rem; color: var(--ink-soft); max-width: 34em; }
.hero-art { position: relative; aspect-ratio: 1 / .82; max-width: 100%; }
.hero-art svg { width: 100%; height: 100%; display: block; }
.trail-dash { stroke-dasharray: 2 12; stroke-linecap: round; animation: march 1.6s linear infinite; }
@keyframes march { to { stroke-dashoffset: -28; } }

.how { display: grid; gap: 12px; }
@media (min-width: 700px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how li { list-style: none; background: var(--surface); border-radius: var(--r); padding: 18px; display: grid; gap: 8px; align-content: start; }
.how ol { margin: 0; padding: 0; display: contents; }
.how .step-n {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--f-display); background: var(--bg-deep); color: var(--ink);
}
.how .phone-off .step-n { background: var(--sun); color: var(--sun-ink); }

.continue {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center;
  background: var(--surface); border-radius: var(--r); padding: 14px; text-decoration: none; box-shadow: var(--shadow);
}
.continue > div { min-width: 0; }
.continue .ttl { font-weight: 600; }

/* ── Trilha de mundos ─────────────────────────────── */
.trail { position: relative; display: grid; gap: 14px; }
.trail::before {
  content: ""; position: absolute; left: 39px; top: 30px; bottom: 30px; width: 0;
  border-left: 3px dotted var(--trail);
}
.world-stop {
  position: relative; display: grid; grid-template-columns: 80px 1fr; gap: 14px; align-items: center;
  text-decoration: none; padding: 12px 14px 12px 0;
}
.world-stop .emb { width: 80px; height: 80px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow); border: 3px solid var(--wc); }
.world-stop .emb svg { width: 52px; height: 52px; }
.world-stop .card { background: var(--surface); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 6px; min-width: 0; box-shadow: var(--shadow); }
.world-stop .card h3 { color: var(--wc); }
.world-stop .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.progress { height: 8px; background: var(--bg-deep); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--wc, var(--coral)); border-radius: 99px; }
@media (min-width: 860px) {
  .trail { grid-template-columns: repeat(5, 1fr); gap: 12px; }
  .trail::before { left: 8%; right: 8%; top: 46px; bottom: auto; height: 0; width: auto; border-left: 0; border-top: 3px dotted var(--trail); }
  .world-stop { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 0; gap: 12px; }
  .world-stop .emb { width: 92px; height: 92px; }
  .world-stop .card { width: 100%; height: 100%; align-content: start; }
  .world-stop .meta { justify-content: center; }
}

/* ── Página do mundo ──────────────────────────────── */
.world-hero { background: var(--wd); color: #fff; position: relative; overflow: hidden; }
.world-hero .wrap { padding-block: 22px 28px; display: grid; gap: 14px; position: relative; z-index: 1; }
.world-hero .back { color: rgba(255,255,255,.8); }
.world-hero .eyebrow { color: rgba(255,255,255,.75); }
.world-hero p { color: rgba(255,255,255,.88); max-width: 36em; }
.world-hero .emb-big { width: 96px; height: 96px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; }
.world-hero .emb-big svg { width: 64px; height: 64px; }
.world-hero .pattern { position: absolute; inset: 0; opacity: .12; pointer-events: none; }
.mascot { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; background: rgba(255,255,255,.1); border-radius: var(--r); padding: 12px 14px; max-width: 520px; }
.mascot b { font-family: var(--f-display); font-weight: 400; font-size: 1.1rem; display: block; }
.mascot span { font-size: .9rem; color: rgba(255,255,255,.85); }

.mission-list { display: grid; gap: 12px; }
@media (min-width: 700px) { .mission-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .mission-list.three { grid-template-columns: repeat(3, 1fr); } }
.m-card {
  display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start;
  background: var(--surface); border-radius: var(--r); padding: 16px; text-decoration: none;
  box-shadow: var(--shadow); position: relative;
}
.m-card > div { min-width: 0; display: grid; gap: 6px; }
.m-card .num {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  font-family: var(--f-display); font-size: 1.5rem; color: var(--wc);
  background: color-mix(in srgb, var(--wc) 13%, var(--surface));
}
.m-card.locked .num { color: var(--ink-soft); background: var(--surface-2); }
.m-card.locked h3 { color: var(--ink-soft); }
.m-card h3 { font-size: 1.08rem; }
.m-card p { font-size: .92rem; color: var(--ink-soft); }
.m-card .facts { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Filtros ──────────────────────────────────────── */
.filters { display: grid; gap: 12px; background: var(--surface); border-radius: var(--r); padding: 14px; }
.filter-group { display: grid; gap: 6px; }
.filter-group .opts { display: flex; gap: 6px; flex-wrap: wrap; }
.opt {
  min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: transparent; cursor: pointer; font-size: .88rem; color: var(--ink);
}
.opt[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.empty { text-align: center; padding: 36px 16px; color: var(--ink-soft); background: var(--surface); border-radius: var(--r); }

/* ── Página da missão ─────────────────────────────── */
.m-hero { background: color-mix(in srgb, var(--wc) 12%, var(--bg)); }
.m-hero .wrap { padding-block: 18px 26px; display: grid; gap: 12px; }
.m-hero h1 { font-size: clamp(1.9rem, 6vw, 3rem); color: var(--ink); }
.m-hero .tag { color: var(--wc); font-weight: 600; font-size: .9rem; }
.facts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 640px; }
@media (min-width: 560px) { .facts-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fact { background: var(--surface); border-radius: var(--r-sm); padding: 10px 12px; display: grid; gap: 2px; }
.fact span { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.fact b { font-size: .98rem; font-variant-numeric: tabular-nums; }

.tabs { display: flex; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 4px; width: fit-content; max-width: 100%; }
.tabs button { border: 0; background: transparent; min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer; font-weight: 500; color: var(--ink-soft); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.panel { background: var(--surface); border-radius: var(--r); padding: 18px; display: grid; gap: 12px; }
.panel h3 { font-size: 1.1rem; }
.two-col { display: grid; gap: 16px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.two-col > * { min-width: 0; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.checklist label { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 10px 6px; border-radius: 10px; cursor: pointer; }
.checklist label:hover { background: var(--surface-2); }
.checklist input { appearance: none; width: 26px; height: 26px; margin: 0; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; cursor: pointer; background: var(--surface); }
.checklist input:checked { background: var(--ok); border-color: var(--ok); }
.checklist input:checked::after { content: ""; width: 7px; height: 13px; border: solid #fff; border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); }
.checklist input:checked + span { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--line); }

.bullets { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.note { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--coral) 10%, var(--surface)); font-size: .92rem; }
.note svg { width: 22px; height: 22px; color: var(--coral); }
.note.tip { background: color-mix(in srgb, var(--sun) 16%, var(--surface)); }
.note.tip svg { color: color-mix(in srgb, var(--sun) 60%, var(--ink)); }

/* Cartas-pista em papel */
.clues { display: grid; gap: 12px; }
@media (min-width: 560px) { .clues { grid-template-columns: repeat(2, 1fr); } }
.clue {
  background: var(--paper); color: var(--paper-ink); border-radius: 6px; padding: 16px 16px 14px;
  font-family: var(--f-voice); font-size: 1.2rem; line-height: 1.35; position: relative;
  box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 8px 18px -12px rgba(0,0,0,.45);
  display: grid; gap: 8px;
}
.clue:nth-child(odd) { transform: rotate(-.6deg); }
.clue:nth-child(even) { transform: rotate(.5deg); }
.clue .clue-n { font-family: var(--f-body); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; opacity: .7; display: flex; justify-content: space-between; gap: 8px; }
.clue .ans { font-family: var(--f-body); font-size: .8rem; opacity: .75; border-top: 1px dashed rgba(58,42,18,.3); padding-top: 6px; }

/* Gerador de código */
.coder { display: grid; gap: 10px; }
.coder label { font-weight: 600; font-size: .92rem; }
.coder input {
  min-height: 50px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface-2);
  padding: 0 14px; font: inherit; font-size: 1.1rem; text-transform: uppercase; color: var(--ink); width: 100%;
}
.code-out { font-family: var(--f-voice); font-size: 1.6rem; letter-spacing: .04em; background: var(--paper); color: var(--paper-ink); border-radius: 8px; padding: 12px 16px; min-height: 60px; overflow-wrap: anywhere; }
.code-pairs { display: flex; flex-wrap: wrap; gap: 6px; }
.code-pairs span { display: grid; text-align: center; min-width: 38px; padding: 4px 6px; border-radius: 8px; background: var(--surface-2); font-variant-numeric: tabular-nums; font-size: .85rem; }
.code-pairs b { font-size: 1.05rem; }

/* ── Modo aventura (condução) ─────────────────────── */
.play { min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; }
.play-top { display: flex; align-items: center; gap: 12px; padding-block: 12px; }
.play-top .back { padding: 0; }
.dots { display: flex; gap: 6px; margin-left: auto; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--wc); }
.dots i.cur { width: 26px; border-radius: 99px; background: var(--wc); }
.play-body { display: grid; gap: 16px; align-content: start; padding-block: 8px 20px; max-width: 720px; width: 100%; margin: 0 auto; }
.stage-label { color: var(--wc); font-weight: 600; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.for-adult { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: .95rem; color: var(--ink-soft); background: var(--surface); border-radius: var(--r-sm); padding: 12px 14px; }
.for-adult svg { width: 22px; height: 22px; }
.voice {
  background: var(--paper); color: var(--paper-ink); border-radius: 8px; padding: 22px 20px 20px;
  font-family: var(--f-voice); font-size: clamp(1.45rem, 4.6vw, 1.9rem); line-height: 1.32;
  box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 14px 28px -18px rgba(0,0,0,.5);
  position: relative; display: grid; gap: 10px;
}
.voice .read { font-family: var(--f-body); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .65; display: flex; gap: 6px; align-items: center; }
.voice .read svg { width: 16px; height: 16px; }
.voice .how-voice { font-family: var(--f-body); font-size: .85rem; font-style: italic; opacity: .75; }
.voice ul { margin: 4px 0 0; padding-left: 1.1em; font-size: .9em; display: grid; gap: 2px; }
.kid-task {
  display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center;
  border: 2px dashed color-mix(in srgb, var(--wc) 55%, transparent); border-radius: var(--r); padding: 14px;
}
.kid-task .ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--wc) 16%, var(--surface)); color: var(--wc); }
.kid-task .ico svg { width: 24px; height: 24px; }
.kid-task small { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.kid-task b { font-weight: 600; }
.phone-down {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center;
  background: var(--ink); color: var(--bg); border-radius: var(--r); padding: 14px 16px;
}
.phone-down svg { width: 34px; height: 34px; color: var(--sun); }
.phone-down b { font-family: var(--f-display); font-weight: 400; font-size: 1.15rem; display: block; line-height: 1.1; }
.phone-down span { font-size: .88rem; opacity: .85; }
details.more { background: var(--surface); border-radius: var(--r-sm); padding: 0 14px; }
details.more summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 600; font-size: .95rem; }
details.more[open] { padding-bottom: 14px; }
details.more p + p { margin-top: 6px; }
.suspects { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.suspects li { background: var(--surface); border-radius: var(--r-sm); padding: 10px 14px; font-size: .95rem; }

.timer { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--r-sm); padding: 10px 14px; }
.timer .t { font-family: var(--f-display); font-size: 1.8rem; font-variant-numeric: tabular-nums; min-width: 4ch; }
.timer .lbl { font-size: .85rem; color: var(--ink-soft); margin-right: auto; }

.play-foot {
  position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
  padding-block: 14px;
}
@media (min-width: 860px) { .play-foot { bottom: 0; } }
.play-foot .row { max-width: 720px; margin: 0 auto; flex-wrap: nowrap; }
.play-foot .btn.block { flex: 1; }

/* Encerramento */
.finale { text-align: center; display: grid; gap: 16px; justify-items: center; padding-block: 12px 20px; }
.finale .stamp-big { width: min(220px, 60vw); animation: stampIn .6s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes stampIn { from { transform: scale(1.8) rotate(-18deg); opacity: 0; } to { transform: scale(1) rotate(-8deg); opacity: 1; } }
.finale .voice { text-align: left; width: 100%; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; width: 100%; height: 100%; }

/* ── Passaporte ───────────────────────────────────── */
.passport {
  background: var(--wd, #1c2766); color: #fff; border-radius: 22px; padding: 22px; display: grid; gap: 14px;
  position: relative; overflow: hidden;
  background-image: radial-gradient(circle at 100% 0, rgba(255,255,255,.12), transparent 50%);
}
.passport .eyebrow { color: rgba(255,255,255,.7); }
.passport h2 { color: #fff; }
.passport .lvl { font-family: var(--f-display); font-size: 1.4rem; color: var(--sun); }
.passport label { font-size: .8rem; color: rgba(255,255,255,.75); }
.passport input { min-height: 46px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; padding: 0 12px; font: inherit; font-size: 1.05rem; width: 100%; max-width: 320px; }
.passport input::placeholder { color: rgba(255,255,255,.55); }
.passport .progress { background: rgba(255,255,255,.18); }
.passport .progress i { background: var(--sun); }
.passport .compass { position: absolute; right: -30px; bottom: -30px; width: 170px; opacity: .14; }
.stamp-world { display: grid; gap: 10px; }
.stamp-world h3 { color: var(--wc); display: flex; align-items: center; gap: 8px; }
.stamp-world h3 svg { width: 28px; height: 28px; }
.stamps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .stamps { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.stamp-slot { aspect-ratio: 1; max-width: 100%; border-radius: 50%; border: 2px dashed var(--line); display: grid; place-items: center; text-decoration: none; position: relative; }
.stamp-slot span { font-family: var(--f-display); color: var(--line); font-size: 1.4rem; }
.stamp-slot.done { border: 0; }
.stamp-slot.done svg { width: 100%; height: 100%; transform: rotate(var(--rot, -6deg)); }
.medals { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.medal { display: grid; justify-items: center; gap: 4px; text-align: center; font-size: .72rem; color: var(--ink-soft); }
.medal .disc { width: 100%; max-width: 64px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--line); }
.medal .disc svg { width: 60%; height: 60%; opacity: .35; filter: grayscale(1); }
.medal.on .disc { background: var(--wc); border-color: var(--sun); }
.medal.on .disc svg { opacity: 1; filter: none; }
.medal.on { color: var(--ink); font-weight: 600; }

/* ── Guia e materiais ─────────────────────────────── */
.guide-grid { display: grid; gap: 12px; }
@media (min-width: 760px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
.prints { display: grid; gap: 12px; }
@media (min-width: 700px) { .prints { grid-template-columns: repeat(2, 1fr); } }
.print-card { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; background: var(--surface); border-radius: var(--r); padding: 14px; text-decoration: none; box-shadow: var(--shadow); }
.print-card > div { min-width: 0; }
.print-card .thumb { width: 64px; height: 80px; border-radius: 6px; background: var(--paper); display: grid; place-items: center; color: var(--wc, var(--paper-ink)); box-shadow: 0 6px 12px -8px rgba(0,0,0,.5); }
.print-card .thumb svg { width: 34px; height: 34px; }
.print-card b { display: block; }
.print-card span { font-size: .88rem; color: var(--ink-soft); }

/* ── Folhas para imprimir ─────────────────────────── */
.sheet-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-block: 14px; }
.sheet {
  background: #fff; color: #1d1d1d; margin: 0 auto 30px; width: 100%; max-width: 794px;
  padding: 30px 30px 36px; border-radius: 4px; box-shadow: 0 12px 40px -20px rgba(0,0,0,.5);
  font-family: var(--f-body); -webkit-print-color-adjust: exact; print-color-adjust: exact;
  --ilha: #0c958d; --detetive: #3b4fb8; --floresta: #2f8d45; --planeta: #7448dc; --reino: #d8422f;
}
.sheet h2 { font-size: 1.75rem; color: #1d1d1d; }
.sheet .sub { color: #555; font-size: .92rem; margin-top: 4px; }
.sheet .voz { font-family: var(--f-voice); font-size: 1.45rem; margin: 18px 0 6px; }
.sheet-head { display: grid; grid-template-columns: 86px 1fr auto; gap: 16px; align-items: center; margin-bottom: 22px;
  padding: 14px 18px; border-radius: 20px; background: color-mix(in srgb, var(--wc) 13%, #fff); border: 2px solid color-mix(in srgb, var(--wc) 35%, #fff); }
.sheet-head .sh-mascot { width: 86px; height: 86px; object-fit: contain; }
.sheet-head .sh-txt { min-width: 0; }
.sh-eyebrow { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--wc, #555); margin-bottom: 2px; }
.sheet-head .brandmark { height: 36px; width: auto; align-self: start; }
/* cartas para recortar */
.cut-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1.5px dashed #9aa; }
.cut-grid > .carta { border: 1.5px dashed #9aa; padding: 12px; }
.carta-in { position: relative; height: 100%; min-height: 230px; display: grid; gap: 10px; align-content: start;
  background: #fff9ea; border-radius: 14px; border: 2.5px solid var(--wc); padding: 34px 18px 18px; overflow: hidden; }
.carta-in::before { content: ""; position: absolute; inset: 0 0 auto; height: 14px; background: var(--wc); }
.carta-n { display: inline-block; justify-self: start; font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: var(--wc); border-radius: 999px; padding: 3px 10px; }
.cut-grid .big { font-family: var(--f-voice); font-size: 1.45rem; line-height: 1.28; color: #3a2a12; position: relative; z-index: 1; }
.cut-grid .task { font-size: .85rem; border-top: 1.5px dashed color-mix(in srgb, var(--wc) 45%, #fff); padding-top: 8px; position: relative; z-index: 1; padding-right: 54px; }
.carta-mascot { position: absolute; right: 8px; bottom: 8px; width: 58px; opacity: .95; }
/* decodificador */
.alpha { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.alpha div { border: 2.5px solid var(--wc); background: color-mix(in srgb, var(--wc) 10%, #fff); border-radius: 12px; text-align: center; padding: 6px 0; }
.alpha b { display: block; font-size: 1.5rem; font-family: var(--f-display); font-weight: 400; color: var(--wc); }
.alpha span { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.confissao { position: relative; margin-top: 24px; border: 2px dashed #9aa; border-radius: 16px; padding: 18px 20px; background: #fff9ea; }
.boxes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.boxes div { width: 54px; display: grid; gap: 4px; text-align: center; }
.boxes .n { font-family: var(--f-voice); font-size: 1.5rem; }
.boxes .l { height: 48px; border: 2.5px solid var(--detetive); border-radius: 8px; background: #fff; }
/* fichas e listas */
.campo { display: flex; gap: 8px; align-items: flex-end; margin: 16px 0 8px; }
.campo span { flex: 1; border-bottom: 2px solid #bbb; min-height: 26px; font-family: var(--f-voice); font-size: 1.4rem; }
.lines div { border-bottom: 1.5px solid #ccc; height: 34px; }
.suspect-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 8px 0; }
.suspect-row > div { border: 2.5px solid var(--wc); border-radius: 14px; padding: 12px; display: grid; gap: 8px; min-height: 180px; align-content: start; background: color-mix(in srgb, var(--wc) 6%, #fff); }
.suspect-row .dica { font-size: .78rem; color: #666; }
.suspect-row .desenho { min-height: 80px; border: 1.5px dashed #bbb; border-radius: 10px; background: #fff; }
.tick { width: 22px; height: 22px; border: 2px solid #1d1d1d; border-radius: 5px; display: inline-block; vertical-align: middle; margin-right: 8px; background: #fff; }
.treasure-list { display: grid; gap: 12px; }
.treasure-list > div { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; border: 2.5px solid var(--wc); border-radius: 16px; padding: 10px 14px; font-size: 1.15rem; background: color-mix(in srgb, var(--wc) 6%, #fff); }
.treasure-list .box { width: 76px; height: 76px; border: 2px dashed var(--wc); border-radius: 12px; background: #fff; position: relative; }
.treasure-list .box b { position: absolute; top: -10px; left: -10px; width: 26px; height: 26px; border-radius: 50%; background: var(--wc); color: #fff; display: grid; place-items: center; font-size: .8rem; }
/* passaporte */
.pass-capa { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; padding: 18px 22px; border-radius: 22px; background: #15213a; color: #fff; margin-bottom: 20px; }
.pass-capa img { width: 150px; background: #fff; border-radius: 16px; padding: 10px; }
.pass-capa h2 { color: #fff; font-size: 1.9rem; }
.pass-capa .sh-eyebrow { color: #ffb320; }
.pass-capa .campo span { border-color: rgba(255,255,255,.5); color: #fff; }
.pass-mundo { margin-top: 14px; }
.pass-titulo { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pass-titulo img { width: 40px; height: 40px; object-fit: contain; }
.pass-titulo span { font-family: var(--f-display); font-size: 1.05rem; color: var(--wc); }
.pass-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.pass-grid div { position: relative; aspect-ratio: 1; border: 2.5px dashed var(--wc); border-radius: 50%; display: grid; place-items: center; text-align: center; padding: 6px; background: color-mix(in srgb, var(--wc) 6%, #fff); }
.pass-grid svg { position: absolute; width: 46%; color: var(--wc); opacity: .16; }
.pass-grid span { position: relative; font-size: .56rem; line-height: 1.15; color: #444; font-weight: 600; }
/* certificado */
.cert { position: relative; text-align: center; padding: 34px 28px 26px; display: grid; gap: 12px; justify-items: center; border-radius: 22px;
  border: 12px solid transparent; background: linear-gradient(#fffdf6, #fffdf6) padding-box, linear-gradient(90deg, var(--ilha), var(--detetive), var(--floresta), var(--planeta), var(--reino)) border-box; }
.cert-logo { height: 46px; }
.cert h2 { font-size: 2.5rem; color: #15213a; }
.cert .name-line { border-bottom: 2.5px solid #15213a; width: 80%; min-height: 54px; font-family: var(--f-voice); font-size: 2.2rem; }
.cert-txt { max-width: 30em; }
.cert-mascotes { display: flex; justify-content: center; align-items: flex-end; gap: 6px; margin-top: 6px; }
.cert-mascotes img { width: 84px; height: 84px; object-fit: contain; }
.cert-rodape { width: 100%; display: grid; grid-template-columns: 1fr 110px 1fr; align-items: center; gap: 10px; font-size: .9rem; margin-top: 4px; }
.cert-selo svg { width: 110px; height: 110px; transform: rotate(-8deg); }
@media (max-width: 560px) {
  .sheet { padding: 22px 16px; }
  .cut-grid { grid-template-columns: 1fr; }
  .suspect-row { grid-template-columns: 1fr; }
  .pass-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .alpha { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .sheet-head { grid-template-columns: 60px 1fr; padding: 12px; }
  .sheet-head .sh-mascot { width: 60px; height: 60px; }
  .sheet-head .brandmark { display: none; }
  .pass-capa { grid-template-columns: 1fr; }
  .cert-rodape { grid-template-columns: 1fr; justify-items: center; }
  .cert-mascotes img { width: 52px; height: 52px; }
}
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; padding: 0 !important; }
  body::before, .topbar, .tabbar, .sheet-bar, .no-print { display: none !important; }
  .sheet { box-shadow: none; margin: 0; padding: 0; max-width: none; break-after: page; }
  .cut-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .suspect-row { grid-template-columns: repeat(3, 1fr) !important; }
  .pass-grid { grid-template-columns: repeat(6, 1fr) !important; }
  .alpha { grid-template-columns: repeat(7, 1fr) !important; }
}

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom, 0px));
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: .92rem; z-index: 50;
  box-shadow: var(--shadow);
}
@media (min-width: 860px) { .toast { bottom: 24px; } }

footer.foot { padding-block: 30px 40px; color: var(--ink-soft); font-size: .82rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Entrada (código de acesso) ───────────────────── */
body.locked .tabbar, body.locked .topnav { display: none; }
body.locked { padding-bottom: 0; }
.gate { padding-block: 24px 48px; }
.gate-card { max-width: 440px; margin: 0 auto; display: grid; gap: 14px; text-align: center; }
.gate-card form { text-align: left; }
.gate-input {
  min-height: 56px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface);
  padding: 0 16px; font: inherit; font-size: 1.2rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); width: 100%;
}
.gate-input:focus { border-color: var(--sun); outline: none; }
.gate-err { color: var(--coral); font-size: .92rem; font-weight: 500; }

/* ── Ilustrações ──────────────────────────────────── */
.cast { position: relative; aspect-ratio: 1 / .86; max-width: 100%; }
.cast > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cast img { position: absolute; height: auto; filter: drop-shadow(0 10px 12px rgba(21, 33, 58, .18)); }
.cast-ilha { width: 33%; left: 3%; bottom: 6%; }
.cast-detetive { width: 29%; left: 27%; bottom: 2%; z-index: 2; }
.cast-planeta { width: 28%; left: 49%; bottom: 10%; }
.cast-reino { width: 30%; right: 2%; bottom: 3%; z-index: 2; }
.cast-floresta { width: 17%; left: 43%; top: 8%; animation: float 3.2s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(3deg); } }

.avatar { width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--wc) 16%, var(--surface)); display: grid; place-items: end center; overflow: hidden; }
.avatar img { width: 86%; height: auto; }

.world-stop .emb { position: relative; overflow: visible; background: color-mix(in srgb, var(--wc) 14%, var(--surface)); }
.world-stop .emb img { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); height: 118%; width: auto; max-width: none; transition: transform .2s ease; }
.world-stop:hover .emb img { transform: translateX(-50%) scale(1.06) rotate(-3deg); }

.world-banner { position: relative; background: var(--wd); }
.world-banner img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
@media (min-width: 860px) { .world-banner img { aspect-ratio: auto; height: 460px; object-position: center 22%; } }
.banner-back {
  position: absolute; top: 12px; left: max(16px, env(safe-area-inset-left, 0px));
  background: rgba(13, 21, 39, .72); color: #fff !important; padding: 6px 14px 6px 8px; border-radius: 999px; backdrop-filter: blur(6px);
}
.world-hero .mascot img { width: 64px; height: 64px; object-fit: contain; }

.m-hero .wrap { position: relative; }
.m-mascot { display: none; }
@media (min-width: 760px) {
  .m-mascot { display: block; position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: 18px; width: 210px; height: auto; pointer-events: none; }
  .m-hero .wrap > :not(.m-mascot) { margin-right: 230px; }
}

.story-head { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; }
.story-head > div { min-width: 0; display: grid; gap: 4px; }
.story-mascot { width: 92px; height: 92px; object-fit: contain; }

.celebrate { position: relative; width: min(280px, 72vw); }
.celebrate > img { width: 100%; height: auto; display: block; animation: hop .9s ease-out both; }
.celebrate .stamp-big { position: absolute; right: -14%; bottom: -6%; width: 46%; }
@keyframes hop { 0% { transform: translateY(30px) scale(.9); opacity: 0; } 60% { transform: translateY(-8px); opacity: 1; } 100% { transform: none; } }

.medal .disc { overflow: hidden; place-items: end center; }
.medal .disc img { width: 82%; height: auto; filter: grayscale(1); opacity: .35; }
.medal.on .disc img { filter: none; opacity: 1; }
.celebrate .stamp-big { animation-delay: .45s; }
.gate-input.gate-email { text-transform: none; letter-spacing: 0; font-size: 1.05rem; }
