﻿/* 下面这份 :root 是「暗夜暗金」默认风格的取值，作为兜底；
   实际生效的风格变量由 Site.master 按后台设置内联输出并覆盖，见 ThemeCatalog.cs */
:root {
  --bg: #0e1118;
  --bg-2: #151a24;
  --panel: #1a2030;
  --line: #3d3340;
  --gold: #d4a84b;
  --gold-2: #f0d090;
  --gold-dim: #8a6b32;
  --text: #d8dce6;
  --muted: #8b93a7;
  --ok: #7dce8a;
  --warn: #e8b86d;
  --danger: #e07a7a;
  --link: #e8c36a;
  --glow-1: rgba(212,168,75,.12);
  --glow-2: rgba(80,60,120,.15);
  --header-bg: rgba(14,17,24,.92);
  --side-bg: rgba(14,17,24,.7);
  --btn-grad-1: #d4a84b;
  --btn-grad-2: #a67c2d;
  --btn-text: #1a1408;
  --dash-line: #2c3344;
  --th-bg: #3a2f1c;
  --td-bg: #1e2433;
  --td-alt-bg: #232a3c;
  --table-border: #4a3f2e;
  --note-bg: #221c14;
  --tip-bg: #14221a;
  --warn-bg: #2a2214;
  --key-bg: #2a2430;
  --input-bg: #121722;
  --input-border: #3a4458;
  --badge-bg: #8a3030;
  --nav-hover-bg: #243044;
  --quote-bg: #161b26;
  --lock-border: #6a4a4a;
  --gallery-del-bg: #3a2020;
  --gallery-del-text: #f0d0d0;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  font: 16px/1.7 "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% -10%, var(--glow-1), transparent 50%),
    radial-gradient(800px 400px at 100% 0%, var(--glow-2), transparent 45%),
    var(--bg);
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap {
  max-width: 1280px; margin: 0 auto;
  padding: 0 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
.top {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
  overflow: visible;
  transition: box-shadow .2s;
}
.top.scrolled { box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }
.brand { display: flex; flex-direction: column; text-decoration: none; }
.brand-cn { color: var(--gold-2); font-weight: 700; letter-spacing: .12em; font-size: 20px; }
.brand-en { color: var(--muted); font-size: 12px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.nav a { color: var(--text); font-size: 14px; }
.nav a:hover { color: var(--gold-2); text-decoration: none; }
.nav-ic {
  width: 15px; height: 15px; margin-right: 5px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -3px; opacity: .85;
}
.nav-link {
  position: relative; display: inline-flex; align-items: center;
  padding: 9px 12px; border-radius: 8px; transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--nav-hover-bg); color: var(--gold-2); }
.nav-link.on { color: var(--gold-2); background: var(--nav-hover-bg); }
.nav-link.on .nav-ic { opacity: 1; }
.nav-link.on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px;
  height: 2px; border-radius: 1px; background: var(--gold);
}
.nav-item { position: relative; padding: 4px 0; border-radius: 8px; }
.nav-item > a { display: inline-flex; align-items: center; padding: 9px 12px; border-radius: 8px; transition: background .15s, color .15s; }
.nav-item:hover > a, .nav-item.open > a { background: var(--nav-hover-bg); color: var(--gold-2); }
.nav-item.on > a { color: var(--gold-2); }
.nav-item > a .caret { margin-left: 4px; color: var(--gold-2); font-size: 12px; }
.nav-sub {
  display: none; position: absolute; top: 100%; left: 0; min-width: 220px;
  padding: 8px 0; margin: 0; z-index: 80;
  background: var(--panel); border: 1px solid var(--gold-dim); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.45);
}
.nav-item:hover .nav-sub, .nav-item.open .nav-sub { display: block; }
.nav-sub a { display: block; padding: 8px 16px; white-space: nowrap; font-size: 13px; }
.nav-sub a:hover { background: var(--nav-hover-bg); color: var(--gold-2); }
.badge { vertical-align: 2px; }

