:root {
  --ink: #253550;
  --muted: #6f7d95;
  --purple: #796ddf;
  --purple-dark: #5c4fbd;
  --lilac: #f1efff;
  --blue: #70cce3;
  --blue-soft: #e8f9fd;
  --gold: #e6aa2f;
  --gold-soft: #fff5d9;
  --green: #4ab88a;
  --rose: #f58c9d;
  --white: #fff;
  --border: #dfe5ef;
  --shadow: 0 16px 40px rgba(78, 75, 130, .12);
  --radius: 26px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #f7f8fc;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { touch-action: manipulation; }

.child-body {
  background:
    radial-gradient(circle at 10% 4%, rgba(112, 204, 227, .23), transparent 23rem),
    radial-gradient(circle at 92% 8%, rgba(121, 109, 223, .18), transparent 25rem),
    linear-gradient(180deg, #fafaff 0%, #f3f4ff 55%, #eef9fc 100%);
}

.child-header,
.admin-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 12px max(24px, calc((100vw - 1180px) / 2));
  background: rgba(255, 255, 255, .88);
  border-bottom: 1px solid rgba(220, 225, 239, .86);
  backdrop-filter: blur(16px);
}

.site-brand,
.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mascot-mark,
.brand-badge {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  font-size: 28px;
  background: linear-gradient(145deg, #fff8dc, #e7f7ff);
  box-shadow: 0 8px 20px rgba(70, 82, 120, .14);
}

.site-brand strong { display: block; font-size: 19px; letter-spacing: .02em; }
.site-brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

.child-nav,
.admin-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.child-nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 16px;
  color: #53627a;
  font-weight: 700;
}

.child-nav a:hover,
.child-nav a:focus-visible {
  color: var(--purple-dark);
  background: var(--lilac);
}

.page-shell,
.admin-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr);
  gap: 28px;
  min-height: 284px;
  padding: 38px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 92% 20%, rgba(255, 255, 255, .75), transparent 11rem),
    linear-gradient(135deg, #7970df, #73cde3);
  box-shadow: 0 24px 60px rgba(92, 79, 189, .22);
  color: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -52px;
  bottom: -70px;
  border: 28px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 20px 0 8px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: -.03em;
}

.hero p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, .88);
  font-size: 17px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
}

.hero-chip {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 14px;
  background: rgba(255, 255, 255, .12);
  font-weight: 700;
}

.score-orbit {
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 210px;
  height: 210px;
  border: 13px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  box-shadow: inset 0 0 0 9px rgba(255, 255, 255, .08);
  text-align: center;
}

.score-orbit strong { display: block; font-size: 54px; line-height: 1; }
.score-orbit span { display: block; margin-top: 8px; font-weight: 700; opacity: .85; }

.summary-grid,
.two-column,
.box-grid,
.stats-grid {
  display: grid;
  gap: 20px;
}

.summary-grid {
  grid-template-columns: repeat(4, 1fr);
  margin: 24px 0 34px;
}

.summary-card,
.panel,
.task-card,
.box-card,
.backpack-card,
.admin-card {
  border: 1px solid rgba(222, 226, 239, .9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 20px;
}

.summary-icon {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--lilac);
  font-size: 23px;
}

.summary-card:nth-child(2) .summary-icon { background: var(--blue-soft); }
.summary-card:nth-child(3) .summary-icon { background: var(--gold-soft); }
.summary-card:nth-child(4) .summary-icon { background: #e8f8ef; }
.summary-card strong { display: block; font-size: 25px; }
.summary-card span { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }

.leaderboard-panel {
  overflow: hidden;
  margin: 0 0 34px;
  padding: 28px;
  border: 1px solid rgba(230, 170, 47, .34);
  border-radius: 30px;
  background:
    radial-gradient(circle at 94% 0, rgba(255, 220, 112, .3), transparent 16rem),
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(246, 243, 255, .96));
  box-shadow: var(--shadow);
}

.leaderboard-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.leaderboard-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: #9b6812;
  font-size: 13px;
  font-weight: 850;
}

