/* jrgramma-next 设计系统（视觉对齐版）
   唯一视觉规格：docs/ISTUDY-DESIGN-SYSTEM-GUIDE.md
   SHA-256 43c9a20525c3ac8bedf5dc370bc039e6a943e52667cac1b71723ef816e953a1e
   token 名称与取值按指南 §4.3 起始 token；本站新增语义别名：--ok 正确绿 #1B6E3D、--bad 错误红 #B3261E
   （AA 自检见 tools/tests/contrast_next_test.js）。 */
:root {
  color-scheme: light;

  --canvas: #FFFDF7;
  --surface: #FFFFFF;
  --ink: #17131F;
  --ink-muted: #665F70;

  --brand: #6846E8;
  --brand-strong: #5632D6;
  --lavender: #E9DEFF;
  --lavender-deep: #D3C0FF;
  --dark-panel: #27194F;
  --hero-soft: #F0E9FF;
  --sun: #FFC94A;
  --coral: #FF806C;
  --mint: #C9F3D3;

  --focus: #2D6BFF;
  --border: rgba(23, 19, 31, 0.14);
  --shadow-soft: 0 10px 30px rgba(41, 27, 71, 0.06);
  --shadow-raised: 0 24px 70px rgba(67, 44, 132, 0.13);

  --ok: #1B6E3D;
  --bad: #B3261E;
  --bad-soft: #FBEAE8;

  /* §6.3 语义圆角档：组件只消费语义变量，不散落裸值。 */
  --radius-inline: 20px;
  --radius-row: 10px;
  --radius-panel: 28px;
  --radius-card: 40px;
  --radius-hero: 56px;
  --radius-shell: 44px;
  --radius-pill: 999px;

  --content: 1200px;
  --motion-feedback: transform 180ms cubic-bezier(0.2, 0, 0, 1),
                     box-shadow 180ms cubic-bezier(0.2, 0, 0, 1);

  --font-sans: ui-rounded, "SF Pro Rounded", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-accent: "Kaiti SC", STKaiti, KaiTi, serif;

  /* §5.2 八档类型刻度：门面放大声量，课内消费同一刻度但不升格为 Display。 */
  --type-display: clamp(3.35rem, 5.7vw, 5.35rem);
  --type-section-title: clamp(2.55rem, 5vw, 4.8rem);
  --type-panel-title: clamp(2.55rem, 3.6vw, 4.1rem);
  --type-card-title: clamp(1.6rem, 2.5vw, 2.15rem);
  --type-lead: clamp(1.03rem, 1.5vw, 1.18rem);
  --type-body: 1rem;
  --type-supporting: clamp(0.84rem, 1vw, 0.97rem);
  --type-label: clamp(0.75rem, 0.9vw, 0.88rem);
}

* { box-sizing: border-box; }
html { font-size: 16px; }
[hidden] { display: none !important; }

