:root {
  --ink: #23233b;
  --muted: #77778d;
  --paper: #f7f6f2;
  --card: #ffffff;
  --purple: #c94680;
  --purple-dark: #9f2f61;
  --purple-soft: #fbe8f2;
  --coral: #ff8a65;
  --coral-dark: #e9704c;
  --yellow: #ffc95c;
  --yellow-soft: #fff4d7;
  --mint: #78cfb2;
  --mint-soft: #e2f7f0;
  --blue: #70a7e8;
  --line: #e9e7ee;
  --shadow: 0 10px 35px rgba(43, 36, 76, .07);
  --font-display: "Fredoka", "Arial Rounded MT Bold", sans-serif;
  --font-body: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-width: 320px; color: var(--ink); font-family: var(--font-body); font-size: 15px; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(112, 86, 217, .35); outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .5; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.025em; }
p { line-height: 1.65; }
.icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }

/* Shared controls */
.btn { border: 0; border-radius: 14px; min-height: 48px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn-primary { background: var(--purple); color: white; box-shadow: 0 5px 0 var(--purple-dark); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 7px 0 var(--purple-dark); }
.btn-coral { background: var(--coral); color: #352338; box-shadow: 0 5px 0 #dc6c4b; }
.btn-coral:hover:not(:disabled) { box-shadow: 0 7px 0 #dc6c4b; }
.btn-light { background: white; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 3px 0 #e4e1e9; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-small { min-height: 38px; padding: 0 14px; border-radius: 11px; font-size: 13px; }
.btn-large { min-height: 56px; border-radius: 16px; padding: 0 28px; }
.btn .icon { width: 19px; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: white; display: inline-flex; align-items: center; justify-content: center; }
.text-button { background: none; border: 0; padding: 4px; font-weight: 700; color: var(--purple); }
.pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 8px 12px; background: white; font-weight: 700; font-size: 13px; white-space: nowrap; }
.pill .icon { width: 17px; height: 17px; }
.eyebrow { text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 700; }
.muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid rgba(42, 36, 73, .055); border-radius: 22px; box-shadow: var(--shadow); }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark { position: relative; width: 39px; height: 39px; display: grid; place-items: center; background: var(--purple); border-radius: 12px 12px 12px 4px; transform: rotate(-3deg); color: white; }
.brand-mark::after { content: ""; position: absolute; width: 7px; height: 7px; border: 2px solid var(--yellow); transform: rotate(45deg); right: -4px; top: -4px; background: var(--paper); }
.brand-mark .icon { width: 22px; height: 22px; }
.brand-name { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: .03em; line-height: 1; }
.brand-sub { display: block; font-size: 8px; letter-spacing: .22em; margin-top: 4px; font-weight: 700; color: var(--muted); }
.brand-light { color: white; }
.brand-light .brand-sub { color: rgba(255,255,255,.55); }
.brand-light .brand-mark { background: rgba(255,255,255,.16); }
.brand-light .brand-mark::after { background: #3f2939; }

/* Welcome */
.welcome { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .95fr) minmax(500px, 1.05fr); background: #fcfbf8; overflow: hidden; }
.welcome-content { padding: 38px clamp(38px, 6vw, 94px); display: flex; flex-direction: column; position: relative; z-index: 2; }
.welcome-center { width: 100%; max-width: 480px; margin: auto 0; padding: 58px 0 44px; }
.welcome-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--purple); margin-bottom: 18px; }
.welcome-kicker .icon { width: 18px; }
.welcome h1 { font-size: clamp(43px, 4.4vw, 67px); line-height: 1.04; margin-bottom: 22px; font-weight: 600; }
.welcome h1 em { color: var(--purple); font-style: normal; position: relative; white-space: nowrap; }
.welcome h1 em::after { content: ""; position: absolute; left: 3%; right: 0; bottom: -6px; height: 8px; border-top: 3px solid var(--coral); border-radius: 50%; transform: rotate(-2deg); }
.welcome-lead { color: var(--muted); max-width: 440px; font-size: 16px; margin-bottom: 30px; }
.name-label { font-weight: 700; display: block; margin-bottom: 10px; }
.name-row { display: flex; gap: 11px; }
.name-input { width: 100%; min-width: 0; height: 56px; border: 2px solid var(--line); background: white; border-radius: 15px; padding: 0 18px; color: var(--ink); transition: border .2s; }
.name-input:focus { border-color: var(--purple); outline: 0; box-shadow: 0 0 0 4px var(--purple-soft); }
.name-row .btn { flex: 0 0 auto; }
.form-error { color: #bd4e45; min-height: 22px; font-size: 13px; margin: 10px 0 0; }
.privacy-note { font-size: 12px; color: #9492a0; display: flex; gap: 7px; align-items: center; margin-top: 12px; }
.privacy-note .icon { width: 14px; height: 14px; }
.welcome-features { display: flex; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: 12px; }
.welcome-feature { display: flex; align-items: center; gap: 7px; }
.welcome-feature .icon { width: 16px; color: var(--mint); }
.welcome-art { background: #f9e7f0; position: relative; display: grid; place-items: center; min-height: 680px; isolation: isolate; }
.welcome-art::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(#c8bce8 1.2px, transparent 1.2px); background-size: 28px 28px; opacity: .38; }
.art-orbit { position: absolute; border: 1px dashed rgba(112,86,217,.23); border-radius: 50%; width: min(36vw, 530px); aspect-ratio: 1; }
.art-orbit::before, .art-orbit::after { content: ""; position: absolute; border-radius: 50%; background: var(--yellow); width: 13px; height: 13px; top: 14%; left: 12%; }
.art-orbit::after { width: 9px; height: 9px; left: auto; right: 4%; top: 68%; background: var(--coral); }
.hero-illustration { width: min(37vw, 540px); position: relative; z-index: 2; filter: drop-shadow(0 24px 25px rgba(74,53,131,.14)); }
.float-card { position: absolute; z-index: 3; padding: 13px 17px; border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: 0 13px 30px rgba(65,48,110,.12); display: flex; align-items: center; gap: 10px; animation: float 5s ease-in-out infinite; }
.float-card strong { display: block; font-family: var(--font-display); font-size: 16px; }
.float-card small { color: var(--muted); font-size: 11px; }
.float-card .float-icon { width: 37px; height: 37px; border-radius: 11px; display: grid; place-items: center; background: var(--yellow-soft); color: #c58a16; }
.float-card.one { left: 8%; top: 23%; transform: rotate(-6deg); }
.float-card.two { right: 6%; bottom: 24%; transform: rotate(5deg); animation-delay: -2s; }
.float-card.two .float-icon { background: var(--mint-soft); color: #369c7c; }
.art-note { position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%); z-index: 3; font-family: var(--font-display); color: #92516e; white-space: nowrap; font-size: 17px; }
@keyframes float { 0%, 100% { margin-top: 0; } 50% { margin-top: -10px; } }

/* Fox illustration */
.fox-svg { overflow: visible; }
.fox-svg .fox-tail, .fox-svg .fox-head { transform-origin: center; }
.fox-svg .fox-tail { animation: tail 4s ease-in-out infinite; }
@keyframes tail { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(3deg); } }

/* Assessment */
.assessment-page { min-height: 100vh; background: var(--paper); padding: 30px; position: relative; }
.assessment-page::before { content: ""; position: fixed; width: 420px; height: 420px; border-radius: 50%; background: var(--purple-soft); right: -180px; top: -200px; }
.assessment-top { max-width: 1100px; margin: 0 auto 34px; display: flex; justify-content: space-between; align-items: center; position: relative; }
.assessment-layout { max-width: 1020px; margin: 4vh auto 0; display: grid; grid-template-columns: 1.15fr .85fr; gap: 54px; align-items: center; position: relative; }
.assessment-intro h1 { font-size: clamp(38px, 5vw, 57px); line-height: 1.1; margin-bottom: 20px; }
.assessment-intro p { color: var(--muted); font-size: 16px; max-width: 530px; }
.assessment-facts { display: flex; gap: 12px; margin: 26px 0 30px; flex-wrap: wrap; }
.assessment-fact { padding: 10px 14px; background: white; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.assessment-fact .icon { color: var(--purple); width: 18px; }
.assessment-illustration { background: var(--purple-soft); min-height: 450px; border-radius: 44% 44% 25px 25px; display: grid; place-items: center; position: relative; }
.assessment-illustration .hero-illustration { width: 85%; }
.assessment-quote { position: absolute; background: white; border-radius: 16px 16px 16px 3px; padding: 14px 18px; box-shadow: var(--shadow); bottom: 24px; left: -24px; font-size: 13px; font-weight: 600; max-width: 220px; }
.quiz-shell { max-width: 760px; margin: 0 auto; position: relative; }
.quiz-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; color: var(--muted); font-size: 13px; }
.progress-track { height: 8px; background: #e9e5ef; border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--purple); transition: width .35s ease; }
.quiz-card { margin-top: 28px; padding: clamp(26px, 5vw, 48px); min-height: 440px; display: flex; flex-direction: column; }
.quiz-type { color: var(--purple); margin-bottom: 13px; }
.quiz-card h1 { font-size: clamp(27px, 4vw, 36px); line-height: 1.25; margin-bottom: 10px; }
.quiz-help { color: var(--muted); margin-bottom: 25px; }
.reading-box { background: #f7f5fc; border-left: 4px solid var(--purple); border-radius: 5px 14px 14px 5px; padding: 16px 19px; line-height: 1.6; margin-bottom: 24px; }
.quiz-options { display: grid; gap: 11px; }
.quiz-option { width: 100%; min-height: 55px; border: 2px solid var(--line); border-radius: 14px; background: white; text-align: left; padding: 13px 17px; display: flex; align-items: center; gap: 13px; font-weight: 600; transition: border .15s, background .15s, transform .15s; }
.quiz-option:hover { border-color: #bcb0e9; transform: translateX(3px); }
.quiz-option.selected { border-color: var(--purple); background: var(--purple-soft); color: var(--purple-dark); }
.option-letter { width: 28px; height: 28px; border-radius: 8px; background: #f3f1f6; display: grid; place-items: center; font-size: 12px; flex: 0 0 auto; }
.quiz-option.selected .option-letter { background: var(--purple); color: white; }
.quiz-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: auto; padding-top: 30px; }
.writing-input { width: 100%; resize: vertical; min-height: 160px; border: 2px solid var(--line); border-radius: 15px; padding: 17px; line-height: 1.65; color: var(--ink); }
.writing-input:focus { border-color: var(--purple); outline: none; }
.word-count { text-align: right; color: var(--muted); font-size: 12px; margin-top: 7px; }
.result-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: var(--purple-soft); }
.result-card { width: min(100%, 660px); text-align: center; padding: clamp(30px, 6vw, 55px); position: relative; overflow: hidden; }
.result-badge { width: 96px; height: 96px; margin: 0 auto 20px; border-radius: 30px; background: var(--yellow-soft); color: #d69a25; display: grid; place-items: center; transform: rotate(-4deg); }
.result-badge .icon { width: 54px; height: 54px; }
.result-card h1 { font-size: 42px; margin-bottom: 12px; }
.result-level { display: inline-flex; border-radius: 999px; padding: 8px 17px; background: var(--purple-soft); color: var(--purple-dark); font-weight: 700; margin-bottom: 18px; }
.result-card p { color: var(--muted); max-width: 490px; margin: 0 auto 24px; }
.result-rewards { display: flex; justify-content: center; gap: 12px; margin-bottom: 28px; }

/* Application shell */
.app-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: #3f2939; color: white; padding: 28px 18px 22px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 20; }
.sidebar .brand { margin: 0 10px 38px; }
.nav-list { display: grid; gap: 8px; }
.nav-item { border: 0; background: transparent; color: #a8a4bb; width: 100%; border-radius: 12px; min-height: 47px; display: flex; align-items: center; gap: 13px; padding: 0 14px; font-weight: 600; text-align: left; transition: background .15s, color .15s; }
.nav-item:hover { background: rgba(255,255,255,.06); color: white; }
.nav-item.active { background: var(--purple); color: white; box-shadow: 0 6px 18px rgba(0,0,0,.15); }
.nav-item .icon { width: 19px; }
.nav-badge { margin-left: auto; min-width: 21px; height: 21px; border-radius: 7px; display: grid; place-items: center; background: var(--coral); color: #34243d; font-size: 10px; }
.sidebar-bottom { margin-top: auto; }
.daily-mini { border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 15px; margin-bottom: 18px; background: rgba(255,255,255,.035); }
.daily-mini-top { display: flex; justify-content: space-between; font-size: 11px; color: #bbb6cc; margin-bottom: 10px; }
.daily-mini-top strong { color: white; }
.daily-mini .progress-track { background: rgba(255,255,255,.12); height: 6px; }
.daily-mini .progress-fill { background: var(--coral); }
.sidebar-profile { display: flex; align-items: center; gap: 10px; padding: 8px; }
.avatar { width: 38px; height: 38px; border-radius: 12px; background: var(--yellow); display: grid; place-items: center; font-family: var(--font-display); font-size: 18px; color: #433342; text-transform: uppercase; flex: 0 0 auto; }
.sidebar-profile-text { min-width: 0; flex: 1; }
.sidebar-profile strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile small { color: #9e99b1; font-size: 10px; }
.sidebar-profile button { border: 0; background: none; color: #a8a4bb; padding: 4px; }
.sidebar-profile .icon { width: 17px; }
.main-area { min-width: 0; }
.mobile-header, .mobile-nav { display: none; }
.dashboard { max-width: 1350px; margin: 0 auto; padding: 33px clamp(25px, 3.5vw, 52px) 48px; }
.dashboard-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.greeting h1 { font-size: clamp(29px, 3vw, 38px); margin-bottom: 4px; }
.greeting p { margin: 0; color: var(--muted); }
.top-stats { display: flex; gap: 9px; }
.streak-pill { color: #b46832; background: #fff0e5; }
.streak-pill .icon { fill: #f39b61; stroke: #e68041; }
.star-pill { color: #9b711c; background: var(--yellow-soft); }
.star-pill .icon { fill: var(--yellow); stroke: #e0aa35; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .85fr); gap: 24px; }
.dashboard-main, .dashboard-aside { display: grid; gap: 22px; align-content: start; min-width: 0; }
.adventure-card { position: relative; background: var(--purple); color: white; border-radius: 25px; overflow: hidden; min-height: 305px; box-shadow: 0 12px 30px rgba(143,49,91,.2); }
.adventure-card::before { content: ""; position: absolute; width: 300px; height: 300px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; right: -60px; top: -100px; box-shadow: 0 0 0 45px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.025); }
.adventure-content { padding: 31px 30px 25px; width: 64%; position: relative; z-index: 3; }
.adventure-content .eyebrow { color: #dcd4ff; margin-bottom: 13px; }
.adventure-content h2 { font-size: clamp(27px, 3vw, 37px); line-height: 1.12; margin-bottom: 10px; }
.adventure-content > p { color: #ded7f8; font-size: 13px; margin-bottom: 20px; }
.adventure-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 25px; }
.adventure-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.12); font-size: 11px; font-weight: 600; }
.adventure-chip .icon { width: 14px; height: 14px; }
.adventure-art { position: absolute; width: 40%; right: 0; bottom: 0; top: 0; z-index: 2; display: flex; align-items: flex-end; justify-content: center; }
.adventure-art svg { width: 115%; max-height: 100%; }
.adventure-steps { background: rgba(35,28,72,.17); padding: 14px 27px; display: flex; gap: 0; position: relative; z-index: 4; }
.adventure-step { flex: 1; display: flex; align-items: center; gap: 9px; font-size: 11px; color: #dcd4f5; }
.adventure-step:not(:last-child)::after { content: ""; height: 1px; background: rgba(255,255,255,.18); flex: 1; margin: 0 12px; }
.step-number { width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.12); font-weight: 700; flex: 0 0 auto; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-heading h2, .section-heading h3 { font-size: 20px; margin: 0; }
.section-heading .text-button { font-size: 12px; }
.today-path { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.path-card { padding: 18px 16px; border: 1px solid var(--line); border-radius: 17px; background: white; }
.path-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--purple-soft); color: var(--purple); margin-bottom: 12px; }
.path-card:nth-child(2) .path-icon { background: var(--yellow-soft); color: #cf951f; }
.path-card:nth-child(3) .path-icon { background: var(--mint-soft); color: #379979; }
.path-card strong { display: block; font-size: 13px; margin-bottom: 4px; }
.path-card small { color: var(--muted); font-size: 11px; }
.coach-card { padding: 22px; position: relative; overflow: hidden; }
.coach-head { display: flex; gap: 14px; align-items: center; position: relative; z-index: 2; }
.coach-avatar { width: 70px; height: 70px; border-radius: 21px; background: var(--purple-soft); display: grid; place-items: center; overflow: hidden; flex: 0 0 auto; }
.coach-avatar svg { width: 78px; transform: translateY(12px); }
.coach-title { flex: 1; }
.coach-title .eyebrow { color: var(--purple); font-size: 9px; margin-bottom: 4px; }
.coach-title h3 { margin: 0; font-size: 21px; }
.online-dot { display: inline-block; width: 6px; height: 6px; background: var(--mint); border-radius: 50%; margin-right: 4px; }
.coach-title small { color: var(--muted); font-size: 10px; }
.coach-bubble { margin: 17px 0 15px; padding: 14px 16px; background: #f6f4fb; border-radius: 4px 15px 15px 15px; color: #5d596d; font-size: 12px; line-height: 1.6; }
.coach-card .btn { width: 100%; }
.week-card { padding: 21px; }
.week-total { color: var(--muted); font-size: 11px; }
.week-bars { height: 115px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 17px; }
.day-bar { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; }
.bar-track { width: 100%; max-width: 22px; flex: 1; display: flex; align-items: flex-end; background: #f1eff4; border-radius: 7px; overflow: hidden; }
.bar-fill { width: 100%; min-height: 4px; background: #dcd6ee; border-radius: 7px; }
.day-bar.today .bar-fill { background: var(--coral); }
.day-bar.today .bar-track { background: #fff0e8; }
.day-bar small { color: var(--muted); font-size: 10px; }
.day-bar.today small { width: 22px; height: 22px; display: grid; place-items: center; background: var(--coral); color: #432d3c; border-radius: 7px; font-weight: 700; }
.words-preview { padding: 21px; }
.word-list { display: grid; gap: 10px; }
.word-row { display: flex; align-items: center; gap: 11px; }
.word-sound { width: 31px; height: 31px; border: 0; background: var(--purple-soft); color: var(--purple); border-radius: 9px; display: grid; place-items: center; }
.word-sound .icon { width: 15px; }
.word-text { flex: 1; min-width: 0; }
.word-text strong { font-family: var(--font-display); font-size: 14px; }
.word-text small { display: block; color: var(--muted); font-size: 10px; }
.mastery-dots { display: flex; gap: 3px; }
.mastery-dot { width: 4px; height: 4px; border-radius: 50%; background: #e5e2eb; }
.mastery-dot.on { background: var(--mint); }

/* Quest map */
.view-title { margin-bottom: 26px; }
.view-title h1 { font-size: 34px; margin-bottom: 6px; }
.view-title p { color: var(--muted); margin: 0; }
.journey-banner { padding: 23px 27px; margin-bottom: 24px; display: flex; align-items: center; gap: 22px; background: #3f2939; color: white; }
.journey-banner .trophy { width: 52px; height: 52px; border-radius: 16px; background: rgba(255,201,92,.15); color: var(--yellow); display: grid; place-items: center; }
.journey-banner .trophy .icon { width: 30px; height: 30px; }
.journey-banner h2 { font-size: 21px; margin: 0 0 4px; }
.journey-banner p { margin: 0; color: #b9b4c9; font-size: 12px; }
.journey-progress { margin-left: auto; min-width: 150px; }
.journey-progress .progress-track { background: rgba(255,255,255,.12); }
.journey-progress .progress-fill { background: var(--yellow); }
.journey-progress small { display: block; text-align: right; margin-top: 7px; color: #b9b4c9; }
.quest-map { padding: 30px; position: relative; overflow: hidden; background-image: radial-gradient(#e5e0ef 1px, transparent 1px); background-size: 24px 24px; }
.chapter-label { text-align: center; margin-bottom: 30px; }
.chapter-label span { display: inline-block; background: var(--purple-soft); color: var(--purple); border-radius: 99px; padding: 7px 15px; font-size: 11px; font-weight: 700; }
.chapter-label h2 { margin: 10px 0 0; font-size: 26px; }
.quest-path { max-width: 620px; margin: 0 auto; position: relative; display: grid; gap: 18px; }
.quest-path::before { content: ""; position: absolute; width: 3px; top: 35px; bottom: 35px; left: 50%; background: repeating-linear-gradient(to bottom, #d7d0e9 0 7px, transparent 7px 14px); transform: translateX(-50%); }
.quest-node { display: flex; align-items: center; width: 70%; position: relative; z-index: 2; }
.quest-node:nth-child(even) { margin-left: auto; flex-direction: row-reverse; }
.quest-button { width: 67px; height: 67px; border-radius: 22px; border: 5px solid white; background: var(--purple); color: white; display: grid; place-items: center; box-shadow: 0 5px 0 #cfc6e9, 0 7px 20px rgba(58,44,101,.12); flex: 0 0 auto; }
.quest-button .icon { width: 27px; height: 27px; }
.quest-button.locked { background: #e6e2ec; color: #aaa3b7; box-shadow: 0 5px 0 #d8d3df; }
.quest-button.done { background: var(--mint); color: #225c4b; }
.quest-info { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 13px 17px; margin-left: 16px; flex: 1; box-shadow: 0 5px 16px rgba(47,40,70,.04); }
.quest-node:nth-child(even) .quest-info { margin-left: 0; margin-right: 16px; }
.quest-info strong { font-family: var(--font-display); display: block; font-size: 15px; }
.quest-info small { color: var(--muted); font-size: 11px; }
.quest-reward { color: #b28124; font-size: 10px; margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.quest-reward .icon { width: 12px; height: 12px; }

/* Library and progress */
.tab-row { display: flex; gap: 8px; margin-bottom: 20px; }
.tab-button { border: 1px solid var(--line); background: white; border-radius: 11px; padding: 9px 16px; font-weight: 600; color: var(--muted); }
.tab-button.active { background: var(--purple); border-color: var(--purple); color: white; }
.library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.word-card { padding: 21px; position: relative; }
.word-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.word-card h3 { font-size: 24px; margin: 0 0 3px; }
.word-translation { color: var(--purple); font-weight: 600; font-size: 12px; }
.word-example { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 17px 0; }
.word-card-footer { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: var(--muted); }
.story-card { padding: 25px; margin-bottom: 15px; }
.story-card h3 { margin-bottom: 10px; }
.story-body { white-space: pre-wrap; color: #555164; }
.story-feedback { background: var(--purple-soft); padding: 14px; border-radius: 12px; font-size: 12px; margin-top: 15px; }
.empty-state { text-align: center; padding: 55px 25px; }
.empty-icon { width: 76px; height: 76px; border-radius: 24px; background: var(--purple-soft); color: var(--purple); display: grid; place-items: center; margin: 0 auto 18px; }
.empty-icon .icon { width: 37px; height: 37px; }
.empty-state h2 { margin-bottom: 8px; }
.empty-state p { color: var(--muted); max-width: 400px; margin: 0 auto 22px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 23px; }
.stat-card { padding: 21px; }
.stat-icon { width: 37px; height: 37px; border-radius: 11px; display: grid; place-items: center; background: var(--purple-soft); color: var(--purple); margin-bottom: 15px; }
.stat-card:nth-child(2) .stat-icon { background: var(--yellow-soft); color: #cb9323; }
.stat-card:nth-child(3) .stat-icon { background: var(--mint-soft); color: #399879; }
.stat-card:nth-child(4) .stat-icon { background: #ffebe4; color: var(--coral-dark); }
.stat-card strong { display: block; font-family: var(--font-display); font-size: 27px; }
.stat-card small { color: var(--muted); font-size: 11px; }
.progress-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.progress-panel { padding: 24px; }
.progress-panel h2 { font-size: 20px; margin-bottom: 20px; }
.skill-row { margin-bottom: 18px; }
.skill-label { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 8px; }
.skill-label span:last-child { color: var(--muted); }
.memory-list { display: grid; gap: 11px; }
.memory-item { display: flex; align-items: flex-start; gap: 11px; padding: 12px; border-radius: 13px; background: #f8f6fc; font-size: 12px; line-height: 1.5; color: #5f596d; }
.memory-item .icon { color: var(--purple); width: 17px; margin-top: 2px; }
.parent-note { padding: 17px 20px; margin-top: 22px; font-size: 12px; color: var(--muted); box-shadow: none; }
.parent-note strong { color: var(--ink); }

/* Learning session */
.lesson-page { min-height: 100vh; background: #f5f3fa; }
.lesson-header { height: 78px; padding: 0 clamp(18px, 4vw, 45px); background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 24px; position: sticky; top: 0; z-index: 20; }
.lesson-header .brand-name { font-size: 22px; }
.lesson-header .brand-mark { width: 34px; height: 34px; }
.lesson-header .brand-sub { display: none; }
.lesson-steps { display: flex; align-items: center; justify-content: center; flex: 1; }
.lesson-step { display: flex; align-items: center; gap: 8px; color: #a29dad; font-size: 11px; font-weight: 600; }
.lesson-step:not(:last-child)::after { content: ""; width: clamp(20px, 4vw, 65px); height: 2px; background: #e6e2ed; margin: 0 12px; }
.lesson-step .step-number { background: #eeebf2; width: 27px; height: 27px; }
.lesson-step.active { color: var(--purple); }
.lesson-step.active .step-number { background: var(--purple); color: white; }
.lesson-step.done .step-number { background: var(--mint); color: #225c4b; }
.lesson-timer { min-width: 104px; justify-content: center; background: var(--yellow-soft); color: #8a661f; }
.lesson-timer.warning { background: #ffebe4; color: #bc5e40; }
.lesson-main { max-width: 800px; margin: 0 auto; padding: 38px 24px 60px; }
.lesson-heading { text-align: center; margin-bottom: 26px; }
.lesson-heading .eyebrow { color: var(--purple); margin-bottom: 8px; }
.lesson-heading h1 { font-size: 32px; margin-bottom: 7px; }
.lesson-heading p { color: var(--muted); margin: 0; font-size: 13px; }
.lesson-card { padding: clamp(25px, 5vw, 46px); }
.lesson-prompt { text-align: center; }
.lesson-prompt h2 { font-size: clamp(24px, 4vw, 33px); line-height: 1.35; margin-bottom: 12px; }
.lesson-prompt > p { color: var(--muted); }
.lesson-word-art { width: 98px; height: 98px; border-radius: 30px; background: var(--purple-soft); display: grid; place-items: center; font-size: 45px; margin: 0 auto 20px; transform: rotate(-3deg); }
.lesson-options { margin-top: 28px; }
.lesson-feedback { margin-top: 19px; padding: 16px 18px; border-radius: 14px; font-size: 13px; line-height: 1.55; }
.lesson-feedback.correct { background: var(--mint-soft); color: #276a55; }
.lesson-feedback.try { background: var(--yellow-soft); color: #816122; }
.lesson-feedback strong { display: block; margin-bottom: 3px; }
.lesson-bottom { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 27px; }
.hint-button { display: inline-flex; gap: 7px; align-items: center; color: var(--muted); background: none; border: 0; font-size: 12px; font-weight: 600; }
.hint-button .icon { width: 17px; }
.swedish-hint { padding: 12px 15px; background: #f6f4fa; border-radius: 12px; color: var(--muted); font-size: 12px; margin-top: 16px; }
.story-paper { margin-top: 25px; }
.story-paper textarea { min-height: 220px; background-image: repeating-linear-gradient(white, white 31px, #eeeaf3 32px); line-height: 32px; }
.vocabulary-chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 15px; }
.vocabulary-chip { border: 1px solid #ddd5f4; color: var(--purple-dark); background: var(--purple-soft); border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 600; }
.vocabulary-chip small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.feedback-result { margin-top: 24px; display: grid; gap: 12px; }
.feedback-block { display: flex; align-items: flex-start; gap: 13px; padding: 15px; border-radius: 15px; background: #f7f5fb; }
.feedback-block.praise { background: var(--mint-soft); }
.feedback-block .icon { width: 19px; margin-top: 2px; color: var(--purple); }
.feedback-block.praise .icon { color: #368b70; }
.feedback-block strong { font-size: 12px; display: block; margin-bottom: 3px; }
.feedback-block p { margin: 0; font-size: 12px; line-height: 1.55; }
.improved-sentence { margin-top: 8px; padding: 8px 10px; background: white; border-radius: 8px; font-weight: 600; }
.loading-dots { display: inline-flex; gap: 5px; padding: 10px 0; }
.loading-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--purple); animation: dot 1s ease-in-out infinite; }
.loading-dots i:nth-child(2) { animation-delay: .15s; }
.loading-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-5px); opacity: 1; } }

/* Completion */
.completion-page { min-height: 100vh; display: grid; place-items: center; padding: 25px; background: #f7e5ef; overflow: hidden; position: relative; }
.completion-card { max-width: 600px; width: 100%; text-align: center; padding: 43px; position: relative; z-index: 2; }
.completion-crown { width: 104px; height: 104px; display: grid; place-items: center; border-radius: 34px; background: var(--yellow-soft); color: #d99e28; margin: 0 auto 20px; transform: rotate(-4deg); }
.completion-crown .icon { width: 57px; height: 57px; }
.completion-card h1 { font-size: 43px; margin-bottom: 9px; }
.completion-card > p { color: var(--muted); }
.reward-row { display: flex; justify-content: center; gap: 12px; margin: 25px 0; }
.reward-box { min-width: 120px; padding: 15px; border-radius: 16px; background: #f8f6fb; }
.reward-box strong { display: block; font-family: var(--font-display); font-size: 25px; }
.reward-box small { color: var(--muted); font-size: 11px; }
.next-badge { max-width: 340px; margin: 0 auto 27px; }
.next-badge-label { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 8px; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; width: 10px; height: 17px; top: -30px; background: var(--coral); animation: confetti-fall 4s linear infinite; }
.confetti i:nth-child(3n) { background: var(--yellow); transform: rotate(35deg); }
.confetti i:nth-child(3n+1) { background: var(--purple); border-radius: 50%; }
.confetti i:nth-child(4n) { background: var(--mint); }
@keyframes confetti-fall { to { top: 110%; transform: rotate(500deg); } }

/* Modal, chat, toast */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(28,24,45,.55); backdrop-filter: blur(5px); display: grid; place-items: center; padding: 20px; }
.modal { background: white; border-radius: 23px; width: min(100%, 460px); padding: 27px; box-shadow: 0 25px 80px rgba(20,15,40,.25); position: relative; }
.modal-close { position: absolute; top: 15px; right: 15px; }
.modal h2 { font-size: 25px; margin-bottom: 8px; }
.modal > p { color: var(--muted); font-size: 13px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 23px; }
.chat-modal { width: min(100%, 520px); padding: 0; overflow: hidden; }
.chat-header { background: var(--purple); color: white; padding: 20px 23px; display: flex; align-items: center; gap: 13px; }
.chat-header .coach-avatar { width: 49px; height: 49px; background: rgba(255,255,255,.16); border-radius: 15px; }
.chat-header .coach-avatar svg { width: 57px; }
.chat-header h2 { font-size: 20px; margin: 0; }
.chat-header small { color: #dcd5f4; }
.chat-header .modal-close { position: static; margin-left: auto; background: rgba(255,255,255,.12); border-color: transparent; color: white; }
.chat-messages { height: min(45vh, 370px); overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: #faf9fc; }
.chat-message { max-width: 85%; border-radius: 15px 15px 15px 4px; background: white; border: 1px solid var(--line); padding: 12px 14px; font-size: 13px; line-height: 1.55; align-self: flex-start; white-space: pre-wrap; }
.chat-message.user { align-self: flex-end; background: var(--purple); border-color: var(--purple); color: white; border-radius: 15px 15px 4px 15px; }
.chat-suggestions { display: flex; gap: 7px; padding: 12px 20px 0; overflow-x: auto; }
.chat-suggestion { white-space: nowrap; border: 1px solid #ddd5f4; background: var(--purple-soft); color: var(--purple-dark); border-radius: 99px; padding: 7px 10px; font-size: 11px; }
.chat-form { display: flex; gap: 9px; padding: 15px 20px 20px; }
.chat-input { flex: 1; min-width: 0; border: 2px solid var(--line); border-radius: 13px; padding: 0 14px; height: 47px; }
.chat-form .btn { width: 47px; height: 47px; min-height: 47px; padding: 0; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: #3f2939; color: white; padding: 12px 18px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; font-size: 13px; max-width: calc(100vw - 30px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Rigorous language review and skill evidence */
.skill-tag { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 6px 10px; background: var(--purple-soft); color: var(--purple-dark); font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.lesson-prompt .skill-tag { margin: 0 auto 13px; }
.analysis-loading { margin-top: 14px; padding: 18px; border: 1px dashed #dca6bf; border-radius: 15px; background: #fff8fb; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.analysis-loading strong { font-family: var(--font-display); font-size: 15px; }
.analysis-loading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.analysis-ready { margin-top: 14px; }
.analysis-toggle { width: 100%; min-height: 52px; color: var(--purple-dark); border-color: #e8c2d3; }
.detailed-analysis { margin-top: 16px; display: grid; gap: 15px; }
.analysis-summary { padding: 20px; border-radius: 16px; background: var(--purple-soft); }
.analysis-summary .eyebrow { color: var(--purple); margin-bottom: 7px; }
.analysis-summary h3 { font-size: 22px; margin-bottom: 7px; }
.analysis-summary p { margin: 0; color: #5e4755; font-size: 13px; line-height: 1.7; }
.observation-list { display: grid; gap: 12px; }
.observation-card { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: white; }
.observation-top { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.observation-number { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--purple); color: white; font-size: 11px; font-weight: 700; }
.correction-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.correction-pair > div { min-width: 0; padding: 12px 14px; border-radius: 11px; background: #f7f5f7; }
.correction-pair small { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.correction-pair p { margin: 5px 0 0; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.correction-pair .corrected-fragment { background: var(--mint-soft); }
.correction-pair .corrected-fragment small { color: #347860; }
.observation-explanation { margin-top: 13px; }
.observation-explanation > strong { font-size: 12px; }
.observation-explanation p { margin: 4px 0 0; color: #625967; font-size: 12px; line-height: 1.65; }
.example-line { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 9px 11px; background: var(--yellow-soft); border-radius: 9px; font-size: 12px; font-weight: 600; }
.example-line .icon { width: 15px; height: 15px; color: #b08124; margin-top: 2px; }
.corrected-story { border: 1px solid var(--line); border-radius: 14px; padding: 15px 17px; background: #faf9fb; }
.corrected-story summary { cursor: pointer; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.corrected-story summary .icon { width: 16px; }
.corrected-story p { white-space: pre-wrap; font-size: 13px; line-height: 1.75; margin: 16px 0 2px; }
.teacher-note { padding: 17px 19px; border-radius: 14px; background: #3f2939; color: white; }
.teacher-note strong { font-family: var(--font-display); }
.teacher-note p { margin: 5px 0 0; color: #e4d6df; font-size: 12px; line-height: 1.65; }
.panel-intro { color: var(--muted); font-size: 12px; line-height: 1.55; margin: -8px 0 18px; }
.skill-list { display: grid; gap: 4px; }
.skill-evidence { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0edf1; }
.skill-evidence:last-child { border-bottom: 0; }
.skill-evidence strong { display: block; font-size: 12px; }
.skill-evidence small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.skill-status { flex: 0 0 auto; border-radius: 99px; padding: 5px 8px; background: #f1eff2; color: var(--muted); font-size: 9px; font-weight: 700; }
.skill-status.developing { background: var(--yellow-soft); color: #8a6724; }
.skill-status.focus { background: var(--purple-soft); color: var(--purple-dark); }
.review-history { margin-top: 22px; }
.review-history-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.review-history-item { border: 1px solid var(--line); border-radius: 13px; background: white; padding: 12px; display: flex; align-items: center; gap: 11px; text-align: left; min-width: 0; }
.review-history-item:hover { border-color: #dca6bf; background: #fffafd; }
.review-history-item .path-icon { margin: 0; width: 35px; height: 35px; }
.review-history-item > span:nth-child(2) { flex: 1; min-width: 0; }
.review-history-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.review-history-item small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.review-history-item > .icon { width: 16px; color: var(--purple); }
.review-modal { width: min(100%, 850px); max-height: 90vh; overflow-y: auto; padding: 32px; }
.review-modal-head { padding-right: 45px; margin-bottom: 20px; }
.review-modal-head .eyebrow { color: var(--purple); }
.review-modal-head h2 { margin: 7px 0 3px; }
.review-modal-head p { margin: 0; color: var(--muted); font-size: 11px; }

/* Interactive stories, detective games and deterministic chapters */
.story-excerpt { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.story-card-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.original-story, .annotated-story { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 2.1; }
.original-story { padding: 22px; border-radius: 15px; background: #faf8fb; }
.story-tabs { display: flex; gap: 7px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 3px; }
.story-tabs .tab-button { white-space: nowrap; }
.annotated-story { padding: 24px; margin: 16px 0; border: 1px solid var(--line); border-radius: 16px; background: #fffdfe; background-image: repeating-linear-gradient(white, white 34px, #f3e8ee 35px); line-height: 35px; }
.story-annotation { display: inline; border: 0; border-bottom: 2px solid var(--purple); border-radius: 3px; padding: 1px 2px; background: var(--purple-soft); color: inherit; font: inherit; line-height: inherit; text-align: left; }
.story-annotation:hover, .story-annotation.selected { background: #f3bfd5; color: #6e2045; }
.story-annotation sup { color: var(--purple-dark); font-size: 9px; font-weight: 700; margin-left: 2px; }
.annotation-detail { margin-top: 12px; }
.game-intro, .game-complete { text-align: center; padding: 24px 10px; }
.game-intro p, .game-complete > p { color: var(--muted); max-width: 480px; margin: 0 auto 22px; }
.game-modal { width: min(100%, 700px); max-height: 90vh; overflow-y: auto; padding: 30px; }
.game-header { padding-right: 40px; margin-bottom: 22px; }
.game-header .eyebrow { color: var(--purple); margin-bottom: 6px; }
.game-header h2 { margin-bottom: 6px; }
.game-header p { color: var(--muted); font-size: 12px; margin: 0; }
.game-progress { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; font-weight: 700; margin-bottom: 8px; }
.game-round { padding-top: 25px; }
.game-round h2 { font-size: 27px; margin: 14px 0; }
.detective-clue { display: flex; align-items: flex-start; gap: 12px; padding: 18px; border-radius: 14px; background: var(--purple-soft); color: #67354e; font-size: 17px; line-height: 1.6; margin-bottom: 20px; }
.detective-clue .icon { color: var(--purple); margin-top: 4px; }
.game-next { width: 100%; margin-top: 20px; }
.game-complete .completion-crown { width: 82px; height: 82px; border-radius: 26px; }
.game-complete .completion-crown .icon { width: 43px; height: 43px; }
.chapter-unlocked { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 15px; margin: 16px 0; border-radius: 14px; background: var(--yellow-soft); color: #735421; }
.chapter-unlocked p { width: 100%; margin: 0; font-size: 12px; }
.chapter-home { display: flex; align-items: center; gap: 17px; padding: 18px 21px; margin-bottom: 22px; box-shadow: none; }
.chapter-home-icon { width: 45px; height: 45px; border-radius: 14px; background: var(--purple-soft); color: var(--purple); display: grid; place-items: center; flex: 0 0 auto; }
.chapter-home-copy { flex: 1; min-width: 0; }
.chapter-home-copy .eyebrow { color: var(--purple); font-size: 9px; }
.chapter-home-copy h2 { font-size: 19px; margin: 4px 0; }
.chapter-home-copy p { color: var(--muted); font-size: 11px; margin: 0; line-height: 1.5; }
.chapter-skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chapter-skills span { padding: 5px 8px; border-radius: 7px; background: #f3eff4; color: #716876; font-size: 9px; font-weight: 600; }
.chapter-skills.dark span { background: rgba(255,255,255,.1); color: #eadde6; }
.chapter-requirements-layout { display: grid; grid-template-columns: 1.35fr .85fr; gap: 22px; margin-bottom: 24px; }
.chapter-requirements, .next-chapter-card { padding: 24px; }
.chapter-requirements .section-heading h2, .next-chapter-card h2 { font-size: 23px; margin: 5px 0 0; }
.requirement-list { display: grid; gap: 9px; }
.requirement-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.requirement-check { width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center; background: #f0edf1; color: #aaa1ad; flex: 0 0 auto; }
.requirement-check .icon { width: 15px; }
.requirement-item strong { display: block; font-size: 12px; line-height: 1.45; }
.requirement-item small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.requirement-item.met { border-color: #bde3d6; background: #f5fcf9; }
.requirement-item.met .requirement-check { background: var(--mint); color: #285f4e; }
.next-chapter-card { background: var(--purple-soft); box-shadow: none; }
.next-chapter-card .eyebrow { color: var(--purple); }
.next-chapter-card > p { color: #6f5364; font-size: 13px; margin: 12px 0 20px; }
.next-chapter-card h3 { font-size: 15px; }
.next-chapter-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.next-chapter-card li { display: flex; gap: 9px; align-items: center; font-size: 12px; font-weight: 600; }
.next-chapter-card li .icon { width: 16px; color: var(--purple); }

/* Responsive */
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 200px minmax(0,1fr); }
  .sidebar { padding-left: 13px; padding-right: 13px; }
  .dashboard { padding-left: 25px; padding-right: 25px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.5fr) minmax(250px, .8fr); gap: 18px; }
  .adventure-content { width: 68%; padding-left: 24px; }
  .adventure-art { width: 37%; opacity: .9; }
  .adventure-steps { padding-left: 20px; padding-right: 20px; }
  .adventure-step { font-size: 10px; }
  .adventure-step:not(:last-child)::after { margin: 0 7px; }
  .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 850px) {
  .welcome { grid-template-columns: 1fr; }
  .welcome-content { min-height: 100vh; padding: 30px max(25px, 8vw); }
  .welcome-center { max-width: 550px; margin: auto; }
  .welcome-art { display: none; }
  .assessment-layout { grid-template-columns: 1fr; max-width: 650px; margin-top: 25px; }
  .assessment-illustration { display: none; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .mobile-header { height: 66px; background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; position: sticky; top: 0; z-index: 30; }
  .mobile-header .brand-mark { width: 33px; height: 33px; }
  .mobile-header .brand-name { font-size: 22px; }
  .mobile-header .brand-sub { display: none; }
  .mobile-header-stats { display: flex; gap: 7px; }
  .mobile-header .pill { padding: 7px 9px; font-size: 11px; }
  .mobile-nav { display: flex; position: fixed; z-index: 40; bottom: 0; left: 0; right: 0; height: calc(68px + env(safe-area-inset-bottom)); padding: 7px 12px env(safe-area-inset-bottom); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); justify-content: space-around; backdrop-filter: blur(12px); }
  .mobile-nav .nav-item { flex-direction: column; gap: 3px; justify-content: center; min-height: 53px; padding: 0 10px; font-size: 9px; width: auto; color: #9691a3; }
  .mobile-nav .nav-item.active { background: transparent; color: var(--purple); box-shadow: none; }
  .mobile-nav .nav-item .icon { width: 21px; height: 21px; }
  .mobile-nav .nav-badge { position: absolute; margin: -28px 0 0 25px; min-width: 16px; height: 16px; font-size: 8px; }
  .main-area { padding-bottom: 70px; }
  .dashboard { padding-top: 25px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-aside { grid-template-columns: 1fr 1fr; }
  .coach-card { grid-row: span 2; }
  .adventure-art svg { width: 100%; }
  .lesson-step span:last-child { display: none; }
  .lesson-header { gap: 15px; }
  .lesson-header > .brand { display: none; }
  .progress-columns { grid-template-columns: 1fr; }
  .chapter-requirements-layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 14px; }
  .welcome-content { padding: 25px 22px; }
  .welcome h1 { font-size: 43px; }
  .welcome-lead { font-size: 14px; }
  .name-row { display: grid; }
  .name-row .btn { width: 100%; }
  .welcome-features { gap: 12px; }
  .assessment-page { padding: 22px 17px; }
  .assessment-top { margin-bottom: 15px; }
  .assessment-top .pill { font-size: 11px; }
  .assessment-intro h1 { font-size: 38px; }
  .assessment-intro p { font-size: 14px; }
  .quiz-shell { margin-top: 25px; }
  .quiz-card { padding: 25px 20px; min-height: 465px; border-radius: 19px; }
  .quiz-card h1 { font-size: 27px; }
  .quiz-actions .btn { padding: 0 17px; }
  .result-page { padding: 17px; }
  .result-card { padding: 32px 20px; }
  .result-card h1 { font-size: 35px; }
  .dashboard { padding: 22px 16px 30px; }
  .dashboard-top { margin-bottom: 23px; }
  .greeting h1 { font-size: 28px; }
  .greeting p { font-size: 12px; }
  .top-stats { display: none; }
  .adventure-card { min-height: 355px; }
  .adventure-content { width: 100%; padding: 25px 23px 20px; }
  .adventure-content h2 { font-size: 30px; max-width: 260px; }
  .adventure-content > p { max-width: 230px; }
  .adventure-art { width: 49%; opacity: .4; }
  .adventure-chips { max-width: 245px; margin-bottom: 23px; }
  .adventure-content .btn { min-height: 49px; }
  .adventure-steps { padding: 13px 15px; }
  .adventure-step { flex-direction: column; align-items: flex-start; gap: 5px; }
  .adventure-step:not(:last-child)::after { display: none; }
  .step-number { width: 23px; height: 23px; }
  .today-path { gap: 8px; }
  .path-card { padding: 14px 11px; }
  .path-card strong { font-size: 11px; }
  .path-card small { font-size: 9px; }
  .path-icon { width: 34px; height: 34px; }
  .dashboard-aside { display: grid; grid-template-columns: 1fr; }
  .coach-card { grid-row: auto; }
  .coach-head { gap: 12px; }
  .coach-avatar { width: 60px; height: 60px; }
  .week-card, .words-preview { padding: 20px; }
  .view-title h1 { font-size: 29px; }
  .chapter-home { align-items: flex-start; flex-wrap: wrap; padding: 17px; }
  .chapter-home-copy { min-width: calc(100% - 65px); }
  .chapter-home > .btn { width: 100%; }
  .journey-banner { padding: 20px; gap: 14px; flex-wrap: wrap; }
  .chapter-requirements, .next-chapter-card { padding: 19px; }
  .story-card-actions .btn { width: 100%; }
  .annotated-story { padding: 17px; font-size: 15px; }
  .game-modal { padding: 24px 17px; }
  .game-round h2 { font-size: 23px; }
  .journey-progress { width: 100%; margin-left: 0; }
  .quest-map { padding: 25px 15px; }
  .quest-node { width: 89%; }
  .quest-button { width: 57px; height: 57px; border-radius: 18px; }
  .quest-info { padding: 11px 13px; margin-left: 11px; }
  .quest-node:nth-child(even) .quest-info { margin-right: 11px; }
  .library-grid { grid-template-columns: 1fr; }
  .stats-grid { gap: 10px; }
  .stat-card { padding: 17px; }
  .stat-card strong { font-size: 24px; }
  .progress-panel { padding: 20px; }
  .lesson-header { height: 67px; padding: 0 13px; gap: 8px; }
  .lesson-header .icon-button { width: 37px; height: 37px; }
  .lesson-steps { gap: 0; }
  .lesson-step:not(:last-child)::after { width: 17px; margin: 0 6px; }
  .lesson-step .step-number { width: 25px; height: 25px; }
  .lesson-timer { min-width: 88px; font-size: 11px; padding: 8px; }
  .lesson-main { padding: 26px 15px 40px; }
  .lesson-heading h1 { font-size: 27px; }
  .lesson-card { padding: 25px 18px; border-radius: 19px; }
  .lesson-prompt h2 { font-size: 25px; }
  .lesson-word-art { width: 80px; height: 80px; font-size: 38px; }
  .lesson-bottom { align-items: stretch; flex-direction: column-reverse; }
  .lesson-bottom .btn { width: 100%; }
  .hint-button { justify-content: center; min-height: 38px; }
  .story-paper textarea { min-height: 200px; }
  .completion-page { padding: 15px; }
  .completion-card { padding: 32px 20px; }
  .completion-card h1 { font-size: 35px; }
  .reward-box { min-width: 100px; }
  .correction-pair { grid-template-columns: 1fr; }
  .observation-card { padding: 15px; }
  .analysis-loading { align-items: flex-start; }
  .analysis-loading .loading-dots { display: none; }
  .review-history-list { grid-template-columns: 1fr; }
  .review-modal { padding: 24px 17px; max-height: 92vh; }
  .skill-evidence { gap: 7px; }
  .skill-status { font-size: 8px; }
  .modal-backdrop { padding: 12px; align-items: end; }
  .modal { border-radius: 23px 23px 15px 15px; }
  .chat-modal { height: min(88vh, 680px); display: flex; flex-direction: column; }
  .chat-messages { flex: 1; height: auto; }
  .chat-suggestions { flex: 0 0 auto; }
  .chat-form { flex: 0 0 auto; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .toast { bottom: 85px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
