﻿/* ============================================================
   《南宋悲歌》古诗交互学习 — 古风样式
   配色：绢本米黄 / 墨绿山水 / 朱砂金
   ============================================================ */

:root {
  --ink:        #1c2a27;
  --ink-soft:   #3a4f49;
  --ink-light:  #6a7f78;
  --jade-deep:  #1f4f47;
  --jade:       #2f6b5e;
  --jade-light: #6f9d8e;
  --gold:       #b08a3e;
  --gold-light: #d9b96a;
  --cinnabar:   #9c3a2e;
  --paper:      #faf6ea;
  --paper-2:    #f3ecdb;
  --line:       rgba(31, 79, 71, .18);
  --line-soft:  rgba(31, 79, 71, .10);
  --shadow:     0 10px 34px rgba(22, 58, 52, .13);
  --shadow-lg:  0 18px 52px rgba(22, 58, 52, .20);
  --radius:     16px;
  --serif: "STZhongsong", "华文中宋", "FZShuSong-Z01", "STSong", "宋体", "Source Han Serif SC", "Noto Serif SC", "SimSun", Georgia, serif;
  --kai:   "STKaiti", "华文楷体", "KaiTi", "楷体", "FZKai-Z03", "STSong", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--serif);
  color: var(--ink);
  background-color: #cfdcd6;
  background-image: url("bg.png");
  background-size: cover;
  background-position: 50% 42%;
  background-repeat: no-repeat;
  background-attachment: fixed;
  line-height: 1.75;
}

[hidden] { display: none !important; }

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

button { cursor: pointer; border: none; background: none; }

svg { width: 1em; height: 1em; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

::selection { background: rgba(176, 138, 62, .28); }

/* ---------------------------------------------- 通用容器 */
.view { position: relative; min-height: 100vh; }
.view::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, rgba(255,252,242,.34) 0%, rgba(255,252,242,.06) 26%, rgba(255,252,242,.10) 62%, rgba(255,252,242,.40) 100%);
}

/* ============================================================
   一、首页
   ============================================================ */
.cover-inner {
  position: relative; z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  padding: 54px 24px 40px;
}

.cover-head { text-align: center; }

.cover-eyebrow {
  margin: 0 0 14px;
  font-family: var(--kai);
  font-size: 15px;
  letter-spacing: .34em;
  color: var(--jade);
  text-indent: .34em;
}

.cover-title {
  margin: 0;
  font-size: clamp(52px, 9vw, 104px);
  line-height: 1.08;
  letter-spacing: .12em;
  font-weight: 700;
  color: var(--jade-deep);
  text-indent: .12em;
  text-shadow: 0 2px 0 rgba(255,255,255,.55), 0 18px 34px rgba(20,60,52,.20);
}
.cover-title span { display: inline-block; }
.cover-title span:last-child { color: var(--cinnabar); }

.cover-rule {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin: 18px auto 16px; max-width: 420px;
}
.cover-rule i {
  display: block; height: 1px; flex: 1;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.cover-rule b { color: var(--gold); font-size: 13px; font-weight: 400; }

.cover-sub {
  margin: 0 0 12px;
  font-family: var(--kai);
  font-size: clamp(16px, 2.1vw, 21px);
  letter-spacing: .12em;
  color: var(--ink-soft);
}
.cover-desc {
  margin: 0 auto;
  max-width: 620px;
  font-size: 15.5px;
  line-height: 2;
  color: var(--ink-light);
}

/* 工具栏 */
.cover-tools {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  margin: 34px auto 22px;
  max-width: 900px;
}
.search {
  flex: 1 1 300px;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  background: rgba(255, 253, 246, .78);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(22,58,52,.08);
  backdrop-filter: blur(6px);
  transition: border-color .25s, box-shadow .25s;
}
.search:focus-within { border-color: var(--jade-light); box-shadow: 0 6px 22px rgba(22,58,52,.16); }
.search svg { font-size: 18px; color: var(--jade); flex: none; }
.search input {
  flex: 1; min-width: 0;
  border: none; background: none; outline: none;
  font-size: 15px; letter-spacing: .04em;
}
.search input::placeholder { color: #9aa8a3; }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }

.progress-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  background: rgba(255, 253, 246, .72);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  font-size: 14px; color: var(--jade-deep);
  white-space: nowrap;
}
.progress-label { font-family: var(--kai); letter-spacing: .1em; }
.progress-track {
  display: block; width: 110px; height: 7px;
  background: rgba(31,79,71,.14);
  border-radius: 99px; overflow: hidden;
}
.progress-track i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--jade-light), var(--jade));
  border-radius: 99px;
  transition: width .5s cubic-bezier(.2,.8,.3,1);
}
.progress-num { font-variant-numeric: tabular-nums; color: var(--gold); font-weight: 700; }