/* §6.1 页面框架：外层淡紫，主站体暖白大圆角 */
body {
  margin: 0;
  background: var(--lavender);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--type-body);
  line-height: 1.65;
}
body.facade-page {
  background-image:
    linear-gradient(rgba(104, 70, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104, 70, 232, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
}
.site-shell {
  background: var(--canvas);
  width: min(100% - 24px, 1540px);
  margin-inline: auto;
  margin-block: 12px;
  border-radius: var(--radius-shell);
  overflow: clip;
  min-height: calc(100vh - 24px);
}
.facade-page .site-shell {
  background-color: rgba(255, 253, 247, 0.96);
  background-image:
    linear-gradient(rgba(104, 70, 232, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104, 70, 232, 0.025) 1px, transparent 1px);
  background-size: 22px 22px;
}
main {
  width: min(100% - 48px, var(--content));
  margin-inline: auto;
  padding-block: 16px 72px;
}

/* §5 排版角色 */
h1, h2, h3 { color: var(--ink); margin: 0 0 10px; }
h1 { font-size: var(--type-card-title); line-height: 1.18; letter-spacing: -0.045em; font-weight: 800; }
h1.display-title { font-size: var(--type-display); line-height: 0.99; letter-spacing: -0.075em; font-weight: 800; }
h2 { font-size: var(--type-card-title); line-height: 1.18; letter-spacing: -0.045em; font-weight: 780; margin-top: 22px; }
h2.section-title { font-size: var(--type-section-title); line-height: 1.08; letter-spacing: -0.065em; }
h3 { font-size: var(--type-supporting); line-height: 1.3; font-weight: 700; margin-top: 18px; }
p { margin: 10px 0; }
.lead { font-size: var(--type-lead); line-height: 1.8; font-weight: 520; color: var(--ink-muted); }
.small { font-size: var(--type-supporting); }
.label { font-size: var(--type-label); line-height: 1.3; font-weight: 720; letter-spacing: 0.04em; }
.facade-title { max-inline-size: 12ch; text-wrap: balance; }
.title-line { display: block; max-inline-size: 100%; }
.eyebrow {
  display: flex; align-items: center; gap: 10px; margin: 22px 0 14px;
  color: var(--brand-strong); font-size: var(--type-label); line-height: 1.3;
  font-weight: 780; letter-spacing: 0.06em;
}
.eyebrow-rule { flex: 0 0 28px; width: 28px; height: 4px; border-radius: var(--radius-pill); background: var(--coral); }
.accent-script {
  position: relative; isolation: isolate; z-index: 0;
  display: inline-block;
  color: var(--brand);
  font-family: var(--font-accent);
  font-size: 1.02em;
  font-style: normal;
  letter-spacing: -0.06em;
  line-height: 0.92;
}
.accent-script .accent-word { position: relative; z-index: 1; }
.accent-brush {
  position: absolute; z-index: 0; inset-inline: -0.06em; inset-block-end: -0.04em;
  height: 0.28em; background: var(--sun); transform: rotate(-1deg); border-radius: 0;
}
a { color: var(--brand-strong); }
button { font: inherit; }
details summary { cursor: pointer; }

/* §3.2 门面长页节奏：只挂在门面页，课内步进不消费这些构图角色。 */
.facade-page main { padding-block: clamp(22px, 4vw, 52px) 88px; }
.facade-hero {
  display: grid; gap: clamp(18px, 3vw, 34px); align-items: center;
  margin: 0 0 clamp(24px, 5vw, 56px); padding: clamp(20px, 3.5vw, 48px);
  background: linear-gradient(118deg, var(--hero-soft) 0%, var(--surface) 52%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-hero); box-shadow: var(--shadow-raised);
  overflow: hidden;
}
/* 编辑式 Hero（指南 §10.4）：文案列 + 淡紫插画列铺满面板，人物立在列底 */
.facade-hero.has-art { padding: 0; gap: 0; align-items: stretch; min-height: 560px; }
.facade-hero .hero-art { position: relative; min-width: 0; min-height: 260px; }
/* 剪纸拱形舞台：人物立在面板底边，头顶探出拱顶，消除硬分栏缝 */
/* 胶囊沉到面板底以下，露出的上半即拱形（R1 圆角白名单） */
.facade-hero .hero-art::before {
  content: ""; position: absolute; bottom: -340px; left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: min(74%, 430px); height: calc(88% + 340px);
  background: var(--lavender); border-radius: var(--radius-pill);
}
/* 地图与考区插画更宽，舞台加宽 */
.facade-hero .map-hero-art::before,
.facade-hero .region-hero-art::before { width: min(88%, 540px); }
.facade-hero .parents-hero-art .slot-figure img { height: 96%; }
.facade-hero .hero-art .slot-figure { position: relative; width: 100%; height: 100%; max-width: none; aspect-ratio: auto; }
.facade-hero .hero-art .slot-figure img {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  height: 100%; width: auto; max-width: none;
}
.facade-hero .hero-copy { display: grid; gap: 14px; align-content: center; min-width: 0; padding: clamp(22px, 5vw, 48px); }
.facade-hero .hero-copy > * { margin-block: 0; }
.facade-hero .hero-copy .facade-hero-action { margin-top: 8px; }
.facade-hero .hero-copy .lead { max-inline-size: 36rem; }
.method-line { color: var(--brand-strong); font-size: var(--type-supporting); font-weight: 650; }
.method-line strong { font-weight: 800; }
.facade-hero-action { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Hero 出血构图断言保留：负下边距使人物立到面板底边 */
@media (min-width: 761px) {
  .facade-hero .hero-art .illustration-frame-hero { margin-block-end: -42px; }
}

/* 今日学习主任务带：日光黄重点面板（§10.8），全站第一主行动 */
.paper-card.today-band { background: var(--sun); border-color: rgba(23, 19, 31, 0.18); }
.today-band .today-progress .bar { background: rgba(255, 253, 247, 0.55); }
.today-band .today-progress .bar::-webkit-progress-value { background: var(--brand-strong); }
.today-band .today-progress .bar::-moz-progress-bar { background: var(--brand-strong); }
.today-band .tag.soft { background: rgba(255, 253, 247, 0.55); color: var(--ink); }
.today-band .today-next { border-top-color: rgba(23, 19, 31, 0.22); }
.today-band .muted { color: rgba(23, 19, 31, 0.72); }

/* 入口卡插画探出卡面顶边，呼应 Hero 纸艺手法 */
.subject-card { align-items: start; }
.subject-card .subject-art { margin-block-start: -14px; }
.facade-closing {
  margin: clamp(24px, 5vw, 56px) 0; padding: clamp(24px, 5vw, 54px);
  border: 1px solid var(--border); border-radius: var(--radius-hero);
}
.facade-content { margin-block: clamp(24px, 5vw, 56px); }
.facade-content > .paper-card:first-child { margin-top: 0; }
.facade-content > .paper-card:last-child { margin-bottom: 0; }
.entry-grid { display: grid; gap: clamp(18px, 1.6vw, 22px); }
.entry-grid > .paper-card { margin: 0; padding-block: 24px; }
.entry-grid > .paper-card h2 { margin-top: 0; }

/* §10.6 Subject Card：整卡链接，左插画右文案，可交互不旋转 */
.subject-card {
  display: grid; grid-template-columns: minmax(0, 104px) minmax(0, 1fr);
  gap: clamp(14px, 1.8vw, 20px); align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 24px;
  box-shadow: var(--shadow-soft); text-decoration: none; color: var(--ink);
}
.subject-art { display: block; min-width: 0; }
.subject-art .slot-figure.illustration-frame-card { max-width: 104px; margin-inline: auto; }
.subject-body { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.subject-title { font-size: var(--type-card-title); line-height: 1.18; letter-spacing: -0.045em; font-weight: 780; }
.subject-desc { font-size: var(--type-supporting); line-height: 1.55; color: var(--ink-muted); }
.subject-cta { font-weight: 700; color: var(--brand-strong); font-size: var(--type-supporting); }

/* 今日学习主任务面板 */
.facade-content > .today-panel { padding-block: 24px; }
.today-panel > h2 { margin-bottom: 6px; }
.today-progress { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-block: 0 8px; }
.today-progress .bar { flex: 1 1 200px; max-inline-size: 420px; }
.today-progress p { margin: 0; }
.today-next {
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border); padding-top: 10px;
}
.today-meta { min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.today-next-title { margin: 0; font-weight: 720; font-size: 1.06rem; }
.today-tags { margin: 0; }
.facade-closing > .paper-card { margin-bottom: 0; box-shadow: none; }
.facade-closing > .paper-card:first-of-type { margin-top: 0; }
.facade-highlight,
.paper-card.facade-highlight { background: var(--sun); border-color: rgba(23, 19, 31, 0.18); }
.facade-highlight h2, .facade-highlight h3 { color: var(--ink); }
.facade-highlight .coverage-num { color: var(--ink); }
.facade-closing,
.paper-card.facade-closing { background: var(--lavender); border-color: var(--lavender-deep); }
.facade-closing h2, .facade-closing h3 { color: var(--brand-strong); }

/* §10.9 门面纸片：装饰层不接收指针/焦点，也不参与阅读顺序。 */
.facade-hero, .facade-highlight, .facade-closing { position: relative; }
.facade-decor-layer { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.facade-hero > *:not(.facade-decor-layer),
.facade-highlight > *:not(.facade-decor-layer),
.facade-closing > *:not(.facade-decor-layer) { position: relative; z-index: 1; }
.facade-decor {
  position: absolute; display: block; pointer-events: none; user-select: none;
}
.facade-decor:nth-child(1) { inset-block-start: 17px; inset-inline-end: 8%; }
.facade-decor:nth-child(2) { inset-block-end: 18px; inset-inline-end: 4%; }
.facade-decor:nth-child(3) { inset-block-start: 46%; inset-inline-start: 2%; }
.facade-decor-dot {
  width: 20px; height: 20px; border-radius: var(--radius-pill); background: var(--sun);
}
.facade-decor-paper {
  width: 48px; height: 30px; background: var(--lavender);
  border: 2px solid var(--brand); transform: rotate(-1.2deg);
}
.facade-decor-star {
  width: 28px; height: 28px; background: var(--coral);
  clip-path: polygon(50% 0, 62% 34%, 100% 34%, 70% 55%, 82% 100%, 50% 72%, 18% 100%, 30% 55%, 0 34%, 38% 34%);
}
.facade-decor-line {
  width: 48px; height: 5px; background: var(--coral); transform: rotate(1.2deg);
}

@media (min-width: 761px) {
  .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facade-hero,
  .facade-content,
  .facade-closing { margin-block: clamp(84px, 5vw, 96px); }
  .facade-hero { margin-top: 0; }
}

@media (min-width: 761px) and (max-width: 1023px) {
  .passage-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .facade-hero { gap: 24px; padding: 44px; }
  .facade-closing { padding: 36px; }
  .facade-content .entry-grid p { margin-block: 8px; }
  .facade-closing > .paper-card { padding: 24px 28px; }
  .facade-hero.has-art { grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr); }
  .facade-hero.has-art > .hero-copy { grid-column: 1; grid-row: 1; padding: clamp(36px, 4.6vw, 64px); }
  .facade-hero.has-art > .hero-art { grid-column: 2; grid-row: 1; }
}

/* §13.2 焦点 */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.step-host [tabindex="-1"]:focus { outline: none; }
.skip-link {
  position: absolute; inset-inline-start: 16px; top: -48px;
  background: var(--surface); color: var(--brand-strong);
  padding: 10px 22px; border-radius: var(--radius-pill); z-index: 90; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* §10.1 Header：品牌居左、白胶囊导航、真实状态在右；不粘性 */
.site-header {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  min-height: 74px; padding: 10px clamp(15px, 3vw, 28px);
  border-bottom: 1px solid var(--border); background: var(--canvas);
}
@media (min-width: 761px) {
  .site-header { display: grid; grid-template-columns: 1fr auto 1fr; }
  .site-header .brand { justify-self: start; }
  .site-header nav { justify-self: center; }
  .site-header .region-chip { justify-self: end; margin-left: 0; }
}
.site-header .brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 800; color: var(--brand-strong); text-decoration: none; font-size: 1.14rem; letter-spacing: -0.02em;
}
.brand-mark {
  display: inline-grid; place-items: center; flex: 0 0 48px; width: 48px; height: 38px;
  border-radius: var(--radius-pill); background: var(--brand); color: #FFFFFF;
  font-family: var(--font-accent); font-size: 1.38rem; line-height: 1; font-weight: 700;
}
.brand-copy { display: inline-flex; flex-direction: column; gap: 0; min-width: 0; }
.brand-name { line-height: 1.15; }
.brand-family { color: var(--ink-muted); font-size: var(--type-label); line-height: 1.2; font-weight: 650; letter-spacing: 0.02em; }
.site-header nav {
  display: flex; gap: 2px; flex-wrap: wrap; align-items: center;
  background: rgba(255, 255, 255, 0.72); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 4px;
}
@media (max-width: 760px) {
  .site-header nav { order: 3; flex-basis: 100%; justify-content: center; }
}
.site-header nav a {
  text-decoration: none; padding: 7px 16px; border-radius: var(--radius-pill);
  color: var(--ink); min-height: 38px; display: inline-flex; align-items: center;
}
.site-header nav a[aria-current="page"] { background: var(--lavender); font-weight: 650; }
.region-chip {
  margin-left: auto; border: 1.5px solid var(--brand-strong); color: var(--brand-strong);
  background: var(--surface); border-radius: var(--radius-pill); padding: 8px 18px;
  cursor: pointer; text-decoration: none; min-height: 40px; display: inline-flex; align-items: center;
}

/* 页脚：slim 单区全局 chrome，无装饰，家族关系与真实状态 */
.site-footer {
  display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center;
  margin-top: clamp(20px, 3vw, 36px);
  border-top: 1px solid var(--border);
  padding: 14px clamp(15px, 3vw, 28px) 18px;
  color: var(--ink-muted); font-size: var(--type-supporting);
}
.site-footer .footer-brand {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--brand-strong); font-weight: 700; text-decoration: none;
  min-height: 44px;
}
.footer-mark {
  display: inline-grid; place-items: center; width: 28px; height: 24px;
  border-radius: var(--radius-pill); background: var(--brand); color: #FFFFFF;
  font-family: var(--font-accent); font-size: 0.9rem; line-height: 1;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.site-footer nav a {
  color: var(--ink-muted); text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center;
}
.site-footer nav a:hover { color: var(--brand-strong); }
.site-footer .footer-status { margin: 0; margin-inline-start: auto; line-height: 1.5; }

/* 错误态面板（§3.4）：影响范围 + 安全内容 + 下一步 */
.error-panel {
  display: grid; grid-template-columns: minmax(0, 132px) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 28px); align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-panel); padding: clamp(24px, 3vw, 34px);
  margin: 17px 0; box-shadow: var(--shadow-soft);
}
.error-panel-art .slot-figure.illustration-frame-card { max-width: 132px; }
.error-panel.compact { grid-template-columns: minmax(0, 1fr); padding: clamp(18px, 2.4vw, 26px); }
.error-panel.compact h2 { font-size: 1.15rem; }
.error-panel-body h2 { margin-top: 0; }
.error-panel-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
@media (max-width: 760px) {
  .error-panel { grid-template-columns: minmax(0, 1fr); }
  .error-panel-art .slot-figure.illustration-frame-card { max-width: 96px; margin-inline: auto; }
  .site-footer .footer-status { margin-inline-start: 0; flex-basis: 100%; }
}

/* 面板与卡：§6.3 圆角层级 + §6.2 空间节奏 */
.paper-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-panel);
  padding: clamp(24px, 3vw, 34px); margin: 17px 0; box-shadow: var(--shadow-soft);
}
.paper-card.ruled {
  background-image: repeating-linear-gradient(transparent, transparent 27px, rgba(233, 222, 255, 0.55) 27px, rgba(233, 222, 255, 0.55) 28px);
}

