/* ONU CONNECT - 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), 20px); -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.35;
}
/* textura granulada leve (estilo ilustracao flat) */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .1 0 0 0 0 .2 0 0 0 1.2 -.1'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; line-height: 1.1; }
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; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
.input:focus-visible { outline-offset: 1px; }
::selection { background: var(--yellow); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(27, 27, 58, .28); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }

#app { position: fixed; inset: 0; width: 100vw; height: 100dvh; display: grid; grid-template-rows: var(--header-h) minmax(0, 1fr); overflow: hidden; }
#bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at 6% 14%, var(--cream-3) 0 8vmin, transparent calc(8vmin + 1px)),
    radial-gradient(circle at 95% 90%, rgba(156, 200, 255, .55) 0 15vmin, transparent calc(15vmin + 1px)),
    radial-gradient(circle at 97% 10%, rgba(255, 194, 26, .38) 0 7vmin, transparent calc(7vmin + 1px)),
    radial-gradient(circle at 3% 94%, rgba(255, 143, 199, .38) 0 9vmin, transparent calc(9vmin + 1px)),
    var(--cream);
}
#topbar, #view { position: relative; z-index: 1; }
#view { min-height: 0; overflow: hidden; outline: none; }
.screen { height: 100%; width: 100%; display: flex; flex-direction: column; min-height: 0; padding: 0 var(--pad) var(--pad); }
.screen.enter { animation: screen-in .45s var(--ease-bounce) both; }
#fx { position: fixed; inset: 0; width: 100vw; height: 100dvh; z-index: 80; pointer-events: none; }