.leaderboard-heading h2 { margin: 0; font-size: clamp(25px, 3vw, 34px); }
.leaderboard-heading p { margin: 6px 0 0; color: var(--muted); line-height: 1.6; }

.leaderboard-goal {
  flex: 0 0 auto;
  min-width: 132px;
  padding: 13px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff2c8, #ffe08a);
  color: #75500e;
  text-align: center;
}

.leaderboard-goal span { display: block; font-size: 12px; font-weight: 750; }
.leaderboard-goal strong { display: block; margin-top: 3px; font-size: 22px; }
.leaderboard-list { display: grid; gap: 10px; }

.leaderboard-row {
  display: grid;
  grid-template-columns: 54px 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 10px 18px;
  border: 1px solid #e4e7f1;
  border-radius: 19px;
  background: rgba(255, 255, 255, .82);
}

.leaderboard-row.is-me {
  border: 2px solid #8b7eeb;
  background: linear-gradient(90deg, #eeeaff, #fff9df);
  box-shadow: 0 10px 24px rgba(92, 79, 189, .13);
}

.leaderboard-rank {
  color: #7e6f9d;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.leaderboard-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--lilac);
  font-size: 25px;
}

.leaderboard-name strong { display: block; font-size: 17px; }
.leaderboard-name small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.leaderboard-score { color: var(--purple-dark); font-size: 25px; }
.leaderboard-score small { font-size: 12px; }

.leaderboard-cheer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 10px;
  align-items: center;
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 17px;
  background: var(--gold-soft);
  color: #7e5712;
}

.leaderboard-cheer > span { grid-row: 1 / 3; font-size: 24px; }
.leaderboard-cheer small { color: #8f754b; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 18px;
}

.section-heading h2,
.section-heading h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); }
.section-heading p { margin: 4px 0 0; color: var(--muted); }
.section-link { color: var(--purple-dark); font-weight: 800; }

.task-list { display: grid; gap: 14px; }

.task-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 112px;
  padding: 18px 20px;
  transition: transform .18s ease, box-shadow .18s ease;
}

.task-card:hover { transform: translateY(-2px); box-shadow: 0 20px 44px rgba(78, 75, 130, .16); }
.task-card.done { background: linear-gradient(90deg, #f0fbf7, #fff); }

.task-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: var(--lilac);
  font-size: 29px;
}

.task-info h3 { margin: 0 0 5px; font-size: 18px; }
.task-info p { margin: 0; color: var(--muted); line-height: 1.6; }
.task-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }

.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f2f4f8;
  color: #66748c;
  font-size: 12px;
  font-weight: 700;
}