/* §10.3 动作：实心紫色胶囊 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius-pill); padding: 12px 22px;
  background: var(--brand); color: #FFFFFF; font-weight: 650; cursor: pointer;
  text-decoration: none; min-height: 44px; text-align: center;
}
.btn:hover { background: var(--brand-strong); }
.btn:active { background: var(--brand-strong); }
.btn.primary-lg { min-height: 52px; padding: 14px 26px; }
.btn.ghost { background: var(--surface); color: var(--brand-strong); border: 1.5px solid var(--brand-strong); }
.btn.quiet { background: var(--lavender); color: var(--ink); }
.btn.quiet:hover, .btn.quiet:active { background: var(--lavender-deep); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* §10.9 标签：胶囊，短名词 */
.tag { display: inline-block; border-radius: var(--radius-pill); padding: 3px 12px; font-size: 0.84rem; font-weight: 720; background: var(--lavender); color: var(--ink); }
.tag.sun { background: var(--sun); }
.tag.mint { background: var(--mint); }
.tag.soft { background: rgba(233, 222, 255, 0.5); color: var(--ink-muted); }
.tag.tilt { transform: rotate(-1.2deg); }

.muted { color: var(--ink-muted); }

/* 场景引入：故事卡（sun 边条 + 极浅黄底 + 编辑式引号） */
.scene {
  position: relative;
  background: rgba(255, 201, 74, 0.10); border-left: 6px solid var(--sun);
  border-radius: var(--radius-inline); padding: 8px 18px 12px; margin: 14px 0;
}
.scene-quote {
  display: block;
  font-size: 2.2rem; font-weight: 800; line-height: 1;
  color: var(--sun); margin-block-end: 0;
}
.scene .scene-en { font-size: 1.3rem; font-weight: 650; line-height: 1.6; letter-spacing: -0.01em; margin: 4px 0 0; }

