/* ==========================================================================
   VG棋牌官方 · 共享样式
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
  background: #07061A;
}

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

ul, ol { list-style: none; }

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

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

table { border-collapse: collapse; width: 100%; }

/* ---------- 2. Tokens ---------- */
:root {
  /* 色彩 */
  --ink: #07061A;
  --panel: #101235;
  --zone: #1E1A56;
  --stone: #8C8AA0;
  --paper: #F2EFE6;
  --neon: #35E8DA;
  --gold: #F0B03C;
  --moss: #58A27C;
  --magenta: #FF3C9B;
  --clay: #C97A56;

  --paper-soft: rgba(242, 239, 230, 0.78);
  --paper-dim: rgba(242, 239, 230, 0.58);
  --line: rgba(140, 138, 160, 0.28);
  --line-soft: rgba(140, 138, 160, 0.16);
  --line-strong: rgba(140, 138, 160, 0.5);
  --hair: 1px solid var(--line);
  --hair-strong: 1px solid var(--line-strong);

  /* 尺寸 */
  --rail-w: 272px;
  --tilebar-h: 60px;
  --content-max: 1180px;
  --narrow-max: 760px;
  --cut: 6px;

  /* 字体 */
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;

  --fs-2xs: 11px;
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-md: 20px;
  --fs-lg: 28px;
  --fs-xl: 40px;
  --fs-2xl: 56px;
  --fs-3xl: 72px;

  --sp-1: 6px;
  --sp-2: 10px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 36px;
  --sp-6: 56px;
  --sp-7: 88px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 3. Base ---------- */
body {
  min-height: 100vh;
  background: transparent;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0;
  padding-bottom: calc(var(--tilebar-h) + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}

/* 牌背纹理 + 霓虹晕染，强度压在 4% 以内 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--ink);
  background-image:
    repeating-linear-gradient(45deg, rgba(140, 138, 160, 0.035) 0 1px, transparent 1px 11px),
    repeating-linear-gradient(-45deg, rgba(140, 138, 160, 0.035) 0 1px, transparent 1px 11px),
    radial-gradient(900px 520px at 88% -8%, rgba(53, 232, 218, 0.07), transparent 72%),
    radial-gradient(760px 460px at -12% 100%, rgba(255, 60, 155, 0.055), transparent 72%);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--paper);
}
h1 { font-size: clamp(30px, 5.6vw, 56px); }
h2 { font-size: clamp(24px, 3.6vw, 40px); }
h3 { font-size: clamp(19px, 2.4vw, 28px); }
h4 { font-size: 18px; letter-spacing: -0.01em; }

p { color: var(--paper-soft); }

strong, b { color: var(--paper); font-weight: 700; }

em { font-style: normal; }

small { font-size: var(--fs-xs); color: var(--stone); }

a {
  color: var(--neon);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}
a:hover { color: #7CF7EF; }

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

::selection {
  background: var(--neon);
  color: var(--ink);
}

/* ---------- 4. Layout ---------- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: var(--sp-4);
  padding-right: var(--sp-4);
}

.container--narrow { max-width: var(--narrow-max); }

.section { padding: var(--sp-6) 0; }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.section__kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--neon);
  margin-bottom: var(--sp-1);
}

.section__title {
  font-size: clamp(22px, 3.4vw, 40px);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.grid { display: grid; gap: var(--sp-4); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.divider {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: var(--sp-5) 0;
}

.notch {
  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
}

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}

/* ---------- 5. Components ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 11px 18px;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  border: 1px solid transparent;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn--block { width: 100%; }

.btn--neon {
  background: var(--neon);
  border-color: var(--neon);
  color: var(--ink);
}
.btn--neon:hover {
  background: rgba(53, 232, 218, 0.1);
  color: var(--neon);
}

.btn--gold {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
}
.btn--gold:hover {
  background: rgba(240, 176, 60, 0.14);
  color: var(--gold);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--paper);
}
.btn--ghost:hover {
  border-color: var(--neon);
  color: var(--neon);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: transparent;
  white-space: nowrap;
}
.tag--neon { color: var(--neon); }
.tag--gold { color: var(--gold); }
.tag--moss { color: var(--moss); }
.tag--clay { color: var(--clay); }
.tag--magenta { color: var(--magenta); }
.tag--stone { color: var(--stone); }

.panel {
  position: relative;
  padding: var(--sp-4);
  background: var(--panel);
  border: var(--hair);
  border-radius: 3px;
}
.panel--sunken { background: rgba(7, 6, 26, 0.62); }
.panel--zone { background: var(--zone); }

.panel__title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-2);
}

.panel__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.12em;
  color: var(--stone);
}

.card {
  position: relative;
  padding: 22px 20px 20px;
  background: var(--panel);
  border: var(--hair);
  border-radius: 3px;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 26px;
  height: 2px;
  background: var(--neon);
}
.card:hover { border-color: rgba(53, 232, 218, 0.5); }

.card__title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-1);
}

.card__body {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--paper-soft);
}

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  line-height: 1.05;
  color: var(--gold);
}
.stat__label {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.16em;
  color: var(--stone);
}

.data-list { border-top: var(--hair); }

.data-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: var(--sp-3);
  align-items: center;
  padding: 12px 0;
  border-bottom: var(--hair);
}
.data-row__key {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: var(--stone);
}
.data-row__val { font-size: 14.5px; color: var(--paper); }

.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #101235 0%, #1E1A56 100%);
  border: var(--hair);
  border-radius: 3px;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(53, 232, 218, 0.05) 0 1px, transparent 1px 4px);
}

.media-frame__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(7, 6, 26, 0) 0%, rgba(7, 6, 26, 0.92) 100%);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  color: var(--stone);
}

.prose {
  max-width: 38em;
  font-size: var(--fs-base);
  line-height: 1.75;
  color: var(--paper-soft);
}
.prose p + p { margin-top: 1.2em; }
.prose h2 { margin: 1.6em 0 0.6em; }
.prose h3 { margin: 1.4em 0 0.5em; }
.prose ul, .prose ol { margin: 1em 0; padding-left: 1.2em; }
.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--neon); }
.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--gold);
  background: rgba(16, 18, 53, 0.9);
  border: 1px solid var(--line-soft);
  padding: 1px 5px;
  border-radius: 2px;
}
.prose blockquote {
  margin: 1.4em 0;
  padding: 4px 0 4px 16px;
  border-left: 2px solid var(--neon);
  color: var(--paper);
}

.breadcrumbs {
  padding: var(--sp-3) 0 0;
  font-size: var(--fs-xs);
}
.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1);
}
.breadcrumbs__item { display: flex; align-items: center; gap: var(--sp-1); }
.breadcrumbs__item + .breadcrumbs__item::before {
  content: "/";
  color: rgba(140, 138, 160, 0.5);
}
.breadcrumbs__link { color: var(--stone); }
.breadcrumbs__link:hover { color: var(--neon); }
.breadcrumbs__current { color: var(--paper); }

.toc {
  padding-left: 14px;
  border-left: 2px solid var(--line);
}
.toc__list { display: flex; flex-direction: column; gap: 2px; }
.toc__link {
  display: block;
  padding: 5px 0;
  font-size: var(--fs-sm);
  color: var(--stone);
  text-decoration: none;
}
.toc__link:hover { color: var(--paper); }
.toc__link.is-active,
.toc__link[aria-current="true"] {
  color: var(--neon);
  font-weight: 700;
}

/* ---------- 6. Header ---------- */
.site-header {
  position: relative;
  z-index: 60;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--neon);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 2px;
  text-decoration: none;
  transition: top 0.18s var(--ease);
}
.skip-link:hover { color: var(--ink); }
.skip-link:focus { top: 14px; color: var(--ink); }

.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 90;
  background: rgba(140, 138, 160, 0.18);
  pointer-events: none;
}
.read-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--neon);
  box-shadow: 0 0 12px rgba(53, 232, 218, 0.8);
  transition: width 0.1s linear;
}

