/* ===== 古诗诵读 SPA · 设计系统 ===== */
:root {
  --amber: #ffb300; --amber-deep: #e65100; --accent: #ff7043;
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f0f1f4;
  --ink: #1c1d21; --ink-2: #5b5e66; --ink-3: #9a9da6;
  --line: #e6e7ec; --shadow: 0 6px 24px rgba(20, 22, 30, .08);
  --shadow-lg: 0 14px 44px rgba(20, 22, 30, .14);
  --r-lg: 20px; --r-md: 14px; --r-sm: 9px;
  --bar-h: 58px; --tab-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --grad: linear-gradient(135deg, #ffb300 0%, #ff7043 55%, #f4511e 100%);
}
[data-theme="dark"] {
  --bg: #141519; --surface: #1d1f26; --surface-2: #262933;
  --ink: #ecedf1; --ink-2: #a9adb8; --ink-3: #6d7079;
  --line: #2e313c; --shadow: 0 6px 24px rgba(0, 0, 0, .4);
  --shadow-lg: 0 14px 44px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  line-height: 1.6; padding-bottom: calc(var(--tab-h) + var(--safe-b));
  -webkit-font-smoothing: antialiased; transition: background .3s, color .3s;
}
a { color: var(--amber-deep); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(255, 179, 0, .3); }

/* ---------- 顶栏 ---------- */
.app-bar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center;
  gap: 12px; height: var(--bar-h); padding: 0 14px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.app-bar__brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.app-bar__logo {
  min-width: 32px; height: 32px; padding: 0 6px; border-radius: 9px; background: var(--grad);
  color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 15px;
  box-shadow: 0 4px 12px rgba(244, 81, 30, .4);
}
.app-bar__name { font-weight: 700; font-size: 16px; letter-spacing: .5px; color: var(--ink); }
.app-bar__search { position: relative; flex: 1; min-width: 0; }
.app-bar__search input {
  width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 19px;
  background: var(--surface-2); color: var(--ink); padding: 0 16px; font-size: 14px;
  outline: none; transition: .2s;
}
.app-bar__search input:focus { border-color: var(--amber); background: var(--surface); box-shadow: 0 0 0 3px rgba(255, 179, 0, .18); }
.icon-btn {
  width: 38px; height: 38px; flex-shrink: 0; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-2); border-radius: 50%;
  font-size: 17px; display: grid; place-items: center; transition: .2s;
}
.icon-btn:active { transform: scale(.9); }
.icon-moon { display: none; } [data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: inline; }

/* ---------- 搜索弹层 ---------- */
.search-pop {
  position: absolute; top: 46px; left: 0; right: 0; max-height: 60vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); z-index: 60;
}
.search-pop__item {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-bottom: 1px solid var(--line); color: var(--ink); cursor: pointer;
}
.search-pop__item:last-child { border-bottom: 0; }
.search-pop__item:active, .search-pop__item:hover { background: var(--surface-2); }
.search-pop__title { font-weight: 600; font-size: 15px; }
.search-pop__meta { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.search-pop__empty, .search-pop__count { padding: 12px 14px; font-size: 13px; color: var(--ink-3); }
mark { background: rgba(255, 179, 0, .45); color: inherit; border-radius: 2px; padding: 0 1px; }

/* ---------- 视图容器 ---------- */
.view { max-width: 980px; margin: 0 auto; padding: 20px 16px 40px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 80px 0; color: var(--ink-3); font-size: 14px; }
.spinner { width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--amber); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 70px 20px; color: var(--ink-3); }
.empty__icon { font-size: 40px; display: block; margin-bottom: 10px; opacity: .5; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  background: var(--grad); color: #fff; padding: 38px 26px 42px; margin-bottom: 26px;
  box-shadow: 0 16px 40px rgba(244, 81, 30, .32);
}
.hero::after { content: "诗"; position: absolute; right: -8px; bottom: -42px;
  font-size: 190px; font-weight: 900; opacity: .13; font-family: "Kaiti SC", KaiTi, serif; line-height: 1; }
.hero__kicker { margin: 0 0 6px; font-size: 12px; letter-spacing: 3px; opacity: .85; font-weight: 600; }
.hero h1 { margin: 0 0 10px; font-size: 34px; letter-spacing: 2px; font-weight: 800; }
.hero__desc { margin: 0 0 18px; font-size: 14.5px; opacity: .94; max-width: 34em; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; }
.hero__badges span { background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35);
  padding: 4px 12px; border-radius: 999px; font-size: 12.5px; backdrop-filter: blur(4px); }

/* ---------- 分区标题 ---------- */
.sec { margin: 30px 0 16px; }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec__eyebrow { margin: 0 0 2px; font-size: 11px; letter-spacing: 2.5px; color: var(--amber-deep); font-weight: 700; }
.sec__head h2 { margin: 0; font-size: 21px; font-weight: 800; }
.sec__head p { margin: 0; font-size: 13px; color: var(--ink-3); }

/* ---------- 学段分组 + 年级卡片 ---------- */
.stage { margin-bottom: 18px; }
.stage__head { display: flex; align-items: center; gap: 8px; margin: 0 2px 11px; }
.stage__icon { font-size: 17px; }
.stage__head h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink-2); letter-spacing: 1px; }
.stage__head::after { content: ""; flex: 1; height: 1px; background: var(--line); margin-left: 6px; }

