/* =========================================================
   坑位图鉴 · 视觉体系
   移动优先（390px 基准），桌面为放大版
   四套皮肤：night / acid / paper / mint
   ========================================================= */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --bg: #07090f;
  --bg-soft: #0b0e17;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #eef2f8;
  --ink-soft: #c3cad8;
  --muted: #8b93a7;
  --dim: #626a7c;
  --accent: #5ce1ff;
  --accent-2: #ff4d9d;
  --accent-3: #b8ff3d;
  --accent-ink: #041018;
  --good: #3ddc97;
  --bad: #ff5c7a;
  --warn: #ffc857;

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.22);
  --maxw: 1180px;
  --tabh: 62px;
}

html[data-skin="acid"] {
  --bg: #0a0906;
  --bg-soft: #100e08;
  --panel: rgba(255, 255, 255, 0.042);
  --panel-strong: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --ink: #f6f4ea;
  --ink-soft: #d5d1be;
  --muted: #9e9883;
  --dim: #746f5e;
  --accent: #d7ff3e;
  --accent-2: #ff7a00;
  --accent-3: #9a7bff;
  --accent-ink: #101300;
}

html[data-skin="paper"] {
  --bg: #f2efe8;
  --bg-soft: #e9e5db;
  --panel: rgba(255, 255, 255, 0.74);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(20, 22, 26, 0.11);
  --line-strong: rgba(20, 22, 26, 0.2);
  --ink: #14161a;
  --ink-soft: #353a44;
  --muted: #626a78;
  --dim: #8b93a0;
  --accent: #e8342a;
  --accent-2: #1f6feb;
  --accent-3: #0a8f6a;
  --accent-ink: #fffaf4;
  --good: #0a8f6a;
  --bad: #d92b3f;
  --warn: #a86a00;
  --shadow: 0 18px 50px rgba(60, 50, 30, 0.14);
  --shadow-soft: 0 8px 24px rgba(60, 50, 30, 0.10);
}

html[data-skin="mint"] {
  --bg: #05110f;
  --bg-soft: #081816;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.075);
  --line: rgba(160, 255, 230, 0.12);
  --line-strong: rgba(160, 255, 230, 0.22);
  --ink: #eafff9;
  --ink-soft: #c0e5db;
  --muted: #82a69d;
  --dim: #5c7c74;
  --accent: #35ffc3;
  --accent-2: #ffd166;
  --accent-3: #7aa7ff;
  --accent-ink: #00120d;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.62;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.35s ease, color 0.35s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(var(--line) 0.7px, transparent 0.7px);
  background-size: 26px 26px;
  opacity: 0.5;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 72%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.32;
  transition: opacity 0.4s;
}
.orb-a {
  width: 420px; height: 420px;
  top: -160px; right: -140px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 66%);
}
.orb-b {
  width: 380px; height: 380px;
  bottom: -180px; left: -160px;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 66%);
  opacity: 0.22;
}
html[data-skin="paper"] .orb { opacity: 0.18; }
html[data-skin="paper"] .grain { opacity: 0.05; }

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

a { color: inherit; }

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

button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-height: 40px;
}
.brand-mark { color: var(--accent); display: flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-size: 16px; letter-spacing: 0.12em; font-weight: 700; }
.brand-text i {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 8.5px;
  letter-spacing: 0.26em;
  color: var(--muted);
  margin-top: 4px;
}

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

.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-soft);
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s;
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--ink); background: var(--panel-strong); }
.icon-btn:active { transform: scale(0.95); }
.icon-btn.small { width: 34px; height: 34px; border-radius: 10px; font-size: 14px; }

/* ---------------- 搜索 ---------------- */
.searchbar {
  position: sticky;
  top: 61px;
  z-index: 39;
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.searchbar input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  outline: none;
  font-size: 15px;
}
.searchbar input::placeholder { color: var(--dim); }
.searchbar input:focus { border-color: var(--accent); }

/* ---------------- 主区域 ---------------- */
main {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 16px calc(var(--tabh) + 30px);
}

