* { box-sizing: border-box; }
:root {
  --ink: #191b31; --muted: #62657b; --line: #e7e6f1; --accent: #5542d7;
  --paper: #f8f8fc; --white: #fff; --mint: #bafa92; --radius: 18px;
  font-family: 'Segoe UI', system-ui, sans-serif; color: var(--ink); background: var(--paper);
}
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #7f68ff; outline-offset: 4px; }
a { color: var(--accent); }
h1,h2,h3,p { margin: 0; }
.icon { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.loading { padding: 32px; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; gap: 26px; background: var(--white); padding: 30px 20px 20px; border-right: 1px solid var(--line); position: sticky; height: 100vh; top: 0; }
.logo { display: flex; gap: 12px; align-items: center; padding: 0 9px; font-size: 25px; letter-spacing: -.045em; font-weight: 800; }
.logo small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.logo-icon { color: white; background: #6249e9; border-radius: 13px; width: 42px; height: 42px; display: grid; place-items: center; }
.logo-icon .icon { width: 24px; height: 24px; }
.nav { display: grid; gap: 7px; }
.nav-label { margin: 4px 10px; color: var(--muted); font-size: 12px; letter-spacing: .09em; font-weight: 750; text-transform: uppercase; }
.nav button { display: flex; align-items: center; gap: 11px; text-align: left; border: 0; color: #4f526b; border-radius: 11px; background: transparent; padding: 11px 12px; font-weight: 650; font-size: 14px; }
.nav button:hover, .nav button.active { color: #4c36bf; background: #efebff; }
.sidebar-bottom { margin-top: auto; }
.class-card { border: 1px solid #ebE6fa; background: #f8f5ff; border-radius: 14px; padding: 13px; display: flex; gap: 10px; align-items: center; }
.class-card .icon { color: #5d46cf; }
.class-card strong, .class-card small { display: block; }
.class-card strong { font-size: 14px; }
.class-card small { font-size: 12px; color: var(--muted); margin-top: 3px; }
.workspace { min-width: 0; }
.topbar { height: 72px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.top-inner { width: min(100% - 64px, 1200px); margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.breadcrumb { color: var(--muted); font-size: 15px; display: flex; gap: 9px; align-items: center; }
.breadcrumb .icon { width: 17px; height: 17px; color: #5945cd; }
.actions { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 800; background: #eae2ff; color: #5031ba; }
.content { max-width: 1264px; margin: auto; padding: 29px 32px 44px; }
.hero { position: relative; isolation: isolate; overflow: hidden; border-radius: 22px; background: #201849; color: white; min-height: 300px; display: flex; align-items: center; padding: 33px 37px; }
.hero-text { position: relative; z-index: 1; width: min(535px, 100%); }
.hero-label { display: flex; align-items: center; gap: 8px; color: #dcd1ff; font-size: 14px; font-weight: 650; margin-bottom: 12px; }
.hero-label .icon { color: var(--mint); width: 18px; height: 18px; }
.hero h1 { font-size: clamp(36px, 4vw, 56px); letter-spacing: -.06em; line-height: 1.06; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--mint); }
.hero p { margin-top: 14px; color: #ded9f3; max-width: 45ch; line-height: 1.55; font-size: 16px; }
.hero .btn { margin-top: 22px; }
.hero-art { position: absolute; right: 0; top: 0; width: 48%; height: 100%; pointer-events: none; background: radial-gradient(ellipse at 67% 56%, #643bc2 0%, #3a237c 42%, transparent 74%); }
.orbit { position: absolute; left: 55%; top: 49%; width: min(69%,275px); aspect-ratio: 1; transform: translate(-50%,-50%); border: 1px solid #a794ea66; border-radius: 50%; box-shadow: 0 0 0 22px #a794ea13, 0 0 0 44px #a794ea16, 0 0 0 70px #a794ea12; }
.orbit::before, .orbit::after { content: ''; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #d8b8ff; box-shadow: 0 0 15px #e1b8ff; }
.orbit::before { top: 18%; left: 9%; }
.orbit::after { bottom: 20%; right: 8%; background: var(--mint); }
.sound-disc { position: absolute; top: 49%; left: 55%; transform: translate(-50%,-50%) rotate(-12deg); width: min(49%, 195px); aspect-ratio: 1; border: 1px solid #b68efa; border-radius: 32%; display: grid; place-items: center; background: linear-gradient(145deg,#9259ee,#4b29a4 72%,#362477); box-shadow: 0 22px 44px #110739a0, inset 0 1px 2px #f1c2ff9f; }
.sound-disc .icon { width: 61%; height: 61%; color: #f5ebff; filter: drop-shadow(0 7px 12px #31196688); stroke-width: 1.4; }
.art-tile { position: absolute; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; background: #d7c0ff; color: #482593; box-shadow: 0 9px 22px #14083e80; }
.art-tile:first-of-type { left: 14%; top: 21%; transform: rotate(-12deg); }
.art-tile:last-of-type { right: 9%; bottom: 21%; transform: rotate(13deg); background: #bafa92; color: #27442e; }
.art-tile .icon { width: 25px; height: 25px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 41px; padding: 9px 14px; border: 1px solid transparent; border-radius: 11px; font-weight: 700; font-size: 14px; color: white; background: var(--accent); }
.btn:hover { filter: brightness(.94); }
.btn .icon { width: 17px; height: 17px; }
.btn.secondary { background: #fff; color: #41435d; border-color: #deddeb; }
.btn.mint { background: var(--mint); color: #192820; }
.btn.quiet { background: #efebff; color: #4c36b7; }
.btn.full { width: 100%; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin: 19px 0 29px; }
.stat { border-radius: 15px; border: 1px solid var(--line); background: white; display: flex; align-items: center; gap: 12px; padding: 13px 15px; min-height: 76px; }
.stat-icon, .card-icon { min-width: 42px; height: 42px; display: grid; place-items: center; background: var(--tint, #eee8ff); color: var(--tone, #5c40ce); border-radius: 12px; }
.stat:nth-child(2), .speaking { --tint: #e5f7ee; --tone: #176346; --stripe: #a5e4c5; }
.stat:nth-child(3), .writing { --tint: #fff0dd; --tone: #965218; --stripe: #f5cca0; }
.listening { --tint: #eee8ff; --tone: #5940c1; --stripe: #c7b4fa; }
.stat b { font-size: 23px; font-weight: 780; letter-spacing: -.04em; display: block; line-height: 1; }
.stat span:last-child { color: var(--muted); font-size: 13px; display: block; margin-top: 5px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.section-head h2 { font-size: 28px; letter-spacing: -.045em; }
.section-head p { margin-top: 4px; color: var(--muted); line-height: 1.45; }
.filters { display: flex; gap: 4px; align-items: center; padding: 4px; background: #eeedf5; border-radius: 10px; }
.filters button { border: 0; background: transparent; border-radius: 7px; color: #555873; padding: 6px 10px; font-size: 13px; font-weight: 660; white-space: nowrap; }
.filters button.active { background: white; color: #4f38c5; box-shadow: 0 1px 3px #25204515; }
.cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-top: 3px solid var(--stripe); padding: 15px; border-radius: 15px; background: var(--white); }
.card-head { display: flex; justify-content: space-between; gap: 7px; align-items: center; }
.pill { color: var(--tone, #5a48c1); background: var(--tint, #eee8ff); border-radius: 20px; padding: 4px 8px; font-size: 12px; font-weight: 720; white-space: nowrap; }
.card h3 { margin: 13px 0 5px; font-size: 19px; line-height: 1.22; letter-spacing: -.025em; overflow-wrap: anywhere; }
.card p { color: var(--muted); font-size: 14px; line-height: 1.45; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; padding-top: 9px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.card-foot small { color: var(--muted); font-size: 13px; }
.card-foot small .icon { width: 15px; height: 15px; margin-right: 2px; }
.card-foot .btn { min-height: 32px; padding: 5px 9px; }
.empty { border: 1px dashed #d7d2ea; border-radius: var(--radius); padding: 24px; color: var(--muted); background: #fff; }
.footer { margin-top: 24px; font-size: 13px; color: var(--muted); }
.teacher-head { margin: 0 0 18px; min-height: 232px; }
.results { display: grid; gap: 10px; }
.result-row { display: flex; align-items: center; gap: 13px; padding: 13px 15px; border: 1px solid var(--line); background: white; border-radius: 13px; }
.result-row .info { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.result-row .info small { color: var(--muted); display: block; margin-top: 4px; font-size: 13px; }
dialog { width: min(660px, calc(100% - 28px)); max-height: calc(100dvh - 40px); border: 1px solid var(--line); border-radius: 19px; padding: 23px; box-shadow: 0 20px 90px #21184663; color: var(--ink); }
dialog::backdrop { background: #21193c99; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 15px; }
.dialog-head h2 { font-size: 24px; line-height: 1.2; letter-spacing: -.035em; }
.icon-button { display: grid; place-items: center; width: 33px; height: 33px; background: #f3f1fa; border: 0; border-radius: 9px; color: #53516e; flex: none; }
.stack { display: grid; gap: 13px; }
.stack p { line-height: 1.5; }
.help { color: var(--muted); font-size: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
label { font-weight: 650; }
label > input:not([type=radio]), label > select, label > textarea { margin-top: 5px; }
input:not([type=radio]), select, textarea { display: block; width: 100%; border: 1px solid #d8d5e8; border-radius: 9px; background: white; color: var(--ink); padding: 9px 10px; }
textarea { resize: vertical; min-height: 92px; }
audio { display: block; width: 100%; }
fieldset { border: 1px solid var(--line); border-radius: 11px; margin: 0; padding: 11px 13px; min-width: 0; }
legend { font-weight: 700; }
.option { font-weight: 500; display: block; padding: 5px 0; overflow-wrap: anywhere; }
.option input { margin-right: 8px; accent-color: var(--accent); }
.feedback { background: #f5f1ff; border: 1px solid #e9e0fd; border-radius: 12px; padding: 12px; display: grid; gap: 7px; }
.feedback p, .response-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.form-error { color: #a51b3e; font-size: 14px; }
#toast { position: fixed; z-index: 5; right: 22px; bottom: 22px; max-width: calc(100% - 44px); border-radius: 11px; padding: 11px 15px; color: white; background: #211849; box-shadow: 0 4px 22px #21184944; }
[hidden] { display: none !important; }
@media (max-width: 1060px) { .shell { grid-template-columns: 193px minmax(0, 1fr); } .sidebar { padding-inline: 13px; } .content { padding-inline: 21px; } .top-inner { width: calc(100% - 42px); } }
@media (max-width: 820px) { .shell { display: block; } .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 15px; flex-direction: row; justify-content: space-between; align-items: center; gap: 6px; } .logo { padding: 0; font-size: 22px; gap: 7px; } .logo small,.nav-label,.sidebar-bottom { display: none; } .logo-icon { width: 34px; height: 34px; } .nav { display: flex; gap: 3px; } .nav button { padding: 8px; font-size: 13px; } .topbar { height: 56px; } }
@media (max-width: 590px) { .content { padding: 14px 12px 30px; } .top-inner { width: calc(100% - 24px); } .hero { padding: 23px 17px; min-height: 265px; } .hero h1 { font-size: 36px; } .hero p { max-width: 32ch; } .hero-art { opacity: .38; width: 53%; } .stat { padding: 8px 6px; min-height: 66px; gap: 5px; } .stat-icon { min-width: 26px; height: 29px; } .stat-icon .icon { width: 16px; height: 16px; } .stat span:last-child { font-size: 12px; } .stats { gap: 6px; margin: 12px 0 22px; } .stat b { font-size: 19px; } .section-head { align-items: start; flex-direction: column; gap: 9px; } .cards { grid-template-columns: 1fr; gap: 9px; } .form-row { grid-template-columns: 1fr; } .nav button .icon { display: none; } .nav button { padding-inline: 6px; } .result-row { gap: 7px; padding-inline: 8px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

.account-name { max-width: 15rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 650; }
.account-form .field-help { color: var(--muted); font-size: 14px; margin-top: -7px; }
.account-form .form-error:empty { display: none; }
.account-switch { text-align: center; margin-top: 16px; color: var(--muted); }
.text-button { border: 0; background: transparent; color: var(--accent); padding: 3px; font-weight: 700; }
.legacy-profile { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 12px 15px; background: white; border: 1px solid var(--line); border-radius: 13px; }
.legacy-profile .btn { flex: none; }
@media (max-width: 590px) {
  .account-actions { gap: 5px; }
  .account-actions .btn { padding: 7px 9px; }
  .account-name { max-width: 6rem; }
  .legacy-profile { align-items: start; flex-direction: column; }
}
