/* ============================================================
   XLG 战队站点样式 —— 深空星系 + 玻璃拟态
   ============================================================ */
:root {
  --bg: #050b1a;
  --fg: #eaf1fb;
  --muted: #9fb0d0;
  --primary: #6fb2ff;
  --primary-ink: #06122b;
  --line: rgba(255, 255, 255, 0.12);
  --glass: rgba(255, 255, 255, 0.05);
  --glass-strong: rgba(9, 18, 42, 0.72);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-border-active: rgba(111, 178, 255, 0.45);
  --radius: 12px;
  --shadow: 0 24px 70px -20px rgba(2, 6, 18, 0.75);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- 全站背景层（星系图，随滚动视差） ---------- */
#site-bg {
  position: fixed; inset: 0; z-index: -1;
  overflow: hidden; pointer-events: none;
  background: var(--bg);
}
#site-bg-img {
  position: absolute; left: 0; top: 0;
  width: 100%; height: 130%;
  object-fit: cover; object-position: center center;
  will-change: transform;
}
/* 压暗层：保证任意滚动位置下文字都清晰可读，同时透出星系背景 */
#site-bg::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5,11,26,.38) 0%, rgba(5,11,26,.14) 30%, rgba(5,11,26,.22) 65%, rgba(4,9,22,.62) 100%),
    radial-gradient(120% 90% at 50% 40%, rgba(5,11,26,.04) 0%, rgba(4,9,22,.38) 100%);
}