.view { animation: viewIn 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------------- Hero ---------------- */
.hero { padding: 14px 0 6px; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--panel);
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero-title {
  margin: 18px 0 0;
  font-size: clamp(30px, 8.6vw, 62px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.hero-title .line { display: block; }
.hero-title .accent {
  background: linear-gradient(96deg, var(--accent) 0%, var(--accent-3) 48%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-skin="paper"] .hero-title .accent {
  background: linear-gradient(96deg, #d92b3f 0%, #e8541f 55%, #a86400 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-sub {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 620px;
}
.hero-sub strong { color: var(--ink); font-weight: 600; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 20px;
}
.stat {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.stat b {
  display: block;
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink);
  font-weight: 600;
}
.stat span { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

/* 桌面分类索引 */
.hero-main { min-width: 0; }
.hero-side { display: none; }
.side-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--dim);
}
.side-head b { font-size: 18px; color: var(--accent); font-weight: 500; letter-spacing: 0; }
.side-list { display: flex; flex-direction: column; gap: 1px; margin-top: 6px; }
.side-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: none;
  padding: 5px 5px;
  border-radius: 6px;
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  transition: background 0.15s, color 0.15s;
}
.side-item:hover { background: var(--panel-strong); color: var(--ink); }
.side-code { font-family: var(--font-mono); font-size: 9px; color: var(--accent); width: 28px; flex: none; }
.side-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-n { font-family: var(--font-mono); font-size: 9.5px; color: var(--dim); flex: none; }
.side-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--dim);
  letter-spacing: 0.06em;
}
.side-foot i { font-style: normal; color: var(--accent); letter-spacing: -1px; }
.side-tip { margin-left: auto; }

/* 分类导语 */
.cat-intro {
  margin: 6px 0 10px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  background: var(--panel);
  border-radius: 0 14px 14px 0;
  padding: 14px 16px;
  animation: viewIn 0.28s;
}
.ci-code {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 5px;
}
.cat-intro h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -0.01em; }
.cat-intro p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.7; }
.ci-meta {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.06em;
}

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  height: 44px;
  padding: 0 20px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: linear-gradient(100deg, var(--accent), color-mix(in srgb, var(--accent) 62%, var(--accent-3)));
  color: var(--accent-ink);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 24%, transparent);
}
.btn.primary:hover { box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 36%, transparent); }
.btn.ghost {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink-soft);
}
.btn.ghost:hover { background: var(--panel-strong); border-color: var(--line-strong); }

.text-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12.5px;
  padding: 4px 2px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}
.text-btn:hover { color: var(--accent); }

/* 每日一坑 */
.daily {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 55%),
    var(--panel);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.daily:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.daily-badge {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 6px;
  padding: 4px 7px;
  white-space: nowrap;
}
.daily-body { min-width: 0; }
.daily-body b { display: block; font-size: 14.5px; font-weight: 600; }
.daily-body span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daily-arrow { margin-left: auto; color: var(--accent); font-family: var(--font-mono); }

/* 学习动线 */
.path {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.path-step {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 12px;
  padding: 10px 11px;
  transition: border-color 0.18s, background 0.18s, transform 0.15s;
}
.path-step:hover { border-color: var(--line-strong); background: var(--panel); }
.path-step:active { transform: scale(0.985); }
.path-step b {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 5px;
  padding: 2px 5px;
  flex: none;
}
.path-step span { display: block; font-size: 12.5px; color: var(--ink-soft); line-height: 1.35; }
.path-step em { display: block; font-style: normal; font-size: 10.5px; color: var(--dim); margin-top: 1px; }

/* 页脚 */
.foot {
  margin-top: 38px;
  padding: 18px 0 10px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 11.5px;
  color: var(--dim);
  line-height: 1.65;
}
.foot-left { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.foot-left b { color: var(--ink-soft); font-size: 12.5px; letter-spacing: 0.08em; }
.foot-right { display: flex; flex-direction: column; gap: 3px; }
.foot-mark { font-family: var(--font-mono); letter-spacing: 0.1em; color: var(--muted); }

/* ---------------- 筛选 ---------------- */
.filter-block { margin-top: 24px; scroll-margin-top: 78px; }
.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, #000 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 90%, transparent 100%);
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-row.sub { margin-top: 10px; align-items: center; justify-content: space-between; overflow: visible; flex-wrap: wrap; }

.chip {
  flex: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 12.5px;
  white-space: nowrap;
  transition: all 0.18s;
  min-height: 36px;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.on {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  font-weight: 600;
}
.chip .cnt { font-family: var(--font-mono); font-size: 10px; opacity: 0.6; margin-left: 4px; }

.level-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.level-chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dim);
  border-radius: 8px;
  font-size: 11.5px;
  padding: 8px 11px;
  min-height: 34px;
}
.level-chip.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }

.switch-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.switch-line input { accent-color: var(--accent); width: 15px; height: 15px; }

.result-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--dim);
  letter-spacing: 0.06em;
}

/* ---------------- 卡片网格 ---------------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.card {
  position: relative;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-md);
  padding: 16px 16px 14px;
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.22s, background 0.22s, box-shadow 0.22s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 128px;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 42%);
  opacity: 0;
  transition: opacity 0.22s;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}
.card:hover::after { opacity: 1; }
.card:active { transform: scale(0.99); }

.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.card-id {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.card-level {
  display: inline-flex;
  gap: 3px;
  margin-left: auto;
}
.card-level i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
}
.card-level i.on { background: var(--accent); }
.card-level[data-lv="3"] i.on { background: var(--accent-2); }

.card h3 {
  margin: 0 0 8px;
  font-size: 15.5px;
  line-height: 1.42;
  font-weight: 650;
  letter-spacing: -0.005em;
  position: relative;
  z-index: 1;
}
.card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.58;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
}
.card-cat {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 5px;
}
.card-mastered {
  margin-left: auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: transparent;
  background: transparent;
  flex: none;
}
.card.mastered { opacity: 0.55; }
.card.mastered .card-mastered {
  background: var(--good);
  border-color: var(--good);
  color: #04140d;
}
.card.mastered h3 { text-decoration: line-through; text-decoration-color: var(--line-strong); }

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.empty b { display: block; color: var(--ink); margin-bottom: 6px; font-size: 16px; }

/* ---------------- 章节头 ---------------- */
.section-head { padding: 12px 0 18px; }
.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 6.4vw, 38px);
  letter-spacing: -0.02em;
  font-weight: 800;
}
.section-head p { margin: 0; color: var(--muted); font-size: 14px; max-width: 640px; }

/* ---------------- 速查 ---------------- */
.quick-tools { position: sticky; top: 61px; z-index: 20; padding: 6px 0 10px; background: linear-gradient(var(--bg) 72%, transparent); }
.quick-list { display: flex; flex-direction: column; gap: 6px; }
.qrow {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.18s, background 0.18s;
}
.qrow:hover { border-color: var(--line-strong); }
.qrow-head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  background: none;
  border: none;
  padding: 12px 14px;
}
.qrow-id { font-family: var(--font-mono); font-size: 10px; color: var(--dim); padding-top: 3px; flex: none; width: 46px; }
.qrow-main { min-width: 0; flex: 1; }
.qrow-sym { font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.qrow-mem { font-size: 12px; color: var(--muted); margin-top: 3px; }
.qrow-plus { color: var(--dim); font-family: var(--font-mono); font-size: 15px; flex: none; transition: transform 0.25s; }
.qrow.open .qrow-plus { transform: rotate(45deg); color: var(--accent); }
.qrow-body {
  display: none;
  padding: 0 14px 14px 70px;
  font-size: 13px;
  color: var(--ink-soft);
}
.qrow.open .qrow-body { display: block; animation: viewIn 0.25s; }
.qrow-body b { color: var(--accent); font-weight: 600; }
.qrow-body .fixline { margin-top: 8px; padding: 9px 11px; border-left: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); border-radius: 0 8px 8px 0; }

/* ---------------- 自测 ---------------- */
.quiz-shell { max-width: 680px; }
.quiz-intro {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  text-align: center;
}
.quiz-ring {
  width: 92px; height: 92px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  font-family: var(--font-mono);
  font-size: 30px;
}
.quiz-ring .unit { font-size: 12px; color: var(--muted); }
.quiz-intro h3 { margin: 0 0 8px; font-size: 20px; }
.quiz-intro p { margin: 0 0 20px; color: var(--muted); font-size: 13.5px; }

.quiz-top {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.quiz-bar { flex: 1; height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.quiz-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-3)); transition: width 0.4s; }

.quiz-card {
  margin-top: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
}
.quiz-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 10px;
}
.quiz-card h3 { margin: 0 0 16px; font-size: 17px; line-height: 1.55; font-weight: 650; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.opt {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink-soft);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  transition: border-color 0.16s, background 0.16s, transform 0.12s;
  display: flex;
  gap: 10px;
}
.opt:hover:not(:disabled) { border-color: var(--line-strong); background: var(--panel-strong); }
.opt:active:not(:disabled) { transform: scale(0.99); }
.opt .letter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
  margin-top: 1px;
}
.opt.correct { border-color: var(--good); background: color-mix(in srgb, var(--good) 11%, transparent); }
.opt.correct .letter { color: var(--good); border-color: var(--good); }
.opt.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.opt.wrong .letter { color: var(--bad); border-color: var(--bad); }
.opt:disabled { cursor: default; opacity: 0.9; }

