/* AI-GEN-BEGIN */
/* ===== LEUC 12 主题变量（对齐 leuc-ui-theme） ===== */
:root,
html[data-theme="leuc"] {
  color-scheme: light;
  --navy: #071829;
  --bg: #f3f7fb;
  --body-a: #e8f4f0;
  --body-b: #dce8f5;
  --ink: #0f172a;
  --muted: #64748b;
  --card: rgba(255, 255, 255, 0.78);
  --line: #d7e0ea;
  --accent: #1863dc;
  --accent-2: #00b48a;
  --accent-ink: #fff;
  --danger: #dc2626;
  --ok: #059669;
  --header-bg: rgba(243, 247, 251, 0.82);
  --radius: 14px;
  --shadow: 0 18px 50px rgba(7, 24, 41, 0.08);
  --font: "Plus Jakarta Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: var(--font);
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --cover-overlay: linear-gradient(180deg, rgba(7,24,41,0.05), rgba(7,24,41,0.55));
  --rail: #00b48a;
}

html[data-theme="github-light"] {
  color-scheme: light;
  --bg: #f6f8fa; --body-a: #ffffff; --body-b: #eef2f6; --ink: #1f2328; --muted: #656d76;
  --card: #fff; --line: #d0d7de; --accent: #0969da; --accent-2: #1a7f37; --accent-ink: #fff;
  --header-bg: rgba(246,248,250,0.9); --radius: 10px; --rail: #0969da;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif; --display: var(--font);
  --cover-overlay: linear-gradient(180deg, rgba(31,35,40,0.05), rgba(31,35,40,0.5));
}

html[data-theme="github-dark"] {
  color-scheme: dark;
  --bg: #0d1117; --body-a: #161b22; --body-b: #0d1117; --ink: #e6edf3; --muted: #8b949e;
  --card: rgba(22,27,34,0.88); --line: #30363d; --accent: #58a6ff; --accent-2: #3fb950; --accent-ink: #0d1117;
  --header-bg: rgba(13,17,23,0.88); --radius: 10px; --rail: #58a6ff; --shadow: 0 18px 50px rgba(0,0,0,0.35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif; --display: var(--font);
  --cover-overlay: linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.65));
}

html[data-theme="catppuccin"] {
  color-scheme: dark;
  --bg: #1e1e2e; --body-a: #181825; --body-b: #313244; --ink: #cdd6f4; --muted: #a6adc8;
  --card: rgba(30,30,46,0.9); --line: #313244; --accent: #cba6f7; --accent-2: #89b4fa; --accent-ink: #1e1e2e;
  --header-bg: rgba(30,30,46,0.9); --radius: 14px; --rail: #cba6f7; --shadow: 0 18px 50px rgba(0,0,0,0.35);
  --cover-overlay: linear-gradient(180deg, rgba(24,24,37,0.2), rgba(24,24,37,0.7));
}

html[data-theme="tokyo-night"] {
  color-scheme: dark;
  --bg: #1a1b26; --body-a: #24283b; --body-b: #414868; --ink: #c0caf5; --muted: #565f89;
  --card: rgba(36,40,59,0.9); --line: #3b4261; --accent: #7aa2f7; --accent-2: #bb9af7; --accent-ink: #1a1b26;
  --header-bg: rgba(26,27,38,0.9); --radius: 14px; --rail: #7aa2f7; --shadow: 0 18px 50px rgba(0,0,0,0.4);
  --cover-overlay: linear-gradient(180deg, rgba(26,27,38,0.15), rgba(26,27,38,0.75));
}

html[data-theme="nord"] {
  color-scheme: dark;
  --bg: #2e3440; --body-a: #3b4252; --body-b: #434c5e; --ink: #eceff4; --muted: #d8dee9;
  --card: rgba(59,66,82,0.88); --line: #4c566a; --accent: #88c0d0; --accent-2: #a3be8c; --accent-ink: #2e3440;
  --header-bg: rgba(46,52,64,0.9); --radius: 14px; --rail: #88c0d0; --shadow: 0 18px 50px rgba(0,0,0,0.3);
  --cover-overlay: linear-gradient(180deg, rgba(46,52,64,0.2), rgba(46,52,64,0.7));
}

