/* ==========================================================================
   SQ10 · Vidro — protótipo de direção visual (iOS 26 / Liquid Glass na web)
   Regra-mãe: vidro só na camada de navegação e controles; conteúdo é sólido.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* Marca SQ10 (site): azul #2351FF, marinho #0A1045, ouro #D4A841 */
  --sq10: #2351ff;
  --sq10-hi: #5a7dff;
  --canga: #ea5b2a;
  --canga-hi: #ff7a45;
  --gold: #d4a841;
  --ok: #30d158;
  --ok-ink: #1f9d47;
  /* Ultra 22/10: o verde de texto do escuro (o voto, o gabarito, a célula certa) e o marca-texto, que se repetiam em mais de um arquivo */
  --ok-hi: #5fe08a;
  --hl: #ffd60a;
  --hl-ink: #c9a400;
  --err: #ff453a;
  --err-ink: #d70015;

  /* Cores das disciplinas (matizes separados, saturação de app) */
  --c-lp: #3d6bff;
  --c-rlm: #8e5cff;
  --c-mat: #c4874f;
  --c-hist-br: #ff8a3d;
  --c-hist-es: #ffb020;
  --c-geo-geral: #1fc7a6;
  --c-geo-br: #26b36b;
  --c-geo-es: #5ac8fa;
  --c-dir-constitucional: #ff5c8a;
  --c-dir-administrativo: #c86bfa;
  --c-informatica: #64d2ff;
  --c-discursiva: #ffd60a;

  /* Assentamento criticamente amortecido (spring .smooth da Apple): desacelera sem passar do alvo — DESIGN.md: sem bounce */
  --settle: linear(0.0, 0.141 7.1%, 0.378 14.3%, 0.586 21.4%, 0.738 28.6%, 0.84 35.7%, 0.904 42.9%, 0.944 50.0%, 0.967 57.1%, 0.981 64.3%, 0.989 71.4%, 0.994 78.6%, 0.997 85.7%, 0.998 92.9%, 1);
  --settle-soft: linear(0.0, 0.095 7.1%, 0.275 14.3%, 0.456 21.4%, 0.609 28.6%, 0.727 35.7%, 0.813 42.9%, 0.874 50.0%, 0.916 57.1%, 0.945 64.3%, 0.964 71.4%, 0.977 78.6%, 0.985 85.7%, 0.99 92.9%, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --t-press: 260ms;
  --t-move: 560ms;

  /* Raios contínuos, só cinco (Spec C · A1): tile/barra 8, alternativa/input 14, cartão/lista 22, hero/sheet/menu 34, cápsula 999 */
  --r-xs: 8px;
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 34px;
  --r-xl: 34px;
  --t-menu: 320ms;

  --pad: 20px;
  --maxw: 1180px;
  --tab-h: 64px;
}

[data-theme="light"] {
  --bg: #f2f3f8;
  --bg-2: #e9ebf3;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --fill: rgba(118, 118, 128, .12);
  --fill-2: rgba(118, 118, 128, .2);
  /* Texto do jeito do iOS (rodada 11, resposta 31 do Heber): primário, secundário na Ardósia do DESIGN.md e terciário, os
     três com AA (4,5:1) no fundo, no cartão e no preenchimento cinza. O quaternário (--label-4) é só para o que não é texto
     (chevron, anel, trilho, ponto) e para o desabilitado, com 3:1 no cartão. Não há cor de fonte livre: o "Aumentar
     contraste" da Aparência escurece a escada inteira. */
  --label: #0b0c10;
  /* Verde de texto no claro com AA também sobre o preenchimento cinza (o #1F9D47 dava 3,5:1 no cartão); no escuro ele já passa */
  --ok-ink: #12692f;
  /* Ouro de texto (etiquetas e o XP da rodada sobre o tom de ouro) com AA nos dois temas */
  --gold-ink: #765500;
  --label-2: #5c6270;
  --label-3: #636977;
  --label-4: #8a8f99;
  --sep: rgba(60, 60, 67, .13);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px rgba(0, 0, 0, .05);

  --glass-bg: rgba(255, 255, 255, .58);
  --glass-bg-strong: rgba(255, 255, 255, .82);
  --glass-edge-hi: rgba(255, 255, 255, .95);
  --glass-edge-lo: rgba(255, 255, 255, .25);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, .18), inset 0 .5px 0 rgba(255, 255, 255, .35);
  --glass-blur: 22px;
  --glass-sat: 190%;
  --scrim: rgba(10, 14, 39, .22);
  --ambient-a: rgba(35, 81, 255, .16);
  --ambient-b: rgba(212, 168, 65, .10);
}

[data-theme="dark"] {
  --bg: #05070f;
  --bg-2: #0b0f1d;
  --surface: #12151f;
  --surface-2: #191d29;
  --fill: rgba(120, 120, 140, .2);
  --fill-2: rgba(120, 120, 140, .3);
  --label: #f5f6fa;
  --gold-ink: #e9c25a;
  --label-2: #a2a7b0;
  --label-3: #8e939d;
  --label-4: #6b7080;
  --sep: rgba(255, 255, 255, .09);
  --shadow-card: none;

  --glass-bg: rgba(38, 42, 56, .46);
  --glass-bg-strong: rgba(28, 31, 42, .82);
  --glass-edge-hi: rgba(255, 255, 255, .42);
  --glass-edge-lo: rgba(255, 255, 255, .06);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, .18), inset 0 .5px 0 rgba(255, 255, 255, .35);
  --glass-blur: 24px;
  --glass-sat: 180%;
  --scrim: rgba(0, 0, 0, .5);
  --ambient-a: rgba(35, 81, 255, .28);
  --ambient-b: rgba(120, 80, 255, .12);
}

/* Aumentar contraste (Aparência, guardado no aparelho), como na Acessibilidade do iPhone: a escada de cinzas sobe um degrau,
   os fios e os preenchimentos ficam mais fortes e o vidro fica quase opaco, com borda visível */
html[data-contrast="more"][data-theme="light"] {
  --label-2: #3f4450; --label-3: #5c6270; --label-4: #6b7080;
  --sep: rgba(60, 60, 67, .32); --fill: rgba(118, 118, 128, .2); --fill-2: rgba(118, 118, 128, .3);
  --glass-bg: rgba(255, 255, 255, .9); --glass-bg-strong: rgba(255, 255, 255, .97); --glass-edge-lo: rgba(60, 60, 67, .34);
}
html[data-contrast="more"][data-theme="dark"] {
  --label-2: #c9cdd4; --label-3: #a2a7b0; --label-4: #8e939d;
  --sep: rgba(255, 255, 255, .24); --fill: rgba(120, 120, 140, .34); --fill-2: rgba(120, 120, 140, .46);
  --glass-bg: rgba(28, 31, 42, .92); --glass-bg-strong: rgba(24, 27, 37, .97); --glass-edge-lo: rgba(255, 255, 255, .3);
}

[data-mode="sq10"] { --tint: var(--sq10); --tint-hi: var(--sq10-hi); }
[data-mode="canga"] { --tint: var(--canga); --tint-hi: var(--canga-hi); --ambient-a: rgba(234, 91, 42, .2); --ambient-b: rgba(255, 176, 32, .08); }
/* Regra do Texto AA do DESIGN.md do CANGA: no claro, laranja como texto é #C24414 e o botão com texto branco repousa
   em #C8481E (4,77:1). O #EA5B2A segue na marca, nos ícones, nos anéis e nas barras. No SQ10 e no escuro, o próprio acento passa. */
