/* ============================================================
   乐鱼赛场 · 共享外壳样式 /assets/site.css
   气质来源：赛场边沿实时看板 —— 深海墨蓝底 / 电光青数据线 /
   珊瑚橙状态点 / 暖纸白阅读面。堆叠面板式布局 + 侧边轨道导航。
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --ink-900: #0B1F33;
  --ink-850: #08192A;
  --ink-800: #12304D;
  --ink-700: #2C4359;
  --paper: #F6F1E7;
  --paper-dim: #E4DCCC;
  --cyan: #22D3C5;
  --cyan-soft: #A8F0E7;
  --coral: #FF6B4A;
  --amber: #F2B441;
  --mist: #8AA0B4;
  --line: #2C4359;
  --text: #E7EEF5;
  --text-soft: #C8D6E2;
  --text-dim: #8AA0B4;
  --text-invert: #0B1F33;

  --rail-w: 108px;
  --rail-h: 58px;
  --wrap: 1180px;
  --r: 2px;
  --sp: clamp(16px, 2.2vw, 30px);

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

  --shadow-1: 0 1px 0 rgba(255,255,255,.03), 0 18px 38px -28px rgba(0,0,0,.8);
  --shadow-paper: 0 14px 32px -24px rgba(11,31,51,.6);
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--rail-h) + 16px);
}

body {
  margin: 0;
  padding-top: var(--rail-h);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(900px 420px at 88% -12%, rgba(34, 211, 197, .10), transparent 62%),
    radial-gradient(720px 380px at 4% 106%, rgba(255, 107, 74, .07), transparent 64%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@media (min-width: 1024px) {
  body { padding-top: 0; padding-left: var(--rail-w); }
}

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

h1, h2, h3, h4 {
  margin: 0 0 .55em;
  color: var(--text);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -.018em;
}
h1 { font-size: clamp(30px, 5.4vw, 58px); letter-spacing: -.032em; }
h2 { font-size: clamp(23px, 3.2vw, 36px); letter-spacing: -.026em; }
h3 { font-size: clamp(18px, 2.1vw, 22px); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

a { color: var(--cyan); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--cyan-soft); }

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

[hidden] { display: none !important; }
.is-locked, .is-locked body { overflow: hidden; }

/* ---------- 通用文字工具 ---------- */
.mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: .04em; }
.anno, .muted { color: var(--text-dim); font-size: 12.5px; line-height: 1.7; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 32px, 780px); margin-inline: auto; }
.sec { padding: clamp(44px, 6.4vw, 88px) 0; }
.sec--tight { padding: clamp(26px, 3.6vw, 48px) 0; }
.prose { max-width: 68ch; }
.prose p { color: var(--text-soft); }
.rule { height: 1px; border: 0; margin: 0; background: var(--line); }

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: .62em 1em;
  background: var(--cyan);
  color: #04211F;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--r);
  transform: translateY(-180%);
  transition: transform .16s ease;
}
.skip-link:focus { transform: none; color: #04211F; }
@media (min-width: 1024px) { .skip-link { left: calc(var(--rail-w) + 12px); } }

/* ============================================================
   侧边轨道导航 / 移动端顶部横条 + 抽屉
   ============================================================ */
.rail {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--rail-h);
  background: rgba(8, 25, 42, .95);
  border-bottom: 1px solid var(--line);
}

.rail__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 0 14px;
}

.rail__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 0 1 auto;
  color: var(--text);
}
.rail__brand:hover { color: var(--cyan-soft); }

.rail__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  background: linear-gradient(150deg, var(--cyan) 0%, #0E8B8A 58%, var(--ink-800) 100%);
  color: #04211F;
  font-weight: 900;
  font-size: 17px;
  border-radius: var(--r);
  box-shadow: 0 0 0 1px rgba(34, 211, 197, .38), 0 10px 20px -14px rgba(34, 211, 197, .9);
}

.rail__word {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .06em;
  white-space: nowrap;
}

