:root {
  --ink: #172033;
  --muted: #5c667a;
  --soft: #f4f7fb;
  --paper: #ffffff;
  --line: #dfe5ef;
  --brand: #246bfe;
  --brand-dark: #164cc7;
  --mint: #00a870;
  --mint-soft: #e8f8f1;
  --amber: #f6a800;
  --amber-soft: #fff4d7;
  --coral: #ef6b5e;
  --coral-soft: #fff0ee;
  --cyan: #1c93a8;
  --shadow: 0 18px 46px rgba(25, 38, 65, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(232, 248, 241, 0.65) 0%, rgba(245, 249, 255, 0.96) 34%, rgba(255, 247, 224, 0.55) 100%),
    linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(223, 229, 239, 0.58);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  width: min(1040px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #246bfe, #00a870);
  box-shadow: 0 10px 24px rgba(36, 107, 254, 0.22);
}

.brand-title {
  font-weight: 760;
  line-height: 1.15;
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.login-shell .page {
  padding-top: 0;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 360px;
  gap: 22px;
  align-items: start;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 24px;
  align-items: stretch;
}

.access-layout {
  width: min(920px, 100%);
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: stretch;
}

.access-stage {
  min-height: 100vh;
  display: block;
  padding: 82px 0 40px;
}

.hero-panel,
.panel,
.task-card,
.stat-card,
.modal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.hero-panel {
  min-height: 560px;
  padding: 34px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.auth-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 24px;
  align-self: start;
}

.access-card,
.locked-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.access-card {
  padding: 34px;
}

.access-stage .access-card {
  width: min(480px, 100%);
  margin: 0 auto;
  padding: 34px 32px;
  border: 1px solid rgba(214, 226, 241, 0.72);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 0%, rgba(36, 107, 254, 0.1), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(0, 168, 112, 0.12), transparent 30%),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(25, 38, 65, 0.13);
}

.access-head {
  display: grid;
  gap: 10px;
}

.login-brand {
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand strong {
  font-size: 16px;
  line-height: 1.15;
}

.login-brand span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.access-stage .access-card h1 {
  margin-top: 0;
  font-size: 34px;
  line-height: 1.14;
}

.access-stage .lead {
  margin-top: 0;
  max-width: 380px;
  font-size: 16px;
}

.access-card h1 {
  max-width: 540px;
  margin-top: 18px;
  font-size: 38px;
}

.locked-preview {
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.96)),
    repeating-linear-gradient(135deg, rgba(36, 107, 254, 0.06) 0 1px, transparent 1px 18px);
}

.lock-icon {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #164cc7;
  background: #e8f2ff;
}

.lock-icon svg {
  width: 26px;
  height: 26px;
}

.locked-preview h2 {
  margin-top: 18px;
}

