@charset "UTF-8";
/* =========================================================
   拾光导航 · 前台样式
   结构：设计令牌 → 基础 → 通用组件 → 顶栏 → 首页 → 卡片 → 列表 → 详情 → 工具页 → 页脚 → 后台（保留） → 响应式
   ========================================================= */

/* ---------- 设计令牌 ---------- */
:root {
  color-scheme: light;
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f4f4f1;
  --fg: #2a2a25;
  --fg-soft: #4a4a43;
  --muted: #77776f;
  --faint: #a3a39b;
  --border: #e9e9e4;
  --border-strong: #dcdcd5;
  --input: #e3e3dd;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff4ff;
  --primary-soft-fg: #1d4ed8;
  --ring: rgb(59 130 246 / .45);
  --warning: #f59e0b;
  --warning-soft: #fffbeb;
  --warning-fg: #b45309;
  --danger: #e11d48;
  --success: #059669;
  --glass: rgb(255 255 255 / .62);
  --glass-border: rgb(42 42 37 / .08);
  --shadow-sm: 0 1px 2px 0 rgb(42 42 37 / .05);
  --shadow-float: inset 0 1px 0 rgb(255 255 255 / .5), 0 8px 30px -10px rgb(42 42 37 / .22);
  --shadow-card: 0 12px 28px -16px rgb(42 42 37 / .28);
  --hero-from: #ffffff;
  --hero-to: var(--bg);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 22px;
  --gap: 20px;               /* 模块之间的统一间距 */
  --on-primary: #ffffff;     /* 以下由 /theme.css 按主题色覆盖 */
  --brand-from: #10b981;
  --brand-to: #2563eb;
  --tint: #f6f9fe;
  /* 榜单卡片风格：带主题色的柔和渐变底、半透明浅色内块、彩色柔光阴影 */
  --card-bg: linear-gradient(160deg, var(--tint) 0%, var(--surface) 46%);
  --card-border: color-mix(in srgb, var(--primary) 12%, var(--border));
  --card-shadow: 0 18px 36px -30px color-mix(in srgb, var(--primary) 55%, transparent);
  --block-bg: color-mix(in srgb, var(--primary) 4%, rgb(255 255 255 / .75));
  --block-border: color-mix(in srgb, var(--primary) 9%, rgb(255 255 255 / .9));
  --block-hover: #ffffff;
  --container: 1200px;
  --header-h: 76px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "SFMono-Regular", monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* 旧变量别名（后台样式使用） */
  --ink: var(--fg);
  --line: var(--border);
  --green: var(--primary);
  --white: var(--surface);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f11;
  --surface: #161618;
  --surface-2: #1d1d20;
  --fg: #ececea;
  --fg-soft: #cfcfca;
  --muted: #9d9d97;
  --faint: #6f6f69;
  --border: #26262a;
  --border-strong: #34343a;
  --input: #2e2e33;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-soft: #14213d;
  --primary-soft-fg: #93c5fd;
  --ring: rgb(96 165 250 / .5);
  --warning-soft: #2d2008;
  --warning-fg: #fcd34d;
  --glass: rgb(24 24 27 / .66);
  --glass-border: rgb(255 255 255 / .09);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .4);
  --shadow-float: inset 0 1px 0 rgb(255 255 255 / .06), 0 8px 30px -10px rgb(0 0 0 / .7);
  --shadow-card: 0 14px 30px -18px rgb(0 0 0 / .8);
  --hero-from: #18181b;
  --hero-to: var(--bg);
  --tint: #131826;
  --card-shadow: 0 18px 36px -30px rgb(0 0 0 / .9);
  --block-bg: rgb(255 255 255 / .035);
  --block-border: rgb(255 255 255 / .06);
  --block-hover: rgb(255 255 255 / .07);
}

/* 八种卡片/分类色调，--t 为主色 */
.tone-0 { --t: #7c3aed; } .tone-1 { --t: #2563eb; } .tone-2 { --t: #0891b2; } .tone-3 { --t: #059669; }
.tone-4 { --t: #d97706; } .tone-5 { --t: #ea580c; } .tone-6 { --t: #e11d48; } .tone-7 { --t: #db2777; }
[data-theme="dark"] .tone-0 { --t: #a78bfa; } [data-theme="dark"] .tone-1 { --t: #60a5fa; } [data-theme="dark"] .tone-2 { --t: #22d3ee; } [data-theme="dark"] .tone-3 { --t: #34d399; }
[data-theme="dark"] .tone-4 { --t: #fbbf24; } [data-theme="dark"] .tone-5 { --t: #fb923c; } [data-theme="dark"] .tone-6 { --t: #fb7185; } [data-theme="dark"] .tone-7 { --t: #f472b6; }

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* 防止组件的 display 规则覆盖 hidden 属性 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.7; color: var(--fg); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }
body > main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.3; letter-spacing: -.01em; font-weight: 650; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: progress; }
button, a, input, select, textarea, label { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
::selection { background: color-mix(in srgb, var(--primary) 22%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
kbd { font-family: var(--mono); }
small, .subtle { color: var(--muted); }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.container { width: 100%; max-width: calc(var(--container) + 48px); margin-inline: auto; padding-inline: 24px; }
.container.narrow { max-width: calc(880px + 48px); }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--primary); color: #fff; padding: 8px 16px; border-radius: 999px; transition: top .2s; }
.skip-link:focus { top: 12px; color: #fff; }
.muted-text { color: var(--muted); }
.small { font-size: 13px; }
.wrap { overflow-wrap: anywhere; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--t, var(--primary)); flex-shrink: 0; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 8px; margin-left: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--muted); background: var(--surface-2); border-radius: 999px; vertical-align: middle; }

/* ---------- 表单控件 ---------- */
input, select, textarea { width: 100%; max-width: 100%; padding: 11px 14px; background: var(--surface); border: 1px solid var(--input); border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent); }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--primary); }
/* 文件选择框：虚线投放区 + 统一风格的选择按钮，替代浏览器默认灰色按钮 */
input[type="file"] { padding: 7px 8px; font-size: 13px; color: var(--muted); background: var(--block-bg, var(--surface)); border: 1px dashed var(--border-strong); border-radius: 12px; cursor: pointer; }
input[type="file"]:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border-strong)); }
input[type="file"]::file-selector-button { height: 32px; margin-right: 12px; padding: 0 14px; font: inherit; font-weight: 600; color: var(--primary-soft-fg); background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent); border-radius: 9px; cursor: pointer; transition: background-color .2s, color .2s; }
input[type="file"]::file-selector-button:hover { color: var(--on-primary); background: var(--primary); }
select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2377776f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 550; color: var(--fg-soft); }
.counter { align-self: flex-end; margin-top: -4px; font-size: 12px; font-weight: 400; color: var(--faint); font-variant-numeric: tabular-nums; }
.counter.near { color: var(--warning-fg); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.form-foot small { flex: 1 1 240px; }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; font-size: 14px; font-weight: 550; line-height: 1; white-space: nowrap; border: 1px solid transparent; border-radius: 999px; background: var(--surface-2); color: var(--fg); transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s; }
.btn:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 8%, var(--surface-2)); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--primary) 80%, transparent); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); box-shadow: 0 10px 20px -10px color-mix(in srgb, var(--primary) 90%, transparent); }
.btn-secondary { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--border-strong); background: var(--surface); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--fg); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 15px; }
.btn[aria-pressed="true"], .btn.saved { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 40%, transparent); color: var(--warning-fg); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--glass-border); border-radius: 50%; background: var(--glass); color: var(--fg-soft); -webkit-backdrop-filter: saturate(1.8) blur(16px); backdrop-filter: saturate(1.8) blur(16px); box-shadow: var(--shadow-float); transition: color .2s, transform .3s var(--ease); }
.icon-btn:hover { color: var(--fg); }
#theme:hover .icon { transform: rotate(-20deg); }
#theme .icon { transition: transform .3s var(--ease); }
#theme .moon, [data-theme="dark"] #theme .sun { display: none; }
[data-theme="dark"] #theme .moon { display: block; }

/* ---------- 徽标 / 胶囊 / 标签 ---------- */
.pill-badge { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; font-size: 12px; font-weight: 500; letter-spacing: .02em; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-sm); }
.pill-badge .dot { width: 8px; height: 8px; background: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.pill-badge.solid { color: #fff; background: var(--primary); border-color: transparent; box-shadow: 0 6px 14px -8px var(--primary); }
.badge-soft { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; font-size: 12px; font-weight: 600; color: var(--warning-fg); background: var(--warning-soft); border-radius: 999px; white-space: nowrap; }
.tag { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; font-size: 13px; color: var(--fg-soft); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; transition: border-color .2s, color .2s, background-color .2s; }
.tag:hover { color: var(--t, var(--primary)); border-color: color-mix(in srgb, var(--t, var(--primary)) 40%, var(--border)); background: color-mix(in srgb, var(--t, var(--primary)) 6%, var(--surface)); }

/* ---------- 顶栏 ---------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); padding: 14px 24px; transition: background-color .3s; }
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); transition: opacity .3s; pointer-events: none; }
.site-header.scrolled::before { opacity: 1; }
.site-header.joined::before { border-bottom-color: transparent; }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; max-width: var(--container); height: 100%; margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; height: 48px; padding: 0 16px 0 6px; font-size: 17px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; border: 1px solid var(--glass-border); border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: saturate(1.8) blur(16px); backdrop-filter: saturate(1.8) blur(16px); box-shadow: var(--shadow-float); }
.brand:hover { color: inherit; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; font-size: 18px; font-weight: 700; color: #fff; border-radius: 50%; background: linear-gradient(135deg, var(--brand-from), var(--brand-to)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .35); transition: transform .4s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-10deg) scale(1.04); }
.nav-pills { display: flex; gap: 2px; padding: 4px; border: 1px solid var(--glass-border); border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: saturate(1.8) blur(16px); backdrop-filter: saturate(1.8) blur(16px); box-shadow: var(--shadow-float); }
.nav-pills a { padding: 6px 16px; font-size: 14px; color: var(--fg-soft); border-radius: 999px; white-space: nowrap; transition: background-color .2s, color .2s; }
.nav-pills a:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 5%, transparent); }
.nav-pills a.active { color: var(--fg); font-weight: 600; background: color-mix(in srgb, var(--fg) 9%, transparent); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.header-search { position: relative; display: flex; align-items: center; width: 210px; height: 40px; padding: 0 8px 0 14px; gap: 8px; color: var(--muted); border: 1px solid var(--glass-border); border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: saturate(1.8) blur(16px); backdrop-filter: saturate(1.8) blur(16px); box-shadow: var(--shadow-float); transition: width .3s var(--ease), border-color .2s; }
.header-search:focus-within { width: 260px; border-color: color-mix(in srgb, var(--primary) 50%, transparent); }
.header-search .icon { width: 16px; height: 16px; }
.header-search input { flex: 1; min-width: 0; height: 100%; padding: 0; font-size: 14px; border: 0; background: none; box-shadow: none; }
.header-search kbd { display: grid; place-items: center; min-width: 22px; height: 22px; font-size: 12px; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.header-search:focus-within kbd { opacity: 0; }
.submit-link .icon { width: 15px; height: 15px; }
.mobile-only { display: none; }

/* ---------- 首页 Hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; margin-top: calc(var(--header-h) * -1); padding: calc(var(--header-h) + 56px) 0 88px; background: radial-gradient(45% 50% at 8% 0%, rgb(59 130 246 / .06), transparent 70%), linear-gradient(180deg, var(--hero-from) 0%, var(--hero-to) 100%); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background-image: radial-gradient(color-mix(in srgb, var(--fg) 10%, transparent) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(70% 60% at 30% 30%, #000, transparent 75%); mask-image: radial-gradient(70% 60% at 30% 30%, #000, transparent 75%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: -1; background: linear-gradient(transparent, var(--bg)); }
.hero-deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-orb { position: absolute; top: 50%; right: max(-60px, calc(50% - 680px)); width: 520px; height: 520px; border-radius: 50%; transform: translateY(-46%); background: conic-gradient(from 210deg, #c4b5fd, #f0abfc, #fda4af, #93c5fd, #67e8f9, #c4b5fd); -webkit-mask: radial-gradient(farthest-side, transparent 72%, #000 73%, #000 86%, transparent 87%); mask: radial-gradient(farthest-side, transparent 72%, #000 73%, #000 86%, transparent 87%); filter: blur(18px); opacity: .7; }
.hero-orb::after { content: ""; position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle, rgb(255 255 255 / .9), rgb(224 231 255 / .35) 55%, transparent 72%); }
@media (prefers-reduced-motion: no-preference) { .hero-orb { animation: orb-spin 24s linear infinite; } }
@keyframes orb-spin { to { transform: translateY(-46%) rotate(360deg); } }
[data-theme="dark"] .hero { background: radial-gradient(55% 60% at 78% 42%, rgb(139 92 246 / .14), transparent 70%), radial-gradient(45% 50% at 8% 0%, rgb(59 130 246 / .1), transparent 70%), linear-gradient(180deg, var(--hero-from) 0%, var(--hero-to) 100%); }
[data-theme="dark"] .hero-orb { opacity: .45; }
[data-theme="dark"] .hero-orb::after { background: radial-gradient(circle, rgb(224 242 254 / .25), transparent 70%); }
.hero-inner { position: relative; }
.hero-title { max-width: 680px; margin: 22px 0 18px; font-size: clamp(40px, 6vw, 66px); line-height: 1.12; letter-spacing: -.03em; font-weight: 700; background: linear-gradient(var(--fg) 0%, var(--fg) 55%, color-mix(in srgb, var(--fg) 55%, transparent) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-title span { white-space: nowrap; }
.hero-lead { max-width: 560px; margin-bottom: 30px; text-wrap: pretty; font-size: 17px; line-height: 1.75; color: var(--muted); }
.hero-lead strong { color: var(--fg); font-weight: 600; }
.hero-search { display: flex; align-items: center; gap: 8px; max-width: 580px; height: 56px; padding: 5px 5px 5px 20px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: 0 10px 30px -14px rgb(42 42 37 / .25); transition: border-color .2s, box-shadow .2s; }
.hero-search:focus-within { border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent), 0 10px 30px -14px rgb(42 42 37 / .25); }
.hero-search input { flex: 1; min-width: 0; height: 100%; padding: 0 4px; font-size: 15px; border: 0; background: none; box-shadow: none; }
.hero-search .btn { height: 44px; padding: 0 22px; }
.hot-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.hot-tags > span { margin-right: 4px; }
.hot-chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; font-size: 13px; color: var(--fg-soft); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-sm); transition: border-color .2s, color .2s, transform .2s; }
.hot-chip:hover { color: var(--t); border-color: color-mix(in srgb, var(--t) 40%, var(--border)); transform: translateY(-1px); }
.hot-chip .dot { width: 6px; height: 6px; }
.hero-stats { display: flex; margin: 44px 0 0; }
.hero-stats > div { display: flex; flex-direction: column-reverse; padding: 0 32px; border-left: 1px solid var(--border); }
.hero-stats > div:first-child { padding-left: 0; border-left: 0; }
.hero-stats dd { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-stats dt { font-size: 13px; color: var(--muted); }

/* ---------- 目录区 ---------- */
.catalog { padding-top: 24px; }
.catalog-head { max-width: 640px; margin: 0 auto 32px; text-align: center; }
.catalog-head h2 { margin: 16px 0 10px; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.025em; }
.catalog-head p { margin: 0; color: var(--muted); text-wrap: balance; }
.catalog-bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.catalog-bar[data-sticky-bar] { position: sticky; top: var(--header-h); z-index: 20; padding: 8px 0; }
/* 吸顶后与顶栏连成一块玻璃底，避免内容从两者之间露出 */
.catalog-bar[data-sticky-bar].stuck::before { content: ""; position: absolute; top: -1px; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1; background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.chips { display: flex; gap: 6px; padding: 4px; overflow-x: auto; scrollbar-width: none; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-sm); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 16px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; background: none; border: 0; border-radius: 999px; transition: background-color .2s, color .2s, box-shadow .2s; }
.chip:hover { color: var(--fg); }
.chip.active { color: var(--fg); background: var(--surface); box-shadow: 0 1px 3px rgb(42 42 37 / .12), 0 0 0 1px var(--border); }
[data-theme="dark"] .chip.active { background: var(--surface-2); }
.chip .dot { width: 6px; height: 6px; }
.fav-filter { flex-shrink: 0; height: 42px; color: var(--warning-fg); background: var(--warning-soft); border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent); }
.fav-filter:hover { color: var(--warning-fg); border-color: color-mix(in srgb, var(--warning) 55%, transparent); }
.fav-filter[aria-pressed="true"] { color: #1c1917; background: var(--warning); border-color: transparent; }
.subchips { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 24px; }
.subchips a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; font-size: 13px; color: var(--fg-soft); border: 1px dashed var(--border-strong); border-radius: 999px; }
.subchips a small { font-size: 12px; color: var(--faint); }
.subchips a.active { color: var(--primary-soft-fg); background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); }
.group { margin-bottom: 44px; scroll-margin-top: calc(var(--header-h) + 72px); content-visibility: auto; contain-intrinsic-size: auto 320px; }
.group-head { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 18px; letter-spacing: -.01em; }
.group-head .dot { width: 9px; height: 9px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--t) 18%, transparent); }
.group-head .count { margin-left: 0; }
.group-head > a { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 13px; font-weight: 500; color: var(--muted); }
.group-head > a .icon { width: 14px; height: 14px; transition: transform .2s; }
.group-head > a:hover { color: var(--t); }
.group-head > a:hover .icon { transform: translateX(3px); }

