/* ============================================================
   XZ游戏工具库 / XZ GAME TOOLS
   PURE WHITE THEME
   纯白高对比主题：白底、深色正文、清晰字号、低饱和战术蓝点缀
   ============================================================ */

:root {
  --ink: #ffffff;
  --ink-2: #f5f9fd;
  --panel: #ffffff;
  --panel-2: #f6faff;
  --panel-3: #edf5fb;
  --line: #dbe8f4;
  --line-strong: #aec9df;
  --text: #142433;
  --muted: #526673;
  --dim: #748695;
  --lime: #2f8ed8;
  --lime-2: #1d6fb7;
  --lime-soft: #eef7ff;
  --amber: #8a4b00;
  --cyan: #147e9e;
  --red: #b42318;
  --display: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  --body: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SFMono-Regular", "Menlo", monospace;
  --shadow: 0 18px 48px rgba(30, 71, 104, 0.10);
  --cut: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  --cut-sm: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 0 100%);
}

html {
  color-scheme: light;
  background: #fff;
}

body {
  color: var(--text);
  background:
    radial-gradient(980px 560px at 90% -10%, rgba(29, 111, 183, 0.065), transparent 62%),
    radial-gradient(760px 480px at -10% 28%, rgba(31, 113, 138, 0.035), transparent 62%),
    #ffffff;
  font-family: var(--body);
  font-size: 15.5px;
  line-height: 1.72;
  -webkit-font-smoothing: auto;
}

body::before {
  background-image:
    linear-gradient(rgba(18, 22, 26, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 22, 26, 0.035) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 72%);
}

body::after { display: none; }

