:root {
  color-scheme: light;
  --ink: #17223b; --ink-2: #253352; --navy: #111b35;
  --violet: #6758e8; --violet-dark: #5142cc; --lime: #b8f34a;
  --mint: #27cbb8; --paper: #f6f7fa; --white: #fff;
  --muted: #6f7890; --line: #e5e8f0; --danger: #b53f33; --success: #18775e;
  --shadow: 0 12px 36px rgba(26,34,61,.08); --shadow-lg: 0 28px 80px rgba(11,20,44,.18);
  --font: "Aptos", "Segoe UI", Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button,input,textarea,select { color: inherit; font: inherit; }
button,a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; }
img,canvas,svg { display: block; max-width: 100%; }
.app-icon { width: 1.25em; height: 1.25em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: #d8d3ff; color: var(--ink); }
:focus-visible { outline: 3px solid rgba(103,88,232,.35); outline-offset: 3px; }
.sr-only { position: absolute!important; width: 1px!important; height: 1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; }
.skip-link { position: fixed; z-index: 1000; top: 12px; left: 14px; transform: translateY(-180%); border-radius: 999px; background: #fff; padding: 10px 16px; font-weight: 900; text-decoration: none; transition: transform .15s; }
.skip-link:focus { transform: none; }
.brand { display: inline-flex; min-width: 0; align-items: center; gap: 11px; text-decoration: none; }
.brand__mark { display: block; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 15px; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(10,18,39,.2)); }
.brand__name,.brand__claim { display: block; }
.brand__name { color: #fff; font-size: 17px; font-weight: 950; letter-spacing: -.03em; }
.brand__claim { margin-top: -2px; color: rgba(255,255,255,.46); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow { margin: 0 0 7px; color: var(--violet); font-size: 11px; font-weight: 950; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--muted); }
.alert { display: flex; align-items: flex-start; gap: 9px; border: 1px solid; border-radius: 14px; padding: 11px 13px; font-size: 13px; font-weight: 750; }
.alert--error { border-color: #f0c9c4; background: #fff1ef; color: var(--danger); }
.alert--success { border-color: #bfe7da; background: #ecfaf6; color: var(--success); }
.button { display: inline-flex; min-height: 47px; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 15px; padding: 11px 17px; font-size: 13px; font-weight: 900; text-decoration: none; transition: transform .15s,background .15s; }
.button:hover { transform: translateY(-1px); }
.button--primary { background: var(--ink); color: #fff; box-shadow: 0 12px 24px rgba(23,34,59,.15); }
.button--primary:hover { background: var(--ink-2); }
.button--violet { background: var(--violet); color: #fff; }
.button--violet:hover { background: var(--violet-dark); }
.button--lime { background: var(--lime); color: var(--ink); }
.button--ghost { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.button--small { min-height: 39px; border-radius: 12px; padding: 8px 12px; font-size: 11px; }

/* Login */
.login-page { position: relative; min-height: 100svh; overflow: hidden; background: var(--navy); color: #fff; }
.login-page::before,.login-page::after { position: absolute; border-radius: 50%; content: ""; pointer-events: none; filter: blur(12px); }
.login-page::before { width: 560px; height: 560px; left: -330px; top: 60px; background: radial-gradient(circle,rgba(103,88,232,.48),transparent 70%); }
.login-page::after { width: 650px; height: 650px; right: -350px; bottom: -270px; background: radial-gradient(circle,rgba(39,203,184,.3),transparent 70%); }
.login-shell { position: relative; z-index: 1; display: flex; width: min(1180px,100%); min-height: 100svh; margin: auto; flex-direction: column; padding: 22px 20px 34px; }
.login-header { display: flex; align-items: center; justify-content: space-between; }
.security-pill { display: none; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.11); border-radius: 999px; background: rgba(255,255,255,.06); padding: 8px 13px; color: rgba(255,255,255,.7); font-size: 11px; font-weight: 850; }
.security-pill .app-icon { width: 15px; height: 15px; color: var(--lime); }
.login-grid { display: grid; flex: 1; align-items: center; gap: 42px; padding: 48px 0 22px; }
.login-copy { max-width: 660px; }
.login-badge { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 21px; border-radius: 999px; background: var(--lime); color: var(--ink); padding: 8px 13px; font-size: 10px; font-weight: 950; letter-spacing: .11em; text-transform: uppercase; }
.login-badge .app-icon { width: 14px; height: 14px; }
.login-copy h1 { margin: 0; font-size: clamp(42px,11vw,76px); font-weight: 950; letter-spacing: -.06em; line-height: .97; }
.login-copy h1 span { color: var(--lime); }
.login-copy>p { max-width: 560px; margin: 21px 0 0; color: rgba(255,255,255,.64); font-size: clamp(16px,2.3vw,19px); line-height: 1.7; }
.login-benefits { display: flex; margin: 27px 0 0; padding: 0; flex-wrap: wrap; gap: 8px; list-style: none; }
.login-benefits li { display: flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; background: rgba(255,255,255,.055); padding: 8px 12px; color: rgba(255,255,255,.75); font-size: 12px; font-weight: 750; }
.benefit-check { color: var(--lime); font-weight: 950; }
.login-card-wrap { width: 100%; max-width: 460px; justify-self: center; border: 1px solid rgba(255,255,255,.12); border-radius: 34px; background: rgba(255,255,255,.08); padding: 8px; box-shadow: var(--shadow-lg); backdrop-filter: blur(20px); }
.login-card { border-radius: 27px; background: #fbfaf6; color: var(--ink); padding: 26px 22px; }
.login-icon { display: grid; width: 55px; height: 55px; place-items: center; border-radius: 18px; background: #ece9ff; color: var(--violet); font-size: 24px; }
.login-icon .app-icon { width: 27px; height: 27px; }
.login-card h2 { margin: 17px 0 0; font-size: 29px; font-weight: 950; letter-spacing: -.045em; line-height: 1.1; }
.login-card__intro { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.login-form { display: grid; gap: 15px; margin-top: 24px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 12px; font-weight: 900; }
.field input,.field textarea,.field select { width: 100%; border: 1px solid #d9dde7; border-radius: 15px; background: #fff; padding: 12px 13px; outline: 0; transition: border .15s,box-shadow .15s; }
.field input { min-height: 49px; }
.field textarea { min-height: 116px; resize: vertical; }
.field input:focus,.field textarea:focus,.field select:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(103,88,232,.1); }
.field-help { margin: 0; color: #8b92a3; font-size: 10px; line-height: 1.5; }
.login-button { width: 100%; }
.login-privacy { margin: 16px 0 0; color: #9499a6; font-size: 10px; line-height: 1.6; text-align: center; }

/* Application frame */
.student-app { min-height: 100svh; background: var(--paper); }
.sidebar { display: none; }
.mobile-topbar { position: sticky; z-index: 40; top: 0; display: flex; min-height: 69px; align-items: center; justify-content: space-between; gap: 13px; background: var(--navy); padding: 12px 17px; color: #fff; box-shadow: 0 7px 24px rgba(17,27,53,.18); }
.mobile-topbar .brand__claim { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-install,.install-app-button { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.08); color: #fff; font-weight: 850; }
.topbar-install { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; }
.topbar-install .app-icon,.topbar-logout .app-icon { width: 20px; height: 20px; }
.install-app-button { display: flex; width: 100%; min-height: 42px; margin-bottom: 7px; align-items: center; gap: 9px; border-radius: 13px; padding: 9px 11px; font-size: 10px; text-align: left; }
.install-app-button .app-icon,.logout-button .app-icon { width: 18px; height: 18px; }
.install-app-button[hidden],.topbar-install[hidden] { display: none!important; }
.profile-bubble { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 14px; background: var(--violet); color: #fff; font-size: 12px; font-weight: 950; text-transform: uppercase; }
.sidebar-achievement { display: none; }
.topbar-logout { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.75); }
.student-main { min-width: 0; padding-bottom: 94px; }
.content-shell { width: min(1260px,100%); margin: auto; padding: 22px 16px 40px; }
.mobile-nav { position: fixed; z-index: 50; right: 9px; bottom: 9px; left: 9px; display: flex; overflow-x: auto; gap: 3px; border: 1px solid rgba(255,255,255,.12); border-radius: 21px; background: rgba(17,27,53,.97); padding: 7px; box-shadow: 0 18px 44px rgba(10,17,37,.28); scrollbar-width: none; backdrop-filter: blur(14px); }
.mobile-nav::-webkit-scrollbar { display: none; }
.mobile-nav button,.side-nav button { border: 0; text-align: left; }
.mobile-nav button { display: grid; min-width: 62px; min-height: 54px; flex: 1 0 auto; place-items: center; gap: 1px; border-radius: 14px; background: transparent; color: rgba(255,255,255,.57); font-size: 9px; font-weight: 850; }
.mobile-nav button>.app-icon { width: 19px; height: 19px; }
.mobile-nav button.is-active { background: #fff; color: var(--ink); }
[data-view-panel][hidden] { display: none!important; }
.page-heading { display: flex; margin-bottom: 21px; align-items: flex-start; justify-content: space-between; gap: 18px; }
.page-heading h1,.page-heading h2 { margin: 0; font-size: clamp(29px,6vw,48px); font-weight: 950; letter-spacing: -.055em; line-height: 1.03; }
.page-heading p:last-child { max-width: 680px; margin: 10px 0 0; color: var(--muted); line-height: 1.65; }
.hero-card { position: relative; overflow: hidden; border-radius: 29px; background: linear-gradient(125deg,#6758e8,#7565ef 58%,#4c41bd); padding: 26px 22px; color: #fff; box-shadow: 0 24px 60px rgba(103,88,232,.24); }
.hero-card::after { position: absolute; width: 290px; height: 290px; right: -120px; top: -135px; border: 45px solid rgba(255,255,255,.07); border-radius: 50%; content: ""; }
.hero-card__content { position: relative; z-index: 1; max-width: 700px; }
.hero-card__tag { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; background: rgba(255,255,255,.13); padding: 6px 10px; color: #efedff; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.hero-card__tag .app-icon { width: 13px; height: 13px; color: var(--lime); }
.hero-card h2 { margin: 19px 0 0; font-size: clamp(30px,6.5vw,50px); font-weight: 950; letter-spacing: -.055em; line-height: 1.02; }
.hero-card p { margin: 12px 0 0; color: rgba(255,255,255,.72); line-height: 1.65; }
.hero-stats { display: grid; margin-top: 24px; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.hero-stat { border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(255,255,255,.09); padding: 12px; }
.hero-stat__icon { width: 18px; height: 18px; margin-bottom: 7px; color: var(--lime); }
.hero-stat strong,.hero-stat span { display: block; }
.hero-stat strong { font-size: 20px; font-weight: 950; }
.hero-stat span { color: rgba(255,255,255,.58); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.hero-progress { position: relative; overflow: hidden; height: 8px; margin-top: 13px; border-radius: 999px; background: rgba(255,255,255,.12); }
.hero-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lime); box-shadow: 0 0 18px rgba(184,243,74,.6); transition: width .45s ease; }
.achievement-strip { display: flex; overflow-x: auto; gap: 8px; margin-top: 13px; padding: 2px 1px 6px; scrollbar-width: none; }
.achievement-strip::-webkit-scrollbar { display: none; }
.achievement { display: inline-flex; min-width: max-content; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.76); padding: 7px 11px; color: #9ba1af; font-size: 10px; font-weight: 850; filter: grayscale(1); opacity: .62; }
.achievement b { font-size: 16px; }
.achievement.is-unlocked { border-color: #d8e9b8; background: #f6fde9; color: #4e6e22; filter: none; opacity: 1; box-shadow: 0 7px 18px rgba(105,145,45,.1); }
.section-block { margin-top: 27px; }
.section-head { display: flex; margin-bottom: 13px; align-items: end; justify-content: space-between; gap: 14px; }
.section-head h2,.section-head h3 { margin: 0; font-size: 21px; font-weight: 950; letter-spacing: -.035em; }
.section-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

/* Units and lessons */
.unit-strip { display: grid; grid-auto-columns: minmax(245px,84vw); grid-auto-flow: column; overflow-x: auto; gap: 11px; padding: 2px 2px 12px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.unit-card { min-height: 175px; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 22px; background: #fff; padding: 18px; color: var(--ink); text-align: left; box-shadow: var(--shadow); transition: transform .15s,border-color .15s,box-shadow .15s; }
.unit-card:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(26,34,61,.12); }
.unit-card.is-active { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(103,88,232,.1),var(--shadow); }
.unit-card__top { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.unit-card__subject,.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 8px; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.unit-card__subject { background: #eeecff; color: var(--violet); }
.unit-card__arrow { color: #a1a7b5; font-size: 18px; }
.unit-card h3 { margin: 17px 0 0; font-size: 18px; font-weight: 950; letter-spacing: -.035em; line-height: 1.2; }
.unit-card p { display: -webkit-box; overflow: hidden; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.unit-card__meta { display: flex; margin-top: 16px; gap: 11px; color: #8b92a2; font-size: 10px; font-weight: 800; }
.unit-card__progress { display: block; overflow: hidden; height: 6px; margin-top: 12px; border-radius: 999px; background: #eceef4; }
.unit-card__progress-bar { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--violet),var(--mint)); transition: width .35s ease; }
.unit-card__progress-label { display: block; margin-top: 5px; color: #7c8495; font-size: 9px; font-weight: 850; }
.empty-state { display: grid; min-height: 330px; place-items: center; border: 1px dashed #ccd1dd; border-radius: 28px; background: rgba(255,255,255,.75); padding: 40px 22px; text-align: center; }
.empty-state__icon { display: grid; width: 70px; height: 70px; margin: auto; place-items: center; border-radius: 23px; background: #eeecff; color: var(--violet); font-size: 29px; }
.empty-state h2 { margin: 17px 0 0; font-size: 24px; font-weight: 950; letter-spacing: -.04em; }
.empty-state p { max-width: 460px; margin: 7px auto 0; color: var(--muted); font-size: 13px; }
.lesson-layout { display: grid; gap: 17px; }
.card { border: 1px solid var(--line); border-radius: 23px; background: #fff; padding: 19px; box-shadow: var(--shadow); }
.card h2,.card h3 { margin: 0; font-weight: 950; letter-spacing: -.035em; }
.card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 13px; }
.card__icon { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; border-radius: 14px; background: #eeecff; color: var(--violet); font-size: 19px; }
.goal-list,.practice-list { display: grid; margin: 16px 0 0; padding: 0; gap: 9px; list-style: none; }
.goal-list li,.practice-list li { display: flex; align-items: flex-start; gap: 9px; border-radius: 14px; background: #f7f8fb; padding: 11px; color: #46516a; font-size: 12px; line-height: 1.55; }
.goal-check { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #e8fad0; color: #4f771c; font-size: 11px; font-weight: 950; }
.curriculum-alignment { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 17px; }
.curriculum-alignment[hidden] { display: none; }
.curriculum-alignment strong,.curriculum-alignment>span { display: block; }
.curriculum-alignment strong { font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.curriculum-alignment>span { margin-top: 5px; color: var(--muted); font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.curriculum-alignment ul { display: grid; margin: 11px 0 0; padding: 0; gap: 6px; list-style: none; }
.curriculum-alignment li { position: relative; padding-left: 14px; color: #566178; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.curriculum-alignment li::before { position: absolute; left: 0; color: var(--violet); content: "•"; }
.curriculum-alignment a { display: inline-flex; min-height: 42px; margin-top: 13px; align-items: center; border: 1px solid #d7d2f3; border-radius: 12px; background: #f4f2ff; padding: 9px 12px; color: var(--violet); font-size: 14px; font-weight: 900; text-decoration: none; overflow-wrap: anywhere; }
.lesson-sections { display: grid; gap: 12px; }
.lesson-section { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.lesson-section summary { display: flex; align-items: center; gap: 12px; padding: 16px 17px; cursor: pointer; font-weight: 900; list-style: none; }
.lesson-section summary::-webkit-details-marker { display: none; }
.lesson-section summary::before { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: #eeecff; color: var(--violet); content: "+"; font-size: 18px; }
.lesson-section[open] summary::before { content: "−"; }
.lesson-section__body { padding: 0 17px 17px 58px; }
.lesson-section__body>p { margin: 0; color: #5e687e; font-size: 13px; line-height: 1.75; white-space: pre-wrap; }
.example-box { margin-top: 14px; border-left: 4px solid var(--lime); border-radius: 0 14px 14px 0; background: #f5fde9; padding: 12px 13px; color: #3d4e2a; font-size: 12px; line-height: 1.65; white-space: pre-wrap; }
.example-box strong { display: block; margin-bottom: 2px; color: #506f29; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }

/* Quiz and flashcards */
.quiz-shell { display: grid; gap: 16px; }
.quiz-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-radius: 21px; background: var(--navy); padding: 17px; color: #fff; }
.quiz-summary strong,.quiz-summary span { display: block; }
.quiz-summary strong { font-size: 22px; font-weight: 950; }
.quiz-summary span { color: rgba(255,255,255,.58); font-size: 10px; }
.quiz-summary { align-content: start; flex-wrap: wrap; }
.quiz-summary__tip { width: 100%; border-top: 1px solid rgba(255,255,255,.1); padding-top: 13px; }
.quiz-summary__tip b,.quiz-summary__tip span { display: block; }
.quiz-summary__tip b { font-size: 11px; }
.quiz-summary__tip span { margin-top: 3px; line-height: 1.5; }
.score-ring { display: grid; width: 62px; height: 62px; flex: 0 0 auto; place-items: center; border: 5px solid var(--lime); border-radius: 50%; font-size: 12px; font-weight: 950; }
.quiz-trainer { min-width: 0; }
.trainer-progress { overflow: hidden; height: 8px; margin-bottom: 12px; border-radius: 999px; background: #e7e9f0; }
.trainer-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--violet),var(--mint)); transition: width .4s ease; }
.quiz-questions { display: grid; gap: 13px; }
.quiz-question { border: 1px solid var(--line); border-radius: 22px; background: #fff; padding: 18px; box-shadow: var(--shadow); }
.quiz-question__number { margin: 0; color: var(--violet); font-size: 9px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.quiz-question h3 { margin: 6px 0 0; font-size: 16px; font-weight: 900; letter-spacing: -.025em; line-height: 1.4; }
.quiz-options { display: grid; gap: 8px; margin-top: 14px; }
.quiz-option { display: flex; width: 100%; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 14px; background: #fafbfc; padding: 10px 11px; color: #3c475f; font-size: 12px; font-weight: 750; text-align: left; }
.quiz-option:hover:not(:disabled) { border-color: var(--violet); background: #f4f2ff; }
.quiz-option__letter { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: #eceef4; color: #687189; font-size: 10px; font-weight: 950; }
.quiz-option.is-correct { border-color: #7fd3b8; background: #eefbf6; color: #17684f; }
.quiz-option.is-wrong { border-color: #e5a8a0; background: #fff2ef; color: #9d352c; }
.quiz-option.is-correct .quiz-option__letter { background: #bdebdc; color: #17684f; }
.quiz-option.is-wrong .quiz-option__letter { background: #f3cac4; color: #9d352c; }
.quiz-feedback { margin: 12px 0 0; border-radius: 13px; background: #f4f5f8; padding: 10px 11px; color: #586278; font-size: 11px; line-height: 1.6; }
.quiz-question--single { min-height: 330px; animation: trainer-in .28s ease both; }
.quiz-question--single.is-success { border-color: #8bd8bf; box-shadow: 0 0 0 4px rgba(39,203,184,.08),var(--shadow); }
.quiz-question--single.is-error { animation: trainer-shake .34s ease; }
.trainer-memory { margin: 12px 0 0; border-radius: 12px; background: #fff8df; padding: 9px 11px; color: #7e6420; font-size: 10px; font-weight: 800; }
.trainer-next { width: 100%; margin-top: 12px; }
.quiz-complete { display: grid; min-height: 330px; place-items: center; align-content: center; border: 1px solid #dce7c6; border-radius: 24px; background: linear-gradient(145deg,#fff,#f5fde8); padding: 30px; text-align: center; box-shadow: var(--shadow); animation: trainer-in .35s ease both; }
.quiz-complete__icon { font-size: 54px; animation: badge-pop .55s cubic-bezier(.2,.9,.25,1.25) both; }
.quiz-complete h3 { margin: 12px 0 0; font-size: 25px; font-weight: 950; letter-spacing: -.04em; }
.quiz-complete p { max-width: 520px; margin: 8px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.xp-toast,.network-toast { position: fixed; z-index: 100; right: 16px; border-radius: 999px; color: #fff; box-shadow: 0 18px 44px rgba(17,27,53,.25); font-weight: 950; }
.xp-toast { top: calc(82px + env(safe-area-inset-top)); background: linear-gradient(135deg,var(--violet),#4e3fc9); padding: 11px 17px; transform: translateY(-12px) scale(.9); opacity: 0; transition: transform .25s,opacity .25s; }
.xp-toast.is-visible { transform: none; opacity: 1; }
.network-toast { right: 13px; bottom: calc(83px + env(safe-area-inset-bottom)); left: 13px; background: var(--navy); padding: 11px 14px; font-size: 11px; text-align: center; }
.network-toast.is-error { background: #81372f; }
@keyframes trainer-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes trainer-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 55% { transform: translateX(6px); } 80% { transform: translateX(-3px); } }
@keyframes badge-pop { from { opacity: 0; transform: scale(.35) rotate(-12deg); } to { opacity: 1; transform: none; } }
.game-stage { display: grid; gap: 17px; }
.flashcard-scene { min-height: 330px; perspective: 1100px; }
.flashcard { position: relative; width: 100%; min-height: 330px; border: 0; background: transparent; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.flashcard.is-flipped { transform: rotateY(180deg); }
.flashcard__face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; border-radius: 28px; padding: 28px; box-shadow: var(--shadow-lg); text-align: center; backface-visibility: hidden; }
.flashcard__front { background: linear-gradient(145deg,var(--violet),#5647d2); color: #fff; }
.flashcard__back { background: #fff; color: var(--ink); transform: rotateY(180deg); }
.flashcard__label { margin: 0 0 13px; opacity: .62; font-size: 9px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.flashcard__text { max-width: 700px; font-size: clamp(22px,5vw,34px); font-weight: 950; letter-spacing: -.04em; line-height: 1.25; white-space: pre-wrap; }
.flashcard__hint { margin: 20px 0 0; opacity: .58; font-size: 10px; font-weight: 750; }
.game-controls { display: flex; align-items: center; justify-content: center; gap: 9px; }
.game-progress { min-width: 75px; color: var(--muted); font-size: 11px; font-weight: 900; text-align: center; }

/* Mindmap */
.mindmap-card { overflow: hidden; border: 1px solid #dedbea; border-radius: 28px; background: linear-gradient(rgba(103,88,232,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(103,88,232,.045) 1px,transparent 1px),#fbfaff; background-size: 28px 28px; padding: 14px; box-shadow: var(--shadow); }
.mindmap-canvas { position: relative; min-height: 520px; }
.mindmap-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mindmap-center,.mindmap-node { position: absolute; z-index: 1; display: flex; align-items: center; justify-content: center; border: 0; text-align: center; transform: translate(-50%,-50%); }
.mindmap-center { left: 50%; top: 50%; width: 136px; height: 136px; border-radius: 50%; background: var(--violet); padding: 17px; color: #fff; box-shadow: 0 18px 40px rgba(103,88,232,.28); font-size: 15px; font-weight: 950; line-height: 1.25; }
.mindmap-node { width: 120px; min-height: 65px; border: 1px solid #dedbea; border-radius: 17px; background: #fff; padding: 9px; color: var(--ink); box-shadow: var(--shadow); font-size: 10px; font-weight: 900; line-height: 1.3; }
.mindmap-node:hover,.mindmap-node.is-active { border-color: var(--violet); background: #f0eeff; }
.mindmap-detail { min-height: 65px; margin-top: 13px; border-radius: 17px; background: var(--navy); padding: 13px 15px; color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.65; }
.mindmap-detail strong { color: #fff; }

/* Notes, handwriting, downloads */
.notes-layout,.handwriting-layout { display: grid; gap: 17px; }
.note-form,.handwriting-controls { align-self: start; }
.color-options { display: flex; gap: 9px; }
.color-radio { position: relative; }
.color-radio input { position: absolute; opacity: 0; pointer-events: none; }
.color-radio span { display: block; width: 35px; height: 35px; border: 3px solid #fff; border-radius: 11px; box-shadow: 0 0 0 1px #d7d9e0; }
.color-radio input:checked+span { box-shadow: 0 0 0 3px var(--violet); }
.color-yellow,.sticky-note--yellow { background: #fff0a6; }
.color-mint,.sticky-note--mint { background: #c9f2df; }
.color-lilac,.sticky-note--lilac { background: #ddd7ff; }
.color-coral,.sticky-note--coral { background: #ffd4c6; }
.notes-board { display: grid; min-height: 360px; align-content: start; grid-template-columns: repeat(auto-fill,minmax(205px,1fr)); gap: 16px; border-radius: 27px; background: linear-gradient(rgba(119,111,82,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(119,111,82,.07) 1px,transparent 1px),#f1eee4; background-size: 24px 24px; padding: 20px; }
.sticky-note { position: relative; min-height: 205px; border-radius: 4px 18px 7px 17px; padding: 20px; box-shadow: 0 15px 28px rgba(73,67,48,.14); transform: rotate(-.6deg); }
.sticky-note:nth-child(even) { transform: rotate(.9deg); }
.sticky-note h3 { margin: 0 34px 9px 0; font: 700 16px/1.35 "Segoe Print","Comic Sans MS",cursive; }
.sticky-note p { margin: 0; color: #4c4b43; font: 13px/1.65 "Segoe Print","Comic Sans MS",cursive; white-space: pre-wrap; }
.sticky-note__delete { position: absolute; right: 11px; top: 11px; display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 9px; background: rgba(255,255,255,.45); color: #766f60; }
.notes-empty { grid-column: 1/-1; align-self: center; color: #777264; text-align: center; }
.button-row { display: flex; margin-top: 15px; flex-wrap: wrap; gap: 8px; }
.paper-frame { overflow: auto; border-radius: 27px; background: #e8e6df; padding: 13px; }
#handwriting-canvas { width: 100%; min-width: 560px; border-radius: 8px 20px 8px 20px; background: #fffdf5; box-shadow: 0 20px 45px rgba(65,60,46,.16); }
.download-grid { display: grid; gap: 12px; }
.download-card { display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 20px; background: #fff; padding: 15px; box-shadow: var(--shadow); }
.download-card__icon { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 15px; background: #fff0ec; color: #db5a45; font-size: 19px; }
.download-card__copy { min-width: 0; flex: 1; }
.download-card h3 { overflow: hidden; margin: 0; font-size: 14px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.download-card p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.logout-form { margin: 0; }
.logout-button { display: flex; width: 100%; align-items: center; gap: 9px; border: 0; border-radius: 14px; background: transparent; padding: 10px 11px; color: rgba(255,255,255,.5); font-size: 11px; font-weight: 800; text-align: left; }
.logout-button:hover { background: rgba(255,255,255,.07); color: #fff; }

/* Learner home and self-service packages */
.package-flash { margin-bottom: 16px; }
.today-section { margin-top: 30px; }
.today-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.today-card { display: grid; min-width: 0; min-height: 152px; align-content: start; border: 1px solid var(--line); border-radius: 21px; background: #fff; padding: 17px; color: var(--ink); box-shadow: 0 7px 24px rgba(28,36,64,.05); text-align: left; transition: transform .15s,border-color .15s,box-shadow .15s; }
.today-card:hover { border-color: #bbb3ee; box-shadow: var(--shadow); transform: translateY(-2px); }
.today-card__icon { display: grid; width: 39px; height: 39px; margin-bottom: 18px; place-items: center; border-radius: 13px; background: #eeebff; color: var(--violet); font-size: 16px; font-weight: 950; }
.today-card:nth-child(3n+2) .today-card__icon { background: #e0f7ef; color: #18775e; }
.today-card:nth-child(3n+3) .today-card__icon { background: #fff0db; color: #a15e22; }
.today-card strong { font-size: 15px; font-weight: 950; letter-spacing: -.02em; }
.today-card small { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.today-card--packages { border-color: #bdb4f5; background: linear-gradient(145deg,#fff,#f3f0ff); }

.kaiju-reward-card { display: grid; margin-top: 20px; grid-template-columns: auto minmax(0,1fr); gap: 14px; border: 1px solid #dfc28d; border-radius: 23px; background: linear-gradient(135deg,#fff9e9,#fff); padding: 18px; box-shadow: 0 12px 32px rgba(103,77,31,.08); }
.kaiju-reward-card__art { width: min(28vw,145px); height: 120px; align-self: center; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(103,77,31,.18)); }
.kaiju-reward-card__coin { display: grid; width: 54px; height: 54px; place-items: center; border: 5px double #8d5a19; border-radius: 50%; color: #65400f; background: #ffd96a; box-shadow: inset 0 0 0 3px #f0b92e,0 7px 15px rgba(119,78,18,.15); font-size: 19px; font-weight: 950; }
.kaiju-reward-card__copy p { margin: 0; color: #8b5f21; font-size: 13px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.kaiju-reward-card__copy h2 { margin: 3px 0; font-size: 18px; font-weight: 950; letter-spacing: -.025em; }
.kaiju-reward-card__copy span { color: #74664e; font-size: 14px; }
.kaiju-link-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.kaiju-link-form label { flex: 1 1 170px; }
.kaiju-link-form input { width: 100%; min-height: 42px; border: 1px solid #dccba8; border-radius: 12px; background: #fff; padding: 9px 11px; color: #17223a; font: inherit; }
.kaiju-link-form input:focus { border-color: #6758e8; outline: 3px solid rgba(103,88,232,.14); }
.kaiju-resend-form { margin-top: 2px; }
.kaiju-reward-card .button-link { width: max-content; border: 0; background: transparent; padding: 6px 0 0; color: #7252d8; font: inherit; font-size: 13px; font-weight: 850; text-decoration: underline; cursor: pointer; }
.kaiju-reward-card__status { display: grid; grid-column: 1/-1; gap: 3px; border-top: 1px solid #eddfc5; padding-top: 13px; }
.kaiju-reward-card__status > span { width: max-content; border-radius: 999px; background: #fff0c8; padding: 5px 9px; color: #7f581e; font-size: 13px; font-weight: 900; }
.kaiju-reward-card--verified .kaiju-reward-card__status > span { background: #daf3e7; color: #17684f; }
.kaiju-reward-card__status strong { margin-top: 5px; font-size: 20px; }
.kaiju-reward-card__status small { color: #746c5c; font-size: 13px; line-height: 1.45; }

.package-page-heading { align-items: end; }
.package-explainer { display: flex; margin: 0 0 18px; align-items: center; gap: 10px; border: 1px solid #ded9f5; border-radius: 19px; background: #f8f6ff; padding: 14px 16px; color: #544b75; overflow-x: auto; }
.package-explainer span { display: flex; min-width: max-content; align-items: center; gap: 8px; font-size: 14px; font-weight: 850; }
.package-explainer b { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 9px; color: #fff; background: var(--violet); font-size: 12px; }
.package-explainer i { min-width: 24px; height: 2px; flex: 1; border-radius: 999px; background: #cbc5e8; }
.package-list { display: grid; gap: 13px; }
.package-card { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.package-card__status { display: flex; align-items: center; gap: 7px; border-bottom: 1px solid var(--line); background: #fafbfc; padding: 9px 15px; color: #667087; font-size: 13px; font-weight: 900; }
.package-card__status span { width: 9px; height: 9px; border-radius: 50%; background: #9ca4b5; }
.package-card--requested .package-card__status span { background: #8a73e8; }
.package-card--generating .package-card__status span { background: #e6a735; box-shadow: 0 0 0 5px rgba(230,167,53,.14); animation: package-pulse 1.4s infinite; }
.package-card--ready .package-card__status span { background: #27a777; }
.package-card--failed .package-card__status span { background: #c65245; }
.package-card--archived { opacity: .82; background: #f8f9fb; }
.package-card--archived .package-card__status span { background: #768196; }
.package-card__main { display: flex; min-width: 0; gap: 13px; padding: 17px 17px 8px; }
.package-card__icon { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border-radius: 15px; color: #4f42be; background: #eeebff; font-size: 17px; font-weight: 950; }
.package-card--ready .package-card__icon { color: #17684f; background: #dff7ed; }
.package-card--generating .package-card__icon { color: #8d5f14; background: #fff1d2; }
.package-card--failed .package-card__icon { color: #9d352c; background: #fff0ed; }
.package-card__copy { min-width: 0; }
.package-card__copy p { margin: 0; color: var(--violet); font-size: 13px; font-weight: 900; }
.package-card__copy h3 { margin: 3px 0 5px; font-size: 18px; font-weight: 950; line-height: 1.25; letter-spacing: -.025em; overflow-wrap: anywhere; }
.package-card__copy > span { display: block; color: var(--muted); font-size: 14px; line-height: 1.5; }
.package-card__copy small { display: block; margin-top: 7px; color: #9299a9; font-size: 13px; }
.package-card__action { display: flex; min-height: 60px; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; padding: 8px 17px 15px; }
.package-card__action form { margin: 0; }
.package-card__pending { color: var(--muted); font-size: 13px; font-weight: 800; }
.package-archive-button { border: 0; background: transparent; padding: 6px 0; color: #697287; font: inherit; font-size: 13px; font-weight: 850; text-decoration: underline; cursor: pointer; }
.package-loader { display: flex; gap: 5px; }
.package-loader i { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); animation: package-dot 1.1s infinite ease-in-out; }
.package-loader i:nth-child(2) { animation-delay: .15s; }
.package-loader i:nth-child(3) { animation-delay: .3s; }
.package-empty { display: flex; align-items: center; gap: 15px; border: 1px dashed #c8c2e8; border-radius: 22px; background: #faf9ff; padding: 22px; }
.package-empty > span { display: grid; width: 50px; height: 50px; flex: 0 0 auto; place-items: center; border-radius: 16px; color: var(--violet); background: #ece9ff; font-size: 20px; }
.package-empty h3 { margin: 0; font-size: 18px; }
.package-empty p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.request-card { margin-top: 28px; border: 1px solid #dcd7f2; border-radius: 27px; background: #fff; padding: 20px; box-shadow: var(--shadow); scroll-margin-top: 86px; }
.request-card__heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.request-card__heading h3 { margin: 0; font-size: 24px; font-weight: 950; letter-spacing: -.04em; }
.request-card__heading p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.request-count { display: inline-flex; min-width: 68px; align-items: center; justify-content: center; gap: 4px; border-radius: 13px; background: #eeebff; padding: 9px 11px; color: #5c5192; font-size: 14px; font-weight: 850; }
.request-count b { font-size: 18px; }
.request-subject-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.request-subject { overflow: hidden; border: 2px solid var(--line); border-radius: 17px; transition: border-color .15s,opacity .15s; }
.request-subject.is-selected { border-color: var(--violet); background: #faf9ff; }
.request-subject.is-disabled { opacity: .47; }
.request-subject > label:first-child { position: relative; display: flex; min-height: 58px; align-items: center; gap: 9px; padding: 10px 12px; cursor: pointer; }
.request-subject input[type=checkbox] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.request-subject > label:first-child > span { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border: 2px solid #cdd2df; border-radius: 8px; color: transparent; font-size: 11px; }
.request-subject input:checked + span { border-color: var(--violet); color: #fff; background: var(--violet); }
.request-subject input:focus-visible + span { outline: 3px solid rgba(103,88,232,.25); outline-offset: 2px; }
.request-subject b { min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.request-topic { display: none; padding: 0 11px 11px; }
.request-subject.is-selected .request-topic { display: grid; gap: 5px; }
.request-topic > span { font-size: 13px; font-weight: 900; }
.request-topic em { color: var(--muted); font-size: 12px; font-style: normal; }
.request-topic input { width: 100%; min-height: 42px; border: 1px solid #d6dae5; border-radius: 12px; background: #fff; padding: 0 11px; font-size: 14px; }
.request-topic input:focus { border-color: var(--violet); outline: 3px solid rgba(103,88,232,.12); }
.request-difficulty { margin: 20px 0 0; padding: 0; border: 0; }
.request-difficulty legend { margin-bottom: 8px; font-size: 14px; font-weight: 900; }
.request-difficulty > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.request-difficulty label { position: relative; }
.request-difficulty input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.request-difficulty span { display: grid; min-height: 45px; place-items: center; border: 2px solid var(--line); border-radius: 13px; background: #fff; font-size: 14px; font-weight: 900; cursor: pointer; }
.request-difficulty input:checked + span { border-color: var(--violet); background: #f1efff; }
.request-difficulty input:focus-visible + span { outline: 3px solid rgba(103,88,232,.22); outline-offset: 2px; }
.request-footer { display: flex; margin-top: 20px; align-items: center; justify-content: space-between; gap: 18px; border-radius: 17px; background: #f4f5f8; padding: 14px; }
.request-footer p { display: grid; margin: 0; }
.request-footer strong { font-size: 14px; }
.request-footer span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.request-footer .button { flex: 0 0 auto; }
.request-error { margin: 12px 0 0; }

/* Full learning-game hub */
.game-hub { display: grid; gap: 14px; }
.game-mode-picker { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.game-mode-picker button { display: grid; min-height: 96px; align-content: center; grid-template-columns: auto minmax(0,1fr); column-gap: 10px; border: 2px solid var(--line); border-radius: 19px; background: #fff; padding: 13px; color: var(--ink); text-align: left; }
.game-mode-picker button:hover { border-color: #c0b9ed; }
.game-mode-picker button.is-active { border-color: var(--violet); background: #f3f1ff; box-shadow: 0 9px 23px rgba(67,53,151,.11); }
.game-mode-picker button > span { display: grid; width: 38px; height: 38px; grid-row: 1/span 2; place-items: center; align-self: center; border-radius: 12px; color: var(--violet); background: #ece9ff; font-size: 17px; font-weight: 950; }
.game-mode-picker b { align-self: end; font-size: 14px; }
.game-mode-picker small { align-self: start; color: var(--muted); font-size: 12px; }
.game-panel { min-height: 520px; align-content: start; border: 1px solid #dfdbea; border-radius: 28px; background: linear-gradient(145deg,#faf9ff,#fff); padding: 18px; box-shadow: var(--shadow); }
.game-panel[hidden] { display: none!important; }
.game-panel__intro { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.game-panel__intro h3 { margin: 3px 0 0; font-size: 20px; font-weight: 950; letter-spacing: -.03em; }
.game-panel__intro > p { max-width: 420px; margin: 0; color: var(--muted); font-size: 14px; text-align: right; }
.game-kicker { color: var(--violet); font-size: 13px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.game-panel .flashcard-scene { margin-top: 4px; }

.memory-board { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 8px; }
.memory-card { min-width: 0; min-height: 118px; border: 0; border-radius: 17px; background: transparent; padding: 0; perspective: 700px; }
.memory-card__inner { position: relative; display: block; width: 100%; height: 100%; min-height: 118px; transform-style: preserve-3d; transition: transform .38s ease; }
.memory-card.is-open .memory-card__inner,.memory-card.is-matched .memory-card__inner { transform: rotateY(180deg); }
.memory-card__back,.memory-card__front { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 17px; padding: 10px; backface-visibility: hidden; }
.memory-card__back { border: 1px solid #5245c7; color: #fff; background: linear-gradient(145deg,var(--violet),#5142cc); font-size: 24px; }
.memory-card__front { border: 2px solid #a79bea; color: var(--ink); background: #fff; font-size: 14px; font-weight: 900; line-height: 1.3; text-align: center; transform: rotateY(180deg); overflow-wrap: anywhere; }
.memory-card.is-matched .memory-card__front { border-color: #68c8a8; background: #edfbf6; color: #17684f; }
.memory-footer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px 18px; border-top: 1px solid var(--line); padding-top: 15px; color: var(--muted); font-size: 14px; }
.memory-footer b { color: var(--ink); font-size: 17px; }
.memory-footer .button { margin-left: auto; }

.blitz-scoreboard { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.blitz-scoreboard span { display: grid; min-height: 79px; place-items: center; align-content: center; border-radius: 17px; color: #fff; background: var(--navy); }
.blitz-scoreboard span:nth-child(2) { color: var(--ink); background: var(--lime); }
.blitz-scoreboard span:nth-child(3) { color: #4d4384; background: #ece9ff; }
.blitz-scoreboard small { font-size: 12px; font-weight: 850; text-transform: uppercase; }
.blitz-scoreboard strong { font-size: 24px; line-height: 1.05; }
.blitz-card { display: grid; min-height: 290px; align-content: center; margin-top: 2px; border: 1px solid var(--line); border-radius: 22px; background: #fff; padding: 22px; }
.blitz-card h3 { margin: 5px 0 0; font-size: clamp(20px,4vw,30px); font-weight: 950; letter-spacing: -.035em; line-height: 1.2; }
.blitz-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 18px; }
.blitz-option { display: flex; min-height: 58px; align-items: center; gap: 10px; border: 2px solid var(--line); border-radius: 15px; background: #fafbfc; padding: 10px 12px; text-align: left; }
.blitz-option > span { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: #e8eaf1; color: #596277; font-size: 12px; font-weight: 950; }
.blitz-option b { font-size: 14px; }
.blitz-option:hover:not(:disabled) { border-color: var(--violet); background: #f5f3ff; }
.blitz-option.is-correct { border-color: #6ec8aa; background: #edfbf6; color: #17684f; }
.blitz-option.is-wrong { border-color: #df9d95; background: #fff0ed; color: #9d352c; }
.blitz-feedback { min-height: 24px; margin: 13px 0 0; color: #535e74; font-size: 14px; font-weight: 800; }
.blitz-controls { display: flex; justify-content: flex-end; gap: 9px; }
.game-local-note { margin: 0; border-radius: 13px; background: #f1f2f6; padding: 10px 12px; color: var(--muted); font-size: 13px; text-align: center; }

@keyframes package-pulse { 50% { box-shadow: 0 0 0 8px rgba(230,167,53,0); } }
@keyframes package-dot { 0%,70%,100% { transform: translateY(0); opacity: .45; } 35% { transform: translateY(-5px); opacity: 1; } }

@media (min-width:580px) {
  .security-pill { display: inline-flex; }
  .login-card { padding: 31px; }
  .content-shell { padding-right: 24px; padding-left: 24px; }
  .hero-card { padding: 34px; }
  .hero-stats { width: min(620px,100%); grid-template-columns: repeat(4,minmax(0,1fr)); }
  .unit-strip { grid-auto-columns: 285px; }
  .quiz-question,.card { padding: 23px; }
  .today-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .kaiju-reward-card { grid-template-columns: 150px minmax(0,1fr) minmax(170px,.34fr); align-items: center; }
  .kaiju-reward-card__art { width: 145px; height: 135px; }
  .kaiju-reward-card__status { grid-column: auto; border-top: 0; border-left: 1px solid #eddfc5; padding-top: 0; padding-left: 16px; }
}
@media (max-width:579px) {
  .package-page-heading { align-items: stretch; flex-direction: column; }
  .package-page-heading .button { width: 100%; }
  .package-explainer { margin-right: -16px; margin-left: -16px; border-right: 0; border-left: 0; border-radius: 0; }
  .request-card { padding: 17px 14px; }
  .request-card__heading { align-items: start; }
  .request-subject-grid { grid-template-columns: 1fr; }
  .request-footer { align-items: stretch; flex-direction: column; }
  .request-footer .button { width: 100%; }
  .game-mode-picker { grid-template-columns: 1fr; }
  .game-mode-picker button { min-height: 72px; }
  .game-panel { min-height: 450px; padding: 13px; }
  .game-panel__intro { flex-direction: column; gap: 5px; }
  .game-panel__intro > p { text-align: left; }
  .memory-board { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
  .memory-card,.memory-card__inner { min-height: 98px; }
  .memory-card__front { padding: 7px; font-size: 12px; }
  .memory-footer .button { width: 100%; margin-left: 0; }
  .blitz-options { grid-template-columns: 1fr; }
  .blitz-card { padding: 17px; }
}
@media (max-width:379px) {
  .mobile-topbar { gap: 8px; padding-right: 12px; padding-left: 12px; }
  .mobile-topbar .brand { gap: 8px; }
  .mobile-topbar .brand__mark,.topbar-install,.topbar-logout,.mobile-topbar .profile-bubble { width: 38px; height: 38px; }
  .mobile-topbar .brand__name { font-size: 14px; }
  .topbar-actions { gap: 5px; }
}
@media (min-width:800px) {
  .login-grid { grid-template-columns: minmax(0,1.08fr) minmax(380px,.92fr); }
  .login-card-wrap { justify-self: end; }
  .lesson-layout { grid-template-columns: minmax(230px,.32fr) minmax(0,.68fr); align-items: start; }
  .lesson-layout>.card,.quiz-summary,.note-form,.handwriting-controls { position: sticky; top: 92px; }
  .quiz-shell { grid-template-columns: minmax(220px,.3fr) minmax(0,.7fr); align-items: start; }
  .notes-layout { grid-template-columns: 320px minmax(0,1fr); }
  .handwriting-layout { grid-template-columns: 330px minmax(0,1fr); align-items: start; }
  .download-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .package-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .request-subject-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (min-width:1050px) {
  .student-app { display: grid; grid-template-columns: 258px minmax(0,1fr); }
  .sidebar { position: sticky; top: 0; display: flex; height: 100svh; flex-direction: column; background: var(--navy); padding: 22px 17px 18px; color: #fff; }
  .sidebar__brand { padding: 0 8px; }
  .profile-card { display: flex; margin-top: 28px; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: rgba(255,255,255,.055); padding: 11px; }
  .profile-card__copy { min-width: 0; }
  .profile-card__copy strong,.profile-card__copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .profile-card__copy strong { font-size: 12px; font-weight: 900; }
  .profile-card__copy span { color: rgba(255,255,255,.44); font-size: 10px; }
  .profile-card__copy b { color: var(--lime); }
  .sidebar-achievement { display: flex; margin-top: 8px; gap: 7px; }
  .sidebar-achievement span { flex: 1; border-radius: 11px; background: rgba(255,255,255,.06); padding: 7px 8px; color: rgba(255,255,255,.55); font-size: 9px; text-align: center; }
  .sidebar-achievement b { color: #fff; }
  .sidebar-achievement__icon { width: 14px; height: 14px; margin: 0 auto 3px; color: var(--lime); }
  .side-nav { display: grid; margin-top: 24px; gap: 4px; }
  .side-nav button { display: flex; width: 100%; min-height: 44px; align-items: center; gap: 10px; border-radius: 14px; background: transparent; padding: 9px 11px; color: rgba(255,255,255,.56); font-size: 11px; font-weight: 800; }
  .side-nav button>.app-icon { width: 21px; height: 21px; }
  .side-nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
  .side-nav button.is-active { background: #fff; color: var(--ink); box-shadow: 0 12px 28px rgba(0,0,0,.16); }
  .sidebar__footer { margin-top: auto; }
  .mobile-topbar,.mobile-nav { display: none; }
  .student-main { padding-bottom: 0; }
  .content-shell { padding: 37px 38px 60px; }
  .hero-card { padding: 42px; }
  .unit-strip { grid-auto-flow: initial; grid-template-columns: repeat(3,minmax(0,1fr)); overflow: visible; }
  .mindmap-canvas { min-height: 620px; }
  .mindmap-node { width: 148px; min-height: 72px; font-size: 11px; }
  .mindmap-center { width: 156px; height: 156px; font-size: 18px; }
  .request-subject-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (min-width:1380px) {
  .student-app { grid-template-columns: 278px minmax(0,1fr); }
  .content-shell { padding-right: 52px; padding-left: 52px; }
  .unit-strip { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { scroll-behavior: auto!important; transition-duration: .01ms!important; animation-duration: .01ms!important; animation-iteration-count: 1!important; }
}
@supports (padding: max(0px)) {
  .login-shell {
    padding-top: max(22px,env(safe-area-inset-top));
    padding-bottom: max(34px,env(safe-area-inset-bottom));
  }
  @media (max-width:1049px) {
    .mobile-topbar { padding-top: max(12px,env(safe-area-inset-top)); }
    .mobile-nav { bottom: max(9px,env(safe-area-inset-bottom)); }
    .student-main { padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
  }
}
@media (display-mode:standalone) {
  .mobile-topbar { padding-top: max(14px,env(safe-area-inset-top)); }
  .install-app-button,.topbar-install { display: none!important; }
}
@media print {
  .sidebar,.mobile-topbar,.mobile-nav,.button-row { display: none!important; }
  .student-app { display: block; }
  .content-shell { width: 100%; padding: 0; }
  .card,.lesson-section,.download-card { break-inside: avoid; box-shadow: none; }
}
/* Language learning extension */
.language-course-note { display:flex; gap:12px; align-items:flex-start; margin:0 0 18px; padding:14px 16px; border:1px solid #dcd8ff; border-radius:14px; background:linear-gradient(135deg,#f7f5ff,#fff); color:#565575; }
.language-course-note strong { color:#5144c9; white-space:nowrap; }
.language-course-note span { line-height:1.5; }
@media (max-width:640px) { .language-course-note { flex-direction:column; gap:4px; } }