/* 移动端底部牌条（桌面隐藏） */
.tilebar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  align-items: center;
  gap: var(--sp-2);
  height: calc(var(--tilebar-h) + env(safe-area-inset-bottom, 0px));
  padding: 0 12px env(safe-area-inset-bottom, 0px);
  background: linear-gradient(180deg, rgba(16, 18, 53, 0.98) 0%, rgba(7, 6, 26, 0.99) 100%);
  border-top: 1px solid rgba(53, 232, 218, 0.28);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.55);
}

.tilebar__brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--paper);
  white-space: nowrap;
  padding-right: 10px;
  border-right: var(--hair);
}
.tilebar__mark {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--neon);
  margin-right: 5px;
}

.tilebar__scroll {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  overflow-x: auto;
  overflow-y: hidden;
  padding: var(--sp-2) 2px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tilebar__scroll::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  scroll-snap-align: center;
  padding: 6px 11px;
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--paper-soft);
  background: rgba(30, 26, 86, 0.55);
  border: 1px solid var(--line);
  border-radius: 2px;
  text-decoration: none;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
              background-color 0.18s var(--ease);
}
.chip:hover {
  color: var(--neon);
  border-color: rgba(53, 232, 218, 0.5);
}
.chip[aria-current="page"] {
  color: var(--ink);
  background: var(--neon);
  border-color: var(--neon);
  font-weight: 700;
}
.chip--legacy {
  color: var(--magenta);
  border-color: rgba(255, 60, 155, 0.5);
  background: rgba(255, 60, 155, 0.1);
}
.chip--legacy:hover {
  color: var(--magenta);
  border-color: var(--magenta);
}

