/* Identidade: versão 1 do redesign — escura com esfera 3D */
:root {
  color-scheme: dark;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --sans: 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --bg: #0b0c1a;
  --paper: #14162b;
  --ink: #f2f1fa;
  --muted: #a9abc8;
  --line: #262947;
  --board: #f2f1fa;
  --board-ink: #0b0c1a;
  --accent: #ff7a45;
  --accent-ink: #1a0b05;
  --violet: #9a86ff;
  --ok: #5fd39a;
  --ok-bg: rgba(95,211,154,.12);
  --err: #f0567a;
  --err-bg: rgba(240,86,122,.12);
  --hint-bg: rgba(154,134,255,.14);
  --radius: 24px;
  --shadow: inset 0 1px 0 rgba(255,255,255,.1);
  --sphere: radial-gradient(circle at 32% 26%, #fff 0%, #ffe1d1 7%, #ff9466 26%, #f0567a 52%, #7c5cff 80%, #2b1f72 100%);
  --grad: linear-gradient(90deg, #ff7a45, #f0567a 55%, #9a86ff);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background-color: var(--bg); background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 28px 28px; color: var(--ink); font: 16px/1.5 var(--sans); min-height: 100dvh; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); letter-spacing: -0.035em; }
::selection { background: var(--accent); color: var(--accent-ink); }
h2 { font-size: 1.3rem; }
a { color: inherit; }
.container { max-width: 880px; margin: 0 auto; padding: 20px 16px 48px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: .875rem; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: rgba(11,12,26,.85); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 6; color: var(--ink); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; text-decoration: none; font-size: 1.2rem; letter-spacing: -0.02em; }
.sphere { display: inline-block; width: 26px; height: 26px; border-radius: 50%; background: var(--sphere); box-shadow: inset -5px -7px 12px rgba(18,8,64,.6), inset 3px 4px 8px rgba(255,255,255,.28), 0 8px 20px -6px rgba(142,124,255,.6); flex: none; }
.topbar nav { display: flex; gap: 14px; align-items: center; font-size: .9rem; }
.topbar nav a, .topbar nav button { color: var(--ink); background: none; border: 0; cursor: pointer; font: inherit; opacity: .75; text-decoration: none; }
.topbar nav a:hover, .topbar nav button:hover { opacity: 1; }

.card { background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  background: var(--board); color: var(--board-ink); font: 600 1rem var(--sans); cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.sm { padding: 6px 14px; font-size: .85rem; }
.btn.block { width: 100%; }

label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 6px; }
input, select, textarea { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field + .field { margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-size: .875rem; color: var(--ink); }
.chip.on { background: var(--board); color: var(--board-ink); border-color: var(--board); }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 10px 14px; font: 600 .95rem var(--sans); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--ink); border-color: var(--accent); }

/* Escolha de idioma */
.lang-card { display: block; text-decoration: none; transition: transform .15s; }
.lang-card:hover { transform: translateY(-2px); }
.lang-card .flag { font-size: 2.6rem; }

/* Dashboard */
.hero { background: linear-gradient(155deg, #1e1a4a 0%, #14162b 60%); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(124,92,255,.6); border-radius: var(--radius); padding: 22px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.hero h1 { margin: 0; }
.stats { display: flex; gap: 22px; flex-wrap: wrap; }
.stat b { display: block; font: 700 1.5rem var(--display); }
.stat span { font-size: .8rem; opacity: .8; }
.bar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .6s; }
.area { display: grid; grid-template-columns: 120px 1fr 44px; gap: 10px; align-items: center; font-size: .92rem; }
.area + .area { margin-top: 10px; }
.area.soon { opacity: .5; }
.focus { border-color: rgba(154,134,255,.35); }
.focus .big { font: 700 1.25rem var(--display); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--hint-bg); font-size: .78rem; font-weight: 600; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.list li:last-child { border: 0; }

/* Aula */
.lesson { display: flex; flex-direction: column; height: calc(100dvh - 56px); max-width: 760px; margin: 0 auto; }
.lesson-head { padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper); }
.dots { display: flex; gap: 6px; margin-top: 8px; }
.dots i { flex: 1; height: 6px; border-radius: 9px; background: var(--line); }
.dots i.correct { background: var(--ok); }
.dots i.failed { background: var(--err); }
.dots i.current { background: var(--accent); }
.chat { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.msg { max-width: 88%; padding: 12px 14px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.msg.student { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); border-bottom-right-radius: 4px; }
.msg.teacher { align-self: flex-start; border-bottom-left-radius: 4px; }
.msg .who { font-size: .75rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.msg .pt { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.msg.question .q { font: 500 1.1rem var(--display); }
.msg.correct { border-color: var(--ok); background: var(--ok-bg); }
.msg.correction { border-color: var(--err); background: var(--err-bg); }
.msg.notice { align-self: center; background: var(--hint-bg); font-size: .9rem; }
.row { display: flex; gap: 8px; align-items: baseline; margin-top: 6px; }
.row .ico { width: 1.4em; flex: none; }
.strike { text-decoration: line-through; text-decoration-color: var(--err); }
.hint { background: var(--hint-bg); border-radius: 8px; padding: 8px 10px; margin-top: 8px; font-size: .95rem; }
.phon { font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.composer { display: flex; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.composer textarea { resize: none; min-height: 48px; max-height: 140px; }
.composer .btn { flex: none; }
.typing { align-self: flex-start; color: var(--muted); font-size: .9rem; font-style: italic; }
.summary h2 { margin-top: 0; }
.summary .stats { color: var(--ink); }
.summary .stat span { color: var(--muted); opacity: 1; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: .92rem; z-index: 9; max-width: calc(100% - 32px); }

@media (max-width: 560px) {
  .area { grid-template-columns: 96px 1fr 40px; }
  .msg { max-width: 94%; }
  .hero { padding: 18px; }
}

/* ---------- Novas seções ---------- */
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.prewrap { white-space: pre-wrap; }
.row-form { display: flex; gap: 8px; align-items: center; }
.row-form select, .row-form input { flex: 1; }
.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; cursor: pointer; margin: 0; }
.check input { width: auto; }
.big { font: 700 1.2rem var(--display); }
.levelbig { font: 800 4rem/1 var(--display); color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; letter-spacing: -0.04em; }
.up { color: var(--ok); font-weight: 600; }
.down { color: var(--err); font-weight: 600; }
.hide-sm { }

.langnav { display: flex; gap: 4px; overflow-x: auto; margin: -4px 0 18px; padding-bottom: 4px; scrollbar-width: none; }
.langnav::-webkit-scrollbar { display: none; }
.langnav a { flex: none; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-size: .9rem; font-weight: 500; color: var(--muted); border: 1px solid transparent; }
.langnav a:hover { color: var(--ink); }
.langnav a.on { background: var(--paper); border-color: var(--line); color: var(--ink); box-shadow: var(--shadow); }

.goal .big { margin: 4px 0 8px; }
.daily { background: var(--accent); color: var(--accent-ink); border: 0; box-shadow: 0 30px 50px -24px rgba(255,122,69,.75), inset 0 1px 0 rgba(255,255,255,.5); backdrop-filter: none; }
.daily .small { font-weight: 700; letter-spacing: .1em; }
.daily .big { font: 800 1.6rem/1.1 var(--display); letter-spacing: -0.02em; }
.daily .checks li { background: rgba(26,11,5,.1); padding: 8px 12px; border-radius: 12px; }
.daily .btn { background: var(--accent-ink); color: #ffe1d1; }
.daily .strike { text-decoration-color: var(--accent-ink); opacity: .65; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.focusgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.focusgrid .big { margin-top: 4px; font-size: 1.05rem; }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.quick .card { display: flex; flex-direction: column; gap: 2px; text-decoration: none; padding: 16px; transition: transform .15s; }
.quick .card:hover { transform: translateY(-2px); }
.quick span { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--hint-bg); color: #b7a9ff; margin-bottom: 10px; }
.quick .live-card span { background: var(--sphere); color: #fff; border-radius: 50%; box-shadow: inset -5px -7px 12px rgba(18,8,64,.6), 0 10px 24px -8px rgba(142,124,255,.6); }
.quick small { color: var(--muted); }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 12px 8px; border-radius: 12px; background: var(--hint-bg); font-size: .85rem; font-weight: 600; }
.badge span { font-size: 1.6rem; }
.badge small { font-weight: 400; color: var(--muted); font-size: .75rem; }
.badge.locked { background: transparent; border: 1px dashed var(--line); color: var(--muted); }

.scenarios { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.scenario { display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer; font: inherit; color: var(--ink); transition: transform .15s; }
.scenario:hover { transform: translateY(-2px); }
.scenario span { font-size: 1.8rem; }
.scenario small { color: var(--muted); font-size: .8rem; }
.ipa { font-family: var(--mono); color: var(--accent); font-weight: 600; }
.scenario .ipa { font-size: 1.3rem; }

.howto { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.howto > div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.howto span { font-size: 1.3rem; }
.howto b { display: block; font-size: .85rem; }
.howto p { margin: 2px 0 0; font-size: .9rem; }
.shadow .q { font: 500 1.15rem var(--display); }
.pronres { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.score { flex: none; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font: 700 1.2rem var(--display); color: #121211; }
.score.ok { background: var(--ok); } .score.mid { background: var(--accent); } .score.bad { background: var(--err); }
.pw { display: inline-block; padding: 1px 6px; border-radius: 6px; margin: 2px 0; }
.pw.ok { background: var(--ok-bg); } .pw.bad { background: var(--err-bg); text-decoration: underline wavy var(--err); }
.btn.recording { background: var(--err); animation: pulse 1s infinite; }
.btn.loading, .chip.loading { opacity: .6; }
@keyframes pulse { 50% { opacity: .7; } }

.words { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.word { padding: 14px 16px; }
.word.difficult { border-color: var(--accent); }
.word .w { font: 700 1.1rem var(--display); }
.word .ex { font-style: italic; color: var(--muted); margin-top: 4px; }
.wactions { display: flex; gap: 2px; }
.icon { background: none; border: 0; cursor: pointer; font-size: 1rem; padding: 4px; border-radius: 6px; }
.icon:hover { background: var(--bg); }
.minibar { display: inline-block; width: 50px; height: 5px; background: var(--line); border-radius: 9px; vertical-align: middle; overflow: hidden; }
.minibar i { display: block; height: 100%; background: var(--ok); }
.selbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; position: sticky; top: 8px; z-index: 2; }
.flashcard { text-align: center; padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 260px; justify-content: center; }
.flashcard .fw { font: 700 2rem var(--display); }
.flashcard hr { width: 60%; border: 0; border-top: 1px solid var(--line); }

.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px; border: 2px dashed var(--line); cursor: pointer; text-align: center; }
.dropzone.over, .dropzone:hover { border-color: var(--accent); }
.exlist { margin: 0; padding-left: 20px; display: grid; gap: 10px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { padding: 16px; }
.kpi b { display: block; font: 700 1.6rem var(--display); }
.kpi span { color: var(--muted); font-size: .85rem; }

.msg.note { align-self: flex-start; background: var(--hint-bg); border-color: transparent; max-width: 80%; }
.msg.achievement { border: 1px solid var(--accent); font-weight: 600; }

@media (max-width: 560px) {
  .hide-sm { display: none; }
  .row-form { flex-direction: column; align-items: stretch; }
  .levelbig { font-size: 3.2rem; }
  .score { width: 60px; height: 60px; font-size: 1rem; }
}

/* ---------- Aula ao vivo ---------- */
.live-hero { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.live-card { border-color: rgba(154,134,255,.35) !important; }
.lesson.live .chat { padding-top: 8px; }
.stage { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 16px 10px; border-bottom: 1px solid var(--line); background: var(--paper); }
.orb { --lvl: 0; width: 112px; height: 112px; border-radius: 50%; border: 0; cursor: pointer; font-size: 2.4rem;
  background: var(--sphere); color: #fff;
  box-shadow: inset -14px -18px 30px rgba(18,8,64,.6), inset 8px 10px 20px rgba(255,255,255,.28), 0 0 0 calc(var(--lvl) * 26px) rgba(154,134,255,.2), 0 26px 50px -16px rgba(142,124,255,.6);
  transform: scale(calc(1 + var(--lvl) * .08)); transition: box-shadow .08s, transform .08s; }
.orb[data-state="teacher"] { box-shadow: inset -14px -18px 30px rgba(18,8,64,.6), inset 8px 10px 20px rgba(255,255,255,.28), 0 0 0 calc(var(--lvl) * 30px) rgba(255,122,69,.25), 0 26px 50px -16px rgba(255,122,69,.5); }
.orb[data-state="connecting"] { animation: pulse 1.2s infinite; cursor: progress; }
.orb[data-state="muted"] { filter: grayscale(1) brightness(.7); }
.orb[data-state="idle"] { animation: pulse 2s infinite; }
.orb-status { font-weight: 600; }
.msg.partial { opacity: .65; font-style: italic; }
.lesson.live .composer input { flex: 1; }
@media (max-width: 560px) { .orb { width: 92px; height: 92px; font-size: 2rem; } }

/* ---------- Professores ---------- */
.avatar { --c: var(--board); flex: none; width: 48px; height: 48px; border-radius: 50%; display: inline-grid; place-items: center;
  background: radial-gradient(circle at 34% 28%, color-mix(in srgb, var(--c) 55%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 60%, #000)); color: #fff; font: 700 1rem var(--display); box-shadow: inset -4px -6px 10px rgba(0,0,0,.3); }
.avatar.lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar.sm { width: 26px; height: 26px; font-size: .7rem; vertical-align: middle; box-shadow: none; }
.stars { display: inline-flex; gap: 1px; font-size: .95rem; vertical-align: middle; }
.st { font-style: normal; color: var(--line); }
.st.full { color: #e6a417; }
.st.half { background: linear-gradient(90deg, #e6a417 50%, var(--line) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.teachers { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.teacher { position: relative; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.teacher.current { border: 2px solid var(--ok); }
.teacher h3 { margin: 0; font-size: 1.15rem; }
.thead { display: flex; gap: 12px; align-items: center; }
.tagline { margin: 0; font-size: .95rem; }
.tmeta { line-height: 1.6; }
.teacher .actions { margin-top: auto; }
.ribbon { position: absolute; top: 12px; right: -34px; transform: rotate(35deg); background: var(--accent); color: var(--accent-ink); font-size: .68rem; font-weight: 700; padding: 3px 38px; letter-spacing: .02em; }
.chip.static { cursor: default; padding: 3px 10px; font-size: .78rem; }
.current-teacher { display: flex; gap: 14px; align-items: center; }
.teacher-strip .big { font-size: 1.1rem; }
.mini-teachers { display: grid; gap: 8px; }
.mini { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; background: var(--bg); }
.mini > div:nth-child(2) { flex: 1; min-width: 0; }
.mini b { margin-right: 6px; }
.mini-actions { display: flex; gap: 4px; }
.hero-teacher { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .88rem; color: var(--ink); text-decoration: none; opacity: .9; flex-wrap: wrap; }
.hero-teacher:hover { opacity: 1; }
.live-with { display: flex; align-items: center; gap: 6px; }
@media (max-width: 560px) { .mini { flex-wrap: wrap; } .mini-actions { width: 100%; justify-content: flex-end; } }

/* ---------- Modo voz (tela cheia) ---------- */
.big-btn { padding: 16px 22px; font-size: 1.05rem; }
.voice { position: relative; display: flex; flex-direction: column; min-height: calc(100dvh - 56px); background: radial-gradient(ellipse at 50% 38%, rgba(124,92,255,.28), transparent 60%), #0b0c1a; color: var(--ink); }
.voice-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.voice-top .small { opacity: .7; }
.voice-x { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; color: var(--ink); background: rgba(255,255,255,.08); font-size: 1.1rem; }
.voice-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 16px; text-align: center; }
.voice .orb { width: 200px; height: 200px; padding: 0; background: transparent; box-shadow: 0 0 0 calc(var(--lvl) * 40px) rgba(154,134,255,.18), 0 60px 120px -30px rgba(142,124,255,.65); }
.voice .orb[data-state="teacher"] { box-shadow: 0 0 0 calc(var(--lvl) * 46px) rgba(255,122,69,.22), 0 30px 60px -20px rgba(255,122,69,.45); }
.voice .orb[data-state="muted"] { filter: grayscale(1) brightness(.7); }
.voice .orb[data-state="idle"] { animation: pulse 2s infinite; }
.voice .orb[data-state="connecting"] { animation: pulse 1s infinite; }
.avatar.orb-av { width: 100%; height: 100%; font-size: 3.4rem; }
.voice .orb-status { font-size: 1.15rem; font-weight: 500; }
.voice-goal { max-width: 420px; opacity: .8; }
.caption { max-width: 560px; font-size: 1.05rem; line-height: 1.5; background: rgba(0,0,0,.25); padding: 10px 14px; border-radius: 12px; }
.caption .who { opacity: .65; font-size: .85rem; }
.live-card-float { max-width: 420px; width: 100%; text-align: left; background: rgba(30,28,60,.85); backdrop-filter: blur(10px); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 4px; }
.live-card-float.pop { animation: popin .3s ease-out; }
@keyframes popin { from { transform: translateY(10px) scale(.96); opacity: 0; } }
.voice-controls { display: flex; justify-content: center; gap: 22px; padding: 16px 16px calc(22px + env(safe-area-inset-bottom)); }
.vbtn { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; color: var(--ink); cursor: pointer; font: inherit; }
.vbtn span { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; background: rgba(255,255,255,.12); }
.vbtn small { font-size: .75rem; opacity: .75; }
.vbtn.on span { background: rgba(255,255,255,.3); }
.vbtn.off span { background: #b4412f; }
.vbtn.end span { background: #b4412f; }
.vbtn:disabled { opacity: .45; cursor: default; }
.voice.done .voice-center, .voice.done .voice-controls { display: none; }
.voice-report { padding: 16px; display: grid; gap: 14px; max-width: 760px; margin: 0 auto; width: 100%; color: var(--ink); }
.voice-report details summary { cursor: pointer; }
.chat.static { overflow: visible; padding: 12px 0 0; }
@media (max-width: 560px) { .voice .orb { width: 150px; height: 150px; } .vbtn span { width: 54px; height: 54px; } }

/* ---------- Chat livre e modo fonético ---------- */
.tutor-page .msg.tutor { max-width: 94%; }
.md ul { margin: 6px 0; padding-left: 20px; }
.md li { margin: 2px 0; }
.phrases { display: grid; gap: 10px; margin-top: 10px; }
.phrase { border: 1px solid var(--line); background: var(--bg); border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; text-align: left; color: var(--ink); }
.ph-text { font: 600 1.15rem var(--display); }
.ph-tr { color: var(--muted); font-size: .92rem; }
.ph-br { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; background: var(--hint-bg); border-radius: 8px; padding: 6px 10px; margin-top: 4px; }
.ph-br span { font-size: .75rem; font-weight: 600; color: var(--muted); }
.ph-br b { font-size: 1.05rem; letter-spacing: .02em; }
.ph-tip { color: var(--muted); }
.ph-result .pronres { margin-top: 8px; }
.chat-img { max-width: 220px; max-height: 220px; border-radius: 10px; display: block; margin-bottom: 6px; }
.img-preview { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-top: 1px solid var(--line); background: var(--paper); }
.img-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.empty-chat { margin: auto 0; padding: 16px 0; }
.center-chips { justify-content: center; }
.composer label.btn { flex: none; cursor: pointer; }
.phrase-float { width: 100%; max-width: 460px; display: grid; gap: 10px; }
.phrase-wrap { position: relative; }
.phrase-wrap.pop { animation: popin .3s ease-out; }
.phrase-wrap .phrase { background: rgba(30,28,60,.92); backdrop-filter: blur(10px); }
.ph-close { position: absolute; top: 6px; right: 6px; z-index: 1; }
.chat > * { flex-shrink: 0; }

/* Chat dentro da conversa por voz (painel por cima) */
.voice { overflow: hidden; }
.voice-chat { position: absolute; left: 0; right: 0; bottom: 0; height: 78%; display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
  border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.4); animation: slideup .25s ease-out; z-index: 5; }
.voice-chat .lesson-head { border-radius: 18px 18px 0 0; }
.voice-chat .chat { flex: 1; min-height: 0; }
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } }
.vbtn span { font-weight: 700; }
@media (min-width: 900px) { .voice-chat { left: auto; width: 440px; height: 100%; border-radius: 0; top: 0; } .voice-chat .lesson-head { border-radius: 0; } }
@media (min-width: 900px) { .voice.chat-open .voice-top, .voice.chat-open .voice-center, .voice.chat-open .voice-controls { margin-right: 440px; } }
.live-tr { max-width: 520px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); border-radius: 12px; padding: 10px 14px; font-size: 1rem; line-height: 1.45; animation: popin .3s ease-out; }
.live-tr span { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; opacity: .6; margin-bottom: 2px; text-transform: uppercase; }

/* =====================================================================
   Versão 1 do redesign — estrutura e telas (desenho "Escura com esfera 3D")
   ===================================================================== */
.glass { background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); border: 1px solid rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.1); border-radius: 22px; color: var(--ink); text-decoration: none; }
.card-pad { padding: 22px; }
.card-pad h2 { margin: 0 0 12px; font-size: 1.25rem; }
.h3 { font: 700 1.2rem/1.2 var(--display); letter-spacing: -0.01em; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.eyebrow.violet, .violet-text { color: #b7a9ff; }
.eyebrow.orange { color: #ffb08f; }
.grad-text { background: linear-gradient(90deg, #ff9466, #f0567a 45%, #9a86ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.btn.glow { box-shadow: 0 18px 40px -12px rgba(255,122,69,.7), inset 0 1px 0 rgba(255,255,255,.45); }
.btn.dark { background: var(--accent-ink); color: #ffe1d1; }
.btn.violet { background: #9a86ff; color: #120b3a; }
.btn.ghost { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.05); }
.icon-btn { flex: none; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.14); background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; }
.icon-btn.plain { border: 0; }
.icon-btn.solid-violet { background: #9a86ff; color: #120b3a; border: 0; }
.icon-btn:hover { background: rgba(255,255,255,.08); }
input, select, textarea { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); border-radius: 14px; }
select option { background: #14162b; }
.chip { background: transparent; border-color: rgba(255,255,255,.14); color: #cfcfe6; padding: 8px 14px; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.chip.static { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.08); }
.tag { background: rgba(154,134,255,.16); color: #cfc6ff; display: inline-flex; align-items: center; gap: 4px; }
.toast { background: #f2f1fa; color: #0b0c1a; border-radius: 14px; font-weight: 500; }
h2 { font-weight: 700; }

/* Esferas */
.sphere { box-shadow: inset -5px -7px 12px rgba(18,8,64,.6), inset 3px 4px 8px rgba(255,255,255,.28); }
.sphere.xs { width: 18px; height: 18px; vertical-align: -4px; box-shadow: inset -2px -3px 5px rgba(18,8,64,.6); }
.sphere.md { width: 40px; height: 40px; }
.sphere.xl { width: 96px; height: 96px; box-shadow: inset -14px -18px 30px rgba(18,8,64,.6), inset 8px 10px 20px rgba(255,255,255,.28), 0 26px 50px -16px rgba(142,124,255,.6); }
.orb-wrap { position: relative; flex: none; display: grid; place-items: center; }
.orb-wrap::before { content: ''; position: absolute; inset: -12px; border-radius: 50%; border: 1.5px solid rgba(154,134,255,.35); }
.avatar { box-shadow: inset -6px -9px 14px rgba(0,0,0,.45), inset 4px 5px 10px rgba(255,255,255,.3); text-shadow: 0 2px 6px rgba(0,0,0,.35); font-weight: 800; }
.avatar.md { width: 58px; height: 58px; font-size: 1.15rem; }
.avatar.xl { width: 96px; height: 96px; font-size: 2rem; box-shadow: inset -10px -14px 22px rgba(0,0,0,.45), inset 6px 8px 14px rgba(255,255,255,.35), 0 22px 40px -16px rgba(0,0,0,.8); }
.stars .st.full { color: #ffc24b; }

/* Anel de progresso */
.ring { position: relative; flex: none; }
.ring svg { position: absolute; inset: 0; }
.ring-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-in b { font: 800 2.1rem/1 var(--display); letter-spacing: -0.03em; }
.ring-in span { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- Estrutura: topo, menu lateral, barra inferior ---------- */
.topbar { border-bottom: 1px solid rgba(255,255,255,.07); }
.langpill { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.langpill a { padding: 6px 12px; border-radius: 999px; font: 600 12px var(--sans); text-decoration: none; color: #cfcfe6; opacity: 1 !important; }
.langpill a.on { background: var(--ink); color: var(--bg) !important; }
.topbar nav { gap: 10px; }
.side { display: none; }
.bottomnav { display: none; }
body.shell .bottomnav:not([hidden]) { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 7; justify-content: space-around; padding: 8px; border-radius: 24px;
  background: rgba(20,22,43,.94); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 20px 40px -10px rgba(0,0,0,.7); backdrop-filter: blur(12px); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: #8f91b0; text-decoration: none; padding: 6px 12px; border-radius: 16px; min-width: 60px; }
.bottomnav a.on { color: var(--ink); background: rgba(255,255,255,.08); }
body.shell #app.container { padding-bottom: 110px; }
body.shell.immersive .bottomnav, body.shell.immersive .topbar { display: none !important; }

@media (min-width: 900px) {
  body.shell .topbar { display: none; }
  body.shell .bottomnav { display: none !important; }
  body.shell .side:not([hidden]) { display: flex; flex-direction: column; gap: 4px; position: fixed; top: 0; bottom: 0; left: 0; width: 250px; padding: 26px 16px; z-index: 6;
    background: rgba(20,22,43,.7); border-right: 1px solid rgba(255,255,255,.07); backdrop-filter: blur(12px); overflow-y: auto; }
  body.shell #app { margin-left: 250px; }
  body.shell #app.container { max-width: 1180px; padding: 30px 40px 48px; margin-left: max(250px, calc(250px + (100vw - 250px - 1180px) / 2)); }
  body.shell.immersive .side { display: flex !important; }
}
.side .brand { padding: 0 8px 22px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side-a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; color: #a9abc8; text-decoration: none; font-size: 15px; }
.side-a:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.side-a.on { background: rgba(255,255,255,.08); color: var(--ink); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-top: 16px; }
.side-foot .langpill { align-self: flex-start; }
.me { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); border: 1px solid rgba(255,255,255,.1); }
.me > div { flex: 1; min-width: 0; }
.me-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none; background: radial-gradient(circle at 30% 25%, #c9bfff, #7c5cff 60%, #3a2a9a); box-shadow: inset -4px -6px 10px rgba(0,0,0,.35); }

/* ---------- Entrada (login) ---------- */
body.landing .topbar { display: none; }
.landing-wrap { max-width: 1440px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 80px) 48px; position: relative; overflow: hidden; }
.landing-wrap::before, .landing-wrap::after { content: ''; position: absolute; width: 700px; height: 700px; border-radius: 50%; z-index: -1; pointer-events: none; }
.landing-wrap::before { right: -200px; top: -200px; background: radial-gradient(closest-side, rgba(124,92,255,.22), transparent); }
.landing-wrap::after { left: -260px; bottom: -300px; background: radial-gradient(closest-side, rgba(255,122,69,.14), transparent); }
.land-top { display: flex; align-items: center; justify-content: space-between; padding: 28px 0; }
.land-top .brand { font-size: 1.5rem; }
.land-top .sphere { width: 34px; height: 34px; }
.land { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.land-copy { display: flex; flex-direction: column; gap: 24px; }
.pill-new { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); font-size: 14px; color: #cfcfe6; }
.pill-new b { background: var(--accent); color: var(--accent-ink); padding: 4px 10px; border-radius: 999px; font-size: 12px; letter-spacing: .04em; }
.mega { margin: 0; font: 800 clamp(3.2rem, 7vw, 5.75rem)/.95 var(--display); letter-spacing: -0.045em; }
.mega .dot { color: var(--accent); }
.mega-sm { margin: 0; font: 800 clamp(2.2rem, 5vw, 3rem)/1 var(--display); letter-spacing: -0.03em; }
.lead { margin: 0; font-size: 1.2rem; line-height: 1.55; color: #b9bbd6; max-width: 520px; }
.auth { padding: 20px; max-width: 460px; border-radius: 24px; }
.linkish { background: none; border: 0; padding: 0; color: #b9a8ff; font: 600 13px var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.linkish:hover { text-decoration: underline; }
.linkish[data-m="login"] svg { transform: rotate(180deg); }
.forgot { display: flex; margin: 8px 0 0 auto; }
.auth .h3 { display: block; margin-bottom: 6px; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1f1f1f; font-weight: 600; text-decoration: none; }
.gbtn:hover { background: #f1f1f4; }
.or { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; color: #8a8aa3; font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.1); }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.06); margin-bottom: 14px; }
.seg button { flex: 1; padding: 10px; border-radius: 999px; border: 0; background: transparent; color: #cfcfe6; font: 600 14px var(--sans); cursor: pointer; }
.seg button.on { background: var(--ink); color: var(--bg); }
.feats { display: flex; flex-wrap: wrap; gap: 24px; color: #8f91b0; font-size: 14px; }
.feats span { display: inline-flex; align-items: center; gap: 8px; }
.feats svg { color: #9a86ff; }
.scene { position: relative; height: 680px; perspective: 1400px; }
.scene-core { position: absolute; left: 50%; top: 46%; width: 0; height: 0; transform-style: preserve-3d; }
.orbit { position: absolute; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.16); transform: rotateX(74deg); }
.scene .o1 { width: 560px; height: 560px; left: -280px; top: -280px; }
.scene .o2 { width: 700px; height: 700px; left: -350px; top: -350px; border-color: rgba(255,148,102,.22); }
.scene .o3 { width: 440px; height: 440px; left: -220px; top: -220px; border-style: dashed; border-color: rgba(154,134,255,.3); }
.hero-orb { position: absolute; width: 300px; height: 300px; left: -150px; top: -150px; animation: bob 6s ease-in-out infinite;
  box-shadow: inset -26px -34px 60px rgba(18,8,64,.6), inset 16px 18px 40px rgba(255,255,255,.28), 0 60px 120px -30px rgba(142,124,255,.65), 0 30px 60px -20px rgba(255,122,69,.45); }
.orb-shadow { position: absolute; width: 320px; height: 50px; left: -160px; top: 190px; border-radius: 50%; background: radial-gradient(closest-side, rgba(124,92,255,.45), transparent); }
.listening { position: absolute; left: -60px; top: 205px; width: 120px; text-align: center; font-size: 13px; color: #cfcfe6; letter-spacing: .08em; }
@keyframes bob { 50% { transform: translateY(-12px); } }
.float { z-index: 2; position: absolute; padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; border-radius: 20px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.12); }
.float em { font-style: normal; color: #ff9466; }
.float s { text-decoration-color: #f0567a; }
.f1 { left: 0; top: 70px; width: 290px; transform: rotateY(18deg) rotateX(6deg) translateZ(40px); }
.f2 { right: 0; top: 230px; width: 280px; transform: rotateY(-20deg) rotateX(4deg) translateZ(60px); }
.f3 { left: 60px; bottom: 60px; flex-direction: row; align-items: center; gap: 14px; transform: rotateY(14deg) rotateX(-8deg) translateZ(20px); }
.f4 { right: 50px; bottom: 90px; flex-direction: row; align-items: center; gap: 12px; font-size: 14px; line-height: 1.35; transform: rotateY(-14deg) translateZ(30px); }
.f4 .sphere { width: 38px; height: 38px; }
.f3 small, .f4 small { display: block; }
.readas { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(154,134,255,.14); }
.readas small { font-size: 11px; color: #b7a9ff; letter-spacing: .06em; }
.float code { font-family: var(--mono); font-size: 13px; color: #8f91b0; }
.flame { width: 36px; height: 36px; border-radius: 12px; flex: none; display: grid; place-items: center; color: var(--accent-ink); background: linear-gradient(160deg, #ffb547, #ff7a45); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.flame svg { fill: currentColor; stroke: none; }
.flame.big { width: 44px; height: 44px; border-radius: 14px; }
.land-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 8px; }
.land-foot p { margin: 6px 0 0; line-height: 1.5; }
@media (max-width: 960px) {
  .land { grid-template-columns: 1fr; }
  .scene { height: 260px; order: -1; margin-top: -10px; }
  .scene .float { display: none; }
  .scene-core { top: 48%; transform: scale(.55); }
  .land-foot { grid-template-columns: 1fr; }
}

/* ---------- Escolha do idioma ---------- */
.lang-card { display: flex !important; align-items: center; gap: 20px; padding: 22px; }
.lang-card h2 { margin: 0 0 4px; }
.lang-card p { margin: 2px 0; }
.lang-card .ring-in b { font-size: 1.6rem; }

/* ---------- Painel ---------- */
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 22px; }
.dash-head h1 { margin: 0; font-size: clamp(1.9rem, 4vw, 2.75rem); }
.dash-teacher { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); text-decoration: none; font-size: 14px; }
.dash-teacher small { color: var(--muted); }
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.lvl-card { display: flex; align-items: center; gap: 22px; padding: 24px; border-radius: 28px; background: linear-gradient(155deg, #1e1a4a 0%, #14162b 60%); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 60px -30px rgba(124,92,255,.6); }
.lvl-side { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.streak { display: flex; align-items: center; gap: 10px; }
.streak b { display: block; font-size: 1.15rem; }
.streak small, .tile small { display: block; font-size: 12px; color: var(--muted); }
.today { grid-column: span 2; position: relative; overflow: hidden; border-radius: 28px; padding: 26px; background: var(--accent); color: var(--accent-ink);
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start; box-shadow: 0 30px 50px -24px rgba(255,122,69,.75), inset 0 1px 0 rgba(255,255,255,.5); }
.today::before { content: ''; position: absolute; right: -50px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 34px solid rgba(255,255,255,.14); }
.today h2 { margin: 0; font: 800 2rem/1.05 var(--display); letter-spacing: -0.02em; max-width: 520px; }
.today-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; position: relative; }
.today-list li { display: flex; align-items: center; gap: 8px; background: rgba(26,11,5,.1); padding: 9px 12px; border-radius: 12px; }
.today-list s { opacity: .6; }
.today .btn { margin-top: auto; position: relative; }
.voice-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; padding: 26px; border-radius: 28px; position: relative; }
.voice-card .sphere.xl { width: 110px; height: 110px; }
.voice-card .play-dot { position: absolute; right: 16px; top: 16px; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; }
.voice-card:hover .sphere { transform: scale(1.04); transition: transform .2s; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.tile { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 22px; transition: transform .15s, border-color .15s; }
.tile:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.2); }
.tile b { font-weight: 600; }
.tile-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; }
.tile-ico.violet { background: rgba(154,134,255,.18); color: #b7a9ff; }
.tile-ico.orange { background: rgba(255,122,69,.18); color: #ff9466; }
.tile-ico.amber { background: rgba(255,181,71,.16); color: #ffc46b; }
.tile-ico.blue { background: rgba(120,200,255,.14); color: #8fd0ff; }
.tile-ico.pink { background: rgba(240,86,122,.16); color: #ff8fab; }
.skill + .skill { margin-top: 12px; }
.skill .spread { margin-bottom: 5px; }
.bar { height: 8px; background: rgba(255,255,255,.08); }
.gems { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 18px 10px; padding-top: 8px; }
.gem { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 11px; color: #cfcfe6; text-align: center; }
.gem > span { width: 52px; height: 52px; border-radius: 16px; transform: rotate(45deg); display: grid; place-items: center; }
.gem > span svg { transform: rotate(-45deg); }
.gem .b-orange { background: linear-gradient(145deg, #ffd08a, #ff7a45); color: #1a0b05; box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 10px 20px -8px rgba(255,122,69,.7); }
.gem .b-violet { background: linear-gradient(145deg, #c9bfff, #7c5cff); color: #120b3a; box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 10px 20px -8px rgba(124,92,255,.7); }
.gem .b-blue { background: linear-gradient(145deg, #a8e6ff, #3d9bff); color: #04203d; box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 10px 20px -8px rgba(61,155,255,.7); }
.gem.locked { color: #6e7091; }
.gem.locked > span { border: 1.5px dashed rgba(255,255,255,.2); color: #6e7091; }
.grid2 { gap: 20px; margin-bottom: 20px; }
.list li { border-color: rgba(255,255,255,.07); }
@media (max-width: 1100px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .today { grid-column: span 2; order: -1; } }
@media (max-width: 700px) {
  .bento { grid-template-columns: 1fr; gap: 16px; }
  .today { grid-column: auto; }
  .today h2 { font-size: 1.6rem; }
  .lvl-card { padding: 20px; gap: 16px; }
  .tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .voice-card { flex-direction: row; text-align: left; justify-content: flex-start; padding: 18px; }
  .voice-card .sphere.xl { width: 64px; height: 64px; }
  .voice-card .play-dot { position: static; margin-left: auto; flex: none; }
}

/* ---------- Conversa por voz ---------- */
.live-hero { display: flex; align-items: center; gap: 32px; padding: 28px; border-radius: 28px; background: linear-gradient(155deg, #1e1a4a 0%, #14162b 60%); border: 1px solid rgba(255,255,255,.1); }
.live-hero h1 { margin: 6px 0 8px; }
.live-hero p { margin: 4px 0; }
@media (max-width: 600px) { .live-hero { flex-direction: column; align-items: flex-start; } }
.voice { background: radial-gradient(ellipse 80% 60% at 50% 38%, #221c55 0%, #0b0c1a 70%) !important; min-height: 100dvh; }
.voice-top { padding: 20px 18px 0; }
.voice-x { width: 42px; height: 42px; background: rgba(255,255,255,.08); }
.live-sub { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); opacity: 1 !important; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255,122,69,.2); }
.voice-center { gap: 20px; }
.orb-stage { position: relative; width: 300px; height: 280px; display: grid; place-items: center; perspective: 900px; }
.orb-stage .orbit { left: 50%; top: 50%; }
.orb-stage .o1 { width: 330px; height: 330px; margin: -165px 0 0 -165px; }
.orb-stage .o2 { width: 400px; height: 400px; margin: -200px 0 0 -200px; border-color: rgba(255,148,102,.25); }
.orb-stage .o3 { width: 270px; height: 270px; margin: -135px 0 0 -135px; border-style: dashed; border-color: rgba(154,134,255,.35); }
.voice[data-state="listening"] .o3, .voice[data-state="teacher"] .o3 { animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotateX(72deg) rotateZ(360deg); } }
.orb-stage .orb-shadow { left: 50%; top: auto; bottom: -8px; margin-left: -110px; width: 220px; height: 34px; }
.voice .orb { position: relative; z-index: 1; width: 210px; height: 210px; background: var(--sphere) !important;
  box-shadow: inset -22px -30px 50px rgba(18,8,64,.6), inset 14px 16px 34px rgba(255,255,255,.28), 0 0 0 calc(var(--lvl) * 36px) rgba(154,134,255,.16), 0 50px 100px -24px rgba(142,124,255,.7), 0 24px 50px -16px rgba(255,122,69,.5) !important; }
.voice .orb[data-state="teacher"] { box-shadow: inset -22px -30px 50px rgba(18,8,64,.6), inset 14px 16px 34px rgba(255,255,255,.28), 0 0 0 calc(var(--lvl) * 42px) rgba(255,122,69,.22), 0 50px 100px -24px rgba(255,122,69,.6) !important; }
.wave { display: flex; align-items: center; gap: 4px; height: 28px; }
.wave i { width: 4px; border-radius: 4px; height: calc(4px + var(--h) * (.25 + var(--lvl, 0) * 1.4)); max-height: 28px; transition: height .08s; background: #ff9466; }
.wave i:nth-child(n+3) { background: #f0567a; }
.wave i:nth-child(n+5) { background: #c27cff; }
.wave i:nth-child(n+6) { background: #9a86ff; }
.voice[data-state="idle"] .wave i, .voice[data-state="muted"] .wave i { height: 4px; }
.voice .orb-status { font: 700 1.5rem var(--display); letter-spacing: -0.01em; }
.live-tr { max-width: 520px; width: 100%; text-align: left; border-radius: 20px; padding: 14px 16px; background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.035)); border: 1px solid rgba(255,255,255,.12); color: #e4e3f2; }
.live-tr span { color: #b7a9ff; opacity: 1; letter-spacing: .1em; font-size: 11px; }
.caption { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; }
.live-card-float { border-radius: 20px; display: grid; gap: 6px; }
.voice-controls { gap: 18px; padding-bottom: calc(30px + env(safe-area-inset-bottom)); }
.vbtn { color: #cfcfe6; }
.vbtn span { width: 62px; height: 62px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); color: var(--ink); font-size: 15px; }
.vbtn.on span { background: rgba(255,255,255,.26); }
.vbtn.off span, .vbtn.end span { background: #e8425f; border-color: #e8425f; color: #fff; box-shadow: 0 14px 30px -10px rgba(232,66,95,.8); }
.phrase-wrap .phrase { background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.9)) !important; color: #14162b; border: 0; box-shadow: 0 24px 50px -20px rgba(0,0,0,.8); }
.phrase-wrap .phrase .ph-tr, .phrase-wrap .phrase .phon, .phrase-wrap .phrase .ph-tip { color: #3b3d5c; }
.phrase-wrap .phrase .ph-br { background: #ecebfa; }
.phrase-wrap .phrase .act { color: #14162b; border-color: rgba(20,22,43,.18); background: transparent; }
.phrase-wrap .phrase .act.hot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ph-close { color: #14162b; }
.voice-report { color: var(--ink); }
@media (max-width: 560px) { .orb-stage { transform: scale(.82); margin: -20px 0; } .vbtn span { width: 56px; height: 56px; } }

/* ---------- Chat livre ---------- */
.tutor-page { height: 100dvh; max-width: none; }
@media (min-width: 900px) { body.shell .tutor-page { max-width: 820px; margin: 0 auto; } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(20,22,43,.85); }
.chat { padding: 18px 16px; gap: 14px; }
.msg { border-radius: 20px; background: transparent; border: 0; box-shadow: none; padding: 0; }
.msg.student { background: linear-gradient(160deg, #8e7cff, #6b52e8) !important; color: #fff; border: 0; padding: 12px 15px; border-radius: 20px 20px 6px 20px; max-width: 78%; box-shadow: 0 12px 24px -12px rgba(107,82,232,.8); }
.msg.teacher { color: #e4e3f2; line-height: 1.55; }
.msg.teacher .md b { color: #ffb08f; }
.msg .who { display: flex; align-items: center; gap: 8px; }
.msg.correct, .msg.correction, .msg.notice, .msg.note, .msg.question, .msg.achievement { padding: 12px 14px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); }
.msg.correct { border-color: rgba(95,211,154,.4); background: var(--ok-bg); }
.msg.correction { border-color: rgba(240,86,122,.4); background: var(--err-bg); }
.composer-wrap { padding: 12px 14px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.08); background: rgba(20,22,43,.9); }
.composer.pill { display: flex; align-items: flex-end; gap: 6px; padding: 6px; border: 1px solid rgba(255,255,255,.12); border-radius: 22px; background: rgba(255,255,255,.06); }
.composer.pill textarea { border: 0; background: transparent; outline: none; min-height: 42px; padding: 10px 6px; }
.composer.pill textarea:focus { outline: none; }
.composer.pill .icon-btn { border-radius: 16px; color: #cfcfe6; }
.send { flex: none; width: 42px; height: 42px; border-radius: 16px; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; }
.send:disabled { opacity: .55; }
.img-preview { background: rgba(20,22,43,.9); border-color: rgba(255,255,255,.08); }
.phrase { border-radius: 22px !important; padding: 16px !important; gap: 10px !important; background: linear-gradient(165deg, #1e1a4a, #15172e) !important; border: 1px solid rgba(154,134,255,.25) !important; box-shadow: 0 24px 40px -24px rgba(124,92,255,.7); }
.ph-text { font: 700 1.6rem/1.15 var(--display) !important; letter-spacing: -0.02em; }
.ph-br { flex-direction: column; gap: 2px !important; padding: 12px 14px !important; border-radius: 14px !important; background: #f2f1fa !important; color: #14162b; }
.ph-br span { color: #6b52e8 !important; letter-spacing: .08em; font-size: 11px !important; }
.ph-br b { font-size: 1.25rem !important; font-weight: 600; }
.phrase .phon { color: var(--muted); }
.act { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: var(--ink); font: 500 13px var(--sans); cursor: pointer; }
.act.hot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.act.recording { background: #e8425f; border-color: #e8425f; color: #fff; animation: pulse 1s infinite; }
.act:disabled { opacity: .6; }
.voice-chat { background: #0b0c1a; border: 1px solid rgba(255,255,255,.08); }
.voice-chat .tutor-page, .voice-chat .chat-head { border-radius: 18px 18px 0 0; }
@media (min-width: 900px) { .voice-chat .chat-head { border-radius: 0; } }

/* ---------- Professores ---------- */
.t-head { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.t-head p { margin: 0; }
.t-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .t-top { grid-template-columns: 1fr; } }
.t-feature { position: relative; overflow: hidden; border-radius: 30px; padding: 26px 24px 24px; display: flex; flex-direction: column; gap: 16px;
  background: linear-gradient(160deg, #2a2260 0%, #17183a 55%, #121428 100%); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 40px 70px -30px rgba(124,92,255,.75); }
.t-badge { position: absolute; right: 18px; top: 18px; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.t-feature-head { display: flex; align-items: center; gap: 20px; }
.t-feature h2 { margin: 0 0 2px; font: 800 2rem var(--display); letter-spacing: -0.02em; }
.t-ring { position: relative; }
.t-ring::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.14); }
.t-quote { margin: 0; font-size: 1.05rem; line-height: 1.5; color: #e4e3f2; }
.t-actions { display: flex; gap: 10px; }
.t-actions .btn { flex: 1; border-radius: 16px; height: 50px; }
.t-actions .btn:last-child { flex: 1.4; }
.t-rows { display: grid; gap: 12px; }
.t-row { display: flex; align-items: center; gap: 14px; padding: 14px; }
.t-row.current { border-color: rgba(154,134,255,.5); }
.teacher { padding: 18px; border-radius: 22px; }
.teacher.current { border: 1px solid rgba(154,134,255,.55); }
.ribbon { color: var(--accent-ink); }
.teacher-strip .current-teacher .icon-btn, .mini .icon-btn { width: 38px; height: 38px; }
.mini { background: rgba(255,255,255,.04); border-radius: 16px; }
body.immersive .lesson { height: 100dvh; }
.voice-x.on { background: #9a86ff; color: #120b3a; }
.voice-x { border: 0; cursor: pointer; }

/* ---------- Painel de admin ---------- */
.admin-link { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: rgba(154,134,255,.16); color: #cfc6ff !important; opacity: 1 !important; font-weight: 600; }
.container.admin { max-width: 1240px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.admin-head h1 { margin: 4px 0 0; }
.kpis-a { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-a { padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi-a b { font: 800 2rem/1 var(--display); letter-spacing: -0.03em; }
.kpi-a span { font-size: 13px; color: var(--muted); }
.kpi-a.on b { color: #5fd39a; }
.kpi-a.live b { color: #ff9466; }
.admin-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.admin-tools input { max-width: 340px; }
.utable { display: flex; flex-direction: column; }
.urow { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.3fr) minmax(0, 1fr) 90px 110px; gap: 12px; align-items: center; padding: 12px 10px; border: 0; border-top: 1px solid rgba(255,255,255,.07);
  background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; border-radius: 12px; }
.urow:hover { background: rgba(255,255,255,.04); }
.uhead { cursor: default; font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; border-top: 0; }
.uhead:hover { background: none; }
.uname { display: flex; align-items: center; gap: 12px; min-width: 0; }
.uname > span:last-child { min-width: 0; }
.uname small, .ustatus small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-av.sm { width: 36px; height: 36px; font-size: 14px; }
.me-av.lg { width: 64px; height: 64px; font-size: 26px; }
.badge-a { font-style: normal; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: rgba(154,134,255,.2); color: #cfc6ff; margin-left: 4px; }
.badge-a.red { background: rgba(240,86,122,.2); color: #ff9aad; }
.ustatus { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.st-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #4a4d6e; }
.st-dot.online { background: #5fd39a; box-shadow: 0 0 0 4px rgba(95,211,154,.18); }
.st-dot.live { background: #ff7a45; box-shadow: 0 0 0 4px rgba(255,122,69,.22); animation: pulse 1.4s infinite; }
@media (max-width: 760px) { .urow { grid-template-columns: minmax(0, 1fr) auto; } }
.drawer { position: fixed; inset: 0; z-index: 20; }
.drawer-bg { position: absolute; inset: 0; background: rgba(5,6,15,.6); backdrop-filter: blur(3px); }
.drawer-in { position: absolute; right: 0; top: 0; bottom: 0; width: min(460px, 100%); overflow-y: auto; padding: 22px; border-radius: 22px 0 0 22px; background: #121429; display: flex; flex-direction: column; gap: 12px; }
.drawer-in h2 { margin: 0; }
.drawer-in h3 { margin: 10px 0 0; font-size: 1rem; }
.d-head { display: flex; gap: 16px; align-items: center; }
.d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.d-grid > div { padding: 12px; border-radius: 14px; background: rgba(255,255,255,.05); }
.d-grid small { display: block; color: var(--muted); font-size: 12px; }
.d-lang { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.04); }
.d-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.danger { background: #e8425f; color: #fff; }

/* ---------- Instalar o app ---------- */
.install-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,122,69,.45); background: rgba(255,122,69,.12); color: #ffb08f !important; font: 600 13px var(--sans); cursor: pointer; opacity: 1 !important; }
.install-btn:hover { background: rgba(255,122,69,.2); }
.brand-ico { width: 38px; height: 38px; border-radius: 10px; }
.side .js-install { background: none; border: 0; width: 100%; cursor: pointer; font: inherit; color: #ffb08f; }
.install-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; margin: 0 0 18px; text-align: left; cursor: pointer; font: inherit; border-color: rgba(255,122,69,.35); }
.install-card img { border-radius: 14px; flex: none; }
.install-card span { flex: 1; }
.install-card small { display: block; color: var(--muted); }
.install-card svg { color: #ff9466; flex: none; }
.inst-overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: end center; padding: 16px; background: rgba(5,6,15,.65); backdrop-filter: blur(4px); }
@media (min-width: 600px) { .inst-overlay { place-items: center; } }
.inst-modal { width: min(440px, 100%); padding: 22px; border-radius: 26px; background: #14162b; display: flex; flex-direction: column; gap: 14px; }
.inst-modal p { margin: 0; }
.inst-app { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px; background: rgba(255,255,255,.05); }
.inst-app img { border-radius: 14px; }
.inst-app small { display: block; color: var(--muted); font-size: 13px; }
.inst-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.inst-steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; line-height: 1.45; }
.inst-steps li::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px; }
@media (display-mode: standalone) { .topbar { padding-top: calc(14px + env(safe-area-inset-top)); } }
.voice-top { padding-top: calc(20px + env(safe-area-inset-top)); }
.chat-head { padding-top: calc(16px + env(safe-area-inset-top)); }

/* Diálogo de confirmação no visual do app */
.dlg-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(6,7,18,.62); backdrop-filter: blur(4px); animation: dlg-fade .15s ease-out; }
.dlg-backdrop.out { opacity: 0; transition: opacity .15s; }
.dlg { width: 100%; max-width: 400px; padding: 24px; background: linear-gradient(180deg, #1c1f3a, #14162b); box-shadow: 0 30px 80px -20px rgba(0,0,0,.7), var(--shadow); animation: dlg-pop .18s ease-out; }
.dlg-msg { margin: 0 0 18px; font-size: 1.02rem; line-height: 1.5; color: var(--ink); }
.dlg-input { margin: -4px 0 18px; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; }
.dlg-actions .btn { min-width: 110px; }
@media (max-width: 420px) { .dlg-actions .btn { flex: 1; min-width: 0; } }
@keyframes dlg-fade { from { opacity: 0; } }
@keyframes dlg-pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }

/* Toast: aviso rápido com ícone, cor por tipo e barra de tempo */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; gap: 10px;
  width: max-content; max-width: min(440px, calc(100% - 32px)); padding: 12px 16px 12px 12px; overflow: hidden; cursor: pointer;
  background: linear-gradient(180deg, #23264a, #181a33); color: var(--ink); border: 1px solid rgba(255,255,255,.12); border-radius: 16px;
  font-size: .92rem; font-weight: 500; line-height: 1.4; box-shadow: 0 18px 50px -12px rgba(0,0,0,.7), var(--shadow);
  opacity: 0; transform: translate(-50%, 12px) scale(.97); transition: opacity .2s, transform .2s cubic-bezier(.2,.9,.3,1.2); }
.toast.in { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast-ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--hint-bg); color: var(--violet); }
.toast-msg { min-width: 0; }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--violet); opacity: .7; transform-origin: left; }
.toast.in .toast-bar { animation: toast-bar var(--ms, 4000ms) linear forwards; }
.toast.ok .toast-ic { background: var(--ok-bg); color: var(--ok); } .toast.ok .toast-bar { background: var(--ok); }
.toast.err .toast-ic { background: var(--err-bg); color: var(--err); } .toast.err .toast-bar { background: var(--err); }
.toast.err { border-color: rgba(240,86,122,.35); }
.toast.win { border-color: rgba(255,122,69,.4); } .toast.win .toast-ic { background: var(--sphere); color: #fff; } .toast.win .toast-bar { background: var(--grad); opacity: 1; }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 899px) { body.shell:not(.immersive):has(.bottomnav:not([hidden])) .toast { bottom: calc(96px + env(safe-area-inset-bottom)); } }

.wrap-gap { flex-wrap: wrap; gap: 12px; }
.mailpref { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #cfcfe6; cursor: pointer; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.06); }
.mailpref input { accent-color: #7c5cff; width: 16px; height: 16px; }
.remind { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05); color: #e6e6f5; font: 600 13px var(--sans); cursor: pointer; flex-wrap: wrap; }
.remind:hover:not(.on) { background: rgba(255,255,255,.1); }
.remind.on { cursor: default; border-color: rgba(124,92,255,.35); background: rgba(124,92,255,.1); }
.remind select { background: transparent; color: inherit; border: 0; font: inherit; cursor: pointer; padding: 0 2px; }
.remind select option { color: #111; }
.remind-note { display: inline-flex; align-items: center; gap: 6px; }

/* Admin → Uso da API */
.admin-tabs { margin: 4px 0 20px; }
.usage-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.usage-top p { max-width: 760px; margin: 0; }
.kpi-a small { font-size: 12px; color: #8a8aa3; }
.kpi-a.warn b { color: #fab219; }
.kpi-a b { font-variant-numeric: tabular-nums; }
.usage-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 16px; }
.usage-grid > section { min-width: 0; }
@media (max-width: 900px) { .usage-grid { grid-template-columns: 1fr; } }
.viz h2, .usage-grid h2 { margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0 4px; font-size: 13px; color: #cfcfe6; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i, .tip-row i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.chart { position: relative; margin-top: 8px; min-height: 220px; }
.chart svg { display: block; max-width: 100%; height: auto; }
.chart .grid { stroke: rgba(255,255,255,.07); stroke-width: 1; }
.chart .grid.base { stroke: rgba(255,255,255,.22); }
.chart .tick { fill: #8a8aa3; font: 11px var(--sans); font-variant-numeric: tabular-nums; }
.chart .hover-line { stroke: rgba(255,255,255,.25); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.chart .hit { cursor: crosshair; }
.viz-tip { position: absolute; top: 0; transform: translateX(-50%); min-width: 190px; white-space: nowrap; padding: 10px 12px; border-radius: 12px; background: #1b1c2e; border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 30px rgba(0,0,0,.4); font-size: 12px; pointer-events: none; z-index: 2; }
.viz-tip > b { display: block; margin-bottom: 6px; font-size: 13px; text-transform: capitalize; }
.tip-row { display: flex; align-items: center; gap: 8px; margin-top: 3px; color: #cfcfe6; }
.tip-row span { flex: 1; }
.tip-row b { font-variant-numeric: tabular-nums; color: var(--ink); }
.tip-row.total { border-top: 1px solid rgba(255,255,255,.1); padding-top: 5px; margin-top: 6px; }
.tip-row.muted { color: #8a8aa3; }
.ttable-wrap { overflow-x: auto; margin-top: 12px; }
.ttable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ttable th { text-align: left; font: 600 12px var(--sans); color: #8a8aa3; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.1); white-space: nowrap; }
.ttable td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,.06); vertical-align: middle; }
.ttable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ttable th.sortable { cursor: pointer; user-select: none; }
.ttable th.sortable:hover, .ttable th.on { color: var(--ink); }
.ttable tbody tr[data-u] { cursor: pointer; }
.ttable tbody tr[data-u]:hover, .ttable tbody tr[data-u]:focus { background: rgba(255,255,255,.04); outline: none; }
.ttable code { font-size: 12px; white-space: nowrap; }
.block { display: block; }
.vcell { min-width: 130px; }
.vcell > span:first-child { display: block; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vbar { display: block; height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); margin-top: 6px; overflow: hidden; }
.vbar i { display: block; height: 100%; border-radius: 99px; background: #3987e5; }
.vbar.full i { background: #d03b3b; }
.warn-t { color: #fab219; }
.health { padding: 12px 14px; border-radius: 14px; margin: 12px 0; font-size: 14px; }
.health.ok { background: rgba(12,163,12,.12); }
.health.warn { background: rgba(250,178,25,.12); }
.err-list li { display: flex; justify-content: space-between; gap: 10px; }
.limit-form { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.limit-form label { font-weight: 600; font-size: 14px; }
.limit-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.limit-row input { width: 110px; }

/* ==================================================================
   SPEAK AI — Visual V2 / Aurora Voice
   Identidade própria: índigo profundo + coral + violeta + ciano.
   Mantém toda a lógica existente e moderniza apenas apresentação.
================================================================== */
:root{
  --bg:#080817;
  --paper:#111228;
  --ink:#f8f7ff;
  --muted:#a8aac7;
  --line:rgba(174,172,255,.16);
  --board:#fbf9ff;
  --board-ink:#101126;
  --accent:#ff7043;
  --accent-ink:#1c0903;
  --violet:#9b7bff;
  --cyan:#58d7ff;
  --ok:#55dfa0;
  --hint-bg:rgba(155,123,255,.14);
  --radius:22px;
  --shadow:inset 0 1px 0 rgba(255,255,255,.08),0 18px 55px rgba(5,5,20,.22);
  --grad:linear-gradient(110deg,#ff7043 0%,#f05b89 48%,#9b7bff 78%,#58d7ff 100%);
}
html{background:var(--bg)}
body{
  position:relative;
  background:
    radial-gradient(circle at 8% 8%,rgba(155,123,255,.16),transparent 28%),
    radial-gradient(circle at 92% 18%,rgba(88,215,255,.09),transparent 28%),
    radial-gradient(circle at 50% 100%,rgba(255,112,67,.08),transparent 32%),
    #080817;
  background-attachment:fixed;
}
body::before{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:-1;
  background-image:linear-gradient(rgba(255,255,255,.022) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.022) 1px,transparent 1px);
  background-size:42px 42px;
  mask-image:linear-gradient(to bottom,black,transparent 76%);
}
.topbar{
  min-height:66px;padding:12px 22px;
  background:rgba(8,8,23,.78);backdrop-filter:blur(20px) saturate(135%);
  border-bottom:1px solid rgba(155,123,255,.16);
  box-shadow:0 14px 45px rgba(0,0,0,.15);
}
.brand{font-size:1.15rem}.brand .sphere{width:31px;height:31px;position:relative;animation:speak-orb 5s ease-in-out infinite}
.brand .sphere::after{content:"";position:absolute;inset:-6px;border-radius:50%;border:1px solid rgba(155,123,255,.26);animation:speak-ring 2.8s ease-out infinite}
.topbar nav{gap:8px}.topbar nav a,.topbar nav button{padding:8px 11px;border-radius:10px;transition:.2s ease}.topbar nav a:hover,.topbar nav button:hover{background:rgba(255,255,255,.055);color:#fff}
.container{max-width:1040px;padding:30px 20px 64px}
.card{
  position:relative;overflow:hidden;
  background:linear-gradient(145deg,rgba(26,27,57,.92),rgba(15,16,38,.84));
  border:1px solid rgba(166,162,255,.15);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 18px 60px rgba(1,2,16,.24);
  transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease;
}
.card::before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(320px circle at 15% 0%,rgba(155,123,255,.08),transparent 65%)}
.card:hover{transform:translateY(-3px);border-color:rgba(155,123,255,.28);box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 24px 70px rgba(1,2,16,.32)}
.hero{
  position:relative;overflow:hidden;
  background:linear-gradient(135deg,rgba(36,27,89,.95),rgba(17,18,40,.96) 58%,rgba(13,43,58,.88));
  border-color:rgba(155,123,255,.24);
  box-shadow:0 30px 90px -38px rgba(124,92,255,.7),inset 0 1px 0 rgba(255,255,255,.08);
  padding:26px;
}
.hero::after{content:"";position:absolute;width:300px;height:300px;right:-110px;top:-120px;border-radius:50%;background:radial-gradient(circle,rgba(88,215,255,.16),transparent 70%);pointer-events:none}
.hero h1{font-size:clamp(2rem,5vw,3.2rem)}
.btn{border-radius:13px;min-height:44px;font-weight:700;transition:transform .18s ease,box-shadow .18s ease,filter .18s ease;position:relative;overflow:hidden}
.btn::after{content:"";position:absolute;inset:0 auto 0 -80%;width:42%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.35),transparent);transform:skewX(-20deg);transition:left .55s ease}
.btn:hover::after{left:140%}.btn:hover{transform:translateY(-2px)}
.btn.accent{background:linear-gradient(135deg,#ff7043,#ff8a62);box-shadow:0 12px 30px rgba(255,112,67,.18)}
.btn.ghost{background:rgba(255,255,255,.025);border-color:rgba(174,172,255,.18)}
.chip{border-radius:10px;background:rgba(255,255,255,.035);border-color:rgba(174,172,255,.15);transition:.18s}.chip:hover{border-color:rgba(155,123,255,.4);transform:translateY(-1px)}.chip.on{background:linear-gradient(135deg,#f7f6ff,#ded9ff);color:#16152b}
.tabs{gap:8px}.tabs button{border-radius:10px 10px 0 0}.tabs button.on{background:rgba(155,123,255,.08)}
input,select,textarea{background:rgba(12,13,31,.88);border-color:rgba(174,172,255,.18);border-radius:12px;transition:.18s ease}input:focus,select:focus,textarea:focus{outline:none;border-color:#9b7bff;box-shadow:0 0 0 3px rgba(155,123,255,.12)}
.msg{background:linear-gradient(145deg,#14162d,#101126);border-color:rgba(174,172,255,.13);box-shadow:0 12px 28px rgba(0,0,0,.16)}.msg.student{background:linear-gradient(135deg,#ff7043,#f15f86);color:white;border-color:transparent}.msg.teacher{border-left:2px solid #9b7bff}.msg.notice{border-color:rgba(88,215,255,.2);background:rgba(88,215,255,.08)}
.bar{height:11px;background:#202341}.bar>i{background:var(--grad);box-shadow:0 0 20px rgba(155,123,255,.24)}
.bottomnav{background:rgba(8,8,23,.88)!important;backdrop-filter:blur(20px)!important;border-top-color:rgba(155,123,255,.16)!important}
.toast{background:#f6f4ff;color:#121326;box-shadow:0 16px 45px rgba(0,0,0,.34);border-radius:14px}
@keyframes speak-orb{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-2px) rotate(8deg);filter:saturate(1.15)}}
@keyframes speak-ring{0%{transform:scale(.75);opacity:.75}100%{transform:scale(1.5);opacity:0}}
@media(max-width:620px){.container{padding:18px 13px 92px}.card{border-radius:18px}.hero{padding:20px}.topbar{padding:10px 14px}.brand .sphere{width:28px;height:28px}}
@media(prefers-reduced-motion:reduce){.brand .sphere,.brand .sphere::after{animation:none}.card,.btn,.chip{transition:none}}