.admin-stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 22px; }
.admin-stat {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 116px; padding: 12px 20px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); text-decoration: none;
}
.admin-stat:hover { border-color: var(--gold-dim); }
.admin-stat .n { font-size: 24px; font-weight: 700; color: var(--gold-2); line-height: 1.1; }
.admin-stat .t { font-size: 12px; color: var(--muted); margin-top: 4px; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; max-width: 1280px; }
.admin-tile {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 18px;
}
.admin-tile .k {
  width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: var(--nav-hover-bg); color: var(--gold-2); font-weight: 700; font-size: 14px;
}
.admin-tile h2 { margin: 2px 0 0; font-size: 16px; border: 0; padding: 0; }
.admin-tile .desc { margin: 0; font-size: 13px; color: var(--muted); flex: 1 0 auto; }
.admin-tile .links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.admin-tile-dim { opacity: .8; }
.zone-panel {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 14px 0 18px; padding: 12px 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.zone-panel-label {
  display: flex; align-items: center; gap: 7px; flex-shrink: 0;
  color: var(--muted); font-size: 13px; font-weight: 700;
  padding-right: 16px; border-right: 1px solid var(--line);
}
.zone-panel-label .zone-ic {
  width: 16px; height: 16px; flex-shrink: 0;
  fill: none; stroke: var(--gold-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.zone-panel-list { display: flex; gap: 9px; flex-wrap: wrap; }
.zone-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 16px 7px 12px; border-radius: 999px; font-size: 13px; text-decoration: none;
  border: 1px solid var(--input-border); color: var(--text); background: var(--input-bg);
  transition: transform .15s, border-color .15s, color .15s, box-shadow .15s;
}
.zone-tab .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex-shrink: 0;
  transition: background .15s;
}
.zone-tab:hover {
  border-color: var(--gold-dim); color: var(--gold-2); text-decoration: none;
  transform: translateY(-1px);
}
.zone-tab:hover .dot { background: var(--gold-2); }
.zone-tab.on {
  background: linear-gradient(135deg, var(--btn-grad-1), var(--btn-grad-2));
  color: var(--btn-text); font-weight: 700; border-color: transparent;
  box-shadow: 0 3px 12px rgba(212,168,75,.3), inset 0 1px 0 rgba(255,255,255,.3);
}
.zone-tab.on .dot { background: var(--btn-text); box-shadow: 0 0 0 3px rgba(255,255,255,.3); }
.zone-tab.on:hover { transform: translateY(-1px); color: var(--btn-text); }
@media (max-width: 560px) {
  .zone-panel { padding: 12px 14px; }
  .zone-panel-label { border-right: 0; padding-right: 0; width: 100%; }
}
.auc-trade { margin: 18px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.auc-bid, .auc-buy { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; }
.auc-bid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--gold-2); }
.auc-bid input { width: 140px; padding: 7px 10px; }
.auc-row-mine { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.auc-row-main { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 220px; text-decoration: none; color: inherit; }
.auc-claim { margin: 0; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--muted); font-size: 12px; font-weight: 600; }
.admin-log {
  white-space: pre-wrap; word-break: break-all;
  max-height: 420px; overflow: auto;
  padding: 12px 14px; font-size: 12px; line-height: 1.5;
  background: var(--nav-hover-bg); border: 1px solid var(--line); border-radius: 8px;
}