::selection { color: #fff; background: var(--lime); }
::-webkit-scrollbar-track { background: #eff2f5; }
::-webkit-scrollbar-thumb { background: #c2cbd2; border-color: #eff2f5; }
::-webkit-scrollbar-thumb:hover { background: #a1aeb9; }

h1, h2, h3, h4, .display {
  font-family: var(--display);
  letter-spacing: -0.025em;
}

.hero h1,
.section-head h2,
.page-hero h1,
.auth-copy h1 {
  font-weight: 800;
  letter-spacing: -0.045em;
}

.eyebrow {
  gap: 8px;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
}
.eyebrow::before { width: 18px; }

.section-head .section-note,
.section-head .section-link {
  font-size: 13px;
}
.section-head .section-link { color: var(--lime); }

/* ---------- buttons / fields ---------- */

.btn {
  min-height: 46px;
  border-color: var(--line-strong);
  background: #fff;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.btn:hover {
  border-color: var(--lime);
  color: var(--lime);
  background: #eaf6ff;
}
.btn-primary {
  border-color: #141b20;
  background: #141b20;
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(20, 27, 32, 0.12);
}
.btn-primary:hover {
  border-color: var(--lime);
  background: var(--lime);
  color: #ffffff;
}
.btn-ghost {
  border-color: var(--line);
  background: #fff;
  color: #2f3b44;
}
.btn-ghost:hover {
  border-color: var(--line-strong);
  background: #f7fbff;
  color: var(--lime);
}
.btn-dark { background: #141b20; color: #fff; border-color: #141b20; }
.btn-danger {
  border-color: #e4b7b1;
  color: var(--red);
  background: #fff;
}
.btn-danger:hover { background: #fff5f3; border-color: var(--red); }
.btn:disabled { opacity: .5; }

.icon-btn {
  border-color: var(--line);
  background: #fff;
  color: #5f6b74;
}
.icon-btn:hover {
  border-color: var(--line-strong);
  background: #eaf6ff;
  color: var(--lime);
}
.text-link { color: #545f68; }
.text-link:hover { color: var(--lime); }

.field > label,
.field-label { color: #2b3740; font-size: 12.5px; }
.field .hint { color: var(--dim); font-size: 11.5px; }
.field input,
.field select,
.field textarea,
.input {
  border-color: #d6e5f2;
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
}
.field input::placeholder,
.field textarea::placeholder { color: #929ca5; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: #acb8c2; }
.field input:focus,
.field select:focus,
.field textarea:focus,
.input:focus {
  border-color: var(--lime);
  background: #eaf6ff;
  box-shadow: 0 0 0 3px rgba(23, 79, 121, 0.09);
}
.field select,
.toolbar select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23525d49' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.form-note { color: var(--dim); font-size: 12px; }
.form-error {
  border-left-color: var(--red);
  background: #fff3f1;
  color: #9e2018;
}
.checkbox { color: var(--muted); font-size: 12.5px; }
.checkbox input { accent-color: var(--lime); }

/* ---------- header ---------- */

.site-header { background: rgba(255, 255, 255, .92); }
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 1px 0 var(--line), 0 12px 32px rgba(17, 25, 31, 0.07);
  backdrop-filter: blur(18px);
}
.topline {
  border-bottom-color: #e3e8ec;
  background: #f5f7f9;
}
.topline-inner { color: #545f68; font-size: 10px; letter-spacing: .06em; }
.topline-note, .topline-right { color: #737f88; }
.topline-sep { background: #d3dadf; }
.live-dot { background: var(--lime); box-shadow: 0 0 0 3px rgba(23, 79, 121, .1); }
.header-shell {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(18px);
}
.brand-mark i { background: var(--lime); }
.brand-mark::after { background: var(--lime); opacity: .32; }
.brand-copy strong { color: #142b3d; font-size: 21px; font-weight: 800; }
.brand-copy small { color: var(--lime); font-size: 9px; letter-spacing: .18em; }
.nav-link { color: #4d5861; }
.nav-link small { color: #7f8b94; font-size: 8px; }
.nav-link:hover { color: #173247; }
.nav-link.active { color: var(--lime); }
.nav-link.active small { color: #55738c; }
.nav-link::after { background: var(--lime); }
.nav-link.admin-link small { color: var(--amber); }
.user-chip:hover { border-color: var(--line); background: #f7fbff; }
.user-chip-copy strong { color: #1e3a4d; font-size: 12.5px; }
.user-chip-copy small { color: var(--dim); font-size: 8px; }
.menu-toggle { border-color: var(--line); background: #fff; }
.menu-toggle span { background: #1e3a4d; }

.avatar {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--avatar-color) 35%, #d2dbe2);
  background: color-mix(in srgb, var(--avatar-color) 14%, #ffffff);
  color: #24313b;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6);
  font-weight: 800;
}
.avatar img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.avatar-initial { position: relative; z-index: 1; }
.avatar.has-image .avatar-initial { opacity: 0; }

/* ---------- footer ---------- */

.site-footer {
  border-top-color: var(--line);
  background: #f6faff;
}
.footer-brand p { color: #59646d; font-size: 12.5px; }
.footer-title { color: #6e7a83; }
.footer-col a { color: #454f58; }
.footer-col a:hover { color: var(--lime); }
.footer-muted { color: #737f88; }
.footer-bottom { border-top-color: var(--line); color: #636f78; font-size: 10px; }
.footer-status { color: #40515f; }
.footer-status i { background: var(--lime); box-shadow: none; }

/* ---------- home hero ---------- */

.hero { border-bottom-color: var(--line); }
.hero::before { color: rgba(23, 33, 42, 0.035); }
.hero-lede { color: #47515a; font-size: 15.5px; }
.hero-lede strong { color: #142433; font-weight: 700; }
.hero h1 { color: #142433; }
.hero h1 em { color: var(--lime); }
.hero h1 em::after { background: var(--lime); opacity: .12; }
.hero-actions .meta { color: var(--dim); font-size: 10px; }
.hero-actions .meta i { background: var(--lime); }
.hero-stats { border-color: var(--line); }
.hero-stat { border-right-color: var(--line); }
.hero-stat strong { color: #142433; font-size: 32px; font-weight: 800; }
.hero-stat span { color: #748695; font-size: 10px; letter-spacing: .08em; }

.blueprint {
  border-color: #bfcbd5;
  background:
    linear-gradient(155deg, rgba(29, 111, 183, .07), transparent 42%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(23, 79, 121, .065) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(23, 79, 121, .065) 39px 40px),
    #f9fafc;
  box-shadow: 0 22px 55px rgba(23, 34, 43, .10);
}
.blueprint::before { border-color: rgba(23, 79, 121, .12); }
.blueprint::after { display: none; }
.blueprint-image img,
.gun-tile-media img,
.gun-banner-image img,
.detail-gun img { filter: none; }
.gun-tile-media img { width: 104%; max-height: 152px; transform: scale(1.02); }
.gun-tile:hover img { transform: scale(1.07); }
.gun-nav-thumb img { width: 100%; height: 100%; transform: none; }
.gun-banner-image img { width: 100%; max-height: 180px; transform: none; }
.site-hero-media { width: 100%; height: 100%; overflow: hidden; border-radius: 8px; }
.blueprint-image .site-hero-media,
.gun-banner-image .site-hero-media { width: 100%; height: 100%; }
.blueprint-image img.site-hero-image,
.blueprint-image video,
.gun-banner-image img.site-hero-image,
.gun-banner-image video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: 8px;
  filter: none;
}
.gun-banner-image img.gun-banner-contain {
  padding: 8px 10px;
  object-fit: contain;
  object-position: center;
}
.detail-gun img { max-height: 116px; transform: none; }
.blueprint-top { color: #616d77; }
.blueprint-top strong { color: var(--lime); }
.blueprint-caption strong { color: #142433; }
.blueprint-caption span { color: #5f6c76; font-size: 9px; }
.blueprint-caption .coords { color: #74808a; }
.blueprint-badge {
  border-color: #bbcad7;
  color: var(--lime);
  background: rgba(255, 255, 255, .9);
}
.blueprint-badge i { background: var(--lime); }
.hero-float {
  border-color: #d0d9e0;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 16px 35px rgba(17, 25, 31, .10);
  backdrop-filter: blur(12px);
}
.hero-float .float-icon { border-color: #b9c8d5; color: var(--lime); background: #eaf6ff; }
.hero-float strong { color: #1b232a; }
.hero-float span { color: #717c85; font-size: 9px; }

.ticker { border-color: var(--line); background: #f5f7f9; }
.ticker-item { color: #647079; font-size: 10px; }
.ticker-item::after { color: #bbc4cc; }
.ticker-item strong { color: var(--lime); }

/* ---------- gun cards ---------- */

.gun-tile {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(17, 25, 31, .02);
}
.gun-tile:hover {
  border-color: color-mix(in srgb, var(--accent, var(--lime)) 38%, #d2d9df);
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(17, 25, 31, .09);
}
.gun-tile-media {
  background: linear-gradient(180deg, #f9fafc 0%, #edf2f6 100%);
}
.gun-tile-media::after {
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent, var(--lime)) 26%, transparent), transparent);
}
.gun-tile-body { border-top-color: #e8ecf0; }
.gun-tile-name span { color: var(--accent, var(--lime)); font-size: 9px; }
.gun-tile-name strong { color: #142433; font-weight: 700; }
.gun-tile-count { color: #717c85; font-size: 10px; }
.gun-tile-count b { color: #29323a; }
.gun-tile-arrow { color: #99a5ae; }

/* ---------- loadout cards ---------- */

.loadout-card {
  border-color: var(--line);
  background:
    radial-gradient(280px 130px at 100% 0, color-mix(in srgb, var(--accent, var(--lime)) 6%, transparent), transparent 70%),
    #ffffff;
  box-shadow: 0 1px 0 rgba(17, 25, 31, .02);
}
.loadout-card:hover {
  border-color: color-mix(in srgb, var(--accent, var(--lime)) 32%, #d2d9df);
  box-shadow: 0 16px 36px rgba(17, 25, 31, .08);
}
.loadout-card::before { background: var(--accent, var(--lime)); }
.card-glow { opacity: .025; }
.author strong { color: #242d34; font-size: 11.5px; }
.author span { color: #727e87; font-size: 9px; }
.gun-chip {
  border-color: color-mix(in srgb, var(--accent, var(--lime)) 24%, #d5dce2);
  color: var(--accent, var(--lime));
  background: color-mix(in srgb, var(--accent, var(--lime)) 6%, #ffffff);
  font-size: 9px;
  font-weight: 600;
}
.loadout-title { color: #142433; font-weight: 800; }
.loadout-title button { color: #142433; }
.loadout-title button:hover { color: var(--lime); }
.loadout-desc { color: #4d5962; font-size: 12.5px; }
.mini-tag {
  border-color: #dee3e7;
  color: #535e67;
  background: #f6faff;
  font-size: 10px;
}
.code-peek {
  border-color: #c6d4df;
  background: #f8fbff;
}
.code-label { color: var(--accent, var(--lime)); font-size: 8px; }
.code-peek code { color: #35414a; font-size: 11px; }
.copy-btn { border-color: #d2e4f3; background: #fff; }
.loadout-foot { border-top-color: #e8ecf0; }
.stat-btn { color: #636d76; font-size: 10px; }
.stat-btn:hover, .stat-btn.is-active { color: var(--lime); }
.stat-btn.is-active svg { fill: rgba(23, 79, 121, .12); }
.view-count { color: #727e87; font-size: 10px; }
.loadout-foot .text-link { color: #55616b; }
.loadout-foot .own-delete { color: #a96761; }
.loadout-foot .own-delete:hover { color: var(--red); }

/* ---------- editorial / leaderboard / steps ---------- */

.editorial-card {
  border-color: #ced9e2;
  background: linear-gradient(135deg, #eaf6ff 0%, #ffffff 58%);
}
.editorial-card::after { color: rgba(23, 79, 121, .055); }
.editorial-card h3 { color: #173247; }
.editorial-card p { color: #4a5660; }
.editorial-meta { color: #748695; font-size: 9px; }
.editorial-meta i { background: var(--lime); }
.leaderboard { border-color: var(--line); background: #fff; }
.leaderboard-head { border-bottom-color: var(--line); }
.leaderboard-head strong { color: #173247; }
.leaderboard-head span { color: #717c85; font-size: 9px; }
.leader-row { border-bottom-color: #e8ecf0; }
.leader-rank { color: #8f99a2; }
.leader-row:nth-child(1) .leader-rank { color: var(--lime); }
.leader-row:nth-child(2) .leader-rank { color: #5f7282; }
.leader-row:nth-child(3) .leader-rank { color: var(--amber); }
.leader-main strong { color: #242d34; font-size: 12px; }
.leader-main span { color: #717c85; font-size: 9px; }
.leader-score { color: var(--lime); font-size: 10px; }
.leader-score small { color: #717c85; }

.step-card { border-color: var(--line); background: #fff; }
.step-card::before { color: rgba(23, 79, 121, .09); }
.step-icon { border-color: #bbcad7; color: var(--lime); background: #eaf6ff; }
.step-card h3 { color: #173247; }
.step-card p { color: #4d5962; }

.cta-band {
  border-color: #bbccda;
  background: linear-gradient(100deg, #eef7ff, #ffffff 62%);
}
.cta-band::before { background: repeating-linear-gradient(90deg, transparent 0 23px, rgba(23, 79, 121, .045) 23px 24px); }
.cta-band h2 { color: #173247; }
.cta-band p { color: #4d5962; }

/* ---------- page hero / toolbox ---------- */

.page-hero { border-bottom-color: var(--line); }
.page-hero::before { color: rgba(23, 33, 42, 0.038); }
.page-hero h1 { color: #142433; }
.page-hero h1 em { color: var(--lime); }
.page-hero p { color: #4d5962; font-size: 14.5px; }

.toolbar {
  border-color: var(--line);
  background: #fff;
  box-shadow: 0 1px 0 rgba(17, 25, 31, .02);
}
.search-field svg { stroke: #6b7781; }
.search-field input {
  border-color: #d6e5f2;
  background: #fff;
  color: var(--text);
}
.search-field input:focus { border-color: var(--line-strong); background: #fff; }
.toolbar select {
  border-color: #d6e5f2;
  background-color: #fff;
  color: #404a52;
}
.toolbar-count { color: #717c85; font-size: 10px; }
.toolbar-count b { color: var(--lime); }

.gun-sidebar { border-color: var(--line); background: #fff; }
.sidebar-head { border-bottom-color: var(--line); }
.sidebar-head strong { color: #173247; }
.sidebar-head span { color: #717c85; font-size: 9px; }
.gun-sidebar .gun-nav { display: grid; gap: 6px; padding: 0 12px 12px; }
.gun-nav-item { color: #47525b; }
.gun-nav-item:hover { background: #f7fbff; color: #173247; }
.gun-nav-item.active {
  border-color: #bfddf2;
  background: #edf8ff;
  color: #1d4e70;
}
.gun-nav-item.active .gun-nav-count { color: #2f8ed8; }
.gun-nav-all {
  gap: 9px;
  margin-bottom: 5px;
  padding: 10px;
  border-color: #bfddf2;
  border-radius: 9px;
  background: linear-gradient(135deg, #edf8ff, #ffffff);
  color: #1d4e70;
}
.gun-nav-all:hover,
.gun-nav-all.active {
  border-color: #79bce8;
  background: linear-gradient(135deg, #e8f6ff, #ffffff);
  box-shadow: 0 7px 18px rgba(47, 142, 216, .11);
}
.gun-nav-all .gun-nav-thumb {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #2f8ed8;
  color: #fff;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
}
.gun-nav-all .gun-nav-copy strong { font-size: 12px; }
.gun-nav-all .gun-nav-copy span { margin-top: 2px; color: #6d879a; font-size: 9px; }
.gun-nav-all .gun-nav-count { color: #2f8ed8; font-size: 9px; font-weight: 700; }
.gun-nav-all-arrow { flex: none; color: #2f8ed8; font-size: 14px; }
.gun-nav-thumb { background: #f7fbff; }
.gun-nav-copy strong { font-size: 12px; }
.gun-nav-copy span { color: #737f88; font-size: 8px; }
.gun-nav-count { color: #717c85; font-size: 9px; }
.sidebar-foot { border-top-color: var(--line); color: #6e7a83; font-size: 9px; }
.sidebar-foot a { color: var(--lime); }

.gun-banner {
  border-color: color-mix(in srgb, var(--accent, var(--lime)) 22%, #d5dce2);
  background: linear-gradient(105deg, color-mix(in srgb, var(--accent, var(--lime)) 9%, #ffffff), #ffffff 66%);
}
.gun-banner h2 { color: #142433; }
.gun-banner p { color: #4d5962; }
.gun-banner-meta { color: #748695; font-size: 9px; }
.gun-banner-meta b { color: var(--accent, var(--lime)); }
.gun-banner-badge { color: #717c85; }
.loadout-list-head span { color: #717c85; font-size: 10px; }
.loadout-list-head strong { color: #29323a; }

/* ---------- dialogs ---------- */

dialog::backdrop {
  background: rgba(15, 20, 25, 0.28);
  /* 不再使用 backdrop-filter：毛玻璃会把整层背景重新合成，部分显卡下直接退化成一整片纯色，
     表现为“弹窗一开，后面的图片和背景全都不见了”。只用淡遮罩即可区分层级。 */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.modal-panel {
  border-color: #d0d7dd;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(17, 25, 31, 0.18);
}
.modal-close {
  border-color: var(--line);
  background: #fff;
  color: #535e67;
}
.modal-close:hover { color: var(--lime); border-color: var(--line-strong); background: #f7fbff; }
.modal-title { color: #142433; }
.modal-sub { color: #515d66; }
.modal-loading { border-color: var(--line); background: #fff; color: #515d66; }
.spinner { border-color: #d7e0e8; border-top-color: var(--lime); }
.detail-gun {
  border-color: var(--line);
  background: #f8fbff;
}
.detail-head h2 { color: #142433; }
.detail-author { color: #748695; font-size: 10.5px; }
.detail-author strong { color: #333f48; }
.detail-desc { color: #4a5660; font-size: 13px; }
.code-block { border-color: #c5d2dd; background: #f8fbff; }
.code-block-head { border-bottom-color: #dbe3e9; color: var(--lime); font-size: 9px; }
.code-block pre { color: #2c3841; font-size: 13px; }
.detail-foot .view-count { color: #748695; }

/* ---------- auth ---------- */

.auth-section {
  background: linear-gradient(180deg, #f9fafc 0%, #ffffff 62%);
}
.auth-section::before { color: rgba(23, 33, 42, 0.04); }
.auth-copy h1 {
  color: #142433;
  max-width: 560px;
  margin: 17px 0 19px;
  font-size: clamp(42px, 4.9vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.045em;
}
.auth-copy h1 em { color: var(--lime); }
.auth-copy p { max-width: 470px; color: #4a5660; font-size: 14.5px; line-height: 1.85; }
.auth-layout { gap: 54px; }
.auth-benefits { margin-top: 27px; }
.auth-benefit {
  border-color: var(--line);
  background: #ffffff;
}
.auth-benefit .benefit-icon { border-color: #bbcad7; color: var(--lime); background: #eaf6ff; }
.auth-benefit strong { color: #1e3a4d; }
.auth-benefit span { color: #748695; font-size: 10.5px; }
.auth-panel {
  border-color: #d0d7dd;
  background: #ffffff;
  box-shadow: 0 20px 55px rgba(17, 25, 31, 0.10);
}
.auth-tabs { border-bottom-color: var(--line); }
.auth-tab { color: #6e7a83; }
.auth-tab.active { color: #142433; }
.auth-tab::after { background: var(--lime); }
.auth-switch { color: #748695; }
.auth-switch button { color: var(--lime); }
.auth-foot { color: #717c85; font-size: 10.5px; }

/* ---------- profile / account ---------- */

.profile-cover {
  border-color: #ced9e2;
  background: linear-gradient(115deg, #eaf6ff 0%, #ffffff 55%);
}
.profile-cover::after { color: rgba(23, 33, 42, 0.04); }
.profile-name-row h1 { color: #142433; }
.role-badge {
  border-color: #baccda;
  color: var(--lime);
  background: #eef7ff;
  font-size: 8px;
}
.role-badge.admin {
  border-color: #e3c39d;
  color: var(--amber);
  background: #fff7ec;
}
.profile-handle { color: #748695; font-size: 10.5px; }
.profile-bio { color: #4a5660; font-size: 12.5px; }
.profile-since { color: #717c85; font-size: 9px; }
.profile-stat { border-right-color: var(--line); }
.profile-stat strong { color: #142433; }
.profile-stat span { color: #748695; font-size: 9px; }
.profile-stat strong em { color: var(--lime); }

.account-tabs { border-bottom-color: var(--line); }
.account-tab { color: #6e7a83; }
.account-tab.active { color: #142433; }
.account-tab::after { background: var(--lime); }
.account-tab .tab-count { color: #717c85; }
.account-section-head h2 { color: #173247; }
.account-section-head p { color: #748695; }
.settings-card { border-color: var(--line); background: #fff; }
.settings-card h3 { color: #142433; }
.settings-card > p { color: #748695; }
.color-swatch.active { border-color: #142433; }
.security-list { border-color: var(--line); }
.security-row { border-bottom-color: var(--line); }
.security-row strong { color: #1e3a4d; }
.security-row span { color: #748695; }
.danger-zone { border-color: #e8c4bf; background: #fff7f5; }
.danger-zone h3 { color: #9e2018; }
.danger-zone p { color: #8a625d; }

/* avatar editor (new) */
.avatar-editor {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 4px 0 22px;
  padding: 16px;
  border: 1px solid #d9e8f5;
  background: #f9fcff;
}
.avatar-editor-preview { flex: 0 0 auto; }
.avatar-editor-preview .avatar.xl { width: 84px; height: 84px; font-size: 32px; }
.avatar-editor-copy { flex: 1; min-width: 0; }
.avatar-editor-copy strong { display: block; color: #1e3a4d; font-size: 13px; }
.avatar-editor-copy > span { display: block; margin: 4px 0 9px; color: #748695; font-size: 11px; line-height: 1.6; }
.avatar-upload-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.avatar-upload-row input[type=file] { max-width: 100%; color: #515d66; font-size: 10.5px; }
.avatar-upload-row input[type=file]::file-selector-button {
  margin-right: 9px;
  padding: 6px 10px;
  border: 1px solid #c5cfd8;
  background: #fff;
  color: var(--lime);
  font-size: 10.5px;
  cursor: pointer;
}
.avatar-upload-row .btn { min-height: 32px; }

/* ---------- admin ---------- */

.admin-bar .eyebrow { color: var(--amber); }
.summary-card { border-color: var(--line); background: #fff; }
.summary-card strong { color: #142433; }
.summary-card span { color: #748695; font-size: 9px; }
.summary-card::after { border-color: #c8d4dd; }
.admin-tabs { border-bottom-color: var(--line); }
.admin-tab { color: #6e7a83; }
.admin-tab.active { color: var(--lime); border-bottom-color: var(--lime); }
.data-table-wrap { border-color: var(--line); background: #fff; }
.data-table th {
  border-bottom-color: var(--line);
  color: #748695;
  font-size: 9px;
  background: #f7f9fb;
}
.data-table td { border-bottom-color: #e8ecf0; color: #454f58; }
.data-table tbody tr:hover { background: #f8fbff; }
.data-table tbody { transition: opacity .15s ease; }
.data-table tbody.is-loading { opacity: .55; pointer-events: none; }
.table-gun img { background: #f7fbff; border-color: var(--line); }
.table-gun strong { color: #1e3a4d; }
.table-gun span { color: #717c85; font-size: 9px; }
.status-pill { border-color: var(--line); color: #5b6770; font-size: 9px; }
.status-pill.on { border-color: #b6c8d7; color: var(--lime); background: #eef7ff; }
.status-pill.off { border-color: #e8c2bd; color: var(--red); background: #fff5f3; }
.status-pill.admin { border-color: #e3c39d; color: var(--amber); background: #fff7ec; }
.admin-row-select {
  border-color: #d6e5f2;
  background-color: #fff;
  color: #1e3a4d;
}
.admin-pager { color: #748695; }
.admin-filter-label { color: #818b94; font-size: 11px; white-space: nowrap; }
.admin-filter-select {
  min-width: 145px;
  height: 36px;
  padding: 0 30px 0 11px;
  border: 1px solid #d9e8f5;
  border-radius: 8px;
  background: #fff;
  color: #1d6fb7;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.admin-filter-select:focus { outline: 2px solid rgba(47,142,216,.16); border-color: #9cafbf; }
.image-upload-box { border-color: #c9dff0; background: #f9fcff; }
.image-preview { border-color: var(--line); background: #f7fbff; }
.site-hero-upload { align-items: center; }
.settings-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 4px; color: #6f7d89; font-family: var(--mono); font-size: 9px; letter-spacing: .12em; }
.settings-divider::after { content: ""; flex: 1; height: 1px; background: #dfeaf5; }
.site-hero-preview { width: 210px; height: 118px; flex: none; border-radius: 7px; overflow: hidden; }
.site-hero-preview img,
.site-hero-preview video { display: block; width: 100%; height: 100%; object-fit: cover; }
.site-hero-preview video { background: #eaf3fa; }
.image-upload-copy strong { color: #1e3a4d; }
.image-upload-copy span { color: #748695; }
.image-upload-copy input[type=file] { color: #515d66; }
.image-upload-copy .site-reset { margin-top: 8px; }
.image-upload-copy input[type=file]::file-selector-button {
  border-color: #c5cfd8;
  background: #fff;
  color: var(--lime);
}

/* ---------- states / toast / misc ---------- */

.empty-state {
  border-color: #cfd8e0;
  background: #eaf6ff;
}
.empty-state h3 { color: #173247; }
.empty-state p { color: #748695; }
.empty-crosshair { border-color: #b0c0cd; }
.empty-crosshair::before, .empty-crosshair::after { background: #b0c0cd; }
.error-state { border-color: #edc9c4; background: #fff7f5; }
.error-code { color: var(--red); font-size: 9px; }
.error-state h3 { color: #30231f; }
.error-state p { color: #8c625d; }
.skeleton-card { border-color: var(--line); background: #fff; }
.skeleton-card span {
  background: linear-gradient(90deg, #eef1f4 20%, #f7f9fb 40%, #eef1f4 60%);
  background-size: 200% 100%;
}
.toast {
  border-color: #c8d4dd;
  background: rgba(255, 255, 255, .97);
  color: #29323a;
  box-shadow: 0 16px 40px rgba(17, 25, 31, 0.14);
}
.toast-mark { background: var(--lime); box-shadow: none; }
.toast.error { border-color: #e8c4bf; color: #8f2018; }
.toast.error .toast-mark { background: var(--red); box-shadow: none; }
.page-loading { color: #626e78; font-size: 11px; }
.access-denied .denied-mark { border-color: #e8c4bf; color: var(--red); }
.access-denied h1 { color: #142433; }
.access-denied p { color: #515d66; }

/* ---------- legibility tuning ---------- */

.hero-stat span,
.blueprint-caption span,
.ticker-item,
.author span,
.gun-tile-name span,
.gun-tile-count,
.gun-chip,
.mini-tag,
.code-label,
.stat-btn,
.view-count,
.gun-nav-copy span,
.sidebar-foot,
.gun-banner-meta,
.profile-handle,
.profile-stat span,
.account-section-head p,
.security-row span,
.footer-bottom,
.footer-title,
.status-pill,
.table-gun span,
.summary-card span {
  letter-spacing: 0.03em;
}

/* ---------- readability pass: small labels are intentionally larger ---------- */

.eyebrow { font-size: 12px; letter-spacing: .09em; }
.section-head .section-link { font-size: 14px; }
.hero-actions .meta { font-size: 11.5px; }
.hero-stat span { font-size: 11px; letter-spacing: .04em; }
.blueprint-top { font-size: 10px; letter-spacing: .1em; }
.blueprint-caption span { font-size: 10px; }
.blueprint-caption .coords { font-size: 9.5px; }
.blueprint-badge { font-size: 9.5px; }
.hero-float strong { font-size: 13px; }
.hero-float span { font-size: 10.5px; }
.ticker-item { font-size: 11px; }
.gun-tile-name span { font-size: 11.5px; }
.gun-tile-count { font-size: 12px; }
.author strong { font-size: 14px; }
.author span { font-size: 12px; }
.gun-chip { font-size: 10.5px; }
.mini-tag { font-size: 11.5px; }
.loadout-desc { font-size: 13.5px; }
.code-label { font-size: 9.5px; }
.code-peek code { font-size: 12px; }
.stat-btn { font-size: 12px; }
.view-count { font-size: 12px; }
.loadout-foot .text-link { font-size: 12px; }
.loadout-foot { flex-wrap: wrap; row-gap: 8px; }
.editorial-meta { font-size: 10.5px; }
.leader-main span { font-size: 10.5px; }
.leader-score { font-size: 11px; }
.step-card p { font-size: 13.5px; }
.sidebar-head span { font-size: 11.5px; }
.gun-nav-copy strong { font-size: 14px; }
.gun-nav-copy span { font-size: 11.5px; }
.gun-nav-count { font-size: 12px; }
.sidebar-foot { font-size: 10.5px; }
.gun-banner-meta { font-size: 12.5px; flex-wrap: wrap; row-gap: 5px; }
.gun-banner-meta b { font-size: 15px; }
.gun-banner p { font-size: 13.5px; }
.loadout-list-head span { font-size: 11.5px; }
.toolbar-count { font-size: 11.5px; }
.search-field input { font-size: 14px; }
.toolbar select { font-size: 13px; }
.modal-sub { font-size: 13px; }
.detail-author { font-size: 11.5px; }
.detail-desc { font-size: 14px; }
.code-block-head { font-size: 10px; }
.auth-benefit span { font-size: 11.5px; }
.auth-foot { font-size: 11px; }
.profile-handle { font-size: 11.5px; }
.profile-bio { font-size: 13.5px; }
.profile-since { font-size: 10px; }
.profile-stat span { font-size: 10.5px; }
.account-section-head p { font-size: 12.5px; }
.security-row span { font-size: 12px; }
.summary-card span { font-size: 11px; }
.data-table th { font-size: 12px; padding: 14px 15px; }
.data-table td { font-size: 14px; padding: 15px; }
.data-table { min-width: 900px; }
.table-gun strong { font-size: 14px; }
.table-gun span { font-size: 11.5px; }
.status-pill { font-size: 11px; padding: 4px 8px; }
.admin-pager { font-size: 11.5px; }
.admin-row-select { font-size: 13px; height: 36px; min-height: 36px; padding-left: 11px; }
.table-actions .btn { min-height: 34px; font-size: 12px; padding: 0 11px; }
.btn-warn {
  border-color: #e6c99d;
  background: #fffaf1;
  color: #8a4b00;
}
.btn-warn:hover {
  border-color: #c98a2e;
  background: #fff4df;
  color: #6f3b00;
}
.table-actions { flex-wrap: nowrap; }
.card-badges { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
.game-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 5px;
  background: #fff5e8;
  color: #97600c;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.game-chip.delta { background: #eaeff4; color: #2474b5; }
.game-table-icon { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; }
.game-icon-preview { width: 118px; height: 118px; }
.game-icon-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.footer-title { font-size: 10px; }
.footer-bottom { font-size: 10.5px; }
.page-hero p { font-size: 15px; }
.form-note { font-size: 12.5px; }
.field .hint { font-size: 12px; }
.avatar-editor-copy > span { font-size: 12px; }
.avatar-upload-row input[type=file] { font-size: 11.5px; }

.brand-copy strong {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- modern dashboard surface: rounded cards & softer controls ---------- */

.btn, .icon-btn, .toolbar, .search-field input, .toolbar select,
.field input, .field select, .field textarea, .input,
.gun-tile, .loadout-card, .editorial-card, .leaderboard, .step-card,
.cta-band, .gun-sidebar, .gun-banner, .modal-panel, .auth-panel,
.auth-benefit, .profile-cover, .settings-card, .summary-card,
.data-table-wrap, .image-upload-box, .avatar-editor, .toast,
.empty-state, .skeleton-card, .image-preview {
  border-radius: 14px;
}
.btn, .icon-btn { border-radius: 9px; clip-path: none; }
.modal-panel, .auth-panel, .gun-banner, .cta-band { clip-path: none; }
.blueprint { border-radius: 18px; clip-path: none; }
.blueprint::before { border-radius: 12px; }
.field input, .field select, .field textarea, .input,
.search-field input, .toolbar select { border-radius: 9px; }
.gun-tile, .loadout-card, .editorial-card, .leaderboard, .step-card,
.cta-band, .gun-sidebar, .gun-banner, .auth-panel, .profile-cover,
.settings-card, .summary-card, .data-table-wrap, .image-upload-box,
.modal-panel {
  box-shadow: 0 8px 28px rgba(17, 25, 31, .07);
}
.gun-tile:hover, .loadout-card:hover {
  box-shadow: 0 18px 42px rgba(17, 25, 31, .12);
}
.toolbar, .gun-sidebar, .gun-banner { box-shadow: 0 3px 16px rgba(17, 25, 31, .05); }
.gun-tile-media { border-radius: 13px 13px 0 0; }
.gun-tile-body { background: #fff; }
.code-peek, .mini-tag, .gun-chip, .role-badge, .status-pill { border-radius: 6px; }
.status-pill { border-radius: 99px; }
.avatar { border-radius: 50%; }
.data-table thead th:first-child { border-radius: 13px 0 0 0; }
.data-table thead th:last-child { border-radius: 0 13px 0 0; }
.modal-close { border-radius: 9px; }
.toast { border-radius: 12px; }
.image-preview, .table-gun img { border-radius: 8px; }
.hero .blueprint { overflow: hidden; }
.gun-banner { overflow: hidden; }
.auth-section .auth-panel { border-radius: 16px; }
.page-hero { border-bottom-color: #dfe4e8; }

/* 主导航按等宽列排列，中英文标签统一居中。 */
.header-inner { gap: 24px; }
.main-nav {
  flex: 1 1 auto;
  max-width: 610px;
  gap: 0;
  align-items: stretch;
}
.nav-link {
  flex: 1 1 0;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-size: 13.5px;
  text-align: center;
  white-space: nowrap;
}
.nav-link small {
  font-size: 7.5px;
  letter-spacing: .12em;
  text-align: center;
}
.nav-link::after {
  left: 50%;
  right: auto;
  width: 32px;
  transform: translateX(-50%) scaleX(0);
}
.nav-link:hover::after { transform: translateX(-50%) scaleX(.55); }
.nav-link.active::after { transform: translateX(-50%) scaleX(1); }
.header-actions { gap: 12px; }

@media (max-width: 1180px) {
  .header-inner { gap: 16px; }
  .main-nav { max-width: 520px; }
  .nav-link { padding: 0 4px; font-size: 12.5px; }
  .nav-link small { display: none; }
  .nav-link::after { width: 26px; }
  .brand-copy strong { font-size: 19px; }
  .brand-copy small { font-size: 8px; }
  .header-actions { gap: 9px; }
}

@media (max-width: 920px) {
  .main-nav { flex: none; max-width: none; width: 100%; }
  .nav-link { flex: none; padding: 13px 10px; font-size: 14px; }
  .nav-link::after { left: 50%; right: auto; width: 40px; }
}

/* ---------- 工具箱游戏板块 ---------- */

.game-switch {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
  padding: 6px;
  border: 1px solid #dde4e9;
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(17, 25, 31, .04);
}

.game-switch-item {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #545f68;
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.game-switch-item:hover {
  background: #f3f6f9;
}

.game-switch-item.active {
  border-color: #c8d5e0;
  background: #eaf6ff;
  color: #174f79;
}

.game-switch-icon {
  display: block;
  flex: none;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 8px;
  background: #ebf0f4;
}

.game-switch-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-switch-loading {
  padding: 15px 18px;
  color: #818b94;
  font-size: 12px;
}

.game-switch-item strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.game-switch-item small {
  display: block;
  margin-top: 2px;
  color: #818b94;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
}

.game-switch-item.active small {
  color: #586c7d;
}

@media (max-width: 640px) {
  .game-switch { gap: 5px; padding: 4px; }
  .game-switch-item { min-height: 52px; padding: 7px 9px; gap: 7px; }
  .game-switch-icon { width: 30px; height: 30px; }
  .game-switch-item strong { font-size: 12.5px; }
  .game-switch-item small { font-size: 8px; }
}

/* ---------- 社区 ---------- */

.community-wrap { padding-top: 26px; padding-bottom: 70px; }
.community-layout { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 24px; align-items: start; }
.community-main { min-width: 0; }

.community-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dde4e9;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(17, 25, 31, .04);
}
.community-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.community-filter {
  height: 33px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #5c6770;
  font-size: 12px;
  cursor: pointer;
}
.community-filter:hover { background: #f2f5f8; color: #22323f; }
.community-filter.active { border-color: #c8d5e0; background: #eaf6ff; color: #1d6fb7; font-weight: 700; }
.community-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.community-search {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 190px;
  height: 33px;
  padding: 0 10px;
  border: 1px solid #dbe8f4;
  border-radius: 8px;
  background: #fbfcfa;
}
.community-search svg { width: 14px; height: 14px; fill: none; stroke: #7f8b94; stroke-width: 1.8; }
.community-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #1e3a4d; font-size: 12px; }
.community-tools select { height: 33px; padding: 0 28px 0 10px; border: 1px solid #dbe8f4; border-radius: 8px; background: #fff; color: #545f68; font-size: 12px; }

.community-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 2px 9px;
  color: #828c95;
  font-family: var(--mono);
  font-size: 10.5px;
}
.community-meta-row b { color: #1e3a4d; font-size: 12px; }
.community-live { display: inline-flex; align-items: center; gap: 5px; }
.community-live i { width: 6px; height: 6px; border-radius: 50%; background: #3f9adf; box-shadow: 0 0 0 3px rgba(47, 142, 216, .1); }

.community-list { display: grid; gap: 11px; }
.community-post {
  padding: 20px 22px;
  border: 1px solid #dfeaf5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 20px rgba(17, 25, 31, .045);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.community-post:hover { border-color: #cad6df; box-shadow: 0 12px 30px rgba(17, 25, 31, .08); }
.community-post-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.community-author { display: flex; align-items: center; gap: 9px; min-width: 0; cursor: pointer; }
.community-comment { cursor: pointer; }
.community-author .avatar { flex: none; }
.community-author strong { display: block; color: #1e3a4d; font-size: 13px; font-weight: 700; }
.community-author .community-author-meta { display: block; margin-top: 2px; color: #7f95a5; font-size: 11px; }
.community-post-badges { display: flex; align-items: center; gap: 7px; flex: none; }
.community-game-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 5px;
  background: #edf6ff;
  color: #2f8ed8;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.community-game-badge.abyss { background: #fff4e7; color: #9a5b0a; }
.community-more-btn { border: 0; background: transparent; color: #b14a3a; font-size: 11px; cursor: pointer; }
.community-more-btn:hover { text-decoration: underline; }
.community-post-title { margin: 15px 0 7px; font-family: var(--display); font-size: 20px; line-height: 1.35; letter-spacing: -.02em; }
.community-post-title button { border: 0; background: transparent; color: #141b20; text-align: left; cursor: pointer; }
.community-post-title button:hover { color: #2474b5; }
.community-post-excerpt { display: -webkit-box; overflow: hidden; margin: 0; color: #5f6870; font-size: 13px; line-height: 1.75; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.community-post-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.post-image-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  width: min(100%, 510px);
  margin-top: 12px;
}
.post-image-grid.count-1 { width: 260px; grid-template-columns: 1fr; }
.post-image-grid.count-2 { width: 270px; grid-template-columns: repeat(2, 1fr); }
.post-image {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid #e2edf7;
  border-radius: 8px;
  background: #f2f5f7;
}
.post-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.post-image:hover img { transform: scale(1.035); }
.post-image-grid.count-1 .post-image { max-width: 260px; }
.community-post-foot { display: flex; align-items: center; gap: 15px; margin-top: 15px; padding-top: 12px; border-top: 1px solid #eaf3fa; }
.community-stat { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: #758089; font-size: 11.5px; cursor: pointer; }
.community-stat svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.community-stat.active { color: #2474b5; }
.community-stat.active svg { fill: rgba(29, 111, 183, .13); }
.community-stat.muted { cursor: default; }
.community-read { margin-left: auto; border: 0; background: transparent; color: #2474b5; font-size: 11.5px; cursor: pointer; }
.community-read:hover { text-decoration: underline; }

.community-side { display: grid; gap: 12px; position: sticky; top: 124px; }
.community-side-card { padding: 18px; border: 1px solid #dfeaf5; border-radius: 13px; background: #fff; box-shadow: 0 4px 18px rgba(17, 25, 31, .04); }
.side-card-head h3 { margin: 5px 0 10px; font-family: var(--display); font-size: 18px; }
.community-rules { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.community-rules li { position: relative; padding-left: 13px; color: #636d75; font-size: 11.5px; line-height: 1.55; }
.community-rules li::before { content: ""; position: absolute; left: 0; top: 7px; width: 4px; height: 4px; border-radius: 50%; background: #7892a8; }
.community-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.community-tag-cloud button { padding: 5px 8px; border: 1px solid #dfe5ea; border-radius: 6px; background: #fafbf8; color: #566470; font-size: 11px; cursor: pointer; }
.community-tag-cloud button:hover { border-color: #a7b9c7; color: #1f6fb8; background: #f3f9ff; }
.community-cta-card { background: #eff3f6; border-color: #d1dde6; }
.community-cta-card h3 { margin: 6px 0; font-family: var(--display); font-size: 19px; }
.community-cta-card p { margin: 0 0 13px; color: #606d78; font-size: 12px; line-height: 1.65; }

.community-detail-panel { width: min(820px, 100%); max-height: min(88vh, 850px); overflow-y: auto; }
.community-compose-panel { width: min(720px, 100%); }
.weibo-composer-author { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.weibo-composer-author .avatar { flex: none; }
.weibo-composer-author strong { display: block; color: #1e3a4d; font-size: 12.5px; }
.weibo-composer-author small { display: block; margin-top: 2px; color: #939ca3; font-size: 10px; }
.weibo-composer textarea {
  width: 100%;
  min-height: 142px;
  padding: 13px 14px;
  border: 1px solid #dbe8f4;
  border-radius: 10px;
  background: #fbfdff;
  color: #1e3a4d;
  font: inherit;
  font-size: 14px;
  line-height: 1.8;
  resize: vertical;
}
.weibo-composer textarea:focus { outline: 2px solid rgba(47,142,216,.16); border-color: #9cafbf; background: #fff; }
.weibo-image-grid { display: grid; grid-template-columns: repeat(6, 84px); gap: 6px; margin-top: 10px; }
.weibo-image-item { position: relative; display: block; width: 84px; height: 84px; overflow: hidden; border: 1px solid #dbe8f4; border-radius: 8px; background: #eff3f7; }
.weibo-image-item img { width: 100%; height: 100%; object-fit: cover; }
.weibo-image-item button { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: rgba(14, 20, 25,.6); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.weibo-composer-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 13px; padding-top: 12px; border-top: 1px solid #eaf3fa; }
.weibo-image-picker { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 9px; border: 1px solid #d9e8f5; border-radius: 7px; background: #fff; color: #566470; font-size: 11px; cursor: pointer; }
.weibo-image-picker:hover { border-color: #a7b9c7; color: #1d6fb7; background: #f3f6f9; }
.weibo-image-picker svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.weibo-composer-toolbar select,
.weibo-composer-toolbar input {
  height: 32px;
  padding: 0 9px;
  border: 1px solid #dbe8f4;
  border-radius: 7px;
  background: #fff;
  color: #545f68;
  font-size: 11px;
}
.weibo-composer-toolbar select { max-width: 130px; }
.weibo-composer-toolbar input { min-width: 90px; flex: 1; }
.weibo-compose-count { color: #939ca3; font-family: var(--mono); font-size: 9.5px; white-space: nowrap; }
.weibo-compose-note { margin-top: 8px; color: #939ca3; font-size: 9.5px; line-height: 1.5; }
.community-detail-top { display: flex; align-items: center; gap: 9px; }
.community-detail-kicker { color: #818b94; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; }
.community-detail-body h2 { margin: 14px 0 10px; font-family: var(--display); font-size: clamp(25px, 3vw, 34px); line-height: 1.25; letter-spacing: -.035em; }
.community-detail-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #818b94; font-size: 11px; }
.community-detail-meta .community-author strong { font-size: 12.5px; }
.community-detail-text { margin: 20px 0; color: #475057; font-size: 14px; line-height: 1.9; word-break: break-word; }
.community-detail-actions { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid #eaf3fa; border-bottom: 1px solid #eaf3fa; }
.community-delete-link { margin-left: auto; border: 0; background: transparent; color: #ae4a38; font-size: 11px; cursor: pointer; }
.community-comments { margin-top: 20px; }
.community-comments-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.community-comments-head h3 { margin: 0; font-family: var(--display); font-size: 19px; }
.community-comments-head span { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; background: #ebf0f4; color: #2f8ed8; font-size: 10px; }
.community-comment-thread { border-top: 1px solid #edf0f2; }
.community-comment { display: flex; align-items: flex-start; gap: 9px; padding: 11px 0; cursor: pointer; }
.community-comment.reply { padding: 8px 0; }
.community-comment-main { min-width: 0; flex: 1; }
.community-comment-replies { margin-left: 35px; padding-left: 12px; border-left: 2px solid #eaf3fa; }
.community-comment-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.community-comment-head .reply-to { color: #5e6d7a; font-size: 10.5px; }
.comment-reply-btn { margin-left: auto; padding: 0; border: 0; background: transparent; color: #707f8b; font-size: 10px; cursor: pointer; }
.comment-reply-btn:hover { color: #2474b5; text-decoration: underline; }
.community-reply-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; padding: 8px 10px; border: 1px solid #d5e5f2; border-radius: 7px; background: #f3f9ff; color: #505f6b; font-size: 11px; }
.community-reply-banner b { color: #1d6fb7; }
.community-reply-banner button { border: 0; background: transparent; color: #73818d; font-size: 10.5px; cursor: pointer; }
.community-reply-banner button:hover { color: #ae4a38; }
.community-comment .avatar { flex: none; }
.community-comment-head { display: flex; align-items: center; gap: 8px; }
.community-comment-head strong { color: #1e3a4d; font-size: 12px; }
.community-comment-head span { color: #939ca3; font-size: 10px; }
.community-comment p { margin: 4px 0 0; color: #545f68; font-size: 12.5px; line-height: 1.7; word-break: break-word; }
.community-comments-empty { padding: 12px 0; color: #919aa1; font-size: 12px; }
.community-comment-form { display: flex; align-items: flex-end; gap: 9px; margin-top: 14px; }
.community-comment-form textarea { flex: 1; min-height: 76px; padding: 10px; border: 1px solid #dbe8f4; border-radius: 8px; resize: vertical; font: inherit; font-size: 12.5px; }
.community-login-hint { margin-top: 12px; color: #818b94; font-size: 12px; }
.community-login-hint a { color: #2474b5; font-weight: 700; }
.community-detail-loading { padding: 40px 0; color: #818b94; text-align: center; font-size: 13px; }
.community-profile-panel { width: min(500px, 100%); }
.community-profile-card { padding: 8px 4px 2px; }
.community-profile-top { display: flex; align-items: center; gap: 13px; }
.community-profile-top h2 { margin: 0 0 4px; font-family: var(--display); font-size: 28px; line-height: 1.1; }
.community-profile-top .community-profile-handle { color: #818b94; font-family: var(--mono); font-size: 10px; }
.community-profile-bio { margin: 18px 0 15px; color: #545f68; font-size: 12.5px; line-height: 1.75; }
.community-profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 0; border-top: 1px solid #eaf3fa; border-bottom: 1px solid #eaf3fa; }
.community-profile-stats div { display: flex; flex-direction: column; gap: 3px; }
.community-profile-stats strong { color: #1e3a4d; font-family: var(--display); font-size: 21px; }
.community-profile-stats span { color: #818b94; font-size: 10px; }
.community-profile-actions { display: flex; gap: 8px; margin-top: 16px; }
.community-profile-actions .btn { min-height: 36px; }

@media (max-width: 980px) {
  .community-layout { grid-template-columns: 1fr; }
  .community-side { position: static; grid-template-columns: 1fr 1fr; }
  .community-cta-card { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .community-toolbar { align-items: stretch; }
  .community-tools { width: 100%; margin-left: 0; }
  .community-search { flex: 1; width: auto; }
  .community-filters { width: 100%; }
  .community-filter { flex: 1; padding: 0 6px; font-size: 11px; }
  .community-post { padding: 16px; }
  .community-post-title { font-size: 18px; }
  .post-image-grid, .post-image-grid.count-1, .post-image-grid.count-2 { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .weibo-image-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .weibo-image-item { width: auto; height: auto; aspect-ratio: 1 / 1; }
  .weibo-composer-toolbar input { flex-basis: 100%; }
  .community-post-foot { gap: 10px; flex-wrap: wrap; }
  .community-read { margin-left: 0; }
  .community-side { grid-template-columns: 1fr; }
  .community-cta-card { grid-column: auto; }
  .community-comment-form { flex-direction: column; align-items: stretch; }
  .community-detail-meta { flex-direction: column; align-items: flex-start; }
}

/* ---------- 首页影像带 / 轻动效 ---------- */

.home-visual-band {
  padding: 22px 0 48px;
  border-bottom: 1px solid #e4eef7;
  background: #f6fbff;
}
.visual-band-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.visual-band-head h2 { margin: 7px 0 0; font-family: var(--display); font-size: clamp(24px, 3vw, 38px); line-height: 1; letter-spacing: -.035em; }
.visual-band-head h2 em { color: var(--lime); font-style: normal; }
.visual-band-head p { max-width: 300px; margin: 0 0 2px; color: #717d86; font-size: 11px; line-height: 1.65; text-align: right; }
.visual-strip { display: grid; grid-template-columns: 1.55fr 1fr 1fr; gap: 10px; }
.visual-card {
  position: relative;
  display: block;
  min-height: 228px;
  overflow: hidden;
  border: 1px solid #d5e5f2;
  border-radius: 15px;
  background: #161e24;
  isolation: isolate;
}
.visual-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(8, 12, 15,.83), rgba(8, 12, 15,.03) 62%);
  pointer-events: none;
}
.visual-card-hero img { display: block; width: 100%; height: 100%; min-height: 228px; object-fit: cover; transition: transform .55s cubic-bezier(.2,.7,.2,1); }
.visual-card:hover img { transform: scale(1.045); }
.visual-tag {
  position: absolute;
  top: 15px;
  left: 16px;
  z-index: 2;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 4px;
  background: rgba(6, 9, 12,.35);
  color: #eaf6ff;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .12em;
}
.visual-copy { position: absolute; right: 16px; bottom: 15px; left: 16px; z-index: 2; color: #fff; }
.visual-copy strong { display: block; font-family: var(--display); font-size: 22px; line-height: 1.1; }
.visual-copy small { display: block; margin-top: 5px; color: rgba(234, 246, 255,.65); font-family: var(--mono); font-size: 8px; letter-spacing: .12em; }
.visual-card-game { background: radial-gradient(circle at 72% 35%, rgba(63,154,223,.32), transparent 52%), linear-gradient(145deg, #1b242c, #0f1418); }
.visual-card-game.alt { background: radial-gradient(circle at 68% 35%, rgba(132,115,79,.3), transparent 52%), linear-gradient(145deg, #29251b, #111417); }
.visual-logo {
  position: absolute;
  top: 19px;
  left: 50%;
  width: 58%;
  height: 58%;
  object-fit: contain;
  opacity: .9;
  transform: translateX(-50%);
  transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .3s ease;
}
.visual-card-game:hover .visual-logo { opacity: 1; transform: translateX(-50%) scale(1.045); }
.hero-float.one { animation: floatSoft 6.5s ease-in-out infinite; }
.hero-float.two { animation: floatSoft 7.5s ease-in-out -2.2s infinite; }
@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@media (max-width: 900px) {
  .visual-strip { grid-template-columns: 1fr 1fr; }
  .visual-card-hero { grid-column: 1 / -1; }
  .visual-band-head { align-items: flex-start; flex-direction: column; }
  .visual-band-head p { text-align: left; }
}
@media (max-width: 600px) {
  .visual-strip { grid-template-columns: 1fr; }
  .visual-card, .visual-card-hero img { min-height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-float.one, .hero-float.two { animation: none; }
  .visual-card img, .visual-logo { transition: none; }
}

/* 影像带重做：深色杂志拼贴 */
.home-visual-band {
  padding: 34px 0 54px;
  border-top: 1px solid #1b232a;
  border-bottom: 1px solid #1b232a;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 91, 157, .13), transparent 28%),
    radial-gradient(circle at 10% 84%, rgba(126, 210, 255, .10), transparent 30%),
    #0a0e12;
  color: #e2e9ef;
}
.home-visual-band::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .24;
  background: repeating-linear-gradient(0deg, transparent 0 47px, rgba(207, 234, 255, .05) 47px 48px);
  animation: bandDrift 18s linear infinite;
}
.home-visual-band { position: relative; overflow: hidden; }
.home-visual-band .container { position: relative; z-index: 1; }
.home-visual-band::after {
  content: "";
  position: absolute;
  top: -150px;
  left: 35%;
  width: 520px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 82, 160, .14), transparent 68%);
  filter: blur(35px);
  animation: auraDrift 15s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes bandDrift {
  from { background-position: 0 0; }
  to { background-position: 0 196px; }
}
@keyframes auraDrift {
  from { transform: translate(-60px, 0) scale(.9); opacity: .55; }
  to { transform: translate(160px, 45px) scale(1.15); opacity: 1; }
}
.visual-motion-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px solid rgba(207, 234, 255, .13);
  color: #8695a1;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .1em;
}
.visual-motion-live { display: inline-flex; align-items: center; gap: 5px; flex: none; color: #7ed2ff; white-space: nowrap; }
.visual-motion-live i { width: 4px; height: 4px; border-radius: 50%; background: #ff5da8; box-shadow: 0 0 8px rgba(255,93,168,.8); animation: livePulse 2.6s ease-in-out infinite; }
.visual-motion-track { flex: 1; overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.visual-motion-track div { display: inline-block; padding-left: 100%; animation: motionTicker 26s linear infinite; }
.visual-motion-track b { margin: 0 6px; color: #7ed2ff; font-weight: 400; }
.visual-motion-index { flex: none; color: rgba(234, 246, 255, .45); }
@keyframes motionTicker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.visual-band-head { align-items: flex-end; margin-bottom: 18px; }
.visual-band-head .eyebrow { color: #7fc0ee; }
.visual-band-head h2 { color: #eaf6ff; }
.visual-band-head h2 em { color: #7ed2ff; }
.visual-band-head p { color: #87949f; }
.visual-mosaic { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(255px, .85fr); gap: 10px; min-height: 440px; }
.visual-side { display: grid; grid-template-rows: 1fr 1fr; gap: 10px; min-height: 0; }
.visual-card {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(207, 234, 255, .18);
  border-radius: 16px;
  background: #10161b;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .2);
  isolation: isolate;
}
.visual-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(5, 10, 7, .9), rgba(5, 10, 7, .08) 62%);
  pointer-events: none;
}
.visual-card::before {
  content: "";
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: -55%;
  z-index: 1;
  width: 32%;
  background: linear-gradient(90deg, transparent, rgba(234, 246, 255, .16), transparent);
  transform: rotate(16deg);
  animation: visualSweep 8s ease-in-out infinite;
  pointer-events: none;
}
.visual-card img,
.visual-card video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  transform: scale(1.045) translate(var(--par-x, 0), var(--par-y, 0));
  will-change: transform;
  transition: transform .65s cubic-bezier(.2, .7, .2, 1), filter .4s ease;
}
.visual-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.visual-media img,
.visual-media video { position: absolute; inset: 0; }
/* 后台媒体预览：没配置时显示文字占位 */
.site-media-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 88px;
  color: #9bb0c2;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
}
.visual-video { pointer-events: none; }
.visual-live-chip {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 2;
  color: #7ed2ff;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .12em;
  text-shadow: 0 0 12px rgba(126, 210, 255,.55);
  animation: livePulse 2.6s ease-in-out infinite;
}
.visual-live-chip::first-letter { color: #ff6aa8; }
.visual-feature { min-height: 440px; box-shadow: inset 80px 0 100px rgba(3, 9, 6, .22), 0 16px 40px rgba(0, 0, 0, .2); }
.visual-feature > img {
  position: absolute;
  inset: 0;
  width: 112%;
  max-width: none;
  margin-left: -7%;
  object-position: 68% center;
}
.visual-city img, .visual-eye img { position: absolute; inset: 0; }
.visual-card:hover { border-color: rgba(126, 210, 255, .5); }
.visual-card:hover img,
.visual-card:hover video { transform: scale(1.065) translate(var(--par-x, 0), var(--par-y, 0)); filter: saturate(1.08); }
.visual-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: .16;
  background-image: radial-gradient(rgba(255,255,255,.5) .55px, transparent .55px);
  background-size: 4px 4px;
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.visual-tag, .visual-mini-tag {
  position: absolute;
  top: 15px;
  left: 16px;
  z-index: 2;
  padding: 5px 8px;
  border: 1px solid rgba(234, 246, 255, .24);
  border-radius: 4px;
  background: rgba(6, 9, 11, .38);
  color: #cfeaff;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .13em;
}
.visual-mini-tag { top: auto; right: 14px; bottom: 14px; left: auto; border-color: rgba(255,255,255,.2); color: rgba(255,255,255,.62); font-size: 7px; }
.visual-index {
  position: absolute;
  top: 7px;
  right: 18px;
  z-index: 2;
  color: transparent;
  -webkit-text-stroke: 1px rgba(234, 246, 255, .23);
  font-family: var(--display);
  font-size: clamp(90px, 12vw, 170px);
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}
.visual-copy { position: absolute; right: 20px; bottom: 19px; left: 20px; z-index: 2; color: #fff; }
.visual-kicker { display: block; margin-bottom: 6px; color: #7ed2ff; font-family: var(--mono); font-size: 8px; letter-spacing: .16em; }
.visual-copy strong { display: block; font-family: var(--display); font-size: 25px; line-height: .98; letter-spacing: -.025em; }
.visual-feature .visual-copy strong { font-size: clamp(34px, 4vw, 52px); }
.visual-copy small { display: block; margin-top: 8px; color: rgba(234, 246, 255, .65); font-size: 10px; letter-spacing: .02em; }
.visual-feature .visual-copy { right: 190px; }
.visual-float-chip {
  position: absolute;
  top: 52px;
  right: 18px;
  z-index: 2;
  padding: 7px 9px;
  border: 1px solid rgba(126, 210, 255,.35);
  border-radius: 4px;
  background: rgba(10, 15, 19, .55);
  color: #cfeaff;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .08em;
}
.visual-arrow {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  color: rgba(234, 246, 255, .7);
  font-size: 10px;
}
.visual-arrow b { display: inline-block; margin-left: 5px; color: #7ed2ff; font-size: 15px; transition: transform .25s ease; }
.visual-card:hover .visual-arrow b { transform: translateX(4px); }
.visual-card-number {
  position: absolute;
  top: 50%;
  right: 16px;
  z-index: 2;
  color: rgba(255, 255, 255, .26);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
}
.visual-city .visual-copy, .visual-eye .visual-copy { right: 50px; bottom: 14px; left: 15px; }
.visual-city .visual-copy strong, .visual-eye .visual-copy strong { font-size: 19px; }
.visual-city .visual-copy small, .visual-eye .visual-copy small { margin-top: 4px; font-size: 9px; }
.visual-city::after { background: linear-gradient(0deg, rgba(4, 16, 14, .88), rgba(4, 16, 14, .03) 68%); }
.visual-eye::after { background: linear-gradient(0deg, rgba(12, 6, 18, .9), rgba(12, 6, 18, .04) 68%); }
.hero-float.one { animation: floatSoft 6.5s ease-in-out infinite; }
.hero-float.two { animation: floatSoft 7.5s ease-in-out -2.2s infinite; }
@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes visualSweep {
  0%, 18% { left: -55%; opacity: 0; }
  32% { opacity: 1; }
  62%, 100% { left: 135%; opacity: 0; }
}
@keyframes livePulse {
  0%, 100% { opacity: .58; }
  50% { opacity: 1; }
}
@media (max-width: 900px) {
  .visual-mosaic { grid-template-columns: 1fr; min-height: 0; }
  .visual-feature { min-height: 340px; }
  .visual-side { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .visual-side .visual-card { min-height: 220px; }
  .visual-band-head { align-items: flex-start; flex-direction: column; }
  .visual-band-head p { text-align: left; }
}
@media (max-width: 600px) {
  .visual-side { grid-template-columns: 1fr; }
  .visual-side .visual-card { min-height: 210px; }
  .visual-feature { min-height: 300px; }
  .visual-feature .visual-copy { right: 20px; }
  .visual-feature .visual-copy strong { font-size: 34px; }
  .visual-index { font-size: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-float.one, .hero-float.two, .visual-card::before, .visual-live-chip,
  .home-visual-band::after, .visual-motion-track div, .visual-motion-live i { animation: none; }
  .visual-card img, .visual-card video { transition: none; }
}

/* ---------- 消息中心 ---------- */

.messages-head { padding: 34px 0 26px; border-bottom: 1px solid #e2edf7; background: #fbfdff; }
.messages-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-top: 10px; }
.messages-head h1 { margin: 0; font-family: var(--display); font-size: clamp(30px, 4vw, 46px); line-height: 1; letter-spacing: -.04em; }
.messages-head h1 em { color: var(--lime); font-style: normal; }
.messages-head p { margin: 9px 0 0; color: #5c6770; font-size: 13px; }
.messages-head-note { display: inline-flex; align-items: center; gap: 6px; padding-bottom: 4px; color: #7e8891; font-family: var(--mono); font-size: 10px; white-space: nowrap; }
.messages-head-note i { width: 6px; height: 6px; border-radius: 50%; background: #2f8ed8; box-shadow: 0 0 0 3px rgba(47,142,216,.1); }
.messages-wrap { padding-top: 22px; padding-bottom: 60px; }

.messages-shell {
  display: grid;
  grid-template-columns: 396px minmax(0, 1fr);
  min-height: 680px;
  overflow: hidden;
  border: 1px solid #dae2e8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(17, 25, 31, .08);
}
.messages-side { display: flex; min-height: 0; flex-direction: column; border-right: 1px solid #eaf3fa; background: #fbfdff; }
/* 分类栏：两行三列的大卡片，取代原来一行挤 6 个的小图标 */
.message-categories { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 14px 12px; border-bottom: 1px solid #eaf3fa; background: #f7fafe; }
.message-category { position: relative; display: flex; flex: 1 1 calc(33.333% - 6px); min-width: 0; flex-direction: column; align-items: center; gap: 6px; padding: 9px 6px 8px; border: 1px solid #e6eff8; border-radius: 13px; background: #fff; color: #6a747d; font-size: 12px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease; }
.message-category[hidden] { display: none; }
.message-category:hover { border-color: #c9e2f7; background: #fff; color: #1d6fb7; transform: translateY(-1px); }
.message-category-badge { position: absolute; top: 6px; right: 8px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border: 2px solid #fff; border-radius: 99px; background: #e33d3d; color: #fff; font-size: 10px; font-weight: 800; line-height: 1; }
.message-category-badge[hidden] { display: none; }
.message-category.active { border-color: #b9d9f4; background: #eef7ff; color: #1d6fb7; box-shadow: 0 8px 18px rgba(47, 142, 216, .14); }
.message-category-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #eef4ff; color: #4f7cff; transition: background .18s ease, color .18s ease; }
.message-category:nth-child(2) .message-category-icon { background: #edf7ff; color: #2b9bd6; }
.message-category:nth-child(3) .message-category-icon { background: #f3efff; color: #7a5bd6; }
.message-category:nth-child(4) .message-category-icon { background: #fff1f0; color: #d45a4a; }
.message-category:nth-child(5) .message-category-icon { background: #eefaf3; color: #2a9668; }
.message-category:nth-child(6) .message-category-icon { background: #fff6e8; color: #b87a1f; }
.message-category.active .message-category-icon { background: #2f8ed8; color: #fff; }
.message-category-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.message-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 11px; color: #828c95; font-size: 11px; }
.message-list-head strong { color: #1e3a4d; font-size: 14.5px; }
.message-list-head span { flex: 1; text-align: right; }
.message-select-toggle { padding: 4px 2px; border: 0; background: transparent; color: #2474b5; font-size: 12px; font-weight: 700; cursor: pointer; }
.message-select-toggle:hover { text-decoration: underline; }
.message-select-toggle.active { color: #a34a38; }
.message-list { flex: 1; min-height: 0; overflow-y: auto; }
.conversation-check { display: grid; place-items: center; flex: none; width: 25px; height: 25px; }
.conversation-check input { width: 15px; height: 15px; accent-color: #2f8ed8; cursor: pointer; }
.conversation-row.selected { background: #eaf6ff; }
.message-batch-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid #dfeaf5; background: #f3f6f9; }
.message-batch-bar span { flex: 1; color: #566470; font-size: 11px; }
.message-batch-bar b { color: #1d6fb7; }
.message-batch-bar .btn { min-height: 31px; font-size: 11px; }
.message-list-empty { padding: 38px 18px; color: #9199a0; font-size: 11.5px; line-height: 1.7; text-align: center; }
.message-list-empty span { font-size: 10.5px; }
.message-list-loading { padding: 30px 16px; color: #9199a0; font-size: 11px; text-align: center; }

.conversation-row { display: flex; align-items: center; gap: 11px; width: 100%; padding: 13px 17px; border: 0; border-bottom: 1px solid #eef5fb; background: transparent; text-align: left; cursor: pointer; transition: background .15s ease; }
.conversation-row:hover { background: #f6faff; }
.conversation-row.unread { background: #f7faff; }
.conversation-row .avatar { flex: none; width: 42px; height: 42px; font-size: 15px; }
.conversation-copy { min-width: 0; flex: 1; }
.conversation-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.conversation-top strong { overflow: hidden; color: #1e3a4d; font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.conversation-top small { flex: none; color: #99a2a9; font-size: 10.5px; }
.conversation-last { display: block; overflow: hidden; margin-top: 4px; color: #748695; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.conversation-unread { display: grid; flex: none; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #e33d3d; color: #fff; font-size: 10px; font-weight: 800; line-height: 1; }
.conversation-action { flex: none; color: #2474b5; font-size: 11px; font-weight: 700; }
.conversation-action-group { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.conversation-unfollow { border: 0; padding: 0; background: transparent; color: #8a949c; font-size: 9px; line-height: 1.2; cursor: pointer; }
.conversation-unfollow:hover { color: #c04b4b; }
.conversation-unfollow:disabled { opacity: .55; cursor: default; }
.notification-row-excerpt { display: block; overflow: hidden; margin-top: 2px; color: #818b94; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }

.chat-panel { display: flex; min-width: 0; min-height: 680px; flex-direction: column; background: #fff; }
.chat-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 48px 40px; text-align: center; }
.chat-empty-mark { color: #e6edf3; font-family: var(--display); font-size: 60px; font-weight: 800; letter-spacing: -.06em; }
.chat-empty h2 { margin: 8px 0; font-family: var(--display); font-size: 26px; }
.chat-empty p { max-width: 380px; margin: 0; color: #818b94; font-size: 12.5px; line-height: 1.75; }
.chat-empty-hints { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 580px; margin-top: 26px; }
.chat-empty-hint { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid #e4eef7; border-radius: 99px; background: #f8fbfe; color: #5b6a76; font-size: 11.5px; line-height: 1.4; }
.chat-empty-hint i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #e6f1fb; color: #2474b5; font-size: 9.5px; font-style: normal; font-weight: 800; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #eaf3fa; }
.chat-head .avatar { flex: none; }
.chat-peer { min-width: 0; flex: 1; }
.chat-peer strong { display: block; color: #1e3a4d; font-size: 13px; }
.chat-peer span { display: block; margin-top: 2px; color: #818b94; font-size: 10.5px; }
.chat-follow { flex: none; min-height: 30px; font-size: 10.5px; }
.chat-close { display: grid; flex: none; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: #f1f6fb; color: #5d7280; font-size: 20px; font-weight: 400; line-height: 1; cursor: pointer; }
.chat-close:hover { background: #e5eef7; color: #1e3a4d; }
.chat-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; background: #fbfdff; }
.chat-message { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.chat-message.mine { justify-content: flex-end; }
.chat-message .avatar { flex: none; }
.chat-bubble { max-width: min(74%, 560px); padding: 10px 14px; border: 1px solid #e4e9ed; border-radius: 12px 12px 12px 3px; background: #fff; color: #38424a; font-size: 13px; line-height: 1.65; word-break: break-word; }
.chat-message.mine .chat-bubble { border-color: #ccd9e4; border-radius: 12px 12px 3px 12px; background: #eaf6ff; color: #174f79; }
.chat-bubble small { display: block; margin-top: 4px; color: #939ca3; font-size: 9px; text-align: right; }
.chat-start { padding: 40px 20px; color: #818b94; text-align: center; }
.chat-start strong { display: block; color: #475057; font-family: var(--display); font-size: 20px; }
.chat-start p { margin: 6px 0 0; font-size: 11.5px; line-height: 1.7; }
.chat-composer { padding: 13px 18px 15px; border-top: 1px solid #eaf3fa; background: #fff; }
.chat-composer textarea { width: 100%; min-height: 58px; max-height: 150px; padding: 10px 11px; border: 1px solid #dbe8f4; border-radius: 9px; resize: vertical; font: inherit; font-size: 13px; }
.chat-composer .btn { margin-top: 8px; float: right; }
.chat-rule { clear: both; margin: 6px 0 0; color: #939ca3; font-size: 9.5px; line-height: 1.5; }

.notification-detail { padding: 26px 30px; overflow-y: auto; }
.notification-detail-head { display: flex; align-items: center; gap: 9px; }
.notification-detail-head > div { min-width: 0; flex: 1; }
.notification-detail-close { margin-left: auto; }
.notification-detail-head strong { display: block; font-size: 12.5px; }
.notification-detail-head span { display: block; margin-top: 2px; color: #939ca3; font-size: 10px; }
.notification-detail h2 { margin: 20px 0 7px; font-family: var(--display); font-size: 25px; }
.notification-detail-title { margin: 0; color: #2474b5; font-size: 13px; font-weight: 700; }
.notification-detail-excerpt { margin: 12px 0 20px; padding: 13px; border-left: 3px solid #ccd9e4; background: #fbfdff; color: #545f68; font-size: 12.5px; line-height: 1.8; }
.messages-guest { padding: 60px 0; }

@media (max-width: 860px) {
  .messages-shell { grid-template-columns: 1fr; min-height: 580px; }
  .messages-side { border-right: 0; }
  .chat-panel { display: none; min-height: 580px; }
  .chat-panel.chat-open { display: flex; }
  .messages-side { display: flex; }
  .messages-shell.chat-mode .messages-side { display: none; }
  .chat-back { display: block; }
  .messages-head-row { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 640px) {
  .messages-head { padding: 24px 0 18px; }
  .messages-head h1 { font-size: 30px; }
  .message-category-icon { width: 30px; height: 30px; }
  .message-category { font-size: 9.5px; }
  .chat-bubble { max-width: 84%; }
}

/* ---------- 工具箱 · 官方改枪码 ---------- */
body.official-open { overflow: hidden; }
.official-entry {
  display: flex;
  align-items: center;
  gap: 9px;
  width: calc(100% - 24px);
  margin: 0 12px 10px;
  padding: 10px;
  border: 1px solid #bfddf2;
  border-radius: 9px;
  background: linear-gradient(135deg, #edf8ff, #ffffff);
  color: #1d4e70;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.official-entry:hover { border-color: #79bce8; box-shadow: 0 7px 18px rgba(47, 142, 216, .13); transform: translateY(-1px); }
.official-entry[hidden] { display: none; }
.official-entry-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #2f8ed8;
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}
.official-entry-copy { min-width: 0; flex: 1; }
.official-entry-copy strong { display: block; font-size: 12px; }
.official-entry-copy small { display: block; margin-top: 2px; overflow: hidden; color: #6d879a; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.official-entry-arrow { flex: none; color: #2f8ed8; font-size: 15px; }

.modal.official-modal { width: min(1180px, calc(100vw - 28px)); max-height: calc(100vh - 24px); }
.official-modal .official-panel {
  display: flex;
  width: 100%;
  max-height: min(91vh, 940px);
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-color: #cfe3f4;
  background: #fff;
}
.official-head { flex: none; padding: 26px 32px 18px; border-bottom: 1px solid #e5f0f9; background: linear-gradient(120deg, #f1f9ff, #ffffff 64%); }
.official-head .eyebrow { color: #2f8ed8; font-size: 10px; }
.official-head h2 { margin: 9px 0 7px; font-family: var(--display); font-size: clamp(26px, 3vw, 36px); line-height: 1.05; color: #173d58; }
.official-head p { margin: 0; color: #708a9d; font-size: 12.5px; }
.official-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; flex: none; padding: 13px 24px; border-bottom: 1px solid #e8f1f8; background: #fbfdff; }
.official-modes { display: flex; flex-wrap: wrap; gap: 6px; margin-right: auto; }
.official-mode-tab { height: 34px; padding: 0 11px; border: 1px solid #d8e8f5; border-radius: 6px; background: #fff; color: #637d8e; font-size: 12px; cursor: pointer; }
.official-mode-tab b { margin-left: 3px; color: #8da5b5; font-family: var(--mono); font-size: 9px; font-weight: 400; }
.official-mode-tab.active { border-color: #86c5ed; background: #eaf6ff; color: #1f70ae; }
.official-mode-tab.active b { color: #2f8ed8; }
.official-toolbar input,
.official-toolbar select { height: 34px; padding: 0 10px; border: 1px solid #dbe8f4; border-radius: 6px; background: #fff; color: #4e6879; font: inherit; font-size: 12px; }
.official-toolbar input { width: 260px; }
.official-toolbar input:focus { outline: 2px solid rgba(47,142,216,.14); border-color: #9ccdef; }
.official-result { display: flex; justify-content: space-between; flex: none; padding: 11px 26px 0; color: #8299a9; font-size: 11.5px; }
.official-result b { color: #2f8ed8; font-family: var(--mono); font-weight: 500; }
.official-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 24px 16px; scrollbar-gutter: stable; }
.official-loading { grid-column: 1 / -1; padding: 50px 20px; color: #8299a9; font-size: 13px; text-align: center; }
.official-card { min-width: 0; padding: 17px; border: 1px solid #dceaf5; border-radius: 11px; background: #fff; transition: border-color .2s ease, box-shadow .2s ease; }
.official-card:hover { border-color: #a8d3ee; box-shadow: 0 7px 20px rgba(47, 142, 216, .08); }
.official-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.official-mode { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 4px; background: #eaf6ff; color: #287bb8; font-size: 11px; font-weight: 700; }
.official-mode.operator { background: #eaf5ff; color: #2f80c2; }
.official-mode.bd { background: #f1f0ff; color: #6259b6; }
.official-value { color: #7b93a5; font-family: var(--mono); font-size: 10px; }
.official-card h3 { margin: 12px 0 5px; overflow: hidden; color: #173a53; font-family: var(--display); font-size: 21px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.official-gun { margin: 0; overflow: hidden; color: #6b8394; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.official-gun span { margin-left: 7px; color: #95a8b6; font-size: 10.5px; }
.official-code { display: flex; align-items: center; gap: 7px; margin-top: 11px; padding: 8px 9px; border: 1px dashed #cfe4f4; border-radius: 6px; background: #f8fcff; }
.official-code code { min-width: 0; flex: 1; overflow: hidden; color: #426f8e; font-family: var(--mono); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.official-code button { flex: none; padding: 4px 9px; border: 1px solid #b9d9ef; border-radius: 4px; background: #fff; color: #287bb8; font-size: 11px; cursor: pointer; }
.official-code button:hover { background: #eaf6ff; }
.official-props { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 10px; }
.official-prop { display: flex; align-items: baseline; gap: 4px; min-width: 0; padding: 5px 6px; border-radius: 4px; background: #f8fbfe; }
.official-prop small { overflow: hidden; color: #8ba0af; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.official-prop b { color: #355f78; font-family: var(--mono); font-size: 12px; font-weight: 500; }
.official-prop i { font-family: var(--mono); font-size: 9px; font-style: normal; }
.official-prop i.up { color: #2f8ed8; }
.official-prop i.down { color: #c35b4e; }
.official-card-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #edf4fa; color: #8ba0af; font-size: 10px; }
.official-card-foot span:first-child { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.official-empty { padding: 50px 20px; color: #8299a9; font-size: 13px; text-align: center; }
.official-pager { display: flex; align-items: center; justify-content: center; gap: 12px; flex: none; padding: 11px 20px 17px; }
.official-pager .btn { min-height: 34px; font-size: 11.5px; }
.official-page-now { color: #7890a1; font-family: var(--mono); font-size: 11px; }

@media (max-width: 760px) {
  .official-panel { width: calc(100vw - 16px); max-height: 94vh; }
  .official-head { padding: 20px 18px 14px; }
  .official-toolbar { padding: 10px 14px; }
  .official-toolbar input { width: 100%; }
  .official-modes { width: 100%; margin-right: 0; }
  .official-grid { grid-template-columns: 1fr; padding: 8px 12px 12px; }
  .official-props { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 首页 · 玩家社区浅蓝主题 ---------- */
body[data-page="home"] {
  --lime: #2f8ed8;
  --lime-2: #1d6fb7;
  --lime-soft: #eef7ff;
  --line: #dbe9f6;
  --line-strong: #a8c9e5;
  --cyan: #147e9e;
  --panel-2: #f7fbff;
  --panel-3: #edf6fd;
  background:
    radial-gradient(900px 540px at 88% -8%, rgba(74, 159, 236, .11), transparent 64%),
    radial-gradient(700px 460px at -8% 28%, rgba(116, 197, 244, .07), transparent 66%),
    #ffffff;
}
body[data-page="home"] ::selection { background: #2f8ed8; }
body[data-page="home"] .site-header { border-bottom-color: #e1edf8; background: rgba(255,255,255,.96); }
body[data-page="home"] .header-top { background: #f7fbff; border-bottom-color: #e3eef8; }
body[data-page="home"] .hero {
  background:
    radial-gradient(circle at 74% 26%, rgba(84, 170, 240, .13), transparent 38%),
    linear-gradient(180deg, #f7fbff 0%, #ffffff 72%);
  border-bottom-color: #e1edf8;
}
body[data-page="home"] .hero h1 em { color: #2f8ed8; }
body[data-page="home"] .hero h1 em::after { background: #8ecdf7; }
body[data-page="home"] .hero-lede strong { color: #1e6faf; border-bottom-color: #a9d8f5; }
body[data-page="home"] .hero-stat { border-right-color: #dceaf6; }
body[data-page="home"] .hero-stat strong { color: #174f79; }
body[data-page="home"] .hero-stat span { color: #7f96a8; }
body[data-page="home"] .blueprint {
  border-color: #bfddf2;
  background:
    linear-gradient(155deg, rgba(70, 158, 231, .11), transparent 42%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(63, 137, 192, .075) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(63, 137, 192, .075) 39px 40px),
    #f8fcff;
  box-shadow: 0 22px 55px rgba(34, 91, 135, .12);
}
body[data-page="home"] .blueprint::before { border-color: rgba(47, 142, 216, .18); }
body[data-page="home"] .blueprint-top { color: #6f8ca1; }
body[data-page="home"] .blueprint-top strong { color: #2f8ed8; }
body[data-page="home"] .blueprint-badge { color: #2f8ed8; border-color: #b9dbef; background: rgba(247,252,255,.74); }
body[data-page="home"] .blueprint-badge i { background: #2f8ed8; }
body[data-page="home"] .blueprint-caption strong { color: #174f79; }
body[data-page="home"] .blueprint-caption span { color: #71899b; }
body[data-page="home"] .hero-float { border-color: #d2e6f5; background: rgba(255,255,255,.94); box-shadow: 0 18px 40px rgba(31, 91, 134, .12); }
body[data-page="home"] .float-icon { color: #2f8ed8; }
body[data-page="home"] .hero-float strong { color: #21465f; }
body[data-page="home"] .hero-float span { color: #7b93a5; }
body[data-page="home"] .ticker { background: #f7fbff; border-color: #dceaf6; }
body[data-page="home"] .ticker-item { color: #71879a; }
body[data-page="home"] .ticker-item strong { color: #2f8ed8; }
body[data-page="home"] .ticker-item::after { color: #bed3e3; }
body[data-page="home"] .section-head .eyebrow { color: #2f8ed8; }
body[data-page="home"] .section-head h2 em { color: #2f8ed8; }
body[data-page="home"] .section-head .section-link { color: #2b83c6; }
body[data-page="home"] .gun-tile,
body[data-page="home"] .loadout-card { border-color: #dceaf6; }
body[data-page="home"] .gun-tile:hover,
body[data-page="home"] .loadout-card:hover { border-color: #a9d3ed; }
body[data-page="home"] .editorial-card {
  border-color: #cfe4f4;
  background: linear-gradient(135deg, #f2f9ff 0%, #ffffff 64%);
}
body[data-page="home"] .editorial-card::after { color: rgba(68, 139, 194, .075); }
body[data-page="home"] .editorial-card h3 { color: #193f58; }
body[data-page="home"] .editorial-card p { color: #566d7d; }
body[data-page="home"] .editorial-meta { color: #7e94a5; }
body[data-page="home"] .leaderboard { border-color: #dceaf6; background: #fbfdff; }
body[data-page="home"] .leaderboard-head { border-bottom-color: #e4eff8; }
body[data-page="home"] .step-card { border-color: #dceaf6; background: #fbfdff; }
body[data-page="home"] .step-card::before { color: rgba(56, 139, 197, .12); }
body[data-page="home"] .step-card h3 { color: #193f58; }
body[data-page="home"] .step-card p { color: #5e7381; }
body[data-page="home"] .cta-band {
  border-color: #cfe4f4;
  background:
    linear-gradient(100deg, rgba(227, 244, 255, .9), rgba(255,255,255,.96) 66%),
    #ffffff;
}
body[data-page="home"] .cta-band::before { background: repeating-linear-gradient(90deg, transparent 0 47px, rgba(47, 142, 216, .045) 47px 48px); }
body[data-page="home"] .cta-band h2 { color: #193f58; }
body[data-page="home"] .cta-band p { color: #5e7381; }
body[data-page="home"] .footer { background: #f7fbff; border-top-color: #e1edf8; }
body[data-page="home"] .home-visual-band {
  background:
    radial-gradient(circle at 82% 18%, rgba(66, 156, 235, .2), transparent 30%),
    radial-gradient(circle at 10% 84%, rgba(64, 206, 225, .11), transparent 32%),
    #07131e;
  border-top-color: #122535;
  border-bottom-color: #122535;
}
body[data-page="home"] .home-visual-band::before { background: repeating-linear-gradient(0deg, transparent 0 47px, rgba(126, 198, 245, .055) 47px 48px); }
body[data-page="home"] .home-visual-band::after { background: radial-gradient(circle, rgba(72, 160, 240, .2), transparent 68%); }
body[data-page="home"] .visual-band-head .eyebrow { color: #75c6ff; }
body[data-page="home"] .visual-band-head h2 em { color: #7ed2ff; }
body[data-page="home"] .visual-band-head p { color: #8ca5b7; }
body[data-page="home"] .visual-card { border-color: rgba(146, 206, 246, .23); background: #0a1c2a; }
body[data-page="home"] .visual-card:hover { border-color: rgba(126, 210, 255, .6); }
body[data-page="home"] .visual-card::before { background: linear-gradient(90deg, transparent, rgba(194, 236, 255, .18), transparent); }
body[data-page="home"] .visual-tag,
body[data-page="home"] .visual-mini-tag { border-color: rgba(163, 220, 255, .28); color: #c3ebff; }
body[data-page="home"] .visual-kicker,
body[data-page="home"] .visual-arrow b,
body[data-page="home"] .visual-live-chip,
body[data-page="home"] .visual-motion-live,
body[data-page="home"] .visual-motion-track b { color: #7ed2ff; }
body[data-page="home"] .visual-live-chip { text-shadow: 0 0 12px rgba(103, 198, 255, .65); }
body[data-page="home"] .visual-live-chip::first-letter { color: #ff78b7; }
body[data-page="home"] .visual-float-chip { border-color: rgba(126, 210, 255, .4); color: #9fe0ff; background: rgba(6, 23, 36, .62); }
body[data-page="home"] .visual-motion-strip { border-top-color: rgba(135, 203, 241, .16); color: #8da8ba; }
body[data-page="home"] .visual-motion-index { color: rgba(200, 231, 247, .45); }
body[data-page="home"] .visual-index { -webkit-text-stroke-color: rgba(163, 220, 255, .22); }
body[data-page="home"] .visual-feature { box-shadow: inset 80px 0 100px rgba(3, 13, 22, .26), 0 16px 40px rgba(0, 0, 0, .24); }
body[data-page="home"] .visual-city::after { background: linear-gradient(0deg, rgba(3, 17, 27, .9), rgba(3, 17, 27, .04) 68%); }
body[data-page="home"] .visual-eye::after { background: linear-gradient(0deg, rgba(8, 10, 26, .9), rgba(8, 10, 26, .04) 68%); }

/* ---------- 消息通知 ---------- */

.notification-bell-host {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
}

.notification-bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #ccd7e0;
  border-radius: 50%;
  background: #ffffff;
  color: #32495c;
  box-shadow: 0 10px 30px rgba(17, 25, 31, .14);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.notification-bell:hover {
  transform: translateY(-2px);
  border-color: #a0b1bf;
  box-shadow: 0 14px 36px rgba(17, 25, 31, .2);
}

.notification-bell svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid #ffffff;
  border-radius: 99px;
  background: #e33d3d;
  color: #ffffff;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.notification-popover {
  position: absolute;
  right: 0;
  bottom: 62px;
  width: min(370px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid #dae2e8;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(14, 21, 26, .2);
}

.notification-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eaf3fa;
}

.notification-popover-head { gap: 9px; }
.notification-popover-head strong { flex: none; font-size: 13px; }
.notification-popover-head span { margin-left: auto; color: #e33d3d; font-size: 10.5px; font-weight: 700; }
.notification-read-all { flex: none; padding: 0; border: 0; background: transparent; color: #2474b5; font-size: 10.5px; font-weight: 700; cursor: pointer; }
.notification-read-all:hover { text-decoration: underline; }
.notification-read-all:disabled { color: #8e9aa3; text-decoration: none; cursor: default; }
.notification-read-all[hidden] { display: none; }

.notification-popover-list { max-height: 320px; overflow-y: auto; }

.notification-group { border-bottom: 1px solid #eaf3fa; }
.notification-group:last-child { border-bottom: 0; }
.notification-group-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 15px;
  border: 0;
  background: #f6faff;
  color: #1e3a4d;
  font-size: 11.5px;
  text-align: left;
  cursor: pointer;
}
.notification-group-toggle:hover { background: #eef7ff; }
.notification-group-toggle strong { flex: none; font-size: 11.5px; }
.notification-group-toggle span { color: #e33d3d; font-size: 10.5px; font-weight: 700; }
.notification-group-toggle i { margin-left: auto; color: #8a98a3; font-style: normal; font-size: 13px; line-height: 1; transition: transform .18s ease; }
.notification-group-toggle.open i { transform: rotate(180deg); }
.notification-group-body[hidden] { display: none; }
.notification-group-empty { padding: 12px 15px; color: #818b94; font-size: 11px; text-align: center; }

.notification-pop-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 12px 15px;
  border: 0;
  border-bottom: 1px solid #eef1f3;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.notification-pop-item:hover { background: #f8fbff; }
.notification-pop-item.unread { background: #f7faff; }
.notification-pop-item .avatar { flex: none; }
.notification-pop-item > span:last-child { min-width: 0; }
.notification-pop-line { display: block; color: #545f68; font-size: 11.5px; }
.notification-pop-line strong { color: #1e3a4d; }
.notification-pop-post { display: block; margin-top: 3px; color: #1e3a4d; font-size: 12px; font-weight: 700; }
.notification-pop-excerpt { display: block; margin-top: 3px; overflow: hidden; color: #748695; font-size: 11px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.notification-pop-item small { display: block; margin-top: 4px; color: #939ca3; font-size: 9.5px; }

.notification-popover-foot {
  display: block;
  padding: 11px 15px;
  color: #2474b5;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}

.notification-popover-foot:hover { background: #f3f9ff; }

.notification-empty {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 22px 16px;
  color: #818b94;
  font-size: 11.5px;
  line-height: 1.6;
  text-align: center;
}
.notification-empty strong { color: #475057; font-size: 12.5px; }

.notification-list { display: grid; gap: 8px; }
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 15px 17px;
  border: 1px solid #dfeaf5;
  border-radius: 12px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(17, 25, 31, .035);
}
.notification-item:hover { border-color: #bfcdd8; background: #fbfdff; }
.notification-item.unread { border-left: 3px solid #e33d3d; background: #fff8f7; }
.notification-item .avatar { flex: none; }
.notification-actor { flex: none; }
.notification-copy { min-width: 0; flex: 1; }
.notification-line { display: block; color: #5c6770; font-size: 12px; }
.notification-line strong { color: #1e3a4d; }
.notification-post { display: block; margin-top: 3px; color: #1f3a4b; font-size: 13px; font-weight: 700; }
.notification-excerpt { display: block; margin-top: 4px; overflow: hidden; color: #646d74; font-size: 11.5px; line-height: 1.55; text-overflow: ellipsis; white-space: nowrap; }
.notification-time { display: block; margin-top: 5px; color: #939ca3; font-size: 10px; }
.notification-arrow { flex: none; align-self: center; color: #939ca3; font-size: 16px; }

@media (max-width: 640px) {
  .notification-bell-host { right: 14px; bottom: 14px; }
  .notification-bell { width: 44px; height: 44px; }
  .notification-popover { right: 0; bottom: 56px; }
  .notification-item { padding: 13px; }
  .notification-excerpt { white-space: normal; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .avatar-editor { align-items: flex-start; padding: 13px; gap: 13px; }
  .avatar-editor-preview .avatar.xl { width: 68px; height: 68px; font-size: 26px; }
  .avatar-upload-row { align-items: stretch; flex-direction: column; }
  .avatar-upload-row .btn { width: 100%; }
}

/* ---------- 版本更新公告 ---------- */

.release-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  overflow-y: auto;
  background: rgba(10, 14, 18, .46);
  backdrop-filter: blur(7px);
  animation: release-fade .18s ease-out both;
}

.release-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  max-height: min(88vh, 860px);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dfe4e8;
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(10, 14, 18, .26);
  animation: release-rise .24s cubic-bezier(.2, .8, .2, 1) both;
}

.release-card:focus {
  outline: none;
}

.release-dismiss:focus-visible,
.release-start:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: 2px;
}

.release-hero {
  flex: none;
  padding: 28px 40px 20px;
  background: #ffffff;
  border-bottom: 1px solid #eaf3fa;
}

.release-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2563eb;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.release-version {
  margin-left: 0;
  padding: 3px 7px;
  border-radius: 5px;
  background: #f1f4f6;
  color: #747d85;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: none;
}
.release-meta .release-version { margin-left: 0; }

.release-hero h2 {
  margin: 13px 0 9px;
  color: #10161a;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.2;
}

.release-summary {
  max-width: 720px;
  margin: 0;
  color: #515b63;
  font-size: 14px;
  line-height: 1.75;
}

.release-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 15px;
  color: #737f88;
  font-family: var(--mono);
  font-size: 10.5px;
}

.release-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.release-meta span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6a8aa4;
}

.release-meta span + span::before {
  background: #9fb5d8;
}

.release-body {
  flex: 1;
  min-height: 0;
  padding: 4px 40px 12px;
  overflow-y: auto;
  background: #ffffff;
}

.release-section {
  padding: 18px 0 16px;
  border-bottom: 1px solid #eaf3fa;
}

.release-section:last-child {
  border-bottom: 0;
}

.release-section-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.release-section-index {
  color: #99a2a9;
  font-family: var(--mono);
  font-size: 10px;
}

.release-section-head h3 {
  margin: 0;
  color: #1e3a4d;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
}

.release-tone-new .release-section-head h3 { color: #1d4ed8; }
.release-tone-improved .release-section-head h3 { color: #2474b5; }
.release-tone-design .release-section-head h3 { color: #9a5807; }
.release-tone-history .release-section-head h3 { color: #636d75; }
.release-tone-history .release-item-mark { background: #828c95; box-shadow: 0 0 0 3px rgba(130, 140, 149, .1); }

.release-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 14px;
}

.release-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #eaf3fa;
  border-radius: 10px;
  background: #fcfdfb;
}

.release-item-mark {
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.release-tone-improved .release-item-mark {
  background: #2f8ed8;
  box-shadow: 0 0 0 3px rgba(29, 111, 183, .09);
}

.release-tone-design .release-item-mark {
  background: #b86b0a;
  box-shadow: 0 0 0 3px rgba(184, 107, 10, .09);
}

.release-item strong {
  display: block;
  color: #1b2227;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.release-item p {
  margin: 3px 0 0;
  color: #646d74;
  font-size: 12px;
  line-height: 1.6;
}

.release-footer {
  display: flex;
  flex: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 13px 24px;
  border-top: 1px solid #e4e9ed;
  background: #ffffff;
}

.release-dismiss-wrap {
  display: flex;
  flex: 1;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.release-dismiss-label {
  margin-right: 2px;
  color: #767f87;
  font-size: 11px;
}

.release-dismiss {
  height: 30px;
  padding: 0 9px;
  border: 1px solid #d8dfe5;
  border-radius: 7px;
  background: #ffffff;
  color: #545f68;
  font-size: 11px;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.release-dismiss:hover {
  border-color: #8a9fb1;
  background: #eaf6ff;
  color: #1f6fb8;
}

.release-start {
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: #0f1215;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s ease;
}

.release-start:hover {
  background: #22323f;
}

.release-note {
  flex: none;
  margin: 0;
  padding: 0 24px 13px;
  background: #ffffff;
  color: #9199a0;
  font-size: 10.5px;
  line-height: 1.5;
}

@keyframes release-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes release-rise {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 720px) {
  .release-layer { padding: 12px; align-items: flex-start; }
  .release-card { max-height: calc(100vh - 24px); border-radius: 16px; }
  .release-hero { padding: 24px 20px 18px; }
  .release-hero h2 { font-size: 25px; }
  .release-summary { font-size: 13px; }
  .release-body { padding: 2px 20px 8px; }
  .release-grid { grid-template-columns: 1fr; }
  .release-section { padding: 15px 0 13px; }
  .release-footer { align-items: stretch; padding: 12px 16px; }
  .release-dismiss-wrap { width: 100%; }
  .release-start { width: 100%; }
  .release-note { padding: 0 20px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .release-layer,
  .release-card { animation: none; }
}


/* ---------- Toolbox glass list and blue surfaces ---------- */
.gun-sidebar {
  border-color: rgba(205, 230, 246, .9);
  background:
    radial-gradient(220px 150px at 4% -6%, rgba(112, 199, 255, .24), transparent 66%),
    radial-gradient(210px 170px at 104% 28%, rgba(181, 225, 255, .20), transparent 70%),
    linear-gradient(180deg, #fbfdff 0%, #f2f9ff 100%);
}
.gun-sidebar .gun-nav { display: grid; gap: 7px; padding: 0 12px 12px; }

/* 宽屏下左侧分类栏做成占满视口高度的面板，列表在内部滚动，
   避免它比右侧内容短、下方留出一大段空白。 */
@media (min-width: 921px) {
  .gun-sidebar {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 118px);
    max-height: calc(100vh - 118px);
    min-height: 320px;
  }
  .gun-sidebar .sidebar-head,
  .gun-sidebar .sidebar-foot { flex: none; }
  .gun-sidebar .gun-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
.official-entry,
.gun-nav-item {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 54px;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid rgba(216, 235, 249, .92);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .88), rgba(236, 247, 255, .62));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .98), inset 0 -1px 0 rgba(104, 164, 207, .08), 0 4px 14px rgba(40, 105, 151, .055);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
}
.official-entry::before,
.gun-nav-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(118deg, rgba(255,255,255,.62) 0%, rgba(255,255,255,0) 34%, rgba(160,219,255,.16) 66%, rgba(255,255,255,.28) 100%);
}
.official-entry > *,
.gun-nav-item > * { position: relative; z-index: 1; }
.official-entry,
.gun-nav-all {
  border-color: rgba(151, 207, 243, .88);
  background: linear-gradient(135deg, rgba(238,250,255,.96), rgba(255,255,255,.68) 54%, rgba(218,242,255,.62));
  box-shadow: inset 0 1px 0 rgba(255,255,255,1), inset 0 -1px 0 rgba(92,158,205,.10), 0 6px 18px rgba(47,142,216,.09);
}
.official-entry:hover,
.gun-nav-all:hover,
.gun-nav-item:hover {
  border-color: rgba(122, 192, 237, .92);
  background: linear-gradient(135deg, rgba(243,251,255,.98), rgba(229,246,255,.78));
  box-shadow: inset 0 1px 0 rgba(255,255,255,1), 0 8px 20px rgba(47,142,216,.12);
  transform: translateY(-1px);
}
.gun-nav-item.active,
.gun-nav-all.active {
  border-color: rgba(99, 180, 231, .95);
  background: linear-gradient(135deg, rgba(233,248,255,.98), rgba(214,240,255,.78));
  color: #174f79;
  box-shadow: inset 0 1px 0 rgba(255,255,255,1), 0 7px 20px rgba(47,142,216,.14);
}
.official-entry-mark,
.gun-nav-all .gun-nav-thumb {
  width: 46px;
  height: 32px;
  flex: none;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(145deg, #55abe8, #2f8ed8);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 4px 10px rgba(47,142,216,.22);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
}
.gun-nav-thumb {
  width: 46px;
  height: 32px;
  flex: none;
  border: 1px solid rgba(219, 237, 249, .85);
  border-radius: 7px;
  background: linear-gradient(135deg, #fbfdff, #eaf5fd);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95);
}
.gun-nav-thumb img { width: 100%; height: 100%; transform: scale(1.2); }
.gun-nav-copy strong { font-size: 12px; }
.gun-nav-copy span { margin-top: 2px; color: #7b92a3; font-size: 9px; }
.gun-nav-count { color: #7f96a7; font-size: 9px; }
.official-entry-copy strong { font-size: 12px; }
.official-entry-copy small { margin-top: 2px; color: #6d879a; font-size: 9px; }
.official-entry-arrow { color: #2f8ed8; font-size: 14px; }
.gun-nav-all { margin-bottom: 0; }
.gun-nav-all .gun-nav-copy strong { font-size: 12px; }
.gun-nav-all .gun-nav-copy span { font-size: 9px; }
.gun-nav-all .gun-nav-count { color: #2f8ed8; font-size: 9px; font-weight: 700; }
.gun-nav-all-arrow { flex: none; color: #2f8ed8; font-size: 14px; }
.sidebar-head { border-bottom-color: rgba(215, 234, 247, .9); background: transparent; }
.sidebar-foot { border-top-color: rgba(215, 234, 247, .9); background: transparent; }

/* Remaining green surfaces -> light blue */
.game-switch { border-color: #dceaf6; background: #fbfdff; box-shadow: 0 4px 18px rgba(40, 105, 151, .05); }
.game-switch-item { color: #5d7080; }
.game-switch-item:hover { background: #f3faff; }
.game-switch-item.active {
  border-color: #a8d3ee;
  background: linear-gradient(135deg, #edf8ff, #f8fcff);
  color: #174f79;
}
.game-switch-item.active small { color: #5f8daa; }
.gun-banner {
  border-color: #cfe4f4;
  background: linear-gradient(105deg, #edf8ff, #ffffff 66%);
}
.gun-banner p { color: #566d7d; }
.gun-banner-meta b { color: #2f8ed8; }
.gun-banner-badge { color: #7b92a3; }
.loadout-card {
  border-color: #dceaf6;
  background: radial-gradient(280px 130px at 100% 0, rgba(47, 142, 216, .07), transparent 70%), #ffffff;
  box-shadow: 0 1px 0 rgba(40, 105, 151, .02);
}
.loadout-card:hover {
  border-color: #a9d3ed;
  box-shadow: 0 16px 36px rgba(40, 105, 151, .09);
}
.loadout-card::before { background: #2f8ed8; }
.loadout-foot { border-top-color: #edf3f8; }
.loadout-desc { color: #566d7d; }
.game-chip.delta { background: #eaf6ff; color: #2474b5; }
@media (max-width: 760px) {
  .gun-nav-copy strong,
  .gun-nav-all .gun-nav-copy strong,
  .official-entry-copy strong { font-size: 14px; }
  .gun-nav-copy span,
  .gun-nav-all .gun-nav-copy span,
  .official-entry-copy small { font-size: 11px; }
  .gun-nav-count,
  .gun-nav-all .gun-nav-count { font-size: 12px; }
}
.loadout-card .gun-chip {
  border-color: #cfe4f4;
  color: #2f7fbf;
  background: #eef7ff;
}

/* Clear category selection: white idle rows, blue selected row */
.gun-nav-item:not(.active) {
  border-color: #dceaf6;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9), 0 4px 12px rgba(40, 105, 151, .035);
}
.gun-nav-item:not(.active)::before { opacity: .18; }
.gun-nav-item:not(.active):hover {
  border-color: #b8dcf3;
  background: #f5fbff;
  box-shadow: 0 6px 16px rgba(47, 142, 216, .08);
}
.gun-nav-item.active,
.gun-nav-all.active {
  border-color: #7fc0e8;
  background: linear-gradient(135deg, #e8f6ff, #f7fcff);
  color: #15527c;
  box-shadow: 0 6px 18px rgba(47, 142, 216, .13), inset 0 0 0 1px rgba(255, 255, 255, .65);
}
.gun-nav-item.active::before { opacity: .34; }
.gun-nav-item.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  z-index: 2;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #2f8ed8;
}
.gun-nav-item.active .gun-nav-copy strong { color: #15527c; }
.gun-nav-item.active .gun-nav-copy span { color: #5f8daa; }
.gun-nav-item.active .gun-nav-count {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 99px;
  background: #d8eeff;
  color: #1d6fb7;
}
.gun-nav-item.active .gun-nav-thumb { border-color: #acd6ef; background: #fff; }

/* Toolbox banner eyebrow follows the blue theme */
.gun-banner .eyebrow { color: #2f8ed8; }

/* Community surfaces: remove remaining green tints */
.community-toolbar { border-color: #dceaf6; box-shadow: 0 4px 18px rgba(40, 105, 151, .045); }
.community-filter { color: #5d7080; }
.community-filter:hover { background: #f3faff; color: #174f79; }
.community-filter.active {
  border-color: #a8d3ee;
  background: #e9f6ff;
  color: #1d6fb7;
}
.community-search { background: #fbfdff; }
.community-search svg { stroke: #7b92a3; }
.community-meta-row { color: #7d92a3; }
.community-live i { box-shadow: 0 0 0 3px rgba(47, 142, 216, .12); }
.community-post:hover {
  border-color: #b9ddf3;
  box-shadow: 0 12px 30px rgba(40, 105, 151, .09);
}
.community-post-excerpt { color: #5d7080; }
.community-stat { color: #7b92a3; }
.community-stat.active svg { fill: rgba(47, 142, 216, .14); }
.community-rules li { color: #657a8a; }
.community-rules li::before { background: #7fc0e8; }
.community-tag-cloud button {
  border-color: #dceaf6;
  background: #fbfdff;
  color: #5d7080;
}
.community-tag-cloud button:hover {
  border-color: #a8d3ee;
  color: #1d6fb7;
  background: #f3faff;
}
.community-cta-card {
  border-color: #cfe4f4;
  background: linear-gradient(135deg, #eef8ff, #fbfdff);
}
.community-cta-card p { color: #657a8a; }
.community-comments-head span { background: #eaf6ff; color: #2f8ed8; }
.community-reply-banner { color: #5d7080; }
.community-reply-banner b { color: #1d6fb7; }

/* ALL badge: active state must keep the blue mark instead of a blank white tile */
.gun-nav-all .gun-nav-thumb,
.gun-nav-all.active .gun-nav-thumb {
  border: 0;
  background: linear-gradient(145deg, #63bdf5 0%, #2f8ed8 52%, #1d6fb7 100%);
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-indent: .09em;
  text-shadow: 0 1px 1px rgba(13, 72, 113, .38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -1px 0 rgba(13, 72, 113, .22), 0 3px 9px rgba(47, 142, 216, .28);
}
.gun-nav-all:hover .gun-nav-thumb,
.gun-nav-all.active:hover .gun-nav-thumb {
  background: linear-gradient(145deg, #7ccbfa 0%, #3b9be0 52%, #2278bb 100%);
}

/* Keep the official DF mark at the same type size as the ALL badge */
.official-entry-mark {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-indent: .09em;
  text-shadow: 0 1px 1px rgba(13, 72, 113, .38);
}
/* Mobile: official dialog fills the viewport with an always-visible close button */
@media (max-width: 760px) {
  .modal.official-modal {
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    overflow: hidden;
  }
  .official-modal .official-panel {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border: 0;
    border-radius: 0;
    padding: 0;
    overflow: hidden;
  }
  .official-modal .official-head {
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 60px 10px 16px;
  }
  .official-modal .official-head .eyebrow { font-size: 9.5px; letter-spacing: .08em; }
  .official-modal .official-head h2 { margin: 7px 0 6px; font-size: clamp(23px, 6.2vw, 30px); line-height: 1.08; }
  .official-modal .official-head p { font-size: 11.5px; line-height: 1.5; }
  .official-modal .modal-close {
    position: absolute;
    z-index: 20;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    right: 12px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(23, 61, 88, .14);
    font-size: 23px;
  }
  .official-modal .official-toolbar { gap: 8px; padding: 10px 14px; }
  .official-modal .official-modes { gap: 5px; }
  .official-modal .official-mode-tab { height: 32px; padding: 0 9px; font-size: 11.5px; }
  .official-modal .official-toolbar input,
  .official-modal .official-toolbar select { height: 36px; font-size: 12px; }
  .official-modal .official-toolbar input { width: 100%; }
  .official-modal .official-result { padding: 10px 16px 0; font-size: 11px; }
  .official-modal .official-grid {
    grid-template-columns: 1fr;
    padding: 8px 14px 12px;
    -webkit-overflow-scrolling: touch;
  }
  .official-modal .official-pager {
    padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
    border-top: 1px solid #e8f1f8;
    background: #fff;
  }
}
/* Dialogs: lock the page behind every modal and keep wheel/touch scrolling inside it */
html.modal-open,
body.modal-open { overflow: hidden; }
.modal-panel { overscroll-behavior: contain; }

@media (max-width: 760px) {
  .modal:not(.official-modal) {
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    overflow: hidden;
  }
  .modal:not(.official-modal) .modal-panel {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: 100%;
    padding: calc(env(safe-area-inset-top, 0px) + 58px) 16px calc(env(safe-area-inset-bottom, 0px) + 24px);
    border: 0;
    border-radius: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .modal:not(.official-modal) .modal-close {
    position: fixed;
    z-index: 30;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    right: 12px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(23, 61, 88, .14);
    font-size: 23px;
  }
  .modal:not(.official-modal) .modal-title { font-size: 32px; }
  .modal:not(.official-modal) .modal-sub { margin-bottom: 18px; font-size: 12.5px; line-height: 1.65; }
  .modal:not(.official-modal) input:not([type="file"]),
  .modal:not(.official-modal) select,
  .modal:not(.official-modal) textarea { font-size: 16px; }
}

/* ---------- site backdrop (admin-configurable, image or video) ---------- */
.site-wallpaper {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
  background: #f4f9fd;
}
.site-wallpaper[hidden] { display: none; }
.site-wallpaper-media,
.site-wallpaper-veil { position: absolute; inset: 0; }
.site-wallpaper-media img,
.site-wallpaper-media video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: var(--site-bg-opacity, .38);
  transition: opacity .22s ease;
}
.site-wallpaper-media video { background: #eaf3fa; }
.site-wallpaper-veil {
  background:
    linear-gradient(180deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,.16) 44%, rgba(255,255,255,.34) 100%);
  opacity: var(--site-bg-veil, .34);
  transition: opacity .22s ease;
}
html.has-site-bg { background: transparent; }
body.has-site-bg { background: transparent; }
body.has-site-bg::before { opacity: .45; }
body.has-site-bg .site-header {
  background: rgba(255,255,255,.76);
  backdrop-filter: blur(20px) saturate(1.08);
}
body.has-site-bg .header-shell { background: rgba(255,255,255,.7); }
body.has-site-bg .topline { background: rgba(247,251,255,.78); }
body.has-site-bg .site-footer {
  background: rgba(246,250,253,.84);
  backdrop-filter: blur(16px) saturate(1.04);
}
body.has-site-bg .community-post,
body.has-site-bg .community-side-card,
body.has-site-bg .settings-card,
body.has-site-bg .gun-sidebar,
body.has-site-bg .loadout-card,
body.has-site-bg .messages-shell {
  background-color: rgba(255,255,255,.86);
  backdrop-filter: blur(14px) saturate(1.04);
}
body.has-site-bg main {
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
}
/* The home hero and ticker used opaque paper fills. Keep their texture but let
   the admin wallpaper show through instead of hiding it behind a white slab. */
body.has-site-bg .hero {
  background:
    radial-gradient(circle at 74% 26%, rgba(84,170,240,.16), transparent 38%),
    linear-gradient(180deg, rgba(247,251,255,.26) 0%, rgba(255,255,255,.06) 72%);
}
body.has-site-bg .ticker { background: rgba(247,251,255,.7); }
body.has-site-bg[data-page="home"] .site-header { background: rgba(255,255,255,.72); }
body.has-site-bg[data-page="home"] .header-top { background: rgba(247,251,255,.7); }
body.has-site-bg .page-hero { background: transparent; }
body.has-site-bg .hero-actions .meta { color: #3b5a6e; }
body.has-site-bg .hero-stat span { color: #4a687b; }
body.has-site-bg .hero-lede { color: #405867; }
body.has-site-bg .hero-stats { background: rgba(255,255,255,.42); backdrop-filter: blur(10px); border-radius: 10px; }
body.has-site-bg .section,
body.has-site-bg .community-layout,
body.has-site-bg .toolbox-layout { background: transparent; }
/* At 100% the wallpaper is meant to be fully opaque: remove the remaining
   white page/hero wash instead of putting another layer over the image. */
body.site-bg-full .site-wallpaper-veil { opacity: 0; }
body.site-bg-full main { background: transparent; }
body.site-bg-full .hero { background: transparent; }
body.site-bg-full .hero-stats { background: rgba(255,255,255,.55); }
.site-bg-preview { width: 240px; height: 135px; flex: none; border-radius: 8px; overflow: hidden; }
.site-bg-preview img,
.site-bg-preview video { display: block; width: 100%; height: 100%; object-fit: cover; }
.site-bg-preview.is-empty {
  display: grid;
  place-items: center;
  border-style: dashed;
  background: #f4f9fd;
}
.site-bg-empty { color: #7f96a8; font-size: 11px; }
.site-hero-preview.is-empty {
  display: grid;
  place-items: center;
  border-style: dashed;
  background: #f4f9fd;
}
.site-bg-upload { align-items: flex-start; }
.site-bg-upload .image-upload-copy button { margin-top: 9px; }
.site-bg-opacity {
  margin-top: 13px;
  padding: 13px 14px;
  border: 1px solid #dbe8f4;
  border-radius: 9px;
  background: #f8fcff;
}
.site-bg-opacity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.site-bg-opacity-head label { margin: 0; color: #24313b; font-size: 12px; font-weight: 700; }
.site-bg-opacity-head strong { color: #1d6fb7; font-family: var(--mono); font-size: 12px; }
.site-bg-opacity input[type=range] {
  display: block;
  width: 100%;
  height: 20px;
  accent-color: #2f8ed8;
  cursor: pointer;
}
.site-bg-opacity-note { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
.site-bg-opacity-note .form-note { margin: 0; font-size: 10.5px; }
.site-bg-save-state { flex: none; color: #2b83c6; font-size: 10px; }
@media (max-width: 760px) {
  .site-bg-preview { width: 100%; height: 150px; }
  .site-bg-upload { display: block; }
  .site-bg-upload .image-upload-copy { margin-top: 10px; }
  .site-bg-opacity-note { display: block; }
  .site-bg-save-state { display: block; margin-top: 4px; }
}

/* ---------- admin site settings ---------- */
.site-settings-card { max-width: 1080px; }
.site-brand-row {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 30px;
  align-items: end;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.site-brand-copy h3 { margin: 8px 0 7px; }
.site-brand-copy p { margin: 0; color: #748695; font-size: 11.5px; line-height: 1.65; }
.site-brand-form .form-note { display: block; margin-top: 9px; }
.site-name-line { display: flex; align-items: flex-end; gap: 10px; }
.site-name-line .field { flex: 1; min-width: 0; margin: 0; }
.site-name-line .btn { flex: none; height: 44px; }
.site-media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.site-media-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 11px;
  padding: 15px;
  border: 1px solid #dbe9f6;
  border-radius: 12px;
  background: rgba(255, 255, 255, .76);
}
.site-media-wide { grid-column: 1 / -1; }
.site-media-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.site-media-head strong { display: block; color: #142433; font-size: 13px; line-height: 1.4; }
.site-media-head div > span { display: block; margin-top: 3px; color: #748695; font-size: 10.5px; line-height: 1.55; }
.site-media-badge {
  flex: none;
  padding: 3px 7px;
  border: 1px solid #d5e8f7;
  border-radius: 4px;
  color: #2f8ed8;
  background: #f5fbff;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .1em;
}
.site-media-card .image-upload-box { margin: 0; padding: 10px; background: #f8fbff; }
.site-media-card .site-hero-preview { width: 42%; height: 112px; }
.site-media-card .site-bg-preview { width: 250px; height: 140px; }
.site-media-card .image-upload-copy { min-width: 0; }
.site-media-card .image-upload-copy input[type=file] { margin-top: 2px; }
.site-media-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.site-media-actions .btn { min-height: 32px; padding: 0 12px; font-size: 10px; }
.site-media-card .site-reset { margin-top: 0; }
.site-media-status { display: block; margin: 7px 0 0; color: #7f93a2; font-size: 10px; line-height: 1.45; }
.site-media-card .site-bg-opacity { margin-top: 2px; }

@media (max-width: 900px) {
  .site-brand-row { grid-template-columns: 1fr; gap: 15px; align-items: start; }
}
@media (max-width: 760px) {
  .site-settings-card { padding: 18px; }
  .site-name-line { display: block; }
  .site-name-line .btn { width: 100%; margin-top: 10px; }
  .site-media-grid { grid-template-columns: 1fr; gap: 12px; }
  .site-media-wide { grid-column: auto; }
  .site-media-card { padding: 13px; }
  .site-media-upload { display: block; }
  .site-media-card .site-hero-preview { width: 100%; height: 158px; margin-bottom: 10px; }
  .site-media-card .site-bg-preview { width: 100%; height: 170px; }
  .site-media-actions .btn { flex: 1; }
}

/* ---------- account follows / followers ---------- */
.follow-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.follow-card { padding: 22px; }
.follow-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 2px; }
.follow-card-head h3 { margin: 0; font-family: var(--display); font-size: 22px; color: #173247; }
.follow-card-head span { min-width: 28px; padding: 3px 9px; border-radius: 999px; background: rgba(47,142,216,.1); color: #1d6fb7; font-size: 11px; font-weight: 800; text-align: center; }
.follow-list { display: grid; gap: 10px; margin-top: 14px; }
.follow-person { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #dbe9f6; border-radius: 12px; background: rgba(255,255,255,.66); }
.follow-person .avatar { width: 42px; height: 42px; flex: none; }
.follow-person-copy { min-width: 0; flex: 1; }
.follow-person-copy strong { display: block; color: #173247; font-size: 14px; line-height: 1.3; }
.follow-person-copy span { display: block; margin-top: 2px; color: #6d8597; font-size: 11px; }
.follow-person-copy p { margin: 4px 0 0; color: #7b8e9e; font-size: 11.5px; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.follow-person-actions { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.follow-person-actions .btn { min-height: 32px; padding: 0 10px; font-size: 11.5px; }
.follow-loading, .follow-empty { padding: 22px 10px; color: #7890a3; font-size: 12.5px; text-align: center; line-height: 1.8; }
.follow-empty span { color: #9aabba; font-size: 11.5px; }
@media (max-width: 900px) {
  .follow-columns { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .follow-person { align-items: flex-start; flex-wrap: wrap; }
  .follow-person-copy { flex-basis: calc(100% - 56px); }
  .follow-person-actions { width: 100%; justify-content: flex-start; padding-left: 54px; }
}
/* ---------- community avatar direct message ---------- */
.community-avatar-msg { display: inline-flex; flex: none; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer; transition: box-shadow .18s ease, transform .18s ease; }
.community-avatar-msg:hover { box-shadow: 0 0 0 3px rgba(47,142,216,.2); transform: translateY(-1px); }
.community-avatar-msg:focus-visible { outline: 2px solid #2f8ed8; outline-offset: 3px; }
@media (max-width: 760px) {
  .account-tab { padding: 12px 10px; font-size: 11.5px; }
  .account-tab::after { left: 10px; right: 10px; }
  .message-category { font-size: 9px; }
}
/* ---------- stable page entrance for auth-backed pages ---------- */
/* Keep the header's box reserved while the cached user/header is being read. */
.site-header:empty { min-height: 106px; }

/* Reserve the scrollbar before private pages finish their API calls. Without
   this, a short loading state and a tall dashboard toggle the scrollbar and
   shift the whole header horizontally by its width. */
html { scrollbar-gutter: stable; }

body[data-page="messages"] main,
body[data-page="account"] main,
body[data-page="admin"] main {
  min-height: calc(100vh - 120px);
  min-height: calc(100dvh - 120px);
}

body[data-page="messages"] .messages-wrap,
body[data-page="messages"] .messages-loading { min-height: 620px; }

@keyframes page-surface-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.messages-shell,
.messages-guest,
#auth-view,
#dashboard-view,
#admin-area,
#access-denied {
  animation: page-surface-in .24s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .messages-shell,
  .messages-guest,
  #auth-view,
  #dashboard-view,
  #admin-area,
  #access-denied { animation: none; }
}

@media (max-width: 860px) {
  .site-header:empty { min-height: 98px; }
  body[data-page="messages"] .messages-wrap,
  body[data-page="messages"] .messages-loading { min-height: 580px; }
}

@media (max-width: 640px) {
  .site-header:empty { min-height: 92px; }
}

/* Video wallpapers: avoid layered backdrop blur over a running video. */
body.site-bg-video .site-header,
body.site-bg-video .header-top,
body.site-bg-video .community-post,
body.site-bg-video .loadout-card,
body.site-bg-video .gun-sidebar,
body.site-bg-video .settings-card,
body.site-bg-video .site-media-card,
body.site-bg-video .messages-shell,
body.site-bg-video .footer-main {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
/* ---------- toolbox module hub ---------- */
.toolbox-hub { padding: 38px 0 78px; }
.toolbox-hub[hidden], .toolbox-wrap[hidden] { display: none !important; }
.toolbox-hub-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.toolbox-hub-head h2 { margin: 6px 0 8px; color: #1e3a4d; font-size: clamp(28px, 3vw, 38px); line-height: 1.1; }
.toolbox-hub-head p { max-width: 570px; margin: 0; color: #6f808d; font-size: 13px; line-height: 1.7; }
.toolbox-hub-note { flex: none; padding: 7px 11px; border: 1px solid rgba(47,142,216,.18); border-radius: 99px; background: rgba(255,255,255,.55); color: #2474b5; font-family: var(--mono); font-size: 9px; letter-spacing: .08em; }
.toolbox-hub-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 16px; }
.toolbox-module-card {
  position: relative;
  display: flex;
  min-height: 238px;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(47,142,216,.22);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(237,247,255,.82));
  color: inherit;
  text-decoration: none;
  box-shadow: 0 16px 38px rgba(30,75,110,.08);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.toolbox-module-card::after {
  content: '';
  position: absolute;
  top: -90px;
  right: -60px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74,158,232,.2), rgba(74,158,232,0) 68%);
  pointer-events: none;
}
a.toolbox-module-card:hover { transform: translateY(-3px); border-color: rgba(47,142,216,.5); box-shadow: 0 22px 46px rgba(30,75,110,.14); }
.toolbox-module-card.is-soon { border-style: dashed; background: rgba(255,255,255,.48); box-shadow: none; }
.toolbox-module-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toolbox-module-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; background: linear-gradient(145deg, #2f8ed8, #1d6fb7); color: #fff; box-shadow: 0 10px 22px rgba(47,142,216,.28); }
.toolbox-module-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.toolbox-module-card.is-soon .toolbox-module-icon { background: #e8f1f8; color: #7a95a8; box-shadow: none; }
.toolbox-module-state { padding: 5px 8px; border-radius: 99px; background: #e9f7ee; color: #2b7a4b; font-family: var(--mono); font-size: 9px; letter-spacing: .04em; }
.toolbox-module-state.is-soon { background: #eef2f5; color: #75838e; }
.toolbox-module-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 5px; }
.toolbox-module-eyebrow { color: #2f8ed8; font-family: var(--mono); font-size: 9px; letter-spacing: .14em; }
.toolbox-module-body strong { color: #1e3a4d; font-size: 25px; line-height: 1.15; }
.toolbox-module-desc { max-width: 500px; color: #6d7f8c; font-size: 12px; line-height: 1.65; }
.toolbox-module-foot { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: auto; }
.toolbox-module-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.toolbox-module-tags span { padding: 4px 7px; border-radius: 6px; background: rgba(255,255,255,.7); color: #718391; font-size: 9.5px; }
.toolbox-module-enter { flex: none; color: #1d6fb7; font-size: 11px; font-weight: 800; }
.toolbox-module-enter b { font-size: 14px; font-weight: 400; }
.toolbox-module-card.is-soon .toolbox-module-enter { color: #8a98a3; font-weight: 600; }
.toolbox-module-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
.toolbox-module-back { color: #2474b5; font-size: 11px; font-weight: 700; text-decoration: none; }
.toolbox-module-back:hover { text-decoration: underline; }
.toolbox-module-crumb { color: #82919c; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; }

@media (max-width: 860px) {
  .toolbox-hub { padding: 28px 0 54px; }
  .toolbox-hub-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .toolbox-hub-grid { grid-template-columns: 1fr; }
  .toolbox-module-card { min-height: 210px; padding: 20px; }
}

@media (max-width: 520px) {
  .toolbox-module-body strong { font-size: 22px; }
  .toolbox-module-foot { align-items: flex-start; flex-direction: column; gap: 10px; }
  .toolbox-module-bar { margin-bottom: 14px; }
}

/* ---------- toolbox hub: compact square tiles ---------- */
.toolbox-hub { position: relative; }

.toolbox-hub-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 240px));
  justify-content: start;
  align-items: stretch;
  gap: 14px;
}
.toolbox-module-card {
  min-height: 0;
  aspect-ratio: 1 / 1;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
}
.toolbox-module-icon { width: 42px; height: 42px; border-radius: 12px; }
.toolbox-module-icon svg { width: 21px; height: 21px; }
.toolbox-module-state { padding: 4px 7px; font-size: 8px; }
.toolbox-module-body { gap: 4px; }
.toolbox-module-eyebrow { font-size: 8px; }
.toolbox-module-body strong { font-size: 21px; }
.toolbox-module-desc {
  display: -webkit-box;
  overflow: hidden;
  max-width: 100%;
  font-size: 11.5px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.toolbox-module-foot { align-items: center; margin-top: auto; }
.toolbox-module-tags { display: none; }
.toolbox-module-enter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(47,142,216,.09);
  color: #1d6fb7;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.toolbox-module-enter b { font-size: 13px; }
.toolbox-module-card:hover .toolbox-module-enter { background: rgba(47,142,216,.16); }
.toolbox-module-card.is-soon .toolbox-module-enter { margin-left: 0; background: rgba(117,131,142,.08); }

.toolbox-module-bar {
  padding: 10px 12px;
  border: 1px solid rgba(47,142,216,.16);
  border-radius: 12px;
  background: rgba(255,255,255,.74);
  box-shadow: 0 6px 18px rgba(30,75,110,.04);
}
.toolbox-module-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #eaf5ff;
  color: #1d6fb7;
  font-size: 11px;
  font-weight: 800;
}
.toolbox-module-back:hover { background: #dcefff; text-decoration: none; }
.toolbox-module-crumb { color: #6f8494; }

@media (max-width: 860px) {
  .toolbox-hub-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .toolbox-module-card { min-height: 0; aspect-ratio: 1 / 1; padding: 16px; gap: 10px; }
  .toolbox-module-body strong { font-size: 20px; }
}

@media (max-width: 520px) {
  .toolbox-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .toolbox-module-card { aspect-ratio: 1 / 1; padding: 13px; gap: 8px; border-radius: 15px; }
  .toolbox-module-icon { width: 36px; height: 36px; border-radius: 10px; }
  .toolbox-module-icon svg { width: 18px; height: 18px; }
  .toolbox-module-state { padding: 3px 6px; font-size: 7.5px; }
  .toolbox-module-eyebrow { font-size: 7.5px; letter-spacing: .1em; }
  .toolbox-module-body strong { font-size: 17px; }
  .toolbox-module-desc { display: none; }
  .toolbox-module-enter { padding: 5px 7px; font-size: 9px; }
  .toolbox-module-enter b { font-size: 11px; }
  .toolbox-module-bar { padding: 9px 10px; margin-bottom: 14px; }
  .toolbox-module-back { padding: 6px 8px; font-size: 10px; }
  .toolbox-module-crumb { font-size: 8px; letter-spacing: .04em; }
}

/* Keep the tool cards and FPS module glass in step with the site wallpaper
   strength. The right-side "soon" card is the reference opacity. */
.toolbox-module-card {
  --toolbox-card-alpha: calc(.54 - .16 * var(--site-bg-opacity, .38));
  background: rgba(255, 255, 255, var(--toolbox-card-alpha));
  backdrop-filter: blur(8px) saturate(1.04);
  -webkit-backdrop-filter: blur(8px) saturate(1.04);
}
.toolbox-module-card.is-soon {
  background: rgba(255, 255, 255, var(--toolbox-card-alpha));
}
body.has-site-bg .toolbox-wrap .toolbox-module-bar,
body.has-site-bg .toolbox-wrap .game-switch,
body.has-site-bg .toolbox-wrap .toolbar,
body.has-site-bg .toolbox-wrap .gun-sidebar,
body.has-site-bg .toolbox-wrap .gun-banner,
body.has-site-bg .toolbox-wrap .loadout-card {
  background-color: rgba(255, 255, 255, calc(.72 - .12 * var(--site-bg-opacity, .38)));
  backdrop-filter: blur(10px) saturate(1.02);
  -webkit-backdrop-filter: blur(10px) saturate(1.02);
}

@media (max-width: 640px) {
  .toolbox-hub { padding: 28px 0 52px; }
  .toolbox-hub-head { display: block; margin-bottom: 16px; }
  .toolbox-hub-head h2 { margin-top: 4px; font-size: 27px; }
  .toolbox-hub-head p { max-width: none; font-size: 12px; }
  .toolbox-hub-note { display: inline-flex; margin-top: 9px; }
  .toolbox-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .toolbox-module-card { padding: 14px; gap: 8px; border-radius: 15px; }
  .toolbox-module-icon { width: 36px; height: 36px; border-radius: 10px; }
  .toolbox-module-icon svg { width: 18px; height: 18px; }
  .toolbox-module-state { padding: 3px 6px; font-size: 7.5px; }
  .toolbox-module-eyebrow { font-size: 7.5px; letter-spacing: .1em; }
  .toolbox-module-body strong { font-size: 17px; }
  .toolbox-module-desc { display: none; }
  .toolbox-module-enter { padding: 5px 7px; font-size: 9px; }
  .toolbox-module-enter b { font-size: 11px; }
}

@media (min-width: 521px) and (max-width: 640px) {
  .toolbox-hub-grid { grid-template-columns: repeat(2, minmax(0, 210px)); justify-content: start; }
}

/* Card typography: keep the compact square but make labels and CTAs easier
   to read, especially the state pills in the top-right corner. */
.toolbox-module-card { gap: 14px; }
.toolbox-module-state {
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.toolbox-module-eyebrow { font-size: 10px; letter-spacing: .08em; }
.toolbox-module-body { gap: 5px; }
.toolbox-module-body strong { font-size: 24px; line-height: 1.15; }
.toolbox-module-desc { font-size: 13px; line-height: 1.6; }
.toolbox-module-enter { padding: 7px 10px; font-size: 11.5px; }
.toolbox-module-enter b { font-size: 14px; }

@media (max-width: 640px) {
  .toolbox-module-card { gap: 9px; }
  .toolbox-module-state { padding: 5px 8px; font-size: 10.5px; white-space: nowrap; }
  .toolbox-module-eyebrow { font-size: 9px; }
  .toolbox-module-body strong { font-size: 20px; }
  .toolbox-module-enter { padding: 6px 8px; font-size: 11px; }
  .toolbox-module-enter b { font-size: 12.5px; }
}

/* Phones and narrow tablets: keep the two cards immediately next to each
   other. Flex removes any auto-fill/justify spacing that can leave a wide
   empty track between them on some mobile browsers. */
@media (max-width: 640px) {
  .toolbox-hub-grid {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
  }
  .toolbox-module-card {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
  }
}

@media (min-width: 641px) and (max-width: 860px) {
  .toolbox-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 240px));
    justify-content: flex-start;
    gap: 14px;
  }
  .toolbox-module-card { width: auto; max-width: 240px; }
}

/* 反馈与建议：铃铛入口、提交弹窗与管理员消息面板 */
.notification-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid #eaf3fa;
  background: #f8fcff;
  color: #1d6fb7;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}
.notification-feedback:hover { background: #eef7ff; }
.notification-feedback[hidden] { display: none; }
.notification-feedback span { color: #8a98a3; font-size: 10px; font-weight: 600; }

.feedback-modal .modal-panel { width: min(520px, calc(100vw - 32px)); }
.feedback-panel { padding: 26px 28px 24px; }
.feedback-panel .eyebrow { margin-bottom: 12px; }
.feedback-panel h2 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.04em; }
.feedback-intro { margin: 0 0 20px; color: #73808a; font-size: 12px; line-height: 1.65; }
.feedback-form { display: grid; gap: 15px; }
.feedback-field { display: grid; gap: 7px; color: #33414b; font-size: 11.5px; font-weight: 700; }
.feedback-field span { display: block; }
.feedback-field small { color: #8b969f; font-size: 10px; font-weight: 500; }
.feedback-field select,
.feedback-field input,
.feedback-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dbe7ef;
  border-radius: 9px;
  background: #fbfdff;
  color: #25323b;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 12px;
  outline: none;
}
.feedback-field textarea { resize: vertical; min-height: 126px; line-height: 1.6; }
.feedback-field select:focus,
.feedback-field input:focus,
.feedback-field textarea:focus { border-color: #6eb7ea; box-shadow: 0 0 0 3px rgba(47, 142, 216, .12); }
.feedback-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 4px; }

.feedback-detail { height: 100%; padding: 24px 26px; overflow-y: auto; }
.feedback-detail-label { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; margin: 18px 0 12px; border-radius: 6px; background: #eaf5fd; color: #1d6fb7; font-size: 11px; font-weight: 800; }
.feedback-detail-content { margin: 0; color: #2d3a44; font-size: 14px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.feedback-detail-contact { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid #eaf3fa; color: #77838c; font-size: 11.5px; line-height: 1.6; }
.feedback-row .conversation-last { color: #1d6fb7; font-weight: 700; }

/* 消息侧栏在六分类（管理员反馈）时也必须收在容器内 */
.messages-side,
.message-categories,
.message-list,
.conversation-row { min-width: 0; }

/* 管理员用户管理：资料编辑与删除 */
.user-row-actions { display: grid; grid-template-columns: repeat(2, max-content); justify-content: flex-end; gap: 6px; }
.user-row-actions .btn { white-space: nowrap; }
.user-edit-modal .modal-panel { width: min(520px, calc(100vw - 32px)); }
.user-edit-handle { margin: -4px 0 18px; color: #7d8a94; font-family: var(--mono); font-size: 11px; }
.user-edit-modal .color-swatch { width: 30px; height: 30px; border-radius: 0; }

/* 全站确认弹窗：替代浏览器原生 confirm，始终在屏幕正中间 */
.modal.confirm-modal {
  position: fixed;
  inset: 0;
  width: min(430px, calc(100vw - 32px));
  max-width: 430px;
  height: max-content;
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  overflow: visible;
}
.modal.confirm-modal[open] { display: block; }
.modal.confirm-modal::backdrop {
  background: rgba(13, 21, 28, .48);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.confirm-panel {
  position: relative;
  width: 100%;
  max-height: calc(100dvh - 28px);
  box-sizing: border-box;
  overflow-y: auto;
  padding: 30px 30px 24px;
  border: 1px solid #dce7ef;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 27, 38, .24);
  text-align: center;
  animation: confirmIn .2s ease-out both;
}
@keyframes confirmIn {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.confirm-symbol {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin: 0 auto 15px;
  border-radius: 50%;
  background: #eaf5fd;
  color: #1d6fb7;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
}
.confirm-modal.is-danger .confirm-symbol { background: #fff0ee; color: #b42318; }
.confirm-modal.is-warning .confirm-symbol { background: #fff7e8; color: #a35a06; }
.confirm-eyebrow {
  color: #8b98a2;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.confirm-title {
  margin: 8px 0 0;
  color: #182833;
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -.035em;
}
.confirm-message {
  margin: 12px auto 0;
  max-width: 344px;
  color: #5b6872;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-line;
  word-break: break-word;
}
.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.confirm-actions .btn {
  min-width: 104px;
  height: 40px;
  padding: 0 18px;
  justify-content: center;
}
.confirm-modal.is-danger [data-confirm-ok] {
  border-color: #b42318;
  background: #b42318;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(180, 35, 24, .18);
}
.confirm-modal.is-danger [data-confirm-ok]:hover {
  border-color: #951c13;
  background: #951c13;
  color: #ffffff;
}
.confirm-modal.is-warning [data-confirm-ok] {
  border-color: #a35a06;
  background: #a35a06;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(163, 90, 6, .16);
}
.confirm-modal.is-warning [data-confirm-ok]:hover {
  border-color: #864a05;
  background: #864a05;
  color: #ffffff;
}
@media (max-width: 520px) {
  .modal.confirm-modal { width: calc(100vw - 28px); }
  .confirm-panel { padding: 26px 20px 20px; border-radius: 16px; }
  .confirm-title { font-size: 21px; }
  .confirm-message { font-size: 12.5px; }
  .confirm-actions { gap: 8px; margin-top: 21px; }
  .confirm-actions .btn { flex: 1 1 0; min-width: 0; padding: 0 10px; }
}

/* ---------- home visual band: light page-matched treatment ---------- */
body[data-page="home"] .home-visual-band {
  border-top-color: #d8eaf8;
  border-bottom-color: #d8eaf8;
  background:
    radial-gradient(circle at 82% 18%, rgba(66, 156, 235, .13), transparent 30%),
    radial-gradient(circle at 10% 84%, rgba(64, 206, 225, .10), transparent 32%),
    linear-gradient(180deg, #f4fbff 0%, #eaf6ff 100%);
  color: #18384d;
}
body[data-page="home"] .home-visual-band::before {
  background: repeating-linear-gradient(0deg, transparent 0 47px, rgba(47, 142, 216, .055) 47px 48px);
}
body[data-page="home"] .home-visual-band::after {
  background: radial-gradient(circle, rgba(72, 160, 240, .13), transparent 68%);
}
body[data-page="home"] .visual-band-head .eyebrow { color: #2f8ed8; }
body[data-page="home"] .visual-band-head h2 { color: #102f43; }
body[data-page="home"] .visual-band-head h2 em { color: #2f8ed8; }
body[data-page="home"] .visual-band-head p { color: #5e7381; }
body[data-page="home"] .visual-motion-strip {
  border-top-color: rgba(47, 142, 216, .18);
  color: #647b8c;
}
body[data-page="home"] .visual-motion-index { color: #7890a0; }
body[data-page="home"] .visual-motion-track b { color: #2f8ed8; }

/* ---------- home 3D game carousel ---------- */
.home-gallery-section {
  background: linear-gradient(180deg, #ffffff 0%, #f6fbff 68%, #ffffff 100%);
}
.game-carousel {
  position: relative;
  margin-top: 28px;
  padding: 0;
  outline: none;
}
.game-carousel:focus-visible { outline: 2px solid rgba(47, 142, 216, .45); outline-offset: 8px; border-radius: 24px; }
.game-carousel-stage {
  position: relative;
  height: clamp(330px, 42vw, 500px);
  perspective: 1500px;
  perspective-origin: 50% 48%;
  transform-style: preserve-3d;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
}
.game-carousel-stage:active { cursor: grabbing; }
.game-carousel-aura {
  position: absolute;
  left: 50%;
  top: 16%;
  width: min(72vw, 900px);
  height: 78%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(55, 156, 232, .15), rgba(126, 210, 255, .05) 48%, transparent 72%);
  filter: blur(16px);
  pointer-events: none;
}
.game-carousel-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(58%, 760px);
  aspect-ratio: 16 / 10;
  --carousel-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(142, 197, 232, .5);
  border-radius: var(--carousel-radius);
  background: #0a1b2a;
  box-shadow: 0 26px 56px rgba(22, 65, 96, .2), 0 2px 0 rgba(255, 255, 255, .55) inset;
  opacity: 0;
  pointer-events: none;
  backface-visibility: hidden;
  transform: translate(-50%, -50%);
  transition: transform .82s cubic-bezier(.18, 1.08, .3, 1), opacity .5s ease, box-shadow .4s ease;
  will-change: transform;
}
/* 切换动画期间图片会独立合成，父级的 border-radius 经常裁不住、瞬间露出直角。
   把裁剪下沉到内层并用 clip-path，外层卡片的边框与阴影不受影响。 */
.game-carousel-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  clip-path: inset(0 round var(--carousel-radius));
}
.game-carousel-card.is-active {
  border-color: rgba(102, 184, 238, .8);
  box-shadow: 0 34px 78px rgba(16, 61, 92, .3), 0 0 0 1px rgba(255, 255, 255, .35) inset;
}
.game-carousel-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  /* 基础放大量要能兜住下面的摆动位移，否则动画时边缘会露出卡片底色 */
  transform: scale(1.04);
  transition: transform .8s ease;
}
.game-carousel-card.is-active img { transform: scale(1.02); }
.game-carousel.is-switching .game-carousel-card.is-active img {
  animation: carouselImageSwing .95s cubic-bezier(.16, .84, .24, 1) both;
}
@keyframes carouselImageSwing {
  0% {
    /* 放大 1.16（左右各溢出 8%）远大于位移 4%，保证任何方向都不露边 */
    transform: scale(1.16) translateX(var(--carousel-from, 4%)) rotate(1.1deg);
    filter: brightness(1.07) saturate(1.05);
  }
  58% {
    transform: scale(1.07) translateX(calc(var(--carousel-from, 4%) * -0.16)) rotate(-.22deg);
    filter: brightness(1.02) saturate(1.02);
  }
  100% {
    transform: scale(1.02) translateX(0) rotate(0deg);
    filter: brightness(1) saturate(1);
  }
}
.game-carousel-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 18, 29, .06), transparent 36%, rgba(5, 15, 25, .62) 100%),
    linear-gradient(90deg, rgba(4, 17, 28, .28), transparent 35%, transparent 70%, rgba(4, 17, 28, .18));
  pointer-events: none;
}
.game-carousel-chip {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
  padding: 6px 9px;
  border: 1px solid rgba(207, 238, 255, .32);
  border-radius: 5px;
  background: rgba(7, 20, 32, .28);
  color: #e4f6ff;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .12em;
  backdrop-filter: blur(8px);
}
.game-carousel-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
  pointer-events: none;
}
.game-carousel-skeleton {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(58%, 760px);
  aspect-ratio: 16 / 10;
  transform: translate(-50%, -50%);
  border-radius: 22px;
  background: linear-gradient(120deg, #eaf5fd 10%, #d7ecfa 26%, #eef9ff 44%, #d9eefb 62%, #eaf5fd 80%);
  background-size: 240% 100%;
  animation: carouselSkeleton 1.6s linear infinite;
}
.game-carousel-skeleton:nth-child(1) { transform: translate(-50%, -50%) translateX(-34%) translateZ(-150px) rotateY(-12deg) scale(.9); opacity: .7; }
.game-carousel-skeleton:nth-child(3) { transform: translate(-50%, -50%) translateX(34%) translateZ(-150px) rotateY(12deg) scale(.9); opacity: .7; }
@keyframes carouselSkeleton {
  from { background-position: 100% 0; }
  to { background-position: -120% 0; }
}
.game-carousel-nav {
  position: absolute;
  top: 50%;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(47, 142, 216, .2);
  border-radius: 50%;
  background: rgba(255, 255, 255, .8);
  color: #1e5d8e;
  box-shadow: 0 10px 26px rgba(32, 79, 112, .13);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
.game-carousel-nav:hover {
  border-color: rgba(47, 142, 216, .45);
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}
.game-carousel-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.game-carousel-nav.is-prev { left: 3%; }
.game-carousel-nav.is-next { right: 3%; }
.game-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 14px;
  margin-top: 10px;
}
.game-carousel-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: #bfd9ec;
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
}
.game-carousel-dot:hover { background: #8dc1e5; }
.game-carousel-dot.is-active { width: 22px; background: #2f8ed8; }
.game-carousel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: #6f8596;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .1em;
}
.game-carousel-count { color: #2f8ed8; }
@media (max-width: 860px) {
  .game-carousel { margin-top: 22px; }
  .game-carousel-stage { height: clamp(300px, 48vw, 410px); }
  .game-carousel-card, .game-carousel-skeleton { width: min(68%, 620px); }
  .game-carousel-nav { width: 42px; height: 42px; }
  .game-carousel-nav.is-prev { left: 1.5%; }
  .game-carousel-nav.is-next { right: 1.5%; }
}
@media (max-width: 640px) {
  .game-carousel { margin-top: 16px; }
  .game-carousel-stage { height: 250px; }
  .game-carousel-card, .game-carousel-skeleton { width: 80%; border-radius: 16px; }
  .game-carousel-card { --carousel-radius: 16px; }
  .game-carousel-nav {
    top: auto;
    bottom: -4px;
    width: 36px;
    height: 36px;
    transform: none;
  }
  .game-carousel-nav:hover { transform: scale(1.04); }
  .game-carousel-nav.is-prev { left: 0; }
  .game-carousel-nav.is-next { right: 0; }
  .game-carousel-nav svg { width: 16px; height: 16px; }
  .game-carousel-chip { left: 12px; bottom: 11px; font-size: 7px; }
  .game-carousel-dots { margin-top: 2px; }
  .game-carousel-foot { margin-top: 10px; padding: 0 45px; font-size: 7px; }
}
@media (max-width: 420px) {
  .game-carousel-stage { height: 220px; }
  .game-carousel-card, .game-carousel-skeleton { width: 84%; }
}
@media (prefers-reduced-motion: reduce) {
  .game-carousel-card, .game-carousel-card img { transition: none; }
  .game-carousel.is-switching .game-carousel-card.is-active img { animation: none; }
  .game-carousel-skeleton { animation: none; }
}

/* ---------- admin home carousel ---------- */
.carousel-admin { display: grid; gap: 14px; margin-top: 18px; }
.carousel-admin-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  gap: 10px;
  min-height: 116px;
  padding: 12px;
  border: 1px dashed #cfe2f1;
  border-radius: 14px;
  background: #f7fbfe;
}
.carousel-admin-item {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid #d8e8f3;
  border-radius: 10px;
  background: #eaf4fb;
}
.carousel-admin-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.carousel-admin-item.is-pending { border-color: #7fbde8; box-shadow: 0 0 0 2px rgba(47, 142, 216, .12); }
.carousel-admin-index {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 3px 5px;
  border-radius: 4px;
  background: rgba(7, 26, 40, .62);
  color: #e4f6ff;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .08em;
}
.carousel-admin-item.is-pending .carousel-admin-index { background: #2f8ed8; }
/* 轮播图排序箭头：右下角一上一下 */
.carousel-admin-order {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  display: flex;
  gap: 3px;
}
.carousel-admin-order button {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, .9);
  color: #2f6f9e;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 34, 54, .18);
  transition: background .18s ease, color .18s ease;
}
.carousel-admin-order button:hover:not(:disabled) { background: #fff; color: #1d6fb7; }
.carousel-admin-order button:disabled { opacity: .38; cursor: not-allowed; }
.carousel-admin-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  background: rgba(7, 26, 40, .58);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.carousel-admin-remove:hover { background: #b42318; }
.carousel-admin-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 1 / -1;
  min-height: 88px;
  color: #7890a0;
  font-size: 12px;
  text-align: center;
}
.carousel-admin-controls { display: grid; gap: 9px; }
.carousel-admin-controls input[type="file"] { max-width: 100%; }
@media (max-width: 560px) {
  .carousel-admin-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 9px; }
  .carousel-admin-item { border-radius: 8px; }
}
/* ===== 浏览器标签页图标设置 ===== */
.site-favicon-panel {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 16px 0 22px;
  padding: 18px 20px;
  border: 1px solid #e1edf7;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fcff, #f2f9ff);
}
.site-favicon-copy { flex: 1 1 auto; min-width: 0; }
.site-favicon-copy .eyebrow { margin-bottom: 6px; }
.site-favicon-copy h3 {
  margin: 0 0 7px;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -.02em;
  color: #123249;
}
.site-favicon-copy p {
  margin: 0;
  max-width: 620px;
  font-size: 12.5px;
  line-height: 1.75;
  color: #6b8090;
}
.site-favicon-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 0 0 auto;
  min-width: 0;
}
.site-favicon-controls .image-upload-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 220px;
}
.site-favicon-controls .image-upload-copy input[type="file"] { width: 100%; }
.favicon-preview {
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #d9e8f4;
  border-radius: 20px;
  background:
    linear-gradient(45deg, #eef6fc 25%, transparent 25%, transparent 75%, #eef6fc 75%),
    linear-gradient(45deg, #eef6fc 25%, transparent 25%, transparent 75%, #eef6fc 75%),
    #fff;
  background-size: 12px 12px;
  background-position: 0 0, 6px 6px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
.favicon-preview img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.favicon-preview.is-empty { border-style: dashed; }
.site-favicon-controls .site-media-status {
  min-height: 16px;
  font-size: 11px;
  line-height: 1.5;
  color: #7e93a1;
}
@media (max-width: 860px) {
  .site-favicon-panel { flex-direction: column; align-items: stretch; gap: 16px; }
  .site-favicon-controls { justify-content: flex-start; }
  .site-favicon-controls .image-upload-copy { flex: 1 1 auto; min-width: 0; }
}
@media (max-width: 640px) {
  .site-favicon-panel { padding: 16px; border-radius: 16px; }
  .site-favicon-copy h3 { font-size: 20px; }
  .site-favicon-controls { align-items: flex-start; gap: 14px; }
  .favicon-preview { width: 76px; height: 76px; border-radius: 17px; }
  .favicon-preview img { width: 54px; height: 54px; }
}

/* FPS toolbox search: explicit submit so mobile keyboards can trigger it. */
.search-field { margin: 0; }
.search-field input { padding-right: 84px; }
.search-submit {
  position: absolute;
  top: 5px;
  right: 5px;
  bottom: 5px;
  min-width: 64px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: var(--lime);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
}
.search-submit:hover { background: var(--lime-2); }
.search-submit:active { transform: translateY(1px); }
.search-submit:focus-visible { outline: 2px solid color-mix(in srgb, var(--lime) 45%, transparent); outline-offset: 2px; }
@media (max-width: 640px) {
  .search-field input { padding-right: 76px; }
  .search-submit { min-width: 56px; padding: 0 9px; font-size: 11.5px; }
}

/* ---------- 站内音乐播放器（头部右上角） ---------- */

.music-widget { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.music-widget.is-empty { display: none; }

.music-disc-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #d9e8f5;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.music-disc-btn:hover { border-color: #b9d8ef; box-shadow: 0 6px 16px rgba(47, 142, 216, .16); }
.music-disc {
  position: relative;
  width: 27px;
  height: 27px;
  overflow: hidden;
  border-radius: 50%;
  /* 底纹是同心圆，旋转对称——光靠它转起来看不出来。
     这里叠两个偏离圆心的高光点，转动才真正“看得见”。 */
  background:
    /* 高光弧：唱片表面的反光，转起来最直观 */
    conic-gradient(from 200deg, rgba(255, 255, 255, 0) 0deg, rgba(255, 255, 255, .28) 42deg, rgba(255, 255, 255, 0) 84deg),
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, .95) 0 1.8px, rgba(255, 255, 255, 0) 2.8px),
    radial-gradient(circle at 70% 80%, rgba(142, 205, 255, .8) 0 1.3px, rgba(142, 205, 255, 0) 2.2px),
    repeating-radial-gradient(circle at 50% 50%, #17293c 0 1px, #24405a 1px 2.6px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  animation: musicSpin 3.6s linear infinite;
  animation-play-state: paused;
}
.music-disc::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #2f8ed8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55);
}
.music-disc::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 2;
  border-radius: 50%;
  background: #fff;
}
/* 播放时转，暂停时停在当前角度（用 play-state 而不是删掉动画，避免角度瞬间归零） */
/* 自定义唱片图：盖住内置纹路，跟着 .music-disc 一起旋转 */
.music-disc.has-image { background: #0f1a26; }
.music-disc.has-image::after,
.music-disc.has-image::before { display: none; }
.music-disc-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.music-widget.is-playing .music-disc { animation-play-state: running; }
@keyframes musicSpin { to { transform: rotate(360deg); } }

/* 唱针：静止时抬起，播放时落到唱片上 */
.music-arm {
  position: absolute;
  top: -2px;
  right: 1px;
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, #93a3b1, #5b6b79);
  transform-origin: 50% 2px;
  transform: rotate(-40deg);
  transition: transform .38s cubic-bezier(.3, 1.25, .45, 1);
}
.music-arm::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: #46545f;
}
.music-arm::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 1px;
  background: #2f8ed8;
}
.music-widget.is-playing .music-arm { transform: rotate(-6deg); }

.music-list-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #d9e8f5;
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.music-list-btn:hover { border-color: #b9d8ef; background: #f7fbff; }
.music-eq { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 14px; }
.music-eq i { width: 2.5px; height: 4px; border-radius: 2px; background: #2f8ed8; }
.music-widget.is-playing .music-eq i { animation: musicBar .9s ease-in-out infinite; }
.music-widget.is-playing .music-eq i:nth-child(2) { animation-delay: .15s; }
.music-widget.is-playing .music-eq i:nth-child(3) { animation-delay: .3s; }
@keyframes musicBar { 0%, 100% { height: 4px; } 50% { height: 14px; } }

.music-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  z-index: 80;
  width: min(336px, calc(100vw - 28px));
  padding: 15px;
  border: 1px solid #dbe8f4;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 24px 56px rgba(18, 56, 88, .2);
}
.music-panel::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 22px;
  width: 11px;
  height: 11px;
  border-left: 1px solid #dbe8f4;
  border-top: 1px solid #dbe8f4;
  background: #fff;
  transform: rotate(45deg);
}
.music-panel-head { display: flex; align-items: flex-start; gap: 10px; }
.music-now { min-width: 0; flex: 1; }
.music-now-label { display: block; color: #8d99a3; font-family: var(--mono); font-size: 9px; letter-spacing: .14em; }
.music-now strong { display: block; overflow: hidden; margin-top: 4px; color: #16324a; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.music-panel-close { flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: #f1f6fb; color: #607684; font-size: 17px; line-height: 1; cursor: pointer; }
.music-panel-close:hover { background: #e4eef8; color: #1e3a4d; }

.music-progress { margin-top: 12px; }
.music-progress input[type="range"] { width: 100%; height: 4px; margin: 0; accent-color: #2f8ed8; cursor: pointer; }
.music-times { display: flex; justify-content: space-between; margin-top: 5px; color: #8d99a3; font-family: var(--mono); font-size: 10px; }

.music-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }
.music-ctrl { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: #f3f8fd; color: #31566f; cursor: pointer; }
.music-ctrl svg { width: 15px; height: 15px; fill: currentColor; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.music-ctrl:hover { background: #e7f2fb; }
.music-ctrl.is-main { width: 42px; height: 42px; background: #2f8ed8; color: #fff; box-shadow: 0 8px 18px rgba(47, 142, 216, .28); }
.music-ctrl.is-main:hover { background: #1d6fb7; }
.music-ctrl.is-main svg { width: 17px; height: 17px; }

.music-volume { display: flex; align-items: center; gap: 9px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #eef5fb; }
.music-mute { flex: none; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: #f3f8fd; color: #31566f; cursor: pointer; }
.music-mute svg { width: 14px; height: 14px; fill: currentColor; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.music-mute:hover { background: #e7f2fb; }
.music-mute.is-muted { background: #fdf1f0; color: #b42318; }
.music-volume input[type="range"] { flex: 1; height: 4px; margin: 0; accent-color: #2f8ed8; cursor: pointer; }
.music-volume-value { flex: none; width: 38px; color: #8d99a3; font-family: var(--mono); font-size: 10px; text-align: right; }

/* 播放列表：列宽用 minmax(0,1fr) 兜住，否则长标题会把整列撑宽、冒出横向滚动条 */
.music-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  max-height: 236px;
  margin-top: 12px;
  padding-top: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid #eef5fb;
}
.music-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 9px; border: 0; border-radius: 9px; background: transparent; text-align: left; cursor: pointer; }
.music-item:hover { background: #f5faff; }
.music-item.is-active { background: #eaf5ff; }
.music-item-index { flex: none; width: 20px; color: #9aa6af; font-family: var(--mono); font-size: 10px; }
.music-item-title { min-width: 0; flex: 1; overflow: hidden; color: #274253; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.music-item.is-active .music-item-title { color: #1d6fb7; font-weight: 700; }
.music-item-mark { flex: none; color: #2f8ed8; font-family: var(--mono); font-size: 8px; letter-spacing: .1em; }
.music-empty { padding: 18px 8px; color: #97a2aa; font-size: 11.5px; text-align: center; }

@media (max-width: 640px) {
  .music-widget { gap: 4px; }
  .music-disc-btn { width: 32px; height: 32px; }
  .music-disc { width: 22px; height: 22px; }
  .music-disc::after { inset: 7px; }
  .music-disc::before { inset: 10px; }
  .music-arm { height: 12px; }
  /* 窄屏只留唱片机按钮，列表/进度改用面板（点唱片机打开） */
  .music-list-btn { display: none; }
  .header-actions:has(.music-widget:not(.is-empty)) { gap: 6px; }
  .header-actions:has(.music-widget:not(.is-empty)) .upload-cta { display: none; }
  .music-panel { width: min(320px, calc(100vw - 20px)); }
}

/* 后台音乐管理列表 */
.music-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #8b979f;
  font-family: var(--mono);
  font-size: 10px;
}
.music-admin-head #music-admin-count { color: #2f8ed8; font-weight: 700; letter-spacing: .04em; }
/* 曲目多时在卡片内滚动，不把整页撑长 */
.music-admin-list { display: grid; gap: 6px; max-height: 360px; overflow-y: auto; padding-right: 4px; scrollbar-gutter: stable; }
.music-admin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid #e4eef7;
  border-radius: 10px;
  background: #fbfdff;
}
.music-admin-index { flex: none; width: 20px; color: #9aa6af; font-family: var(--mono); font-size: 10px; }
.music-admin-main { min-width: 0; flex: 1; }
.music-admin-main strong { display: block; overflow: hidden; color: #22323f; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.music-admin-main small { display: block; margin-top: 2px; color: #8b979f; font-family: var(--mono); font-size: 10px; }
.music-admin-actions { flex: none; display: flex; align-items: center; gap: 4px; }
.music-admin-move {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #dbe8f3;
  border-radius: 7px;
  background: #fff;
  color: #4d7fa3;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.music-admin-move:hover:not(:disabled) { border-color: #a9cdea; background: #eaf5ff; color: #1d6fb7; }
.music-admin-move:disabled { opacity: .35; cursor: not-allowed; }

/* 行内改名输入框 */
.music-admin-rename {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid #a9cdea;
  border-radius: 8px;
  background: #fff;
  color: #22323f;
  font-family: var(--body);
  font-size: 12.5px;
}

/* 自定义转盘图案 */
.music-disc-admin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed #d8e7f3;
  border-radius: 12px;
  background: #fbfdff;
}
.music-disc-admin-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.music-disc-preview {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at 50% 50%, #17293c 0 1px, #24405a 1px 2.6px);
  box-shadow: inset 0 0 0 1px rgba(15, 26, 38, .18);
}
.music-disc-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.music-disc-preview-empty { color: #cfe0ee; font-family: var(--mono); font-size: 9px; }
.music-disc-admin-copy { min-width: 0; }
.music-disc-admin-copy strong { display: block; color: #22323f; font-size: 12.5px; }
.music-disc-admin-copy small { display: block; margin-top: 2px; color: #8b979f; font-size: 10.5px; line-height: 1.5; }

@media (max-width: 640px) {
  .music-disc-admin { flex-direction: column; align-items: stretch; }
}

/* 自定义细滚动条，列表再长也不难看 */
.music-admin-list::-webkit-scrollbar,
.music-list::-webkit-scrollbar { width: 6px; }
.music-admin-list::-webkit-scrollbar-thumb,
.music-list::-webkit-scrollbar-thumb { border-radius: 99px; background: #cfe2f1; }
.music-admin-list::-webkit-scrollbar-track,
.music-list::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 640px) {
  .music-admin-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .music-admin-actions { gap: 2px; }
}

/* 后台文件选择框：把原生控件换成站内按钮风格 */
body[data-page="admin"] input[type="file"] {
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px dashed #cfe2f3;
  border-radius: 10px;
  background: #f9fcff;
  color: #7d8a94;
  font-family: var(--body);
  font-size: 12px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
body[data-page="admin"] input[type="file"]:hover { border-color: #a9cdea; background: #f4fbff; }
body[data-page="admin"] input[type="file"]::-webkit-file-upload-button {
  margin-right: 10px;
  padding: 7px 14px;
  border: 1px solid #cfe2f3;
  border-radius: 8px;
  background: #fff;
  color: #1d6fb7;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
body[data-page="admin"] input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 7px 14px;
  border: 1px solid #cfe2f3;
  border-radius: 8px;
  background: #fff;
  color: #1d6fb7;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
body[data-page="admin"] input[type="file"]:hover::file-selector-button {
  border-color: #a9cdea;
  background: #eaf5ff;
  box-shadow: 0 4px 10px rgba(47, 142, 216, .14);
}

/* 社区：向下滚动后仍然可以随时发布（右下角，叠在通知铃铛上方） */
.community-fab {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 899;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: #17181c;
  color: #fff;
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(14, 34, 54, .28), inset 0 0 0 1px rgba(255, 255, 255, .12);
  opacity: 0;
  transform: translateY(14px) scale(.96);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease, background .2s ease;
}
.community-fab.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.community-fab:hover { background: #2f8ed8; }
.community-fab:active { transform: scale(.97); }

@media (max-width: 640px) {
  .community-fab { right: 14px; bottom: 74px; padding: 10px 15px; font-size: 12px; }
}
/* ---------- 社区帖子视频 ---------- */
.post-video-wrap { margin: 12px 0 4px; }
/* 高度跟随视频自身比例：不再用固定高度 + contain，避免上下出现黑色留边 */
.post-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  border-radius: 12px;
  background: #0b141c;
  object-fit: contain;
}
.weibo-video-box:empty { display: none; }
.weibo-video-box { margin: 10px 0; }
.weibo-video-item {
  position: relative;
  display: inline-block;
  max-width: 100%;
  padding: 8px;
  border: 1px solid #dbe8f3;
  border-radius: 12px;
  background: #f7fbff;
}
.weibo-video-item video {
  display: block;
  max-width: 240px;
  max-height: 160px;
  border-radius: 8px;
  background: #0b141c;
}
.weibo-video-meta {
  display: block;
  margin-top: 6px;
  color: #6d8598;
  font-family: var(--mono);
  font-size: 10px;
}
.weibo-video-item button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(7, 26, 40, .66);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
/* ---------- 影像卡片：窄屏浮层与裁切优化 ---------- */
@media (max-width: 640px) {
  /* 卡片比例改为固定宽高比，避免竖屏下把横向图裁成近乎方形 */
  .visual-feature { min-height: 0; aspect-ratio: 4 / 3; }
  .visual-side .visual-card { min-height: 0; aspect-ratio: 16 / 10; }
  /* 相机参数角标和右下小标签在窄屏会压在人物脸上，直接隐藏 */
  .visual-float-chip,
  .visual-mini-tag { display: none; }
  /* 底部加一层更实的渐变，保证标题在复杂画面上也读得清 */
  body[data-page="home"] .visual-feature::after,
  body[data-page="home"] .visual-city::after,
  body[data-page="home"] .visual-eye::after {
    background: linear-gradient(0deg, rgba(3, 14, 22, .95), rgba(3, 14, 22, .34) 46%, rgba(3, 14, 22, .04) 72%);
  }
  .visual-copy { right: 16px; bottom: 15px; left: 16px; }
  .visual-copy strong { font-size: 20px; }
  .visual-feature .visual-copy { right: 16px; }
  .visual-feature .visual-copy strong { font-size: 30px; }
  .visual-city .visual-copy,
  .visual-eye .visual-copy { right: 16px; left: 16px; }
  .visual-card-number { font-size: 56px; opacity: .55; }
  .visual-arrow { right: 16px; bottom: 14px; font-size: 11px; }
  /* 窄屏取消 4.5% 的放大，让图片正好卡在卡片圆角框内，不再“凸出” */
  .visual-card img,
  .visual-card video { transform: none; }
  .visual-card:hover img,
  .visual-card:hover video { transform: none; }
}
/* ---------- 圆角裁切兜底 ----------
   iOS Safari 对「父级 overflow:hidden + border-radius」裁切子元素并不可靠，
   表现为图片四个直角戳出圆角框。让媒体元素自己带圆角即可稳定裁切。 */
.visual-card .visual-media,
.visual-card .visual-media > img,
.visual-card .visual-media > video,
.visual-card > img,
.visual-card > video { border-radius: inherit; }
.post-image img,
.post-image video { border-radius: inherit; }
.weibo-video-item video { border-radius: 8px; }