.grade-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.grade-card {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 15px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: transform .18s, box-shadow .18s, border-color .18s; overflow: hidden;
}
.grade-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); opacity: 0; transition: .18s; }
.grade-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.grade-card:hover::before { opacity: 1; }
.grade-card__badge {
  flex-shrink: 0; min-width: 44px; height: 44px; padding: 0 6px; border-radius: 12px;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 15px;
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(244, 81, 30, .3); letter-spacing: .5px;
}
.grade-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.grade-card__body strong { font-size: 17px; color: var(--ink); }
.grade-card__body small { color: var(--ink-3); font-size: 11.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grade-card__meta { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.grade-card__meta b { color: var(--amber-deep); font-size: 14px; }
.grade-card__bar { display: block; height: 4px; margin-top: 6px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.grade-card__bar i { display: block; height: 100%; background: var(--grad); border-radius: 2px; }

/* ---------- 查找/筛选 ---------- */
.filter-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; margin-bottom: 16px; }
.filter-head { display: none; width: 100%; align-items: center; gap: 8px; background: none; border: 0; padding: 2px 2px 10px; text-align: left; }
.filter-head__title { font-size: 14px; font-weight: 700; color: var(--ink); }
.filter-head__summary { flex: 1; font-size: 12.5px; color: var(--amber-deep); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-head__chev { color: var(--ink-3); font-size: 13px; transition: transform .2s; }
.filter-panel.is-open .filter-head__chev { transform: rotate(180deg); }
.filter-body { display: block; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-row + .filter-row { margin-top: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  padding: 6px 13px; border-radius: 999px; font-size: 13px; transition: .15s; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0;
}
.chip:hover { border-color: var(--amber); }
.chip.is-on { background: var(--grad); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 3px 10px rgba(244, 81, 30, .3); }
.filter-input { flex: 1; min-width: 130px; height: 38px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--ink); padding: 0 12px; font-size: 14px; outline: none; }
.filter-input:focus { border-color: var(--amber); background: var(--surface); }
.result-meta { font-size: 13px; color: var(--ink-3); margin: 0 0 10px 2px; }

/* ---------- 诗表格/列表 ---------- */
.poem-list { display: flex; flex-direction: column; gap: 8px; }
.poem-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); transition: .15s;
}
.poem-row:hover { border-color: var(--amber); box-shadow: var(--shadow); transform: translateX(3px); }
.poem-row__main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.poem-row__title { font-weight: 600; font-size: 15.5px; color: var(--ink); line-height: 1.4; }
.poem-row__sub { font-size: 12.5px; color: var(--ink-3); margin-top: 0; letter-spacing: .3px; }
.poem-row__right { margin-left: auto; display: flex; gap: 5px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.tag--dynasty { background: rgba(255, 179, 0, .14); color: var(--amber-deep); }
.tag--type { background: rgba(3, 169, 244, .12); color: #0288d1; }
[data-theme="dark"] .tag--type { color: #4fc3f7; }
.tag--theme { background: rgba(76, 175, 80, .13); color: #43a047; }
[data-theme="dark"] .tag--theme { color: #81c784; }

/* ---------- 诗页 ---------- */
.poem-hero { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  padding: 26px 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.crumbs { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-3); margin-bottom: 16px; flex-wrap: wrap; }
.crumbs a { color: var(--ink-2); } .crumbs a:hover { color: var(--amber-deep); }
.crumbs i { font-style: normal; opacity: .5; }
.poem-title { margin: 0 0 4px; font-size: 30px; font-weight: 800; letter-spacing: 1px; font-family: "Kaiti SC", KaiTi, "STKaiti", serif; }
.poem-poet { font-size: 15px; color: var(--ink-2); margin: 0 0 12px; }
.poem-poet b { color: var(--amber-deep); font-weight: 600; }
.poem-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.pinyin-bar { display: flex; align-items: center; gap: 10px; margin: 18px 0 6px; }
.toggle {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-2); padding: 7px 14px; border-radius: 999px; font-size: 13px; transition: .15s;
}
.toggle .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); transition: .15s; }
.toggle.is-on { border-color: var(--amber); color: var(--amber-deep); background: rgba(255, 179, 0, .1); }
.toggle.is-on .dot { background: var(--amber); box-shadow: 0 0 0 3px rgba(255, 179, 0, .25); }

/* 诗文：横排 + ruby */
.poem-body { margin: 14px 0 6px; }
.poem-line {
  margin: 0 0 4px; font-family: "Kaiti SC", KaiTi, "STKaiti", "Noto Serif CJK SC", serif;
  font-size: 1em; line-height: 2.05; letter-spacing: 2px; color: var(--ink);
}
.poem-line ruby { ruby-align: center; }
.poem-line rt { font-size: .5em; color: var(--ink-3); letter-spacing: 0; font-family: -apple-system, "PingFang SC", sans-serif;
  visibility: hidden; transition: visibility .15s; user-select: none; }
.show-pinyin .poem-line rt { visibility: visible; }
.poem-placeholder { padding: 40px 16px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line); border-radius: var(--r-md); font-size: 14.5px; }

/* 诗中注释标注词 */
.annot {
  cursor: pointer; border-bottom: 2px dotted rgba(255, 179, 0, .55);
  transition: background .15s, border-color .15s; border-radius: 2px;
}
.annot:hover { background: rgba(255, 179, 0, .14); border-bottom-color: var(--amber-deep); }
.annot:active { background: rgba(255, 179, 0, .22); }
.poem-body.vertical .annot { border-bottom: 0; border-left: 2px dotted rgba(255, 179, 0, .55); }

/* 注释气泡 */
.annot-pop {
  position: absolute; z-index: 80; max-width: 300px; min-width: 120px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg); padding: 10px 14px; font-size: 13.5px; line-height: 1.7;
  color: var(--ink-2); opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .16s, transform .16s, visibility .16s; cursor: pointer;
}
.annot-pop.is-show { opacity: 1; visibility: visible; transform: translateY(0); }
.annot-pop__term { display: block; font-weight: 700; color: var(--amber-deep); font-size: 14px; margin-bottom: 2px; }
.annot-pop__body { display: block; }

/* 译文/注释/赏析/作者 */
.sec-block { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.sec-block__head { display: flex; align-items: center; gap: 9px; padding: 13px 18px; cursor: pointer; user-select: none; }
.sec-block__head:hover { background: var(--surface-2); }
.sec-block__bar { width: 4px; height: 18px; border-radius: 2px; background: var(--grad); }
.sec-block__head h3 { margin: 0; font-size: 16px; font-weight: 700; flex: 1; }
.sec-block__chev { color: var(--ink-3); transition: transform .2s; font-size: 13px; }
.sec-block.is-open .sec-block__chev { transform: rotate(90deg); }
.sec-block__body { display: none; padding: 0 18px 16px 31px; font-size: 14.5px; color: var(--ink-2); line-height: 1.9; }
.sec-block.is-open .sec-block__body { display: block; }
.sec-block__body p { margin: 0 0 8px; }
.sec-block__body ul { margin: 0; padding-left: 1.2em; }
.sec-block__body li { margin: 3px 0; }
.sec-block__body strong, .sec-block__body b { color: var(--amber-deep); font-weight: 600; }

/* 上一首/下一首 */
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; margin-top: 24px; align-items: stretch; }
.pager__btn {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 3px;
  padding: 13px 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); transition: .18s; min-width: 0; overflow: hidden;
}
.pager__btn::before { content: ""; position: absolute; top: 0; bottom: 0; width: 3px; background: var(--grad); opacity: 0; transition: .18s; }
.pager__prev::before { left: 0; } .pager__next::before { right: 0; }
.pager__btn:hover { border-color: rgba(255, 179, 0, .6); box-shadow: var(--shadow); transform: translateY(-2px); }
.pager__btn:hover::before { opacity: 1; }
.pager__btn:active { transform: translateY(0); }
.pager__label { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--amber-deep); letter-spacing: .5px; }
.pager__name { font-size: 15px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager__next { text-align: right; align-items: flex-end; }
.pager__home {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; align-self: center;
  padding: 9px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: .18s;
}
.pager__home:hover { color: var(--amber-deep); border-color: rgba(255, 179, 0, .6); background: rgba(255, 179, 0, .08); }

/* ---------- 固定悬浮快速导航 ---------- */
.float-nav {
  position: fixed; bottom: calc(var(--tab-h) + var(--safe-b) + 8px); left: 50%; z-index: 48;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 8px;
  box-shadow: 0 2px 12px rgba(20, 22, 30, .08);
}
.float-nav__btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px;
  border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); background: var(--surface-2); border: 1px solid transparent;
  transition: .16s; white-space: nowrap; text-decoration: none;
}
.float-nav__btn:active,
.float-nav__btn:hover { color: var(--amber-deep); background: rgba(255, 179, 0, .12); border-color: rgba(255, 179, 0, .35); }
.float-nav__btn.is-empty { visibility: hidden; }
.float-nav__arrow { font-size: 16px; line-height: 1; }
.float-nav__txt { font-size: 12px; }
.float-nav__home {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  color: var(--ink-3); font-size: 15px; line-height: 1;
  transition: .16s; text-decoration: none; flex-shrink: 0;
}
.float-nav__home:active,
.float-nav__home:hover { color: var(--amber-deep); background: rgba(255, 179, 0, .12); }
.float-nav__dot { display: block; }

