/* ===========================================================
   一页纸 · 政治闪卡  |  样式表
   =========================================================== */

:root{
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC",
               system-ui, -apple-system, "Segoe UI", sans-serif;
  --paper: #f4efe6;
  --paper-2: #faf6ee;
  --ink: #1f1b18;
  --ink-2: #4b4239;
  --ink-3: #8c8076;
  --line: rgba(31,27,24,.10);
  --line-strong: rgba(31,27,24,.16);
  --card: #fffdf8;
  --red: #bf3f2e;
  --red-soft: rgba(191,63,46,.11);
  --teal: #2b6c60;
  --teal-soft: rgba(43,108,96,.10);
  --gold: #a3752a;
  --gold-soft: rgba(163,117,42,.12);
  --shadow-s: 0 1px 2px rgba(31,27,24,.05), 0 6px 16px -8px rgba(31,27,24,.18);
  --shadow-m: 0 1px 2px rgba(31,27,24,.04), 0 18px 40px -20px rgba(31,27,24,.30);
  --shadow-l: 0 2px 6px rgba(31,27,24,.05), 0 30px 60px -28px rgba(31,27,24,.35);
  --radius: 22px;
}

[data-theme="dark"]{
  --paper: #141110;
  --paper-2: #1b1714;
  --ink: #f2ebe1;
  --ink-2: #cabfb3;
  --ink-3: #8a7d71;
  --line: rgba(242,235,225,.11);
  --line-strong: rgba(242,235,225,.18);
  --card: #201b17;
  --red: #e2684f;
  --red-soft: rgba(226,104,79,.16);
  --teal: #55bda3;
  --teal-soft: rgba(85,189,163,.13);
  --gold: #d8a94f;
  --gold-soft: rgba(216,169,79,.14);
  --shadow-s: 0 1px 2px rgba(0,0,0,.5);
  --shadow-m: 0 20px 40px -22px rgba(0,0,0,.85);
  --shadow-l: 0 36px 70px -30px rgba(0,0,0,.9);
}

*{ box-sizing: border-box; }

html, body{ height: 100%; }

