/* ————————————————————————————————
   拾光集 · 古籍书页主题
   竹纸为底，雕版墨字，朱丝为栏
———————————————————————————————— */

:root {
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "STZhongsong", "SimSun", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

html[data-theme="light"] {
  --bg: #ddceac;            /* 竹纸底：泛黄发暗 */
  --bg-soft: #d3c29e;      /* 略深的纸色，用于凹陷块 */
  --card: #f6eed9;         /* 书页：比底色明显亮，像新翻开的一页 */
  --card-edge: #d5c39c;    /* 书页外栏线色 */
  --text: #443627;         /* 雕版墨：暖褐黑 */
  --text-2: #8a765a;       /* 淡墨：批注、页码 */
  --heading: #2e2113;      /* 浓墨标题 */
  --accent: #9e2b23;       /* 朱砂 / 朱丝栏红 */
  --accent-hover: #831f18;
  --accent-soft: rgba(158, 43, 35, 0.09);
  --green: #5c6e3f;        /* 石绿印泥 */
  --border: #cbb99a;       /* 界栏淡线 */
  --shadow: 0 3px 22px rgba(90, 66, 30, 0.14);
  --grain: rgba(120, 92, 48, 0.05);   /* 纸面斑渍色 */
  --toast-bg: #34271a;
  --toast-fg: #f2e8d0;
}

html[data-theme="dark"] {
  --bg: #1c1710;           /* 烛光下的旧书：深褐 */
  --bg-soft: #241d13;
  --card: #2a2116;         /* 深色书页 */
  --card-edge: #3d3120;
  --text: #d3c3a4;         /* 陈墨米黄 */
  --text-2: #938162;
  --heading: #ecdcb9;
  --accent: #c96a4e;       /* 暗处的朱砂偏暖 */
  --accent-hover: #db8064;
  --accent-soft: rgba(201, 106, 78, 0.13);
  --green: #8a9a6a;
  --border: #443a28;
  --shadow: 0 3px 24px rgba(0, 0, 0, 0.5);
  --grain: rgba(220, 190, 130, 0.035);
  --toast-bg: #ecdcb9;
  --toast-fg: #1c1710;
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 16.5px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  transition: color 0.3s ease;

  /* 古籍竹纸：底色 + 陈年斑渍 + 竹帘竖纹 */
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 18% 22%, var(--grain) 0, transparent 9%),
    radial-gradient(circle at 82% 12%, var(--grain) 0, transparent 7%),
    radial-gradient(circle at 65% 68%, var(--grain) 0, transparent 11%),
    radial-gradient(circle at 30% 85%, var(--grain) 0, transparent 8%),
    radial-gradient(circle at 92% 78%, var(--grain) 0, transparent 6%),
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(0,0,0,0.035), transparent 70%),
    repeating-linear-gradient(90deg,
      rgba(120, 92, 48, 0.028) 0, rgba(120, 92, 48, 0.028) 1px,
      transparent 1px, transparent 6px);
  background-attachment: fixed;
  transition: background-color 0.3s ease;
}

::selection { background: var(--accent-soft); color: var(--accent); }

a { color: inherit; }

.hidden { display: none !important; }
.inline { display: inline; }
.ta-r { text-align: right; }

/* ———— 页头 ———— */

.site-header {
  max-width: 64rem;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.seal {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #f6ead2;
  font-size: 1.4rem;
  border-radius: 4px;
  /* 印章内边框：白线一圈，像篆刻的印框 */
  box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(246, 234, 210, 0.55);
  transform: rotate(-3deg);
  transition: transform 0.25s ease;
}

.brand:hover .seal { transform: rotate(3deg); }

.brand-text { display: flex; flex-direction: column; }

.site-name {
  color: var(--heading);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.site-sub {
  color: var(--text-2);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  margin-top: 0.1rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--text-2);
  text-decoration: none;
  letter-spacing: 0.12em;
  transition: color 0.2s ease;
}

.site-nav a:hover { color: var(--accent); }

.site-nav [data-nav] { position: relative; }

.site-nav [data-nav].active { color: var(--accent); }

.site-nav [data-nav].active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: var(--accent);
  opacity: 0.55;
  border-radius: 1px;
}

