:root {
  --bg: #faf9f6;
  --sidebar: #f2f0eb;
  --surface: #ffffff;
  --surface-2: #efede7;
  --hover: rgba(20, 20, 19, .06);
  --text: #1a1a18;
  --muted: #6f6c64;
  --border: #e3e0d8;
  --accent: #2563eb;
  --accent-soft: #e3ebfd;
  --accent-text: #ffffff;
  --user-bg: #ecebe6;
  --warn-bg: #fff7ed;
  --warn-border: #fdba74;
  --warn-text: #9a3412;
  --hl: #fde68a;
  --danger: #dc2626;
  --shadow: 0 1px 2px rgba(20, 20, 19, .05), 0 6px 24px rgba(20, 20, 19, .06);
  --radius: 18px;
  --sb-w: 272px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1f1f1d;
    --sidebar: #171716;
    --surface: #2a2a27;
    --surface-2: #31312d;
    --hover: rgba(255, 255, 255, .06);
    --text: #ecebe6;
    --muted: #a3a097;
    --border: #3a3935;
    --accent: #6ea0ff;
    --accent-soft: #23304a;
    --accent-text: #0e1320;
    --user-bg: #33332f;
    --warn-bg: #2d1f12;
    --warn-border: #9a3412;
    --warn-text: #fdba74;
    --hl: #7a5d10;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 24px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  --bg: #1f1f1d; --sidebar: #171716; --surface: #2a2a27; --surface-2: #31312d;
  --hover: rgba(255, 255, 255, .06); --text: #ecebe6; --muted: #a3a097; --border: #3a3935;
  --accent: #6ea0ff; --accent-soft: #23304a; --accent-text: #0e1320; --user-bg: #33332f;
  --warn-bg: #2d1f12; --warn-border: #9a3412; --warn-text: #fdba74; --hl: #7a5d10;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--danger); min-height: 1.2em; margin: 0; font-size: 14px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
button { font: inherit; color: inherit; }
input[type=text], input[type=password], select, textarea {
  font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px; width: 100%;
}
input:focus-visible, select:focus-visible, button:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn { font-weight: 600; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 11px 16px; cursor: pointer; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 12px; font-size: 14px; }
.icon-btn { background: transparent; border: 0; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.icon-btn:hover { background: var(--hover); }

/* ---------------------------------------------------------------- login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 360px; padding: 28px 22px; display: flex; flex-direction: column; gap: 12px; text-align: center; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.login-card h1 { margin: 4px 0 0; font-size: 24px; }
.login-card p { margin: 0 0 8px; }
.login-card input, .login-card .btn { width: 100%; }

/* ---------------------------------------------------------------- shell */
.shell { display: flex; height: 100dvh; overflow: hidden; }
.sidebar {
  width: var(--sb-w); flex-shrink: 0; background: var(--sidebar); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 12px 10px; padding-top: max(12px, env(safe-area-inset-top));
}
.sb-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: .02em; }
.sb-new { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.sb-new:hover { border-color: var(--accent); }
.conv-list { flex: 1; overflow-y: auto; margin: 14px -4px 8px; padding: 0 4px; scrollbar-width: thin; }
.conv-group { font-size: 12px; font-weight: 600; color: var(--muted); padding: 14px 10px 6px; }
.conv-item { position: relative; display: flex; align-items: center; border-radius: 10px; }
.conv-item a { flex: 1; min-width: 0; padding: 8px 10px; color: var(--text); text-decoration: none; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item:hover { background: var(--hover); }
.conv-item.active { background: var(--surface-2); }
.conv-item.active a { font-weight: 600; }
.conv-more { opacity: 0; width: 30px; height: 30px; margin-right: 4px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.conv-item:hover .conv-more, .conv-item.active .conv-more { opacity: 1; }
.conv-more:hover { background: var(--hover); color: var(--text); }
.conv-empty { padding: 10px; font-size: 14px; color: var(--muted); }
.sb-bottom { border-top: 1px solid var(--border); padding-top: 8px; display: flex; flex-direction: column; gap: 2px; padding-bottom: env(safe-area-inset-bottom); }
.sb-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; font-size: 14.5px; }
.sb-item:hover { background: var(--hover); }
.scrim { display: none; }
.mobile-only { display: none; }

.menu { position: fixed; z-index: 40; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 4px; min-width: 160px; }
.menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; font-size: 14.5px; }
.menu button:hover { background: var(--hover); }
.menu .danger { color: var(--danger); }

@media (max-width: 820px) {
  .mobile-only { display: grid; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow); width: min(84vw, 300px); }
  .shell.sb-open .sidebar { transform: none; }
  .shell.sb-open .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.35); }
  .conv-more { opacity: 1; }
}