[data-theme="light"][data-mode="canga"] { --tint-ink: #c24414; --tint-cta: #c8481e; --tint-cta-down: #a93a18; }
/* Rodada 11 (resposta 32): no escuro, o laranja de ação segue o DESIGN.md: #FF7A45 com texto Tinta escura (#15171C, 6,9:1),
   e pressiona para #FF8E5F. Era branco sobre #EA5B2A (3,5:1). --on-tint é a cor do texto sobre o fundo de ação */
[data-theme="dark"][data-mode="canga"] { --tint-cta: #ff7a45; --tint-cta-down: #ff8e5f; --on-tint: #15171c; }
/* No escuro, o azul #2351FF como texto fica em 3:1 sobre o fundo (o "‹ Lançar", os chevrons do Plano): o texto usa o azul
   claro do SQ10 (#6F8DFF, o mesmo --sq10-ink dos Dados) */
[data-theme="dark"][data-mode="sq10"] { --tint-ink: var(--sq10-ink); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); transition: background-color .5s var(--ease-out); }
body {
  margin: 0; min-height: 100dvh; font-family: var(--font); font-size: 17px; line-height: 1.35;
  color: var(--label); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; overflow-x: hidden;
  transition: background-color .5s var(--ease-out), color .3s var(--ease-out);
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2.5px solid var(--tint); outline-offset: 3px; }
/* O contêiner da folha recebe o foco ao abrir só para o leitor de tela; o anel fica para os controles */
.sheet:focus, .sheet:focus-visible { outline: none; }
.ic { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 18px; height: 18px; }
.ic.xs { width: 14px; height: 14px; stroke-width: 2.4; }
.ic.lg { width: 30px; height: 30px; }
.num { font-family: var(--font-round); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.ambient {
  position: fixed; inset: -20vh -10vw auto; height: 90vh; z-index: -1; pointer-events: none;
  background:
    radial-gradient(48vw 40vh at 18% 8%, var(--ambient-a), transparent 70%),
    radial-gradient(40vw 34vh at 88% 0%, var(--ambient-b), transparent 70%);
  transition: opacity .6s var(--ease-out);
}

/* ---------- Material: Liquid Glass ---------- */
.glass {
  position: relative; isolation: isolate;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  box-shadow: var(--glass-shadow);
}
/* Borda especular: claro no alto à esquerda, quase nada no meio, retorno embaixo à direita */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: linear-gradient(150deg, var(--glass-edge-hi), var(--glass-edge-lo) 30%, transparent 55%, var(--glass-edge-lo) 78%, var(--glass-edge-hi));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
/* Brilho que acompanha o ponteiro (vidro "interativo") */
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background: radial-gradient(140px circle at var(--mx, 50%) var(--my, -40%), rgba(255, 255, 255, .34), transparent 62%);
  opacity: 0; transition: opacity .35s var(--ease-out); mix-blend-mode: soft-light;
}
.glass:hover::after, .glass.is-pressed::after { opacity: 1; }
.glass > * { position: relative; z-index: 3; }
.glass-capsule { border-radius: 999px; }
.glass-strong { background: var(--glass-bg-strong); }

/* Botão de vidro com cor (ação principal sobre foto/vidro) */
.glass-tint {
  background: color-mix(in srgb, var(--tint) 86%, transparent);
  color: #fff;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--tint) 40%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
}

@media (prefers-reduced-transparency: reduce) {
  .glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-bg-strong); }
}

/* ---------- Pressão (toque "gostoso") ---------- */
.pressable { transition: transform var(--t-press) var(--settle), filter .2s var(--ease-out), background-color .25s var(--ease-out), opacity .25s; will-change: transform; touch-action: manipulation; }
.pressable.is-pressed { transform: scale(.955); transition-duration: 120ms; transition-timing-function: var(--ease-out); }
.pressable.press-soft.is-pressed { transform: scale(.985); }

/* ---------- Chrome: barras flutuantes ---------- */
.chrome {
  position: fixed; z-index: 40; left: 0; right: 0; top: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 18px 0;
  pointer-events: none;
  transition: transform var(--t-move) var(--settle-soft), opacity .3s var(--ease-out);
}
.chrome > * { pointer-events: auto; }
.chrome-left { justify-self: start; display: flex; align-items: center; padding: 0; }
.brand-btn { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: inherit; color: var(--label); text-align: left; }
.brand-btn:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }
.bn-home .bn-chev { width: 12px; height: 12px; stroke-width: 2.6; color: var(--label-2); align-self: center; transition: transform var(--t-menu) var(--settle); }
.brand-btn[aria-expanded="true"] .bn-chev { transform: rotate(180deg); }
.bn-home { grid-template-columns: auto auto; column-gap: 6px; }
.bn-home small { grid-column: 1 / -1; }
.chrome-right { justify-self: end; display: flex; align-items: center; gap: 4px; padding: 6px; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--tint) 16%, transparent); overflow: hidden; }
.brand-mark img { width: 28px; height: 28px; object-fit: contain; grid-area: 1/1; transition: opacity .4s var(--ease-out), transform .6s var(--settle); }
[data-theme="dark"] .brand-sq10 { filter: brightness(0) invert(1); }
.brand-canga { width: 26px !important; }
.brand-back { grid-area: 1/1; color: var(--tint-ink, var(--tint)); opacity: 0; transform: scale(.4); transition: opacity .3s var(--ease-out), transform .55s var(--settle); }
.chrome-left { cursor: default; }
.brand-name { display: grid; }
.bn-home, .bn-back { grid-area: 1/1; transition: opacity .3s var(--ease-out), transform .55s var(--settle); }
.bn-home { display: grid; line-height: 1.05; }
.bn-back { opacity: 0; transform: translateX(14px); color: var(--tint-ink, var(--tint)); font-size: 17px !important; font-family: var(--font) !important; letter-spacing: -.01em !important; font-weight: 600; align-self: center; }
.chrome-left.is-back { cursor: pointer; }
.chrome-left.is-back .brand-mark { background: transparent; }
.chrome-left.is-back .bn-chev { opacity: 0; }
.chrome-left.is-back .brand-mark img { opacity: 0 !important; transform: scale(.4) rotate(30deg) !important; }
.chrome-left.is-back .brand-back { opacity: 1; transform: none; }
.chrome-left.is-back .bn-home { opacity: 0; transform: translateX(-14px); }
.chrome-left.is-back .bn-back { opacity: 1; transform: none; }
[data-mode="sq10"] .brand-canga, [data-mode="canga"] .brand-sq10 { opacity: 0; transform: scale(.4) rotate(-40deg); }
.brand-name { display: grid; line-height: 1.05; }
.brand-name b { font-family: var(--font-display); font-size: 15px; letter-spacing: .02em; }
.brand-name small { font-size: 12px; color: var(--label-2); font-weight: 500; }
[data-mode="sq10"] .only-canga, [data-mode="canga"] .only-sq10 { display: none; }
[data-theme="dark"] .only-light, [data-theme="light"] .only-dark { display: none; }

.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--label); }
.icon-btn:hover { background: var(--fill); }
.avatar-btn { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.chip-timer { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border-radius: 999px; font: 600 15px/1 var(--font-round); font-variant-numeric: tabular-nums; }
.chip-timer:hover { background: var(--fill); }
.timer-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--label-4); transition: background-color .3s; }
.chip-timer.live .timer-dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(48, 209, 88, .6); animation: pulse 1.8s var(--ease-out) infinite; }
/* Rodada 14: relógio pausado (Pausar, na tela cheia): o ponto fica dourado até o Retomar */
.chip-timer.held .timer-dot { background: var(--gold); }
@keyframes pulse { to { box-shadow: 0 0 0 10px rgba(48, 209, 88, 0); } }

/* Tab bar */
.tabbar { display: flex; align-items: center; gap: 2px; padding: 5px; position: relative; }
.tab {
  position: relative; z-index: 4; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px;
  border-radius: 999px; color: var(--label-2); font-weight: 600; font-size: 15px; letter-spacing: -.01em;
  transition: color .3s var(--ease-out), transform var(--t-press) var(--settle);
}
.tab .ic { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--tint-ink, var(--tint)); }
[data-theme="dark"] .tab[aria-current="page"] { color: var(--tint-hi); }
.tab-lens {
  position: absolute; z-index: 3; top: 4px; bottom: 4px; left: 0; border-radius: 999px; pointer-events: none;
  background: color-mix(in srgb, var(--tint) 13%, var(--glass-bg-strong));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 0 0 .5px rgba(255, 255, 255, .25), 0 4px 14px rgba(0, 0, 0, .08);
  transition: transform var(--t-move) var(--settle), width var(--t-move) var(--settle), background-color .4s;
}
[data-theme="dark"] .tab-lens { background: rgba(255, 255, 255, .14); box-shadow: inset 0 .5px 0 rgba(255, 255, 255, .3), 0 6px 18px rgba(0, 0, 0, .25); }
.tab-lens.stretch { animation: lens 520ms var(--ease-out); }
@keyframes lens { 40% { scale: 1.06 .96; } }