#theme-toggle {
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 1.05rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

#theme-toggle:hover { background: var(--accent-soft); color: var(--accent); }

/* ———— 主容器 ———— */

.container {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
  flex: 1;
}

/* ———— 提示条 ———— */

.flash-wrap {
  max-width: 48rem;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.flash {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  margin-bottom: 0.5rem;
  animation: fadein 0.35s ease;
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* ———— 首页 ———— */

.index-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--font-sans);
}

.chip {
  font-size: 0.83rem;
  color: var(--text-2);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.22rem 0.85rem;
  transition: all 0.2s ease;
  background: var(--card);
}

.chip:hover { color: var(--accent); border-color: var(--accent); }

.chip.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.chip-count {
  font-size: 0.72rem;
  margin-left: 0.35rem;
  opacity: 0.7;
}

.search input {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.38rem 1rem;
  width: 12.5rem;
  outline: none;
  transition: border-color 0.2s ease, width 0.25s ease;
}

.search input:focus { border-color: var(--accent); width: 15rem; }

.search-hint {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-2);
  margin: 0.5rem 0 0;
}

.post-list { margin-top: 0.5rem; }

.post-item {
  padding: 1.9rem 0;
  border-bottom: 1px dashed var(--border);
}

.post-item:last-child { border-bottom: none; }

.post-meta {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-2);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.post-meta a { color: var(--text-2); text-decoration: none; }
.post-meta a:hover { color: var(--accent); }
.dot { opacity: 0.55; }

.post-title {
  margin: 0.45rem 0 0.55rem;
  font-size: 1.42rem;
  font-weight: 600;
  line-height: 1.55;
}

.post-title a {
  color: var(--heading);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-title a:hover { color: var(--accent); }

.post-excerpt {
  margin: 0;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.95;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-excerpt.locked { font-style: italic; opacity: 0.85; }

/* ———— 徽章 ———— */

.badge {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  border-radius: 4px;
  padding: 0.05rem 0.45rem;
  border: 1px solid currentColor;
  opacity: 0.9;
}

.badge-private { color: var(--text-2); }
.badge-lock { color: var(--accent); }
.badge-draft { color: var(--text-2); border-style: dashed; }
.badge-public, .badge-pub { color: var(--green); }

/* ———— 空状态 ———— */

.empty {
  text-align: center;
  padding: 4.5rem 0;
  color: var(--text-2);
}

.empty-seal {
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  margin: 0 auto 1.2rem;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 1.7rem;
  border-radius: 10px;
  transform: rotate(-4deg);
  opacity: 0.85;
}

/* ———— 文章页 ———— */

.post-full {
  position: relative;
  margin-top: 1.5rem;
  padding: 3rem 3.2rem 3.4rem;
  background: var(--card);
  border-radius: 5px;
  box-shadow: var(--shadow),
              inset 0 0 0 1px var(--card),
              inset 0 0 0 4px var(--card-edge),
              inset 0 0 0 5px var(--card);
}

/* 书页左右两道朱丝栏 */
.post-full::before,
.post-full::after {
  content: "";
  position: absolute;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 2px;
  background: var(--accent);
  opacity: 0.38;
  border-radius: 1px;
}
.post-full::before { left: 1.4rem; }
.post-full::after { right: 1.4rem; }

/* 标题与日期同行：标题居左，日期落款居右 */
.post-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* 标题占据主要宽度，日期/编辑不被挤压 */
.post-title-row > h1,
.post-title-row > .post-title {
  flex: 1 1 auto;
  min-width: 0;
}

.post-header h1 {
  color: var(--heading);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
  letter-spacing: 0.04em;
}

/* 列表页标题进入同行后去掉原纵向外边距 */
.post-item .post-title-row .post-title { margin: 0; }

/* 详情页：日期 + 编辑 成组，靠右 */
.post-title-aside {
  flex-shrink: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.9rem;
  white-space: nowrap;
}

.post-date {
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--text-2);
  white-space: nowrap;
}

.post-edit {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-edit:hover { color: var(--accent-hover); text-decoration: underline; }

/* 标题下的朱红版框双线 */
.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.4rem;
  border-bottom: 3px double var(--accent);
}

.post-header .post-meta { margin-top: 0.7rem; }

.prose {
  font-size: 1.04rem;
  line-height: 2.05;
  letter-spacing: 0.015em;
}

.prose > :first-child { margin-top: 0; }

.prose p { margin: 1.3em 0; }

.prose h1, .prose h2, .prose h3, .prose h4 {
  color: var(--heading);
  font-weight: 600;
  line-height: 1.6;
  margin: 2.2em 0 0.9em;
}

.prose h1 { font-size: 1.55rem; }

.prose h2 {
  font-size: 1.38rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--accent);
}