/* 引导发现 */
details.discover { border: 1.5px dashed var(--brand); border-radius: var(--radius-inline); padding: 12px 16px; margin: 18px 0; background: var(--surface); }
details.discover summary { cursor: pointer; font-weight: 650; color: var(--brand-strong); min-height: 32px; }
details.discover[open] summary { margin-bottom: 6px; }

.rule-box { background: var(--lavender); border-left: 4px solid var(--brand); border-radius: var(--radius-inline); padding: 16px 18px; margin: 18px 0; font-size: 1.06rem; }
.takeaway { border-left: 3px solid var(--brand); padding: 6px 12px; margin: 10px 0; background: transparent; border-radius: var(--radius-row); font-size: var(--type-supporting); color: var(--ink-muted); }
.rule-box { margin-block: 16px; }

/* 规则确认：Von Restorff 角标 */
.rule-box { position: relative; }
.rule-box::after {
  content: ""; position: absolute; top: 0; left: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 14px 14px 0 0;
  border-color: var(--brand) transparent transparent transparent;
}

/* 例句折叠与辅助组 */
details.discover.example-fold, details.discover.aux-group { border-radius: var(--radius-row); }

/* 记忆卡（速记与避坑，2026-08-06 方案 A）：透明底细边框，不占课内主色块名额；
   荧光笔只标冻结保点关键词，三色标签片沿用既有 token。 */
.memo-card { border: 1.5px solid var(--lavender-deep); border-radius: var(--radius-inline); margin-block: 18px; overflow: hidden; }
.memo-head { display: flex; align-items: center; gap: 8px; padding: 9px 16px 8px; border-bottom: 1px solid var(--lavender); }
.memo-title { font-size: 0.88rem; font-weight: 800; color: var(--brand-strong); letter-spacing: 0.04em; }
.memo-bar { flex: 1; height: 3px; background: linear-gradient(90deg, var(--lavender-deep), transparent); }
.memo-row { display: flex; gap: 10px; padding: 10px 16px; align-items: baseline; }
.memo-row + .memo-row { border-top: 1px dashed var(--lavender); }
/* 标签片挂 .tag 基类（药丸圆角在豁免清单内），此处只调尺寸与三色语义 */
.memo-chip { flex: none; font-size: 11.5px; font-weight: 750; padding: 1px 9px; letter-spacing: 0.02em; }
.chip-ji { background: var(--lavender); color: var(--brand-strong); }
.chip-jue { background: rgba(255, 201, 74, 0.32); color: #7A5800; }
.chip-keng { background: rgba(255, 128, 108, 0.18); color: #B3402E; }
.memo-body { margin: 0; font-size: 0.98rem; color: var(--ink); }
.memo-card mark { background: linear-gradient(180deg, transparent 42%, rgba(255, 201, 74, 0.55) 42%); color: inherit; padding: 0 2px; font-weight: 650; }
.memo-jue-body { min-width: 0; }
.memo-jue-body .memo-body { font-weight: 560; letter-spacing: 0.01em; }
.memo-keng-body { font-size: 0.93rem; }
@media (max-width: 430px) { .memo-row { flex-direction: column; gap: 4px; } }
.example-fold { margin-top: 8px; }
.example-fold .example { margin-block: 10px; }
.aux-group { margin-block: 16px; }
.aux-group .takeaway { border-left: none; margin: 6px 0; padding: 4px 0; }
.aux-group .explain { margin: 6px 0; }

/* 辅助条降权 */
.explain { border-left: 3px solid var(--coral); border-radius: var(--radius-inline); padding: 9px 12px; background: rgba(233, 222, 255, 0.42); font-size: var(--type-supporting); margin: 12px 0; }

/* 学练分界线：随学随测标题前一条淡分隔 */
.quiz-section-title { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 24px; }

/* 开场步目标清单卡 */
.goals-card {
  background: rgba(233, 222, 255, 0.42); border-left: 6px solid var(--brand);
  border-radius: var(--radius-inline); padding: 14px 18px; margin: 14px 0;
}
.goals-card h3 { margin-top: 0; }
.goals-list { list-style: none; padding: 0; display: grid; gap: 9px; margin: 8px 0 2px; }
.goals-list li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.6; }
.goal-no {
  flex: 0 0 24px; width: 24px; height: 24px; margin-top: 1px;
  display: inline-grid; place-items: center;
  background: var(--brand); color: #FFFFFF;
  border-radius: var(--radius-pill);
  font-weight: 800; font-size: 0.85rem;
}

/* 讲解条（雷哥） */
.teach-bar { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0; }
.teach-bar .avatar-slot { flex: 0 0 56px; height: 56px; border-radius: var(--radius-pill); overflow: hidden; box-shadow: 0 0 0 2px var(--brand); }
.teach-bar .avatar-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.teach-bar .teach-text { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-inline); padding: 16px 18px; flex: 1; font-size: 1.02rem; line-height: 1.75; }
.teach-sentence { margin: 0 0 4px; line-height: 1.75; }
.teach-sentence:last-child { margin-bottom: 0; }
.teach-en { font-weight: 650; color: var(--brand-strong); font-size: 1.1em; line-height: 1.6; }