body{
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ---------- 背景 ---------- */
.bg{
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(58vw 46vw at 12% -6%, var(--red-soft), transparent 62%),
    radial-gradient(52vw 42vw at 92% 6%, var(--teal-soft), transparent 60%),
    radial-gradient(70vw 50vw at 50% 108%, var(--gold-soft), transparent 65%);
}
.bg::after{
  content: "";
  position: absolute;
  inset: 0;
  opacity: .5;
  background-image: radial-gradient(var(--line-strong) 0.7px, transparent 0.7px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 20%, transparent 78%);
}

/* ---------- 顶栏 ---------- */
.topbar{
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand{ display: flex; align-items: center; gap: 12px; min-width: 0; }

.seal{
  width: 38px; height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--red);
  color: #fdf7ee;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  padding-bottom: 2px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.22), var(--shadow-s);
  transform: rotate(-2deg);
}

.brand-text h1{
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: .02em;
  white-space: nowrap;
}
.brand-text p{
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .04em;
  white-space: nowrap;
}

.top-actions{ display: flex; gap: 8px; }

.icon-btn{
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .18s, color .18s, transform .18s, border-color .18s;
}
.icon-btn svg{
  width: 19px; height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}
.icon-btn:hover{ background: var(--card); color: var(--ink); border-color: var(--line-strong); transform: translateY(-1px); }
.icon-btn.sm{ width: 32px; height: 32px; border-radius: 9px; }
.icon-btn.sm svg{ width: 16px; height: 16px; }

/* ---------- 筛选 ---------- */
.filters{
  padding: 14px clamp(16px, 4vw, 40px) 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chips{
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.chips::-webkit-scrollbar{ display: none; }

.chip{
  flex: none;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 55%, transparent);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-family: inherit;
  letter-spacing: .02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .18s ease;
  white-space: nowrap;
}
.chip em{
  font-style: normal;
  font-size: 10.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.chip:hover{ border-color: var(--line-strong); color: var(--ink); }
.chip.on{
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.chip.on em{ color: color-mix(in srgb, var(--paper) 65%, transparent); }

.chips-sm .chip{
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 999px;
  background: transparent;
}
.chips-sm .chip.on{
  background: var(--red-soft);
  border-color: color-mix(in srgb, var(--red) 34%, transparent);
  color: var(--red);
  font-weight: 600;
}

.filters-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.filters-right{ display: flex; align-items: center; gap: 12px; }

.ghost-btn{
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  border-radius: 9px;
  padding: 5px 11px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all .16s;
  white-space: nowrap;
}
.ghost-btn:hover{ border-color: var(--line-strong); color: var(--ink); }
.ghost-btn.on{ background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ghost-btn.danger:hover{ color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }

.mini-prog{
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mini-prog b{ color: var(--ink); font-weight: 600; }

/* ---------- 主体 ---------- */
.board{
  flex: 1;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 34px) clamp(16px, 4vw, 32px) 8px;
  display: flex;
  flex-direction: column;
}

.board-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  min-height: 26px;
}
.head-left{ display: flex; align-items: center; gap: 10px; min-width: 0; }

.card-id{
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .08em;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 6px;
  padding: 3px 7px;
  font-variant-numeric: tabular-nums;
}
.card-sub{
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: .04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.star-btn{
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  border-radius: 10px;
  transition: color .18s, transform .18s, background .18s;
}
.star-btn svg{ width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.star-btn:hover{ background: var(--gold-soft); color: var(--gold); }
.star-btn.on{ color: var(--gold); }
.star-btn.on svg{ fill: var(--gold); }
.star-btn.on:hover{ transform: scale(1.06); }

/* ---------- 卡片 ---------- */
.stage{ perspective: 1600px; }

.card{
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-m);
  cursor: pointer;
  outline: none;
  transform-style: preserve-3d;
  transition: transform .19s cubic-bezier(.45,.05,.55,.95), box-shadow .25s, border-color .25s;
  overflow: hidden;
}
.card::before{
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), color-mix(in srgb, var(--gold) 80%, var(--red)));
  opacity: .85;
}
.card:hover{ box-shadow: var(--shadow-l); border-color: var(--line-strong); }
.card:focus-visible{ border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft), var(--shadow-m); }
.card.edge{ transform: rotateY(90deg); }

@keyframes cardIn{
  from{ opacity: 0; transform: translateY(10px) scale(.995); }
  to{ opacity: 1; transform: none; }
}
.card.enter{ animation: cardIn .34s cubic-bezier(.2,.8,.2,1); }

/* 内容超长时给出下滑提示 */
.card.more::after{
  content: "下滑查看全部 ↓";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 30px 0 11px;
  text-align: center;
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink-3);
  background: linear-gradient(180deg, transparent, var(--card) 58%);
  pointer-events: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
.card.more .face-back{ padding-bottom: 54px; }

.face{
  grid-column: 1;
  grid-row: 1;
  padding: clamp(22px, 3.4vw, 38px) clamp(20px, 3.6vw, 42px) clamp(26px, 3.4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.face-front{
  min-height: clamp(260px, 38vh, 380px);
  justify-content: center;
}
.face-tag{
  font-size: 10.5px;
  letter-spacing: .42em;
  color: var(--ink-3);
  text-transform: uppercase;
  font-weight: 600;
}
.face-front .face-tag{ margin-bottom: auto; }

.q{
  font-size: clamp(19px, 2.1vw, 26px);
  font-weight: 620;
  line-height: 1.62;
  letter-spacing: .01em;
  color: var(--ink);
  margin: 8px 0;
  word-break: break-word;
}

.flip-hint{
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .06em;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.flip-hint::before{
  content: "";
  width: 22px; height: 1px;
  background: var(--line-strong);
}

.face-back{
  min-height: clamp(260px, 38vh, 380px);
  max-height: min(64vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.face-back::-webkit-scrollbar{ width: 7px; }
.face-back::-webkit-scrollbar-thumb{ background: var(--line-strong); border-radius: 99px; }

.back-body{
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.answer{ display: flex; flex-direction: column; gap: 9px; }
.answer.solo .aline{
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 650;
  color: var(--ink);
  line-height: 1.6;
  letter-spacing: .01em;
}

/* 口诀类长清单：双列紧凑排布（按列顺序阅读） */
.answer.dense{
  display: block;
  column-count: 2;
  column-gap: 24px;
}
.answer.dense .aline{
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--ink-2);
  break-inside: avoid;
}
.aline{
  margin: 0;
  font-size: clamp(14.5px, 1.35vw, 16px);
  line-height: 1.85;
  color: var(--ink-2);
  word-break: break-word;
}
.aline.bullet{
  padding-left: 16px;
  position: relative;
}
.aline.bullet::before{
  content: "";
  position: absolute;
  left: 2px; top: .82em;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--red) 55%, transparent);
}
.aline.x{
  color: var(--red);
  padding-left: 16px;
  position: relative;
}
.aline.x::before{
  content: "✕";
  position: absolute;
  left: 0; top: 0;
  font-size: 12px;
  line-height: 1.95;
  opacity: .8;
}

.hl{
  color: var(--red);
  font-weight: 650;
  background: linear-gradient(180deg, transparent 64%, var(--red-soft) 64%);
  padding: 0 1px;
  border-radius: 2px;
}

.extra{ display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.memo, .note{
  font-size: 13px;
  line-height: 1.75;
  border-radius: 10px;
  padding: 9px 12px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.memo{
  background: var(--gold-soft);
  color: color-mix(in srgb, var(--gold) 82%, var(--ink));
  border: 1px dashed color-mix(in srgb, var(--gold) 32%, transparent);
}
.note{
  background: var(--teal-soft);
  color: color-mix(in srgb, var(--teal) 85%, var(--ink));
  border: 1px dashed color-mix(in srgb, var(--teal) 30%, transparent);
}
.memo b, .note b{ flex: none; font-weight: 700; letter-spacing: .06em; opacity: .9; }
.xmark{ font-style: normal; color: var(--red); font-weight: 700; margin-right: 2px; }

/* ---------- 评分 ---------- */
.rate{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.rate-btn{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 70%, transparent);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 550;
  letter-spacing: .04em;
  cursor: pointer;
  transition: transform .14s, background .18s, border-color .18s, color .18s, box-shadow .18s;
  user-select: none;
}
.rate-btn small{
  font-size: 10.5px;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 4px;
  line-height: 1.5;
  font-weight: 500;
}
.rate-btn:hover{ transform: translateY(-2px); box-shadow: var(--shadow-s); }
.rate-btn:active{ transform: translateY(0) scale(.985); }

.rate-btn.again:hover{ border-color: color-mix(in srgb, var(--red) 45%, transparent); background: var(--red-soft); color: var(--red); }
.rate-btn.hard:hover{ border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: var(--gold-soft); color: var(--gold); }
.rate-btn.good:hover{ border-color: color-mix(in srgb, var(--teal) 45%, transparent); background: var(--teal-soft); color: var(--teal); }

/* ---------- 导航 ---------- */
.navbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px 0;
}
.nav-btn{
  border: none;
  background: transparent;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 8px;
  transition: color .16s, background .16s;
}
.nav-btn:hover:not(:disabled){ color: var(--ink); background: color-mix(in srgb, var(--card) 60%, transparent); }
.nav-btn:disabled{ opacity: .35; cursor: default; }
.counter{
  font-size: 12.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}
.counter b{ color: var(--ink); font-weight: 650; font-size: 14px; }

/* ---------- 完成 / 空态 ---------- */
.done, .empty{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-m);
  padding: clamp(30px, 5vw, 52px) 24px;
  text-align: center;
  min-height: clamp(260px, 38vh, 380px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.done-seal{
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--red);
  color: #fdf7ee;
  font-size: 26px;
  padding-bottom: 2px;
  margin-bottom: 6px;
}
.done h2{ margin: 0; font-size: 21px; font-weight: 650; letter-spacing: .02em; }
.done-stat{ margin: 0; font-size: 13.5px; color: var(--ink-3); }
.done-stat b{ color: var(--ink); font-weight: 650; }
.done-actions{ display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.pill-btn{
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .18s;
}
.pill-btn:hover{ border-color: var(--line-strong); color: var(--ink); transform: translateY(-1px); }
.pill-btn.primary{ background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pill-btn.primary:hover{ opacity: .9; }
.empty p{ color: var(--ink-3); font-size: 14px; margin: 0; }

/* ---------- 页脚 ---------- */
.foot{
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 18px clamp(16px, 4vw, 32px) 26px;
}
.prog{ display: flex; align-items: center; gap: 12px; }
.prog-bar{
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--ink) 9%, transparent);
  overflow: hidden;
}
.prog-bar i{
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--red), color-mix(in srgb, var(--gold) 75%, var(--red)));
  transition: width .5s cubic-bezier(.2,.8,.2,1);
}
.prog-text{
  font-size: 11.5px;
  color: var(--ink-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.legend{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.legend span{ display: inline-flex; align-items: center; gap: 4px; }
kbd{
  font-family: inherit;
  font-size: 10.5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--card) 60%, transparent);
}
.legend-note{ margin-left: auto; opacity: .75; }

/* ---------- 抽屉 ---------- */
.overlay{
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(20,17,15,.35);
  backdrop-filter: blur(3px);
  animation: fadeIn .22s ease;
}
@keyframes fadeIn{ from{ opacity: 0 } to{ opacity: 1 } }

.drawer{
  position: fixed;
  top: 0; right: 0;
  z-index: 50;
  width: min(420px, 94vw);
  height: 100dvh;
  background: var(--paper-2);
  border-left: 1px solid var(--line);
  box-shadow: -30px 0 60px -30px rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
  transform: translateX(101%);
  transition: transform .32s cubic-bezier(.3,.8,.25,1);
}
.drawer.open{ transform: none; }

.drawer-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 12px;
}
.drawer-head h2{ margin: 0; font-size: 15px; font-weight: 650; letter-spacing: .04em; }

.search-wrap{
  margin: 0 18px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 11px;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  transition: border-color .18s, box-shadow .18s;
}
.search-wrap:focus-within{
  border-color: color-mix(in srgb, var(--red) 45%, transparent);
  box-shadow: 0 0 0 3px var(--red-soft);
}
.search-wrap svg{
  width: 16px; height: 16px;
  flex: none;
  fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round;
}
.search-wrap input{
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  padding: 10px 0;
  min-width: 0;
}
.search-wrap input::placeholder{ color: var(--ink-3); }

.drawer-body{
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px 12px;
  overscroll-behavior: contain;
}
.drawer-body::-webkit-scrollbar{ width: 8px; }
.drawer-body::-webkit-scrollbar-thumb{ background: var(--line-strong); border-radius: 99px; }

.grp{ margin-bottom: 6px; }
.grp-head{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 10px 8px;
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--paper-2) 92%, transparent);
  backdrop-filter: blur(8px);
  z-index: 2;
}
.grp-name{ font-size: 12.5px; font-weight: 650; letter-spacing: .06em; }
.grp-num{ font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.grp-bar{
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  overflow: hidden;
  max-width: 90px;
  margin-left: auto;
}
.grp-bar i{
  display: block; height: 100%; width: 0;
  background: var(--teal);
  border-radius: 99px;
  transition: width .4s;
}

.item{
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .14s, border-color .14s;
}
.item:hover{ background: color-mix(in srgb, var(--card) 80%, transparent); border-color: var(--line); }
.item.cur{ background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 26%, transparent); }
.dot{
  width: 6px; height: 6px;
  border-radius: 99px;
  flex: none;
  background: color-mix(in srgb, var(--ink) 18%, transparent);
}
.dot.b1{ background: color-mix(in srgb, var(--gold) 75%, transparent); }
.dot.b2{ background: color-mix(in srgb, var(--teal) 70%, transparent); }
.dot.b3{ background: var(--teal); box-shadow: 0 0 0 2px var(--teal-soft); }
.item-id{ font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; flex: none; width: 42px; }
.item-topic{
  font-size: 13px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.item.cur .item-topic{ color: var(--red); font-weight: 600; }
.item-star{ font-size: 12px; color: var(--gold); flex: none; opacity: 0; }
.item.starred .item-star{ opacity: 1; }

button.item-star{
  background: none;
  border: 0;
  padding: 2px 3px;
  line-height: 1;
  color: var(--ink-3);
  font-size: 12.5px;
  cursor: pointer;
  opacity: .25;
  transition: opacity .16s, color .16s, transform .16s;
}
button.item-star:hover{ opacity: 1; color: var(--gold); transform: scale(1.15); }
.item.starred button.item-star{ opacity: 1; color: var(--gold); }
.no-result{ padding: 30px 12px; text-align: center; color: var(--ink-3); font-size: 13px; }

.drawer-foot{
  border-top: 1px solid var(--line);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.drawer-tip{ font-size: 11px; color: var(--ink-3); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px){
  .chips{
    mask-image: linear-gradient(90deg, #000 0, #000 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 90%, transparent 100%);
  }
}

@media (max-width: 640px){
  .answer.dense{ column-count: 1; }
  .brand-text h1{ font-size: 14.5px; }
  .brand-text p{ font-size: 10.5px; }
  .seal{ width: 34px; height: 34px; font-size: 19px; }
  .filters{ padding-top: 10px; gap: 8px; }
  .board{ padding-top: 14px; }
  .face{ padding: 20px 18px 24px; }
  .q{ font-size: 18.5px; line-height: 1.66; }
  .rate-btn{ padding: 13px 6px; font-size: 13.5px; }
  .rate-btn small{ display: none; }
  .legend span:nth-child(n+3){ display: none; }
  .legend-note{ margin-left: 0; width: 100%; }
  .foot{ padding-bottom: 20px; }
  .navbar{ padding-top: 10px; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

[hidden]{ display: none !important; }

/* ===========================================================
   同屏模式：问题与答案同卡显示，不翻转
   =========================================================== */
.icon-btn.on{
  color: var(--red);
  background: var(--red-soft);
  border-color: color-mix(in srgb, var(--red) 34%, transparent);
}

.card.both{
  display: block;
  cursor: default;
  max-height: min(74vh, 660px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.card.both::-webkit-scrollbar{ width: 7px; }
.card.both::-webkit-scrollbar-thumb{ background: var(--line-strong); border-radius: 99px; }

.card.both .face-front{
  min-height: 0;
  padding-bottom: clamp(14px, 2vw, 20px);
  gap: 10px;
}
.card.both .face-front .face-tag{ margin-bottom: 0; }
.card.both .face-front .q{
  margin: 2px 0 0;
  font-size: clamp(17px, 1.85vw, 22px);
  line-height: 1.6;
}
.card.both .flip-hint{ display: none; }

.card.both .face-back{
  min-height: 0;
  max-height: none;
  overflow: visible;
  border-top: 1px dashed var(--line);
  padding-top: clamp(16px, 2.2vw, 24px);
}
.card.both .back-body{ margin: 0; }

@media (max-width: 640px){
  .card.both{ max-height: none; overflow: visible; }
  .card.both .face-front .q{ font-size: 17.5px; }
}