html[data-theme="paper"] {
  color-scheme: light;
  --bg: #f6ecd9; --body-a: #fbf5e8; --body-b: #efe2c6; --ink: #3f2a14; --muted: #8a6a45;
  --card: rgba(255,250,240,0.9); --line: #e2d2b0; --accent: #0f766e; --accent-2: #b45309; --accent-ink: #fff;
  --header-bg: rgba(246,236,217,0.9); --radius: 8px; --rail: #b45309;
  --font: Georgia, "Songti SC", "Noto Serif SC", serif; --display: var(--font);
  --cover-overlay: linear-gradient(180deg, rgba(63,42,20,0.05), rgba(63,42,20,0.55));
}

html[data-theme="neon"] {
  color-scheme: dark;
  --bg: #05010a; --body-a: #12061f; --body-b: #3b0764; --ink: #e2e8f0; --muted: #94a3b8;
  --card: rgba(12,6,24,0.88); --line: #3b0764; --accent: #22d3ee; --accent-2: #d946ef; --accent-ink: #05010a;
  --header-bg: rgba(5,1,10,0.92); --radius: 4px; --rail: #22d3ee; --shadow: 0 0 40px rgba(34,211,238,0.12);
  --font: "JetBrains Mono", ui-monospace, monospace; --display: var(--font);
  --cover-overlay: linear-gradient(180deg, rgba(217,70,239,0.15), rgba(5,1,10,0.8));
}

html[data-theme="ocean"] {
  color-scheme: dark;
  --bg: #012a4a; --body-a: #013a63; --body-b: #014f86; --ink: #e0fbfc; --muted: #90e0ef;
  --card: rgba(1,58,99,0.75); --line: #01497c; --accent: #48cae4; --accent-2: #02c39a; --accent-ink: #012a4a;
  --header-bg: rgba(1,42,74,0.9); --radius: 18px; --rail: #48cae4; --shadow: 0 20px 60px rgba(0,0,0,0.35);
  --cover-overlay: linear-gradient(180deg, rgba(1,42,74,0.1), rgba(1,42,74,0.75));
}

html[data-theme="rose"] {
  color-scheme: light;
  --bg: #fff1f5; --body-a: #fce7f3; --body-b: #fff; --ink: #831843; --muted: #9d174d;
  --card: rgba(255,255,255,0.88); --line: #fbcfe8; --accent: #db2777; --accent-2: #9d174d; --accent-ink: #fff;
  --header-bg: rgba(255,241,245,0.92); --radius: 22px; --rail: #db2777;
  --cover-overlay: linear-gradient(180deg, rgba(131,24,67,0.05), rgba(131,24,67,0.5));
}

html[data-theme="ink"] {
  color-scheme: light;
  --bg: #fff; --body-a: #fff; --body-b: #f5f5f5; --ink: #111; --muted: #555;
  --card: #fff; --line: #111; --accent: #000; --accent-2: #111; --accent-ink: #fff;
  --header-bg: rgba(255,255,255,0.95); --radius: 0; --rail: #000; --shadow: none;
  --font: Georgia, Times, "Songti SC", serif; --display: var(--font);
  --cover-overlay: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.55));
}

html[data-theme="antd"] {
  color-scheme: light;
  --bg: #f5f5f5; --body-a: #f0f2f5; --body-b: #ffffff; --ink: #000000e0; --muted: #00000073;
  --card: #fff; --line: #f0f0f0; --accent: #1677ff; --accent-2: #52c41a; --accent-ink: #fff;
  --header-bg: rgba(255,255,255,0.92); --radius: 6px; --rail: #1677ff; --shadow: 0 6px 16px rgba(0,0,0,0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: var(--font);
  --cover-overlay: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.5));
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html {
  background-color: var(--bg);
  color-scheme: inherit;
}
body {
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1000px 480px at 8% -10%, var(--body-a) 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, var(--body-b) 0%, transparent 50%);
  background-attachment: fixed;
  font-family: var(--font);
  line-height: 1.65;
  position: relative;
  transition: color 0.25s ease, background-color 0.25s ease;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