/* 语法术语提示 */
.grammar-tip {
  border-bottom: 1.5px dotted var(--brand);
  cursor: pointer;
}
.grammar-tip-pop {
  position: fixed; z-index: 60;
  max-width: 300px; min-width: 180px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-raised);
  padding: 14px 16px;
  font-size: var(--type-supporting);
  overflow-wrap: break-word; word-break: break-word;
}
.grammar-tip-header { font-weight: 750; color: var(--brand-strong); margin-bottom: 4px; }
.grammar-tip-body { color: var(--ink); line-height: 1.6; overflow-wrap: break-word; }
/* 底部不出屏：clamp top */
@media (max-height: 700px) {
  .grammar-tip-pop { max-height: 40vh; overflow-y: auto; }
}
.teach-bar .teach-text::before {
  content: ""; position: absolute; left: -13px; top: 21px;
  border: 7px solid transparent; border-right-color: var(--border);
}
.teach-bar .teach-text::after {
  content: ""; position: absolute; left: -11px; top: 22px;
  border: 6px solid transparent; border-right-color: var(--surface);
}

.example { margin: 10px 0; padding: 10px 14px; border-radius: var(--radius-inline); background: var(--surface); border: 1px solid var(--border); }
.example .en { font-weight: 650; font-size: 1.25rem; line-height: 1.65; }
.example .zh { color: var(--ink-muted); margin-top: 2px; }

table.grid { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 0.875rem; }
table.grid th, table.grid td { border: 1px solid var(--lavender); padding: 7px 9px; text-align: left; }
table.grid th { background: rgba(233, 222, 255, 0.42); }
table.grid tbody tr:nth-child(even) { background: rgba(233, 222, 255, 0.18); }
.table-wrap { overflow-x: auto; }

/* 音频：每位一个播放/暂停切换按钮 + 状态文字 */
.player { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.player button {
  min-height: 44px; min-width: 64px; border: 1.5px solid var(--brand-strong);
  background: var(--surface); color: var(--brand-strong); border-radius: var(--radius-pill);
  padding: 4px 16px; cursor: pointer; font-weight: 650;
}
.player .status { font-size: 0.875rem; color: var(--ink-muted); }

/* 播放设置：全页唯一语速控件 */
.rate-control { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rate-control .rate-label { font-size: 0.875rem; color: var(--ink-muted); }
.rate-control button {
  min-height: 40px; min-width: 48px; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--ink); border-radius: var(--radius-pill);
  padding: 2px 12px; cursor: pointer;
}
.rate-control button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #FFFFFF; font-weight: 650; }

/* 练习 */
.quiz-item { margin: 16px 0; }
.quiz-item .stem { font-weight: 650; font-size: 1.08rem; line-height: 1.7; }
.underline-mark { border-bottom: 1px solid var(--ink); }
.quiz-options { display: grid; gap: 9px; margin: 12px 0; }
.quiz-options button {
  text-align: left; padding: 11px 16px; min-height: 44px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--border); background: var(--surface); cursor: pointer;
}
.quiz-options .option-key { font-weight: 800; color: var(--brand-strong); margin-inline-end: 8px; }
.quiz-options button[data-picked="right"] { border-color: var(--ok); background: var(--mint); }
.quiz-options button[data-picked="wrong"] { border-color: var(--bad); background: var(--bad-soft); }
.quiz-options button .verdict-glyph { font-weight: 800; margin-inline-end: 3px; }
.quiz-options button[data-picked="right"] .verdict-glyph { color: var(--ok); }
.quiz-options button[data-picked="wrong"] .verdict-glyph { color: var(--bad); }
.quiz-options button:disabled { cursor: default; }
.quiz-blank input { font: inherit; padding: 9px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-pill); min-width: 10ch; max-width: 100%; }
.quiz-fragments { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.quiz-fragments li { padding: 5px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); }
.quiz-selfcheck { margin-top: 12px; padding: 14px 16px; border-left: 4px solid var(--brand); background: var(--lavender); }
.quiz-selfcheck-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.verdict { font-weight: 720; }
.verdict.ok { color: var(--ok); }
.verdict.bad { color: var(--bad); }

