/* =====================================================================
   Ammu Teacher — premium design system (v13)
   ===================================================================== */
:root {
  --bg-0: #07061a;
  --bg-1: #0e0b2b;
  --bg-2: #1a1446;
  --ink: #ffffff;
  --ink-2: #d9d4ff;
  --ink-soft: #a9a2d6;
  --line: rgba(255, 255, 255, .10);
  --line-2: rgba(255, 255, 255, .18);
  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .09);
  --coral: #ff7a59;
  --pink: #ff5fa2;
  --violet: #8b7bff;
  --violet-2: #6c5cff;
  --blue: #5ab0ff;
  --teal: #2dd4bf;
  --green: #34d399;
  --amber: #ffc94a;
  --gold-1: #ffe08a;
  --gold-2: #f5a524;
  --board: #133029;
  --board-2: #1b3f35;
  --chalk: #f4f1e8;
  --grad: linear-gradient(135deg, #ff7a59 0%, #ff5fa2 45%, #8b7bff 100%);
  --r: 20px;
  --r-lg: 28px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
  --shadow-sm: 0 10px 30px -14px rgba(0, 0, 0, .6);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ui: "Plus Jakarta Sans", "Noto Sans Malayalam", system-ui, -apple-system, sans-serif;
  --ml: "Noto Sans Malayalam", "Plus Jakarta Sans", system-ui, sans-serif;
  --hand: "Chilanka", "Noto Sans Malayalam", cursive;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--ui); color: var(--ink); background: var(--bg-0); -webkit-font-smoothing: antialiased; overflow-x: hidden; line-height: 1.45; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2.5px solid var(--amber); outline-offset: 3px; border-radius: 10px; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.ic .d { fill: currentColor; opacity: .18; stroke: none; }
h1, h2, h3 { letter-spacing: 0; line-height: 1.25; }
/* Malayalam conjuncts break when letter-spacing is not zero */
:lang(ml), [lang="ml"] * { font-feature-settings: normal; }
.muted { color: var(--ink-soft); }
.tiny { font-size: .8rem; }
.empty { color: var(--ink-soft); text-align: center; padding: 22px 8px; margin: 0; }
.hide-lg { display: none !important; }
#app { min-height: 100dvh; }
[hidden] { display: none !important; }

/* ---------- aurora background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(130% 90% at 15% -10%, #2b1f74 0%, var(--bg-1) 45%, var(--bg-0) 100%); }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; animation: drift 26s ease-in-out infinite alternate; }
.b1 { width: 55vmax; height: 55vmax; background: #6d4bff; opacity: .38; top: -25vmax; left: -15vmax; }
.b2 { width: 50vmax; height: 50vmax; background: #ff4f8b; opacity: .22; bottom: -28vmax; right: -18vmax; animation-delay: -9s; }
.b3 { width: 34vmax; height: 34vmax; background: #10b6c9; opacity: .16; top: 35%; left: 50%; animation-delay: -17s; }
@keyframes drift { to { transform: translate(7vmax, 5vmax) scale(1.18); } }
.stars { position: absolute; inset: 0; opacity: .7; background-image:
  radial-gradient(1.5px 1.5px at 12% 22%, #fff9, transparent), radial-gradient(1px 1px at 28% 68%, #fff7, transparent),
  radial-gradient(1.5px 1.5px at 72% 14%, #fff8, transparent), radial-gradient(1px 1px at 86% 62%, #fff6, transparent),
  radial-gradient(1px 1px at 48% 38%, #fff6, transparent), radial-gradient(1.5px 1.5px at 93% 90%, #fff7, transparent),
  radial-gradient(1px 1px at 6% 84%, #fff5, transparent), radial-gradient(1px 1px at 60% 82%, #fff5, transparent);
  animation: twinkle 7s ease-in-out infinite alternate; }
.bg::after { content: ""; position: absolute; inset: 0; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes twinkle { from { opacity: .35; } to { opacity: .85; } }

/* ---------- layout ---------- */
.screen { display: none; width: 100%; min-height: 100dvh; max-width: 1280px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 18px max(16px, env(safe-area-inset-bottom)); flex-direction: column; gap: 16px; }
.screen.active { display: flex; animation: screenIn .55s var(--ease); }
@keyframes screenIn { from { opacity: 0; transform: translateY(12px); } }
.reveal { animation: rise .7s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.pop-in { animation: popIn .5s var(--spring); }
@keyframes popIn { from { opacity: 0; transform: scale(.9) translateY(14px); } }
.shake { animation: shake .42s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.glass-strong { background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.035)); border: 1px solid var(--line-2); border-radius: var(--r-lg); backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.12); }

