:root[data-palette="blue"] {
  /* 球场蓝：硬地球场蓝 + 网球荧光黄绿，白底黑字 */
  --bg: #f4f5f9;
  --surface: #ffffff;
  --surface-2: #eef0f6;
  --ink: #12141c;
  --ink-2: #545a6e;
  --ink-3: #8b90a3;
  --line: #e2e5ee;
  --accent: #3b4cff;          /* 球场蓝 */
  --accent-ink: #ffffff;
  --accent-soft: #eaedff;
  --ball: #d8ff3e;            /* 网球荧光黄绿 */
  --ball-ink: #12141c;
  --like: #ff3b6b;
  --danger: #e5383b;
  --chart: #3b4cff;
  --chart-ref: #9ea3b5;
  --grid: #e6e8f0;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(18,20,28,.04), 0 6px 18px rgba(18,20,28,.06);
  --tabbar-h: 60px;
  --cov0: linear-gradient(150deg, #3b4cff, #7a3cff);
  --cov1: linear-gradient(150deg, #ff5a36, #ff2e7a);
  --cov2: linear-gradient(150deg, #0f172a, #3b4cff);
  --cov3: linear-gradient(150deg, #00a3ff, #3b4cff);
  --cov4: linear-gradient(150deg, #8b3dff, #ff3d9a);
  --cov5: linear-gradient(150deg, #14161f, #4b5470);
  --cov6: linear-gradient(150deg, #ff7a1a, #ff3b3b);
  --cov7: linear-gradient(150deg, #0096a8, #2f5bff);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-palette="blue"] {
    --bg: #0c0e15;
    --surface: #161925;
    --surface-2: #1f2333;
    --ink: #eef0f7;
    --ink-2: #a8adc2;
    --ink-3: #727891;
    --line: #262a3b;
    --accent: #7e8cff;
    --accent-ink: #0c0e15;
    --accent-soft: #20264a;
    --like: #ff5c85;
    --danger: #ff6b6b;
    --chart: #7e8cff;
    --chart-ref: #727891;
    --grid: #262a3b;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  -webkit-tap-highlight-color: transparent;
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.muted { color: var(--ink-3); }
small { font-size: 12px; }

.view { max-width: 1180px; margin: 0 auto; padding: 0 16px calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); min-height: 100vh; }
.view.narrow { max-width: 760px; }

/* ---------- 顶部 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); margin: 0 -16px; padding: 10px 16px; display: flex; align-items: center; gap: 12px;
}
.brand { font-weight: 800; font-size: 19px; letter-spacing: -.3px; white-space: nowrap; }
.brand i { font-style: italic; font-weight: 900; margin-left: 3px; padding: 0 6px 0 4px; border-radius: 6px; background: var(--ball); color: var(--ball-ink); }
.search-pill {
  flex: 1; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-3); font-size: 14px; min-width: 0;
}
.search-pill svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
.search-pill input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; color: var(--ink); }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface); display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.tabs { display: flex; gap: 22px; padding: 6px 2px 12px; }
.tabs button { background: none; border: 0; padding: 4px 0; font-size: 16px; color: var(--ink-3); cursor: pointer; position: relative; }
.tabs button.on { color: var(--ink); font-weight: 700; }
.tabs button.on::after { content: ""; position: absolute; left: 25%; right: 25%; bottom: -4px; height: 3px; border-radius: 2px; background: var(--accent); }

/* ---------- 瀑布流 ---------- */
.masonry { display: flex; gap: 10px; align-items: flex-start; }
.masonry-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: block; transition: transform .15s; }
.card:active { transform: scale(.985); }
.cover { position: relative; background: var(--surface-2); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-badge {
  position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; backdrop-filter: blur(4px);
}
.cover-badge.hybrid { top: 36px; background: var(--ball); color: var(--ball-ink); }
.gen-cover { position: absolute; inset: 0; padding: 14px 12px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; }
.gen-cover .gc-brand { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; opacity: .85; }
.gen-cover .gc-model { padding-right: 34px; font-size: 20px; font-weight: 800; line-height: 1.15; margin-top: 2px; }
.gen-cover .gc-string { font-size: 12px; opacity: .92; line-height: 1.35; }
.gen-cover .gc-tension { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.gen-cover .gc-tension small { font-size: 12px; font-weight: 600; letter-spacing: 0; margin-left: 3px; opacity: .85; }
.gen-cover > div { position: relative; z-index: 1; }
.gen-cover .gc-string { text-shadow: 0 1px 3px rgba(0,0,0,.35); padding-right: 8px; }
.gen-cover .gc-ball { position: absolute; z-index: 0; right: -34px; top: 38%; width: 96px; height: 96px; border-radius: 50%; background: var(--ball); opacity: .28; }
.gen-cover .gc-ball::before, .gen-cover .gc-ball::after { content: ""; position: absolute; width: 96px; height: 96px; border: 3px solid rgba(255,255,255,.85); border-radius: 50%; }
.gen-cover .gc-ball::before { left: -62px; } .gen-cover .gc-ball::after { left: 62px; }
.card-body { padding: 9px 10px 10px; }
.card-title { font-size: 14px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-spec { margin-top: 6px; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-foot { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-2); }
.card-foot .who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.card-foot .who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.like-mini { display: flex; align-items: center; gap: 3px; flex: none; }
.like-mini svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.like-mini.on { color: var(--like); } .like-mini.on svg { fill: currentColor; }
.feed-end { text-align: center; color: var(--ink-3); font-size: 13px; padding: 24px 0; }

.avatar { border-radius: 50%; flex: none; object-fit: cover; display: grid; place-items: center; color: #fff; font-weight: 700; overflow: hidden; }

/* ---------- 通用块 ---------- */
.panel { background: var(--surface); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.panel h2 { font-size: 16px; margin: 0 0 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.panel h2 small { font-weight: 400; color: var(--ink-3); }
.section-title { font-size: 16px; font-weight: 700; margin: 22px 2px 12px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
a.chip:hover { background: var(--accent-soft); color: var(--accent); }
.chip.accent { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.btn { height: 42px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.ghost { background: var(--surface-2); color: var(--ink); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.empty-note { color: var(--ink-3); font-size: 13px; margin: 4px 0; }
.loading { text-align: center; padding: 60px 0; color: var(--ink-3); }

/* ---------- 统计页 ---------- */
.hero { padding: 18px 2px 6px; }
.hero .kicker { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.hero h1 { font-size: 26px; margin: 2px 0 8px; letter-spacing: -.5px; line-height: 1.2; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.tile { background: var(--surface); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); min-width: 0; }
.tile b { display: block; font-size: 22px; line-height: 1.1; letter-spacing: -.5px; }
.tile b small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }
.tile span { font-size: 12px; color: var(--ink-3); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 > .panel { margin-bottom: 0; }
.stack { display: grid; gap: 12px; margin-bottom: 12px; }

.radar svg { width: 100%; max-width: 340px; margin: 0 auto; display: block; overflow: visible; }
.radar-grid { fill: none; stroke: var(--grid); stroke-width: 1; }
.radar-shape { fill: color-mix(in srgb, var(--chart) 22%, transparent); stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; }
.radar-shape.ref { fill: none; stroke: var(--chart-ref); stroke-dasharray: 4 3; }
.radar-dot { fill: var(--chart); stroke: var(--surface); stroke-width: 2; }
.radar-label { font-size: 12px; fill: var(--ink-2); }
.radar-value { font-size: 12px; font-weight: 700; fill: var(--ink); }
.legend { display: flex; justify-content: center; gap: 16px; font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .key { width: 14px; height: 3px; border-radius: 2px; background: var(--chart); }
.legend .key.ref { background: none; border-top: 2px dashed var(--chart-ref); height: 0; }

.score-bars { display: grid; gap: 8px; }
.score-row { display: grid; grid-template-columns: 36px 1fr 30px; align-items: center; gap: 10px; font-size: 13px; }
.score-label { color: var(--ink-2); }
.score-track { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.score-fill { display: block; height: 100%; border-radius: 4px; background: var(--chart); }
.score-num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.score-row.overall { padding-top: 8px; border-top: 1px solid var(--line); }
.score-row.overall .score-label { color: var(--ink); font-weight: 700; }

.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bar-list a { display: grid; grid-template-columns: 20px 1fr auto 36px; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; }
.bar-list a:hover { background: var(--surface-2); }
.bar-rank { font-size: 13px; font-weight: 700; color: var(--ink-3); text-align: center; font-variant-numeric: tabular-nums; }
.bar-list li:nth-child(-n+3) .bar-rank { color: var(--accent); }
.bar-main { min-width: 0; display: grid; gap: 5px; }
.bar-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-name small { font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.bar-track { height: 6px; border-radius: 3px; background: var(--surface-2); }
.bar-fill { display: block; height: 100%; border-radius: 3px; background: var(--chart); }
.bar-meta { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-meta small { color: var(--ink-3); margin-left: 2px; }
.bar-score { font-size: 13px; font-weight: 700; text-align: center; padding: 2px 0; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-variant-numeric: tabular-nums; }

.hist { width: 100%; display: block; }
.hist-bar { fill: var(--chart); }
.hist g:hover .hist-bar { fill: color-mix(in srgb, var(--chart) 75%, var(--ink)); }
.axis-grid { stroke: var(--grid); stroke-width: 1; }
.axis-base { stroke: var(--ink-3); stroke-width: 1; }
.axis-text { font-size: 10px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }

.chart-tip {
  position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; opacity: 0; transition: opacity .12s;
  background: var(--ink); color: var(--bg); font-size: 12px; line-height: 1.5; padding: 6px 10px; border-radius: 8px; max-width: 240px;
}
.chart-tip .muted { color: color-mix(in srgb, var(--bg) 70%, transparent); }

.usage-split { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; margin: 10px 0 8px; }
.usage-split span { display: block; height: 100%; }
.usage-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--ink-2); }
.usage-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- 帖子详情 ---------- */
.post-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; margin: 0 -16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
.post-top .who { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-weight: 600; }
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius); background: #000; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel img { flex: 0 0 100%; scroll-snap-align: center; max-height: 72vh; object-fit: contain; width: 100%; }
.carousel-wrap { position: relative; }
.carousel-count { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.5); color: #fff; font-size: 12px; padding: 2px 9px; border-radius: 999px; }
.post-cover-gen { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; }
.post-cover-gen .gc-model { font-size: 30px; }
.post-cover-gen .gc-tension { font-size: 44px; }
.post-title { font-size: 20px; margin: 16px 0 8px; line-height: 1.35; }
.post-body { white-space: pre-wrap; line-height: 1.75; margin: 0 0 12px; }
.post-meta { font-size: 12px; color: var(--ink-3); margin: 10px 0 14px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table th { text-align: left; font-weight: 400; color: var(--ink-3); width: 88px; padding: 7px 0; vertical-align: top; }
.spec-table td { padding: 7px 0; }
.spec-table tr + tr { border-top: 1px solid var(--line); }
.spec-table a { color: var(--accent); font-weight: 600; }
.spec-group { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 1px; margin: 14px 0 2px; }
.spec-group:first-child { margin-top: 0; }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px; margin-top: 8px; }
.link-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.comment { display: flex; gap: 10px; padding: 10px 0; }
.comment + .comment { border-top: 1px solid var(--line); }
.comment .c-name { font-size: 13px; color: var(--ink-2); }
.comment .c-text { margin-top: 2px; word-break: break-word; }
.comment .c-time { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.post-actions {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 30;
  background: var(--surface); border-top: 1px solid var(--line);
}
.post-actions form { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px 16px; }
.post-actions input { flex: 1; min-width: 0; height: 38px; border-radius: 999px; border: 0; background: var(--surface-2); padding: 0 14px; outline: none; }
.like-btn { display: flex; align-items: center; gap: 4px; background: none; border: 0; cursor: pointer; font-size: 14px; color: var(--ink-2); padding: 6px; }
.like-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.like-btn.on { color: var(--like); } .like-btn.on svg { fill: currentColor; }
.like-btn.pop svg { animation: pop .3s; }
@keyframes pop { 50% { transform: scale(1.3); } }

/* ---------- 表单 ---------- */
.form-section { background: var(--surface); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.form-section h3 { margin: 0 0 12px; font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.field { display: grid; gap: 5px; margin-bottom: 12px; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field > span { font-size: 13px; color: var(--ink-2); }
.field > span em { font-style: normal; color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px 12px; outline: none; min-width: 0;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.title-input { font-size: 17px; font-weight: 600; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hint { font-size: 12px; color: var(--ink-3); margin: -4px 0 10px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; padding: 4px 12px; border-radius: 999px; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--shadow); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 400; color: var(--ink-2); cursor: pointer; }
.switch input { appearance: none; width: 40px; height: 24px; border-radius: 12px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }
.string-block { border-left: 3px solid var(--accent); padding-left: 12px; margin-bottom: 14px; }
.string-block.cross { border-color: var(--ball); }
.string-block .sb-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.photo, .photo-add { aspect-ratio: 1; border-radius: 10px; overflow: hidden; position: relative; background: var(--surface-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 14px; line-height: 1; }
.photo-add { display: grid; place-items: center; cursor: pointer; border: 1.5px dashed var(--line); color: var(--ink-3); font-size: 12px; text-align: center; }
.photo-add b { display: block; font-size: 26px; font-weight: 300; line-height: 1; }
.photo-add input { display: none; }

.rating-row { display: grid; grid-template-columns: 44px 1fr 32px; align-items: center; gap: 10px; margin-bottom: 8px; }
.rating-row label { font-size: 14px; color: var(--ink-2); }
.rating-row output { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.rating-row.overall { padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px; }
.rating-row.overall label { color: var(--ink); font-weight: 700; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; margin: 6px 2px; }
.submit-bar { position: sticky; bottom: calc(var(--tabbar-h) + 8px + env(safe-area-inset-bottom)); z-index: 5; }

/* ---------- 登录 ---------- */
.auth { max-width: 380px; margin: 8vh auto 0; }
.auth .logo { font-size: 48px; text-align: center; }
.auth h1 { text-align: center; font-size: 22px; margin: 4px 0 4px; }
.auth p.sub { text-align: center; color: var(--ink-3); margin: 0 0 22px; font-size: 14px; }
.auth .tabs { justify-content: center; }

/* ---------- 个人主页 ---------- */
.profile { display: flex; gap: 16px; align-items: center; padding: 20px 2px 10px; }
.profile h1 { font-size: 22px; margin: 0; }
.profile .handle { color: var(--ink-3); font-size: 13px; }
.bio-text { margin: 4px 2px 0; color: var(--ink-2); font-size: 14px; }
.profile-stats { display: flex; gap: 26px; margin: 14px 2px; }
.profile-stats div b { font-size: 18px; display: block; }
.profile-stats div span { font-size: 12px; color: var(--ink-3); }
.profile-actions { display: flex; gap: 8px; margin: 0 2px 6px; }
.profile-actions .btn { height: 34px; font-size: 13px; padding: 0 16px; }

.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.45); display: grid; place-items: end center; }
.modal { width: 100%; max-width: 520px; background: var(--surface); border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 90vh; overflow: auto; }
@media (min-width: 640px) { .modal-bg { place-items: center; } .modal { border-radius: 18px; } }

/* ---------- 搜索 ---------- */
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.result-item { background: var(--surface); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; }
.result-item .ri-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 18px; flex: none; }
.result-item .ri-main { min-width: 0; flex: 1; }
.result-item .ri-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-item .ri-sub { font-size: 12px; color: var(--ink-3); }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line);
  display: flex; justify-content: center;
}
.tabbar a { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--ink-3); }
.tabbar a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--ink); font-weight: 700; }
.tabbar a.on svg { stroke-width: 2.4; }
.tabbar .tab-new { flex: none; width: 54px; max-width: none; margin: 0 6px; }
.tabbar .tab-new svg { width: 46px; height: 34px; padding: 6px 12px; border-radius: 12px; background: var(--ball); stroke: var(--ball-ink); stroke-width: 2.6; }

.toast { position: fixed; left: 50%; top: 20%; transform: translate(-50%, -10px); z-index: 200; background: rgba(20,20,20,.88); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; max-width: 80vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 22px; }
}
@media (min-width: 900px) {
  .masonry { gap: 14px; } .masonry-col { gap: 14px; }
}

/* ---------- 可搜索下拉 ---------- */
.combo { position: relative; }
.combo input { padding-right: 36px !important; }
.combo-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; background: none; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.combo-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.combo-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50; margin: 0; padding: 4px; list-style: none;
  min-width: 200px; max-width: calc(100vw - 48px); max-height: 300px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(18,20,28,.16);
}
.combo-list li { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; line-height: 1.35; }
.combo-list li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-list li small { color: var(--ink-3); font-size: 11.5px; }
.combo-list li span { max-width: 100%; }
.combo-list li:hover, .combo-list li.active { background: var(--surface-2); }
.combo-list li.selected span { color: var(--accent); font-weight: 700; }
.combo-list li.combo-empty { color: var(--ink-3); font-size: 13px; cursor: default; background: none; }
.row-3 .combo-list { min-width: 150px; }
.row > .field:last-child .combo-list, .row-3 > .field:last-child .combo-list { left: auto; right: 0; }
.row-3 > .field:nth-child(2) .combo-list { left: 50%; right: auto; transform: translateX(-50%); }

.gen-cover .gc-tag { display: inline-block; margin-right: 5px; padding: 0 6px; border-radius: 5px; background: var(--ball); color: var(--ball-ink); font-size: 11px; text-shadow: none; }

/* ================= 备选配色方案 =================
   默认（无属性）为红土橙；<html data-palette="blue|neon"> 切换到其他方案 */

/* ---------- 红土橙 Clay（默认） ---------- */
:root {
  --bg: #f8f3ee;
  --surface: #fffdfb;
  --surface-2: #f2e9e1;
  --ink: #221a16;
  --ink-2: #6e5f56;
  --ink-3: #a39389;
  --line: #eadfd5;
  --accent: #c8502a;
  --accent-ink: #ffffff;
  --accent-soft: #fbe6dc;
  --ball: #f5d547;
  --ball-ink: #221a16;
  --like: #e0245e;
  --danger: #c62828;
  --chart: #c8502a;
  --chart-ref: #b0a297;
  --grid: #ece3da;
  --shadow: 0 1px 2px rgba(60,30,15,.05), 0 6px 18px rgba(60,30,15,.07);
  --cov0: linear-gradient(150deg, #d9653b, #a83b1d);
  --cov1: linear-gradient(150deg, #c8502a, #5e2412);
  --cov2: linear-gradient(150deg, #2b201b, #c8502a);
  --cov3: linear-gradient(150deg, #e8894f, #c8502a);
  --cov4: linear-gradient(150deg, #8a3a1f, #2b1710);
  --cov5: linear-gradient(150deg, #d79b62, #a9532b);
  --cov6: linear-gradient(150deg, #1f3d2b, #0f2419);
  --cov7: linear-gradient(150deg, #b5462a, #7a2a17);
  --radius: 16px;
  --tabbar-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15100d;
    --surface: #1f1814;
    --surface-2: #2a211c;
    --ink: #f6eee8;
    --ink-2: #b9aaa0;
    --ink-3: #85776d;
    --line: #33291f;
    --accent: #ec7a4c;
    --accent-ink: #15100d;
    --accent-soft: #3a2418;
    --chart: #ec7a4c;
    --chart-ref: #85776d;
    --grid: #33291f;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}

/* ---------- 黑 × 荧光绿 Neon（始终深色） ---------- */
:root[data-palette="neon"] {
  --bg: #0a0a0b;
  --surface: #141416;
  --surface-2: #1e1e21;
  --ink: #f4f4f5;
  --ink-2: #a1a1aa;
  --ink-3: #71717a;
  --line: #26262a;
  --accent: #d4ff3a;
  --accent-ink: #0a0a0b;
  --accent-soft: #252c0d;
  --ball: #d4ff3a;
  --ball-ink: #0a0a0b;
  --like: #ff4d6d;
  --danger: #ff6b6b;
  --chart: #d4ff3a;
  --chart-ref: #71717a;
  --grid: #26262a;
  --shadow: 0 0 0 1px #1f1f22;
  --cov0: linear-gradient(150deg, #1c1c1f, #0a0a0b);
  --cov1: linear-gradient(150deg, #2a2a2e, #111113);
  --cov2: linear-gradient(150deg, #3b4a0f, #0a0a0b);
  --cov3: linear-gradient(150deg, #18181b, #2e3a0a);
  --cov4: linear-gradient(150deg, #26262a, #0f0f10);
  --cov5: linear-gradient(150deg, #4d6312, #151a05);
  --cov6: linear-gradient(150deg, #111113, #2a2a2e);
  --cov7: linear-gradient(150deg, #33331a, #0a0a0b);
  color-scheme: dark;
}
:root[data-palette="neon"] .gen-cover .gc-tension { color: var(--ball); }
:root[data-palette="neon"] .gen-cover .gc-ball { opacity: .16; }
:root[data-palette="neon"] .brand i { transform: skewX(-8deg); }

/* ================= 手机端细节 ================= */
/* iOS Safari 会在聚焦字号 < 16px 的输入框时自动放大页面，这里统一设为 16px */
@media (max-width: 768px) {
  input, select, textarea { font-size: 16px !important; }
}
a, button, input, select, textarea, label { touch-action: manipulation; }

/* 详情页 / 发布页隐藏底部导航，所有依赖 --tabbar-h 的位置自动下移 */
body.hide-tabbar { --tabbar-h: 0px; }
body.hide-tabbar .tabbar { display: none; }
body.hide-tabbar .post-actions { bottom: 0; padding-bottom: env(safe-area-inset-bottom); }

/* 刘海屏：全屏（添加到主屏幕）打开时，顶部栏避开状态栏 */
.topbar, .post-top { padding-top: calc(10px + env(safe-area-inset-top)); }

/* 横向滑动的标签行 */
.chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
.chips.scroll-x::-webkit-scrollbar { display: none; }

/* 搜索结果折叠 */
.result-grid.collapsed > :nth-child(n+5) { display: none; }
.more-btn { display: block; width: 100%; margin-top: 8px; padding: 10px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: 13px; cursor: pointer; }

/* ================= 账号、设置、举报、后台 ================= */
.notice { padding: 10px 14px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: 14px; margin: 8px 0 12px; }
.notice.warn { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
.warn-text { color: var(--danger); }
.chip.warn { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
.auth .logo img { margin: 0 auto; border-radius: 16px; }
.google-btn { background: var(--surface); color: var(--ink); border: 1px solid var(--line); font-weight: 600; margin-bottom: 4px; }
.g-logo { width: 18px; height: 18px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12px; margin: 16px 0 8px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); margin: 4px 0 12px; cursor: pointer; line-height: 1.5; }
.check input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.check a, .settings a:not(.btn), .legal a { color: var(--accent); }
.check-inline { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.radio-list { display: grid; gap: 4px; margin-bottom: 12px; }
.radio-list label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); cursor: pointer; font-size: 14px; }
.radio-list input { accent-color: var(--accent); }
.modal-title { margin: 0 0 12px; font-size: 17px; }
.modal p { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; font-weight: 600; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost.sm { background: var(--surface-2); }

.sheet { display: grid; gap: 6px; }
.sheet-item { border: 0; background: var(--surface-2); color: var(--ink); padding: 14px; border-radius: 12px; font-size: 15px; cursor: pointer; }
.sheet-item.danger { color: var(--danger); }
.sheet-item.cancel { background: none; color: var(--ink-3); }

.settings .set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14px; }
.settings .set-row + .set-row { border-top: 1px solid var(--line); }
.settings .set-row > span:first-child { color: var(--ink-2); }
.settings .set-val { display: inline-flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.danger-zone h2 { color: var(--danger); }

.legal { line-height: 1.75; font-size: 15px; }
.legal h3 { font-size: 16px; margin: 20px 0 6px; }
.legal ul { padding-left: 20px; margin: 6px 0; }
.legal li { margin: 4px 0; }

.comment .c-main { min-width: 0; flex: 1; }
.comment.is-hidden { opacity: .55; }
.c-act { border: 0; background: none; color: var(--ink-3); font-size: 11px; padding: 0 0 0 10px; cursor: pointer; }
.c-act:hover { color: var(--accent); }

/* 管理后台 */
.view.admin { max-width: 980px; }
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 2px 16px; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs a { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 14px; box-shadow: var(--shadow); display: inline-flex; gap: 6px; align-items: center; }
.admin-tabs a.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.badge:empty { display: none; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.admin-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.admin-tiles .tile { display: block; }
.admin-tiles .tile b { font-size: 24px; }
.admin-tiles .tile small { display: block; color: var(--ink-3); font-size: 11px; margin-top: 2px; }
a.tile:hover { outline: 2px solid var(--accent-soft); }
@media (max-width: 640px) { .admin-tiles { grid-template-columns: repeat(2, 1fr); } }
.mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.mini-bars > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.mini-bars span { width: 100%; max-width: 26px; background: var(--chart); border-radius: 4px 4px 0 0; min-height: 2px; }
.mini-bars small { font-size: 10px; color: var(--ink-3); }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.admin-toolbar input, .admin-toolbar select, .ar-actions select { height: 34px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 0 10px; min-width: 0; }
.admin-toolbar input { flex: 1; min-width: 160px; }
.admin-list { display: grid; gap: 8px; }
.admin-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.ar-main { flex: 1; min-width: 0; font-size: 14px; }
.ar-main small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 3px; line-height: 1.5; word-break: break-word; }
.ar-main .chip { margin-left: 4px; font-size: 11px; padding: 2px 8px; }
.ar-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; flex: none; max-width: 52%; }
@media (max-width: 640px) {
  .admin-row { flex-wrap: wrap; }
  .ar-actions { max-width: none; width: 100%; justify-content: flex-start; }
}
.report-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 14px; }
.report-target { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.report-target span { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.report-target small { color: var(--accent); }
.report-list { margin: 10px 0; padding-left: 18px; font-size: 13px; }
.report-list li { margin: 4px 0; }
.report-list small { display: block; color: var(--ink-3); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; letter-spacing: 1px; background: var(--surface-2); border-radius: 10px; padding: 12px 14px; margin: 10px 0; user-select: all; word-break: break-all; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .5px; }
.merge-search { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--bg); }
.merge-results { display: grid; gap: 6px; margin-top: 10px; max-height: 320px; overflow: auto; }
.merge-item { text-align: left; border: 0; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; cursor: pointer; display: grid; gap: 2px; font-size: 14px; }
.merge-item small { color: var(--ink-3); font-size: 12px; }
.merge-item:hover { outline: 2px solid var(--accent); }
.profile-actions a.btn { text-decoration: none; }