/* Rodada 21b: a borda de rolagem do iOS 26 (app.js, edges). --edge-t é onde acaba a última pílula de cima e --edge-b, a
   distância do fim da tela até a primeira pílula de baixo. Até perto da pílula o conteúdo some quase todo na cor do fundo;
   depois a faixa se desfaz em 24 px. Entra com o primeiro rolar e sai quando não há mais o que rolar. A máscara só lê o
   alfa: o --bg, opaco, faz o papel do preto */
.edge-top, .edge-bottom {
  position: fixed; z-index: 30; left: 0; right: 0; pointer-events: none; opacity: 0;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: opacity .3s var(--ease-out);
}
.edge-top {
  top: 0; height: calc(var(--edge-t, 66px) + 24px);
  background: linear-gradient(color-mix(in srgb, var(--bg) 96%, transparent), color-mix(in srgb, var(--bg) 88%, transparent) calc(var(--edge-t, 66px) - 10px), transparent);
  -webkit-mask-image: linear-gradient(var(--bg) calc(var(--edge-t, 66px) - 6px), transparent); mask-image: linear-gradient(var(--bg) calc(var(--edge-t, 66px) - 6px), transparent);
}
.edge-bottom {
  bottom: 0; height: calc(var(--edge-b, 0px) + 24px);
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 96%, transparent), color-mix(in srgb, var(--bg) 88%, transparent) calc(var(--edge-b, 0px) - 10px), transparent);
  -webkit-mask-image: linear-gradient(to top, var(--bg) calc(var(--edge-b, 0px) - 6px), transparent); mask-image: linear-gradient(to top, var(--bg) calc(var(--edge-b, 0px) - 6px), transparent);
}
html.edge-t-on .edge-top, html.edge-b-on .edge-bottom { opacity: 1; }
/* No Foco da aula o véu escuro já cobre tudo; a faixa clara por cima dele sobraria */
html:has(.lesson-veil.on) :is(.edge-top, .edge-bottom) { opacity: 0; }

body.focus-mode .chrome { transform: translateY(-140%); opacity: 0; pointer-events: none; }

/* ---------- Layout ---------- */
.view { position: relative; min-height: 100dvh; padding: 104px var(--pad) 120px; max-width: calc(var(--maxw) + var(--pad) * 2); margin: 0 auto; outline: none; view-transition-name: page; }
.lt { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 18px 4px 22px; }
.lt h1 { margin: 0; font-family: var(--font-display); font-size: 44px; line-height: 1.04; font-weight: 700; letter-spacing: -.025em; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--label-2); text-transform: uppercase; }
.lt .eyebrow { text-transform: none; font-size: 15px; letter-spacing: 0; font-weight: 500; }
.section-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin: 34px 4px 12px; }
.section-h h2 { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.section-h .link { color: var(--tint-ink, var(--tint)); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 2px; }
.muted { color: var(--label-2); }
.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; }

.card { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-card); }
@supports (corner-shape: squircle) { .card, .now, .hero-course, .cover, .sheet, .menu, .module { corner-shape: squircle; } }
.card-pad { padding: 22px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 24px; border-radius: 999px; font-weight: 600; font-size: 17px; letter-spacing: -.01em; white-space: nowrap;
}
.btn-tint { background: var(--tint-cta, var(--tint)); color: var(--on-tint, #fff); box-shadow: 0 8px 24px color-mix(in srgb, var(--tint) 35%, transparent), inset 0 1px 0 rgba(255, 255, 255, .28); }
.btn-tint:hover { filter: brightness(1.07); }
.btn-tint:active { background: var(--tint-cta-down, var(--tint-cta, var(--tint))); }
.btn-gray { background: var(--fill); color: var(--label); }
.btn-gray:hover { background: var(--fill-2); }
.btn-plain { color: var(--tint-ink, var(--tint)); height: 44px; padding: 0 12px; font-weight: 600; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-round { width: 64px; height: 64px; padding: 0; border-radius: 50%; }

/* Controle segmentado (estilo iOS) */
.seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: 999px; background: var(--fill); }
.seg button { position: relative; z-index: 2; height: 36px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--label-2); transition: color .3s; }
.seg button[aria-pressed="true"] { color: var(--label); }
.seg-thumb { position: absolute; z-index: 1; top: 3px; bottom: 3px; left: 3px; border-radius: 999px; background: var(--surface); box-shadow: 0 3px 10px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .06); transition: transform var(--t-move) var(--settle), width var(--t-move) var(--settle); }
[data-theme="dark"] .seg-thumb { background: #3a3d4a; }

/* Toggle iOS */
.toggle { position: relative; width: 52px; height: 32px; border-radius: 999px; background: var(--fill-2); transition: background-color .3s var(--ease-out); flex: none; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .18); transition: transform var(--t-move) var(--settle), width .2s; }
.toggle[aria-checked="true"] { background: var(--ok); }
.toggle[aria-checked="true"]::after { transform: translateX(20px); }
.toggle.is-pressed::after { width: 34px; }
.toggle[aria-checked="true"].is-pressed::after { transform: translateX(14px); }