.nav-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(30, 26, 86, 0.6);
  color: var(--paper);
  border: var(--hair-strong);
  border-radius: 2px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
              background-color 0.18s var(--ease);
}
.nav-toggle:hover { border-color: var(--neon); color: var(--neon); }
.nav-toggle[aria-expanded="true"] {
  border-color: var(--neon);
  color: var(--neon);
  background: rgba(53, 232, 218, 0.12);
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 14px;
  height: 11px;
}
.nav-toggle__bars i {
  display: block;
  height: 1.5px;
  background: currentColor;
}
.nav-toggle__bars i:nth-child(2) { width: 9px; }

.nav-toggle__text { letter-spacing: 0.08em; }

/* 侧边轨道导航（桌面主体） */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 65;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: 26px 20px 20px;
  background: linear-gradient(175deg, #0C0B24 0%, #101235 55%, #1E1A56 100%);
  border-right: var(--hair);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.rail::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(140, 138, 160, 0.06) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(140, 138, 160, 0.05) 0 1px, transparent 1px 34px);
}
.rail > * { position: relative; z-index: 1; }
.rail::-webkit-scrollbar { width: 8px; }
.rail::-webkit-scrollbar-thumb { background: rgba(140, 138, 160, 0.32); }

.rail__brand {
  padding-bottom: 18px;
  border-bottom: var(--hair);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
}
.brand:hover { color: var(--paper); }

.brand__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--ink);
  border: 1px solid rgba(53, 232, 218, 0.55);
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
}

.brand__text { display: block; min-width: 0; }
.brand__name {
  display: block;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.brand__tagline {
  display: block;
  margin-top: 3px;
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.5;
  color: var(--stone);
}

.rail__nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: navi;
}

.rail__label {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--stone);
}

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

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 9px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--paper-soft);
  border-left: 2px solid transparent;
  border-radius: 2px;
  text-decoration: none;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease);
}
.nav-link::before {
  counter-increment: navi;
  content: counter(navi, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.06em;
  color: var(--stone);
}
.nav-link:hover {
  color: var(--neon);
  background: rgba(53, 232, 218, 0.08);
  border-left-color: rgba(53, 232, 218, 0.5);
}
.nav-link[aria-current="page"] {
  color: var(--neon);
  font-weight: 700;
  background: linear-gradient(90deg, rgba(53, 232, 218, 0.16) 0%, rgba(53, 232, 218, 0) 100%);
  border-left-color: var(--neon);
}
.nav-link[aria-current="page"]::before { color: var(--neon); }

.rail__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding-top: 18px;
  border-top: var(--hair);
}

