@charset "UTF-8";

/* =========================================================
   晞晞的语文小屋
   家庭纸本手账是共享外壳，四线三格与黛蓝只服务于拼音模块。
   ========================================================= */

:root {
  color-scheme: light;

  /* 核心品牌色：传统朱砂红改良（鲜活、温润、护眼） */
  --cinnabar: #c84335;
  --cinnabar-hover: #d94e3f;
  --cinnabar-deep: #9d2b1f;
  --cinnabar-light: #fbeee8;
  --cinnabar-soft: rgba(200, 67, 53, 0.08);
  --cinnabar-border: rgba(200, 67, 53, 0.22);
  --cinnabar-shadow: 0 4px 14px rgba(200, 67, 53, 0.25);

  /* 综合语文外壳：沿用成长日历的安静纸本气质 */
  --sage: #486450;
  --sage-deep: #344b3a;
  --sage-soft: #eef4f1;
  --terracotta: #aa5139;
  --amber: #b87333;
  --amber-soft: #f9f2e6;
  --slate: #566e7a;
  --slate-soft: #edf2f5;

  /* 核心拼音色：黛蓝 / 墨青 —— 沉静专注，对比度极佳 */
  --indigo: #1b496d;
  --indigo-deep: #12334e;
  --indigo-light: #2a6699;
  --indigo-soft: rgba(27, 73, 109, 0.06);
  --indigo-border: rgba(27, 73, 109, 0.2);

  /* 辅助状态色 */
  --ok: #277c44;
  --ok-bg: #edf7f0;
  --ok-border: #9ed4ae;
  --warn: #c4761b;
  --warn-bg: #fdf5e9;
  --warn-border: #f4caa0;
  --stuck: #c84335;
  --stuck-bg: #fdf1ee;
  --stuck-border: #f5bcb4;

  /* 墨字色彩体系 */
  --ink: #343d34;
  --ink-sub: #566054;
  --muted: #667061;
  --muted-light: #92998f;

  /* 纸韵背景色彩 */
  --paper: #faf8f3;
  --sheet: #ffffff;
  --sheet-warm: #f7f4ed;
  --line: #e2e4d9;
  --line-light: rgba(60, 48, 38, 0.08);
  --line-subtle: #eeeae2;

  /* 四线三格专属格线色彩 */
  --grid-main: rgba(200, 67, 53, 0.24);  /* 中间两条主格线（微红） */
  --grid-sub: rgba(27, 73, 109, 0.16);   /* 上下两条辅助线（微蓝） */

  /* 现代圆角体系 */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  /* 阴影层次 */
  --shadow-sm: 0 2px 8px rgba(70, 45, 20, 0.04);
  --shadow-md: 0 8px 24px rgba(70, 45, 20, 0.06);
  --shadow-lg: 0 16px 36px rgba(70, 45, 20, 0.08);
  --shadow-card: 0 10px 32px -4px rgba(80, 50, 20, 0.06), 0 0 0 1px rgba(180, 150, 110, 0.16);

  /* 字体族定义 */
  --font-serif: "Iowan Old Style", "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --font-kai: "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-pinyin: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "Chalkboard SE", "Hiragino Sans GB", sans-serif;

  font-family: var(--font-sans);
}