/* 前台下载页：多下载项 */
.dl-list { display: grid; gap: 14px; margin: 18px 0; }
.dl-item { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.dl-item .dl-name { font-weight: 700; color: var(--gold-2); margin-bottom: 10px; }
.dl-item .row { margin: 0; }

/* 后台下载配置：下载项编辑块 */
.dl-edit { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.dl-edit legend { color: var(--muted); font-size: 12px; padding: 0 6px; }
.dl-url-row { display: flex; gap: 8px; margin-top: 8px; }
.dl-url-row .dl-label { flex: 0 0 140px; min-width: 0; }
.dl-url-row .dl-url { flex: 1 1 auto; min-width: 0; }
@media (max-width: 560px) {
  .dl-url-row { flex-direction: column; gap: 4px; }
  .dl-url-row .dl-label { flex: none; }
}
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; margin: 0; border: 0;
  background: transparent; cursor: pointer; flex-shrink: 0;
}
.nav-toggle-bar {
  display: block; height: 2px; border-radius: 1px; background: var(--gold-2);
}
.side-box { margin: 0; }
.side-sum { display: none; list-style: none; }
.side-sum::-webkit-details-marker { display: none; }
.main { padding: 32px 20px 64px; min-height: 62vh; }
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 13px; }
.foot-legal-wrap { text-align: center; margin-top: 16px; }
.foot-legal { margin: 0 0 4px; font-size: 13px; line-height: 1.7; }
.foot-badges { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.foot-badges img {
  width: 106px; height: 45px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); display: block;
}
.hero { padding: 36px 0 20px; }
.hero h1 { margin: 0 0 10px; font-size: 36px; color: var(--gold-2); letter-spacing: .06em; }
.hero .lead { color: var(--muted); margin: 0 0 22px; max-width: 720px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.pill {
  border: 1px solid var(--gold-dim); color: var(--gold-2);
  padding: 4px 10px; border-radius: 999px; font-size: 12px;
}
.btn, button.btn, input.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: linear-gradient(var(--btn-grad-1), var(--btn-grad-2));
  color: var(--btn-text); font-weight: 700; padding: 10px 18px;
  border-radius: 8px; text-decoration: none; font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.14);
  transition: filter .15s, transform .1s, box-shadow .15s, background-color .15s, border-color .15s;
}
.btn:hover {
  filter: brightness(1.08); text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.16);
}
.btn:active { transform: translateY(1px); filter: brightness(.96); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn[disabled], .btn.disabled {
  opacity: .5; cursor: not-allowed; filter: none !important; box-shadow: none; transform: none;
}
.btn.ghost { background: transparent; color: var(--gold-2); border: 1px solid var(--gold-dim); box-shadow: none; }
.btn.ghost:hover { background: var(--nav-hover-bg); border-color: var(--gold); box-shadow: none; }
.btn.ghost:active { transform: translateY(1px); }
.btn.danger { background: linear-gradient(var(--danger), var(--danger)); color: #fff; }
.btn.danger.ghost { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.danger.ghost:hover { background: rgba(220,38,38,.08); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 18px 0; }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px 18px;
}
.card a { color: inherit; text-decoration: none; display: block; }
.card .k { color: var(--gold-2); font-weight: 700; font-size: 22px; letter-spacing: .06em; }
.card .t { font-weight: 700; margin: 4px 0 2px; }
.card .d { color: var(--muted); font-size: 13px; }
.card { transition: border-color .15s, transform .15s, box-shadow .15s; }
.card:hover { border-color: var(--gold-dim); }
.card:has(> a):hover, .card:has(.card-body):hover {
  transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.16);
}
h2 { font-size: 24px; color: var(--gold); margin: 36px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
h3 { font-size: 18px; color: var(--gold-2); margin: 26px 0 10px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li {
  border-bottom: 1px dashed var(--dash-line); padding: 10px 6px; margin: 0 -6px;
  display: flex; justify-content: space-between; gap: 16px; border-radius: 6px;
  transition: background-color .15s;
}
.list li:hover { background: var(--nav-hover-bg); }
.list .meta { color: var(--muted); font-size: 13px; white-space: nowrap; }

.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--gold-2); text-decoration: none; }
.crumbs .sep { margin: 0 6px; opacity: .6; }

.btn.sm, button.btn.sm { padding: 6px 14px; font-size: 13px; }

.list-media { list-style: none; padding: 0; margin: 0; }
.list-media li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 6px; margin: 0 -6px; border-bottom: 1px dashed var(--dash-line);
  border-radius: 6px; transition: background-color .15s;
}
.list-media li:hover { background: var(--nav-hover-bg); }
.list-media .thumb {
  flex: 0 0 64px; width: 64px; height: 64px; border-radius: 8px; overflow: hidden;
  background: var(--th-bg); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-2); font-weight: 700; font-size: 20px;
}
.list-media .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.list-media .info { flex: 1; min-width: 0; }
.list-media .title-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.list-media .title-row a { font-weight: 600; }
.list-media .sum {
  color: var(--muted); font-size: 13px; margin: 4px 0 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.list-media .meta { color: var(--muted); font-size: 12px; margin-top: 4px; }

.list-media-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
}
.list-media-grid li { min-width: 0; }

