/* ==========================================================================
   银河娱乐会馆 / 共享站点样式
   文件路径：/assets/site.css
   职责：reset、变量、中文排版、轨道式页头、舱底页脚、通用按钮、
        面包屑、正文容器、网格、面板、图片容器与基础交互组件。
   页面特色布局请写入各自页面 CSS，不要在此覆盖外壳结构。
   ========================================================================== */

/* ---------- 1. 变量 ---------- */
:root {
  --ink-900: #0B1026;
  --ink-850: #0A0E22;
  --ink-800: #101A3A;
  --ink-700: #151F3F;
  --violet: #7B5CFF;
  --violet-soft: #A996FF;
  --silver: #C9D2E3;
  --white: #F5F7FF;
  --gold: #F2B35C;
  --gold-hi: #FFC978;
  --teal: #6FE3D4;
  --muted: #8B96B3;
  --line: rgba(201, 210, 227, 0.14);
  --line-2: rgba(201, 210, 227, 0.28);
  --violet-line: rgba(123, 92, 255, 0.42);

  --rail-w: 264px;
  --content-max: 1160px;
  --gutter: clamp(18px, 3.4vw, 56px);

  --font-body: "PingFang SC", "Noto Sans SC", "Source Han Sans SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "SFMono-Regular", "JetBrains Mono", Menlo,
    Consolas, "Roboto Mono", "Courier New", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
h4,
h5,
p,
ul,
ol,
li,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg {
  max-width: 100%;
  display: block;
}

img {
  height: auto;
}

button {
  font: inherit;
  color: inherit;
}

main {
  display: block;
}

#main-content {
  scroll-margin-top: 24px;
}

#main-content:focus {
  outline: none;
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  padding-left: var(--rail-w);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(820px 620px at 88% -8%, rgba(123, 92, 255, 0.2), transparent 68%),
    radial-gradient(680px 520px at -6% 22%, rgba(123, 92, 255, 0.1), transparent 70%),
    radial-gradient(760px 620px at 62% 108%, rgba(111, 227, 212, 0.07), transparent 70%),
    repeating-linear-gradient(90deg, rgba(201, 210, 227, 0.028) 0 1px, transparent 1px 128px);
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
  background-attachment: fixed, fixed, fixed, scroll;
  color: var(--silver);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  color: var(--white);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.14;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

a {
  color: var(--violet-soft);
}

strong {
  color: var(--white);
  font-weight: 700;
}

::selection {
  background: rgba(123, 92, 255, 0.45);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  padding: 12px 20px;
  background: var(--gold);
  color: #1A1206;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transform: translateY(-130%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
}