/* ---------------------------------------------------------------- main */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); min-height: 58px; }
.conv-title { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip { font-size: 13.5px; background: transparent; border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; color: var(--muted); }
.chip:hover { background: var(--hover); color: var(--text); }
.col { width: 100%; max-width: 740px; margin: 0 auto; padding: 0 16px; }

.chat { flex: 1; overflow-y: auto; padding: 8px 0 24px; }
.hero { display: none; text-align: center; padding: 0 8px; }
.hero h2 { margin: 0 0 6px; font-size: clamp(26px, 5vw, 36px); font-weight: 600; letter-spacing: -.01em; font-family: ui-serif, Georgia, "Times New Roman", serif; }
.hero p { margin: 0; font-size: 16px; }

/* tela inicial: saudação e caixa de texto no meio da tela */
.main.is-empty .chat { flex: 0 0 auto; margin-top: auto; overflow: visible; padding-bottom: 20px; }
.main.is-empty .hero { display: block; }
.main.is-empty .composer-wrap { margin-bottom: auto; }
.main.is-empty .topic-cards { display: grid; }

.msg { margin: 22px 0; }
.msg.user { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.msg.user .bubble { background: var(--user-bg); padding: 10px 16px; border-radius: 20px; max-width: 85%; font-size: 16.5px; white-space: pre-wrap; }
.msg.tutor { display: flex; gap: 12px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; background: radial-gradient(circle at 35% 30%, #fff 0%, #93c5fd 30%, #2563eb 75%); box-shadow: 0 0 0 2px var(--bg); }
.avatar.natural { background: radial-gradient(circle at 35% 30%, #fff 0%, #f0abfc 30%, #8b5cf6 75%); }
.tutor-body { min-width: 0; flex: 1; }
.tutor-name { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.tutor-text { font-size: 17px; line-height: 1.6; }
.tutor-text.masked .words { filter: blur(6px); user-select: none; }
.words .w { cursor: pointer; border-radius: 4px; transition: background .08s; }
.words .w:hover { background: var(--hover); }
.words .w.on { background: var(--hl); }
.trans { font-size: 15px; color: var(--muted); margin-top: 6px; font-style: italic; }
.tools { display: flex; gap: 2px; flex-wrap: wrap; margin-top: 6px; margin-left: -8px; }
.tool { font-size: 13px; color: var(--muted); background: transparent; border: 0; border-radius: 8px; padding: 5px 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.tool svg { width: 15px; height: 15px; }
.tool:hover { color: var(--text); background: var(--hover); }
.correction { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text); border-radius: 14px; padding: 8px 12px; font-size: 14px; max-width: 85%; }
.correction s { opacity: .75; }
.correction b { color: var(--text); }
.typing { display: inline-flex; gap: 5px; padding: 10px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* ---------------------------------------------------------------- composer */
.composer-wrap { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.suggestions { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.suggestions:empty { display: none; }
.suggestions button { flex-shrink: 0; font-size: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; cursor: pointer; max-width: 80vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestions button:hover { border-color: var(--accent); }
.composer { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); padding: 12px 12px 10px 16px; transition: border-color .15s; }
.composer:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.composer textarea { display: block; border: 0; background: transparent; padding: 4px 0; resize: none; max-height: 200px; font-size: 16.5px; line-height: 1.5; outline: none; }
.composer-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.spacer { flex: 1; }
.topic-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; padding: 0 4px 0 10px; color: var(--muted); max-width: 60%; }
.topic-chip svg { width: 16px; height: 16px; }
.topic-chip select { border: 0; background: transparent; padding: 6px 6px 6px 0; font-size: 13.5px; color: var(--text); width: auto; min-width: 0; cursor: pointer; }
.voice-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 8px 14px 8px 10px; background: var(--accent); color: var(--accent-text); font-weight: 600; font-size: 14px; cursor: pointer; }
.voice-btn:hover { filter: brightness(1.08); }
.send-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--text); color: var(--bg); display: grid; place-items: center; cursor: pointer; }
.send-btn:disabled { opacity: .25; cursor: default; }
.mini-orb { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, rgba(255,255,255,.4) 60%, transparent 72%); box-shadow: 0 0 10px rgba(255,255,255,.6); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.85); } 50% { transform: scale(1.08); } }

.topic-cards { display: none; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.topic-card { text-align: left; background: transparent; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.topic-card:hover { background: var(--surface); border-color: var(--accent); }
.topic-card b { font-size: 14.5px; }
.topic-card span { font-size: 13px; color: var(--muted); }
@media (max-width: 600px) { .topic-cards { grid-template-columns: repeat(2, 1fr); } .topic-card:nth-child(n+5) { display: none; } }

/* ---------------------------------------------------------------- settings */
.sheet { border: 0; padding: 0; background: transparent; width: 100%; max-width: 520px; max-height: 92dvh; margin: auto auto 0; color: var(--text); }
.sheet::backdrop { background: rgba(0, 0, 0, .45); }
@media (min-width: 640px) { .sheet { margin: auto; } }
.sheet-body { background: var(--surface); border-radius: 22px 22px 0 0; padding: 16px 18px 24px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; max-height: 92dvh; }
@media (min-width: 640px) { .sheet-body { border-radius: 22px; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; font-size: 20px; }
.sheet label, .field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.field > span { font-size: 14px; }
.hint { margin: 0; }
.sheet label.switch { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 15px; }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; font-size: 14px; padding: 8px 4px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; }
.seg button.on { background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
.seg button:disabled { opacity: .35; cursor: default; }

.popover { position: fixed; z-index: 50; max-width: min(320px, calc(100vw - 32px)); background: var(--text); color: var(--bg); padding: 10px 12px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); }
.popover b { display: block; font-size: 15px; }
.toast { position: fixed; left: 50%; bottom: 140px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 60; max-width: calc(100vw - 32px); }

/* ---------------------------------------------------------------- voice call */
.call {
  position: fixed; inset: 0; z-index: 35; display: flex; flex-direction: column;
  background: radial-gradient(120% 80% at 50% 30%, #13213f 0%, #070b16 70%);
  color: #e8edf7; padding: max(12px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}
.call-top { display: flex; justify-content: space-between; align-items: center; max-width: 760px; width: 100%; margin: 0 auto; font-size: 15px; color: #a9b4cc; }
.call .icon-btn { color: #e8edf7; }
.call .icon-btn:hover { background: rgba(255,255,255,.08); }
.orb-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 44px; }
.orb {
  --lvl: 0; --c1: #7cc4ff; --c2: #2563eb; --glow: rgba(96, 165, 250, .55);
  position: relative; width: min(52vw, 240px); aspect-ratio: 1; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%;
}
.orb .core, .orb .ring { position: absolute; inset: 0; border-radius: 50%; }
.orb .core {
  background: radial-gradient(circle at 38% 32%, #fff 0%, var(--c1) 22%, var(--c2) 62%, #0b1b44 100%);
  transform: scale(calc(.78 + var(--lvl) * .32));
  box-shadow: 0 0 calc(30px + var(--lvl) * 90px) calc(4px + var(--lvl) * 26px) var(--glow), inset 0 -18px 40px rgba(0,0,0,.35);
}
.orb .ring { border: 2px solid var(--c1); opacity: calc(.12 + var(--lvl) * .5); transform: scale(calc(.9 + var(--lvl) * .25)); }
.orb .r2 { transform: scale(calc(.98 + var(--lvl) * .42)); opacity: calc(.06 + var(--lvl) * .3); }
.orb[data-state="hearing"] { --c1: #9be8ff; --c2: #1d9bf0; --glow: rgba(56, 189, 248, .7); }
.orb[data-state="speaking"] { --c1: #f5c2ff; --c2: #8b5cf6; --glow: rgba(167, 139, 250, .65); }
.orb[data-state="thinking"] { --c1: #c7d2fe; --c2: #4f46e5; --glow: rgba(129, 140, 248, .45); }
.orb[data-state="thinking"] .ring { animation: spin 1.6s linear infinite; border-style: dashed; }
@keyframes spin { to { rotate: 360deg; } }
.call-status { margin: 0; color: #a9b4cc; font-size: 15px; min-height: 1.4em; text-align: center; }
.call-caption { max-width: 640px; width: 100%; margin: 0 auto 18px; text-align: center; display: flex; flex-direction: column; gap: 10px; max-height: 38dvh; overflow-y: auto; }
.call-caption.waiting .cap-en, .call-caption.waiting .cap-native { visibility: hidden; }
.cap-you { font-size: 14px; color: #8f9bb5; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cap-you .you-text::before { content: "Você: "; color: #6b7894; }
.cap-you .correction { text-align: left; background: rgba(251, 146, 60, .12); border-color: rgba(251, 146, 60, .45); color: #fed7aa; }
.cap-you .correction b { color: #fff; }
.cap-en { font-size: clamp(20px, 5.2vw, 26px); line-height: 1.4; font-weight: 500; color: #fff; }
.cap-en.masked { filter: blur(8px); cursor: pointer; user-select: none; }
.cap-en .w.on { background: rgba(250, 204, 21, .35); }
.cap-native { font-size: 16px; color: #b6c2da; font-style: italic; }
.call-controls { display: flex; justify-content: center; gap: 18px; }
.round { width: 58px; height: 58px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; cursor: pointer; }
.round:hover { background: rgba(255,255,255,.16); }
.round.off { background: rgba(255,255,255,.04); color: #6b7894; }
#muteBtn.off { background: #fff; color: #0b1120; }
.round.end { background: #dc2626; }
.round.end:hover { background: #ef4444; }
.round-txt { font-weight: 700; font-size: 14px; letter-spacing: .5px; }
@media (prefers-reduced-motion: reduce) { .mini-orb, .orb[data-state="thinking"] .ring { animation: none; } .sidebar { transition: none; } }

/* ---------------------------------------------------------------- perfil / primeiro acesso */
.sb-profile { font-weight: 600; }
.me-avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--accent); color: var(--accent-text); flex-shrink: 0; }

.onboard { position: fixed; inset: 0; z-index: 45; background: var(--bg); overflow-y: auto; display: flex; justify-content: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.ob-card { width: 100%; max-width: 620px; display: flex; flex-direction: column; min-height: 100%; }
.ob-top { display: flex; align-items: center; gap: 14px; padding: 8px 0 24px; }
.ob-progress { flex: 1; height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.ob-progress span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .3s ease; }
.ob-skip { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; padding: 6px; }
.ob-skip:hover { color: var(--text); }
.ob-step { flex: 1; }
.ob-step h2 { font-family: ui-serif, Georgia, "Times New Roman", serif; font-size: clamp(26px, 5vw, 34px); font-weight: 600; margin: 0 0 6px; letter-spacing: -.01em; }
.ob-step > p { margin: 0 0 24px; color: var(--muted); }
.ob-nav { display: flex; justify-content: space-between; gap: 12px; padding: 20px 0 8px; position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); }
.ob-nav .btn { min-width: 120px; }
.ob-done { text-align: center; padding-top: 12vh; }
.ob-done .orb-mini { width: 96px; height: 96px; margin: 0 auto 24px; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #fff 0%, #7cc4ff 22%, #2563eb 62%, #0b1b44 100%); box-shadow: 0 0 60px rgba(96,165,250,.55); animation: breathe 2.6s ease-in-out infinite; }
.ob-done .btn { margin: 6px; }

.pf-fields, .ob-step .fields { display: flex; flex-direction: column; gap: 18px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .fgrid { grid-template-columns: 1fr; } }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.fld textarea { resize: vertical; min-height: 70px; }
.fld input[type=date] { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.pf-section { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 8px 0 -6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 7px 13px; cursor: pointer; font-size: 14px; color: var(--text); }
.chips button:hover { border-color: var(--accent); }
.chips button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.chips .chip-add { width: 190px; max-width: 100%; border-radius: 999px; padding: 7px 13px; font-size: 14px; background: transparent; border-style: dashed; }

.sheet.wide { max-width: 640px; }
.pf-mem-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border-top: 1px solid var(--border); padding-top: 16px; }
.pf-mem-head h3 { margin: 0; font-size: 16px; color: var(--text); }
.mem-list { display: flex; flex-direction: column; gap: 6px; }
.mem { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); font-size: 14.5px; }
.mem .cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); padding-top: 3px; min-width: 64px; }
.mem .txt { flex: 1; cursor: text; }
.mem button { border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 8px; width: 28px; height: 28px; display: grid; place-items: center; flex-shrink: 0; }
.mem button:hover { background: var(--hover); color: var(--danger); }
.mem-empty { font-size: 14px; color: var(--muted); padding: 4px 0; }
.mem-add { display: flex; gap: 8px; }
.pf-actions { display: flex; justify-content: flex-end; position: sticky; bottom: -24px; background: var(--surface); padding: 10px 0 4px; }

/* ---------------------------------------------------------------- flashcards */
.sb-cards { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 8px; padding: 9px 12px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; font-size: 14.5px; font-weight: 600; text-align: left; }
.sb-cards:hover { background: var(--hover); }
.sb-cards span:first-of-type { flex: 1; }
.badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--accent); color: var(--accent-text); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.hero-cards { margin-top: 16px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 8px 16px; font-size: 14px; cursor: pointer; }
.hero-cards:hover { border-color: var(--accent); }

.tip { margin-top: 10px; border: 1px solid color-mix(in srgb, #10b981 45%, var(--border)); background: color-mix(in srgb, #10b981 9%, var(--surface)); border-radius: 14px; padding: 10px 12px; font-size: 14.5px; display: flex; gap: 10px; align-items: flex-start; }
.tip .tip-ico { font-size: 16px; line-height: 1.3; }
.tip .tip-body { flex: 1; }
.tip b { color: var(--text); }
.tip .tip-ex { font-style: italic; color: var(--muted); }
.tip button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.tip button:disabled { opacity: .6; cursor: default; }
.cap-tip { font-size: 14px; color: #a7f3d0; }

.offer { margin: 22px 0; border: 1px dashed var(--border); border-radius: 16px; padding: 14px 16px; background: var(--surface); }
.offer p { margin: 0 0 10px; }
.offer .row { display: flex; flex-wrap: wrap; gap: 8px; }

.gen-list { display: flex; flex-direction: column; gap: 4px; max-height: 50dvh; overflow-y: auto; }
.gen-list label { flex-direction: row !important; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text) !important; font-size: 14.5px !important; cursor: pointer; }
.gen-list label:hover { background: var(--hover); }
.gen-list input { width: 18px; height: 18px; accent-color: var(--accent); }

.review { position: fixed; inset: 0; z-index: 42; background: var(--bg); display: flex; flex-direction: column; padding: max(10px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.rv-top { display: flex; align-items: center; gap: 12px; max-width: 680px; width: 100%; margin: 0 auto; }
.rv-progress { flex: 1; height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.rv-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.rv-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.rv-body { flex: 1; min-height: 0; max-width: 680px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 16px 0; overflow-y: auto; }
.fc { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); padding: 28px 24px; min-height: 300px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 12px; cursor: pointer; user-select: none; }
.fc .deck { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); }
.fc .front { font-size: clamp(26px, 6vw, 38px); font-weight: 650; letter-spacing: -.01em; line-height: 1.2; }
.fc .front.sentence { font-size: clamp(19px, 4.5vw, 24px); font-weight: 500; }
.fc .hint { font-size: 13px; color: var(--muted); }
.fc hr { width: 60%; border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.fc .back { font-size: 21px; font-weight: 600; }
.fc .ex { font-size: 17px; line-height: 1.5; }
.fc .ex mark { background: var(--hl); color: inherit; border-radius: 4px; padding: 0 2px; }
.fc .ex-pt { font-size: 15px; color: var(--muted); font-style: italic; }
.fc .expl { font-size: 14px; color: var(--muted); }
.speak { border: 1px solid var(--border); background: transparent; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13.5px; display: inline-flex; gap: 6px; align-items: center; color: var(--text); }
.speak svg { width: 16px; height: 16px; }
.speak:hover { background: var(--hover); }
.rv-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rv-actions button { border: 1px solid var(--border); border-radius: 14px; padding: 10px 6px; background: var(--surface); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 600; font-size: 15px; }
.rv-actions button small { font-weight: 500; font-size: 12px; color: var(--muted); }
.rv-actions .r1 { border-color: #fca5a5; } .rv-actions .r1:hover { background: #fee2e2; color: #991b1b; }
.rv-actions .r2 { border-color: #fcd34d; } .rv-actions .r2:hover { background: #fef3c7; color: #92400e; }
.rv-actions .r3 { border-color: #86efac; } .rv-actions .r3:hover { background: #dcfce7; color: #166534; }
.rv-actions .r4 { border-color: #93c5fd; } .rv-actions .r4:hover { background: #dbeafe; color: #1e40af; }
.rv-show { width: 100%; padding: 14px; font-size: 16px; }
.rv-done { text-align: center; }
.rv-done h2 { font-family: ui-serif, Georgia, "Times New Roman", serif; font-size: 32px; margin: 0 0 8px; }
.rv-stats { display: flex; justify-content: center; gap: 28px; margin: 22px 0; }
.rv-stats div { display: flex; flex-direction: column; }
.rv-stats b { font-size: 28px; }
.rv-stats span { font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- menu do usuário */
.sb-bottom { position: relative; border-top: 0; padding-top: 6px; }
.user-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; }
.user-btn:hover, .user-btn[aria-expanded="true"] { background: var(--hover); }
.user-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.user-txt span { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-txt small { font-size: 12px; color: var(--muted); }
.user-btn .chev { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; transform: rotate(180deg); }
.user-btn[aria-expanded="true"] .chev { transform: none; }
.me-avatar { width: 32px; height: 32px; font-size: 13px; }
.user-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 5px; z-index: 5; animation: pop .12s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.um-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; font-size: 14.5px; text-align: left; }
.um-item:hover { background: var(--hover); }
.um-item svg { width: 18px; height: 18px; color: var(--muted); }
.um-sep { height: 1px; background: var(--border); margin: 4px 6px; }

/* ---------------------------------------------------------------- configurações */
.settings-dlg { border: 0; padding: 0; background: transparent; width: min(880px, 100%); max-width: 100%; height: min(640px, 92dvh); max-height: 92dvh; margin: auto; color: var(--text); }
.settings-dlg::backdrop { background: rgba(0, 0, 0, .45); }
.st-wrap { display: flex; height: 100%; background: var(--surface); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.st-nav { width: 220px; flex-shrink: 0; background: var(--sidebar); padding: 20px 10px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--border); }
.st-nav h2 { font-size: 17px; margin: 0 10px 14px; }
.st-nav button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; font-size: 14.5px; text-align: left; color: var(--muted); }
.st-nav button svg { width: 18px; height: 18px; }
.st-nav button:hover { background: var(--hover); color: var(--text); }
.st-nav button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.st-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px 28px; }
.st-head h3 { margin: 0; font-size: 20px; }
.st-body { flex: 1; overflow-y: auto; padding: 8px 28px 28px; scrollbar-width: none; }
.st-body::-webkit-scrollbar, .sheet-body::-webkit-scrollbar, .conv-list::-webkit-scrollbar { display: none; }
.sheet-body { scrollbar-width: none; }
.st-pane { display: flex; flex-direction: column; gap: 22px; }
.st-group { display: flex; flex-direction: column; gap: 8px; }
.st-label { font-size: 14px; font-weight: 600; color: var(--text); }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.st-value { font-size: 14px; color: var(--accent); }
.st-hint { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.seg-sm { min-width: 220px; }
.seg-sm button { padding: 6px 4px; font-size: 13.5px; }
.range-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: -2px; }
.st-preview { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.st-preview svg { width: 14px; height: 14px; }

.voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.voice-card { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; text-align: left; }
.voice-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.voice-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.voice-card .vc-orb { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: radial-gradient(circle at 35% 30%, #fff 0%, #93c5fd 30%, #2563eb 75%); }
.voice-card.natural .vc-orb { background: radial-gradient(circle at 35% 30%, #fff 0%, #f0abfc 30%, #8b5cf6 75%); }
.voice-card .vc-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.voice-card b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice-card small { font-size: 12px; color: var(--muted); }
.voice-card .vc-play { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.voice-card .vc-play svg { width: 13px; height: 13px; }
.voice-card:hover .vc-play { background: var(--hover); color: var(--text); }

.persona-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.persona { text-align: left; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.persona:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.persona.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.persona b { font-size: 14.5px; }
.persona span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
#instructions { resize: vertical; min-height: 96px; line-height: 1.5; }
.instr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.instr-chips button { border: 1px dashed var(--border); background: transparent; border-radius: 999px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.instr-chips button:hover { border-color: var(--accent); color: var(--text); }

.st-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; }
.st-switch span { display: flex; flex-direction: column; gap: 2px; }
.st-switch b { font-size: 14.5px; font-weight: 600; }
.st-switch small { font-size: 12.5px; color: var(--muted); }
.st-switch input { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); position: relative; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.st-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.st-switch input:checked { background: var(--accent); border-color: var(--accent); }
.st-switch input:checked::after { transform: translateX(18px); }

.card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.card-stats div { border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; }
.card-stats b { font-size: 22px; }
.card-stats span { font-size: 12.5px; color: var(--muted); }

@media (max-width: 720px) {
  .settings-dlg { width: 100%; height: 94dvh; max-height: 94dvh; margin: auto auto 0; }
  .st-wrap { flex-direction: column; border-radius: 22px 22px 0 0; }
  .st-nav { width: auto; flex-direction: row; overflow-x: auto; padding: 14px 12px 10px; border-right: 0; border-bottom: 1px solid var(--border); scrollbar-width: none; gap: 4px; }
  .st-nav::-webkit-scrollbar { display: none; }
  .st-nav h2 { display: none; }
  .st-nav button { white-space: nowrap; flex-shrink: 0; padding: 8px 12px; }
  .st-head { padding: 12px 16px 4px 20px; }
  .st-body { padding: 8px 20px 24px; }
  .persona-grid { grid-template-columns: 1fr; }
  .seg-sm { min-width: 0; }
}

/* ---------------------------------------------------------------- contas */
.auth-seg { width: 100%; }
.login-card input { text-align: left; }

/* ---------------------------------------------------------------- ofensiva e meta */
.streak-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); background: transparent; border-radius: 999px; padding: 4px 10px 4px 8px; cursor: pointer; font-size: 14px; flex-shrink: 0; }
.streak-chip .flame { filter: grayscale(1) opacity(.55); transition: filter .2s; }
.streak-chip.alive .flame { filter: none; }
.streak-chip.alive { border-color: #fb923c; background: color-mix(in srgb, #fb923c 10%, transparent); }
.goal-ring { position: relative; width: 36px; height: 36px; border: 0; background: transparent; padding: 0; cursor: pointer; flex-shrink: 0; }
.goal-ring svg { width: 36px; height: 36px; transform: rotate(-90deg); }
.goal-ring circle { fill: none; stroke-width: 3.5; }
.goal-ring .ring-bg { stroke: var(--surface-2); }
.goal-ring .ring-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: 94.25; transition: stroke-dashoffset .5s ease; }
.goal-ring.done .ring-fg { stroke: #22c55e; }
.goal-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; }

.pg-body { gap: 18px; }
.pg-tabs { flex: 1; max-width: 420px; }
.pg-hero { display: flex; gap: 14px; flex-wrap: wrap; }
.pg-stat { flex: 1; min-width: 140px; border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.pg-stat b { font-size: 28px; line-height: 1.1; }
.pg-stat span { font-size: 13px; color: var(--muted); }
.pg-stat.fire b { color: #f97316; }
.pg-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.pg-day { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.pg-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 15px; }
.pg-dot.met { background: #f97316; color: #fff; }
.pg-dot.frozen { background: #38bdf8; color: #fff; }
.pg-dot.today { box-shadow: 0 0 0 2px var(--accent); }
.pg-level { border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.pg-bar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pg-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #8b5cf6); border-radius: 99px; }
.goal-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.goal-card { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 12px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.goal-card b { font-size: 20px; }
.goal-card span { font-size: 12.5px; color: var(--muted); }
.goal-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
@media (max-width: 560px) { .goal-cards { grid-template-columns: repeat(2, 1fr); } }
.rank-list { display: flex; flex-direction: column; gap: 6px; }
.rank { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); }
.rank.me { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.rank .pos { width: 28px; text-align: center; font-weight: 800; color: var(--muted); }
.rank .pos.top1 { color: #eab308; } .rank .pos.top2 { color: #94a3b8; } .rank .pos.top3 { color: #c2703d; }
.rank .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rank .who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank .who small { color: var(--muted); font-size: 12.5px; }
.rank .xp { font-weight: 700; }
.avatar-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--accent-text); background: var(--accent); overflow: hidden; }
.avatar-img img { width: 100%; height: 100%; object-fit: cover; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.badge-card { border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.badge-card .ico { font-size: 28px; }
.badge-card small { color: var(--muted); font-size: 12.5px; }
.badge-card.locked { opacity: .45; filter: grayscale(1); }

.celebrate { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(0,0,0,.55); padding: 16px; }
.cel-card { position: relative; z-index: 2; background: var(--surface); border-radius: 24px; padding: 28px 24px; max-width: 360px; width: 100%; text-align: center; box-shadow: var(--shadow); animation: pop .25s ease-out; }
.cel-flame { font-size: 64px; animation: breathe 1.4s ease-in-out infinite; }
.cel-card h2 { margin: 8px 0 6px; font-family: ui-serif, Georgia, "Times New Roman", serif; font-size: 28px; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall 2.4s linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }

/* ---------------------------------------------------------------- foto no questionário */
.avatar-pick { display: flex; align-items: center; gap: 16px; }
.avatar-circle { width: 96px; height: 96px; border-radius: 50%; border: 2px dashed var(--border); background: var(--surface-2); display: grid; place-items: center; cursor: pointer; overflow: hidden; flex-shrink: 0; color: var(--muted); position: relative; }
.avatar-circle:hover { border-color: var(--accent); color: var(--accent); }
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.avatar-circle svg { width: 30px; height: 30px; }
.avatar-circle.has { border-style: solid; border-color: var(--accent); }
.avatar-pick p { margin: 0; font-size: 14px; color: var(--muted); }
.me-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.me-avatar { overflow: hidden; }

/* ---------------------------------------------------------------- flashcards: imagem e modos */
.fc-media { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fc-img { width: min(100%, 320px); aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; background: var(--surface-2); }
.fc-emoji { font-size: 44px; line-height: 1; }
.fc-credit { font-size: 10.5px; color: var(--muted); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mode { text-align: left; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.mode:hover { border-color: var(--accent); }
.mode .m-ico { font-size: 26px; }
.mode b { font-size: 16px; }
.mode span { font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .modes { grid-template-columns: 1fr; } }
.quiz-q { font-size: clamp(18px, 4.4vw, 22px); line-height: 1.5; }
.quiz-q .blank { display: inline-block; min-width: 90px; border-bottom: 3px solid var(--accent); margin: 0 4px; }
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
@media (max-width: 560px) { .quiz-opts { grid-template-columns: 1fr; } }
.quiz-opts button { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: var(--surface); cursor: pointer; font-size: 15.5px; font-weight: 600; }
.quiz-opts button:hover { border-color: var(--accent); }
.quiz-opts button.right { background: #dcfce7; border-color: #22c55e; color: #166534; }
.quiz-opts button.wrong { background: #fee2e2; border-color: #ef4444; color: #991b1b; }
.big-play { width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; cursor: pointer; }
.big-play svg { width: 34px; height: 34px; }
.fc-photo { position: relative; display: inline-block; }
.fc-emoji-badge { position: absolute; right: -10px; bottom: -10px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--border); }

/* listas nativas seguem o tema (no escuro a lista abria branca com letra clara) */
:root { color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
:root[data-theme="dark"] { color-scheme: dark; }
select option { background: var(--surface); color: var(--text); }

/* menu de assunto no campo de texto */
.topic-dd { position: relative; min-width: 0; }
.topic-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; padding: 6px 10px; background: transparent; color: var(--text); font-size: 13.5px; cursor: pointer; max-width: 100%; }
.topic-chip:hover, .topic-chip[aria-expanded="true"] { background: var(--hover); }
.topic-chip svg { width: 16px; height: 16px; color: var(--muted); }
.topic-chip .chev { width: 14px; height: 14px; transition: transform .15s; }
.topic-chip[aria-expanded="true"] .chev { transform: rotate(180deg); }
.topic-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topic-menu { position: absolute; left: 0; bottom: calc(100% + 8px); width: 290px; max-width: calc(100vw - 40px); max-height: 360px; overflow-y: auto; scrollbar-width: none; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 6px; z-index: 20; animation: pop .12s ease-out; }
.topic-menu::-webkit-scrollbar { display: none; }
.main.is-empty .topic-menu { bottom: auto; top: calc(100% + 8px); }
.topic-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; text-align: left; }
.topic-opt:hover { background: var(--hover); }
.topic-opt .t-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.topic-opt b { font-size: 14px; font-weight: 600; }
.topic-opt small { font-size: 12px; color: var(--muted); }
.topic-opt .check { width: 18px; color: var(--accent); font-weight: 700; }

/* perfil em abas */
.pf-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 28px 18px; border-top: 1px solid var(--border); }
.pf-fields > .st-pane { gap: 18px; }
#pfNav .pf-tab-count { margin-left: auto; font-size: 11.5px; color: var(--muted); }
@media (max-width: 720px) { .pf-foot { padding: 10px 20px 16px; } #pfHint { display: none; } }

.more-ideas { grid-column: 1 / -1; justify-self: center; border: 0; background: transparent; color: var(--muted); font-size: 13.5px; cursor: pointer; padding: 6px 12px; border-radius: 999px; }
.more-ideas:hover { background: var(--hover); color: var(--text); }
@media (max-width: 600px) { .topic-card:nth-child(n+5):not(.more-ideas) { display: none; } }

/* ---------------------------------------------------------------- tela de login */
.login { min-height: 100dvh; display: block; padding: 0; }
.auth-shell { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100dvh; }
.auth-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 36px 44px; color: #e8edf7;
  background: radial-gradient(120% 90% at 20% 10%, #1e3a8a 0%, #0b1226 55%, #070b16 100%); }
.auth-hero::after { content: ""; position: absolute; inset: auto -20% -30% auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(139,92,246,.35), transparent 70%); filter: blur(20px); }
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-brand span { display: flex; flex-direction: column; line-height: 1.2; }
.auth-brand small { color: #9fb0d0; }
.auth-hero-mid { position: relative; z-index: 1; max-width: 460px; }
.auth-orb { width: 110px; height: 110px; margin-bottom: 28px; position: relative; }
.auth-orb span, .auth-orb::before { content: ""; position: absolute; inset: 0; border-radius: 50%; }
.auth-orb span { background: radial-gradient(circle at 38% 32%, #fff 0%, #7cc4ff 22%, #2563eb 62%, #0b1b44 100%); box-shadow: 0 0 60px 10px rgba(96,165,250,.45); animation: breathe 3s ease-in-out infinite; }
.auth-orb::before { border: 2px solid rgba(124,196,255,.35); transform: scale(1.35); animation: breathe 3s ease-in-out infinite reverse; }
.auth-hero h2 { font-family: ui-serif, Georgia, "Times New Roman", serif; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.15; margin: 0 0 22px; font-weight: 600; letter-spacing: -.01em; }
.auth-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 16px; color: #cbd6ec; }
.auth-points li { display: flex; align-items: center; gap: 12px; }
.auth-points li span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.auth-foot { position: relative; z-index: 1; color: #6f7fa3; }
.auth-panel { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.auth-form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; }
.auth-form h1 { margin: 0; font-size: 28px; letter-spacing: -.01em; }
.auth-form > p.muted { margin: -8px 0 6px; }
.auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 8px; }
.social { display: flex; flex-direction: column; gap: 10px; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font-weight: 600; font-size: 15px; cursor: pointer; transition: border-color .15s, background .15s; }
.social-btn:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); background: var(--hover); }
.social-btn svg { width: 20px; height: 20px; }
.social-btn.off { opacity: .6; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 4px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--text); }
.auth-field input { font-weight: 400; padding: 12px 14px; background: var(--surface); }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 44px; width: 100%; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.pw-eye:hover { background: var(--hover); color: var(--text); }
.auth-submit { padding: 13px; font-size: 16px; margin-top: 4px; }
.auth-switch { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }
.auth-switch a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-mobile-brand { display: flex; }
  .auth-panel { align-items: start; padding-top: max(40px, env(safe-area-inset-top)); }
}

/* ================================================================ estilo "jogo" (inspirado no Duolingo) */
:root { --accent-dark: #1d4ed8; --green: #22c55e; --green-dark: #16a34a; --flame: #f97316; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --accent-dark: #3b6fd8; } }

.chunky { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px 18px; border-radius: 16px; border: 2px solid transparent; font-weight: 800; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: transform .06s, box-shadow .06s, filter .15s; }
.chunky.primary { background: var(--accent); color: #fff; box-shadow: 0 4px 0 var(--accent-dark); }
.chunky.ghost { background: var(--surface); color: var(--accent); border-color: var(--border); box-shadow: 0 4px 0 var(--border); }
.chunky:hover { filter: brightness(1.06); }
.chunky:active { transform: translateY(4px); box-shadow: 0 0 0 transparent; }
.chunky:disabled { background: var(--surface-2); color: var(--muted); box-shadow: 0 4px 0 var(--border); cursor: default; filter: none; transform: none; }
.chunky.small { width: auto; padding: 9px 16px; font-size: 13px; border-radius: 12px; }

/* mascote: o círculo de voz com olhos */
.mascot { position: relative; border-radius: 50%; flex-shrink: 0; }
.mascot .m-core { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 38% 30%, #fff 0%, #7cc4ff 20%, #2563eb 62%, #10245a 100%); box-shadow: 0 10px 30px rgba(37,99,235,.35); animation: breathe 3s ease-in-out infinite; }
.mascot .m-eye { position: absolute; top: 40%; width: 14%; height: 18%; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 999px #fff; animation: blinkEye 5s infinite; }
.mascot .m-eye::after { content: ""; position: absolute; left: 30%; top: 30%; width: 45%; height: 45%; border-radius: 50%; background: #0b1b44; }
.mascot .m-eye.l { left: 30%; } .mascot .m-eye.r { right: 30%; }
@keyframes blinkEye { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.mascot.big { width: 220px; height: 220px; }
.mascot.small { width: 84px; height: 84px; }

/* telas de entrada */
.login { min-height: 100dvh; display: block; padding: 0; background: var(--bg); }
.au-view { min-height: 100dvh; display: flex; flex-direction: column; }
.au-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1000px; width: 100%; margin: 0 auto; padding: 18px 20px; }
.au-logo { display: flex; align-items: center; gap: 10px; font-size: 20px; color: var(--accent); }
.wel-main { flex: 1; display: flex; align-items: center; justify-content: center; gap: clamp(28px, 6vw, 90px); padding: 20px; max-width: 1000px; width: 100%; margin: 0 auto; }
.wel-art { position: relative; width: 340px; height: 340px; display: grid; place-items: center; flex-shrink: 0; }
.bub { position: absolute; width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; background: var(--surface); border: 2px solid var(--border); box-shadow: 0 4px 0 var(--border); animation: floaty 4s ease-in-out infinite; }
.b1 { left: 4%; top: 8%; } .b2 { right: 6%; top: 2%; animation-delay: -1s; } .b3 { right: 0; top: 48%; animation-delay: -2s; }
.b4 { left: 0; top: 55%; animation-delay: -3s; } .b5 { left: 22%; bottom: 0; animation-delay: -1.5s; } .b6 { right: 22%; bottom: 2%; animation-delay: -2.5s; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(3deg); } }
.wel-copy { max-width: 400px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.wel-copy h1 { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.25; margin: 0 0 14px; font-weight: 800; }
.wel-strip { border-top: 2px solid var(--border); display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; padding: 16px 20px; font-weight: 700; color: var(--muted); font-size: 14px; letter-spacing: .03em; }
@media (max-width: 760px) {
  .wel-main { flex-direction: column; gap: 10px; }
  .wel-art { width: 250px; height: 250px; }
  .mascot.big { width: 160px; height: 160px; }
  .wel-strip { display: none; }
}

.fn-top { display: flex; align-items: center; gap: 14px; max-width: 900px; width: 100%; margin: 0 auto; padding: 18px 20px; }
.fn-progress { flex: 1; height: 16px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.fn-progress span { display: block; height: 100%; border-radius: 99px; background: var(--green); transition: width .35s ease; box-shadow: inset 0 -4px 0 rgba(0,0,0,.12); }
.fn-main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 10px 20px 20px; display: flex; flex-direction: column; gap: 26px; }
.fn-speaker { display: flex; align-items: center; gap: 16px; }
.speech { position: relative; border: 2px solid var(--border); border-radius: 16px; padding: 14px 18px; font-size: 18px; font-weight: 700; background: var(--surface); }
.speech::before { content: ""; position: absolute; left: -10px; top: 50%; width: 16px; height: 16px; background: var(--surface); border-left: 2px solid var(--border); border-bottom: 2px solid var(--border); transform: translateY(-50%) rotate(45deg); }
.fn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 640px) { .fn-grid { grid-template-columns: repeat(2, 1fr); } }
.fn-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 8px; border: 2px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: 0 4px 0 var(--border); cursor: pointer; }
.fn-card .flag { font-size: 44px; line-height: 1.1; }
.fn-card b { font-size: 15px; }
.fn-card small { font-size: 12px; color: var(--muted); }
.fn-card.on, .fn-row.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); box-shadow: 0 4px 0 var(--accent); }
.fn-card:active, .fn-row:active { transform: translateY(2px); }
.fn-list { display: flex; flex-direction: column; gap: 10px; }
.fn-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 2px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: 0 4px 0 var(--border); cursor: pointer; font-size: 16px; font-weight: 600; text-align: left; color: var(--text); }
.fn-row .ico { font-size: 24px; width: 36px; text-align: center; }
.fn-row .ico.bars { font-size: 15px; color: var(--accent); letter-spacing: -1px; font-weight: 800; }
.fn-foot { border-top: 2px solid var(--border); padding: 18px 20px max(18px, env(safe-area-inset-bottom)); display: flex; justify-content: flex-end; }
.fn-foot .chunky { max-width: 220px; }
@media (max-width: 640px) { .fn-foot .chunky { max-width: none; } }
.fn-account, .lg-form { display: flex; flex-direction: column; gap: 12px; }
.fn-account input, .lg-form input, .fn-account input[type=email], .lg-form input[type=email] { font-size: 16px; padding: 14px 16px; border-width: 2px; border-radius: 14px; background: var(--surface-2); }
.lg-main { flex: 1; display: grid; place-items: start center; padding: 30px 20px; }
.lg-form { width: 100%; max-width: 380px; }
.lg-form h1 { text-align: center; font-size: 26px; font-weight: 800; margin: 0 0 10px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 100px; }
.pw-forgot { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); font-weight: 800; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.pw-forgot:hover { color: var(--accent); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; margin: 4px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 2px; background: var(--border); }
.social.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; border: 2px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; box-shadow: 0 4px 0 var(--border); cursor: pointer; }
.social-btn svg { width: 20px; height: 20px; }
.social-btn:active { transform: translateY(4px); box-shadow: none; }
.social-btn.off { opacity: .55; }
.lg-legal { font-size: 12.5px; color: var(--muted); text-align: center; margin: 6px 0 0; line-height: 1.5; }
.lg-legal a { color: var(--accent); font-weight: 700; text-decoration: none; }

/* ================================================================ home: trilha de hoje + painel lateral */
.today-path { display: flex; justify-content: center; align-items: flex-start; gap: clamp(10px, 3vw, 26px); margin: 22px auto 6px; padding: 26px 0 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.today-path::-webkit-scrollbar { display: none; }
.node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: transparent; cursor: pointer; color: var(--text); flex-shrink: 0; }
.node:nth-child(even) { margin-top: 28px; }
.node .disc { width: 70px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; background: var(--accent); box-shadow: 0 6px 0 var(--accent-dark); transition: transform .06s, box-shadow .06s; }
.node:active .disc { transform: translateY(6px); box-shadow: none; }
.node.done .disc { background: #facc15; box-shadow: 0 6px 0 #ca8a04; }
.node.locked .disc { background: var(--surface-2); box-shadow: 0 6px 0 var(--border); filter: grayscale(1); }
.node small { font-size: 12.5px; font-weight: 700; color: var(--muted); max-width: 90px; text-align: center; line-height: 1.25; }
.node .start { position: absolute; top: -30px; white-space: nowrap; background: var(--surface); color: var(--accent); border: 2px solid var(--border); border-radius: 10px; padding: 3px 10px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.rail { display: none; width: 330px; flex-shrink: 0; padding: 18px 18px 18px 0; overflow-y: auto; scrollbar-width: none; flex-direction: column; gap: 14px; }
.rail::-webkit-scrollbar { display: none; }
@media (min-width: 1240px) { .rail { display: flex; } }
.rail-stats { display: flex; justify-content: space-between; gap: 8px; padding: 4px 2px; }
.rail-stats button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; font-weight: 800; font-size: 16px; cursor: pointer; padding: 6px 8px; border-radius: 10px; color: var(--text); }
.rail-stats button:hover { background: var(--hover); }
.rail-stats .fire b { color: var(--flame); }
.rail-card { border: 2px solid var(--border); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); }
.rail-card h4 { margin: 0; font-size: 16px; font-weight: 800; display: flex; justify-content: space-between; align-items: center; }
.rail-card h4 a { font-size: 12.5px; font-weight: 800; color: var(--accent); text-decoration: none; text-transform: uppercase; letter-spacing: .05em; cursor: pointer; }
.quest { display: flex; gap: 12px; align-items: center; }
.quest .q-ico { font-size: 24px; }
.quest .q-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.quest .q-body b { font-size: 14px; }
.q-bar { position: relative; height: 16px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.q-bar span { display: block; height: 100%; background: #facc15; border-radius: 99px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); }
.q-bar em { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-style: normal; font-weight: 800; color: var(--muted); }
.quest.done .q-bar span { background: var(--green); }
.mini-rank { display: flex; flex-direction: column; gap: 8px; }
.mini-rank .r { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.mini-rank .r.me { font-weight: 800; color: var(--accent); }
.mini-rank .r .avatar-img { width: 30px; height: 30px; font-size: 11px; }
.mini-rank .r span.n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-big { display: flex; align-items: center; gap: 14px; }
.goal-big svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.goal-big circle { fill: none; stroke-width: 4; }
.goal-big .ring-bg { stroke: var(--surface-2); } .goal-big .ring-fg { stroke: var(--flame); stroke-linecap: round; stroke-dasharray: 94.25; transition: stroke-dashoffset .5s; }
.goal-big b { font-size: 20px; }
.hero-cards { display: none !important; } /* a trilha "Plano de hoje" já mostra os flashcards */

.flag-img { width: 64px; height: 48px; border-radius: 10px; object-fit: cover; box-shadow: 0 0 0 2px var(--border); }
.flag-mini { width: 22px; height: 16px; border-radius: 3px; object-fit: cover; vertical-align: -3px; margin-right: 4px; }
.bub img { width: 36px; height: 27px; border-radius: 5px; object-fit: cover; }
.wel-strip span { display: inline-flex; align-items: center; }
/* com o painel lateral aberto, 🔥 e o anel da barra de cima seriam repetidos */
/* home minimalista: sem painel lateral; ofensiva e meta ficam na barra de cima */

/* ================================================================ home minimalista */
.rail { display: none !important; }
.today-path { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px auto 0; padding: 0; overflow: visible; flex-wrap: wrap; }
.today-item { border: 0; background: transparent; color: var(--muted); font-size: 14px; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.today-item:hover { background: var(--hover); color: var(--text); }
.today-path .dot { color: var(--border); }
.main.is-empty .topic-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.topic-card.idea { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font-size: 13.5px; color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topic-card.idea:hover { color: var(--text); }
.more-ideas { grid-column: auto; width: 34px; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: 50%; font-size: 15px; display: grid; place-items: center; }
.more-ideas.spin { animation: spin 1s linear infinite; }
@media (max-width: 600px) { .topic-card.idea:nth-child(n+3) { display: none; } }
.chip { max-width: 160px; }
.hero h2 { margin-bottom: 4px; }

/* ================================================================ painel do professor */
.teacher { position: fixed; inset: 0; z-index: 44; background: var(--bg); display: flex; flex-direction: column; }
.t-top { display: flex; align-items: center; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--border); }
.t-top h2 { margin: 0; font-size: 18px; }
.t-tabs { width: 240px; margin-right: auto; }
.t-wrap { flex: 1; overflow-y: auto; padding: 20px 24px 40px; max-width: 1200px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; scrollbar-width: none; }
.t-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.t-tools input { flex: 1; min-width: 200px; }
.t-tools select { width: auto; }
.t-table { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.t-row { display: grid; grid-template-columns: 2.4fr 1.1fr 1fr .5fr .9fr .9fr 1.1fr; gap: 10px; align-items: center; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--border); background: var(--surface); color: var(--text); text-align: left; font-size: 14px; cursor: pointer; }
.t-row:last-child { border-bottom: 0; }
.t-row:hover:not(.t-head) { background: var(--hover); }
.t-row.t-head { cursor: default; background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.t-row.off { opacity: .55; }
.t-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.t-who > span { display: flex; flex-direction: column; min-width: 0; }
.t-who b, .t-who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-who small { color: var(--muted); font-size: 12.5px; }
.tag { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); margin-left: 4px; }
.tag.bad, .t-bad { color: var(--danger); }
.tag.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); }
.t-good { color: var(--green); font-weight: 600; }
@media (max-width: 900px) {
  .t-row { grid-template-columns: 1fr auto auto; }
  .t-row > span:nth-child(2), .t-row > span:nth-child(3), .t-row > span:nth-child(5), .t-row > span:nth-child(7) { display: none; }
}
.t-classes { display: flex; flex-direction: column; gap: 8px; }
.t-class { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.t-class > div { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.t-class small { color: var(--muted); }
.t-class code { font-size: 15px; font-weight: 700; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); }
.t-class.off { opacity: .6; }
.t-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow); padding: 20px; overflow-y: auto; z-index: 46; display: flex; flex-direction: column; gap: 16px; scrollbar-width: none; }
.t-drawer-close { position: absolute; top: 12px; right: 12px; }
#tDrawerBody { display: flex; flex-direction: column; gap: 16px; }
.t-person { display: flex; align-items: center; gap: 14px; padding-right: 40px; }
.t-person h3 { margin: 0; font-size: 19px; }
.avatar-img.big { width: 56px; height: 56px; font-size: 18px; }
.t-bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; padding: 6px; border: 1px solid var(--border); border-radius: 12px; }
.t-bars span { flex: 1; background: var(--accent); border-radius: 4px 4px 0 0; opacity: .7; }
.t-bars span.met { background: var(--flame); opacity: 1; }
.t-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.t-badges span { font-size: 13px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--border); }
.t-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.danger-btn { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.t-temp { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); font-size: 14px; }
.t-temp code { font-weight: 700; font-size: 15px; }

/* ================================================================ música e vídeo */
.m-link { flex: 1; max-width: 620px; display: flex; gap: 8px; margin-right: auto; }
.m-link input { flex: 1; }
.studio-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; padding: 20px 24px; max-width: 1400px; width: 100%; margin: 0 auto; overflow: hidden; }
.m-left { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.m-player-wrap { position: relative; }
.m-player { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; }
.m-player iframe, .m-player > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.m-player .m-spotify { position: absolute; inset: auto 0 0 0; height: 352px; }
.m-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px; background: var(--surface); color: var(--text); }
.m-empty h3 { margin: 6px 0 0; }
.m-empty p { max-width: 460px; margin: 0; }
.m-turn { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); background: var(--flame); color: #fff; font-weight: 800; padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow); animation: bob 1s ease-in-out infinite; }
.m-meta { display: flex; align-items: center; gap: 12px; }
.m-meta > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-meta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-meta small { color: var(--muted); }
.m-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.m-controls select { width: auto; }
.on-btn { border-color: var(--accent); color: var(--accent); }
.m-right { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.m-pane { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; scrollbar-width: none; padding-bottom: 20px; }
.m-pane textarea { min-height: 260px; resize: vertical; }
.m-lyrics { display: flex; flex-direction: column; gap: 6px; font-size: 16.5px; line-height: 1.7; }
.m-line { position: relative; padding: 2px 32px 2px 6px; border-radius: 8px; }
.m-line:hover { background: var(--hover); }
.m-explain { position: absolute; right: 4px; top: 4px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-weight: 700; cursor: pointer; opacity: 0; }
.m-line:hover .m-explain { opacity: 1; }
.m-exp { margin: 6px 0 4px; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); font-size: 14px; line-height: 1.5; }
.m-lyrics.fill .m-line { padding-right: 6px; }
.m-gap { width: auto; display: inline-block; padding: 1px 6px; margin: 0 2px; border-radius: 6px; border: 0; border-bottom: 2px solid var(--accent); background: var(--surface-2); font: inherit; color: var(--text); text-align: center; }
.m-gap.ok { border-bottom-color: var(--green); background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); font-weight: 700; }
.m-score { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.m-score b { font-size: 18px; color: var(--text); }
.m-songs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m-song { text-align: left; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.m-song:hover { border-color: var(--accent); }
.m-song small { color: var(--muted); }
.m-song span { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
@media (max-width: 960px) {
  .studio-body { grid-template-columns: 1fr; overflow-y: auto; }
  .m-left, .m-pane { overflow: visible; }
  .t-top h2 { display: none; }
  .m-songs { grid-template-columns: 1fr; }
}

.fc-more { width: 100%; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.fc-real { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.fc-real > div { display: flex; flex-direction: column; gap: 2px; }
.fc-real small { color: var(--muted); font-style: italic; }
.fc-real mark { background: var(--hl); color: inherit; border-radius: 3px; }
.speak.mini { padding: 5px; border-radius: 50%; flex-shrink: 0; }
.fc-credit a { color: inherit; }

input[type=search], input[type=url], input[type=email] { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px; width: 100%; }

/* ================================================================ karaokê */
.m-sp { position: absolute; inset: 0; }
.m-player:has(.m-sp) { aspect-ratio: auto; height: 152px; background: transparent; border-radius: 12px; }
.m-sync { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m-sync b { min-width: 52px; text-align: center; font-size: 14px; }
.kara { display: flex; flex-direction: column; gap: 2px; padding: 12vh 0 30vh; }
.k-line { position: relative; padding: 6px 70px 6px 10px; border-radius: 12px; font-size: 19px; line-height: 1.5; color: var(--muted); cursor: pointer; transition: color .2s, background .2s, transform .2s; }
.k-line:hover { background: var(--hover); }
.k-line.current { color: var(--text); font-size: 23px; font-weight: 700; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.kw { transition: color .08s; border-radius: 4px; }
.kw.sung { color: var(--accent); }
.k-line:not(.current) .kw.sung { color: inherit; }
.k-tools { position: absolute; right: 8px; top: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.k-line:hover .k-tools, .k-line.current .k-tools { opacity: 1; }
.k-tools button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 13px; color: var(--text); }
.k-extra { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); font-size: 14px; font-weight: 400; color: var(--text); line-height: 1.5; cursor: default; }
.kara.game .k-line { font-size: 18px; color: var(--text); }
.kara.game .k-line.current { font-size: 19px; }
.k-skip { margin-left: 8px; border: 0; background: transparent; color: var(--muted); font-size: 12px; text-decoration: underline; cursor: pointer; }
.m-gap.skipped { border-bottom-color: var(--muted); color: var(--muted); }
.m-nolyrics { display: flex; flex-direction: column; gap: 10px; }
.m-pane { scroll-behavior: smooth; }

/* ================================================================ menu lateral recolhível */
/* recolhido no computador: só a coluna de ícones (como no Claude) */
@media (min-width: 821px) {
  .shell.sb-collapsed .sidebar { width: 64px; padding-left: 8px; padding-right: 8px; align-items: center; }
  .shell.sb-collapsed .sb-top { padding: 2px 0 12px; justify-content: center; }
  .shell.sb-collapsed .brand, .shell.sb-collapsed .conv-list, .shell.sb-collapsed .user-txt,
  .shell.sb-collapsed .user-btn .chev, .shell.sb-collapsed .sb-new span, .shell.sb-collapsed .sb-cards span:not(.badge) { display: none; }
  .shell.sb-collapsed .sb-new, .shell.sb-collapsed .sb-cards { position: relative; width: 44px; height: 44px; padding: 0; justify-content: center; }
  .shell.sb-collapsed .sb-new svg, .shell.sb-collapsed .sb-cards svg { margin: 0; }
  .shell.sb-collapsed .sb-cards .badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; }
  .shell.sb-collapsed .sb-bottom { margin-top: auto; width: 100%; align-items: center; }
  .shell.sb-collapsed .user-btn { width: auto; padding: 6px; }
  .shell.sb-collapsed .user-menu { right: auto; width: 240px; }
}

/* ================================================================ telas dentro da área principal */
.shell > .review, .shell > .teacher { position: relative; inset: auto; z-index: auto; flex: 1; min-width: 0; height: 100dvh; }
.shell.pane-open > .main, .shell.pane-open > .rail { display: none !important; }
.sb-cards.active { background: var(--surface-2); }

/* ================================================================ estúdio enxuto */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.pill:hover { background: var(--hover); }
.pill.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.pill-main.on { background: var(--accent); color: var(--accent-text); }
.pill-go { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.pill-go:hover { background: var(--accent); filter: brightness(1.08); }
.m-controls { gap: 6px; }
.m-meta small { font-size: 12.5px; }
.m-tabsrow { display: flex; gap: 8px; align-items: center; }
.m-tabsrow .seg { flex: 1; }
.m-tabsrow .pill { height: 40px; width: 40px; padding: 0; justify-content: center; font-size: 16px; }
.m-sync { padding: 8px 10px; border-radius: 14px; background: var(--surface-2); }

/* ================================================================ repita comigo */
.m-repeat { border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; transition: border-color .2s, box-shadow .2s; }
.m-repeat.listening { border-color: var(--flame); box-shadow: 0 0 0 3px color-mix(in srgb, var(--flame) 22%, transparent); }
.rp-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }
.rp-status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
.m-repeat.listening .rp-status { color: var(--flame); }
.rp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--flame); animation: bob 1s ease-in-out infinite; }
.rp-score { display: inline-flex; align-items: baseline; gap: 6px; }
.rp-score small { color: var(--muted); font-size: 12px; }
.rp-badge { font-size: 15px; padding: 3px 10px; border-radius: 999px; }
.rp-badge.good { background: color-mix(in srgb, #22c55e 18%, transparent); color: #22c55e; }
.rp-badge.mid { background: color-mix(in srgb, #eab308 18%, transparent); color: #eab308; }
.rp-badge.low { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.rp-line { font-size: clamp(18px, 2.4vw, 22px); font-weight: 700; line-height: 1.4; }
.rp-info { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.rp-info:empty, .rp-heard:empty { display: none; }
.rp-tr { color: var(--muted); font-size: 14.5px; width: 100%; }
.rp-pv { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); }
.rp-heard { font-size: 12.5px; color: var(--muted); font-style: italic; }
.rp-w { border-radius: 5px; }
.rp-w.ok { color: #22c55e; }
.rp-w.near { color: #eab308; text-decoration: underline wavy; text-underline-offset: 4px; }
.rp-w.miss { color: var(--danger); opacity: .75; text-decoration: line-through; }
.rp-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-actions .pill-go { margin-left: auto; }

/* ================================================================ cadastro cabe na tela (qualquer aparelho) */
#funnel { height: 100dvh; min-height: 0; overflow: hidden; }
#funnel .fn-top { padding-block: clamp(8px, 2vh, 18px); }
#funnel .fn-main { min-height: 0; overflow-y: auto; scrollbar-width: thin; gap: clamp(12px, 2.6vh, 26px); padding-top: 4px; }
#funnel .fn-foot { flex-shrink: 0; padding-block: clamp(10px, 1.8vh, 18px); }
#funnel .fn-speaker .mascot.small { width: clamp(52px, 9vh, 84px); height: clamp(52px, 9vh, 84px); }
#funnel .speech { font-size: clamp(16px, 2.2vh, 18px); padding: clamp(10px, 1.6vh, 14px) 18px; }
#funnel .fn-list { gap: clamp(6px, 1.1vh, 10px); }
#funnel .fn-row { padding: clamp(8px, 1.5vh, 14px) 16px; font-size: clamp(15px, 1.9vh, 16px); }
#funnel .fn-row .ico { font-size: clamp(20px, 2.6vh, 24px); }
#funnel .fn-card { padding: clamp(10px, 2vh, 18px) 8px; }
#funnel .fn-card .flag { font-size: clamp(30px, 5vh, 44px); }
/* telas largas: listas longas em duas colunas pra não precisar rolar */
@media (min-width: 900px) {
  #funnel .fn-main { max-width: 860px; }
  #funnel .fn-list:has(> .fn-row:nth-child(6)) { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  #funnel .fn-main { gap: 12px; }
  #funnel .fn-speaker { gap: 12px; }
  #funnel .fn-speaker .mascot.small { width: 48px; height: 48px; }
  #funnel .speech { font-size: 15.5px; padding: 9px 14px; }
  #funnel .fn-list { gap: 6px; }
  #funnel .fn-row { padding: clamp(7px, 1.2vh, 12px) 14px; border-radius: 14px; }
}
#funnel .flag-img { width: clamp(44px, 7vh, 64px); height: clamp(33px, 5.2vh, 48px); }
#funnel .fn-account input { padding-block: clamp(9px, 1.6vh, 14px); }
#funnel .fn-account { gap: clamp(8px, 1.4vh, 12px); }
@media (max-width: 640px) {
  #funnel .fn-grid { gap: 8px; }
  #funnel .fn-card { padding: 8px 6px; gap: 3px; border-radius: 14px; }
  #funnel .fn-card b { font-size: 14px; }
  #funnel .fn-card small { font-size: 11px; }
}

/* ---- estúdio: player cede espaço pro cartão do "repita comigo"; celular em coluna com player fixo no topo */
.m-player { max-height: 52vh; }
.m-left:has(.m-repeat:not(.hidden)) .m-player { max-height: 34vh; }
@media (max-width: 820px) {
  .studio-body { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px; overflow-y: auto; }
  .m-left, .m-right { flex-shrink: 0; min-height: auto; overflow: visible; }
  .m-pane { flex: none; overflow: visible; }
  .m-player-wrap { position: sticky; top: -12px; z-index: 3; background: var(--bg); padding-top: 12px; margin-top: -12px; }
  .m-player { max-height: 30vh; border-radius: 14px; }
  .m-left:has(.m-repeat:not(.hidden)) .m-player { max-height: 24vh; }
  .kara { padding: 2vh 0 40vh; }
  .k-line { font-size: 17px; padding-right: 64px; }
  .k-line.current { font-size: 19px; }
  .m-tabsrow .seg button { font-size: 13px; }
}

/* ---- modo voz no lugar da conversa, com o menu recolhido ao lado */
.shell > .call { position: relative; inset: auto; z-index: auto; flex: 1; min-width: 0; height: 100dvh; }

/* ---- pronúncia (IPA) embaixo das palavras */
.kara.ipa-on { gap: 6px; }
.kara.ipa-on .kw, .rp-w { display: inline-flex; flex-direction: column; align-items: center; vertical-align: top; }
.kara.ipa-on .k-line { line-height: 1.25; padding-top: 8px; padding-bottom: 8px; }
.ipa { font-size: max(11px, .52em); font-weight: 400; color: var(--muted); letter-spacing: .02em; line-height: 1.3; font-family: "Segoe UI", "Noto Sans", "DejaVu Sans", system-ui, sans-serif; white-space: nowrap; }
.k-line.current .ipa { color: color-mix(in srgb, var(--accent) 70%, var(--muted)); }
.kw.sung .ipa, .k-line:not(.current) .kw .ipa { color: var(--muted); }
.rp-line { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: flex-start; }
.rp-w .ipa { font-size: 12.5px; }
.rp-w.miss .kt { text-decoration: line-through; }
.rp-w.miss { text-decoration: none; }
.rp-w.near .kt { text-decoration: underline wavy; text-underline-offset: 4px; }
.rp-w.near { text-decoration: none; }
.k-line.repeating { background: color-mix(in srgb, var(--flame) 12%, transparent); box-shadow: inset 3px 0 0 var(--flame); color: var(--text); }

/* ---- favoritos, histórico e anotações */
.pill.icon { width: 34px; padding: 0; justify-content: center; font-size: 17px; }
.pill.fav { color: #f59e0b; border-color: #f59e0b; background: color-mix(in srgb, #f59e0b 14%, transparent); }
.m-meta { flex-wrap: wrap; gap: 8px; }
.m-notes { border: 1px solid var(--border); border-radius: 18px; padding: 12px 14px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.m-notes-head { display: flex; align-items: center; gap: 10px; }
.m-notes-head span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-notes-head .icon-btn { width: 30px; height: 30px; }
.m-notes textarea { min-height: 120px; resize: vertical; font-size: 14.5px; line-height: 1.55; background: var(--surface-2); border-radius: 12px; }
.lib-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.lib-filters small { opacity: .75; }
.lib-list { display: flex; flex-direction: column; gap: 6px; }
.lib-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; border: 1px solid transparent; cursor: pointer; }
.lib-item:hover { background: var(--hover); }
.lib-item.current { border-color: var(--accent); background: var(--accent-soft); }
.lib-thumb { width: 96px; height: 54px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font-size: 20px; }
.lib-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lib-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lib-txt b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-txt small { font-size: 12.5px; color: var(--muted); }
.lib-note { font-size: 12.5px; color: var(--text); opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-star, .lib-del { width: 32px; height: 32px; flex-shrink: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; font-size: 17px; }
.lib-star.on { color: #f59e0b; }
.lib-star:hover, .lib-del:hover { background: var(--surface-2); color: var(--text); }
.lib-del { opacity: 0; font-size: 13px; }
.lib-item:hover .lib-del { opacity: 1; }
.lib-empty { padding: 20px 4px; }
@media (max-width: 820px) { .lib-del { opacity: 1; } .lib-thumb { width: 80px; height: 45px; } }
#mTabs button { white-space: nowrap; }
.k-line { padding-right: 104px; }
@media (max-width: 820px) { .k-line { padding-right: 100px; } }
@media (max-width: 820px) { .m-left { display: contents; } }  /* o player gruda no topo da tela inteira, não só da coluna */
/* pronúncia do jeito português: letra normal, um pouco maior que o IPA */
.kara.pron-pt .ipa, .rp-w .ipa.pt { font-size: max(11.5px, .55em); letter-spacing: 0; }
#mIpaToggle { font-size: 12.5px; font-weight: 800; }

/* ================================================================ tutorial guiado */
.tour { position: fixed; inset: 0; z-index: 200; }
.tour-dim { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tour-hole { position: fixed; pointer-events: none; }
.tour-hole.lit { outline: 2px solid color-mix(in srgb, var(--accent) 80%, white); outline-offset: 2px; }
.tour-card { position: fixed; width: min(360px, calc(100vw - 24px)); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px 14px; box-shadow: 0 18px 50px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 8px; }

.tour-card.center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 24px)); text-align: center; padding: 26px 24px 18px; }
.tour-card h3 { margin: 0; font-size: 18px; line-height: 1.3; }
.tour-card.center h3 { font-size: 22px; }
.tour-card p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.tour-top { display: flex; align-items: center; justify-content: space-between; }
.tour-step { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .03em; }
.tour-skip { border: 0; background: transparent; color: var(--muted); font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.tour-nav { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.tour-dots { flex: 1; display: flex; gap: 4px; align-items: center; }
.tour-card.center .tour-dots { justify-content: flex-start; }
.tour-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: width .2s, background .2s; }
.tour-dots span.on { width: 16px; border-radius: 3px; background: var(--accent); }
.invisible { visibility: hidden; }
@media (max-width: 820px) {
  .tour-dots span { width: 5px; height: 5px; }
  .tour-dots span.on { width: 12px; }
}

/* ================================================================ sugestões de músicas */
.m-player:has(.m-empty) { aspect-ratio: auto; height: clamp(170px, 26vh, 240px); }
.m-player:has(.m-empty) .m-empty p { display: none; }
.m-home { display: flex; flex-direction: column; gap: 10px; }
.home-h { margin: 4px 0 0; font-size: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.home-h .pill { height: 30px; font-size: 12.5px; }
.song-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.m-pane .song-grid { grid-template-columns: 1fr; }
.song-card { display: flex; flex-direction: column; text-align: left; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: 0; overflow: hidden; cursor: pointer; color: var(--text); transition: border-color .15s, transform .15s; }
.song-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.m-pane .song-card { flex-direction: row; align-items: stretch; }
.song-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); display: grid; place-items: center; }
.m-pane .song-thumb { width: 150px; flex-shrink: 0; }
.song-thumb img { width: 100%; height: 100%; object-fit: cover; }
.song-play { position: absolute; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; font-size: 14px; opacity: 0; transition: opacity .15s; }
.song-card:hover .song-play { opacity: 1; }
.song-noimg { font-size: 28px; }
.song-txt { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.song-txt b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-txt small { color: var(--muted); font-size: 12.5px; }
.song-why { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.song-tag { margin-top: 6px; align-self: flex-start; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, #22c55e 15%, transparent); color: #16a34a; }
.song-tag.muted { background: var(--surface-2); color: var(--muted); }
.song-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; padding: 8px 0; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 820px) { .song-grid { grid-template-columns: 1fr 1fr; } .m-pane .song-thumb { width: 120px; } }

/* ------------------------------------------------------------ Full Power Mode (Caio) */
:root { --power: #f97316; --power-2: #facc15; --power-hot: #ef4444; --power-soft: #fff1e6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --power-soft: #3a2415; } }
:root[data-theme="dark"] { --power-soft: #3a2415; }
.pw-bolt { width: 20px; height: 20px; flex-shrink: 0; overflow: visible; }
.pw-bolt path { fill: var(--power-2); stroke: var(--power); stroke-width: 1.6; stroke-linejoin: round; }
.pw-bolt .pw-glow { fill: var(--power); stroke: none; transform-box: fill-box; transform-origin: 50% 70%; animation: pw-flame 1.1s ease-in-out infinite; }
.pw-bolt path:last-child { transform-box: fill-box; transform-origin: 50% 50%; animation: pw-zap 2.4s ease-in-out infinite; }
@keyframes pw-flame { 0%, 100% { transform: scale(1.25, 1.35) translateY(-1px); } 35% { transform: scale(1.4, 1.2) rotate(-4deg); } 70% { transform: scale(1.15, 1.5) rotate(3deg) translateY(-2px); } }
@keyframes pw-zap { 0%, 86%, 100% { transform: none; } 89% { transform: scale(1.18) rotate(-6deg); } 93% { transform: scale(.94) rotate(4deg); } }
.sb-power span { background: linear-gradient(90deg, var(--power-hot), var(--power), #eab308); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sb-power.active { background: var(--power-soft); }

.shell > .power { position: relative; inset: auto; z-index: auto; flex: 1; min-width: 0; height: 100dvh; }
.power .t-top h2 { display: flex; align-items: center; gap: 8px; }
.power .t-top h2 .pw-bolt { width: 22px; height: 22px; }
.pw-stats { display: flex; gap: 8px; margin-left: auto; }
.pw-pill { font-size: 13.5px; font-weight: 700; border: 1px solid var(--border); border-radius: 999px; padding: 5px 11px; white-space: nowrap; }
.pw-pill.hot { border-color: var(--power); background: var(--power-soft); }
.pwr-wrap { flex: 1; overflow-y: auto; padding: 24px 16px 48px; }
.pw-caio, .pw-stage { max-width: 760px; margin: 0 auto; }
.pw-caio { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.pw-caio { align-items: flex-end; }
.pw-orb { position: relative; width: 150px; height: 150px; flex-shrink: 0; cursor: pointer; transform-origin: 50% 100%; }
.pw-orb img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .12)); }
.pw-orb.pop img { animation: pw-pop .35s ease-out; }
.pw-orb[data-state="speaking"] img { animation: pw-bob .45s ease-in-out infinite alternate; }
.pw-orb[data-state="listening"] img { filter: drop-shadow(0 0 10px var(--power-hot)); }
.pw-orb.rush img { animation: pw-shake .3s linear infinite; }
.pw-orb[data-face="parado"] img { animation: pw-sway 3s ease-in-out infinite; }
@keyframes pw-pop { 0% { transform: scale(.9); } 60% { transform: scale(1.05); } 100% { transform: none; } }
@keyframes pw-bob { to { transform: translateY(-3px) scale(1.02); } }
@keyframes pw-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
@keyframes pw-sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-3deg) translateY(2px); } }
@keyframes pw-talk { to { transform: scale(1.08); } }
.pw-bubble { margin-bottom: 18px; }
.pw-bubble { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 4px 18px 18px 18px; padding: 12px 16px; }
.pw-bubble b { font-size: 13px; color: var(--power); }
.pw-bubble p { margin: 4px 0 0; font-size: 16px; line-height: 1.45; }
.pw-bubble .tool { margin: 6px 0 -4px -8px; }

.pw-intro { text-align: center; padding: 20px 0; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.pw-kinds { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pw-kinds span { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 7px 13px; font-size: 14px; }
.pw-go { display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 16px; padding: 16px 28px; font-size: 18px; font-weight: 800; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--power-hot), var(--power) 55%, #eab308); box-shadow: 0 5px 0 #b45309; transition: transform .1s, box-shadow .1s; }
.pw-go:active { transform: translateY(4px); box-shadow: 0 1px 0 #b45309; }
.pw-go .pw-bolt { width: 26px; height: 26px; }
.pw-go .pw-bolt path:last-child { fill: #fff; stroke: #fff7cc; }
.pw-loading { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 28px 0; }

.pw-card, .pw-result { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.pw-card { border-top: 4px solid var(--power); }
.pw-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pw-kind { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--power); }
.pw-big { font-size: clamp(19px, 3.2vw, 24px); font-weight: 700; line-height: 1.35; margin: 4px 0 0; }
.pw-wrong { text-decoration: underline wavy var(--power-hot); text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.pw-card p { margin: 0; }
.pw-how { font-size: 14px; color: var(--muted); }
.pw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pw-chips span { background: var(--surface-2); border-radius: 10px; padding: 5px 10px; font-size: 14px; }
.pw-chips .pw-word { background: var(--power-soft); color: var(--text); font-weight: 700; font-size: 16px; }
.pw-timer { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.pw-timer svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.pw-timer circle { fill: none; stroke-width: 3.2; }
.pw-timer .ring-bg { stroke: var(--surface-2); }
.pw-timer .ring-fg { stroke: var(--power); stroke-linecap: round; transition: stroke-dashoffset .2s linear; }
.pw-timer b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; font-variant-numeric: tabular-nums; }
.pw-timer.hot .ring-fg { stroke: var(--power-hot); }
.pw-timer.hot b { color: var(--power-hot); animation: pw-talk .5s ease-in-out infinite alternate; }
.pw-timer.over b { color: var(--muted); animation: none; }
.pw-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.pw-mic { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 14px; padding: 13px 20px; font-size: 16px; font-weight: 700; cursor: pointer; color: #fff; background: var(--power); }
.pw-mic .rp-dot { display: none; background: #fff; }
.pw-mic.rec { background: var(--power-hot); }
.pw-mic.rec .rp-dot { display: block; }
#pwSkip { margin-left: auto; }
.pw-type { display: flex; gap: 10px; align-items: flex-end; }
.pw-type textarea { flex: 1; resize: vertical; min-height: 60px; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
#pwResult { margin-top: 14px; scroll-margin-top: 12px; }
.pw-result p { margin: 0; line-height: 1.45; }
.pw-result.good { border-color: #22c55e; } .pw-result.mid { border-color: var(--power-2); } .pw-result.low { border-color: var(--power-hot); }
.pw-score { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.pw-score b { font-size: 40px; line-height: 1; }
.pw-result.good .pw-score b { color: #16a34a; } .pw-result.mid .pw-score b { color: #ca8a04; } .pw-result.low .pw-score b { color: var(--power-hot); }
.pw-score span { font-weight: 800; font-size: 17px; }
.pw-score small { font-weight: 700; color: var(--power); }
.pw-heard { font-style: italic; }
.pw-errors { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.pw-errors s { color: var(--muted); }
.pw-errors small { display: block; color: var(--muted); }
.pw-better { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.pw-better p { font-weight: 600; margin-top: 2px; }
.pw-better .tool { margin: 4px 0 -4px -8px; }
@media (max-width: 600px) {
  .pw-stats { gap: 6px; } .pw-pill { padding: 4px 8px; font-size: 12.5px; }
  .pw-orb { width: 104px; height: 104px; } .pw-bubble p { font-size: 15px; }
  .pw-card, .pw-result { padding: 14px; }
  .pw-mic { flex: 1; justify-content: center; }
  .pw-type { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { .pw-bolt path, .pw-orb img, .pw-timer b { animation: none !important; } }
.power .btn.primary { background: var(--power); color: #fff; }
@media (max-width: 600px) { .power .t-top h2 { font-size: 16px; white-space: nowrap; } .pw-mic { white-space: nowrap; padding: 13px 14px; } }
.pw-orb[data-face="diabo"] img { animation: pw-evil 1.4s ease-in-out infinite; filter: drop-shadow(0 0 14px rgba(239, 68, 68, .55)); }
@keyframes pw-evil { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04) rotate(-1.5deg); } }
#pwSkip:disabled { opacity: .55; cursor: not-allowed; }
/* Caio no lugar da bola azul: duas imagens idênticas, a de cima só aparece na piscada */
.mascot.caio { border-radius: 0; }
.mascot.caio .m-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .18)); }
.mascot.caio .m-open { animation: caio-hi 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
.mascot.caio .m-wink { visibility: hidden; animation: caio-hi 3.2s ease-in-out infinite, caio-wink 4.6s step-end infinite; transform-origin: 50% 100%; }
@keyframes caio-hi { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-1.2deg); } }
@keyframes caio-wink { 0%, 86% { visibility: hidden; } 87%, 93% { visibility: visible; } 94%, 100% { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .mascot.caio .m-img { animation: none; } }
.tour-head { display: flex; align-items: center; gap: 12px; }
.tour-caio.mascot { width: 64px; height: 64px; }
.tour-card.center .tour-head { flex-direction: column; gap: 6px; }
.tour-card.center .tour-caio.mascot { width: 150px; height: 150px; }
.pw-sound { background: transparent; color: inherit; cursor: pointer; font: inherit; font-size: 13.5px; }

/* ------------------------------------------------------------ Homework */
.shell > .homework { position: relative; inset: auto; z-index: auto; flex: 1; min-width: 0; height: 100dvh; }
.homework .t-top h2 { margin-right: auto; }
.hw-wrap { flex: 1; overflow-y: auto; padding: 22px 16px 48px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; max-width: 1180px; width: 100%; margin: 0 auto; align-items: start; }
.hw-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hw-back { align-self: flex-start; }
.hw-card { border-top-color: var(--accent); }
.hw-card .pw-kind { color: var(--accent); }
.hw-phrasal { display: flex; flex-direction: column; gap: 2px; background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; }
.hw-phrasal b { font-size: 22px; }
.hw-phrasal p { margin: 6px 0 0; font-style: italic; }
.hw-hints ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.hw-rec { display: flex; align-items: center; gap: 16px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--border); }
.hw-rec-btn { position: relative; width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--accent); cursor: pointer; flex-shrink: 0; display: grid; place-items: center; }
.hw-rec-btn:disabled { opacity: .5; cursor: default; }
.hw-rec-btn svg { position: absolute; inset: -6px; width: 96px; height: 96px; transform: rotate(-90deg); }
.hw-rec-btn circle { fill: none; stroke-width: 2.4; }
.hw-rec-btn .ring-bg { stroke: transparent; }
.hw-rec-btn .ring-fg { stroke: transparent; stroke-linecap: round; transition: stroke-dashoffset .2s linear; }
.hw-rec-btn.rec { background: var(--danger); }
.hw-rec-btn.rec .ring-bg { stroke: var(--surface-2); }
.hw-rec-btn.rec .ring-fg { stroke: var(--danger); }
.hw-rec-btn span { font-size: 30px; line-height: 1; }
.hw-rec-txt { display: flex; flex-direction: column; gap: 2px; }
.hw-rec-txt b { font-size: 26px; font-variant-numeric: tabular-nums; }
.hw-grading { display: flex; align-items: center; gap: 14px; padding: 12px 4px; }
.hw-grading .mascot.caio { width: 72px; height: 72px; }
.hw-bars { display: flex; flex-direction: column; gap: 7px; }
.hw-bars div { display: grid; grid-template-columns: 118px 1fr 32px; align-items: center; gap: 10px; font-size: 14px; }
.hw-bars i { height: 9px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.hw-bars b { display: block; height: 100%; border-radius: 99px; }
.hw-bars b.good { background: #22c55e; } .hw-bars b.mid { background: #eab308; } .hw-bars b.low { background: var(--danger); }
.hw-bars em { font-style: normal; font-weight: 700; text-align: right; }
.hw-sub { display: block; margin-bottom: 6px; }
.hw-tips { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.hw-transcript summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.hw-transcript p { margin-top: 8px; font-style: italic; color: var(--muted); }

.hw-cal { position: sticky; top: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.hw-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hw-cal-head button:disabled { opacity: .3; }
.hw-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.hw-week span { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.hw-day { aspect-ratio: 1; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text); font: inherit; font-size: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; cursor: pointer; line-height: 1.1; }
.hw-day small { font-size: 10px; font-weight: 700; opacity: .85; }
.hw-day:disabled { cursor: default; color: var(--muted); }
.hw-day.future { opacity: .4; }
.hw-day.today { border-color: var(--accent); font-weight: 800; }
.hw-day.done { color: #fff; font-weight: 700; }
.hw-day.done.good { background: #16a34a; } .hw-day.done.mid { background: #ca8a04; } .hw-day.done.low { background: var(--danger); }
.hw-day.sel { outline: 2px solid var(--text); outline-offset: 1px; }
.hw-legend { margin: 10px 0 0; line-height: 1.8; }
.hw-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 3px 0 6px; vertical-align: -1px; }
.hw-legend i.good { background: #16a34a; } .hw-legend i.mid { background: #ca8a04; } .hw-legend i.low { background: var(--danger); }
@media (max-width: 900px) {
  .hw-wrap { grid-template-columns: 1fr; }
  .hw-cal { position: static; order: -1; }
}

/* ---- o Caio no canto da home */
.main { position: relative; }
.hw-buddy { position: absolute; right: 18px; bottom: 16px; z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
.main:not(.is-empty) .hw-buddy { display: none; }
.hw-buddy > * { pointer-events: auto; }
.hw-buddy-btn { border: 0; background: transparent; padding: 0; cursor: pointer; }
.hw-buddy-btn .mascot.caio { width: 132px; height: 132px; }
.hw-buddy-close { position: absolute; right: 0; bottom: 118px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer; }
.hw-bubbles { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-right: 34px; }
.hw-bubble { max-width: 240px; text-align: left; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; padding: 9px 13px; border-radius: 16px 16px 4px 16px; box-shadow: var(--shadow); cursor: pointer; animation: hw-rise .6s cubic-bezier(.2, .9, .3, 1.3) both; }
.hw-bubble:first-child:not(:last-child) { transform: scale(.92); transform-origin: 100% 100%; color: var(--muted); }
@keyframes hw-rise { from { transform: translateY(26px) scale(.7); } to { transform: none; } }
@media (max-width: 820px) {
  .hw-buddy { right: 10px; bottom: 10px; }
  .hw-buddy-btn .mascot.caio { width: 88px; height: 88px; }
  .hw-buddy-close { bottom: 78px; }
  .hw-bubble { max-width: 190px; font-size: 13px; }
  .hw-bubbles { margin-right: 20px; }
}
@media (prefers-reduced-motion: reduce) { .hw-bubble { animation: none; } }

/* ------------------------------------------------------------ TV */
.shell > .tv { position: relative; inset: auto; z-index: auto; flex: 1; min-width: 0; height: 100dvh; }
.tv .t-top h2 { margin-right: auto; }
.tv-toggles { display: flex; gap: 6px; }
.tv-toggles .pill { border: 1px solid var(--border); background: transparent; color: var(--muted); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.tv-toggles .pill.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.tv-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; padding: 16px; overflow: hidden; }
.tv-left { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; }
.tv-stage { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; flex-shrink: 0; }
.tv-stage video { width: 100%; height: 100%; display: block; background: #000; }
.tv-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #cfcfcf; font-size: 17px; font-weight: 600; }
.tv-subs { position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%); width: min(92%, 900px); text-align: center; pointer-events: none; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.tv-subs.empty { display: none; }
.tv-subs p { margin: 0; padding: 3px 10px; border-radius: 6px; background: rgba(0, 0, 0, .72); color: #fff; line-height: 1.35; }
.tv-subs p:empty { display: none; }
.tv-en { font-size: clamp(15px, 2.2vw, 24px); font-weight: 700; }
.tv-nat { font-size: clamp(13px, 1.8vw, 20px); color: #ffe27a !important; }
.tv-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.tv-status { font-size: 12.5px; font-weight: 700; color: #16a34a; }
.tv-log { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.tv-line { display: flex; align-items: flex-start; gap: 4px; }
.tv-line > div { flex: 1; }
.tv-line p { margin: 0; font-weight: 600; }
.tv-line small { color: var(--muted); }
.tv-list { overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding-bottom: 30px; }
.tv-group { display: flex; flex-direction: column; gap: 6px; }
.tv-group > b { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tv-ch { text-align: left; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 12px; padding: 9px 12px; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 2px; }
.tv-ch:hover { border-color: var(--accent); }
.tv-ch.on { border-color: var(--accent); background: var(--accent-soft); }
.tv-ch-name { font-weight: 700; }
.tv-ch-name em { font-style: normal; font-size: 11px; font-weight: 800; color: #16a34a; margin-left: 4px; }
.tv-note { margin: 0; }
@media (max-width: 900px) {
  .tv-wrap { grid-template-columns: 1fr; overflow-y: auto; }
  .tv-left { overflow: visible; }
  .tv-list { overflow: visible; }
  .tv-toggles .pill { padding: 4px 8px; font-size: 12px; }
}
.k-trans { font-size: .82em; color: var(--muted); margin-top: 1px; font-style: italic; }
.k-trans:empty { display: none; }
.k-line.current .k-trans { color: var(--text); }
.tour-help { font-weight: 800; font-size: 16px; color: var(--muted); }

/* ================================================================ design v2
   Uma linguagem só no app inteiro, a mesma da entrada: fonte arredondada, peso alto nos títulos,
   botões que "afundam" ao tocar e o menu agrupado pelo que o aluno veio fazer. */
:root { --font-ui: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; }
body, button, input, select, textarea { font-family: var(--font-ui); }
.ipa { font-family: var(--font-ui); }
.hero h2, .ob-step h2, .rv-done h2, .cel-card h2, .auth-hero h2 { font-family: var(--font-ui); font-weight: 900; letter-spacing: -.02em; }
.hero h2 { font-size: clamp(28px, 4.4vw, 40px); }
.t-top h2 { font-size: 20px; font-weight: 900; letter-spacing: -.01em; }
.pw-big { font-weight: 800; }
.muted.small, .small { letter-spacing: .005em; }

/* ---- botões: todo clicável responde (hover escurece, toque afunda) */
.btn { font-weight: 800; border-radius: var(--r-md); transition: background-color .12s, transform .06s, box-shadow .06s, border-color .12s; }
.btn:hover { border-color: color-mix(in srgb, var(--text) 25%, var(--border)); }
.btn.primary { box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 70%, #000); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 90%, #000); border-color: transparent; }
.btn.primary:active, .pw-mic:active, .pw-go:active { transform: translateY(3px); box-shadow: none; }
.btn:disabled { opacity: .55; cursor: default; box-shadow: none; transform: none; }
.power .btn.primary { box-shadow: 0 3px 0 #b45309; }
.pw-mic { box-shadow: 0 3px 0 #b45309; transition: transform .06s, box-shadow .06s, background-color .12s; }
.pw-mic.rec { box-shadow: 0 3px 0 #991b1b; }
.pw-mic:hover { filter: brightness(1.05); }
.icon-btn { transition: background-color .12s; }
.icon-btn:hover { background: var(--hover); }
.tool:hover { background: var(--hover); color: var(--text); }

/* ---- menu lateral agrupado */
.sb-group { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.sb-label { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 12px 4px; }
.sb-group .sb-cards { margin-top: 0; font-weight: 700; padding: 9px 12px; border-radius: var(--r-sm); transition: background-color .12s; }
.sb-group .sb-cards svg { width: 20px; height: 20px; flex-shrink: 0; }
.sb-cards.active { background: var(--accent-soft); color: var(--accent); }
.sb-cards.active svg { stroke: var(--accent); }
.sb-power.active { background: var(--power-soft); }
.sb-new { font-weight: 800; }
.badge { font-weight: 800; }
#hwBadge { background: var(--power); }
.shell.sb-collapsed .sb-label { display: none; }
.shell.sb-collapsed .sb-group { margin-top: 8px; align-items: center; }
.conv-list { margin-top: 10px; }

/* ---- cabeçalho de todas as telas: mesma altura, título forte, ações à direita */
.t-top { min-height: 64px; padding: 10px 20px; gap: 12px; }

/* ---- home: a trilha do dia vira missões com status */
.today-path { gap: 8px; margin-top: 18px; }
.today-path .dot { display: none; }
.today-item { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 700; font-size: 14px; padding: 8px 14px 8px 10px; border-radius: 999px; transition: border-color .12s, transform .06s; }
.today-item:hover { border-color: var(--accent); background: var(--surface); }
.today-item:active { transform: translateY(1px); }
.today-item i { font-style: normal; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); font-size: 13px; }
.today-item.done { color: var(--muted); }
.today-item.done i { background: #22c55e; color: #fff; }
.today-item.todo { border-color: color-mix(in srgb, var(--power) 55%, var(--border)); }
.today-item.todo i { background: var(--power-soft); }
.today-item small { color: var(--muted); font-weight: 600; }

/* ---- cartões e superfícies: um raio só, sombra quieta */
.pw-card, .pw-result, .hw-cal, .tv-log, .tv-ch { border-radius: var(--r-lg); }
.tv-ch { border-radius: var(--r-md); transition: border-color .12s, background-color .12s; }
.pw-bubble { border-radius: 6px var(--r-lg) var(--r-lg) var(--r-lg); }
.hw-bubble { max-width: 270px; }

/* ---- teste de nivelamento no cadastro */
.fn-quiz { display: flex; flex-direction: column; gap: 12px; }
.fn-quiz-q { font-size: clamp(20px, 3vw, 26px); font-weight: 800; margin: 0 0 4px; }
.fn-row.right { border-color: #22c55e !important; background: color-mix(in srgb, #22c55e 18%, var(--surface)) !important; }
.fn-row.wrong { border-color: var(--danger) !important; background: color-mix(in srgb, var(--danger) 16%, var(--surface)) !important; }
#fnQuizStop { align-self: flex-start; margin-top: 4px; }
.fn-result { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; }
.fn-result-score { font-size: 56px; font-weight: 900; line-height: 1; color: var(--accent); }
.fn-result b { font-size: 22px; }
.fn-quiz .fn-row { font-size: 17px; font-weight: 700; }
.wel-feats { list-style: none; margin: -4px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.wel-feats li { display: flex; align-items: center; gap: 12px; font-size: 15.5px; font-weight: 700; color: var(--text); }
.wel-feats span { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); font-size: 17px; }
@media (max-width: 820px) { .wel-feats { gap: 8px; } .wel-feats li { font-size: 14px; } .wel-feats span { width: 30px; height: 30px; } }
@media (max-width: 900px) {  /* na grade a coluna do vídeo ficava com altura 0 e a lista subia por cima */
  .tv-wrap { display: flex; flex-direction: column; }
  .tv-left, .tv-list { flex: none; }
}
@media (max-width: 900px) {  /* o vídeo fica preso no topo enquanto a lista rola */
  .tv-wrap { padding-top: 0; }
  .tv-left { position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 12px 0 8px; }
}
@media (max-width: 600px) {
  /* topo do Full Power cabendo em 390 px: título vira só o raio, XP sai do topo (aparece no resultado) */
  .power .t-top { gap: 6px; padding: 8px 10px; }
  .power .t-top h2 { font-size: 0; display: flex !important; }
  .power .t-top h2 .pw-bolt { width: 26px; height: 26px; }
  .pw-stats { gap: 4px; }
  #pwScore { display: none; }
  .pw-pill { padding: 4px 7px; }
  /* responder sempre à mão: o relógio corre, o botão não pode estar abaixo da dobra */
  .pw-card .pw-actions { position: sticky; bottom: -1px; z-index: 2; background: var(--surface); margin: 0 -14px -14px; padding: 10px 14px 14px; border-top: 1px solid var(--border); border-radius: 0 0 var(--r-lg) var(--r-lg); }
}
@media (max-width: 900px) { .hw-cal { order: 0; } }  /* a tarefa do dia vem primeiro; o calendário depois */
@media (max-width: 600px) {
  /* no celular o título some por padrão (o Music precisa do espaço pro link); aqui ele segura as ações na direita */
  .homework .t-top h2, .tv .t-top h2 { display: block !important; font-size: 17px; margin-right: auto; white-space: nowrap; }
  .tv .t-top { gap: 6px; padding: 8px 10px; }
}

/* ---- celular: missões numa linha e o Caio no canto de baixo numa linha só (ele + um balão), sem subir até a caixa de escrever */
@media (max-width: 600px) {
  .today-path { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; margin-top: 14px; }
  .today-item { flex-direction: column; justify-content: flex-start; gap: 3px; padding: 8px 4px 7px; border-radius: 14px; font-size: 12.5px; line-height: 1.15; text-align: center; min-width: 0; }
  .today-item i { width: 26px; height: 26px; font-size: 14px; }
  .today-item small { font-size: 11px; }

  .hw-buddy { top: auto; bottom: 10px; right: 8px; left: 8px; flex-direction: row; justify-content: flex-end; align-items: flex-end; gap: 4px; }
  .hw-buddy-btn .mascot.caio { width: 72px; height: 72px; }
  .hw-bubbles { margin: 0 0 14px; max-width: calc(100vw - 110px); }
  .hw-bubble { max-width: min(260px, calc(100vw - 104px)); font-size: 13px; padding: 8px 11px; border-radius: 16px 16px 4px 16px; }
  .hw-bubble:first-child:not(:last-child) { display: none; }  /* um balão por vez no celular */
  .hw-buddy-close { top: auto; bottom: 64px; right: 0; }
}

/* ================================================================ Trilha */
.shell > .path { position: relative; inset: auto; z-index: auto; flex: 1; min-width: 0; height: 100dvh; }
.path .t-top h2 { margin-right: auto; }
.pt-levels { min-width: 0; }
.pt-levels button { padding: 7px 12px; font-weight: 700; }
.sb-path.active { background: var(--accent-soft); }
.pt-body { flex: 1; overflow-y: auto; padding: 20px 16px 60px; position: relative; }
.pt-units { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.pt-unit { --u: var(--accent); }
.pt-banner { background: var(--u); color: #fff; border-radius: var(--r-lg); padding: 16px 18px; box-shadow: 0 4px 0 color-mix(in srgb, var(--u) 70%, #000); }
.pt-banner small { display: block; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .85; font-size: 12px; }
.pt-banner b { display: block; font-size: 21px; font-weight: 900; margin: 2px 0; }
.pt-banner span { font-size: 14px; font-weight: 600; opacity: .92; }
.pt-nodes { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 22px 0 6px; }
.pt-row { position: relative; display: flex; flex-direction: column; align-items: center; transform: translateX(var(--x)); }
.pt-node { position: relative; width: 72px; height: 72px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--u); color: #fff; box-shadow: 0 6px 0 color-mix(in srgb, var(--u) 65%, #000); transition: transform .08s, box-shadow .08s, filter .12s; }
.pt-node:hover:not(:disabled) { filter: brightness(1.06); }
.pt-node:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 1px 0 color-mix(in srgb, var(--u) 65%, #000); }
.pt-node .pt-ico { font-size: 28px; line-height: 1; }
.pt-node.done .pt-ico { font-size: 30px; font-weight: 900; }
.pt-node.locked { background: var(--surface-2); color: var(--muted); box-shadow: 0 6px 0 var(--border); cursor: default; }
.pt-node.locked .pt-ico { font-size: 22px; opacity: .7; }
.pt-node.current { width: 84px; height: 84px; outline: 6px solid color-mix(in srgb, var(--u) 30%, transparent); outline-offset: 4px; animation: pt-bob 1.8s ease-in-out infinite; }
@keyframes pt-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.pt-stars { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 13px; letter-spacing: 1px; color: #eab308; white-space: nowrap; }
.pt-label { margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.pt-node.done + .pt-label { margin-top: 22px; }
.pt-start { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.pt-caio { width: 64px; height: 64px; }
.pt-go { border: 0; border-radius: 14px; background: var(--u); color: #fff; font: inherit; font-weight: 900; font-size: 15px; padding: 10px 16px; cursor: pointer;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--u) 65%, #000); transition: transform .06s, box-shadow .06s; }
.pt-go:active { transform: translateY(4px); box-shadow: none; }

/* ---- player da lição */
.pt-lesson-top { gap: 14px; }
.pt-progress { flex: 1; height: 14px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pt-progress span { display: block; height: 100%; width: 0; border-radius: 99px; background: #22c55e; transition: width .35s ease; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12); }
.pt-counter { font-weight: 800; font-size: 14px; color: var(--muted); min-width: 44px; text-align: right; white-space: nowrap; }
.pt-intro, .pt-end { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-top: 10px; }
.pt-intro h2, .pt-end h2 { margin: 0; font-size: 28px; font-weight: 900; }
.pt-kicker { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--u, var(--accent)); font-size: 12.5px; }
.pt-caio-big { width: 150px; height: 150px; }
.pt-words { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; width: 100%; margin: 8px 0; }
.pt-word { position: relative; text-align: left; border: 2px solid var(--border); border-bottom-width: 4px; background: var(--surface); color: var(--text); border-radius: var(--r-md); padding: 10px 12px 10px; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.pt-word b { font-size: 17px; }
.pt-word span { color: var(--muted); font-weight: 600; }
.pt-word em { font-size: 12.5px; color: var(--muted); }
.pt-word i { position: absolute; top: 8px; right: 10px; font-style: normal; }
.pt-cta { max-width: 360px; margin-top: 8px; }

.pt-item { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; padding-bottom: 40px; min-height: calc(100% - 110px); }
.pt-title { margin: 0; font-size: 22px; font-weight: 900; }
.pt-q { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.4; }
.pt-fill { font-size: 22px; }
.pt-blank { display: inline-block; min-width: 90px; border-bottom: 3px solid var(--accent); margin: 0 6px; text-align: center; color: var(--accent); font-weight: 900; }
.pt-opts { display: flex; flex-direction: column; gap: 10px; }
.pt-opts.compact { flex-direction: row; flex-wrap: wrap; }
.pt-opt { display: flex; align-items: center; gap: 12px; text-align: left; border: 2px solid var(--border); border-bottom-width: 4px; background: var(--surface); color: var(--text); border-radius: var(--r-md); padding: 12px 14px; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; transition: border-color .1s, background-color .1s, transform .06s; }
.pt-opts.compact .pt-opt { flex: 1 1 auto; justify-content: center; }
.pt-opt:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.pt-opt:active { transform: translateY(2px); }
.pt-opt kbd { font: inherit; font-size: 12px; width: 24px; height: 24px; flex-shrink: 0; display: grid; place-items: center; border: 1.5px solid var(--border); border-radius: 7px; color: var(--muted); }
.pt-opts.compact .pt-opt kbd { display: none; }
.pt-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.pt-opt.right { border-color: #22c55e; background: color-mix(in srgb, #22c55e 16%, var(--surface)); }
.pt-opt.wrong { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, var(--surface)); }
.pt-line { min-height: 56px; border-bottom: 2px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0; align-content: flex-start; }
.pt-bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pt-chip { border: 2px solid var(--border); border-bottom-width: 4px; background: var(--surface); color: var(--text); border-radius: 12px; padding: 8px 13px; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; transition: transform .06s, opacity .1s; }
.pt-chip:active { transform: translateY(2px); }
.pt-chip.used { opacity: .25; pointer-events: none; }
.pt-text { width: 100%; font: inherit; font-size: 18px; padding: 12px 14px; border-radius: var(--r-md); border: 2px solid var(--border); background: var(--surface); color: var(--text); resize: vertical; }
.pt-text:focus { border-color: var(--accent); outline: none; }
.pt-listen { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pt-listen { flex-direction: row; justify-content: center; flex-wrap: wrap; }
.pt-play { width: 96px; height: 96px; border-radius: 26px; border: 0; background: var(--accent); color: #fff; font-size: 40px; cursor: pointer; box-shadow: 0 5px 0 color-mix(in srgb, var(--accent) 65%, #000); }
.pt-play:active { transform: translateY(5px); box-shadow: none; }
.pt-slow { width: 60px; height: 60px; align-self: flex-end; border-radius: 18px; border: 2px solid var(--border); border-bottom-width: 4px; background: var(--surface); font-size: 26px; cursor: pointer; }
.pt-reveal { width: 100%; text-align: center; margin: 4px 0 0; font-weight: 700; color: var(--muted); }
.pt-say { display: flex; align-items: center; gap: 6px; }
.pt-mic { align-self: center; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 18px; padding: 16px 28px; font: inherit; font-size: 18px; font-weight: 900; cursor: pointer; color: #fff; background: var(--accent); box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 65%, #000); }
.pt-mic .rp-dot { display: none; background: #fff; }
.pt-mic.rec { background: var(--danger); box-shadow: 0 4px 0 #991b1b; }
.pt-mic.rec .rp-dot { display: block; }
.pt-heard { text-align: center; min-height: 1.4em; margin: 0; font-size: 17px; }
.pt-heard small { color: var(--muted); font-weight: 800; }
#ptNoSpeak { align-self: center; }
.pt-match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pt-match > div { display: flex; flex-direction: column; gap: 10px; }
.pt-match .pt-chip { text-align: center; }
.pt-match .pt-chip.on { border-color: var(--accent); background: var(--accent-soft); }
.pt-match .pt-chip.done { border-color: #22c55e; color: #16a34a; opacity: .55; pointer-events: none; }
.pt-match .pt-chip.bad { border-color: var(--danger); animation: pw-shake .15s linear 3; }

/* rodapé: verificar / resultado */
.pt-foot { position: sticky; bottom: -60px; margin: 0 -16px -60px; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 2px solid var(--border); display: flex; align-items: center; gap: 14px; justify-content: space-between; }
.pt-foot .pt-check { width: auto; min-width: 180px; margin-left: auto; }
.pt-feedback { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pt-feedback b { font-size: 18px; font-weight: 900; }
.pt-feedback span { font-weight: 600; }
.pt-foot.ok { background: color-mix(in srgb, #22c55e 16%, var(--bg)); border-color: transparent; }
.pt-foot.ok b { color: #16a34a; }
.pt-foot.ok .pt-check { background: #22c55e; box-shadow: 0 4px 0 #15803d; }
.pt-foot.bad { background: color-mix(in srgb, var(--danger) 14%, var(--bg)); border-color: transparent; }
.pt-foot.bad b { color: var(--danger); }
.pt-foot.bad .pt-check { background: var(--danger); box-shadow: 0 4px 0 #991b1b; }
.pt-correct { font-size: 17px; font-weight: 800; }

/* fim da lição */
.pt-bigstars { font-size: 46px; letter-spacing: 6px; color: var(--surface-2); }
.pt-bigstars .on { color: #eab308; }
.pt-endstats { display: flex; gap: 12px; }
.pt-endstats div { border: 2px solid var(--border); border-radius: var(--r-md); padding: 10px 16px; display: flex; flex-direction: column; min-width: 90px; }
.pt-endstats b { font-size: 22px; font-weight: 900; }
.pt-endstats span { font-size: 12.5px; color: var(--muted); font-weight: 700; }

@media (max-width: 600px) {
  .path .t-top h2 { display: block !important; font-size: 17px; }
  .pt-levels button { padding: 6px 7px; font-size: 12.5px; }
  .pt-node { width: 64px; height: 64px; }
  .pt-node.current { width: 74px; height: 74px; }
  .pt-q { font-size: 18px; }
  .pt-foot { flex-direction: column; align-items: stretch; }
  .pt-foot .pt-check { width: 100%; margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .pt-node.current { animation: none; } }
@media (max-width: 600px) { .today-item[data-node="streak"] { display: none; } }  /* a ofensiva já está no topo */
/* rodapé da lição colado no fim da tela (o padding de baixo da trilha deixava ele flutuando) */
.pt-body:has(.pt-foot) { padding-bottom: 0; }
.pt-foot { bottom: 0; margin: 0 -16px; }
.pt-item { min-height: calc(100% - 96px); }
.pt-end .chunky.ghost.pt-cta { margin-top: 0; }
.pt-unit-badge { background: var(--u); color: #fff; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; padding: 6px 14px; border-radius: 999px; box-shadow: 0 3px 0 color-mix(in srgb, var(--u) 65%, #000); }
.pt-can { font-size: 17px; margin: 0; max-width: 460px; }
.pt-end.unit-done .pt-caio-big { width: 180px; height: 180px; }

/* ---------------------------------------------------------------- flashcards: central de baralhos */
.rv-body:has(.rv-hub), .rv-body:has(.rv-browse) { max-width: 980px; justify-content: flex-start; }
.rv-top:has(+ .rv-body .rv-hub), .rv-top:has(+ .rv-body .rv-browse) { max-width: 980px; }
.rv-top:has(+ .rv-body .rv-hub) .rv-progress, .rv-top:has(+ .rv-body .rv-browse) .rv-progress { visibility: hidden; }
.rv-hub { display: flex; flex-direction: column; gap: 18px; }
.hub-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.hub-top h2 { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -.02em; }
.hub-top p { margin: 2px 0 0; font-size: 14px; }
.hub-top .btn[disabled] { opacity: .6; cursor: default; box-shadow: none; transform: none; }
.rv-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rv-modes .mode { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 8px; padding: 10px 14px; border-radius: var(--r-md); }
.rv-modes .mode .m-ico { font-size: 20px; }
.rv-modes .mode span:last-child { flex-basis: 100%; font-size: 12.5px; }
.rv-modes .mode.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.deck-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.deck-card.empty { border-style: dashed; background: transparent; }
.dk-head { display: flex; gap: 12px; align-items: flex-start; }
.dk-ico { font-size: 26px; line-height: 1; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); flex-shrink: 0; }
.dk-head b { display: block; font-size: 16.5px; font-weight: 800; }
.dk-head small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.dk-nums { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.dk-nums b { color: var(--text); font-size: 15px; }
.dk-bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.dk-bar span { display: block; height: 100%; background: #22c55e; border-radius: 99px; }
.dk-empty { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.dk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.rv-done-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.rv-browse { display: flex; flex-direction: column; gap: 12px; }
.br-top { display: flex; align-items: center; gap: 10px; }
.br-top h2 { margin: 0; font-size: 22px; font-weight: 900; }
.br-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.br-tools input { flex: 1; min-width: 180px; padding: 9px 12px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.br-list { display: flex; flex-direction: column; gap: 6px; }
.br-list > p { margin: 0 0 4px; }
.br-row { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 10px; }
.br-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.br-txt b { font-weight: 800; overflow-wrap: anywhere; }
.br-txt span { color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.br-row .chip { cursor: default; font-size: 12px; padding: 3px 9px; flex-shrink: 0; max-width: none; }
.br-row .chip.new { color: var(--accent); border-color: var(--accent); }
.br-row .chip.due { color: #d97706; border-color: #f59e0b; }
.br-del { opacity: .55; }
.br-del:hover { opacity: 1; }
.gen-ico { font-size: 16px; }
@media (max-width: 640px) {
  .rv-modes .mode span:last-child { display: none; }
  .rv-modes { grid-template-columns: repeat(3, 1fr); }
  .rv-modes .mode { justify-content: center; padding: 8px; }
  .hub-top .btn { width: 100%; }
  .br-row .chip { display: none; }
}

/* ---------------------------------------------------------------- TV: categorias em acordeão + player próprio */
.tv-list { gap: 8px; }
.tv-group { gap: 0; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.tv-cat { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 0; background: transparent; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.tv-cat:hover { background: var(--hover); }
.tv-cat-ico { font-size: 20px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); flex-shrink: 0; }
.tv-cat-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tv-cat-txt b { font-weight: 800; font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--text); }
.tv-cat-txt small { color: var(--muted); font-size: 12.5px; }
.tv-cat-live { font-size: 11.5px; font-weight: 800; color: #ef4444; white-space: nowrap; }
.tv-cat-chev { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s; flex-shrink: 0; }
.tv-group.open .tv-cat-chev { transform: rotate(180deg); }
.tv-group.open .tv-cat { border-bottom: 1px solid var(--border); }
.tv-cat-body { display: flex; flex-direction: column; gap: 6px; padding: 0 10px; }
.tv-group.open .tv-cat-body { padding: 10px; }
.tv-cat-body .tv-ch { background: var(--bg); }
.tv-eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; margin-right: 6px; vertical-align: -1px; }
.tv-eq b { width: 3px; background: var(--accent); border-radius: 1px; animation: tvEq 1s ease-in-out infinite; }
.tv-eq b:nth-child(2) { animation-delay: -.4s; } .tv-eq b:nth-child(3) { animation-delay: -.7s; }
@keyframes tvEq { 0%, 100% { height: 4px; } 50% { height: 12px; } }

.tv-stage { cursor: default; user-select: none; }
.tv-stage.playing.hud, .tv-stage.is-paused { cursor: default; }
.tv-stage.playing:not(.hud):not(.is-paused) { cursor: none; }
.tv-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 20px;
  background: radial-gradient(ellipse at center, #1f2937 0%, #000 75%); }
.tv-empty-ico { font-size: 44px; }
.tv-empty b { font-size: 19px; color: #fff; }
.tv-empty span:last-child { font-size: 14px; color: #a1a1aa; font-weight: 500; }
.tv-spin { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; animation: tvSpin .8s linear infinite; display: none; pointer-events: none; }
.tv-stage.loading .tv-spin { display: block; }
@keyframes tvSpin { to { transform: rotate(360deg); } }
.tv-hud-top, .tv-bar { position: absolute; left: 0; right: 0; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 2; }
.tv-stage.playing.hud .tv-hud-top, .tv-stage.playing.hud .tv-bar, .tv-stage.playing.is-paused .tv-hud-top, .tv-stage.playing.is-paused .tv-bar { opacity: 1; pointer-events: auto; }
.tv-hud-top { top: 0; display: flex; align-items: center; gap: 10px; padding: 12px 14px 28px; background: linear-gradient(rgba(0,0,0,.65), transparent); color: #fff; }
.tv-hud-top b { font-size: 15px; font-weight: 800; text-shadow: 0 1px 2px #000; }
.tv-live-dot { font-size: 11px; font-weight: 900; letter-spacing: .06em; background: #dc2626; color: #fff; border-radius: 5px; padding: 3px 7px; }
.tv-bar { bottom: 0; display: flex; align-items: center; gap: 4px; padding: 44px 10px 10px; background: linear-gradient(transparent, rgba(0,0,0,.6) 35%, rgba(0,0,0,.92)); flex-wrap: wrap; }
.tvb { text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.tv-bar-gap { flex: 1; }
.tvb { border: 0; background: transparent; color: #fff; height: 36px; min-width: 36px; padding: 0 8px; border-radius: 10px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.tvb:hover { background: rgba(255,255,255,.16); }
.tvb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tvb.cc { border: 1.5px solid rgba(255,255,255,.55); height: 28px; min-width: 38px; border-radius: 7px; font-size: 12px; color: rgba(255,255,255,.7); }
.tvb.cc.on { background: #fff; color: #000; border-color: #fff; }
.tvb.ok { background: #16a34a; }
.tv-live-btn i { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.25); }
.tv-live-btn.behind { color: rgba(255,255,255,.75); }
.tv-live-btn.behind i { background: #9ca3af; box-shadow: none; }
.tv-volw { display: inline-flex; align-items: center; }
.tv-volw input { width: 0; opacity: 0; transition: width .18s, opacity .18s; accent-color: #fff; }
.tv-volw:hover input, .tv-volw:focus-within input { width: 80px; opacity: 1; margin-right: 6px; }
.tv-subs { bottom: 12%; transition: bottom .2s; z-index: 1; }
.tv-stage.playing.hud .tv-subs, .tv-stage.playing.is-paused .tv-subs { bottom: 76px; }
.tv-en { font-size: calc(clamp(15px, 2.2vw, 24px) * var(--tv-sub, 1)); }
.tv-nat { font-size: calc(clamp(13px, 1.8vw, 20px) * var(--tv-sub, 1)); }
.tv-stage:fullscreen { border-radius: 0; aspect-ratio: auto; }
.tv-stage:fullscreen video { object-fit: contain; }
.tv-stage:fullscreen .tv-en { font-size: calc(clamp(22px, 2.6vw, 40px) * var(--tv-sub, 1)); }
.tv-stage:fullscreen .tv-nat { font-size: calc(clamp(18px, 2.1vw, 32px) * var(--tv-sub, 1)); }
@media (max-width: 640px) {
  .tv-bar { gap: 2px; padding: 24px 6px 6px; flex-wrap: nowrap; }
  #tvLiveBtn { font-size: 0; gap: 0; } .tv-volw { display: none; }
  .tv-hud-top { padding: 8px 10px 20px; } .tv-hud-top b { font-size: 13px; }
  .tvb { height: 32px; min-width: 32px; padding: 0 6px; font-size: 12px; }
  #tvBackBtn, #tvSubSize, .tv-volw input { display: none; }
  #tvReplayBtn { font-size: 0; } #tvReplayBtn::before { content: "🔁"; font-size: 15px; }
  #tvSaveBtn { font-size: 0; } #tvSaveBtn::before { content: "＋"; font-size: 17px; }
  .tv-stage.playing.hud .tv-subs, .tv-stage.playing.is-paused .tv-subs { bottom: 46px; }
}

/* ---------------------------------------------------------------- homework v2 */
.hw-card .pw-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hw-status { font-size: 12.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: #fef3c7; color: #92400e; }
.hw-status.ok { background: #dcfce7; color: #166534; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hw-status { background: #422006; color: #fcd34d; } :root:not([data-theme="light"]) .hw-status.ok { background: #052e16; color: #86efac; } }
:root[data-theme="dark"] .hw-status { background: #422006; color: #fcd34d; } :root[data-theme="dark"] .hw-status.ok { background: #052e16; color: #86efac; }
.hw-prompt { display: flex; align-items: flex-start; gap: 10px; }
.hw-prompt p { margin: 0; flex: 1; font-size: 17px; line-height: 1.5; }
.hw-hints ul { list-style: none; padding-left: 0; gap: 6px; }
.hw-hint { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 14.5px; text-align: left; border-radius: 12px; padding: 7px 12px; cursor: pointer; width: 100%; }
.hw-hint::before { content: "💬 "; }
.hw-hint:hover { border-color: var(--accent); }
.hw-rec { background: var(--surface-2); border: 0; border-radius: var(--r-lg); padding: 16px; margin-top: 10px; }
.hw-rec.redo .hw-rec-btn:not(.rec) { background: var(--surface); border: 2px solid var(--accent); }
.hw-rec.redo .hw-rec-txt > b { font-size: 20px; }
.hw-rec-txt { flex: 1; min-width: 0; }
.hw-lvl { position: absolute; inset: 0; border-radius: 50%; background: var(--danger); opacity: .25; transform: scale(calc(1 + var(--lvl, 0) * .45)); transition: transform .08s linear; pointer-events: none; display: none; }
.hw-rec-btn.rec .hw-lvl { display: block; }
.hw-min { height: 5px; border-radius: 99px; background: var(--border); overflow: hidden; margin: 6px 0 2px; max-width: 260px; display: none; }
.hw-rec.recording .hw-min { display: block; }
.hw-min i { display: block; height: 100%; width: var(--p, 0%); background: #f59e0b; border-radius: 99px; transition: width .2s linear; }
.hw-min.ok i { background: #22c55e; }
.hw-rec-note { margin: 8px 0 0; padding-top: 12px; border-top: 1px solid var(--border); }
.hw-best { color: var(--muted) !important; font-weight: 700; }
.hw-caio { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 700; font-style: italic; }
.hw-caio img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex-shrink: 0; }
.hw-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hw-actions:empty { display: none; }
@media (max-width: 640px) { .hw-rec { flex-direction: row; } .hw-rec-btn { width: 72px; height: 72px; } .hw-rec-btn svg { width: 84px; height: 84px; } }

/* ---------------------------------------------------------------- Full Power: correção no mesmo campo de visão */
.pw-res-top { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.pw-res-top .pw-actions { margin-top: 0; }
.pw-res-body { display: flex; flex-direction: column; gap: 10px; }
.pw-stage.has-result .pw-how, .pw-stage.has-result #pwActions, .pw-stage.has-result .pw-type { display: none !important; }
.pw-stage.has-result .pw-card .pw-big { font-size: clamp(17px, 1.6vw, 20px); }
.pw-stage.has-result #pwResult { margin-top: 0; }
.pwr-wrap.has-result .pw-caio { margin-bottom: 12px; }
.pwr-wrap.has-result .pw-orb { width: 96px; height: 96px; }
.pwr-wrap.has-result .pw-bubble { margin-bottom: 8px; }

/* computador: desafio à esquerda, correção à direita, tudo sem rolar a página */
@media (min-width: 1000px) {
  .pwr-wrap.has-result .pw-caio, .pw-stage.has-result { max-width: 1280px; }
  .pw-stage.has-result { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
  .pw-stage.has-result .pw-card { position: sticky; top: 0; }
  .pw-stage.has-result .pw-result { max-height: calc(100dvh - 250px); overflow: hidden; padding: 0; gap: 0; }
  .pw-stage.has-result .pw-res-top { padding: 16px 20px 12px; border-bottom: 1px solid var(--border); }
  .pw-stage.has-result .pw-res-body { overflow-y: auto; padding: 14px 20px 18px; min-height: 0; }
  .pw-stage.has-result .pw-result { display: flex; flex-direction: column; }
  .pw-stage.has-result .pw-grading-box { padding: 18px 20px; }
}

/* celular: a correção sobe e o desafio vira um resumo que abre com um toque */
@media (max-width: 999px) {
  .pw-stage.has-result { display: flex; flex-direction: column; gap: 12px; }
  .pw-stage.has-result #pwResult { order: -1; }
  .pw-stage.has-result .pw-card { cursor: pointer; max-height: 118px; overflow: hidden; position: relative; gap: 6px; }
  .pw-stage.has-result .pw-card::after { content: "toque pra ver o desafio ▾"; position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 8px; font-size: 12px; font-weight: 700; color: var(--muted);
    background: linear-gradient(transparent, var(--surface) 55%); }
  .pw-stage.has-result .pw-card.open { max-height: none; }
  .pw-stage.has-result .pw-card.open::after { content: "toque pra recolher ▴"; position: static; background: none; padding: 4px 0 0; }
  .pw-stage.has-result .pw-card .pw-timer { width: 44px; height: 44px; } .pw-stage.has-result .pw-card .pw-timer svg { width: 44px; height: 44px; }
  .pw-stage.has-result .pw-card .pw-timer b { font-size: 12px; }
  .pwr-wrap.has-result .pw-orb { width: 72px; height: 72px; }
  .pw-res-top .pw-actions { width: 100%; }
  .pw-res-top .pw-actions .btn { flex: 1; }
}
@media (max-width: 999px) { .pw-res-top .btn { white-space: nowrap; } .pw-lg { display: none; } }

/* ---------------------------------------------------------------- rolagem discreta + telas que se ajustam à altura */
/* barra fina e transparente em todo o app; aparece só com o mouse sobre a área (sem as setas do Windows) */
* { scrollbar-width: thin; scrollbar-color: transparent transparent; }
*:hover { scrollbar-color: color-mix(in srgb, var(--muted) 40%, transparent) transparent; }
@media (hover: none) { * { scrollbar-width: none; } }

/* central de flashcards: os 5 baralhos numa linha em tela larga, cartões compactos em tela baixa */
.rv-body:has(.rv-hub) { max-width: 1320px; }
.rv-top:has(+ .rv-body .rv-hub) { max-width: 1320px; }
.deck-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.dk-head small { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-height: 900px) and (min-width: 641px) {
  .rv-hub { gap: 12px; }
  .hub-top h2 { font-size: 24px; }
  .rv-modes .mode { padding: 8px 12px; }
  .deck-card { padding: 12px 14px; gap: 9px; }
  .dk-ico { width: 38px; height: 38px; font-size: 22px; }
  .dk-head small { -webkit-line-clamp: 2; }
  .dk-empty { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .rv-body { padding: 10px 0; }
}
/* TV: o vídeo nunca passa da altura da tela */
@media (min-width: 901px) { .tv-stage { width: min(100%, calc((100dvh - 190px) * 16 / 9)); align-self: center; } }
/* homework em tela baixa: perguntas em 2 colunas e gravador compacto, pra caber sem rolar */
@media (max-height: 900px) and (min-width: 901px) {
  .hw-wrap { padding-top: 14px; gap: 16px; }
  .hw-card { padding: 14px 18px; gap: 8px; }
  .hw-card .pw-big { font-size: 21px; margin: 0; }
  .hw-hints ul { display: grid; grid-template-columns: 1fr 1fr; }
  .hw-hint { padding: 6px 10px; font-size: 14px; height: 100%; }
  .hw-phrasal { padding: 8px 12px; }
  .hw-phrasal b { font-size: 19px; }
  .hw-rec { padding: 10px 14px; margin-top: 4px; }
  .hw-rec-btn { width: 64px; height: 64px; } .hw-rec-btn svg { width: 76px; height: 76px; }
  .hw-rec-btn span { font-size: 24px; }
  .hw-rec-txt b { font-size: 22px; }
  .hw-cal { padding: 10px 12px; }
  .hw-day { aspect-ratio: auto; height: 34px; }
}

/* homework em abas: lição | resultado */
.hw-tabs { display: flex; gap: 6px; background: var(--surface-2); padding: 5px; border-radius: var(--r-lg); }
.hw-tabs button { flex: 1; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 800; font-size: 15px; padding: 10px 12px; border-radius: var(--r-md); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.hw-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.hw-tabs button:disabled { opacity: .45; cursor: default; }
.hw-tab-score { font-size: 12.5px; padding: 1px 8px; border-radius: 999px; color: #fff; }
.hw-tab-score.good { background: #16a34a; } .hw-tab-score.mid { background: #ca8a04; } .hw-tab-score.low { background: var(--danger); }
#hwResult.hidden, .hw-card.hidden { display: none !important; }
@media (min-width: 901px) {
  #hwResult .hw-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 24px; }
  #hwResult .hw-bars div { grid-template-columns: 110px 1fr 28px; }
}
@media (max-height: 900px) and (min-width: 901px) { #hwResult .pw-result { padding: 14px 18px; gap: 9px; } #hwResult .pw-score b { font-size: 34px; } }

/* ---------------------------------------------------------------- flashcards v2: sessão sem vazamento + painel de exemplos */
.shell > .review { overflow: hidden; }
/* centraliza "com segurança": se o cartão for maior que a tela, começa do topo em vez de cortar */
.rv-body { justify-content: flex-start; gap: 14px; }
.rv-body::before, .rv-body::after { content: ""; flex: 1 1 0; min-height: 0; }
.rv-body:has(.rv-hub)::before, .rv-body:has(.rv-hub)::after, .rv-body:has(.rv-browse)::before, .rv-body:has(.rv-browse)::after { display: none; }
.fc { min-height: 0; flex-shrink: 0; padding: 22px 22px 14px; gap: 10px; }
.fc .fc-img { width: min(100%, 320px, calc(38dvh * 1.6)); }
.rv-dock { position: sticky; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: 10px; background: var(--bg); padding: 8px 0 2px; flex-shrink: 0; }
.rv-dock .quiz-opts { margin: 0; }
.rv-actions button { position: relative; padding: 10px 6px 9px; }
kbd { font: inherit; font-size: 10.5px; font-weight: 800; color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; line-height: 16px; }
.rv-actions kbd { position: absolute; top: 6px; right: 7px; }
.rv-show kbd { margin-left: 8px; color: inherit; opacity: .7; border-color: currentColor; }
@media (hover: none), (max-width: 640px) { kbd { display: none; } }
.fc-tools { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--border); width: 100%; }
.fc-tool { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.fc-tool:hover { background: var(--hover); color: var(--text); }
.fc-side { position: absolute; top: 0; right: 0; bottom: 0; width: min(400px, 100%); z-index: 44; background: var(--surface); border-left: 1px solid var(--border); box-shadow: -12px 0 30px rgba(0,0,0,.12);
  display: flex; flex-direction: column; transform: translateX(105%); transition: transform .22s ease; }
.review.side-open .fc-side { transform: none; }
.fc-side-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid var(--border); }
.fc-side-head b { display: block; font-size: 20px; font-weight: 900; margin-top: 2px; }
.fc-side-body { flex: 1; overflow-y: auto; padding: 14px 16px 24px; display: flex; flex-direction: column; gap: 8px; }
.fc-side-body .fc-credit { max-width: none; white-space: normal; margin-top: 6px; }
.fc-side-shade { display: none; }
@media (min-width: 1100px) { .review.side-open .rv-body, .review.side-open .rv-top { transform: translateX(-200px); transition: transform .22s ease; } .rv-body, .rv-top { transition: transform .22s ease; } }
@media (max-width: 700px) {
  .fc-side { top: auto; left: 0; width: 100%; height: min(72dvh, 560px); border-left: 0; border-top: 1px solid var(--border); border-radius: 20px 20px 0 0; transform: translateY(105%); box-shadow: 0 -12px 30px rgba(0,0,0,.18); }
  .review.side-open .fc-side { transform: none; }
  .review.side-open .fc-side-shade { display: block; position: absolute; inset: 0; z-index: 43; background: rgba(0,0,0,.4); }
}

/* ---------------------------------------------------------------- central de flashcards v3 */
.rv-body:has(.hub3), .rv-top:has(+ .rv-body .hub3) { max-width: 1040px; }
.hub3 { gap: 18px; padding-bottom: 12px; }
.hub-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 20px 24px; border-radius: 24px;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); border: 1px solid var(--border); }
.hh-ring { position: relative; width: 104px; height: 104px; display: grid; place-items: center; text-align: center; }
.hh-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.hh-ring circle { fill: none; stroke-width: 7; }
.hh-bg { stroke: var(--surface-2); }
.hh-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.hh-ring b { font-size: 30px; font-weight: 900; line-height: 1; margin-top: 10px; }
.hh-ring small { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-top: -18px; }
.hh-main h2 { margin: 0; font-size: 24px; font-weight: 900; letter-spacing: -.02em; }
.hh-main > p.muted { margin: 3px 0 12px; font-size: 14px; }
.hh-modes { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px; flex-wrap: wrap; }
.hh-mode { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 800; font-size: 14px; padding: 7px 14px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.hh-mode:hover { color: var(--text); }
.hh-mode.on { background: var(--accent); color: var(--accent-text); }
.hh-mode-desc { margin: 7px 0 0 4px; font-size: 12.5px; color: var(--muted); }
.hh-cta { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.btn.big { padding: 14px 26px; font-size: 17px; border-radius: 16px; }
.hub-sec { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 2px -6px; }
.hub-sec h3 { margin: 0; font-size: 17px; font-weight: 900; }
.dk-list { display: flex; flex-direction: column; gap: 8px; }
.dk-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; transition: border-color .12s, transform .12s; }
.dk-row:hover { border-color: color-mix(in srgb, var(--dk) 55%, var(--border)); }
.dk-row.empty { background: transparent; border-style: dashed; }
.dk-row.empty .dk-tile { filter: grayscale(.6); opacity: .75; }
.dk-tile { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: color-mix(in srgb, var(--dk) 16%, transparent); }
.dk-info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dk-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dk-title b { font-size: 16px; font-weight: 800; }
.dk-due { font-size: 12px; font-weight: 800; color: var(--dk); background: color-mix(in srgb, var(--dk) 14%, transparent); padding: 2px 9px; border-radius: 999px; }
.dk-ok { font-size: 12px; font-weight: 700; color: #16a34a; }
.dk-prog { display: flex; align-items: center; gap: 10px; }
.dk-prog i { flex: 1; max-width: 360px; height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.dk-prog i span { display: block; height: 100%; border-radius: 99px; background: var(--dk); }
.dk-prog small { font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dk-hint { font-size: 13px; color: var(--muted); line-height: 1.35; }
.dk-acts { display: flex; align-items: center; gap: 6px; }
.dk-acts .btn.small { min-width: 104px; }
.dk-icon { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 17px; cursor: pointer; display: grid; place-items: center; }
.dk-icon:hover { background: var(--hover); }
.dk-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 760px) {
  .hub-hero { grid-template-columns: auto minmax(0, 1fr); padding: 16px; gap: 14px; }
  .hh-ring { width: 84px; height: 84px; } .hh-ring b { font-size: 24px; }
  .hh-main h2 { font-size: 19px; }
  .hh-cta { grid-column: 1 / -1; } .hh-cta .btn { width: 100%; }
  .hh-modes { display: flex; } .hh-mode { flex: 1; justify-content: center; padding: 7px 8px; font-size: 13px; }
  .dk-row { grid-template-columns: auto minmax(0, 1fr); }
  .dk-acts { grid-column: 1 / -1; } .dk-acts .btn.small { flex: 1; }
}
@media (min-width: 761px) {
  .dk-acts { display: grid; grid-template-columns: 116px 38px 38px; justify-items: stretch; }
  .dk-acts .btn.small { min-width: 0; }
  .dk-acts .dk-wide { grid-column: 1 / -1; }
}
.hh-short { display: none; }
@media (max-width: 760px) {
  .hh-long, .hh-ico { display: none; } .hh-short { display: inline; }
  .hub-hero { grid-template-columns: 76px minmax(0, 1fr); }
  .hh-ring { width: 76px; height: 76px; } .hh-ring b { font-size: 22px; margin-top: 8px; } .hh-ring small { font-size: 10px; margin-top: -14px; }
  .hh-main > p.muted { margin-bottom: 10px; font-size: 13px; }
}

/* Caio da TV (tela vazia) e da Trilha (rodapé reagindo) */
.tv-caio { width: min(220px, 34%); height: auto; aspect-ratio: 1; margin-bottom: 4px; }
/* Caio da Trilha: no topo do exercício, ao lado do enunciado, reagindo a cada resposta */
.pt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 120px; }
.pt-head .pt-title { flex: 1; min-width: 0; }
.pt-head .pt-caio { width: 150px; height: 150px; flex-shrink: 0; margin: -10px -6px -14px 0; }
.pt-head .pt-caio img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.25)); }
.pt-head .pt-caio.pop img { animation: pw-pop .35s ease-out; }
.pt-foot .pt-feedback { flex: 1; }
@media (max-width: 600px) { .pt-head { min-height: 96px; } .pt-head .pt-caio { width: 104px; height: 104px; margin: -6px -4px -10px 0; } }
@media (max-height: 640px) and (max-width: 600px) { .pt-head { min-height: 76px; } .pt-head .pt-caio { width: 84px; height: 84px; } }
@media (prefers-reduced-motion: reduce) { .pt-head .pt-caio.pop img { animation: none; } }
/* Caio de cada unidade no cabeçalho verde (sai um pouco por cima, como sticker) */
.pt-banner { display: flex; align-items: flex-end; gap: 10px; position: relative; overflow: visible; }
.pt-banner > div { flex: 1; min-width: 0; align-self: center; }
.pt-banner-caio { width: 118px; height: 118px; flex-shrink: 0; margin: -34px -6px -16px 0; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
@media (max-width: 600px) { .pt-banner-caio { width: 92px; height: 92px; margin: -26px -8px -16px 0; } }
.update-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); font-weight: 700; max-width: calc(100vw - 24px); animation: pop .15s ease-out; }

/* ================================================================ Trilha v3 — dimensões medidas no app do Duolingo (Android, 360 dp de largura)
   nó 70×62 com sombra de 7, anel de 94 no atual, desvio máximo de 70 no zigue-zague, balão "Começar" em cima do nó, faixa da unidade de ~76 de altura */
.pt-body { --zig: 90px; }
.pt-row { transform: translateX(calc(var(--z, 0) * var(--zig))); }
.pt-nodes { gap: 14px; padding: 26px 0 8px; }
.pt-node { width: 76px; height: 68px; box-shadow: 0 7px 0 color-mix(in srgb, var(--u) 65%, #000); }
.pt-node.locked { box-shadow: 0 7px 0 var(--border); }
.pt-node:active:not(:disabled) { transform: translateY(6px); }
.pt-node.current { width: 76px; height: 68px; outline: 7px solid color-mix(in srgb, var(--u) 32%, transparent); outline-offset: 6px; animation: none; margin: 13px 0 6px; }
.pt-stars { bottom: -21px; }
.pt-label { margin-top: 10px; max-width: 150px; text-align: center; line-height: 1.25; }
.pt-row.cur .pt-label { color: var(--text); margin-top: 12px; }
/* balão "Começar" em cima do nó atual, como o do Duolingo */
.pt-row .pt-go { position: relative; background: var(--surface); color: var(--u); border: 2px solid var(--border); border-radius: 14px; box-shadow: 0 3px 0 var(--border);
  font-size: 15px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; padding: 9px 16px; margin-bottom: 14px; animation: pt-bob 1.8s ease-in-out infinite; }
.pt-row .pt-go::after { content: ""; position: absolute; left: 50%; top: 100%; width: 12px; height: 12px; background: var(--surface);
  border-right: 2px solid var(--border); border-bottom: 2px solid var(--border); transform: translate(-50%, -5px) rotate(45deg); }
.pt-row .pt-go:active { transform: translateY(3px); box-shadow: none; animation: none; }
/* Caio do lado oposto ao desvio: nunca sai da tela */
.pt-row.cur .pt-side { position: absolute; bottom: 0; width: 84px; height: 84px; }
.pt-row.cur .pt-side.left { right: calc(50% + 60px); }
.pt-row.cur .pt-side.right { left: calc(50% + 60px); }
/* faixa da unidade: texto em linhas curtas, sem entrelinha herdada */
.pt-banner { padding: 14px 16px; border-radius: 16px; line-height: 1.25; min-height: 76px; }
.pt-banner small { font-size: 12.5px; margin-bottom: 2px; }
.pt-banner b { font-size: 21px; line-height: 1.2; margin: 2px 0 4px; }
.pt-banner span { display: block; font-size: 14px; line-height: 1.35; }
@media (prefers-reduced-motion: reduce) { .pt-row .pt-go { animation: none; } }

@media (max-width: 600px) {
  .pt-body { --zig: 70px; padding: 16px 16px 48px; }
  .pt-units { gap: 22px; }
  /* cabeçalho em duas linhas: título + contagem + ações em cima, níveis ocupando a largura toda embaixo */
  #ptTop { flex-wrap: wrap; gap: 6px 8px; padding: 8px 12px 10px; min-height: 0; }
  #ptTop h2 { order: 1; font-size: 18px; white-space: nowrap; }
  #ptTop #ptCount { order: 2; }
  #ptTop .tour-help { order: 3; }
  #ptTop #ptClose { order: 4; }
  #ptTop .pt-levels { order: 5; flex: 1 0 100%; }
  .pt-levels button { padding: 8px 4px; font-size: 14px; }
  .pt-node, .pt-node.current { width: 70px; height: 62px; }
  .pt-node.current { outline-offset: 5px; margin: 12px 0 5px; }
  .pt-node .pt-ico { font-size: 26px; }
  .pt-label { font-size: 13px; max-width: 120px; }
  .pt-row.cur .pt-side { width: 72px; height: 72px; }
  .pt-row.cur .pt-side.left { right: calc(50% + 52px); }
  .pt-row.cur .pt-side.right { left: calc(50% + 52px); }
  .pt-banner { padding: 12px 14px; }
  .pt-banner small { font-size: 12px; }
  .pt-banner b { font-size: 19px; }
  .pt-banner span { font-size: 13.5px; }
  .pt-banner-caio { width: 84px; height: 84px; margin: -24px -6px -12px 0; }
}
.pt-levels button { color: var(--muted); transition: background-color .12s, color .12s; }
.pt-levels button.on { background: var(--accent-soft); color: var(--accent); font-weight: 900; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent); }

/* ================================================================ Barra de abas do celular (padrão Duolingo: 6 ícones, a ativa fica emoldurada) */
.tabbar { display: none; }
@media (max-width: 820px) {
  .shell { --tabbar: calc(64px + env(safe-area-inset-bottom)); height: calc(100dvh - var(--tabbar)); }
  .shell > .review, .shell > .teacher, .shell > .call, .shell > .power, .shell > .homework, .shell > .tv, .shell > .path { height: 100%; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: var(--tabbar); padding: 6px 6px env(safe-area-inset-bottom);
    background: var(--bg); border-top: 2px solid var(--border); justify-content: space-around; align-items: center; }
  .tabbar button { position: relative; flex: 1; max-width: 64px; height: 52px; border: 2px solid transparent; border-radius: 14px; background: transparent; color: var(--muted);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; }
  .tabbar button i { font-style: normal; font-size: 25px; line-height: 1; filter: saturate(.85); transition: transform .12s; }
  .tabbar button span { font-size: 10px; font-weight: 800; letter-spacing: .02em; }
  .tabbar button.on { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: var(--accent-soft); color: var(--accent); }
  .tabbar button.on i { filter: none; transform: scale(1.08); }
  .tabbar button:active i { transform: scale(.9); }
  .tabbar .tb-more { font-size: 18px !important; font-weight: 900; color: #a78bfa; letter-spacing: -1px; }
  .tb-dot { position: absolute; top: 6px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--bg); }
  .shell.no-tabbar { height: 100dvh; }
  .shell.no-tabbar ~ .tabbar, .shell.no-tabbar .tabbar { display: none; }
  .shell.sb-open .tabbar { display: none; }
}

/* ================================================================ Trilha: barra de status + nós trancados apagados (não cadeado) + faixa fixa ao rolar */
.pt-stats { display: flex; align-items: center; gap: 14px; }
.pt-stat { display: inline-flex; align-items: center; gap: 4px; font-size: 18px; line-height: 1; }
.pt-stat b { font-size: 16px; font-weight: 900; }
.pt-stat.fire b { color: var(--muted); }
.pt-stat.fire:not(.on) { filter: grayscale(1); opacity: .7; }
.pt-stat.fire.on b { color: #f97316; }
.pt-stat.xp b { color: #38bdf8; }
.pt-stat.lv b { color: #eab308; }
.pt-node.locked .pt-ico { filter: grayscale(1) brightness(.9); opacity: .45; font-size: 28px; }
.pt-banner { container-type: scroll-state; }
.pt-banner { position: sticky; top: -16px; z-index: 3; }
.pt-units { gap: 34px; }
@container scroll-state(stuck: top) {
  .pt-banner span { display: none; }
  .pt-banner .pt-banner-caio { width: 64px; height: 64px; margin: -12px -4px -10px 0; }
}
@media (max-width: 600px) {
  #ptTop h2 { display: none !important; }
  #ptTop .pt-stats { order: 1; margin-right: auto; gap: 16px; padding-left: 4px; }
}
@media (max-width: 820px) {
  :root { --tabbar: calc(64px + env(safe-area-inset-bottom)); }
  /* aviso de versão nova: faixa inteira acima das abas, texto numa linha só */
  .update-bar { left: 12px; right: 12px; transform: none; max-width: none; bottom: calc(var(--tabbar, 0px) + 12px); padding: 10px 8px 10px 14px; animation: none; }
  .update-bar span { flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; }
  .update-bar .btn { white-space: nowrap; flex-shrink: 0; }
  /* o "Mais" da barra de abas já abre o menu */
  .shell:not(.no-tabbar) #sbOpen { display: none; }
}
.pt-word b { padding-right: 28px; overflow-wrap: anywhere; }

/* ================================================================ Trilha: cartão do nó, voltar pra lição atual */
.pt-stat { background: transparent; border: 0; padding: 4px 2px; cursor: pointer; color: inherit; font: inherit; border-radius: 10px; }
.pt-stat:active { transform: scale(.94); }
.pt-node.locked { cursor: pointer; }
.pt-node.locked:active { transform: translateY(6px); box-shadow: 0 1px 0 var(--border); }
.pt-pop { position: absolute; top: calc(100% + 10px); left: 50%; z-index: 6; width: min(300px, calc(100vw - 32px));
  transform: translateX(calc(-50% - var(--z, 0) * var(--zig))); background: var(--u); color: #fff; border-radius: 18px; padding: 16px;
  display: flex; flex-direction: column; gap: 4px; text-align: left; box-shadow: 0 5px 0 color-mix(in srgb, var(--u) 65%, #000), 0 14px 30px rgba(0, 0, 0, .35); animation: pop .15s ease-out; }
.pt-pop::before { content: ""; position: absolute; top: -8px; left: calc(50% + var(--z, 0) * var(--zig)); width: 18px; height: 18px; background: var(--u); transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.pt-pop b { font-size: 18px; font-weight: 900; position: relative; }
.pt-pop span { font-size: 14.5px; font-weight: 700; opacity: .9; }
.pt-pop .pp-stars { color: #fde047; letter-spacing: 2px; font-size: 16px; opacity: 1; }
.pp-go { margin-top: 10px; border: 0; border-radius: 14px; background: #fff; color: var(--u); font: inherit; font-weight: 900; font-size: 15px; text-transform: uppercase; letter-spacing: .04em;
  padding: 13px; cursor: pointer; box-shadow: 0 4px 0 rgba(0, 0, 0, .18); }
.pp-go:active { transform: translateY(3px); box-shadow: none; }
.pt-pop.locked { background: var(--surface-2); color: var(--text); box-shadow: 0 5px 0 var(--border), 0 14px 30px rgba(0, 0, 0, .35); }
.pt-pop.locked::before { background: var(--surface-2); }
.pt-pop.locked .pp-go { background: var(--border); color: var(--muted); box-shadow: none; cursor: default; }
.pt-jump { position: fixed; right: 18px; bottom: 24px; z-index: 8; width: 54px; height: 54px; border-radius: 16px; border: 2px solid var(--border); background: var(--surface);
  color: var(--accent); font-size: 26px; font-weight: 900; cursor: pointer; box-shadow: 0 4px 0 var(--border); }
.pt-jump:active { transform: translateY(3px); box-shadow: none; }
@media (max-width: 820px) { .pt-jump { bottom: calc(var(--tabbar, 0px) + 16px); right: 16px; } }

/* rodapé do erro: Ouvir + Explique meu erro */
.pt-fb-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pt-explain { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--border)) !important; font-weight: 800; }

/* ================================================================ Folha que sobe de baixo (bs) */
.bs-wrap { position: fixed; inset: 0; z-index: 95; background: rgba(0, 0, 0, 0); display: flex; align-items: flex-end; justify-content: center; transition: background-color .2s; }
.bs-wrap.open { background: rgba(0, 0, 0, .55); }
.bs { width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto; background: var(--surface); color: var(--text); border-radius: 24px 24px 0 0;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; transform: translateY(100%); transition: transform .25s cubic-bezier(.2, .9, .3, 1.1); }
.bs-wrap.open .bs { transform: none; }
@media (min-width: 640px) { .bs-wrap { align-items: center; } .bs { border-radius: 24px; } }
.bs-grip { align-self: center; width: 44px; height: 5px; border-radius: 9px; background: var(--border); margin-bottom: 4px; }
.bs .chunky { width: 100%; }
.bs-head { display: flex; align-items: center; gap: 12px; }
.bs-head b { display: block; font-size: 20px; font-weight: 900; }
.bs-head span { color: var(--muted); font-weight: 700; font-size: 14px; }
.bs-caio { width: 84px; height: 84px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
.bs-caio.big { width: 170px; height: 170px; align-self: center; }
.bs-title { margin: 0; text-align: center; font-size: 22px; font-weight: 900; line-height: 1.25; }
.bs-sub { margin: 0; text-align: center; color: var(--muted); font-weight: 600; }
.bs-danger { border: 0; background: transparent; color: var(--danger); font: inherit; font-weight: 900; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; padding: 12px; cursor: pointer; }
.ex-body { min-height: 60px; display: flex; flex-direction: column; gap: 12px; }
.ex-body p { margin: 0; font-size: 17px; line-height: 1.5; }
.ex-example { display: flex; align-items: center; gap: 12px; text-align: left; border: 2px solid var(--border); border-bottom-width: 4px; background: var(--surface-2); color: var(--text);
  border-radius: 16px; padding: 12px 14px; font: inherit; cursor: pointer; }
.ex-example i { font-style: normal; font-size: 22px; }
.ex-example b { display: block; font-size: 17px; }
.ex-example small { color: var(--muted); font-weight: 600; font-size: 14px; }

/* ================================================================ Ofensiva */
.stk-hero { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: linear-gradient(135deg, #f97316, #facc15); color: #fff;
  border-radius: 20px; padding: 16px 18px; margin-top: 2px; min-height: 130px; }
.stk-hero:not(.alive) { background: linear-gradient(135deg, #475569, #64748b); }
.stk-num { display: block; font-size: 64px; font-weight: 900; line-height: 1; text-shadow: 0 3px 0 rgba(0, 0, 0, .15); }
.stk-hero span { font-size: 19px; font-weight: 900; }
.stk-caio { width: 120px; height: 120px; object-fit: contain; margin: -24px -8px -16px 0; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
.stk-card { display: flex; align-items: center; gap: 12px; border: 2px solid var(--border); border-radius: 16px; padding: 12px 14px; }
.stk-card i { font-style: normal; font-size: 30px; }
.stk-card b { display: block; font-size: 15.5px; font-weight: 900; }
.stk-card span { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.stk-title { margin: 6px 0 0; font-size: 19px; font-weight: 900; }
.stk-cal { border: 2px solid var(--border); border-radius: 16px; padding: 10px 10px 12px; min-height: 120px; }
.stk-cal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.stk-cal-top b { text-transform: capitalize; font-size: 16px; }
.stk-cal-top .icon-btn { font-size: 26px; color: var(--muted); }
.stk-cal-top .icon-btn:disabled { opacity: .3; }
.stk-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 6px; text-align: center; }
.stk-grid span { position: relative; height: 36px; display: grid; place-items: center; font-weight: 700; font-size: 14.5px; color: var(--muted); }
.stk-wd span { height: 22px; font-size: 12px; font-weight: 800; }
.stk-grid span.met, .stk-grid span.frozen { color: #fff; font-weight: 900; z-index: 0; }
.stk-grid span.met::before, .stk-grid span.frozen::before { content: ""; position: absolute; inset: 2px 4px; border-radius: 99px; background: #f97316; z-index: -1; }
.stk-grid span.frozen::before { background: #38bdf8; }
.stk-grid span.jl::before { left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.stk-grid span.jr::before { right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.stk-grid span.today { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 99px; color: var(--text); }
.stk-grid span.future { opacity: .45; }
.pt-row:has(.pt-pop) { z-index: 10; }
.bs > * { flex-shrink: 0; }
.stk-cal-top b { text-transform: none; }

/* ================================================================ Progresso no estilo do perfil/missões do Duolingo */
.pg-h { margin: 4px 0 -2px; font-size: 19px; font-weight: 900; }
.pg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pg-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left;
  border: 2px solid var(--border); border-radius: 16px; padding: 12px; background: transparent; color: var(--text); font: inherit; }
button.pg-card { cursor: pointer; border-bottom-width: 4px; }
button.pg-card:active { transform: translateY(2px); border-bottom-width: 2px; }
.pg-card i { grid-row: span 2; font-style: normal; font-size: 26px; }
.pg-card b { font-size: 19px; font-weight: 900; line-height: 1.15; }
.pg-card span { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.pg-week { gap: 4px; }
.pg-dot { width: 36px !important; height: 36px !important; font-size: 18px; }
.pg-dot.met { background: color-mix(in srgb, #f97316 22%, transparent) !important; border-color: #f97316 !important; }
.ms-hero { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: linear-gradient(135deg, #7c3aed, #a855f7); color: #fff;
  border-radius: 18px; padding: 14px 16px; min-height: 96px; margin-top: 6px; }
.ms-hero b { display: block; font-size: 21px; font-weight: 900; }
.ms-hero span { font-size: 14px; font-weight: 700; opacity: .92; }
.ms-caio { width: 96px; height: 96px; object-fit: contain; margin: -22px -6px -14px 0; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
.ms-list { display: flex; flex-direction: column; border: 2px solid var(--border); border-radius: 18px; overflow: hidden; }
.ms-card { display: flex; align-items: center; gap: 12px; padding: 14px; }
.ms-card + .ms-card { border-top: 2px solid var(--border); }
.ms-ico { font-size: 28px; flex-shrink: 0; }
.ms-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ms-body b { font-size: 15.5px; font-weight: 800; }
.ms-bar { position: relative; height: 20px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.ms-bar span { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: #facc15; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .12); transition: width .4s ease; }
.ms-bar em { position: relative; display: block; text-align: center; font-style: normal; font-size: 12.5px; font-weight: 900; line-height: 20px; color: var(--text); }
.ms-card.done .ms-bar span { background: #22c55e; }
.ms-card.done .ms-body b { color: var(--muted); }
.ms-chest { font-size: 30px; flex-shrink: 0; }
.ms-card:not(.done) .ms-chest { filter: saturate(.7); }
.badge-card.locked .ico { filter: grayscale(1); opacity: .45; }

/* nível no cadastro: ícone de sinal como o do Duolingo (4 barras crescentes, acesas até o nível) */
.fn-row .ico.sig { display: inline-flex; align-items: flex-end; justify-content: center; gap: 3px; width: 36px; height: 26px; flex-shrink: 0; }
.fn-row .ico.sig i { width: 6px; border-radius: 3px; background: var(--border); }
.fn-row .ico.sig i:nth-child(1) { height: 25%; }
.fn-row .ico.sig i:nth-child(2) { height: 50%; }
.fn-row .ico.sig i:nth-child(3) { height: 75%; }
.fn-row .ico.sig i:nth-child(4) { height: 100%; }
.fn-row .ico.sig[data-n="1"] i:nth-child(-n+1), .fn-row .ico.sig[data-n="2"] i:nth-child(-n+2),
.fn-row .ico.sig[data-n="3"] i:nth-child(-n+3), .fn-row .ico.sig[data-n="4"] i:nth-child(-n+4) { background: var(--accent); }
.fn-row .ico.sig i:nth-child(1) { height: 34%; }

/* ================================================================ Auditoria no celular (360 px) com a escala de letras do Duolingo:
   título 20-24, texto 16-17, apoio 13-14, nada abaixo de 12,5; alvo de toque ≥ 36 px */
@media (max-width: 820px) {
  /* abas só com ícone, como no Duolingo (o nome fica no aria-label) */
  .tabbar button span { display: none; }
  .tabbar button i { font-size: 30px; }
  .tabbar .tb-more { font-size: 22px !important; }
  .tb-dot { top: 4px; right: 8px; }
  .brand-text small, .sb-label { font-size: 12.5px; }
  #meSub { font-size: 13px; }
  .hw-buddy-close { width: 32px; height: 32px; font-size: 16px; }
  .tvb.cc { height: 34px; min-width: 42px; font-size: 13px; }
  .tv-live-dot { font-size: 12.5px; }
  /* tutorial: letra de Duolingo e botão numa linha */
  .tour-card h3 { font-size: 19px; }
  .tour-card.center h3 { font-size: 23px; }
  .tour-card p { font-size: 16px; line-height: 1.5; }
  .tour-step { font-size: 13px; }
  .tour-skip { font-size: 14px; padding: 8px 0 8px 12px; }
  .tour-nav .btn, .tour-nav button { white-space: nowrap; min-height: 42px; font-size: 15px; }
}
@media (max-width: 600px) {
  /* início: missões do dia em 2×2, com letra legível */
  .today-path { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .today-item { flex-direction: row; justify-content: flex-start; text-align: left; gap: 10px; padding: 10px 12px; font-size: 15px; line-height: 1.2; border-radius: 16px; border-width: 2px; }
  .today-item i { width: 34px; height: 34px; font-size: 18px; flex-shrink: 0; }
  .today-item small { display: block; font-size: 13px; }
  #goalTxt { font-size: 12px; }
  .pt-banner small { font-size: 13px; }
  .stk-wd span, .pg-day span { font-size: 13px; }
  /* flashcards: seletor de modo ocupa a largura toda, 3 partes iguais */
  .hub-hero .hh-main { grid-column: 1 / -1; }
  .hub-hero { grid-template-columns: 1fr; justify-items: stretch; }
  .hh-ring { justify-self: center; }
  .hh-ring small { font-size: 12.5px; }
  .hh-modes { display: flex; width: 100%; flex-wrap: nowrap; }
  .hh-mode { flex: 1; justify-content: center; padding: 9px 4px; font-size: 14.5px; }
  .hh-mode-desc { font-size: 14px; }
  .dk-due, .fc .deck { font-size: 13px; }
  /* vozes: nome inteiro, sem reticências */
  .voice-card { padding: 10px; gap: 8px; }
  .voice-card .vc-orb { width: 24px; height: 24px; }
  .voice-card .vc-play { width: 22px; }
  .voice-card small, .range-ends span { font-size: 13px; }
  .t-row.t-head span { font-size: 13px; }
  .tag { font-size: 12px; }
}
@media (max-width: 600px) {
  .today-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 10px; row-gap: 1px; align-items: center; }
  .today-item i { grid-row: span 2; }
}
.tour-dots { min-width: 0; overflow: hidden; flex-wrap: wrap; row-gap: 4px; }
.tour-nav > button { flex-shrink: 0; }
@media (max-width: 600px) { .hh-ring { width: 100px; height: 100px; } .hh-ring small { margin-top: -14px; } }

/* ================================================================ Recados do professor (caixa estilo WhatsApp) */
.inbox-btn { position: relative; color: var(--muted); }
.inbox-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.inbox-count { position: absolute; top: 2px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #25d366; color: #fff;
  font-size: 11.5px; font-weight: 900; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.ib-chat { display: flex; flex-direction: column; gap: 8px; max-height: 50dvh; overflow-y: auto; padding: 12px; border-radius: 16px;
  background: color-mix(in srgb, #0b141a 70%, var(--surface)); }
.ib-msg { align-self: flex-start; max-width: 88%; background: #202c33; color: #e9edef; border-radius: 4px 14px 14px 14px; padding: 7px 10px 5px; display: flex; flex-direction: column; box-shadow: 0 1px 1px rgba(0,0,0,.25); }
.ib-msg b { font-size: 13px; color: #53bdeb; font-weight: 800; }
.ib-msg p { margin: 2px 0 0; font-size: 16px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.ib-msg time { align-self: flex-end; font-size: 12px; color: #8696a0; margin-top: 2px; }
.ib-msg.new { box-shadow: 0 0 0 2px #25d366; }
.ib-empty, .ib-hint { margin: 0; text-align: center; color: var(--muted); font-size: 15px; padding: 18px 6px; }
.ib-hint { padding: 4px; font-size: 14px; }
.ib-enable { display: flex; align-items: center; gap: 12px; text-align: left; border: 2px solid #25d366; border-bottom-width: 4px; background: color-mix(in srgb, #25d366 12%, var(--surface));
  color: var(--text); border-radius: 16px; padding: 12px 14px; font: inherit; cursor: pointer; }
.ib-enable i { font-style: normal; font-size: 26px; }
.ib-enable b { display: block; font-size: 16px; }
.ib-enable small { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.nt-label { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: 14px; color: var(--muted); }
.nt-label select { font: inherit; font-size: 16px; padding: 12px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); color: var(--text); }
.t-notify { white-space: nowrap; }
@media (max-width: 600px) { .t-notify { padding: 8px 10px; } }

/* anel da lição atual como o do Duolingo: círculo perfeito centrado no botão INTEIRO (face + 7 px de profundidade),
   trilho cinza e arco na cor da unidade mostrando quanto da unidade já foi feito */
.pt-node.current { outline: none; }
.pt-node.current::after { content: ""; position: absolute; left: 50%; top: calc(50% + 3.5px); width: 98px; height: 98px; border-radius: 50%;
  transform: translate(-50%, -50%); pointer-events: none;
  background: conic-gradient(var(--u) calc(max(var(--p, 0), .04) * 1turn), var(--surface-2) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px)); }
.pt-node.current:active:not(:disabled)::after { top: calc(50% - 2.5px); }  /* o anel não afunda junto com o botão */
@media (max-width: 600px) { .pt-node.current::after { width: 92px; height: 92px; } }
.pt-row.cur .pt-label { margin-top: 20px; }

/* ================================================================ Homework v2 (padrão Duolingo: uma tarefa, personagem falando, ação fixa embaixo) */
.hw-v2 { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 2px solid var(--border); border-radius: 22px; padding: 18px 18px 0; }
.hw-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.hw-kicker { font-size: 13px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.hw-title { margin: -4px 0 0; font-size: 24px; font-weight: 900; line-height: 1.2; }
.hw-talk { display: flex; align-items: flex-end; gap: 10px; }
.hw-talk-caio { width: 92px; height: 92px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 5px 8px rgba(0,0,0,.25)); }
.hw-v2 .hw-bubble { position: relative; flex: 1; min-width: 0; border: 2px solid var(--border); border-radius: 18px; padding: 12px 44px 12px 14px; background: var(--bg); margin-bottom: 14px; }
.hw-v2 .hw-bubble::before { content: ""; position: absolute; left: -9px; bottom: 18px; width: 14px; height: 14px; background: var(--bg); border-left: 2px solid var(--border); border-bottom: 2px solid var(--border); transform: rotate(45deg); }
.hw-v2 .hw-bubble p { margin: 0; font-size: 17px; line-height: 1.45; font-weight: 700; }
.hw-say { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent-soft); font-size: 17px; cursor: pointer; }
.hw-native { margin: -6px 0 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.hw-v2 .hw-phrasal { border: 2px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-bottom-width: 4px; background: var(--accent-soft); border-radius: 18px; padding: 12px 14px; }
.hw-v2 .hw-phrasal b { font-size: 24px; font-weight: 900; }
.hw-v2 .hw-phrasal > span:not(.muted) { font-size: 15px; }
.hw-ideas { border: 2px solid var(--border); border-radius: 16px; }
.hw-ideas summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 14px; cursor: pointer; font-weight: 800; font-size: 15.5px; }
.hw-ideas summary::-webkit-details-marker { display: none; }
.hw-ideas summary em { font-style: normal; min-width: 26px; height: 26px; border-radius: 99px; background: var(--surface-2); display: grid; place-items: center; font-size: 13px; }
.hw-ideas summary::after { content: "▾"; color: var(--muted); margin-left: -4px; }
.hw-ideas[open] summary::after { content: "▴"; }
.hw-ideas ul { list-style: none; margin: 0; padding: 0 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.hw-ideas .hw-hint { width: 100%; text-align: left; border: 2px solid var(--border); border-bottom-width: 4px; border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; padding: 10px 12px; cursor: pointer; }
/* gravador: faixa fixa no pé do cartão, botão redondo grande no centro */
.hw-v2 .hw-rec { position: sticky; bottom: 0; z-index: 3; margin: 4px -18px 0; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 2px solid var(--border);
  background: var(--surface); border-radius: 0 0 20px 20px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; }
.hw-v2 .hw-rec-btn { width: 76px; height: 76px; box-shadow: 0 5px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.hw-v2 .hw-rec-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.hw-v2 .hw-rec-btn.rec { box-shadow: 0 5px 0 #991b1b; animation: hw-pulse 1.2s ease-in-out infinite; }
@keyframes hw-pulse { 50% { transform: scale(1.05); } }
.hw-v2 .hw-rec-btn svg { inset: -8px; width: 92px; height: 92px; }
.hw-v2 .hw-rec-txt b { font-size: 28px; font-weight: 900; }
.hw-v2 .hw-rec-txt .small { font-size: 14px; }
.hw-v2 .hw-rec-note { text-align: center; padding: 14px 0 18px; font-size: 15px; }
@media (max-width: 600px) {
  .hw-wrap { padding: 14px 12px 32px; }
  .hw-v2 { padding: 16px 14px 0; border-radius: 20px; }
  .hw-v2 .hw-rec { margin: 4px -14px 0; padding-left: 14px; padding-right: 14px; }
  .hw-title { font-size: 22px; }
  .hw-talk-caio { width: 80px; height: 80px; }
}
@media (prefers-reduced-motion: reduce) { .hw-v2 .hw-rec-btn.rec { animation: none; } }

/* ================================================================ Full Power: entrada nova */
.power.is-intro .pw-caio { flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-bottom: 10px; }
.power.is-intro .pw-orb { width: 150px; height: 150px; }
.power.is-intro .pw-bubble { border-radius: 18px; border-width: 2px; margin: 0; max-width: 420px; }
.power.is-intro .pw-bubble b { display: none; }
.power.is-intro .pw-bubble p { font-size: 17px; font-weight: 700; margin: 0; }
.pw-intro { display: flex; flex-direction: column; gap: 14px; align-items: stretch; text-align: left; }
.pw-intro-h { margin: 4px 0 0; font-size: 20px; font-weight: 900; }
.pw-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pw-mode { display: flex; flex-direction: column; gap: 4px; border: 2px solid var(--border); border-bottom-width: 4px; border-radius: 18px; padding: 12px; background: var(--surface); }
.pw-mode i { font-style: normal; font-size: 28px; }
.pw-mode b { font-size: 15.5px; font-weight: 900; line-height: 1.2; }
.pw-mode span { font-size: 13.5px; color: var(--muted); font-weight: 600; line-height: 1.35; }
.pw-rules { list-style: none; margin: 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; border: 2px solid var(--border); border-radius: 18px; }
.pw-rules li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.4; color: var(--muted); }
.pw-rules li b { color: var(--text); }
.pw-rules i { font-style: normal; font-size: 20px; line-height: 1.2; }
.pw-go-bar { position: sticky; bottom: 0; z-index: 3; padding: 12px 0 calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.pw-go-bar .pw-go { width: 100%; justify-content: center; }
@media (max-width: 600px) {
  .pwr-wrap { padding: 14px 12px 0; }
  .power.is-intro .pw-orb { width: 128px; height: 128px; }
  .pw-intro-h { font-size: 19px; }
}
@media (max-width: 820px) {
  .hw-wrap { padding-bottom: 0; }
  .hw-wrap > .hw-cal { margin-bottom: 24px; }
}
@media (max-width: 600px) { .hw-talk-caio { width: 64px; height: 64px; } .hw-v2 .hw-bubble p { font-size: 16px; } }
.hw-cal .hw-week span { font-size: 13px; }
/* Full Power durante o desafio (celular): Caio pequeno e fala em 2 linhas (o enunciado completo está no cartão; tocar expande) */
@media (max-width: 600px) {
  .power:not(.is-intro) .pw-caio { gap: 8px; margin-bottom: 10px; }
  .power:not(.is-intro) .pw-orb { width: 84px; height: 84px; }
  .power:not(.is-intro) .pw-bubble { padding: 10px 12px; }
  .power:not(.is-intro) .pw-bubble p { font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
  .power:not(.is-intro) .pw-bubble.open p { -webkit-line-clamp: unset; display: block; }
  .power .pw-card .pw-how { margin-bottom: 8px; }
}

/* ================================================================ Convite pra instalar o app (celular fora do modo PWA): fundo preto 80% */
.in-wrap { position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, 0); display: grid; place-items: center; padding: 16px; transition: background-color .25s; }
.in-wrap.open { background: rgba(0, 0, 0, .8); }
.in-card { position: relative; width: min(400px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--surface); color: var(--text);
  border: 2px solid var(--border); border-radius: 26px; padding: 22px 20px 14px; display: flex; flex-direction: column; align-items: stretch; gap: 10px; text-align: center;
  transform: scale(.92); opacity: 0; transition: transform .25s cubic-bezier(.2, .9, .3, 1.2), opacity .2s; }
.in-wrap.open .in-card { transform: none; opacity: 1; }
.in-x { position: absolute; top: 8px; right: 8px; color: var(--muted); }
.in-caio { width: 130px; height: 130px; object-fit: contain; align-self: center; margin-top: -6px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.3)); }
.in-card h3 { margin: 0; font-size: 23px; font-weight: 900; line-height: 1.2; }
.in-sub { margin: 0; color: var(--muted); font-size: 15px; }
.in-perks { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.in-perks li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.4; color: var(--muted); }
.in-perks li b { color: var(--text); }
.in-perks i { font-style: normal; font-size: 22px; width: 28px; text-align: center; flex-shrink: 0; }
.in-steps { margin: 2px 0; padding: 12px 14px 12px 34px; text-align: left; border: 2px dashed var(--border); border-radius: 16px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.in-ico { font-size: 16px; }
.in-card .chunky { width: 100%; margin-top: 4px; }
.in-later { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 800; font-size: 15px; padding: 10px; cursor: pointer; }
@media (max-height: 680px) { .in-caio { width: 96px; height: 96px; } .in-perks li { font-size: 14px; } }

/* ================================================================ Homework v3: faixa colorida, missão, palavra do dia e barra "toque pra falar" */
.hw-cal-btn { display: none; font-size: 20px; }
.hw-v3 { display: flex; flex-direction: column; gap: 16px; }
.hw-hero { position: relative; display: flex; align-items: flex-end; gap: 8px; color: #fff; border-radius: 22px; padding: 16px 16px 16px 18px; min-height: 128px; overflow: visible;
  background: linear-gradient(135deg, #7c3aed, #2563eb); box-shadow: 0 5px 0 #3b1d8f; }
.hw-hero.free { background: linear-gradient(135deg, #f97316, #db2777); box-shadow: 0 5px 0 #9d174d; }
.hw-hero-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-self: center; }
.hw-hero small { font-size: 12.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.hw-hero b { font-size: 23px; font-weight: 900; line-height: 1.2; }
.hw-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.hw-chips span { font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.2); }
.hw-chips span.todo { background: #fde047; color: #713f12; }
.hw-chips span.ok { background: #22c55e; }
.hw-hero-caio { width: 116px; height: 116px; object-fit: contain; flex-shrink: 0; margin: -34px -6px -16px 0; filter: drop-shadow(0 5px 8px rgba(0,0,0,.3)); }
.hw-label { display: block; font-size: 13px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.hw-mission-box { position: relative; border: 2px solid var(--border); border-bottom-width: 4px; border-radius: 20px; padding: 16px 56px 16px 16px; background: var(--surface); }
.hw-mission-box p { margin: 0; font-size: 18px; line-height: 1.5; font-weight: 700; }
.hw-mission-box .hw-say { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; font-size: 18px; }
.hw-say { border: 0; border-radius: 50%; background: var(--accent-soft); cursor: pointer; width: 34px; height: 34px; font-size: 17px; flex-shrink: 0; }
.hw-tr { margin-top: 8px; }
.hw-tr summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 800; color: var(--accent); cursor: pointer; padding: 6px 2px; }
.hw-tr summary::-webkit-details-marker { display: none; }
.hw-tr p { margin: 4px 0 0; font-size: 15.5px; line-height: 1.5; color: var(--muted); }
.hw-word-card { display: flex; flex-direction: column; gap: 4px; border-radius: 20px; padding: 16px; background: var(--accent-soft); border: 2px solid color-mix(in srgb, var(--accent) 40%, var(--border)); border-bottom-width: 4px; }
.hw-word-card b { font-size: 28px; font-weight: 900; line-height: 1.1; }
.hw-word-card > span { font-size: 16px; font-weight: 700; color: var(--muted); }
.hw-ex { display: flex; gap: 8px; align-items: flex-start; text-align: left; margin-top: 8px; border: 0; background: var(--surface); color: var(--text); font: inherit; font-style: italic; font-size: 15.5px; line-height: 1.45; padding: 10px 12px; border-radius: 14px; cursor: pointer; }
.hw-ex i { font-style: normal; }
.hw-v3 .hw-ideas { background: var(--surface); }
/* barra de gravação larga no pé */
.hw-dock { position: sticky; bottom: 0; z-index: 4; display: flex; flex-direction: column; gap: 8px; margin: 0 -16px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 2px solid var(--border); }
.hw-dock-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.hw-dock-hint { font-size: 14px; color: var(--muted); font-weight: 600; }
.hw-dock .hw-min { max-width: none; margin: 0; height: 8px; }
.hw-dock .hw-rec-btn { position: relative; width: 100%; height: 60px; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 10px; overflow: hidden;
  color: #fff; font: inherit; font-size: 17px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; box-shadow: 0 5px 0 color-mix(in srgb, var(--accent) 60%, #000); animation: none; }
.hw-dock .hw-rec-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.hw-dock .hw-rec-btn svg { display: none; }
.hw-dock .hw-rec-btn #hwRecIcon { font-size: 24px; }
.hw-dock .hw-rec-btn #hwRecTime { font-size: 16px; font-weight: 900; padding: 3px 10px; border-radius: 99px; background: rgba(0,0,0,.18); margin-left: 4px; letter-spacing: 0; }
.hw-dock .hw-rec-btn.rec { background: var(--danger); box-shadow: 0 5px 0 #991b1b; }
.hw-dock .hw-lvl { display: block; inset: 0 auto 0 0; width: calc(var(--lvl, 0) * 100%); border-radius: 0; background: rgba(255,255,255,.22); opacity: 1; transform: none; transition: width .08s linear; }
.hw-dock .hw-rec-btn:not(.rec) .hw-lvl { width: 0; }
.hw-dock.redo .hw-rec-btn:not(.rec) { background: var(--surface-2); color: var(--text); box-shadow: 0 5px 0 var(--border); }
.hw-v3 .hw-rec-note { text-align: center; padding: 14px; font-size: 15px; }
/* resultado */
.hwr-hero { display: flex; align-items: center; gap: 16px; }
.hwr-ring { --c: #f59e0b; position: relative; width: 104px; height: 104px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; text-align: center;
  background: conic-gradient(var(--c) calc(var(--s) * 1%), var(--surface-2) 0); }
.hwr-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface); }
.hwr-ring b, .hwr-ring small { position: relative; }
.hwr-ring b { font-size: 34px; font-weight: 900; line-height: 1; margin-top: 8px; }
.hwr-ring small { font-size: 12.5px; color: var(--muted); font-weight: 800; margin-top: -22px; }
.hwr.good .hwr-ring { --c: #22c55e; } .hwr.low .hwr-ring { --c: var(--danger); }
.hwr-txt { display: flex; flex-direction: column; gap: 4px; }
.hwr-txt b { font-size: 21px; font-weight: 900; }
.hwr-xp { align-self: flex-start; font-weight: 900; color: #eab308; background: color-mix(in srgb, #eab308 16%, transparent); padding: 3px 10px; border-radius: 99px; font-size: 14px; }
.hwr-txt small { color: var(--muted); font-size: 13.5px; }
.hwr-caio { display: flex; align-items: flex-end; gap: 8px; }
.hwr-caio img { width: 76px; height: 76px; object-fit: contain; flex-shrink: 0; }
.hwr-bubble { position: relative; flex: 1; border: 2px solid var(--border); border-radius: 18px; padding: 12px 48px 12px 14px; margin-bottom: 10px; background: var(--bg); }
.hwr-bubble p { margin: 0; font-size: 16px; line-height: 1.45; font-weight: 700; }
.hwr-bubble .hw-say { position: absolute; top: 8px; right: 8px; }
@media (max-width: 820px) {
  .hw-cal-btn { display: grid; }
  .hw-wrap > .hw-cal { display: none; }
  .hw-cal.in-sheet { display: block; position: static; border: 0; padding: 0; background: transparent; }
}
@media (max-width: 600px) {
  .hw-wrap { padding: 12px 12px 0; }
  .hw-dock { margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
  .hw-hero b { font-size: 21px; }
  .hw-hero-caio { width: 100px; height: 100px; }
  .hw-mission-box p { font-size: 17px; }
}
.hw-tabs:has([data-hw-tab="result"]:disabled) { display: none; }
.hw-dock .hw-rec-btn span#hwRecLabel { font-size: 17px; line-height: 1; white-space: nowrap; }
.hw-dock .hw-rec-btn span#hwRecIcon { font-size: 22px; line-height: 1; }
@media (max-width: 600px) { .hw-hero-caio { width: 92px; height: 92px; margin-top: -26px; } .hw-chips span { font-size: 12.5px; } }

/* balões do Caio na Início: o bico aponta pra ele (canto de baixo à direita) */
.hw-buddy .hw-bubble { position: relative; overflow: visible; }
.hw-buddy .hw-bubble::after { content: ""; position: absolute; right: -7px; bottom: 8px; width: 12px; height: 12px; background: var(--surface);
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transform: rotate(-45deg); border-bottom-right-radius: 3px; }
.hw-buddy .hw-bubble:first-child:not(:last-child)::after { display: none; }

/* Homework sem abas: a tela muda de estado */
.hw-tabs { display: none !important; }
.hw-done-bar { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; border: 2px solid #22c55e; border-bottom-width: 4px; border-radius: 18px;
  background: color-mix(in srgb, #22c55e 14%, var(--surface)); color: var(--text); font: inherit; padding: 12px 14px; cursor: pointer; }
.hw-done-bar i { font-style: normal; width: 34px; height: 34px; border-radius: 50%; background: #22c55e; color: #fff; display: grid; place-items: center; font-weight: 900; flex-shrink: 0; }
.hw-done-bar span { flex: 1; display: flex; flex-direction: column; }
.hw-done-bar b { font-size: 16px; font-weight: 900; }
.hw-done-bar small { color: var(--muted); font-size: 14px; font-weight: 700; }
.hw-done-bar em { font-style: normal; font-size: 26px; color: #22c55e; font-weight: 900; }
.hw-back-task { align-self: flex-start; border: 0; background: transparent; color: var(--accent); font: inherit; font-weight: 800; font-size: 15px; padding: 4px 2px 10px; cursor: pointer; }

/* ================================================================ Início v2 */
.home-dash { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 560px; margin: 18px auto 4px; text-align: left; }
.hd-continue { position: relative; display: flex; align-items: flex-end; gap: 8px; width: 100%; text-align: left; border: 0; border-radius: 22px; padding: 16px 12px 16px 18px; cursor: pointer;
  background: var(--u); color: #fff; box-shadow: 0 5px 0 color-mix(in srgb, var(--u) 65%, #000); font: inherit; overflow: visible; min-height: 132px; }
.hd-continue:active { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--u) 65%, #000); }
.hd-c-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-self: center; }
.hd-c-txt small { font-size: 12.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.hd-c-txt b { font-size: 21px; font-weight: 900; line-height: 1.2; }
.hd-c-txt > span { font-size: 14.5px; font-weight: 700; opacity: .95; }
.hd-go { align-self: flex-start; margin-top: 10px; font-style: normal; background: #fff; color: var(--u); font-weight: 900; font-size: 15px; text-transform: uppercase; letter-spacing: .05em;
  padding: 10px 18px; border-radius: 14px; box-shadow: 0 4px 0 rgba(0,0,0,.18); }
.hd-c-caio { width: 112px; height: 112px; object-fit: contain; flex-shrink: 0; margin: -30px -4px -16px 0; filter: drop-shadow(0 5px 8px rgba(0,0,0,.3)); }
.hd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hd-tile { display: flex; align-items: center; gap: 10px; text-align: left; border: 2px solid var(--border); border-bottom-width: 4px; border-radius: 18px; background: var(--surface);
  color: var(--text); font: inherit; padding: 12px; cursor: pointer; min-width: 0; }
.hd-tile:active { transform: translateY(2px); border-bottom-width: 2px; }
.hd-t { display: flex; flex-direction: column; min-width: 0; }
.hd-t b { font-size: 16px; font-weight: 900; line-height: 1.2; }
.hd-t small { font-size: 13px; color: var(--muted); font-weight: 700; }
.hd-ring { position: relative; width: 48px; height: 48px; flex-shrink: 0; }
.hd-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hd-ring circle { fill: none; stroke-width: 7; }
.hd-ring .bg { stroke: var(--surface-2); }
.hd-ring .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.hd-goal.met .hd-ring .fg { stroke: #22c55e; }
.hd-ring em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 15px; }
.hd-flame { font-size: 34px; line-height: 1; filter: grayscale(1); opacity: .6; }
.hd-fire.on .hd-flame { filter: none; opacity: 1; }
.hd-fire.on b { color: #f97316; }
.hd-missions { border: 2px solid var(--border); border-radius: 20px; background: var(--surface); overflow: hidden; }
.hd-mh { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 4px; }
.hd-mh b { font-size: 17px; font-weight: 900; }
.hd-mh span { font-size: 13px; font-weight: 800; color: #f59e0b; }
.hd-q { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); font: inherit; padding: 10px 14px; cursor: pointer; }
.hd-q + .hd-q { border-top: 2px solid var(--border); }
.hd-q i { font-style: normal; font-size: 24px; flex-shrink: 0; }
.hd-q-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hd-q-b b { font-size: 14.5px; font-weight: 800; }
.hd-q .ms-bar { height: 18px; }
.hd-q .ms-bar em { line-height: 18px; font-size: 12px; }
.hd-q.done .ms-bar span { background: #22c55e; }
.hd-q.done b { color: var(--muted); }
.hd-chest { font-size: 26px; flex-shrink: 0; }
.hd-more { width: 100%; border: 0; border-top: 2px solid var(--border); background: transparent; color: var(--accent); font: inherit; font-weight: 900; font-size: 14.5px; padding: 12px; cursor: pointer; }
.main.is-empty #heroCards { display: none !important; }
@media (max-width: 820px) {
  .main.is-empty { overflow-y: auto; }
  .main.is-empty .chat { margin-top: 8px; }
  .main.is-empty .composer-wrap { margin-bottom: 0; padding-bottom: 96px; }  /* espaço pro Caio do homework não cobrir */
  .main.is-empty .hero h2 { font-size: 26px; }
  .main.is-empty .hero > p.muted { font-size: 15px; margin-bottom: 0; }
}
@media (max-width: 600px) {
  .hd-c-txt b { font-size: 19px; }
  .hd-c-caio { width: 96px; height: 96px; margin-top: -24px; }
  .home-dash { margin-top: 14px; }
}
/* Início no celular: o Caio do homework vira um cartão (não flutua por cima das missões) */
.hd-hw { display: flex; align-items: flex-end; gap: 10px; width: 100%; text-align: left; border: 2px solid var(--border); border-bottom-width: 4px; border-radius: 20px;
  background: var(--surface); color: var(--text); font: inherit; padding: 12px 14px 12px 8px; cursor: pointer; }
.hd-hw:active { transform: translateY(2px); border-bottom-width: 2px; }
.hd-hw img { width: 84px; height: 84px; object-fit: contain; flex-shrink: 0; margin: -8px 0 -12px; }
.hd-hw-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.hd-hw-bubble { position: relative; border: 2px solid var(--border); border-radius: 16px; padding: 9px 12px; font-size: 15px; font-weight: 700; line-height: 1.35; background: var(--bg); }
.hd-hw-bubble::before { content: ""; position: absolute; left: -8px; bottom: 12px; width: 12px; height: 12px; background: var(--bg); border-left: 2px solid var(--border); border-bottom: 2px solid var(--border); transform: rotate(45deg); }
.hd-hw .hd-go { margin-top: 0; background: var(--accent); color: #fff; box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.hd-q .ms-bar em { font-size: 12.5px; }
@media (max-width: 820px) {
  .main.is-empty .hw-buddy { display: none !important; }
  .main.is-empty .composer-wrap { padding-bottom: 16px; }
}

.hd-hw .hd-go { align-self: flex-start; white-space: nowrap; font-size: 14px; padding: 10px 14px; }

/* ================================================================ Início x Conversar: dois modos da tela principal */
.talk-hero { display: none; }
/* Início: só o painel (a caixa de conversa mora na aba do microfone) */
.main.home-mode .composer-wrap, .main.home-mode #msgs, .main.home-mode .hw-buddy { display: none !important; }
.main.home-mode .hero { display: block !important; }
.main.home-mode .hero > p.muted { display: none; }
.main.home-mode .chat { flex: 1 1 auto; margin-top: 0; overflow-y: auto; padding-bottom: 24px; }
/* Conversar: sem o painel; vazia, mostra o Caio convidando */
.main.talk-mode .hero { display: none !important; }
.main.talk-mode.is-empty .talk-hero { display: flex; }
.talk-hero { flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 10px 8px 6px; }
.th-orb { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 68%); animation: th-breathe 3s ease-in-out infinite; }
.th-orb img { width: 140px; height: 140px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0,0,0,.3)); }
@keyframes th-breathe { 50% { transform: scale(1.04); } }
.talk-hero h2 { margin: 0; font-size: 26px; font-weight: 900; }
.talk-hero p { margin: 0; max-width: 420px; color: var(--muted); font-size: 16px; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .th-orb { animation: none; } }
.main.talk-mode.is-empty .composer { border-width: 2px; }
.main.talk-mode.is-empty #callBtn { transform: scale(1.06); }

/* cartão da conversa na Início */
.hd-talk { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-radius: 20px; padding: 14px 16px; cursor: pointer; font: inherit; color: #fff;
  background: linear-gradient(135deg, var(--accent), #7c3aed); box-shadow: 0 5px 0 color-mix(in srgb, #7c3aed 60%, #000); }
.hd-talk:active { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, #7c3aed 60%, #000); }
.hd-talk-orb { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: rgba(255,255,255,.2); flex-shrink: 0; }
.hd-talk .hd-t b { color: #fff; font-size: 17px; }
.hd-talk .hd-t small { color: rgba(255,255,255,.88); font-size: 13.5px; }
.hd-talk em { margin-left: auto; font-style: normal; font-size: 28px; font-weight: 900; }

/* menu lateral: Conversar em destaque */
.sb-talk { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, #7c3aed 22%, transparent)); font-weight: 800; }
.sb-talk svg { color: var(--accent); }
.sb-talk-tag { margin-left: auto; font-size: 11px; font-weight: 900; letter-spacing: .06em; color: #fff; background: linear-gradient(135deg, var(--accent), #7c3aed); padding: 2px 7px; border-radius: 99px; }
.shell.sb-collapsed .sb-talk-tag { display: none; }

/* barra inferior: microfone grande e elevado no centro */
@media (max-width: 820px) {
  .tabbar { overflow: visible; }
  .tabbar .tb-talk { flex: 0 0 64px; max-width: 64px; height: 64px; margin-top: -26px; border-radius: 50%; border: 4px solid var(--bg);
    background: linear-gradient(135deg, var(--accent), #7c3aed); color: #fff; box-shadow: 0 5px 0 color-mix(in srgb, #7c3aed 55%, #000), 0 8px 18px rgba(0,0,0,.35); }
  .tabbar .tb-talk i { display: grid; place-items: center; filter: none; }
  .tabbar .tb-talk svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .tb-talk.on { border-color: var(--bg); background: linear-gradient(135deg, #7c3aed, var(--accent)); color: #fff; }
  .tabbar .tb-talk.on i { transform: scale(1.1); }
  .tabbar .tb-talk:active { transform: translateY(3px); box-shadow: 0 2px 0 color-mix(in srgb, #7c3aed 55%, #000); }
  .tabbar button:not(.tb-talk) i { font-size: 27px; }
  .main.talk-mode .chat { padding-bottom: 8px; }
}
.lv-badge { align-self: center; display: flex; flex-direction: column; align-items: center; margin-top: -30px; padding: 6px 18px; border-radius: 16px;
  background: linear-gradient(135deg, #facc15, #f97316); color: #fff; box-shadow: 0 4px 0 #b45309; }
.lv-badge span { font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.lv-badge b { font-size: 32px; font-weight: 900; line-height: 1; }

/* O Caio do homework agora mora no cartão da Início em qualquer tela: o flutuante não cobre a conversa */
.main.talk-mode .hw-buddy { display: none !important; }
/* Início no computador: painel em duas colunas (ação principal à esquerda, progresso do dia à direita) */
@media (min-width: 1100px) {
  .main.home-mode .col { max-width: 1040px; }
  .home-dash { max-width: 1000px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px 18px; align-items: start; }
  .home-dash > .hd-continue, .home-dash > .hd-talk, .home-dash > .hd-hw { grid-column: 1; }
  .home-dash > .hd-row, .home-dash > .hd-missions { grid-column: 2; }
  .home-dash > .hd-row { grid-row: 1; }
  .home-dash > .hd-missions { grid-row: 2 / span 3; }
  .hd-continue { min-height: 150px; }
  .hd-c-caio { width: 130px; height: 130px; }
}
/* letras mínimas em qualquer tela (a auditoria de computador achou esses) */
.hh-ring small, .song-tag, .tag, .tv-live-dot { font-size: 12.5px; }
.tvb.cc { height: 32px; min-width: 42px; }
.hw-buddy-close { width: 30px; height: 30px; }

/* ================================================================ Conversa v2: chat em balões */
.msg { margin: 16px 0; }
.msg.user .bubble { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #7c3aed)); color: #fff; border-radius: 20px 20px 6px 20px;
  padding: 11px 16px; font-size: 16.5px; line-height: 1.45; box-shadow: 0 2px 0 color-mix(in srgb, var(--accent) 50%, #000); }
.msg.tutor { gap: 10px; align-items: flex-start; }
.msg.tutor .avatar { width: 34px; height: 34px; flex-shrink: 0; margin-top: 18px; }
.msg.tutor .tutor-body { flex: 0 1 auto; max-width: min(88%, 640px); }
.tutor-name { font-size: 13px; font-weight: 800; color: var(--muted); margin: 0 0 4px 4px; }
.msg.tutor .tutor-text { background: var(--surface); border: 2px solid var(--border); border-radius: 6px 20px 20px 20px; padding: 11px 15px; font-size: 16.5px; line-height: 1.55; }
.msg.tutor .trans { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); color: var(--muted); font-style: italic; font-size: 15px; }
.msg.tutor .tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0 4px; }
.msg.tutor .tools .tool { border: 1.5px solid var(--border); border-radius: 99px; padding: 5px 11px; font-size: 13.5px; font-weight: 700; background: transparent; }
.msg.tutor .tools .tool:hover { border-color: var(--accent); color: var(--accent); }
.correction { display: flex; flex-direction: column; gap: 3px; border-radius: 16px; padding: 10px 13px; max-width: min(85%, 520px); border-width: 2px; }
.correction .corr-h { font-size: 12.5px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.correction s { font-size: 14.5px; }
.correction b { font-size: 15.5px; color: #16a34a; }
.correction small { font-size: 13.5px; opacity: .9; }
.main.talk-mode:not(.is-empty) .suggestions { gap: 8px; }
@media (max-width: 600px) {
  .msg.tutor .avatar { width: 28px; height: 28px; }
  .msg.tutor .tutor-body { max-width: 90%; }
  .msg.user .bubble { max-width: 88%; }
}

/* ================================================================ Chamada de voz v2 (tela de ligação) */
.call { padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: max(18px, env(safe-area-inset-bottom));
  background: radial-gradient(120% 80% at 50% 20%, #1e2a5a 0%, #0f1733 45%, #070b18 100%); }
.call-top { padding: 0 4px; }
.call-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cw-avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; background: radial-gradient(circle at 35% 30%, #fff 0%, #93c5fd 30%, #2563eb 75%); box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.call.natural .cw-avatar { background: radial-gradient(circle at 35% 30%, #fff 0%, #f0abfc 30%, #8b5cf6 75%); }
.cw-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.cw-txt b { color: #fff; font-size: 17px; font-weight: 900; }
.cw-txt small { display: flex; align-items: center; gap: 5px; color: #a9b4cc; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.cw-flag { width: 18px; height: 13px; border-radius: 3px; object-fit: cover; }
#callTimer { font-variant-numeric: tabular-nums; }
.orb-wrap { gap: 26px; }
.call-status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 99px; background: rgba(255,255,255,.08); color: #dbe3f5; font-weight: 800; font-size: 15px; min-height: 0; }
.call-status:empty { visibility: hidden; }
.call-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; }
.call[data-state="listening"] .call-status::before { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.25); }
.call[data-state="hearing"] .call-status { background: rgba(56,189,248,.18); color: #bae6fd; }
.call[data-state="hearing"] .call-status::before { background: #38bdf8; animation: cs-blink 1s infinite; }
.call[data-state="thinking"] .call-status { background: rgba(250,204,21,.14); color: #fde68a; }
.call[data-state="thinking"] .call-status::before { background: #facc15; animation: cs-blink .7s infinite; }
.call[data-state="speaking"] .call-status { background: rgba(167,139,250,.18); color: #ddd6fe; }
.call[data-state="speaking"] .call-status::before { background: #a78bfa; }
.call[data-state="muted"] .call-status { background: rgba(239,68,68,.16); color: #fecaca; }
.call[data-state="muted"] .call-status::before { background: #ef4444; }
@keyframes cs-blink { 50% { opacity: .3; } }
/* legenda: sua fala num balão à direita, a do tutor em destaque */
.call-caption { max-width: 720px; gap: 12px; text-align: left; padding: 0 4px; }
.cap-you:not(:empty) { align-self: flex-end; max-width: 85%; background: rgba(59,130,246,.22); border: 1px solid rgba(147,197,253,.25); color: #dbeafe;
  border-radius: 18px 18px 6px 18px; padding: 9px 14px; font-size: 15px; line-height: 1.4; }
.cap-en { color: #fff; font-size: clamp(19px, 2.6vw, 26px); font-weight: 700; line-height: 1.4; text-align: center; }
.cap-native { color: #a9b4cc; font-style: italic; font-size: 16px; text-align: center; }
/* controles com nome embaixo, como numa ligação */
.call-controls { gap: 22px; align-items: flex-start; }
.cc-item { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.cc-item > span { font-size: 12.5px; font-weight: 700; color: #a9b4cc; }
.round { width: 62px; height: 62px; transition: transform .08s, background-color .12s; }
.round:active { transform: scale(.92); }
.round svg { width: 26px; height: 26px; }
.round.end svg { fill: #fff; stroke: none; width: 30px; height: 30px; }
@media (max-width: 600px) {
  .call { padding-left: 14px; padding-right: 14px; }
  .orb { width: 190px; height: 190px; }
  .orb-wrap { gap: 18px; }
  .call-controls { gap: 14px; }
  .round { width: 58px; height: 58px; }
  .call-caption { max-height: 34dvh; }
}
@media (max-height: 700px) { .orb { width: 150px; height: 150px; } .orb-wrap { gap: 12px; } }

/* ================================================================ Flashcards v3: cartão grande com imagem, virada 3D e arrastar pra responder */
.review.in-session .rv-top { border-bottom: 0; }
.review.in-session .rv-progress { height: 14px; border-radius: 99px; }
.review.in-session .rv-progress span { background: #22c55e; box-shadow: inset 0 -4px 0 rgba(0,0,0,.12); border-radius: 99px; }
.fc3-stage { display: flex; justify-content: center; perspective: 1400px; padding: 6px 0 0; }
.fc3 { position: relative; width: 100%; max-width: 560px; background: var(--surface); border: 2px solid var(--border); border-bottom-width: 6px; border-radius: 28px;
  padding: 16px 18px 12px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; user-select: none; touch-action: pan-y;
  transform-origin: 50% 50%; transition: transform .17s ease-in, box-shadow .2s; box-shadow: 0 16px 40px rgba(0,0,0,.18); --ok: 0; --bad: 0; }
.fc3::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px; border-radius: 26px 26px 0 0; background: var(--dc); opacity: .9; }
.fc3.is-back { cursor: grab; }
.fc3.dragging { transition: none; cursor: grabbing; }
.fc3.flipping { transform: rotateY(90deg); }
.fc3.unflip { animation: fc3-unflip .2s ease-out; }
.fc3.enter { animation: fc3-enter .28s cubic-bezier(.2,.9,.3,1.2); }
.fc3.fly-right { transition: transform .2s ease-in, opacity .2s; transform: translateX(120%) rotate(18deg) !important; opacity: 0; }
.fc3.fly-left { transition: transform .2s ease-in, opacity .2s; transform: translateX(-120%) rotate(-18deg) !important; opacity: 0; }
@keyframes fc3-unflip { from { transform: rotateY(-90deg); } to { transform: none; } }
@keyframes fc3-enter { from { transform: translateY(24px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.fc3-stamp { position: absolute; top: 22px; z-index: 3; font-weight: 900; font-size: 20px; letter-spacing: .06em; padding: 6px 12px; border-radius: 12px; border: 3px solid; pointer-events: none; }
.fc3-stamp.ok { left: 18px; color: #16a34a; border-color: #22c55e; background: color-mix(in srgb, #22c55e 14%, var(--surface)); transform: rotate(-10deg); opacity: var(--ok); }
.fc3-stamp.bad { right: 18px; color: #dc2626; border-color: #ef4444; background: color-mix(in srgb, #ef4444 14%, var(--surface)); transform: rotate(10deg); opacity: var(--bad); }
.fc3-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.fc3-chip { font-size: 12.5px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: var(--dc); }
.fc3-lvl { font-size: 12.5px; font-weight: 800; color: var(--muted); background: var(--surface-2); padding: 3px 9px; border-radius: 99px; }
.fc3-art { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; background: color-mix(in srgb, var(--dc) 14%, var(--surface-2)); display: grid; place-items: center; }
.fc3-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fc3-art.emoji span { font-size: clamp(72px, 16vw, 110px); line-height: 1; filter: drop-shadow(0 8px 12px rgba(0,0,0,.18)); }
.fc3-art.emoji.loading span { animation: fc3-pulse 1.4s ease-in-out infinite; }
@keyframes fc3-pulse { 50% { transform: scale(1.08); opacity: .7; } }
.fc3-emoji-badge { position: absolute; right: 10px; bottom: 10px; font-size: 26px; background: var(--surface); border-radius: 14px; padding: 4px 8px; box-shadow: 0 4px 10px rgba(0,0,0,.2); }
.fc3-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 4px; }
.fc3-word { font-size: clamp(30px, 6vw, 40px); font-weight: 900; line-height: 1.15; text-align: center; letter-spacing: -.01em; }
.fc3-word.sentence { font-size: clamp(21px, 4.4vw, 26px); font-weight: 800; }
.fc3-word.wrong { color: var(--danger); text-decoration: line-through; text-decoration-thickness: 2px; }
.fc3-say { width: 46px; height: 46px; border-radius: 50%; border: 0; flex-shrink: 0; background: var(--dc); color: #fff; font-size: 20px; cursor: pointer;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--dc) 60%, #000); }
.fc3-say:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--dc) 60%, #000); }
.fc3-hint { text-align: center; color: var(--muted); font-weight: 700; font-size: 15px; }
.fc3-ex { margin: 0; text-align: center; font-size: 17px; line-height: 1.5; color: var(--muted); }
.fc3-ex mark { background: color-mix(in srgb, var(--dc) 22%, transparent); color: var(--text); border-radius: 6px; padding: 0 3px; font-weight: 800; }
.fc3-tap { text-align: center; color: var(--muted); font-size: 14px; font-weight: 700; padding: 6px 0 2px; }
.fc3-back { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 12px; border-top: 2px dashed var(--border); }
.fc3-mean { font-size: clamp(22px, 4.6vw, 28px); font-weight: 900; text-align: center; color: var(--dc); line-height: 1.25; }
.fc3-mean.right { color: #16a34a; }
.fc3-ex-pt { margin: 0; text-align: center; font-size: 16px; font-style: italic; color: var(--muted); line-height: 1.45; }
.fc3-expl { margin: 0; text-align: center; font-size: 15px; color: var(--muted); }
.fc3-pill { border: 2px solid var(--border); border-radius: 99px; background: transparent; color: var(--text); font: inherit; font-weight: 800; font-size: 14px; padding: 7px 14px; cursor: pointer; }
.fc3-src { color: var(--muted); font-size: 12.5px; opacity: .8; text-align: center; }
.fc3 .fc-tools { justify-content: center; margin-top: 2px; }
/* dock: virar e notas */
.fc3-dock { max-width: 560px; margin: 0 auto; width: 100%; }
.fc3-flip { width: 100%; height: 58px; font-size: 17px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; border-radius: 18px; }
.fc3-rates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fc3-rates button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 4px 8px; border-radius: 18px; border: 2px solid var(--border); border-bottom-width: 5px;
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer; position: relative; }
.fc3-rates button:active { transform: translateY(3px); border-bottom-width: 2px; }
.fc3-rates i { font-style: normal; font-size: 24px; line-height: 1.1; }
.fc3-rates b { font-size: 15px; font-weight: 900; }
.fc3-rates small { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.fc3-rates kbd { position: absolute; top: 5px; right: 7px; font-size: 11px; opacity: .45; }
.fc3-rates .r1 { border-color: color-mix(in srgb, #ef4444 55%, var(--border)); } .fc3-rates .r1 b { color: #ef4444; }
.fc3-rates .r2 { border-color: color-mix(in srgb, #f59e0b 55%, var(--border)); } .fc3-rates .r2 b { color: #f59e0b; }
.fc3-rates .r3 { border-color: color-mix(in srgb, #22c55e 55%, var(--border)); } .fc3-rates .r3 b { color: #16a34a; }
.fc3-rates .r4 { border-color: color-mix(in srgb, #3b82f6 55%, var(--border)); } .fc3-rates .r4 b { color: #3b82f6; }
.fc3-swipe-hint { margin: 6px 0 0; text-align: center; font-size: 13px; color: var(--muted); font-weight: 600; }
@media (pointer: fine) { .fc3-swipe-hint { display: none; } }
.rv-done-caio { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0,0,0,.25)); }
.rv-done h2 { font-size: 28px; font-weight: 900; }
@media (max-width: 600px) {
  .fc3 { padding: 14px 14px 10px; border-radius: 24px; }
  .fc3-art { aspect-ratio: 16 / 9; }
  .fc3-rates { gap: 6px; }
  .fc3-rates b { font-size: 14px; }
}
@media (max-height: 720px) and (max-width: 600px) { .fc3-art { aspect-ratio: 2 / 1; } }
@media (prefers-reduced-motion: reduce) { .fc3.enter, .fc3.unflip { animation: none; } }
@media (min-width: 821px) { .fc3-art { aspect-ratio: auto; height: clamp(150px, 30vh, 300px); } .fc3-art.emoji span { font-size: clamp(64px, 12vh, 110px); } }

/* ================================================================ Menu lateral no estilo do Duolingo: ícones coloridos, rótulos em caixa alta, item ativo com borda */
.sidebar .sb-cards svg { display: none; }
.sb-emo { font-style: normal; font-size: 26px; width: 34px; text-align: center; line-height: 1; flex-shrink: 0; transition: transform .12s; }
.sb-group { gap: 4px; margin-top: 8px; }
.sb-group + .sb-group { border-top: 2px solid var(--border); padding-top: 8px; }
.sb-label { display: none; }
.sb-group .sb-cards { height: 50px; padding: 0 12px; gap: 14px; border: 2px solid transparent; border-radius: 14px; background: transparent; color: var(--muted);
  font-size: 14.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; transition: background-color .12s, border-color .12s, color .12s; }
.sb-group .sb-cards:hover { background: var(--hover); color: var(--text); }
.sb-group .sb-cards:hover .sb-emo { transform: scale(1.1); }
.sb-group .sb-cards.active { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: var(--accent-soft); color: var(--accent); }
.sb-group .sb-power, .sb-group .sb-talk { background: transparent; color: var(--muted); }
.sb-group .sb-talk .sb-talk-tag { letter-spacing: .06em; }
.sb-cards .badge { font-size: 12px; min-width: 22px; height: 22px; border-radius: 99px; display: grid; place-items: center; font-weight: 900; }
.sb-new { height: 46px; border: 2px solid var(--border); border-bottom-width: 4px; border-radius: 14px; font-size: 14.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text); }
.sb-new:active { transform: translateY(2px); border-bottom-width: 2px; }
.brand-text b { font-size: 17px; font-weight: 900; }
@media (min-width: 821px) {
  .shell.sb-collapsed .sb-group .sb-cards { width: 52px; height: 52px; padding: 0; justify-content: center; }
  .shell.sb-collapsed .sb-emo { width: auto; font-size: 26px; }
  .shell.sb-collapsed .sb-group + .sb-group { width: 52px; }
  .shell.sb-collapsed .sb-new { width: 52px; height: 48px; }
}
.sidebar .sb-group .sb-power:not(.active), .sidebar .sb-group .sb-power:not(.active) span { color: var(--muted); }
.sidebar .sb-group .sb-power:not(.active):hover span { color: var(--text); }

/* ================================================================ Abertura do app instalado: a arte do Caio enquanto carrega */
.boot { display: none; }
@media (display-mode: standalone), (display-mode: fullscreen) {
  .boot { display: block; position: fixed; inset: 0; z-index: 1000; background: #081232 url("splash.webp") center / contain no-repeat; transition: opacity .35s ease; }
  .boot.out { opacity: 0; pointer-events: none; }
}
.brand-logo { border-radius: 50%; object-fit: cover; }

/* ---- painel do professor v2: gráficos, homework com áudio, módulos, turma de demonstração */
.t-tabs { width: auto; }
.mod-hidden { display: none !important; }
body.mod-off-voice #callBtn { display: none !important; }
.dz-kpis { display: flex; gap: 12px; flex-wrap: wrap; }
.dz-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
.dz-card { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dz-card h3 { margin: 0; font-size: 17px; font-weight: 900; }
.dz-rank { grid-row: span 2; }
.dz-rrow { display: grid; grid-template-columns: 30px 36px minmax(110px, 1fr) 1.2fr 44px; align-items: center; gap: 10px; border: 0; background: none; color: var(--text); padding: 6px 4px; border-radius: 12px; cursor: pointer; text-align: left; font: inherit; }
.dz-rrow:hover { background: var(--hover); }
.dz-pos { font-size: 18px; text-align: center; font-weight: 900; color: var(--muted); }
.dz-who { display: flex; flex-direction: column; min-width: 0; }
.dz-who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-who small { color: var(--muted); font-size: 12px; }
.dz-track { height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.dz-track span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), #a855f7); animation: dzGrow .9s ease-out both; transform-origin: left; }
@keyframes dzGrow { from { transform: scaleX(0); } }
.dz-rrow em { font-style: normal; font-weight: 900; text-align: right; }
.dz-chart { width: 100%; height: 190px; }
.dz-bar { fill: var(--accent); } .dz-bar.zero { fill: var(--surface-2); }
.dz-val { font-size: 12px; font-weight: 800; fill: var(--text); text-anchor: middle; }
.dz-lbl { font-size: 11px; fill: var(--muted); text-anchor: middle; }
.dz-mix { display: flex; height: 18px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.dz-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 14px; }
.dz-legend li { display: flex; align-items: center; gap: 8px; } .dz-legend i { width: 12px; height: 12px; border-radius: 4px; }
.dz-legend b { margin-left: auto; } .dz-legend small { color: var(--muted); width: 36px; text-align: right; }
.hm { display: flex; flex-direction: column; gap: 4px; overflow-x: auto; }
.hm-row { display: grid; grid-template-columns: 78px repeat(14, minmax(16px, 1fr)); gap: 4px; align-items: center; }
.hm-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-row i { aspect-ratio: 1; border-radius: 5px; background: color-mix(in srgb, var(--green, #22c55e) calc(var(--a) * 100%), var(--surface-2)); }
.hm-days b { font-size: 10px; color: var(--muted); font-weight: 700; text-align: center; }
.thw-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.thw { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.thw header { display: flex; align-items: center; gap: 10px; } .thw header > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.thw header small { color: var(--muted); font-size: 12px; } .thw audio { width: 100%; height: 40px; }
.thw details { font-size: 14px; color: var(--muted); } .thw summary { cursor: pointer; font-weight: 700; }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tm-card { border: 2px solid var(--border); border-radius: 18px; background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; transition: opacity .2s; position: relative; }
.tm-card.off { opacity: .55; }
.tm-card header { display: flex; align-items: center; gap: 12px; } .tm-card header > div { flex: 1; display: flex; flex-direction: column; }
.tm-card header small { color: var(--muted); font-size: 13px; } .tm-ico { font-size: 26px; }
.tm-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 700; }
.tm-opt input[type=number] { width: 76px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }
.tm-switch { position: relative; width: 48px; height: 28px; flex: none; }
.tm-switch.small { width: 40px; height: 24px; }
.tm-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.tm-switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-2); transition: background .2s; }
.tm-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: calc(100% - 50% - 3px); aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.tm-switch input:checked + i { background: var(--green, #22c55e); }
.tm-switch input:checked + i::after { transform: translateX(calc(100% - 0px)); }
.tm-own { font-style: normal; font-size: 12px; color: var(--accent); font-weight: 800; }
.tm-save { grid-column: 1 / -1; display: flex; gap: 10px; }
.t-demo { display: flex; align-items: center; gap: 12px; border: 2px dashed var(--border); border-radius: 16px; padding: 12px 14px; }
.t-demo > div { flex: 1; display: flex; flex-direction: column; } .t-demo small { color: var(--muted); }
@media (max-width: 1000px) { .dz-grid { grid-template-columns: 1fr; } .dz-rank { grid-row: auto; } .dz-rrow { grid-template-columns: 26px 32px 1fr 70px 38px; } }
/* cartões da home são redesenhados depois: a regra fica no body */
body.mod-off-talk :is(#talkBtn, #tabbar [data-tab="talk"], .hd-talk),
body.mod-off-path :is(#pathBtn, #tabbar [data-tab="path"], .hd-path, .hd-continue),
body.mod-off-homework :is(#hwBtn, #tabbar [data-tab="homework"], #hwBuddy, .hd-hw),
body.mod-off-power :is(#powerBtn, #tabbar [data-tab="power"]),
body.mod-off-review :is(#cardsBtn, #tabbar [data-tab="review"]),
body.mod-off-tv #tvBtn, body.mod-off-studio #studioBtn { display: none !important; }
.t-tabs button { padding: 8px 14px; color: var(--muted); font-weight: 800; }
.t-tabs button.on { background: var(--accent); color: var(--accent-text); box-shadow: 0 3px 0 var(--accent-dark, #1d4ed8); }
.dz-lbl { font-size: 13px; } .dz-val { font-size: 13px; }
.dz-chart { height: 200px; }
.dz-chart { height: 250px; } .dz-lbl, .dz-val { font-size: 11px; }
@media (max-width: 820px) {
  .t-top { flex-wrap: wrap; }
  .t-tabs { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .t-tabs button { flex: none; }
  .dz-rrow { grid-template-columns: 24px 32px 1fr 44px; }
  .dz-track { grid-column: 3 / 5; grid-row: 2; height: 8px; }
  .dz-rrow em { grid-row: 1; grid-column: 4; }
  .dz-kpis .pg-stat { min-width: calc(50% - 6px); }
  .thw-list, .tm-grid { grid-template-columns: 1fr; }
}
.dz-cols { display: flex; align-items: stretch; gap: 6px; height: 230px; padding-top: 6px; }
.dz-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.dz-col span { width: 100%; max-width: 34px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #8fb6ff, var(--accent)); animation: dzUp .8s ease-out both; transform-origin: bottom; }
.dz-col span.zero { background: var(--surface-2); }
.dz-col em { font-style: normal; font-size: 12px; font-weight: 800; }
.dz-col small { font-size: 11px; color: var(--muted); height: 14px; white-space: nowrap; }
@keyframes dzUp { from { transform: scaleY(0); } }

/* painel do professor: voz do Caio e biblioteca */
.vz-meter { height: 10px; border-radius: 99px; background: var(--border); overflow: hidden; margin: 6px 0 8px; }
.vz-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6ea0ff, #a855f7); }
.vz-meter.hot span { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.vz-warn { color: #f59e0b; }
.vz-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.vz-list li { display: grid; grid-template-columns: 26px 1fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; }
.vz-list i { font-style: normal; grid-row: span 2; font-size: 18px; }
.vz-list b { font-size: 18px; }
.vz-list small { grid-column: 2 / 4; color: var(--muted, #8a93a6); font-size: 12px; }