/* ---------- cabecalho ---------- */
#topbar { display: flex; align-items: center; gap: .6rem; padding: 0 var(--pad); min-width: 0; }
.spacer { flex: 1; }
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; min-width: 0; border-radius: 14px; }
.brand-ico { --sz: calc(var(--header-h) * .72); width: var(--sz); height: var(--sz); object-fit: contain; flex: none; }
.brand-text { font: 700 1.3rem/1 var(--font-display); color: var(--navy); letter-spacing: .02em; white-space: nowrap; }
.brand-text b { color: var(--orange); margin-left: .25em; font-weight: 700; }
.xp-chip { max-height: calc(var(--header-h) - 8px); display: flex; align-items: center; gap: .5rem; padding: .18rem .8rem .18rem .2rem; background: #fff; border: 2.5px solid var(--ink); border-radius: 99px; box-shadow: 0 3px 0 var(--ink); text-decoration: none; min-height: 44px; }
.xp-chip .xp-avatar { --sz: 34px; width: 34px; height: 34px; border-radius: 50%; object-fit: contain; flex: none; background: var(--cream-2); }
.xp-info { display: flex; flex-direction: column; gap: 3px; min-width: 4.2rem; }
.xp-lv { font: 700 .82rem/1 var(--font-display); }
.xp-bar { display: block; height: 8px; background: var(--cream-2); border-radius: 99px; overflow: hidden; border: 1.5px solid var(--ink); }
.xp-bar i { display: block; height: 100%; background: var(--orange); border-radius: 99px; transition: width .6s var(--ease-bounce); }
.xp-num { font-size: .8rem; font-weight: 800; color: var(--ink-soft); }
.icon-btn { width: 44px; height: 44px; min-width: 44px; display: inline-grid; place-items: center; background: #fff; color: var(--ink); border: 2.5px solid var(--ink); border-radius: 50%; box-shadow: 0 3px 0 var(--ink); cursor: pointer; font: 700 1.2rem var(--font-display); text-decoration: none; transition: transform .12s, box-shadow .12s; }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: default; }
@media (hover: hover) { .icon-btn:not(:disabled):hover { transform: translateY(-2px); } }
@media (max-width: 560px) { .xp-num { display: none; } .brand-text { font-size: 1.1rem; } .xp-info { min-width: 3.4rem; } }
#app[data-route="welcome"] .brand, #app[data-route="welcome"] .xp-chip { visibility: hidden; }

/* ---------- botoes gordinhos ---------- */
.btn {
  --bg: var(--yellow); --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .5em 1.3em;
  font: 700 1.1rem/1.1 var(--font-display); color: var(--fg); background: var(--bg); border: var(--bw) solid var(--ink);
  border-radius: var(--r-lg); box-shadow: var(--sh); cursor: pointer; text-decoration: none; user-select: none; -webkit-user-select: none;
  transition: transform .12s var(--ease-bounce), box-shadow .12s, filter .15s; text-align: center; position: relative;
}
@media (hover: hover) { .btn:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); } }
.btn:not(:disabled):active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { opacity: .55; filter: grayscale(.5); cursor: not-allowed; box-shadow: 0 3px 0 var(--ink); }
.btn-yellow { --bg: var(--yellow); } .btn-orange { --bg: var(--orange); } .btn-pink { --bg: var(--pink); }
.btn-green { --bg: var(--green); } .btn-blue { --bg: var(--blue); --fg: #fff; } .btn-red { --bg: var(--red); --fg: #fff; } .btn-white { --bg: #fff; }
.btn-sm { min-height: 44px; padding: .3em .95em; font-size: .98rem; border-radius: var(--r-md); box-shadow: var(--sh-sm); }
.btn-lg { min-height: 56px; font-size: 1.25rem; }
.btn-xl { min-height: 66px; font-size: 1.65rem; padding: .45em 1.5em; border-radius: var(--r-xl); box-shadow: var(--sh-lg); }
@media (hover: hover) { .btn-xl:not(:disabled):hover { box-shadow: 0 12px 0 var(--ink); } }
.btn-xl:not(:disabled):active { transform: translateY(8px); box-shadow: 0 1px 0 var(--ink); }
.link-btn { background: none; border: 0; padding: .6rem; min-height: 44px; font: 800 1rem var(--font-body); color: var(--navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pulse { animation: pulse 2s ease-in-out infinite; }

.card { background: #fff; border: var(--bw) solid var(--ink); border-radius: var(--r-xl); box-shadow: var(--sh-lg); padding: clamp(.8rem, 2vmin, 1.6rem); }
.pill { display: inline-flex; align-items: center; gap: .35em; padding: .25em .8em; border: 2.5px solid var(--ink); border-radius: 99px; font: 700 .95rem/1.1 var(--font-display); background: #fff; white-space: nowrap; box-shadow: 0 3px 0 var(--ink); }
.pill-yellow { background: var(--yellow); } .pill-orange { background: var(--orange); } .pill-white { background: #fff; }
.pill .star { width: 1.1em; height: 1.1em; }
.input { width: 100%; min-height: 52px; padding: .6em .9em; font: 700 1.15rem var(--font-body); color: var(--ink); background: #fff; border: var(--bw) solid var(--ink); border-radius: var(--r-md); box-shadow: inset 0 3px 0 rgba(27, 27, 58, .08); }
.input::placeholder { color: #8b8ba8; }
.field { display: flex; flex-direction: column; gap: .35rem; text-align: left; }
.field > span { font: 700 .95rem var(--font-display); color: var(--ink-soft); }
.form-error { color: #B3261E; font-weight: 800; min-height: 1.2em; font-size: .95rem; }
.row-actions { display: flex; gap: .8rem; justify-content: center; align-items: center; }
.row-actions.wrap { flex-wrap: wrap; }
.center-box { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; padding: 1.4rem; max-width: 92%; }
.loading-text { font: 600 1.2rem var(--font-display); color: var(--ink-soft); }

/* ---------- imagens / ilustracoes com fallback ---------- */
.globi { --sz: 8rem; width: var(--sz); height: var(--sz); object-fit: contain; flex: none; }
.globi-xs { --sz: calc(54 * var(--u, 1px)); min-width: 40px; min-height: 40px; }
.globi-sm { --sz: clamp(56px, 11vmin, 120px); } .globi-md { --sz: clamp(100px, 22vmin, 220px); } .mascot-md { --sz: clamp(110px, 22vmin, 200px); }
.globi-big { --sz: clamp(120px, 30vmin, 340px); }
.globi-svg, .avatar-svg, .logo-svg { width: 100%; height: 100%; }
.globi.fb { overflow: visible; }
.avatar { --sz: 3rem; width: var(--sz); height: var(--sz); object-fit: contain; flex: none; border-radius: 50%; }
.theme-icon { --sz: 3rem; width: var(--sz); height: var(--sz); object-fit: contain; flex: none; }
.theme-icon.sm { --sz: 4rem; } .theme-icon.xs { --sz: 1.7rem; }
.mode-img { object-fit: contain; }
.logo-icon { width: 2.4rem; height: 2.4rem; object-fit: contain; flex: none; }
.emoji-badge { display: grid; place-items: center; background: var(--c, #FFC21A); border-radius: 50%; line-height: 1; font-size: calc(var(--sz, 3rem) * .52); border: 2.5px solid var(--ink); }
.theme-icon.emoji-badge { font-size: calc(var(--sz) * .55); }
.star { width: 1.6em; height: 1.6em; stroke: var(--ink); stroke-width: 1.6; }
.star.on { fill: var(--yellow); } .star.off { fill: var(--cream-2); stroke: rgba(27, 27, 58, .35); }
.sparkle { width: 1.2em; height: 1.2em; }
.shape { width: 1em; height: 1em; }
.bob { animation: bob 3.2s ease-in-out infinite; }
.twinkle { animation: twinkle 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.bounce { animation: bounce 1.2s ease-in-out infinite; }

/* ---------- sub-cabecalho das telas ---------- */
.subhead { display: flex; align-items: center; gap: .8rem; flex: none; padding: .35rem 0 .75rem; min-width: 0; }
.subtitle { font-size: clamp(1.3rem, 2.8vmin + .3rem, 2.2rem); flex: 1; min-width: 0; display: flex; align-items: center; gap: .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back-btn { flex: none; }
.lead { font: 700 clamp(1rem, 1.8vmin + .4rem, 1.35rem) var(--font-body); color: var(--ink-soft); margin: 0 0 .8rem; }

/* ---------- modal e toasts ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--pad); background: rgba(27, 27, 58, .55); animation: fade-in .18s both; }
.modal-wrap.closing { opacity: 0; transition: opacity .16s; }
.modal-box { width: 100%; max-width: min(94vw, 520px); max-height: 92dvh; overflow: auto; background: var(--cream); border: var(--bw) solid var(--ink); border-radius: var(--r-xl); box-shadow: 0 10px 0 var(--ink); padding: clamp(1rem, 2.6vmin, 1.6rem); }
.modal-wide { max-width: min(94vw, 640px); }
.confirm { display: flex; flex-direction: column; gap: 1rem; text-align: center; }
.confirm h2 { font-size: 1.6rem; } .confirm p { color: var(--ink-soft); font-weight: 700; }
#toasts { position: fixed; top: calc(var(--header-h) + 8px); left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: .5rem; align-items: center; pointer-events: none; width: min(94vw, 520px); }
.toast { display: flex; align-items: center; gap: .6rem; padding: .6rem 1.1rem; background: var(--yellow); border: 3px solid var(--ink); border-radius: 99px; box-shadow: 0 5px 0 var(--ink); font: 700 1rem var(--font-display); text-align: center; }
.toast.tone-green { background: #B8F0CD; } .toast.tone-pink { background: var(--pink); }
.toast.closing { opacity: 0; transform: translateY(-10px); transition: .25s; }
.toast-ico { font-size: 1.3rem; }
.profile-form { display: flex; flex-direction: column; gap: 1rem; } .profile-form h2 { font-size: 1.7rem; text-align: center; }
.avatar-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.avatar-opt { aspect-ratio: 1; padding: .25rem; display: grid; place-items: center; background: #fff; border: 3px solid var(--ink); border-radius: var(--r-md); cursor: pointer; transition: transform .15s var(--ease-bounce); min-height: 48px; }
.avatar-opt .avatar { --sz: 100%; border-radius: 0; }
.avatar-opt.sel { background: var(--yellow); transform: scale(1.08); box-shadow: 0 4px 0 var(--ink); }
@media (hover: hover) { .avatar-opt:hover { transform: scale(1.06) rotate(-3deg); } }

/* ---------- animacoes ---------- */
@keyframes screen-in { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { 0% { opacity: 0; transform: scale(.7); } 60% { transform: scale(1.06); } 100% { opacity: 1; transform: scale(1); } }
.pop-in { animation: pop-in .4s var(--ease-bounce) both; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-5px) rotate(1.5deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1) rotate(0); } 50% { opacity: .55; transform: scale(.78) rotate(20deg); } }
@keyframes wiggle { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(5deg); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes letter { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-.08em) rotate(calc(var(--r, 0deg) * -1)); } }
@keyframes dash-move { to { stroke-dashoffset: -64; } }
@keyframes dot-wave { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-10px); opacity: 1; } }
@keyframes ring { 0% { transform: scale(.9); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes rise { from { transform: translateY(110%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slide-in-l { from { transform: translateX(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =================== ABERTURA =================== */
.welcome { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: calc(var(--gap) * 2); align-items: center; padding-top: .4rem; }
.welcome-copy { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(.4rem, 1.6vmin, 1.1rem); min-width: 0; padding-left: clamp(0rem, 3vw, 4rem); }
.logo-lockup { display: flex; align-items: flex-end; gap: .3rem; }
.logo-big { width: clamp(52px, 11vmin, 110px); height: clamp(52px, 11vmin, 110px); animation: bob 3.6s ease-in-out infinite; }
.logo-lockup .sparkles { display: flex; flex-direction: column; gap: .2rem; } .logo-lockup .sparkle { width: 1.6rem; height: 1.6rem; animation: twinkle 2.2s infinite; } .logo-lockup .sparkle.sm { width: 1rem; height: 1rem; animation-delay: .8s; }
.title { display: flex; flex-direction: column; font-size: clamp(3rem, min(15vmin, 15vw), 9.5rem); }
@media (max-aspect-ratio: 1/1) { .title { font-size: clamp(3rem, 17.5vw, 9.5rem); } }
.title { line-height: .86; letter-spacing: .01em; }
.title-onu { color: var(--navy); text-shadow: 0 .045em 0 rgba(27, 27, 58, .25); }
.title-connect { display: flex; }
.title-connect span { display: inline-block; color: var(--c); text-shadow: 0 .05em 0 var(--ink); -webkit-text-stroke: .02em var(--ink); paint-order: stroke fill; --r: 3deg; animation: letter 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * .14s); }
.title-connect span:nth-child(even) { --r: -4deg; }
.tagline { display: inline-block; background: var(--navy); color: #fff; font: 600 clamp(1rem, 2.6vmin + .2rem, 1.9rem) var(--font-display); padding: .3em 1em; border-radius: 99px; transform: rotate(-1.5deg); box-shadow: 0 5px 0 var(--ink); border: 3px solid var(--ink); }
.hello { font: 700 clamp(1rem, 2vmin + .4rem, 1.5rem) var(--font-body); color: var(--ink-soft); max-width: 28ch; }
.play-ico { font-size: .8em; }
.welcome-art { position: relative; height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 1.2rem 1rem 1.6rem 0; }
.hero-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 100%; border: clamp(5px, 1vmin, 10px) solid var(--navy); border-radius: clamp(18px, 3vmin, 36px); overflow: hidden; background: var(--yellow); box-shadow: 0 10px 0 var(--ink); transform: rotate(1deg); }
.hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-fb, .hero-fb svg { width: 100%; height: 100%; }
.welcome-globi { position: absolute; left: -1%; bottom: -1%; pointer-events: none; transform-origin: 50% 90%; animation: wiggle 2.8s ease-in-out infinite; filter: drop-shadow(0 6px 0 rgba(27, 27, 58, .18)); }
@media (max-aspect-ratio: 1/1), (max-width: 760px) {
  .welcome { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); align-items: start; gap: var(--gap); }
  .welcome-copy { align-items: center; text-align: center; padding-left: 0; }
  .title { align-items: center; }
  .welcome-art { padding: .6rem .5rem 1rem; align-items: center; }
  .hero-frame { width: min(100%, 560px); max-height: 100%; }
  .welcome-globi { left: 2%; bottom: 0; }
  .globi-big { --sz: clamp(90px, 22vw, 200px); }
}
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .logo-lockup { display: none; } .title { font-size: clamp(2.6rem, 17vmin, 5rem); } .hello { display: none; }
  .welcome-art { padding: .4rem .6rem .8rem 0; } .btn-xl { min-height: 56px; font-size: 1.35rem; }
}

/* =================== HOME =================== */
.home { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--gap); }
.home-head { flex: none; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.home-globi .globi-sm { animation: wiggle 3s ease-in-out infinite; transform-origin: 50% 90%; }
.home-hello h1 { font-size: clamp(1.6rem, 4vmin + .2rem, 3rem); }
.home-hello p { font: 700 clamp(1rem, 2vmin + .3rem, 1.5rem) var(--font-display); color: var(--ink-soft); }
.live-banner { margin-left: auto; display: inline-flex; align-items: center; gap: .6rem; padding: .5rem 1rem; background: var(--green); color: var(--ink); font: 700 1rem var(--font-display); border: 3px solid var(--ink); border-radius: 99px; box-shadow: 0 4px 0 var(--ink); text-decoration: none; min-height: 44px; }
.dot-live { width: .8rem; height: .8rem; border-radius: 50%; background: var(--red); border: 2px solid var(--ink); animation: pulse 1.2s infinite; }
.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.3); overflow-y: auto; padding: .5rem .5rem 1.2rem; margin: -.5rem; }
.mode-card { --bg: var(--blue); --fg: #fff; align-self: center; height: 100%; max-height: 33rem; position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; min-height: 0; padding: clamp(.7rem, 2vmin, 1.4rem); background: var(--bg); color: var(--fg); border: var(--bw) solid var(--ink); border-radius: var(--r-xl); box-shadow: var(--sh-lg); text-decoration: none; text-align: center; overflow: hidden; transition: transform .2s var(--ease-bounce), box-shadow .2s; animation: pop-in .5s var(--ease-bounce) both; animation-delay: var(--d, 0ms); }
.mode-card::before { content: ''; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .22); top: 6%; left: 50%; transform: translateX(-50%); }
.mode-card::after { content: ''; position: absolute; width: 26%; aspect-ratio: 1; border-radius: 50%; background: rgba(27, 27, 58, .1); bottom: -8%; right: -6%; }
.m-blue { --bg: var(--blue); --fg: #fff; } .m-yellow { --bg: var(--yellow); --fg: var(--ink); } .m-green { --bg: var(--green); --fg: var(--ink); } .m-pink { --bg: var(--pink); --fg: var(--ink); }
@media (hover: hover) { .mode-card:hover { transform: translateY(-8px) rotate(-1deg); box-shadow: 0 14px 0 var(--ink); } .mode-card:hover .mode-art > * { animation: bob 1s ease-in-out infinite; } }
.mode-card:active { transform: translateY(4px); box-shadow: 0 3px 0 var(--ink); }
.mode-tag { position: relative; z-index: 1; align-self: flex-start; font: 700 .8rem var(--font-display); background: #fff; color: var(--ink); border: 2.5px solid var(--ink); padding: .15em .7em; border-radius: 99px; }
.mode-art { position: relative; z-index: 1; flex: 1 1 0; min-height: 3rem; width: 100%; }
.mode-art > * { position: absolute; inset: 4%; width: 92%; height: 92%; object-fit: contain; }
.mode-art .emoji-badge { inset: 0; margin: auto; width: min(80%, 11rem); height: auto; aspect-ratio: 1; max-height: 92%; font-size: clamp(2.6rem, 9vmin, 5.5rem); }
.mode-title { position: relative; z-index: 1; font: 700 clamp(1.15rem, 2.4vmin + .3rem, 1.8rem)/1.1 var(--font-display); }
.mode-text { position: relative; z-index: 1; font: 700 clamp(.85rem, 1.5vmin + .3rem, 1.05rem)/1.25 var(--font-body); max-width: 24ch; }
.mode-go { position: absolute; z-index: 2; right: .8rem; top: .7rem; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; background: var(--ink); color: #fff; border-radius: 50%; font: 700 1.2rem var(--font-display); }
@media (max-aspect-ratio: 1/1), (max-width: 900px) {
  .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .home-head { display: none; } .mode-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: .8rem; } .mode-text { display: none; } .mode-go { display: none; } .mode-tag { font-size: .7rem; }
}

/* =================== JORNADA =================== */
.jornada { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.trail-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.trail-box { position: relative; flex: none; }
.trail-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.road-dash { animation: dash-move 3s linear infinite; }
.stop { position: absolute; transform: translate(-50%, -50%); background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; z-index: 2; overflow: visible; }
.stop-pin { position: relative; display: grid; place-items: center; width: max(52px, calc(124 * var(--u))); height: max(52px, calc(124 * var(--u))); background: var(--c); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 0 calc(8 * var(--u)) 0 var(--ink); transition: transform .2s var(--ease-bounce); }
.stop-pin .theme-icon { width: 74%; height: 74%; --sz: 100%; }
.stop-pin .emoji-badge { border: 0; background: transparent; font-size: max(22px, calc(60 * var(--u))); }
@media (hover: hover) { .stop:not(.locked):hover .stop-pin { transform: scale(1.1) rotate(-4deg); } }
.stop:active .stop-pin { transform: scale(.95); }
.stop-num { position: absolute; top: -6%; left: -6%; width: max(22px, calc(40 * var(--u))); height: max(22px, calc(40 * var(--u))); display: grid; place-items: center; background: #fff; border: 3px solid var(--ink); border-radius: 50%; font: 700 max(.75rem, calc(24 * var(--u))) var(--font-display); }
.stop-lock { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(27, 27, 58, .45); border-radius: 50%; font-size: max(18px, calc(48 * var(--u))); }
.stop.locked .stop-pin { filter: grayscale(.85) brightness(1.1); }
.stop.locked .stop-label { color: var(--ink-soft); filter: grayscale(1); }
.stop.label-top .stop-label { top: auto; bottom: calc(100% + 8px + 8 * var(--u)); }
.stop.current .stop-pin::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 4px solid var(--orange); animation: ring 1.8s ease-out infinite; }
.stop-label { position: absolute; top: calc(100% + 8px + 8 * var(--u)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .2em .8em .25em; background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 0 3px 0 var(--ink); white-space: nowrap; font-size: max(.72rem, calc(26 * var(--u))); }
.stop-name { font: 700 1em/1.1 var(--font-display); }
.stop-stars { display: inline-flex; align-items: center; gap: .25em; font: 800 .8em/1 var(--font-body); color: var(--ink-soft); }
.stop-stars .star { width: 1.2em; height: 1.2em; }
.stop-globi { position: absolute; right: calc(100% - 6px); top: 50%; margin-top: calc(-0.5 * max(44px, 92 * var(--u))); pointer-events: none; }
.stop-globi { width: max(44px, calc(92 * var(--u))); height: max(44px, calc(92 * var(--u))); }
.stop-globi .globi { max-width: none; animation: bounce 1.4s ease-in-out infinite; }
.stop-globi .globi { --sz: max(44px, calc(92 * var(--u))); }
.stop-modal { display: flex; flex-direction: column; gap: 1rem; }
.stop-modal-head { display: flex; gap: .9rem; align-items: center; }
.stop-modal-head h2 { font-size: 1.5rem; color: var(--ink); } .stop-modal-head p { color: var(--ink-soft); font-weight: 700; font-size: .95rem; }
.stop-modal-head .theme-icon { background: var(--c); border-radius: 50%; border: 3px solid var(--ink); padding: .2rem; }
.level-list { display: flex; flex-direction: column; gap: .6rem; }
.level-row { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .6rem .9rem; min-height: 56px; background: #fff; border: 3px solid var(--ink); border-radius: var(--r-lg); box-shadow: 0 4px 0 var(--ink); cursor: pointer; text-align: left; position: relative; transition: transform .12s var(--ease-bounce); }
@media (hover: hover) { .level-row:not(:disabled):hover { transform: translateY(-2px) scale(1.01); background: var(--cream-2); } }
.level-row:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.level-row:disabled { opacity: .6; cursor: not-allowed; background: #eee; }
.level-num { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; background: var(--c, var(--yellow)); border: 3px solid var(--ink); border-radius: 50%; font: 700 1.2rem var(--font-display); color: var(--ink); }
.stop-modal .level-num { background: var(--c); }
.level-info { display: flex; flex-direction: column; } .level-info b { font: 700 1.15rem var(--font-display); } .level-info small { color: var(--ink-soft); font-weight: 700; font-size: .85rem; }
.level-stars { display: flex; gap: 2px; } .level-stars .star { width: 1.5rem; height: 1.5rem; }
.level-lock { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); }
.level-row.locked .level-stars { display: none; }

/* =================== QUIZ (solo e jogador) =================== */
.quiz, .p-q { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: clamp(6px, 1.4vmin, 14px); width: 100%; max-width: 1320px; margin: 0 auto; }
.quiz-top { display: flex; align-items: center; gap: .7rem; flex: none; min-width: 0; flex-wrap: nowrap; }
.qprog { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.qcount { font: 700 .95rem var(--font-display); }
.qdots { display: flex; gap: 4px; } .qdots i { flex: 1; height: 8px; border-radius: 99px; background: rgba(27, 27, 58, .16); } .qdots i.done { background: var(--green); } .qdots i.now { background: var(--orange); }
.score-pill.bump { animation: bump .4s; }
.timer { display: flex; align-items: center; gap: .7rem; flex: none; }
.timer-track { flex: 1; height: 20px; background: #fff; border: 3px solid var(--ink); border-radius: 99px; overflow: hidden; }
.timer-track i { display: block; width: 100%; height: 100%; background: var(--green); transform-origin: left center; border-radius: 99px; transition: background .3s; }
.timer.low .timer-track i { background: var(--red); }
.timer-num { width: 2.7rem; height: 2.7rem; flex: none; display: grid; place-items: center; background: #fff; border: 3px solid var(--ink); border-radius: 50%; font: 700 1.25rem var(--font-display); box-shadow: 0 3px 0 var(--ink); }
.timer.low .timer-num { background: var(--red); color: #fff; animation: pulse .5s infinite; }
.quit { flex: none; }
.quiz-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: clamp(8px, 1.6vmin, 16px); }
.q-card { flex: 1 1 0; min-height: 0; position: relative; display: flex; flex-direction: column; justify-content: center; gap: .6rem; padding: clamp(.7rem, 2vmin, 1.4rem) clamp(.9rem, 2.4vmin, 1.8rem); background: #fff; border: var(--bw) solid var(--ink); border-radius: var(--r-xl); box-shadow: var(--sh-lg); overflow: auto; }
.q-theme { align-self: flex-start; display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .8rem .2rem .3rem; background: var(--c, var(--yellow)); border: 2.5px solid var(--ink); border-radius: 99px; font: 700 .85rem var(--font-display); color: var(--ink); flex: none; max-width: 100%; }
.q-theme .theme-icon { background: #fff; border-radius: 50%; padding: 2px; --sz: 1.5rem; }
.q-theme .emoji-badge { border: 0; }
.q-lv { padding-left: .5rem; border-left: 2px solid rgba(27, 27, 58, .4); }
.q-prompt { font: 600 clamp(1.15rem, 3.4vmin + .3rem, 2.8rem)/1.22 var(--font-display); text-align: center; margin: auto; padding: 0 clamp(0rem, 7vmin, 5rem); text-wrap: balance; }
.q-globi { position: absolute; right: .6rem; bottom: .3rem; pointer-events: none; }
.p-prompt .q-prompt { padding: 0; }
.options { flex: none; height: clamp(140px, 40dvh, 420px); display: grid; gap: clamp(8px, 1.6vmin, 16px); }
.options.mc { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; } .options.tf { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.opt { --bg: var(--red); --fg: #fff; position: relative; display: flex; align-items: center; gap: clamp(.5rem, 1.6vmin, 1rem); min-height: 52px; min-width: 0; padding: .5rem clamp(.7rem, 2vmin, 1.3rem); background: var(--bg); color: var(--fg); border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh); font: 700 clamp(1.05rem, 2.4vmin + .7rem, 1.9rem)/1.15 var(--font-display); text-align: left; cursor: pointer; transition: transform .12s var(--ease-bounce), box-shadow .12s, opacity .25s, filter .25s; overflow: hidden; }
.opt-0 { --bg: var(--opt-0); --fg: var(--opt-0-ink); } .opt-1 { --bg: var(--opt-1); --fg: var(--opt-1-ink); } .opt-2 { --bg: var(--opt-2); --fg: var(--opt-2-ink); } .opt-3 { --bg: var(--opt-3); --fg: var(--opt-3-ink); }
.opt-shape { flex: none; display: grid; place-items: center; font-size: clamp(1.6rem, 4.4vmin, 3rem); width: 1.1em; height: 1.1em; }
.opt-shape .shape { width: 100%; height: 100%; filter: drop-shadow(0 2px 0 rgba(27, 27, 58, .35)); }
.opt-text { flex: 1; min-width: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.opt-key { position: absolute; top: .3rem; right: .5rem; font: 800 .75rem var(--font-body); opacity: .65; }
.opt-mark { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%) scale(0); width: 2.2em; height: 2.2em; display: grid; place-items: center; background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 50%; font: 700 1.2em var(--font-display); }
.opt:not(:disabled):active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
@media (hover: hover) { .opt:not(:disabled):hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--ink); } }
.opt:disabled { cursor: default; }
.opt.is-right { transform: scale(1.02); box-shadow: 0 0 0 5px #fff, 0 0 0 8px var(--ink); z-index: 1; }
.opt.is-right .opt-mark { transform: translateY(-50%) scale(1); background: #B8F0CD; transition: transform .35s var(--ease-bounce); }
.opt.is-wrong { animation: shake .45s; filter: saturate(.7); }
.opt.is-wrong .opt-mark { transform: translateY(-50%) scale(1); background: #FFD0CC; transition: transform .35s var(--ease-bounce); }
.opt.is-dim { opacity: .42; filter: grayscale(.5); box-shadow: 0 2px 0 var(--ink); }
.opt.picked { transform: scale(.97); box-shadow: 0 2px 0 var(--ink); outline: 4px solid var(--ink); outline-offset: 2px; }
.feedback { flex: none; display: flex; align-items: center; gap: 1rem; padding: .7rem 1rem; background: #fff; border: var(--bw) solid var(--ink); border-radius: var(--r-xl); box-shadow: var(--sh); max-height: 36dvh; animation: pop-in .35s var(--ease-bounce) both; }
.feedback.right { background: #D5F5E1; } .feedback.wrong { background: #FFE1DF; } .feedback.time { background: #FFF0BF; }
.fb-globi { flex: none; } .fb-globi .globi { --sz: clamp(52px, 10vmin, 96px); }
.fb-text { flex: 1; min-width: 0; max-height: calc(36dvh - 1.6rem); overflow-y: auto; }
.quiz.has-fb .q-globi { display: none; }
.fb-title { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; font: 700 clamp(1.2rem, 2.4vmin + .3rem, 1.8rem) var(--font-display); }
.fb-pts { background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 99px; padding: .05em .6em; font-size: .85em; animation: bump .5s; }
.fb-explain { font: 700 clamp(.9rem, 1.5vmin + .3rem, 1.15rem)/1.35 var(--font-body); color: var(--ink); }
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .options { height: clamp(100px, 38dvh, 150px); } .q-globi, .fb-globi { display: none; } .q-card { padding: .4rem .9rem; } .q-theme { display: none; }
  .q-prompt { font-size: clamp(1rem, 4vmin, 1.3rem); } .opt { font-size: clamp(.85rem, 3.4vmin, 1.1rem); padding: .3rem .8rem; } .opt-key { display: none; }
  .timer-num { width: 2.1rem; height: 2.1rem; font-size: 1rem; } .timer-track { height: 14px; }
  .quiz.has-fb .options.mc { grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr; height: 54px; } .quiz.has-fb .opt-text { -webkit-line-clamp: 1; font-size: .75rem; } .quiz.has-fb .opt-shape { display: none; }
  .feedback { padding: .4rem .8rem; max-height: 40dvh; } .feedback .btn-lg { min-height: 48px; font-size: 1.05rem; } .fb-text { max-height: 34dvh; }
}

/* =================== RESULTADO =================== */
.result { flex: 1; min-height: 0; display: grid; place-items: center; place-items: safe center; overflow: auto; padding: .4rem; }
.result-card { width: min(94vw, 680px); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: clamp(.4rem, 1.4vmin, 1rem); text-align: center; overflow: auto; }
.result-card h1 { font-size: clamp(1.7rem, 4vmin + .3rem, 3rem); }
.res-sub { color: var(--ink-soft); font-weight: 700; font-size: clamp(.95rem, 1.6vmin + .3rem, 1.2rem); }
.result-globi .globi { --sz: clamp(90px, 20vmin, 190px); animation: bounce 1.6s ease-in-out infinite; }
.big-stars { display: flex; gap: .5rem; align-items: flex-end; }
.big-star { display: block; width: clamp(54px, 12vmin, 104px); transform: scale(.4) rotate(-20deg); opacity: .0; animation: star-in .6s var(--ease-bounce) forwards; animation-delay: calc(.3s + var(--i) * .35s); }
.big-star:nth-child(2) { margin-bottom: .8rem; }
.big-star .star { width: 100%; height: 100%; stroke-width: 1.4; }
.big-star:not(.earned) { animation-name: star-in-off; }
.big-star.earned .star { filter: drop-shadow(0 4px 0 rgba(27, 27, 58, .35)); }
@keyframes star-in { to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes star-in-off { to { transform: scale(.85); opacity: .9; } }
.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: 5rem; }
.res-num { font: 700 clamp(1.7rem, 4vmin + .2rem, 2.7rem)/1 var(--font-display); } .res-num.xp { color: #E2610A; } .res-num.ok { color: var(--green); } .res-num.bad { color: var(--red); }
.res-num .ico { display: inline-block; vertical-align: -.1em; margin-left: .15em; } .res-num .star { width: .9em; height: .9em; }
.res-stats small { font: 800 .85rem var(--font-body); color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.levelup { font: 700 1.1rem var(--font-display); background: var(--yellow); border: 3px solid var(--ink); border-radius: 99px; padding: .25em 1em; animation: pop-in .5s var(--ease-bounce) .8s both; }
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .result-card { display: grid; grid-template-columns: auto 1fr; text-align: left; column-gap: 1.2rem; align-items: center; padding: .6rem 1rem; }
  .result-card > * { grid-column: 2; } .result-card > .result-globi { grid-column: 1; grid-row: 1 / span 6; }
  .result-globi .globi { --sz: clamp(70px, 26vmin, 110px); } .result-card h1 { font-size: 1.4rem; } .res-sub { display: none; } .big-star { width: 40px; } .big-stars { justify-content: flex-start; } .res-stats { justify-content: flex-start; } .res-num { font-size: 1.4rem; }
  .row-actions .btn-lg { min-height: 46px; font-size: 1rem; padding: .3em .9em; }
}

/* =================== CARDS DE ESTUDO =================== */
.cards-screen, .study, .atlas, .perfil, .sala-setup { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cards-screen .deck-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 270px)); justify-content: center; grid-auto-rows: minmax(210px, 360px); gap: calc(var(--gap) * 1.3); padding: .6rem .6rem 1.4rem; margin: -.6rem; align-content: start; }
@media (min-height: 700px) { .cards-screen .deck-grid { align-content: center; } }
.deck-card { --c: var(--blue); --tx: #fff; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .25rem; padding: 1rem .8rem .9rem; background: var(--c); color: var(--tx); border: var(--bw) solid var(--ink); border-radius: var(--r-xl); box-shadow: var(--sh-lg); cursor: pointer; text-align: center; transition: transform .2s var(--ease-bounce); animation: pop-in .45s var(--ease-bounce) both; animation-delay: var(--d, 0ms); overflow: hidden; min-height: 0; }
@media (hover: hover) { .deck-card:hover { transform: translateY(-6px) rotate(-1.2deg); } }
.deck-card:active { transform: translateY(3px); }
.deck-stack { position: relative; flex: 1; min-height: 3.4rem; width: 70%; display: grid; place-items: center; margin-bottom: .4rem; }
.deck-stack i { position: absolute; inset: 14% 12%; background: #fff; border: 3px solid var(--ink); border-radius: 14px; transform: rotate(-9deg); opacity: .85; } .deck-stack i + i { transform: rotate(7deg); opacity: .95; }
.deck-stack .theme-icon { position: relative; z-index: 2; --sz: min(100%, 4.4rem); max-height: 100%; width: var(--sz); height: var(--sz); background: #fff; border-radius: 16px; border: 3px solid var(--ink); padding: 5px; }
.deck-stack .emoji-badge { background: #fff; border-radius: 16px; }
.deck-name { font: 700 1.25rem/1.1 var(--font-display); } .deck-count { font-weight: 800; font-size: .9rem; opacity: .9; }
.deck-bar { width: 80%; height: 10px; background: rgba(255, 255, 255, .6); border: 2px solid var(--ink); border-radius: 99px; overflow: hidden; margin-top: .3rem; } .deck-bar i { display: block; height: 100%; background: var(--ink); }
.deck-stats { display: flex; gap: .8rem; font: 700 .95rem var(--font-display); } .deck-stats .ok, .deck-stats .bad { background: #fff; color: var(--ink); padding: .05em .6em; border-radius: 99px; border: 2px solid var(--ink); }
.study-stage { flex: 1; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(.5rem, 2vmin, 1.5rem); }
.counter { display: flex; flex-direction: column; align-items: center; gap: .1rem; min-width: 4.4rem; padding: .6rem .5rem; background: #fff; border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh); font: 700 clamp(1.5rem, 4vmin, 2.6rem)/1 var(--font-display); }
.counter small { font: 800 .75rem var(--font-body); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.counter .cnt-ico { font-size: .8em; } .bad-c { color: var(--red); } .ok-c { color: #12823F; } .counter.bump { animation: bump .4s; }
.flip-card { width: 100%; max-width: 860px; height: 100%; max-height: 640px; margin: 0 auto; perspective: 1600px; cursor: pointer; outline: none; position: relative; -webkit-tap-highlight-color: transparent; }
.flip-card:focus-visible .face { outline: 4px solid var(--blue); outline-offset: 4px; }
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .7s var(--ease-bounce); }
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; display: flex; flex-direction: column; padding: clamp(.8rem, 2.4vmin, 1.8rem); background: #fff; border: var(--bw) solid var(--ink); border-radius: var(--r-xl); box-shadow: 0 10px 0 var(--ink); backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: auto; }
.face.back { transform: rotateY(180deg); }
.face.front::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: .9rem; background: var(--yellow); border-bottom: 3px solid var(--ink); }
.face-tag { align-self: flex-start; font: 700 .85rem var(--font-display); text-transform: uppercase; letter-spacing: .1em; padding: .2em .8em; background: var(--ink); color: #fff; border-radius: 99px; margin-top: .6rem; flex: none; }
.face.back .face-tag { background: rgba(255, 255, 255, .92); color: var(--ink); border: 2px solid var(--ink); }
.face-text { margin: auto; padding: .6rem 0; font: 600 calc(var(--fs, 1.1) * clamp(1.2rem, 3.4vmin + .2rem, 2.4rem))/1.25 var(--font-display); text-align: center; text-wrap: balance; }
.face.back .face-text { font-family: var(--font-body); font-weight: 800; }
.face-hint { text-align: center; font: 700 .85rem var(--font-body); color: var(--ink-soft); flex: none; }
.flip-card.done-ok .face { box-shadow: 0 10px 0 var(--green); } .flip-card.done-bad .face { box-shadow: 0 10px 0 var(--red); }
.study-controls { flex: none; display: flex; align-items: center; justify-content: center; gap: clamp(.5rem, 2vmin, 1.5rem); padding: .9rem 0 .2rem; }
.mark-row { display: flex; gap: clamp(.6rem, 2vmin, 1.2rem); }
.mark-btn { min-width: clamp(8rem, 18vmin, 13rem); }
.nav-btn { width: 52px; height: 52px; font-size: 1.4rem; }
.study-foot { flex: none; display: flex; align-items: center; justify-content: center; gap: 1rem; padding: .5rem 0 .3rem; font-weight: 800; color: var(--ink-soft); }
.pos { font: 700 1rem var(--font-display); color: var(--ink); background: #fff; border: 2.5px solid var(--ink); border-radius: 99px; padding: .1em .8em; }
@media (max-width: 760px) {
  .study-stage { grid-template-columns: 1fr 1fr; grid-template-rows: auto minmax(0, 1fr); align-items: stretch; }
  .study-stage .flip-card { grid-column: 1 / -1; grid-row: 2; } .bad-c { grid-row: 1; grid-column: 1; flex-direction: row; justify-content: center; gap: .5rem; } .ok-c { grid-row: 1; grid-column: 2; flex-direction: row; justify-content: center; gap: .5rem; }
  .counter { padding: .3rem; } .study-controls { flex-wrap: nowrap; gap: .4rem; } .mark-btn { min-width: 0; flex: 1; padding: .4em .5em; font-size: 1.05rem; } .mark-row { flex: 1; gap: .4rem; } .nav-btn { width: 44px; height: 44px; min-width: 44px; } .hide-sm { display: none; }
}
@media (max-height: 520px) {
  .study-foot { display: none; } .study-controls { padding: .5rem 0 0; } .nav-btn { width: 44px; height: 44px; } .mark-btn { min-height: 48px; font-size: 1.05rem; }
  .counter { min-width: 3.4rem; font-size: 1.4rem; padding: .3rem; } .face-tag { margin-top: .4rem; font-size: .7rem; }
}

/* =================== ATLAS =================== */
.tabs { display: flex; gap: .6rem; flex: none; padding: .2rem .1rem .8rem; overflow-x: auto; }
.tab { --c: var(--pink); display: inline-flex; align-items: center; gap: .5rem; min-height: 46px; padding: .35rem 1rem; background: #fff; border: 3px solid var(--ink); border-radius: 99px; font: 700 1.05rem var(--font-display); cursor: pointer; box-shadow: 0 4px 0 var(--ink); white-space: nowrap; flex: none; transition: transform .12s var(--ease-bounce); }
.tab small { background: var(--ink); color: #fff; border-radius: 99px; padding: 0 .5em; font: 800 .75rem var(--font-body); }
.tab.on { background: var(--c); transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.atlas-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: calc(var(--gap) * 1.3); }
.atlas-listpanel { display: flex; flex-direction: column; gap: .7rem; min-height: 0; padding: .8rem; box-shadow: var(--sh); }
.atlas-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .4rem; padding-right: .2rem; }
.li { display: flex; align-items: center; gap: .7rem; padding: .45rem .6rem; min-height: 52px; background: var(--cream); border: 2.5px solid transparent; border-radius: var(--r-md); cursor: pointer; text-align: left; flex: none; }
@media (hover: hover) { .li:hover { background: var(--cream-2); } }
.li.sel { background: var(--yellow); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.li-badge { width: 2.5rem; height: 2.5rem; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2.5px solid var(--ink); font: 700 .9rem var(--font-display); color: var(--ink); }
.li-text { display: flex; flex-direction: column; min-width: 0; } .li-text b { font: 700 1.02rem/1.15 var(--font-display); } .li-text small { color: var(--ink-soft); font-weight: 700; font-size: .8rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.empty { padding: 1rem; color: var(--ink-soft); text-align: center; }
.atlas-detail { min-height: 0; overflow-y: auto; padding: .2rem .4rem 1rem .2rem; }
.detail-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; color: var(--ink-soft); font: 700 1.2rem var(--font-display); text-align: center; }
.detail-card { background: #fff; border: var(--bw) solid var(--ink); border-radius: var(--r-xl); box-shadow: var(--sh-lg); padding: clamp(.9rem, 2.4vmin, 1.8rem); display: flex; flex-direction: column; gap: 1rem; animation: pop-in .35s var(--ease-bounce) both; margin-bottom: 10px; }
.detail-head { display: flex; align-items: center; gap: 1rem; } .detail-head h2 { font-size: clamp(1.5rem, 3.4vmin, 2.4rem); }
.big-badge { width: clamp(3.4rem, 9vmin, 5.4rem); height: clamp(3.4rem, 9vmin, 5.4rem); flex: none; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 50%; font: 700 clamp(1.2rem, 3vmin, 1.8rem) var(--font-display); box-shadow: 0 4px 0 var(--ink); }
.big-badge.year { border-radius: 18px; background: var(--green); }
.full { font: 700 1.1rem var(--font-display); color: var(--ink-soft); }
.badges { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .4rem; }
.badge { display: inline-block; padding: .15em .8em; border: 2.5px solid var(--ink); border-radius: 99px; font: 700 .85rem var(--font-display); }
.b-blue { background: var(--sky); } .b-red { background: #FFB8B3; } .b-green { background: #B8F0CD; } .b-orange { background: #FFD3A8; }
.meters { display: grid; gap: .7rem; padding: .9rem; background: var(--cream); border: 2.5px solid var(--ink); border-radius: var(--r-lg); }
.meter-top { display: flex; justify-content: space-between; gap: .6rem; font: 700 1rem var(--font-display); } .meter-top b { font-family: var(--font-body); font-weight: 900; }
.meter-bar { height: 16px; background: #fff; border: 2.5px solid var(--ink); border-radius: 99px; overflow: hidden; margin-top: .2rem; } .meter-bar i { display: block; height: 100%; border-radius: 99px; transform-origin: left; animation: grow-x .8s var(--ease-bounce) both; border-right: 2.5px solid var(--ink); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.fact { display: flex; flex-direction: column; padding: .5rem .8rem; background: var(--cream-2); border-radius: var(--r-md); border: 2px solid rgba(27, 27, 58, .25); } .fact small { color: var(--ink-soft); font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; } .fact b { font: 700 1.05rem var(--font-display); }
.sec h3 { font-size: 1.15rem; margin-bottom: .25rem; } .sec p { font-weight: 700; color: #2b2b4d; line-height: 1.5; font-size: clamp(.95rem, 1.4vmin + .35rem, 1.1rem); }
.note { color: var(--ink-soft); font-weight: 700; font-style: italic; }
.back-list { display: none; margin-bottom: .6rem; }
@media (max-width: 859px) {
  .atlas-body { grid-template-columns: minmax(0, 1fr); }
  .atlas-body .atlas-detail { display: none; } .atlas-body.show-detail .atlas-detail { display: block; } .atlas-body.show-detail .atlas-listpanel { display: none; }
  .back-list { display: inline-flex; }
  .tab { min-height: 44px; padding: .3rem .8rem; font-size: .95rem; }
}
@media (max-width: 480px) {
  .tab small, .tab > span[aria-hidden] { display: none; } .tab { padding: .3rem .7rem; font-size: .88rem; } .tabs { gap: .4rem; }
}

/* =================== PERFIL =================== */
.perfil-body { flex: 1; min-height: 0; display: grid; align-items: start; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: calc(var(--gap) * 1.3); }
.perfil-card, .ach-card { min-height: 0; max-height: 100%; overflow-y: auto; }
.perfil-card { display: flex; flex-direction: column; align-items: center; gap: .7rem; text-align: center; }
.perfil-avatar .avatar { --sz: clamp(80px, 16vmin, 150px); }
.perfil-card h2 { font-size: clamp(1.5rem, 3vmin, 2.2rem); } .perfil-lv { font: 700 1.2rem var(--font-display); color: #E2610A; }
.xp-big { width: 100%; } .xp-big-bar { height: 22px; background: var(--cream-2); border: 3px solid var(--ink); border-radius: 99px; overflow: hidden; } .xp-big-bar i { display: block; height: 100%; background: var(--orange); border-right: 3px solid var(--ink); transform-origin: left; animation: grow-x .9s var(--ease-bounce) both; } .xp-big small { font-weight: 800; color: var(--ink-soft); }
.res-stats.compact .res-num { font-size: 1.6rem; }
.ach-card h2 { margin-bottom: .8rem; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: .7rem; }
.ach { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; background: var(--cream); border: 2.5px dashed rgba(27, 27, 58, .35); border-radius: var(--r-lg); opacity: .75; }
.ach.got { opacity: 1; background: #FFF3C4; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }
.ach-ico { font-size: 1.9rem; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; background: #fff; border-radius: 50%; border: 2.5px solid var(--ink); flex: none; }
.ach-text { display: flex; flex-direction: column; min-width: 0; } .ach-text b { font: 700 1.05rem var(--font-display); } .ach-text small { font-weight: 700; color: var(--ink-soft); font-size: .82rem; line-height: 1.25; }
@media (max-width: 859px) { .perfil-body { grid-template-columns: 1fr; overflow-y: auto; align-content: start; } .perfil-card, .ach-card { overflow: visible; } }

/* =================== SALA AO VIVO: CRIAR =================== */
.setup-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: calc(var(--gap) * 1.5); align-items: start; overflow-y: auto; padding: .2rem .4rem 1rem; }
.setup-card { align-self: safe center; display: flex; flex-direction: column; gap: 1.2rem; }
.setup-block h2 { font-size: 1.35rem; margin-bottom: .6rem; }
.theme-chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.theme-chip { --c: var(--blue); position: relative; display: inline-flex; align-items: center; gap: .5rem; min-height: 50px; padding: .3rem 1rem .3rem .4rem; background: #fff; border: 3px solid var(--ink); border-radius: 99px; font: 700 1.05rem var(--font-display); cursor: pointer; box-shadow: 0 4px 0 var(--ink); transition: transform .12s var(--ease-bounce), background .15s; }
.theme-chip .theme-icon { background: var(--c); border-radius: 50%; border: 2.5px solid var(--ink); padding: 2px; --sz: 2rem; } .theme-chip .emoji-badge { border: 0; }
.theme-chip .chk { width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border-radius: 50%; border: 2.5px solid var(--ink); font-style: normal; font-size: .9rem; color: transparent; background: #fff; }
.theme-chip.on { background: #FFF0B8; transform: translateY(-2px); } .theme-chip.on .chk { background: var(--green); color: var(--ink); }
.segs { display: flex; gap: .6rem; flex-wrap: wrap; }
.seg { min-width: 4.2rem; min-height: 52px; padding: .3rem 1rem; background: #fff; border: 3px solid var(--ink); border-radius: var(--r-md); font: 700 1.4rem var(--font-display); cursor: pointer; box-shadow: 0 4px 0 var(--ink); transition: transform .12s var(--ease-bounce); }
.seg.on { background: var(--orange); transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.setup-foot { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.setup-side { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.bubble { position: relative; background: #fff; border: 3px solid var(--ink); border-radius: var(--r-lg); padding: .9rem 1.1rem; font: 700 1.1rem/1.35 var(--font-display); text-align: center; box-shadow: var(--sh); }
@media (max-width: 859px), (max-aspect-ratio: 1/1) { .setup-body { grid-template-columns: 1fr; } .setup-side { display: none; } }
@media (max-height: 520px) { .setup-side { display: none; } .setup-body { grid-template-columns: 1fr; } }

/* =================== SALA AO VIVO: HOST (projetor) =================== */
.host-lobby { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr); gap: calc(var(--gap) * 1.5); padding-top: .4rem; }
.lobby-left { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(.3rem, 1.2vmin, .9rem); text-align: center; min-height: 0; overflow: auto; }
.join-line { font: 700 clamp(1rem, 2.2vmin + .3rem, 1.8rem) var(--font-display); } .join-line b { color: var(--navy); word-break: break-all; }
.pin-label { font: 800 clamp(.8rem, 1.6vmin + .2rem, 1.2rem) var(--font-body); text-transform: uppercase; letter-spacing: .14em; color: var(--ink-soft); margin-top: .2rem; }
.pin { display: flex; gap: clamp(.2rem, .8vmin, .6rem); justify-content: center; font: 700 clamp(2.2rem, min(8.4vmin, 5vw), 6.4rem)/1 var(--font-display); }
.pin span { background: var(--yellow); border: 3px solid var(--ink); border-radius: .22em; padding: .08em .2em; min-width: 1.1em; box-shadow: 0 .06em 0 var(--ink); animation: pop-in .5s var(--ease-bounce) both; }
.pin span:nth-child(2) { animation-delay: .06s; } .pin span:nth-child(3) { animation-delay: .12s; } .pin span:nth-child(4) { animation-delay: .18s; } .pin span:nth-child(5) { animation-delay: .24s; } .pin span:nth-child(6) { animation-delay: .3s; }
.qr-box { width: clamp(110px, min(34vmin, 100%), 380px); aspect-ratio: 1; background: #fff; border: 3px solid var(--ink); border-radius: var(--r-lg); padding: .4rem; box-shadow: 0 5px 0 var(--ink); display: grid; place-items: center; flex: none; }
.qr { width: 100%; height: 100%; image-rendering: pixelated; } .qr-box.noqr { font-weight: 800; text-align: center; font-size: .9rem; }
.qr-hint { font-weight: 800; color: var(--ink-soft); font-size: clamp(.8rem, 1.4vmin + .2rem, 1.05rem); }
.lobby-right { display: flex; flex-direction: column; gap: .8rem; min-height: 0; }
.lobby-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex: none; } .lobby-top h2 { font-size: clamp(1.4rem, 3vmin, 2.2rem); display: flex; align-items: center; gap: .6rem; }
.players-panel { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 1rem; background: rgba(255, 255, 255, .6); border: 3px dashed rgba(27, 27, 58, .45); border-radius: var(--r-xl); }
.players-grid { display: flex; flex-wrap: wrap; gap: .6rem; align-content: flex-start; }
.players-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; color: var(--ink-soft); font: 700 1.2rem var(--font-display); text-align: center; pointer-events: none; }
.p-chip { position: relative; display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .9rem .25rem .3rem; background: #fff; border: 3px solid var(--ink); border-radius: 99px; box-shadow: 0 4px 0 var(--ink); font: 700 clamp(1rem, 2vmin + .2rem, 1.5rem) var(--font-display); max-width: 100%; }
.p-chip.away { opacity: .5; } .p-av { --sz: clamp(2.2rem, 5vmin, 3.2rem); } .p-nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12ch; }
.p-kick { width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: #fff; font-size: .7rem; cursor: pointer; opacity: 0; transition: opacity .15s; padding: 0; margin-left: .1rem; }
.p-chip:hover .p-kick, .p-kick:focus-visible { opacity: 1; }
.lobby-foot { flex: none; display: flex; justify-content: flex-end; align-items: center; gap: 1rem; padding-bottom: .5rem; }
@media (max-width: 859px), (max-aspect-ratio: 1/1) {
  .host-lobby { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); overflow-y: auto; }
  .lobby-left { overflow: visible; flex-direction: column; } .lobby-right { min-height: 14rem; }
  .qr-box { width: clamp(100px, 24vmin, 200px); }
}
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .host-lobby { grid-template-columns: .9fr 1.2fr; } .pin { font-size: clamp(1.6rem, 9vmin, 3rem); } .qr-box { width: clamp(70px, 26vmin, 110px); } .qr-hint, .pin-label { display: none; } .join-line { font-size: .85rem; }
  .btn-xl { min-height: 52px; font-size: 1.2rem; }
}

.host-q, .host-reveal, .host-board, .host-end { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: clamp(8px, 1.6vmin, 18px); width: 100%; max-width: 1500px; margin: 0 auto; }
.host-prompt { flex: 1 1 0; min-height: 0; display: grid; place-items: center; text-align: center; overflow: auto; }
.host-prompt h2 { font-size: clamp(1.4rem, min(5vmin, 3.2vw), 3.6rem); line-height: 1.2; text-wrap: balance; }
.host-prompt.small { flex: none; max-height: 34%; padding: .8rem 1.2rem; } .host-prompt.small h2 { font-size: clamp(1.1rem, min(3.2vmin, 2.2vw), 2.1rem); }
.h-options { flex: none; height: clamp(150px, 42dvh, 480px); display: grid; gap: clamp(8px, 1.6vmin, 18px); }
.h-options.mc { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; } .h-options.tf { grid-template-columns: 1fr 1fr; }
.h-opt { --bg: var(--red); --fg: #fff; display: flex; align-items: center; gap: clamp(.6rem, 2vmin, 1.4rem); padding: .6rem clamp(.8rem, 2.4vmin, 1.8rem); background: var(--bg); color: var(--fg); border: var(--bw) solid var(--ink); border-radius: var(--r-xl); box-shadow: var(--sh-lg); font: 700 clamp(1.1rem, min(3.4vmin, 2.4vw), 2.6rem)/1.15 var(--font-display); min-width: 0; overflow: hidden; }
.h-opt.opt-0 { --bg: var(--opt-0); --fg: var(--opt-0-ink); } .h-opt.opt-1 { --bg: var(--opt-1); --fg: var(--opt-1-ink); } .h-opt.opt-2 { --bg: var(--opt-2); --fg: var(--opt-2-ink); } .h-opt.opt-3 { --bg: var(--opt-3); --fg: var(--opt-3-ink); }
.h-opt .opt-shape { font-size: clamp(2rem, 7vmin, 4.4rem); }
.reveal-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(10px, 2vmin, 24px); }
.reveal-left { display: flex; flex-direction: column; gap: clamp(8px, 1.6vmin, 16px); min-height: 0; overflow-y: auto; padding: 2px 4px 12px 2px; }
.answer-card { --bg: var(--green); --fg: var(--ink); flex: none; display: flex; align-items: center; gap: 1rem; padding: .8rem 1.2rem; background: var(--bg); color: var(--fg); border: var(--bw) solid var(--ink); border-radius: var(--r-xl); box-shadow: var(--sh); font: 700 clamp(1.2rem, 3vmin, 2.2rem)/1.15 var(--font-display); }
.answer-card.opt-0 { --bg: var(--opt-0); --fg: var(--opt-0-ink); } .answer-card.opt-1 { --bg: var(--opt-1); --fg: var(--opt-1-ink); } .answer-card.opt-2 { --bg: var(--opt-2); --fg: var(--opt-2-ink); } .answer-card.opt-3 { --bg: var(--opt-3); --fg: var(--opt-3-ink); }
.answer-card small { display: block; font: 800 .8rem var(--font-body); text-transform: uppercase; letter-spacing: .1em; opacity: .85; } .answer-card .opt-shape { font-size: clamp(2rem, 6vmin, 3.6rem); }
.explain { flex: none; display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 1.1rem; background: #FFF3C4; box-shadow: var(--sh); } .explain p { font: 700 clamp(1rem, 2vmin + .3rem, 1.5rem)/1.35 var(--font-body); } .explain-ico { font-size: 1.6rem; }
.chart { min-height: 0; display: flex; padding: clamp(.8rem, 2vmin, 1.6rem); }
.bars { flex: 1; display: flex; gap: clamp(.5rem, 2vmin, 1.4rem); align-items: stretch; min-height: 0; }
.bar-col { --h: 0%; flex: 1; min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: .4rem; justify-items: center; }
.bar-n { font: 700 clamp(1.4rem, 4vmin, 3rem) var(--font-display); }
.bar-track { position: relative; width: 100%; height: 100%; }
.bar-fill { position: absolute; left: 0; right: 0; bottom: 0; height: max(var(--h), 16%); background: var(--bg); color: var(--fg); border: var(--bw) solid var(--ink); border-radius: var(--r-md) var(--r-md) 6px 6px; display: grid; place-items: start center; padding-top: .4rem; transform-origin: bottom; animation: grow-y .8s var(--ease-bounce) both; animation-delay: calc(var(--i) * .1s); font-size: clamp(1.4rem, 4vmin, 2.6rem); }
.bar-col.opt-0 { --bg: var(--opt-0); --fg: var(--opt-0-ink); } .bar-col.opt-1 { --bg: var(--opt-1); --fg: var(--opt-1-ink); } .bar-col.opt-2 { --bg: var(--opt-2); --fg: var(--opt-2-ink); } .bar-col.opt-3 { --bg: var(--opt-3); --fg: var(--opt-3-ink); }
.bar-col:not(.right) .bar-fill { opacity: .55; }
.bar-col.right .bar-fill { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--ink); }
.bar-ok { position: absolute; bottom: -.9rem; left: 50%; transform: translateX(-50%); width: 2rem; height: 2rem; display: grid; place-items: center; background: #B8F0CD; color: var(--ink); border: 3px solid var(--ink); border-radius: 50%; font: 700 1.1rem var(--font-display); }
.bar-lbl { font: 700 clamp(.75rem, 1.4vmin + .2rem, 1rem)/1.15 var(--font-body); text-align: center; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; padding-top: .8rem; max-width: 100%; overflow-wrap: anywhere; }
.host-foot { flex: none; display: flex; justify-content: center; gap: 1rem; padding: .2rem 0 .6rem; flex-wrap: wrap; }
.reveal-body + .host-foot { justify-content: flex-end; }
@media (max-width: 859px), (max-aspect-ratio: 1/1) { .reveal-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); overflow-y: auto; } .reveal-left { overflow: visible; } .chart { min-height: 260px; } }
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .h-options { height: clamp(100px, 40dvh, 150px); } .h-opt { font-size: clamp(.85rem, 3.4vmin, 1.2rem); padding: .3rem .8rem; } .h-opt .opt-shape { font-size: 1.6rem; }
  .host-prompt h2 { font-size: clamp(1rem, 4.4vmin, 1.5rem); } .reveal-body { grid-template-columns: 1fr 1fr; overflow: visible; } .chart { min-height: 0; }
  .answer-card { padding: .4rem .8rem; font-size: 1rem; } .explain { padding: .4rem .8rem; } .explain p { font-size: .85rem; }
}

/* ranking */
.host-board { justify-content: center; align-items: center; }
.board-card, .p-board .board-card { width: min(100%, 900px); display: flex; flex-direction: column; gap: .8rem; max-height: 100%; overflow: auto; }
.board-title { font-size: clamp(1.8rem, 5vmin, 3.4rem); display: flex; align-items: center; gap: .6rem; justify-content: center; } .board-title .star { width: 1em; height: 1em; }
.board-sub { text-align: center; color: var(--ink-soft); font-weight: 800; margin-top: -.5rem; }
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: clamp(.4rem, 1.2vmin, .8rem); }
.rank-row { display: grid; grid-template-columns: 2.4rem auto minmax(0, 1fr) auto auto; align-items: center; gap: .7rem; padding: .4rem .8rem .4rem .5rem; background: var(--cream); border: 3px solid var(--ink); border-radius: var(--r-lg); box-shadow: 0 4px 0 var(--ink); animation: slide-in-l .5s var(--ease-bounce) both; animation-delay: calc(var(--i) * .12s); font: 700 clamp(1rem, 2.4vmin + .2rem, 1.8rem) var(--font-display); }
.rank-row.you { background: #FFF0B8; outline: 4px solid var(--blue); outline-offset: 2px; }
.rank-row:nth-child(1) .rank-pos { background: var(--yellow); } .rank-row:nth-child(2) .rank-pos { background: var(--sky); } .rank-row:nth-child(3) .rank-pos { background: #FFB677; }
.rank-pos { width: 2.2em; height: 2.2em; display: grid; place-items: center; background: #fff; border: 3px solid var(--ink); border-radius: 50%; font-size: .75em; }
.rank-av { --sz: clamp(2.2rem, 5vmin, 3.4rem); }
.rank-main { display: flex; flex-direction: column; min-width: 0; gap: 3px; } .rank-nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { display: block; height: .45em; background: #fff; border: 2px solid var(--ink); border-radius: 99px; overflow: hidden; } .rank-bar i { display: block; height: 100%; width: var(--w); background: var(--blue); transform-origin: left; animation: grow-x .9s var(--ease-bounce) both; animation-delay: calc(var(--i, 0) * .12s + .2s); }
.rank-plus { font-size: .8em; color: #12823F; font-weight: 700; } .rank-score { font-size: 1em; min-width: 3.6ch; text-align: right; }

/* podio */
.host-end, .p-end { align-items: center; }
.p-end { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: clamp(6px, 1.4vmin, 14px); width: 100%; max-width: 900px; margin: 0 auto; }
.end-title { font-size: clamp(1.8rem, 6vmin, 4rem); text-align: center; color: var(--navy); text-shadow: 0 .05em 0 rgba(27, 27, 58, .25); flex: none; }
.end-body { flex: 1; min-height: 0; width: 100%; display: flex; gap: var(--gap); align-items: stretch; justify-content: center; }
.podium { flex: 1 1 auto; max-width: 860px; min-height: 0; display: flex; align-items: flex-end; justify-content: center; gap: clamp(.4rem, 2vmin, 1.4rem); }
.pod { flex: 1 1 0; max-width: 270px; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; animation: rise .8s var(--ease-bounce) both; animation-delay: var(--delay, 0s); }
.pod-empty { visibility: hidden; }
.pod-who { display: flex; flex-direction: column; align-items: center; gap: .1rem; text-align: center; min-width: 0; max-width: 100%; }
.pod-av { --sz: clamp(3rem, 12vmin, 7.5rem); } .pod-1 .pod-av { --sz: clamp(3.6rem, 15vmin, 9.5rem); }
.crown { font-size: clamp(1.6rem, 5vmin, 3.2rem); line-height: 1; margin-bottom: -.5rem; animation: bounce 1.2s ease-in-out infinite; position: relative; z-index: 2; }
.pod-nick { font: 700 clamp(1rem, 2.6vmin + .2rem, 2rem) var(--font-display); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-score { font: 800 clamp(.85rem, 1.8vmin + .2rem, 1.4rem) var(--font-body); color: var(--ink-soft); }
.pod-block { width: 100%; display: grid; place-items: start center; padding-top: .4rem; border: var(--bw) solid var(--ink); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: 0 -2px 0 rgba(27, 27, 58, .1); font: 700 clamp(2rem, 7vmin, 4.6rem)/1 var(--font-display); color: var(--ink); margin-top: .4rem; }
.pod-1 .pod-block { height: 48%; background: var(--yellow); } .pod-2 .pod-block { height: 34%; background: var(--sky); } .pod-3 .pod-block { height: 24%; background: #FFB677; }
.pod.you .pod-nick { background: var(--blue); color: #fff; border-radius: 99px; padding: 0 .6em; }
.rest-card { flex: 0 0 min(32%, 320px); min-height: 0; overflow-y: auto; box-shadow: var(--sh); } .rest-card h3 { margin-bottom: .5rem; }
.rest-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.rest-list li { display: flex; align-items: center; gap: .5rem; padding: .25rem .4rem; background: var(--cream); border-radius: 12px; font: 700 1rem var(--font-display); } .rest-list .rank-nick { flex: 1; } .rest-pos { min-width: 2.2rem; color: var(--ink-soft); }
@media (max-width: 859px), (max-aspect-ratio: 1/1) { .end-body { flex-direction: column; align-items: center; } .rest-card { flex: 0 0 auto; max-height: 30%; width: 100%; } .podium { flex: 1 1 0; width: 100%; } }
@media (max-height: 520px) and (min-aspect-ratio: 1/1) { .end-title { font-size: 1.5rem; } .pod-av { --sz: 2.6rem; } .pod-1 .pod-av { --sz: 3.2rem; } .crown { font-size: 1.4rem; } .pod-nick { font-size: .85rem; } .pod-score { font-size: .7rem; } .host-foot .btn-lg { min-height: 46px; font-size: 1rem; } .rest-card { display: none; } .podium { max-width: 70vw; } }

/* =================== SALA AO VIVO: JOGADOR =================== */
.join { flex: 1; min-height: 0; display: grid; place-items: center; place-items: safe center; overflow-y: auto; padding: .4rem .4rem 1.4rem; }
.join-card { width: min(100%, 460px); display: flex; flex-direction: column; gap: .9rem; text-align: center; position: relative; }
.join-card h1 { font-size: clamp(1.6rem, 4vmin, 2.4rem); }
.join-globi { position: absolute; right: -.4rem; top: -2.6rem; transform: rotate(8deg); } .join-globi .globi { --sz: 5rem; }
.pin-input { text-align: center; font: 700 2rem var(--font-display); letter-spacing: .3em; }
.join-card .avatar-picker { grid-template-columns: repeat(8, 1fr); } .join-card .avatar-opt { min-height: 0; border-width: 2.5px; border-radius: 12px; padding: 2px; }
@media (max-width: 480px) { .join-card .avatar-picker { grid-template-columns: repeat(4, 1fr); } }
.wait, .p-reveal, .p-board { flex: 1; min-height: 0; display: grid; place-items: center; place-items: safe center; overflow-y: auto; padding: .4rem; }
.wait-card, .reveal-card { width: min(100%, 520px); display: flex; flex-direction: column; align-items: center; gap: .8rem; text-align: center; max-height: 100%; overflow: auto; }
.wait-av { --sz: clamp(90px, 20vmin, 170px); animation: bob 2.4s ease-in-out infinite; }
.wait-card h1 { font-size: clamp(1.6rem, 4vmin, 2.6rem); } .wait-sub { color: var(--ink-soft); font-weight: 800; font-size: 1.1rem; }
.wait-dots { display: flex; gap: .5rem; } .wait-dots i { width: .9rem; height: .9rem; border-radius: 50%; background: var(--orange); border: 2px solid var(--ink); animation: dot-wave 1.2s infinite; } .wait-dots i:nth-child(2) { animation-delay: .15s; background: var(--yellow); } .wait-dots i:nth-child(3) { animation-delay: .3s; background: var(--blue); }
.wait-count { font-weight: 800; } .pin-tag { background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 99px; padding: .1em .7em; font-family: var(--font-display); margin-left: .3rem; }
.sent-pick { --bg: var(--red); --fg: #fff; width: 5.5rem; height: 5.5rem; display: grid; place-items: center; background: var(--bg); color: var(--fg); border: 3px solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh); font-size: 3rem; animation: pop-in .4s var(--ease-bounce) both; }
.sent-pick.opt-0 { --bg: var(--opt-0); --fg: var(--opt-0-ink); } .sent-pick.opt-1 { --bg: var(--opt-1); --fg: var(--opt-1-ink); } .sent-pick.opt-2 { --bg: var(--opt-2); --fg: var(--opt-2-ink); } .sent-pick.opt-3 { --bg: var(--opt-3); --fg: var(--opt-3-ink); }
.p-reveal.right .reveal-card { background: #D5F5E1; } .p-reveal.wrong .reveal-card { background: #FFE1DF; } .p-reveal.time .reveal-card { background: #FFF0BF; }
.reveal-card h1 { font-size: clamp(1.7rem, 5vmin, 2.8rem); } .reveal-globi .globi { --sz: clamp(80px, 18vmin, 150px); animation: bounce 1.4s ease-in-out infinite; }
.big-pts { font: 700 clamp(2.6rem, 9vmin, 4.6rem)/1 var(--font-display); color: var(--orange); -webkit-text-stroke: .025em var(--ink); paint-order: stroke fill; text-shadow: 0 .05em 0 var(--ink); animation: pop-in .5s var(--ease-bounce) .2s both; }
.right-answer { font: 700 1.15rem var(--font-display); }
.rank-line { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.explain-mini { font: 700 .95rem/1.35 var(--font-body); color: var(--ink); max-width: 44ch; background: rgba(255, 255, 255, .7); border-radius: var(--r-md); padding: .5rem .8rem; }
.board-you { font: 700 1.2rem var(--font-display); text-align: center; }
.you-card { display: flex; align-items: center; gap: .8rem; padding: .5rem 1rem; box-shadow: var(--sh); flex: none; } .you-card div { display: flex; flex-direction: column; } .you-card b { font: 700 1.2rem var(--font-display); } .you-card small { font-weight: 800; color: var(--ink-soft); }
.p-q .quit { display: none; }
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .reveal-card, .wait-card { display: grid; grid-template-columns: auto 1fr; text-align: left; align-items: center; column-gap: 1rem; row-gap: .3rem; } .reveal-card > *, .wait-card > * { grid-column: 2; } .reveal-card > .reveal-globi, .wait-card > .wait-avatar, .wait-card > .sent-pick { grid-column: 1; grid-row: 1 / span 5; }
  .rank-line { justify-content: flex-start; } .explain-mini { display: none; } .join-globi { display: none; }
}

/* jogador: enunciado compacto, alternativas grandes (estilo Kahoot) */
.p-q .p-prompt { flex: 0 1 auto; max-height: 34%; }
.p-q .options { flex: 1 1 0; height: auto; min-height: 0; }
.p-q .opt { font-size: clamp(1.1rem, 3vmin + .7rem, 2.1rem); }
@media (max-width: 600px) and (orientation: portrait) {
  .options.mc .opt { flex-direction: column; justify-content: center; text-align: center; gap: .3rem; padding: .5rem .5rem; }
  .options.mc .opt-shape { font-size: 2.2rem; } .options.mc .opt-text { flex: 0 1 auto; display: block; -webkit-line-clamp: unset; max-height: 100%; overflow: auto; text-align: center; }
  .options.mc .opt-mark { right: .4rem; top: .4rem; transform: scale(0); } .options.mc .opt.is-right .opt-mark, .options.mc .opt.is-wrong .opt-mark { transform: scale(.8); }
  .p-q .opt { font-size: 1.15rem; }
}
@media (max-height: 520px) and (min-aspect-ratio: 1/1) { .p-q .opt { font-size: clamp(.95rem, 4.4vmin, 1.3rem); } .p-q .p-prompt { max-height: 40%; } }