/* ---------- top bars, chips, buttons ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.logo { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--grad); box-shadow: 0 8px 20px -6px #ff5fa2aa; flex: none; }
.logo .ic { width: 20px; height: 20px; color: #fff; }
.chips { display: flex; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-weight: 700; font-variant-numeric: tabular-nums; }
.chip .ic { width: 18px; height: 18px; }
.chip.gold .ic { color: var(--amber); } .chip.gold .ic .d { opacity: .9; fill: var(--amber); }
.chip.flame .ic { color: #ff8a4c; } .chip.flame .ic .d { opacity: .55; fill: #ff8a4c; }
.chip.btn { width: 40px; padding: 0; justify-content: center; transition: background .2s; }
.chip.btn:hover { background: var(--glass-2); }
.star-chip.bump .ic { animation: bump .7s var(--spring); }
@keyframes bump { 40% { transform: scale(1.9) rotate(25deg); } }

.pill-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-weight: 650; text-decoration: none; transition: background .2s, transform .2s var(--ease); white-space: nowrap; }
.pill-btn:hover { background: var(--glass-2); }
.pill-btn:active { transform: scale(.96); }
.pill-btn.wide { width: 100%; justify-content: center; }
.big-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 999px; background: var(--grad); background-size: 160% 160%; color: #fff; font-weight: 800; box-shadow: 0 14px 30px -12px #ff5fa2cc, inset 0 1px 0 rgba(255,255,255,.35); transition: transform .25s var(--spring), box-shadow .25s, background-position .6s; overflow: hidden; }
.big-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.big-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px #ff5fa2; background-position: 100% 0; }
.big-btn:hover::after { transform: translateX(120%); }
.big-btn:active { transform: scale(.97); }
.big-btn.wide { width: 100%; }
.big-btn .ic { width: 18px; height: 18px; }
.big-btn.loading { pointer-events: none; opacity: .75; }
.big-btn.loading::before { content: ""; width: 16px; height: 16px; border: 2.5px solid #fff; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--line); flex: none; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-weight: 600; padding: 6px; }
.link-btn:hover { color: #fff; }
.link-btn.danger { color: #ff8a9e; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.row.center { justify-content: center; }

/* ---------- teacher portrait ---------- */
.tch { --amp: 0; position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.tch-aura { position: absolute; inset: 4%; border-radius: 50%; background: conic-gradient(from 0deg, #ff7a59, #ff5fa2, #8b7bff, #2dd4bf, #ff7a59); filter: blur(28px); opacity: calc(.35 + var(--amp) * .55); transform: scale(calc(.92 + var(--amp) * .14)); transition: opacity .25s; animation: spin 12s linear infinite; }
.tch-ring { position: absolute; inset: 1%; border-radius: 50%; border: 2px solid rgba(255,255,255,.22); opacity: 0; }
.tch.speaking .tch-ring { animation: ripple 1.8s var(--ease) infinite; }
.tch.speaking .tch-ring.r2 { animation-delay: .9s; }
.tch.listening .tch-ring { border-color: #34d39999; animation: ripple 2.4s var(--ease) infinite; }
.tch.listening .tch-ring.r2 { animation-delay: 1.2s; }
@keyframes ripple { 0% { opacity: .9; transform: scale(.86); } 100% { opacity: 0; transform: scale(1.12); } }
.tch-photo { position: relative; width: 86%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 3px solid rgba(255,255,255,.85); background: #e9e2f7;
  box-shadow: 0 24px 50px -18px rgba(0,0,0,.8), 0 0 0 8px rgba(255,255,255,.06); transform: scale(calc(1 + var(--amp) * .025)); transition: transform .1s linear, border-color .3s; animation: breathe 6s ease-in-out infinite; }
.tch-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transform-origin: 50% 70%; animation: headsway 9s ease-in-out infinite; }
.tch-shine { position: absolute; inset: 0; background: radial-gradient(80% 60% at 30% 15%, rgba(255,255,255,.22), transparent 60%); pointer-events: none; }
@keyframes breathe { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
@keyframes headsway { 0%, 100% { transform: scale(1.04) rotate(-.6deg); } 50% { transform: scale(1.06) rotate(.7deg); } }
.tch.speaking .tch-photo { border-color: #ffd1e4; }
.tch.speaking .tch-photo img { animation: talk .38s ease-in-out infinite alternate; }
@keyframes talk { from { transform: scale(1.05) translateY(0) rotate(-.3deg); } to { transform: scale(1.06) translateY(-1.5px) rotate(.5deg); } }
.tch.listening .tch-photo { border-color: #a7f3d0; }
.tch.listening .tch-photo img { animation: none; transform: scale(1.05) rotate(-1.4deg); transition: transform .6s var(--ease); }
.tch.thinking .tch-photo img { animation: none; transform: scale(1.05) rotate(1.4deg) translateY(-2px); transition: transform .6s var(--ease); }
.tch-wave { position: absolute; bottom: 4%; left: 50%; translate: -50% 0; display: flex; gap: 4px; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(10, 8, 30, .72); border: 1px solid var(--line-2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .25s; }
.tch.speaking .tch-wave, .tch.listening .tch-wave { opacity: 1; }
.tch-wave i { width: 3.5px; height: calc(5px + var(--amp) * 18px); border-radius: 3px; background: linear-gradient(#ffd1e4, #ff5fa2); animation: wv .5s ease-in-out infinite alternate; }
.tch.listening .tch-wave i { background: linear-gradient(#d1fae5, #34d399); }
.tch-wave i:nth-child(2n) { animation-delay: -.2s; } .tch-wave i:nth-child(3n) { animation-delay: -.35s; } .tch-wave i:nth-child(4n+1) { animation-delay: -.1s; }
@keyframes wv { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.tch-badge { position: absolute; top: 6%; right: 2%; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(10, 8, 30, .75); border: 1px solid var(--line-2); font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.tch-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); }
.tch.speaking .tch-badge .dot { background: var(--pink); box-shadow: 0 0 10px var(--pink); }
.tch.listening .tch-badge .dot { background: var(--green); box-shadow: 0 0 10px var(--green); }
.tch.thinking .tch-badge .dot { background: var(--amber); animation: blinkdot .6s infinite alternate; }
@keyframes blinkdot { to { opacity: .2; } }

/* ---------- images: subjects & avatars ---------- */
.sub-img { display: inline-grid; place-items: center; flex: none; overflow: hidden; border-radius: 30%; background: linear-gradient(145deg, var(--c1), var(--c2)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.sub-img img { width: 100%; height: 100%; object-fit: cover; }
.sub-img.xxs { width: 20px; height: 20px; border-radius: 7px; vertical-align: -5px; }
.sub-img.xs { width: 26px; height: 26px; border-radius: 8px; vertical-align: -7px; }
.sub-img.sm { width: 48px; height: 48px; border-radius: 15px; }
.sub-img.md { width: 60px; height: 60px; border-radius: 18px; }
.sub-img.lg { width: 96px; height: 96px; border-radius: 28px; }
.ava { display: inline-grid; place-items: center; flex: none; overflow: hidden; border-radius: 32%; background: linear-gradient(145deg, var(--c), color-mix(in srgb, var(--c) 45%, #120d33)); box-shadow: 0 10px 24px -10px var(--c), inset 0 1px 0 rgba(255,255,255,.35); }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.ava.xs { width: 26px; height: 26px; border-radius: 50%; }
.ava.sm { width: 38px; height: 38px; border-radius: 12px; }
.ava.md { width: 56px; height: 56px; }
.ava.lg { width: 72px; height: 72px; border-radius: 22px; }
.ava.xl { width: 104px; height: 104px; border-radius: 30px; }

/* ---------- forms ---------- */
.field { position: relative; display: flex; align-items: center; margin: 10px 0; }
.field > .ic { position: absolute; left: 15px; width: 18px; height: 18px; color: var(--ink-soft); pointer-events: none; transition: color .2s; z-index: 1; }
.field input { width: 100%; height: 52px; padding: 0 16px 0 46px; border-radius: 16px; font: inherit; font-weight: 500; color: #fff; background: rgba(255,255,255,.06); border: 1.5px solid var(--line-2); transition: border-color .2s, background .2s, box-shadow .2s; }
.field input::placeholder { color: #8f88bf; }
.field input:focus { outline: none; border-color: var(--violet); background: rgba(255,255,255,.09); box-shadow: 0 0 0 4px rgba(139,123,255,.18); }
.field:focus-within > .ic { color: #fff; }
.card .field input { color: #241d44; background: #f6f3ff; border-color: #e5dff8; margin: 0; }
.card .field input:focus { background: #fff; }
.card .field > .ic { color: #8a80b8; }
.form-err { color: #ff8a9e; min-height: 1.3em; margin: 6px 0; font-weight: 600; font-size: .9rem; }
.card .form-err { color: #e11d48; }
.fine { color: var(--ink-soft); font-size: .84rem; text-align: center; margin: 14px 0 0; }
.hint { color: var(--ink-soft); font-size: .88rem; display: flex; gap: 6px; align-items: flex-start; }
.card .hint { color: #6f6890; }
.lbl { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; margin: 14px 0 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.card label:not(.field):not(.check), .settings-form label { display: block; font-weight: 650; font-size: .88rem; margin: 10px 0; }
.card input:not([type=checkbox]), .card select, .card textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 14px; font: inherit; font-weight: 500; color: #241d44; background: #f6f3ff; border: 1.5px solid #e5dff8; transition: border-color .2s, box-shadow .2s, background .2s; }
.card input:focus, .card select:focus, .card textarea:focus { outline: none; border-color: var(--violet); background: #fff; box-shadow: 0 0 0 4px rgba(139,123,255,.15); }
.card .field input { padding-left: 46px; height: 52px; }
.settings-form input, .settings-form select { display: block; width: 100%; margin-top: 6px; height: 48px; padding: 0 14px; border-radius: 14px; font: inherit; font-weight: 500; color: #fff; background: rgba(255,255,255,.06); border: 1.5px solid var(--line-2); }
.settings-form input:focus, .settings-form select:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139,123,255,.18); }
.settings-form select option { color: #222; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .88rem; margin: 10px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--violet); }

/* ---------- badges & tags ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: .76rem; font-weight: 750; white-space: nowrap; }
.badge .ic { width: 13px; height: 13px; }
.badge.pass { background: rgba(52,211,153,.15); color: #4ee0a8; } .badge.warn { background: rgba(255,201,74,.15); color: #ffd26b; }
.badge.fail { background: rgba(255,95,162,.15); color: #ff8ab8; } .badge.muted { background: rgba(255,255,255,.08); color: var(--ink-soft); }
.card .badge.muted { background: #f1edfb; color: #6f6890; } .card .badge.pass { color: #059669; background: #d1fae5; } .card .badge.warn { color: #b45309; background: #fef3c7; } .card .badge.fail { color: #be185d; background: #fce7f3; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid var(--line); font-size: .8rem; font-weight: 650; }
.card .tag { background: #f1edfb; border-color: #e7e1f5; padding-left: 10px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chips-row.center { justify-content: center; }
.gold { color: var(--amber); } .ok { color: var(--green); } .bad { color: #ff8ab8; }
.gold .ic .d { fill: var(--amber); opacity: .9; }

/* ---------- auth ---------- */
.auth-screen { justify-content: center; align-items: center; }
.auth-card { display: grid; grid-template-columns: 1.1fr 1fr; width: min(1000px, 100%); min-height: 620px; border-radius: 32px; overflow: hidden; background: rgba(14, 11, 43, .72); border: 1px solid var(--line-2); box-shadow: var(--shadow); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.auth-art { position: relative; overflow: hidden; display: flex; background: #2b1f74; }
.auth-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: kenburns 24s ease-in-out infinite alternate; }
@keyframes kenburns { to { transform: scale(1.16) translate(-2%, -1%); } }
.auth-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,11,43,.15) 0%, rgba(14,11,43,.5) 45%, rgba(14,11,43,.95) 100%); }
.auth-art-inner { position: relative; z-index: 1; margin-top: auto; padding: 34px; display: flex; flex-direction: column; gap: 10px; }
.auth-teacher { width: 130px; margin-bottom: 4px; }
.brand-lg { display: flex; align-items: center; gap: 12px; font-size: 2.1rem; font-weight: 800; }
.brand-lg .logo { width: 44px; height: 44px; border-radius: 14px; }
.auth-tag { margin: 0; font-family: var(--ml); font-size: 1.15rem; color: var(--ink-2); }
.auth-points { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.auth-points li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-weight: 600; font-size: .92rem; animation: rise .7s var(--ease) both; }
.auth-points li:nth-child(2) { animation-delay: .08s; } .auth-points li:nth-child(3) { animation-delay: .16s; }
.auth-points .ic { color: var(--gold-1); width: 20px; height: 20px; }
.auth-form { padding: 38px 36px; display: flex; flex-direction: column; justify-content: center; }
.auth-form h2 { margin: 22px 0 4px; font-size: 1.7rem; font-family: var(--ui); }
.kid-login h2 { font-family: var(--ml); }
.auth-form > .muted { margin: 0 0 12px; }
.seg { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(0,0,0,.28); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.seg button { position: relative; z-index: 1; height: 38px; border-radius: 999px; font-weight: 700; font-size: .92rem; color: var(--ink-soft); transition: color .25s; }
.seg button.on { color: #1d1640; }
.seg-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); border-radius: 999px; background: #fff; box-shadow: 0 6px 16px -6px rgba(0,0,0,.5); transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .45s var(--spring); }

/* PIN */
.pin-dots { display: flex; gap: 14px; margin: 16px 0; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); transition: all .25s var(--spring); }
.pin-dots i.on { background: var(--amber); border-color: var(--amber); transform: scale(1.2); box-shadow: 0 0 14px #ffc94a88; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px; }
.pin-pad button { height: 64px; border-radius: 20px; font-size: 1.5rem; font-weight: 750; background: #f3f0fd; color: #241d44; display: grid; place-items: center; transition: transform .15s, background .15s; }
.pin-pad button:active { transform: scale(.9); }
.pin-pad button .ic { width: 24px; height: 24px; }
.pin-pad.dark button { background: rgba(255,255,255,.07); color: #fff; border: 1px solid var(--line); }
.pin-pad.dark button:hover { background: rgba(255,255,255,.12); }
.pin { text-align: center; display: flex; flex-direction: column; align-items: center; }
.pin h2 { margin: 12px 0 2px; font-family: var(--ml); }
.pin .pin-dots i { border-color: #cfc6ee; }
.pin .pin-dots i.on { background: var(--violet); border-color: var(--violet); box-shadow: 0 0 14px #8b7bff88; }

/* ---------- profiles ---------- */
.profiles-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding-bottom: 6vh; }
.prof-teacher { width: 150px; margin-bottom: 6px; }
.profiles-wrap h1 { margin: 6px 0 0; font-family: var(--ml); font-size: clamp(1.8rem, 5vw, 2.8rem); }
.profiles-wrap > .muted { margin: 0; }
.profiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 22px; }
.profile { --rx: 0deg; --ry: 0deg; position: relative; width: 168px; padding: 22px 12px 16px; border-radius: 28px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03)); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm);
  transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .35s var(--ease), box-shadow .35s; animation: rise .7s var(--ease) both; animation-delay: calc(var(--i) * 90ms + .15s); }
.profile:hover { box-shadow: 0 30px 50px -20px var(--c); }
.profile .ava { transition: transform .35s var(--spring); }
.profile:hover .ava { transform: translateY(-4px) scale(1.05); }
.p-name { font-weight: 800; font-size: 1.2rem; }
.p-meta { display: flex; gap: 10px; color: var(--ink-soft); font-size: .85rem; font-weight: 700; }
.mini { display: inline-flex; align-items: center; gap: 4px; }
.mini .ic { width: 15px; height: 15px; color: var(--amber); } .mini.flame .ic { color: #ff8a4c; }

/* ---------- kid home ---------- */
.kid-id { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.kid-hero { position: relative; display: flex; align-items: center; gap: 26px; padding: 22px 28px; overflow: hidden; }
.kid-hero::before { content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(255,95,162,.35), transparent 70%); }
.kh-teacher { width: 168px; flex: none; }
.kh-text { flex: 1; min-width: 0; position: relative; }
.eyebrow { display: inline-block; font-family: var(--ml); font-weight: 700; color: var(--gold-1); background: rgba(255,201,74,.12); border: 1px solid rgba(255,201,74,.3); padding: 4px 12px; border-radius: 999px; font-size: .95rem; }
.kh-text h1 { margin: 10px 0 16px; font-family: var(--ml); font-size: clamp(1.7rem, 4.4vw, 2.7rem); background: linear-gradient(90deg, #fff, #ffe3c2 55%, #ffb3d6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.level-card { max-width: 420px; padding: 12px 14px; border-radius: 16px; background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.level-top { display: flex; justify-content: space-between; font-weight: 700; font-size: .88rem; color: var(--ink-soft); }
.level-top .lvl { display: inline-flex; gap: 6px; align-items: center; color: var(--gold-1); font-family: var(--ml); }
.level-bar { height: 10px; margin-top: 8px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.level-bar i { position: relative; display: block; height: 100%; width: var(--w, 0); border-radius: 99px; overflow: hidden; background: linear-gradient(90deg, var(--gold-1), var(--gold-2), var(--pink)); box-shadow: 0 0 16px #ffb54d99; animation: growW 1.2s var(--ease) .3s both; }
.level-bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); animation: shimmerBar 2.4s 1.5s infinite; }
@keyframes growW { from { width: 0; } }
@keyframes shimmerBar { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.kid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.kcard { --rx: 0deg; --ry: 0deg; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 22px; text-align: left; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .3s var(--ease), background .3s; }
.kcard:hover { background: var(--glass-2); }
.kcard.revise { background: linear-gradient(135deg, rgba(52,211,153,.22), rgba(139,123,255,.22)); border-color: rgba(52,211,153,.4); }
.kc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-family: var(--ml); }
.kc-body b { font-size: 1.12rem; } .kc-body span { color: var(--ink-soft); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-go { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); flex: none; transition: transform .3s var(--spring); }
.kcard:hover .kc-go { transform: translateX(4px); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.section-head h3 { margin: 0; font-family: var(--ml); font-size: 1.35rem; }
.subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.subject { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 12px 12px 16px; border-radius: 26px; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: 0 20px 40px -22px var(--c2), inset 0 1px 0 rgba(255,255,255,.4);
  transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .35s var(--ease), box-shadow .35s; animation: rise .7s var(--ease) both; animation-delay: calc(var(--i) * 60ms + .15s); }
.subject::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(240px circle at var(--mx) var(--my), rgba(255,255,255,.35), transparent 60%); opacity: 0; transition: opacity .3s; }
.subject:hover::before { opacity: 1; }
.subject:hover { box-shadow: 0 30px 50px -22px var(--c2); }
.subject:active { transform: scale(.97); }
.s-art { width: 100%; aspect-ratio: 1.25; border-radius: 18px; overflow: hidden; background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.s-art img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform .6s var(--ease); }
.subject:hover .s-art img { transform: scale(1.1); }
.s-name { margin-top: 12px; padding: 0 4px; font-family: var(--ml); font-size: clamp(1.1rem, 2.2vw, 1.4rem); font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,.25); overflow-wrap: anywhere; }
.s-en { padding: 0 4px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.s-go { position: absolute; right: 14px; bottom: 16px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.25); transition: transform .3s var(--spring), background .3s; }
.subject:hover .s-go { transform: translateX(3px) scale(1.08); background: rgba(255,255,255,.4); }

/* ---------- results ---------- */
.results { justify-content: center; align-items: center; }
.res-card { position: relative; width: min(540px, 100%); padding: 82px 26px 28px; text-align: center; border-radius: 32px; background: linear-gradient(160deg, rgba(255,255,255,.12), rgba(255,255,255,.04)); border: 1px solid var(--line-2); box-shadow: var(--shadow); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); margin-top: 60px; }
.res-medal { position: absolute; left: 50%; top: -62px; translate: -50% 0; width: 124px; height: 124px; border-radius: 50%; display: grid; place-items: center; isolation: isolate; background: linear-gradient(145deg, var(--violet), var(--pink)); box-shadow: 0 20px 40px -12px var(--pink), inset 0 2px 0 rgba(255,255,255,.4); animation: popIn .7s var(--spring); }
.res-medal.pass { background: linear-gradient(145deg, var(--gold-1), var(--gold-2)); box-shadow: 0 20px 44px -10px #f5a524, inset 0 2px 0 rgba(255,255,255,.6); }
.res-medal .ic { width: 58px; height: 58px; color: #fff; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.res-medal .ic .d { opacity: .35; fill: #fff; }
.rm-glow { position: absolute; inset: -20px; border-radius: 50%; background: conic-gradient(from 0deg, transparent, rgba(255,255,255,.45), transparent 30%); animation: spin 3s linear infinite; z-index: -1; }
.res-card h1 { margin: 6px 0; font-family: var(--ml); font-size: clamp(1.5rem, 5vw, 2.1rem); }
.res-sub { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-family: var(--ml); margin: 0; }
.res-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
.res-stats > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px; border-radius: 18px; background: rgba(0,0,0,.2); border: 1px solid var(--line); }
.rs-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); margin-bottom: 4px; }
.rs-ico.gold { color: var(--amber); } .rs-ico.ok { color: var(--green); }
.res-stats b { font-size: 1.7rem; font-variant-numeric: tabular-nums; } .res-stats > div > span:last-child { color: var(--ink-soft); font-size: .82rem; }
.res-next { display: flex; gap: 12px; text-align: left; padding: 14px 16px; border-radius: 18px; background: rgba(255,201,74,.1); border: 1px solid rgba(255,201,74,.3); margin-bottom: 8px; }
.res-next .ic { width: 22px; height: 22px; color: var(--gold-1); margin-top: 2px; }
.res-next b { font-family: var(--ml); } .res-next p { margin: 4px 0 0; color: var(--ink-2); }

/* ---------- lesson ---------- */
.lesson-title { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--ml); font-weight: 800; font-size: 1.2rem; min-width: 0; }
.timer-chip { font-variant-numeric: tabular-nums; } .speed { color: var(--green); font-size: .8rem; }
.score-chip { gap: 12px; } .score-chip span { display: inline-flex; align-items: center; gap: 4px; }
.lesson-grid { flex: 1; display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 16px; min-height: 0; }
.teacher-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 22px 18px; }
.teacher-wrap { width: min(270px, 100%); }
.teacher-info { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(0,0,0,.28); border: 1px solid var(--line); font-family: var(--ml); font-weight: 700; }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-soft); }
.teacher-panel[data-state="speaking"] .status .dot { background: var(--pink); box-shadow: 0 0 10px var(--pink); }
.teacher-panel[data-state="listening"] .status .dot { background: var(--green); box-shadow: 0 0 10px var(--green); }
.teacher-panel[data-state="thinking"] .status .dot { background: var(--amber); animation: blinkdot .6s infinite alternate; }
.caption { width: 100%; min-height: 3.2em; max-height: 7.8em; overflow: hidden; font-family: var(--ml); font-size: 1.12rem; line-height: 1.55; color: #fff; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.caption:empty { opacity: 0; }
.kid-caption { min-height: 1.4em; font-family: var(--ml); color: #b7f5d9; font-size: .95rem; }
.kid-caption:empty { display: none; }
.parent-live { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: rgba(255,95,162,.14); border: 1px solid rgba(255,95,162,.4); color: #ffc2dc; }
.board-panel { min-height: 0; display: flex; }
.board { position: relative; flex: 1; display: flex; flex-direction: column; border-radius: 26px; overflow: hidden;
  background: radial-gradient(120% 90% at 30% 15%, var(--board-2), var(--board) 70%); border: 10px solid #5b3d25;
  box-shadow: inset 0 0 80px rgba(0,0,0,.55), inset 0 0 0 2px rgba(0,0,0,.25), 0 30px 60px -24px #000, 0 0 0 2px #7a5434; }
.board::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .1; background-image: radial-gradient(#fff .6px, transparent .6px); background-size: 7px 7px; }
.board-head { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px dashed rgba(255,255,255,.14); }
.board-label { flex: 1; display: inline-flex; align-items: center; gap: 8px; font-family: var(--hand); color: rgba(255,255,255,.75); font-size: 1.1rem; }
.board-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.1); font-weight: 700; font-size: .9rem; font-family: var(--ml); transition: background .2s, color .2s; }
.board-btn:hover, .board.drawing .board-btn { background: var(--amber); color: #3a2a00; }
.board-body { position: relative; flex: 1; min-height: 280px; }
.board-content { position: absolute; inset: 0; overflow: auto; padding: 22px 26px 30px; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; text-align: center; font-family: var(--hand); color: var(--chalk); }
.board-content.leaving > * { animation: wipe .35s ease-in forwards; }
@keyframes wipe { to { opacity: 0; filter: blur(6px); transform: translateY(-8px); } }
.board-empty { display: flex; align-items: center; gap: 8px; font-size: 1.35rem; opacity: .45; animation: floaty 4s ease-in-out infinite; }
.b-item { position: relative; max-width: 100%; text-shadow: 0 0 1px rgba(255,255,255,.6), 0 0 14px rgba(255,255,255,.12); animation: chalk 1s steps(20, end) both; animation-delay: var(--d, 0s); }
@keyframes chalk { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.b-heading { font-size: clamp(1.6rem, 4vw, 2.5rem); color: var(--amber); }
.b-heading::after { content: ""; display: block; height: 3px; margin: 6px auto 0; width: 0; background: var(--amber); border-radius: 3px; opacity: .8; animation: underline .6s ease-out forwards; animation-delay: calc(var(--d, 0s) + .8s); }
@keyframes underline { to { width: 70%; } }
.b-text { font-size: clamp(1.25rem, 3vw, 1.75rem); line-height: 1.5; }
.b-math { font-size: clamp(2rem, 7vw, 3.8rem); word-spacing: .12em; color: #fff; }
.b-emoji { font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: .1em; font-family: var(--ui); animation: popRow .6s var(--spring) both; animation-delay: var(--d, 0s); }
@keyframes popRow { from { opacity: 0; transform: scale(.4); } }
.b-word { font-size: clamp(2.6rem, 9vw, 5rem); padding: 6px 30px; border: 3px dashed rgba(253,224,71,.55); border-radius: 24px; color: #fde047; cursor: pointer; animation: popRow .7s var(--spring) both, glow 2.4s ease-in-out infinite; animation-delay: var(--d, 0s), calc(var(--d, 0s) + 1s); }
@keyframes glow { 50% { box-shadow: 0 0 30px 2px rgba(253,224,71,.35); } }
.b-question { font-size: clamp(1.3rem, 3.2vw, 1.85rem); }
.b-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 100%; margin-top: 4px; }
.choice { min-width: 112px; padding: 12px 22px; border-radius: 18px; font-family: var(--hand); font-size: clamp(1.3rem, 3.5vw, 1.85rem); color: #fff; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.3);
  animation: popRow .5s var(--spring) both; animation-delay: calc(var(--d, 0s) + var(--j) * 90ms); transition: transform .2s var(--spring), background .2s; }
.choice:hover { transform: translateY(-3px) scale(1.04); background: rgba(255,255,255,.15); }
.choice.picked { background: var(--amber); color: #3a2a00; border-color: var(--amber); transform: scale(1.08); }
.b-list { text-align: left; font-size: clamp(1.2rem, 3vw, 1.6rem); line-height: 1.6; margin: 0; padding-left: 1.2em; }
.draw-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; touch-action: none; }
.board.drawing .draw-canvas { pointer-events: auto; cursor: crosshair; }
.board.drawing .board-content { opacity: .22; transition: opacity .3s; }
.draw-tools { position: relative; z-index: 4; display: none; align-items: center; gap: 8px; padding: 10px 12px 14px; border-top: 1px dashed rgba(255,255,255,.14); flex-wrap: wrap; justify-content: center; }
.board.drawing .draw-tools { display: flex; animation: rise .4s var(--ease); }
.pen { width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 3px solid rgba(0,0,0,.3); transition: transform .2s var(--spring); }
.pen.active { transform: scale(1.22); border-color: #fff; }
.tool-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.1); }
.tool-btn.active { background: var(--amber); color: #3a2a00; }
.send-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px; font-weight: 800; font-family: var(--ml); background: var(--grad); box-shadow: 0 10px 22px -8px var(--pink); }
.controls { align-self: center; display: flex; gap: 6px; padding: 8px; border-radius: 28px; background: rgba(14,11,43,.7); border: 1px solid var(--line-2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow-sm); }
.ctrl { position: relative; width: 80px; height: 70px; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; transition: background .2s, transform .25s var(--spring); }
.ctrl:hover { background: rgba(255,255,255,.08); transform: translateY(-2px); }
.ctrl:active { transform: scale(.92); }
.ctrl-ico { position: relative; z-index: 1; display: grid; } .ctrl-ico .ic { width: 26px; height: 26px; }
.ctrl-lbl { position: relative; z-index: 1; font-family: var(--ml); font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.ctrl.mic { width: 92px; background: linear-gradient(135deg, #10b981, #0ea5e9); box-shadow: 0 12px 26px -10px #10b981; }
.ctrl.mic .ctrl-lbl { color: #fff; }
.ctrl.mic.off { background: linear-gradient(135deg, #64748b, #475569); box-shadow: none; }
.mic-ring { position: absolute; inset: -4px; border-radius: 26px; border: 3px solid #34d399; opacity: calc(var(--lvl, 0) * 1.3); transform: scale(calc(1 + var(--lvl, 0) * .12)); transition: transform .08s, opacity .08s; }
.ctrl.active { background: var(--amber); color: #3a2a00; } .ctrl.active .ctrl-lbl { color: #3a2a00; }
.break-art { width: 170px; height: 170px; border-radius: 34px; margin: 0 auto 6px; object-fit: cover; animation: floaty 2.4s ease-in-out infinite; box-shadow: 0 16px 30px -14px rgba(0,0,0,.4); }
.break-ring { position: relative; width: 120px; height: 120px; margin: 8px auto 16px; }
.break-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.br-bg { fill: none; stroke: #eee8fb; stroke-width: 10; }
.br-fg { fill: none; stroke: var(--violet); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 327; transition: stroke-dashoffset 1s linear; }
.break-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.3rem; color: var(--violet-2); }
.saving-spin { width: 52px; height: 52px; margin: 6px auto 14px; border-radius: 50%; border: 5px solid #ece7fb; border-top-color: var(--violet); animation: spin .8s linear infinite; }
.lesson-screen .overlay { z-index: 35; }
.card h2, .card h3 { font-family: var(--ml); }

/* ---------- overlays, modal, toast, effects ---------- */
.overlay { position: fixed; inset: 0; z-index: 30; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(7,6,26,.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.overlay.show { display: flex; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.card { width: 100%; max-width: 480px; max-height: 92dvh; overflow: auto; padding: 26px; border-radius: 28px; background: #fff; color: #241d44; box-shadow: 0 40px 80px -30px rgba(0,0,0,.8); }
.card.wide { max-width: 880px; }
.card.center { text-align: center; }
.card h2 { margin: 0 0 6px; } .card .muted { color: #6f6890; }
.card .pill-btn, .pill-btn.light { background: #f3f0fd; border-color: #e7e1f5; color: #241d44; }
.card .link-btn { color: #6f6890; } .card .link-btn.danger { color: #e11d48; }
.icon-btn.light { background: #f3f0fd; border: 0; color: #241d44; }
.modal-ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 12px; box-shadow: 0 12px 24px -10px var(--pink); }
.modal-ico .ic { width: 28px; height: 28px; } .modal-ico .ic .d { fill: #fff; opacity: .3; }
.toast { position: fixed; left: 50%; bottom: 112px; z-index: 50; max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 16px; background: rgba(17, 14, 45, .92); border: 1px solid var(--line-2); color: #fff; font-weight: 700; text-align: center; font-family: var(--ml); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow-sm);
  opacity: 0; transform: translate(-50%, 24px) scale(.96); transition: all .4s var(--spring); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }
.star-pop { position: fixed; left: 50%; top: 44%; z-index: 41; width: 170px; height: 170px; pointer-events: none; transform: translate(-50%, -50%) scale(0); filter: drop-shadow(0 0 40px rgba(255, 201, 74, .8)); }
.star-pop svg { width: 100%; height: 100%; }
.star-pop.show { animation: starpop 1.4s var(--ease); }
@keyframes starpop {
  0% { transform: translate(-50%, -50%) scale(0) rotate(-40deg); opacity: 1; }
  35% { transform: translate(-50%, -50%) scale(1.2) rotate(12deg); opacity: 1; }
  60% { transform: translate(-50%, -50%) scale(1) rotate(0); opacity: 1; }
  100% { transform: translate(-50%, -280%) scale(.25); opacity: 0; }
}
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; align-content: center; gap: 18px; background: radial-gradient(120% 80% at 20% 0%, #2b1f74, var(--bg-0) 65%); transition: opacity .5s, visibility .5s; }
.splash.hide { opacity: 0; visibility: hidden; }
.splash-teacher { width: 150px; }
.splash-dots { display: flex; gap: 7px; } .splash-dots i { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: dots 1s infinite alternate; }
.splash-dots i:nth-child(2) { animation-delay: .2s; } .splash-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dots { from { opacity: .2; transform: translateY(0); } to { opacity: 1; transform: translateY(-6px); } }

/* =================== parent =================== */
.parent { flex-direction: row; max-width: none; padding: 0; gap: 0; }
.p-side { width: 260px; flex: none; margin: 16px; padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 16px; height: calc(100dvh - 32px); }
.p-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; font-size: 1.05rem; }
.p-brand small { margin-left: auto; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: rgba(139,123,255,.25); color: #cfc8ff; }
.p-nav { display: flex; flex-direction: column; gap: 4px; }
.p-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; color: var(--ink-soft); text-decoration: none; font-weight: 650; transition: background .2s, color .2s; }
.p-nav a .ic { width: 20px; height: 20px; }
.p-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.p-nav a.on { color: #fff; background: linear-gradient(135deg, rgba(139,123,255,.35), rgba(255,95,162,.2)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.p-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.p-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: rgba(255,255,255,.05); }
.p-user div { min-width: 0; display: flex; flex-direction: column; } .p-user small { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; }
.p-ava { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--grad); font-weight: 800; text-transform: uppercase; }
.p-content { flex: 1; min-width: 0; padding: 16px 18px 96px 0; display: flex; flex-direction: column; gap: 16px; }
.p-top { display: flex; align-items: center; gap: 10px; }
.kid-switch { flex: 1; display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.ks { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 6px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-weight: 700; white-space: nowrap; transition: all .25s; }
.ks.on { background: #fff; color: #1d1640; box-shadow: 0 10px 20px -10px #000; }
.ks.add { padding: 0; width: 42px; justify-content: center; }
.p-main { display: flex; flex-direction: column; gap: 16px; }
.p-head { display: flex; align-items: center; gap: 16px; }
.p-head > div { flex: 1; } .p-head h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.1rem); } .p-head p { margin: 4px 0 0; }
.p-tabbar { display: none; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; }
.stat { position: relative; overflow: hidden; padding: 16px 18px; animation: rise .7s var(--ease) both; animation-delay: var(--d); }
.stat::after { content: ""; position: absolute; width: 120px; height: 120px; right: -40px; top: -50px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%); }
.stat-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 10px; }
.stat-ico .ic { width: 22px; height: 22px; } .stat-ico .ic .d { opacity: .35; }
.stat-ico.gold { background: rgba(255,201,74,.16); color: var(--amber); } .stat-ico.violet { background: rgba(139,123,255,.18); color: #b4abff; }
.stat-ico.blue { background: rgba(90,176,255,.16); color: var(--blue); } .stat-ico.green { background: rgba(52,211,153,.16); color: var(--green); }
.stat-ico.coral { background: rgba(255,122,89,.16); color: #ff9b7e; } .stat-ico.teal { background: rgba(45,212,191,.16); color: var(--teal); }
.stat-lbl { color: var(--ink-soft); font-size: .82rem; font-weight: 650; }
.stat-val { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; margin: 2px 0; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--ink-soft); font-size: .78rem; }
.p-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.p-grid.three { grid-template-columns: repeat(3, 1fr); }
.panel { min-width: 0; padding: 18px 20px; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.panel-h h3 { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 1rem; }
.panel-h h3 .ic { color: #b4abff; }
.panel-h .muted { font-size: .8rem; }
.live-banner { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 22px; text-decoration: none; color: #fff; background: linear-gradient(135deg, rgba(225,29,72,.85), rgba(124,58,237,.85)); border: 1px solid rgba(255,255,255,.2); box-shadow: 0 20px 40px -16px #e11d48; }
.live-banner > div { flex: 1; display: flex; flex-direction: column; } .live-banner small { opacity: .85; display: inline-flex; align-items: center; gap: 6px; }
.live-cta { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; white-space: nowrap; }
.live-dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: #ff4d6d; animation: livePulse 1.4s infinite; }
.live-banner .live-dot { background: #fff; }
.live-dot.off { background: #777; animation: none; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(255,77,109,.7); } 100% { box-shadow: 0 0 0 12px rgba(255,77,109,0); } }
.bars { position: relative; height: 200px; display: flex; align-items: flex-end; gap: 8px; padding: 20px 2px 0; }
.bars.small { height: 160px; gap: 5px; }
.bar-col { position: relative; flex: 1; height: 100%; min-width: 0; padding-bottom: 26px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.bar { position: relative; width: 100%; max-width: 40px; height: var(--h); border-radius: 12px 12px 6px 6px; transform-origin: bottom; animation: growH 1s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
@keyframes growH { from { transform: scaleY(0); } }
.bar.pass { background: linear-gradient(180deg, #4ee0a8, #059669); } .bar.warn { background: linear-gradient(180deg, #ffd26b, #f59e0b); }
.bar.fail { background: linear-gradient(180deg, #ff8ab8, #e11d48); } .bar.mins { background: linear-gradient(180deg, #b4abff, #6c5cff); }
.bar em { position: absolute; top: -19px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: .72rem; font-weight: 750; color: var(--ink-soft); }
.bar-lbl { position: absolute; bottom: 0; font-size: .74rem; color: var(--ink-soft); }
.bars-pass { position: absolute; left: 0; right: 0; bottom: calc(26px + (100% - 46px) * .6); border-top: 1.5px dashed rgba(255,255,255,.25); pointer-events: none; }
.bars-pass span { position: absolute; right: 0; top: -17px; font-size: .7rem; color: var(--ink-soft); }
.topics { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.topics li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid transparent; transition: border-color .2s; }
.topics li:hover { border-color: var(--line); }
.t-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.t-m { font-weight: 800; font-size: .88rem; color: var(--c); }
.mastery { display: flex; flex-direction: column; gap: 14px; }
.m-row { display: grid; grid-template-columns: 150px 1fr 48px 74px; align-items: center; gap: 12px; }
.m-sub { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.m-row small { color: var(--ink-soft); }
.m-bar { height: 12px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.m-bar i { display: block; height: 100%; width: var(--w); border-radius: 99px; background: var(--c); animation: growW 1.1s var(--ease) both; }
.ltable { display: flex; flex-direction: column; gap: 8px; }
.lrow { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 12px 14px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid transparent; transition: background .2s, border-color .2s, transform .25s var(--ease); }
.lrow:hover { background: rgba(255,255,255,.07); border-color: var(--line); transform: translateX(3px); }
.l-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .l-main small { color: var(--ink-soft); }
.l-sum { color: var(--ink-soft); font-size: .86rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.l-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.l-nums { display: flex; gap: 10px; font-weight: 700; } .l-nums span { display: inline-flex; align-items: center; gap: 3px; } .l-nums .ic { width: 14px; height: 14px; }
.live-txt { color: #ff6f91; font-style: normal; font-weight: 800; }
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; }
.skel { height: 120px; border-radius: 20px; background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.1) 50%, rgba(255,255,255,.04) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skel.tall { height: 320px; background: linear-gradient(90deg, #f3f0fd 25%, #e9e3fb 50%, #f3f0fd 75%); background-size: 200% 100%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* lesson report */
.ld-head { display: flex; align-items: center; gap: 14px; } .ld-head > div { flex: 1; } .ld-head h2 { margin: 0; }
.ld-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.ld-box { padding: 14px 16px; margin: 8px 0; border-radius: 16px; background: #f6f3ff; } .ld-box b { display: inline-flex; gap: 6px; align-items: center; } .ld-box p { margin: 6px 0 0; line-height: 1.6; }
.ld-box.next { background: #fff7e3; }
.ld-tabs { display: flex; gap: 4px; margin: 16px 0 10px; border-bottom: 2px solid #f1edfb; }
.ld-tabs button { padding: 10px 14px; font-weight: 750; color: #6f6890; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.ld-tabs button.on { color: var(--violet-2); border-color: var(--violet-2); }
.atable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.atable th, .atable td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #f1edfb; vertical-align: top; }
.atable th { color: #6f6890; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; }
.okc, .badc { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.okc { background: #d1fae5; color: #059669; } .badc { background: #fce7f3; color: #be185d; }
.okc .ic, .badc .ic { width: 14px; height: 14px; }
.transcript { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 4px; }
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 88%; animation: rise .35s var(--ease); }
.msg p { margin: 0; padding: 10px 14px; border-radius: 18px; line-height: 1.55; font-family: var(--ml); }
.msg.t p { background: rgba(255,255,255,.08); border-bottom-left-radius: 6px; }
.msg.k { align-self: flex-end; } .msg.k p { background: linear-gradient(135deg, var(--violet), var(--violet-2)); color: #fff; border-bottom-right-radius: 6px; }
.card .msg.t p { background: #f1edfb; }
img.who { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; flex: none; }
span.who { display: inline-flex; flex: none; }
.who-xs { display: inline-block; width: 20px; height: 20px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; vertical-align: -5px; }
.lbl .ava.xs, .live-now .ava.xs { width: 20px; height: 20px; vertical-align: -5px; }
.evt { align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: .8rem; color: var(--ink-soft); background: rgba(255,255,255,.05); animation: fade .3s; }
.evt .ic { width: 14px; height: 14px; }
.card .evt { background: #f6f3ff; color: #6f6890; }
.evt.ok { color: var(--green); } .evt.bad { color: #ff8ab8; } .evt.note { color: var(--amber); }
.card .evt.ok { color: #059669; } .card .evt.bad { color: #be185d; } .card .evt.note { color: #b45309; }
.drawing { max-width: 230px; border-radius: 14px; border: 3px solid #5b3d25; }

/* live */
.live-wrap { display: flex; flex-direction: column; gap: 16px; }
.live-top { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.lt-title { flex: 1; display: flex; flex-direction: column; } .lt-title small { color: var(--ink-soft); }
.lt-stats { display: flex; gap: 14px; font-weight: 800; } .lt-stats span { display: inline-flex; align-items: center; gap: 4px; }
.live-grid { display: grid; grid-template-columns: 1fr 1.2fr; grid-template-areas: "media board" "talk talk"; gap: 16px; }
.live-media { grid-area: media; display: flex; flex-direction: column; gap: 12px; }
.live-board { grid-area: board; display: flex; flex-direction: column; }
.live-talk { grid-area: talk; } .live-talk .transcript { height: 360px; max-height: none; }
.media-box { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 290px; border-radius: 18px; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(139,123,255,.25), rgba(0,0,0,.4)); border: 1px solid var(--line); }
.media-box video { width: 100%; height: 100%; object-fit: cover; }
.media-idle { text-align: center; color: var(--ink-soft); padding: 16px; }
.pulse-ico { width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); animation: floaty 3s ease-in-out infinite; }
.pulse-ico .ic { width: 30px; height: 30px; color: #fff; }
.eq { display: flex; gap: 5px; height: 42px; align-items: flex-end; justify-content: center; }
.eq i { width: 7px; border-radius: 4px; background: linear-gradient(#a7f3d0, #10b981); animation: eq .9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: .15s; } .eq i:nth-child(3) { animation-delay: .3s; } .eq i:nth-child(4) { animation-delay: .45s; } .eq i:nth-child(5) { animation-delay: .6s; }
@keyframes eq { from { height: 8px; } to { height: 42px; } }
.media-ctrls { display: flex; flex-wrap: wrap; gap: 8px; }
.live-now { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.live-now > div { min-width: 0; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.04); }
.live-now .lbl { margin: 0; font-size: .74rem; color: var(--ink-soft); }
.live-now p { margin: 4px 0 0; font-family: var(--ml); font-size: .93rem; line-height: 1.45; max-height: 4.4em; overflow: hidden; }
.board.mini { min-height: 290px; border-width: 7px; } .board.mini .board-content { padding: 14px; gap: 10px; }
.board.mini .b-heading { font-size: 1.5rem; } .board.mini .b-math { font-size: 2.2rem; } .board.mini .b-word { font-size: 2.6rem; }
.note-form { display: flex; gap: 8px; margin-top: 12px; }
.note-form input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border-radius: 14px; font: inherit; color: #fff; background: rgba(255,255,255,.06); border: 1.5px solid var(--line-2); }
.note-form input:focus { outline: none; border-color: var(--violet); }

/* kids */
.kid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.kid-card { position: relative; overflow: hidden; padding: 24px 20px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; animation: rise .7s var(--ease) both; animation-delay: var(--d); }
.kid-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 90px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 40%, transparent), transparent); }
.kid-card > * { position: relative; }
.kid-card h3 { margin: 12px 0 2px; font-size: 1.3rem; }
.kid-card > .muted { margin: 0; }
.kc-login { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: .88rem; }
.kc-stats { display: flex; justify-content: center; gap: 16px; margin: 12px 0 4px; font-weight: 750; } .kc-stats span { display: inline-flex; align-items: center; gap: 4px; }
.ava-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; margin-bottom: 8px; }
.ava-pick button { aspect-ratio: 1; border-radius: 16px; overflow: hidden; border: 3px solid transparent; background: #f3f0fd; transition: transform .25s var(--spring), border-color .2s; }
.ava-pick button img { width: 100%; height: 100%; object-fit: cover; }
.ava-pick button.on { border-color: var(--violet); transform: scale(1.08); box-shadow: 0 8px 16px -8px var(--violet); }
.sub-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.sub-pick button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 999px; background: #f3f0fd; color: #241d44; font-weight: 650; font-size: .86rem; border: 2px solid transparent; transition: all .2s; }
.sub-pick button.on { background: #ede9fe; border-color: var(--violet); color: #4c1d95; }
.color-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.color-pick button { width: 32px; height: 32px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 0 0 2px transparent; transition: all .2s var(--spring); }
.color-pick button.on { box-shadow: 0 0 0 2px var(--c); transform: scale(1.15); }
.login-box { margin-top: 14px; padding: 14px 16px; border-radius: 18px; background: #f7f4ff; border: 1.5px dashed #d8cff5; }
.login-box .lbl { margin-top: 0; } .login-box .lbl small { font-weight: 500; color: #6f6890; }
.settings-form h3 { display: inline-flex; gap: 8px; align-items: center; margin: 0 0 8px; }
.danger-zone h3 { display: inline-flex; gap: 8px; align-items: center; margin: 0 0 6px; color: #ff9db5; }

/* =================== responsive =================== */
@media (max-width: 1100px) { .p-grid.three { grid-template-columns: 1fr 1fr; } .live-grid { grid-template-columns: 1fr; grid-template-areas: "media" "board" "talk"; } }
@media (max-width: 900px), (orientation: portrait) and (max-width: 1024px) {
  .lesson-grid { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .teacher-panel { flex-direction: row; padding: 14px; gap: 14px; }
  .teacher-wrap { width: 132px; flex: none; }
  .teacher-info { align-items: flex-start; text-align: left; }
  .caption { min-height: 2.8em; max-height: 4.8em; font-size: 1rem; }
  .board-body { min-height: 320px; }
  .tch-badge { display: none; }
}
@media (max-width: 900px) {
  .hide-lg { display: inline-flex !important; }
  .parent { flex-direction: column; }
  .p-side { display: none; }
  .p-content { padding: 14px 14px 100px; }
  .p-tabbar { position: fixed; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 20; display: flex; justify-content: space-around; padding: 6px; border-radius: 24px; background: rgba(17,14,45,.9); border: 1px solid var(--line-2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow-sm); }
  .p-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px; border-radius: 18px; color: var(--ink-soft); text-decoration: none; font-size: .72rem; font-weight: 700; }
  .p-tabbar a .ic { width: 22px; height: 22px; }
  .p-tabbar a.on { color: #fff; background: rgba(255,255,255,.1); }
  .p-grid, .p-grid.three { grid-template-columns: 1fr; }
  .auth-card { grid-template-columns: 1fr; min-height: 0; }
  .auth-art { min-height: 250px; }
  .auth-art-inner { padding: 22px; }
  .auth-points { display: none; }
  .auth-teacher { width: 92px; }
  .brand-lg { font-size: 1.6rem; }
  .auth-form { padding: 24px 22px 28px; }
  .auth-form h2 { margin-top: 18px; font-size: 1.45rem; }
  .pin-pad.dark { grid-template-columns: repeat(3, 1fr); }
  .kid-login .pin-dots { justify-content: center; }
}
@media (max-width: 600px) {
  .screen { padding-left: 14px; padding-right: 14px; }
  .hide-sm { display: none !important; }
  .kid-hero { flex-direction: column; text-align: center; padding: 20px 18px; gap: 10px; }
  .kh-teacher { width: 140px; }
  .level-card { margin: 0 auto; }
  .subjects { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .subject { padding: 8px 8px 14px; border-radius: 22px; }
  .s-art { border-radius: 16px; }
  .s-go { display: none; }
  .profile { width: 148px; } .profile .ava.xl { width: 88px; height: 88px; border-radius: 26px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-val { font-size: 1.6rem; }
  .m-row { grid-template-columns: 110px 1fr 44px; } .m-row small { display: none; }
  .lrow { flex-wrap: wrap; } .l-side { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; padding-left: 62px; }
  .live-banner { flex-wrap: wrap; } .live-cta { width: 100%; }
  .live-now { grid-template-columns: 1fr; }
  .controls { width: 100%; justify-content: space-between; gap: 2px; }
  .ctrl { flex: 1; width: auto; height: 64px; } .ctrl.mic { flex: 1.25; width: auto; }
  .board { border-width: 7px; } .board-btn span { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .send-btn { margin-left: 0; width: 100%; justify-content: center; }
  .res-stats b { font-size: 1.35rem; }
  .atable th:nth-child(2), .atable td:nth-child(2) { display: none; }
  .teacher-wrap { width: 112px; }
  .chip { height: 38px; padding: 0 11px; } .chip.btn { width: 38px; }
  .lesson-title span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.p-brand b { white-space: nowrap; font-size: .98rem; }

.ava-ini { font-weight: 800; font-size: 1.2em; color: #fff; }
.ava.xl .ava-ini { font-size: 2.6rem; } .ava.lg .ava-ini { font-size: 2rem; }

/* v14 — teacher setup */
.t-name { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.kh-by { display: inline-flex; align-items: center; gap: 6px; margin: -6px 0 14px; color: var(--ink-2); font-weight: 650; font-family: var(--ml); }
.kh-by .ic { color: var(--gold-1); }
.settings-form h3.mt { margin-top: 26px; }
.teacher-setup { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.ts-preview { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 16px; border-radius: 20px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.ts-tch { width: 170px; }
.ts-preview b { font-size: 1.1rem; margin-top: 4px; }
.tpick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; max-width: 460px; }
.tpick > button, .tp-upload { aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 3px solid transparent; background: rgba(255,255,255,.06); transition: transform .25s var(--spring), border-color .2s, box-shadow .2s; display: grid; place-items: center; cursor: pointer; }
.tpick > button img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.tpick > button:hover, .tp-upload:hover { transform: translateY(-3px); }
.tpick > button.on { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255,95,162,.2), 0 10px 20px -8px var(--pink); }
.tpick > button.empty, .tp-upload { border: 2px dashed var(--line-2); color: var(--ink-soft); font-size: .7rem; font-weight: 700; align-content: center; gap: 2px; }
.tpick > button.empty .ic, .tp-upload .ic { width: 22px; height: 22px; }
.settings-form .tp-upload { margin: 0; }
@media (max-width: 700px) { .teacher-setup { grid-template-columns: 1fr; } .ts-tch { width: 140px; } .tpick { grid-template-columns: repeat(5, 1fr); gap: 8px; } }

/* v15 — gender switch */
.gseg { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid var(--line); margin-bottom: 6px; }
.gseg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 999px; font-weight: 700; color: var(--ink-soft); font-family: var(--ml); transition: all .25s; }
.gseg button.on { background: var(--grad); color: #fff; box-shadow: 0 8px 18px -8px var(--pink); }