/* 课完成收束面板：日光黄重点面板，克制无动画 */
.celebration-panel {
  background: var(--sun); border-color: rgba(23, 19, 31, 0.18);
  border-radius: var(--radius-card); padding: clamp(24px, 3vw, 34px);
  text-align: center;
}
.celebration-panel h2 { margin-top: 0; }
.celebration-panel .slot-figure img { max-width: 240px; }
.celebration-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.relearn-block { border-top: 1px solid rgba(23, 19, 31, 0.22); margin-top: 16px; padding-top: 12px; }

/* 分步学习流 */
.lesson-top { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.lesson-top, .step-host { max-inline-size: 46rem; margin-inline: auto; }
.step-host { transition: var(--motion-feedback); }
.step-host.step-enter-next { transform: translateX(12px); }
.step-host.step-enter-prev { transform: translateX(-12px); }
.step-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
  background: var(--canvas); border-top: 1px solid var(--border);
  padding: 10px clamp(15px, 3vw, 28px) calc(10px + env(safe-area-inset-bottom, 0px));
}
.step-track { position: absolute; inset-inline: 0; top: 0; height: 3px; background: var(--lavender); }
.step-track-fill {
  height: 100%; inline-size: 100%; background: var(--brand);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 180ms cubic-bezier(0.2, 0, 0, 1);
}
.step-bar-inner {
  width: min(100% - 8px, var(--content)); margin-inline: auto;
  display: flex; align-items: center; gap: 12px;
}
.step-bar .step-pos { font-size: 0.875rem; color: var(--ink-muted); margin-inline: auto; }
body.has-stepbar main { padding-bottom: 130px; }
.step-dots { display: flex; gap: 6px; flex-wrap: wrap; }
  .step-dots .dot { width: 10px; height: 10px; border-radius: var(--radius-pill); background: var(--lavender); }
.step-dots .dot.now { background: var(--brand); }
.step-dots .dot.done { background: var(--mint); }

/* 槽位插画 */
.slot-figure { margin: 0; text-align: center; }
.slot-figure img { max-width: min(280px, 60%); height: auto; }
.slot-figure.wide img { max-width: min(520px, 100%); }


.slot-figure[class*="illustration-frame-"] {
  width: 100%; margin-inline: auto; overflow: hidden; background: transparent;
}
.slot-figure.illustration-frame-hero { max-width: 560px; aspect-ratio: 16 / 10; }
.slot-figure.illustration-frame-panel { max-width: 560px; aspect-ratio: 4 / 3; }
.slot-figure.illustration-frame-card { max-width: 300px; aspect-ratio: 1 / 1; }
.slot-figure[class*="illustration-frame-"] img {
  width: 100%; height: 100%; max-width: none; object-fit: contain; object-position: center center; display: block;
}


/* 首访引导 */
.onboard-mask { position: fixed; inset: 0; background: rgba(23, 19, 31, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.onboard-panel { background: var(--canvas); border-radius: var(--radius-hero); max-width: 460px; width: 100%; padding: clamp(24px, 4vw, 34px); max-height: 90vh; overflow: auto; }
.choice-grid { display: grid; gap: 10px; margin: 12px 0; }

/* 地图：章节轻量分区（不装卡），条目单行 */
.map-chapter { margin: 0; padding: clamp(18px, 2.6vw, 28px) 0; border-top: 1px solid var(--border); }
details.map-chapter > summary {
  list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
}
details.map-chapter > summary::before {
  content: "▾"; display: inline-block; width: 16px; flex: 0 0 16px;
  font-size: 0.7rem; color: var(--ink-muted);
  text-align: center; line-height: 1;
}
details.map-chapter:not([open]) > summary::before {
  content: "▸";
}
details.map-chapter > summary::-webkit-details-marker { display: none; }
details.map-chapter > summary::marker { content: none; }

.chapter-toggle-all { flex: 0 0 auto; margin-inline-start: auto; }
.map-chapter:first-of-type { border-top: 0; }
.map-chapter-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.chapter-chip {
  flex: 0 0 44px; width: 44px; height: 44px;
  display: inline-grid; place-items: center;
  background: var(--brand); color: #FFFFFF;
  border-radius: var(--radius-row);
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
}
.map-chapter-head > .map-chapter-title { min-width: 0; flex: 1 1 60%; }
.map-chapter-head h2 { margin: 0; }
.map-chapter-head .chapter-summary { margin-inline-start: auto; white-space: nowrap; }
.map-entries { display: grid; gap: 6px; margin-top: 10px; }
.map-entry { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; align-items: center; padding: 7px 14px; border-radius: var(--radius-row); background: var(--surface); border: 1px solid var(--border); }
.map-entry a { overflow-wrap: anywhere; min-height: 44px; display: flex; align-items: center; }
.map-entry .entry-lesson { grid-column: 2; overflow-wrap: anywhere; }
.mastery-mark { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.map-entry .m-dot { flex: 0 0 12px; height: 12px; border-radius: var(--radius-pill); background: var(--lavender); }
.map-entry .m-dot.m2 { background: var(--sun); }
.map-entry .m-dot.m3 { background: var(--mint); }
.coverage-banner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.coverage-num { font-size: clamp(1.9rem, 3vw, 2.5rem); font-weight: 820; color: var(--brand-strong); letter-spacing: -0.045em; }
.map-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  margin-block: 24px 28px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-panel);
}
.chapter-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chapter-jump-label { flex: 0 0 auto; color: var(--brand-strong); font-weight: 720; }
.chapter-jump-select {
  font: inherit; min-height: 44px; padding: 8px 14px; max-inline-size: 100%;
  border: 1.5px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink);
}
.map-chapter, .cloze-chapter-group { scroll-margin-top: 16px; }