.card.has-cover { padding: 0; overflow: hidden; }
.card.has-cover .cover-img {
  width: 100%; height: 120px; object-fit: cover; display: block;
  border-bottom: 1px solid var(--line);
}
.card.has-cover .card-body { padding: 14px 16px; }
.card:not(.has-cover) .card-body { padding: 0; }
.article { max-width: 860px; }
.article .sum { color: var(--muted); }
.key {
  display: inline-block; min-width: 28px; padding: 0 8px;
  border: 1px solid var(--gold-dim); border-bottom-width: 3px;
  border-radius: 5px; background: var(--key-bg);
  color: var(--gold-2); font-weight: 700; font-family: Consolas, monospace;
  font-size: 14px; line-height: 24px; text-align: center;
}
table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: 14px; }
th, td { border: 1px solid var(--table-border); padding: 8px 10px; text-align: left; }
th { background: var(--th-bg); color: var(--gold-2); }
td { background: var(--td-bg); transition: background-color .12s; }
tr:nth-child(even) td { background: var(--td-alt-bg); }
tbody tr:hover td { background: var(--nav-hover-bg); }
.note, .tip, .warn {
  border-left: 4px solid var(--gold); background: var(--note-bg);
  padding: 10px 14px; margin: 14px 0; border-radius: 0 8px 8px 0;
}
.tip { border-left-color: var(--ok); background: var(--tip-bg); }
.warn { border-left-color: var(--warn); background: var(--warn-bg); }
.err { color: var(--danger); margin: 8px 0; }
.ok { color: var(--ok); }
.form { max-width: 560px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
/* 帖子页快速回复跟上面的正文同宽，不缩在左侧一截 */
#reply.form { max-width: none; }
#reply .captcha input { width: 220px; flex: 0 0 220px; }
.form label { display: block; margin: 12px 0 4px; color: var(--gold-2); font-size: 13px; }
.form input, .form select, .form textarea {
  width: 100%; padding: 8px 10px; border-radius: 6px;
  border: 1px solid var(--input-border); background: var(--input-bg); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--gold-dim); box-shadow: 0 0 0 3px var(--glow-1);
}
.form .hint { color: var(--muted); font-size: 12px; }
.form .captcha { display: flex; gap: 10px; align-items: center; }
.form .captcha img { height: 36px; cursor: pointer; }
.btn-file { position: relative; overflow: hidden; display: inline-block; margin: 0; }
.btn-file input[type=file] {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; font-size: 0;
}
.article .body img, .post-body img, .cover, .cover-preview {
  max-width: 100%; height: auto; display: block;
  margin: 12px 0; border-radius: 8px; border: 1px solid var(--line);
}
.cover-preview { max-width: 280px; }
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px; margin: 18px 0;
}
.gallery a { display: block; }
.gallery img {
  width: 100%; height: 140px; object-fit: cover; display: block;
  border-radius: 8px; border: 1px solid var(--line);
}
.gallery-edit { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.gallery-item { position: relative; width: 140px; }
.gallery-item img {
  width: 140px; height: 90px; object-fit: cover; display: block;
  border-radius: 6px; border: 1px solid var(--line);
}
.gallery-del {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--gallery-del-bg); color: var(--gallery-del-text); line-height: 20px; padding: 0;
}
.guide-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; width: 100%; }
.side {
  position: sticky; top: 88px; align-self: start;
  background: var(--side-bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px;
}
.side a { display: block; padding: 6px 8px; border-radius: 6px; color: var(--text); font-size: 14px; }
.side a:hover, .side a.on { background: var(--nav-hover-bg); color: var(--gold-2); text-decoration: none; }
.muted { color: var(--muted); }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { position: relative; padding: 8px 0 8px 44px; border-bottom: 1px dashed var(--dash-line); }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 10px;
  width: 28px; height: 28px; line-height: 28px; text-align: center;
  border-radius: 50%; background: var(--th-bg); color: var(--gold-2); font-weight: 700; font-size: 13px;
}
.post-body h2 { font-size: 20px; margin: 22px 0 10px; }
.post-body figure.shot {
  margin: 16px 0; padding: 12px;
  background: var(--input-bg); border: 1px solid var(--line); border-radius: 10px;
  overflow-x: auto;
}
.post-body figure.shot svg { width: 100%; height: auto; display: block; }
.post-body figcaption { color: var(--muted); font-size: 13px; margin-top: 8px; }
.post-body .hl {
  fill: none; stroke: var(--gold-2); stroke-width: 2; stroke-dasharray: 5 3;
}
.post-body .mk circle { fill: var(--gold); }
.post-body .mk text {
  fill: #1a1408; font-size: 13px; font-weight: 700; text-anchor: middle;
}
table.bbs { width: 100%; }
table.bbs th { width: auto; }
.post {
  display: grid; grid-template-columns: 168px minmax(0, 1fr);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 0; margin: 12px 0; overflow: hidden;
}
.post-user {
  padding: 14px 12px; background: var(--input-bg);
  border-right: 1px solid var(--line);
}
.post-nick { display: block; font-weight: 700; color: var(--gold-2); margin-bottom: 6px; }
.post-group { font-size: 13px; font-weight: 700; }
.post-stars { color: var(--gold); letter-spacing: 1px; margin: 4px 0 8px; font-size: 13px; }
.post-stat { font-size: 12px; color: var(--muted); line-height: 1.65; }
.post-stat b { color: var(--text); font-weight: 600; }
.post-main { padding: 14px 16px; min-width: 0; }
.post-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.post-body { word-break: break-word; }
.post-sign {
  margin-top: 12px; padding-top: 8px; border-top: 1px dashed var(--dash-line);
  color: var(--muted); font-size: 13px; font-style: italic;
}
.tag {
  display: inline-block; font-size: 12px; padding: 0 6px; border-radius: 4px;
  border: 1px solid var(--gold-dim); color: var(--gold-2);
}
.tag.lock { border-color: var(--lock-border); color: var(--warn); }
.tag.top { border-color: var(--gold); color: var(--gold); }
form.inline { display: inline; margin: 0; }
.tag.digest { border-color: var(--gold); color: var(--gold-2); }
.badge {
  display: inline-block; min-width: 16px; padding: 0 5px; margin-left: 4px;
  border-radius: 8px; background: var(--badge-bg); color: #fff; font-size: 11px; line-height: 16px;
  text-align: center;
}
.bb-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.bb-bar button {
  background: var(--nav-hover-bg); color: var(--gold-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 12px;
}
blockquote.quote {
  margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--gold-dim);
  background: var(--quote-bg); color: var(--muted); border-radius: 0 8px 8px 0;
}
blockquote.quote cite { display: block; color: var(--gold-2); font-style: normal; margin-bottom: 4px; }
.bb-red { color: var(--danger); }
.bb-gold { color: var(--gold-2); }
.bb-green { color: var(--ok); }
.post:target { outline: 1px solid var(--gold-dim); }
.table-scroll {
  display: block; width: 100%; max-width: 100%;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 12px 0 18px;
}
.table-scroll table { margin: 0; min-width: 640px; }
.guide-wrap > *, .article, .article .body, .post-body { min-width: 0; max-width: 100%; }
.article .body, .post-body, .article p, .article li {
  overflow-wrap: break-word; word-wrap: break-word; word-break: break-word;
}