.prose h3 { font-size: 1.18rem; }
.prose h4 { font-size: 1.05rem; }

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.2s ease;
}

.prose a:hover { color: var(--accent-hover); }

.prose blockquote {
  margin: 1.6em 0;
  padding: 0.9em 1.3em;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  color: var(--text-2);
}

.prose blockquote p { margin: 0.4em 0; }

.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  padding: 0.12em 0.4em;
}

.prose .highlight,
.prose pre {
  margin: 1.6em 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow-x: auto;
  line-height: 1.7;
}

.prose .highlight pre {
  margin: 0;
  border: none;
  border-radius: 0;
}

.prose pre {
  background: var(--bg-soft);
  padding: 1.1em 1.3em;
  font-size: 0.86rem;
}

.prose .highlight pre { padding: 1.1em 1.3em; font-size: 0.86rem; }

.prose pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.prose img {
  display: block;
  max-width: 100%;
  margin: 1.8em auto;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.prose hr {
  border: none;
  margin: 3em 0;
  text-align: center;
}

.prose hr::before {
  content: "✦　✦　✦";
  color: var(--text-2);
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  opacity: 0.7;
}

.prose ul, .prose ol { padding-left: 1.6em; margin: 1.2em 0; }
.prose li { margin: 0.4em 0; }
.prose li::marker { color: var(--accent); }

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  margin: 1.6em 0;
}

.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.9rem;
  text-align: left;
}

.prose th { background: var(--bg-soft); color: var(--heading); font-weight: 600; }

/* ———— 居中卡片页（登录 / 初始化 / 解锁 / 404）———— */

.card-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 52vh;
  padding: 2rem 0;
}

.card {
  position: relative;
  width: min(24rem, 100%);
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 5px;
  /* 书口双线：外一道粗、内一道细 */
  box-shadow: var(--shadow),
              inset 0 0 0 1px var(--card),
              inset 0 0 0 4px var(--card-edge),
              inset 0 0 0 5px var(--card);
  padding: 2.8rem 2.6rem;
  text-align: center;
}

/* 卡片左侧朱丝栏 */
.card::before {
  content: "";
  position: absolute;
  top: 1.1rem;
  bottom: 1.1rem;
  left: 1.1rem;
  width: 2px;
  background: var(--accent);
  opacity: 0.55;
  border-radius: 1px;
}

.card-seal {
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  margin: 0 auto 1.3rem;
  background: var(--accent);
  color: #f6ead2;
  font-size: 1.55rem;
  border-radius: 5px;
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(246, 234, 210, 0.55);
  transform: rotate(-3deg);
}

.card-title {
  color: var(--heading);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  letter-spacing: 0.1em;
}

.card-hint {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-2);
  margin: 0 0 1.7rem;
}

