/* Mundo Connect v2 - layout e componentes. Tela inteira, sem scroll do browser: so paineis internos rolam. */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: clamp(14px, calc(1.05vmin + 9px), 19px); -webkit-text-size-adjust: 100%; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { font-family: var(--font-body); font-weight: 600; color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; touch-action: manipulation; line-height: 1.4; }
h1, h2, h3 { font-family: var(--font-body); font-weight: 800; margin: 0; line-height: 1.15; letter-spacing: -.005em; }
p { margin: 0; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 8px; }
.input:focus-visible { outline-offset: 0; }
::selection { background: var(--sky); }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: rgba(27, 49, 114, .25); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
.spacer { flex: 1; }

/* ---------- estrutura ---------- */
#app { position: relative; height: 100dvh; width: 100vw; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
#view { position: relative; min-height: 0; min-width: 0; grid-row: 2; outline: none; }
#topbar { grid-row: 1; position: relative; z-index: 5; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.screen.enter { animation: fade-in .22s var(--ease) both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.pop-in { animation: pop .22s var(--ease) both; }
#fx { position: fixed; inset: 0; width: 100vw; height: 100dvh; z-index: 80; pointer-events: none; }

/* blobs suaves nos cantos inferiores */
#bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
#bg .bl { position: absolute; display: block; border-radius: 50%; }
#bg .b1 { width: 30vmax; height: 24vmax; left: -9vmax; bottom: -11vmax; background: var(--blue); border-radius: 60% 40% 55% 45%; }
#bg .b2 { width: 22vmax; height: 16vmax; left: 4vmax; bottom: -10vmax; background: var(--pink); border-radius: 50% 50% 40% 60%; }
#bg .b3 { width: 26vmax; height: 20vmax; right: -8vmax; bottom: -10vmax; background: var(--green); border-radius: 45% 55% 50% 50%; }
#app[data-route="jogar"] #bg, #app[data-route="entrar"] #bg, #app[data-route="sala"] #bg, #app[data-route="welcome"] #bg { display: none; }
#app:not([data-route="home"]) #bg { opacity: .55; }
#topbar, #view { position: relative; z-index: 1; }
#topbar { z-index: 5; }

