/* Bandeiras do Mundo — mobile-first. Tokens iguais aos do site da Expedição Volta ao Mundo. */

:root {
  --cream: #FFF7E8; --sun: #FFEFC2; --mint: #DFF5EA; --paper: #FFFFFF;
  --ink: #1D2B53; --ink-soft: #4A557A;
  --red: #D9381E; --red-dark: #B02A14; --green: #12A36B; --green-dark: #0E8F5E;
  --yellow: #FFC531; --pink: #FFB3CB; --blue: #A9D3FF;
  --ok-bg: #DDF6E8; --bad-bg: #FFE0DA;
  --font-head: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(14px, 4.5vw, 32px);
  --radius: 22px;
  --pop: 0 5px 0 var(--ink);
  --pop-sm: 0 3px 0 var(--ink);
  --top-h: 56px; --nav-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --garland: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='44' viewBox='0 0 240 44'%3E%3Cpath d='M0 5h240' stroke='%231D2B53' stroke-width='2'/%3E%3Cg stroke='%231D2B53' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M5 5h30l-15 30z' fill='%2312A36B'/%3E%3Cpath d='M45 5h30l-15 30z' fill='%23FFC531'/%3E%3Cpath d='M85 5h30l-15 30z' fill='%23fff'/%3E%3Cpath d='M125 5h30l-15 30z' fill='%23D9381E'/%3E%3Cpath d='M165 5h30l-15 30z' fill='%23FFB3CB'/%3E%3Cpath d='M205 5h30l-15 30z' fill='%23A9D3FF'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font-body); font-size: 16px; line-height: 1.45; color: var(--ink);
  background: var(--cream); overscroll-behavior: none; -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased; touch-action: manipulation;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-appearance: none; appearance: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; margin: 0; line-height: 1.15; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.hidden { opacity: 0 !important; pointer-events: none !important; }

/* ---------- Estrutura ---------- */
#app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; position: relative; overflow: hidden; }
#view { flex: 1 1 auto; min-height: 0; position: relative; overflow: hidden; outline: none; }

#topbar {
  flex: none; height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) max(var(--gutter), var(--safe-r)) 0 max(var(--gutter), var(--safe-l));
  display: flex; align-items: center; gap: 8px; background: var(--cream); border-bottom: 3px solid var(--ink); position: relative; z-index: 20;
}
.top-title { flex: 1; min-width: 0; font-family: var(--font-head); font-weight: 600; font-size: 18px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-long { display: none; }
@media (min-width: 560px) { .tt-long { display: inline; } .tt-short { display: none; } }
.lang-btn {
  flex: none; display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 8px 0 5px; background: var(--paper);
  border: 3px solid var(--ink); border-radius: 999px; box-shadow: var(--pop-sm);
}
.lang-btn img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--ink); }
.lang-btn .ico { width: 14px; height: 14px; }
.lang-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.chips { flex: none; display: flex; gap: 6px; }
.chip { display: flex; align-items: center; gap: 3px; height: 34px; padding: 0 9px 0 7px; background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; font-family: var(--font-head); font-size: 15px; }
.chip .ico { width: 17px; height: 17px; }
.chip-flame .ico { color: #FF7A1A; } .chip-star .ico { color: var(--yellow); } .chip-bolt .ico { color: var(--green); }
.chip b { font-weight: 600; }

#nav {
  flex: none; display: flex; justify-content: center; gap: 2px; background: var(--paper); border-top: 3px solid var(--ink);
  padding: 4px max(6px, var(--safe-r)) calc(4px + var(--safe-b)) max(6px, var(--safe-l)); position: relative; z-index: 20;
}
.nav-item { flex: 1 1 0; max-width: 120px; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: var(--nav-h); border: 0; background: none; border-radius: 16px; color: var(--ink-soft); padding: 2px; }
.nav-ico { display: grid; place-items: center; width: 44px; height: 30px; border-radius: 14px; transition: background .15s, transform .15s var(--ease); }
.nav-ico .ico { width: 24px; height: 24px; }
.nav-label { font-size: 11px; font-weight: 800; letter-spacing: .01em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item.active { color: var(--ink); }
.nav-item.active .nav-ico { background: var(--yellow); box-shadow: inset 0 0 0 2.5px var(--ink); transform: translateY(-1px); }
.nav-item:active .nav-ico { transform: scale(.92); }

body[data-mode="quiz"] #topbar, body[data-mode="quiz"] #nav,
body[data-mode="welcome"] #topbar, body[data-mode="welcome"] #nav { display: none; }

/* ---------- Ícones ---------- */
.ico { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ico.filled { fill: currentColor; }
.stars { display: inline-flex; gap: 2px; }
.stars .ico { width: 20px; height: 20px; stroke: var(--ink); stroke-width: 1.6; }
.stars .ico.on { color: var(--yellow); } .stars .ico.off { color: #E6DFD0; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 22px;
  font-family: var(--font-head); font-weight: 600; font-size: 18px; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--paper); box-shadow: var(--pop); transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .15s;
  text-align: center; line-height: 1.1;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { opacity: .5; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-gold { background: var(--yellow); color: var(--ink); }
.btn-danger { background: #fff; color: var(--red-dark); }
.btn-ghost { background: var(--paper); }
.btn-block { width: 100%; }
.btn-lg { min-height: 58px; font-size: 20px; }
.btn { white-space: nowrap; }
/* pares de botões: se o texto não couber lado a lado, empilham (nunca quebram o texto) */
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn-row > .btn { flex: 1 1 140px; }
.btn-row > .btn-icon { flex: 0 0 auto; width: 72px; min-width: 0; padding: 10px 0; }
.btn-icon .ico { width: 28px; height: 28px; stroke-width: 2.6; }
.btn-icon .ico.filled { stroke-width: 1.6; }
.icon-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: var(--paper); border: 3px solid var(--ink); border-radius: 50%; box-shadow: var(--pop-sm); }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }

/* ---------- Bandeiras (contorno estilo adesivo) ---------- */
.flag { display: block; object-fit: contain; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(1.5px 0 0 var(--ink)) drop-shadow(-1.5px 0 0 var(--ink)) drop-shadow(0 1.5px 0 var(--ink)) drop-shadow(0 -1.5px 0 var(--ink)); }
/* altura padronizada: todas as bandeiras de um mesmo lugar têm a MESMA altura; a largura segue a proporção de cada uma */
.flag-xs { width: auto; height: 20px; max-width: 44px; flex: none; }
.flag-sm { width: auto; height: var(--fh, 44px); max-width: 100%; }
.flag-lg { width: auto; height: 100%; max-width: 100%; }

/* ================= CAMINHO ================= */
.path-wrap { position: absolute; inset: 0; }
.path-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: none; }
.path-scroll::-webkit-scrollbar { display: none; }

.zone { position: relative; width: 100%; background: linear-gradient(180deg, var(--sky1), var(--sky2)); border-bottom: 3px solid var(--ink); overflow: hidden; }
.deco-layer { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.deco { position: absolute; }
.deco-svg { display: block; width: 100%; height: 100%; overflow: visible; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.deco-sky { opacity: .95; }
.deco .bob { animation: bob 3.4s ease-in-out infinite; }
.deco .sway { transform-origin: 50% 100%; animation: sway 4.5s ease-in-out infinite; }
.deco .swim { animation: swim 4s ease-in-out infinite; }
.deco .drift { animation: drift 9s ease-in-out infinite; }
.deco .slow-spin { animation: spin 40s linear infinite; transform-origin: 50% 50%; }
.deco .spin { animation: spin 9s linear infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes sway { 50% { transform: rotate(2.5deg); } }
@keyframes swim { 50% { transform: translateX(8px); } }
@keyframes drift { 50% { transform: translateX(12px); } }
@keyframes spin { to { transform: rotate(360deg); } }

.path-col { position: relative; width: min(100%, 480px); height: 100%; margin: 0 auto; z-index: 2; }
.path-line { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.path-line path { fill: none; stroke: var(--line); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 0.1 17; vector-effect: non-scaling-stroke; opacity: .75; }

.node-slot { position: absolute; transform: translate(-50%, -50%); width: 90px; display: flex; flex-direction: column; align-items: center; z-index: 2; }
.node-slot.is-current { z-index: 5; } /* balão "JOGAR" e anel nunca ficam atrás do nó de cima */
.node {
  position: relative; width: 76px; height: 76px; border-radius: 50%; border: 4px solid var(--ink); display: grid; place-items: center; padding: 0; overflow: visible;
  font-family: var(--font-head); font-weight: 600; font-size: 30px; color: #fff; background: var(--accent, var(--green)); box-shadow: 0 6px 0 var(--ink);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.node:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.node .ico { width: 30px; height: 30px; }
.node-num { text-shadow: 0 2px 0 rgba(29, 43, 83, .35); }
.node-open { background: var(--accent); }
.node-current { background: var(--red); }
.node-current::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 4px solid var(--red); opacity: .5; animation: ring 1.8s ease-out infinite; }
.node-done { background: var(--yellow); color: var(--ink); }
.node-done .node-num { text-shadow: none; }
.node-locked { background: #E2DCCD; color: var(--ink); box-shadow: 0 6px 0 #9A937F; border-color: #6F6954; }
.node-locked .ico { color: var(--ink); stroke-width: 2.6; }
@keyframes ring { from { transform: scale(.85); opacity: .7; } to { transform: scale(1.3); opacity: 0; } }
.node.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.node-flag { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; filter: none; }
.node-flag-wrap { overflow: hidden; }
.phase-t .node:not(.node-trophy) { overflow: hidden; background: var(--paper); }
.phase-t .node-flag { border-radius: 0; }
.phase-t .node-locked .node-flag { filter: grayscale(1) opacity(.45); }
.phase-t .node-current::before { display: none; }
.phase-t .node-current { box-shadow: 0 6px 0 var(--ink), 0 0 0 6px rgba(217, 56, 30, .35); }
.node-name { margin-top: 12px; max-width: 120px; padding: 1px 9px; font-family: var(--font-head); font-size: 14px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node-stars { margin-top: 10px; padding: 1px 8px; gap: 1px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 999px; } /* pílula: a linha pontilhada não passa por trás das estrelas */
.node-stars .ico { width: 17px; height: 17px; }
.phase-t .node-stars { margin-top: 4px; }
.bubble {
  position: absolute; top: -34px; left: 50%; transform: translateX(-50%); padding: 3px 12px; background: var(--paper); border: 3px solid var(--ink); border-radius: 12px;
  font-family: var(--font-head); font-size: 14px; color: var(--red-dark); white-space: nowrap; animation: hop 1.3s ease-in-out infinite; z-index: 3;
}
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 12px; height: 12px; background: var(--paper); border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: translateX(-50%) rotate(45deg); }
@keyframes hop { 50% { transform: translate(-50%, -5px); } }
.node-trophy { width: 96px; height: 96px; background: var(--yellow); color: var(--ink); }
.node-trophy.node-locked { background: #E2DCCD; }
.node-trophy .ico { width: 44px; height: 44px; }
.node-trophy img { width: 78%; }
.trophy-slot { width: 110px; }

.zone-banner {
  position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 20px 8px 12px; min-width: 190px; max-width: 94%;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; box-shadow: var(--pop); z-index: 3;
}
.zb-emoji { display: grid; place-items: center; width: 44px; height: 44px; flex: none; font-size: 26px; background: var(--accent); border: 3px solid var(--ink); border-radius: 50%; }
.zb-text { display: flex; flex-direction: column; min-width: 0; }
.zb-text b { font-family: var(--font-head); font-size: 20px; line-height: 1.05; }
.zb-text small { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.goal-banner { background: var(--sun); }
.zb-trophy { background: var(--yellow); color: var(--ink); }
.zb-trophy .ico { width: 26px; height: 26px; stroke-width: 2.4; }

.start-sign { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px var(--gutter) calc(110px + var(--safe-b)); text-align: center; background: var(--sky2, #fff); background: #E7F8D8; color: var(--ink-soft); font-weight: 800; }
.start-sign .ico { width: 34px; height: 34px; color: var(--red); }
.start-sign b { font-family: var(--font-head); font-size: 22px; color: var(--ink); }
.start-sign span { font-size: 14px; max-width: 30ch; }

.zone-chip { transition: opacity .15s;
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 7px; padding: 3px 13px 3px 5px; max-width: calc(100% - 28px);
  background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; box-shadow: var(--pop-sm); font-family: var(--font-head); white-space: nowrap; pointer-events: none;
}
.zone-chip b { font-weight: 600; font-size: 17px; overflow: hidden; text-overflow: ellipsis; }
.zone-chip small { font-weight: 800; font-size: 12px; font-family: var(--font-body); color: var(--ink-soft); background: var(--sun); border-radius: 999px; padding: 1px 8px; }
.zc-emoji { display: grid; place-items: center; width: 28px; height: 28px; font-size: 16px; background: var(--accent, var(--green)); border: 2.5px solid var(--ink); border-radius: 50%; }

.fab { position: absolute; z-index: 6; display: flex; align-items: center; justify-content: center; gap: 6px; width: 52px; height: 52px; padding: 0; background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; box-shadow: var(--pop-sm); font-family: var(--font-head); font-size: 16px; transition: opacity .2s, transform .12s; }
.fab:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.fab .ico { width: 26px; height: 26px; }
.fab-text { display: none; }
.fab-locate { right: max(14px, var(--safe-r)); bottom: 14px; background: var(--yellow); }
.fab-review { left: max(14px, var(--safe-l)); bottom: 14px; background: var(--pink); }
.fab-badge { position: absolute; top: -9px; right: -9px; min-width: 26px; height: 26px; padding: 0 6px; display: grid; place-items: center; background: var(--red); color: #fff; border: 3px solid var(--ink); border-radius: 999px; font-size: 13px; font-weight: 600; }

/* ---------- Sheets ---------- */
#overlay { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.sheet-layer { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; pointer-events: auto; }
.sheet-back { position: absolute; inset: 0; background: rgba(29, 43, 83, .5); opacity: 0; transition: opacity .2s; }
.sheet {
  position: relative; width: 100%; max-width: 560px; max-height: 92dvh; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--cream); border: 3px solid var(--ink); border-bottom: 0; border-radius: 28px 28px 0 0; padding: 10px var(--gutter) calc(20px + var(--safe-b));
  transform: translateY(100%); transition: transform .26s var(--ease);
}
.sheet-layer.open .sheet-back { opacity: 1; }
.sheet-layer.open .sheet { transform: none; }
.sheet-wide { max-width: 640px; }
.sheet-handle { width: 46px; height: 5px; border-radius: 9px; background: #CFC6AE; margin: 0 auto 12px; }
.sheet-title { font-size: 26px; margin-bottom: 4px; }
.sheet-text { color: var(--ink-soft); font-weight: 700; margin: 6px 0 12px; }
.sheet-text.small, .small { font-size: 14px; }
.muted { color: var(--ink-soft); }

.stage-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; margin-bottom: 4px; }
.stage-badge { padding: 2px 14px; background: var(--yellow); border: 3px solid var(--ink); border-radius: 999px; font-family: var(--font-head); font-size: 15px; }
.stage-stars .ico { width: 30px; height: 30px; }
.stage-sheet .sheet-text { text-align: center; }
.stage-media-grid { --fh: clamp(28px, 9vw, 48px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); justify-items: center; align-items: center; gap: 18px 10px; padding: 18px 12px; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; }
.mini-flag { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; }
.stage-media-t { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; }
.sm-flag { display: flex; justify-content: center; height: clamp(76px, 18dvh, 110px); max-width: 100%; }
.stage-best { text-align: center; font-weight: 800; color: var(--ink-soft); font-size: 14px; margin-top: 0; }
.stage-sheet .btn-row {
  position: sticky; bottom: 0; z-index: 2; margin: 12px calc(var(--gutter) * -1) calc(-20px - var(--safe-b));
  padding: 14px var(--gutter) calc(20px + var(--safe-b)); background: linear-gradient(180deg, rgba(255, 247, 232, 0), var(--cream) 28%);
}
.small.muted { margin-top: 10px; }
.confirm .sheet-text { margin-bottom: 0; }

/* ================= JOGO ================= */
.quiz { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--cream); padding-top: var(--safe-t); }
.quiz-top { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px max(var(--gutter), var(--safe-r)) 6px max(var(--gutter), var(--safe-l)); width: min(100%, 760px); margin: 0 auto; }
.quiz-close { width: 42px; height: 42px; }
.qprogress { flex: 1; height: 18px; background: #EADFC6; border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; }
.qprogress i { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .4s var(--ease); background-image: linear-gradient(180deg, rgba(255,255,255,.35), transparent 55%); }
.qcount { font-family: var(--font-head); font-size: 16px; min-width: 40px; text-align: right; }
.quiz-main { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px max(var(--gutter), var(--safe-r)) 14px max(var(--gutter), var(--safe-l)); display: flex; }
.quiz-card { width: min(100%, 560px); margin: auto; display: flex; flex-direction: column; gap: 14px; }
.q-label { font-family: var(--font-head); font-weight: 600; font-size: clamp(21px, 5.6vw, 28px); text-align: center; line-height: 1.15; }
.review-tag { display: inline-block; margin-left: 8px; padding: 1px 10px; vertical-align: middle; font-size: 13px; background: var(--pink); border: 2.5px solid var(--ink); border-radius: 999px; }
.quiz { --qh: clamp(96px, min(24dvh, 33vw), 230px); }
.q-media { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; width: 100%; height: calc(var(--qh) + 48px); background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--pop); padding: 18px; animation: pop .35s var(--ease); }
.q-media .flag-q { width: auto; height: var(--qh); max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; }
.q-media-cap { height: auto; min-height: 150px; display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.q-media-cap .flag-q-sm { width: auto; height: clamp(48px, 8dvh, 64px); max-width: 100%; }
.q-country { font-family: var(--font-head); font-weight: 600; font-size: clamp(26px, 8vw, 38px); text-align: center; line-height: 1.1; overflow-wrap: anywhere; }
.q-statement { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 20px; background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--pop); animation: pop .35s var(--ease); }
.q-about { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-size: 16px; color: var(--ink-soft); }
.q-text { font-family: var(--font-head); font-weight: 500; font-size: clamp(21px, 5.8vw, 27px); line-height: 1.25; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

.q-options { display: flex; flex-direction: column; gap: 12px; }
.opt {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 10px 14px; text-align: left;
  font-family: var(--font-head); font-weight: 600; font-size: clamp(19px, 5.2vw, 23px); line-height: 1.12;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--pop); transition: transform .1s var(--ease), box-shadow .1s var(--ease), background .15s, opacity .2s;
}
.opt:not(:disabled):active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.opt-num { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--sun); font-size: 15px; }
.opt-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.opt-mark { flex: none; width: 28px; height: 28px; display: grid; place-items: center; }
.opt-mark .ico { width: 28px; height: 28px; stroke-width: 3.2; }
.opt-ico { width: 30px; height: 30px; stroke-width: 3; }
.q-tf { flex-direction: row; }
.q-tf .opt { flex: 1; flex-direction: column; justify-content: center; text-align: center; gap: 4px; min-height: 92px; }
.q-tf .opt-mark { display: none; }
.q-tf .opt:first-child { background: var(--mint); } .q-tf .opt:first-child .opt-ico { color: var(--green-dark); }
.q-tf .opt:last-child { background: #FFE3DD; } .q-tf .opt:last-child .opt-ico { color: var(--red); }
.opt.ok { background: var(--ok-bg) !important; border-color: var(--green-dark); box-shadow: 0 5px 0 var(--green-dark); }
.opt.ok .opt-mark { color: var(--green-dark); }
.opt.bad { background: var(--bad-bg) !important; border-color: var(--red-dark); box-shadow: 0 5px 0 var(--red-dark); animation: shake .4s; }
.opt.bad .opt-mark { color: var(--red-dark); }
.opt.dim { opacity: .55; }
.opt:disabled { cursor: default; }

.q-foot { flex: none; max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); background: var(--paper); border-top: 3px solid var(--ink); padding: 0 max(var(--gutter), var(--safe-r)) 0 max(var(--gutter), var(--safe-l)); }
.q-foot.show { max-height: 320px; padding-top: 14px; padding-bottom: calc(16px + var(--safe-b)); }
.q-foot.ok { background: var(--ok-bg); } .q-foot.bad { background: var(--bad-bg); }
.q-foot > * { width: min(100%, 560px); margin-left: auto; margin-right: auto; display: flex; }
.qf-head { align-items: center; gap: 8px; font-family: var(--font-head); font-size: 22px; font-weight: 600; }
.q-foot.ok .qf-head { color: var(--green-dark); } .q-foot.bad .qf-head { color: var(--red-dark); }
.qf-head .ico { width: 28px; height: 28px; stroke-width: 3.2; }
.qf-text { display: block; margin-top: 4px; margin-bottom: 12px; font-weight: 700; font-size: 16px; color: var(--ink); }
.q-foot .btn { width: min(100%, 560px); }

/* Resultado */
.result-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; background: radial-gradient(120% 60% at 50% 0%, var(--sun), var(--cream) 70%); padding-top: var(--safe-t); }
.result { width: min(100%, 520px); margin: 0 auto; padding: 24px var(--gutter) calc(28px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; min-height: 100%; justify-content: center; }
.res-art { width: clamp(110px, 28vw, 150px); aspect-ratio: 1; object-fit: contain; animation: pop .5s var(--ease); }
.res-stars { display: flex; gap: 6px; margin-top: -4px; }
.res-stars .ico { width: 54px; height: 54px; stroke: var(--ink); stroke-width: 1.6; transform: scale(0); animation: starIn .5s var(--ease) forwards; }
.res-stars .ico.on { color: var(--yellow); } .res-stars .ico.off { color: #E6DFD0; }
.res-stars .ico:nth-child(2) { margin-top: -10px; }
@keyframes starIn { 0% { transform: scale(0) rotate(-40deg); } 70% { transform: scale(1.25) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
.res-title { font-size: clamp(30px, 8vw, 40px); }
.res-sub { color: var(--ink-soft); font-weight: 700; max-width: 32ch; }
.res-stats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 6px 0; }
.stat { min-width: 92px; padding: 8px 14px; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--pop-sm); }
.stat-val { display: flex; align-items: center; justify-content: center; gap: 4px; font-family: var(--font-head); font-size: 22px; }
.stat-val .ico { width: 20px; height: 20px; color: var(--green); }
.stat small { font-weight: 800; color: var(--ink-soft); font-size: 12px; }
.res-banner { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--mint); border: 3px solid var(--ink); border-radius: 999px; font-family: var(--font-head); font-size: 17px; }
.res-banner .ico { width: 22px; height: 22px; } .res-banner .ico.on { color: var(--yellow); stroke: var(--ink); }
.res-banner-gold { background: var(--yellow); }
.res-missed { width: 100%; padding: 12px; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; }
.res-missed h3 { font-size: 16px; margin-bottom: 8px; color: var(--ink-soft); }
.missed-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.missed-item { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; background: none; border: 0; border-radius: 0; font-weight: 800; font-size: 14px; }
.missed-item .flag { filter: none; }
.res-actions { width: 100%; display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }

/* ================= PASSAPORTE ================= */
.album-scroll, .settings-scroll, .welcome-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; }
.album { width: min(100%, 1040px); margin: 0 auto; padding: 14px var(--gutter) 28px; display: flex; flex-direction: column; gap: 14px; }
.album-head { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--pop); }
.album-art { width: 62px; height: 62px; object-fit: contain; flex: none; }
.album-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.album-info h1 { font-size: 22px; }
.album-info small { font-weight: 800; color: var(--ink-soft); font-size: 12px; }
.xpbar { height: 12px; background: #EADFC6; border: 2.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.xpbar i { display: block; height: 100%; background: var(--green); }
.album-count { text-align: center; flex: none; padding: 6px 12px; background: var(--sun); border: 3px solid var(--ink); border-radius: 16px; }
.album-count b { display: block; font-family: var(--font-head); font-size: 28px; line-height: 1; }
.album-count small { font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); scroll-padding-inline: var(--gutter); scrollbar-width: none; scroll-snap-type: x proximity; }
.filter-row::-webkit-scrollbar { display: none; }
.fchip { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 84px; padding: 6px 14px; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; box-shadow: var(--pop-sm); scroll-snap-align: start; }
.fchip b { font-family: var(--font-head); font-size: 16px; font-weight: 600; }
.fchip small { font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.fchip.active { background: var(--yellow); }
.fchip.full small::after { content: " ★"; color: var(--red); }
.stamp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 10px; }
.stamp { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; min-width: 0; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--pop-sm); transition: transform .1s var(--ease); }
.stamp:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.stamp-flag { --sh: 40px; position: relative; width: 100%; height: var(--sh); display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; }
.stamp-flag .flag-sm { height: 100%; }
.stamp.locked .flag { filter: grayscale(1) brightness(1.7) contrast(.45) drop-shadow(1.5px 0 0 #C9C0AA) drop-shadow(-1.5px 0 0 #C9C0AA) drop-shadow(0 1.5px 0 #C9C0AA) drop-shadow(0 -1.5px 0 #C9C0AA); }
.stamp.locked { box-shadow: 0 3px 0 #C9C0AA; border-color: #8F8872; background: #FBF6EA; }
.slot-lock { position: absolute; top: -6px; left: calc(50% + 14px); z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; background: var(--yellow); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 50%; box-shadow: 0 2px 0 var(--ink); }
.slot-lock .ico { width: 16px; height: 16px; stroke-width: 2.8; }
.stamp-lock { position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; transform: translate(-50%, -50%); display: grid; place-items: center; background: var(--yellow); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 50%; box-shadow: 0 2px 0 var(--ink); }
.stamp-lock .ico { width: 16px; height: 16px; stroke-width: 2.8; }
.stamp-name { max-width: 100%; font-family: var(--font-head); font-weight: 600; font-size: 14px; line-height: 1.1; text-align: center; overflow-wrap: anywhere; min-height: 2.2em; display: grid; align-items: center; }
.stamp.locked .stamp-name { color: var(--ink-soft); }
.dots { display: flex; gap: 4px; min-height: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); background: #EADFC6; }
.dot.on.dot-f { background: var(--red); } .dot.on.dot-c { background: var(--blue); } .dot.on.dot-t { background: var(--yellow); }

.country-sheet { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.cs-flag { position: relative; display: flex; justify-content: center; height: clamp(104px, 20dvh, 160px); max-width: 100%; }
.cs-flag.locked .flag { filter: grayscale(1) brightness(1.7) contrast(.45) drop-shadow(1.5px 0 0 #C9C0AA) drop-shadow(-1.5px 0 0 #C9C0AA) drop-shadow(0 1.5px 0 #C9C0AA) drop-shadow(0 -1.5px 0 #C9C0AA); }
.cs-q { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-head); font-size: 64px; color: var(--ink-soft); }
.cs-cont { font-weight: 800; color: var(--ink-soft); margin-top: -4px; }
.cs-cap { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; text-align: left; }
.cs-cap small { display: block; font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.cs-cap b { font-family: var(--font-head); font-size: 20px; font-weight: 600; }
.cs-note { font-size: 14px; font-weight: 700; color: var(--ink-soft); max-width: 40ch; }
.cs-badges { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 12px 3px 8px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 999px; font-weight: 800; font-size: 13px; opacity: .55; }
.badge.on { opacity: 1; background: var(--mint); } .badge.na { display: none; }
.badge .ico { width: 16px; height: 16px; }

/* ================= AJUSTES / BOAS-VINDAS ================= */
.settings { width: min(100%, 640px); margin: 0 auto; padding: 14px var(--gutter) 28px; display: flex; flex-direction: column; gap: 14px; }
.card { padding: 14px 16px 16px; background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--pop-sm); }
.card h2 { font-size: 20px; margin-bottom: 8px; }
.warn { padding: 12px 14px; background: var(--sun); border: 3px solid var(--ink); border-radius: 16px; font-weight: 800; font-size: 14px; }
.lang-cards { display: grid; grid-template-columns: 1fr; gap: 10px; }
.lang-card { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 14px; text-align: left; background: var(--cream); border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--pop-sm); }
.lang-card:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.lang-card img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 3px solid var(--ink); flex: none; }
.lc-text { display: flex; flex-direction: column; }
.lc-text b { font-family: var(--font-head); font-size: 22px; font-weight: 600; line-height: 1.1; }
.lc-text small { font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.lang-card.active { background: var(--mint); }
.lc-check { margin-left: auto; width: 26px; height: 26px; color: var(--green-dark); stroke-width: 3.2; }
.setting-row { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.setting-row + .setting-row { border-top: 2px dashed #E3D8BC; }
.sr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sr-text b { font-weight: 800; } .sr-text small { color: var(--ink-soft); font-weight: 700; font-size: 13px; }
.vol-row { flex-direction: column; align-items: stretch; gap: 10px; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; padding: 0; background: #E3D8BC; border: 3px solid var(--ink); border-radius: 999px; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); cursor: pointer; }
.range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); cursor: pointer; }
.switch { flex: none; position: relative; width: 62px; height: 36px; padding: 0; background: #D8D0BB; border: 3px solid var(--ink); border-radius: 999px; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; background: #fff; border: 2.5px solid var(--ink); border-radius: 50%; transition: transform .2s var(--ease); }
.switch.on { background: var(--green); } .switch.on i { transform: translateX(26px); }
.field { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; font-weight: 800; font-size: 14px; }
.input { width: 100%; padding: 10px 14px; font-size: 16px; background: var(--cream); border: 3px solid var(--ink); border-radius: 14px; }
.code-box { margin-top: 10px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; resize: vertical; word-break: break-all; }
.set-msg { min-height: 1.4em; margin-top: 6px; font-weight: 800; font-size: 14px; color: var(--green-dark); }
.danger-zone { border-color: var(--red-dark); }
.about p + p { margin-top: 6px; }

.welcome { min-height: 100%; width: min(100%, 520px); margin: 0 auto; padding: calc(var(--safe-t) + 8px) var(--gutter) calc(28px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.welcome-scroll { background: radial-gradient(120% 50% at 50% 0%, var(--sun), var(--cream) 72%); }
.garland { align-self: stretch; height: 34px; margin: 0 calc(var(--gutter) * -1); background: var(--garland) repeat-x 0 0 / 160px 30px; }
.welcome-art { width: clamp(130px, 38vw, 200px); aspect-ratio: 1; object-fit: contain; animation: bob 3.6s ease-in-out infinite; }
.welcome-title { font-size: clamp(34px, 10vw, 48px); }
.welcome-sub { font-weight: 800; color: var(--ink-soft); }
.welcome-ask { font-family: var(--font-head); font-size: 19px; margin-top: 8px; }
.lang-cards.big { width: 100%; }
.lang-cards.big .lang-card { padding: 14px 16px; background: var(--paper); box-shadow: var(--pop); }
.lang-cards.big .lang-card img { width: 64px; height: 64px; }
.lang-cards.big .lc-text b { font-size: 26px; }
.welcome-note { font-size: 13px; font-weight: 800; color: var(--ink-soft); margin-top: 4px; }

/* Toast + confete */
#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 24px); transform: translate(-50%, 20px); z-index: 200; max-width: min(92vw, 420px); padding: 10px 18px; background: var(--ink); color: #fff; border-radius: 16px; font-weight: 800; font-size: 15px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; inset: 0; z-index: 300; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: .9; } }

/* Certificado */
.cert { padding: 8px; }
.cert-border { padding: 18px 16px 14px; text-align: center; background: #fff; border: 4px double var(--ink); outline: 3px solid var(--yellow); outline-offset: -12px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cert-medal { width: 84px; height: 84px; object-fit: contain; }
.cert-kicker { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--red-dark); font-size: 11px; }
.cert-border h2 { font-size: clamp(22px, 6vw, 30px); }
.cert-border p { font-weight: 700; color: var(--ink-soft); font-size: 14px; }
.cert-name { font-family: var(--font-head); font-size: clamp(26px, 8vw, 38px); font-weight: 600; padding: 2px 14px; border-bottom: 3px solid var(--ink); min-width: 60%; overflow-wrap: anywhere; }
.cert-text { max-width: 34ch; }
.cert-date { font-weight: 800; color: var(--ink-soft); margin-top: 6px; }

/* ================= RESPONSIVO ================= */
@media (max-width: 359px) {
  :root { --gutter: 12px; }
  .chip { padding: 0 7px 0 5px; font-size: 14px; } .chips { gap: 4px; }
  .top-title { display: none; }
  .btn-row > .btn-icon { width: 58px; }
  .btn-lg { font-size: 18px; padding-left: 14px; padding-right: 14px; }
  .nav-label { font-size: 10px; }
  .node { width: 68px; height: 68px; font-size: 26px; }
  .opt { padding: 8px 10px; }
  .stamp-grid { gap: 8px 6px; }
}
@media (min-width: 480px) {
  .stamp-grid { grid-template-columns: repeat(4, 1fr); }
  .lang-cards { grid-template-columns: 1fr 1fr; }
  .welcome .lang-cards.big { grid-template-columns: 1fr; }
}
@media (min-width: 640px) {
  :root { --top-h: 62px; --nav-h: 68px; }
  .fab { width: auto; padding: 0 18px 0 14px; }
  .fab-text { display: inline; }
  .fab-badge { position: static; border-width: 2px; min-width: 24px; height: 24px; }
  .sheet-layer { align-items: center; }
  .sheet { border-bottom: 3px solid var(--ink); border-radius: 28px; max-height: 88vh; transform: translateY(30px) scale(.96); opacity: 0; transition: transform .25s var(--ease), opacity .2s; }
  .sheet-layer.open .sheet { transform: none; opacity: 1; }
  .sheet-handle { display: none; }
  .stamp-grid { grid-template-columns: repeat(5, 1fr); }
  .nav-label { font-size: 12px; }
  #nav { gap: 8px; }
  .top-title { font-size: 20px; }
  .quiz { --qh: clamp(120px, 28dvh, 250px); }
  .stamp-flag { --sh: 46px; }
}
@media (min-width: 960px) {
  .path-col { width: 540px; }
  .node { width: 84px; height: 84px; font-size: 34px; }
  .node-slot { width: 100px; }
  .bubble { top: -38px; font-size: 15px; }
  .zone-chip { padding: 4px 16px 4px 6px; } .zone-chip b { font-size: 18px; }
  .stamp-grid { grid-template-columns: repeat(6, 1fr); }
  .zone-chip b { font-size: 19px; }
  .quiz-card { gap: 20px; width: min(100%, 640px); }
  .q-label { font-size: 32px; }
  .q-text { font-size: 30px; }
  .opt { min-height: 70px; font-size: 24px; }
  .q-tf .opt { min-height: 104px; }
  .q-country { font-size: 44px; }
  .quiz { --qh: clamp(150px, 30dvh, 300px); } .q-media-cap { height: auto; }
  .q-foot > *, .q-foot .btn { width: min(100%, 640px); }
  .opt:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
  .btn:hover:not(:disabled), .node:hover, .stamp:hover, .lang-card:hover, .fchip:hover { filter: brightness(1.04); }
  .node:hover { transform: translateY(-3px); }
  .deco { filter: none; }
}
@media (min-width: 1280px) {
  :root { --gutter: 40px; }
  .stamp-grid { grid-template-columns: repeat(8, 1fr); }
}
@media (min-width: 1800px) { html { font-size: 18px; } }

/* telas baixas / celular na horizontal */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --top-h: 46px; --nav-h: 46px; }
  .nav-ico { height: 24px; } .nav-label { display: none; } .nav-item { flex-direction: row; }
  .quiz-main { padding-top: 2px; padding-bottom: 6px; }
  .quiz-card { width: min(100%, 900px); display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 10px 24px; }
  .q-label { grid-column: 1 / -1; font-size: 20px; }
  .quiz { --qh: clamp(64px, 36dvh, 140px); } .q-media-cap { min-height: 0; }
  .opt { min-height: 48px; padding: 6px 12px; font-size: 18px; }
  .q-options { gap: 8px; }
  .q-tf .opt { min-height: 64px; }
  .q-foot.show { padding-top: 8px; padding-bottom: calc(8px + var(--safe-b)); display: grid; grid-template-columns: 1fr auto; column-gap: 20px; align-items: center; }
  .q-foot.show > * { width: auto; margin: 0; }
  .q-foot.show .btn { grid-column: 2; grid-row: 1 / span 2; width: auto; min-width: 190px; }
  .qf-head { font-size: 18px; } .qf-text { margin-bottom: 0; font-size: 14px; }
  .result { flex-direction: column; padding-top: 14px; gap: 6px; } .res-art { width: 70px; } .res-stars .ico { width: 36px; height: 36px; }
  .sheet { max-height: 96vh; }
  #toast { bottom: calc(var(--nav-h) + 12px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Início ---------- */
.home-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--cream); }
.home { width: min(100%, 1040px); margin: 0 auto; padding: 22px var(--gutter) 28px; display: grid; gap: 26px; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) 34%; align-items: center; gap: 12px 22px; padding: 28px; background: var(--mint); border: 3px solid var(--ink); border-radius: 28px; box-shadow: var(--pop); position: relative; overflow: hidden; }
.home-eyebrow { display: block; font-size: 11px; line-height: 1.5; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--green-dark); margin-bottom: 10px; }
.home-hero h1 { font-size: clamp(28px, 5vw, 46px); max-width: 430px; }
.home-intro { margin-top: 12px; font-size: 15px; color: var(--ink-soft); max-width: 430px; }
.home-illustration { position: relative; aspect-ratio: 1; display: grid; place-items: center; isolation: isolate; }
.home-orbit { position: absolute; width: 88%; height: 88%; border: 2px dashed var(--green); background: #C7EDD9; border-radius: 50%; transform: rotate(-18deg); z-index: -1; }
.home-world { width: 96%; transform: rotate(-7deg); }
.home-cloud { position: absolute; width: 42%; right: -7%; top: 1%; z-index: -1; }
.home-hero-bottom { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr minmax(230px, 42%); gap: 20px; align-items: center; margin-top: 10px; }
.home-facts { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; font-weight: 900; }
.home-facts span { display: flex; gap: 5px; align-items: center; }
.home-facts .ico { width: 18px; height: 18px; }
.home-play { min-height: 56px; }
.home-play .ico:last-child { margin-left: auto; }
.home-play .ico:first-child { margin-right: auto; }
.home-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.home-section-head h2 { font-size: 23px; }
.home-section-head > span { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.home-mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.home-mode { display: flex; flex-direction: column; gap: 14px; position: relative; padding: 20px; text-align: left; background: white; border: 3px solid var(--ink); border-radius: 22px; box-shadow: var(--pop-sm); }
.home-mode:active, .home-passport:active, .home-settings:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.home-mode-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 2.5px solid var(--ink); border-radius: 15px; background: var(--yellow); }
.home-mode-c .home-mode-icon { background: var(--blue); }
.home-mode-t .home-mode-icon { background: var(--pink); }
.home-mode-icon .ico { width: 27px; height: 27px; }
.home-mode-copy { display: flex; flex-direction: column; gap: 5px; width: 100%; min-width: 0; }
.home-mode-name { font-family: var(--font-head); font-size: 23px; font-weight: 600; line-height: 1.2; }
.home-mode-desc { color: var(--ink-soft); font-size: 13px; line-height: 1.4; min-height: 37px; }
.home-mode-progress { margin-top: 7px; font-size: 11px; font-weight: 900; color: var(--ink-soft); }
.home-progress { display: block; height: 7px; background: #E9EDF4; border-radius: 10px; overflow: hidden; }
.home-progress i { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.home-mode-arrow { position: absolute; right: 18px; top: 30px; width: 20px; height: 20px; }
.home-extras { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.home-passport, .home-settings { display: flex; align-items: center; gap: 12px; text-align: left; border: 3px solid var(--ink); border-radius: 20px; box-shadow: var(--pop-sm); padding: 16px; background: var(--sun); }
.home-settings { background: white; }
.home-passport > img { width: 46px; height: 52px; object-fit: contain; flex: none; }
.home-settings-icon { width: 46px; height: 46px; display: grid; place-items: center; background: var(--blue); border-radius: 50%; flex: none; }
.home-settings-icon .ico { width: 28px; height: 28px; }
.home-link-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.home-link-copy b { font-family: var(--font-head); font-size: 20px; font-weight: 600; }
.home-link-copy > span { font-size: 12px; color: var(--ink-soft); }
.home-passport > .ico, .home-settings > .ico { width: 20px; height: 20px; }
.home-note { font-size: 12px; text-align: center; color: var(--ink-soft); }
.settings-back { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; background: none; border: 0; padding: 10px 0; min-height: 44px; font-size: 14px; font-weight: 900; }
.settings-back .ico { transform: rotate(180deg); }
@media (max-width: 599px) {
  .home { padding-top: 16px; gap: 23px; }
  .home-hero { padding: 20px 18px; grid-template-columns: minmax(0, 1fr) 105px; gap: 8px 10px; border-radius: 24px; }
  .home-eyebrow { grid-column: 1 / -1; font-size: 9px; letter-spacing: .04em; margin-bottom: 8px; }
  .home-hero h1 { font-size: 29px; }
  .home-intro { font-size: 12px; margin-top: 9px; }
  .home-hero-bottom { grid-template-columns: 1fr; gap: 14px; margin-top: 9px; }
  .home-facts { justify-content: center; font-size: 12px; gap: 18px; }
  .home-play { font-size: 18px; min-height: 52px; }
  .home-section-head h2 { font-size: 21px; }
  .home-section-head > span { font-size: 11px; }
  .home-mode-grid { grid-template-columns: 1fr; gap: 12px; }
  .home-mode { flex-direction: row; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; }
  .home-mode-icon { flex: none; width: 46px; height: 46px; }
  .home-mode-copy { padding-right: 19px; }
  .home-mode-name { font-size: 21px; }
  .home-mode-desc { font-size: 12px; min-height: 0; }
  .home-mode-progress { margin-top: 4px; }
  .home-mode-arrow { right: 13px; top: 25px; width: 18px; }
  .home-extras { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 350px) {
  .home-hero { grid-template-columns: minmax(0, 1fr) 78px; padding: 16px 14px; }
  .home-hero h1 { font-size: 26px; }
  .home-section-head > span { display: none; }
}



/* Acabamento, leitura e controles de jogo */
:root { --pop: 0 4px 0 var(--ink); --pop-sm: 0 2px 0 var(--ink); }
.home-journey { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 18px 20px; background: white; border: 2px solid #D9DFE9; border-radius: 20px; }
.journey-heading { display:flex; align-items:center; gap:12px; }
.journey-heading > .ico { width:36px;height:36px; color:var(--ink); background:var(--sun); border-radius:12px; padding:6px; }
.journey-heading div { display:flex; flex-direction:column; }
.journey-heading small { color:var(--ink-soft);font-size:12px; }
.journey-heading b { font-family:var(--font-head);font-size:21px;font-weight:600; }
.journey-numbers { display:flex;gap:18px;align-items:center; }
.journey-numbers span { display:flex;flex-direction:column;align-items:center;font-size:11px;color:var(--ink-soft); }
.journey-numbers b { font-size:20px;color:var(--ink);font-family:var(--font-head); }
.journey-meter { grid-column:1/-1;height:8px;background:#E9EDF4;border-radius:8px;overflow:hidden; }
.journey-meter i { display:block;height:100%;background:var(--green);border-radius:inherit; }
.journey-next { grid-column:1/-1;color:var(--ink-soft);font-size:12px; }
.quiz-top { padding-top:14px;padding-bottom:12px; }
.quiz-sound { width:42px;height:42px;box-shadow:none; }
.quiz-sound[aria-pressed=false] { background:#E9EDF4;color:var(--ink-soft);position:relative; }
.quiz-sound[aria-pressed=false]::after { content:"";position:absolute;width:25px;height:2px;background:currentColor;transform:rotate(-45deg); }
.qprogress { height:13px;border-width:2px; }
.qcount { font-variant-numeric:tabular-nums;font-size:14px; }
.opt { border-width:2px;box-shadow:0 3px 0 #D6DCE7;line-height:1.25; }
.opt-num { background:#F1F4F9;border:0;border-radius:9px;color:var(--ink-soft); }
.opt.ok { box-shadow:0 3px 0 var(--green-dark); }
.opt.bad { box-shadow:0 3px 0 var(--red-dark); }
.q-foot.show { max-height:min(360px,48dvh);overflow-y:auto;overscroll-behavior:contain; }
.qf-text { line-height:1.5; }
.q-statement { line-height:1.4; }
.res-sub { line-height:1.6; }
.res-actions { gap:14px; }
.settings .range { cursor:pointer;min-height:32px; }
.settings .setting-row { gap:16px; }
.home-settings { border-color:#D9DFE9;box-shadow:none; }
.home-note { line-height:1.6; }
:focus-visible { outline:3px solid #2368B5;outline-offset:4px; }
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
 .home-mode,.home-passport,.home-settings { transition:transform .16s ease,box-shadow .16s ease; }
 .home-mode:hover,.home-passport:hover { transform:translateY(-3px);box-shadow:0 6px 0 var(--ink); }
 .home-settings:hover { background:#F1F6FC; }
 .opt:not(:disabled):hover { background:#F1F6FC;border-color:#5278AD; }
 .nav-item:not(.active):hover { background:#F1F4F9; }
}
@media (max-width:350px) { .quiz-top{gap:8px;} .home-journey{padding:15px;gap:10px;} .journey-numbers{gap:10px;} }
@media (max-height:520px) and (orientation:landscape) { .quiz-top{padding-top:5px;padding-bottom:5px;} .q-foot.show{max-height:44dvh;} }

/* Sistema visual: superfícies leves, hierarquia e cores de exploração. */
:root { --cream:#F6F7FB; --ink:#1D2B53; --ink-soft:#53617E; --radius:24px; --pop:0 6px 18px #1D2B5310; --pop-sm:0 3px 10px #1D2B530D; }
#topbar { background:#fff;border-bottom:1px solid #E2E7EF; }
#nav { background:#fff;border-top:1px solid #E2E7EF;box-shadow:0 -6px 24px #1D2B5306; }
.lang-btn { border:0;box-shadow:none;background:transparent; }
.lang-btn img { border:1px solid #DFE5EE; }
.chip { border:0;background:#F2F5FA;height:32px;padding:0 9px; }
.nav-item.active .nav-ico { background:#E6F5EF;box-shadow:none;color:#087B58; }
.nav-item.active { color:#087B58; }
.home-scroll,.album-scroll,.settings-scroll { background:#F6F7FB; }
.home { gap:24px;padding-top:24px; }
.home-hero { background:#1D2B53;color:#fff;border:0;box-shadow:0 12px 28px #1D2B531C;padding:32px;border-radius:28px; }
.home-eyebrow { color:#A8EACF;letter-spacing:.1em; }
.home-intro { color:#DAE3F4;line-height:1.65; }
.home-orbit { background:#DFF5EA;border-color:#87D8BA; }
.home-facts { color:#DCE7F7; }
.home-play { background:#FFC531;color:#1D2B53;border:0;box-shadow:0 4px 0 #CB9512;border-radius:16px; }
.home-play:hover { background:#FFD15D;color:#1D2B53; }
.home-journey { border:1px solid #E2E7EF;box-shadow:0 4px 16px #1D2B5305;padding:20px; }
.home-mode { border:1px solid #E0E6EF;border-top:4px solid #FFC531;box-shadow:0 4px 12px #1D2B5306;padding:22px; }
.home-mode-c { border-top-color:#75AFE9; }
.home-mode-t { border-top-color:#EE97B8; }
.home-mode-icon { border:0;background:#FFF0C8; }
.home-mode-c .home-mode-icon { background:#E2EEFF; }
.home-mode-t .home-mode-icon { background:#FDE5EF; }
.home-mode-desc { line-height:1.55; }
.home-mode-progress { font-weight:800; }
.home-passport,.home-settings { border:1px solid #E0E6EF;box-shadow:none;border-radius:20px; }
.home-passport { background:#FFF6DD; }
.home-settings-icon { background:#EDF2FA; }
.btn { border-width:1.5px;border-radius:16px;box-shadow:0 3px 0 #1D2B5326; }
.btn-primary { background:#087B58;border-color:#076448;box-shadow:0 3px 0 #06583F;color:#fff; }
.btn-primary:hover { background:#076C4E; }
.home-play.btn-primary { background:#FFC531;border:0;color:#1D2B53;box-shadow:0 4px 0 #CB9512; }
.icon-btn { border:1.5px solid #DCE3EE;box-shadow:none; }
.quiz { background:#F6F7FB; }
.q-media,.q-statement { border:1px solid #E0E6EF;box-shadow:0 6px 24px #1D2B5307;border-radius:24px; }
.q-media .flag { filter:drop-shadow(0 3px 5px #1D2B5320); }
.opt { border:1.5px solid #DCE3EE;box-shadow:0 3px 0 #E0E6EF;border-radius:16px;font-size:clamp(18px,4.8vw,21px);padding:13px 16px; }
.opt.ok { border-color:#12A36B;box-shadow:0 3px 0 #12A36B; }
.opt.bad { border-color:#D9381E;box-shadow:0 3px 0 #D9381E; }
.qprogress { border:0;background:#E0E7F0;height:10px; }
.q-foot { border-top:1px solid #DCE3EE; }
.qf-head { font-size:21px; }
.qf-text { font-size:15px; }
.result-scroll { background:radial-gradient(ellipse at top,#FFF0C8,#F6F7FB 65%); }
.stat,.res-missed { border:1px solid #E0E6EF;box-shadow:0 3px 12px #1D2B5306; }
.res-banner { border:0;border-radius:14px;padding:12px 16px; }
.album-head { background:#1D2B53;color:#fff;border:0;padding:22px;box-shadow:none; }
.album-info small { color:#D9E3F5; }
.album-count { background:#FFC531;border:0;color:#1D2B53; }
.xpbar { border:0;background:#435474;height:8px;margin:5px 0; }
.fchip { border:1px solid #DCE3EE;box-shadow:none;border-radius:14px;min-height:53px; }
.fchip.active { background:#1D2B53;color:#fff;border-color:#1D2B53; }
.fchip.active small { color:#D9E3F5; }
.stamp { border:1px solid #DCE3EE;box-shadow:0 3px 10px #1D2B5305;padding:15px 8px; }
.stamp.locked { background:#EEF1F6;border:1px dashed #CFD6E2;box-shadow:none; }
.stamp-lock { background:#E2E8F1;border:1.5px solid #78869E;box-shadow:none;color:#53617E; }
.album-search { display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #DCE3EE;border-radius:16px;padding:0 15px; }
.album-search input { width:100%;min-width:0;border:0;background:transparent;min-height:50px;outline-offset:-4px; }
.album-empty { grid-column:1/-1;text-align:center;padding:32px 18px;background:white;border-radius:18px;color:var(--ink-soft);line-height:1.6; }
.card { border:1px solid #E0E6EF;box-shadow:0 4px 14px #1D2B5304;padding:22px; }
.card h2 { margin-bottom:15px;font-size:22px; }
.setting-row { padding:14px 0; }
.setting-row + .setting-row { border-top:1px solid #E9EDF4; }
.lang-card { border:1px solid #DCE3EE;box-shadow:none;background:#F8FAFD; }
.lang-card.active { border-color:#12A36B;background:#EAF8F1; }
.lang-card img { border:1.5px solid #DCE3EE; }
.range { border:0;background:#E1E7F0; }
.settings .range { min-height:10px;height:10px;margin:10px 0; }
.range::-webkit-slider-thumb { background:#087B58;border:3px solid white;box-shadow:0 1px 7px #1D2B5340; }
.range::-moz-range-thumb { background:#087B58;border:3px solid white;box-shadow:0 1px 7px #1D2B5340; }
.switch { border:0;background:#CDD6E3; }
.switch i { top:5px;left:5px;border:0;width:26px;height:26px;box-shadow:0 1px 4px #1D2B5325; }
.switch.on { background:#087B58; }
.danger-zone { border-color:#F0CFC8;background:#FFFCFB; }
.sheet { border-width:1px;box-shadow:0 -12px 50px #1D2B5325; }
.sheet-text { line-height:1.65; }
@media (hover:hover) { .home-mode:hover,.home-passport:hover { box-shadow:0 10px 24px #1D2B5314;border-color:#BAC9DC; } }
@media(max-width:599px) { .home-hero{padding:23px 20px;} .home-mode{padding:18px 16px;} .home{padding-top:18px;} .home-hero h1{font-size:30px;} }
@media(max-width:350px) { .home-hero{padding:20px 15px;} .home-hero h1{font-size:27px;} .chip{padding:0 6px;} .chips{gap:4px;} .album-head{padding:16px 12px;gap:8px;} }
@media(prefers-reduced-motion:no-preference) { .home-hero,.home-journey,.album-head { animation:surfaceIn .3s ease-out both; } @keyframes surfaceIn { from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none} } }


/* Bandeiras com caixas uniformes, sem distorcer símbolos e proporções. */
.stage-media-grid { grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 12px;padding:20px;border:1px solid #E0E6EF;box-shadow:none; }
.mini-flag { height:54px;min-width:0; }
.mini-flag .flag-sm { width:100%;max-width:81px;height:54px;object-fit:contain;filter:drop-shadow(0 1px 1px #1D2B5325); }
.stamp-flag .flag-sm { width:100%;max-width:72px;height:100%;object-fit:contain; }
.flag-xs { width:30px;max-width:30px;height:20px;object-fit:contain; }
.q-media-cap .flag-q-sm { width:96px;height:64px;object-fit:contain; }
@media(max-width:350px) { .stage-media-grid{padding:16px 12px;gap:14px 10px;} .mini-flag,.mini-flag .flag-sm{height:44px;} }


/* Ícones: uma família de traço único, contraste por contexto. */
.ico { stroke-width:1.8; }
.ico.filled { fill:none; }
.ico-play { fill:currentColor;stroke-width:1.5; }
.chip .ico,.chip-flame .ico,.chip-star .ico,.chip-bolt .ico { color:#344563;stroke-width:1.9;fill:none; }
.chip { background:#F0F3F7; }
.home-mode-icon,.home-mode-c .home-mode-icon,.home-mode-t .home-mode-icon,.home-settings-icon { background:#F0F3F7;color:#263B5A;border:0;border-radius:14px; }
.home-mode-icon .ico,.home-settings-icon .ico { width:26px;height:26px;stroke-width:1.8; }
.journey-heading > .ico { background:#F0F3F7;color:#263B5A;stroke-width:1.8; }
.nav-ico { background:transparent; }
.nav-ico .ico { stroke-width:1.8; }
.nav-item { color:#596983; }
.nav-item.active .nav-ico { background:#E5F0EB;color:#145D48; }
.btn-icon .ico,.node-locked .ico,.slot-lock .ico,.stamp-lock .ico,.zb-trophy .ico { stroke-width:1.9; }
.icon-btn .ico { stroke-width:1.8; }
.opt-mark .ico,.qf-head .ico { stroke-width:2.2; }
.opt-ico { stroke-width:2; }
.stat-val .ico { color:#344563; }
.stars .ico,.res-stars .ico { stroke:#8B6C29;stroke-width:1.6; }
.stars .ico.on,.res-stars .ico.on { fill:#F4CF79;color:#F4CF79; }
.stars .ico.off,.res-stars .ico.off { fill:#EFF2F6;stroke:#A4AEBE;color:#EFF2F6; }
.res-banner .ico.on { fill:none;stroke:currentColor;color:#263B5A; }
.slot-lock,.stamp-lock { background:#EDF1F6;color:#53617E;border:1px solid #C9D2DF;box-shadow:none; }
.badge { border:1px solid #DCE3EE;background:#F4F6F9;color:#53617E; }
.badge.on { background:#ECF6F0;color:#245941;border-color:#CCE4D5; }
.badge .ico { stroke-width:2; }
.start-sign .ico { color:#263B5A; }
.album-art { background:#FFFFFF;border-radius:16px;padding:5px; }
.home-passport > img { background:#FFFFFF;border-radius:12px;padding:3px; }
.home-orbit { background:#EFF3F8;border-color:#9FB1C9; }
.home-cloud { opacity:.75; }


/* Repères de continent et drapeaux entiers dans les étapes. */
.zb-emoji,.zc-emoji,.zb-trophy { background:#F0F3F7;color:#263B5A;border:0;box-shadow:none;border-radius:12px; }
.zb-emoji .ico { width:26px;height:26px;stroke-width:1.8; }
.zc-emoji .ico { width:20px;height:20px;stroke-width:1.8; }
.zc-emoji { width:32px;height:32px;flex:none; }
.zone-banner { border:1px solid #DCE3EE;box-shadow:0 4px 14px #1D2B5310; }
.zone-chip { border:1px solid #DCE3EE;box-shadow:0 3px 12px #1D2B5310; }
.zone-chip small { background:#F0F3F7; }
.phase-t .node:not(.node-trophy) { background:#EDF1F7;overflow:visible; }
.phase-t .node .node-flag { width:54px;height:38px;max-width:80%;max-height:60%;object-fit:contain;border-radius:0;filter:none; }
.phase-t .node-locked .node-flag { filter:grayscale(1);opacity:.65; }
.node-locked { background:#E7ECF3;border-color:#7E8BA0;box-shadow:0 5px 0 #A7B2C2; }
.node-name { border:1px solid #DCE3EE;box-shadow:none; }
.node-stars { border:1px solid #DCE3EE; }
.lang-btn img { width:28px;height:20px;object-fit:contain;border-radius:2px;border:0; }
.lang-card img { width:52px;height:36px;object-fit:contain;border-radius:2px;border:0; }

/* ================= IMPRESSÃO (certificado) ================= */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; }
  #app, #toast, .sheet-back, .sheet-handle, .cert-sheet .field, .cert-sheet .btn-row { display: none !important; }
  #overlay, .sheet-layer, .sheet { position: static !important; inset: auto !important; display: block !important; background: none !important; border: 0 !important; padding: 0 !important; transform: none !important; max-height: none !important; overflow: visible !important; opacity: 1 !important; box-shadow: none !important; }
  .cert { padding: 0; } .cert-border { padding: 32px 24px; outline-offset: -16px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cert-medal { width: 130px; height: 130px; }
}

/* Miniaturas de etapas: caixa 3:2 fixa; a bandeira mantém a própria proporção (contain), sem esticar. */
.mini-flag .flag-sm { width: min(100%, 81px); height: 54px; aspect-ratio: auto; object-fit: contain; }
@media(max-width:350px) { .mini-flag .flag-sm { width:min(100%,66px);height:44px; } }

/* Contraste suave para bandeiras com áreas brancas. */
.stage-media-grid { background: #EDF1F7; }

/* Contraste para as áreas brancas das bandeiras nas perguntas. */
.q-media { background: #EDF1F7; }

/* Cores nos símbolos; fundo discreto para preservar a leitura. */
.zb-emoji,.zc-emoji { background:#F5F7FA; }
.zone-AM .zb-emoji { background:#ECF7F2; }
.zone-EU .zb-emoji { background:#F3EFF8; }
.zone-AF .zb-emoji { background:#FFF6E3; }
.zone-AS .zb-emoji { background:#FFF0EB; }
.zone-OC .zb-emoji { background:#ECF7FA; }
.zone-ANT .zb-emoji { background:#EFF8FC; }
.zb-emoji .ico { width:29px;height:29px;stroke-width:1.6; }
.zc-emoji .ico { width:23px;height:23px;stroke-width:1.6; }

/* Emblemas circulares com composição própria para as etapas. */
/* Clip only once, at the button edge, to avoid pale seams between SVG and border. */
.phase-t .node:not(.node-trophy) { overflow:hidden;background:var(--ink); }
.phase-t .node .node-flag { width:100%;height:100%;max-width:100%;max-height:100%;object-fit:fill;border-radius:0; }

/* The final reward is an icon button, not a circular flag. */
.node.node-trophy { background:var(--yellow);color:var(--ink); }
.node.node-trophy.node-locked { background:#FFF0C4;color:var(--ink); }

/* Home: expressive brand colors with quiet, high-contrast icon surfaces. */
.home-scroll { background:#FFF7E8; }
.home-hero { background:#A9D3FF;color:#1D2B53;box-shadow:0 8px 24px #1D2B5314; }
.home-eyebrow { color:#1D2B53; }
.home-intro,.home-facts { color:#263B5A; }
.home-orbit { background:#FFC531;border-color:#1D2B5340; }
.home-cloud { opacity:1; }
.home-facts .ico { color:#1D2B53; }
.home-journey { background:#E0F5E9;border-color:#12A36B55; }
.home .journey-heading > .ico { background:#FFC531;color:#1D2B53; }
.home .journey-meter { background:#12A36B26; }
.home .journey-meter i { background:#12A36B; }
.home-mode-f { background:#FFF0BF;border-color:#FFC53180;border-top-color:#FFC531; }
.home-mode-c { background:#E1EFFF;border-color:#A9D3FF;border-top-color:#75AFE9; }
.home-mode-t { background:#FFE3ED;border-color:#FFB3CB;border-top-color:#FFB3CB; }
.home-mode-icon,.home-mode-c .home-mode-icon,.home-mode-t .home-mode-icon { background:#FFFFFF;color:#1D2B53;box-shadow:0 2px 6px #1D2B5308; }
.home-mode-arrow { color:#1D2B53; }
.home-progress { background:#1D2B5312; }
.home-mode-f .home-progress i { background:#12A36B; }
.home-mode-c .home-progress i { background:#1D2B53; }
.home-mode-t .home-progress i { background:#D9381E; }
.home-passport { background:#FFDC70;border-color:#FFC531; }
.home-settings { background:#DDF3E7;border-color:#12A36B55; }
.home-settings-icon { background:#FFFFFF;color:#1D2B53; }
@media (hover:hover) {
 .home-mode:hover,.home-passport:hover,.home-settings:hover { border-color:#1D2B5366;box-shadow:0 8px 20px #1D2B5314; }
 .home-settings:hover { background:#CDEEDC; }
}

/* Revisão: anel do nó atual na fase 3 (mesmo vermelho pulsante das outras), Início mais limpa. */
/* O nó da fase 3 recorta o conteúdo (overflow:hidden), então o anel pulsante vive no slot e anima só transform/opacity (compositor, sem queda de frames). */
.phase-t .node-current { box-shadow: 0 6px 0 var(--ink); }
.phase-t .node-slot.is-current::before { content: ""; position: absolute; top: -10px; left: 50%; width: 96px; height: 96px; margin-left: -48px; box-sizing: border-box; border-radius: 50%; border: 4px solid var(--red); opacity: .5; pointer-events: none; will-change: transform, opacity; animation: ring 1.8s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .phase-t .node-slot.is-current::before { animation: none; } }
.home-mode-desc { min-height: 0; }
@media (min-width: 600px) { .home-illustration { max-width: 300px; justify-self: end; width: 100%; } .home-hero-bottom { margin-top: 0; } }
@media (max-width: 599px) { .home-facts { justify-content: flex-start; } }

/* Barra superior: ícones coloridos (só os ícones) e botão de som no canto direito. */
.chip-flame .ico { color: #D9381E; }
.chip-star .ico { color: #E3A400; fill: #FFC531; }
.chip-bolt .ico { color: #2F7BD6; }
.top-sound { width: 36px; height: 36px; margin-left: 4px; background: #F0F3F7; border: 0; color: var(--ink); position: relative; }
.top-sound .ico { width: 20px; height: 20px; }
.top-sound[aria-pressed=false] { color: var(--ink-soft); }
.top-sound[aria-pressed=false]::after { content: ""; position: absolute; width: 22px; height: 2px; background: currentColor; transform: rotate(-45deg); border-radius: 2px; }
.chips { margin-left: auto; }

/* Foco visível apenas com teclado (toque/mouse não deixam o anel azul ao redor dos botões). */
html[data-input="pointer"] :focus-visible { outline: none; }
.top-sound:focus { outline: none; }
.top-sound:focus-visible { outline: 3px solid #2368B5; outline-offset: 2px; }
html[data-input="pointer"] .top-sound:focus-visible { outline: none; }

/* Quebra de linha equilibrada: títulos e textos curtos sem palavra solta na última linha; parágrafos maiores com "pretty". */
h1, h2, h3, .top-title, .home-eyebrow, .home-mode-name, .home-mode-desc, .home-mode-progress, .home-intro, .home-note,
.home-link-copy b, .home-link-copy > span, .home-section-head > span, .journey-next, .journey-heading b,
.res-title, .res-sub, .res-banner, .q-label, .q-text, .q-country, .sheet-title, .sheet-text, .cs-note, .cs-cont,
.album-empty, .cert-text, .cert-name, .qf-head b, .sr-text small, .sr-text b, .stage-sheet p, .zb-text, .node-name, .toast {
  text-wrap: balance;
}
.qf-text, .cs-note, .sheet-text.small { text-wrap: pretty; }

/* Botões do topo e ícones: ao pressionar, sem a linha escura embaixo (sombra "pop" antiga); só um leve encolher. */
.icon-btn:active, .lang-btn:active, .top-sound:active { box-shadow: none; transform: scale(.94); }
