/* 国考行测 · 真题 —— 手机优先，离线可用，无外部字体与 CDN */
.field select { min-width: 0; max-width: 100%; }
.offline-card { grid-column: 1 / -1; }
.offline-card summary { cursor: pointer; font-weight: 650; }
.offline-card progress { width: 100%; margin-top: 12px; }
.offline-actions { margin-top: 14px; }
.offline-card .offline-actions > .btn { flex: 1 1 160px; }
[hidden] { display: none !important; }

:root {
  --paper: #ffffff;
  --bg: #eef1f6;
  --ink: #16233a;
  --ink-soft: #4a5a72;
  --ink-faint: #7c8aa0;
  --line: #d5dde8;
  --blue: #1f3a5f;
  --blue-strong: #2a5080;
  --blue-tint: #e8eef7;
  --green: #16653f;
  --green-tint: #e3f4ec;
  --red: #a3242b;
  --red-tint: #fbe9ea;
  --amber: #8a5a12;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 35, 58, .06), 0 6px 18px rgba(22, 35, 58, .06);
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding-bottom: env(safe-area-inset-bottom);
}

button, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 14px;
  padding-top: calc(8px + env(safe-area-inset-top));
  background: var(--blue);
  color: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .18);
}

.topbar__back {
  flex: none;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.topbar__title {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__meta {
  flex: none;
  font-size: 13px;
  color: rgba(255, 255, 255, .78);
  font-variant-numeric: tabular-nums;
}

/* ---------- 布局 ---------- */

#main {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 12px 96px;
}

.screen[hidden] { display: none; }

.card {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.card__title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: .02em;
}

.card__lead {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--ink-soft);
}

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > .btn { flex: 1 1 0; }

.hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--ink-faint);
}

.footnote {
  margin: 18px 4px 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-faint);
}

/* ---------- 表单 ---------- */

.field {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.field:last-child { margin-bottom: 0; }

.field__label {
  flex: none;
  width: 44px;
  font-size: 14px;
  color: var(--ink-soft);
}

.field select {
  flex: 1;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  font-size: 15px;
}

.field select:focus-visible {
  outline: 2px solid var(--blue-strong);
  outline-offset: 1px;
}

/* ---------- 按钮 ---------- */

.btn {
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn:active { transform: translateY(1px); }

.btn:disabled {
  opacity: .45;
  cursor: default;
  transform: none;
}

.btn--primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.btn--primary:hover:not(:disabled) { background: var(--blue-strong); }

.btn--ghost {
  background: transparent;
  color: var(--blue);
  border-color: var(--line);
}

.btn--block {
  display: block;
  width: 100%;
  margin-bottom: 10px;
}

.btn--block:last-child { margin-bottom: 0; }

.btn--sm {
  min-height: 34px;
  padding: 4px 12px;
  font-size: 13px;
}

/* ---------- 进度条 ---------- */

.progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 0 2px;
}

.progress__bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #dbe3ee;
  overflow: hidden;
}

.progress__bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--blue-strong);
  transition: width .18s ease;
}

.progress__text {
  flex: none;
  font-size: 13px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------- 材料 ---------- */

.material__toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
}

.material__chev { font-weight: 500; font-size: 13px; color: var(--ink-faint); }

.material__body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- 题目 ---------- */

.question__head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tag--muted {
  background: #f1f4f9;
  color: var(--ink-faint);
  font-weight: 500;
}

.stem__para {
  margin: 0 0 .85em;
}

.stem__para:last-child { margin-bottom: 0; }

.question__stem {
  max-width: 33em;
  font-size: 17px;
  line-height: 2.05;
  letter-spacing: .01em;
  white-space: pre-wrap;
  word-break: break-word;
}

.question__stem:empty { display: none; }

.blank {
  display: inline-block;
  width: 3.4em;
  height: 1.1em;
  margin: 0 .25em;
  border-bottom: 1.5px solid var(--ink);
  vertical-align: -0.2em;
}

/* 不拉伸图片：小公式图按原尺寸显示，大图仍受 max-width 限制。 */
.question__images {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
}

.question__images img.img--formula {
  border: 0;
  background: transparent;
}