/* ---------- 场景层 ---------- */
section[id^="section-"] {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 96px 0;
  background: transparent;
  scroll-margin-top: 64px;
}
.bg-photo {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.veil { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.veil-hero {
  background:
    radial-gradient(120% 90% at 50% 38%, transparent 38%, rgba(4,9,22,.62) 100%),
    linear-gradient(180deg, rgba(5,11,26,.78) 0%, rgba(5,11,26,.28) 40%, rgba(5,11,26,.72) 100%);
}
.veil-mid {
  background:
    radial-gradient(100% 80% at 50% 45%, rgba(5,11,26,.08) 0%, rgba(4,9,22,.34) 78%),
    linear-gradient(180deg, rgba(5,11,26,.40), rgba(5,11,26,.46));
}
.veil-deep {
  background: linear-gradient(180deg, rgba(5,11,26,.46), rgba(4,9,22,.66));
}
.scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.stars-a, .stars-b {
  position: absolute; inset: -5% -2%;
  background-repeat: repeat;
}
.stars-a { opacity: .6; background-image:
  radial-gradient(1.5px 1.5px at 8% 12%, rgba(255,255,255,.9), transparent 60%),
  radial-gradient(1px 1px at 22% 34%, rgba(255,255,255,.7), transparent 60%),
  radial-gradient(2px 2px at 37% 18%, rgba(180,210,255,.9), transparent 60%),
  radial-gradient(1px 1px at 52% 62%, rgba(255,255,255,.6), transparent 60%),
  radial-gradient(1.5px 1.5px at 66% 28%, rgba(255,255,255,.85), transparent 60%),
  radial-gradient(1px 1px at 78% 72%, rgba(111,178,255,.9), transparent 60%),
  radial-gradient(1.5px 1.5px at 88% 16%, rgba(255,255,255,.7), transparent 60%),
  radial-gradient(1px 1px at 14% 78%, rgba(255,255,255,.55), transparent 60%),
  radial-gradient(2px 2px at 44% 86%, rgba(200,220,255,.8), transparent 60%),
  radial-gradient(1px 1px at 94% 54%, rgba(255,255,255,.7), transparent 60%),
  radial-gradient(1.5px 1.5px at 60% 92%, rgba(255,255,255,.6), transparent 60%),
  radial-gradient(1px 1px at 30% 52%, rgba(255,255,255,.5), transparent 60%);
}
.stars-b { opacity: .35; transform: scale(1.15); background-image:
  radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,.8), transparent 60%),
  radial-gradient(1.5px 1.5px at 28% 66%, rgba(160,200,255,.8), transparent 60%),
  radial-gradient(1px 1px at 46% 12%, rgba(255,255,255,.6), transparent 60%),
  radial-gradient(2px 2px at 62% 44%, rgba(255,255,255,.85), transparent 60%),
  radial-gradient(1px 1px at 74% 84%, rgba(255,255,255,.55), transparent 60%),
  radial-gradient(1px 1px at 84% 30%, rgba(111,178,255,.8), transparent 60%),
  radial-gradient(1.5px 1.5px at 96% 66%, rgba(255,255,255,.7), transparent 60%),
  radial-gradient(1px 1px at 4% 58%, rgba(255,255,255,.6), transparent 60%),
  radial-gradient(1px 1px at 38% 94%, rgba(255,255,255,.5), transparent 60%),
  radial-gradient(2px 2px at 70% 8%, rgba(190,215,255,.8), transparent 60%);
  background-size: 100% 100%;
}
.nebula { position: absolute; inset: 0; background:
  radial-gradient(42% 38% at 18% 30%, rgba(64,96,200,.22), transparent 65%),
  radial-gradient(38% 34% at 82% 68%, rgba(96,70,190,.16), transparent 65%),
  radial-gradient(30% 26% at 62% 18%, rgba(60,120,210,.14), transparent 65%);
}
.galaxy-core {
  position: absolute; left: 50%; top: 52%; width: 760px; height: 760px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(150,180,255,.20), rgba(86,104,214,.10) 32%, transparent 62%);
}
.galaxy-disk {
  position: absolute; left: 50%; top: 54%; width: 640px; height: 190px;
  transform: translate(-50%, -50%) rotate(-18deg);
  border-radius: 50%;
  box-shadow: 0 0 90px rgba(111,178,255,.18), inset 0 0 80px rgba(111,178,255,.14);
  border: 1px solid rgba(140,175,255,.14);
}
.planet {
  position: absolute; right: -190px; top: -140px; width: 480px; height: 480px;
  border-radius: 9999px;
  background: radial-gradient(circle at 32% 30%, #4368b4, #16284f 46%, #071026 78%);
  box-shadow: inset -34px -44px 100px rgba(0,0,0,.7), 0 0 100px rgba(111,178,255,.20), 0 0 260px rgba(111,178,255,.08);
}
.planet::before, .planet::after {
  content: ""; position: absolute; left: 8%; right: 8%; height: 26px; border-radius: 50%;
  background: linear-gradient(180deg, rgba(180,210,255,.10), rgba(180,210,255,.02));
}
.planet::before { top: 34%; } .planet::after { top: 52%; height: 18px; }
.planet-rise {
  position: absolute; left: -22%; bottom: -118vw; width: 144vw; height: 144vw;
  border-radius: 9999px;
  background: radial-gradient(circle at 42% 22%, #3f63ac, #15274e 38%, #081229 66%, #050b1a 82%);
  box-shadow: 0 -2px 0 rgba(160,200,255,.5), 0 -14px 46px rgba(111,178,255,.28), inset 0 80px 140px rgba(5,11,26,.85);
}
.wrap { position: relative; z-index: 10; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- 玻璃 ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.glass-strong {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.glass-card {
  border-radius: var(--radius);
  transition: border-color .2s, background-color .2s, transform .2s;
}
.glass-card:hover { border-color: var(--glass-border-active); background: rgba(111,178,255,.07); }

/* ---------- 导航 ---------- */
#site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 64px;
  background: rgba(7,14,34,.55);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.nav-inner { max-width: 1200px; height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.nav-logo { width: 38px; height: 38px; border-radius: 9999px; object-fit: cover; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); }
.nav-word { font-weight: 800; letter-spacing: .18em; font-size: 16px; line-height: 1.1; }
.nav-sub { font-size: 9px; letter-spacing: .26em; color: var(--muted); margin-top: 2px; }
.nav-menu { display: none; align-items: center; gap: 30px; font-size: 14px; }
@media (min-width: 860px) { .nav-menu { display: flex; } }
.nav-menu a { color: var(--muted); transition: color .15s; white-space: nowrap; }
.nav-menu a:hover, .nav-menu a.active { color: var(--fg); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: inline-flex; background: none; border: 0; color: var(--fg); }
@media (min-width: 860px) { .nav-toggle { display: none; } }
#mobile-nav { display: none; position: fixed; top: 64px; left: 0; right: 0; z-index: 49; padding: 10px 24px 18px; background: rgba(7,14,34,.94); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.1); }
#mobile-nav.open { display: block; }
#mobile-nav a { display: block; padding: 12px 4px; color: var(--muted); border-bottom: 1px solid rgba(255,255,255,.06); }

/* ---------- 按钮 / 标签 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; padding: 11px 22px; font-size: 14px; font-weight: 600; border: 1px solid transparent; transition: filter .15s, border-color .15s, color .15s, background-color .15s; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); color: var(--fg); }
.btn-ghost:hover { border-color: var(--glass-border-active); color: var(--primary); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 9999px; padding: 6px 15px; font-size: 13px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); }
.chip-active { border-color: rgba(111,178,255,.5); background: rgba(111,178,255,.16); color: var(--primary); }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .32em; color: var(--primary); }
.section-title { font-size: clamp(28px, 4vw, 46px); font-weight: 800; line-height: 1.2; margin-top: 14px; }
.section-lead { color: var(--muted); margin-top: 16px; max-width: 640px; }
.text-center .section-lead { margin-left: auto; margin-right: auto; }

/* ---------- 首屏 ---------- */
.hero-content { text-align: center; }
.hero-logo { width: 128px; height: 128px; margin: 0 auto; border-radius: 9999px; object-fit: cover; border: 2px solid rgba(255,255,255,.4); box-shadow: 0 0 60px rgba(111,178,255,.35); background: rgba(255,255,255,.08); cursor: pointer; }
.hero-title { font-size: clamp(64px, 10vw, 128px); font-weight: 900; letter-spacing: .12em; line-height: 1; margin-top: 26px; }
.hero-kicker { margin-top: 14px; font-size: clamp(11px, 1.4vw, 14px); letter-spacing: .5em; color: var(--primary); }
.hero-chips { margin-top: 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hero-chips .chip { padding: 8px 20px; font-size: 14px; }
.hero-lead { margin: 24px auto 0; max-width: 680px; color: var(--muted); }
.hero-cta { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.hero-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.hero-link:hover { color: var(--primary); }
.hero-stats { margin: 56px auto 0; max-width: 860px; border-radius: 18px; padding: 26px 20px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (min-width: 760px) { .hero-stats { grid-template-columns: repeat(4, 1fr); } }
.hero-stat .num { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; color: var(--primary); }
.hero-stat .label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.scroll-hint { margin-top: 44px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }

/* ---------- 关于 ---------- */
.about-grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 960px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-paras { margin-top: 22px; color: var(--muted); display: grid; gap: 16px; }
.timeline { margin-top: 34px; border-left: 1px solid rgba(255,255,255,.16); padding-left: 24px; display: grid; gap: 26px; }
.tl-year { color: var(--primary); font-weight: 700; font-size: 13px; }
.tl-title { font-weight: 600; margin-top: 2px; }
.tl-desc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.values-grid { display: grid; gap: 18px; }
@media (min-width: 520px) { .values-grid { grid-template-columns: 1fr 1fr; } }
.value-card { padding: 24px; }
.icon-tile { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(111,178,255,.15); color: var(--primary); margin-bottom: 16px; }
.value-card h3 { font-size: 16px; }
.value-card p { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ---------- 工具 ---------- */
.tools-grid { margin-top: 52px; display: grid; gap: 18px; }
@media (min-width: 700px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .tools-grid { grid-template-columns: repeat(3, 1fr); } }
.tool-card { padding: 24px; display: flex; flex-direction: column; }
.tool-name { margin-top: 4px; display: flex; align-items: baseline; gap: 10px; }
.tool-name b { font-size: 18px; }
.tool-name span { font-size: 11px; letter-spacing: .18em; color: var(--muted); }
.tool-desc { font-size: 13px; color: var(--muted); margin-top: 10px; flex: 1; }
.tag-row { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 12px; padding: 3px 10px; border-radius: 6px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: var(--muted); }
.tool-link { margin-top: 18px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--primary); }

/* ---------- 社群 ---------- */
.cat-row { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px; }
.topic-board { margin-top: 30px; border-radius: var(--radius); overflow: hidden; }
.topic-row { display: flex; align-items: center; gap: 16px; padding: 18px 20px; transition: background-color .15s; }
.topic-row + .topic-row { border-top: 1px solid rgba(255,255,255,.08); }
.topic-row:hover { background: rgba(255,255,255,.05); }
.topic-avatar { width: 40px; height: 40px; flex: none; border-radius: 9999px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--primary-ink); background: linear-gradient(135deg, #6fb2ff, #3b5ea8); }
.topic-main { min-width: 0; flex: 1; }
.topic-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topic-badge { font-size: 11px; padding: 2px 7px; border-radius: 4px; margin-right: 8px; }
.badge-top { background: rgba(111,178,255,.16); color: var(--primary); }
.badge-hot { background: rgba(255,255,255,.12); color: var(--fg); }
.topic-meta { margin-top: 4px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.topic-stats { display: none; align-items: center; gap: 18px; font-size: 12px; color: var(--muted); flex: none; }
@media (min-width: 640px) { .topic-stats { display: flex; } }
.topic-stats span { display: inline-flex; align-items: center; gap: 5px; }
.community-cta { margin-top: 34px; display: flex; justify-content: center; gap: 12px; }
.community-cta .btn { width: 100%; justify-content: center; }
.home-cat-chip { cursor: pointer; user-select: none; transition: all .2s; }
.home-cat-chip:hover { border-color: var(--glass-border-active); color: var(--fg); }
.home-forum-empty {
  margin-top: 18px; padding: 34px; text-align: center; color: var(--muted); font-size: 13.5px;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
}

/* ---------- 队员 ---------- */
.members-grid { margin-top: 52px; display: grid; gap: 18px; }
@media (min-width: 640px) { .members-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .members-grid { grid-template-columns: repeat(4, 1fr); } }
.member-card { padding: 24px; display: flex; flex-direction: column; }
.member-avatar {
  width: 100%; aspect-ratio: 16 / 10; min-height: 172px;
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 48px; font-weight: 900; color: var(--primary-ink); object-fit: cover;
  border: 1px solid var(--glass-border);
}
.avatar-grad-1 { background: linear-gradient(135deg, #6fb2ff, #2f4f9e); }
.avatar-grad-2 { background: linear-gradient(135deg, #7cc4ff, #3a4fb0); }
.avatar-grad-3 { background: linear-gradient(135deg, #5aa8ff, #27408a); }
.avatar-grad-4 { background: linear-gradient(135deg, #8fd0ff, #4160b8); }
.avatar-grad-5 { background: linear-gradient(135deg, #63a4ff, #33447f); }
.avatar-grad-6 { background: linear-gradient(135deg, #74b9ff, #2b4694); }
.avatar-grad-7 { background: linear-gradient(135deg, #9ccfff, #4d67b6); }
.avatar-grad-8 { background: linear-gradient(135deg, #5f9df5, #3a2f8f); }
.member-handle { margin-top: 14px; font-weight: 800; font-size: 18px; }
.member-role { margin-top: 2px; font-size: 13px; color: var(--primary); }
.member-quote { margin-top: 12px; font-size: 13px; color: var(--muted); flex: 1; }
.detail-btn { margin-top: 18px; width: 100%; border-radius: 8px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: var(--fg); padding: 9px 12px; font-size: 13px; font-weight: 600; transition: border-color .15s, color .15s; }
.detail-btn:hover { border-color: var(--glass-border-active); color: var(--primary); }
.member-edit-extra { display: none; text-align: left; margin-top: 14px; }
body.editing .member-edit-extra { display: block; }
.member-edit-extra > div[data-f] { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.topic-badge:empty { display: none; }

/* ---------- 页脚 ---------- */
#site-footer { position: relative; background: linear-gradient(180deg, rgba(5,11,26,.2), rgba(4,9,22,.95) 30%); border-top: 1px solid rgba(255,255,255,.1); }
.footer-grid { padding: 64px 24px 0; max-width: 1200px; margin: 0 auto; display: grid; gap: 40px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.3fr; } }
.footer-brand-row { display: flex; align-items: center; gap: 10px; }
.footer-logo { width: 40px; height: 40px; border-radius: 9999px; object-fit: cover; border: 1px solid rgba(255,255,255,.3); cursor: pointer; }
.footer-desc { margin-top: 14px; font-size: 13px; color: var(--muted); max-width: 300px; }
.footer-col h4 { font-size: 14px; }
.footer-col a, .footer-col li { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); list-style: none; }
.footer-col a:hover { color: var(--primary); }
.footer-contact { display: flex; align-items: flex-start; gap: 8px; }
.footer-res-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.footer-res-list a { margin-top: 0; }
.footer-contact-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.footer-contact-list .footer-contact { position: relative; margin-top: 0; flex-wrap: wrap; }
.footer-contact-list .chip-del { flex: none; }
body.editing .footer-res-item, body.editing .footer-contact { align-items: center; }
body.editing .footer-res-item { display: inline-flex; align-items: center; }
.footer-bottom { max-width: 1200px; margin: 48px auto 0; padding: 22px 24px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--muted); }
@media (min-width: 860px) { .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; } }

/* ---------- 弹窗 ---------- */
.modal-root { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-root[hidden] { display: none; }
.admin-bar[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.62); backdrop-filter: blur(6px); }
.modal-dialog { position: relative; width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; border-radius: 16px; padding: 32px; box-shadow: var(--shadow); }
.modal-close { position: absolute; right: 14px; top: 14px; background: none; border: 0; color: var(--muted); padding: 6px; border-radius: 8px; display: flex; }
.modal-close:hover { background: rgba(255,255,255,.08); color: var(--fg); }
.md-head { display: flex; gap: 18px; align-items: center; }
.md-avatar { width: 112px; height: 112px; border-radius: 24px; object-fit: cover; display: flex; align-items: center; justify-content: center; font-size: 42px; font-weight: 900; color: var(--primary-ink); flex: none; border: 1px solid var(--glass-border); }
.md-name { font-size: 22px; font-weight: 800; }
.md-role { font-size: 13px; color: var(--primary); margin-top: 2px; }
.md-loc { margin-top: 6px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.md-label { font-size: 11px; font-weight: 700; letter-spacing: .28em; color: var(--muted); margin-top: 26px; }
.md-bio { margin-top: 8px; font-size: 14px; }
.md-skills { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.md-stats { margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border-radius: 12px; padding: 16px; text-align: center; }
.md-stats .n { font-size: 20px; font-weight: 800; color: var(--primary); }
.md-stats .l { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---------- 登录弹窗 ---------- */
.login-dialog { max-width: 400px; text-align: center; padding: 36px 32px; }
.login-logo { width: 76px; height: 76px; margin: 0 auto; border-radius: 9999px; object-fit: cover; border: 2px solid rgba(255,255,255,.35); }
.login-title { margin-top: 18px; font-size: 20px; font-weight: 800; }
.login-sub { margin-top: 6px; font-size: 13px; color: var(--muted); }
.login-input { width: 100%; margin-top: 22px; padding: 12px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: var(--fg); font-size: 14px; outline: none; }
.login-input:focus { border-color: var(--glass-border-active); }
.login-input + .login-input { margin-top: 12px; }
.login-error { margin-top: 12px; font-size: 13px; color: #ff9b9b; }
.login-dialog .btn { margin-top: 20px; }
.login-foot { margin-top: 16px; font-size: 11px; color: rgba(159,176,208,.7); }

/* ---------- 队员登录 / 注册 ---------- */
.auth-tabs { display: flex; gap: 8px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 4px; }
.auth-tab { flex: 1; padding: 9px 0; border-radius: 7px; border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; }
.auth-tab.active { background: rgba(111,178,255,.22); color: var(--primary); }
.auth-field-label { display: block; margin-top: 16px; font-size: 12px; color: var(--muted); text-align: left; }
.auth-field-label + .login-input { margin-top: 8px; }
select.login-input option { background: #0c1a3a; color: var(--fg); }

/* 导航上的登录态 */
.nav-user { display: inline-flex; align-items: center; gap: 6px; }
.nav-user-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 130px; padding: 7px 12px; border-radius: 9999px; font-size: 13px; color: var(--primary); background: rgba(111,178,255,.12); border: 1px solid rgba(111,178,255,.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-user-logout { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: var(--muted); }
.nav-user-logout:hover { color: #ff9b9b; border-color: rgba(255,155,155,.5); }
@media (max-width: 560px) { .nav-user-chip { max-width: 84px; } .nav-user-chip i { display: none; } }

/* 社群发帖入口 */
.community-post-entry { display: flex; justify-content: flex-end; margin: 4px 0 14px; }

/* 发帖弹窗 */
#post-form { text-align: left; max-width: 460px; }
#post-form .login-title { text-align: center; margin-bottom: 14px; }
#post-author { color: var(--muted); }
.post-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.post-actions .btn { margin-top: 0; }

/* 管理员：账号信息表 */
.accounts-dialog { max-width: 560px; width: calc(100% - 32px); text-align: left; padding: 32px 28px; }
.accounts-dialog .login-title { margin-top: 0; }
.accounts-table-wrap { margin-top: 18px; max-height: 52vh; overflow-y: auto; }
.accounts-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.accounts-table th { text-align: left; padding: 10px 12px; color: var(--muted); font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.14); white-space: nowrap; }
.accounts-table td { padding: 11px 12px; border-bottom: 1px solid rgba(255,255,255,.07); }
.accounts-table tr:last-child td { border-bottom: 0; }
.accounts-name { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.accounts-table th:last-child, .accounts-table td:last-child { width: 52px; text-align: right; }
.account-del { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: var(--muted); }
.account-del:hover { color: #ff9b9b; border-color: rgba(255,155,155,.5); background: rgba(255,155,155,.08); }
.accounts-empty { padding: 30px 0; text-align: center; color: var(--muted); font-size: 14px; }
.accounts-loading { text-align: center; color: var(--muted); padding: 22px 0; }

/* ---------- 管理条 / Toast ---------- */
.admin-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 90; background: rgba(16,34,72,.96); border-bottom: 1px solid rgba(111,178,255,.4); backdrop-filter: blur(14px); }
.admin-bar-inner { max-width: 1200px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.admin-brand { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.admin-hint { flex: 1; font-size: 12px; color: var(--muted); min-width: 200px; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 7px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: var(--fg); }
.admin-btn:hover { border-color: var(--glass-border-active); color: var(--primary); }
.admin-btn-primary { background: var(--primary); color: var(--primary-ink); border-color: transparent; font-weight: 700; }
.admin-btn-primary:hover { color: var(--primary-ink); filter: brightness(1.08); }
body.editing { padding-top: 49px; }
body.editing #site-nav { top: 49px; }
body.editing #mobile-nav { top: 113px; }
.toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 100; background: rgba(12,26,56,.96); border: 1px solid var(--glass-border-active); color: var(--fg); padding: 12px 22px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow); }

/* ---------- 编辑态视觉 ---------- */
body.editing [data-bind],
body.editing [data-f] { outline: 1px dashed transparent; outline-offset: 3px; border-radius: 4px; transition: outline-color .15s, background-color .15s; cursor: text; }
body.editing [data-bind]:hover,
body.editing [data-f]:hover { outline-color: rgba(111,178,255,.65); background-color: rgba(111,178,255,.07); }
body.editing [data-bind]:focus,
body.editing [data-f]:focus { outline-color: var(--primary); background-color: rgba(111,178,255,.1); }
body.editing [data-bind-img],
body.editing [data-f-img],
body.editing .avatar-fallback { outline: 2px dashed rgba(111,178,255,.7); outline-offset: 2px; cursor: pointer; }
body.editing [data-bind-img]:hover,
body.editing [data-f-img]:hover,
body.editing .avatar-fallback:hover { outline-color: #9ccfff; filter: brightness(1.15); }
body.editing .detail-btn { display: none; }
.item-del, .chip-del { display: none; }
body.editing .item-del {
  display: inline-flex; position: absolute; top: 8px; right: 8px; z-index: 5;
  width: 26px; height: 26px; border-radius: 8px; align-items: center; justify-content: center;
  background: rgba(248,113,113,.18); border: 1px solid rgba(248,113,113,.5); color: #ffb0b0;
}
body.editing .item-del:hover { background: rgba(248,113,113,.32); color: #fff; }
[data-list-item] { position: relative; }
body.editing .chip-del { display: inline-flex; align-items: center; margin-left: 4px; opacity: .7; }
.chip-del:hover { opacity: 1; color: #ff9b9b; }
.chip-add { display: none; border-style: dashed; color: var(--primary); }
body.editing .chip-add { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.list-add { display: none; width: 100%; margin-top: 14px; padding: 14px; border-radius: var(--radius); border: 1.5px dashed rgba(111,178,255,.45); background: rgba(111,178,255,.05); color: var(--primary); font-size: 14px; font-weight: 600; align-items: center; justify-content: center; gap: 8px; }
body.editing .list-add { display: inline-flex; }
.list-add:hover { background: rgba(111,178,255,.12); }
[contenteditable]:empty::before { content: attr(data-empty); color: rgba(159,176,208,.55); }

/* ============================================================
   整屏 PPT 渐变翻页
   ============================================================ */
body.ppt { overflow: hidden; height: 100vh; }
#slide-viewport { position: fixed; inset: 0; z-index: 1; overflow: hidden; }
#slide-track {
  width: 100%; height: 100%;
  transition: transform .95s cubic-bezier(.72, 0, .22, 1);
  will-change: transform;
}
body.ppt .slide {
  position: relative;
  display: block;
  width: 100%; height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
/* 装饰层在自身边界内裁切，星星/行星外溢不参与滚动高度 */
body.ppt .slide > .scene { overflow: hidden; }
body.ppt .slide-inner {
  position: relative; z-index: 10;
  height: 100%;
  display: flex; flex-direction: column;
  justify-content: flex-start;
  justify-content: safe center; /* 内容超高时回退顶对齐，保证顶部可达 */
  padding: 92px 0 52px;
  overflow-x: hidden; overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
body.ppt .slide-inner::-webkit-scrollbar { width: 0; height: 0; }
body.ppt .slide.slide-footer .slide-inner { justify-content: flex-start; padding-top: 104px; }

/* 右侧分页指示器 */
#slide-dots {
  position: fixed; right: 24px; top: 50%; transform: translateY(-50%);
  z-index: 45; display: flex; flex-direction: column; gap: 13px;
}
#slide-dots button {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 9999px;
  background: rgba(255,255,255,.26); cursor: pointer;
  transition: transform .3s ease, background .3s ease, box-shadow .3s ease;
}
#slide-dots button:hover { background: rgba(255,255,255,.55); transform: scale(1.2); }
#slide-dots button.active {
  background: var(--primary); transform: scale(1.4);
  box-shadow: 0 0 14px rgba(111,178,255,.85);
}

/* 进入动画元素：未激活屏隐藏，激活屏逐级上浮淡入（渐变式） */
body.ppt .slide .hero-logo,
body.ppt .slide .hero-title,
body.ppt .slide .hero-kicker,
body.ppt .slide .hero-chips,
body.ppt .slide .hero-lead,
body.ppt .slide .hero-cta,
body.ppt .slide .hero-stats,
body.ppt .slide .scroll-hint,
body.ppt .slide .kicker,
body.ppt .slide .section-title,
body.ppt .slide .section-lead,
body.ppt .slide .about-grid,
body.ppt .slide .tools-grid,
body.ppt .slide .cat-row,
body.ppt .slide .community-post-entry,
body.ppt .slide .topic-board,
body.ppt .slide .community-cta,
body.ppt .slide .members-grid,
body.ppt .slide .footer-grid,
body.ppt .slide .footer-bottom {
  opacity: 0;
  transform: translate3d(0, 46px, 0) scale(.985);
  transition: opacity .65s ease, transform .9s cubic-bezier(.22,.61,.36,1);
  transition-delay: 0s;
}
body.ppt .slide.is-active .hero-logo,
body.ppt .slide.is-active .kicker,
body.ppt .slide.is-active .hero-kicker { opacity: 1; transform: none; transition-delay: .08s; }
body.ppt .slide.is-active .hero-title,
body.ppt .slide.is-active .section-title { opacity: 1; transform: none; transition-delay: .17s; }
body.ppt .slide.is-active .hero-chips,
body.ppt .slide.is-active .hero-lead,
body.ppt .slide.is-active .section-lead { opacity: 1; transform: none; transition-delay: .27s; }
body.ppt .slide.is-active .hero-cta,
body.ppt .slide.is-active .about-grid,
body.ppt .slide.is-active .tools-grid,
body.ppt .slide.is-active .cat-row,
body.ppt .slide.is-active .community-post-entry { opacity: 1; transform: none; transition-delay: .37s; }
body.ppt .slide.is-active .topic-board,
body.ppt .slide.is-active .members-grid,
body.ppt .slide.is-active .hero-stats,
body.ppt .slide.is-active .footer-grid { opacity: 1; transform: none; transition-delay: .47s; }
body.ppt .slide.is-active .community-cta,
body.ppt .slide.is-active .scroll-hint,
body.ppt .slide.is-active .footer-bottom { opacity: 1; transform: none; transition-delay: .57s; }

@media (prefers-reduced-motion: reduce) {
  #slide-track { transition: none; }
  body.ppt .slide .hero-logo, body.ppt .slide .hero-title, body.ppt .slide .hero-kicker,
  body.ppt .slide .hero-chips, body.ppt .slide .hero-lead, body.ppt .slide .hero-cta,
  body.ppt .slide .hero-stats, body.ppt .slide .scroll-hint, body.ppt .slide .kicker,
  body.ppt .slide .section-title, body.ppt .slide .section-lead, body.ppt .slide .about-grid,
  body.ppt .slide .tools-grid, body.ppt .slide .cat-row, body.ppt .slide .community-post-entry,
  body.ppt .slide .topic-board, body.ppt .slide .community-cta, body.ppt .slide .members-grid,
  body.ppt .slide .footer-grid, body.ppt .slide .footer-bottom {
    opacity: 1; transform: none; transition: none;
  }
}

/* 管理编辑模式：恢复自然文档流滚动，关闭翻页与入场动画 */
body.ppt.editing { overflow: auto; height: auto; }
body.ppt.editing #slide-viewport { position: static; overflow: visible; }
body.ppt.editing #slide-track { transform: none !important; height: auto; transition: none; }
body.ppt.editing .slide {
  height: auto; min-height: 100vh; overflow: visible;
}
body.ppt.editing .slide-inner {
  height: auto; overflow: visible; display: block;
  padding: 96px 0;
}
body.ppt.editing .slide.slide-footer .slide-inner { padding-top: 0; }
body.ppt.editing #slide-dots { display: none; }
body.ppt.editing .slide .hero-logo, body.ppt.editing .slide .hero-title,
body.ppt.editing .slide .hero-kicker, body.ppt.editing .slide .hero-chips,
body.ppt.editing .slide .hero-lead, body.ppt.editing .slide .hero-cta,
body.ppt.editing .slide .hero-stats, body.ppt.editing .slide .scroll-hint,
body.ppt.editing .slide .kicker, body.ppt.editing .slide .section-title,
body.ppt.editing .slide .section-lead, body.ppt.editing .slide .about-grid,
body.ppt.editing .slide .tools-grid, body.ppt.editing .slide .cat-row,
body.ppt.editing .slide .community-post-entry, body.ppt.editing .slide .topic-board,
body.ppt.editing .slide .community-cta, body.ppt.editing .slide .members-grid,
body.ppt.editing .slide .footer-grid, body.ppt.editing .slide .footer-bottom {
  opacity: 1 !important; transform: none !important; transition: none;
}

/* 小屏适配 */
@media (max-width: 640px) {
  body.ppt .slide-inner { padding: 84px 0 40px; }
  body.ppt .slide.slide-footer .slide-inner { padding-top: 92px; }
  #slide-dots { right: 12px; gap: 10px; }
  #slide-dots button { width: 8px; height: 8px; }
}

/* ============================================================
   独立子页面（论坛全列表 / 帖子详情 / 图鉴 / 地图 / 训练营）
   ============================================================ */
.subpage {
  position: fixed; inset: 0; z-index: 40;
  overflow-y: auto; overflow-x: hidden;
  background: linear-gradient(180deg, rgba(5,11,26,.94) 0%, rgba(7,14,34,.96) 100%);
  padding-top: 88px; padding-bottom: 80px;
  animation: subFade .35s ease both;
}
@keyframes subFade { from { opacity: 0; } to { opacity: 1; } }
body.ppt.in-sub { overflow: hidden; }
.subpage-inner { min-height: 100%; }
.sub-topbar {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding-top: 18px; padding-bottom: 18px;
}
.sub-crumbs {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 13px;
}
.sub-crumbs .crumb-current { color: var(--primary); font-weight: 600; }
.sub-wrap { max-width: 1080px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.sub-title {
  font-size: clamp(30px, 4.4vw, 46px); line-height: 1.15; letter-spacing: -.02em;
  margin: 6px 0 14px; font-weight: 800;
  background: linear-gradient(120deg, #fff, #a9cdfb);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub-footnav { margin-top: 26px; display: flex; justify-content: center; }
.sub-missing {
  text-align: center; padding: 90px 24px; display: flex; flex-direction: column;
  align-items: center; gap: 14px; color: var(--muted);
}

/* ---- 论坛全列表 ---- */
.forum-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin: 26px 0 18px;
}
.forum-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.forum-filter {
  border: 1px solid var(--line); background: rgba(255,255,255,.04);
  color: var(--muted); border-radius: 999px; padding: 7px 15px; font-size: 13px;
  transition: all .2s;
}
.forum-filter:hover { color: var(--fg); border-color: var(--glass-border-active); }
.forum-filter.chip-active {
  color: var(--primary-ink); font-weight: 700;
  background: linear-gradient(135deg, #8cc6ff, #5ea2ff);
  border-color: transparent;
}
.forum-empty {
  margin-top: 18px; padding: 44px; text-align: center; color: var(--muted);
  border: 1.5px dashed var(--line); border-radius: var(--radius);
}
.topic-row-link { cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.topic-row-link:hover { background: rgba(111,178,255,.08); transform: translateY(-1px); }
.topic-edit-btn {
  flex: none; width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--muted);
  margin-right: 4px;
}
.topic-edit-btn:hover { color: var(--primary); border-color: var(--glass-border-active); }

/* ---- 帖子 / 教程详情 ---- */
.topic-detail {
  border-radius: 20px; padding: clamp(24px, 4vw, 46px);
  background: linear-gradient(180deg, rgba(16,28,58,.72), rgba(9,18,42,.82));
  border: 1px solid var(--glass-border); box-shadow: var(--shadow);
}
.topic-detail-head { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 26px; }
.topic-detail-title { font-size: clamp(24px, 3.2vw, 34px); line-height: 1.3; margin: 10px 0 14px; font-weight: 800; }
.topic-detail-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 13px; }
.topic-detail-meta span { display: inline-flex; align-items: center; gap: 5px; }
.topic-detail-actions { margin-top: 16px; }
.topic-detail-body { font-size: 15.5px; color: #d8e4f8; }
.topic-detail-body .post-p { margin: 0 0 18px; line-height: 1.95; white-space: normal; }
.topic-detail-body .post-h {
  font-size: 19px; font-weight: 800; margin: 30px 0 14px; color: #fff;
  padding-left: 12px; border-left: 3px solid var(--primary);
}
.topic-detail-body .post-figure { margin: 22px 0; text-align: center; }
.topic-detail-body .post-figure img {
  max-width: 100%; max-height: 520px; margin: 0 auto; border-radius: 14px;
  border: 1px solid var(--glass-border); box-shadow: var(--shadow);
}
.topic-detail-body .post-figure figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.blocks-empty {
  padding: 40px; text-align: center; color: var(--muted); font-size: 14px;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}

/* ---- 干员图鉴 ---- */
.codex-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 22px; margin-top: 30px;
}
.codex-card {
  position: relative; display: flex; gap: 22px; padding: 22px;
  border-radius: 18px; border: 1px solid var(--glass-border);
  background: linear-gradient(160deg, rgba(18,32,66,.6), rgba(9,18,42,.7));
  transition: transform .25s, border-color .25s;
}
.codex-card:hover { transform: translateY(-3px); border-color: var(--glass-border-active); }
.codex-media { flex: none; }
.codex-img {
  width: 150px; height: 190px; object-fit: cover; border-radius: 14px;
  border: 1px solid var(--glass-border);
}
.codex-img-fallback {
  display: flex; align-items: center; justify-content: center;
  font-size: 56px; font-weight: 800; color: rgba(255,255,255,.9);
  cursor: pointer;
}
body.editing .codex-img, body.editing .codex-img-fallback { cursor: pointer; outline: 1.5px dashed transparent; }
body.editing .codex-img:hover, body.editing .codex-img-fallback:hover { outline-color: var(--glass-border-active); }
.codex-info { flex: 1; min-width: 0; }
.codex-name { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.codex-name b { font-size: 22px; font-weight: 800; }
.codex-name span { font-size: 12px; letter-spacing: .14em; color: var(--muted); }
.codex-role {
  display: inline-block; margin: 8px 0 14px; padding: 3px 12px; font-size: 12px; font-weight: 700;
  border-radius: 999px; color: var(--primary-ink);
  background: linear-gradient(135deg, #8cc6ff, #5ea2ff);
}
.codex-attrs { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.codex-attrs th, .codex-attrs td {
  text-align: left; padding: 8px 10px; font-size: 13.5px;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.codex-attrs th { width: 84px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.codex-attrs td { color: #e4edfb; }
.attr-add-row td { text-align: center; padding-top: 10px; }
.attr-add { display: none; align-items: center; gap: 6px; margin: 0 auto;
  border: 1.5px dashed rgba(111,178,255,.45); background: rgba(111,178,255,.05);
  color: var(--primary); border-radius: 10px; padding: 7px 14px; font-size: 13px; }
body.editing .attr-add { display: inline-flex; }
.attr-del-cell { width: 26px; }
.codex-desc { font-size: 13.5px; color: var(--muted); line-height: 1.8; margin-top: 6px; }
.codex-card > .item-del { top: 12px; right: 12px; }

/* ---- 战术地图 ---- */
.maps-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 22px; margin-top: 26px;
}
.maps-grid:empty { display: none; }
.map-card { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--glass-border); }
.map-media { width: 100%; aspect-ratio: 16 / 9; background: rgba(255,255,255,.03); }
.map-img { width: 100%; height: 100%; object-fit: cover; }
.map-img-fallback {
  width: 100%; height: 100%; display: flex; flex-direction: column; gap: 10px;
  align-items: center; justify-content: center; color: var(--muted); cursor: pointer;
  background: rgba(111,178,255,.04);
}
.map-card figcaption { padding: 16px 18px; }
.map-card figcaption b { font-size: 17px; font-weight: 800; }
.map-card figcaption p { color: var(--muted); font-size: 13.5px; margin-top: 6px; line-height: 1.8; }
.map-card > .item-del { top: 10px; right: 10px; z-index: 2; background: rgba(5,11,26,.6); }
.maps-placeholder {
  margin-top: 26px; min-height: 460px; border-radius: 22px;
  border: 2.5px dashed rgba(111,178,255,.35);
  background:
    radial-gradient(circle at 20% 20%, rgba(111,178,255,.07), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(132,108,255,.07), transparent 55%),
    rgba(255,255,255,.02);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; text-align: center; padding: 40px; color: var(--muted);
}
.maps-placeholder svg { color: var(--primary); opacity: .8; }
.maps-placeholder-note { font-size: 22px; font-weight: 800; color: #cfe1fb; letter-spacing: .04em; }
.maps-placeholder-hint { font-size: 13.5px; max-width: 420px; line-height: 1.9; }
.maps-placeholder.has-items { display: none; }

/* ---- 新兵训练营 ---- */
.lesson-list { display: flex; flex-direction: column; gap: 18px; margin-top: 28px; }
.lesson-card { position: relative; border-radius: 18px; border: 1px solid var(--glass-border); padding: 0; overflow: hidden; }
.lesson-main { display: block; padding: 24px 28px; transition: background .2s; }
.lesson-main:hover { background: rgba(111,178,255,.06); }
.lesson-main h3 { font-size: 21px; font-weight: 800; margin-bottom: 8px; padding-right: 90px; }
.lesson-meta { color: var(--muted); font-size: 13px; display: flex; gap: 8px; margin-bottom: 10px; }
.lesson-summary { color: #c7d6f0; font-size: 14.5px; line-height: 1.9; }
.lesson-open {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  color: var(--primary); font-weight: 700; font-size: 14px;
}
.lesson-card > .item-del { top: 16px; right: 16px; }
.lesson-edit-hint {
  margin: 0 26px 18px; padding: 12px 16px; font-size: 13px; color: var(--muted);
  border-radius: 10px; background: rgba(111,178,255,.07); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
}
.lesson-edit-extra { display: none; padding: 18px 28px 24px; border-top: 1px dashed var(--line); }
body.editing .lesson-edit-extra { display: block; }

/* ---- 管理模式：图文块编辑（教程） ---- */
.blocks-edit { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 4px; }
.block-row {
  position: relative; display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 38px 8px 8px; border-radius: 10px; background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
}
.block-row .item-del {
  position: static; display: none; flex: none; margin-top: 4px;
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(248,113,113,.08); color: #ff9b9b;
  align-items: center; justify-content: center;
}
body.editing .block-row .item-del { display: inline-flex; }
.block-text {
  flex: 1; resize: none; min-height: 40px; padding: 9px 12px;
  background: transparent; border: none; outline: none;
  color: var(--fg); font: inherit; font-size: 14.5px; line-height: 1.85;
}
.block-text-h { font-size: 16.5px; font-weight: 800; color: #fff; }
.block-img { width: 220px; max-height: 150px; object-fit: cover; border-radius: 8px; flex: none; cursor: pointer; }
.block-img-fallback {
  width: 220px; height: 110px; flex: none; border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted);
  border: 1.5px dashed rgba(111,178,255,.4); background: rgba(111,178,255,.05);
}
.block-cap {
  flex: 1; align-self: center; padding: 9px 12px; border-radius: 8px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  color: var(--fg); font: inherit; font-size: 13px; outline: none;
}
.block-cap:focus { border-color: var(--glass-border-active); }
.block-add-bar { display: none; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
body.editing .block-add-bar { display: flex; }
.block-add {
  border: 1.5px dashed rgba(111,178,255,.45); background: rgba(111,178,255,.05);
  color: var(--primary); border-radius: 999px; padding: 6px 13px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
}

/* ---- 发帖弹窗：图文编辑器 ---- */
.post-dialog { max-width: 680px; width: min(680px, calc(100vw - 32px)); max-height: 88vh; overflow-y: auto; }
.post-blocks {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 10px; min-height: 80px;
}
.pb-row {
  position: relative; display: flex; align-items: flex-start; gap: 10px;
  padding: 6px 38px 6px 4px;
}
.pb-text {
  flex: 1; resize: none; min-height: 40px; padding: 10px 12px;
  border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: var(--fg);
  font: inherit; font-size: 14.5px; line-height: 1.8; outline: none;
}
.pb-text:focus { border-color: var(--glass-border-active); }
.pb-text-h { font-size: 16px; font-weight: 800; }
.pb-img {
  flex: none; width: 230px; display: flex; flex-direction: column; gap: 6px;
}
.pb-img img { width: 100%; max-height: 170px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.pb-cap {
  flex: 1; align-self: center; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04);
  color: var(--fg); font: inherit; font-size: 13px; outline: none;
}
.pb-cap:focus { border-color: var(--glass-border-active); }
.pb-del {
  flex: none; width: 28px; height: 28px; margin-top: 6px;
  border-radius: 8px; border: 1px solid var(--line);
  background: rgba(248,113,113,.08); color: #ff9b9b;
  display: inline-flex; align-items: center; justify-content: center;
}
.pb-toolbar { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .codex-grid { grid-template-columns: 1fr; }
  .codex-card { flex-direction: column; }
  .codex-img { width: 100%; height: 240px; }
  .maps-grid { grid-template-columns: 1fr; }
  .subpage { padding-top: 76px; }
  .pb-img { width: 100%; }
}

/* ---- 帖子评论 ---- */
.topic-comments {
  margin-top: 22px; border-radius: 20px; padding: clamp(20px, 3.4vw, 34px);
  background: linear-gradient(180deg, rgba(16,28,58,.55), rgba(9,18,42,.65));
  border: 1px solid var(--glass-border); box-shadow: var(--shadow);
}
.comments-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 800; margin-bottom: 18px;
}
.comments-title svg { color: var(--primary); }
.comment-count {
  min-width: 22px; text-align: center; font-size: 12px; font-weight: 700;
  padding: 1px 8px; border-radius: 999px;
  background: rgba(111,178,255,.16); color: var(--primary);
}
.comment-list { display: flex; flex-direction: column; gap: 16px; }
.comment-item { display: flex; gap: 12px; align-items: flex-start; }
.comment-avatar {
  width: 38px; height: 38px; flex: none; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: var(--primary-ink);
  background: linear-gradient(135deg, #6fb2ff, #3b5ea8);
}
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.comment-meta b { color: #dce8fb; font-size: 13px; }
.comment-del {
  margin-left: auto; border: 0; background: none; color: var(--muted);
  padding: 3px; border-radius: 6px; display: inline-flex; cursor: pointer;
}
.comment-del:hover { color: #ff9b9b; background: rgba(248,113,113,.1); }
.comment-text { margin-top: 5px; font-size: 14px; line-height: 1.8; color: #cfdcf3; white-space: pre-wrap; word-break: break-word; }
.comments-empty {
  padding: 28px; text-align: center; color: var(--muted); font-size: 13.5px;
  border: 1.5px dashed var(--line); border-radius: var(--radius); margin-bottom: 18px;
}
.comment-form {
  display: flex; align-items: flex-end; gap: 10px; margin-top: 20px;
  padding-top: 18px; border-top: 1px solid var(--line);
}
.comment-form-avatar-fallback {
  width: 38px; height: 38px; flex: none; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: var(--primary-ink);
  background: linear-gradient(135deg, #8cc6ff, #5ea2ff);
}
#comment-text {
  flex: 1; resize: none; min-height: 44px; max-height: 220px; padding: 10px 13px;
  border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: var(--fg);
  font: inherit; font-size: 14px; line-height: 1.7; outline: none;
}
#comment-text:focus { border-color: var(--glass-border-active); }
.comment-form .btn { flex: none; }
.comment-login-tip {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13.5px;
}
@media (max-width: 640px) {
  .comment-form { flex-wrap: wrap; }
  #comment-text { flex-basis: 100%; }
}

/* ---------- 加入 XLG 弹窗 ---------- */
.join-dialog { max-width: 400px; text-align: center; padding: 36px 30px; }
.join-logo { width: 76px; height: 76px; margin: 0 auto; border-radius: 9999px; object-fit: cover; border: 2px solid rgba(255,255,255,.35); }
.join-title { margin-top: 16px; font-size: 21px; font-weight: 800; }
.join-sub { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.join-qq-card { margin-top: 22px; border-radius: 14px; padding: 20px 16px 18px; }
.join-qq-label { font-size: 11px; font-weight: 700; letter-spacing: .28em; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 7px; }
.join-qq-num { margin-top: 10px; font-size: 30px; font-weight: 900; color: var(--primary); letter-spacing: .08em; user-select: all; cursor: text; }
.join-qq-card .btn { margin-top: 16px; }
.join-note { margin-top: 18px; font-size: 12px; color: var(--muted); line-height: 1.7; }
@media (max-width: 640px) {
  .join-dialog { padding: 30px 22px; }
  .join-qq-num { font-size: 26px; }
}