/* ---------- HOJE ---------- */
.now {
  position: relative; overflow: hidden; border-radius: var(--r-xl); min-height: 430px; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; isolation: isolate;
  box-shadow: 0 30px 60px -20px rgba(8, 14, 50, .55);
}
.now-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.2s var(--ease-out); }
.now:hover .now-img { transform: scale(1.08); }
.now::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5, 8, 25, .42), rgba(5, 8, 25, 0) 20%), linear-gradient(90deg, rgba(5, 8, 25, .62), rgba(5, 8, 25, .1) 62%), linear-gradient(180deg, rgba(5, 8, 25, 0) 26%, rgba(5, 8, 25, .58) 58%, rgba(5, 8, 25, .92)); }
.now-top { position: absolute; top: 20px; left: 20px; right: 20px; display: flex; justify-content: space-between; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.now .pill.glass { --glass-bg: rgba(255, 255, 255, .18); --glass-edge-hi: rgba(255, 255, 255, .7); color: #fff; }
.now-kicker { font-size: 15px; font-weight: 600; opacity: .85; margin: 0 0 6px; }
.now h2 { margin: 0; font-family: var(--font-display); font-size: 40px; line-height: 1.05; font-weight: 700; letter-spacing: -.025em; max-width: 14ch; text-wrap: balance; }
.now-row { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.now-play { --glass-bg: rgba(255, 255, 255, .22); --glass-edge-hi: rgba(255, 255, 255, .85); width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.now-play .ic { width: 30px; height: 30px; margin-left: 4px; }
.now-meta { display: grid; gap: 2px; }
.now-meta b { font-size: 19px; font-weight: 700; }
.now-meta span { font-size: 15px; opacity: .8; }
.now-steps { display: flex; gap: 5px; margin-top: 22px; }
.now-steps i { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .25); }
.now-steps i.done { background: rgba(255, 255, 255, .95); }
.now-steps i.cur { background: linear-gradient(90deg, #fff 30%, rgba(255, 255, 255, .25) 30%); }

.rings-card { padding: 24px; display: grid; grid-template-rows: auto 1fr auto; gap: 18px; cursor: pointer; }
.rings-head { display: flex; justify-content: space-between; align-items: center; }
.rings-head h3, .card h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
.rings-wrap { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 22px; }
.rings svg { display: block; }
.ring-track { opacity: .18; }
.ring-arc { transition: stroke-dashoffset 1.3s var(--settle-soft); }
.legend { display: grid; gap: 14px; }
.legend-row { display: grid; gap: 1px; }
.legend-row > span { font-size: 14px; color: var(--label-2); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.legend-row > span i { width: 9px; height: 9px; border-radius: 50%; }
.legend-row b { font: 700 24px/1.1 var(--font-round); letter-spacing: -.01em; }
.legend-row b small { font-size: 15px; color: var(--label-2); font-weight: 600; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week-day { display: grid; justify-items: center; gap: 6px; padding: 8px 0; border-radius: var(--r-sm); font-size: 12px; font-weight: 600; color: var(--label-2); }
.week-day .bar { width: 8px; height: 46px; border-radius: 8px; background: var(--fill); position: relative; overflow: hidden; }
.week-day .bar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 8px; background: var(--tint); }
.week-day.today { background: color-mix(in srgb, var(--tint) 12%, transparent); color: var(--tint-ink, var(--tint)); }

.timeline { padding: 8px; }
.tl-item { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; border-radius: 20px; }
.tl-item:hover { background: var(--fill); }
.tl-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: var(--dc, var(--tint)); position: relative; }
.tl-icon .ic { width: 24px; height: 24px; }
.tl-item.done .tl-icon { background: var(--fill-2); color: var(--label-2); }
.tl-item.done .tl-title { color: var(--label-2); text-decoration: line-through; text-decoration-color: var(--label-4); }
.tl-item.cur { background: color-mix(in srgb, var(--tint) 9%, transparent); }
.tl-kind { font-size: 13px; font-weight: 600; color: var(--label-2); display: flex; gap: 6px; align-items: center; }
.tl-kind em { font-style: normal; color: var(--dc, var(--tint)); }
/* O rótulo na cor da matéria precisa ler (AA): no claro a cor escurece até a luminosidade 0,5 e no escuro clareia até 0,7,
   sem mudar a matiz. Amarelos e cianos ("Feito fora · Discursiva", "Teoria · Geografia do ES") ficavam entre 1,4 e 2:1 */
[data-theme="light"] .tl-kind em { color: oklch(from var(--dc, var(--tint)) min(l, 0.5) c h); }
[data-theme="dark"] .tl-kind em { color: oklch(from var(--dc, var(--tint)) max(l, 0.72) c h); }
.tl-title { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin-top: 1px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.tl-dur { font: 600 15px/1 var(--font-round); color: var(--label-2); display: flex; align-items: center; gap: 6px; }
.tl-check { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; }

/* ---------- CURSOS ---------- */
.hero-course { position: relative; overflow: hidden; border-radius: var(--r-xl); min-height: 380px; color: #fff; padding: 30px; display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate; }
.hero-course img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; }
.hero-course::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4, 8, 30, .82), rgba(4, 8, 30, .35) 55%, rgba(4, 8, 30, 0)), linear-gradient(0deg, rgba(4, 8, 30, .6), transparent 50%); }
.hero-course h2 { margin: 0; font-family: var(--font-display); font-size: 56px; line-height: 1; font-weight: 700; letter-spacing: -.035em; }
.hero-course p { margin: 10px 0 0; font-size: 17px; opacity: .85; }
.hero-course .row { display: flex; gap: 12px; align-items: center; margin-top: 24px; flex-wrap: wrap; }
.hero-progress { display: flex; align-items: center; gap: 10px; font: 600 15px/1 var(--font-round); }
.hero-progress .track { width: 160px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.hero-progress .track i { display: block; height: 100%; background: #fff; border-radius: 6px; }
.btn-glass-light { --glass-bg: rgba(255, 255, 255, .2); --glass-edge-hi: rgba(255, 255, 255, .8); color: #fff; }

.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: max(250px, calc((100% - 32px) / 3.12)); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 18px; margin: 0 -4px; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.cover { position: relative; scroll-snap-align: start; aspect-ratio: 3 / 4; border-radius: var(--r-lg); overflow: hidden; color: #fff; isolation: isolate; box-shadow: 0 18px 40px -18px rgba(5, 10, 40, .55); }
.cover img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out); }
.cover:hover img { transform: scale(1.06); }
.cover::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 38%, rgba(4, 8, 28, .78) 78%, rgba(4, 8, 28, .92)); }
.cover-body { position: absolute; left: 18px; right: 18px; bottom: 18px; display: grid; gap: 10px; }
.cover-kicker { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .82; }
.cover h3 { margin: 0; font-family: var(--font-display); font-size: 26px; line-height: 1.04; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.cover-meta { display: flex; align-items: center; justify-content: space-between; font: 600 13px/1 var(--font-round); opacity: .9; }
.cover .track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.cover .track i { display: block; height: 100%; background: #fff; }
.cover-stripe { position: absolute; top: 16px; left: 16px; width: 36px; height: 5px; border-radius: 5px; background: var(--dc); box-shadow: 0 0 18px var(--dc); }

.resume { display: grid; grid-template-columns: 112px 1fr auto; align-items: center; gap: 16px; padding: 12px 18px 12px 12px; }
.resume-thumb { width: 112px; aspect-ratio: 16/10; border-radius: var(--r-sm); overflow: hidden; position: relative; }
.resume-thumb img { width: 100%; height: 100%; object-fit: cover; }
.resume-thumb .ic { position: absolute; inset: 0; margin: auto; color: #fff; width: 26px; height: 26px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5)); }
.resume b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.resume span { font-size: 14px; color: var(--label-2); }

/* ---------- DISCIPLINA ---------- */
.disc-hero { position: relative; margin: -104px calc(50% - 50vw) 0; height: min(58vh, 520px); overflow: hidden; color: #fff; isolation: isolate; }
.disc-hero img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; transform-origin: 50% 0; will-change: transform; }
/* No claro, a foto termina num véu escuro com o título em branco (como o app TV): sem a névoa branca que lavava a foto */
.disc-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4, 8, 28, .35), transparent 25%, transparent 46%, rgba(4, 8, 28, .62) 100%); }
[data-theme="dark"] .disc-hero::after { background: linear-gradient(180deg, rgba(4, 8, 28, .45), transparent 25%, rgba(5, 7, 15, .2) 50%, var(--bg) 100%); }
.disc-hero-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 calc(var(--pad) + 4px) 26px; max-width: calc(var(--maxw) + var(--pad) * 2); margin: 0 auto; }
.disc-hero h1 { margin: 0; font-family: var(--font-display); font-size: 60px; line-height: .98; font-weight: 700; letter-spacing: -.035em; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); max-width: 13ch; text-wrap: balance; }
.disc-hero .eyebrow { color: rgba(255, 255, 255, .8); }
.disc-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 4px 6px; }
.stat-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-card); font-weight: 600; font-size: 15px; }
.stat-pill b { font-family: var(--font-round); }
.disc-tabs { margin: 22px 4px 16px; }

.module { border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-card); margin-bottom: 12px; overflow: hidden; }
.module-h { width: 100%; display: grid; grid-template-columns: 44px 1fr auto 24px; align-items: center; gap: 14px; padding: 16px 18px 16px 16px; text-align: left; }
.module-n { width: 44px; height: 44px; border-radius: var(--r-sm); display: grid; place-items: center; font: 700 17px/1 var(--font-round); color: var(--dc); background: color-mix(in srgb, var(--dc) 14%, transparent); }
.module-n.full { background: var(--dc); color: #fff; }
.module-h b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.module-h span { font-size: 14px; color: var(--label-2); }
.module-h .chev { color: var(--label-4); transition: transform var(--t-move) var(--settle); }
.module[open-state="1"] .module-h .chev { transform: rotate(180deg); }
.module-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-move) var(--settle-soft); }
.module[open-state="1"] .module-body { grid-template-rows: 1fr; }
.module-body > div { overflow: hidden; }
.lesson { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding: 12px 18px 12px 22px; border-top: 1px solid var(--sep); }
.lesson:hover { background: var(--fill); }
.lesson .k { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--fill); color: var(--label-2); }
.lesson.done .k { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok-ink); }
[data-theme="dark"] .lesson.done .k { color: var(--ok); }
.lesson b { font-weight: 500; font-size: 16px; letter-spacing: -.005em; }
.lesson.done b { color: var(--label-2); }
.lesson small { font: 600 14px/1 var(--font-round); color: var(--label-2); }

.fab-continue { position: fixed; z-index: 44; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 20px; border-radius: 999px; max-width: min(560px, calc(100vw - 32px)); }
.fab-continue span { display: grid; line-height: 1.15; min-width: 0; }
.fab-continue small { font-size: 13px; color: var(--label-2); font-weight: 600; }
.fab-continue b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fab-continue .btn { height: 46px; }