/* 卡片网格 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 20px;
  margin-top: 8px;
}

.poem-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 26px 24px 20px;
  background:
    linear-gradient(180deg, rgba(255,253,247,.96), rgba(247,241,227,.94));
  border: 1px solid rgba(31,79,71,.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform .32s cubic-bezier(.2,.8,.3,1), box-shadow .32s, border-color .32s;
}
.poem-card::before {
  content: "";
  position: absolute; inset: 6px;
  border: 1px solid rgba(176,138,62,.20);
  border-radius: 11px;
  pointer-events: none;
}
.poem-card::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--jade), var(--gold-light));
  opacity: .55; transition: opacity .3s, width .3s;
}
.poem-card:hover, .poem-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(31,79,71,.34);
  outline: none;
}
.poem-card:hover::after { opacity: 1; width: 5px; }

.card-index {
  position: absolute; top: 14px; right: 18px;
  font-family: var(--kai);
  font-size: 34px; line-height: 1;
  color: rgba(31,79,71,.13);
  font-weight: 700;
}
.card-title {
  margin: 0 0 6px;
  font-size: clamp(21px, 2.4vw, 26px);
  letter-spacing: .08em;
  color: var(--jade-deep);
  line-height: 1.4;
}
.card-title small { font-size: .62em; letter-spacing: .04em; color: var(--ink-light); }
.card-author {
  margin: 0 0 14px;
  font-family: var(--kai);
  font-size: 14px; letter-spacing: .1em;
  color: var(--gold);
}
.card-line {
  margin: 0 0 20px;
  font-family: var(--kai);
  font-size: 15px; line-height: 1.9;
  color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.card-foot {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.tag {
  font-size: 12.5px; letter-spacing: .06em;
  padding: 3px 10px; border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--jade);
  background: rgba(111,157,142,.10);
}
.tag-plain { color: var(--ink-light); background: rgba(106,127,120,.08); }
.tag-done.on { color: var(--cinnabar); border-color: rgba(156,58,46,.3); background: rgba(156,58,46,.08); }
.card-enter {
  margin-left: auto;
  font-family: var(--kai);
  font-size: 14px; color: var(--gold);
  transition: transform .3s;
}
.poem-card:hover .card-enter { transform: translateX(4px); }

.search-empty {
  margin: 30px 0 0; text-align: center;
  font-family: var(--kai); color: var(--ink-light);
}

.cover-foot {
  margin-top: 42px; text-align: center;
  font-family: var(--kai); font-size: 13.5px;
  color: rgba(28,42,39,.5); letter-spacing: .1em;
}
.cover-foot .dot { margin: 0 8px; color: var(--gold); }

/* ============================================================
   二、学习页
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 11px 22px;
  background: rgba(250, 246, 234, .88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px) saturate(1.1);
  box-shadow: 0 2px 18px rgba(22,58,52,.08);
}
.back-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255,255,255,.6);
  font-family: var(--kai); font-size: 15px; letter-spacing: .06em;
  color: var(--jade-deep);
  transition: background .25s, border-color .25s, transform .25s;
}
.back-btn svg { font-size: 17px; stroke-width: 2.4; }
.back-btn:hover { background: rgba(31,79,71,.10); border-color: var(--jade-light); transform: translateX(-2px); }

.crumb {
  flex: 1; margin: 0; min-width: 0;
  font-family: var(--kai); font-size: 14.5px;
  color: var(--ink-light);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.crumb b { color: var(--gold); margin: 0 6px; font-weight: 400; }
.crumb-home { cursor: pointer; border-bottom: 1px dashed rgba(31,79,71,.35); }
.crumb-home:hover { color: var(--jade); }

.read-btn {
  padding: 9px 20px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--jade), var(--jade-deep));
  color: #fdfbf3;
  font-family: var(--kai); font-size: 15px; letter-spacing: .08em;
  box-shadow: 0 6px 18px rgba(31,79,71,.28);
  transition: transform .25s, box-shadow .25s, filter .25s;
}
.read-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(31,79,71,.34); filter: brightness(1.06); }

.reader-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 26px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 22px 60px;
  align-items: start;
}

/* 侧栏目录 */
.sidebar {
  position: sticky; top: 78px;
  padding: 20px 16px;
  background: rgba(252, 249, 240, .86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.side-title {
  margin: 0 0 12px;
  font-size: 15px; letter-spacing: .5em; text-indent: .5em;
  font-weight: 400;
  color: var(--gold);
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}
.side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.side-list button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 10px;
  border-radius: 9px;
  text-align: left;
  transition: background .22s, color .22s;
}
.side-list button:hover { background: rgba(31,79,71,.07); }
.side-list button.active {
  background: linear-gradient(90deg, rgba(31,79,71,.14), rgba(31,79,71,.04));
  box-shadow: inset 2px 0 0 var(--jade);
}
.side-list i {
  flex: none;
  display: grid; place-items: center;
  width: 22px; height: 22px;
  font-style: normal; font-size: 12.5px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--jade);
  font-variant-numeric: tabular-nums;
}
.side-list button.active i { background: var(--jade); color: #fdfbf3; border-color: transparent; }
.li-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.li-main b {
  font-size: 14.5px; font-weight: 400; letter-spacing: .03em;
  color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-list button.active .li-main b { color: var(--jade-deep); font-weight: 700; }
.li-main em { font-style: normal; font-family: var(--kai); font-size: 12px; color: var(--ink-light); }
.li-done { color: var(--cinnabar); font-size: 12px; }
.li-mute { font-size: 11px; color: #b3beb9; flex: none; }
.side-tip {
  margin: 16px 0 0; padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--kai); font-size: 12.5px; line-height: 1.8;
  color: var(--ink-light);
}

/* 内容区 */
.content { min-width: 0; display: grid; gap: 18px; }

.poem-card-head {
  display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap;
  padding: 30px 30px 24px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(217,185,106,.14), transparent 60%),
    linear-gradient(180deg, rgba(255,253,247,.97), rgba(248,242,229,.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.pch-text { flex: 1; min-width: 0; }
.p-title {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.4vw, 35px);
  line-height: 1.35; letter-spacing: .05em;
  color: var(--jade-deep);
}
.p-meta { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.p-author { font-family: var(--kai); font-size: 17px; letter-spacing: .1em; color: var(--gold); }
.p-sub { font-family: var(--kai); font-size: 15px; color: var(--ink-light); }

.fav-btn {
  flex: none;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255,255,255,.62);
  font-family: var(--kai); font-size: 14.5px; letter-spacing: .06em;
  color: var(--jade-deep);
  transition: all .25s;
}
.fav-btn:hover { border-color: var(--jade-light); background: rgba(31,79,71,.08); }
.fav-btn.on {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--cinnabar), #7d2c22);
  box-shadow: 0 6px 16px rgba(156,58,46,.28);
}

/* 播放器 */
.player {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 22px;
  background: linear-gradient(135deg, rgba(31,79,71,.95), rgba(47,107,94,.92));
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(22,58,52,.24);
  color: #f2f7f2;
}
.player.disabled { background: linear-gradient(135deg, rgba(70,88,84,.85), rgba(96,112,107,.8)); }
.play-btn {
  flex: none;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff8e6, var(--gold-light));
  color: var(--jade-deep);
  box-shadow: 0 6px 18px rgba(0,0,0,.22), inset 0 -2px 6px rgba(0,0,0,.10);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.play-btn svg { width: 22px; height: 22px; stroke: none; fill: currentColor; }
.play-btn:hover:not(:disabled) { transform: scale(1.07); filter: brightness(1.05); }
.play-btn:disabled { opacity: .55; cursor: not-allowed; }
.player-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.player-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.player-title { font-family: var(--kai); font-size: 15px; letter-spacing: .16em; opacity: .92; }
.rate-btn {
  padding: 2px 11px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 99px;
  font-size: 12.5px; letter-spacing: .04em;
  color: #f4f8f4;
  transition: background .2s;
}
.rate-btn:hover { background: rgba(255,255,255,.16); }
.time { font-size: 12.5px; font-variant-numeric: tabular-nums; opacity: .8; }
.no-audio { font-size: 12.5px; color: #ffe9c9; }

.seek {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 5px;
  margin: 4px 0;
  border-radius: 99px;
  background: rgba(255,255,255,.24);
  outline: none;
  cursor: pointer;
}
.seek:disabled { cursor: not-allowed; opacity: .6; }
.seek::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; border-radius: 50%;
  background: #fffdf4;
  border: 2px solid var(--gold-light);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.seek::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%;
  background: #fffdf4; border: 2px solid var(--gold-light);
}

/* 选项卡 */
.tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 8px;
  background: rgba(252, 249, 240, .82);
  border: 1px solid var(--line);
  border-radius: 13px;
  backdrop-filter: blur(8px);
}
.tabs button {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 17px;
  border-radius: 9px;
  font-size: 15px; letter-spacing: .05em;
  color: var(--ink-soft);
  transition: background .22s, color .22s, box-shadow .22s;
}
.tabs button i {
  font-style: normal;
  display: grid; place-items: center;
  width: 21px; height: 21px;
  font-size: 12px;
  border-radius: 5px;
  background: rgba(31,79,71,.10);
  color: var(--jade);
  transition: all .22s;
}
.tabs button:hover { background: rgba(31,79,71,.08); color: var(--jade-deep); }
.tabs button.on {
  color: #fff;
  background: linear-gradient(135deg, var(--jade), var(--jade-deep));
  box-shadow: 0 6px 16px rgba(31,79,71,.26);
}
.tabs button.on i { background: rgba(255,255,255,.22); color: #fff8e6; }

/* 内容面板 */
.panel {
  padding: 32px 34px 34px;
  min-height: 300px;
  background: linear-gradient(180deg, rgba(255,253,247,.97), rgba(249,244,233,.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel.fade-in { animation: fadeUp .42s cubic-bezier(.2,.8,.3,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

/* 原文 */
.orig-wrap { position: relative; padding: 8px 0 4px; }
.seal-mark {
  position: absolute; top: 0; right: 0;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  font-family: var(--kai); font-size: 13.5px; line-height: 1.15;
  letter-spacing: .04em;
  text-align: center;
  color: var(--cinnabar);
  border: 2px solid rgba(156,58,46,.55);
  border-radius: 6px;
  background: rgba(156,58,46,.05);
  transform: rotate(-4deg);
  opacity: .82;
  pointer-events: none;
}
.poem-lines { display: grid; gap: 2px; }
.poem-line {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  margin: 0;
  padding: 6px 96px 6px 4px;
  font-family: var(--kai);
  font-size: clamp(19px, 2.35vw, 25px);
  line-height: 2;
  letter-spacing: .1em;
  color: #16302b;
  border-radius: 8px;
  transition: background .25s, color .25s;
}
.poem-line:hover { background: rgba(31,79,71,.05); }
.ln { flex: 1; }
.line-speak {
  flex: none;
  opacity: 0;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 14px;
  color: var(--jade);
  background: rgba(31,79,71,.08);
  transition: opacity .25s, background .25s;
}
.poem-line:hover .line-speak, .line-speak:focus-visible { opacity: 1; }
.line-speak:hover { background: rgba(31,79,71,.18); }

.orig-hint {
  margin: 20px 0 0;
  font-family: var(--kai); font-size: 13.5px;
  color: var(--ink-light);
}

.tip-box {
  margin-top: 20px;
  padding: 13px 18px;
  font-size: 14.5px; line-height: 1.9;
  color: #7a5a1e;
  background: rgba(217,185,106,.14);
  border: 1px solid rgba(176,138,62,.3);
  border-left: 3px solid var(--gold);
  border-radius: 9px;
}

/* 资料库 / 全文翻译 */
.para-list { display: grid; gap: 18px; }
.para {
  position: relative;
  margin: 0;
  padding-left: 42px;
  font-size: 16.5px;
  line-height: 2.05;
  color: var(--ink-soft);
  text-align: justify;
}
.para-no {
  position: absolute; left: 0; top: 4px;
  display: grid; place-items: center;
  width: 27px; height: 27px;
  font-family: var(--kai); font-size: 14px;
  border-radius: 50%;
  color: var(--jade);
  background: rgba(31,79,71,.09);
  border: 1px solid var(--line);
}

/* 词句解析 */
.key-bar {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 14px 20px;
  margin-bottom: 22px;
  background: linear-gradient(90deg, rgba(31,79,71,.10), rgba(31,79,71,.02));
  border-left: 3px solid var(--jade);
  border-radius: 8px;
}
.key-bar b { flex: none; font-family: var(--kai); font-size: 15px; letter-spacing: .1em; color: var(--jade-deep); }
.key-bar span { font-size: 15px; color: var(--ink-soft); letter-spacing: .05em; }
.word-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.word-list li {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 11px 14px;
  border-radius: 9px;
  transition: background .22s;
}
.word-list li:hover { background: rgba(31,79,71,.05); }
.word-list li + li { border-top: 1px dashed var(--line-soft); }
.word-list b {
  flex: none;
  min-width: 92px;
  font-family: var(--kai); font-size: 17px; font-weight: 700;
  letter-spacing: .06em;
  color: var(--cinnabar);
}
.word-list span { flex: 1; font-size: 16px; line-height: 1.95; color: var(--ink-soft); }

/* 中心主旨 */
.theme-box {
  position: relative;
  padding: 26px 30px 26px 34px;
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(217,185,106,.16), transparent 62%),
    rgba(255,252,244,.7);
  border: 1px solid rgba(176,138,62,.34);
  border-radius: 12px;
}
.theme-box::before {
  content: "主旨";
  position: absolute; left: -14px; top: 24px;
  width: 30px; padding: 6px 0;
  font-family: var(--kai); font-size: 13px; line-height: 1.15;
  text-align: center; color: #fff;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(176,138,62,.34);
}
.theme-box p {
  margin: 0;
  font-size: 17.5px; line-height: 2.15;
  letter-spacing: .03em;
  color: #4a3a15;
  text-align: justify;
}
.theme-box p + p { margin-top: 14px; }

.page-foot {
  margin: 12px 0 0;
  text-align: center;
  font-family: var(--kai); font-size: 13px;
  letter-spacing: .16em;
  color: rgba(28,42,39,.42);
}

/* ============================================================
   提示条 / 落英
   ============================================================ */
.toast {
  position: fixed; left: 50%; bottom: 40px; z-index: 80;
  transform: translate(-50%, 22px);
  max-width: min(86vw, 460px);
  padding: 12px 24px;
  font-family: var(--kai); font-size: 15px; letter-spacing: .05em;
  text-align: center;
  color: #fdfbf3;
  background: rgba(28, 48, 44, .93);
  border: 1px solid rgba(217,185,106,.42);
  border-radius: 99px;
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.petals { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.petals i {
  position: absolute; top: -6vh;
  width: 11px; height: 11px;
  background: radial-gradient(circle at 30% 30%, rgba(255,236,214,.95), rgba(226,168,120,.6) 60%, rgba(200,120,90,.28));
  border-radius: 60% 12% 60% 12%;
  animation: fall linear infinite;
  opacity: .55;
}
@keyframes fall {
  0%   { transform: translate3d(0, -8vh, 0) rotate(0deg); }
  100% { transform: translate3d(6vw, 106vh, 0) rotate(420deg); }
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 940px) {
  .reader-inner { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
  .side-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); display: grid; }
  .side-tip { display: none; }
}

@media (max-width: 640px) {
  .cover-inner { padding: 36px 16px 30px; }
  .cover-tools { margin: 26px 0 18px; }
  .progress-wrap { flex: 1 1 100%; justify-content: space-between; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .poem-card { padding: 22px 20px 16px; }
  .topbar { padding: 9px 12px; gap: 8px; flex-wrap: wrap; }
  .crumb { display: none; }
  .read-btn { margin-left: auto; padding: 8px 14px; }
  .reader-inner { padding: 16px 12px 44px; gap: 16px; }
  .poem-card-head { padding: 22px 20px 18px; }
  .panel { padding: 22px 18px 26px; }
  .player { padding: 14px 16px; gap: 13px; }
  .play-btn { width: 46px; height: 46px; }
  .tabs { gap: 6px; padding: 7px; }
  .tabs button { flex: 1 1 calc(50% - 6px); justify-content: center; padding: 9px 8px; font-size: 14px; }
  .seal-mark { display: none; }
  .poem-line { padding-right: 6px; font-size: 19px; line-height: 2.05; }
  .line-speak { opacity: .55; }
  .word-list li { flex-direction: column; gap: 4px; }
  .word-list b { min-width: 0; }
  .theme-box { padding: 20px 18px 20px 24px; }
  .theme-box::before { left: -10px; }
  .para { padding-left: 34px; font-size: 16px; }
}

@media print {
  .topbar, .sidebar, .player, .tabs, .petals, .toast, .cover-tools, .read-btn { display: none !important; }
  body { background: #fff; }
}
