/* ============================================================
   法考百题砍
   百词斩式单卡界面：一次一张 / 全内容直出 / 左右滑动即记录（左未掌握 · 右掌握），模糊点底部小按钮
   ============================================================ */

:root {
  --paper: #f7f5ef;
  --paper-deep: #efece3;
  --surface: #fffefa;
  --surface-2: #fbfaf6;
  --ink: #22262b;
  --ink-2: #4d545c;
  --muted: #7c838c;
  --faint: #a7adb4;
  --line: #e5e1d7;
  --line-strong: #d6d0c2;
  --accent: #175e54;
  --accent-2: #2d7a6d;
  --accent-soft: #e8f1ed;
  --blue: #2c5f9e;
  --blue-soft: #edf3fa;
  --green: #24734f;
  --green-soft: #edf6f1;
  --amber: #9a6418;
  --amber-soft: #fbf3e4;
  --rose: #9d4b5d;
  --rose-soft: #faeef1;
  --violet: #6a4e8e;
  --violet-soft: #f3eef9;
  --slate: #56616e;
  --slate-soft: #eef1f4;
  --shadow: 0 1px 2px rgba(34, 38, 43, .04), 0 10px 28px rgba(34, 38, 43, .035);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", SimSun, serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button { cursor: pointer; }

a { color: var(--accent); text-decoration: none; }

button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(23, 94, 84, .55);
  outline-offset: 2px;
}

::selection { background: rgba(23, 94, 84, .16); }

.wrap {
  width: min(1080px, calc(100% - 48px));
  margin-inline: auto;
}

.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  transform: translateY(-160%);
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
}
.skip-link:focus { transform: translateY(0); }

/* ---------------- Topbar ---------------- */

.topbar { padding: 16px 0 8px; }

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* 刷题中收起顶部品牌栏：卡片区一出现，这行的高度就让给卡片。
   故意不用 display:none / .hidden —— h1 站名要留在 DOM 和无障碍树里（SEO 与读屏照读），
   只是视觉上收合：高度与内边距归零，子元素被 overflow 裁掉。
   特异性 body.studying .topbar 压得住窄屏媒体查询里的 .topbar 内边距覆盖。 */
body.studying .topbar {
  height: 0;
  padding: 0;
  overflow: hidden;
}

.brand {
  margin: 0;
  flex: none;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.2;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
}

.brand-beta {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(146, 96, 12, .32);
  border-radius: 999px;
  background: rgba(234, 179, 8, .14);
  color: #8a5c0a;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .5px;
}

.brand-free {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(36, 115, 79, .28);
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1;
}

.brand-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}

/* ---------------- Filters (moved into the bottom dock) ---------------- */