/* ---------- AULA ---------- */
.lesson-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.player { border-radius: var(--r-lg); overflow: hidden; background: #000; aspect-ratio: 16 / 9; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .6); position: relative; }
.player iframe, .player .pdf-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player.is-pdf { aspect-ratio: auto; height: calc(100dvh - 210px); min-height: 520px; background: var(--surface); }
.player-poster { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 50% 40%, #1a2350, #05070f); }
.lesson-info { margin: 20px 4px 0; }
.lesson-info h1 { margin: 4px 0 0; font-family: var(--font-display); font-size: 32px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
.lesson-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 4px; align-items: center; }
.rate { display: flex; gap: 6px; }
.rate button { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--label-2); font: 700 15px/1 var(--font-round); }
.rate button[aria-pressed="true"] { background: var(--tint-cta, var(--tint)); color: var(--on-tint, #fff); }
.side-list { padding: 8px; max-height: calc(100dvh - 140px); overflow: auto; position: sticky; top: 96px; }
.side-list h3 { margin: 10px 12px 8px; font-size: 15px; color: var(--label-2); font-weight: 600; }
.side-item { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 15px; }
.side-item:hover { background: var(--fill); }
.side-item.cur { background: color-mix(in srgb, var(--tint) 12%, transparent); color: var(--tint-ink, var(--tint)); font-weight: 600; }
.side-item .k { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--fill); }
.side-item.done .k { color: var(--ok-ink); background: color-mix(in srgb, var(--ok) 18%, transparent); }
.side-item small { font: 600 13px/1 var(--font-round); color: var(--label-2); }
.lesson-top { position: fixed; z-index: 45; top: max(14px, env(safe-area-inset-top)); left: 18px; right: 18px; display: flex; justify-content: space-between; pointer-events: none; }
.lesson-top > * { pointer-events: auto; }
.lesson-top .glass-capsule { display: flex; align-items: center; gap: 4px; padding: 5px; }

/* ---------- QUESTÕES ---------- */
.q-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.q-disc { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 16px 18px 16px 16px; text-align: left; }
.q-disc .tile { width: 56px; height: 56px; border-radius: 17px; background: var(--dc); display: grid; place-items: center; color: #fff; font: 700 15px/1 var(--font-round); letter-spacing: -.02em; box-shadow: 0 8px 18px -6px var(--dc); }
.q-disc b { font-size: 17px; font-weight: 600; display: block; letter-spacing: -.01em; }
.q-disc .dom { display: flex; align-items: center; gap: 8px; margin-top: 7px; font: 600 13px/1 var(--font-round); color: var(--label-2); }
.q-disc .dom .track { width: 120px; height: 5px; border-radius: 5px; background: var(--fill); overflow: hidden; }
.q-disc .dom .track i { display: block; height: 100%; background: var(--dc); border-radius: 5px; }

/* Rodada em foco */
.round { max-width: 760px; margin: 0 auto; padding-top: 6px; }
.round-top { position: fixed; z-index: 46; top: max(14px, env(safe-area-inset-top)); left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; }
.round-bar { pointer-events: auto; display: grid; grid-template-columns: 44px auto auto 44px; align-items: center; gap: 12px; padding: 5px; }
.round-bar .icon-btn { width: 44px; height: 44px; }
.round-dots { display: flex; gap: 5px; padding: 0 4px; }
.round-dots i { width: 22px; height: 6px; border-radius: 6px; background: var(--fill-2); transition: background-color .4s, width .5s var(--settle); }
.round-dots i.cur { width: 34px; background: var(--tint); }
.round-dots i.ok { background: var(--ok); }
.round-dots i.bad { background: var(--err); }
.round-clock { font: 600 15px/1 var(--font-round); font-variant-numeric: tabular-nums; color: var(--label-2); min-width: 52px; text-align: center; }
.q-card { padding: 26px 26px 22px; margin-top: 4px; }
.q-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--label-2); font-weight: 600; margin-bottom: 14px; }
/* O assunto na cor da matéria, puxada para o texto até o AA (a cor pura dava 4,1:1 em RLM) */
.q-meta .topic { color: color-mix(in srgb, var(--dc) 55%, var(--label)); }
.q-text { font-size: 19px; line-height: 1.5; letter-spacing: -.005em; }
.q-text p { margin: 0 0 .6em; }
.alts { display: grid; gap: 10px; margin-top: 20px; }
.alt {
  position: relative; display: grid; grid-template-columns: 38px 1fr 26px; align-items: center; gap: 14px; text-align: left;
  min-height: 60px; padding: 11px 14px 11px 11px; border-radius: 20px; background: var(--surface-2); font-size: 17px; line-height: 1.35;
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: transform var(--t-press) var(--settle), background-color .35s var(--ease-out), box-shadow .35s var(--ease-out), opacity .45s var(--ease-out);
}
[data-theme="dark"] .alt { background: var(--surface-2); }
.alt:hover { background: color-mix(in srgb, var(--tint) 6%, var(--surface-2)); }
.alt .letter { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); font: 700 16px/1 var(--font-round); transition: background-color .35s, color .35s, transform .5s var(--settle); }
.alt .mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; transform: scale(0); transition: transform .55s var(--settle); }
.alt[aria-pressed="true"] { background: color-mix(in srgb, var(--tint) 11%, var(--surface)); box-shadow: inset 0 0 0 2px var(--tint); }
.alt[aria-pressed="true"] .letter { background: var(--tint-cta, var(--tint)); color: var(--on-tint, #fff); transform: scale(1.06); }
.alt.cut { opacity: .38; }
.alt.cut .txt { text-decoration: line-through; }
.alts.locked .alt { pointer-events: none; }
.alts.locked .alt:not(.right):not(.wrong) { opacity: .45; }
.alt.right { background: color-mix(in srgb, var(--ok) 15%, var(--surface)); box-shadow: inset 0 0 0 2px var(--ok); }
.alt.right .letter { background: var(--ok); color: #fff; }
.alt.right .mark { background: var(--ok); transform: scale(1); }
.alt.wrong { background: color-mix(in srgb, var(--err) 12%, var(--surface)); box-shadow: inset 0 0 0 2px var(--err); animation: shake .5s var(--ease-out); }
.alt.wrong .letter { background: var(--err); color: #fff; }
.alt.wrong .mark { background: var(--err); transform: scale(1); }
@keyframes shake { 20% { translate: -7px 0; } 40% { translate: 6px 0; } 60% { translate: -4px 0; } 80% { translate: 2px 0; } }

.verdict { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .7s var(--settle-soft); }
.verdict.open { grid-template-rows: 1fr; }
.verdict > div { overflow: hidden; }
.verdict-card { margin-top: 14px; padding: 22px 24px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-card); opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .5s var(--ease-out) .1s, transform .7s var(--settle) .1s; }
.verdict.open .verdict-card { opacity: 1; transform: none; }
.verdict-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.verdict-badge { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.verdict-head b { font-size: 19px; letter-spacing: -.01em; }
.verdict-head .vt span { display: block; font-size: 14px; color: var(--label-2); font-weight: 500; }
.verdict-body { font-size: 17px; line-height: 1.6; color: var(--label); }
.verdict-body p { margin: 0 0 12px; }
.verdict-body strong { font-weight: 700; }
.why { display: grid; gap: 8px; margin-top: 6px; }
.why-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); font-size: 15px; line-height: 1.5; }
.why-item .l { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); font: 700 14px/1 var(--font-round); color: var(--label-2); }

.round-actions { position: fixed; z-index: 46; left: 0; right: 0; bottom: max(20px, env(safe-area-inset-bottom)); display: flex; justify-content: center; pointer-events: none; }
.round-actions .glass-capsule { pointer-events: auto; display: flex; align-items: center; gap: 6px; padding: 6px; }
.round-actions .btn { height: 50px; }
.btn-skip { color: var(--label-2); font-weight: 600; height: 50px; padding: 0 18px; border-radius: 999px; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.btn-skip:hover { background: var(--fill); }
.btn-tint[disabled] { opacity: .45; box-shadow: none; pointer-events: none; }

/* Resumo da rodada */
.summary { text-align: center; padding: 8px 4px 4px; }
.summary h2 { margin: 14px 0 4px; font-family: var(--font-display); font-size: 30px; letter-spacing: -.02em; }
.summary .big { font: 700 64px/1 var(--font-round); letter-spacing: -.03em; }
.summary-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
.summary-stats div { padding: 14px 8px; border-radius: 18px; background: var(--fill); }
.summary-stats b { display: block; font: 700 24px/1.1 var(--font-round); }
.summary-stats span { font-size: 13px; color: var(--label-2); font-weight: 600; }

/* ---------- PLANO ---------- */
.plan-grid { display: grid; grid-template-columns: 420px 1fr; gap: 18px; align-items: start; }
.cycle-card { padding: 26px; display: grid; justify-items: center; gap: 18px; position: sticky; top: 96px; }
.cycle-svg { width: 100%; max-width: 340px; overflow: visible; }
.cycle-seg { cursor: pointer; transition: opacity .3s, stroke-width .5s var(--settle); }
.cycle-svg:hover .cycle-seg { opacity: .55; }
.cycle-svg .cycle-seg:hover, .cycle-svg .cycle-seg.hl { opacity: 1; stroke-width: 32; }
.cycle-center b { font: 700 46px/1 var(--font-round); fill: var(--label); }
.cycle-legend { width: 100%; display: grid; gap: 4px; }
.cl-row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; font-size: 15px; }
.cl-row:hover { background: var(--fill); }
.cl-row i { width: 12px; height: 12px; border-radius: 4px; background: var(--dc); }
.cl-row small { font: 600 14px/1 var(--font-round); color: var(--label-2); }

.agenda { padding: 10px; }
.day-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 6px; }
.day-btn { display: grid; justify-items: center; gap: 4px; padding: 10px 0; border-radius: 18px; font-size: 13px; font-weight: 600; color: var(--label-2); position: relative; }
.day-btn b { font: 700 22px/1 var(--font-round); color: var(--label); }
.day-btn:hover { background: var(--fill); }
.day-btn[aria-pressed="true"] { background: var(--tint-cta, var(--tint)); color: var(--on-tint, rgba(255, 255, 255, .8)); }
.day-btn[aria-pressed="true"] b { color: #fff; }
.day-btn .dots { display: flex; gap: 3px; height: 6px; }
.day-btn .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--dc); }
.day-btn[aria-pressed="true"] .dots i { background: #fff; opacity: .9; }
.day-btn.past { opacity: .55; }
.day-btn .hol { position: absolute; top: 6px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.day-list { padding: 8px 4px 4px; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 14px 6px; }
.day-head b { font-size: 20px; letter-spacing: -.015em; }
.day-head span { font: 600 15px/1 var(--font-round); color: var(--label-2); }
/* Bloco do dia: ícone do tipo num quadradinho na cor da matéria (padrão das linhas de Ajustes), sem faixa lateral */
.block { display: grid; grid-template-columns: 30px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px 12px 12px; border-radius: 18px; }
.block:hover { background: var(--fill); }
.block .bk-ic { width: 30px; height: 30px; border-radius: var(--r-xs); display: grid; place-items: center; color: #fff; background: var(--dc); }
.block .bk-ic .ic { width: 17px; height: 17px; }
.block small { font-size: 13px; font-weight: 600; color: var(--label-2); }
.block b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin-top: 2px; }
.block .t { font: 600 15px/1 var(--font-round); color: var(--label-2); }
.block.done { opacity: .5; }
.block.done b { text-decoration: line-through; }

/* ---------- VOCÊ ---------- */
.me-head { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: 24px; }
.me-avatar { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--tint); }
.me-avatar img { width: 100%; height: 100%; object-fit: cover; }
.me-head h2 { margin: 0; font-family: var(--font-display); font-size: 28px; letter-spacing: -.02em; }
.level { display: flex; align-items: center; gap: 10px; margin-top: 8px; font: 600 14px/1 var(--font-round); color: var(--label-2); }
.level .track { flex: 1; max-width: 260px; height: 8px; border-radius: 8px; background: var(--fill); overflow: hidden; }
.level .track i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--tint), var(--tint-hi)); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.stat { padding: 18px; }
.stat b { display: block; font: 700 30px/1.05 var(--font-round); letter-spacing: -.02em; }
.stat span { font-size: 14px; color: var(--label-2); font-weight: 600; }
.stat .ic { color: var(--dc, var(--tint)); margin-bottom: 10px; }
.medals { display: grid; grid-auto-flow: column; grid-auto-columns: 96px; gap: 12px; overflow-x: auto; padding: 4px 4px 12px; scrollbar-width: none; }
.medal { display: grid; justify-items: center; align-content: start; gap: 8px; text-align: center; font-size: 13px; font-weight: 600; color: var(--label-2); }
.medal .m { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 35% 30%, #ffe39a, var(--gold) 55%, #8c6d1f); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), 0 10px 22px -8px rgba(140, 109, 31, .7); }
.medal.locked .m { background: var(--fill); color: var(--label-4); box-shadow: none; }
.settings { overflow: hidden; }
.set-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 16px; min-height: 52px; }
.set-row + .set-row { border-top: 0; background-image: linear-gradient(var(--sep), var(--sep)); background-size: calc(100% - 58px) .5px; background-position: right top; background-repeat: no-repeat; }
.set-row.kv + .set-row.kv { background-size: calc(100% - 18px) .5px; }