/* ---------- 5. 轨道式页头 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 60;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  padding: 26px 0 22px;
  background: linear-gradient(180deg, #121D42 0%, var(--ink-900) 58%, #090D1F 100%);
  border-right: 1px solid var(--line);
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--violet) 18%, var(--violet-soft) 46%, transparent 82%);
  opacity: 0.85;
  pointer-events: none;
}

.rail-brand {
  padding: 0 22px 22px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  background: linear-gradient(140deg, var(--violet-soft), var(--violet) 55%, #4B34C4);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  background: var(--ink-900);
  clip-path: inherit;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand-name {
  color: var(--white);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-sub {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
}

.nav-toggle-text {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: inherit;
}

.site-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding-top: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.site-nav::-webkit-scrollbar {
  width: 4px;
}

.site-nav::-webkit-scrollbar-thumb {
  background: rgba(201, 210, 227, 0.18);
}

.rail-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.rail-caption::before {
  content: "";
  flex: none;
  width: 14px;
  height: 1px;
  background: var(--violet);
}

.rail-caption--tight {
  padding: 0 0 4px;
}

.nav-list {
  display: flex;
  flex-direction: column;
}

.nav-link {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 11px 22px 11px 20px;
  border-left: 2px solid transparent;
  color: var(--silver);
  font-size: 14.5px;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.nav-idx {
  color: rgba(139, 150, 179, 0.75);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  transition: color 0.18s var(--ease);
}

.nav-label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nav-link:hover {
  background: rgba(123, 92, 255, 0.1);
  border-left-color: var(--violet-line);
  color: var(--white);
}

.nav-link:hover .nav-idx {
  color: var(--violet-soft);
}

.nav-link[aria-current="page"] {
  background: linear-gradient(90deg, rgba(123, 92, 255, 0.22), rgba(123, 92, 255, 0.02));
  border-left-color: var(--violet);
  color: var(--white);
  font-weight: 600;
}

.nav-link[aria-current="page"] .nav-idx {
  color: var(--gold);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  background: var(--gold);
  transform: rotate(45deg);
}

.rail-utility {
  margin-top: auto;
  padding: 18px 22px 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rail-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(123, 92, 255, 0.1);
  border: 1px solid var(--violet-line);
  color: var(--white);
  font-size: 13px;
  text-decoration: none;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.rail-chip:hover {
  background: rgba(123, 92, 255, 0.22);
  border-color: var(--violet-soft);
}

.chip-arrow {
  flex: none;
  color: var(--violet-soft);
  font-family: var(--font-mono);
  font-size: 11px;
}

.copy-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.01em;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease),
    background-color 0.18s var(--ease);
}

.copy-value {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.copy-hint {
  flex: none;
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

.copy-btn:hover {
  border-color: var(--gold);
  color: var(--white);
}

.copy-btn[data-copied="true"] {
  border-color: var(--teal);
  color: var(--teal);
}

.copy-btn[data-copied="true"] .copy-hint {
  color: var(--teal);
}

.rail-time {
  padding-top: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
}

/* ---------- 6. 舱底页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(48px, 7vw, 104px);
  padding: clamp(44px, 5.6vw, 84px) var(--gutter) 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(21, 31, 63, 0) 0%, rgba(10, 14, 34, 0.85) 30%, #080B1C 100%);
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(560px, 46%);
  height: 1px;
  background: linear-gradient(90deg, var(--violet), var(--violet-soft) 40%, transparent);
}

.site-footer::after {
  content: "星港";
  position: absolute;
  right: -0.06em;
  bottom: -0.3em;
  z-index: 0;
  color: transparent;
  font-size: clamp(120px, 20vw, 260px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.06em;
  -webkit-text-stroke: 1px rgba(123, 92, 255, 0.16);
  pointer-events: none;
}

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(0, 0.85fr));
  gap: clamp(28px, 3.4vw, 56px);
  max-width: var(--content-max);
  margin: 0 auto;
  padding-bottom: clamp(36px, 4.6vw, 64px);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.brand--footer {
  grid-template-columns: 30px minmax(0, 1fr);
}

.brand--footer .brand-mark {
  width: 30px;
  height: 30px;
}

.brand--footer .brand-mark::after {
  inset: 8px;
}

.footer-summary {
  max-width: 34ch;
  color: var(--silver);
  font-size: 14.5px;
  line-height: 1.85;
  opacity: 0.86;
}

.footer-col {
  min-width: 0;
}

.footer-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
}

.footer-heading::before {
  content: "";
  flex: none;
  width: 16px;
  height: 1px;
  background: var(--violet);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-list a {
  display: inline-block;
  color: var(--silver);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer-list a:hover {
  color: var(--white);
}

.footer-list a:focus-visible {
  color: var(--gold);
}

.footer-list--plain li {
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  word-break: break-word;
}

.footer-list--plain li:last-child {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
}

.footer-base {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 20px 0 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.footer-copy,
.footer-icp {
  color: var(--muted);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-legal a {
  color: var(--silver);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer-legal a:hover {
  color: var(--violet-soft);
}

/* ---------- 7. 容器与网格 ---------- */
.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(36px, 5.4vw, 88px);
}

.section--tight {
  padding-block: clamp(22px, 3.2vw, 46px);
}

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
}