/* ---------- 网站卡片 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.site-card { position: relative; display: flex; align-items: flex-start; gap: 14px; min-width: 0; padding: 16px; background: linear-gradient(160deg, color-mix(in srgb, var(--t) 5%, var(--surface)) 0%, var(--surface) 55%); border: 1px solid color-mix(in srgb, var(--t) 10%, var(--border)); border-radius: var(--radius); box-shadow: 0 10px 24px -22px color-mix(in srgb, var(--t) 60%, transparent); transition: border-color .2s, box-shadow .2s, transform .2s, background-color .2s; }
.site-card:hover { border-color: color-mix(in srgb, var(--t) 40%, var(--border)); background: linear-gradient(160deg, color-mix(in srgb, var(--t) 9%, var(--surface)) 0%, var(--surface) 60%); box-shadow: 0 16px 30px -18px color-mix(in srgb, var(--t) 60%, transparent); transform: translateY(-2px); }
.site-card:focus-within { border-color: color-mix(in srgb, var(--t) 55%, var(--border)); }
.site-icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; overflow: hidden; font-size: 19px; font-weight: 700; color: var(--t, var(--primary)); background: color-mix(in srgb, var(--t, var(--primary)) 12%, transparent); border-radius: 12px; transition: background-color .25s, color .25s, transform .3s var(--ease); }
.site-icon img { width: 100%; height: 100%; object-fit: contain; padding: 6px; background: var(--surface); }
.site-card:hover .site-icon { color: #fff; background: var(--t); transform: scale(1.05) rotate(-4deg); }
.site-card:hover .site-icon:has(img) { background: color-mix(in srgb, var(--t) 12%, transparent); }
[data-theme="dark"] .site-card:hover .site-icon { color: #0f0f11; }
.card-body { flex: 1; min-width: 0; padding-right: 18px; }
.card-title { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 15px; font-weight: 650; line-height: 1.45; }
.card-title a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .2s; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.site-card:hover .card-title a { color: var(--t); }
.card-title a:focus-visible { outline: none; }
.card-title a:focus-visible::after { outline: 2px solid var(--t); outline-offset: 2px; }
.featured { flex-shrink: 0; font-size: 11px; color: var(--warning); }
.card-desc { display: -webkit-box; margin: 0; overflow: hidden; font-size: 13px; line-height: 1.6; color: var(--muted); -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: calc(13px * 1.6 * 2); }
.card-domain { display: block; margin-top: 6px; overflow: hidden; font-size: 12px; color: var(--faint); text-overflow: ellipsis; white-space: nowrap; }
.favorite { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; font-size: 16px; line-height: 1; color: var(--faint); background: transparent; border: 0; border-radius: 50%; opacity: 0; transition: opacity .2s, color .2s, background-color .2s, transform .2s; }
.site-card:hover .favorite, .favorite:focus-visible, .favorite[aria-pressed="true"] { opacity: 1; }
.favorite:hover { color: var(--warning); background: var(--warning-soft); transform: scale(1.08); }
.favorite[aria-pressed="true"] { color: var(--warning); }
@media (hover: none) { .favorite { opacity: 1; } .site-card:hover { transform: none; } }
.fav-filtering .site-card:not(.is-fav) { display: none; }
.fav-filtering .group:not(.has-fav), .fav-filtering .related:not(.has-fav), .fav-filtering .chip.no-fav { display: none; }
.fav-empty { display: flex; align-items: center; gap: 14px; padding: 22px 24px; margin-bottom: 40px; color: var(--warning-fg); background: var(--warning-soft); border: 1px dashed color-mix(in srgb, var(--warning) 45%, transparent); border-radius: var(--radius); }
.fav-empty[hidden] { display: none; }
.fav-empty span { font-size: 26px; }
.fav-empty p { margin: 0; font-size: 14px; }
.empty { grid-column: 1 / -1; padding: 56px 24px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.empty-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 14px; color: var(--primary); background: var(--primary-soft); border-radius: 18px; }
.empty-icon .icon { width: 24px; height: 24px; }
.empty h3 { margin-bottom: 6px; font-size: 18px; color: var(--fg); }
.empty p { margin-bottom: 18px; font-size: 14px; }

/* ---------- 投稿召唤 ---------- */
.contribute { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; overflow: hidden; margin: 24px 0 72px; padding: 40px 44px; background: radial-gradient(60% 120% at 100% 0%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 70%), var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.contribute h2 { margin: 14px 0 6px; font-size: 24px; }
.contribute p { margin: 0; color: var(--muted); }
.contribute .btn { flex-shrink: 0; }

/* ---------- 列表页 ---------- */
.page { padding-top: 8px; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 8px 0 20px; font-size: 13px; color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb > span:last-child { color: var(--fg-soft); }
.breadcrumb > span[itemprop] a { color: inherit; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-head h1 { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: clamp(28px, 4vw, 38px); letter-spacing: -.025em; }
.page-head h1 .dot { width: 12px; height: 12px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--t) 18%, transparent); }
.page-head h1 .count { margin-left: 0; font-size: 13px; }
.page-head p { max-width: 620px; margin: 0; color: var(--muted); }
.page-head.simple { display: block; margin-bottom: 28px; }
.page-head.simple .pill-badge { margin-bottom: 14px; }
.inline-search { display: flex; align-items: center; flex: 0 1 380px; gap: 8px; height: 48px; padding: 4px 4px 4px 16px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; }
.inline-search:focus-within { border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent); }
.inline-search input { flex: 1; min-width: 0; height: 100%; padding: 0 4px; border: 0; background: none; box-shadow: none; }
.notice { padding: 12px 16px; margin-bottom: 20px; font-size: 14px; color: var(--warning-fg); background: var(--warning-soft); border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent); border-radius: 12px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 36px 0 12px; font-size: 14px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px; }
.pagination a { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: border-color .2s, color .2s; }
.pagination a:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.pagination .current { font-weight: 600; color: var(--fg); background: var(--surface-2); }
.pagination .disabled { color: var(--faint); }