.rail__tagline {
  display: none;
  font-size: 11px;
  color: var(--mist);
  letter-spacing: .04em;
  white-space: nowrap;
}

.rail-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan-soft);
  background: rgba(34, 211, 197, .10);
  border: 1px solid rgba(34, 211, 197, .35);
  border-radius: var(--r);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.rail-toggle:hover { background: rgba(34, 211, 197, .18); color: #fff; border-color: var(--cyan); }
.rail-toggle__text { font-size: 12px; letter-spacing: .06em; }
.rail-toggle__bars { display: flex; flex-direction: column; gap: 3px; width: 14px; }
.rail-toggle__bars i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
[data-nav-toggle][aria-expanded="true"] .rail-toggle__bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
[data-nav-toggle][aria-expanded="true"] .rail-toggle__bars i:nth-child(2) { opacity: 0; }
[data-nav-toggle][aria-expanded="true"] .rail-toggle__bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.rail__nav {
  position: fixed;
  top: var(--rail-h);
  left: 0;
  bottom: 0;
  z-index: 55;
  width: min(86vw, 320px);
  display: flex;
  flex-direction: column;
  padding: 18px 16px 22px;
  overflow-y: auto;
  background: var(--ink-850);
  border-right: 1px solid var(--line);
  transform: translateX(-104%);
  visibility: hidden;
  transition: transform .24s cubic-bezier(.22, .7, .3, 1), visibility .24s linear;
}
[data-nav][data-open] { transform: none; visibility: visible; }

.rail__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  border-left: 2px solid transparent;
  border-radius: 0 var(--r) var(--r) 0;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.rail__link:hover { background: rgba(34, 211, 197, .08); border-left-color: var(--cyan); color: var(--cyan-soft); }
.rail__link[aria-current="page"] {
  background: rgba(34, 211, 197, .14);
  border-left-color: var(--cyan);
  color: #fff;
}
.rail__link[aria-current="page"] .rail__idx { color: var(--coral); }

.rail__idx {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--mist);
}
.rail__label { min-width: 0; }