.card input {
  display: block;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.68rem 1rem;
  margin-bottom: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.card input:focus { border-color: var(--accent); }

/* ———— 按钮 ———— */

.btn {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 1.15rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

.btn:hover { color: var(--accent); border-color: var(--accent); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fdf8ee;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fdf8ee;
}

.btn-block { display: block; width: 100%; margin-top: 0.4rem; }

.btn-sm { font-size: 0.78rem; padding: 0.28rem 0.7rem; }

.btn-danger:hover { color: #c0504d; border-color: #c0504d; background: rgba(192, 80, 77, 0.07); }

.btn:disabled { opacity: 0.6; cursor: default; }

/* ———— 管理页 ———— */

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.page-head h1 {
  color: var(--heading);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin: 0;
}

.page-head-copy p {
  margin: 0.35rem 0 0;
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 0.88rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
}

.category-card {
  display: flex;
  min-height: 10rem;
  flex-direction: column;
  padding: 1.35rem;
  color: var(--text);
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 6px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.category-card:hover {
  color: var(--text);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(90, 66, 30, 0.2);
}

.category-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.category-card-name {
  color: var(--heading);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.category-card-count {
  flex: none;
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 0.78rem;
}

.category-card p {
  flex: 1;
  margin: 0.65rem 0 1rem;
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  line-height: 1.7;
}

.category-card-go {
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 0.84rem;
}

.admin-section + .admin-section {
  margin-top: 3.2rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.admin-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.admin-section-head h2 {
  margin: 0;
  color: var(--heading);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.admin-section-head p {
  margin: 0.3rem 0 0;
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 0.82rem;
}

.table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.admin-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.6rem;
  white-space: nowrap;
}

.admin-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.72rem 0.6rem;
  vertical-align: middle;
}

.admin-table tbody tr { transition: background 0.15s ease; }
.admin-table tbody tr:hover { background: var(--bg-soft); }

.td-title a {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--heading);
  text-decoration: none;
}

.td-title a:hover { color: var(--accent); }

.td-time { color: var(--text-2); font-size: 0.82rem; white-space: nowrap; }
.td-desc { color: var(--text-2); }
.td-actions { white-space: nowrap; }
.td-actions .btn { margin-left: 0.3rem; }

.cat-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
}

.cat-form input {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.cat-form input:focus { border-color: var(--accent); }
.cat-form input[name="name"] { width: 11rem; }
.cat-form input[name="description"] { flex: 1; min-width: 12rem; }

/* ———— 编辑器 ———— */

body.editor-page { height: 100vh; }
body.editor-page .site-footer { display: none; }
body.editor-page .site-header { padding-block: 1.1rem 0.6rem; }

.editor-main {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 1.5rem 1.2rem;
  display: flex;
  flex-direction: column;
}

.editor-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.4rem 0 0.9rem;
}

#ed-title {
  flex: 1;
  min-width: 14rem;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--heading);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0.1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

#ed-title:focus { border-bottom-color: var(--accent); }

.editor-opts {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-family: var(--font-sans);
}

.editor-opts select, #ed-password {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.38rem 0.6rem;
  outline: none;
}

#ed-password { width: 9.5rem; }
#ed-password:focus { border-color: var(--accent); }

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 0.3rem 0.55rem;
  font-family: var(--font-sans);
}

.editor-toolbar button {
  min-width: 1.95rem;
  height: 1.95rem;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 0.86rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0 0.4rem;
}

.editor-toolbar button:hover { background: var(--accent-soft); color: var(--accent); }

.tb-sep { width: 1px; height: 1.1rem; background: var(--border); margin: 0 0.4rem; }
.tb-spacer { flex: 1; }

.ed-count { font-size: 0.76rem; color: var(--text-2); margin-right: 0.5rem; }

.tb-mode { font-size: 0.8rem !important; }

.editor-body {
  flex: 1;
  min-height: 0;
  display: flex;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}

#ed-input {
  flex: 1 1 50%;
  min-width: 0;
  border: none;
  resize: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.93rem;
  line-height: 1.85;
  padding: 1.4rem 1.6rem;
}

.preview-pane {
  flex: 1 1 50%;
  min-width: 0;
  border-left: 1px solid var(--border);
  background: var(--bg);
  overflow-y: auto;
  padding: 1.4rem 1.8rem;
  font-size: 0.98rem;
}

/* ———— Toast ———— */

.toast {
  position: fixed;
  left: 50%;
  bottom: 2.2rem;
  transform: translateX(-50%) translateY(8px);
  background: var(--toast-bg);
  color: var(--toast-fg);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ———— 页脚 ———— */

.site-footer {
  text-align: center;
  padding: 2.5rem 1.5rem 2.2rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--text-2);
}

.footer-rule {
  display: block;
  width: 3.5rem;
  height: 1px;
  margin: 0 auto 1.3rem;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  opacity: 0.55;
}

/* ———— 响应式 ———— */

@media (min-width: 901px) {
  .tb-mode { display: none !important; }
}