.explain__label {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.question__images img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

/* ---------- 选项 ---------- */

.options {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  margin-bottom: 10px;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  text-align: left;
  font-size: 15.5px;
  line-height: 1.7;
  cursor: pointer;
}

.option:last-child { margin-bottom: 0; }

.option__label {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.option__text {
  flex: 1;
  white-space: pre-wrap;
  word-break: break-word;
}

.option__text img {
  max-width: 100%;
  height: auto;
  margin-top: 6px;
  border-radius: 6px;
}

.option--picked {
  border-color: var(--blue-strong);
  background: var(--blue-tint);
}

.option--picked .option__label {
  border-color: var(--blue-strong);
  background: var(--blue-strong);
  color: #fff;
}

.option--correct {
  border-color: var(--green);
  background: var(--green-tint);
}

.option--correct .option__label {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.option--wrong {
  border-color: var(--red);
  background: var(--red-tint);
}

.option--wrong .option__label {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.option[disabled] { cursor: default; }

/* ---------- 底部工具条 ---------- */

.toolbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  display: flex;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
}

.toolbar > .btn { flex: 1; }

/* ---------- 答题卡 ---------- */

.sheet {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 30;
  max-height: 62vh;
  overflow: auto;
  padding: 16px 14px calc(20px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: 0 -6px 28px rgba(22, 35, 58, .22);
}

.sheet__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
}

.sheet__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 8px;
}

.sheet__cell {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfe;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.sheet__cell--answered {
  border-color: var(--blue-strong);
  background: var(--blue-tint);
  color: var(--blue);
  font-weight: 700;
}

.sheet__cell--current {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

/* ---------- 结果 ---------- */

.score { text-align: center; }

.score__num {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}

.score__detail {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}

.module-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 14px;
}

.module-row:last-child { margin-bottom: 0; }

.module-row__name { flex: none; width: 72px; color: var(--ink-soft); }

.module-row__bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #e4eaf3;
  overflow: hidden;
}

.module-row__bar > i {
  display: block;
  height: 100%;
  background: var(--blue-strong);
}

.module-row__num {
  flex: none;
  min-width: 52px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.review {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.review:first-child { border-top: 0; padding-top: 0; }

.review__head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.review__stem {
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.review__material {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafcff;
}

.review__material summary {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
}

.review__material-text {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
}

.review__options { margin-top: 12px; }

.option--static { cursor: default; }

.review__answer {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.7;
}

.review__answer--ok { background: var(--green-tint); color: var(--green); }
.review__answer--bad { background: var(--red-tint); color: var(--red); }

.review__explain {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fafcff;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink-soft);
}

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge--ok { background: var(--green-tint); color: var(--green); }
.badge--bad { background: var(--red-tint); color: var(--red); }
.badge--skip { background: #f1f4f9; color: var(--ink-faint); }

.module-row__time {
  flex: none;
  min-width: 72px;
  text-align: right;
  font-size: 12.5px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

/* ---------- 峡谷短局 ---------- */

.arena-home__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.arena-rank {
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.arena-home__stars { font-size: 13px; color: var(--ink-faint); }

.arena-start { font-size: 17px; min-height: 56px; }

.arena-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-faint);
  cursor: pointer;
}

.arena-toggle input { width: 18px; height: 18px; }

.arena-len {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.arena-hud {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 0 2px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.arena-hud__score {
  margin-left: auto;
  font-size: 19px;
  font-weight: 800;
  color: var(--blue);
}

.arena-hud__clock { color: var(--ink-faint); }

.arena-combo {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 700;
}

.arena-combo--hot { background: var(--red-tint); color: var(--red); }

#screen-arena { padding-bottom: 220px; }

.arena-feedback {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
  line-height: 1.6;
  box-shadow: 0 -4px 20px rgba(22, 35, 58, .18);
}

.arena-feedback[hidden] { display: none; }
.arena-feedback--ok { background: var(--green-tint); color: var(--green); }
.arena-feedback--bad { background: var(--red-tint); color: var(--red); }

.arena-feedback__head {
  font-size: 15px;
  font-weight: 700;
}

.arena-feedback__note {
  margin-top: 8px;
  max-height: 40vh;
  overflow-y: auto;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .72);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.arena-feedback__note[hidden] { display: none; }

.arena-feedback__next { margin-top: 12px; }

.arena-feedback__hint {
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink-faint);
  text-align: center;
}

.arena-result { text-align: center; }

.analysis-lead {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
}

.analysis-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.analysis-block { margin-top: 18px; }

.analysis-block__title {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.analysis-item {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px dashed var(--line);
  font-size: 14px;
  line-height: 1.7;
}

.analysis-item:first-of-type { border-top: 0; }

.analysis-item__no {
  flex: none;
  width: 3.4em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.analysis-item__text { flex: 1; }

/* 改题型：复盘页就地纠正自动识别结果 */
.analysis-item {
  flex-wrap: wrap;
}

.analysis-item__fix {
  flex: none;
  align-self: flex-start;
  margin-top: 2px;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.analysis-item__fix:hover {
  border-color: var(--accent, #4a7dff);
  color: var(--accent, #4a7dff);
}

.analysis-item__fix--go {
  border-color: var(--accent, #4a7dff);
  color: var(--accent, #4a7dff);
}

.type-editor {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 2px 3.4em;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-alt, rgba(0, 0, 0, 0.03));
}

.type-editor__select {
  flex: 1 1 190px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--ink);
  font-size: 13px;
}

.type-editor__btn {
  flex: none;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent, #4a7dff);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

.type-editor__btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-faint);
}

.analysis-lesson {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink);
}

.analysis-lesson:last-child { margin-bottom: 0; }

.arena-result__score {
  font-size: 54px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}

.arena-result__label { font-size: 13px; color: var(--ink-faint); }

.arena-result__stars {
  margin-top: 10px;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.arena-result__stars--up { color: var(--green); }
.arena-result__stars--down { color: var(--red); }
.arena-result__stars--flat { color: var(--ink-faint); }

.arena-result__rank { margin-top: 4px; font-size: 14px; color: var(--ink-soft); }

/* ---------- 计时 ---------- */

.question__timer {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

/* ---------- 训练记录 ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 520px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--blue-tint);
}

.stat__num {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}

.stat__label { font-size: 12.5px; color: var(--ink-soft); }

.history-subtitle { margin-top: 18px; }

.trend {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 96px;
  border-bottom: 1px solid var(--line);
}

.trend__bar {
  flex: 1;
  min-height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--blue-strong);
}

.trend__bar--low { background: var(--red); }

.history-item > summary {
  list-style: none;
  cursor: pointer;
}

.history-item > summary::-webkit-details-marker { display: none; }

.history-item__title { font-size: 15px; font-weight: 600; }

.history-item__meta {
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.history-item__rate { font-weight: 700; color: var(--blue); }

.history-item__body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.time-cell {
  padding: 5px 4px;
  border-radius: 8px;
  background: #f1f4f9;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.time-cell b { display: block; font-size: 12.5px; }
.time-cell--ok { background: var(--green-tint); color: var(--green); }
.time-cell--bad { background: var(--red-tint); color: var(--red); }

/* ---------- 错题归类 ---------- */

.wrong-insight {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chips__label {
  width: 100%;
  font-size: 12.5px;
  color: var(--ink-faint);
}

.chip {
  min-height: 36px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfe;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
}

.chip--on {
  border-color: var(--blue-strong);
  background: var(--blue-strong);
  color: #fff;
}

.wrong-tools {
  margin-top: 14px;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
}

.wrong-note {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  font: inherit;
  font-size: 14.5px;
  line-height: 1.7;
  resize: vertical;
}

.wrong-note:focus-visible {
  outline: 2px solid var(--blue-strong);
  outline-offset: 1px;
}

.wrong-card--mastered { opacity: .62; }

/* ---------- 申论 ---------- */

.sl-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  margin-bottom: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
}

.sl-item--started { border-left: 4px solid var(--blue-strong); }
.sl-image { display: block; max-width: 100%; height: auto; margin: 12px 0; }
.sl-rich-text { white-space: pre-wrap; }
.sl-material-links { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.sl-material { scroll-margin-top: 80px; }
.sl-item:disabled {
  opacity: .58;
  cursor: not-allowed;
}
.sl-item:disabled:active { transform: none; }

.sl-item__name { font-size: 15.5px; font-weight: 600; }

.sl-item__meta { font-size: 13px; color: var(--ink-faint); }

.sl-notes summary {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
}

.sl-notes .sl-material__text { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }

.sl-material + .sl-material {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.sl-material__text {
  font-size: 15.5px;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
}

.sl-label {
  margin: 12px 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.sl-material > .sl-label:first-child { margin-top: 0; }

.sl-answer {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  font: inherit;
  font-size: 15.5px;
  line-height: 1.8;
  resize: vertical;
}

.sl-answer:focus-visible {
  outline: 2px solid var(--blue-strong);
  outline-offset: 1px;
}

.sl-counter {
  margin-top: 6px;
  font-size: 13px;
  text-align: right;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.sl-counter--over { color: var(--red); font-weight: 700; }

.sl-toggle { margin-top: 12px; }

.sl-reference {
  padding: 12px;
  border-radius: 10px;
  background: var(--green-tint);
  color: var(--green);
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- 确认弹层 ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(22, 35, 58, .45);
}

.modal[hidden] { display: none; }

.modal__panel {
  width: 100%;
  max-width: 340px;
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(22, 35, 58, .3);
}

.modal__text {
  margin: 0 0 18px;
  font-size: 15.5px;
  line-height: 1.7;
  text-align: center;
}

/* ---------- 提示 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  z-index: 40;
  transform: translateX(-50%);
  max-width: 88vw;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(22, 35, 58, .92);
  color: #fff;
  font-size: 14px;
  text-align: center;
}

.toast[hidden] { display: none; }

@media (min-width: 640px) {
  .card { padding: 20px; }
  #main { padding: 18px 16px 96px; }
}