.tag.required { color: var(--purple-dark); background: var(--lilac); }
.status-pill.success { color: #237a59; background: #e3f7ee; }
.status-pill.warning { color: #996313; background: var(--gold-soft); }

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  box-shadow: 0 10px 22px rgba(92, 79, 189, .22);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.button:hover,
.button:focus-visible { filter: brightness(1.05); transform: translateY(-1px); }
.button.secondary { color: var(--purple-dark); background: var(--lilac); box-shadow: none; }
.button.gold { color: #60420b; background: linear-gradient(135deg, #ffd766, #edae31); }
.button.danger { background: #b34958; box-shadow: none; }
.button.small { min-height: 38px; padding: 0 13px; border-radius: 12px; font-size: 13px; }
.button[disabled] { cursor: not-allowed; filter: grayscale(.45); opacity: .55; transform: none; }

.two-column { grid-template-columns: 1.5fr .8fr; align-items: start; }
.panel { padding: 26px; }
.panel h2, .panel h3 { margin-top: 0; }

.progress-row { margin: 18px 0; }
.progress-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-weight: 700; }

progress {
  overflow: hidden;
  width: 100%;
  height: 14px;
  border: 0;
  border-radius: 999px;
  background: #eceefa;
}

progress::-webkit-progress-bar { background: #eceefa; border-radius: 999px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--purple), var(--blue)); border-radius: 999px; }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--purple), var(--blue)); border-radius: 999px; }

.motivation {
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--gold-soft), #fff);
}
.motivation strong { display: block; margin-bottom: 8px; color: #9b6812; }
.motivation p { margin: 0; line-height: 1.7; }

.task-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .45fr);
  gap: 24px;
  align-items: start;
}

.challenge-card {
  padding: 34px;
  border-radius: 32px;
  background: #fff;
  box-shadow: var(--shadow);
}

.challenge-card h1 { margin: 14px 0 10px; font-size: clamp(30px, 4vw, 45px); }
.learning-card { min-width: 0; }
.lesson-intro { margin: 0 0 20px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.lesson-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 22px 0 12px; color: #52617a; font-weight: 750; }
.speak-button { min-height: 38px; padding: 8px 13px; border: 1px solid #b8dfe9; border-radius: 12px; background: #eefbfe; color: #2c6b7a; font-weight: 750; cursor: pointer; }
.speak-button:hover { background: #dff6fb; }
.story-paper { padding: 26px 28px; border: 1px solid #eadfca; border-radius: 20px; background: #fffdf6; color: #3e3a35; font-size: 20px; line-height: 2; letter-spacing: .04em; text-indent: 2em; }
.quiz-stack { display: grid; gap: 16px; margin: 24px 0; }
.quiz-card { padding: 20px; border: 1px solid var(--border); border-radius: 18px; }
.quiz-card legend { padding: 0 8px; color: var(--ink); font-size: 17px; font-weight: 850; }
.math-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 22px 0; }
.math-question { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 78px; padding: 15px 18px; border: 1px solid #d8dff0; border-radius: 17px; background: #fafbff; font-size: 22px; font-weight: 850; }
.math-question input { width: 100px; min-height: 48px; border: 2px solid #b7c3df; border-radius: 12px; background: #fff; color: var(--ink); font-size: 22px; font-weight: 850; text-align: center; }
.poem-paper { margin: 12px 0 20px; padding: 34px 24px; border-radius: 22px; background: linear-gradient(145deg, #fffaf0, #f8f1df); color: #423728; font-family: "STKaiti", "KaiTi", serif; font-size: 26px; line-height: 2.1; text-align: center; white-space: pre-line; }
.meaning-box { padding: 18px 20px; border-radius: 16px; background: var(--blue-soft); }
.meaning-box strong { color: #2f7181; }
.meaning-box p { margin: 7px 0 0; color: #42556e; line-height: 1.7; }
.focus-words { padding: 12px 15px; border-radius: 13px; background: var(--gold-soft); color: #825a16; font-weight: 750; }
.word-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0; }
.word-card { padding: 20px; border: 1px solid #dce2f0; border-radius: 20px; background: #fafbff; text-align: center; }
.word-card > span { display: block; color: var(--muted); font-size: 12px; }
.word-card strong { display: block; margin: 8px 0 2px; color: #5348ae; font-size: 28px; }
.word-card p { margin: 0 0 12px; color: var(--ink); }
.sentence-list { display: grid; gap: 12px; margin-bottom: 22px; }
.sentence-list article { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-radius: 17px; background: #f2efff; }
.sentence-list strong { display: block; color: #43398e; font-size: 20px; }
.sentence-list span { display: block; margin-top: 4px; color: var(--muted); }
.challenge-prompt { margin: 26px 0; padding: 24px; border-radius: 22px; background: var(--blue-soft); font-size: 20px; line-height: 1.7; }
.choice-list { display: grid; gap: 12px; margin: 20px 0 28px; }
.choice-option { position: relative; display: block; }
.choice-option input { position: absolute; opacity: 0; pointer-events: none; }
.choice-option span {
  display: block;
  padding: 17px 20px;
  border: 2px solid var(--border);
  border-radius: 18px;
  background: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.choice-option input:checked + span { border-color: var(--purple); background: var(--lilac); color: var(--purple-dark); }
.choice-option input:focus-visible + span { outline: 3px solid rgba(112, 204, 227, .5); }

.result-banner {
  margin-bottom: 24px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #e6f8ef;
  color: #246c52;
  font-weight: 800;
}

.box-grid { grid-template-columns: repeat(2, 1fr); }
.box-card { overflow: hidden; padding: 30px; text-align: center; }
.box-visual {
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  margin: 4px auto 22px;
  border-radius: 40px;
  background: linear-gradient(145deg, #d9d2ff, #8a7bec);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, .18), 0 18px 35px rgba(92, 79, 189, .22);
  font-size: 65px;
  transform: rotate(-3deg);
}
.box-card.gold-box .box-visual { background: linear-gradient(145deg, #fff0a3, #e5a934); }
.box-card h2 { margin-bottom: 6px; }
.box-card p { color: var(--muted); line-height: 1.7; }
.reward-reveal { margin: 20px 0; padding: 18px; border-radius: 18px; background: var(--gold-soft); }
.reward-reveal strong { display: block; margin-bottom: 6px; color: #96620b; font-size: 20px; }

.backpack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.backpack-card { padding: 22px; }
.backpack-card .reward-icon { font-size: 38px; }
.backpack-card h3 { margin: 10px 0 7px; }
.backpack-card p { min-height: 48px; color: var(--muted); line-height: 1.6; }
.empty-state { padding: 60px 24px; border: 2px dashed #d7dcef; border-radius: 26px; text-align: center; color: var(--muted); }
.empty-state span { display: block; margin-bottom: 14px; font-size: 52px; }

.history-table,
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.history-table th,
.history-table td,
.admin-table th,
.admin-table td { padding: 13px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.history-table th,
.admin-table th { color: #52617a; background: #f5f7fb; font-size: 13px; }
.history-table tr:last-child td,
.admin-table tr:last-child td { border-bottom: 0; }

.child-footer {
  display: flex;
  justify-content: space-between;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 0 0 32px;
  color: var(--muted);
  font-size: 13px;
}
.child-footer a { color: var(--purple-dark); }

/* 管理后台 */
.admin-body { background: #f3f5f8; }
.admin-header { min-height: 68px; background: #273553; color: #fff; border-bottom: 0; }
.brand-badge { width: 42px; height: 42px; border-radius: 13px; color: #644e00; background: #f8d067; font-size: 18px; }
.admin-brand { font-weight: 800; }
.admin-nav a, .admin-nav .link-button { color: rgba(255, 255, 255, .84); }
.admin-nav a { padding: 10px; font-size: 14px; }
.admin-nav a:hover { color: #fff; }
.admin-nav form { margin: 0; }
.link-button { padding: 10px; border: 0; background: transparent; cursor: pointer; }
.admin-shell { width: min(1260px, calc(100% - 36px)); }
.admin-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.admin-page-heading h1 { margin: 0; font-size: 30px; }
.admin-page-heading p { margin: 6px 0 0; color: var(--muted); }
.stats-grid { grid-template-columns: repeat(5, 1fr); margin-bottom: 24px; }
.admin-card { padding: 22px; box-shadow: 0 10px 28px rgba(50, 62, 91, .07); }
.admin-card .stat-number { display: block; margin-top: 12px; font-size: 32px; font-weight: 850; }
.admin-card .stat-label { color: var(--muted); font-size: 13px; }
.admin-section { margin-top: 22px; padding: 24px; border: 1px solid var(--border); border-radius: 20px; background: #fff; }
.admin-section h2 { margin-top: 0; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 18px; }
.field { display: grid; gap: 7px; }
.field label { color: #52617a; font-size: 13px; font-weight: 800; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cfd7e5;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
.field textarea { min-height: 104px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: 3px solid rgba(112, 204, 227, .3); border-color: var(--blue); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-grid .wide { grid-column: 1 / -1; }
.checkbox-field { display: flex; align-items: center; gap: 8px; padding-top: 26px; }
.checkbox-field input { width: 20px; height: 20px; }
.validation-message, .error-list { color: #a53849; }
.notice { margin: 0 0 18px; padding: 14px 16px; border-radius: 14px; background: var(--blue-soft); color: #306b7c; }
.notice.success { background: #e5f8ef; color: #246c52; }
.notice.warning { background: var(--gold-soft); color: #80550f; }
.login-shell { display: grid; place-items: center; min-height: calc(100vh - 140px); }
.login-card { width: min(440px, 100%); padding: 34px; border-radius: 28px; background: #fff; box-shadow: var(--shadow); }
.login-card h1 { margin: 0 0 8px; }
.login-card > p { margin: 0 0 24px; color: var(--muted); }
.login-card .field { margin-bottom: 16px; }
.login-card .button { width: 100%; }
.reward-admin-row { display: grid; grid-template-columns: 1.2fr 90px 120px 90px auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.reward-admin-row:last-child { border-bottom: 0; }
.reward-admin-row strong { display: block; }
.reward-admin-row small { color: var(--muted); }
.inline-form { display: inline; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button.small { min-height: 34px; padding: 7px 11px; border-radius: 10px; font-size: 13px; }
.button.danger { color: #8d2638; background: #fee8ec; border-color: #f2bdc7; }
.admin-toolbar.compact { margin: 0; }
.admin-toolbar.compact input { min-height: 36px; padding: 7px 9px; border: 1px solid #cfd7e5; border-radius: 9px; }
.backpack-card form { margin-top: 16px; }
.backpack-card small { display: block; margin-top: 12px; color: var(--muted); }
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  max-width: 360px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #263650;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .child-header { align-items: flex-start; }
  .child-nav { overflow-x: auto; max-width: 60%; }
  .child-nav a { padding: 0 10px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .two-column, .task-stage { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .backpack-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-header { align-items: flex-start; }
  .admin-nav { flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 680px) {
  .child-header { position: static; display: block; padding: 14px 18px; }
  .site-brand { justify-content: center; }
  .child-nav { max-width: none; margin-top: 12px; justify-content: space-between; }
  .child-nav a { flex: 1; flex-direction: column; gap: 2px; min-height: 52px; padding: 7px 5px; font-size: 11px; }
  .page-shell, .admin-shell { width: min(100% - 24px, 1180px); padding-top: 20px; }
  .hero { grid-template-columns: 1fr; padding: 26px; text-align: center; }
  .hero p { font-size: 15px; }
  .hero-meta { justify-content: center; }
  .score-orbit { width: 156px; height: 156px; }
  .score-orbit strong { font-size: 42px; }
  .summary-grid { gap: 10px; margin-top: 14px; }
  .summary-card { display: block; min-height: 118px; padding: 15px; text-align: center; }
  .summary-icon { margin: 0 auto 8px; }
  .leaderboard-panel { padding: 18px 14px; border-radius: 24px; }
  .leaderboard-heading { align-items: stretch; flex-direction: column; gap: 14px; }
  .leaderboard-goal { width: 100%; }
  .leaderboard-row { grid-template-columns: 40px 42px minmax(0, 1fr) auto; gap: 8px; padding: 9px 10px; }
  .leaderboard-avatar { width: 40px; height: 40px; border-radius: 13px; font-size: 22px; }
  .leaderboard-rank { font-size: 21px; }
  .leaderboard-name strong { font-size: 15px; }
  .leaderboard-name small { font-size: 10px; }
  .leaderboard-score { font-size: 21px; }
  .leaderboard-cheer { align-items: start; }
  .task-card { grid-template-columns: 50px 1fr; gap: 12px; padding: 15px; }
  .task-icon { width: 50px; height: 50px; border-radius: 16px; font-size: 24px; }
  .task-card > .button { grid-column: 1 / -1; }
  .section-heading { align-items: flex-start; }
  .box-grid, .backpack-grid { grid-template-columns: 1fr; }
  .challenge-card { padding: 24px; }
  .story-paper { padding: 20px; font-size: 18px; line-height: 1.85; }
  .math-grid { grid-template-columns: 1fr; }
  .word-grid { grid-template-columns: 1fr; }
  .sentence-list article, .lesson-toolbar { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .admin-header { position: static; display: block; padding: 14px 16px; }
  .admin-nav { margin-top: 12px; justify-content: flex-start; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-page-heading { align-items: flex-start; flex-direction: column; }
  .admin-section { overflow-x: auto; padding: 17px; }
  .admin-table { min-width: 760px; }
  .reward-admin-row { grid-template-columns: 1fr 80px; }
  .reward-admin-row > :nth-child(n+3) { grid-column: auto; }
}

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