/* 地图筛选条：全局控件，登记 data-ui-chrome，状态只存内存 */
.map-filter { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.map-filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
.map-filter-group button {
  min-height: 40px; padding: 7px 16px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer;
}
.map-filter-group button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #FFFFFF; font-weight: 650; }
.map-filter-search { display: inline-flex; align-items: center; gap: 8px; }
.map-filter-search input {
  font: inherit; padding: 8px 16px; min-height: 40px; min-width: 16ch; max-width: 100%;
  border: 1.5px solid var(--border); border-radius: var(--radius-pill); background: var(--canvas);
}
.map-filter-count { color: var(--ink-muted); }
.map-empty-note { margin: 0 0 18px; padding: 14px 18px; }
@media (hover: hover) and (pointer: fine) {
  .map-entry:hover { background: rgba(233, 222, 255, 0.35); }
}
@media (min-width: 761px) {
  .map-entries { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 7px; }
  .map-entry { min-height: 44px; gap: 0 10px; padding-block: 0; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
  .map-entry .entry-lesson { grid-column: auto; text-align: end; max-inline-size: 22ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* 摸底与跳级测 */
.assessment-list { display: grid; gap: 8px; padding: 0; list-style: none; }
.assessment-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: 0;
}
.assessment-row.is-mastered { background: rgba(201, 243, 211, 0.5); }
.assessment-row.is-reinforce { background: rgba(255, 201, 74, 0.18); }
.assessment-row.is-learn { background: rgba(233, 222, 255, 0.42); }

/* 考场语篇 */
.passage-list { display: grid; gap: 12px; }
.passage-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-inline); }
.cloze-card-grid { display: block; }
.cloze-chapter-heading h2 { margin-top: 0; }
@media (min-width: 1024px) {
  .cloze-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; align-items: start; }
  .cloze-chapter-group { display: contents; }
  .cloze-chapter-heading { min-width: 0; padding: 24px; background: var(--lavender); border: 1px solid var(--lavender-deep); border-radius: var(--radius-panel); grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
  .cloze-chapter-heading h2 { margin: 0; }
  .cloze-chapter-heading p { margin: 0; }
  .cloze-chapter-group > .passage-list { display: contents; }
  .cloze-chapter-group > .passage-list > .passage-card { min-width: 0; margin: 0; }
}
.passage-text {
  background: rgba(233, 222, 255, 0.28); border-radius: var(--radius-inline);
  padding: 18px; margin: 14px 0; font-size: 1.05rem; line-height: 2.15;
  overflow-wrap: anywhere;
}
.cloze-blank-wrap {
  display: inline-block; white-space: nowrap;
  vertical-align: baseline; margin: 0 2px;
}
.cloze-blank-no { font-size: 0.75rem; line-height: 1.2; color: var(--ink-muted); margin-inline-end: 3px; }
.cloze-blank-input {
  border: none; border-bottom: 2px solid var(--brand);
  background: transparent; font: inherit; font-size: 1.05rem;
  padding: 2px 4px; min-width: 4ch; max-width: 16ch;
  border-radius: 0; text-align: center;
}
.cloze-intro-blank { border-bottom: 2px solid var(--brand); font-weight: 650; padding: 0 2px; }
.cloze-blank-input:focus { border-bottom-color: var(--brand-strong); border-bottom-width: 3px; margin-bottom: -1px; }
.cloze-blank-input:disabled { opacity: 1; background: transparent; }
.cloze-blank-input-right { border-bottom-color: var(--ok); }
.cloze-blank-input-wrong { border-bottom-color: var(--bad); }
.cloze-blank-wrap .verdict-glyph { font-size: 0.82rem; font-weight: 800; margin-top: 1px; }
.cloze-blank-input-right ~ .verdict-glyph { color: var(--ok); }
.cloze-blank-input-wrong ~ .verdict-glyph { color: var(--bad); }
.cloze-blank-hint { font-size: 0.75rem; color: var(--bad); margin-top: 1px; white-space: nowrap; }
.cloze-actions { margin-top: 16px; display: flex; gap: 10px; }

/* 语篇判分解析区 */
.cloze-explain-box {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-inline);
  padding: 14px 18px;
  background: rgba(233, 222, 255, 0.25);
}
.cloze-explain-box h3 { margin-top: 0; }
.cloze-explain-row { margin: 6px 0; line-height: 1.6; }
.passage-score-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 2px; }
details.score-detail { border: 1.5px dashed var(--brand); border-radius: var(--radius-inline); padding: 12px 16px; margin: 14px 0; background: var(--surface); }
details.score-detail summary { cursor: pointer; font-weight: 650; color: var(--brand-strong); min-height: 32px; }
details.score-detail[open] summary { margin-bottom: 6px; }

/* 家长看板 */
.board-grid { display: grid; gap: 17px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 16px; }
.stat { background: var(--surface); border-radius: var(--radius-inline); border: 1px solid var(--border); padding: 12px 18px; min-width: 120px; flex: 1 1 140px; }
.stat .num { font-size: 1.4rem; font-weight: 820; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
progress.bar { appearance: none; display: block; width: 100%; height: 12px; border: 0; border-radius: var(--radius-pill); overflow: hidden; background: var(--lavender); }
progress.bar::-webkit-progress-bar { background: var(--lavender); }
progress.bar::-webkit-progress-value { background: var(--brand); }
progress.bar::-moz-progress-bar { background: var(--brand); }
.chapter-progress-list { display: grid; gap: 0; margin-top: 18px; }
.chapter-progress { padding-block: 12px; border-top: 1px solid var(--border); }
.chapter-progress-heading { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; }
.chapter-progress h3 { margin: 0; font-size: 1rem; letter-spacing: 0; }
.chapter-progress-stats { white-space: nowrap; }
.board-wrong .slot-figure.illustration-frame-card { max-width: 120px; }
.region-info-grid { display: block; }

/* §7 响应式 */
@media (max-width: 430px) {
  .celebration-actions, .cloze-actions, .quiz-selfcheck-actions, .today-next { flex-direction: column; align-items: stretch; }
  .celebration-actions .btn, .cloze-actions .btn, .quiz-selfcheck-actions .btn, .today-next .btn { width: 100%; }
}
@media (min-width: 768px) {
  .site-header { min-height: 88px; }
  .board-grid { grid-template-columns: 1fr 1fr; }
  .board-grid .span2 { grid-column: span 2; }
}
@media (min-width: 1024px) {
  .board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "cover assessment"
      "passage time"
      "progress progress"
      "wrong wrong"
      "promise promise";
    gap: 28px;
  }
  .board-grid > .board-cover { grid-area: cover; }
  .board-grid > .board-assessment { grid-area: assessment; }
  .board-grid > .board-passage { grid-area: passage; }
  .board-grid > .board-time { grid-area: time; }
  .board-grid > .board-progress { grid-area: progress; }
  .board-grid > .board-wrong { grid-area: wrong; }
  .board-grid > .board-promise { grid-area: promise; }
  .chapter-progress-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
  .region-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; align-items: start; }
  .region-info-grid > .paper-card { margin: 0; }
}
@media (max-width: 760px) {
  :root { --radius-hero: 34px; --radius-shell: 34px; }
  .site-shell { width: min(100% - 12px, 1540px); margin-block: 6px; border-radius: var(--radius-shell); min-height: calc(100vh - 12px); }
  main { width: min(100% - 30px, var(--content)); }
  .onboard-panel { border-radius: var(--radius-hero); }
  .subject-card { border-radius: var(--radius-panel); grid-template-columns: minmax(0, 88px) minmax(0, 1fr); }
  .subject-art .slot-figure.illustration-frame-card { max-width: 88px; }
  .facade-hero .hero-art { min-height: 220px; }
}
@media (max-width: 389px) {
  html { font-size: 15px; }
}
@media (max-width: 340px) {
  h1.display-title { font-size: clamp(2.6rem, 13vw, 3.35rem); line-height: 1.02; letter-spacing: -0.06em; }
  .facade-title { max-inline-size: 100%; }
}