#fx-layer,
#fx-sky {
  position: fixed; inset: 0; pointer-events: none !important; z-index: 0;
  width: 100%; height: 100%;
}
/* 粒子 / 鼠标跟随 / 点击特效必须高于正文，且不能落在 #fx-layer 堆叠上下文内 */
#fx-canvas {
  position: fixed; inset: 0; pointer-events: none !important; z-index: 9999;
  width: 100%; height: 100%;
}
body > header, body > main, body > footer, body > .home-banner {
  position: relative;
  z-index: 1;
}
/* 后台：保证导航/按钮可点，不被特效层或粘性头干扰 */
.page-admin .site-header--admin {
  z-index: 100;
  position: sticky;
  top: 0;
}
.page-admin .site-header--admin .nav a,
.page-admin .site-header--admin .nav button,
.page-admin .site-header--admin .brand {
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.page-admin main,
.page-admin main a,
.page-admin main button,
.page-admin main input,
.page-admin main select,
.page-admin main textarea,
.page-admin main label {
  pointer-events: auto;
}

.wrap { width: min(980px, calc(100% - 2rem)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.95rem 0; gap: 1rem;
}
.brand {
  font-family: var(--display);
  font-size: 1.2rem; font-weight: 700; color: var(--ink);
  letter-spacing: 0.04em; text-decoration: none;
}
.nav { display: flex; gap: 0.85rem; align-items: center; flex-wrap: wrap; font-size: 0.92rem; }
.site-footer { margin-top: 4.5rem; padding: 2rem 0; color: var(--muted); font-size: 0.82rem; }

/* ===== 前台：封面天梯 ===== */
.hero-cover { padding: 3rem 0 1.2rem; }
.hero-cover h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  margin: 0.2rem 0 0; letter-spacing: -0.02em; font-weight: 700;
}
.eyebrow {
  margin: 0; color: var(--muted); font-size: 0.85rem;
  letter-spacing: 0.18em; text-transform: uppercase;
}

.cat-nav {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin: 0.5rem 0 2rem;
}
.cat-chip {
  display: inline-flex; align-items: center;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted); font-size: 0.85rem;
  background: transparent; text-decoration: none;
}
.cat-chip:hover, .cat-chip.active {
  color: var(--accent-ink); background: var(--accent);
  border-color: transparent; text-decoration: none;
}

