:root {
  --sky-50: #f4fbff;
  --sky-100: #e6f6ff;
  --sky-200: #c7ebff;
  --sky-300: #8fd8ff;
  --sky-500: #2f9bff;
  --sky-600: #197de3;
  --navy-900: #102c4d;
  --navy-700: #24547f;
  --navy-500: #537899;
  --cloud: #fff;
  --sun: #ffc857;
  --success: #23ae73;
  --success-soft: #e9faf2;
  --error: #e75f68;
  --error-soft: #fff0f1;
  --warning: #ed9438;
  --warning-soft: #fff5e8;
  --line: #dceaf4;
  --muted: #71879b;
  --shadow-sm: 0 6px 18px rgba(32, 91, 135, 0.08);
  --shadow-md: 0 16px 44px rgba(32, 91, 135, 0.13);
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 30px;
  --sidebar: 232px;
  --topbar: 72px;
  font-family: Inter, ui-rounded, "SF Pro Rounded", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--navy-900);
  background: var(--sky-50);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 6%, rgba(255,255,255,.95) 0 5%, transparent 18%),
    linear-gradient(180deg, #dff4ff 0, #f6fbff 38%, #f7fbfe 100%);
  overflow-x: hidden;
}

button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, [tabindex]:focus-visible, select:focus-visible {
  outline: 3px solid rgba(47, 155, 255, .36);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--navy-900);
  color: #fff;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

.sky-decor { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.cloud { position: absolute; width: 150px; height: 44px; border-radius: 999px; background: rgba(255,255,255,.58); filter: blur(.2px); }
.cloud::before, .cloud::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.cloud::before { width: 64px; height: 64px; left: 28px; bottom: 4px; }
.cloud::after { width: 86px; height: 86px; right: 18px; bottom: 0; }
.cloud-a { top: 12%; right: 7%; transform: scale(.9); }
.cloud-b { top: 58%; left: 5%; transform: scale(.6); opacity: .55; }
.cloud-c { bottom: 5%; right: 16%; transform: scale(.45); opacity: .5; }
.contrail { position: absolute; right: -40px; top: 24%; width: 300px; height: 2px; transform: rotate(-13deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.9)); }

.app-shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 18px; background: rgba(255,255,255,.78); border-right: 1px solid rgba(255,255,255,.9); backdrop-filter: blur(18px); display: flex; flex-direction: column; z-index: 10; }
.brand, .mobile-brand { border: 0; background: none; padding: 0; display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; border-radius: 15px; background: linear-gradient(145deg, var(--sky-500), var(--sky-600)); color: white; box-shadow: 0 9px 20px rgba(47,155,255,.28); }
.brand-mark svg { width: 29px; fill: currentColor; }
.brand-mark.small { width: 34px; height: 34px; border-radius: 11px; font-size: 18px; }
.brand-copy { display: grid; }
.brand-copy strong { font-size: 17px; letter-spacing: .02em; }
.brand-copy small { color: var(--muted); margin-top: 3px; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }

.desktop-nav { display: grid; gap: 6px; margin-top: 40px; }
.nav-button { width: 100%; min-height: 48px; padding: 0 14px; display: flex; align-items: center; gap: 13px; border: 0; border-radius: 14px; background: transparent; color: var(--navy-500); cursor: pointer; text-align: left; transition: .2s ease; }
.nav-button:hover { background: var(--sky-100); color: var(--navy-900); transform: translateX(2px); }
.nav-button.active { background: linear-gradient(135deg, #e1f4ff, #f3faff); color: var(--sky-600); font-weight: 800; box-shadow: inset 3px 0 var(--sky-500); }
.nav-button svg, .icon-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav-badge { margin-left: auto; min-width: 21px; height: 21px; padding: 0 6px; display: grid; place-items: center; background: var(--warning-soft); color: #b56415; border-radius: 999px; font-size: 11px; font-weight: 800; }
.sidebar-foot { margin-top: auto; padding: 14px 10px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.sidebar-foot > span:last-child { display: grid; gap: 3px; font-size: 13px; }
.sidebar-foot small { color: var(--muted); }
.pilot-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #ffe18d, var(--sun)); color: #704700; font-weight: 900; }

.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; height: var(--topbar); display: flex; align-items: center; justify-content: flex-end; padding: 0 30px; background: rgba(229,247,255,.72); backdrop-filter: blur(15px); border-bottom: 1px solid rgba(255,255,255,.8); z-index: 8; }
.mobile-brand { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.staff-link { padding: 8px 13px; border-radius: 12px; color: var(--sky-600); background: rgba(255,255,255,.66); border: 1px solid rgba(255,255,255,.9); font-size: 12px; font-weight: 850; text-decoration: none; }
.staff-link:hover { background: #fff; }
.connection-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; background: rgba(255,255,255,.64); color: var(--navy-500); border: 1px solid rgba(255,255,255,.9); border-radius: 999px; font-size: 12px; }
.connection-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(35,174,115,.12); }
.icon-button { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.66); color: var(--navy-700); cursor: pointer; }
.icon-button:hover { background: #fff; }

#app-main { width: min(100%, 1440px); margin: 0 auto; padding: 34px clamp(22px, 4vw, 64px) 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 7px; color: var(--sky-600); font-size: 12px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(27px, 3.2vw, 42px); line-height: 1.12; letter-spacing: -.035em; }
h2 { font-size: clamp(21px, 2vw, 28px); letter-spacing: -.02em; }
h3 { font-size: 17px; }
.page-subtitle { margin: 0; color: var(--muted); line-height: 1.7; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .8fr); gap: 22px; }
.flight-hero { position: relative; min-height: 285px; padding: clamp(25px, 4vw, 42px); overflow: hidden; border-radius: var(--radius-lg); color: #fff; background: linear-gradient(135deg, #197ee8 0%, #38b1ff 58%, #79d6ff 100%); box-shadow: 0 24px 55px rgba(28,119,200,.22); }
.flight-hero::before, .flight-hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.17); }
.flight-hero::before { width: 290px; height: 290px; right: -80px; top: -100px; }
.flight-hero::after { width: 180px; height: 60px; right: 12%; bottom: -26px; filter: blur(4px); }
.hero-content { position: relative; z-index: 2; max-width: 620px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; background: rgba(255,255,255,.17); font-size: 12px; font-weight: 800; }
.flight-hero h2 { max-width: 550px; margin: 22px 0 12px; font-size: clamp(28px, 4vw, 45px); line-height: 1.13; }
.flight-hero p { max-width: 560px; color: rgba(255,255,255,.84); line-height: 1.7; }
.hero-plane { position: absolute; right: 7%; top: 22%; width: clamp(110px, 14vw, 190px); color: rgba(255,255,255,.96); transform: rotate(-8deg); filter: drop-shadow(0 15px 14px rgba(8,75,132,.2)); }
.hero-plane svg { width: 100%; fill: currentColor; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-top: 26px; }
.primary-button, .secondary-button, .ghost-button, .danger-button { min-height: 46px; padding: 0 19px; border-radius: 14px; border: 0; font-weight: 850; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.primary-button { color: #fff; background: linear-gradient(135deg, var(--sky-500), var(--sky-600)); box-shadow: 0 10px 20px rgba(25,125,227,.2); }
.flight-hero .primary-button { background: #fff; color: var(--sky-600); box-shadow: 0 11px 25px rgba(18,88,150,.22); }
.secondary-button { background: var(--sky-100); color: var(--sky-600); }
.flight-hero .secondary-button { color: #fff; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.35); }
.ghost-button { background: #fff; border: 1px solid var(--line); color: var(--navy-700); }
.danger-button { background: var(--error-soft); color: #b53f49; }
.primary-button:hover, .secondary-button:hover, .ghost-button:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.primary-button:disabled, .secondary-button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.glass-card, .content-card, .stat-card { background: rgba(255,255,255,.86); border: 1px solid rgba(255,255,255,.92); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); }
.glass-card { padding: 22px; border-radius: var(--radius); }
.streak-card { display: flex; flex-direction: column; min-height: 285px; }
.streak-top { display: flex; align-items: flex-start; justify-content: space-between; }
.sun-badge { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 18px; background: #fff5d8; color: #b77700; font-size: 25px; }
.streak-number { margin: 25px 0 5px; font-size: 48px; line-height: 1; font-weight: 950; color: var(--navy-900); }
.streak-label { color: var(--muted); }
.week-dots { margin-top: auto; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week-day { text-align: center; font-size: 10px; color: var(--muted); }
.week-day span { width: 27px; height: 27px; margin: 7px auto 0; display: grid; place-items: center; border-radius: 50%; background: var(--sky-100); color: var(--sky-600); font-weight: 800; }
.week-day.done span { background: var(--sun); color: #694400; }

.section-row { margin-top: 25px; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-title-row h2 { margin: 0; }
.text-button { border: 0; background: transparent; color: var(--sky-600); font-weight: 800; cursor: pointer; padding: 7px; }
.task-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; }
.task-card { padding: 20px; border-radius: 20px; background: rgba(255,255,255,.84); border: 1px solid rgba(255,255,255,.9); box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 15px; }
.task-icon { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 15px; background: var(--sky-100); color: var(--sky-600); font-size: 20px; }
.task-card.warning .task-icon { background: var(--warning-soft); color: var(--warning); }
.task-card.success .task-icon { background: var(--success-soft); color: var(--success); }
.task-copy { min-width: 0; display: grid; gap: 4px; }
.task-copy strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-copy small { color: var(--muted); }
.task-state { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 800; }

.journey-card { padding: 22px; border-radius: var(--radius); background: rgba(255,255,255,.82); border: 1px solid rgba(255,255,255,.95); box-shadow: var(--shadow-sm); }
.journey-track { position: relative; height: 68px; margin: 10px 8px 0; display: flex; align-items: center; justify-content: space-between; }
.journey-track::before { content: ""; position: absolute; left: 2%; right: 2%; top: 32px; border-top: 2px dashed #a8d7f2; }
.journey-stop { position: relative; z-index: 1; width: 42px; text-align: center; color: var(--muted); }
.journey-stop span { width: 32px; height: 32px; margin: 0 auto 6px; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 2px solid var(--line); font-size: 11px; font-weight: 900; }
.journey-stop.done span { background: var(--success); border-color: var(--success); color: #fff; }
.journey-stop.current span { background: var(--sky-500); border-color: #fff; color: #fff; box-shadow: 0 0 0 5px rgba(47,155,255,.17); }

.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 22px; align-items: start; }
.chapter-list { display: grid; gap: 12px; }
.chapter-card { border-radius: 20px; overflow: hidden; background: rgba(255,255,255,.86); border: 1px solid rgba(255,255,255,.95); box-shadow: var(--shadow-sm); }
.chapter-head { width: 100%; min-height: 78px; padding: 15px 19px; display: flex; align-items: center; gap: 14px; border: 0; background: transparent; cursor: pointer; text-align: left; }
.chapter-head:hover { background: var(--sky-50); }
.chapter-plane { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 15px; background: var(--sky-100); color: var(--sky-600); font-size: 20px; }
.chapter-meta { min-width: 0; flex: 1; }
.chapter-meta strong { display: block; margin-bottom: 5px; font-size: 15px; }
.chapter-meta small { color: var(--muted); }
.chapter-progress { width: 90px; }
.progress-bar { height: 7px; border-radius: 99px; overflow: hidden; background: #e4eff6; }
.progress-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sky-500), #66c9ff); }
.chevron { color: var(--muted); transition: transform .2s; }
.chapter-card.open .chevron { transform: rotate(180deg); }
.section-list { display: none; padding: 0 16px 16px 74px; }
.chapter-card.open .section-list { display: grid; }
.section-item { min-height: 54px; padding: 8px 6px; display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 10px; border-top: 1px solid #edf4f8; }
.section-status { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #edf4f8; color: var(--muted); font-size: 11px; font-weight: 900; }
.section-item.completed .section-status { background: var(--success-soft); color: var(--success); }
.section-item.current .section-status { background: var(--sky-500); color: #fff; }
.section-copy { min-width: 0; }
.section-copy strong { display: block; font-size: 14px; }
.section-copy small { color: var(--muted); font-size: 11px; }
.section-action { min-height: 34px; padding: 0 11px; border: 0; border-radius: 10px; background: var(--sky-100); color: var(--sky-600); font-size: 12px; font-weight: 800; cursor: pointer; }
.section-action:disabled { color: #9caebd; background: #f0f4f7; cursor: not-allowed; }
.sticky-side { position: sticky; top: calc(var(--topbar) + 22px); display: grid; gap: 15px; }
.mini-stat { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mini-stat:last-child { border: 0; }
.mini-stat span { color: var(--muted); }

.lesson-layout, .quiz-layout { display: grid; grid-template-columns: minmax(0, 800px) 280px; gap: 24px; justify-content: center; align-items: start; }
.lesson-progress, .quiz-progress { margin-bottom: 18px; }
.breadcrumb { margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }
.breadcrumb button { border: 0; background: transparent; padding: 0; color: var(--sky-600); cursor: pointer; }
.lesson-card { min-height: 420px; padding: clamp(24px, 5vw, 48px); border-radius: var(--radius-lg); background: rgba(255,255,255,.93); border: 1px solid #fff; box-shadow: var(--shadow-md); }
.card-label { display: inline-flex; padding: 7px 11px; border-radius: 999px; background: var(--sky-100); color: var(--sky-600); font-size: 11px; font-weight: 900; }
.lesson-card h1 { margin: 22px 0 17px; font-size: clamp(25px, 3.4vw, 39px); }
.lesson-body { font-size: 18px; line-height: 1.85; color: #355a79; }
.lesson-copy { display: grid; gap: 13px; font-size: 17px; line-height: 1.85; color: #355a79; }
.knowledge-paragraph { margin: 0; white-space: pre-line; }
.knowledge-paragraph.is-rule { padding: 12px 15px; border-left: 3px solid var(--sky-500); border-radius: 0 12px 12px 0; background: var(--sky-50); color: var(--navy-700); }
.knowledge-paragraph.is-example { padding: 15px 17px; border: 1px solid var(--sky-200); border-radius: 15px; background: linear-gradient(135deg, #eff9ff, #fbfeff); color: var(--navy-900); }
.lesson-note { margin-top: 28px; padding: 17px; display: grid; gap: 5px; border-radius: 16px; background: var(--warning-soft); color: #8b571e; }
.lesson-note span { font-size: 13px; line-height: 1.65; }
.example-box { margin-top: 28px; padding: 20px; border-radius: 18px; background: linear-gradient(135deg, #eff9ff, #f9fdff); border: 1px solid var(--sky-200); }
.example-en { margin-bottom: 8px; font-size: 20px; font-weight: 900; color: var(--navy-900); }
.example-zh { margin: 0; color: var(--muted); line-height: 1.6; }
.lesson-actions { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dot-progress { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.dot-progress span { width: 9px; height: 9px; border-radius: 99px; background: #d9e8f2; transition: .2s; }
.dot-progress span.active { width: 28px; background: var(--sky-500); }
.dot-progress span.done { background: var(--success); }

.quiz-card { padding: clamp(22px, 4vw, 38px); border-radius: var(--radius-lg); background: rgba(255,255,255,.94); border: 1px solid #fff; box-shadow: var(--shadow-md); }
.quiz-topline { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; color: var(--muted); font-size: 12px; }
.question-count { color: var(--sky-600); font-weight: 900; }
.question-type { padding: 6px 10px; border-radius: 99px; background: var(--sky-100); color: var(--sky-600); font-weight: 800; }
.question-stem { white-space: pre-line; font-size: clamp(20px, 2.4vw, 27px); line-height: 1.65; letter-spacing: -.01em; }
.option-list { margin-top: 24px; display: grid; gap: 12px; }
.option-button { width: 100%; min-height: 60px; padding: 13px 16px; display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 13px; border: 2px solid #e3edf4; border-radius: 17px; background: #fff; text-align: left; cursor: pointer; transition: .16s ease; }
.option-button:hover:not(:disabled) { border-color: var(--sky-300); background: var(--sky-50); transform: translateY(-1px); }
.option-button.selected { border-color: var(--sky-500); background: #eef8ff; box-shadow: 0 0 0 3px rgba(47,155,255,.09); }
.option-button.correct { border-color: var(--success); background: var(--success-soft); }
.option-button.wrong { border-color: var(--error); background: var(--error-soft); }
.option-code { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: #edf4f8; color: var(--navy-700); font-weight: 900; }
.selected .option-code { color: #fff; background: var(--sky-500); }
.correct .option-code { color: #fff; background: var(--success); }
.wrong .option-code { color: #fff; background: var(--error); }
.option-text { line-height: 1.55; overflow-wrap: anywhere; }
.quiz-submit { margin-top: 22px; width: 100%; }
.feedback-box { margin-top: 22px; padding: 19px; border-radius: 17px; border: 1px solid; }
.feedback-box.correct { background: var(--success-soft); border-color: #bee9d3; }
.feedback-box.wrong { background: var(--error-soft); border-color: #ffd0d4; }
.feedback-title { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; font-size: 17px; font-weight: 900; }
.feedback-box p { margin: 0; color: #48677f; line-height: 1.7; }
.question-report { margin: 9px -7px -5px auto; display: block; font-size: 12px; }
.waypoints { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.waypoint { height: 8px; border-radius: 99px; background: #dbe9f2; }
.waypoint.done { background: var(--success); }
.waypoint.current { background: var(--sky-500); box-shadow: 0 0 0 3px rgba(47,155,255,.12); }

.result-wrap { width: min(860px, 100%); margin: 0 auto; }
.result-hero { position: relative; overflow: hidden; padding: clamp(28px, 5vw, 48px); text-align: center; border-radius: var(--radius-lg); background: linear-gradient(145deg, #fff, #eef9ff); box-shadow: var(--shadow-md); }
.arrival-icon { width: 86px; height: 86px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 27px; background: linear-gradient(145deg, var(--sky-500), #5bc5ff); color: #fff; font-size: 38px; transform: rotate(-7deg); }
.score-ring { width: 132px; height: 132px; margin: 24px auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--sky-500) var(--score), #e3eff6 0); position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #fff; }
.score-ring strong { position: relative; font-size: 31px; }
.result-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 25px; }
.result-stat { padding: 16px 10px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.result-stat strong { display: block; font-size: 23px; }
.result-stat span { color: var(--muted); font-size: 12px; }
.result-actions { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filter-chip { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.78); color: var(--muted); cursor: pointer; font-weight: 750; }
.filter-chip.active { background: var(--sky-500); color: #fff; border-color: var(--sky-500); }
.wrong-list { display: grid; gap: 13px; }
.wrong-card { padding: 20px; border-radius: 20px; background: rgba(255,255,255,.88); border: 1px solid #fff; box-shadow: var(--shadow-sm); display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; }
.wrong-card h3 { margin-bottom: 8px; line-height: 1.55; }
.wrong-meta { display: flex; flex-wrap: wrap; gap: 8px 13px; color: var(--muted); font-size: 12px; }
.status-pill { display: inline-flex; padding: 5px 9px; border-radius: 99px; background: var(--warning-soft); color: #a85d17; font-weight: 850; }
.status-pill.mastered { background: var(--success-soft); color: var(--success); }
.status-pill.reviewing { background: var(--sky-100); color: var(--sky-600); }
.wrong-actions { display: flex; align-items: center; gap: 8px; }

.practice-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.practice-card { padding: 23px; border-radius: var(--radius); background: rgba(255,255,255,.87); border: 1px solid #fff; box-shadow: var(--shadow-sm); }
.practice-card .task-icon { margin-bottom: 28px; }
.practice-card p { min-height: 51px; color: var(--muted); line-height: 1.65; }
.select-field { width: 100%; min-height: 45px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 10px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { padding: 20px; border-radius: 19px; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; margin-top: 9px; font-size: clamp(24px,3vw,35px); }
.chart-card { margin-top: 18px; padding: 23px; border-radius: var(--radius); background: rgba(255,255,255,.87); border: 1px solid #fff; box-shadow: var(--shadow-sm); }
.bar-chart { height: 180px; display: flex; align-items: end; gap: 12px; padding-top: 20px; }
.bar-column { flex: 1; min-width: 0; text-align: center; color: var(--muted); font-size: 10px; }
.bar-column span { width: min(34px, 75%); min-height: 4px; margin: 0 auto 8px; display: block; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #5fc8ff, var(--sky-500)); }
.empty-state { padding: 55px 25px; text-align: center; border-radius: var(--radius); background: rgba(255,255,255,.76); border: 1px dashed var(--sky-300); }
.empty-plane { margin-bottom: 14px; color: var(--sky-500); font-size: 39px; }
.empty-state p { color: var(--muted); }

.mobile-nav { display: none; }
.toast-region { position: fixed; z-index: 100; right: 22px; bottom: 22px; display: grid; gap: 10px; }
.toast { max-width: 340px; padding: 13px 17px; border-radius: 14px; color: #fff; background: var(--navy-900); box-shadow: var(--shadow-md); animation: toast-in .22s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1199px) {
  :root { --sidebar: 82px; }
  .sidebar { padding-inline: 12px; }
  .brand { justify-content: center; }
  .brand-copy, .nav-button > span:not(.nav-badge), .sidebar-foot > span:last-child { display: none; }
  .nav-button { justify-content: center; padding: 0; }
  .nav-badge { position: absolute; transform: translate(13px,-12px); min-width: 17px; height: 17px; padding: 0 4px; }
  .desktop-nav .nav-button { position: relative; }
  .sidebar-foot { justify-content: center; padding-inline: 0; }
  .hero-grid { grid-template-columns: minmax(0,1fr) 250px; }
  .course-layout { grid-template-columns: minmax(0,1fr) 250px; }
  .lesson-layout, .quiz-layout { grid-template-columns: minmax(0,750px); }
  .lesson-layout .sticky-side, .quiz-layout .sticky-side { display: none; }
}

@media (max-width: 767px) {
  :root { --topbar: 60px; }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .sky-decor { opacity: .7; }
  .app-shell { display: block; min-height: auto; }
  .sidebar { display: none; }
  .topbar { height: var(--topbar); padding: 0 14px; justify-content: space-between; }
  .mobile-brand { display: flex; }
  .connection-pill { display: none; }
  #app-main { padding: 23px 16px 35px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 20px; }
  .hero-grid, .course-layout, .practice-options { grid-template-columns: 1fr; }
  .flight-hero { min-height: 360px; padding: 27px 23px; }
  .flight-hero h2 { max-width: 310px; margin-top: 18px; }
  .flight-hero p { max-width: 280px; }
  .hero-plane { right: -8px; top: auto; bottom: 14px; width: 150px; opacity: .78; }
  .streak-card { min-height: 230px; }
  .task-grid { grid-template-columns: 1fr; }
  .task-card { padding: 16px; }
  .journey-card { overflow-x: auto; }
  .journey-track { min-width: 520px; }
  .sticky-side { display: none; }
  .section-list { padding-left: 14px; }
  .chapter-progress { display: none; }
  .section-item { grid-template-columns: 30px minmax(0,1fr); }
  .section-action { grid-column: 2; justify-self: start; }
  .lesson-card { min-height: 450px; padding: 25px 21px; }
  .lesson-body { font-size: 17px; }
  .lesson-actions { align-items: stretch; }
  .lesson-actions button { flex: 1; padding-inline: 11px; }
  .quiz-card { padding: 20px 16px; border-radius: 22px; }
  .question-stem { font-size: 20px; }
  .option-button { min-height: 58px; padding: 11px; grid-template-columns: 32px minmax(0,1fr); }
  .quiz-submit { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 3; }
  .result-stats { grid-template-columns: repeat(3,1fr); }
  .result-stat { padding-inline: 4px; }
  .wrong-card { grid-template-columns: 1fr; }
  .wrong-actions { justify-content: flex-start; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .mobile-nav { position: fixed; left: 10px; right: 10px; bottom: max(8px, env(safe-area-inset-bottom)); z-index: 50; height: 64px; padding: 6px; display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(255,255,255,.92); border: 1px solid rgba(255,255,255,.96); border-radius: 21px; box-shadow: 0 14px 40px rgba(21,72,111,.18); backdrop-filter: blur(18px); }
  .mobile-nav .nav-button { min-height: 52px; padding: 3px; flex-direction: column; justify-content: center; gap: 2px; border-radius: 15px; font-size: 10px; }
  .mobile-nav .nav-button svg { width: 19px; height: 19px; }
  .mobile-nav .nav-button.active { box-shadow: none; background: var(--sky-100); }
  .mobile-nav .nav-badge { position: absolute; margin: 0; transform: translate(12px,-13px); }
  .toast-region { left: 14px; right: 14px; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
}

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