@media (max-width: 960px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .main { padding: 20px 16px 48px; }
  .hero { padding: 20px 0 12px; }
  .hero h1 { font-size: 28px; letter-spacing: .03em; }
  h1 { font-size: 24px; word-break: break-word; }
  h2 { font-size: 20px; margin: 28px 0 12px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (max-width: 860px) {
  .bar {
    flex-wrap: wrap; align-items: center; justify-content: space-between;
    min-height: 56px; gap: 8px; padding: 6px 0;
  }
  .brand-cn { font-size: 18px; }
  .nav-toggle { display: flex; }
  .nav {
    display: none; flex-direction: column; flex-wrap: nowrap;
    width: 100%; gap: 0; padding: 8px 0 12px;
    border-top: 1px solid var(--line);
  }
  .nav a {
    display: block; padding: 12px 4px; font-size: 16px;
    border-bottom: 1px dashed var(--dash-line);
  }
  .nav-link { padding: 12px 4px; border-radius: 0; }
  .nav-link.on::after { display: none; }
  .nav-ic { width: 17px; height: 17px; margin-right: 8px; }
  .nav-item { width: 100%; }
  .nav-item > a { font-weight: 700; padding: 12px 4px; border-radius: 0; }
  .nav-sub {
    position: static; display: block; min-width: 0;
    padding: 0 0 6px 14px; margin: 0; border: 0; border-radius: 0;
    box-shadow: none; background: transparent;
  }
  .nav-sub a { padding: 10px 4px; font-size: 15px; font-weight: 400; }
  .header-open .nav { display: flex; }
  .header-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .header-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .header-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-toggle-bar { transition: transform .2s, opacity .2s; }

  .guide-wrap { grid-template-columns: 1fr; gap: 16px; }
  .side-sum {
    display: block; cursor: pointer; padding: 12px 14px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
    color: var(--gold-2); font-weight: 700;
  }
  .side-box[open] .side-sum { border-radius: 10px 10px 0 0; border-bottom: 0; }
  .side-box .side {
    position: relative; top: 0;
    border-radius: 0 0 10px 10px; border-top: 0;
  }
  .side-box:not([open]) .side { display: none; }

  .list li { flex-direction: column; gap: 2px; align-items: flex-start; }
  .list .meta { white-space: normal; }
  .list-media .thumb { flex-basis: 52px; width: 52px; height: 52px; font-size: 16px; }
  .list-media .sum { white-space: normal; overflow: visible; }
  .list-media-grid { grid-template-columns: 1fr; }
  .form { max-width: none; padding: 16px; }
  .form .captcha { flex-wrap: wrap; }
  .form input, .form select, .form textarea { font-size: 16px; }
  .btn, button.btn, input.btn { min-height: 44px; padding: 10px 16px; }
  .row .btn, .row a.btn { flex: 1 1 auto; text-align: center; }
  .post { grid-template-columns: 1fr; }
  .post-user {
    border-right: 0; border-bottom: 1px solid var(--line);
    display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px;
  }
  .post-nick, .post-group, .post-stars { grid-column: 1 / -1; }
  .post-main { padding: 12px 16px 14px; }
  .article { max-width: 100%; }
  .article .body, .post-body { overflow-x: visible; }
  .main { overflow-x: hidden; max-width: 100%; }
  .wrap.main { padding-left: 16px; padding-right: 16px; }
  .foot { padding: 20px 0 28px; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
}
.rank-wrap { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
.rank-list { display: flex; flex-direction: column; gap: 6px; }
.rank-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--text); cursor: pointer; text-align: left;
}
.rank-row:hover, .rank-row.on { border-color: var(--gold-dim); background: var(--nav-hover-bg); }
.rank-row .rk {
  flex: 0 0 28px; height: 28px; line-height: 28px; text-align: center;
  border-radius: 50%; background: var(--th-bg); color: var(--gold-2); font-weight: 700; font-size: 13px;
}
.rank-row .rk.top { background: var(--gold); color: var(--btn-text); }
.rank-row .who { flex: 1; min-width: 0; }
.rank-row .who b { display: block; }
.rank-row .who i { font-style: normal; color: var(--muted); font-size: 12px; }
.rank-row .lv { color: var(--gold-2); font-size: 13px; white-space: nowrap; }
.eq-panel { display: none; }
.eq-panel.on { display: block; }
.eq-head { margin-bottom: 12px; }
.eq-head strong { margin-right: 10px; color: var(--gold-2); }
.eq-board {
  --u: 2.15;
  position: relative;
  width: calc(196px * var(--u));
  height: calc(212px * var(--u));
  max-width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.eq-slot {
  position: absolute;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--input-bg);
  overflow: hidden;
}
.eq-slot img {
  position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px);
  object-fit: contain; display: block;
}
.eq-slot .eq-name {
  position: absolute; left: 3px; top: 2px; z-index: 1;
  font-size: 10px; color: var(--muted); line-height: 1; pointer-events: none;
}
.eq-slot .eq-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--gold-2); font-size: 13px; font-weight: 700;
}
.eq-slot.s8 { left: calc(15px * var(--u)); top: calc(8px * var(--u)); width: calc(46px * var(--u)); height: calc(46px * var(--u)); }
.eq-slot.s2 { left: calc(75px * var(--u)); top: calc(8px * var(--u)); width: calc(46px * var(--u)); height: calc(46px * var(--u)); }
.eq-slot.s7 { left: calc(120px * var(--u)); top: calc(8px * var(--u)); width: calc(61px * var(--u)); height: calc(46px * var(--u)); }
.eq-slot.s0 { left: calc(15px * var(--u)); top: calc(51px * var(--u)); width: calc(46px * var(--u)); height: calc(66px * var(--u)); }
.eq-slot.s9 { left: calc(54px * var(--u)); top: calc(51px * var(--u)); width: calc(28px * var(--u)); height: calc(28px * var(--u)); }
.eq-slot.s3 { left: calc(75px * var(--u)); top: calc(51px * var(--u)); width: calc(46px * var(--u)); height: calc(66px * var(--u)); }
.eq-slot.s1 { left: calc(135px * var(--u)); top: calc(51px * var(--u)); width: calc(46px * var(--u)); height: calc(66px * var(--u)); }
.eq-slot.s5 { left: calc(15px * var(--u)); top: calc(114px * var(--u)); width: calc(46px * var(--u)); height: calc(46px * var(--u)); }
.eq-slot.s10 { left: calc(54px * var(--u)); top: calc(114px * var(--u)); width: calc(28px * var(--u)); height: calc(28px * var(--u)); }
.eq-slot.s4 { left: calc(75px * var(--u)); top: calc(114px * var(--u)); width: calc(46px * var(--u)); height: calc(46px * var(--u)); }
.eq-slot.s11 { left: calc(114px * var(--u)); top: calc(114px * var(--u)); width: calc(28px * var(--u)); height: calc(28px * var(--u)); }
.eq-slot.s6 { left: calc(135px * var(--u)); top: calc(114px * var(--u)); width: calc(46px * var(--u)); height: calc(46px * var(--u)); }
.eq-slot.has { cursor: help; }
.eq-slot.has:hover, .eq-slot.on { border-color: var(--gold); }