.select {
  flex: none;
  min-width: 0;
  height: 32px;
  padding: 0 28px 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%237c838c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  color: var(--ink-2);
  font-size: 12px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.select:focus { border-color: rgba(23, 94, 84, .45); box-shadow: 0 0 0 3px rgba(23, 94, 84, .08); }
.select:disabled { opacity: .55; cursor: not-allowed; }
.select-chapter { flex: 1 1 auto; max-width: 380px; }
.select-type { width: 126px; }
.select-mark { width: 106px; }

.dock-drill {
  flex: none;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(23, 94, 84, .22);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.dock-drill:hover { border-color: rgba(23, 94, 84, .4); background: #dfeae5; }
.dock-drill.is-active { border-color: var(--accent); background: var(--accent); color: #fff; }

/* 到期复习：与百题斩并列，角标是到期题数；百题斩进行中置灰提示先走簇内回刷池 */
.dock-review {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(106, 78, 142, .24);
  border-radius: 9px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.dock-review b { font-size: 13px; font-variant-numeric: tabular-nums; }
.dock-review:hover { border-color: rgba(106, 78, 142, .45); background: #ece3f7; }
.dock-review.has-due { border-color: rgba(106, 78, 142, .5); }
.dock-review.is-active { border-color: var(--violet); background: var(--violet); color: #fff; }
.dock-review.is-active b { color: #fff; }
.dock-review.is-muted { opacity: .5; }

/* 百题斩进度条：贴在卡片上方，显示周期/簇/题号与本簇输出卡入口 */
.drill-bar {
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid rgba(23, 94, 84, .18);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 11px;
}
.drill-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.drill-exit {
  height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
}
.drill-exit:hover { border-color: var(--line-strong); color: var(--ink-2); }
.drill-cycle { color: var(--accent); font-weight: 700; letter-spacing: .01em; }
.drill-pos { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.drill-main { min-width: 0; margin-top: 5px; }
.drill-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.drill-why { flex: 1 1 100%; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.drill-done { color: var(--green); font-size: 10.5px; font-weight: 700; }
.drill-acts { margin-top: 6px; gap: 5px; }
.drill-acts button {
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 10.5px;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.drill-acts button:hover:not(:disabled) { border-color: rgba(23, 94, 84, .35); color: var(--accent); }
.drill-acts button:disabled { opacity: .42; cursor: not-allowed; }
.drill-acts button.is-on { border-color: var(--accent); background: var(--accent); color: #fff; }

/* ---------------- Content / Deck ---------------- */

.content {
  padding: 4px 0 40px;
  /* 卡片区占满一整屏：把页面下方那段可索引的说明文字顶到折叠线以下，首屏仍然只有一张卡。
     顶部现在只剩品牌一行，所以减掉的高度比原来（品牌 + 筛选行）小一截。 */
  min-height: calc(100vh - 62px);
  min-height: calc(100dvh - 62px);
}

.deck {
  width: min(920px, 100%);
  margin: 0 auto;
}

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 2px 9px;
  color: var(--muted);
  font-size: 11px;
}

.stage-context {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stage-position {
  flex: none;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.stage-position b {
  margin-right: 2px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
}

.stage {
  touch-action: pan-y;
  perspective: 1000px;
}

.stage-card {
  width: 100%;
  transform-origin: 50% 100%;
}

.stage-card.slide-next { animation: stageInNext .24s cubic-bezier(.22, .8, .32, 1) both; }
.stage-card.slide-prev { animation: stageInPrev .24s cubic-bezier(.22, .8, .32, 1) both; }
.stage-card.slide-in { animation: stageIn .2s ease both; }

@keyframes stageInNext {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes stageInPrev {
  from { opacity: 0; transform: translateX(-28px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes stageIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- Card ---------------- */

.card {
  --type: var(--slate);
  --type-soft: var(--slate-soft);
  position: relative;
  padding: 22px 26px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--type);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 2px 4px rgba(34, 38, 43, .045), 0 18px 44px rgba(34, 38, 43, .055);
  overflow-wrap: anywhere;
  transform-origin: 50% 100%;
  will-change: transform, opacity, box-shadow;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

@media (hover: hover) and (pointer: fine) {
  .stage-card .card { cursor: grab; }
  .stage-card .card:active { cursor: grabbing; }
}

/* 物理按压下沉态与拖拽悬浮态 */
.card.is-pressed {
  transform: scale(0.988);
  box-shadow: 0 1px 2px rgba(34, 38, 43, .06), 0 8px 18px rgba(34, 38, 43, .04);
  transition: transform .12s cubic-bezier(.2, .8, .3, 1), box-shadow .12s ease;
}

.card.is-dragging {
  box-shadow: 0 8px 24px rgba(34, 38, 43, .12), 0 24px 56px rgba(34, 38, 43, .09);
  transition: box-shadow .15s ease;
}

.card.animating {
  transition: transform .28s cubic-bezier(.18, .89, .32, 1.15), opacity .22s ease, box-shadow .22s ease;
}

.card.fly-right {
  transform: translate3d(120%, 0, 0) rotate(14deg) !important;
  opacity: 0 !important;
  transition: transform .22s ease-in, opacity .2s ease-in !important;
}

.card.fly-left {
  transform: translate3d(-120%, 0, 0) rotate(-14deg) !important;
  opacity: 0 !important;
  transition: transform .22s ease-in, opacity .2s ease-in !important;
}

.card.fly-up {
  transform: translate3d(0, -65px, 0) scale(0.96) !important;
  opacity: 0 !important;
  transition: transform .2s ease-in, opacity .18s ease-in !important;
}



.card.type-examPoint { --type: var(--blue); --type-soft: var(--blue-soft); }
.card.type-judgment { --type: var(--accent); --type-soft: var(--accent-soft); }
.card.type-compare { --type: var(--violet); --type-soft: var(--violet-soft); }
.card.type-caseCard { --type: var(--rose); --type-soft: var(--rose-soft); }
.card.type-statuteHook { --type: var(--amber); --type-soft: var(--amber-soft); }
.card.type-fact { --type: var(--slate); --type-soft: var(--slate-soft); }
.card.type-example { --type: var(--green); --type-soft: var(--green-soft); }
.card.type-note { --type: var(--amber); --type-soft: var(--amber-soft); }
.card.type-mnemonic { --type: var(--violet); --type-soft: var(--violet-soft); }
.card.type-story { --type: var(--rose); --type-soft: var(--rose-soft); }
.card.type-knowledge { --type: var(--slate); --type-soft: var(--slate-soft); }
.card.type-reference { --type: var(--slate); --type-soft: var(--slate-soft); }
.ref-callout .ref-note { margin: 7px 0 0; color: var(--faint); font-size: 10px; line-height: 1.6; }
.foot-ref { min-width: 0; }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.card-badges { display: flex; align-items: center; gap: 8px; min-width: 0; }

.card-state { display: flex; align-items: center; gap: 6px; flex: none; }

/* 等级与到期：L0 卡壳 / L1 困难 / L2 模糊 / L3 掌握 / L4 熟练 / L5 稳固 */
.srs-chip {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.srs-chip.is-new { color: var(--faint); }
.srs-chip.srs-l4,
.srs-chip.srs-l5 {
  border-color: rgba(106, 78, 142, .22);
  background: var(--violet-soft);
  color: var(--violet);
}
.srs-chip.is-due {
  border-color: rgba(157, 75, 93, .3);
  background: var(--rose-soft);
  color: var(--rose);
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--type-soft);
  color: var(--type);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

.card-seq {
  color: var(--faint);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .05em;
}

.mark-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.mark-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}
.mark-chip.state-1 { border-color: rgba(157, 75, 93, .26); background: var(--rose-soft); color: var(--rose); }
.mark-chip.state-1 .mark-dot { background: var(--rose); }
.mark-chip.state-2 { border-color: rgba(154, 100, 24, .26); background: var(--amber-soft); color: var(--amber); }
.mark-chip.state-2 .mark-dot { background: var(--amber); }
.mark-chip.state-3 { border-color: rgba(36, 115, 79, .26); background: var(--green-soft); color: var(--green); }
.mark-chip.state-3 .mark-dot { background: var(--green); }

.card-title {
  margin: 13px 0 0;
  color: var(--ink);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 650;
  line-height: 1.62;
  letter-spacing: -.008em;
  overflow-wrap: anywhere;
}
.card.type-story .card-title { font-weight: 550; line-height: 1.82; }
/* 字号按内容长度定档（js/app.js 的 titleClass）：同长度的题面在每张卡上一样大。
   题干与长正面（中位 90 字上下）落正文号，短标题才用大号。 */
.card-title.title-mid { font-size: clamp(16px, 1.7vw, 18px); font-weight: 620; line-height: 1.72; }
.card-title.title-long,
.card-title.title-stem {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.8;
  letter-spacing: 0;
}

.card-sub {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

/* options */

.options {
  display: grid;
  gap: 7px;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}
.option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.65;
}
.opt-label {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex: none;
  margin-top: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
}
.opt-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.opt-tick {
  flex: none;
  margin-top: 2px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
}
.option.correct {
  border-color: rgba(36, 115, 79, .32);
  background: var(--green-soft);
  color: #1e5c40;
}
.option.correct .opt-label {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
.option.correct .opt-tick { opacity: 1; }

.answer-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-size: 12.5px;
}
.answer-tag {
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--ink);
  color: var(--paper);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
}
.answer-letters {
  color: var(--green);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .06em;
}
.answer-text { color: var(--muted); }

/* analysis + points */

.analysis {
  display: flex;
  gap: 10px;
  margin-top: 13px;
  padding: 11px 13px;
  border-radius: 9px;
  background: rgba(23, 94, 84, .045);
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.8;
}
.analysis-tag {
  flex: none;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(23, 94, 84, .1);
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .05em;
}
.analysis-body { flex: 1; min-width: 0; }
.analysis p { margin: 0; overflow-wrap: anywhere; }
.analysis p + p { margin-top: 7px; }

.points {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 13.8px;
  line-height: 1.8;
}
.points li {
  position: relative;
  padding-left: 15px;
  overflow-wrap: anywhere;
}
.points li + li { margin-top: 3px; }
.points li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: .72em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--type);
  opacity: .55;
}

.points-callout {
  margin-top: 13px;
  padding: 11px 13px;
  border: 1px solid rgba(106, 78, 142, .16);
  border-radius: 10px;
  background: var(--violet-soft);
}
.points-callout .callout-label {
  display: block;
  margin-bottom: 4px;
  color: var(--violet);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
}
.points-callout .points { margin-top: 0; }

/* tips */

.tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.75;
}
.tip-label {
  flex: none;
  padding-top: 2px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .05em;
}
.tip-warn { background: var(--amber-soft); color: #7a5216; }
.tip-warn .tip-label { color: var(--amber); }
.tip-info { background: var(--blue-soft); color: #31567f; }
.tip-info .tip-label { color: var(--blue); }
.tip-muted { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line); }
.tip-muted .tip-label { color: var(--faint); }

.card-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 15px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
  color: var(--faint);
  font-size: 10.5px;
}
.foot-chapter {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--type-soft);
  color: var(--type);
  font-weight: 600;
}
.foot-tags { min-width: 0; overflow-wrap: anywhere; }
.foot-anchor {
  flex-basis: 100%;
  min-width: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.foot-anchor b {
  margin-right: 4px;
  color: var(--accent);
  font-weight: 600;
}
.foot-anchor .sep { margin: 0 7px; color: var(--line-strong); }
.foot-diff { display: flex; align-items: center; gap: 3px; margin-left: auto; }
.foot-diff i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
}
.foot-diff i.on { background: var(--type); opacity: .65; }

/* ---------------- Empty ---------------- */

.empty-state {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 68px 20px 76px;
  text-align: center;
}
.empty-mark {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin: 0 auto 18px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--faint);
  font-family: var(--font-serif);
  font-size: 30px;
}
.empty-state h2 { margin: 0 0 8px; font-size: 21px; }
.empty-state p { margin: 0 0 20px; color: var(--muted); font-size: 13.5px; }

.btn {
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  transition: border-color .16s ease, background .16s ease;
}
.btn:hover { border-color: var(--ink-2); }
.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #124d45; border-color: #124d45; }

/* ---------------- Footer ---------------- */

.footer {
  padding: 18px 0 calc(150px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
}
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
/* 页脚是淡灰底、说明区是正文灰，链接都靠 accent 绿 + 细下划线拉出来，不靠 hover 才显形。 */
.footer a,
.notes a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(23, 94, 84, .3);
}
.footer a:hover,
.notes a:hover { border-bottom-color: var(--accent); }

/* ---------------- Notes（可被爬虫读到的正文） ---------------- */

.notes {
  padding: 22px 0 6px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.85;
}
.notes h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.01em;
}
.notes h3 {
  margin: 15px 0 3px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
}
.notes p { margin: 0 0 9px; }
.notes strong { color: var(--ink); font-weight: 650; }
.notes code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-2);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
}
.notes-keys {
  margin: 0;
  padding: 0;
  list-style: none;
}
.notes-keys li {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 6px;
}
.notes-keys li > span {
  flex: none;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--slate-soft);
  color: var(--slate);
  font-size: 11px;
  font-weight: 600;
}
/* 说明文字必须包在 .nk-body 里：li 是 flex，裸文字会被拆成一堆不折行的 flex item，
   在 390px 下直接把 <kbd> 顶出屏幕右侧。 */
.notes-keys .nk-body {
  flex: 1 1 auto;
  min-width: 0;
}
.notes kbd {
  display: inline-block;
  min-width: 17px;
  margin: 0 1px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}
.notes details {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
}
.notes summary {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  list-style: none;
}
.notes summary::-webkit-details-marker { display: none; }
.notes summary::before {
  content: '+';
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}
.notes details[open] summary { margin-bottom: 8px; }
.notes details[open] summary::before { content: '−'; }
.notes-chips { color: var(--muted); font-size: 12.5px; }

/* ---------------- Fixed deck dock ---------------- */

.deck-dock {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 90;
  width: min(560px, calc(100% - 24px));
  transform: translateX(-50%);
  border: 1px solid rgba(214, 208, 194, .9);
  border-radius: 14px;
  background: rgba(255, 254, 250, .95);
  box-shadow: 0 10px 30px rgba(34, 38, 43, .12), 0 2px 6px rgba(34, 38, 43, .04);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  overflow: hidden;
}

/* 三个筛选器从顶部搬到这里：改条件的手就落在切卡按钮旁边，顶部只留品牌一行。 */
.dock-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 6px 0;
}

.dock-inner {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 6px;
  padding: 6px;
}

.dock-nav {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font-size: 17px;
  transition: background .16s ease, color .16s ease;
}
.dock-nav:hover:not(:disabled) { background: var(--surface-2); color: var(--accent); }
.dock-nav:disabled { opacity: .3; cursor: not-allowed; }
.dock-arrow { line-height: 1; }

.dock-milestone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(23, 94, 84, .2);
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease;
}
.dock-milestone:hover { background: #dfeae5; border-color: rgba(23, 94, 84, .34); }
.dock-milestone b {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dock-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.dock-vague {
  flex: none;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(154, 100, 24, .28);
  border-radius: 9px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease;
}
.dock-vague:hover { background: #f5e8cf; border-color: rgba(154, 100, 24, .42); }

.dock-hint {
  margin: 0;
  padding: 6px 8px 7px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}
.dock-hint kbd {
  display: inline-block;
  min-width: 15px;
  padding: 0 3px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 9.5px;
  line-height: 13px;
  text-align: center;
}
/* 触屏只说滑动，键盘提示留给真有键盘的桌面；pointer:fine 排掉了带触屏的笔记本以外的手机平板。 */
.hint-kb { display: none; }

@media (hover: hover) and (pointer: fine) {
  .hint-kb { display: inline; }
  .hint-touch { display: none; }
  .dock-vague::after { content: '↑'; margin-left: 5px; opacity: .5; font-size: 10px; }
}
.dock-hint kbd {
  display: inline-block;
  min-width: 15px;
  padding: 0 3px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 9.5px;
  line-height: 13px;
  text-align: center;
}
/* 触屏只说滑动，键盘提示留给真有键盘的桌面；pointer:fine 排掉了带触屏的笔记本以外的手机平板。 */
.hint-kb { display: none; }

@media (hover: hover) and (pointer: fine) {
  .hint-kb { display: inline; }
  .hint-touch { display: none; }
  .dock-vague::after { content: '↑'; margin-left: 5px; opacity: .5; font-size: 10px; }
}

/* ---------------- First-run tutorial ---------------- */

.tutorial {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.tutorial-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 38, 43, .52);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.tutorial-card {
  position: relative;
  width: min(400px, 100%);
  padding: 18px 20px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(34, 38, 43, .28);
  animation: tuIn .2s cubic-bezier(.22, .8, .32, 1) both;
}
@keyframes tuIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.tutorial-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.01em;
}
.tutorial-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tutorial-list li {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-size: 13px;
}
.tu-key {
  flex: none;
  min-width: 66px;
  color: var(--accent);
  font-weight: 650;
}
.tu-body { color: var(--ink-2); }
/* 要写成 .tutorial-list .tu-kb：单写 .tu-kb 会被上面 .tutorial-list li 的 display:flex 压过，触屏关不掉这行。
   这条媒体查询也必须留在基础规则之后——同特异性下靠源序决胜，放前面会被自己盖掉。 */
.tutorial-list .tu-kb { display: none; }
@media (hover: hover) and (pointer: fine) {
  .tutorial-list .tu-kb { display: flex; }
}
.tutorial-note { margin: 12px 0 14px; color: var(--muted); font-size: 11.5px; }
.tutorial-close {
  width: 100%;
  height: 38px;
  border: 1px solid rgba(23, 94, 84, .24);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
.tutorial-close:hover { background: #dfeae5; border-color: rgba(23, 94, 84, .34); }
.tutorial-close b { font-variant-numeric: tabular-nums; }

/* ---------------- Milestone panel ---------------- */

.milestone {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.milestone-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 38, 43, .34);
}
.milestone-card {
  position: relative;
  width: min(420px, 100%);
  max-height: min(78vh, 540px);
  overflow-y: auto;
  padding: 16px 18px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(34, 38, 43, .22);
  animation: msIn .18s cubic-bezier(.22, .8, .32, 1) both;
}
@keyframes msIn {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.milestone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.milestone-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -.01em;
}
.milestone-close {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  transition: background .16s ease, color .16s ease;
}
.milestone-close:hover { background: var(--paper-deep); color: var(--ink); }

.milestone-body { margin-top: 13px; }
.ms-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
}
.ms-total b {
  color: var(--accent);
  font-size: 33px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ms-total span { color: var(--muted); font-size: 12px; }
.ms-split { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.ms-part {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--slate-soft);
  color: var(--ink-2);
  font-size: 11px;
}
.ms-part b { font-weight: 700; font-variant-numeric: tabular-nums; }
.ms-part.state-3 { background: var(--green-soft); color: var(--green); }
.ms-part.state-2 { background: var(--amber-soft); color: var(--amber); }
.ms-part.state-1 { background: var(--rose-soft); color: var(--rose); }
.ms-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.ms-days {
  display: grid;
  gap: 5px;
  margin: 13px 0 0;
  padding: 12px 0 2px;
  border-top: 1px solid var(--line);
  list-style: none;
}
.ms-day {
  display: grid;
  grid-template-columns: 40px 1fr 30px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.ms-day.today { color: var(--ink); font-weight: 600; }
.ms-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--paper-deep);
  overflow: hidden;
}
.ms-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent-2);
  transition: width .2s ease;
}
.ms-day.today .ms-bar i { background: var(--accent); }
.ms-num { text-align: right; }
.milestone-foot {
  margin: 12px 0 0;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 10.5px;
}

/* ---------------- Drill panel (百题斩) ---------------- */

.drill-panel { z-index: 150; }
.drill-card { width: min(560px, 100%); max-height: min(86vh, 720px); }
.drill-body { margin-top: 12px; }
.drill-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.drill-sum { margin: 6px 0 0; color: var(--faint); font-size: 10.5px; line-height: 1.6; }
.drill-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.drill-tab {
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10.5px;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.drill-tab:hover { border-color: var(--line-strong); color: var(--ink-2); }
.drill-tab.is-on { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 600; }
.drill-list { display: grid; gap: 7px; margin-top: 9px; }
.drill-cycle { border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); overflow: hidden; }
.drill-cycle summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
}
.drill-cycle summary::-webkit-details-marker { display: none; }
.drill-ctitle { color: var(--ink); font-size: 11.5px; font-weight: 650; }
.drill-cmeta { color: var(--faint); font-size: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.drill-cbody { padding: 0 8px 8px; }
.drill-all {
  width: 100%;
  height: 28px;
  margin: 0 0 6px;
  border: 1px dashed rgba(23, 94, 84, .35);
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}
.drill-all:hover { background: #dfeae5; }
.drill-clusters { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.drill-cluster-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2px 8px;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--surface);
}
.drill-cluster-row.is-current { border-color: rgba(23, 94, 84, .35); background: var(--accent-soft); }
.drill-cluster-row.is-done .drill-cname { color: var(--muted); }
.drill-go {
  grid-row: span 2;
  height: 26px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
}
.drill-go:hover { background: #dfeae5; }
.drill-cname {
  overflow: hidden;
  color: var(--ink-2);
  font-size: 10.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.drill-cname em { color: var(--faint); font-style: normal; }
.drill-tick { margin-left: 4px; color: var(--green); }
.drill-slots { display: flex; flex-wrap: wrap; gap: 4px; }
.drill-slots i {
  padding: 0 5px;
  border-radius: 4px;
  font-size: 9px;
  font-style: normal;
  line-height: 16px;
}
.drill-slots i.on { background: var(--green-soft); color: var(--green); }
.drill-slots i.off { background: var(--paper-deep); color: var(--faint); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(126px + env(safe-area-inset-bottom));
  z-index: 110;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(34, 38, 43, .94);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ---------------- Responsive ---------------- */

@media (max-width: 980px) {
  .select-chapter { max-width: none; }
}

@media (max-width: 680px) {
  .wrap { width: calc(100% - 24px); }
  .topbar { padding: 12px 0 6px; }
  .topbar-inner { gap: 12px; }
  .brand-link { gap: 7px; }
  .brand-mark { width: 27px; height: 27px; border-radius: 8px; font-size: 15px; }
  .brand-name { font-size: 14px; }
  .select {
    height: 30px;
    padding: 0 24px 0 9px;
    background-position: right 8px center;
    font-size: 11.5px;
  }
  .select-chapter { max-width: none; }
  .select-type { width: 98px; }
  .select-mark { width: 90px; }
  .dock-drill { height: 30px; padding: 0 8px; font-size: 11px; }

  .drill-bar { padding: 7px 8px; }
  .drill-title { font-size: 11.5px; }
  .drill-acts button { height: 25px; padding: 0 7px; }
  .drill-card { padding: 14px 12px 10px; }
  .drill-cycle summary { flex-wrap: wrap; gap: 2px 8px; }

  .content { padding: 2px 0 24px; min-height: calc(100dvh - 52px); }
  .stage-head { margin-bottom: 7px; font-size: 10px; }
  .stage-position b { font-size: 11.5px; }

  .card { padding: 14px 14px 13px; border-radius: 13px; border-left-width: 4px; }
  .card-top { gap: 8px; }
  .card-badges { gap: 6px; }
  .badge { height: 20px; padding: 0 6px; font-size: 9.5px; }
  .card-seq { font-size: 9.5px; }
  .mark-chip { height: 21px; padding: 0 7px; font-size: 9.5px; }
  .card-state { gap: 4px; }
  .srs-chip { height: 21px; padding: 0 6px; font-size: 9px; }

  .card-title { margin-top: 10px; font-size: 17px; line-height: 1.68; }
  .card-title.title-mid { font-size: 16px; }
  .card-title.title-long,
  .card-title.title-stem { font-size: 14.5px; line-height: 1.78; }
  .card-sub { font-size: 11.5px; }
  .options { margin-top: 12px; gap: 6px; }
  .option { gap: 8px; padding: 8px 9px; font-size: 13px; }
  .opt-label { width: 21px; height: 21px; font-size: 9.5px; }
  .answer-row { margin-top: 10px; font-size: 11.5px; }
  .answer-letters { font-size: 14px; }
  .analysis { gap: 8px; margin-top: 11px; padding: 9px 10px; font-size: 12.5px; }
  .points { margin-top: 10px; font-size: 13px; }
  .points-callout { padding: 9px 10px; }
  .tip { gap: 7px; padding: 7px 9px; font-size: 11.5px; }
  .card-foot { gap: 4px 9px; margin-top: 11px; padding-top: 8px; font-size: 9.5px; }
  .foot-diff { margin-left: 0; }

  .empty-state { padding: 58px 16px 64px; }
  .footer { padding: 14px 0 calc(138px + env(safe-area-inset-bottom)); }
  .footer-inner { justify-content: center; }

  .deck-dock {
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: calc(100% - 24px);
    border-radius: 12px;
  }
  .dock-filters { gap: 5px; padding: 5px 5px 0; }
  .dock-inner { grid-template-columns: 40px 1fr 40px; gap: 4px; padding: 5px; }
  /* 手机端三颗按钮都抬到 38px：拇指落点，比桌面的 36px 再大一档。 */
  .dock-nav { width: 40px; height: 38px; font-size: 16px; }
  .dock-milestone { height: 38px; padding: 0 8px; font-size: 11px; }
  .dock-milestone b { font-size: 13px; }
  .dock-review { height: 38px; padding: 0 8px; font-size: 11px; }
  .dock-review b { font-size: 13px; }
  .dock-mid { gap: 5px; }
  .dock-vague { height: 38px; padding: 0 9px; font-size: 11px; }
  .dock-hint { padding: 5px 6px 6px; font-size: 9.5px; }
  .milestone-card { padding: 14px 15px 11px; }
  .ms-total b { font-size: 29px; }
  .toast { bottom: calc(112px + env(safe-area-inset-bottom)); font-size: 12px; }
}

@media (max-width: 380px) {
  .brand-name { display: none; }
  .select-type { width: 88px; }
  .select-mark { width: 82px; }
  .dock-drill { padding: 0 6px; font-size: 10.5px; }
  .dock-review { padding: 0 6px; font-size: 10.5px; }
  .dock-inner { grid-template-columns: 36px minmax(0, 1fr) 36px; }
  .dock-nav { width: 36px; }
  .tutorial-card { padding: 15px 16px 14px; }
  .tutorial-list li { font-size: 12.5px; }
  .tu-key { min-width: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

@media print {
  body { background: #fff; }
  .topbar,
  .empty-state,
  .footer,
  .deck-dock,
  .milestone,
  .drill-panel,
  .drill-bar,
  .tutorial,
  .toast,
  .notes,
  .skip-link { display: none !important; }
  .content { padding: 0; min-height: 0; }
  .deck { width: 100%; }
  .stage-head { margin-bottom: 10px; }
  .card.fly-right, .card.fly-left, .card.fly-up, .card.animating { transition: none !important; transform: none !important; }
  .card { break-inside: avoid; box-shadow: none; }
}

/* ---------------- 居中操作反馈闪现提示（高端磨砂微胶囊，默认完全物理隐藏，操作时弹跳闪现） ---------------- */

.action-flash {
  position: fixed;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.75);
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 124px;
  height: 48px;
  padding: 0 20px 0 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  opacity: 0;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .28), 0 2px 8px rgba(0, 0, 0, .14);
  backdrop-filter: blur(20px) saturate(1.25);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  will-change: transform, opacity;
}

.action-flash-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  color: #fff;
}

.action-flash-text {
  line-height: 1;
}

/* 已掌握：翡翠森林质感微光 */
.action-flash.flash-known {
  background: rgba(18, 70, 42, .92);
  border: 1.5px solid rgba(74, 222, 128, .5);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .28), 0 0 20px rgba(34, 197, 94, .35);
}
.action-flash.flash-known .action-flash-icon {
  background: #16a34a;
}

/* 未掌握：绯红浆果质感微光 */
.action-flash.flash-unknown {
  background: rgba(120, 20, 40, .92);
  border: 1.5px solid rgba(251, 113, 133, .5);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .28), 0 0 20px rgba(244, 63, 94, .35);
}
.action-flash.flash-unknown .action-flash-icon {
  background: #e11d48;
}

/* 记模糊：琥珀蜜蜡质感微光 */
.action-flash.flash-vague {
  background: rgba(125, 60, 10, .92);
  border: 1.5px solid rgba(251, 191, 36, .5);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .28), 0 0 20px rgba(245, 158, 11, .35);
}
.action-flash.flash-vague .action-flash-icon {
  background: #d97706;
}

/* 闪现动画：从中心弹性爆开弹起，停顿展示后自然溶解散去 */
.action-flash.flash-animating {
  display: inline-flex !important;
  animation: actionFlashPop .42s cubic-bezier(.16, 1, .3, 1) forwards;
}

@keyframes actionFlashPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.68);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
  }
}

/* 手势拖拽中跟随提示 */
.action-flash.is-dragging-hint {
  display: inline-flex !important;
  transition: opacity .06s linear, transform .06s linear;
}