.legacy-entry {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 11px 12px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--paper);
  background: rgba(255, 60, 155, 0.09);
  border: 1px solid rgba(255, 60, 155, 0.5);
  border-radius: 2px;
  text-decoration: none;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease),
              box-shadow 0.18s var(--ease);
}
.legacy-entry:hover,
.legacy-entry:focus-visible {
  color: var(--paper);
  border-color: var(--magenta);
  background: rgba(255, 60, 155, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 60, 155, 0.55);
}

.legacy-entry__dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 10px rgba(255, 60, 155, 0.9);
  animation: legacy-pulse 2.6s ease-in-out infinite;
}

.legacy-entry__label { letter-spacing: 0.02em; }

.legacy-entry__badge {
  margin-left: auto;
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--magenta);
  border: 1px solid rgba(255, 60, 155, 0.5);
}

@keyframes legacy-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- 7. Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: var(--sp-7);
  background: linear-gradient(180deg, #0A0920 0%, #141140 100%);
  border-top: 1px solid rgba(53, 232, 218, 0.2);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(90deg, rgba(140, 138, 160, 0.07) 0 1px, transparent 1px 68px);
}
.site-footer > * { position: relative; z-index: 1; }

.footer__grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(120px, 1fr));
  gap: var(--sp-5) var(--sp-4);
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-4) var(--sp-5);
}

.footer__brand { max-width: 340px; }

.footer__brandline {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--stone);
}

.footer__col { display: flex; flex-direction: column; }

.footer__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.footer__list { display: flex; flex-direction: column; gap: 2px; }

.footer__link {
  display: inline-block;
  padding: 5px 0;
  font-size: var(--fs-sm);
  color: var(--paper-soft);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}
.footer__link:hover { color: var(--neon); }

.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 20px var(--sp-4) 28px;
  border-top: var(--hair);
  font-size: var(--fs-xs);
  color: var(--stone);
}

.footer__contact { font-size: var(--fs-xs); color: var(--stone); }

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--stone);
}

.footer__icp { color: var(--stone); }

/* ---------- 8. Motion ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal="2"] { transition-delay: 0.07s; }
[data-reveal="3"] { transition-delay: 0.14s; }

@keyframes anchor-flash {
  0% {
    background-color: rgba(53, 232, 218, 0.18);
    box-shadow: inset 0 0 0 1px rgba(53, 232, 218, 0.5);
  }
  100% {
    background-color: transparent;
    box-shadow: inset 0 0 0 1px transparent;
  }
}
.is-flash { animation: anchor-flash 1.2s var(--ease) both; }

/* ---------- 9. Responsive ---------- */
@media (min-width: 1024px) {
  body {
    padding-left: var(--rail-w);
    padding-bottom: 0;
  }
  .tilebar { display: none; }
  .rail { transform: none; visibility: visible; }
}

@media (max-width: 1023px) {
  .tilebar { display: flex; }

  .rail {
    top: auto;
    left: 0;
    right: 0;
    bottom: var(--tilebar-h);
    width: auto;
    max-height: min(76vh, 600px);
    padding: 20px 18px 22px;
    border-right: 0;
    border-top: 1px solid rgba(53, 232, 218, 0.3);
    background: linear-gradient(180deg, #12133A 0%, #07061A 100%);
    box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.7);
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 0.28s var(--ease), visibility 0.28s var(--ease);
  }
  .rail[data-open] {
    transform: translateY(0);
    visibility: visible;
  }

  .rail__brand { display: none; }
  .rail__nav { gap: 10px; }
  .nav-list { gap: 1px; }
  .nav-link { padding: 11px 12px; font-size: 15px; }
}

@media (max-width: 1023px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  :root {
    --fs-xl: 32px;
    --fs-2xl: 42px;
    --fs-3xl: 52px;
  }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .data-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px var(--sp-3);
  }
  .data-row__key { grid-column: 1 / -1; }
  .footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-4);
    padding: var(--sp-5) var(--sp-4) var(--sp-4);
  }
  .footer__brand { max-width: none; }
  .section { padding: var(--sp-5) 0; }
}

@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;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