@media (max-width: 900px) {
  .editor-body #ed-input { display: block; }
  .editor-body .preview-pane { display: none; }
  .editor-body.show-preview #ed-input { display: none; }
  .editor-body.show-preview .preview-pane { display: block; border-left: none; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-header { flex-direction: column; align-items: flex-start; padding-top: 1.4rem; }
  .post-title { font-size: 1.25rem; }
  .post-header h1 { font-size: 1.6rem; }
  .index-top { flex-direction: column; align-items: stretch; }
  .search input { width: 100%; }
  .search input:focus { width: 100%; }
  .prose { font-size: 1rem; }
  .card { padding: 2rem 1.5rem; }
}

/* ============================================================
   驾照考试模块
   ============================================================ */

.nav-dynamic { display: contents; }

/* ———— 考试首页 / 科目页 ———— */
.exam-head { margin: 1rem 0 2rem; }
.exam-head h1 {
  color: var(--heading);
  font-size: 1.7rem;
  letter-spacing: 0.08em;
  margin: 0 0 0.4rem;
}
.exam-sub { color: var(--text-2); font-family: var(--font-sans); font-size: 0.9rem; margin: 0; }

.exam-crumb {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-2);
  margin-bottom: 0.5rem;
}
.exam-crumb a { color: var(--accent); text-decoration: none; }
.exam-crumb a:hover { text-decoration: underline; }

.exam-area-picker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin: -0.8rem 0 1.8rem;
  padding: 0.8rem 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: var(--font-sans);
  font-size: 0.84rem;
}
.exam-area-picker label { color: var(--heading); font-weight: 600; }
.exam-area-picker select {
  min-width: 13rem;
  max-width: 100%;
  padding: 0.45rem 2rem 0.45rem 0.65rem;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
}
.exam-area-picker span { color: var(--text-2); }

/* 科目卡片网格 */
.subj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.1rem;
}
.subj-card {
  position: relative;
  display: block;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 1.5rem 1.4rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.subj-card:not(.disabled):hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(90, 66, 30, 0.2);
}
.subj-card.disabled { opacity: 0.6; cursor: not-allowed; }
.subj-badge {
  width: 2.6rem; height: 2.6rem;
  display: grid; place-items: center;
  background: var(--accent); color: #f6ead2;
  font-size: 1.35rem; font-weight: 600;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1.5px rgba(246,234,210,0.5);
  margin-bottom: 0.9rem;
}
.subj-card.disabled .subj-badge { background: var(--text-2); }
.subj-name { font-size: 1.2rem; font-weight: 600; color: var(--heading); letter-spacing: 0.05em; }
.subj-sub { font-family: var(--font-sans); font-size: 0.8rem; color: var(--text-2); margin: 0.35rem 0 1rem; line-height: 1.6; }
.subj-meta { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-sans); font-size: 0.82rem; }
.subj-count { color: var(--text-2); }
.subj-go { color: var(--accent); }
.subj-todo { color: var(--text-2); font-style: italic; }

/* ———— 模式选择（练习/模考）———— */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.mode-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 1.8rem 1.6rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mode-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(90,66,30,0.2); }
.mode-icon { font-size: 2rem; margin-bottom: 0.6rem; }
.mode-name { font-size: 1.25rem; font-weight: 600; color: var(--heading); letter-spacing: 0.06em; margin-bottom: 0.6rem; }
.mode-desc { font-family: var(--font-sans); font-size: 0.86rem; color: var(--text-2); line-height: 1.85; }
.mode-go { margin-top: 1rem; color: var(--accent); font-family: var(--font-sans); font-size: 0.9rem; }