/* ---------- Você: identidade centrada (Conta Apple), três números com fio ---------- */
.me-id { display: grid; justify-items: center; text-align: center; gap: 0; padding: 28px 20px 22px; }
.me-id .me-av { position: relative; width: 80px; height: 80px; border-radius: 50%; }
.me-id .me-av .av-ini { font-size: 28px; font-weight: 700; }
.me-id .me-av-edit { position: absolute; right: -2px; bottom: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--label-2); box-shadow: 0 0 0 3px var(--surface); }
.me-id .me-at { margin-top: 14px; padding: 2px 8px; border-radius: 10px; color: var(--label); }
.me-id .me-at h2 { margin: 0; font: 700 22px/1.2 var(--font-display); letter-spacing: -.02em; }
.me-id .me-sub { margin: 4px 0 0; font-size: 15px; color: var(--label-2); }
.me-id .me-level { display: grid; justify-items: center; gap: 8px; margin-top: 14px; padding: 4px 8px; border-radius: 10px; font-size: 13px; color: var(--label-2); }
.me-id .me-level b { color: var(--tint-ink, var(--tint)); font-weight: 600; font-size: 13px; }
.me-id .me-level .track { width: 200px; height: 4px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.me-id .me-level .track i { display: block; height: 100%; border-radius: 4px; background: var(--tint); transform-origin: left; }
.me-id .me-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.me-trio { display: grid; grid-template-columns: repeat(3, 1fr); padding: 16px 0; }
.me-trio > div { display: grid; gap: 2px; padding: 0 16px; text-align: center; }
.me-trio > div + div { box-shadow: inset .5px 0 0 var(--sep); }
.me-trio b { font: 700 22px/1.15 var(--font-round); font-variant-numeric: tabular-nums; }
.me-trio span { font-size: 13px; color: var(--label-2); }
.me-trio + .set-group { margin-top: 16px; }
.me-seg > .seg[data-seg] { display: grid; width: min(100%, 520px); }
.set-group .set-col .seg button { padding: 0 10px; font-size: 14px; white-space: nowrap; }
.set-group .set-col { grid-template-columns: 30px minmax(0, 1fr); }
.me-seg > .seg[data-seg] button { padding: 0 10px; font-size: 14px; white-space: nowrap; }
@media (max-width: 860px) { .me-seg > .seg[data-seg] { width: 100%; } }
.set-row .tile { width: 30px; height: 30px; border-radius: var(--r-xs); display: grid; place-items: center; color: #fff; background: var(--dc, var(--tint)); }
.set-row .tile .ic { width: 18px; height: 18px; }
.set-row b { font-weight: 500; }

/* ---------- PLANEJAR (conversa) ---------- */
.chat { max-width: 680px; margin: 0 auto; padding-bottom: 220px; }
.chat-top { position: fixed; z-index: 46; top: max(14px, env(safe-area-inset-top)); left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; }
.chat-top .glass-capsule { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 6px; }
.chat-who { display: flex; align-items: center; gap: 10px; padding-right: 8px; }
.chat-who img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.chat-who b { display: block; font-size: 15px; }
.chat-who small { display: block; font-size: 13px; color: var(--ok-ink); font-weight: 600; }
[data-theme="dark"] .chat-who small { color: var(--ok); }
.msgs { display: grid; gap: 6px; padding-top: 20px; }
.msg { max-width: 78%; padding: 11px 16px; border-radius: var(--r-md); font-size: 17px; line-height: 1.38; animation: msg-in .55s var(--settle) both; transform-origin: 0 100%; }
.msg.them { justify-self: start; background: var(--surface); box-shadow: var(--shadow-card); border-bottom-left-radius: 8px; }
.msg.me { justify-self: end; background: var(--tint); color: #fff; border-bottom-right-radius: 8px; transform-origin: 100% 100%; }
.msg-row { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: end; }
.msg-row img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; transition: opacity .25s; }
.msg-row.cont img { opacity: 0; }
.msg-row.cont .msg.them { border-bottom-left-radius: 22px; }
.msg-row + .msg.me, .msg.me + .msg-row { margin-top: 10px; }
.msg-row .msg { max-width: 92%; }
.read { justify-self: end; font-size: 12px; color: var(--label-3); font-weight: 600; margin: -2px 6px 6px; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.9); } }
.typing { display: inline-flex; gap: 4px; padding: 15px 16px; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--label-4); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 30% { transform: translateY(-4px); background: var(--label-2); } 60% { transform: none; } }
.composer { position: fixed; z-index: 46; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom)); display: flex; justify-content: center; padding: 0 16px; pointer-events: none; }
.composer > .glass { pointer-events: auto; width: min(680px, 100%); border-radius: 30px; padding: 12px; display: grid; gap: 10px; }
/* Escondido de verdade enquanto o Sgt Valverde digita: o display: grid vencia o hidden e deixava uma pílula vazia (ou as
   opções já respondidas, sem efeito no clique) no rodapé */