.itp {
  display: none;
  position: fixed; z-index: 200; left: 0; top: 0;
  min-width: 196px; max-width: 320px;
  padding: 8px 10px 9px;
  pointer-events: none;
  color: #fff;
  background: #000014;
  border: 1px solid #8a6b32;
  box-shadow: 0 0 0 1px #000, 0 8px 22px rgba(0,0,0,.55);
  font: 12px/1.45 Tahoma, "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  text-align: left;
}
.itp.show { display: block; }
.itp[hidden] { display: none !important; }
.itp .itp-title { margin: 0 0 6px; font-size: 13px; }
.itp .itp-line { margin: 0; white-space: pre-wrap; }
.itp .itp-b { font-weight: 700; }
.itp .itp-c0 { color: #ffffff !important; }
.itp .itp-c1 { color: #80b3ff !important; }
.itp .itp-c2 { color: #ff331a !important; }
.itp .itp-c3 { color: #ffcc1a !important; }
.itp .itp-c4 { color: #1aff80 !important; }
.itp .itp-c5 { color: #ffffff !important; background: #a00000; }
.itp .itp-c6 { color: #ff1aff !important; }
.itp .itp-c7 { color: #ffffff !important; background: #0000a0; }
.itp .itp-c8 { color: #ffffff !important; background: #a06600; }
.itp .itp-c9 { color: #00ff00 !important; background: #3c3cc8; }
.itp .itp-c10 { color: #666666 !important; }
.itp .itp-c11 { color: #cc80cc !important; }
.itp .itp-c12 { color: #b366ff !important; }
.itp .itp-c13 { color: #e66b0a !important; }
.itp .itp-c14 { color: #60dee5 !important; background: #c83c3c; }

@media (max-width: 860px) {
  .rank-wrap { grid-template-columns: 1fr; }
  .eq-board { --u: 1.7; }
}

.auc-filter {
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end;
  margin: 0 0 18px; padding: 12px 14px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px;
}
.auc-filter label { display: flex; flex-direction: column; gap: 4px; color: var(--gold-2); font-size: 12px; }
.auc-filter select, .auc-filter input[type=text] {
  min-width: 140px; padding: 7px 10px; border-radius: 6px;
  border: 1px solid var(--input-border); background: var(--input-bg); color: var(--text); font-size: 14px;
}
.auc-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 20px; }
.auc-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: inherit; text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.auc-row:hover { border-color: var(--gold-dim); text-decoration: none; }
.auc-icons { display: flex; gap: 4px; flex: 0 0 auto; }
.auc-icons img, .auc-ph {
  width: 36px; height: 36px; object-fit: contain; display: block;
  background: var(--input-bg); border: 1px solid var(--line); border-radius: 6px;
}
.auc-ph { line-height: 36px; text-align: center; color: var(--gold-2); font-size: 12px; font-weight: 700; }
.auc-info { flex: 1; min-width: 0; }
.auc-info b { display: block; }
.auc-info i { font-style: normal; color: var(--muted); font-size: 12px; }
.auc-price { color: var(--gold-2); font-weight: 700; white-space: nowrap; }
.auc-price em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted); }
.auc-meta {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px; margin: 16px 0 24px;
}
.auc-meta div {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
}
.auc-meta span { display: block; color: var(--muted); font-size: 12px; }
.auc-meta b { color: var(--gold-2); }
.auc-bundle { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 22px; }
.auc-slot {
  width: 92px; padding: 8px 6px 10px; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .15s, transform .15s;
}
.auc-slot.has { cursor: help; }
.auc-slot.has:hover { border-color: var(--gold); transform: translateY(-2px); }
.auc-slot img { width: 48px; height: 48px; object-fit: contain; display: block; margin: 0 auto 6px; }
.auc-slot em { display: block; font-style: normal; font-size: 12px; color: var(--muted); line-height: 1.3; }
.auc-row .auc-bundle { flex: 1; min-width: 0; margin: 0; gap: 8px; }
.auc-row .auc-slot {
  width: 76px; padding: 6px 4px 8px; background: var(--input-bg); border-color: var(--line);
}
.auc-row .auc-slot img, .auc-row .auc-slot .eq-fallback {
  width: 60px; height: 60px; margin: 0 auto 4px;
}
.auc-row .auc-slot .eq-fallback {
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  color: var(--gold-2); font-size: 13px; font-weight: 700;
}
.auc-row .auc-slot em {
  font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%; display: block;
}
.auc-right {
  flex: 0 0 auto; margin-left: auto; align-self: center;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.auc-right i { font-style: normal; color: var(--muted); font-size: 12px; white-space: nowrap; }
@media (max-width: 860px) {
  .auc-row { flex-wrap: wrap; }
  .auc-price { width: 100%; }
  .auc-right { width: 100%; align-items: flex-start; margin-left: 0; }
  .auc-right .auc-price { width: auto; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 22px; }
  .card .k { font-size: 18px; }
  .pills { gap: 6px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 12px; }
  .bb-bar button { min-height: 36px; }
}

/* ============================================================
   版式风格（LayoutCatalog / body.layout-xxx）：跟配色风格是两条独立的轴，
   只管卡片/按钮/标题的形状与装饰，颜色仍然全部来自配色风格的 CSS 变量，
   所以后台可以自由组合"任意配色 + 任意版式"，不会互相牵连。
   默认版式 classic 不加任何 layout- 类也生效（下面这段是无 body 前缀的
   基础规则），其余版式用 body.layout-xxx 覆盖对应形状属性。
   ============================================================ */

/* ---- classic 古典徽章（默认）：卡片顶部细金线，Hero 四角描边角标 ---- */
.card { position: relative; }
.card::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .8;
}
.card.has-cover::before { display: none; }
.hero { position: relative; }
.hero::before, .hero::after {
  content: ""; position: absolute; width: 20px; height: 20px;
  border: 2px solid var(--gold-dim); opacity: .55; pointer-events: none;
}
.hero::before { left: 8px; top: 8px; border-right: 0; border-bottom: 0; }
.hero::after { right: 8px; top: 8px; border-left: 0; border-bottom: 0; }

/* ---- sharp 硬朗切角：按钮/卡片斜切角，标题变成短促的"标签条" ---- */
body.layout-sharp .btn, body.layout-sharp button.btn, body.layout-sharp input.btn {
  border-radius: 2px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
body.layout-sharp .btn.sm, body.layout-sharp button.btn.sm {
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
body.layout-sharp .card, body.layout-sharp .admin-tile, body.layout-sharp .dl-item, body.layout-sharp .form {
  border-radius: 2px;
}
body.layout-sharp .card {
  border-left: 3px solid var(--gold); border-right: 0; border-top: 0;
}
body.layout-sharp .card::before { display: none; }
body.layout-sharp h2 {
  display: inline-block; border-bottom: 3px solid var(--gold); padding: 0 6px 8px 0;
}
body.layout-sharp .hero::before, body.layout-sharp .hero::after { display: none; }
body.layout-sharp .hero { border-left: 4px solid var(--gold-dim); padding-left: 20px; }
body.layout-sharp .pill, body.layout-sharp .tag { border-radius: 3px; }

/* ---- soft 柔和圆角：去边框改柔阴影，大圆角，标题改左侧色块——扁平现代风 ---- */
body.layout-soft .card, body.layout-soft .admin-tile, body.layout-soft .dl-item,
body.layout-soft .form, body.layout-soft .post {
  border: 0; border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
}
body.layout-soft .card::before { display: none; }
body.layout-soft .btn, body.layout-soft button.btn, body.layout-soft input.btn {
  border-radius: 999px;
}
body.layout-soft h2 {
  border-bottom: 0; border-left: 4px solid var(--gold); padding: 2px 0 2px 12px;
}
body.layout-soft .hero::before, body.layout-soft .hero::after { display: none; }
body.layout-soft .hero {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 28px 24px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
body.layout-soft .pill, body.layout-soft .tag { border-radius: 999px; }

/* ---- tech 科技面板：卡片切一个直角边，标题加"// "前缀，按钮方角 ---- */
body.layout-tech .card {
  border-radius: 2px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}
body.layout-tech .card::before { display: none; }
body.layout-tech .admin-tile, body.layout-tech .dl-item, body.layout-tech .form {
  border-radius: 2px;
}
body.layout-tech .btn, body.layout-tech button.btn, body.layout-tech input.btn {
  border-radius: 2px; letter-spacing: .04em;
}
body.layout-tech h2::before { content: "// "; color: var(--gold-dim); }
body.layout-tech .hero::before, body.layout-tech .hero::after { border-color: var(--gold); }
body.layout-tech .pill, body.layout-tech .tag { border-radius: 2px; }

/* ---- glow 荧光描边：卡片/按钮常驻淡荧光描边，贴近"极品装备"发光的游戏感 ---- */
body.layout-glow .card {
  box-shadow: 0 0 0 1px var(--gold-dim), 0 0 18px var(--glow-1);
}
body.layout-glow .card::before { opacity: 1; box-shadow: 0 0 8px var(--gold); }
body.layout-glow .card:has(> a):hover, body.layout-glow .card:has(.card-body):hover {
  box-shadow: 0 0 0 1px var(--gold), 0 0 26px var(--glow-1), 0 10px 22px rgba(0,0,0,.3);
}
body.layout-glow .btn, body.layout-glow button.btn, body.layout-glow input.btn {
  box-shadow: 0 0 10px var(--glow-1), 0 2px 8px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.14);
}
body.layout-glow .admin-tile, body.layout-glow .dl-item, body.layout-glow .form {
  box-shadow: 0 0 0 1px var(--gold-dim), 0 0 14px var(--glow-2);
}
body.layout-glow h2 { text-shadow: 0 0 10px var(--glow-1); }
body.layout-glow .hero::before, body.layout-glow .hero::after {
  border-color: var(--gold); box-shadow: 0 0 8px var(--glow-1);
}
