:root {
  --bg: #f1f6f5;
  --paper: #fcfdfd;
  --panel: #ffffff;
  --ink: #17312a;
  --muted: #5e7274;
  --line: #d2dfe1;
  --soft: #e9f2ef;
  --accent: #25786f;
  --accent-2: #5575c8;
  --gold: #d29a2d;
  --danger: #b44d4d;
  --ok: #23784d;
  --shadow: 0 16px 36px rgba(29, 63, 53, .1);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fbfdfd, var(--bg));
  font-family: "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

a { color: var(--accent); text-decoration: none; font-weight: 700; }
button, input, select, textarea {
  font: inherit;
}
button, .primary-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 42px;
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}
.primary-btn {
  border-color: #1f685e;
  color: white;
  background: linear-gradient(180deg, #348e7f, #226b61);
}
button:hover { transform: translateY(-1px); }
button:disabled {
  cursor: not-allowed;
  opacity: .62;
  transform: none;
}

.app {
  max-width: 1480px;
  margin: 0 auto;
  padding: 26px;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 18px;
}
.top nav { display: flex; gap: 14px; align-items: center; }
.dashboard-top {
  position: relative;
  justify-content: flex-start;
  align-items: center;
  min-height: 168px;
  overflow: hidden;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfa;
}
.dashboard-title {
  position: relative;
  z-index: 1;
  flex: 0 1 56%;
  max-width: 650px;
  min-width: 0;
  padding-right: 24px;
}
.dashboard-header-art {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 0;
  width: min(44%, 560px);
  min-width: 0;
  height: auto;
  aspect-ratio: auto;
  overflow: hidden;
  border: 0;
  border-left: 1px solid #d9e5e1;
  border-radius: 0;
  background: #edf4ef;
}
.dashboard-header-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}
.dashboard-top nav {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 18px;
  flex: 0 0 auto;
  gap: 6px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid rgba(202, 218, 211, .92);
  border-radius: 8px;
  background: rgba(253, 254, 251, .88);
}
.brand-mini {
  color: var(--accent);
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(28px, 4vw, 46px); margin-bottom: 8px; }
h2 { font-size: 22px; margin-bottom: 10px; }
p { color: var(--muted); line-height: 1.7; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  margin-bottom: 18px;
}
.stage, .wallet, .levels, .lesson-card, .practice-card, .result-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow);
}
.stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
}
#scene {
  width: 100%;
  height: 440px;
  display: block;
  background: linear-gradient(180deg, #f8fbfc, #edf5f2);
}
.scene-visual-layer {
  position: absolute;
  inset: 0 0 auto;
  height: 440px;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.scene-visual-layer.is-empty { display: none; }
.scene-focus-frame {
  position: absolute;
  left: var(--focus-x, 50%);
  top: var(--focus-y, 53%);
  width: var(--focus-w, 62%);
  height: var(--focus-h, 42%);
  transform: translate(-50%, -50%);
  border: 3px solid rgba(193, 126, 20, .96);
  border-radius: 8px;
  box-shadow: 0 0 0 4px rgba(255, 247, 221, .72), inset 0 0 0 999px rgba(255, 248, 222, .06);
}
.scene-focus-frame.is-pulsing {
  animation: scene-focus-arrive .72s ease-out both;
}
.scene-focus-label {
  display: none;
}
.scene-visual-cue {
  position: absolute;
  top: 16px;
  left: 16px;
  display: grid;
  gap: 4px;
  width: min(330px, calc(100% - 32px));
  padding: 10px 12px;
  border: 1px solid rgba(35, 120, 111, .28);
  border-left: 4px solid var(--accent);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 24px rgba(29, 63, 53, .1);
}
.scene-visual-step {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}
.scene-visual-cue strong {
  font-size: 14px;
  line-height: 1.45;
}
.scene-visual-cue p {
  margin: 0;
  color: #47635e;
  font-size: 12px;
  line-height: 1.45;
}
@keyframes scene-focus-arrive {
  0% { opacity: .2; transform: translate(-50%, -50%) scale(.92); }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(1.025); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.scene-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border-top: 1px solid var(--line);
  padding: 14px 18px 12px;
}
.scene-lesson-summary { min-width: 0; }
.scene-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.scene-title-line strong { font-size: 18px; }
.scene-caption .scene-goal,
.scene-caption .scene-story {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.scene-caption .scene-story { color: #3d625c; }
.scene-caption .tag { color: var(--accent); }

.scene-caption .scene-mode {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #8dbcb0;
  border-radius: 4px;
  background: #edf8f3;
  color: #245f55;
  font-size: 12px;
  font-weight: 700;
}

.scene-caption .scene-mode.is-3d {
  border-color: #9dadd6;
  background: #f0f3fb;
  color: #40588f;
}
.scene-caption span { color: var(--muted); }
.scene-guide {
  margin: 8px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fbfdf9;
  display: grid;
  gap: 8px;
}
.scene-guide-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.scene-guide p {
  margin: 0;
  color: var(--ink);
}
.scene-explain-flow {
  display: grid;
  gap: 10px;
  padding: 11px 12px 12px;
  border-top: 1px solid #dce8e2;
  border-bottom: 1px solid #dce8e2;
  background: #f7fbf8;
}
.scene-explain-flow-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.scene-explain-flow-head strong { color: var(--ink); }
.scene-explain-flow-head span {
  color: var(--muted);
  font-size: 12px;
}
.scene-explain-flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.scene-explain-block {
  min-width: 0;
  padding: 9px 10px;
  border-left: 3px solid #8ebcb1;
  background: rgba(255, 255, 255, .76);
}
.scene-explain-block.foundation { border-left-color: #6f88c9; }
.scene-explain-block.check { border-left-color: #c99a3e; }
.scene-explain-block span {
  display: block;
  margin-bottom: 4px;
  color: #35685f;
  font-size: 12px;
  font-weight: 900;
}
.scene-explain-block.foundation span { color: #4a62a2; }
.scene-explain-block.check span { color: #8a651c; }
.scene-explain-block p {
  font-size: 13px;
  line-height: 1.55;
}
.scene-rule {
  border-left: 4px solid var(--accent);
  padding-left: 10px;
  font-weight: 800;
  color: var(--ink);
}
.scene-speech-panel {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  gap: 8px 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fbfa;
}
.scene-speech-head {
  display: flex;
  gap: 8px;
  align-items: center;
}
.scene-speech-panel .speech-progress {
  grid-column: 1 / -1;
}
.scene-process {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 10px;
}
.scene-process-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.scene-process-list {
  display: grid;
  gap: 8px;
}
.scene-key-points {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.scene-key-points-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.scene-key-points-head span {
  color: var(--muted);
  font-size: 12px;
}
.scene-key-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.scene-process-item {
  width: 100%;
  border: 1px solid transparent;
  text-align: left;
  font: inherit;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #f7fbf8;
}
.scene-process-item.active {
  border-color: var(--accent);
  background: #eaf6ef;
}
.scene-process-item.done {
  opacity: .9;
  cursor: pointer;
}
.scene-process-item:hover {
  border-color: #b9d3ca;
  background: #f7fbf8;
}
.scene-process-index {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
  background: var(--accent);
}
.scene-process-item.done .scene-process-index {
  background: var(--accent-2);
}
.scene-process-title {
  font-weight: 900;
  color: var(--ink);
}
.scene-process-text {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.scene-note, .scene-example {
  margin: 0;
  padding-left: 10px;
  border-left: 4px solid #cfe0d8;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.scene-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.scene-controls button {
  min-height: 36px;
  padding: 0 12px;
}
.explain-dialog {
  width: min(760px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  color: var(--ink);
  background: #fbfdf9;
  box-shadow: 0 24px 80px rgba(29, 63, 53, .24);
}
.explain-dialog::backdrop {
  background: rgba(23, 49, 42, .46);
}
.explain-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.zoom-block {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}
.zoom-block h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.zoom-block p {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.75;
  margin: 0;
}

.wallet {
  padding: 18px;
}
.wallet-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.wallet-row span { color: var(--muted); }
.wallet-row strong { font-size: 24px; }
.wallet-actions { display: grid; gap: 10px; margin: 16px 0 10px; }
.reward-text {
  min-height: 54px;
  border: 1px dashed #b9d3ca;
  border-radius: 12px;
  padding: 12px;
  background: #f7fbf8;
  color: var(--muted);
}
.bonus-game-dialog {
  width: min(920px, calc(100vw - 24px));
  max-height: calc(100svh - 24px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  color: var(--ink);
  background: #fbfdf9;
  box-shadow: 0 24px 80px rgba(29, 63, 53, .28);
}
.bonus-game-dialog::backdrop { background: rgba(23, 49, 42, .5); }
.bonus-game-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.bonus-game-head h2 { margin: 6px 0 4px; }
.bonus-game-head p { margin: 0; }
.bonus-game-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.bonus-game-picker[hidden],
.bonus-game-stage[hidden] { display: none; }
.bonus-game-choice {
  min-height: 184px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 9px;
  padding: 16px;
  text-align: left;
  border-color: #b9d3ca;
  background: #f7fbf8;
}
.bonus-game-choice:hover,
.bonus-game-choice:focus-visible {
  border-color: var(--accent);
  background: #eaf6ef;
}
.bonus-game-choice-kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}
.bonus-game-choice strong { font-size: 19px; }
.bonus-game-choice > span:not(.bonus-game-choice-kicker) { color: var(--muted); line-height: 1.55; }
.bonus-game-choice small { margin-top: auto; color: #506e68; font-weight: 800; }
.bonus-game-stage { display: grid; gap: 12px; }
.bonus-game-hud {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.bonus-game-hud > div {
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf8;
}
.bonus-game-hud span,
.bonus-game-hud strong { display: block; }
.bonus-game-hud span { color: var(--muted); font-size: 12px; }
.bonus-game-hud strong { margin-top: 4px; font-size: 16px; }
#bonusGameCanvas {
  display: block;
  width: 100%;
  aspect-ratio: 720 / 380;
  border: 1px solid #b9d3ca;
  border-radius: 8px;
  background: #eef7f4;
  touch-action: none;
}
.bonus-game-hint,
.bonus-game-message {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
}
.bonus-game-message { font-weight: 800; }
.bonus-game-message.error { color: var(--danger); }
.bonus-game-controls {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  gap: 10px;
}
.bonus-game-controls button { min-height: 50px; }
.bonus-game-controls button:disabled { cursor: default; opacity: .55; transform: none; }
.bonus-game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.bonus-game-offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0;
  padding: 16px 0;
  border-top: 1px solid #b9d3ca;
  border-bottom: 1px solid #b9d3ca;
}
.bonus-game-offer h3 { margin: 8px 0 4px; font-size: 19px; }
.bonus-game-offer p { margin: 0; }
.bonus-game-offer-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; }

.main-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.levels {
  position: sticky;
  top: 18px;
  padding: 16px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
select, input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
}
.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.topic-list { display: grid; gap: 10px; margin-top: 14px; }
.topic-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fbfdf9;
  cursor: pointer;
}
.topic-item.active {
  border-color: var(--accent);
  background: #eaf6ef;
}
.topic-item.locked {
  opacity: .58;
}
.topic-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 900;
}
.topic-sub { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.progress {
  margin-top: 10px;
  height: 8px;
  background: #dfeae5;
  border-radius: 999px;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.lesson { display: grid; gap: 18px; }
.lesson-card, .practice-card, .result-box { padding: 18px; }
.lesson-top, .practice-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.speech-panel {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}
.speech-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.speech-actions button {
  min-height: 38px;
  padding: 0 12px;
}
.speech-progress {
  height: 10px;
  border-radius: 999px;
  background: #dfeae5;
  overflow: hidden;
  border: 1px solid var(--line);
}
.speech-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .1s linear;
}
.speech-status {
  font-size: 13px;
  color: var(--muted);
}
.tag {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}
.point {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdf9;
  min-height: 74px;
  font-size: 13px;
  line-height: 1.45;
}
.point b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  margin-bottom: 6px;
}

.quiz-form { display: grid; gap: 14px; }
.q-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px;
  background: #fff;
}
.q-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 800;
}
.stem { font-size: 18px; line-height: 1.75; margin-bottom: 12px; }
.choices { display: grid; gap: 8px; }
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  min-height: 44px;
}
.choice input { width: auto; }
.submit-row { display: flex; justify-content: flex-end; margin-top: 12px; }
.result-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
  background: #fff;
}
.result-item.ok { border-color: #a4d6be; background: #f4fbf7; }
.result-item.bad { border-color: #ecc0c0; background: #fff8f7; }
.score-big { font-size: 42px; font-weight: 900; color: var(--accent); }
.panel-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
  padding: 18px;
}
.stats-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-weight: 800;
}
.stats-row strong { color: var(--ink); }
.curve-chart {
  width: 100%;
  height: 240px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdf9;
  margin: 12px 0;
}
.achievement-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.achievement {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #f7fbf8;
}
.feedback-form {
  display: grid;
  gap: 12px;
}
.feedback-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}
.feedback-status {
  margin-top: 10px;
  color: var(--muted);
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-weight: 800;
}
.prize-form table {
  margin-top: 10px;
}
.prize-form input, .prize-form select {
  min-width: 0;
  width: 100%;
}
.code-cell {
  background: #f6faf8;
}
.compact {
  grid-template-columns: 1fr 160px auto;
  align-items: center;
}
.curve-mini {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: clamp(12px, 2vw, 28px);
  background: #e8f0ea;
}
.auth-shell {
  width: min(1520px, 100%);
  min-height: clamp(660px, 76svh, 780px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(400px, .72fr);
  overflow: hidden;
  border: 1px solid #c7d7cd;
  border-radius: 8px;
  background: #fdfefb;
  box-shadow: 0 24px 60px rgba(31, 59, 48, .14);
}
.auth-hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: #e4dfc9;
}
.auth-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.auth-hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 660px;
  padding: clamp(26px, 4vw, 56px);
  color: #143b35;
}
.xueba-brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  color: #103b34;
}
.xueba-mark {
  display: block;
  width: 54px;
  height: 46px;
}
.xueba-wordmark {
  display: grid;
  gap: 2px;
  line-height: 1;
}
.xueba-wordmark strong {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}
.xueba-wordmark em {
  margin-left: 4px;
  color: #bd7615;
  font-style: normal;
  font-size: 15px;
  letter-spacing: .12em;
  vertical-align: 3px;
}
.xueba-wordmark span {
  color: #46665d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}
.brand-meaning {
  margin: 9px 0 0 66px;
  color: #45655d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}
.hero-message {
  position: absolute;
  top: clamp(172px, 25%, 238px);
  left: clamp(26px, 4vw, 56px);
  max-width: 430px;
  margin: 0;
  padding: 0;
}
.hero-kicker,
.auth-kicker {
  margin: 0 0 14px;
  color: #a46412;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: .15em;
}
.hero-message h1 {
  margin: 0;
  color: #123c34;
  font-size: clamp(40px, 3.7vw, 56px);
  font-weight: 900;
  line-height: 1.13;
  letter-spacing: 0;
}
.auth-panel {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(32px, 4vw, 64px);
  background: #fbfdfb;
}
.auth-panel-content {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  margin: 0 auto;
}
.auth-panel-heading h2 {
  margin: 0 0 10px;
  color: #143b35;
  font-size: 40px;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 0;
}
.auth-panel-heading > p:last-child {
  margin: 0;
  color: #60726c;
  font-size: 15px;
}
.auth-form {
  display: grid;
  gap: 14px;
  margin: 28px 0 22px;
}
.auth-form label {
  display: grid;
  gap: 8px;
  color: #25453d;
  font-size: 14px;
  font-weight: 900;
}
.auth-form input {
  min-height: 50px;
  border: 1px solid #b9cdc1;
  border-radius: 6px;
  padding: 0 15px;
  color: #143b35;
  background: #fff;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.auth-form input::placeholder { color: #91a39c; }
.auth-form input:focus {
  border-color: #1e7868;
  box-shadow: 0 0 0 3px rgba(30, 120, 104, .13);
}
.auth-body .primary-btn {
  min-height: 50px;
  border: 1px solid #143b35;
  border-radius: 6px;
  color: #fff;
  background: #143b35;
  box-shadow: none;
  font-size: 16px;
}
.auth-body .primary-btn:hover,
.auth-body .primary-btn:focus-visible {
  border-color: #0d2d27;
  background: #0d2d27;
  transform: none;
}
.alert {
  margin: 24px 0 -10px;
  border: 1px solid #dfa7a7;
  border-radius: 6px;
  padding: 12px 14px;
  color: #8e3434;
  background: #fff7f6;
}
.auth-invite {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-top: 1px solid #d9e5de;
  border-bottom: 1px solid #d9e5de;
}
.invite-rule {
  display: block;
  width: 4px;
  min-width: 4px;
  height: 38px;
  margin-top: 3px;
  background: #c17d1a;
}
.auth-invite p { margin: 0; }
.auth-invite strong,
.auth-invite span { display: block; }
.auth-invite strong {
  margin-bottom: 5px;
  color: #26483f;
  font-size: 14px;
}
.auth-invite p span {
  color: #657870;
  font-size: 13px;
  line-height: 1.65;
}
.auth-domain {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-top: 18px;
  color: #6d7d77;
  font-size: 13px;
}
.auth-domain strong {
  color: #b56e0c;
  font-size: 18px;
  letter-spacing: .03em;
}
.auth-contact {
  margin: 10px 0 0;
  color: #72827c;
  font-size: 13px;
}
.auth-contact b { color: #28564b; }
.site-footer {
  width: min(1520px, 100%);
  margin: 0 auto;
}
.site-footer-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  overflow: hidden;
  padding: 12px 200px 12px 0;
  border-top: 1px solid #c8d9cf;
}
.site-footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #163f37;
}
.site-footer-brand img {
  width: 36px;
  height: 30px;
}
.site-footer-brand span {
  display: grid;
  gap: 2px;
}
.site-footer-brand strong { font-size: 14px; }
.site-footer-brand small {
  color: #6b8179;
  font-size: 11px;
}
.site-footer-slogan {
  margin: 0;
  color: #5f776f;
  font-size: 13px;
  font-weight: 700;
}
.site-footer-meta {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 10px;
  color: #758880;
  font-size: 12px;
  white-space: nowrap;
}
.site-footer-meta strong {
  color: #ad6809;
  font-size: 14px;
}
.site-footer-doodle {
  position: absolute;
  right: -2px;
  bottom: -18px;
  display: block;
  width: 190px;
  aspect-ratio: 1.72;
  object-fit: cover;
  object-position: right bottom;
  mix-blend-mode: multiply;
  opacity: .8;
  pointer-events: none;
}

.admin-grid { display: grid; gap: 18px; }
.admin-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}
.admin-form button {
  grid-column: 1 / -1;
  justify-self: start;
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-actions form { margin: 0; }
.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.inline-form input {
  width: 140px;
}
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}
.pagination-summary {
  margin-right: auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.pagination-summary-single { margin: 14px 0 0; }
.pagination-link {
  display: inline-grid;
  min-width: 38px;
  min-height: 36px;
  place-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}
.pagination-link:hover { border-color: var(--accent); }
.pagination-link.is-current {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.pagination-link.is-disabled {
  cursor: default;
  color: #93a3a4;
  background: #f5f8f8;
}
.form-status {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: #f2f8f6;
  color: var(--ink);
  font-weight: 700;
}
.form-status.is-error {
  border-left-color: var(--danger);
  background: #fff7f6;
  color: #7e3a3a;
}
.ai-report-form button[aria-busy="true"] { min-width: 250px; }
.admin-notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #cfe0d8;
  border-radius: 10px;
  background: #f7fbf8;
  color: var(--ink);
  font-weight: 700;
}
.ai-toggle {
  display: flex !important;
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
}
.ai-toggle input { width: auto; }
.record-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.record-summary div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fbfdf9;
}
.record-summary span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}
.record-summary strong {
  font-size: 20px;
}
.ai-report-meta {
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.ai-report {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fbfdf9;
  white-space: pre-wrap;
  line-height: 1.75;
  color: var(--ink);
}
.muted { color: var(--muted); }

@media (max-width: 1100px) {
  .hero-grid, .main-grid { grid-template-columns: 1fr; }
  .levels { position: static; }
}
@media (max-width: 780px) {
  .app { padding: 14px; }
  .top, .lesson-top, .practice-top, .scene-caption { flex-direction: column; align-items: stretch; }
  .dashboard-top {
    min-height: 0;
    padding: 0 0 14px;
    overflow: visible;
    border-bottom: 0;
    background: transparent;
  }
  .dashboard-title {
    flex: none;
    max-width: none;
    padding-right: 0;
  }
  .dashboard-header-art {
    position: relative;
    inset: auto;
    z-index: auto;
    flex: none;
    width: 100%;
    min-width: 0;
    height: 156px;
    aspect-ratio: auto;
    border: 1px solid #d9e5e1;
    border-radius: 8px;
  }
  .dashboard-top nav {
    position: relative;
    z-index: auto;
    top: auto;
    right: auto;
    align-self: flex-end;
    margin: 0;
  }
  #scene { height: 320px; }
  .scene-visual-layer { height: 320px; }
  .scene-visual-cue {
    top: 10px;
    left: 10px;
    width: min(286px, calc(100% - 20px));
    gap: 2px;
    padding: 7px 9px;
  }
  .scene-visual-cue strong { font-size: 12px; line-height: 1.35; }
  .scene-visual-cue p { display: none; }
  .scene-explain-flow-grid { grid-template-columns: 1fr; }
  .scene-key-list { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr; }
  .admin-form { grid-template-columns: 1fr; }
  .inline-form { flex-direction: column; align-items: stretch; }
  .inline-form input { width: 100%; }
  .pagination-summary { flex-basis: 100%; margin-right: 0; }
  .pagination-link { flex: 1 1 42px; }
  .record-summary { grid-template-columns: 1fr 1fr; }
  .zoom-block p { font-size: 20px; }
  .explain-head { flex-direction: column; }
  .bonus-game-head,
  .bonus-game-offer { flex-direction: column; align-items: stretch; }
  .bonus-game-picker { grid-template-columns: 1fr; }
  .bonus-game-choice { min-height: 140px; }
  .bonus-game-hud { grid-template-columns: 1fr 1fr; }
  .bonus-game-actions,
  .bonus-game-offer-actions { justify-content: stretch; }
  .bonus-game-actions button,
  .bonus-game-offer-actions button { flex: 1 1 140px; }
}

@media (max-width: 980px) {
  .auth-body { display: block; padding: 0; }
  .auth-shell {
    min-height: 100svh;
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0;
  }
  .auth-hero,
  .auth-hero-copy { min-height: 470px; }
  .hero-message { display: none; }
  .auth-panel { padding: 54px 32px; }
  .site-footer { width: 100%; }
  .site-footer-inner { padding: 16px 24px; }
  .site-footer-doodle { display: none; }
}

@media (max-width: 560px) {
  .auth-hero,
  .auth-hero-copy { min-height: 420px; }
  .auth-hero-image { object-position: 60% center; }
  .auth-hero-copy { padding: 24px; }
  .xueba-mark { width: 46px; height: 40px; }
  .xueba-wordmark strong { font-size: 24px; }
  .brand-meaning { display: none; }
  .auth-panel { padding: 42px 24px 48px; }
  .auth-panel-heading h2 { font-size: 34px; }
  .auth-form { margin: 28px 0 24px; }
  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 22px 24px;
  }
  .site-footer-slogan { font-size: 12px; }
  .site-footer-meta { justify-content: flex-start; }
}
