:root {
  --bg: #f5f1e8;
  --paper: #fffdf8;
  --ink: #1d2420;
  --muted: #69716b;
  --line: #e2dccd;
  --board: #1f3a2e;
  --board-ink: #eef3ea;
  --accent: #d9822b;
  --ok: #2f7d4f;
  --ok-bg: #e7f3eb;
  --err: #b4412f;
  --err-bg: #fbeae6;
  --hint-bg: #fdf4e3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141816; --paper: #1c211e; --ink: #e8ebe6; --muted: #9aa39c; --line: #2d342f;
    --board: #24463a; --ok-bg: #1d3326; --err-bg: #3a221d; --hint-bg: #352c1c;
    --shadow: 0 1px 2px rgba(0,0,0,.3);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 Inter, system-ui, sans-serif; min-height: 100dvh; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
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: 12px 16px; background: var(--board); color: var(--board-ink); }
.brand { font-family: Fraunces, serif; font-weight: 700; text-decoration: none; font-size: 1.15rem; }
.topbar nav { display: flex; gap: 14px; align-items: center; font-size: .9rem; }
.topbar nav a, .topbar nav button { color: var(--board-ink); background: none; border: 0; cursor: pointer; font: inherit; opacity: .85; text-decoration: none; }
.topbar nav a:hover, .topbar nav button:hover { opacity: 1; }

.card { background: var(--paper); 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 20px; border-radius: 10px; border: 1px solid transparent;
  background: var(--board); color: var(--board-ink); font: 600 1rem Inter, sans-serif; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.accent { background: var(--accent); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.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 Inter; 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: var(--board); color: var(--board-ink); 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 Fraunces, serif; }
.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(--ok); 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-left: 4px solid var(--accent); }
.focus .big { font: 700 1.25rem Fraunces, serif; }
.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(--board); color: var(--board-ink); border-color: var(--board); 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 Fraunces, serif; }
.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: ui-monospace, monospace; 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 Fraunces, serif; }
.levelbig { font: 700 4rem/1 Fraunces, serif; color: var(--board); }
.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: linear-gradient(135deg, var(--accent), #c06a1a); color: #fff; border: 0; }
.daily .small { opacity: .9; font-weight: 600; letter-spacing: .02em; }
.daily .btn { background: #fff; color: #8a4a10; }
.daily .strike { text-decoration-color: #fff; }
.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 { font-size: 1.6rem; }
.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: ui-monospace, monospace; 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 Fraunces, serif; }
.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 Fraunces, serif; color: #fff; }
.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 Fraunces, serif; }
.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 Fraunces, serif; }
.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 Fraunces, serif; }
.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(--board); color: var(--board-ink); border: 0; }
.live-card { background: var(--board) !important; color: var(--board-ink); }
.live-card small { color: var(--board-ink) !important; opacity: .8; }
.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: radial-gradient(circle at 35% 30%, #3f7a62, var(--board)); color: #fff;
  box-shadow: 0 0 0 calc(var(--lvl) * 26px) rgba(47, 125, 79, .22), 0 6px 24px rgba(0,0,0,.18);
  transform: scale(calc(1 + var(--lvl) * .08)); transition: box-shadow .08s, transform .08s; }
.orb[data-state="teacher"] { background: radial-gradient(circle at 35% 30%, #f0a35a, var(--accent)); box-shadow: 0 0 0 calc(var(--lvl) * 30px) rgba(217, 130, 43, .25), 0 6px 24px rgba(0,0,0,.18); }
.orb[data-state="connecting"] { animation: pulse 1.2s infinite; cursor: progress; }
.orb[data-state="muted"] { background: #8a8f8b; }
.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 30% 25%, color-mix(in srgb, var(--c) 55%, #fff), var(--c)); color: #fff; font: 700 1rem Fraunces, serif; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.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: #fff; 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(--board-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% 35%, #24463a 0%, #101a15 70%); color: #eef3ea; }
.voice-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.voice-top .small { opacity: .7; }
.voice-x { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; color: #eef3ea; 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: 180px; height: 180px; padding: 0; background: transparent; box-shadow: 0 0 0 calc(var(--lvl) * 40px) rgba(120, 200, 150, .18), 0 0 60px rgba(120, 200, 150, .15); }
.voice .orb[data-state="teacher"] { box-shadow: 0 0 0 calc(var(--lvl) * 46px) rgba(240, 163, 90, .25), 0 0 70px rgba(240, 163, 90, .25); }
.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: #fffdf8; color: #1d2420; border-radius: 14px; padding: 12px 14px; box-shadow: 0 8px 30px rgba(0,0,0,.35); 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: #eef3ea; 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); border-left: 4px solid var(--accent); background: var(--bg); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; text-align: left; color: var(--ink); }
.ph-text { font: 600 1.15rem Fraunces, serif; }
.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: #fffdf8; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.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; }