.quiz-explain {
  margin-top: 14px;
  border-left: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border-radius: 0 10px 10px 0;
  padding: 11px 13px;
  font-size: 13px;
  color: var(--ink-soft);
}
.quiz-actions { margin-top: 16px; display: flex; justify-content: flex-end; }

.quiz-result { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius-lg); padding: 26px 20px; text-align: center; }
.score-big { font-family: var(--font-mono); font-size: 64px; line-height: 1; background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.quiz-result p { color: var(--muted); font-size: 14px; }
.wrong-list { display: flex; flex-direction: column; gap: 6px; margin: 18px 0; text-align: left; }
.wrong-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--ink-soft);
  background: var(--bg-soft);
  cursor: pointer;
}
.wrong-item b { color: var(--bad); font-family: var(--font-mono); font-size: 10px; margin-right: 6px; }

/* ---------------- 记忆卡 ---------------- */
.deck-wrap { max-width: 520px; margin: 0 auto; }
.deck-meta { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.deck { perspective: 1400px; }
.flip-card { width: 100%; height: 320px; cursor: pointer; }
.flip-inner {
  position: relative;
  width: 100%; height: 100%;
  transition: transform 0.62s cubic-bezier(0.2, 0.75, 0.2, 1);
  transform-style: preserve-3d;
}
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 50%),
    var(--panel);
  box-shadow: var(--shadow-soft);
}
.flip-face.back {
  transform: rotateY(180deg);
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--accent-2) 9%, transparent), transparent 50%),
    var(--panel-strong);
  justify-content: center;
}
.flip-cat { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; color: var(--accent); }
.flip-face h3 { margin: auto 0; font-size: 21px; line-height: 1.5; letter-spacing: -0.01em; }
.flip-face p { margin: auto 0; font-size: 17px; line-height: 1.75; color: var(--ink); }
.flip-hint { font-size: 11px; color: var(--dim); margin-top: 10px; }
.deck-nav { display: flex; gap: 10px; margin-top: 14px; }
.deck-nav .btn { flex: 1; }
.deck-progress { height: 3px; background: var(--line); border-radius: 3px; margin-top: 14px; overflow: hidden; }
.deck-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.35s; }

/* ---------------- 实验室 ---------------- */
.labs-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.lab {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-md);
  padding: 16px;
}
.lab-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.lab-code { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--accent); }
.lab h3 { margin: 0; font-size: 16px; }
.lab-desc { margin: 4px 0 14px; color: var(--muted); font-size: 12.5px; }
.lab-body { display: flex; flex-direction: column; gap: 10px; }
.lab-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lab-row label { font-size: 12px; color: var(--muted); min-width: 96px; font-family: var(--font-mono); }
.lab-row input[type="range"] { flex: 1; min-width: 120px; accent-color: var(--accent); }
.lab-row select, .lab-row input[type="text"] {
  flex: 1;
  min-width: 120px;
  height: 36px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
  font-size: 13px;
}
.lab-out {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 42px;
}
.lab-out em { color: var(--accent); font-style: normal; }
.lab-note { font-size: 11.5px; color: var(--dim); }

/* CSS 优先级阶梯 */
.spec-ladder { display: flex; flex-direction: column; gap: 4px; }
.spec-row { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11.5px; }
.spec-row span:first-child { width: 56px; color: var(--muted); }
.spec-bar { flex: 1; height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.spec-bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 0.3s; }
.spec-row.win .spec-bar i { background: var(--accent-3); }
.spec-row span:last-child { width: 28px; text-align: right; color: var(--ink); }

/* flex 演示 */
.flex-demo {
  height: 150px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  display: flex;
  gap: 8px;
  padding: 8px;
  background: var(--bg-soft);
  overflow: hidden;
}
.flex-demo i {
  display: grid;
  place-items: center;
  min-width: 34px;
  min-height: 28px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 7px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 11px;
  color: var(--accent);
}