.locked-list {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.locked-list div {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d9e3f2;
  border-radius: 8px;
  padding: 0 12px;
  color: #334057;
  background: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.locked-list svg {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--brand-dark);
  background: #edf3ff;
  border: 1px solid #d6e3ff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 680;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 720px;
  margin-top: 18px;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  font-size: 17px;
  line-height: 1.25;
}

.lead {
  max-width: 650px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.lesson-visual {
  margin-top: 26px;
  min-height: 250px;
  display: grid;
  grid-template-columns: 1fr 210px;
  border: 1px solid #d8e1ef;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f7fbff;
}

.board {
  position: relative;
  padding: 26px;
  background:
    linear-gradient(90deg, rgba(36, 107, 254, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(36, 107, 254, 0.08) 1px, transparent 1px),
    #fbfdff;
  background-size: 24px 24px;
}

.board-title {
  width: fit-content;
  padding: 8px 10px;
  border: 1px solid #bad2ff;
  border-radius: 8px;
  background: white;
  color: var(--brand-dark);
  font-weight: 760;
}

.formula {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  gap: 14px;
}

.formula-box {
  min-height: 86px;
  border: 2px solid #246bfe;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: white;
  font-size: 28px;
  font-weight: 800;
}

.teacher-panel {
  padding: 18px;
  background: #172033;
  color: white;
  display: grid;
  align-content: center;
  gap: 14px;
}

.teacher-card {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.teacher-avatar {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #172033;
  background: linear-gradient(135deg, #ffd66e, #ef6b5e);
  font-weight: 900;
  font-size: 28px;
}

.hero-metrics {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  border-left: 3px solid var(--brand);
  padding: 10px 12px;
  background: var(--soft);
  border-radius: 8px;
}

.metric strong {
  display: block;
  font-size: 20px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.form {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-weight: 680;
  font-size: 14px;
}

.input-wrap {
  position: relative;
}

.input-wrap .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #718096;
}

input {
  width: 100%;
  height: 52px;
  border: 1px solid #d4deec;
  border-radius: 14px;
  padding: 0 12px 0 40px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(36, 107, 254, 0.12);
}

.verify-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
}

.code-btn {
  min-height: 52px;
  padding: 0 10px;
  white-space: nowrap;
}

.agreement-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  color: #334057;
  font-size: 13px;
  line-height: 1.5;
}

.agreement-row input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin: 0 4px 0 0;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--brand);
}

.agreement-row label {
  font-weight: 500;
}

.text-link {
  min-height: auto;
  padding: 0;
  color: var(--brand);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
}

.access-submit {
  min-height: 52px;
  width: 100%;
  border-radius: 14px;
}

.access-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.access-foot div {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: start;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.access-foot svg {
  width: 18px;
  height: 18px;
  color: var(--brand);
  margin-top: 1px;
}

.form-alert {
  min-height: 44px;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid #ffc9c3;
  border-radius: 14px;
  color: #9a2f27;
  background: var(--coral-soft);
  font-size: 13px;
  line-height: 1.45;
}

.form-alert svg {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.form-alert-success {
  color: #036348;
  border-color: #b8ead5;
  background: #f2fff9;
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 0 15px;
  color: var(--ink);
  background: #eef3f9;
  cursor: pointer;
  font-weight: 740;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  color: white;
  background: var(--brand);
  box-shadow: 0 12px 24px rgba(36, 107, 254, 0.22);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--brand-dark);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: #fff;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: #b8c4d6;
  background: #f7faff;
}

.btn-danger {
  color: #9a2f27;
  background: var(--coral-soft);
}

.btn:focus-visible,
.option:focus-visible {
  outline: 3px solid rgba(36, 107, 254, 0.2);
  outline-offset: 2px;
}

.hint,
.helper {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-note {
  margin-top: 18px;
  padding: 12px;
  border-radius: 8px;
  color: #77540f;
  background: var(--amber-soft);
  border: 1px solid #ffe3a0;
  font-size: 13px;
  line-height: 1.5;
}

.panel {
  padding: 22px;
}

.welcome-panel {
  background:
    linear-gradient(90deg, rgba(232, 248, 241, 0.9), rgba(255, 255, 255, 0.96) 46%),
    var(--paper);
}

.panel + .panel,
.task-card + .panel {
  margin-top: 16px;
}

.select-page {
  width: min(1040px, 100%);
  margin: 8px auto 0;
}

.select-hero {
  margin-bottom: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.select-hero h1 {
  margin-top: 12px;
  font-size: 34px;
  line-height: 1.16;
}

.select-hero p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.choice-card {
  min-height: 380px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 16px;
  align-content: space-between;
}

.choice-card h2 {
  font-size: 24px;
  line-height: 1.22;
}

.choice-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.choice-art {
  min-height: 138px;
  border-radius: 8px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  background:
    linear-gradient(135deg, rgba(36, 107, 254, 0.12), rgba(0, 168, 112, 0.13)),
    repeating-linear-gradient(90deg, rgba(36, 107, 254, 0.08) 0 1px, transparent 1px 22px),
    #f8fbff;
}

.choice-art-done {
  background:
    linear-gradient(135deg, rgba(0, 168, 112, 0.12), rgba(246, 168, 0, 0.14)),
    #f8fbff;
}

.choice-symbol {
  justify-self: end;
  color: #172033;
  font-size: 44px;
  font-weight: 900;
}

.choice-progress {
  display: grid;
  gap: 9px;
}

.choice-progress div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.choice-progress strong {
  color: var(--ink);
}

.choice-bottom {
  display: grid;
  gap: 12px;
}

.choice-bottom > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.choice-meta {
  display: grid;
  gap: 10px;
}

.choice-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.choice-meta div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.choice-meta strong {
  color: var(--ink);
  text-align: right;
}

.completion-banner {
  margin-bottom: 16px;
  border: 1px solid #b8ead5;
  border-radius: 8px;
  background: #f2fff9;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 12px 32px rgba(0, 168, 112, 0.12);
}

.done-badge.small {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.empty-state {
  width: min(720px, 100%);
  margin: 48px auto 0;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.student-home,
.learning-room,
.quiz-screen {
  width: min(980px, 100%);
  margin: 0 auto;
}

.trial-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(232, 248, 241, 0.76) 100%),
    var(--paper);
  box-shadow: var(--shadow);
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 22px;
  align-items: center;
}

.trial-hero h1 {
  margin-top: 6px;
  font-size: 34px;
  line-height: 1.15;
}

.hero-kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.hero-progress {
  min-height: 160px;
  border: 1px solid rgba(36, 107, 254, 0.16);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  align-content: center;
  justify-items: stretch;
  gap: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.hero-progress strong {
  margin-top: 4px;
  font-size: 38px;
  line-height: 1;
}

.hero-progress > span:not(.status-pill) {
  color: var(--muted);
  font-size: 12px;
}

.learning-path {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.step-card {
  position: relative;
  min-height: 300px;
  border: 1px solid rgba(214, 226, 241, 0.95);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 24px;
  display: grid;
  gap: 18px;
  align-content: space-between;
  overflow: hidden;
}

.step-index {
  position: absolute;
  right: 18px;
  top: 14px;
  color: #e6edf6;
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
}

.step-title-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.step-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: #eaf2ff;
}

.step-main h2 {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  font-size: 28px;
}

.step-main p {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.step-meta {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334057;
  font-size: 13px;
  font-weight: 700;
}

.step-meta svg {
  width: 17px;
  height: 17px;
  color: var(--brand);
}

.btn-disabled,
.btn:disabled {
  color: #718096;
  background: #f0f4f8;
  box-shadow: none;
  cursor: not-allowed;
}

.home-note {
  margin-top: 16px;
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  background: #f8fbff;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.home-note svg {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

.room-head,
.quiz-head {
  margin-bottom: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.room-head h1,
.quiz-head h1 {
  margin-top: 10px;
  font-size: 30px;
}

.compact-btn {
  min-height: 36px;
  padding: 0 12px;
}

.lesson-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: stretch;
}

.lesson-player,
.lesson-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.lesson-player {
  overflow: hidden;
}

.lesson-slide {
  min-height: 460px;
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(36, 107, 254, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(36, 107, 254, 0.08) 1px, transparent 1px),
    #fbfdff;
  background-size: 28px 28px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.slide-label {
  border: 1px solid #bad2ff;
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--brand-dark);
  background: white;
  font-size: 13px;
  font-weight: 800;
}

.lesson-slide h2 {
  margin-top: 16px;
  font-size: 32px;
}

.lesson-slide p {
  max-width: 520px;
  margin-top: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.area-model {
  margin-top: 24px;
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 2px solid var(--brand);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.area-cell {
  min-height: 78px;
  border-right: 1px solid #b9cdf9;
  border-bottom: 1px solid #b9cdf9;
  background: #fff;
}

.area-cell:nth-child(4n) {
  border-right: 0;
}

.area-cell:nth-child(n + 5) {
  border-bottom: 0;
}

.area-cell.active {
  background: #dcebff;
}

.area-cell.result {
  background: #c9f4df;
}

.area-cell.split {
  background: linear-gradient(90deg, #dcebff 50%, #ffffff 50%);
}

.area-cell.muted {
  background: #fff;
}

.lesson-controls {
  padding: 15px 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}

.lesson-panel {
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 18px;
}

.key-list {
  display: grid;
  gap: 12px;
}

.key-list div {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  color: #334057;
  line-height: 1.45;
}

.key-list svg {
  width: 19px;
  height: 19px;
  color: var(--mint);
}

.next-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 15px;
  display: grid;
  gap: 12px;
}

.next-card p {
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.quiz-screen {
  width: min(840px, 100%);
}

.question-card.focused {
  padding: 26px;
}

.quiz-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.question-dots {
  display: flex;
  gap: 8px;
}

.question-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #cbd7e8;
  color: #536176;
  background: white;
  cursor: pointer;
  font-weight: 800;
}

.question-dot.current {
  color: white;
  border-color: var(--brand);
  background: var(--brand);
}

.question-dot.answered:not(.current) {
  color: #036348;
  border-color: #b8ead5;
  background: var(--mint-soft);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.student-strip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #172033, #246bfe);
  font-weight: 820;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.status-ready {
  color: #1d4e85;
  background: #e8f2ff;
}

.status-learning {
  color: #77540f;
  background: var(--amber-soft);
}

.status-done {
  color: #036348;
  background: var(--mint-soft);
}

.task-card {
  padding: 22px;
  overflow: hidden;
}

.course-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border-radius: 999px;
  padding: 5px 9px;
  color: #334057;
  background: #eef3f9;
  font-size: 12px;
  font-weight: 680;
}

.task-body {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 18px;
  align-items: end;
}

.lesson-card-visual {
  min-height: 190px;
  padding: 18px;
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(36, 107, 254, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(36, 107, 254, 0.08) 1px, transparent 1px),
    #fbfdff;
  background-size: 22px 22px;
}

.formula.compact {
  grid-template-columns: 1fr;
  gap: 10px;
}

.formula.compact .formula-box {
  min-height: 42px;
  font-size: 20px;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}

.dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: var(--brand);
}

.dot.pending {
  color: #738096;
  background: #e8edf5;
}

.dot.done {
  background: var(--mint);
}

.timeline-title {
  font-weight: 760;
}

.timeline-desc {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.progress-wrap {
  display: grid;
  gap: 8px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: #e6edf6;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--mint));
  transition: width 240ms ease;
}

.side-stack {
  display: grid;
  gap: 16px;
}

.stat-card {
  padding: 18px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
}

.stat strong {
  display: block;
  font-size: 22px;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

.data-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.data-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.data-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.data-list strong {
  color: var(--ink);
  text-align: right;
  font-weight: 760;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.player {
  border: 1px solid #cfd9e8;
  border-radius: var(--radius);
  overflow: hidden;
  background: #111827;
  box-shadow: var(--shadow);
}

.player-stage {
  min-height: 430px;
  display: grid;
  grid-template-columns: 1fr 235px;
}

.video-board {
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    #142033;
  background-size: 28px 28px;
  color: white;
}

.video-board h2 {
  font-size: 28px;
}

.concept-map {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.concept-node {
  min-height: 92px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.concept-node strong {
  display: block;
  margin-bottom: 8px;
  color: #9fe4c6;
}

.video-teacher {
  padding: 20px;
  display: grid;
  align-content: center;
  gap: 16px;
  color: white;
  background: #263348;
}

.caption {
  padding: 14px 18px;
  color: #dce8f8;
  background: rgba(0, 0, 0, 0.28);
  font-size: 14px;
  line-height: 1.6;
}

.control-bar {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  background: white;
}

.play-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: var(--brand);
  cursor: pointer;
}

.play-btn svg {
  width: 20px;
  height: 20px;
}

.lesson-notes {
  display: grid;
  gap: 12px;
}

.note {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.note svg {
  width: 20px;
  height: 20px;
  color: var(--mint);
}

.quiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
}

.question-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
  padding: 24px;
}

.question-stem {
  margin: 20px 0;
  padding: 18px;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #f4f8ff;
  font-size: 20px;
  line-height: 1.55;
  font-weight: 760;
}

.options {
  display: grid;
  gap: 12px;
}

.option {
  min-height: 54px;
  border: 1px solid #ccd6e4;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.option:hover {
  border-color: var(--brand);
  background: #f7faff;
}

.option.selected {
  border-color: var(--brand);
  background: #edf3ff;
  box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.11);
}

.option.correct {
  border-color: var(--mint);
  background: var(--mint-soft);
}

.option.wrong {
  border-color: var(--coral);
  background: var(--coral-soft);
}

.option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--brand-dark);
  background: #e8f2ff;
  font-weight: 820;
}

.feedback {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.55;
}

.feedback.good {
  color: #036348;
  border: 1px solid #b8ead5;
  background: var(--mint-soft);
}

.feedback.warn {
  color: #9a2f27;
  border: 1px solid #ffc9c3;
  background: var(--coral-soft);
}

.question-actions {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.done-hero {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.done-badge {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--mint);
  box-shadow: 0 14px 30px rgba(0, 168, 112, 0.2);
}

.done-badge svg {
  width: 30px;
  height: 30px;
}

.summary-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.summary {
  padding: 15px;
  border-radius: 8px;
  background: var(--soft);
}

.summary strong {
  display: block;
  font-size: 24px;
}

.summary span {
  color: var(--muted);
  font-size: 12px;
}

.sync-flow {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.sync-step {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.sync-step svg {
  width: 22px;
  height: 22px;
  color: var(--brand);
}

.actions-row {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: 360px;
  padding: 13px 14px;
  border: 1px solid #b8ead5;
  border-radius: 8px;
  color: #036348;
  background: #f2fff9;
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.5;
}

.toast-error {
  color: #9a2f27;
  border-color: #ffc9c3;
  background: var(--coral-soft);
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .layout,
  .auth-layout,
  .access-layout,
  .player-layout,
  .quiz-layout,
  .trial-hero,
  .lesson-shell {
    grid-template-columns: 1fr;
  }

  .task-grid,
  .learning-path {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: auto;
  }

  .player-stage,
  .lesson-visual {
    grid-template-columns: 1fr;
  }

  .task-body {
    grid-template-columns: 1fr;
  }

  .summary-grid,
  .sync-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar-inner,
  .page {
    width: min(100% - 24px, 1180px);
  }

  .top-actions {
    display: none;
  }

  .page {
    padding-top: 18px;
  }

  .hero-panel,
  .auth-card,
  .access-card,
  .locked-preview,
  .panel,
  .task-card,
  .choice-card,
  .empty-state,
  .question-card,
  .trial-hero,
  .step-card,
  .lesson-panel,
  .done-hero {
    padding: 18px;
  }

  .access-layout {
    margin-top: 14px;
  }

  .access-stage {
    min-height: auto;
    padding: 20px 0 32px;
  }

  h1 {
    font-size: 32px;
  }

  .trial-hero h1,
  .room-head h1,
  .quiz-head h1,
  .lesson-slide h2 {
    font-size: 26px;
  }

  .access-card h1 {
    font-size: 30px;
  }

  .access-stage .access-card h1 {
    font-size: 28px;
  }

  .verify-row {
    grid-template-columns: 1fr;
  }

  h2 {
    font-size: 22px;
  }

  .lead {
    font-size: 15px;
  }

  .hero-metrics,
  .summary-grid,
  .sync-flow,
  .stat-grid,
  .concept-map,
  .learning-path {
    grid-template-columns: 1fr;
  }

  .course-header,
  .section-head,
  .control-bar,
  .room-head,
  .quiz-head,
  .lesson-controls {
    grid-template-columns: 1fr;
    display: grid;
  }

  .question-actions,
  .actions-row,
  .completion-banner {
    display: grid;
  }

  .btn {
    width: 100%;
  }

  .hero-progress {
    min-height: auto;
  }

  .lesson-slide {
    min-height: 360px;
    padding: 18px;
  }

  .area-cell {
    min-height: 52px;
  }

  .question-card.focused {
    padding: 18px;
  }

  .quiz-progress-row {
    align-items: flex-start;
    display: grid;
  }
}

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