/* ---------- 面板 ---------- */
.panel { position: relative; padding: 24px; margin: 0 0 var(--gap); background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-lg); box-shadow: var(--card-shadow); }
/* 标题下方一条主题色渐变线，与榜单卡片的标题栏一致 */
.panel-title { position: relative; display: flex; align-items: center; margin: 0 0 18px; padding-bottom: 12px; font-size: 16px; }
.panel-title::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 70%, transparent), color-mix(in srgb, var(--primary) 12%, transparent) 60%, transparent); }
.panel-title .count { font-size: 12px; }
.prose { font-size: 15px; line-height: 1.9; color: var(--fg-soft); overflow-wrap: anywhere; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { margin: 1.4em 0 .5em; font-size: 18px; color: var(--fg); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.2em 0 .4em; font-size: 16px; color: var(--fg); }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose blockquote { margin: 1em 0; padding: 4px 16px; color: var(--muted); border-left: 3px solid var(--border-strong); }
.prose code { padding: 1px 6px; font-family: var(--mono); font-size: .9em; background: var(--surface-2); border-radius: 6px; }
.prose pre { padding: 14px 16px; overflow: auto; background: var(--surface-2); border-radius: 12px; }
.prose pre code { padding: 0; background: none; }

/* ---------- 详情页 ---------- */
.detail-hero { position: relative; display: flex; align-items: center; gap: 24px; overflow: hidden; padding: 32px; margin-bottom: 20px; background: radial-gradient(60% 130% at 0% 0%, color-mix(in srgb, var(--t) 10%, transparent), transparent 65%), var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.site-icon.xl { width: 84px; height: 84px; font-size: 38px; border-radius: 24px; box-shadow: 0 12px 24px -16px var(--t); }
.detail-info { flex: 1; min-width: 0; }
.detail-title { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.detail-title h1 { margin: 0; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.02em; overflow-wrap: anywhere; }
.detail-domain { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; color: var(--muted); }
.detail-domain .icon { width: 14px; height: 14px; }
.detail-domain:hover { color: var(--t); }
.detail-desc { max-width: 640px; margin: 12px 0 14px; color: var(--fg-soft); }
.detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.rating-summary { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px 0 10px; margin-right: 4px; font-size: 13px; background: var(--warning-soft); border-radius: 999px; }
.rating-summary small { color: var(--warning-fg); }
.stars { display: inline-flex; gap: 1px; letter-spacing: 0; }
.stars i { font-style: normal; color: color-mix(in srgb, var(--warning) 30%, transparent); }
.stars i.on { color: var(--warning); }
.detail-actions { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; width: 240px; }
.detail-actions .btn-lg { width: 100%; }
.detail-actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.detail-actions-row .btn { padding: 0 10px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); align-items: start; margin-bottom: 44px; }
/* 栏内模块用 gap 统一隔开，不依赖各模块自身外边距，避免相互贴住 */
.detail-main, .detail-aside, .edit-main, .edit-side, .dash-main, .dash-side { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.detail-main > *, .detail-aside > *, .edit-main > *, .edit-side > *, .dash-main > *, .dash-side > * { margin: 0 !important; }
.screenshot { display: block; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); }
.screenshot img { width: 100%; transition: transform .5s var(--ease); }
.screenshot:hover img { transform: scale(1.015); }
.info-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; font-size: 14px; }
.info-list > div { min-width: 0; padding: 10px 12px; background: var(--block-bg); border: 1px solid var(--block-border); border-radius: 12px; }
.info-list .full { grid-column: 1 / -1; }
.info-list dt { margin-bottom: 2px; font-size: 12px; color: var(--muted); }
.info-list dd { margin: 0; color: var(--fg); overflow-wrap: anywhere; }
.info-list dd a { color: var(--primary); }
.like-form { margin-bottom: 14px; }
.like-btn { width: 100%; }
.like-btn .icon { width: 16px; height: 16px; }
.like-btn.done { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.like-btn.done .icon { fill: currentColor; }
.like-count { font-variant-numeric: tabular-nums; color: var(--muted); }
.star-form { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--block-bg); border: 1px solid var(--block-border); border-radius: 14px; }
.star-label { font-size: 14px; color: var(--fg-soft); }
.star-input { display: flex; flex-direction: row-reverse; gap: 2px; }
.star-input button { width: 30px; height: 30px; padding: 0; font-size: 22px; line-height: 1; color: color-mix(in srgb, var(--warning) 38%, var(--border)); background: none; border: 0; transition: color .15s, transform .15s; }
.star-input button:hover, .star-input button:hover ~ button, .star-input button:focus-visible, .star-input button:focus-visible ~ button, .star-input button.on, .star-input button.on ~ button { color: var(--warning); }
.star-input button:hover { transform: scale(1.15); }
.star-form + p { margin: 10px 0 0; }
.reason-group { display: flex; flex-wrap: wrap; gap: 8px; }
.reason { flex-direction: row; gap: 0; font-weight: 400; }
.reason input { position: absolute; opacity: 0; pointer-events: none; }
.reason span { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; font-size: 13px; color: var(--fg-soft); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; transition: border-color .2s, background-color .2s, color .2s; }
.reason input:checked + span { color: var(--primary-soft-fg); background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.reason input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.comment { display: flex; gap: 12px; padding: 14px; margin-bottom: 10px; background: var(--block-bg); border: 1px solid var(--block-border); border-radius: 14px; }

.avatar { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; font-size: 15px; font-weight: 600; color: var(--t); background: color-mix(in srgb, var(--t) 12%, transparent); border-radius: 50%; }
.comment > div { flex: 1; min-width: 0; }
.comment header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.comment strong { font-size: 14px; }
.comment time { font-size: 12px; color: var(--faint); }
.comment p { margin: 4px 0 0; font-size: 14px; color: var(--fg-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ---------- 工具页（投稿 / 收藏 / 关于） ---------- */
.utility { padding-bottom: 72px; }
.utility-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--gap); align-items: start; }
.utility-layout > * { margin: 0; }
.tips ul { margin: 0; padding-left: 1.2em; font-size: 14px; color: var(--muted); }
.tips li + li { margin-top: 8px; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.toolbar select { width: auto; height: 36px; padding-top: 0; padding-bottom: 0; font-size: 13px; border-radius: 999px; }
.favorite-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.favorite-row { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
.favorite-row:hover { border-color: color-mix(in srgb, var(--t) 40%, var(--border)); box-shadow: var(--shadow-card); }
.favorite-row .site-icon { width: 40px; height: 40px; font-size: 17px; }
.favorite-row > div { flex: 1; min-width: 0; }
.favorite-row a, .favorite-row .gone { display: block; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.favorite-row a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.favorite-row small { display: block; font-size: 12px; color: var(--faint); }
.favorite-row .gone { color: var(--muted); }
.favorite-row button { position: relative; z-index: 1; flex-shrink: 0; height: 32px; padding: 0 12px; font-size: 13px; color: var(--muted); background: none; border: 1px solid var(--border); border-radius: 999px; }
.favorite-row button:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.favorite-list .empty { grid-column: 1 / -1; }
.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.about-grid .panel { margin: 0; }
.feature .site-icon { margin-bottom: 14px; }
.feature h2 { margin: 0 0 6px; font-size: 17px; }
.feature p { margin: 0; font-size: 14px; color: var(--muted); }
.not-found { padding: 48px 24px 96px; text-align: center; }
.nf-code { display: block; font-size: clamp(88px, 16vw, 148px); font-weight: 800; line-height: 1; letter-spacing: -.05em; background: linear-gradient(135deg, #a78bfa, #60a5fa 50%, #34d399); -webkit-background-clip: text; background-clip: text; color: transparent; }
.not-found h1 { margin: 12px 0 8px; font-size: 28px; }
.not-found p { max-width: 480px; margin: 0 auto 28px; color: var(--muted); text-wrap: balance; }
.not-found .hero-search { margin: 0 auto 16px; }

/* ---------- 访问榜单（详情侧栏） ---------- */
.rank-card { --rank: #ef4444; position: relative; overflow: hidden; margin: 0 0 var(--gap); padding: 18px 16px 16px; background: linear-gradient(160deg, #ffe4e6 0%, #fff1f2 38%, #fff7ed 100%); border: 1px solid #fecdd3; border-radius: var(--radius-lg); box-shadow: 0 16px 34px -24px rgb(244 63 94 / .6); }
.rank-card::before { content: ""; position: absolute; top: -60px; right: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgb(255 255 255 / .75), transparent 70%); pointer-events: none; }
.rank-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid color-mix(in srgb, var(--rank) 75%, transparent); }
.rank-head h2 { display: flex; align-items: center; gap: 2px; margin: 0; font-size: 17px; color: #3f3f46; }
.laurel { width: 18px; height: 18px; fill: currentColor; color: #b45309; }
.rank-head .laurel:last-child, .rank-hero h1 .laurel:last-child { transform: scaleX(-1); }
.rank-tabs { display: flex; gap: 2px; }
.rank-tabs button { position: relative; padding: 2px 8px; font-size: 15px; font-weight: 600; color: #a1a1aa; background: none; border: 0; border-radius: 8px; transition: color .2s; }
.rank-tabs button:hover { color: #52525b; }
.rank-tabs button[aria-selected="true"] { color: var(--rank); }
.rank-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 50%; bottom: -13px; width: 18px; height: 5px; margin-left: -9px; background: var(--rank); border-radius: 4px 4px 0 0; }
.rank-list { position: relative; display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.rank-list[hidden] { display: none; }
.rank-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: #27272a; background: rgb(255 255 255 / .55); border: 1px solid rgb(255 255 255 / .7); border-radius: 14px; transition: background-color .2s, transform .2s, box-shadow .2s; }
.rank-list a:hover { color: #27272a; background: rgb(255 255 255 / .92); box-shadow: 0 8px 18px -12px rgb(244 63 94 / .5); transform: translateX(2px); }
.rank-icon { position: relative; display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; font-size: 18px; font-weight: 700; color: var(--t); background: color-mix(in srgb, var(--t) 14%, #fff); border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
.rank-icon img { width: 100%; height: 100%; padding: 5px; object-fit: contain; background: #fff; border-radius: 50%; }
.rank-medal { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 18px; height: 18px; font-size: 10px; font-style: normal; font-weight: 700; color: #fff; border: 2px solid #fff; border-radius: 50%; }
.rank-medal.r1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.rank-medal.r2 { background: linear-gradient(135deg, #cbd5e1, #94a3b8); }
.rank-medal.r3 { background: linear-gradient(135deg, #fdba74, #ea580c); }
.rank-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.45; }
.rank-text strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.rank-text small { overflow: hidden; font-size: 13px; color: #a1a1aa; text-overflow: ellipsis; white-space: nowrap; }
.rank-empty { padding: 26px 12px; font-size: 13px; color: #a1a1aa; text-align: center; background: rgb(255 255 255 / .5); border-radius: 14px; }
.rank-more { position: relative; display: flex; align-items: center; justify-content: center; height: 42px; font-size: 14px; font-weight: 600; color: #ea580c; background: rgb(254 215 170 / .45); border-radius: 12px; transition: background-color .2s; }
.rank-more:hover { color: #c2410c; background: rgb(254 215 170 / .75); }
[data-theme="dark"] .rank-card { --rank: #fb7185; background: linear-gradient(160deg, #3b1720 0%, #2a1418 45%, #24170f 100%); border-color: #4c1d24; box-shadow: none; }
[data-theme="dark"] .rank-card::before { background: radial-gradient(circle, rgb(251 113 133 / .12), transparent 70%); }
[data-theme="dark"] .rank-head h2 { color: var(--fg); }
[data-theme="dark"] .laurel { color: #fbbf24; }
[data-theme="dark"] .rank-tabs button { color: #8b8b92; }
[data-theme="dark"] .rank-tabs button:hover { color: var(--fg); }
[data-theme="dark"] .rank-tabs button[aria-selected="true"] { color: var(--rank); }
[data-theme="dark"] .rank-list a { color: var(--fg); background: rgb(255 255 255 / .04); border-color: rgb(255 255 255 / .06); }
[data-theme="dark"] .rank-list a:hover { background: rgb(255 255 255 / .08); }
[data-theme="dark"] .rank-icon { background: color-mix(in srgb, var(--t) 18%, #18181b); box-shadow: 0 0 0 2px #2a1418; }
[data-theme="dark"] .rank-medal { border-color: #2a1418; }
[data-theme="dark"] .rank-text small, [data-theme="dark"] .rank-empty { color: #8b8b92; }
[data-theme="dark"] .rank-empty { background: rgb(255 255 255 / .04); }
[data-theme="dark"] .rank-more { color: #fdba74; background: rgb(234 88 12 / .16); }

/* ---------- 榜单页 ---------- */
.rank-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 32px; margin-bottom: 20px; background: radial-gradient(70% 140% at 100% 0%, rgb(251 113 133 / .18), transparent 70%), radial-gradient(60% 120% at 0% 100%, rgb(251 191 36 / .14), transparent 70%), var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.rank-hero h1 { display: flex; align-items: center; gap: 6px; margin: 14px 0 8px; font-size: clamp(26px, 4vw, 36px); letter-spacing: -.02em; }
.rank-hero h1 .laurel { width: 30px; height: 30px; }
.rank-hero p { margin: 0; color: var(--muted); }
.rank-switch { display: flex; flex-shrink: 0; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 999px; }
.rank-switch a { padding: 6px 18px; font-size: 14px; font-weight: 600; color: var(--muted); border-radius: 999px; transition: background-color .2s, color .2s; }
.rank-switch a.active { color: #fff; background: linear-gradient(135deg, #fb7185, #f43f5e); box-shadow: 0 6px 14px -8px #f43f5e; }
.rank-board { display: flex; flex-direction: column; gap: 10px; margin: 0 0 64px; padding: 0; list-style: none; }
.rank-board > li:not(.rank-board-empty) { position: relative; display: flex; align-items: center; gap: 16px; padding: 14px 20px 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s, transform .2s; }
.rank-board > li:not(.rank-board-empty):hover { border-color: color-mix(in srgb, var(--t) 40%, var(--border)); box-shadow: var(--shadow-card); transform: translateY(-1px); }
.rank-board > li.top { background: linear-gradient(90deg, color-mix(in srgb, var(--warning) 7%, var(--surface)), var(--surface) 55%); }
.rank-no { width: 34px; flex-shrink: 0; font-size: 18px; font-weight: 800; color: var(--faint); text-align: center; font-variant-numeric: tabular-nums; }
.rank-no.r1, .rank-no.r2, .rank-no.r3 { display: grid; place-items: center; height: 34px; font-size: 15px; color: #fff; border-radius: 50%; }
.rank-no.r1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 6px 14px -6px #f59e0b; }
.rank-no.r2 { background: linear-gradient(135deg, #cbd5e1, #94a3b8); }
.rank-no.r3 { background: linear-gradient(135deg, #fdba74, #ea580c); }
.rank-body { flex: 1; min-width: 0; }
.rank-name { display: block; overflow: hidden; font-size: 16px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.rank-name::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.rank-body p { margin: 2px 0 0; overflow: hidden; font-size: 13px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.rank-score { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; font-size: 18px; font-weight: 700; line-height: 1.2; color: #f43f5e; font-variant-numeric: tabular-nums; }
.rank-score small { font-size: 11px; font-weight: 500; color: var(--faint); }
.rank-board-empty { list-style: none; }

/* ---------- 前台广告位 ---------- */
.ad-wrap { margin-top: 12px; margin-bottom: 12px; }
.ad-slot { display: grid; gap: 12px; margin: 0 0 var(--gap); }
.ad-slot:has(.ad-text) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); } /* auto-fit：只有一条时铺满整行 */
.ad { position: relative; display: block; overflow: hidden; border-radius: var(--radius); }
.ad-image { background: var(--surface); border: 1px solid var(--border); }
.ad-image img { width: 100%; max-height: 220px; object-fit: cover; }
.ad-tag { position: absolute; right: 8px; bottom: 8px; padding: 1px 6px; font-size: 11px; color: #fff; background: rgb(0 0 0 / .45); border-radius: 4px; }
.ad-text { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--card-bg); border: 1px solid var(--card-border); transition: border-color .2s, box-shadow .2s; }
.ad-text:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); box-shadow: var(--card-shadow); }
.ad-text .ad-tag { position: static; flex-shrink: 0; color: var(--warning-fg); background: var(--warning-soft); }
.ad-text b { flex: 1; min-width: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.ad-text small { flex-shrink: 0; font-size: 12px; color: var(--faint); }
.ad-text .icon { width: 15px; height: 15px; color: var(--faint); }
.ad-code { overflow: visible; border-radius: 0; }
.ad-side .ad-slot { margin: 0; grid-template-columns: 1fr !important; }
.ad-side .ad-text { align-items: flex-start; }
.ad-side .ad-text b { white-space: normal; line-height: 1.5; }
.ad-side .ad-text small, .ad-side .ad-text .icon { display: none; }
.detail-page .slot-detail_top { margin-top: -4px; }

/* ---------- 推广位（友情链接） ---------- */
.promotions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.promotions:empty { display: none; }
.promotion-block { position: relative; display: inline-flex; align-items: center; gap: 12px; max-width: 100%; padding: 10px 16px; font-size: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; transition: border-color .2s; }
.promotion-block:hover { border-color: var(--border-strong); }
.promotion-block img { max-height: 160px; border-radius: 8px; object-fit: contain; }
.promotion-block small { padding: 0 6px; font-size: 11px; color: var(--faint); border: 1px solid var(--border); border-radius: 4px; }

/* ---------- 页脚 ---------- */
.site-footer { padding: 48px 0 24px; font-size: 14px; color: var(--muted); background: var(--surface); border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; padding-bottom: 32px; }
.footer-brand .brand { height: auto; padding: 0; border: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.footer-brand p { max-width: 320px; margin: 14px 0 18px; }
.footer-col h2 { margin: 6px 0 14px; font-size: 14px; color: var(--fg); }
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li + li { margin-top: 8px; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; padding: 18px 0; font-size: 13px; border-top: 1px solid var(--border); }
.footer-links .fl-title { font-weight: 600; color: var(--fg); }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; font-size: 13px; border-top: 1px solid var(--border); }
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--fg-soft); background: var(--glass); border: 1px solid var(--glass-border); border-radius: 50%; -webkit-backdrop-filter: saturate(1.8) blur(16px); backdrop-filter: saturate(1.8) blur(16px); box-shadow: var(--shadow-float); opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s, color .2s; }
.to-top.show { opacity: 1; transform: none; }
.to-top[hidden] { display: none; }
.to-top:hover { color: var(--primary); }

/* ---------- 提示 ---------- */
#toast { position: fixed; left: 50%; bottom: 32px; z-index: 100; max-width: min(90vw, 420px); padding: 12px 20px; font-size: 14px; color: #fff; text-align: center; background: rgb(28 28 30 / .92); border-radius: 999px; box-shadow: 0 12px 30px -10px rgb(0 0 0 / .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .25s, transform .25s var(--ease); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
[data-theme="dark"] #toast { color: var(--fg); background: rgb(44 44 48 / .95); border: 1px solid var(--border-strong); }

/* =========================================================
   后台
   ========================================================= */
.admin-app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; background: #f6f6f3; }
.admin-sidebar { position: sticky; top: 0; z-index: 40; display: flex; flex-direction: column; height: 100vh; background: var(--surface); border-right: 1px solid var(--border); }
.admin-brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px; }
.admin-brand:hover { color: inherit; }
.admin-brand .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
.admin-brand b { display: block; font-size: 16px; line-height: 1.3; }
.admin-brand small { display: block; font-size: 12px; color: var(--muted); }
.admin-nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; scrollbar-width: thin; }
.nav-caption { margin: 18px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--faint); }
.nav-caption:first-child { margin-top: 4px; }
.admin-nav a { position: relative; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; margin-bottom: 2px; font-size: 14px; color: var(--fg-soft); border-radius: 10px; transition: background-color .15s, color .15s; }
.admin-nav a .icon { width: 17px; height: 17px; color: var(--muted); transition: color .15s; }
.admin-nav a:hover { color: var(--fg); background: var(--surface-2); }
.admin-nav a.active { color: var(--primary-soft-fg); font-weight: 600; background: var(--primary-soft); }
.admin-nav a.active .icon { color: var(--primary); }
.admin-nav a.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; background: var(--primary); border-radius: 0 3px 3px 0; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; font-size: 11px; font-weight: 700; line-height: 20px; color: #fff; text-align: center; background: var(--danger); border-radius: 999px; }
.nav-badge.soft { color: var(--primary-soft-fg); background: var(--primary-soft); }
.admin-side-foot { padding: 14px 22px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); }
.admin-scrim { display: none; }
.admin-content { display: flex; flex-direction: column; min-width: 0; }
.admin-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 32px; background: color-mix(in srgb, #f6f6f3 82%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--border); }
.admin-menu { display: none; width: 38px; height: 38px; padding: 0; place-items: center; color: var(--fg-soft); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.admin-search { display: flex; align-items: center; flex: 0 1 380px; gap: 8px; height: 40px; padding: 0 14px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; transition: border-color .2s, box-shadow .2s; }
.admin-search:focus-within { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 10%, transparent); }
.admin-search .icon { width: 16px; height: 16px; }
.admin-search input { height: 100%; padding: 0; font-size: 14px; border: 0; background: none; box-shadow: none; }
.admin-top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.admin-main { width: 100%; max-width: 1320px; padding: 28px 32px 56px; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-title h1, .admin-main > h1 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 26px; letter-spacing: -.02em; }
.page-title p { margin: 0; }
.title-id { font-size: 18px; font-weight: 500; color: var(--faint); }
.title-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-block; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.eyebrow { margin-bottom: 8px; font-size: 11px; font-weight: 600; letter-spacing: .18em; color: var(--primary); }
.admin-main > p, .admin-main > .subtle { margin-bottom: 16px; }
.admin-main .panel { padding: 22px; margin: 0 0 var(--gap); }
.admin-main .panel > h2:not(.panel-title), .admin-main .panel > h3 { margin: 0 0 12px; font-size: 16px; }
.panel-title { gap: 8px; }
.panel-title .icon { width: 18px; height: 18px; color: #7c3aed; }
.title-note { margin-left: 4px; font-size: 12px; font-weight: 400; color: var(--muted); }
.panel-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; }
.panel-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 70%, transparent), color-mix(in srgb, var(--primary) 12%, transparent) 60%, transparent); }
.panel-head h2 { margin: 0; font-size: 16px; }
.panel-head a { font-size: 13px; color: var(--muted); }
.hint { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; line-height: 1.6; color: var(--muted); }
.hint a { color: var(--primary); }
.count-pill { margin-left: 6px; padding: 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; }

/* 按钮 */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; font-size: 14px; font-weight: 600; line-height: 1; letter-spacing: .01em; white-space: nowrap; color: var(--on-primary); background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 88%, #fff), var(--primary)); border: 1px solid color-mix(in srgb, var(--primary) 80%, #000); border-radius: 12px; box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), 0 6px 14px -10px color-mix(in srgb, var(--primary) 80%, transparent); cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform .1s, filter .2s; }
.button:hover { color: var(--on-primary); background: var(--primary-hover); border-color: var(--primary-hover); }
.button:active { transform: translateY(1px); }
.button.small { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.button.secondary { color: var(--fg); background: var(--surface); border-color: var(--border); box-shadow: 0 1px 2px rgb(42 42 37 / .06); }
.button.secondary:hover { color: var(--fg); background: var(--surface-2); border-color: var(--border-strong); }
.button.ghost { color: var(--muted); background: transparent; border-color: transparent; box-shadow: none; }
.button.ghost:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.button.block-btn, .block-btn { width: 100%; }
label.button { flex-direction: row; cursor: pointer; }
.button.loading, label.loading { position: relative; pointer-events: none; opacity: .75; }
.button.loading::after, label.loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.text-button { padding: 4px 8px; font-size: 13px; color: var(--muted); background: none; border: 0; border-radius: 8px; }
.text-button:hover { color: var(--fg); background: var(--surface-2); }
.text-button.danger:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }

/* 仪表盘 */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin: 0 0 var(--gap); }
.stat-card { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 20px; background: linear-gradient(160deg, color-mix(in srgb, var(--t) 7%, var(--surface)) 0%, var(--surface) 55%); border: 1px solid color-mix(in srgb, var(--t) 14%, var(--border)); border-radius: var(--radius-lg); box-shadow: 0 16px 32px -28px color-mix(in srgb, var(--t) 70%, transparent); transition: border-color .2s, box-shadow .2s, transform .2s; }
.stat-card:hover { color: inherit; border-color: color-mix(in srgb, var(--t) 35%, var(--border)); box-shadow: 0 12px 26px -18px color-mix(in srgb, var(--t) 70%, transparent); transform: translateY(-2px); }
.stat-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--t) 14%, transparent), transparent 70%); }
.stat-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; color: var(--t); background: color-mix(in srgb, var(--t) 12%, transparent); border-radius: 12px; }
.stat-card small { font-size: 13px; color: var(--muted); }
.stat-card strong { font-size: 30px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); align-items: start; }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-actions > a, .quick-actions button { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; width: 100%; padding: 14px; text-align: left; color: var(--fg); background: var(--block-bg); border: 1px solid var(--block-border); border-radius: 14px; transition: border-color .2s, background-color .2s, box-shadow .2s, transform .2s; }
.quick-actions > a:hover, .quick-actions button:hover { color: var(--fg); background: var(--block-hover); box-shadow: 0 8px 18px -14px color-mix(in srgb, var(--primary) 60%, transparent); transform: translateX(2px); }
.quick-actions form { margin: 0; }
.qa-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 40px; height: 40px; font-size: 16px; font-weight: 700; color: var(--t); background: color-mix(in srgb, var(--t) 13%, var(--surface)); border-radius: 12px; }
.quick-actions b { font-size: 14px; }
.quick-actions small { font-size: 12px; color: var(--muted); }
.log-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; margin-bottom: 8px; font-size: 14px; background: var(--block-bg); border: 1px solid var(--block-border); border-radius: 12px; }
.log-row:last-child { margin-bottom: 0; }
.log-row time, .log-row > small { flex-shrink: 0; font-size: 12px; color: var(--faint); }
.log-dot { display: inline-block; width: 6px; height: 6px; margin-right: 10px; vertical-align: middle; background: var(--primary); border-radius: 50%; }
.child-row { padding-left: 18px; }
.tree { margin-right: 6px; color: var(--faint); }
.log-row .dot { margin-right: 8px; vertical-align: middle; }
.mini-rank { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 6px; font-size: 14px; background: var(--block-bg); border: 1px solid var(--block-border); border-radius: 12px; transition: background-color .2s, transform .2s; }
.mini-rank:hover { color: inherit; background: var(--block-hover); transform: translateX(2px); }
.mini-no { width: 20px; font-size: 13px; font-weight: 700; color: var(--faint); text-align: center; }
.mini-no.r1 { color: #f59e0b; } .mini-no.r2 { color: #94a3b8; } .mini-no.r3 { color: #ea580c; }
.mini-icon { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; overflow: hidden; font-size: 13px; font-weight: 700; color: var(--t); background: color-mix(in srgb, var(--t) 12%, transparent); border-radius: 9px; }
.mini-icon img, .cell-icon img { width: 100%; height: 100%; padding: 3px; object-fit: contain; background: #fff; }
.mini-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-rank small { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.status-list { margin: 0 0 14px; padding: 0; list-style: none; font-size: 14px; }
.status-list li { display: flex; justify-content: space-between; padding: 9px 12px; margin-bottom: 6px; background: var(--block-bg); border: 1px solid var(--block-border); border-radius: 12px; }

.status-list span { color: var(--muted); }
.status-list b { font-variant-numeric: tabular-nums; }
.status-list b.ok { color: var(--success); }
.status-list b.off { color: var(--faint); font-weight: 500; }

/* 编辑页 */
.edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); align-items: start; }
.edit-side .sticky-panel { position: sticky; top: 80px; z-index: 2; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 14px; font-weight: 550; color: var(--fg-soft); }
.field-label em, label em { font-style: normal; color: var(--danger); }
.url-row { display: flex; gap: 8px; }
.url-row input { flex: 1; min-width: 0; }
.ai-btn { flex-shrink: 0; height: auto; min-height: 46px; padding: 0 18px; background: linear-gradient(135deg, #7c3aed, #2563eb); border: 0; box-shadow: 0 8px 18px -10px #7c3aed; }
.ai-btn:hover { background: linear-gradient(135deg, #6d28d9, #1d4ed8); }
.ai-btn .icon { width: 17px; height: 17px; }
.ai-btn.loading .icon { display: none; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.check-card { position: relative; flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 400; background: var(--surface-2); border: 1px solid transparent; border-radius: 10px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.check-card:hover { border-color: var(--border-strong); }
.check-card:has(input:checked) { color: var(--primary-soft-fg); background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.check-card.child span::before { content: "└ "; color: var(--faint); }
.switch { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; font-weight: 500; cursor: pointer; }
.switch input { position: relative; flex-shrink: 0; order: 2; width: 40px; height: 22px; margin: 0; appearance: none; background: var(--border-strong); border: 0; border-radius: 999px; cursor: pointer; transition: background-color .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; box-shadow: none; }
.icon-field { display: flex; align-items: center; gap: 14px; }
.icon-preview { display: grid; place-items: center; width: 64px; height: 64px; flex-shrink: 0; overflow: hidden; font-size: 26px; font-weight: 700; color: var(--t); background: color-mix(in srgb, var(--t) 12%, transparent); border: 1px solid var(--border); border-radius: 18px; }
.icon-preview img { width: 100%; height: 100%; padding: 8px; object-fit: contain; background: #fff; }
.icon-actions { display: flex; flex: 1; flex-direction: column; gap: 8px; }
.icon-actions .button { width: 100%; }
.shot-preview { display: grid; place-items: center; overflow: hidden; aspect-ratio: 16 / 10; font-size: 13px; color: var(--faint); background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 12px; }
.shot-preview img { width: 100%; height: 100%; object-fit: cover; }
.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 4px color-mix(in srgb, #7c3aed 35%, transparent); border-color: #7c3aed; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* 列表与表格 */
.filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filter-row input { width: 260px; height: 36px; padding: 0 14px; font-size: 13px; border-radius: 999px; }
.filter-links { display: flex; gap: 14px; margin-left: auto; font-size: 13px; color: var(--muted); }
.filter-links a:hover { color: var(--primary); }
.table-panel { padding: 0 !important; overflow: hidden; }
.table-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.table-toolbar select, .inline-form select, .admin-main .toolbar select { width: auto; height: 34px; padding-top: 0; padding-bottom: 0; font-size: 13px; border-radius: 9px; }
.table-scroll { overflow: auto; }
table { width: 100%; font-size: 13px; border-collapse: collapse; }
th { font-weight: 500; text-align: left; color: var(--muted); background: var(--surface-2); }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.data-table th { position: sticky; top: 0; font-size: 12px; letter-spacing: .02em; white-space: nowrap; }
.data-table tbody tr { transition: background-color .15s; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--primary) 3%, var(--surface)); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.col-check { width: 44px; }
.col-actions { width: 1%; white-space: nowrap; text-align: right; }
.col-actions a { margin-left: 12px; color: var(--primary); }
.site-cell { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.cell-icon { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; overflow: hidden; font-size: 15px; font-weight: 700; color: var(--t); background: color-mix(in srgb, var(--t) 12%, transparent); border-radius: 10px; }
.cell-name { font-size: 14px; font-weight: 600; color: var(--fg); }
.site-cell small { display: block; font-size: 12px; color: var(--faint); }
.cell-muted { font-size: 12px; color: var(--muted); }
.mini-tag { display: inline-block; padding: 0 6px; font-size: 11px; font-weight: 500; line-height: 18px; color: var(--warning-fg); background: var(--warning-soft); border-radius: 5px; vertical-align: 1px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--muted); background: var(--surface-2); border-radius: 999px; }
.status-badge::before { content: ""; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.s-published, .s-approved, .s-resolved, .s-completed { color: #047857; background: #ecfdf5; }
.s-pending, .s-partial, .s-retry_wait { color: #b45309; background: #fffbeb; }
.s-trash, .s-rejected, .s-failed { color: #be123c; background: #fff1f2; }
.s-running { color: #1d4ed8; background: #eff6ff; }
.s-merged, .s-preview { color: #6d28d9; background: #f5f3ff; }
.job-kind { padding: 1px 7px; margin-left: 4px; font-family: var(--mono); font-size: 12px; color: var(--fg-soft); background: var(--surface-2); border-radius: 6px; }
.job-error { display: block; max-width: 420px; margin-top: 4px; overflow: hidden; color: var(--danger); text-overflow: ellipsis; white-space: nowrap; }
.inline-form { display: inline-flex; gap: 6px; }
.review-card { border-left: 3px solid color-mix(in srgb, var(--primary) 45%, var(--border)) !important; }
.review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.review-head h3 { margin: 0 0 2px; font-size: 16px; }
.comment-body { margin: 10px 0 14px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fg-soft); }
.empty-state { padding: 40px 20px !important; text-align: center; }
.empty-state b { display: block; margin-bottom: 4px; font-size: 16px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; margin-bottom: var(--gap); }
.two-col > * { margin: 0 !important; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.settings-grid > * { margin: 0 !important; }
.settings-grid > .stack { gap: var(--gap); }
.settings-grid > .stack > * { margin: 0 !important; }
.code-line { display: block; padding: 10px 14px; font-family: var(--mono); font-size: 13px; background: var(--surface-2); border-radius: 10px; }
details > summary { cursor: pointer; font-size: 14px; color: var(--primary); }
details[open] > summary { margin-bottom: 12px; }

/* 网站配色 */
.theme-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--gap); align-items: start; }
.theme-layout > .stack { gap: var(--gap); }
.theme-layout .panel { margin: 0; }
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.swatch { position: relative; display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px; font-weight: 500; background: var(--block-bg); border: 1px solid var(--block-border); border-radius: 14px; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.swatch:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -16px rgb(0 0 0 / .35); }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch-dot { grid-row: 1 / 3; width: 36px; height: 36px; border-radius: 50%; box-shadow: inset 0 0 0 3px rgb(255 255 255 / .5); }
.swatch b { font-size: 14px; color: var(--fg); }
.swatch small { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.swatch:has(input:checked) { border-color: var(--fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 10%, transparent); }
.swatch:has(input:checked)::after { content: "✓"; position: absolute; top: 8px; right: 10px; font-size: 13px; font-weight: 700; color: var(--fg); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.color-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.color-row input[type="color"] { width: 52px; height: 44px; padding: 4px; cursor: pointer; border-radius: 12px; }
.color-row input[data-color-text] { width: 140px; font-family: var(--mono); }
.color-row .hint { flex: 1 1 220px; }
.theme-preview { position: sticky; top: 84px; --pv-soft: color-mix(in srgb, var(--primary) 9%, #fff); --pv-fg: color-mix(in srgb, var(--primary) 78%, #000); }
.tp-hero { padding: 18px; margin-bottom: 14px; background: radial-gradient(80% 120% at 100% 0%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%), var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.tp-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; font-size: 11px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.tp-badge i { width: 6px; height: 6px; background: var(--primary); border-radius: 50%; }
.tp-hero b { display: block; margin: 10px 0 12px; font-size: 19px; }
.tp-search { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 4px 4px 4px 14px; font-size: 12px; color: var(--faint); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.tp-search em { display: grid; place-items: center; height: 100%; padding: 0 14px; font-style: normal; font-weight: 600; color: #fff; background: var(--primary); border-radius: 999px; }
.tp-chips { display: flex; gap: 6px; margin-bottom: 14px; }
.tp-chips span { padding: 4px 12px; font-size: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.tp-chips .on { color: var(--pv-fg); background: var(--pv-soft); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.tp-card { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 14px; background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 7%, #fff), #fff 60%); border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border)); border-radius: 16px; box-shadow: 0 14px 26px -18px color-mix(in srgb, var(--primary) 70%, transparent); }
.tp-icon { display: grid; place-items: center; width: 40px; height: 40px; font-weight: 700; color: #fff; background: var(--primary); border-radius: 12px; }
.tp-card div { flex: 1; }
.tp-card b { display: block; font-size: 14px; color: var(--primary); }
.tp-card small { font-size: 12px; color: var(--muted); }
.tp-star { color: #f59e0b; }
.tp-actions { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.tp-btn { padding: 8px 16px; font-weight: 600; color: #fff; background: var(--primary); border-radius: 999px; }
.tp-btn.ghost { color: var(--pv-fg); background: var(--pv-soft); }
.tp-actions a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

/* 标签管理 */
.tag-list { display: flex; flex-direction: column; gap: 10px; padding: 16px !important; }
.tag-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: start; padding: 14px 16px; background: var(--block-bg); border: 1px solid var(--block-border); border-radius: 16px; transition: border-color .2s, box-shadow .2s; }
.tag-row:hover, .tag-row.editing { border-color: color-mix(in srgb, var(--primary) 25%, var(--border)); box-shadow: 0 10px 22px -18px color-mix(in srgb, var(--primary) 60%, transparent); }
.tag-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tag-name { font-size: 16px; font-weight: 650; color: var(--fg); }
.tag-name:hover { color: var(--primary); }
.tag-head .count-pill { margin-left: 0; }
.tag-desc { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.tag-sites { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag-site { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 4px; font-size: 13px; color: var(--fg-soft); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; transition: border-color .2s, color .2s; }
.tag-site:hover { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.tag-site .cell-icon { width: 22px; height: 22px; font-size: 11px; border-radius: 50%; }
.tag-site.off { opacity: .55; }
.tag-more { align-self: center; padding: 0 6px; font-size: 13px; color: var(--primary); }
.tag-edit-btn { margin-top: 2px; }
.tag-edit { grid-column: 1 / -1; padding-top: 14px; margin-top: 6px; border-top: 1px dashed var(--border-strong); }
.tag-edit[hidden] { display: none; }

/* 侧栏子菜单（网址管理 › 草稿箱 / 自动发布） */
.admin-nav a.sub { height: 34px; margin-left: 18px; padding-left: 12px; font-size: 13px; }
.admin-nav a.sub::after { content: ""; position: absolute; left: -6px; top: 0; bottom: 0; width: 1px; background: var(--border); }
.admin-nav a.sub .icon { width: 15px; height: 15px; }
.admin-nav a.sub.active::before { left: -30px; }

/* 草稿箱 / 自动发布 */
.info-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 16px; margin-bottom: var(--gap); font-size: 13px; color: var(--muted); background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 14px; }
.strip-sep { width: 1px; height: 14px; background: var(--border-strong); }
.table-toolbar { gap: 12px 20px; }
.toolbar-group { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-left: 20px; border-left: 1px solid var(--border); }
.inline-label { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.inline-label input { width: auto; height: 34px; padding: 0 10px; font-size: 13px; border-radius: 9px; }
.inline-label span { color: var(--muted); font-weight: 400; }
.num-input { width: 80px !important; }
.stat-card strong.stat-text { font-size: 17px; line-height: 1.6; letter-spacing: 0; }
.row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.row-actions form { margin: 0; }
.log-dot.bad { background: var(--danger); }

/* 广告位 */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: var(--gap); }
.slot-grid > .panel { margin: 0; }
.slot-panel .panel-head { align-items: baseline; flex-wrap: wrap; }
.slot-panel .panel-head span { font-size: 12px; }
.slot-empty { margin: 0; padding: 18px; text-align: center; background: var(--block-bg); border: 1px dashed var(--border-strong); border-radius: 12px; }
.ad-row { padding: 12px; margin-bottom: 10px; background: var(--block-bg); border: 1px solid var(--block-border); border-radius: 14px; }
.ad-row:last-child { margin-bottom: 0; }
.ad-row-main { display: flex; align-items: center; gap: 12px; }
.ad-thumb { display: grid; place-items: center; width: 64px; height: 40px; flex-shrink: 0; overflow: hidden; font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--primary-soft-fg); background: var(--primary-soft); border-radius: 8px; }
.ad-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ad-info { flex: 1; min-width: 0; }
.ad-info b { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.ad-info small { display: block; font-size: 12px; color: var(--faint); }
.ad-edit { padding-top: 14px; margin-top: 12px; border-top: 1px dashed var(--border-strong); }
.ad-image-field { display: flex; align-items: flex-start; gap: 12px; }
.ad-preview { display: grid; place-items: center; width: 160px; height: 72px; flex-shrink: 0; overflow: hidden; font-size: 12px; color: var(--faint); background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 10px; }
.ad-preview img { width: 100%; height: 100%; object-fit: contain; }
.stack-sm { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.stack-sm input { width: 100%; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* 自定义代码与提示词 */
.code-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.code-layout > .panel { margin: 0; }
.code-actions { grid-column: 1 / -1; display: flex; gap: 10px; }
.code-input { min-height: 140px; font-family: var(--mono); font-size: 13px; line-height: 1.6; tab-size: 2; }
.tall-code { min-height: 340px; }
.prompt-box { padding: 14px 16px; background: var(--block-bg); border: 1px solid var(--block-border); border-radius: 14px; }
.prompt-box > summary { font-weight: 600; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.prompt-input { min-height: 200px; font-family: var(--font); font-size: 13px; line-height: 1.7; } /* 提示词以中文为主，不用等宽字体 */
.tall-prompt { min-height: 280px; }
.hint code { padding: 1px 6px; font-family: var(--mono); font-size: 11.5px; word-spacing: 4px; background: var(--surface-2); border-radius: 6px; }

/* 对齐：工具栏中的标签、输入框、下拉框与按钮按底部对齐；含表单控件时统一高度 */
.admin-main .toolbar { align-items: flex-end; }
.admin-main .toolbar > label:not(.check):not(.switch):not(.button) { flex: 0 1 260px; }
.admin-main .toolbar select, .admin-main .toolbar input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]) { height: 40px; padding-top: 0; padding-bottom: 0; }
.admin-main .toolbar:has(select, input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"])) .button { height: 40px; }
.admin-main .toolbar .check { align-self: center; }
.table-toolbar select { height: 34px; }

/* 兼容高级运营页的通用结构 */
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.section-header h2, .section-header h3 { margin: 0; }
.badge { padding: 2px 8px; font-size: 11px; color: var(--muted); white-space: nowrap; background: var(--surface-2); border-radius: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-main .panel .form-grid { align-items: start; }
.check { display: inline-flex; flex-direction: row; align-items: center; gap: 7px; margin-right: 14px; font-weight: 400; }
fieldset { padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; }
legend { padding: 0 6px; font-size: 13px; color: var(--muted); }
.tall { min-height: 240px; }
.block { display: block; }
.admin-main .toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.admin-main .toolbar form { margin: 0; }
.admin-main .panel.toolbar { margin: 0 0 var(--gap); }
.admin-main .stack > button:not(.block-btn), .admin-main .stack > .button:not(.block-btn) { align-self: flex-start; }
.admin-main .stack > input[type="file"] { max-width: 520px; }
.admin-main > .button, .admin-main > a.button { margin-bottom: 16px; }
.admin-main pre { max-height: 450px; padding: 16px; overflow: auto; font-family: var(--mono); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fg-soft); background: var(--surface-2); border-radius: 10px; }
.admin-main .prose { white-space: normal; }
.admin-main .empty { padding: 32px 20px; border-radius: 12px; }
.admin-main .pagination { justify-content: space-between; margin: 16px 0 0; font-size: 13px; }
.admin-main .pagination a { height: 34px; padding: 0 14px; }
.admin-main .notice { font-size: 13px; }
.preview-output { display: block; max-height: 500px; overflow: auto; white-space: pre-wrap; font-family: var(--mono); font-size: 12px; }
details pre { max-height: 400px; overflow: auto; }
output { overflow-wrap: anywhere; color: var(--primary); }

/* 登录页 */
.login-page { position: relative; display: grid; place-items: center; min-height: 100vh; padding: 24px; overflow: hidden; background: #f6f6f3; }
.login-deco { position: absolute; inset: 0; background: radial-gradient(40% 50% at 15% 20%, rgb(124 58 237 / .12), transparent 70%), radial-gradient(40% 50% at 85% 80%, rgb(37 99 235 / .14), transparent 70%); }
.login-card { position: relative; width: 100%; max-width: 420px; padding: 36px 32px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 30px 60px -30px rgb(42 42 37 / .3); }
.login-card .admin-brand { padding: 0; margin-bottom: 26px; }
.login-card h1 { margin: 0 0 4px; font-size: 24px; }
.login-card > .subtle { margin-bottom: 22px; }
.login-card .stack { gap: 16px; }
.login-card .button { height: 46px; margin-top: 4px; }
.login-foot { display: flex; justify-content: space-between; gap: 12px; margin: 20px 0 0; font-size: 12px; color: var(--muted); }
.login-foot code { font-family: var(--mono); }
.login-foot a { flex-shrink: 0; }

@media (max-width: 1180px) {
  .dash-grid, .edit-layout { grid-template-columns: 1fr; }
  .edit-side .sticky-panel { position: static; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
  .theme-layout { grid-template-columns: 1fr; }
  .code-layout { grid-template-columns: 1fr; }
  .toolbar-group { padding-left: 0; border-left: 0; }
  .theme-preview { position: static; }
}
@media (max-width: 960px) {
  .admin-app { grid-template-columns: 1fr; }
  .admin-sidebar { position: fixed; inset: 0 auto 0 0; width: 268px; transform: translateX(-100%); box-shadow: 0 0 40px rgb(0 0 0 / .15); transition: transform .25s var(--ease); }
  .admin-nav-open .admin-sidebar { transform: none; }
  .admin-nav-open .admin-scrim { position: fixed; inset: 0; z-index: 35; display: block; background: rgb(0 0 0 / .3); }
  .admin-menu { display: inline-grid; }
  .admin-topbar { padding: 0 16px; gap: 10px; }
  .admin-search { flex: 1; }
  .admin-top-actions .secondary, .admin-top-actions .ghost { display: none; }
  .admin-main { padding: 20px 16px 40px; }
  .two-col, .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .ad-row-main { flex-wrap: wrap; }
  .ad-image-field { flex-direction: column; }
  .page-title { flex-direction: column; align-items: flex-start; }
  .filter-links { margin-left: 0; }
}
@media (max-width: 560px) {
  .stat-card { padding: 16px; }
  .stat-card strong { font-size: 24px; }
  .quick-actions { grid-template-columns: 1fr; }
  .url-row { flex-direction: column; }
  .ai-btn { min-height: 44px; }
  .admin-search { display: none; }
  .filter-row input { width: 100%; }
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1180px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .header-search { width: 170px; }
  .header-search:focus-within { width: 200px; }
  .hero-orb { width: 440px; height: 440px; right: -120px; }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 960px) {
  :root { --header-h: 124px; }
  .site-header { height: auto; padding: 12px 16px 10px; }
  .header-inner { grid-template-columns: 1fr auto; row-gap: 10px; }
  .nav-pills { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; overflow-x: auto; scrollbar-width: none; }
  .nav-pills::-webkit-scrollbar { display: none; }
  .nav-pills a { flex-shrink: 0; }
  .header-search, .submit-link span { display: none; }
  .submit-link { width: 38px; height: 38px; padding: 0; }
  .mobile-only { display: inline-grid; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: calc(var(--header-h) + 36px) 0 64px; }
  .hero-orb { opacity: .4; }
  .page-head { flex-direction: column; align-items: stretch; }
  .inline-search { flex-basis: auto; }
  .detail-hero { flex-wrap: wrap; }
  .detail-actions { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .detail-actions .btn-lg { width: auto; flex: 1 1 200px; }
  .detail-actions-row { flex: 1 1 260px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
  .utility-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .container { padding-inline: 16px; }
  .brand { height: 44px; padding-right: 14px; font-size: 16px; }
  .brand-mark { width: 32px; height: 32px; font-size: 16px; }
  .nav-pills a { padding: 6px 13px; font-size: 13px; }
  .hero-title { margin: 18px 0 14px; }
  .hero-lead { font-size: 15px; }
  .hero-search { height: 52px; padding-left: 16px; }
  .hero-search .btn { padding: 0 16px; }
  .hero-search .btn .icon { display: none; }
  .hero-stats { margin-top: 32px; }
  .hero-stats > div { padding: 0 18px; }
  .hero-stats dd { font-size: 24px; }
  .catalog-head { margin-bottom: 24px; }
  .catalog-bar { gap: 8px; margin-bottom: 20px; }
  .catalog-bar .chips { flex: 1 1 auto; min-width: 0; }
  .catalog-bar[data-sticky-bar] { position: relative; top: auto; padding: 0; }
  .catalog-bar[data-sticky-bar].stuck::before { display: none; }
  .site-header.joined::before { border-bottom-color: color-mix(in srgb, var(--border) 70%, transparent); }
  .fav-filter { width: 44px; height: 44px; padding: 0; justify-content: center; font-size: 16px; }
  .fav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .card-grid { grid-template-columns: 1fr; gap: 10px; }
  .site-card { padding: 14px; }
  .group { margin-bottom: 36px; }
  .group-head { font-size: 17px; }
  .contribute { flex-direction: column; align-items: flex-start; padding: 28px 24px; margin-bottom: 48px; }
  .contribute h2 { font-size: 20px; }
  .contribute .btn { width: 100%; }
  .page-head h1 { flex-wrap: wrap; }
  .panel { padding: 20px; border-radius: var(--radius); }
  .detail-hero { align-items: flex-start; padding: 22px; gap: 16px; border-radius: var(--radius); }
  .detail-info { flex-basis: calc(100% - 80px); }
  .site-icon.xl { width: 64px; height: 64px; font-size: 28px; border-radius: 18px; }
  .detail-actions-row { grid-template-columns: 1fr 1fr; flex-basis: 100%; }
  .detail-actions .btn-lg { flex-basis: 100%; }
  .info-list { grid-template-columns: 1fr 1fr; }
  .favorite-list { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .to-top { right: 16px; bottom: 16px; }
  .rank-hero { flex-direction: column; align-items: stretch; padding: 22px; }
  .rank-switch { align-self: flex-start; }
  .rank-board > li:not(.rank-board-empty) { gap: 12px; padding: 12px 14px 12px 10px; }
  .rank-board .site-icon { width: 38px; height: 38px; font-size: 16px; }
  .rank-score { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  .site-header, .site-footer, .to-top, .catalog-bar, .contribute, .detail-actions, .detail-aside form, .comment-form, .hero-deco, #toast { display: none !important; }
  body { background: #fff; color: #000; }
  .panel, .site-card, .detail-hero { border-color: #ccc; box-shadow: none; }
}

/* 采集导入 */
.page-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: var(--gap); width: fit-content; max-width: 100%; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 14px; }
.page-tabs a { padding: 8px 18px; font-size: 14px; font-weight: 600; color: var(--muted); border-radius: 10px; text-decoration: none; transition: color .15s, background .15s; }
.page-tabs a:hover { color: var(--fg); background: var(--surface-2); }
.page-tabs a.active { color: var(--on-primary); background: var(--primary); }
.url-input { min-height: 240px; }
.format-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.format-list li { display: grid; gap: 4px; padding: 12px 14px; background: var(--block-bg); border-radius: 12px; }
.format-list b { font-size: 14px; }
.format-list span { font-size: 13px; line-height: 1.7; color: var(--muted); }
.section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 18px; }
.task-card { display: grid; gap: 12px; }
.task-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.task-main { display: grid; gap: 2px; flex: 1 1 260px; min-width: 0; }
.task-main b { font-size: 15px; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); }
.task-card .notice, .task-card .task-edit { margin: 0; }
.task-edit { padding-top: 14px; border-top: 1px solid var(--border); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chips a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; font-size: 13px; color: var(--muted); text-decoration: none; background: var(--surface-2); border-radius: 9px; }
.filter-chips a em { font-style: normal; font-weight: 600; color: var(--fg); }
.filter-chips a.active { color: var(--primary); background: var(--primary-soft); }
.filter-chips a.active em { color: var(--primary); }
.collect-queue .table-toolbar { justify-content: space-between; }
.collect-queue .toolbar-group form { margin: 0; }
.queue-notice { margin: 12px 16px 0; }
.cell-note { max-width: 320px; font-size: 12px; line-height: 1.6; color: var(--muted); word-break: break-all; }
@media (max-width: 640px) {
  .page-tabs { width: 100%; }
  .page-tabs a { flex: 1; padding: 8px 10px; text-align: center; }
  .collect-queue .toolbar-group { padding-left: 0; border-left: 0; }
}

/* 后台清理 */
.stat-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.toolbar-end { margin-left: auto; }
.cleanup-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: var(--gap); align-items: start; }
.cleanup-layout > * { margin: 0 !important; }
.cleanup-list { display: grid; }
.cleanup-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); cursor: pointer; font-weight: 400; }
.cleanup-row:last-child { border-bottom: 0; }
.cleanup-row:hover { background: var(--block-bg); }
.cleanup-row.is-disabled { cursor: default; opacity: .7; }
.cleanup-row input { width: 16px; height: 16px; margin: 0; }
.cleanup-main { display: grid; gap: 3px; min-width: 0; }
.cleanup-main b { font-size: 14px; }
.cleanup-main small { font-size: 12px; line-height: 1.6; color: var(--muted); }
.cleanup-count { display: grid; justify-items: end; gap: 1px; min-width: 72px; text-align: right; }
.cleanup-count b { font-size: 18px; font-variant-numeric: tabular-nums; }
.cleanup-count small { font-size: 12px; color: var(--muted); }
.info-strip.compact { margin: 0; padding: 10px 12px; font-size: 12px; line-height: 1.6; }
.update-notes { margin: 0; padding: 14px 16px; font: inherit; font-size: 14px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; background: var(--block-bg); border-radius: 12px; }
.restart-mask { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); }
.restart-mask p { margin: 0; padding: 22px 28px; font-size: 15px; background: var(--card-bg); border-radius: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
@media (max-width: 1180px) { .cleanup-layout { grid-template-columns: 1fr; } }

/* 安装向导 */
.install-page { align-items: start; padding: 48px 20px; }
.install-card { max-width: 600px; }
.install-section { display: flex; flex-direction: column; gap: 14px; min-width: 0; margin: 0; padding: 18px 18px 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--block-bg, var(--surface)); }
.install-section legend { display: flex; align-items: center; gap: 8px; padding: 0 6px; font-size: 15px; font-weight: 700; color: var(--fg); }
.install-section .hint { margin: -4px 0 0; }
.step-no { display: inline-grid; place-items: center; width: 22px; height: 22px; font-size: 12px; color: var(--on-primary); background: var(--primary); border-radius: 50%; }
.install-grid-host { grid-template-columns: minmax(0, 1fr) 110px; }
.install-test { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.install-msg { font-size: 13px; line-height: 1.6; color: var(--muted); }
.install-msg.ok { color: var(--success, #15803d); }
.install-msg.bad { color: var(--danger); }
.install-error { margin: 0; padding: 12px 14px; font-size: 14px; line-height: 1.6; color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); border-radius: 12px; }
.install-submit { width: 100%; height: 46px; }
.install-done { display: grid; justify-items: center; gap: 14px; padding: 12px 0 4px; text-align: center; }
.install-done h1 { margin: 0; }
.done-mark { display: grid; place-items: center; width: 64px; height: 64px; font-size: 30px; font-weight: 700; color: #fff; background: var(--primary); border-radius: 50%; }
@media (max-width: 560px) { .install-grid-host { grid-template-columns: 1fr; } .install-section { padding: 14px; } }

/* ===== 首屏风格（后台「首屏切换」） ===== */
.hi { display: inline-grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; overflow: hidden; font-size: 16px; font-weight: 700; color: var(--t, var(--primary)); background: color-mix(in srgb, var(--t, var(--primary)) 14%, var(--surface)); border-radius: 12px; }
.hi img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.hero-badge { margin-bottom: 4px; }

/* 2 聚光搜索 */
.hero-spotlight { padding-bottom: 100px; background: radial-gradient(55% 60% at 50% 0%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 72%), linear-gradient(180deg, var(--hero-from), var(--hero-to)); }
.hero-spotlight::before { background-image: linear-gradient(color-mix(in srgb, var(--fg) 7%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--fg) 7%, transparent) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(60% 70% at 50% 20%, #000, transparent 75%); mask-image: radial-gradient(60% 70% at 50% 20%, #000, transparent 75%); }
.spot-beam { position: absolute; top: -120px; left: 50%; z-index: -1; width: 1000px; height: 760px; transform: translateX(-50%); background: conic-gradient(from 180deg at 50% 0%, transparent 155deg, color-mix(in srgb, var(--primary) 22%, transparent) 180deg, transparent 205deg); filter: blur(24px); pointer-events: none; }
.hero-spotlight .hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-spotlight .hero-title { max-width: 920px; margin-inline: auto; font-size: clamp(42px, 7vw, 82px); }
.hero-spotlight .hero-lead { margin-inline: auto; }
.hero-spotlight .hero-search { width: 100%; max-width: 760px; height: 70px; padding: 7px 7px 7px 26px; border-radius: 24px; box-shadow: 0 36px 70px -34px color-mix(in srgb, var(--primary) 55%, transparent), 0 1px 0 rgb(255 255 255 / .6) inset; }
.hero-spotlight .hero-search input { font-size: 17px; }
.hero-spotlight .hero-search .btn { height: 56px; padding: 0 30px; border-radius: 17px; font-size: 15px; }
.hero-spotlight .hot-tags, .hero-spotlight .hero-stats { justify-content: center; }

/* 3 极光夜幕 */
.hero-aurora { --fg: #f8fafc; --fg-soft: #e2e8f0; --muted: rgb(203 213 225 / .78); --surface: rgb(255 255 255 / .07); --border: rgb(255 255 255 / .16); --shadow-sm: none; padding-bottom: 130px; color: var(--fg); background: radial-gradient(80% 60% at 50% 110%, #1e1b4b 0%, transparent 70%), #050816; }
.hero-aurora::before { background-image: radial-gradient(1px 1px at 12% 22%, #fff, transparent), radial-gradient(1px 1px at 72% 12%, #fff, transparent), radial-gradient(1.5px 1.5px at 38% 64%, #fff, transparent), radial-gradient(1px 1px at 86% 48%, #fff, transparent), radial-gradient(1px 1px at 22% 82%, #fff, transparent), radial-gradient(1.5px 1.5px at 58% 34%, #fff, transparent); background-size: 420px 300px; opacity: .55; -webkit-mask-image: none; mask-image: none; }
.aurora-sky { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora-sky i { position: absolute; width: 60vw; max-width: 760px; aspect-ratio: 1.6; border-radius: 50%; filter: blur(70px); opacity: .55; mix-blend-mode: screen; animation: aurora-drift 16s ease-in-out infinite alternate; }
.aurora-sky i:nth-child(1) { top: -18%; left: 30%; background: #22d3ee; }
.aurora-sky i:nth-child(2) { top: 0; right: -12%; background: #a78bfa; animation-duration: 20s; animation-delay: -6s; }
.aurora-sky i:nth-child(3) { top: 22%; left: 48%; background: #34d399; opacity: .35; animation-duration: 24s; animation-delay: -12s; }
.aurora-sky b { position: absolute; top: 8%; left: 40%; width: 70%; height: 46%; background: linear-gradient(100deg, transparent 10%, rgb(52 211 153 / .28) 35%, rgb(56 189 248 / .3) 55%, rgb(167 139 250 / .25) 75%, transparent 90%); filter: blur(30px); transform: skewY(-12deg); animation: aurora-wave 12s ease-in-out infinite alternate; }
@keyframes aurora-drift { to { transform: translate(-12%, 14%) scale(1.2) rotate(18deg); } }
@keyframes aurora-wave { to { transform: skewY(-4deg) translateX(-8%); opacity: .6; } }
.hero-aurora .hero-title { max-width: 820px; font-size: clamp(44px, 6.6vw, 80px); background: linear-gradient(100deg, #fff 30%, #a5f3fc 65%, #c4b5fd); -webkit-background-clip: text; background-clip: text; }
.hero-aurora .pill-badge { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hero-aurora .pill-badge .dot { background: #34d399; box-shadow: 0 0 12px #34d399; }
.hero-aurora .hero-search { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .2); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 20px 60px -20px rgb(34 211 238 / .35); }
.hero-aurora .hero-search input { color: #fff; }
.hero-aurora .hero-search input::placeholder { color: rgb(255 255 255 / .55); }
.hero-aurora .hero-search .btn { color: #04131b; background: linear-gradient(100deg, #67e8f9, #a7f3d0); }
.hero-aurora .hot-chip { color: var(--fg-soft); }
.hero-aurora .hero-stats > div { border-color: rgb(255 255 255 / .16); }
.hero-aurora::after, .hero-terminal::after { display: none; }
.hero-aurora, .hero-terminal { margin-bottom: 28px; border-radius: 0 0 36px 36px; }

/* 4 便当格 */
.bento-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 52px; align-items: center; }
.hero-bento .hero-title { font-size: clamp(38px, 5vw, 62px); }
.bento-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(96px, auto); gap: 12px; }
.bento-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-width: 0; padding: 14px; color: var(--fg); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 18px 40px -30px rgb(15 23 42 / .45); transition: transform .25s, box-shadow .25s; }
a.bento-tile:hover { color: var(--fg); transform: translateY(-3px); box-shadow: 0 24px 44px -28px color-mix(in srgb, var(--t, var(--primary)) 60%, transparent); }
.bento-count { grid-column: span 2; grid-row: span 2; padding: 20px; color: #fff; background: radial-gradient(80% 80% at 100% 0%, rgb(255 255 255 / .25), transparent 60%), linear-gradient(145deg, var(--primary), color-mix(in srgb, var(--primary) 55%, #7c3aed)); border: 0; }
.bento-count small { font-size: 13px; opacity: .85; }
.bento-count strong { font-size: clamp(48px, 6vw, 72px); font-weight: 800; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.bento-count span { font-size: 14px; opacity: .9; }
.bento-site .hi { width: 34px; height: 34px; border-radius: 10px; }
.bento-site b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.bento-site small { display: none; }
.bento-cats { grid-column: span 3; justify-content: flex-start; }
.bento-cats:last-child { grid-column: span 4; }
.bento-cats > small { font-size: 12px; color: var(--muted); }
.bento-cats > div { display: flex; flex-wrap: wrap; gap: 6px; }
.bento-cats a { padding: 3px 10px; font-size: 12px; font-weight: 600; color: var(--t); background: color-mix(in srgb, var(--t) 12%, transparent); border-radius: 999px; }
.bento-stat { align-items: center; justify-content: center; text-align: center; color: var(--primary); background: var(--primary-soft); border-color: transparent; }
.bento-stat strong { font-size: 26px; font-weight: 800; line-height: 1; }
.bento-stat small { font-size: 12px; color: var(--muted); }

/* 5 卡片叠层 */
.stack-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.card-fan { position: relative; height: 440px; }
.fan-card { --x: 0px; --r: 0deg; position: absolute; top: 46%; left: 50%; display: grid; gap: 10px; width: 290px; padding: 22px; color: var(--fg); background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--t); border-radius: 22px; box-shadow: 0 34px 60px -34px rgb(15 23 42 / .45); transform: translate(-50%, -50%) translateX(var(--x)) rotate(var(--r)); transform-origin: 50% 260%; transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .3s; animation: fan-float 6s ease-in-out infinite; }
.fan-card:nth-child(1) { --x: -40px; --r: -14deg; z-index: 1; animation-delay: -1s; }
.fan-card:nth-child(2) { --x: -20px; --r: -7deg; z-index: 2; animation-delay: -2s; }
.fan-card:nth-child(3) { z-index: 5; animation-delay: -3s; }
.fan-card:nth-child(4) { --x: 20px; --r: 7deg; z-index: 2; animation-delay: -4s; }
.fan-card:nth-child(5) { --x: 40px; --r: 14deg; z-index: 1; animation-delay: -5s; }
.card-fan:hover .fan-card:nth-child(1) { --r: -19deg; } .card-fan:hover .fan-card:nth-child(2) { --r: -10deg; } .card-fan:hover .fan-card:nth-child(4) { --r: 10deg; } .card-fan:hover .fan-card:nth-child(5) { --r: 19deg; }
.fan-card:hover { z-index: 9; color: var(--fg); box-shadow: 0 40px 70px -30px color-mix(in srgb, var(--t) 55%, transparent); }
.fan-card .hi { width: 48px; height: 48px; border-radius: 14px; }
.fan-card b { font-size: 18px; }
.fan-card p { display: -webkit-box; overflow: hidden; margin: 0; font-size: 13px; line-height: 1.65; color: var(--muted); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fan-card span { font-size: 12px; color: var(--t); }
@keyframes fan-float { 50% { translate: 0 -10px; } }

/* 6 终端 */
.hero-terminal { padding-bottom: 110px; background: radial-gradient(60% 50% at 50% 0%, rgb(46 160 67 / .16), transparent 70%), #0a0e14; }
.hero-terminal::before { background-image: linear-gradient(rgb(255 255 255 / .03) 1px, transparent 1px); background-size: 100% 4px; -webkit-mask-image: none; mask-image: none; }
.term { max-width: 880px; margin: 12px auto 0; overflow: hidden; font-family: var(--mono); background: #0d1117; border: 1px solid #30363d; border-radius: 14px; box-shadow: 0 50px 90px -40px rgb(0 0 0 / .8), 0 0 0 1px rgb(255 255 255 / .03), 0 0 80px -30px rgb(46 160 67 / .4); }
.term-bar { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; background: #161b22; border-bottom: 1px solid #30363d; }
.term-bar i { width: 12px; height: 12px; background: #ff5f57; border-radius: 50%; }
.term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { flex: 1; margin-right: 52px; overflow: hidden; font-size: 12px; text-align: center; text-overflow: ellipsis; white-space: nowrap; color: #8b949e; }
.term-body { padding: 24px 28px 28px; font-size: 14.5px; line-height: 1.9; color: #c9d1d9; }
.term-body p { margin: 0; }
.term-comment { color: #8b949e; }
.term-comment:first-child { margin-bottom: 8px !important; font-family: var(--font); font-size: clamp(24px, 3.4vw, 40px); font-weight: 800; line-height: 1.3; letter-spacing: -.02em; color: #f0f6fc; }
.term-ps { margin-right: 6px; font-weight: 700; color: #7ee787; }
.term-out { margin-bottom: 6px !important; padding-left: 26px; }
.term-out b { color: #79c0ff; }
.term-ls { display: flex; flex-wrap: wrap; gap: 2px 20px; }
.term-ls a { color: #d2a8ff; }
.term-ls a:hover { color: #f0f6fc; text-decoration: underline; }
.term-prompt { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 8px 8px 14px; background: #161b22; border: 1px solid #30363d; border-radius: 10px; transition: border-color .2s; }
.term-prompt:focus-within { border-color: #7ee787; }
.term-prompt label { flex-direction: row; gap: 0; font-size: 14.5px; font-weight: 400; color: #c9d1d9; white-space: nowrap; }
.term-prompt input { flex: 1; min-width: 0; height: 34px; padding: 0 4px; font-family: var(--mono); font-size: 14.5px; color: #e6edf3; caret-color: #7ee787; background: none; border: 0; box-shadow: none !important; }
.term-prompt input::placeholder { color: #6e7681; }
.term-prompt button { height: 34px; padding: 0 14px; font-family: var(--mono); font-size: 13px; color: #fff; background: #238636; border: 0; border-radius: 8px; cursor: pointer; }
.term-prompt button:hover { background: #2ea043; }
.term-caret { display: inline-block; width: 9px; height: 18px; vertical-align: -3px; background: #7ee787; animation: caret-blink 1s steps(1) infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }

/* 7 杂志封面 */
.hero-magazine { padding-bottom: 80px; background: linear-gradient(180deg, #f8f4ea, var(--bg)); }
.hero-magazine::before { background-image: none; }
[data-theme="dark"] .hero-magazine { background: linear-gradient(180deg, #1c1a14, var(--bg)); }
.mag-masthead { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--fg); border-top: 4px solid var(--fg); border-bottom: 1px solid var(--fg); }
.hero-magazine .hero-title { max-width: none; margin: 28px 0 32px; font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif; font-size: clamp(50px, 9vw, 120px); font-weight: 900; line-height: 1.02; letter-spacing: -.02em; color: var(--fg); background: none; }
.hero-magazine .hero-title span { color: var(--primary); }
.mag-columns { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; padding-top: 28px; border-top: 1px solid var(--border-strong); }
.hero-magazine .hero-lead { max-width: none; font-family: "Songti SC", "Noto Serif SC", "STSong", serif; font-size: 19px; line-height: 1.85; color: var(--fg-soft); }
.hero-magazine .hero-lead::first-letter { float: left; margin: 4px 10px 0 0; font-size: 3.3em; font-weight: 900; line-height: .9; color: var(--primary); }
.hero-magazine .hero-search { height: 58px; padding: 0 0 0 4px; background: none; border: 0; border-bottom: 2px solid var(--fg); border-radius: 0; box-shadow: none; }
.hero-magazine .hero-search .btn { height: 44px; border-radius: 0; color: var(--bg); background: var(--fg); box-shadow: none; }
.hero-magazine .hot-chip { border-radius: 0; box-shadow: none; }
.hero-magazine .hero-stats dd { font-family: "Songti SC", "Noto Serif SC", serif; }
.mag-picks h2 { margin: 0 0 6px; padding-bottom: 8px; font-size: 12px; letter-spacing: .2em; color: var(--fg); border-bottom: 2px solid var(--fg); }
.mag-picks ol { margin: 0; padding: 0; list-style: none; counter-reset: pick; }
.mag-picks li { counter-increment: pick; border-bottom: 1px dashed var(--border-strong); }
.mag-picks a { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; padding: 12px 0; color: var(--fg); }
.mag-picks a::before { content: counter(pick, decimal-leading-zero); grid-row: span 2; font-family: "Songti SC", "Noto Serif SC", serif; font-size: 28px; font-weight: 900; line-height: 1.1; color: var(--primary); }
.mag-picks b { font-size: 16px; }
.mag-picks span { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.mag-picks a:hover b { color: var(--primary); }

/* 8 跑马灯 */
.hero-marquee { padding-bottom: 70px; background: radial-gradient(50% 60% at 50% 0%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 70%), linear-gradient(180deg, var(--hero-from), var(--hero-to)); }
.hero-marquee .hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-marquee .hero-title { max-width: 1040px; font-size: clamp(46px, 8vw, 100px); line-height: 1.04; letter-spacing: -.04em; background: linear-gradient(100deg, var(--fg) 20%, var(--primary) 55%, #db2777 90%); -webkit-background-clip: text; background-clip: text; }
.hero-marquee .hero-lead { margin-inline: auto; }
.hero-marquee .hero-search { width: 100%; max-width: 620px; }
.marquee { display: grid; gap: 14px; margin: 48px 0 10px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 45s linear infinite; }
.marquee-track.reverse { animation-direction: reverse; animation-duration: 55s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.mq-item { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 22px 0 8px; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--fg); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); transition: border-color .2s, color .2s; }
.mq-item:hover { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.mq-item .hi { width: 38px; height: 38px; }
.mq-cat { padding-left: 20px; color: var(--t); }
.mq-cat .dot { width: 8px; height: 8px; }
.hero-marquee .hot-tags, .hero-marquee .hero-stats { justify-content: center; }

/* 9 星轨 */
.orbit-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.orbit { --r1: 150px; --r2: 232px; position: relative; width: 500px; height: 500px; margin: -20px auto; }
.orbit::before, .orbit::after { content: ""; position: absolute; border: 1px dashed color-mix(in srgb, var(--primary) 30%, var(--border-strong)); border-radius: 50%; }
.orbit::before { inset: calc(50% - var(--r1)); }
.orbit::after { inset: calc(50% - var(--r2)); }
.orbit-ring { position: absolute; inset: 0; z-index: 1; animation: orbit-spin 70s linear infinite; }
.orbit-ring.ring-1 { animation-duration: 50s; animation-direction: reverse; }
.orbit-ring > a { --step: 45deg; --r: var(--r2); position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px; transform: rotate(calc(var(--i) * var(--step))) translateX(var(--r)) rotate(calc(var(--i) * var(--step) * -1)); }
.ring-1 > a { --step: 60deg; --r: var(--r1); }
.orbit-ring > a:nth-child(2) { --i: 1; } .orbit-ring > a:nth-child(3) { --i: 2; } .orbit-ring > a:nth-child(4) { --i: 3; } .orbit-ring > a:nth-child(5) { --i: 4; } .orbit-ring > a:nth-child(6) { --i: 5; } .orbit-ring > a:nth-child(7) { --i: 6; } .orbit-ring > a:nth-child(8) { --i: 7; }
.orbit-ring > a:nth-child(1) { --i: 0; }
.orbit-up { display: block; animation: orbit-spin 70s linear infinite reverse; }
.ring-1 .orbit-up { animation-duration: 50s; animation-direction: normal; }
.orbit-up .hi { width: 56px; height: 56px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 14px 28px -16px rgb(15 23 42 / .45); transition: transform .2s; }
.orbit-ring > a:hover .hi { transform: scale(1.15); }
.orbit-core { position: absolute; top: 50%; left: 50%; z-index: 2; display: grid; place-items: center; width: 132px; height: 132px; margin: -66px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--primary) 22%, transparent), transparent 70%); animation: core-pulse 4s ease-in-out infinite; }
.orbit-core .brand-mark { width: 88px; height: 88px; font-size: 40px; border-radius: 28px; box-shadow: 0 20px 50px -14px color-mix(in srgb, var(--primary) 70%, transparent); }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes core-pulse { 50% { transform: scale(1.06); } }

/* 10 新粗野 */
.hero-brutal { --ink: #111; padding-bottom: 96px; color: var(--ink); background: #fffcef; }
.hero-brutal::before { background-image: linear-gradient(rgb(17 17 17 / .06) 2px, transparent 2px), linear-gradient(90deg, rgb(17 17 17 / .06) 2px, transparent 2px); background-size: 48px 48px; -webkit-mask-image: none; mask-image: none; }
[data-theme="dark"] .hero-brutal { --ink: #fafafa; background: #141414; }
[data-theme="dark"] .hero-brutal::before { background-image: linear-gradient(rgb(255 255 255 / .06) 2px, transparent 2px), linear-gradient(90deg, rgb(255 255 255 / .06) 2px, transparent 2px); }
.brutal-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-brutal .pill-badge { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #111; background: #ffe600; border: 2px solid #111; border-radius: 0; box-shadow: 4px 4px 0 var(--ink); }
.hero-brutal .pill-badge .dot { background: #111; box-shadow: none; }
.hero-brutal .hero-title { font-size: clamp(44px, 7vw, 90px); font-weight: 900; line-height: 1.04; letter-spacing: -.04em; color: var(--ink); background: none; }
.hero-brutal .hero-title span { display: inline-block; margin-top: .14em; padding: 0 .14em; color: #111; background: #ff6ad5; border: 3px solid #111; box-shadow: 7px 7px 0 var(--ink); transform: rotate(-1.5deg); }
.hero-brutal .hero-lead { font-weight: 500; color: var(--ink); }
.hero-brutal .hero-lead strong { padding: 0 4px; color: #111; background: #ffe600; }
.hero-brutal .hero-search { height: 62px; color: #111; background: #fff; border: 3px solid #111; border-radius: 0; box-shadow: 7px 7px 0 var(--ink); }
.hero-brutal .hero-search input { font-weight: 600; color: #111; }
.hero-brutal .hero-search .btn { height: 48px; font-weight: 800; color: #ffe600; background: #111; border-radius: 0; box-shadow: none; }
.hero-brutal .hot-tags > span { font-weight: 800; color: var(--ink); }
.hero-brutal .hot-chip { font-weight: 700; color: #111; background: #fff; border: 2px solid #111; border-radius: 0; box-shadow: 3px 3px 0 var(--ink); }
.hero-brutal .hot-chip:hover { color: #111; background: #5ce1ff; transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.brutal-side { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.sticker { display: grid; gap: 6px; padding: 20px; color: #111; border: 3px solid #111; box-shadow: 8px 8px 0 var(--ink); }
.sticker strong { font-size: clamp(36px, 4vw, 52px); font-weight: 900; line-height: 1; letter-spacing: -.03em; }
.sticker span { font-weight: 800; }
.s-yellow { background: #ffe600; transform: rotate(-3deg); }
.s-pink { background: #ff6ad5; transform: rotate(2deg); }
.s-blue { grid-column: span 2; background: #5ce1ff; transform: rotate(-1deg); }
.s-list { grid-column: span 2; gap: 0; padding: 8px 16px; background: #fff; }
.s-list a { display: flex; align-items: center; gap: 12px; padding: 10px 0; color: #111; border-bottom: 2px solid #111; }
.s-list a:last-child { border-bottom: 0; }
.s-list a b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-list a:hover span { transform: translateX(4px); }
.s-list span { font-weight: 900; transition: transform .2s; }
.s-list .hi { width: 34px; height: 34px; border: 2px solid #111; border-radius: 0; }

/* 首屏响应式与减少动态 */
@media (max-width: 1080px) {
  .bento-layout, .stack-layout, .orbit-layout, .brutal-layout, .mag-columns { grid-template-columns: 1fr; gap: 36px; }
  .orbit { --r1: 110px; --r2: 168px; width: 380px; height: 380px; margin: 0 auto; }
  .card-fan { height: 360px; }
}
@media (max-width: 640px) {
  .bento-grid { grid-auto-rows: minmax(84px, auto); gap: 10px; }
  .card-fan, .orbit { display: none; } /* 手机上省略纯装饰图形，首屏更紧凑 */
  .term-body { padding: 18px 16px 20px; font-size: 13px; }
  .term-prompt { flex-wrap: wrap; }
  .mag-masthead { flex-direction: column; gap: 4px; letter-spacing: .1em; }
  .hero-spotlight .hero-search { height: 60px; padding-left: 18px; }
  .hero-spotlight .hero-search .btn { height: 46px; padding: 0 18px; }
  .mq-item { height: 46px; font-size: 13px; }
  .brutal-side { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .sticker { padding: 12px; box-shadow: 5px 5px 0 var(--ink); }
  .sticker strong { font-size: 26px; }
  .sticker span { font-size: 12px; }
  .s-blue { grid-column: auto; }
  .s-list { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .aurora-sky i, .aurora-sky b, .fan-card, .marquee-track, .orbit-ring, .orbit-up, .orbit-core, .term-caret { animation: none !important; }
}

/* 后台 · 首屏切换 */
.hero-style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.hero-style-card { position: relative; display: flex; flex-direction: column; gap: 0; overflow: hidden; padding: 0; font-weight: 400; background: var(--surface); border: 2px solid var(--border); border-radius: 16px; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.hero-style-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.hero-style-card:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
.hero-style-card > input { position: absolute; top: 12px; left: 12px; z-index: 2; width: 18px; height: 18px; }
.hero-thumb { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9.4; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.hero-thumb iframe { position: absolute; top: 0; left: 0; width: 1440px; height: 846px; border: 0; transform-origin: 0 0; pointer-events: none; }
.hero-style-meta { display: grid; gap: 4px; padding: 12px 14px 14px; }
.hero-style-meta b { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--fg); }
.hero-style-meta small { font-size: 12px; line-height: 1.6; color: var(--muted); }
.hero-style-meta a { justify-self: start; margin-top: 2px; font-size: 12px; }
.hero-reset { margin-top: -6px; }