/* ---------- 学科切换 ---------- */
.subject-switch {
  display: flex; gap: 6px; margin-bottom: 16px; padding: 4px;
  background: var(--surface-2); border-radius: 999px; width: fit-content;
}
.subject-switch__btn {
  padding: 8px 22px; border-radius: 999px; border: 0; background: none;
  font-size: 14px; font-weight: 600; color: var(--ink-3); cursor: pointer;
  transition: .18s; font-family: inherit;
}
.subject-switch__btn.is-active {
  background: var(--surface); color: var(--ink);
  box-shadow: 0 2px 8px rgba(20, 22, 30, .1);
}

/* ---------- 英语 Hero ---------- */
.hero--en {
  background: linear-gradient(135deg, #4fc3f7 0%, #0288d1 50%, #01579b 100%);
  box-shadow: 0 16px 40px rgba(2, 136, 209, .32);
}
.hero--en::after { content: "ABC"; font-family: -apple-system, "Segoe UI", sans-serif; font-size: 120px; font-weight: 900; }

/* 英语首页内容切换：句子不再排在全部单词分类之后 */
.en-tabs {
  position: sticky; top: calc(var(--bar-h) + 8px); z-index: 20;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 7px; margin: -10px 0 16px; border: 1px solid var(--line);
  border-radius: 16px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.en-tabs__btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 9px 14px; border: 0; border-radius: 11px;
  background: transparent; color: var(--ink-3); transition: .18s;
}
.en-tabs__btn.is-active { color: #0277bd; background: rgba(2, 136, 209, .12); box-shadow: inset 0 0 0 1px rgba(2, 136, 209, .2); }
.en-tabs__label { font-size: 15px; font-weight: 800; }
.en-tabs__count { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--surface); color: inherit; }
.en-home-body { min-height: 240px; }

/* ---------- 英语分类卡片 ---------- */
.en-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.en-cat {
  display: flex; align-items: center; gap: 12px; padding: 16px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: transform .18s, box-shadow .18s; text-decoration: none;
}
.en-cat:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(2, 136, 209, .4); }
.en-cat__icon { font-size: 28px; flex-shrink: 0; }
.en-cat__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.en-cat__body strong { font-size: 15.5px; color: var(--ink); }
.en-cat__body small { font-size: 12px; color: var(--ink-3); }
.en-cat__arrow { font-size: 20px; color: var(--ink-3); flex-shrink: 0; }