/* z-index 演示 */
.zstack {
  position: relative;
  height: 160px;
  background: var(--bg-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
}
.zbox {
  position: absolute;
  width: 96px; height: 96px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #fff;
}
.zbox.a { left: 18px; top: 22px; background: rgba(92, 225, 255, 0.62); }
.zbox.b { left: 68px; top: 46px; background: rgba(255, 77, 157, 0.62); }
.zbox.parent-transform { transform: translateZ(0); }
.hint-badge {
  position: absolute;
  right: 8px; bottom: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 7px;
}

/* 端口映射演示 */
.port-map { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.port-box {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.port-box b { display: block; font-size: 18px; color: var(--ink); margin: 4px 0; }
.port-box span { color: var(--muted); font-size: 10px; }
.port-arrow { font-family: var(--font-mono); color: var(--accent); font-size: 18px; }
.port-status { font-size: 12px; padding: 8px 10px; border-radius: 8px; font-family: var(--font-mono); }
.port-status.ok { color: var(--good); background: color-mix(in srgb, var(--good) 10%, transparent); border: 1px solid color-mix(in srgb, var(--good) 30%, transparent); }
.port-status.no { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }

/* Git 状态机 */
.git-stage { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.git-cell {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 9px;
  padding: 8px 6px;
  text-align: center;
  min-height: 78px;
  font-size: 10.5px;
  color: var(--muted);
}
.git-cell b { display: block; color: var(--ink-soft); font-size: 11px; margin-bottom: 4px; }
.git-file {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  border-radius: 4px;
  padding: 1px 5px;
  margin: 1px;
}
.git-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.git-btns button {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--ink-soft);
}
.git-btns button:hover { border-color: var(--accent); color: var(--accent); }

/* Token 温度演示 */
.token-meters { display: flex; flex-direction: column; gap: 7px; }
.token-meter { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.token-meter span:first-child { width: 76px; }
.token-meter .tm-bar { flex: 1; height: 7px; background: var(--line); border-radius: 4px; overflow: hidden; }
.token-meter .tm-bar i { display: block; height: 100%; background: var(--accent); transition: width 0.3s; width: 0; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 70px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); }
.bars i { flex: 1; background: color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 3px 3px 0 0; min-height: 2px; transition: height 0.25s; }

/* ---------------- 急救 ---------------- */
.triage-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.triage-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-md);
  padding: 16px;
}
.triage-card h3 { margin: 0 0 4px; font-size: 16px; }
.triage-card > p { margin: 0 0 14px; color: var(--muted); font-size: 12.5px; }
.triage-q { font-size: 13.5px; margin-bottom: 10px; color: var(--ink-soft); }
.triage-opts { display: flex; flex-direction: column; gap: 6px; }
.triage-opt {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.triage-opt:hover { border-color: var(--accent); color: var(--accent); }
.triage-result {
  margin-top: 10px;
  border-left: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
  font-size: 12.5px;
}
.triage-result b { color: var(--accent); }
.triage-result a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------------- 底部导航 ---------------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  display: flex;
  align-items: stretch;
  height: calc(var(--tabh) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-top: 1px solid var(--line);
}
.tabbar button {
  flex: 1;
  border: none;
  background: none;
  color: var(--dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 6px 0;
  position: relative;
  transition: color 0.18s;
}
.tabbar button .tab-ico {
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1;
}
.tabbar button.active { color: var(--accent); }
.tabbar button.active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 22px; height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------------- 抽屉 ---------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(2, 4, 8, 0.62);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.25s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.drawer {
  position: fixed;
  z-index: 61;
  left: 0; right: 0; bottom: 0;
  max-height: 92vh;
  background: var(--bg-soft);
  border-top: 1px solid var(--line-strong);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  animation: drawerUp 0.38s cubic-bezier(0.2, 0.75, 0.2, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
@keyframes drawerUp { from { transform: translateY(8%); opacity: 0.6; } to { transform: none; opacity: 1; } }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.drawer-id { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--accent); }
.drawer-head-actions { display: flex; gap: 6px; }
.drawer-head-actions .icon-btn.on { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }

.drawer-body {
  overflow-y: auto;
  padding: 18px;
  -webkit-overflow-scrolling: touch;
}
.drawer-body h2 {
  margin: 0 0 6px;
  font-size: 23px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.drawer-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 6px;
}
.tag.accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 32%, transparent); }

.section {
  border-top: 1px solid var(--line);
  padding: 15px 0;
}
.section:first-of-type { border-top: none; padding-top: 0; }
.section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--dim);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.section-label::before {
  content: "";
  width: 12px; height: 1px;
  background: var(--accent);
}
.section p { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.72; }
.section .symptom { font-family: var(--font-mono); font-size: 12.5px; color: var(--warn); background: color-mix(in srgb, var(--warn) 7%, transparent); border-radius: 8px; padding: 10px 12px; line-height: 1.65; }
.section .analogy { border-left: 2px solid var(--accent-2); padding-left: 12px; color: var(--muted); font-size: 13.5px; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: st; }
.steps li {
  counter-increment: st;
  position: relative;
  padding: 6px 0 6px 30px;
  font-size: 13.5px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}
.steps li::before {
  content: counter(st, decimal-leading-zero);
  position: absolute;
  left: 0; top: 7px;
  font-size: 9.5px;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 4px;
  padding: 0 4px;
}

.fix-box {
  background: color-mix(in srgb, var(--good) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--good) 22%, transparent);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.7;
}
.memory-box {
  text-align: center;
  padding: 18px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    var(--panel);
}
.memory-box q {
  display: block;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.55;
  letter-spacing: -0.01em;
  quotes: none;
}