.composer > .glass[hidden] { display: none; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.choice { height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: 16px; background: var(--surface); box-shadow: var(--shadow-card); }
.choice[aria-pressed="true"] { background: var(--tint); color: #fff; }
.choice-go { background: var(--tint); color: #fff; }
.slider-wrap { display: grid; gap: 6px; padding: 4px 10px 0; }
.slider-val { text-align: center; font: 700 34px/1 var(--font-round); letter-spacing: -.02em; }
.slider-val small { font-size: 16px; color: var(--label-2); font-weight: 600; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--tint) var(--p, 30%), var(--fill-2) var(--p, 30%)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .25), 0 0 0 .5px rgba(0, 0, 0, .06); transition: transform .3s var(--settle); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.18); }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 8px; background: var(--fill-2); }
input[type="range"]::-moz-range-progress { height: 8px; border-radius: 8px; background: var(--tint); }
input[type="range"]::-moz-range-thumb { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); }
.proposal { max-width: 100%; padding: 18px; display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; animation: msg-in .7s var(--settle) both; }
.proposal ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 15px; }
.proposal li { display: flex; align-items: center; gap: 8px; }
.proposal li i { width: 10px; height: 10px; border-radius: 3px; background: var(--dc); }
.proposal li b { margin-left: auto; font-family: var(--font-round); }

/* ---------- Sheet (modal) ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 80; background: var(--scrim); -webkit-backdrop-filter: blur(6px) saturate(120%); backdrop-filter: blur(6px) saturate(120%); opacity: 0; transition: opacity .45s var(--ease-out); }
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed; z-index: 81; left: 50%; top: 50%; width: min(520px, calc(100vw - 32px)); max-height: min(86dvh, 780px); overflow: auto;
  border-radius: var(--r-xl); padding: 26px; translate: -50% -50%;
  background: var(--glass-bg-strong);
  transform-origin: var(--ox, 50%) var(--oy, 50%);
  opacity: 0; scale: .62; filter: blur(10px);
  transition: scale .62s var(--settle), opacity .32s var(--ease-out), filter .4s var(--ease-out);
}
.sheet.open { opacity: 1; scale: 1; filter: none; }
.sheet.closing { transition-duration: .34s, .26s, .3s; transition-timing-function: var(--ease-out); }
.sheet-grab { display: none; }
.sheet h2 { margin: 0 0 6px; font-family: var(--font-display); font-size: 26px; letter-spacing: -.02em; line-height: 1.15; }
.sheet p.lead { margin: 0 0 18px; color: var(--label-2); font-size: 16px; line-height: 1.45; }
.sheet-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--label-2); z-index: 5; }
.sheet .stack { display: grid; gap: 10px; margin-top: 18px; }
.opt { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; width: 100%; padding: 14px; border-radius: 20px; background: var(--surface); text-align: left; box-shadow: var(--shadow-card); }
.opt .tile { width: 44px; height: 44px; border-radius: var(--r-sm); display: grid; place-items: center; color: #fff; background: var(--dc, var(--tint)); }
.opt b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: var(--label); }
/* O título herdava o cinza do span que o envolve (.opt span pega os dois): "Terminei" e "Cronometrar agora" saíam em 4:1 */
.opt span { font-size: 15px; color: var(--label-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 38px; padding: 0 15px; border-radius: 999px; background: var(--fill); font-weight: 600; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--tint-cta, var(--tint)); color: var(--on-tint, #fff); }
.field-label { font-size: 13px; font-weight: 700; color: var(--label-2); text-transform: uppercase; letter-spacing: .04em; margin: 20px 2px 10px; }
.step-dots { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.step-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--fill-2); }
.step-dots i.on { background: var(--tint); width: 20px; border-radius: 7px; }

/* ---------- Menu de vidro (nasce do controle tocado, iOS 26) ---------- */
.menu { position: fixed; z-index: 96; width: 288px; max-width: calc(100vw - 16px); padding: 6px; border-radius: 28px; opacity: 0; transform: scale(.92); transition: transform var(--t-menu) var(--settle), opacity 200ms var(--ease-out); }
.menu.open { opacity: 1; transform: none; }
.menu.closing { transition-duration: 220ms, 160ms; transition-timing-function: var(--ease-out); }
.menu-row { display: grid; grid-template-columns: 36px 1fr 20px; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 0 12px 0 10px; border-radius: var(--r-md); text-align: left; color: var(--label); }
.menu-row:hover, .menu-row:focus-visible { background: var(--fill); outline: none; }
.menu-row .mr-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--mc, var(--tint)); color: #fff; overflow: hidden; }
.menu-row .mr-ic img { width: 22px; height: 22px; object-fit: contain; }
.menu-row .mr-ic img.white { filter: brightness(0) invert(1); }
.menu-row b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.menu-row small { display: block; margin-top: 1px; font-size: 13px; color: var(--label-2); }
.menu-row .mr-check { width: 20px; height: 20px; color: var(--mc, var(--tint)); opacity: 0; stroke-width: 2.6; }
.menu-row[aria-checked="true"] .mr-check { opacity: 1; }
.menu-row.compact { min-height: 44px; grid-template-columns: 1fr 20px; padding: 0 14px; }
.menu-row.compact b { font-size: 16px; font-weight: 500; }
.menu-sep { height: .5px; margin: 6px 12px; background: var(--sep); }
.menu-theme { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; min-height: 52px; padding: 0 6px 0 14px; }
.menu-theme b { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--label-2); }
.menu-theme b .ic { width: 18px; height: 18px; flex: none; }
.menu-theme .seg button { height: 32px; padding: 0 12px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.menu-theme .seg .ic { width: 16px; height: 16px; }

/* ---------- Toast (ilha) ---------- */
#toast-root { position: fixed; z-index: 120; top: max(14px, env(safe-area-inset-top)); left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: 999px; color: var(--label); font-weight: 600; font-size: 15px; transform: translateY(-16px) scale(.9); opacity: 0; transition: transform var(--t-menu) var(--settle), opacity .24s var(--ease-out); }
.toast.show { transform: none; opacity: 1; }
.toast .badge { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: #fff; }
.toast small { display: block; font-weight: 500; color: var(--label-2); font-size: 13px; }

/* ---------- Entrada escalonada do conteúdo ---------- */
.rise { animation: rise .8s var(--settle-soft) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); } }

/* ---------- View Transitions (navegação estilo iOS) ---------- */
::view-transition-old(page), ::view-transition-new(page) { animation-duration: .5s; animation-timing-function: var(--ease-out); }
html[data-vt="push"]::view-transition-old(page) { animation: vt-out-left .5s var(--ease-out) both; }
html[data-vt="push"]::view-transition-new(page) { animation: vt-in-right .55s var(--settle-soft) both; }
html[data-vt="pop"]::view-transition-old(page) { animation: vt-out-right .45s var(--ease-out) both; }
html[data-vt="pop"]::view-transition-new(page) { animation: vt-in-left .55s var(--settle-soft) both; }
html[data-vt="tab"]::view-transition-old(page) { animation: vt-fade-out .22s var(--ease-out) both; }
html[data-vt="tab"]::view-transition-new(page) { animation: vt-fade-in .5s var(--settle-soft) both; }
@keyframes vt-out-left { to { transform: translateX(-12%); opacity: 0; filter: brightness(.7); } }
@keyframes vt-in-right { from { transform: translateX(22%); opacity: 0; } }
@keyframes vt-out-right { to { transform: translateX(16%); opacity: 0; } }
@keyframes vt-in-left { from { transform: translateX(-10%); opacity: 0; } }
@keyframes vt-fade-out { to { opacity: 0; transform: scale(.985); } }
@keyframes vt-fade-in { from { opacity: 0; transform: scale(1.012) translateY(6px); } }
::view-transition-group(*) { animation-duration: .6s; animation-timing-function: var(--settle-soft); }
::view-transition-image-pair(*) { isolation: auto; }