.rail__foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rail__quick { font-size: 14px; font-weight: 700; color: var(--cyan-soft); }
.rail__quick:hover { color: #fff; }
.rail__meta { margin: 0; font-size: 11.5px; line-height: 1.65; color: var(--mist); }
.rail__version { margin: 0; font-size: 11px; color: var(--mist); }
.rail__version .mono { color: var(--cyan); }

.rail__scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(4, 14, 26, .62);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.rail__scrim[data-open] { opacity: 1; pointer-events: auto; }

/* ---------- 桌面端：真正的左侧轨道 ---------- */
@media (min-width: 1024px) {
  .rail {
    inset: 0 auto 0 0;
    width: var(--rail-w);
    height: auto;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, #0A1D30 0%, #0B1F33 58%, #081726 100%);
  }
  .rail__inner {
    flex-direction: column;
    align-items: center;
    gap: 0;
    height: 100%;
    padding: 20px 8px 16px;
  }
  .rail__brand { flex-direction: column; gap: 8px; text-align: center; }
  .rail__mark { width: 40px; height: 40px; flex: 0 0 40px; font-size: 19px; }
  .rail__word {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 13px;
    letter-spacing: .16em;
    color: var(--cyan-soft);
  }
  .rail-toggle { display: none; }
  .rail__nav {
    position: static;
    inset: auto;
    width: 100%;
    flex: 1 1 auto;
    margin-top: 16px;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    transform: none;
    visibility: visible;
  }
  .rail__list { flex: 1 1 auto; gap: 4px; }
  .rail__link {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 9px 4px;
    font-size: 12.5px;
    line-height: 1.3;
    letter-spacing: .02em;
    text-align: center;
    border-left: 0;
    border-top: 2px solid transparent;
    border-radius: 0 0 var(--r) var(--r);
  }
  .rail__link:hover { border-left: 0; border-top-color: var(--cyan); }
  .rail__link[aria-current="page"] {
    border-left: 0;
    border-top-color: var(--coral);
    background: rgba(34, 211, 197, .12);
  }
  .rail__idx { font-size: 10px; }
  .rail__foot { align-items: center; text-align: center; gap: 6px; padding-top: 12px; }
  .rail__quick { font-size: 12px; }
  .rail__meta { font-size: 10px; }
  .rail__version { font-size: 10px; }
  .rail__scrim { display: none; }
}

/* ============================================================
   面板 / 卡片 / 按钮 / 标签 / 字段 / 网格 / 媒体
   ============================================================ */
.panel {
  position: relative;
  padding: var(--sp);
  background: linear-gradient(180deg, rgba(18, 48, 77, .92), rgba(11, 31, 51, .94));
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
}
.panel--paper {
  background: var(--paper);
  border-color: #D9D0BE;
  color: var(--text-invert);
  box-shadow: var(--shadow-paper);
}
.panel--paper h1, .panel--paper h2, .panel--paper h3 { color: var(--text-invert); }
.panel--paper p { color: #23384B; }
.panel--paper a { color: #0C6C69; }
.panel--paper a:hover { color: #0B1F33; }
.panel--paper .anno, .panel--paper .muted, .panel--paper .field__k { color: #6C7C8C; }
.panel--flat { background: transparent; border-style: dashed; box-shadow: none; }

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  padding-bottom: 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.panel--paper .panel__head { border-bottom-color: #D9D0BE; }
.panel__eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.panel--paper .panel__eyebrow { color: #0C6C69; }
.panel__title { margin: 0; font-size: clamp(19px, 2.4vw, 26px); font-weight: 900; letter-spacing: -.022em; }
.panel__note { margin: 0; font-size: 12.5px; color: var(--mist); }
.panel--paper .panel__note { color: #6C7C8C; }

.grid { display: grid; gap: clamp(12px, 1.6vw, 20px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid--asym { grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid--asym { grid-template-columns: 1.35fr .85fr; } }

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  background: rgba(18, 48, 77, .55);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
a.card { color: var(--text); }
a.card:hover {
  color: var(--text);
  border-color: var(--cyan);
  background: rgba(18, 48, 77, .9);
  transform: translateY(-2px);
}
.card__title { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.012em; color: var(--text); }
a.card:hover .card__title { color: var(--cyan-soft); }
.card__meta { margin: 0; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; color: var(--mist); }
.card__body { margin: 0; font-size: 14.5px; color: var(--text-soft); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .72em 1.25em;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: var(--r);
  cursor: pointer;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--cyan); color: #04211F; }
.btn--primary:hover { background: var(--cyan-soft); color: #04211F; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan-soft); background: rgba(34, 211, 197, .08); }
.btn--coral { background: var(--coral); color: #2A0A03; }
.btn--coral:hover { background: #FF8265; color: #2A0A03; }
.btn--sm { padding: .5em .9em; font-size: 13.5px; }

.crumbs { font-size: 12.5px; }
.crumbs__list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; color: var(--mist); }
.crumbs__item { display: flex; align-items: center; gap: 6px; }
.crumbs__item + .crumbs__item::before { content: "/"; color: rgba(138, 160, 180, .45); }
.crumbs__link { color: var(--mist); }
.crumbs__link:hover { color: var(--cyan-soft); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  border-radius: 999px;
  background: rgba(34, 211, 197, .14);
  border: 1px solid rgba(34, 211, 197, .35);
  color: var(--cyan-soft);
}
.tag--live { background: rgba(255, 107, 74, .14); border-color: rgba(255, 107, 74, .42); color: #FFB6A3; }
.tag--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
  animation: pulse 1.8s ease-in-out infinite;
}
.tag--amber { background: rgba(242, 180, 65, .14); border-color: rgba(242, 180, 65, .4); color: #F7D08D; }
.tag--mute { background: rgba(138, 160, 180, .12); border-color: rgba(138, 160, 180, .3); color: var(--mist); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.72); }
}

.field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.field__k {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mist);
}
.field__v { font-size: 15px; color: var(--text); overflow-wrap: anywhere; }

.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    radial-gradient(120% 120% at 12% 8%, rgba(34, 211, 197, .22), transparent 55%),
    linear-gradient(135deg, rgba(18, 48, 77, .95), rgba(8, 25, 42, .98));
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(112deg, rgba(168, 240, 231, .10) 0 1px, transparent 1px 15px);
}
.media__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 14px 10px;
  font-size: 12px;
  line-height: 1.6;
  color: #DCE7F0;
  background: linear-gradient(transparent, rgba(8, 25, 42, .88));
}
.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }

.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter__btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--mist);
  background: transparent;
  border: 1px solid var(--line);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.filter__btn:hover { color: var(--cyan-soft); border-color: var(--cyan); }
.filter__btn[aria-pressed="true"] { background: var(--cyan-soft); border-color: var(--cyan-soft); color: #062B28; }

/* ---------- 进场与滚动进度 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .42s ease, transform .42s ease;
}
[data-reveal].is-in { opacity: 1; transform: none; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 100%;
  height: 2px;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-soft) 55%, var(--coral));
}
@media (min-width: 1024px) {
  .scroll-progress { left: var(--rail-w); width: calc(100% - var(--rail-w)); }
}

/* ============================================================
   页脚
   ============================================================ */
.site-foot {
  margin-top: clamp(40px, 6vw, 88px);
  background: var(--ink-850);
  border-top: 1px solid var(--line);
  color: var(--text-soft);
}

.foot-top {
  width: min(100% - 32px, var(--wrap));
  margin-inline: auto;
  padding: clamp(32px, 4.5vw, 58px) 0 clamp(24px, 3vw, 40px);
  display: grid;
  gap: clamp(24px, 3vw, 46px);
}
@media (min-width: 1024px) { .foot-top { grid-template-columns: minmax(200px, 250px) 1fr; } }

.foot-brand { display: flex; flex-direction: column; gap: 10px; }
.foot-brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(150deg, var(--cyan) 0%, #0E8B8A 58%, var(--ink-800) 100%);
  color: #04211F;
  font-weight: 900;
  font-size: 18px;
  border-radius: var(--r);
  box-shadow: 0 0 0 1px rgba(34, 211, 197, .38);
}
.foot-brand__word { margin: 0; font-size: 19px; font-weight: 900; letter-spacing: .05em; color: #fff; }
.foot-brand__note { margin: 0; font-size: 12.5px; line-height: 1.75; color: var(--mist); max-width: 34ch; }

.foot-grid { display: grid; gap: clamp(20px, 2.6vw, 32px); grid-template-columns: 1fr; }
@media (min-width: 640px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .foot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.foot-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.foot-col__title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.foot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.foot-list--plain li { display: flex; flex-direction: column; gap: 1px; }
.foot-link { color: var(--text-soft); font-size: 14px; }
.foot-link:hover { color: var(--cyan-soft); }
.foot-key {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--mist);
}
.foot-val { font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.foot-note { margin: 0; font-size: 12px; line-height: 1.75; color: var(--mist); }

.foot-bar { border-top: 1px solid var(--line); background: rgba(4, 14, 26, .5); }
.foot-bar__inner {
  width: min(100% - 32px, var(--wrap));
  margin-inline: auto;
  padding: 14px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  font-size: 12.5px;
  color: var(--mist);
}
.foot-bar__item { margin: 0; }
.foot-bar__item .foot-link { font-size: 12.5px; color: var(--mist); }
.foot-bar__item .foot-link:hover { color: var(--cyan-soft); }
.foot-bar__item--quiet { flex: 1 1 auto; color: #6F869A; }
@media (min-width: 900px) { .foot-bar__item--quiet { text-align: right; } }

/* ============================================================
   降低动效偏好
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .rail__nav { transition: none; }
}