/* 科目一专项练习 */
.special-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 0.9rem;
}
.special-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  padding: 1.1rem 1.2rem;
  color: inherit;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 6px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.special-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 24px rgba(90, 66, 30, 0.18);
}
.special-icon, .special-hero-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  font-size: 1.5rem;
  background: var(--accent-soft);
  border-radius: 50%;
}
.special-content { flex: 1; min-width: 0; }
.special-name { color: var(--heading); font-size: 1.05rem; font-weight: 600; }
.special-desc {
  margin: 0.25rem 0 0.5rem;
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 0.79rem;
  line-height: 1.55;
}
.special-meta {
  display: flex;
  gap: 0.8rem;
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 0.76rem;
}
.special-wrong { color: #b4472f; }
.special-go { flex: 0 0 auto; color: var(--accent); }
.special-category-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.special-category-head h1 { margin-bottom: 0.3rem; }
.special-hero-icon { width: 3.6rem; height: 3.6rem; font-size: 1.8rem; }

/* 专项错题本：桌面端单题在左、按错误次数排序的原题号在右 */
.special-wrong-page { max-width: 68rem; margin: 0 auto; }
.special-wrong-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: 1.2rem;
  align-items: start;
}
.special-wrong-main { min-width: 0; }
.special-wrong-sidebar {
  position: sticky;
  top: 1rem;
  min-width: 0;
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.special-wrong-sidebar-head { padding: 1rem 1rem 0.8rem; border-bottom: 1px solid var(--border); }
.special-wrong-sidebar-head h2 { margin: 0; color: var(--heading); font-size: 1.05rem; }
.special-wrong-sidebar-head p {
  margin: 0.25rem 0 0;
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 0.75rem;
}
.special-wrong-index {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  padding: 0.8rem;
}
.special-wrong-index-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--font-sans);
  text-align: left;
}
.special-wrong-index-btn span { color: var(--heading); font-size: 0.82rem; }
.special-wrong-index-btn small { flex: 0 0 auto; color: #b4472f; font-size: 0.7rem; }
.special-wrong-index-btn:hover,
.special-wrong-index-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.special-wrong-index-btn.active { box-shadow: inset 3px 0 0 var(--accent); }
.special-wrong-index-empty { padding: 1rem; color: var(--text-2); text-align: center; }
.special-wrong-question-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}
.special-wrong-question-head .q-type { margin: 0; }
.special-wrong-source,
.special-wrong-count {
  font-family: var(--font-sans);
  font-size: 0.78rem;
}
.special-wrong-source { color: var(--text-2); }
.special-wrong-count {
  margin-left: auto;
  padding: 0.15rem 0.5rem;
  color: #b4472f;
  background: rgba(180,71,47,0.1);
  border-radius: 999px;
}
.special-wrong-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 1rem;
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 0.8rem;
}
.special-wrong-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2.5rem 1rem;
  color: var(--text-2);
  text-align: center;
}
.special-wrong-empty b { color: var(--heading); font-size: 1.05rem; }

/* ———— 答题页通用 ———— */
body.exam-page .site-footer { display: none; }

.quiz, .mock { max-width: 46rem; margin: 0 auto; }

.quiz-topbar, .mock-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1rem;
  font-family: var(--font-sans); font-size: 0.85rem;
}
.quiz-back { color: var(--accent); text-decoration: none; }
.quiz-area {
  padding: 0.12rem 0.5rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  white-space: nowrap;
}
.quiz-progress { color: var(--text-2); }
.quiz-progress b { color: var(--heading); }
.quiz-stat { margin-left: 0.8rem; }

.quiz-card, .mock-q {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 1.8rem 1.7rem;
}
.quiz-loading { text-align: center; color: var(--text-2); padding: 2rem 0; }