.grid {
  display: grid;
  gap: var(--gap, clamp(16px, 2vw, 28px));
}

.grid--12 {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.grid--12 > * {
  grid-column: span 12;
}

@media (min-width: 880px) {
  .grid--12 > .span-3 {
    grid-column: span 3;
  }
  .grid--12 > .span-4 {
    grid-column: span 4;
  }
  .grid--12 > .span-5 {
    grid-column: span 5;
  }
  .grid--12 > .span-6 {
    grid-column: span 6;
  }
  .grid--12 > .span-7 {
    grid-column: span 7;
  }
  .grid--12 > .span-8 {
    grid-column: span 8;
  }
  .grid--12 > .span-12 {
    grid-column: span 12;
  }
}

/* ---------- 8. 文本组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--violet-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 22px;
  height: 1px;
  background: currentColor;
}

.lead {
  max-width: 46ch;
  color: var(--white);
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  line-height: 1.8;
  opacity: 0.92;
}

.prose {
  max-width: 66ch;
}

.prose p {
  max-width: 66ch;
}

.prose p + p {
  margin-top: 1.05em;
}

.prose h2 + p,
.prose h3 + p {
  margin-top: 0.9em;
}

.prose a {
  color: var(--violet-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  background: rgba(123, 92, 255, 0.1);
  border: 1px solid var(--violet-line);
  color: var(--violet-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- 9. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #1A1206;
}

.btn--gold:hover {
  background: var(--gold-hi);
  border-color: var(--gold-hi);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--white);
}

.btn--ghost:hover {
  background: rgba(123, 92, 255, 0.1);
  border-color: var(--violet-soft);
  color: var(--violet-soft);
}

.btn--small {
  padding: 10px 18px;
  font-size: 13px;
}

/* ---------- 10. 面包屑 ---------- */
.crumbs {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.crumbs li {
  display: inline-flex;
  align-items: center;
}

.crumbs li + li::before {
  content: "/";
  margin: 0 9px;
  color: rgba(201, 210, 227, 0.32);
}

.crumbs a {
  color: var(--silver);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.crumbs a:hover {
  color: var(--violet-soft);
}

.crumbs [aria-current="page"] {
  color: var(--violet-soft);
}

/* ---------- 11. 面板 ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 2.6vw, 32px);
  background: linear-gradient(180deg, rgba(21, 31, 63, 0.9), rgba(16, 26, 58, 0.72));
  border: 1px solid var(--line);
}

.panel--accent::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 2px;
  background: linear-gradient(180deg, var(--violet), var(--violet-soft));
}

/* ---------- 12. 图片容器（页面阶段放入 img） ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(155deg, #16224A 0%, #0D1533 46%, #101A3A 100%);
  border: 1px solid var(--line);
}

.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.media::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet-line), transparent);
  pointer-events: none;
}

.media--wide {
  aspect-ratio: 21 / 9;
}

.media--floor {
  aspect-ratio: 4 / 3;
}

.media--portrait {
  aspect-ratio: 3 / 4;
}

.media--square {
  aspect-ratio: 1 / 1;
}

.media--empty::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(123, 92, 255, 0.28), transparent 60%),
    repeating-linear-gradient(135deg, rgba(201, 210, 227, 0.05) 0 1px, transparent 1px 26px);
}

.media-caption {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

/* ---------- 13. 主题筛选 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filter-btn {
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--silver);
  font-family: var(--font-body);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
    color 0.18s var(--ease);
}

.filter-btn:hover {
  border-color: var(--violet-soft);
  color: var(--white);
}

.filter-btn[aria-pressed="true"] {
  background: rgba(123, 92, 255, 0.2);
  border-color: var(--violet);
  color: var(--white);
}

.filter-count {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

[data-filter-item][hidden] {
  display: none !important;
}

/* ---------- 14. 手风琴 ---------- */
.acc {
  border-top: 1px solid var(--line);
}

.acc-item {
  border-bottom: 1px solid var(--line);
}

.acc-trigger {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 4px;
  background: transparent;
  border: 0;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  text-align: left;
  cursor: pointer;
  transition: color 0.18s var(--ease);
}

.acc-trigger::after {
  content: "+";
  flex: none;
  color: var(--violet-soft);
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1.4;
  transition: transform 0.24s var(--ease), color 0.18s var(--ease);
}

.acc-trigger:hover {
  color: var(--violet-soft);
}

.acc-trigger[aria-expanded="true"]::after {
  content: "−";
  color: var(--gold);
}

.acc-panel {
  padding: 0 4px 20px;
}

.acc-panel[hidden] {
  display: none;
}

.acc-panel p {
  color: var(--silver);
  font-size: 15px;
}

/* ---------- 15. 滚动进度与返回顶部（JS 创建） ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  z-index: 100;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--violet-soft) 60%, var(--gold));
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--ink-700);
  border: 1px solid var(--line-2);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease),
    visibility 0.24s var(--ease), border-color 0.18s var(--ease);
}

.to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.to-top-arrow {
  color: var(--gold);
  font-size: 13px;
  line-height: 1;
}

/* ---------- 16. 显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.56s var(--ease), transform 0.56s var(--ease);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 17. 平板断点 ---------- */
@media (max-width: 1199px) and (min-width: 960px) {
  :root {
    --rail-w: 232px;
  }
}

@media (max-width: 959px) {
  :root {
    --rail-w: 0px;
  }

  body {
    padding-left: 0;
    padding-top: 64px;
  }

  #main-content {
    scroll-margin-top: 80px;
  }

  .site-header {
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 64px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: linear-gradient(180deg, #131E45, #0B1026);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .site-header::before {
    display: none;
  }

  .rail-brand {
    position: relative;
    z-index: 90;
    padding: 0;
    border-bottom: 0;
  }

  .brand {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .brand-mark::after {
    inset: 7px;
  }

  .brand-name {
    font-size: 14.5px;
    letter-spacing: 0.1em;
  }

  .brand-sub {
    font-size: 8.5px;
    letter-spacing: 0.14em;
  }

  .nav-toggle {
    position: relative;
    z-index: 90;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--line-2);
    color: var(--white);
    cursor: pointer;
    transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
  }

  .nav-toggle:hover {
    border-color: var(--violet-soft);
  }

  .site-header[data-open] .nav-toggle {
    border-color: var(--violet);
    color: var(--white);
  }

  .nav-toggle-bars {
    position: relative;
    display: block;
    width: 18px;
    height: 12px;
  }

  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.24s var(--ease), opacity 0.24s var(--ease);
  }

  .nav-toggle-bars::before {
    top: 0;
    box-shadow: 0 5px 0 currentColor;
  }

  .nav-toggle-bars::after {
    bottom: 0;
  }

  .site-header[data-open] .nav-toggle-bars::before {
    transform: translateY(5px) rotate(45deg);
    box-shadow: none;
  }

  .site-header[data-open] .nav-toggle-bars::after {
    transform: translateY(-5px) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    width: min(74vw, 306px);
    padding: 84px 0 28px;
    background: linear-gradient(180deg, #121D42, #090D1F 80%);
    border-right: 1px solid var(--line-2);
    overflow-y: auto;
    visibility: hidden;
    transform: translateX(-102%);
    transition: transform 0.28s var(--ease), visibility 0.28s var(--ease);
  }

  .site-header[data-open] .site-nav {
    visibility: visible;
    transform: translateX(0);
  }

  .site-header[data-open]::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    background: rgba(6, 9, 22, 0.72);
  }

  .rail-utility {
    margin-top: 28px;
  }

  .scroll-progress {
    left: 0;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ---------- 18. 手机断点 ---------- */
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .to-top {
    padding: 9px 12px;
    font-size: 11px;
  }
}

/* ---------- 19. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .site-nav {
    transition: none;
  }

  .to-top {
    transition: none;
  }
}