.timeline { display: grid; gap: 0; }
.timeline-group {
  display: grid; grid-template-columns: 28px 1fr; gap: 1rem;
  position: relative;
}
.timeline-rail {
  position: relative; display: flex; flex-direction: column; align-items: center;
}
.timeline-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--rail); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rail) 22%, transparent);
  margin-top: 0.35rem; flex-shrink: 0;
}
.timeline-line {
  flex: 1; width: 2px; background: var(--line); margin: 0.4rem 0 0;
  min-height: 2rem;
}
.timeline-group:last-child .timeline-line { opacity: 0; }
.timeline-label {
  margin: 0 0 1rem; font-size: 0.92rem; color: var(--muted);
  letter-spacing: 0.08em; font-weight: 600;
}
.ladder-list { display: grid; gap: 1.1rem; margin-bottom: 2.2rem; }
.ladder-card {
  display: grid; grid-template-columns: minmax(140px, 38%) 1fr; gap: 0;
  overflow: hidden; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); color: inherit; text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  min-height: 160px;
}
.ladder-card:hover {
  transform: translateY(-3px); text-decoration: none;
  box-shadow: 0 24px 60px color-mix(in srgb, var(--ink) 14%, transparent);
}
.ladder-cover {
  background-size: cover; background-position: center;
  position: relative; min-height: 160px;
}
.ladder-cover::after {
  content: ""; position: absolute; inset: 0;
  background: var(--cover-overlay); opacity: 0.35;
}
.ladder-cover--empty {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 35%, transparent), transparent),
    color-mix(in srgb, var(--ink) 8%, var(--bg));
}
.ladder-body { padding: 1.15rem 1.25rem; display: grid; align-content: center; gap: 0.35rem; }
.ladder-body h2 {
  margin: 0; font-family: var(--display); font-size: 1.25rem; font-weight: 650; line-height: 1.35;
}
.ladder-body p {
  margin: 0; color: var(--muted); font-size: 0.92rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ladder-meta {
  display: flex; gap: 0.65rem; align-items: center; flex-wrap: wrap;
  color: var(--muted); font-size: 0.8rem;
}
.ladder-cat {
  padding: 0.1rem 0.5rem; border-radius: 999px;
  border: 1px solid var(--line); font-size: 0.75rem;
}
.empty-hint { padding: 2rem 0; }

.post-cover { padding: 1.5rem 0 3rem; }
.post-hero-cover {
  width: 100%; aspect-ratio: 21 / 9; border-radius: var(--radius);
  background-size: cover; background-position: center;
  margin-bottom: 1.5rem; border: 1px solid var(--line);
  position: relative;
}
.post-hero-cover::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--cover-overlay); opacity: 0.25;
}
.post-header h1 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  margin: 0.5rem 0 1.2rem; letter-spacing: -0.02em;
}
.content { font-size: 1.06rem; max-width: 42rem; }
.content pre, .content code { font-family: var(--mono); font-size: 0.92em; }
.content pre {
  background: color-mix(in srgb, var(--ink) 92%, #000); color: #f5f5f4;
  padding: 1rem; border-radius: calc(var(--radius) * 0.7); overflow: auto;
}
/* AI-GEN-BEGIN */
.content img { max-width: 100%; height: auto; border-radius: calc(var(--radius) * 0.6); }
.content video, .content audio { width: 100%; max-width: 42rem; margin: 1rem 0; }
.content iframe {
  display: block; width: 100%; max-width: 42rem; aspect-ratio: 16 / 9;
  height: auto; min-height: 220px; border: 0; border-radius: calc(var(--radius) * 0.6);
  margin: 1rem 0; background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.editor .tox-tinymce { border-radius: calc(var(--radius) * 0.7); border-color: var(--line) !important; }
.usage-board { display: grid; gap: 1.15rem; }
.usage-pie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}
.usage-meter--pie {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.9rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 70%, transparent);
}
.usage-meter-body { min-width: 0; display: grid; gap: 0.45rem; }
.usage-meter-head {
  display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap;
  font-size: 0.92rem;
}
.usage-meter-head strong { font-weight: 700; }
.usage-meter-head span { color: var(--muted); font-size: 0.82rem; }
.usage-pie {
  position: relative;
  width: 120px; height: 120px;
  flex-shrink: 0;
}
.usage-pie svg { display: block; }
.usage-pie-track { stroke: color-mix(in srgb, var(--line) 80%, transparent); }
.usage-pie-rest { stroke: color-mix(in srgb, var(--muted) 28%, transparent); }
.usage-pie-used { stroke: var(--ok, #16a34a); stroke-linecap: butt; transition: stroke-dasharray 0.35s ease; }
.usage-pie-used.warn { stroke: #d97706; }
.usage-pie-used.danger { stroke: var(--danger); }
.usage-pie-center {
  position: absolute; inset: 0;
  display: grid; place-content: center; text-align: center;
  pointer-events: none;
}
.usage-pie-center strong {
  font-size: 1.25rem; font-weight: 750; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.usage-pie-center span {
  font-size: 0.72rem; color: var(--muted); margin-top: 0.15rem;
}
.usage-pie-legend {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.25rem; font-size: 0.8rem;
}
.usage-pie-legend li {
  display: flex; align-items: center; gap: 0.4rem; color: var(--muted);
}
.usage-pie-legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.usage-pie-legend .dot {
  width: 0.55rem; height: 0.55rem; border-radius: 50%; flex-shrink: 0;
  background: color-mix(in srgb, var(--muted) 35%, transparent);
}
.usage-pie-legend .dot.used { background: var(--ok, #16a34a); }
.usage-pie-legend .dot.used.warn { background: #d97706; }
.usage-pie-legend .dot.used.danger { background: var(--danger); }
.usage-bar {
  height: 0.55rem; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden;
}
.usage-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ok, #16a34a); }
.usage-bar i.warn { background: #d97706; }
.usage-bar i.danger { background: var(--danger); }
.usage-steps { margin: 0.5rem 0 0; padding-left: 1.2rem; line-height: 1.7; }
.usage-steps code { font-size: 0.85em; }
@media (max-width: 520px) {
  .usage-meter--pie { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .usage-meter-head { justify-content: center; }
  .usage-pie-legend li { justify-content: center; }
}
/* AI-GEN-END */
.back-link { margin-top: 2.5rem; }
.empty { text-align: center; padding: 4rem 0; }

/* ===== 后台通用 ===== */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.25rem;
}
.card.narrow { max-width: 420px; margin: 2rem auto; }
.stack { display: grid; gap: 0.9rem; }
.stack label { display: grid; gap: 0.35rem; font-size: 0.92rem; color: var(--muted); }
input, textarea, select, button, .btn {
  font: inherit; border-radius: calc(var(--radius) * 0.7); border: 1px solid var(--line);
  padding: 0.65rem 0.8rem; background: color-mix(in srgb, var(--card) 80%, #fff);
  color: var(--ink);
}
button, .btn {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: var(--accent-ink); border-color: transparent;
  cursor: pointer; display: inline-block; text-align: center; font-weight: 600;
}
button:hover, .btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn.ghost {
  background: transparent; color: var(--ink); border-color: var(--line);
}
.linkish {
  background: none; border: none; color: var(--accent); padding: 0; cursor: pointer;
  font: inherit; box-shadow: none;
}
.danger { color: var(--danger) !important; }
.error { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); padding: 0.6rem 0.8rem; border-radius: 8px; }
.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); padding: 0.6rem 0.8rem; border-radius: 8px; }
.muted { color: var(--muted); }
.tip { font-size: 0.85rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1.5rem 0 1rem; }
.toolbar h1, .subhead { margin: 0; font-family: var(--display); }
/* AI-GEN-BEGIN */
.toolbar-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.btn.secondary, button.secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid color-mix(in srgb, var(--fg) 28%, transparent);
}
.btn.secondary:hover, button.secondary:hover { filter: none; background: color-mix(in srgb, var(--fg) 6%, transparent); }
/* AI-GEN-END */
.subhead { font-size: 1.05rem; margin-bottom: 0.75rem; }
.table-wrap { overflow: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.badge {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px;
  font-size: 0.75rem; background: color-mix(in srgb, var(--muted) 18%, transparent);
}
.badge.published { background: color-mix(in srgb, var(--accent-2) 25%, transparent); color: var(--accent-2); }
.badge.draft { color: var(--muted); }
.actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
/* AI-GEN-BEGIN */
.drag-cell { width: 2rem; color: var(--muted); user-select: none; }
.drag-handle { cursor: grab; font-size: 1.1rem; letter-spacing: -0.1em; }
tr.dragging { opacity: 0.55; background: color-mix(in srgb, var(--accent) 8%, transparent); }
tr.drag-over { outline: 1px dashed var(--accent); }
tbody#post-sort-body tr[data-id] { cursor: grab; }
tbody#post-sort-body tr[data-id]:active { cursor: grabbing; }
/* AI-GEN-END */
.row, .form-inline { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.inline { display: inline; margin: 0; }
.inline-edit { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.stack-tight { gap: 0.4rem; }
code { font-family: var(--mono); font-size: 0.85em; }

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  position: relative;
  z-index: 2;
}
.theme-card {
  position: relative;
  display: grid; gap: 0.35rem; padding: 0.75rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; background: color-mix(in srgb, var(--card) 70%, transparent);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  user-select: none;
}
.theme-card:hover { transform: translateY(-1px); }
.theme-card.active, .theme-card:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
}
/* 整卡可点：radio 铺满卡片 */
.theme-card input[type="radio"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
  pointer-events: auto;
}
.theme-swatch {
  height: 40px; border-radius: calc(var(--radius) * 0.5);
  border: 1px solid var(--line);
  background: linear-gradient(120deg, var(--sw-a, #1863dc), var(--sw-b, #00b48a));
  pointer-events: none;
}
.theme-swatch[data-preview="leuc"] { --sw-a: #1863dc; --sw-b: #00b48a; }
.theme-swatch[data-preview="github-light"] { --sw-a: #0969da; --sw-b: #1a7f37; }
.theme-swatch[data-preview="github-dark"] { --sw-a: #0d1117; --sw-b: #58a6ff; }
.theme-swatch[data-preview="catppuccin"] { --sw-a: #1e1e2e; --sw-b: #cba6f7; }
.theme-swatch[data-preview="tokyo-night"] { --sw-a: #1a1b26; --sw-b: #7aa2f7; }
.theme-swatch[data-preview="nord"] { --sw-a: #2e3440; --sw-b: #88c0d0; }
.theme-swatch[data-preview="paper"] { --sw-a: #f6ecd9; --sw-b: #b45309; }
.theme-swatch[data-preview="neon"] { --sw-a: #05010a; --sw-b: #22d3ee; }
.theme-swatch[data-preview="ocean"] { --sw-a: #012a4a; --sw-b: #48cae4; }
.theme-swatch[data-preview="rose"] { --sw-a: #fce7f3; --sw-b: #db2777; }
.theme-swatch[data-preview="ink"] { --sw-a: #000; --sw-b: #fff; }
.theme-swatch[data-preview="antd"] { --sw-a: #001529; --sw-b: #1677ff; }
.theme-name { font-weight: 650; font-size: 0.92rem; pointer-events: none; }
.theme-desc { font-size: 0.78rem; color: var(--muted); pointer-events: none; }

html[data-theme="neon"] body {
  animation: neonPulse 2.4s ease-in-out infinite alternate;
}
@keyframes neonPulse {
  from { filter: saturate(1); }
  to { filter: saturate(1.15) hue-rotate(8deg); }
}
html[data-theme="ink"] .ladder-card:hover { transform: none; }

@media (max-width: 720px) {
  .ladder-card { grid-template-columns: 1fr; }
  .ladder-cover { min-height: 140px; aspect-ratio: 16 / 9; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .timeline-group { grid-template-columns: 18px 1fr; gap: 0.75rem; }
}

/* ===== 首页：加强头尾 + 全宽轮播 ===== */
.site-header--home .brand {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  letter-spacing: 0.06em;
}
/* AI-GEN-BEGIN */
.site-header--galaxy {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(140, 170, 255, 0.18);
  background: #050816;
  backdrop-filter: none;
  overflow: hidden;
}
.site-header--galaxy .galaxy-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 120% at 15% 40%, rgba(120, 90, 255, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 100% at 80% 30%, rgba(60, 140, 255, 0.28), transparent 50%),
    radial-gradient(ellipse 50% 80% at 50% 100%, rgba(255, 120, 180, 0.12), transparent 45%),
    linear-gradient(180deg, #070b1c 0%, #0a1028 45%, #050816 100%);
}
.site-header--galaxy .galaxy-bg::before,
.site-header--galaxy .galaxy-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 22%, rgba(255,255,255,0.95), transparent),
    radial-gradient(1px 1px at 18% 68%, rgba(255,255,255,0.75), transparent),
    radial-gradient(1.2px 1.2px at 28% 14%, rgba(200,220,255,0.9), transparent),
    radial-gradient(1px 1px at 36% 52%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.6px 1.6px at 48% 28%, rgba(255,255,255,0.95), transparent),
    radial-gradient(1px 1px at 58% 74%, rgba(200,230,255,0.8), transparent),
    radial-gradient(1.3px 1.3px at 66% 18%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1px 1px at 74% 60%, rgba(255,255,255,0.65), transparent),
    radial-gradient(1.4px 1.4px at 84% 34%, rgba(220,230,255,0.9), transparent),
    radial-gradient(1px 1px at 92% 78%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.2px 1.2px at 12% 88%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 42% 8%, rgba(255,255,255,0.8), transparent);
  opacity: 0.9;
  animation: galaxy-twinkle 6s ease-in-out infinite alternate;
}
.site-header--galaxy .galaxy-bg::after {
  transform: scaleX(-1);
  opacity: 0.55;
  animation-duration: 9s;
}
@keyframes galaxy-twinkle {
  from { opacity: 0.55; }
  to { opacity: 0.95; }
}
.header-inner--galaxy {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.2rem;
}
.header-inner--galaxy .brand {
  color: #f4f7ff;
  text-shadow: 0 0 18px rgba(140, 180, 255, 0.45);
  justify-self: start;
}
.header-inner--galaxy .home-nav {
  justify-self: end;
}
.header-inner--galaxy .home-nav a {
  color: rgba(210, 220, 255, 0.78);
}
.header-inner--galaxy .home-nav a:hover,
.header-inner--galaxy .home-nav a.is-active {
  color: #fff;
}
.header-celestial {
  justify-self: center;
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
}
.celestial-orb {
  display: block;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  position: relative;
  transition: transform 0.6s ease, box-shadow 0.6s ease, background 0.6s ease;
}
.celestial-sun {
  background: radial-gradient(circle at 35% 30%, #fff7c8 0%, #ffd56a 42%, #ff9b3d 100%);
  box-shadow:
    0 0 18px rgba(255, 200, 80, 0.85),
    0 0 42px rgba(255, 150, 40, 0.45);
  animation: sun-pulse 3.2s ease-in-out infinite alternate;
}
.celestial-sun.phase-dawn,
.celestial-sun.phase-golden {
  background: radial-gradient(circle at 35% 30%, #ffe0a8 0%, #ffb05a 50%, #ff6b3d 100%);
  box-shadow:
    0 0 20px rgba(255, 140, 60, 0.9),
    0 0 48px rgba(255, 90, 40, 0.4);
}
.celestial-moon {
  background: radial-gradient(circle at 35% 30%, #f7f4ea 0%, #d9e0ef 55%, #9eacc4 100%);
  box-shadow:
    0 0 16px rgba(200, 220, 255, 0.55),
    0 0 36px rgba(120, 160, 255, 0.28);
}
.celestial-moon::after {
  content: "";
  position: absolute;
  inset: 0.15rem 0.55rem 0.55rem 0.15rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(10, 16, 40, 0.15), transparent 60%);
  box-shadow: inset -0.35rem -0.1rem 0 0.05rem rgba(8, 12, 28, 0.55);
}
@keyframes sun-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}
/* AI-GEN-END */
.home-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.home-nav a:hover,
.home-nav a.is-active {
  color: var(--ink);
  text-decoration: none;
}
.home-banner {
  position: relative;
  width: 100%;
  min-height: min(72vh, 560px);
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 88%, #000);
}
.home-banner-track { position: absolute; inset: 0; }
.home-banner-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  display: block;
  color: #fff;
  text-decoration: none;
}
.home-banner-slide.is-active { opacity: 1; z-index: 1; }
.home-banner-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}
.home-banner-slide.is-active .home-banner-bg {
  animation: banner-ken 6s ease-out forwards;
}
@keyframes banner-ken {
  from { transform: scale(1.04); }
  to { transform: scale(1.0); }
}
.home-banner-caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: clamp(2rem, 6vw, 4rem) max(1rem, calc((100% - 1280px) / 2 + 1rem)) 3.2rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.62));
  color: #fff;
}
.home-banner-brand {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 24px rgba(0,0,0,0.35);
}
.home-banner-caption h2 {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 500;
  opacity: 0.92;
}
.home-banner-prev,
.home-banner-next {
  position: absolute; top: 50%; z-index: 3;
  transform: translateY(-50%);
  width: 2.4rem; height: 2.4rem;
  border: 0; border-radius: 999px;
  background: rgba(0,0,0,0.35); color: #fff;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.home-banner-prev { left: 0.8rem; }
.home-banner-next { right: 0.8rem; }
.home-banner-prev:hover,
.home-banner-next:hover { background: rgba(0,0,0,0.55); }
.home-banner-dots {
  position: absolute; left: 0; right: 0; bottom: 1rem; z-index: 3;
  display: flex; justify-content: center; gap: 0.45rem;
}
.home-banner-dot {
  width: 0.55rem; height: 0.55rem; border-radius: 999px;
  border: 0; padding: 0; cursor: pointer;
  background: rgba(255,255,255,0.45);
}
.home-banner-dot.is-active { background: #fff; width: 1.2rem; }
.site-footer--home {
  margin-top: 5rem;
  padding: 3rem 0 2.5rem;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 70%, transparent);
}
.footer-home { text-align: center; }
.footer-home-brand {
  font-family: var(--display);
  font-size: 1.35rem; font-weight: 700;
  color: var(--ink); letter-spacing: 0.06em;
}
.footer-home-tagline {
  margin: 0.55rem 0 0;
  color: var(--muted); font-size: 0.95rem;
}
.footer-home-copy {
  margin: 1.25rem 0 0;
  color: var(--muted); font-size: 0.78rem;
}
.banner-admin-list { display: grid; gap: 0.85rem; margin: 1rem 0; }
.banner-admin-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 0.85rem;
  align-items: start;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 80%, transparent);
}
.banner-admin-thumb {
  width: 120px; height: 68px;
  border-radius: 8px;
  background-size: cover; background-position: center;
  border: 1px solid var(--line);
}
@media (max-width: 720px) {
  .banner-admin-item { grid-template-columns: 1fr; }
  .home-banner { min-height: min(52vh, 380px); }
}

/* ===== 首页：左天气 / 中内容 / 右限行 ===== */
.wrap--home { width: min(1280px, calc(100% - 2rem)); }
.home-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  gap: 1.25rem;
  align-items: start;
  padding: 1.25rem 0 2rem;
}
.home-main { min-width: 0; }
.home-side--left {
  display: grid;
  gap: 0.85rem;
  align-content: start;
}
.home-side--left .city-panel { position: sticky; top: 5.5rem; }
/* AI-GEN-BEGIN */
.bj-clock {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: center;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 82%, transparent);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 100%;
}
.bj-clock-orb {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
}
.bj-clock-orb .celestial-orb {
  width: 2rem;
  height: 2rem;
}
.bj-clock-meta { min-width: 0; display: grid; gap: 0.15rem; }
.bj-clock-time {
  font-family: var(--mono);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.bj-clock-date {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}
body[data-sky="night"] .bj-clock,
body[data-sky="dusk"] .bj-clock {
  background: color-mix(in srgb, #0b1224 55%, var(--card));
  border-color: color-mix(in srgb, #8ab4ff 25%, var(--line));
}
/* AI-GEN-END */
.city-panel {
  position: sticky;
  top: 4.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 0.9rem 0.85rem;
}
.city-panel-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
}
.city-panel-head .muted { margin: 0.2rem 0 0; font-size: 0.75rem; }
.weather-now {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 0.85rem 0 0.75rem; padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.weather-now-temp {
  font-size: 2.1rem; font-weight: 700; line-height: 1;
  font-family: var(--display); color: var(--accent);
}
.weather-now-meta { display: grid; gap: 0.15rem; font-size: 0.85rem; }
.weather-now-meta span { color: var(--muted); font-size: 0.75rem; }
.city-list { display: grid; gap: 0.35rem; }
.city-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 0.5rem; padding: 0.4rem 0.35rem; border-radius: 8px;
  font-size: 0.82rem;
}
.city-row.is-today {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.city-row-meta { display: grid; gap: 0.1rem; min-width: 0; }
.city-row-meta strong { font-weight: 650; }
.city-row-meta span { color: var(--muted); font-size: 0.72rem; }
.weather-temps { display: flex; gap: 0.4rem; font-variant-numeric: tabular-nums; }
.weather-temps .tmax { font-weight: 650; }
.weather-temps .tmin { color: var(--muted); }
.plate-today {
  margin: 0.85rem 0 0.75rem; padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line); text-align: center;
}
.plate-today-label { margin: 0 0 0.45rem; color: var(--muted); font-size: 0.78rem; }
.plate-free-lg {
  margin: 0; font-size: 1.35rem; font-weight: 700; color: var(--accent-2);
}
.plate-digits { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; justify-content: flex-end; }
.plate-digits--lg { justify-content: center; gap: 0.45rem; }
.plate-digit {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.55rem; height: 1.55rem; padding: 0 0.3rem;
  border-radius: 6px; font-weight: 700; font-size: 0.9rem;
  background: var(--accent); color: var(--accent-ink);
}
.plate-digits--lg .plate-digit {
  min-width: 2.2rem; height: 2.2rem; font-size: 1.25rem; border-radius: 10px;
}
.plate-and { color: var(--muted); font-size: 0.8rem; }
.plate-free {
  color: var(--accent-2); font-weight: 650; font-size: 0.82rem;
}
.city-note { margin: 0.75rem 0 0; font-size: 0.68rem; line-height: 1.4; }

@media (max-width: 1100px) {
  .home-layout {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .home-main { grid-column: 1 / -1; order: -1; }
  .city-panel,
  .home-side--left .city-panel { position: static; }
  .header-inner--galaxy {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 0.45rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }
  .header-inner--galaxy .brand,
  .header-inner--galaxy .home-nav { justify-self: center; }
}
@media (max-width: 640px) {
  .home-layout { grid-template-columns: 1fr; }
}

.album-wall { display: grid; gap: 0.85rem; margin: 1rem 0 1.5rem; }
.album-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(62vh, 520px);
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  border: 1px solid var(--line);
}
.album-stage-img {
  max-width: 100%;
  max-height: min(62vh, 520px);
  object-fit: contain;
}
.album-stage-caption {
  position: absolute;
  left: 0.8rem;
  bottom: 0.75rem;
  margin: 0;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
.album-stage-controls {
  position: absolute;
  right: 0.7rem;
  bottom: 0.65rem;
  display: flex;
  gap: 0.4rem;
}
.album-stage-controls button {
  min-width: 2.4rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  cursor: pointer;
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 0.45rem;
}
.album-thumb {
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #111;
}
.album-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-thumb.is-active { border-color: var(--accent); }
.album-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-top: 0.5rem;
}
.album-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  color: inherit;
  text-decoration: none;
}
.album-card-cover {
  height: 120px;
  background-size: cover;
  background-position: center;
  background-color: color-mix(in srgb, var(--fg) 8%, transparent);
}
.album-card-body { padding: 0.7rem 0.8rem 0.85rem; }
.album-card-body h2 { margin: 0; font-size: 1rem; }
.album-private-note {
  margin: 0.4rem 0 0;
  color: var(--danger);
}
.album-admin-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.album-admin-photo {
  display: grid;
  gap: 0.4rem;
}
.album-admin-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
/* AI-GEN-END */