.q-type, .mock-q-type {
  display: inline-block;
  font-family: var(--font-sans); font-size: 0.72rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  margin-bottom: 0.9rem;
}
.q-text {
  font-size: 1.15rem; line-height: 1.8; color: var(--heading);
  margin-bottom: 1.3rem; font-weight: 600;
}
.q-options { display: flex; flex-direction: column; gap: 0.6rem; }
.q-opt {
  display: flex; align-items: flex-start; gap: 0.7rem;
  width: 100%; text-align: left;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 5px; padding: 0.75rem 0.9rem;
  cursor: pointer; font-family: var(--font-serif); font-size: 0.98rem;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.q-opt:hover:not(:disabled) { border-color: var(--accent); }
.q-opt.picked { border-color: var(--accent); background: var(--accent-soft); }
.q-opt:disabled { cursor: default; }
.q-key {
  flex-shrink: 0;
  width: 1.5rem; height: 1.5rem;
  display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 50%;
  font-family: var(--font-sans); font-size: 0.8rem; color: var(--text-2);
}
.q-opt.correct { border-color: var(--green); background: rgba(92,110,63,0.1); }
.q-opt.correct .q-key { border-color: var(--green); background: var(--green); color: #f6ead2; }
.q-opt.wrong { border-color: #b4472f; background: rgba(180,71,47,0.08); }
.q-opt.wrong .q-key { border-color: #b4472f; background: #b4472f; color: #f6ead2; }
.q-val { padding-top: 0.15rem; }

.q-confirm { margin-top: 1rem; }

.q-result {
  margin-top: 1.2rem; padding: 0.7rem 1rem; border-radius: 5px;
  font-family: var(--font-sans); font-size: 0.9rem; font-weight: 600;
}
.q-result.ok { background: rgba(92,110,63,0.12); color: var(--green); }
.q-result.no { background: rgba(180,71,47,0.1); color: #b4472f; }

.explain-toggle { margin-top: 0.8rem; }

.q-explain {
  margin-top: 0.7rem; padding: 1rem 1.2rem;
  background: var(--bg-soft); border-left: 3px solid var(--accent);
  border-radius: 0 5px 5px 0;
  font-family: var(--font-sans); font-size: 0.88rem; line-height: 1.9; color: var(--text);
}
.q-explain b { display: block; color: var(--accent); margin-bottom: 0.4rem; }

.quiz-nav { display: flex; gap: 0.7rem; margin-top: 1.2rem; }
.quiz-nav .btn-primary { margin-left: auto; }
.btn-ghost { color: var(--text-2); }
.btn-lg { padding: 0.7rem 1.8rem; font-size: 0.95rem; }

/* ———— 模拟考试 ———— */
.mock-rules {
  font-family: var(--font-sans); font-size: 0.88rem; color: var(--text-2);
  line-height: 2; padding-left: 1.2rem; margin: 1rem 0 1.8rem;
}
.mock-topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  padding: 0.7rem 0; margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}
.mock-timer {
  font-family: var(--font-mono); font-size: 1.3rem; font-weight: 600;
  color: var(--heading);
}
.mock-timer.urgent { color: #b4472f; }
.mock-position, .mock-count { color: var(--text-2); }
.mock-position span, .mock-count span { color: var(--heading); font-weight: 600; }

.mock-body { min-height: 0; scroll-margin-top: 4.5rem; }
.mock-q-head { margin-bottom: 0.9rem; }
.mock-q-no {
  display: inline-grid; place-items: center;
  width: 1.6rem; height: 1.6rem;
  background: var(--accent); color: #f6ead2;
  border-radius: 50%; font-family: var(--font-sans); font-size: 0.78rem;
  margin-right: 0.5rem; vertical-align: middle;
}
.mock-q-type { margin-right: 0.55rem; }
.mock-q-text { font-size: 1.05rem; color: var(--heading); font-weight: 600; line-height: 1.7; }
.mock-q-opts { display: flex; flex-direction: column; gap: 0.5rem; }
.mock-opt {
  display: flex; align-items: flex-start; gap: 0.7rem;
  width: 100%; text-align: left;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 5px; padding: 0.65rem 0.9rem;
  cursor: pointer; font-family: var(--font-serif); font-size: 0.95rem; color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.mock-opt:hover { border-color: var(--accent); }
.mock-opt.picked { border-color: var(--accent); background: var(--accent-soft); }
.mock-opt.picked .q-key { border-color: var(--accent); background: var(--accent); color: #f6ead2; }

.mock-nav {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.2rem;
}
.mock-nav .btn:last-child { margin-left: auto; }
.mock-foot { margin-top: 1.5rem; text-align: center; }

/* ———— 成绩单 ———— */
.score-card {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
  margin-bottom: 1.5rem;
}
.score-card.pass { border-top: 4px solid var(--green); }
.score-card.fail { border-top: 4px solid #b4472f; }
.score-num { font-size: 3.5rem; font-weight: 700; color: var(--heading); line-height: 1; }
.score-num span { font-size: 1.2rem; color: var(--text-2); margin-left: 0.2rem; }
.score-card.pass .score-num { color: var(--green); }
.score-card.fail .score-num { color: #b4472f; }
.score-label { font-size: 1.2rem; color: var(--heading); margin: 0.8rem 0 0.4rem; letter-spacing: 0.08em; }
.score-detail { font-family: var(--font-sans); font-size: 0.88rem; color: var(--text-2); }
.score-actions { display: flex; gap: 0.7rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }

.review-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 17rem) minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
}
.review-sheet {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 1.1rem;
}
.review-sheet-head h2 {
  margin: 0;
  color: var(--heading);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}
.review-sheet-head p {
  margin: 0.3rem 0 0;
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 0.8rem;
}
.review-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  margin: 0.9rem 0;
  font-family: var(--font-sans);
  font-size: 0.75rem;
}
.review-legend .correct { color: var(--green); }
.review-legend .wrong { color: #b4472f; }
.review-legend .unanswered { color: var(--text-2); }
.review-index-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.38rem;
}
.review-index {
  min-width: 0;
  min-height: 2.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.review-index:hover { transform: translateY(-1px); }
.review-index span { font-size: 0.78rem; }
.review-index small { font-size: 0.65rem; font-weight: 700; }
.review-index.correct {
  color: var(--green);
  background: rgba(92,110,63,0.1);
  border-color: rgba(92,110,63,0.45);
}
.review-index.wrong {
  color: #b4472f;
  background: rgba(180,71,47,0.1);
  border-color: rgba(180,71,47,0.45);
}
.review-index.unanswered {
  color: var(--text-2);
  background: var(--bg-soft);
  border-style: dashed;
}
.review-index.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.review-detail {
  position: sticky;
  top: 1rem;
  min-width: 0;
}
.review-q {
  background: var(--card); border: 1px solid var(--card-edge);
  border-left-width: 3px; border-radius: 5px; padding: 1.1rem 1.3rem;
}
.review-q.ok { border-left-color: var(--green); }
.review-q.no { border-left-color: #b4472f; }
.review-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.7rem; }
.review-no { color: var(--text-2); font-family: var(--font-sans); font-size: 0.8rem; margin-right: 0.4rem; }
.review-tag { font-family: var(--font-sans); font-size: 0.78rem; font-weight: 700; }
.review-tag.ok { color: var(--green); }
.review-tag.no { color: #b4472f; }
.review-tag.correct { color: var(--green); }
.review-tag.wrong { color: #b4472f; }
.review-tag.unanswered { color: var(--text-2); }
.review-text { color: var(--heading); font-weight: 600; line-height: 1.7; margin-bottom: 0.8rem; }
.review-opts { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.6rem; font-family: var(--font-sans); font-size: 0.86rem; }
.review-opt { padding: 0.25rem 0.5rem; border-radius: 4px; color: var(--text-2); }
.review-opt.correct { background: rgba(92,110,63,0.12); color: var(--green); }
.review-opt.wrong { background: rgba(180,71,47,0.1); color: #b4472f; }
.review-ans { font-family: var(--font-sans); font-size: 0.82rem; color: var(--text-2); margin-bottom: 0.5rem; }

@media (max-width: 600px) {
  .exam-area-picker { align-items: stretch; }
  .exam-area-picker label, .exam-area-picker select, .exam-area-picker span { width: 100%; }
  .quiz-nav { flex-wrap: wrap; }
  .mock-topbar { gap: 0.6rem 1rem; }
  .mock-nav { position: sticky; bottom: 0; z-index: 8; padding: 0.7rem 0; background: var(--bg); }
  .review-layout { display: block; }
  .review-sheet { margin-bottom: 1rem; }
  .review-detail { position: static; }
  .q-text { font-size: 1.05rem; }
  .special-grid { grid-template-columns: 1fr; }
  .special-wrong-layout { display: block; }
  .special-wrong-sidebar { position: static; max-height: none; margin-top: 1rem; }
  .special-wrong-index {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }
  .special-wrong-index-btn { min-width: 0; }
  .special-wrong-index-btn span { overflow: hidden; text-overflow: ellipsis; }
}

/* 题目配图 */
.q-image { margin: 0 0 1.2rem; }
.q-image img {
  max-width: 100%;
  max-height: 18rem;
  border-radius: 5px;
  border: 1px solid var(--card-edge);
  display: block;
}
.mock-q .q-image { margin: 0.9rem 0; }
.review-q .q-image img { max-height: 12rem; }