/* ---------- Responsivo: celular ---------- */
@media (max-width: 860px) {
  :root { --pad: 16px; }
  .chrome { grid-template-columns: 1fr auto; padding-left: 14px; padding-right: 14px; }
  .chrome-left { padding-right: 12px; }
  .chrome-left .bn-home small { display: none; }
  .tabbar {
    position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); translate: -50% 0;
    width: min(420px, calc(100vw - 28px)); justify-content: space-between; padding: 5px;
  }
  .tab { flex: 1; flex-direction: column; gap: 2px; height: 56px; padding: 0; font-size: 11px; font-weight: 600; justify-content: center; }
  .tab .ic { width: 25px; height: 25px; }
  .chip-timer { padding: 0 10px; font-size: 14px; }
  .view { padding-top: 84px; padding-bottom: 130px; }
  .lt { margin-top: 10px; }
  .lt h1 { font-size: 34px; }
  .grid-2, .plan-grid, .lesson-wrap { grid-template-columns: 1fr; }
  .now { min-height: 460px; padding: 22px; }
  .now h2 { font-size: 34px; }
  .rings-wrap { grid-template-columns: 140px 1fr; gap: 16px; }
  .hero-course { min-height: 440px; padding: 22px; }
  .hero-course h2 { font-size: 46px; }
  .hero-course::after { background: linear-gradient(0deg, rgba(4, 8, 30, .9), rgba(4, 8, 30, .3) 60%, transparent); }
  .shelf { grid-auto-columns: 72%; }
  .disc-hero { margin-top: -84px; height: 62vh; }
  .hero-course img { object-position: 30% 30%; }
  .disc-hero h1 { font-size: 44px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .side-list { position: static; max-height: none; }
  .player.is-pdf { height: 70dvh; }
  .cycle-card { position: static; }
  .proposal { grid-template-columns: 1fr; justify-items: center; }
  .sheet { left: 0; right: 0; top: auto; bottom: 0; width: 100%; translate: 0 0; max-height: 92dvh; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 14px 20px max(24px, env(safe-area-inset-bottom)); scale: 1; filter: none; transform: translateY(105%); opacity: 1; transition: transform .62s var(--settle-soft); }
  .sheet.open { transform: none; }
  .sheet.closing { transition: transform .38s var(--ease-out); }
  .sheet-grab { display: block; width: 40px; height: 5px; border-radius: 5px; background: var(--fill-2); margin: 0 auto 14px; }
  .round-actions .glass-capsule { width: calc(100vw - 24px); justify-content: space-between; }
  .q-card { padding: 20px 18px; }
  .q-text { font-size: 18px; }
  .resume { grid-template-columns: 88px 1fr auto; }
  .fab-continue { bottom: calc(max(14px, env(safe-area-inset-bottom)) + 78px); width: calc(100vw - 28px); }
  .fab-continue span { flex: 1; }
  .resume-thumb { width: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

.credit { margin: 36px 4px 0; font-size: 13px; color: var(--label-3); }
.credit a { color: var(--label-2); text-decoration: underline; text-underline-offset: 2px; }

/* Atalhos de questões, simulados e planos */
.q-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.q-chip { display: flex; align-items: center; gap: 14px; padding: 16px; text-align: left; }
.q-chip .tile { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--dc); flex: none; }
.q-chip b { display: block; font-size: 24px; font-weight: 700; line-height: 1; }
.q-chip small { font-size: 14px; color: var(--label-2); font-weight: 600; }
.sims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sim { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; padding: 16px 18px 16px 16px; text-align: left; }
.sim-n { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-size: 22px; font-weight: 700; background: color-mix(in srgb, var(--tint) 14%, transparent); color: var(--tint-ink, var(--tint)); }
.sim b { display: block; font-size: 17px; font-weight: 600; }
.sim small { font-size: 14px; color: var(--label-2); }
.sim-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--label-2); }
.sim.done .sim-ic { background: var(--ok); color: #fff; }
.sim.open .sim-ic { background: var(--tint); color: #fff; }
.sim.locked .sim-n { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); }
.sim.locked .sim-ic { background: var(--gold); color: #fff; }
.tiers { display: grid; gap: 10px; }
.tier { position: relative; padding: 16px 18px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-card); display: grid; gap: 4px; }
.tier.rec { box-shadow: inset 0 0 0 2px var(--tint), var(--shadow-card); }
.tier-h { display: flex; align-items: center; gap: 10px; }
.tier-h b { font-size: 18px; }
.tier .tag { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--fill); color: var(--label-2); }
.tier .tag.tint { background: var(--tint-cta, var(--tint)); color: var(--on-tint, #fff); }
.tier-ic { position: absolute; top: 16px; right: 16px; display: flex; gap: 6px; color: var(--tint-ink, var(--tint)); }
.tier .muted { font-size: 15px; padding-right: 60px; }
@media (max-width: 860px) { .q-quick, .sims { grid-template-columns: 1fr; } }

/* Cartão de meta (Hoje) */
.goal { position: relative; display: block; margin-top: 18px; height: 260px; border-radius: var(--r-xl); overflow: hidden; color: #fff; isolation: isolate; box-shadow: 0 24px 50px -24px rgba(5, 10, 40, .6); }
.goal img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform 1.2s var(--ease-out); }
.goal:hover img { transform: scale(1.04); }
.goal::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4, 7, 25, .9), rgba(4, 7, 25, .35) 60%, rgba(4, 7, 25, .1)); }
.goal-body { position: absolute; left: 28px; bottom: 26px; right: 28px; display: grid; gap: 4px; }
.goal-body .eyebrow { color: var(--gold); margin: 0; }
.goal-body > b { font-family: var(--font-display); font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.goal-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.goal-stat { height: 34px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; background: rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.goal-stat b { font-size: 16px; }
@media (max-width: 860px) { .goal { height: 300px; } .goal-body > b { font-size: 26px; } .goal::after { background: linear-gradient(0deg, rgba(4, 7, 25, .92), rgba(4, 7, 25, .2) 70%); } }

/* ---------- Microinterações (rodada 14) ----------
   Discretas e sem rebote (cubic-bezier(.22,1,.36,1) e as curvas de assentamento). Somem com o "Reduzir movimento": as
   regras globais de prefers-reduced-motion (acima) e de html[data-motion="reduce"] (canga.css) zeram a duração. */
/* Tique que se desenha ao concluir: no aviso, no "Concluída" da aula, na alternativa certa, no bloco cumprido e no módulo */
:is(.toast.show .badge, .done-pill, .alt.right .mark, .tl-check, .module-n.full, .bk-ic, .lan-check) .i-check,
.lan-check.i-check { stroke-dasharray: 24; stroke-dashoffset: 0; animation: tick-draw .5s .08s var(--ease-out) both; }
@keyframes tick-draw { from { stroke-dashoffset: 24; } }
/* O selo do aviso entra com um leve aumento, sem passar do tamanho */
.toast.show .badge { animation: badge-in .46s var(--settle) both; }
@keyframes badge-in { from { transform: scale(.55); opacity: .3; } }
/* Voto: a seta dá um passo na direção do voto ao marcar */
.vote.up[aria-pressed="true"] .ic { animation: vote-up .4s var(--ease-out); }
.vote.down[aria-pressed="true"] .ic { animation: vote-down .4s var(--ease-out); }
@keyframes vote-up { 45% { transform: translateY(-3px) scale(1.16); } }
@keyframes vote-down { 45% { transform: translateY(3px) scale(1.16); } }
/* Toque nas linhas de lista: além de encolher, um fundo leve enquanto o dedo está em cima */
:is(.set-row, .tp-row, .nx-open, .ql-row, .dom-row, .tn-row).is-pressed { background-color: var(--fill); }
/* Compartilhar e salvar: o ícone sobe um pouco no toque */
:is(.share-btn, .res-share).is-pressed .ic { transform: translateY(-2px); }
.share-btn .ic, .res-share .ic { transition: transform .22s var(--ease-out); }
/* Seletor: o texto do botão marcado acompanha o marcador com um leve atraso */
.seg button { transition: color .32s var(--ease-out) .04s; }