/* §11 动效：只用 --motion-feedback，悬停用能力查询 */
@media (hover: hover) and (pointer: fine) {
  .btn, .region-chip, .quiz-options button, .subject-card { transition: var(--motion-feedback); }
  .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
  .region-chip:hover { transform: translateY(-1px); }
  .subject-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-raised); }
}

/* 教学反馈动效：用户动作触发、单次；答对轻抬、答错 4px 轻震两次；reduced-motion 全局归零 */
@keyframes pick-right { from { transform: translateY(2px); } to { transform: none; } }
@keyframes pick-wrong {
  0%, 100% { transform: none; }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.quiz-options button[data-picked="right"], .cloze-blank-input-right { animation: pick-right 200ms cubic-bezier(0.2, 0, 0, 1); }
.quiz-options button[data-picked="wrong"], .cloze-blank-input-wrong { animation: pick-wrong 240ms cubic-bezier(0.2, 0, 0, 1); }

/* pressed 态：translateY(1px) 即时反馈，transition 只包 --motion-feedback 族；置于悬停规则之后确保按下生效 */
.btn, .quiz-options button, .map-filter-group button, .rate-control button { transition: var(--motion-feedback); }
.btn:active, .quiz-options button:active, .map-filter-group button:active, .rate-control button:active { transform: translateY(1px); }

/* §11.3 减少动态效果：首次渲染前生效，全局瞬时 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .btn:hover { transform: none; }
  .region-chip:hover { transform: none; }
  .btn:active, .quiz-options button:active, .map-filter-group button:active, .rate-control button:active { transform: none; }
}

@media print {
  body { background: #FFFFFF; }
  .site-shell { width: 100%; margin: 0; border-radius: 0; min-height: auto; }
  .site-header, .site-footer, .btn, .step-bar, .rate-control, .no-print, .player, .grammar-tip-pop, .onboard-mask { display: none !important; }
  .paper-card { box-shadow: none; border-color: #CCCCCC; }
  .chapter-jump { display: none !important; }
  .cloze-card-grid { display: block; }
  .cloze-chapter-group { display: block; }
  .cloze-chapter-group > .passage-list { display: grid; grid-template-columns: 1fr; }
  .cloze-chapter-heading { padding: 0; background: transparent; border: 0; }
  .board-grid { display: block; }
  .board-grid > * { grid-area: auto; }
  .chapter-progress-list { grid-template-columns: 1fr; }
  .region-info-grid { display: block; }
  a { color: var(--ink); text-decoration: none; }
}

/* 考区档案：页面头 + 换考区组合容器（Law of Proximity） */
.region-head-wrap { margin-block-end: clamp(12px, 2vw, 24px); }

/* 换考区：紧凑标签式选择器 */
.region-switch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.region-switch-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.region-switch-btn {
  padding: 4px 14px;
  min-height: 40px;
  font-size: 0.875rem;
}

/* exam 面板：N条说明折叠（Miller's Law + Chunking） */
.exam-notes {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.exam-notes summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--brand-strong);
  font-size: 0.92rem;
}

/* 语法侧重：卡片视觉分组 + 条目轻量分隔（Cognitive Load） */
.focus-card {
  background: rgba(233, 222, 255, 0.12);
}
.grammar-focus-list li {
  padding-block: 8px;
}
.grammar-focus-list li + li {
  border-top: 1px solid var(--border);
}
.grammar-focus-list li strong {
  color: var(--brand-strong);
}

/* 练习区：说明默认折叠（Progressive Disclosure） */
.practice-note {
  margin-bottom: 14px;
}
.practice-note summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--brand-strong);
  font-size: 0.92rem;
}

/* 平台接线：登录页与会话提示条 */
.login-card {
  max-width: 520px;
  margin-inline: auto;
  margin-block: clamp(24px, 6vw, 64px);
}
.login-form {
  display: grid;
  gap: 8px;
  margin-block-start: 18px;
}
.login-form label {
  font-weight: 650;
  color: var(--ink);
}
.login-form input {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-row);
  background: var(--surface);
  color: var(--ink);
}
.login-form input:focus-visible {
  outline: 3px solid var(--brand-strong);
  outline-offset: 2px;
}
.login-form button[type="submit"] {
  margin-block-start: 10px;
  justify-self: start;
}
.login-status:empty { display: none; }
.login-status {
  margin: 0;
  color: var(--brand-strong);
  font-weight: 600;
}
.login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-block-start: 18px;
}
.platform-notice {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px clamp(16px, 4vw, 32px);
  background: var(--sun);
  border-top: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.94rem;
}
.platform-notice a {
  font-weight: 650;
  color: var(--brand-strong);
}