.drawer-quiz { margin-top: 6px; }
.drawer-quiz .dq {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
  background: var(--panel);
}
.drawer-quiz .dq h4 { margin: 0 0 10px; font-size: 14px; line-height: 1.55; }
.dq-opts { display: flex; flex-direction: column; gap: 6px; }
.dq-opt {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.dq-opt.correct { border-color: var(--good); color: var(--good); }
.dq-opt.wrong { border-color: var(--bad); color: var(--bad); }
.dq-why { margin-top: 9px; font-size: 12px; color: var(--muted); }

.drawer-nav { display: flex; gap: 8px; padding: 12px 18px 18px; border-top: 1px solid var(--line); flex: none; }
.drawer-nav .btn { flex: 1; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabh) + 22px);
  transform: translate(-50%, 16px);
  z-index: 90;
  background: var(--ink);
  color: var(--bg);
  font-size: 12.5px;
  padding: 9px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
  max-width: 88vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 响应式 ---------------- */
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .labs-grid { grid-template-columns: repeat(2, 1fr); }
  .triage-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { max-width: 460px; }
}

@media (min-width: 900px) {
  body { font-size: 15.5px; }
  main { padding: 30px 24px 120px; }
  .topbar { padding: 12px 24px; }
  .searchbar { top: 65px; padding: 10px 24px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .labs-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .triage-grid { grid-template-columns: repeat(3, 1fr); }
  .path { grid-template-columns: repeat(4, 1fr); }
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 38px; align-items: start; }
  .hero-side {
    display: block;
    border: 1px solid var(--line);
    border-radius: 18px;
    background:
      linear-gradient(160deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 46%),
      var(--panel);
    padding: 14px 14px 10px;
    box-shadow: var(--shadow-soft);
  }
  .filter-row { flex-wrap: wrap; overflow: visible; mask-image: none; -webkit-mask-image: none; }
  .foot { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .foot-right { text-align: right; align-items: flex-end; }
  .tabbar { display: none; }
  .drawer {
    left: auto; right: 0; top: 0; bottom: 0;
    width: 540px;
    max-height: none;
    border-radius: 0;
    border-left: 1px solid var(--line-strong);
    border-top: none;
    animation: drawerSide 0.32s cubic-bezier(0.2, 0.75, 0.2, 1);
  }
  @keyframes drawerSide { from { transform: translateX(6%); opacity: 0.7; } to { transform: none; opacity: 1; } }
  .toast { bottom: 28px; }
  .qrow-body { padding-left: 82px; padding-right: 26px; }
  .quick-tools { top: 65px; }
}

/* 桌面顶部导航（移动端隐藏） */
.desk-nav { display: none; }
@media (min-width: 900px) {
  .desk-nav { display: flex; gap: 2px; margin-left: auto; margin-right: 8px; }
  .desk-nav button {
    border: none;
    background: none;
    color: var(--muted);
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color 0.18s, background 0.18s;
  }
  .desk-nav button:hover { color: var(--ink); background: var(--panel); }
  .desk-nav button.active { color: var(--accent); }
  .brand-text b { font-size: 18px; }
}

/* 减少动效 */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .card:hover { transform: none; }
}

/* 极窄屏 */
@media (max-width: 359px) {
  main { padding-left: 12px; padding-right: 12px; }
  .hero-title { font-size: 27px; }
  .card { padding: 14px; }
}