/* ---------- cabecalho ---------- */
#topbar { display: flex; align-items: center; gap: .7rem; padding: .45rem var(--pad); min-width: 0; min-height: var(--topbar-h); background: var(--cream); border-bottom: 1px solid var(--line-soft); }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; min-width: 0; color: var(--navy); }
.brand-ico { width: clamp(34px, 5.6dvh, 44px); height: clamp(34px, 5.6dvh, 44px); flex: none; border-radius: 12px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-text b { font: 700 1.2rem var(--font-display); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.brand-text small { font-size: .72rem; font-weight: 700; opacity: .75; white-space: nowrap; }
.xp-chip { display: flex; align-items: center; gap: .55rem; text-decoration: none; background: var(--card); border: 1px solid var(--line-soft); border-radius: 999px; padding: .18rem .8rem .18rem .2rem; color: var(--navy); }
.xp-avatar { width: 34px; height: 34px; flex: none; }
.xp-info { display: flex; flex-direction: column; gap: 3px; min-width: 3.6rem; }
.xp-lv { font-size: .72rem; font-weight: 800; line-height: 1; }
.xp-bar { display: block; height: 5px; border-radius: 9px; background: var(--line-soft); overflow: hidden; }
.xp-bar i { display: block; height: 100%; background: var(--link); border-radius: 9px; }
.xp-num { font-weight: 800; font-size: .85rem; white-space: nowrap; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; border: 1px solid var(--line-soft); background: var(--card); color: var(--navy); cursor: pointer; font-size: 1rem; transition: background .15s; }
.icon-btn:hover { background: var(--card-2); }
.icon-btn:disabled { opacity: .4; cursor: default; }
/* ---------- botoes, pilulas, campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; min-height: 46px; padding: .55em 1.35em; border-radius: 999px; border: 1.5px solid transparent; font: 800 1rem var(--font-body); text-decoration: none; cursor: pointer; text-align: center; line-height: 1.15; transition: background .16s var(--ease), border-color .16s, transform .16s var(--ease), box-shadow .16s; -webkit-tap-highlight-color: transparent; }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--sh-sm); }
.btn:active:not(:disabled) { transform: none; box-shadow: none; }
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--navy-2); }
.btn-soft { background: var(--sky); color: var(--navy); border-color: var(--line-soft); }
.btn-soft:hover:not(:disabled) { background: #c6d7f7; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--card); }
.btn-light { background: #fff; color: var(--navy); }
.btn-red { background: #C9433C; color: #fff; }
.btn-green { background: #23804A; color: #fff; }
.mark-btn:disabled { background: var(--card-2); color: var(--ink-soft); opacity: 1; border-color: var(--line-soft); }
.btn-sm { min-height: 38px; padding: .35em 1em; font-size: .9rem; }
.btn-lg { min-height: 52px; font-size: 1.05rem; padding: .6em 1.6em; }
.btn-xl { min-height: 58px; font-size: 1.2rem; padding: .65em 2.1em; }
.link-btn { background: none; border: 0; color: var(--link); font: 800 .95rem var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: .5rem; }
.link-btn.on-dark { color: #cfdcff; }
.row-actions { display: flex; gap: .7rem; justify-content: center; align-items: center; margin-top: .4rem; }
.row-actions.wrap { flex-wrap: wrap; }
.row-actions.left { justify-content: flex-start; }
.pill { display: inline-flex; align-items: center; gap: .35em; padding: .25em .85em; border-radius: 999px; font-weight: 800; font-size: .9rem; white-space: nowrap; border: 1px solid var(--line-soft); background: var(--card); color: var(--navy); }
.pill-accent { background: var(--sky); border-color: var(--line-soft); }
.pill-plain { background: var(--card); }
.pill-warn { background: #FBE9D8; border-color: #F0C9A3; color: #8A3F0A; }
.card { background: var(--card); border: var(--bw) solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.input { width: 100%; min-height: 50px; padding: .6em 1em; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; color: var(--navy); font: 700 1.05rem var(--font-body); }
.input::placeholder { color: #8f9cc4; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: .35rem; text-align: left; }
.field > span { font-weight: 800; font-size: .9rem; color: var(--ink-soft); }
.form-error { min-height: 1.2em; color: var(--bad); font-weight: 800; font-size: .92rem; }
.center-box { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 1.5rem; text-align: center; }
.loading-text { color: var(--ink-soft); font-weight: 700; }
.center-box.card { max-width: 26rem; }

/* imagens / ilustracoes */
:where(.avatar, .avatar-svg, .blob-react, .blob-svg, .cat-icon, .mode-icon, .ico-svg) { width: 100%; height: 100%; object-fit: contain; }
.blob-md { width: 7rem; height: 7rem; } .blob-sm { width: 4rem; height: 4rem; }
.star { width: 1em; height: 1em; fill: #D5D9E6; stroke: #B8BFD6; stroke-width: 1; }
.star.on { fill: var(--yellow); stroke: #D9A515; }

/* ---------- modal e toast ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; background: rgba(18, 38, 87, .5); animation: fade-in .18s both; }
.modal-wrap.closing { opacity: 0; transition: opacity .15s; }
.modal-box { width: min(30rem, 100%); max-height: calc(100dvh - 2rem); overflow-y: auto; background: var(--cream); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: clamp(1rem, 3vmin, 1.75rem); box-shadow: 0 18px 50px rgba(18, 38, 87, .3); }
.modal-box.modal-wide { width: min(36rem, 100%); }
.confirm { display: flex; flex-direction: column; gap: .8rem; text-align: center; }
.confirm h2 { font-size: 1.35rem; }
#toasts { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 70; display: flex; flex-direction: column; gap: .5rem; align-items: center; width: min(92vw, 28rem); pointer-events: none; }
.toast { display: flex; gap: .6rem; align-items: center; padding: .65rem 1rem; border-radius: 14px; background: var(--navy); color: #fff; font-weight: 700; font-size: .95rem; box-shadow: var(--sh); }
.toast.tone-warn { background: #8A3F0A; } .toast.tone-green { background: #23804A; }
.toast.closing { opacity: 0; transition: opacity .25s; }
.toast-ico { display: inline-grid; place-items: center; min-width: 1.4em; font-weight: 900; }

/* perfil: avatares */
.avatar-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.avatar-opt { aspect-ratio: 1; padding: .25rem; border-radius: 16px; border: 1.5px solid var(--line-soft); background: var(--card); cursor: pointer; transition: border-color .15s, background .15s; }
.avatar-opt:hover { border-color: var(--line); }
.avatar-opt.sel { border-color: var(--navy); background: var(--sky); box-shadow: 0 0 0 2px var(--navy) inset; }
.profile-form { display: flex; flex-direction: column; gap: 1rem; }
.profile-form h2 { font-size: 1.5rem; }

/* ---------- decoracao compartilhada (home e abertura) ---------- */
.deco { position: absolute; pointer-events: none; display: block; }
.deco svg { width: 100%; height: 100%; }
.deco-sun { width: clamp(90px, 22vmin, 220px); aspect-ratio: 1; border-radius: 50%; background: var(--yellow); right: -4%; top: -6%; }
.deco-ring { width: clamp(80px, 20vmin, 200px); aspect-ratio: 1; border-radius: 50%; border: 2px solid #fff; right: -2%; top: 8%; transform: translate(-40%, 40%); opacity: .95; }
.deco-globe { width: clamp(150px, 34vmin, 360px); aspect-ratio: 1; right: -8%; bottom: 6%; opacity: .9; }
.deco-globe-lg { width: min(120%, 60vh); aspect-ratio: 1; left: -10%; bottom: -14%; opacity: .55; }
.deco-spark { width: clamp(22px, 4.4vmin, 40px); aspect-ratio: 1; }
.deco-leaf { width: clamp(70px, 14vmin, 150px); aspect-ratio: 1.4; right: -3%; bottom: -3%; border-radius: 80% 20% 0 0; background: var(--green); transform: rotate(-4deg); }
.deco-leaf::before { content: ''; position: absolute; left: -45%; bottom: 0; width: 100%; height: 42%; background: var(--yellow); border-radius: 100% 0 0 0; transform: skewX(-18deg); }

/* ---------- abertura ---------- */
#app[data-route="welcome"] { background: var(--navy); }
#app[data-route="welcome"] #topbar { background: transparent; border-bottom-color: transparent; position: absolute; right: 0; top: 0; left: auto; }
#app[data-route="welcome"] .brand, #app[data-route="welcome"] .xp-chip { display: none; }
#app[data-route="welcome"] .icon-btn { background: rgba(255, 255, 255, .12); border-color: transparent; color: #fff; }
#app[data-route="welcome"] #view { grid-row: 1 / -1; }
.welcome { position: relative; flex: 1; min-height: 0; color: #fff; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: var(--gap); padding: clamp(1rem, 4vmin, 3rem) clamp(1.2rem, 6vw, 6rem) 0; overflow: hidden; }
.welcome .deco-spark { left: 46%; top: 30%; animation: twinkle 3s ease-in-out infinite; }
.welcome .deco-globe { right: auto; left: 38%; bottom: -12%; width: clamp(200px, 56vmin, 560px); opacity: .5; }
.welcome-copy { position: relative; z-index: 2; display: flex; flex-direction: column; gap: clamp(.5rem, 1.8vmin, 1.2rem); align-items: flex-start; min-width: 0; }
.logo-lockup { display: flex; align-items: flex-end; gap: .4rem; }
.logo-big { width: clamp(48px, 9vmin, 84px); height: clamp(48px, 9vmin, 84px); border-radius: 18px; flex: none; }
.logo-lockup .sparkles { display: flex; flex-direction: column; gap: .2rem; }
.logo-lockup .sparkle { width: 1.3rem; height: 1.3rem; animation: twinkle 3s ease-in-out infinite; } .logo-lockup .sparkle.sm { width: .85rem; height: .85rem; animation-delay: 1s; }
.title { display: flex; flex-direction: column; font: 700 clamp(2.8rem, min(13vmin, 12vw), 8rem)/.92 var(--font-display); text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.title-b { color: var(--yellow); }
.tagline { display: inline-block; border: 1.5px solid rgba(255, 255, 255, .55); color: #fff; font: 700 clamp(.9rem, 2vmin, 1.3rem) var(--font-body); padding: .3em 1.1em; border-radius: 99px; letter-spacing: .02em; }
.hello { font-size: clamp(1rem, 2.1vmin, 1.4rem); font-weight: 600; opacity: .92; max-width: 30ch; }
.play-ico { font-size: .75em; }
.btn-xl { min-height: 60px; font-size: 1.35rem; padding: .5em 1.8em; letter-spacing: .08em; font-family: var(--font-display); font-weight: 700; }
.link-btn { background: none; border: 0; padding: .6rem 0; min-height: 44px; font: 800 1rem var(--font-body); color: var(--navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn.on-dark { color: #fff; opacity: .9; }
.welcome-art { position: relative; z-index: 2; align-self: end; height: 100%; display: flex; align-items: flex-end; justify-content: center; min-height: 0; }
.art-wrap { width: min(100%, 62vh); aspect-ratio: 4 / 3; animation: rise-in .5s var(--ease) both; }
.welcome-art .hero-blobs, .welcome-art .hero-blobs-svg { width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
@keyframes rise-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.8); } }
.site-foot { flex: none; position: relative; z-index: 3; text-align: center; padding: .4rem var(--pad); font-size: .78rem; font-weight: 700; letter-spacing: .03em; color: var(--ink-soft); }
.screen-welcome .site-foot { color: rgba(255, 255, 255, .72); background: var(--navy-deep); }

/* ---------- hub (home): 4 cartoes grandes ---------- */
.home { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--gap); padding: .4rem var(--pad) var(--pad); }
.home-head { flex: none; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.home-blob .blob-react, .home-blob .blob-svg { width: clamp(52px, 9vmin, 96px); height: clamp(52px, 9vmin, 96px); animation: float 4s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.home-hello h1 { font: 700 clamp(1.5rem, 3.6vmin + .2rem, 2.6rem)/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .05em; color: var(--navy); }
.home-hello p { font-weight: 700; font-size: clamp(.95rem, 1.8vmin + .3rem, 1.3rem); color: var(--link); margin-top: .2rem; }
.live-banner { margin-left: auto; display: inline-flex; align-items: center; gap: .6rem; padding: .55rem 1rem; border-radius: 99px; background: var(--sky); border: 1.5px solid var(--line); text-decoration: none; font-weight: 800; color: var(--navy); min-height: 44px; }
.dot-live { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 50% { opacity: .35; } }
.mode-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); align-content: center; gap: calc(var(--gap) * 1.2); overflow-y: auto; padding: .5rem .5rem 1rem; margin: -.5rem; }
.mode-card { --ac: var(--blue); align-self: center; height: 100%; max-height: 33rem; position: relative; display: flex; flex-direction: column; align-items: center; gap: .35rem; min-height: 0; padding: clamp(.7rem, 2vmin, 1.4rem); background: var(--card); color: var(--navy); border: 1.5px solid var(--line); border-radius: var(--r-xl); text-decoration: none; text-align: center; overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s; animation: pop .3s var(--ease) both; animation-delay: var(--d, 0ms); }
.mode-card::before { content: ''; position: absolute; width: 68%; aspect-ratio: 1; border-radius: 50%; background: color-mix(in srgb, var(--ac) 24%, transparent); top: 8%; left: 50%; transform: translateX(-50%); transition: transform .3s var(--ease); }
.mode-card::after { content: ''; position: absolute; width: 30%; aspect-ratio: 1; border-radius: 50%; background: color-mix(in srgb, var(--ac) 30%, transparent); bottom: -12%; right: -8%; }
.m-blue { --ac: var(--blue); } .m-yellow { --ac: var(--yellow); } .m-green { --ac: var(--green); } .m-pink { --ac: var(--pink); }
@media (hover: hover) { .mode-card:hover { transform: translateY(-5px); box-shadow: var(--sh); background: #F8F1E7; } .mode-card:hover::before { transform: translateX(-50%) scale(1.06); } }
.mode-card:active { transform: translateY(0); }
.mode-tag { position: relative; z-index: 1; align-self: flex-start; font: 800 .75rem var(--font-body); letter-spacing: .04em; background: var(--ac); color: var(--navy); padding: .2em .8em; border-radius: 99px; }
.mode-art { position: relative; z-index: 1; flex: 1 1 0; min-height: 3rem; width: 100%; }
.mode-art > * { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; }
.mode-title { position: relative; z-index: 1; font: 700 clamp(1.1rem, 2.1vmin + .3rem, 1.6rem)/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .05em; }
.mode-text { position: relative; z-index: 1; font: 600 clamp(.82rem, 1.4vmin + .3rem, 1rem)/1.3 var(--font-body); max-width: 24ch; color: var(--ink-soft); }
.mode-actions { position: relative; z-index: 2; width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: .25rem; }
.mode-actions .btn { flex: 1 1 6.5rem; min-height: 40px; padding: .35em .6em; font-size: .88rem; white-space: nowrap; }
.join-link { align-self: center; }
.mode-go { position: absolute; z-index: 2; right: .8rem; top: .7rem; width: 2rem; height: 2rem; display: grid; place-items: center; background: var(--navy); color: #fff; border-radius: 50%; font: 700 1.4rem/1 var(--font-body); padding-bottom: .12em; }

/* ---------- sub-cabecalho das telas internas ---------- */
.subhead { display: flex; align-items: center; gap: .8rem; flex: none; min-width: 0; }
.subtitle { font: 700 clamp(1.3rem, 2.8vmin, 1.8rem) var(--font-display); font-variant-caps: small-caps; letter-spacing: .06em; display: flex; align-items: center; gap: .5rem; min-width: 0; margin-right: auto; }
.subhead .subtitle ~ * { flex: none; }
.subtitle .theme-icon, .subtitle .cat-icon { width: 1.6em; height: 1.6em; }
.back-btn { flex: none; }

/* ---------- Jornada ---------- */
.jornada, .cards-screen, .study, .atlas, .perfil, .sala-setup { flex: 1; min-height: 0; padding: clamp(.7rem, 2vmin, 1.4rem) var(--pad) var(--pad); display: flex; flex-direction: column; gap: var(--gap); }
.trail-stage { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.trail-box { position: relative; }
.trail-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.stop { position: absolute; transform: translate(-50%, -50%); background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * 8); width: calc(var(--u) * 240); }
.stop-pin { position: relative; width: calc(var(--u) * 110); height: calc(var(--u) * 110); min-width: 52px; min-height: 52px; border-radius: 50%; background: var(--cream); border: 2px solid var(--c, var(--line)); display: grid; place-items: center; padding: calc(var(--u) * 20); transition: transform .18s var(--ease), box-shadow .18s; box-shadow: 0 0 0 calc(var(--u) * 8) rgba(255, 255, 255, .7); }
.stop:hover .stop-pin { transform: scale(1.06); box-shadow: var(--sh); }
.stop.current .stop-pin { background: #fff; box-shadow: 0 0 0 calc(var(--u) * 10) color-mix(in srgb, var(--c) 35%, transparent); }
.stop.locked .stop-pin { filter: grayscale(.85); background: #EFE9DE; }
.stop-pin .theme-icon, .stop-pin .cat-icon { width: 100%; height: 100%; }
.stop-num { position: absolute; top: -4%; left: -4%; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--navy); color: #fff; font: 800 clamp(.7rem, calc(var(--u) * 22), 1rem) var(--font-body); display: grid; place-items: center; }
.stop-lock { position: absolute; right: -4%; bottom: -4%; font-size: .9rem; background: #fff; border-radius: 50%; width: 1.7em; height: 1.7em; display: grid; place-items: center; border: 1px solid var(--line-soft); }
.stop-label { display: flex; flex-direction: column; align-items: center; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: .25rem .7rem; max-width: 100%; }
.stop-name { font-weight: 900; font-size: clamp(.72rem, calc(var(--u) * 24), 1.05rem); line-height: 1.15; text-align: center; color: var(--navy); }
.stop-stars { display: flex; align-items: center; gap: .2em; font-weight: 800; font-size: clamp(.68rem, calc(var(--u) * 20), .9rem); color: var(--ink-soft); }
.stop-stars svg { width: 1em; height: 1em; display: inline-block; }
.stop.label-top { flex-direction: column-reverse; }
.stop-modal-head { display: flex; gap: .9rem; align-items: center; margin-bottom: 1rem; }
.stop-modal-head .cat-icon, .stop-modal-head .theme-icon { width: 4.2rem; height: 4.2rem; flex: none; }
.stop-modal-head h2 { font-size: 1.4rem; }
.stop-modal-head p { color: var(--ink-soft); font-size: .95rem; }
.level-list { display: flex; flex-direction: column; gap: .6rem; }
.level-row { display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left; padding: .7rem .9rem; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; transition: background .15s, transform .15s; }
.level-row:hover:not(:disabled) { background: var(--sky); transform: translateY(-1px); }
.level-row.locked, .level-row:disabled { opacity: .55; cursor: default; }
.level-num { width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 900; flex: none; }
.level-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.level-info small { color: var(--ink-soft); font-weight: 700; }
.level-stars { display: flex; gap: .1rem; font-size: 1.2rem; }

/* ---------- Quiz ---------- */
.quiz, .p-q, .host-q { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--gap); padding: clamp(.7rem, 2vmin, 1.4rem) var(--pad) var(--pad); max-width: 78rem; width: 100%; margin: 0 auto; }
.quiz-top { display: flex; align-items: center; gap: .7rem; flex: none; min-width: 0; flex-wrap: wrap; }
.qprog { display: flex; flex-direction: column; gap: .35rem; flex: 1; min-width: 0; margin-right: auto; }
.qcount { font-weight: 800; font-size: .92rem; color: var(--ink-soft); }
.qdots { display: flex; gap: 4px; }
.qdots i { flex: 1; max-width: 3rem; height: 5px; border-radius: 9px; background: var(--line-soft); }
.qdots i.done { background: var(--navy); } .qdots i.now { background: var(--link); }
.score-pill.bump { animation: bump .3s var(--ease); }
@keyframes bump { 40% { transform: scale(1.1); } }
.timer { display: flex; align-items: center; gap: .7rem; flex: none; }
.timer-track { flex: 1; height: 10px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.timer-track i { display: block; height: 100%; width: 100%; background: var(--link); transform-origin: left; border-radius: 99px; }
.timer.low .timer-track i { background: var(--bad); }
.timer-num { min-width: 2ch; text-align: right; font: 800 1.2rem var(--font-body); font-variant-numeric: tabular-nums; }
.timer.low .timer-num { color: var(--bad); }
.quiz-body { flex: 1; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: var(--gap); }
.q-card, .host-prompt { position: relative; min-height: 0; display: flex; flex-direction: column; gap: .6rem; justify-content: center; align-items: center; text-align: center; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-xl); padding: clamp(.8rem, 2.4vmin, 1.8rem); overflow-y: auto; }
.q-theme { display: inline-flex; align-items: center; gap: .45rem; font-weight: 800; font-size: .88rem; color: var(--navy); padding: .2rem .7rem .2rem .3rem; border-radius: 99px; background: #fff; border: 1.5px solid var(--c, var(--line)); }
.q-theme .cat-icon, .q-theme .theme-icon { width: 1.6rem; height: 1.6rem; }
.q-lv { padding-left: .5rem; border-left: 1px solid var(--line-soft); color: var(--ink-soft); }
.q-prompt, .host-prompt h2 { font: 800 clamp(1.1rem, 2.9vmin + .3vw, 2rem)/1.3 var(--font-body); color: var(--navy); max-width: 60rem; }
.q-blob { position: absolute; right: .8rem; bottom: .5rem; width: clamp(40px, 8vmin, 80px); height: clamp(40px, 8vmin, 80px); opacity: .95; }
.options { display: grid; gap: .7rem; flex: none; }
.options.mc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.options.tf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt, .h-opt { position: relative; display: flex; align-items: center; gap: .8rem; min-height: clamp(54px, 13vmin, 140px); padding: .6rem 1rem; border-radius: 16px; border: 0; text-align: left; font: 800 clamp(.95rem, 2.1vmin + .2vw, 1.3rem)/1.25 var(--font-body); cursor: pointer; transition: transform .15s var(--ease), filter .15s, opacity .2s; background: var(--opt); color: var(--opt-ink); }
.opt-0 { --opt: var(--opt-0); --opt-ink: var(--opt-0-ink); } .opt-1 { --opt: var(--opt-1); --opt-ink: var(--opt-1-ink); }
.opt-2 { --opt: var(--opt-2); --opt-ink: var(--opt-2-ink); } .opt-3 { --opt: var(--opt-3); --opt-ink: var(--opt-3-ink); }
.opt:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.05); box-shadow: var(--sh); }
.opt:active:not(:disabled) { transform: none; }
.opt:disabled { cursor: default; }
.opt-shape { width: 1.6rem; height: 1.6rem; flex: none; display: grid; place-items: center; }
.opt-shape .shape { width: 100%; height: 100%; }
.opt-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.opt-key { font: 800 .8rem var(--font-body); opacity: .7; border: 1.5px solid currentColor; border-radius: 6px; width: 1.5rem; height: 1.5rem; display: grid; place-items: center; flex: none; }
.opt-mark { font-weight: 900; font-size: 1.4rem; width: 1.6rem; text-align: center; }
.opt.is-dim { opacity: .38; filter: saturate(.5); }
.opt.is-right { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--ok); }
.opt.is-wrong { opacity: .85; outline: 3px dashed var(--bad); outline-offset: 2px; }
.opt.picked { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--navy); }
.feedback { flex: none; display: flex; align-items: center; gap: 1rem; padding: .8rem 1rem; border-radius: var(--r-lg); background: var(--card); border: 1.5px solid var(--line); border-left-width: 6px; }
.feedback.right { border-left-color: var(--ok); background: var(--ok-bg); }
.feedback.wrong, .feedback.time { border-left-color: var(--bad); background: var(--bad-bg); }
.feedback.show { animation: pop .22s var(--ease) both; }
.fb-blob { width: clamp(44px, 9vmin, 74px); height: clamp(44px, 9vmin, 74px); flex: none; }
.fb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; max-height: 28dvh; overflow-y: auto; }
.fb-title { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; }
.fb-pts { background: var(--ok); color: #fff; font-weight: 900; border-radius: 99px; padding: .05em .65em; font-size: .95rem; }
.fb-explain { font-size: .98rem; font-weight: 600; color: var(--navy); }

/* ---------- resultado ---------- */
.result { flex: 1; min-height: 0; overflow-y: auto; display: grid; place-items: center; padding: var(--pad); }
.result-card { width: min(34rem, 100%); padding: clamp(1.2rem, 3.5vmin, 2.2rem); display: flex; flex-direction: column; align-items: center; gap: .8rem; text-align: center; background: var(--cream); }
.result-card h1 { font: 700 clamp(1.5rem, 3.6vmin, 2.2rem) var(--font-display); font-variant-caps: small-caps; letter-spacing: .06em; }
.result-blob { width: clamp(70px, 14vmin, 110px); height: clamp(70px, 14vmin, 110px); }
.res-sub { color: var(--ink-soft); font-weight: 700; }
.big-stars { display: flex; gap: .5rem; font-size: clamp(2.2rem, 6vmin, 3.6rem); }
.big-star { animation: pop .3s var(--ease) both; animation-delay: calc(var(--i) * 140ms); }
.big-star:not(.earned) { opacity: .6; }
.res-stats { display: flex; gap: clamp(.8rem, 3vmin, 2rem); justify-content: center; flex-wrap: wrap; }
.res-stats > div { display: flex; flex-direction: column; align-items: center; min-width: 4.5rem; }
.res-num { font: 900 clamp(1.4rem, 3.4vmin, 2rem) var(--font-body); font-variant-numeric: tabular-nums; }
.res-num.xp { color: var(--link); } .res-num.ok { color: var(--ok); } .res-num.bad { color: var(--bad); }
.res-num .ico { display: inline-block; width: .9em; height: .9em; vertical-align: -.05em; margin-left: .15em; }
.res-stats small { color: var(--ink-soft); font-weight: 700; font-size: .85rem; }
.levelup { background: var(--sky); border-radius: 12px; padding: .4rem .9rem; font-weight: 800; color: var(--navy); }

/* ---------- Cards de estudo ---------- */
.cards-screen > .lead { color: var(--link); font-weight: 700; opacity: 1; max-width: none; flex: none; }
.deck-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .9rem; align-content: start; padding: 2px; }
.deck-card { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; text-align: left; padding: 1rem; border-radius: var(--r-lg); background: var(--card); border: 1.5px solid var(--line); cursor: pointer; position: relative; transition: transform .18s var(--ease), box-shadow .18s; animation: pop .25s var(--ease) both; animation-delay: var(--d, 0ms); border-top: 5px solid var(--c); }
.deck-card:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.deck-stack { width: 3.6rem; height: 3.6rem; }
.deck-stack i { display: none; }
.deck-name { font-weight: 900; font-size: 1.15rem; color: var(--navy); }
.deck-count { color: var(--ink-soft); font-weight: 700; font-size: .9rem; }
.deck-bar { width: 100%; height: 6px; border-radius: 9px; background: var(--line-soft); overflow: hidden; }
.deck-bar i { display: block; height: 100%; background: var(--ok); }
.deck-stats { display: flex; gap: .8rem; font-size: .9rem; }
.deck-stats .ok { color: var(--ok); } .deck-stats .bad { color: var(--bad); }
.study-stage { flex: 1; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(.5rem, 2vmin, 1.4rem); align-items: center; }
.counter { display: flex; flex-direction: column; align-items: center; gap: .1rem; min-width: 4rem; font-weight: 800; transition: transform .2s; }
.counter b { font: 900 clamp(1.4rem, 3.6vmin, 2.4rem) var(--font-body); }
.counter small { color: var(--ink-soft); font-size: .8rem; }
.counter.ok-c { color: var(--ok); } .counter.bad-c { color: var(--bad); }
.counter.bump { transform: scale(1.12); }
.cnt-ico { font-size: 1.2rem; }
.flip-card { height: 100%; max-height: 34rem; width: 100%; max-width: 46rem; margin: 0 auto; perspective: 1400px; cursor: pointer; outline-offset: 4px; }
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .5s var(--ease); }
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--r-xl); border: 1.5px solid var(--line); padding: clamp(1rem, 3vmin, 2rem); display: flex; flex-direction: column; gap: .8rem; overflow-y: auto; text-align: center; }
.face.front { background: var(--card); color: var(--navy); }
.face.back { transform: rotateY(180deg); border-color: transparent; }
.face-tag { align-self: center; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; opacity: .75; }
.face-text { margin: auto 0; font: 800 calc(var(--fs, 1.1) * 1.2rem)/1.35 var(--font-body); }
.face-hint { font-size: .85rem; opacity: .65; font-weight: 700; }
.flip-card.done-ok .face.front { border-color: var(--ok); box-shadow: 0 0 0 2px var(--ok) inset; }
.flip-card.done-bad .face.front { border-color: var(--bad); box-shadow: 0 0 0 2px var(--bad) inset; }
.study-controls { display: flex; align-items: center; justify-content: center; gap: .8rem; flex: none; }
.mark-row { display: flex; gap: .7rem; }
.study-foot { display: flex; align-items: center; justify-content: center; gap: 1rem; flex: none; color: var(--ink-soft); font-weight: 700; font-size: .92rem; }
.pos { font-weight: 900; color: var(--navy); font-variant-numeric: tabular-nums; }
.study .subhead > .btn-sm:last-child { margin-left: auto; }

/* ---------- Atlas ---------- */
.tabs { display: flex; gap: .5rem; flex: none; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: .5rem; min-height: 42px; padding: .3em 1.1em; border-radius: 999px; border: 1px solid var(--line-soft); background: var(--card); color: var(--navy); font-weight: 800; cursor: pointer; }
.tab small { background: #fff; border-radius: 99px; padding: 0 .55em; font-weight: 800; color: var(--ink-soft); }
.tab.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab.on small { background: rgba(255, 255, 255, .2); color: #fff; }
.atlas-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(16rem, 24rem) minmax(0, 1fr); gap: var(--gap); }
.atlas-listpanel { display: flex; flex-direction: column; gap: .6rem; padding: .8rem; min-height: 0; border-radius: var(--r-lg); }
.atlas-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .3rem; }
.li { display: flex; align-items: center; gap: .7rem; text-align: left; padding: .5rem .6rem; border-radius: 12px; border: 1px solid transparent; background: transparent; cursor: pointer; width: 100%; }
.li:hover { background: #fff; }
.li.sel { background: var(--sky); border-color: var(--line); }
.li-badge { width: 2.3rem; height: 2.3rem; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: .8rem; color: var(--navy); }
.li-text { display: flex; flex-direction: column; min-width: 0; }
.li-text b { font-weight: 800; }
.li-text small { color: var(--ink-soft); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { padding: 1rem; color: var(--ink-soft); text-align: center; }
.atlas-detail { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .7rem; }
.detail-empty { margin: auto; text-align: center; color: var(--ink-soft); display: flex; flex-direction: column; align-items: center; gap: .8rem; font-weight: 700; }
.detail-empty .empty-ico { width: 5.5rem; height: 5.5rem; }
.back-list { display: none; align-self: flex-start; }
.detail-card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-xl); padding: clamp(1rem, 2.6vmin, 1.8rem); display: flex; flex-direction: column; gap: 1rem; }
.detail-head { display: flex; align-items: center; gap: 1rem; }
.detail-head h2 { font-size: clamp(1.4rem, 3vmin, 2rem); }
.big-badge { width: 3.6rem; height: 3.6rem; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1.05rem; flex: none; color: var(--navy); }
.big-badge.year { background: var(--sky); font-size: .95rem; }
.full { color: var(--ink-soft); font-weight: 700; }
.badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.badge { border-radius: 99px; padding: .15em .8em; font-size: .85rem; font-weight: 800; border: 1px solid var(--line-soft); }
.b-blue { background: var(--sky); } .b-red { background: var(--bad-bg); } .b-green { background: var(--ok-bg); } .b-orange { background: #FBE9D8; }
.meters { display: flex; flex-direction: column; gap: .6rem; }
.meter-top { display: flex; justify-content: space-between; font-weight: 800; font-size: .92rem; }
.meter-bar { height: 9px; border-radius: 9px; background: var(--line-soft); overflow: hidden; margin-top: .2rem; }
.meter-bar i { display: block; height: 100%; border-radius: 9px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .6rem; }
.fact { background: #fff; border: 1px solid var(--line-soft); border-radius: 14px; padding: .5rem .8rem; display: flex; flex-direction: column; }
.fact small { color: var(--ink-soft); font-weight: 700; font-size: .78rem; }
.sec h3 { font-size: 1rem; color: var(--link); text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; margin-bottom: .2rem; }
.sec p { font-weight: 600; }
.note { color: var(--ink-soft); font-weight: 700; }

/* ---------- Perfil ---------- */
.perfil-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--gap); align-content: start; }
.perfil-card, .ach-card { padding: clamp(1rem, 2.6vmin, 1.8rem); display: flex; flex-direction: column; gap: .8rem; align-items: center; text-align: center; }
.perfil-avatar { width: clamp(80px, 16vmin, 130px); height: clamp(80px, 16vmin, 130px); }
.perfil-lv { color: var(--link); font-weight: 800; }
.xp-big { width: 100%; display: flex; flex-direction: column; gap: .3rem; }
.xp-big-bar { height: 10px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.xp-big-bar i { display: block; height: 100%; background: var(--link); }
.xp-big small { color: var(--ink-soft); font-weight: 700; }
.ach-card { align-items: stretch; text-align: left; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .6rem; }
.ach { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: 14px; background: #fff; border: 1px solid var(--line-soft); opacity: .6; }
.ach.got { opacity: 1; border-color: var(--ok); background: var(--ok-bg); }
.ach-ico { width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--sky); display: grid; place-items: center; font-weight: 900; flex: none; }
.ach-text { display: flex; flex-direction: column; }
.ach-text small { color: var(--ink-soft); font-weight: 600; }

/* ---------- Sala ao Vivo: jogador ---------- */
.join, .wait, .p-reveal, .p-board { flex: 1; min-height: 0; overflow-y: auto; display: grid; place-items: center; padding: var(--pad); }
.join-card, .wait-card, .reveal-card, .board-card { width: min(30rem, 100%); padding: clamp(1.1rem, 3vmin, 2rem); display: flex; flex-direction: column; gap: .9rem; align-items: stretch; text-align: center; background: var(--cream); }
.join-card h1, .wait-card h1, .reveal-card h1, .board-card h1 { font: 700 clamp(1.5rem, 3.4vmin, 2.1rem) var(--font-display); font-variant-caps: small-caps; letter-spacing: .06em; }
.pin-input { text-align: center; font: 800 1.9rem var(--font-body); letter-spacing: .3em; }
.wait-card { align-items: center; }
.wait-avatar { width: clamp(80px, 16vmin, 120px); height: clamp(80px, 16vmin, 120px); }
.wait-sub { color: var(--ink-soft); font-weight: 700; }
.wait-dots { display: flex; gap: .4rem; justify-content: center; }
.wait-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--link); animation: pulse 1.4s infinite; }
.wait-dots i:nth-child(2) { animation-delay: .2s; } .wait-dots i:nth-child(3) { animation-delay: .4s; }
.wait-count { font-weight: 700; }
.pin-tag { background: var(--sky); border: 1px solid var(--line-soft); border-radius: 99px; padding: .1em .8em; font-weight: 800; margin-left: .3rem; white-space: nowrap; }
.sent-pick { width: 4.4rem; height: 4.4rem; border-radius: 18px; display: grid; place-items: center; background: var(--opt, var(--card)); color: var(--opt-ink, var(--navy)); }
.sent-pick .opt-shape { width: 2.4rem; height: 2.4rem; }
.p-prompt { flex: none; max-height: 34%; }
.p-q .options { flex: 1; min-height: 0; grid-auto-rows: minmax(0, 1fr); }
.p-q .opt { min-height: 0; }
.reveal-blob { width: clamp(70px, 14vmin, 100px); height: clamp(70px, 14vmin, 100px); margin: 0 auto; }
.p-reveal.right .reveal-card { border-color: var(--ok); } .p-reveal.wrong .reveal-card, .p-reveal.time .reveal-card { border-color: var(--bad); }
.big-pts { font: 900 clamp(2.2rem, 7vmin, 3.4rem) var(--font-body); color: var(--ok); }
.right-answer { font-weight: 700; }
.rank-line { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.explain-mini { font-size: .95rem; color: var(--navy); background: #fff; border: 1px solid var(--line-soft); border-radius: 12px; padding: .6rem .8rem; text-align: left; }
.board-you { color: var(--ink-soft); font-weight: 700; }
.p-end, .host-end, .host-board, .host-reveal, .host-lobby { flex: 1; min-height: 0; padding: clamp(.7rem, 2vmin, 1.4rem) var(--pad) var(--pad); display: flex; flex-direction: column; gap: var(--gap); }
.p-end { align-items: center; }
.end-title { font: 700 clamp(1.8rem, 5vmin, 3rem) var(--font-display); font-variant-caps: small-caps; letter-spacing: .08em; text-align: center; flex: none; }
.end-body { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: var(--gap); width: 100%; max-width: 64rem; margin: 0 auto; overflow-y: auto; }
.you-card { display: flex; align-items: center; gap: .8rem; padding: .6rem 1rem; flex: none; background: var(--cream); }
.you-card .rank-av { width: 2.8rem; height: 2.8rem; }
.you-card small { display: block; color: var(--ink-soft); }
.host-foot { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; flex: none; }

/* ranking */
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; text-align: left; }
.rank-row { display: grid; grid-template-columns: 2rem 2.8rem minmax(0, 1fr) auto auto; align-items: center; gap: .7rem; padding: .45rem .8rem .45rem .6rem; border-radius: 16px; background: #fff; border: 1px solid var(--line-soft); animation: pop .25s var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
.rank-row.you { border-color: var(--navy); box-shadow: 0 0 0 1.5px var(--navy) inset; background: var(--sky); }
.rank-pos { font-weight: 900; font-size: 1.1rem; text-align: center; color: var(--link); }
.rank-av { width: 2.8rem; height: 2.8rem; }
.rank-main { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.rank-nick { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { height: 6px; border-radius: 9px; background: var(--line-soft); overflow: hidden; }
.rank-bar i { display: block; height: 100%; width: var(--w); background: var(--link); border-radius: 9px; animation: grow .6s var(--ease) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.rank-plus { color: var(--ok); font-weight: 800; font-size: .9rem; }
.rank-score { font-variant-numeric: tabular-nums; font-weight: 900; }

/* podio */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: clamp(.5rem, 2vmin, 1.4rem); flex: none; min-height: 0; }
.pod { display: flex; flex-direction: column; align-items: center; width: clamp(6.5rem, 22vw, 13rem); animation: pop .5s var(--ease) both; animation-delay: var(--delay, 0s); }
.pod-empty { visibility: hidden; }
.pod-who { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding-bottom: .5rem; text-align: center; max-width: 100%; }
.crown { color: #D9A515; font-size: 1.6rem; line-height: 1; }
.pod-av { width: clamp(3.2rem, 11vmin, 6rem); height: clamp(3.2rem, 11vmin, 6rem); }
.pod-nick { font-weight: 900; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(.9rem, 2.2vmin, 1.3rem); }
.pod-score { color: var(--ink-soft); font-weight: 800; font-size: .9rem; }
.pod-block { width: 100%; display: grid; place-items: center; border-radius: 16px 16px 0 0; background: var(--navy); color: #fff; font: 700 clamp(1.6rem, 5vmin, 3rem) var(--font-display); }
.pod-1 .pod-block { height: clamp(5.5rem, 24vmin, 14rem); background: var(--navy); }
.pod-2 .pod-block { height: clamp(4rem, 17vmin, 10rem); background: var(--navy-2); }
.pod-3 .pod-block { height: clamp(3rem, 12vmin, 7rem); background: #3C5BAA; }
.pod.you .pod-nick { color: var(--link); }

/* ---------- Sala ao Vivo: host ---------- */
.setup-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--gap); align-content: start; }
.setup-card { padding: clamp(1rem, 2.6vmin, 1.8rem); display: flex; flex-direction: column; gap: 1.2rem; background: var(--cream); }
.setup-block { display: flex; flex-direction: column; gap: .7rem; }
.setup-block h2 { font-size: 1.1rem; }
.theme-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.theme-chip { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .25rem .9rem .25rem .35rem; border-radius: 99px; border: 1.5px solid var(--line-soft); background: #fff; font-weight: 800; color: var(--navy); cursor: pointer; }
.theme-chip .cat-icon, .theme-chip .theme-icon { width: 1.9rem; height: 1.9rem; }
.theme-chip .chk { width: 1.3rem; height: 1.3rem; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: .75rem; font-style: normal; color: transparent; }
.theme-chip.on { background: var(--sky); border-color: var(--navy); }
.theme-chip.on .chk { background: var(--navy); border-color: var(--navy); color: #fff; }
.segs { display: flex; gap: .5rem; }
.seg { min-width: 3.4rem; min-height: 46px; padding: .3em 1.1em; border-radius: 99px; border: 1.5px solid var(--line-soft); background: #fff; font: 800 1.05rem var(--font-body); color: var(--navy); cursor: pointer; }
.seg.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.setup-foot { display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
.setup-side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; text-align: center; padding: 1rem; }
.side-ico { width: clamp(70px, 14vmin, 120px); height: clamp(70px, 14vmin, 120px); }
.bubble { color: var(--ink-soft); font-weight: 700; max-width: 22rem; }

.host-lobby { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.2fr); gap: var(--gap); }
.lobby-left { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(.4rem, 1.6vmin, 1rem); padding: clamp(.8rem, 2.4vmin, 1.8rem); background: var(--cream); min-height: 0; }
.join-line { font-size: clamp(.9rem, 2vmin, 1.3rem); }
.join-line b { color: var(--link); font-weight: 900; }
.pin-label { font: 800 clamp(.8rem, 1.6vmin + .2rem, 1.1rem) var(--font-body); text-transform: uppercase; letter-spacing: .16em; color: var(--ink-soft); }
.pin { display: flex; gap: clamp(.2rem, .8vmin, .5rem); justify-content: center; font: 700 clamp(2.2rem, min(8.4vmin, 5.4vw), 6rem)/1 var(--font-display); }
.pin span { background: #fff; color: var(--navy); border: 1.5px solid var(--line); border-radius: .2em; padding: .1em .2em; min-width: 1.05em; text-align: center; animation: pop .3s var(--ease) both; }
.pin span:nth-child(2) { animation-delay: .05s; } .pin span:nth-child(3) { animation-delay: .1s; } .pin span:nth-child(4) { animation-delay: .15s; } .pin span:nth-child(5) { animation-delay: .2s; } .pin span:nth-child(6) { animation-delay: .25s; }
.qr-box { width: clamp(90px, 28vmin, 260px); aspect-ratio: 1; background: #fff; border: 1.5px solid var(--line); border-radius: 18px; padding: .5rem; display: grid; place-items: center; }
.qr { width: 100%; height: 100%; }
.qr-box.noqr { aspect-ratio: auto; padding: 1rem; }
.qr-hint { color: var(--ink-soft); font-weight: 700; font-size: .9rem; }
.lobby-right { display: flex; flex-direction: column; gap: var(--gap); min-height: 0; }
.lobby-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex: none; }
.lobby-top h2 { display: flex; align-items: center; gap: .6rem; font-size: 1.4rem; }
.players-panel { flex: 1; min-height: 0; overflow-y: auto; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: .8rem; position: relative; }
.players-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .5rem; }
.p-chip { display: flex; align-items: center; gap: .5rem; padding: .3rem .4rem .3rem .3rem; border-radius: 99px; background: #fff; border: 1px solid var(--line-soft); min-width: 0; }
.p-chip.away { opacity: .5; }
.p-av { width: 2.3rem; height: 2.3rem; flex: none; }
.p-nick { flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-kick { width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: .8rem; }
.p-kick:hover { background: var(--bad-bg); color: var(--bad); }
.players-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; height: 100%; color: var(--ink-soft); font-weight: 700; text-align: center; }
.players-grid:not(:empty) + .players-empty { display: none; }
.lobby-foot { display: flex; justify-content: flex-end; flex: none; }

.host-q { max-width: none; }
.host-prompt { flex: 1; }
.host-prompt.small { flex: none; padding: .8rem 1.2rem; }
.host-prompt.small h2 { font-size: clamp(1rem, 2.4vmin, 1.5rem); }
.h-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; flex: none; }
.h-opt { cursor: default; min-height: clamp(64px, 15vmin, 130px); font-size: clamp(1rem, 2.6vmin, 1.9rem); }
.h-opt .opt-shape { width: 2.2rem; height: 2.2rem; }
.answered b { font-variant-numeric: tabular-nums; }
.reveal-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--gap); }
.reveal-left { display: flex; flex-direction: column; gap: var(--gap); min-height: 0; overflow-y: auto; }
.answer-card { display: flex; align-items: center; gap: .9rem; padding: .9rem 1.2rem; border-radius: 18px; background: var(--opt); color: var(--opt-ink); font-size: clamp(1.05rem, 2.6vmin, 1.8rem); }
.answer-card small { display: block; opacity: .85; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; }
.answer-card .opt-shape { width: 2.2rem; height: 2.2rem; }
.explain { display: flex; gap: .8rem; padding: .9rem 1.2rem; background: var(--cream); }
.explain small { color: var(--link); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; }
.explain p { font-weight: 600; font-size: clamp(.95rem, 2vmin, 1.25rem); }
.chart { padding: 1rem; display: flex; background: var(--cream); min-height: 0; }
.bars { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: clamp(.4rem, 1.6vmin, 1rem); align-items: end; min-height: 0; }
.bar-col { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: .3rem; height: 100%; min-width: 0; justify-items: center; }
.bar-n { font: 900 clamp(1.1rem, 2.6vmin, 1.8rem) var(--font-body); }
.bar-track { width: 100%; height: 100%; display: flex; align-items: flex-end; }
.bar-fill { width: 100%; height: var(--h); min-height: 2.4rem; background: var(--opt); color: var(--opt-ink); border-radius: 12px 12px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: .4rem; gap: .2rem; transform-origin: bottom; animation: grow-y .6s var(--ease) both; animation-delay: calc(var(--i) * 80ms); }
@keyframes grow-y { from { transform: scaleY(0); } }
.bar-fill .opt-shape { width: 1.4rem; height: 1.4rem; }
.bar-ok { font-weight: 900; font-size: 1.3rem; }
.bar-col.right .bar-fill { box-shadow: 0 0 0 3px var(--ok); }
.bar-col:not(.right) .bar-fill { opacity: .55; }
.bar-lbl { font-size: clamp(.7rem, 1.5vmin, .95rem); font-weight: 700; text-align: center; max-height: 3.2em; overflow: hidden; color: var(--navy); }
.board-title { font: 700 clamp(1.8rem, 5vmin, 3rem) var(--font-display); font-variant-caps: small-caps; letter-spacing: .08em; }
.host-board { align-items: center; }
.host-board .board-card { width: min(46rem, 100%); flex: 1; min-height: 0; overflow-y: auto; }
.board-sub { color: var(--ink-soft); font-weight: 700; }
.host-end { align-items: center; }
.rest-card { padding: .8rem 1.2rem; background: var(--cream); flex: none; max-height: 30%; overflow-y: auto; }
.rest-card h3 { font-size: 1rem; margin-bottom: .4rem; }
.rest-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .3rem .8rem; }
.rest-list li { display: flex; align-items: center; gap: .5rem; }
.rest-list .rank-av { width: 1.8rem; height: 1.8rem; }
.rest-list .rank-nick { flex: 1; }
.rest-pos { font-weight: 900; color: var(--link); min-width: 2rem; }

/* ---------- responsivo ---------- */
@media (max-width: 899px), (max-aspect-ratio: 1/1) {
  .welcome { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); align-items: start; padding-bottom: 0; }
  .welcome-copy { align-items: center; text-align: center; }
  .title { align-items: center; font-size: clamp(2.6rem, 15vw, 5.5rem); }
  .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-card { max-height: none; }
  .mode-text { font-size: .8rem; }
  .welcome-art { align-self: stretch; }
  .art-wrap { width: min(100%, 48vh); aspect-ratio: 4/3; margin: 0 auto; align-self: end; }
  .welcome .deco-globe { left: auto; right: -20%; top: 4%; bottom: auto; width: 52vw; }
  .welcome .deco-spark { left: 70%; top: 50%; }
  .atlas-body { grid-template-columns: 1fr; position: relative; }
  .atlas-detail { display: none; }
  .atlas-body.show-detail .atlas-listpanel { display: none; }
  .atlas-body.show-detail .atlas-detail { display: flex; }
  .back-list { display: inline-flex; }
  .perfil-body { grid-template-columns: 1fr; }
  .setup-body { grid-template-columns: 1fr; }
  .setup-side { display: none; }
}
@media (min-width: 1500px) and (min-aspect-ratio: 1/1) {
}
@media (max-width: 700px) {
  .brand-text small { display: none; }
  .brand-text b { font-size: .95rem; letter-spacing: .035em; }
  .brand { gap: .5rem; }
  #topbar { gap: .5rem; }
  .xp-info { display: none; }
  .xp-chip { padding-right: .6rem; }
  .options.mc { grid-template-columns: 1fr; }
  .options.tf { grid-template-columns: 1fr 1fr; }
  .opt-key { display: none; }
  .study-stage { grid-template-columns: 1fr 1fr; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "bad ok" "card card"; }
  .study-stage .bad-c { grid-area: bad; } .study-stage .ok-c { grid-area: ok; } .study-stage .flip-card { grid-area: card; }
  .study-stage .counter { flex-direction: row; gap: .5rem; justify-content: center; padding: .2rem; }
  .study-stage .counter b { font-size: 1.3rem; }
  .host-lobby { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .reveal-body { grid-template-columns: 1fr; overflow-y: auto; }
  .h-options { grid-template-columns: 1fr; }
  .rank-row { grid-template-columns: 1.6rem 2.4rem minmax(0, 1fr) auto auto; gap: .5rem; }
  .hide-sm { display: none; }
  .feedback { display: grid; grid-template-columns: 1fr; gap: .6rem; }
  .fb-blob { display: none; }
  .feedback .btn { width: 100%; }
  .fb-text { max-height: 20dvh; }
  .jornada .subhead .pill { display: none; }
}
/* celular em paisagem / telas baixas */
@media (max-height: 520px) {
  :root { --topbar-h: 46px; }
  #topbar { padding-top: .25rem; padding-bottom: .25rem; flex-wrap: nowrap; }
  .brand-text small, .xp-info { display: none; }
  .brand-ico { width: 32px; height: 32px; }
  .quiz, .p-q, .host-q { padding-top: .3rem; gap: .35rem; }
  .quiz-top { gap: .4rem; }
  .qdots { display: none; }
  .options { gap: .4rem; }
  .options.mc, .options.tf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opt, .h-opt { min-height: 44px; padding: .35rem .7rem; font-size: .9rem; }
  .q-card, .host-prompt { padding: .5rem .8rem; }
  .q-prompt, .host-prompt h2 { font-size: 1rem; }
  .q-blob, .q-theme .q-lv { display: none; }
  .fb-blob { display: none; }
  .feedback { padding: .4rem .7rem; gap: .6rem; }
  .fb-text { max-height: 26dvh; } .fb-title { font-size: 1rem; } .fb-explain { font-size: .85rem; }
  .btn-lg, .btn-xl { min-height: 42px; font-size: .95rem; padding: .35em 1.2em; }
  .result-blob, .reveal-blob, .wait-avatar, .perfil-avatar { width: 54px; height: 54px; }
  .result-card, .reveal-card, .wait-card, .join-card, .board-card { gap: .45rem; padding: .7rem 1rem; }
  .big-stars { font-size: 1.8rem; }
  .welcome { grid-template-columns: 1fr 1fr; grid-template-rows: none; align-items: center; padding: .6rem 1.5rem 0; }
  .welcome-copy { align-items: flex-start; text-align: left; }
  .title { align-items: flex-start; }
  .welcome-art { align-self: end; }
  .art-wrap { width: min(100%, 60vh); }
  .logo-lockup, .hello { display: none; }
  .title { font-size: clamp(2rem, 15vh, 4rem); }
  .welcome-copy { gap: .4rem; }
  .mode-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: .6rem; }
  .home-head, .mode-text, .mode-go { display: none; }
  .mode-actions { flex-direction: column; gap: .25rem; margin-top: 0; }
  .mode-actions .btn { min-height: 30px; flex: none; width: 100%; font-size: .7rem; padding: .2em .3em; }
  .mode-tag { font-size: .65rem; }
  .mode-title { font-size: .95rem; }
  .welcome-copy { gap: .5rem; }
  .join { align-items: start; }
  .face-text { font-size: calc(var(--fs, 1.1) * 1rem); }
  .study-controls .btn-lg { min-height: 40px; }
  .pod-block { min-height: 0; }
  .host-lobby { grid-template-columns: .9fr 1.2fr; grid-template-rows: none; }
  .pin { font-size: clamp(1.6rem, 9vh, 2.6rem); }
  .qr-box { width: clamp(70px, 30vh, 110px); }
  .qr-hint, .pin-label { display: none; }
  .answer-card { padding: .4rem .8rem; }
  .explain { padding: .5rem .8rem; }
  .perfil-body { grid-template-columns: 1fr 1.4fr; }
  .atlas-body { grid-template-columns: minmax(12rem, 20rem) minmax(0, 1fr); }
  .atlas-detail { display: flex; }
  .atlas-body.show-detail .atlas-listpanel { display: flex; }
  .back-list { display: none; }
  .setup-body { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* ---------- extras v3 ---------- */
.stop-blob { position: absolute; right: calc(100% - 4px); top: 50%; margin-top: calc(-0.5 * max(40px, 84 * var(--u))); width: max(40px, calc(84 * var(--u))); height: max(40px, calc(84 * var(--u))); pointer-events: none; animation: float 3.2s ease-in-out infinite; }
.stop-blob .blob-react, .stop-blob .blob-svg { width: 100%; height: 100%; max-width: none; }
.join-card { position: relative; }
.join-blob { position: absolute; right: -.4rem; top: -2.8rem; pointer-events: none; }
.join-blob .blob-react, .join-blob .blob-svg { width: 4.5rem; height: 4.5rem; }
@media (max-width: 480px), (max-height: 520px) { .join-blob { display: none; } }
.q-card .q-theme { align-self: flex-start; flex: none; }
.q-card .q-prompt { margin: auto; text-wrap: balance; }
.timer-num { min-width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); text-align: center; }
.timer-track { height: 12px; }
.qdots i { max-width: none; }
@media (max-width: 899px), (max-aspect-ratio: 1/1) { .welcome { padding-top: clamp(3rem, 9vmin, 4rem); } }
@media (max-height: 520px) { .welcome { padding-top: .6rem; } .welcome-copy { padding-right: 2.5rem; } }
#app[data-route="welcome"] .icon-btn { background: var(--navy-deep); border: 1px solid rgba(255, 255, 255, .35); color: #fff; }
