/* 妙笔点兵 —— 水墨宣纸风格。没有用任何图片。 */

:root {
  --ink: #1f1d1a;
  --ink-soft: #5a5148;
  --paper: #f5efe2;
  --paper-2: #fbf6ea;
  --desk: #d8cdb6;
  --line: #cbbfa8;
  --red: #b3261e;
  --gold: #c9a227;
  --font: "Kaiti SC", "STKaiti", "KaiTi", "楷体", "BiauKai", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--desk);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
button { font-family: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }

#app {
  position: relative;
  max-width: 460px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ---------- 通用按钮 ---------- */
.btn {
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  padding: 9px 14px;
  font-size: 17px;
  line-height: 1.2;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; font-size: 21px; letter-spacing: 0.12em; padding: 12px; }
.muted { color: var(--ink-soft); font-size: 13px; margin: 0; line-height: 1.5; }

/* ---------- 首页 ---------- */
#screen-start { gap: 14px; padding: 26px 20px 20px; overflow-y: auto; }
.title-block { position: relative; text-align: center; }
.title-block h1 { margin: 0; font-size: 54px; font-weight: 700; letter-spacing: 0.14em; }
.seal {
  position: absolute;
  top: -14px;
  right: 2%;
  padding: 3px 6px;
  border: 2px solid var(--red);
  border-radius: 4px;
  color: var(--red);
  font-size: 13px;
  letter-spacing: 0.1em;
  transform: rotate(8deg);
}
.subtitle { margin: 6px 0 0; color: var(--ink-soft); font-size: 16px; }
.panel {
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.field .label { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; color: var(--ink-soft); }
/* 选项：没选中是白底、灰字；选中的是红底、白字，前面还有一个勾。看颜色、看勾都认得出来选了哪几个 */
.seg { display: flex; border: 1.5px solid var(--ink); border-radius: 10px; overflow: hidden; background: #fff; }
.seg-btn {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  flex: 1; min-width: 0; padding: 9px 2px; font-size: 15px;
  color: var(--ink-soft); background: transparent; border: 0; border-right: 1.5px solid var(--ink);
}
.seg-btn:last-child { border-right: 0; }
.seg-btn:active { background: #f3e3b5; }
.seg-btn.on { background: var(--red); color: #fff; font-weight: 700; }
.seg-btn.on:active { background: #8f1d17; }
/* 勾是用边框画的，不挑手机上有什么字体 */
.seg-btn.on::before {
  content: '';
  flex: none; width: 9px; height: 5px; margin: -4px 1px 0 0;
  border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg);
}
/* 多选项旁边那个小小的"全选"：四个都选上了就亮成红色、打上勾，和点亮的按钮一个样子 */
.link-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex: none;
  border: 1px solid var(--ink); border-radius: 8px; background: #fff; color: var(--ink);
  padding: 2px 10px; font-size: 13px; line-height: 1.3;
}
.link-btn.on { background: var(--red); border-color: var(--red); color: #fff; }
.link-btn.on::before {
  content: '';
  flex: none; width: 8px; height: 4px; margin: -3px 0 0 0;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}
/* 首页最下面一行：题库版本 + 检查更新（只有线上版显示） */
.ver-line { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
#foe-line { text-align: center; }
.btn-cards { font-size: 15px; padding: 7px 12px; }
.howto { background: var(--paper-2); border: 1.5px dashed var(--line); border-radius: 12px; padding: 10px 14px; font-size: 15px; line-height: 1.6; }
.howto summary { cursor: pointer; font-size: 17px; }
.howto ol { padding-left: 1.3em; margin: 8px 0; }
.howto li { margin-bottom: 4px; }
.howto .spk { vertical-align: -2px; }   /* 说明文字里的小喇叭（书卷上那个的样子） */
.note { margin: 0; padding: 8px 10px; border-left: 3px solid var(--gold); background: #fbf3d6; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }

/* ---------- 游戏：顶栏 ---------- */
#hud {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: var(--paper-2);
  border-bottom: 1.5px solid var(--ink);
  font-size: 15px;
}
.hud-ink { display: flex; align-items: center; gap: 4px; font-size: 18px; min-width: 46px; }
.ink-drop {
  width: 14px; height: 14px; border-radius: 50% 50% 50% 0;
  background: var(--ink); transform: rotate(-45deg);
}
.hud-wave { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.hud-wave span { font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-hearts { font-size: 20px; letter-spacing: 1px; white-space: nowrap; }
.hud-hearts .on { color: var(--red); }
.hud-hearts .off { color: #c9bfae; }
.hud-hearts .hcount { font-size: 14px; margin-left: 2px; color: var(--ink); }
.foe-hearts .hcount { font-size: 13px; margin-left: 2px; color: var(--ink); }
.hero-skill.talent { border-color: #b8860b; background: #fdf6dd; }

/* ---------- 游戏：战场 ---------- */
#stage { position: relative; flex: 1 1 0; min-height: 120px; background: #e2d8c2; overflow: hidden; }
#board { display: block; touch-action: none; }
#stage.shake { animation: shake 0.35s; }
/* "放下一波"的按钮压在地图顶上那条路的正中（top 由 app.js 按地图算），那里不放地块 */
.btn-wave {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: max-content;
  margin: 0 auto;
  z-index: 3;
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  font-size: 17px;
  letter-spacing: 0.06em;
  animation: breathe 1.6s ease-in-out infinite;
}
/* 比一场时这个位置是一行倒数（只许一行，免得挡住第一排地块），不能点 */
.btn-wave.wait {
  padding: 4px 12px;
  margin: 0 auto;
  white-space: nowrap;
  background: var(--paper-2);
  color: var(--ink);
  border-color: var(--ink);
  font-size: 14px;
  letter-spacing: 0;
  animation: none;
  cursor: default;
  pointer-events: none;
}
/* 放大看对手布阵的那块画布 */
#foe-zoom {
  display: block;
  width: 100%;
  aspect-ratio: 108 / 128;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: #e2d8c2;
}

/* ---------- 对战：对手的面板（压在战场上面一条） ---------- */
#foe {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 105px;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 6px 8px;
  background: #ece3d0;
  border-bottom: 1.5px solid var(--ink);
  z-index: 2;
}
#foe-board {
  flex: none;
  width: 87px; height: 90px;
  display: block;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  background: #e2d8c2;
}
.foe-info { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; font-size: 13px; line-height: 1.35; }
.foe-top { display: flex; align-items: baseline; gap: 6px; }
.foe-top b { font-size: 19px; white-space: nowrap; }
.foe-top small { color: var(--ink-soft); white-space: nowrap; }
.foe-hearts { margin-left: auto; font-size: 18px; letter-spacing: 1px; white-space: nowrap; }
.foe-hearts .on { color: var(--red); }
.foe-hearts .off { color: #c9bfae; }
.foe-line { color: var(--ink-soft); }
.foe-line .l2 { display: block; }
#foe.hit { animation: shake 0.35s; }
/* 屏幕矮的时候只留一行字，不画对手的小战场 */
#foe.slim { height: 32px; padding: 3px 8px; }
#foe.slim #foe-board { display: none; }
#foe.slim .foe-info { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 8px; white-space: nowrap; font-size: 13px; overflow: hidden; }
#foe.slim .foe-top b { font-size: 16px; }
#foe.slim .foe-hearts { font-size: 15px; margin-left: 0; }
#foe.slim .foe-line .l2 { display: none; }
/* 小屏幕：书卷全是空的时候并成一行，把地方让给战场 */
.compact #scrolls.all-empty { flex-direction: row; }
.compact #scrolls.all-empty .scroll-empty {
  flex: 1 1 0; min-width: 0; flex-direction: column; gap: 0;
  min-height: 38px; padding: 4px 2px; text-align: center;
}
.compact #scrolls.all-empty .scroll-empty span:not(.empty-title) { display: none; }

/* ---------- 游戏：书卷 ---------- */
#scrolls { flex: none; display: flex; flex-direction: column; gap: 5px; padding: 6px 8px 0; }
.scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 4px 6px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: var(--paper-2);
}
.scroll-empty { justify-content: center; border-style: dashed; color: var(--ink-soft); font-size: 13px; gap: 8px; }
.scroll-empty .empty-title { color: var(--ink); font-size: 15px; }
.scroll-empty.target { border-color: var(--gold); border-style: solid; background: #fff6d0; animation: breathe 1.2s ease-in-out infinite; }
.scroll-open { position: relative; padding-left: 13px; gap: 5px; }   /* 左边多留的地方给骑在边框上的小喇叭（见下面 .speak-cue） */
.scroll-open .scroll-boxes { gap: 2px; }
/* 书卷上的提示整块是一个「听」的按钮（样式写在下面"「听」的按钮"一节的 .speak-cue 里） */
.scroll-open.long { flex-wrap: wrap; row-gap: 2px; }
.scroll-open.long .speak-cue { flex: 1 1 auto; width: calc(100% + 21px); }   /* 独占一行：把往左扩出去的那 21 像素补回来，这一行还是整个宽 */
.scroll-open.long .cue-text { max-height: none; white-space: nowrap; text-overflow: ellipsis; }
.scroll-open.long .scroll-boxes { flex: 1 1 auto; }
.scroll-boxes { flex: none; display: flex; gap: 3px; }
.box {
  width: clamp(30px, 8.4vw, 38px);
  height: clamp(30px, 8.4vw, 38px);
  padding: 0;
  border: 1.5px solid #9a8f7c;
  border-radius: 6px;
  background: #fffdf6;
  font-size: clamp(19px, 5.6vw, 25px);
  line-height: 1;
}
.box.filled { background: #f3e3b5; border-color: var(--ink); }
/* 印在卷上、不用填的字：灰底黑字，居中 */
.box.printed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e3ddd0;
  border: 1.5px solid #b3a892;
  color: var(--ink);
  cursor: default;
}
/* 首页：每波准备时间的输入框 */
.prep-row { display: flex; align-items: center; gap: 8px; }
.prep-row input {
  width: 76px;
  padding: 8px 6px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 17px;
  text-align: center;
}
.box.target { border-color: var(--gold); background: #fff6d0; }
.box.hint { animation: hint 0.5s ease-in-out 3; }
.x {
  flex: none; width: 26px; height: 26px; padding: 0;
  border: 1.5px solid #b3aa9a; border-radius: 50%; background: #fff;
  color: var(--ink-soft); font-size: 16px; line-height: 1;
}
.scroll-ready { background: #fdf2cf; border-color: var(--gold); }
.hero-chip {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 9px; border: 2px solid #8a5a00; border-radius: 9px;
  background: linear-gradient(#fce9a6, #e7b643); font-size: 17px; font-weight: 700;
}
.seal-mini {
  display: inline-block; padding: 0 3px; border-radius: 3px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 400;
}
.hero-chip.hinted { filter: saturate(0.55); }
.hero-chip.sel { outline: 3px solid var(--red); outline-offset: 1px; }
/* 诗将的定位：输出 / 群控 / 辅助 */
.role {
  display: inline-block;
  margin-left: 5px;
  padding: 0 6px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 400;
  vertical-align: 2px;
  white-space: nowrap;
}
.role-out { background: #f6d9d0; color: #8a2a1e; }
.role-ctrl { background: #d9e6f6; color: #2f5d94; }
.role-sup { background: #dcf0d8; color: #2f7d4f; }
.hero-chip.hinted .role { filter: none; }
.ready-hint { flex: 1; min-width: 0; font-size: 13px; line-height: 1.25; }
.ready-hint small { display: block; color: var(--ink-soft); font-size: 12px; }

/* ---------- 游戏：提示条 ---------- */
#tip {
  flex: none;
  margin: 0;
  padding: 5px 12px;
  min-height: 30px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-soft);
}
#tip.thinking { color: var(--red); }
/* 提示消息直接显示在提示条里，不挡住书卷 */
#tip.flash { color: #fff; background: var(--ink); font-size: 14px; }
#tip.flash-good { background: #2f7d4f; }
#tip.flash-wrong { background: var(--red); }

/* ---------- 游戏：手牌区 ---------- */
#dock {
  flex: none;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1.5px solid var(--ink);
  background: var(--paper-2);
}
.dock-row { display: flex; gap: 8px; }
.btn-summon { flex: 1; background: var(--red); border-color: var(--red); color: #fff; font-size: 19px; letter-spacing: 0.2em; }
.btn-summon small { display: block; font-size: 12px; letter-spacing: 0; opacity: 0.9; }
.mini-btns { flex: none; display: flex; gap: 4px; }
.mini-btns button {
  width: 38px; height: 40px; padding: 0;
  border: 1.5px solid var(--ink); border-radius: 8px; background: #fff; font-size: 16px;
}
.mini-btns button.off { color: #b3aa9a; border-color: #b3aa9a; }
.btn-trash { flex: none; background: #fff; font-size: 15px; padding: 4px 12px; }
.btn-trash.active { border-color: var(--red); color: var(--red); animation: breathe 1.2s ease-in-out infinite; }
#hand {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center;
  margin-top: 6px; min-height: 58px;
}
.hand-empty { color: #b3aa9a; font-size: 14px; }
.tile {
  position: relative;
  width: 58px; height: 58px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  touch-action: none;
  transition: transform 0.12s;
}
.tile .ch { font-size: 32px; line-height: 1; font-weight: 700; }
.tile .tag { position: absolute; left: 3px; top: 1px; font-size: 11px; line-height: 1; }
.tile .sub { position: absolute; left: 0; right: 0; bottom: 2px; font-size: 10px; line-height: 1; color: var(--ink-soft); }
.type-metal { background: #eee9da; } .type-metal .tag { color: #7a6428; }
.type-wood { background: #e3efdc; } .type-wood .tag { color: #3f7d4f; }
.type-water { background: #d8e9f8; } .type-water .tag { color: #2f6fb0; }
.type-fire { background: #fddcc6; } .type-fire .tag { color: #c2410c; }
.type-earth { background: #ecdfc6; } .type-earth .tag { color: #8a6a3d; }
.tile-paper { background: #fdfaf2; border-style: dashed; }
.tile-poem { background: linear-gradient(#fce9a6, #e7b643); }
.tile-poem .tag { padding: 0 3px; border-radius: 3px; background: var(--red); color: #fff; }
.tile.sel { outline: 3px solid var(--red); outline-offset: 1px; transform: translateY(-4px); }

/* 拖动时跟着手指走的那张牌 */
#ghost {
  position: fixed; z-index: 50; pointer-events: none;
  width: 58px; height: 58px; margin: -29px 0 0 -29px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--red); border-radius: 10px; background: #fff;
  font-size: 32px; font-weight: 700; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

/* ---------- 弹窗 ---------- */
#modal {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center; padding: 14px;
  background: rgba(30, 26, 20, 0.55);
}
/* 弹窗分两层：内容可以滚动，底下的按钮始终看得见 */
#modal-card {
  display: flex; flex-direction: column;
  width: 100%; max-width: 420px; max-height: 88vh; max-height: 88dvh; overflow: hidden;
  padding: 18px 16px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 16px;
  font-size: 16px; line-height: 1.55;
  -webkit-user-select: text; user-select: text;
}
#modal-card h2 { margin: 0 0 8px; font-size: 26px; text-align: center; letter-spacing: 0.08em; }
#modal-card h3 { margin: 14px 0 6px; font-size: 16px; color: var(--ink-soft); }
#modal-card .pop-kicker { margin: 0; text-align: center; color: var(--ink-soft); font-size: 14px; letter-spacing: 0.3em; }
.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.modal-actions { flex: none; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.modal-actions .btn { min-width: 120px; }

/* 诗将出阵 */
.hero-name { margin: 2px 0 6px !important; font-size: 40px !important; color: #8a5a00; }
.hero-line { margin: 4px 0; text-align: center; font-size: 19px; line-height: 1.6; }
.hero-line mark { background: #f3e3b5; color: inherit; padding: 0 1px; }
.hero-source { margin: 2px 0 8px; text-align: center; color: var(--ink-soft); font-size: 14px; }
.hero-skill { margin: 6px 0; padding: 8px 10px; border: 1.5px solid var(--gold); border-radius: 10px; background: #fdf2cf; text-align: center; }
.hero-note { margin: 6px 0 0; text-align: center; color: var(--ink-soft); font-size: 13px; }

/* 题库清单：一行诗（或一条成语）下面，左边是出处和今天练第几句，右边是「听一遍」 */
.pool-list { list-style: none; margin: 6px 0 0; padding: 0; }
.pool-list li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.pool-list li:last-child { border-bottom: 0; }
.pool-text { font-size: 18px; line-height: 1.6; }
.pool-src { margin-top: 2px; color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.pool-list .pool-src { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pool-list .pool-src > span { flex: 1 1 0; min-width: 0; }

/* ---------- 「听」的按钮：点一下放录好的录音（sfx.js），正在读的时候变红、一亮一灭 ---------- */
.spk { display: inline-flex; flex: none; width: 1em; height: 1em; }
.spk svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.spk .w { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }   /* 喇叭外面的两道声波 */
.speak {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex: none;
  padding: 4px 12px; border: 1.5px solid var(--red); border-radius: 14px;
  background: #fff; color: var(--red); font-size: 14px; line-height: 1.2;
}
.speak .spk { font-size: 16px; }
.speak:active { background: #f6d9d0; }
.speak.playing { background: var(--red); border-color: var(--red); color: #fff; animation: soundwave 0.9s ease-in-out infinite alternate; }
.speak.playing:active { background: #8f1d17; }
/* 只有一个喇叭的小圆钮（打完的清单里，每句前面一个） */
.speak.round { width: 26px; height: 26px; padding: 0; border-radius: 50%; border-color: var(--ink); color: var(--ink); }
.speak.round.playing { border-color: var(--red); }
.say-row { display: flex; justify-content: center; margin: 8px 0; }   /* 弹窗里单独一行的「听一遍」 */
/* 书卷上的提示：整块都是一个「听」的按钮，点字和点小喇叭都行。字还是提示原来的样子（灰字、没有框），
 * 小喇叭是一个骑在书卷左边框上的小圆钮。听的是上一句（或者成语的意思）。这几行要写在 .speak 后面才盖得住它 */
.speak-cue {
  position: relative; display: block; flex: 1 1 0; min-width: 0;
  margin-left: -21px; padding: 0 0 0 21px;      /* 按钮的框往左扩出去，把小喇叭也框进来：点小喇叭才算点到了它 */
  border: 0; border-radius: 0; background: none;
  color: var(--ink-soft); font-size: 12px; line-height: 1.3; text-align: left;
}
.speak-cue::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; bottom: -12px; }   /* 手指好点：上下也多算一点 */
.speak-cue .cue-text { display: block; max-height: 2.6em; overflow: hidden; }
.speak-cue .spk {
  position: absolute; left: 0; top: 50%; margin-top: -10px;
  width: 20px; height: 20px; padding: 3px; border: 1.5px solid var(--ink); border-radius: 50%;
  background: var(--paper-2); color: var(--ink); pointer-events: none;
}
.speak-cue:active { background: none; }
.speak-cue:active .spk { background: #f6d9d0; }
.speak-cue.playing { animation: none; background: none; color: var(--ink-soft); }
.speak-cue.playing .spk { background: var(--red); border-color: var(--red); color: #fff; animation: soundwave 0.9s ease-in-out infinite alternate; }
.howto-mini { margin: 0; padding: 8px 10px; border-left: 3px solid var(--gold); background: #fbf3d6; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }

/* 三选一 */
.cloze-cue { margin: 0 0 8px; color: var(--ink-soft); font-size: 14px; line-height: 1.4; }
.cloze-boxes { display: flex; justify-content: center; gap: 5px; margin: 6px 0 14px; flex-wrap: wrap; }
.cloze-boxes span {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #9a8f7c; border-radius: 6px; background: #fffdf6; font-size: 24px;
}
.cloze-boxes span.filled { background: #f3e3b5; border-color: var(--ink); }
.cloze-boxes span.ask { border: 2px solid var(--red); color: var(--red); }
.cloze-opts { display: flex; justify-content: center; gap: 12px; }
.cloze-opts button {
  width: 76px; height: 76px; padding: 0;
  border: 2px solid var(--ink); border-radius: 14px; background: #fff; font-size: 42px; font-weight: 700;
}
.cloze-opts button:active { background: #f3e3b5; }
.answer-wrong { margin: 10px 0 4px; text-align: center; font-size: 17px; color: var(--red); }

/* 选一句 */
.choose-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.choose-list button { text-align: left; font-size: 16px; line-height: 1.4; }
/* 每一句后面跟着一个「听上一句」 */
.choose-item { display: flex; align-items: center; gap: 8px; }
.choose-item .btn { flex: 1 1 0; min-width: 0; }

/* ---------- 每波打完的小问答和增益 ---------- */
#modal-card .quiz-q { margin: 2px 0 4px; font-size: 21px !important; line-height: 1.5; text-align: left !important; letter-spacing: 0; }
.quiz-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.quiz-opts button, .buff-list button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  font-size: 17px;
  line-height: 1.45;
  text-align: left;
}
.quiz-opts button:active, .buff-list button:active { background: #f3e3b5; }
.quiz-tools { margin-top: 12px; text-align: center; }
.quiz-tools button {
  padding: 4px 10px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
}
.answer-right { margin: 8px 0 4px; text-align: center; font-size: 19px; color: #2f7d4f; }
.quiz-note { margin: 6px 0; text-align: center; font-size: 15px; color: var(--ink-soft); line-height: 1.5; }
.buff-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.buff-list b { display: block; font-size: 19px; }
.buff-list span { color: var(--ink-soft); font-size: 14px; }

/* ---------- 诗集图鉴 ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 4px 0 8px; font-size: 13px; color: var(--ink-soft); }
.cards h4 { margin: 12px 0 2px; font-size: 17px; }
.cards .poem { margin-top: 8px; }
.cards .poem-head { font-size: 16px; }
.cards .poem-head small { margin-left: 6px; color: var(--ink-soft); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.chip {
  padding: 2px 7px;
  border: 1.5px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #b3aa9e;
  font-size: 14px;
  line-height: 1.5;
}
.chip.s-self { border-color: #2f7d4f; color: #2f7d4f; background: #eaf6ec; }
.chip.s-choice { border-color: #2f7d4f; color: var(--ink); background: #f3f8f3; }
.chip.s-hint { border-color: var(--gold); color: #7a5c00; background: #fdf2cf; }
.chip.s-seen { border-color: #9a8f7c; color: var(--ink-soft); }

/* ---------- 对战结算 ---------- */
.vs { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 15px; }
.vs th, .vs td { padding: 5px 6px; border-bottom: 1px dashed var(--line); text-align: center; }
.vs td:first-child { text-align: left; color: var(--ink-soft); }
.vs th.me { color: var(--red); }
.vs .on { color: var(--red); }
.vs .off { color: #c9bfae; }

/* 结算学情 */
.report { list-style: none; margin: 6px 0 0; padding: 0; font-size: 15px; }
.report li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.report li:last-child { border-bottom: 0; }
/* 喇叭、勾、句子是一家，永远挨在一起 */
.report-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.report .speak { align-self: center; }   /* 每句前面的小喇叭：听这一句（成语连意思） */
.report .ic { flex: none; width: 18px; text-align: center; }
.report .txt { flex: 1 1 auto; min-width: 0; font-size: 17px; }
.report .txt small { white-space: nowrap; }   /* 诗题放不下就整个挪到下一行，不在题目中间断开 */
/* 屏幕窄、一行放不下的时候，"练得怎么样"自己挪到第二行去（靠右），不让句子被挤得七零八落 */
.report .how { flex: none; margin-left: auto; color: var(--ink-soft); font-size: 13px; line-height: 1.4; }
.report li.good .ic { color: #2f7d4f; }
.report li.mid .ic { color: var(--gold); }

/* ---------- 动画 ---------- */
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes hint { 0%, 100% { background: #fff6d0; } 50% { background: #f6c945; } }
@keyframes soundwave { from { opacity: 0.5; } to { opacity: 1; } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