/* ---------- 英语分类详情 ---------- */
.en-detail { margin-top: 4px; }
.en-detail__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.en-detail__icon { font-size: 32px; }
.en-detail__head h1 { margin: 0; font-size: 26px; font-weight: 800; }
.en-detail__count { margin-left: auto; font-size: 13px; color: var(--ink-3); background: var(--surface-2); padding: 4px 12px; border-radius: 999px; }

/* ---------- 单词卡片 ---------- */
.en-word-list { display: flex; flex-direction: column; gap: 10px; }
.en-word {
  position: relative; display: flex; align-items: flex-start; gap: 13px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px 18px; transition: .15s; color: var(--ink);
}
.en-word:hover { box-shadow: var(--shadow); border-color: rgba(2, 136, 209, .3); }
.en-item-icon {
  display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px;
  border-radius: 14px; background: rgba(2, 136, 209, .1); font-size: 27px; line-height: 1;
}
.en-item-icon--sent { background: rgba(126, 87, 194, .1); }
.en-item-main { flex: 1; min-width: 0; }
.en-speak-btn {
  flex: 0 0 38px; width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: rgba(2, 136, 209, .1); color: #0277bd; font-size: 16px;
}
.en-speak-btn:hover { background: rgba(2, 136, 209, .2); }
.en-word.is-focused, .en-sent.is-focused { border-color: #0288d1; box-shadow: 0 0 0 4px rgba(2, 136, 209, .15), var(--shadow); }
.en-word__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.en-word__text { font-size: 22px; font-weight: 800; color: #0288d1; letter-spacing: .5px; }
.en-word__phonetic { font-size: 13px; color: var(--ink-3); }
.en-word__meta { display: flex; gap: 8px; margin-bottom: 8px; }
.en-word__pos { font-size: 12px; color: var(--ink-3); font-style: italic; }
.en-word__meaning { font-size: 15px; font-weight: 600; color: var(--ink); }
.en-word__example { border-top: 1px dashed var(--line); padding-top: 8px; }
.en-word__ex-en { display: block; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.en-word__ex-cn { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }

/* ---------- 句子卡片 ---------- */
.en-sent-list { display: flex; flex-direction: column; gap: 8px; }
.en-sent {
  display: flex; align-items: flex-start; gap: 13px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 14px 16px; transition: .15s; color: var(--ink);
}
.en-sent:hover { box-shadow: var(--shadow); border-color: rgba(2, 136, 209, .3); }
.en-sent__en { display: block; font-size: 16.5px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.en-sent__cn { display: none; font-size: 13.5px; color: var(--ink-3); margin-top: 5px; }
.en-sent.is-cn-shown .en-sent__cn, .en-sent__cn.is-search-visible { display: block; }
.en-sent__actions { display: flex; gap: 7px; margin-top: 9px; }
.en-sent__actions button {
  border: 1px solid rgba(2, 136, 209, .24); border-radius: 999px; padding: 5px 10px;
  color: #0277bd; background: rgba(2, 136, 209, .07); font-size: 12px;
}
.en-sent--search { align-items: center; }

/* 英语搜索结果 */
.en-search-list { display: flex; flex-direction: column; gap: 10px; }
.en-search__cat { font-size: 11px; color: var(--ink-3); background: var(--surface-2); padding: 2px 8px; border-radius: 6px; white-space: nowrap; margin-left: auto; flex-shrink: 0; }
.en-word--search .en-word__head { align-items: center; }
.en-word--search .en-search__cat { align-self: center; }

/* 句子中标注的已知单词 */
.en-wm {
  cursor: pointer; border-bottom: 2px dotted rgba(2, 136, 209, .5);
  border-radius: 2px; transition: background .15s, border-color .15s;
}
.en-wm:hover { background: rgba(2, 136, 209, .12); border-bottom-color: #0288d1; }
.en-wm:active { background: rgba(2, 136, 209, .2); }

/* 英语单词气泡 */
.en-word-pop {
  position: absolute; z-index: 80; min-width: 140px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg); padding: 12px 16px;
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .16s, transform .16s, visibility .16s; cursor: pointer;
}
.en-word-pop.is-show { opacity: 1; visibility: visible; transform: translateY(0); }
.en-word-pop__word { display: block; font-size: 18px; font-weight: 800; color: #0288d1; margin-bottom: 2px; }
.en-word-pop__phonetic { display: block; font-size: 12.5px; color: var(--ink-3); margin-bottom: 4px; }
.en-word-pop__pos { display: inline-block; font-size: 11px; color: var(--ink-3); font-style: italic; margin-right: 6px; }
.en-word-pop__meaning { display: inline; font-size: 14px; font-weight: 600; color: var(--ink); }

/* ---------- 亲子数学 ---------- */
.hero--math { background: linear-gradient(135deg, #7e57c2 0%, #5e35b1 48%, #3949ab 100%); box-shadow: 0 16px 40px rgba(94, 53, 177, .3); }
.hero--math::after { content: "123"; font-family: -apple-system, "Segoe UI", sans-serif; font-size: 132px; bottom: -28px; }
.math-kicker { display: inline-block; color: #5e35b1; font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.math-today {
  display: flex; align-items: center; gap: 24px; margin: 0 0 14px; padding: 22px 24px;
  background: linear-gradient(135deg, rgba(126, 87, 194, .13), rgba(57, 73, 171, .05));
  border: 1px solid rgba(94, 53, 177, .22); border-radius: var(--r-lg);
}
.math-today__copy { flex: 1; min-width: 0; }
.math-today h2 { margin: 4px 0 6px; font-size: 22px; }
.math-today p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.75; }
.math-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.math-meta span { padding: 3px 9px; border-radius: 999px; background: var(--surface); color: var(--ink-3); font-size: 11px; }
.math-primary {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 0 17px; border-radius: 999px; background: #5e35b1; color: #fff; font-size: 13px; font-weight: 800;
  box-shadow: 0 8px 18px rgba(94, 53, 177, .24);
}
.math-guide { display: flex; align-items: flex-start; gap: 12px; padding: 14px 17px; border-radius: var(--r-md); background: rgba(255, 179, 0, .1); border: 1px solid rgba(255, 179, 0, .24); }
.math-guide > span { font-size: 22px; }
.math-guide strong { display: block; font-size: 14px; }
.math-guide p { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; }
.math-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 11px; }
.math-cat { display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); transition: .18s; }
.math-cat:hover { transform: translateY(-2px); border-color: rgba(94, 53, 177, .35); box-shadow: var(--shadow); }
.math-cat__icon { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px; background: rgba(94, 53, 177, .1); font-size: 24px; }
.math-cat__body { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.math-cat__body strong { font-size: 15px; }
.math-cat__body small { color: var(--ink-3); font-size: 11px; }
.math-cat__arrow, .math-q-card__arrow { color: var(--ink-3); font-size: 21px; }
.math-cat-head { display: flex; align-items: center; gap: 16px; margin: 6px 0 18px; padding: 20px 22px; border-radius: var(--r-lg); background: linear-gradient(135deg, rgba(126, 87, 194, .14), rgba(57, 73, 171, .05)); }
.math-cat-head > span { font-size: 44px; }
.math-cat-head p, .math-cat-head h1, .math-cat-head small { margin: 0; }
.math-cat-head p { color: #5e35b1; font-size: 11px; font-weight: 800; letter-spacing: 2px; }
.math-cat-head h1 { font-size: 27px; }
.math-cat-head small { color: var(--ink-3); }
.math-level-filter { display: flex; gap: 7px; overflow-x: auto; padding: 2px 1px 8px; scrollbar-width: none; }
.math-level-filter::-webkit-scrollbar { display: none; }
.math-level-filter .chip { flex-shrink: 0; }
.math-q-list { display: flex; flex-direction: column; gap: 9px; }
.math-q-card { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); transition: .16s; }
.math-q-card:hover { border-color: rgba(94, 53, 177, .35); box-shadow: var(--shadow); }
.math-q-card__icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px; background: rgba(94, 53, 177, .1); font-size: 23px; }
.math-q-card__main { flex: 1; min-width: 0; }
.math-q-card__top { display: flex; align-items: center; gap: 8px; }
.math-q-card__top strong { font-size: 14px; }
.math-q-card__top i { padding: 1px 6px; border-radius: 999px; background: var(--surface-2); color: var(--ink-3); font-size: 10px; font-style: normal; }
.math-q-card__question { display: -webkit-box; margin-top: 3px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.math-q-card__scene { display: block; margin-top: 4px; color: var(--ink-3); font-size: 11px; }

.math-card { max-width: 760px; margin: 0 auto; }
.math-card__head { display: flex; align-items: center; gap: 14px; margin: 4px 0 14px; padding: 18px 20px; border-radius: var(--r-lg); background: linear-gradient(135deg, rgba(126, 87, 194, .16), rgba(57, 73, 171, .06)); }
.math-card__icon { font-size: 40px; }
.math-card__head div { flex: 1; min-width: 0; }
.math-card__head p, .math-card__head h1 { margin: 0; }
.math-card__head p { color: var(--ink-3); font-size: 12px; }
.math-card__head h1 { font-size: 25px; }
.math-level { flex-shrink: 0; padding: 5px 10px; border-radius: 999px; background: var(--surface); color: #5e35b1; font-size: 11px; font-weight: 700; }
.math-materials { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; color: var(--ink-3); font-size: 12px; }
.math-materials span { padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.math-question { padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 2px solid rgba(94, 53, 177, .25); box-shadow: var(--shadow); }
.math-question > span { color: #5e35b1; font-size: 11px; font-weight: 800; letter-spacing: 2px; }
.math-question p { margin: 7px 0 0; font-size: 20px; font-weight: 700; line-height: 1.75; }
.math-do { margin: 12px 0; padding: 14px 16px; border-radius: var(--r-md); background: rgba(94, 53, 177, .06); }
.math-do strong { display: block; margin-bottom: 8px; font-size: 13px; }
.math-do > div { display: flex; flex-wrap: wrap; gap: 7px; }
.math-do button { border: 1px solid rgba(94, 53, 177, .22); border-radius: 999px; padding: 7px 12px; background: var(--surface); color: var(--ink-2); font-size: 12px; }
.math-do button.is-selected { color: #fff; background: #5e35b1; border-color: #5e35b1; }
.math-choice-note { margin: 8px 0 0; color: #5e35b1; font-size: 12px; }
.math-parent-script { margin: 12px 0; padding: 16px 18px; border-left: 4px solid var(--amber); border-radius: 0 var(--r-md) var(--r-md) 0; background: rgba(255, 179, 0, .09); }
.math-parent-script span { font-size: 12px; font-weight: 800; }
.math-parent-script p { margin: 5px 0 0; color: var(--ink-2); }
.math-follow { display: flex; flex-direction: column; gap: 8px; }
.math-reveal { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.math-reveal__head { display: flex; align-items: center; gap: 9px; width: 100%; padding: 13px 15px; border: 0; background: transparent; color: var(--ink); text-align: left; }
.math-reveal__head > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(94, 53, 177, .12); color: #5e35b1; font-size: 11px; font-weight: 800; }
.math-reveal__head strong { flex: 1; }
.math-reveal__head i { color: var(--ink-3); font-size: 11px; font-style: normal; }
.math-reveal__body { display: none; padding: 0 16px 15px 49px; }
.math-reveal.is-open .math-reveal__body { display: block; }
.math-reveal__body p { margin: 0 0 5px; font-size: 15px; }
.math-reveal__body small { color: var(--ink-3); }
.math-answer { margin-top: 14px; }
.math-answer__btn { width: 100%; min-height: 48px; border: 0; border-radius: var(--r-md); background: #5e35b1; color: #fff; font-weight: 800; }
.math-answer__body { display: none; padding: 18px 20px; border: 1px solid rgba(94, 53, 177, .2); border-top: 0; border-radius: 0 0 var(--r-md) var(--r-md); background: var(--surface); }
.math-answer.is-open .math-answer__body { display: block; }
.math-answer__body h2 { margin: 0 0 5px; color: #5e35b1; font-size: 15px; }
.math-answer__body h2:not(:first-child) { margin-top: 14px; }
.math-answer__body p { margin: 0; color: var(--ink-2); line-height: 1.8; }
.math-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.math-notes details { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.math-notes summary { cursor: pointer; font-size: 13px; font-weight: 700; }
.math-notes .math-avoid { border-color: rgba(239, 83, 80, .22); }
.math-bullets { margin: 9px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 12px; }
.math-bullets li + li { margin-top: 5px; }

/* ---------- 底部 Tab ---------- */
.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(var(--tab-h) + var(--safe-b));
  display: flex; padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.tab-bar__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--ink-3); font-size: 11px; border: 0; background: none; transition: color .15s;
}
.tab-bar__item i { font-style: normal; font-size: 19px; line-height: 1; }
.tab-bar__item.is-active { color: var(--amber-deep); font-weight: 600; }
.tab-bar__item:active { transform: scale(.94); }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 4px 0 8px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px 14px; text-align: center; transition: .18s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(255, 179, 0, .5); }
.stat b { display: block; font-size: 27px; font-weight: 800; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.1; }
.stat span { font-size: 12.5px; color: var(--ink-3); }

/* ---------- 条形图（各年级篇数） ---------- */
.bar-chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 6px; }
.bar-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--r-sm); transition: background .15s; }
.bar-row:hover { background: var(--surface-2); }
.bar-row__label { width: 56px; flex-shrink: 0; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.bar-row__track { flex: 1; height: 20px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.bar-row__fill { display: block; height: 100%; background: var(--grad); border-radius: 6px; min-width: 3px;
  box-shadow: 0 0 8px rgba(244, 81, 30, .35); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.bar-row__val { width: 34px; text-align: right; font-size: 13.5px; font-weight: 700; color: var(--amber-deep); flex-shrink: 0; }

/* ---------- 朝代分布条 ---------- */
.dynbar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 16px; }
.dynbar__track { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.dynbar__seg { display: block; height: 100%; }
.c0 { background: #ffb300; } .c1 { background: #ff7043; } .c2 { background: #f4511e; }
.c3 { background: #ffd54f; } .c4 { background: #ff8a65; } .c5 { background: #e65100; }
.dynbar__legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.dynbar__key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.dynbar__dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* ---------- 诗页工具条 ---------- */
.poem-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 18px 0 4px; }
.font-ctl { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); overflow: hidden; padding-left: 11px; }
.font-ctl__label { font-size: 12px; color: var(--ink-3); margin-right: 2px; }
.font-ctl button { border: 0; background: none; color: var(--ink-2); width: 32px; height: 33px; font-size: 16px; font-weight: 700; transition: .15s; }
.font-ctl button:hover { color: var(--amber-deep); background: rgba(255, 179, 0, .12); }
.font-ctl #font-val { min-width: 24px; text-align: center; font-size: 12.5px; color: var(--ink-3); }

/* ---------- 竖排诵读 ---------- */
.poem-body.vertical {
  writing-mode: vertical-rl; text-orientation: upright;
  min-height: 320px; max-height: 72vh; overflow-x: auto; overflow-y: hidden;
  padding: 18px 6px; display: flex; flex-direction: column; flex-wrap: wrap;
  align-content: flex-start; gap: 0;
}
.poem-body.vertical .poem-line { margin: 0 0 0 18px; line-height: 2.2; letter-spacing: 4px; }
.poem-body.vertical rt { font-size: 9.5px; }
.poem-body.vertical::-webkit-scrollbar { height: 8px; }
.poem-body.vertical::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

/* ---------- 筛选分组 ---------- */
.fgroup { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--line); }
.fgroup:first-of-type { border-top: 0; }
.fgroup__label { flex-shrink: 0; width: 40px; padding-top: 6px; font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: 1px; }
.fgroup__chips { display: flex; flex-wrap: wrap; gap: 7px; flex: 1; min-width: 0; }
.chip--all { font-weight: 600; }

/* ---------- 年级底部弹层选择器（移动端） ---------- */
.grade-sheet-btn {
  display: none; /* 桌面端隐藏，仅移动端展示 */
  width: 100%; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  font: inherit; color: var(--ink); text-align: left; cursor: pointer;
  transition: border-color .18s, box-shadow .18s;
}
.grade-sheet-btn:active { border-color: var(--amber-deep, #f4511e); }
.grade-sheet-btn__label { font-size: 15px; font-weight: 700; }
.grade-sheet-btn__hint { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }
.grade-sheet-btn__arrow { font-size: 20px; color: var(--ink-3); line-height: 1; }

.gsheet { position: fixed; inset: 0; z-index: 90; visibility: hidden; }
.gsheet.is-open { visibility: visible; }
.gsheet__mask {
  position: absolute; inset: 0; background: rgba(15, 12, 8, .5);
  opacity: 0; transition: opacity .22s ease;
}
.gsheet.is-open .gsheet__mask { opacity: 1; }
.gsheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--surface); border-radius: 18px 18px 0 0;
  max-height: 78vh; display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .25, 1);
  box-shadow: 0 -12px 32px rgba(0, 0, 0, .18);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.gsheet.is-open .gsheet__panel { transform: translateY(0); }
.gsheet__grip { width: 38px; height: 4px; border-radius: 2px; background: var(--line); margin: 10px auto 4px; }
.gsheet__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 16px 12px; border-bottom: 1px solid var(--line);
}
.gsheet__head h3 { margin: 0; font-size: 16px; }
.gsheet__close {
  width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2, transparent); color: var(--ink-2); font-size: 20px; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
}
.gsheet__body { overflow-y: auto; padding: 8px 14px 18px; -webkit-overflow-scrolling: touch; }
.gsheet-group { margin-bottom: 10px; }
.gsheet-group__head {
  display: flex; align-items: center; gap: 6px; margin: 10px 2px 6px;
  color: var(--ink-3); font-size: 12px; letter-spacing: 1px;
}
.gsheet-group__head h4 { margin: 0; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.gsheet-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px;
  border-radius: 12px; color: var(--ink); text-decoration: none;
}
.gsheet-item:active { background: var(--surface-2); }
.gsheet-item__badge {
  flex-shrink: 0; min-width: 38px; height: 38px; padding: 0 6px; border-radius: 10px;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 13px;
  display: grid; place-items: center;
}
.gsheet-item__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gsheet-item__main strong { font-size: 15.5px; }
.gsheet-item__main small { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsheet-item__count { flex-shrink: 0; font-size: 11px; color: var(--ink-3); }
.gsheet-item__count b { color: var(--amber-deep, #f4511e); font-size: 14px; margin-right: 2px; }
body.gsheet-open { overflow: hidden; }

/* ---------- 移动端适配（≤759px） ---------- */
@media (max-width: 759px) {
  .view { padding: 14px 12px 32px; }
  /* Hero */
  .hero { padding: 24px 18px 28px; border-radius: 18px; margin-bottom: 20px; }
  .hero h1 { font-size: 26px; letter-spacing: 1px; }
  .hero--grade h1 { font-size: 23px; }
  .hero__desc { font-size: 13px; }
  .hero__badges span { font-size: 11.5px; padding: 3px 10px; }
  /* 首页年级：移动端改为底部弹层选择器，桌面端网格隐藏 */
  .grade-sheet-btn { display: flex; }
  .grade-desktop-wrap { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  /* 朝代条：精简 */
  .dynbar { padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; }
  .dynbar__legend { gap: 5px 12px; margin-top: 8px; }
  .dynbar__key { font-size: 11px; }
  /* 筛选：折叠面板 */
  .filter-panel { padding: 10px 14px; border-radius: 14px; margin-bottom: 14px; }
  .filter-head { display: flex; padding: 4px 0; }
  .filter-body { display: none; padding-top: 10px; border-top: 1px dashed var(--line); }
  .filter-panel.is-open .filter-body { display: block; }
  .fgroup { padding: 7px 0; gap: 8px; }
  .fgroup__label { width: 34px; font-size: 11px; padding-top: 7px; }
  .fgroup__chips { gap: 6px; }
  .chip { padding: 6px 12px; font-size: 12.5px; border-radius: 999px; }
  .filter-input { height: 40px; border-radius: 10px; }
  /* 诗行：卡片化、更透气 */
  .poem-list { gap: 9px; }
  .poem-row { padding: 13px 14px; gap: 10px; flex-wrap: nowrap; align-items: center; border-radius: 12px; }
  .poem-row__main { gap: 4px; }
  .poem-row__title { font-size: 15.5px; }
  .poem-row__sub { font-size: 12px; }
  .poem-row__right { margin-left: auto; width: auto; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
  .poem-row__right .tag--theme { display: none; }  /* 窄屏只留类型，减噪 */
  .result-meta { margin: 2px 0 12px 2px; }
  /* 诗页 */
  .poem-hero { padding: 20px 16px; border-radius: 16px; }
  .poem-title { font-size: 24px; }
  .poem-line { letter-spacing: 1.5px; }
  .poem-tools { gap: 6px; margin: 14px 0 2px; }
  .sec-block { border-radius: 14px; }
  .sec-block__body { padding: 0 14px 14px 26px; font-size: 14px; }
  /* 分页 */
  .pager { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pager__home { grid-column: 1 / -1; order: -1; justify-self: center; padding: 8px 18px; }
  .pager__btn { padding: 11px 13px; }
  .pager__name { font-size: 14px; }
  /* 其它 */
  .bar-row__label { width: 48px; font-size: 12.5px; }
  .crumbs { font-size: 12px; margin-bottom: 12px; }
  .sec__head h2 { font-size: 19px; }
  /* 英语 */
  .subject-switch__btn { padding: 7px 18px; font-size: 13px; }
  .en-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .en-cat { padding: 13px 12px; gap: 10px; }
  .en-cat__icon { font-size: 24px; }
  .en-cat__body strong { font-size: 14px; }
  .en-cat__body small { font-size: 11px; }
  .en-cat__arrow { display: none; }
  .en-detail__head h1 { font-size: 22px; }
  .en-word__text { font-size: 19px; }
  .en-sent__en { font-size: 15px; }
  .en-tabs { top: calc(var(--bar-h) + 5px); margin-top: -6px; padding: 5px; }
  .en-tabs__btn { min-height: 43px; padding: 7px 9px; gap: 5px; }
  .en-tabs__label { font-size: 13px; }
  .en-tabs__count { font-size: 10px; }
  .en-word, .en-sent { padding: 13px 12px; gap: 10px; }
  .en-item-icon { width: 40px; height: 40px; flex-basis: 40px; font-size: 23px; }
  .en-speak-btn { width: 34px; height: 34px; flex-basis: 34px; }
  /* 数学 */
  .math-today { align-items: stretch; flex-direction: column; gap: 14px; padding: 18px; }
  .math-today h2 { font-size: 19px; }
  .math-primary { width: 100%; }
  .math-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .math-cat { align-items: flex-start; flex-direction: column; gap: 8px; padding: 13px; }
  .math-cat__icon { width: 39px; height: 39px; flex-basis: 39px; font-size: 22px; }
  .math-cat__arrow { display: none; }
  .math-cat-head { padding: 16px; }
  .math-cat-head > span { font-size: 36px; }
  .math-cat-head h1 { font-size: 23px; }
  .math-q-card { padding: 12px; gap: 10px; }
  .math-q-card__icon { width: 38px; height: 38px; flex-basis: 38px; }
  .math-card__head { align-items: flex-start; flex-wrap: wrap; padding: 15px; }
  .math-card__icon { font-size: 34px; }
  .math-card__head h1 { font-size: 22px; }
  .math-level { margin-left: 50px; margin-top: -10px; }
  .math-question { padding: 18px 16px; }
  .math-question p { font-size: 18px; }
  .math-reveal__body { padding-left: 16px; }
  .math-notes { grid-template-columns: 1fr; }
}

/* ---------- 桌面适配 ---------- */
@media (min-width: 760px) {
  .tab-bar { display: none; }
  body { padding-bottom: 0; }
  .view { padding-top: 28px; }
  .hero h1 { font-size: 42px; }
  .grade-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