/* =========================================================
   全局重置与通用排版
   ========================================================= */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(1000px 500px at 50% -80px, rgba(235, 229, 220, 0.7), transparent 70%),
    linear-gradient(180deg, rgba(243, 239, 234, 0.42) 0%, transparent 44%),
    var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  touch-action: manipulation;
  user-select: none;
  transition: all 0.16s cubic-bezier(0.2, 0.8, 0.3, 1);
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, .tile:focus-visible {
  outline: 3px solid var(--cinnabar-border);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

/* 拼音专用字模 */
.pinyin {
  font-family: var(--font-pinyin);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* 基础按钮风格 */
.primary, .secondary, .mark {
  min-height: 46px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.primary {
  background: var(--sage);
  color: #fffdf8;
  box-shadow: 0 2px 5px rgba(52, 75, 58, 0.14);
  border: 1px solid var(--sage);
}

.primary:hover:not(:disabled) {
  background: var(--sage-deep);
  box-shadow: 0 4px 12px rgba(52, 75, 58, 0.18);
  transform: translateY(-1px);
}

.secondary {
  background: var(--sheet-warm);
  border: 1px solid var(--line);
  color: var(--ink-sub);
  box-shadow: var(--shadow-sm);
}

.secondary:hover:not(:disabled) {
  background: #ffffff;
  border-color: #d8c8af;
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.full-width {
  width: 100%;
}

.quiet {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* =========================================================
   四线三格底纹（核心点睛之笔）
   ========================================================= */

.four-lines, .choice, .blend-slot.result {
  background-color: #ffffff;
  background-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent calc(22% - 0.5px),
    var(--grid-sub) calc(22% - 0.5px),
    var(--grid-sub) calc(22% + 0.5px),
    transparent calc(22% + 0.5px),
    transparent calc(42% - 0.5px),
    var(--grid-main) calc(42% - 0.5px),
    var(--grid-main) calc(42% + 0.5px),
    transparent calc(42% + 0.5px),
    transparent calc(68% - 0.5px),
    var(--grid-main) calc(68% - 0.5px),
    var(--grid-main) calc(68% + 0.5px),
    transparent calc(68% + 0.5px),
    transparent calc(88% - 0.5px),
    var(--grid-sub) calc(88% - 0.5px),
    var(--grid-sub) calc(88% + 0.5px),
    transparent calc(88% + 0.5px),
    transparent 100%
  );
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

/* =========================================================
   顶部品牌栏与导航 (Masthead & Play Bar)
   ========================================================= */

.masthead {
  max-width: 1180px;
  margin: 0 auto;
  padding: 25px 24px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.brand-seal {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--sage-deep);
  background: #eef2e9;
  border: 1px solid #d5dfcf;
  border-radius: 50% 50% 46% 54%;
  box-shadow: 0 2px 8px rgba(52, 75, 58, 0.06);
  font-size: 22px;
  font-family: var(--font-kai);
  letter-spacing: 0;
}

.brand small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.13em;
  color: var(--muted);
  margin-top: 3px;
  font-family: var(--font-kai);
  font-weight: normal;
}

.connection {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--sheet-warm);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.connection i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c2b19a;
  transition: all 0.3s;
}

.connection.online i {
  background: var(--ok);
  box-shadow: 0 0 6px rgba(39, 124, 68, 0.5);
}

.connection.offline {
  color: var(--stuck);
}

.connection.offline i {
  background: var(--stuck);
}

/* 主内容区域 */
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 56px;
}

/* =========================================================
   综合语文首页
   ========================================================= */

.home-view {
  animation: fadeIn 0.25s ease-out;
}

.home-cover {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  overflow: hidden;
  background: #f0f1e8;
  border: 1px solid #dfe4d7;
  border-radius: 26px;
  color: var(--ink);
}

.cover-copy {
  z-index: 1;
  padding: 38px 42px 34px;
}

.cover-copy h1 {
  margin: 10px 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.025em;
}

.cover-intro {
  max-width: 540px;
  margin: 0 0 24px;
  color: #687061;
  font-size: 14px;
  line-height: 1.95;
}

.cover-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.cover-actions .primary {
  min-height: 46px;
  padding-inline: 22px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: var(--sage);
  font-size: 14px;
  font-weight: 600;
  text-underline-offset: 5px;
}

.text-button:hover {
  text-decoration: underline;
}

.cover-art {
  position: relative;
  min-height: 240px;
  margin: 24px 28px 22px 8px;
  overflow: hidden;
  border: 7px solid rgba(255, 255, 255, 0.82);
  border-radius: 50% 50% 8px 8px / 24% 24% 8px 8px;
  background: linear-gradient(180deg, #dce8e7 0%, #f8eee0 62%, #e5e8d7 63%, #cbd9c0 100%);
  box-shadow: 0 4px 12px rgba(83, 90, 64, 0.08);
  transform: rotate(1.4deg);
}

.cover-art p {
  position: absolute;
  inset: auto 0 0;
  z-index: 8;
  margin: 0;
  padding: 12px 10px 11px;
  background: rgba(255, 255, 255, 0.86);
  color: #566054;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-align: center;
}

.art-sun {
  position: absolute;
  top: 34px;
  right: 52px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e7c77f;
  box-shadow: 0 0 0 13px rgba(245, 219, 155, 0.24);
}

.art-cloud {
  position: absolute;
  width: 88px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.art-cloud::before,
.art-cloud::after {
  content: "";
  position: absolute;
  bottom: 4px;
  border-radius: 50%;
  background: inherit;
}

.art-cloud::before { left: 16px; width: 34px; height: 34px; }
.art-cloud::after { right: 14px; width: 43px; height: 43px; }
.cloud-one { top: 54px; left: 44px; }
.cloud-two { top: 104px; right: 30px; transform: scale(0.72); opacity: 0.7; }

.art-hill {
  position: absolute;
  bottom: 35px;
  width: 120%;
  height: 115px;
  border-radius: 50% 50% 0 0;
}

.hill-back { left: -45%; background: #bccdb2; transform: rotate(7deg); }
.hill-front { right: -48%; bottom: 25px; background: #95ae8e; transform: rotate(-5deg); }

.art-book {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 52px;
  width: 112px;
  height: 64px;
  transform: translateX(-50%);
}

.art-book::before,
.art-book::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 55px;
  height: 58px;
  background: #fffaf1;
  border: 2px solid #aa705e;
}

.art-book::before { right: 50%; border-radius: 8px 2px 14px 7px; transform: skewY(7deg); }
.art-book::after { left: 50%; border-radius: 2px 8px 7px 14px; transform: skewY(-7deg); }
.art-book i { position: absolute; z-index: 5; left: 50%; top: 10px; width: 1px; height: 49px; background: #d4b8a9; }

.art-sprout {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 110px;
  width: 3px;
  height: 29px;
  background: var(--sage);
}

.art-sprout::before,
.art-sprout::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 22px;
  height: 12px;
  background: #71906f;
}

.art-sprout::before { right: 1px; border-radius: 90% 10% 80% 10%; transform: rotate(23deg); }
.art-sprout::after { left: 2px; border-radius: 10% 90% 10% 80%; transform: rotate(-19deg); }

.cover-progress {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 62px;
  padding: 13px 42px;
  border-top: 1px solid #dce1d4;
  background: rgba(255, 255, 255, 0.55);
}

.cover-progress > div {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.cover-progress strong {
  color: var(--sage);
  font-size: 25px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

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

.cover-progress .progress-copy {
  min-width: 220px;
  margin-left: auto;
  display: grid;
  grid-template-columns: auto 120px;
  align-items: center;
  gap: 12px;
}

.progress-track {
  position: relative;
  display: block;
  width: 120px;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe5da;
}

.progress-track i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: var(--sage);
  transition: width 0.35s ease;
}

.subject-nav {
  display: flex;
  align-items: stretch;
  gap: 4px;
  margin: 20px 0 34px;
  padding: 10px 4px 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.subject-nav a,
.subject-nav button {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 18px 16px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.subject-nav a[aria-current="page"] {
  color: var(--sage);
  font-weight: 600;
}

.subject-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: -1px;
  left: 16px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--sage);
}

.subject-nav a:hover,
.subject-nav button:hover { color: var(--sage); background: rgba(233, 237, 226, 0.22); }
.subject-nav span { min-width: 18px; font-family: var(--font-serif); font-size: 17px; text-align: center; }

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 282px;
  gap: 40px;
}

.home-main {
  display: grid;
  gap: 46px;
  min-width: 0;
}

.section-heading { margin-bottom: 21px; }
.section-heading h2 { margin: 5px 0 6px; font-family: var(--font-serif); font-size: 29px; letter-spacing: 0.02em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.row-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.row-heading > p { max-width: 300px; text-align: right; }

.continue-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 3px 18px rgba(52, 64, 50, 0.025);
}

.module-mark,
.module-icon {
  display: grid;
  place-items: center;
  flex: none;
  font-family: var(--font-serif);
  border-radius: 50%;
}

.module-mark { width: 58px; height: 58px; font-size: 28px; }
.pinyin-mark { color: var(--indigo); background: var(--slate-soft); border: 1px solid #d5e0e6; font-family: var(--font-pinyin); }
.module-state { color: var(--slate); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; }
.continue-copy h3 { margin: 3px 0 2px; font-family: var(--font-serif); font-size: 22px; }
.continue-copy p { margin: 0; color: var(--muted); font-size: 13px; }
.compact-action { min-height: 44px; padding: 8px 16px; font-size: 13px; }

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

.module-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 14px;
  min-height: 214px;
  width: 100%;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 3px 18px rgba(52, 64, 50, 0.02);
  cursor: default;
}

.module-card.is-ready { cursor: pointer; }
.module-card.is-ready:hover { transform: translateY(-2px); border-color: #aab8a5; box-shadow: 0 8px 20px rgba(52, 64, 50, 0.055); }
.module-icon { grid-row: span 2; width: 43px; height: 43px; border: 1px solid rgba(60, 48, 38, 0.09); background: rgba(255, 255, 255, 0.72); font-size: 21px; }
.module-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.module-meta b { font-family: var(--font-serif); font-size: 17px; }
.module-meta small { padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.72); color: var(--muted); font-size: 10px; }
.module-card > strong { grid-column: 1 / -1; margin-top: 3px; font-family: var(--font-serif); font-size: 21px; font-weight: 600; }
.module-card > p { grid-column: 1 / -1; margin: -5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.module-link { grid-column: 1 / -1; align-self: end; color: var(--sage); font-size: 12px; font-weight: 600; }
.muted-link { color: var(--muted-light); font-weight: 500; }
.tone-pinyin { background: #f3f6f8; }
.tone-hanzi { background: #f7ede9; }
.tone-reading { background: #eef4f1; }
.tone-books { background: #f9f2e6; }
.tone-poem { background: #f5f0e7; }
.tone-writing { background: #f1f2e9; }

.home-sidebar { display: flex; flex-direction: column; gap: 26px; }
.side-card { padding: 24px; border: 1px solid var(--line); border-radius: 20px; }
.soft-sage { background: #eef2e9; }
.side-card h2 { margin: 7px 0 11px; font-family: var(--font-serif); font-size: 22px; line-height: 1.45; }
.side-card > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.85; }
.side-card .text-button { margin-top: 11px; padding: 0; font-size: 12px; }
.little-note { border-radius: 5px 20px 20px 20px; background: #f6eddd; }
.little-note .quote-mark { color: var(--terracotta); font-family: Georgia, serif; font-size: 34px; line-height: 1; }
.little-note > p { color: var(--ink); font-family: var(--font-serif); font-size: 17px; line-height: 1.8; }
.little-note small { display: block; margin-top: 13px; color: var(--muted); }

.tool-list { padding: 0 6px; }
.tool-list h2 { margin: 0 0 12px; font-family: var(--font-serif); font-size: 20px; }
.tool-list button { display: grid; grid-template-columns: 34px 1fr; width: 100%; padding: 13px 0; border-bottom: 1px solid var(--line-light); color: var(--ink); text-align: left; }
.tool-list button:hover b { color: var(--sage); }
.tool-list button > span { grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sheet-warm); color: var(--sage); font-family: var(--font-serif); font-size: 13px; }
.tool-list b { font-size: 13px; font-weight: 600; }
.tool-list small { color: var(--muted); font-size: 11px; }

/* 顶部操作条 (Play Bar) */
.play-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 6px 0 16px;
}

.compact-brand {
  text-decoration: none;
  color: var(--sage);
  font-family: var(--font-kai);
  letter-spacing: 0.2em;
  font-size: 19px;
  font-weight: 600;
  display: none;
}

.play-context {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: center;
}

.play-context strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: var(--sheet-warm);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
}

.play-context span {
  color: var(--muted);
  font-size: 13px;
}

.play-bar .secondary {
  min-height: 38px;
  padding: 6px 16px;
  font-size: 14px;
  border-radius: var(--radius-pill);
}

/* =========================================================
   卡片容器系统 (Board Card, Paper Card, Coach Card)
   ========================================================= */

.board-card, .paper-card, .coach-card {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.board-card {
  padding: 28px 32px 28px;
  position: relative;
  overflow: hidden;
}

.board-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--cinnabar) 0%, #e28073 50%, var(--cinnabar) 100%);
  opacity: 0.85;
}

/* 今日练习大标题与状态 */
.board-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-bottom: 4px;
}

.board-heading h2 {
  margin: 6px 0 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  font-family: var(--font-serif);
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cinnabar);
  font-family: var(--font-sans);
}

.turn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cinnabar-light);
  border: 1px solid var(--cinnabar-border);
  color: var(--cinnabar-deep);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.turn-pill i {
  width: 8px;
  height: 8px;
  background: var(--cinnabar);
  border-radius: 50%;
  animation: pulse-ring 2s infinite ease-in-out;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.board-prompt {
  color: var(--muted);
  line-height: 1.6;
  margin: 8px 0 0;
  font-size: 14px;
}

/* =========================================================
   今日三关选项卡 (Section Tabs)
   ========================================================= */

.section-tabs {
  display: flex;
  gap: 10px;
  margin: 18px 0 8px;
  background: var(--sheet-warm);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.section-tabs button {
  flex: 1;
  min-height: 44px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--ink-sub);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.section-tabs button:hover:not(.selected) {
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.section-tabs button.selected {
  background: #ffffff;
  color: var(--cinnabar);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(90, 60, 30, 0.08);
  border: 1px solid rgba(200, 67, 53, 0.2);
}

/* =========================================================
   题目答题面板 (Lesson Panel)
   ========================================================= */

.lesson-panel {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed #decbb0;
}

.lesson-copy {
  margin-bottom: 12px;
}

.lesson-copy h3 {
  margin: 6px 0 8px;
  font-size: 30px;
  letter-spacing: 0.04em;
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 600;
}

.lesson-copy p {
  margin: 0;
  color: var(--ink-sub);
  line-height: 1.75;
  font-size: 16px;
}

/* 听一听大播放按钮行 */
.speak-row {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 18px 0 16px;
}

.hear {
  min-width: 140px;
  min-height: 52px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.12em;
  border-radius: var(--radius-pill);
  background: var(--sage);
  color: #fffaf4;
  border-color: var(--sage);
  box-shadow: 0 4px 14px rgba(52, 75, 58, 0.22);
  position: relative;
  overflow: hidden;
}

.hear::before {
  content: "🔊";
  font-size: 18px;
  margin-right: 4px;
}

.hear.playing {
  animation: speaker-bounce 0.6s infinite alternate ease-in-out;
  box-shadow: 0 0 0 6px rgba(72, 100, 80, 0.2), 0 4px 14px rgba(52, 75, 58, 0.22);
}

@keyframes speaker-bounce {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}

.example-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--indigo-soft);
  border: 1px solid var(--indigo-border);
  color: var(--indigo);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
}

/* =========================================================
   听音选项卡片 (Choices) —— 四线三格大互动块
   ========================================================= */

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

.choice {
  min-height: 96px;
  border-radius: var(--radius-md);
  border: 2px solid var(--line);
  font-size: 38px;
  font-weight: 600;
  color: var(--indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 5px;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(80, 50, 20, 0.05);
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.choice:hover:not(:disabled) {
  border-color: #b0c9e0;
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(27, 73, 109, 0.12);
}

.choice:active:not(:disabled) {
  transform: scale(0.97);
}

.choice.correct {
  background-color: var(--ok-bg) !important;
  border-color: var(--ok) !important;
  color: var(--ok) !important;
  box-shadow: 0 6px 18px rgba(39, 124, 68, 0.22) !important;
  animation: correct-bounce 0.4s cubic-bezier(0.2, 1.2, 0.5, 1);
}

.choice.correct::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 16px;
  font-weight: bold;
  color: var(--ok);
}

@keyframes correct-bounce {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.choice.wrong {
  background-color: var(--stuck-bg) !important;
  border-color: var(--stuck) !important;
  color: var(--stuck) !important;
  box-shadow: 0 6px 18px rgba(200, 67, 53, 0.18) !important;
  animation: wrong-shake 0.4s ease-in-out;
}

@keyframes wrong-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* =========================================================
   今日短文朗读排版 (Passage)
   ========================================================= */

.passage {
  font-size: 24px;
  line-height: 2.7;
  padding: 20px 24px;
  margin: 12px 0 16px;
  background: var(--sheet-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-family: var(--font-kai);
  color: var(--ink);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.02);
}

.passage p {
  margin: 0 0 10px;
  text-indent: 2em;
}

.passage p:last-child {
  margin-bottom: 0;
}

ruby {
  ruby-position: over;
  margin: 0 2px;
}

rt {
  font-family: var(--font-pinyin);
  font-size: 13px;
  color: var(--indigo);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding-bottom: 4px;
}

/* 朗读打分行 (Mark Row) */
.mark-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.mark {
  min-height: 52px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow-sm);
}

.mark.ok {
  background: linear-gradient(135deg, #2e8b4e 0%, #1f6b3b 100%);
  color: #ffffff;
  border: 1px solid #1a5931;
}

.mark.ok::before {
  content: "⭐";
  font-size: 16px;
}

.mark.okish {
  background: linear-gradient(135deg, #df8924 0%, #be6d12 100%);
  color: #ffffff;
  border: 1px solid #a35d0e;
}

.mark.okish::before {
  content: "🌱";
  font-size: 16px;
}

.mark.stuck {
  background: linear-gradient(135deg, #c84335 0%, #9e2a1e 100%);
  color: #ffffff;
  border: 1px solid #852218;
}

.mark.stuck::before {
  content: "💡";
  font-size: 16px;
}

.mark:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 即时评价结果 (Inline Assessment) */
.inline-assessment, .assessment {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 1.7;
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-assessment.success, .assessment.success {
  border: 1px solid var(--ok-border);
  background: var(--ok-bg);
  color: var(--ok);
  font-weight: 500;
}

.inline-assessment.retry, .assessment.retry {
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn);
  font-weight: 500;
}

/* 操作按钮行 (Board Actions) */
.board-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  align-items: center;
}

.board-actions .primary {
  margin-left: auto;
  min-height: 48px;
  padding: 10px 24px;
  font-size: 16px;
  font-weight: 600;
}

/* =========================================================
   拼音总表与拼读魔法台 (Chart & Blend Stage)
   ========================================================= */

.secondary-view {
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin: 12px 0 20px;
}

.view-heading h2 {
  margin: 0 0 6px;
  font-size: 28px;
  font-family: var(--font-serif);
  letter-spacing: 0.08em;
  color: var(--ink);
}

/* 拼读魔法台 */
.blend-stage {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px 20px;
  background: var(--sheet-warm);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.blend-slot {
  min-width: 80px;
  min-height: 78px;
  padding: 8px 14px;
  background: #ffffff;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.blend-slot span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.16em;
  margin-bottom: 2px;
}

.blend-slot strong {
  display: block;
  font-size: 30px;
  line-height: 1.1;
  color: var(--indigo);
  font-family: var(--font-pinyin);
}

.blend-slot.result {
  min-width: 108px;
  border-color: var(--cinnabar-border);
  box-shadow: 0 4px 14px rgba(200, 67, 53, 0.12);
}

.blend-slot.result strong {
  color: var(--cinnabar);
}

.blend-plus, .blend-arrow {
  font-size: 22px;
  color: var(--muted);
  font-weight: 600;
}

#blend-play {
  margin-left: 6px;
}

#blend-clear {
  margin-left: 2px;
}

/* 声调跳板琴键 */
.blend-tones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
  padding: 6px 0;
}

.tone-btn {
  min-width: 78px;
  min-height: 64px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.tone-btn:hover:not(:disabled) {
  border-color: #b0c9e0;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tone-btn small {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.tone-btn strong {
  font-size: 24px;
  color: var(--indigo);
}

.tone-btn.sweep {
  background: linear-gradient(135deg, var(--cinnabar) 0%, var(--cinnabar-deep) 100%);
  border-color: var(--cinnabar-deep);
  color: #ffffff;
  box-shadow: var(--cinnabar-shadow);
}

.tone-btn.sweep strong, .tone-btn.sweep small {
  color: #ffffff;
}

/* 拼音总表格子体系 */
.chart {
  margin-top: 20px;
  display: grid;
  gap: 24px;
}

.chart-block h3 {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 0.24em;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-block h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.final-groups {
  display: grid;
  gap: 16px;
}

/* 单个拼音字块 (Tile) */
.tile {
  min-width: 62px;
  min-height: 62px;
  padding: 6px 8px 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 5px rgba(80, 50, 20, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ink);
  position: relative;
}

.tile:hover {
  transform: translateY(-2px);
  border-color: #b8cde2;
  box-shadow: 0 6px 14px rgba(27, 73, 109, 0.1);
}

.tile .glyph {
  font-size: 22px;
  color: var(--indigo);
  line-height: 1.1;
  font-weight: 600;
}

.tile small {
  font-size: 11px;
  color: var(--muted);
}

/* 今日重点练习音标 (Target) */
.tile.target {
  background: #fff8f2;
  border-color: var(--cinnabar-border);
  box-shadow: 0 0 0 2px rgba(200, 67, 53, 0.15), 0 3px 8px rgba(200, 67, 53, 0.1);
}

.tile.target::after {
  content: "★";
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 9px;
  color: var(--cinnabar);
}

/* 选中项 (Picked) */
.tile.picked {
  background: #edf4fa;
  border-color: var(--indigo);
  box-shadow: 0 0 0 2px var(--indigo), var(--shadow-sm);
}

.tile.picked .glyph {
  color: var(--indigo-deep);
}

/* =========================================================
   学习记录 (Records View)
   ========================================================= */

.records-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.paper-card {
  padding: 24px;
  margin-bottom: 20px;
}

.paper-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-family: var(--font-serif);
  letter-spacing: 0.05em;
  color: var(--ink);
}

.skills {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.skill-row {
  padding: 12px 14px;
  background: var(--sheet-warm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.skill-row-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.skill-row-heading strong {
  font-size: 15px;
  color: var(--ink);
}

.skill-row-heading span {
  font-size: 12px;
  color: var(--cinnabar);
  font-weight: 500;
}

ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

ol li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-light);
  display: grid;
  gap: 4px;
}

ol li:last-child {
  border-bottom: 0;
}

.history-success {
  color: var(--ok);
  font-weight: 500;
}

.history-retry {
  color: var(--cinnabar);
  font-weight: 500;
}

/* =========================================================
   抽屉面板 (App Drawer: 菜单与讲解)
   ========================================================= */

.app-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(440px, 100vw);
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--paper);
  padding: 0 24px 32px;
  overflow-y: auto;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.app-drawer::backdrop {
  background: rgba(30, 20, 10, 0.45);
  backdrop-filter: blur(2px);
}

.drawer-heading {
  position: sticky;
  top: 0;
  background: var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  z-index: 10;
}

.drawer-heading h2 {
  margin: 0;
  font-size: 22px;
  font-family: var(--font-serif);
  letter-spacing: 0.08em;
}

.page-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}

.page-nav button {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  min-height: 48px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.page-nav button[aria-current="page"] {
  background: var(--sage);
  color: #ffffff;
  border-color: var(--sage);
  box-shadow: 0 3px 10px rgba(52, 75, 58, 0.15);
}

.mode-card {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  display: grid;
  gap: 10px;
}

.coach-card {
  padding: 24px;
  margin-bottom: 18px;
}

.coach-card h2 {
  margin: 8px 0 12px;
  font-size: 24px;
  font-family: var(--font-serif);
}

/* =========================================================
   登录卡片与输入框
   ========================================================= */

.login-panel {
  max-width: 440px;
  margin: 10vh auto;
  padding: 36px 32px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.login-panel h1 {
  font-size: 30px;
  letter-spacing: 0.06em;
  margin: 8px 0 14px;
  font-family: var(--font-serif);
  color: var(--ink);
}

.login-seal {
  width: 64px;
  height: 64px;
  margin: 0 auto 15px;
  font-size: 29px;
}

.login-panel p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 24px;
}

.login-panel label {
  display: block;
  text-align: left;
  margin: 18px 0 8px;
  font-size: 14px;
  color: var(--ink-sub);
}

input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-size: 15px;
  transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--indigo);
  outline: none;
  box-shadow: 0 0 0 3px var(--indigo-soft);
}

/* =========================================================
   提示条 (Toast)
   ========================================================= */

#toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 22, 16, 0.94);
  color: #fffaf0;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  animation: toast-up 0.3s ease-out;
}

@keyframes toast-up {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* =========================================================
   A4 纸张打印样式 (Print Sheet) —— 典雅描红字帖
   ========================================================= */

.print-root {
  display: grid;
  gap: 28px;
}

.sheet {
  background: #ffffff;
  color: #111111;
  border: 1px solid #d5c39e;
  border-radius: 4px;
  padding: 24px 28px;
  min-height: 300px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.sheet header {
  text-align: center;
  border-bottom: 2px solid #8e2b1f;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.sheet h1 {
  margin: 0;
  font-size: 26px;
  font-family: var(--font-serif);
  letter-spacing: 0.25em;
  color: #111111;
}

.sheet .meta {
  font-size: 13px;
  color: #666666;
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.print-section {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin: 16px 0 10px;
  padding-left: 8px;
  border-left: 3px solid #8e2b1f;
}

.print-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}

.print-grid .print-q {
  margin: 0;
  padding: 4px 0;
}

.print-grid .print-q strong {
  font-size: 13px;
  display: block;
  margin-bottom: 4px;
}

.print-grid .print-choices {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 17px;
  color: #111111;
}

.print-grid .print-choices span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.feedback-strip {
  margin-top: 24px;
  padding: 14px 18px;
  border: 1px dashed #8e2b1f;
  font-size: 14px;
  display: grid;
  gap: 8px;
  background: #fdfaf4;
}

.answer-key {
  background: #fdfaf4;
}

/* =========================================================
   移动端与小屏幕适配 (@media max-width: 740px)
   ========================================================= */

@media (max-width: 740px) {
  .masthead, .board-heading, .board-prompt, .desk-only, #open-coach {
    display: none !important;
  }

  main {
    padding: 6px 12px 32px;
  }

  .compact-brand {
    display: block;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
  }

  .play-bar {
    gap: 8px;
    min-height: 42px;
    padding: 4px 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .play-context {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
  }

  .play-context strong {
    font-size: 13px;
    padding: 2px 8px;
    flex-shrink: 0;
  }

  .play-context span {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #open-menu {
    flex-shrink: 0;
    min-height: 32px;
    padding: 4px 14px;
    font-size: 13px;
    font-weight: 500;
    margin-left: auto;
    border-radius: var(--radius-pill);
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
  }

  .board-card {
    padding: 14px 14px 18px;
    border-radius: var(--radius-md);
  }

  .section-tabs {
    margin: 2px 0 10px;
    gap: 4px;
    padding: 3px;
  }

  .section-tabs button {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    padding: 6px 2px;
    font-size: 12px;
    letter-spacing: 0;
    min-height: 36px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
  }

  .lesson-panel {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 0;
  }

  .lesson-copy h3 {
    font-size: 24px;
    margin: 4px 0 4px;
  }

  .lesson-copy p {
    font-size: 14px;
    color: var(--muted);
  }

  .speak-row {
    margin: 12px 0 12px;
  }

  .choices {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 8px 0;
  }

  .choice {
    min-height: 78px;
    font-size: 34px;
  }

  .passage {
    font-size: 20px;
    line-height: 2.3;
    padding: 14px 16px;
  }

  .mark-row {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
  }

  .mark {
    min-height: 44px;
    font-size: 14px;
    padding: 6px;
  }

  .board-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .board-actions button {
    width: 100%;
    min-height: 46px;
    margin: 0 !important;
  }

  .records-grid {
    grid-template-columns: 1fr;
  }

  .blend-stage {
    gap: 8px;
    padding: 12px 14px;
  }

  .blend-slot {
    min-width: 58px;
    min-height: 62px;
    padding: 4px 6px;
  }

  .blend-slot strong {
    font-size: 22px;
  }

  .app-drawer {
    inset: auto 0 0;
    width: 100%;
    height: auto;
    max-height: 90dvh;
    border-radius: 20px 20px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 0 18px 28px;
  }

  .tile {
    min-width: 50px;
    min-height: 50px;
  }

  .home-cover {
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .cover-copy {
    padding: 25px 22px 18px;
  }

  .cover-copy h1 {
    margin-top: 7px;
    font-size: 32px;
  }

  .cover-intro {
    margin-bottom: 18px;
    font-size: 13px;
  }

  .cover-actions {
    gap: 10px;
  }

  .cover-actions .primary {
    flex: 1 1 170px;
  }

  .cover-art {
    min-height: 178px;
    margin: 0 16px 18px;
  }

  .cover-art p {
    padding-block: 9px;
    font-size: 11px;
  }

  .art-sun { top: 25px; right: 42px; width: 48px; height: 48px; }
  .cloud-one { top: 41px; left: 27px; transform: scale(0.8); }
  .cloud-two { top: 76px; }
  .art-book { bottom: 41px; transform: translateX(-50%) scale(0.82); transform-origin: bottom; }
  .art-sprout { bottom: 92px; }

  .cover-progress {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 18px;
    padding: 12px 20px 15px;
  }

  .cover-progress > div {
    gap: 7px;
  }

  .cover-progress strong {
    font-size: 22px;
  }

  .cover-progress .progress-copy {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 106px;
    min-width: 0;
    margin: 0;
  }

  .progress-track { width: 106px; }

  .subject-nav {
    margin: 12px 0 27px;
    padding-top: 3px;
  }

  .subject-nav a,
  .subject-nav button {
    min-height: 48px;
    padding: 8px 13px 13px;
    font-size: 12px;
  }

  .home-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .home-main { gap: 38px; }
  .section-heading h2 { font-size: 26px; }
  .row-heading { display: block; }
  .row-heading > p { max-width: none; margin-top: 6px; text-align: left; }

  .continue-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
  }

  .module-mark { width: 50px; height: 50px; }
  .compact-action { grid-column: 1 / -1; width: 100%; }
  .module-grid { grid-template-columns: 1fr; gap: 13px; }
  .module-card { min-height: 194px; padding: 18px; }
  .home-sidebar { gap: 20px; }
}

/* =========================================================
   打印专用 (@media print)
   ========================================================= */

@media print {
  body {
    background: #ffffff !important;
  }

  .masthead, .play-bar, .no-print, .app-drawer, #toast, #view-home, #view-board, #view-library, #view-records, #view-chart {
    display: none !important;
  }

  #view-print {
    display: block !important;
  }

  main {
    max-width: none;
    padding: 0;
  }

  .print-root {
    gap: 0;
  }

  .sheet {
    border: 0;
    box-shadow: none;
    min-height: auto;
    page-break-after: always;
    padding: 8mm 10mm;
  }

  .answer-key {
    page-break-before: always;
  }

  @page {
    size: A4 portrait;
    margin: 10mm;
  }
}

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