/* =================================================================
   新利看台 — 共享站点样式 /assets/site.css
   夜场看台 · 战术板 · 记分牌
   ================================================================= */

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

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

body { margin: 0; }

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

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

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

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

a { color: inherit; text-decoration: none; }

table { border-collapse: collapse; }

hr { border: 0; }

/* ---------- 1. Tokens ---------- */
:root {
  /* 色彩 */
  --ink: #0B2A24;
  --deck: #132A3A;
  --moss: #2E5B4C;
  --grass: #5C9A63;
  --orange: #E86B35;
  --yellow: #F3C64E;
  --cream: #F4EFE3;
  --stone: #7C8781;
  --clay: #B4552D;
  --mist: #9FB3BD;

  --ink-deep: #08211C;
  --ink-soft: #0E2F28;

  /* 尺寸 */
  --rail-w: 88px;
  --rail-w-open: 232px;
  --bar-h: 64px;
  --shell: 1240px;
  --pad: clamp(16px, 4vw, 48px);
  --cut: 14px;

  /* 字体 */
  --font-head: "HarmonyOS Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-ui: "HarmonyOS Sans SC", "PingFang SC", "Source Han Sans SC", system-ui, sans-serif;
  --font-body: "Source Han Serif SC", "Noto Serif SC", "Songti SC", Georgia, serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- 2. Base ---------- */
body {
  background-color: var(--ink);
  background-image:
    radial-gradient(90rem 55rem at 78% -8%, rgba(19, 42, 58, 0.62), transparent 62%),
    radial-gradient(55rem 45rem at 3% 104%, rgba(46, 91, 76, 0.38), transparent 64%);
  background-repeat: no-repeat;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: clamp(16px, 0.55vw + 14.4px, 17.5px);
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

p { max-width: 38em; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 700;
}

strong { font-weight: 700; }

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

/* ---------- 3. Focus ---------- */
:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px var(--ink-deep);
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  padding: 10px 18px;
  background: var(--yellow);
  color: var(--ink-deep);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- 5. Header — 移动端顶栏 + 抽屉 ---------- */
.site-header { position: relative; z-index: 90; }

.rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: var(--ink-deep);
  border-bottom: 1px solid var(--moss);
  overflow: hidden;
  z-index: 90;
}

/* 品牌 */
.rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rail-mark {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  background: var(--orange);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%);
}

.rail-mark::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 11px;
  height: 11px;
  background: var(--yellow);
}

.rail-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.rail-brand-text strong {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cream);
  white-space: nowrap;
}

.rail-brand-text small {
  font-family: var(--font-ui);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--mist);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 移动端开关 */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 13px;
  border: 1px solid var(--moss);
  border-radius: 2px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--cream);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.nav-toggle:hover {
  border-color: var(--orange);
  color: var(--yellow);
}

.nav-toggle-bar {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.18s ease;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease;
}

.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

.rail[data-open] .nav-toggle-bar { background-color: transparent; }
.rail[data-open] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.rail[data-open] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

/* 抽屉 */
.site-nav {
  position: fixed;
  top: var(--bar-h);
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 22px 18px 40px;
  background: var(--ink-soft);
  border-top: 1px solid rgba(46, 91, 76, 0.55);
  overflow-y: auto;
  transform: translateX(-102%);
  transition: transform 0.22s ease;
  z-index: 85;
}

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

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

.nav-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-left: 3px solid transparent;
  border-radius: 0 2px 2px 0;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  color: var(--cream);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.nav-list a:hover {
  background: rgba(46, 91, 76, 0.34);
  border-left-color: var(--moss);
}

.nav-list a[aria-current="page"] {
  background: rgba(232, 107, 53, 0.15);
  border-left-color: var(--orange);
  color: #ffffff;
}

.nav-num {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--stone);
}

.nav-list a[aria-current="page"] .nav-num { color: var(--yellow); }

.nav-text {
  min-width: 0;
  white-space: nowrap;
}

/* 抽屉底部行动（仅移动端） */
.nav-cta {
  display: none;
  margin-top: 22px;
  align-self: stretch;
}

/* 轨道底部 */
.rail-foot {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding: 0 4px;
}

.rail-note {
  font-family: var(--font-ui);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  line-height: 1.5;
  text-align: center;
  color: var(--mist);
  white-space: nowrap;
  overflow: hidden;
}

.rail-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(var(--rail-w) - 32px);
  margin: 0 16px;
  padding: 11px 6px;
  border-radius: 2px;
  background: var(--orange);
  color: var(--ink-deep);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  transition: width 0.22s ease, background-color 0.18s ease;
}

.rail-cta:hover { background: var(--clay); color: var(--cream); }

.rail-cta-mark {
  flex: 0 0 22px;
  text-align: center;
  font-size: 15px;
}

.rail-cta-text {
  opacity: 0;
  transition: opacity 0.18s ease 0.04s;
}

/* 进度条（移动端：底边横条） */
.rail-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--grass), var(--yellow), var(--orange));
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
  pointer-events: none;
}

/* 移动端整体让出顶栏 */
@media (max-width: 899px) {
  body { padding-top: var(--bar-h); }

  .nav-cta {
    display: inline-flex;
    width: 100%;
    justify-content: center;
  }

  body.is-locked { overflow: hidden; }
}

/* ---------- 6. Header — 桌面侧边轨道 ---------- */
@media (min-width: 900px) {
  body { padding-left: var(--rail-w); }

  .site-header { position: static; }

  .rail {
    top: 0;
    right: auto;
    bottom: 0;
    height: auto;
    width: var(--rail-w);
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 20px 0 18px;
    background: linear-gradient(180deg, #0C2C26 0%, #0B2A24 46%, #08211C 100%);
    border-right: 1px solid var(--moss);
    border-bottom: 0;
    overflow: hidden;
    transition: width 0.22s ease;
  }

  .rail:hover,
  .rail:focus-within { width: var(--rail-w-open); }

  .rail-brand {
    flex: none;
    flex-direction: column;
    gap: 8px;
    padding: 0 4px;
    text-align: center;
  }

  .rail-mark {
    width: 38px;
    height: 38px;
  }

  .rail-brand-text { align-items: center; }

  .rail-brand-text strong {
    font-size: 13px;
    letter-spacing: 0.06em;
  }

  .rail-brand-text small { display: none; }

  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    flex: 1 1 auto;
    min-height: 0;
    display: block;
    padding: 6px 0 0;
    background: none;
    border-top: 0;
    transform: none;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar { width: 0; height: 0; }

  .nav-list { gap: 2px; }

  .nav-list a {
    gap: 10px;
    height: 50px;
    padding: 0 0 0 26px;
    border-left: 3px solid transparent;
    border-radius: 0;
    font-size: 14px;
    color: var(--mist);
    white-space: nowrap;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  }

  .nav-num {
    width: 34px;
    flex: none;
    text-align: center;
    font-size: 11px;
  }

  .nav-text {
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.18s ease 0.03s, transform 0.18s ease 0.03s;
  }

  .rail:hover .nav-text,
  .rail:focus-within .nav-text {
    opacity: 1;
    transform: translateX(0);
  }

  .nav-list a:hover {
    color: var(--cream);
    background: rgba(46, 91, 76, 0.3);
    border-left-color: var(--moss);
  }

  .nav-list a[aria-current="page"] {
    color: #ffffff;
    background: rgba(232, 107, 53, 0.14);
    border-left-color: var(--orange);
  }

  .rail-foot {
    display: flex;
    flex: none;
  }

  .rail:hover .rail-cta,
  .rail:focus-within .rail-cta {
    width: calc(var(--rail-w-open) - 32px);
  }

  .rail:hover .rail-cta-text,
  .rail:focus-within .rail-cta-text { opacity: 1; }

  .rail-progress {
    left: auto;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    height: auto;
    background: linear-gradient(180deg, var(--grass), var(--yellow), var(--orange));
    transform: scaleY(var(--p, 0));
    transform-origin: center top;
  }
}

/* ---------- 7. Footer ---------- */
.site-footer {
  margin-top: clamp(56px, 8vw, 120px);
  background-color: var(--ink-deep);
  background-image:
    radial-gradient(75% 90% at 88% 0%, rgba(19, 42, 58, 0.85), transparent 62%),
    linear-gradient(180deg, #08211C 0%, #0B2A24 100%);
  border-top: 1px solid var(--moss);
  color: var(--cream);
}

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 66px) var(--pad) 26px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(30px, 4vw, 56px);
}

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

.footer-brand {
  font-family: var(--font-head);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: var(--cream);
}

.footer-tagline {
  font-family: var(--font-ui);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--yellow);
}

.footer-line {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--mist);
  max-width: 26em;
}

.footer-cta { margin-top: 6px; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  align-items: start;
}

.footer-col {
  padding-top: 12px;
  border-top: 1px solid rgba(92, 154, 99, 0.45);
}

.footer-col:nth-child(2) { margin-top: 14px; }
.footer-col:nth-child(3) { margin-top: 28px; }

.footer-h {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.4;
  color: var(--grass);
  margin-bottom: 10px;
}

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

.footer-list a {
  position: relative;
  display: inline-block;
  padding: 5px 0;
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--cream);
  transition: color 0.18s ease;
}

.footer-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s ease;
}

.footer-list a:hover { color: var(--yellow); }
.footer-list a:hover::after { transform: scaleX(1); }

.footer-contact {
  margin-top: clamp(30px, 4vw, 52px);
  padding-top: 22px;
  border-top: 1px dashed rgba(124, 135, 129, 0.5);
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px 26px;
}

.contact-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-key {
  flex: none;
  min-width: 42px;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--stone);
}

.contact-val {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.01em;
  color: var(--cream);
  word-break: break-all;
}

.contact-note {
  margin-top: 14px;
  max-width: 34em;
  font-size: 13px;
  line-height: 1.7;
  color: var(--mist);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(26px, 3.5vw, 42px);
  padding-top: 16px;
  border-top: 1px solid rgba(46, 91, 76, 0.6);
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--stone);
}

.footer-legal { max-width: none; }

.footer-icp {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mist);
  max-width: none;
}

@media (min-width: 860px) {
  .footer-top { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.6fr); }
}

/* ---------- 8. 通用组件 ---------- */
.page-shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.page-shell--narrow { max-width: 820px; }

.prose p { max-width: 38em; margin-bottom: 1.1em; }
.prose p:last-child { margin-bottom: 0; }

.prose a {
  color: var(--yellow);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: clamp(18px, 3vw, 32px);
}

.section-head h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 900;
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--grass);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 2px;
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.btn-accent {
  background: var(--orange);
  color: var(--ink-deep);
}

.btn-accent:hover {
  background: var(--clay);
  color: var(--cream);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  box-shadow: inset 0 0 0 1px var(--moss);
}

.btn-ghost:hover {
  box-shadow: inset 0 0 0 1px var(--orange);
  color: var(--yellow);
  transform: translateY(-2px);
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--moss);
  border-radius: 2px;
  background: rgba(46, 91, 76, 0.28);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  color: var(--grass);
}

.tag--accent {
  border-color: var(--orange);
  background: rgba(232, 107, 53, 0.14);
  color: var(--orange);
}

.tag--score {
  border-color: rgba(243, 198, 78, 0.5);
  background: rgba(243, 198, 78, 0.1);
  color: var(--yellow);
}

/* 面板 */
.panel {
  position: relative;
  padding: clamp(16px, 2.2vw, 28px);
  border: 1px solid rgba(46, 91, 76, 0.8);
  border-radius: 2px;
  background: var(--ink-soft);
}

.cut {
  position: relative;
  padding: clamp(16px, 2.2vw, 28px);
  background: var(--surface, var(--ink-soft));
  box-shadow: inset 0 0 0 1px rgba(46, 91, 76, 0.85);
  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
}

.cut > :focus-visible { outline-offset: -4px; }

/* 面包屑 */
.breadcrumb {
  padding: 14px 0 0;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb li { display: flex; align-items: center; gap: 8px; }

.breadcrumb li:not(:last-child)::after {
  content: "／";
  color: var(--moss);
}

.breadcrumb a {
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(232, 107, 53, 0.7);
}

.breadcrumb a:hover { color: var(--yellow); text-decoration-color: var(--yellow); }

/* 网格 */
.grid {
  display: grid;
  gap: clamp(14px, 2vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* 图片容器 */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--deck);
  background-image:
    linear-gradient(135deg, rgba(46, 91, 76, 0.85), rgba(19, 42, 58, 0.95)),
    repeating-linear-gradient(45deg, rgba(244, 239, 227, 0.06) 0 2px, transparent 2px 9px);
  box-shadow: inset 0 0 0 1px rgba(46, 91, 76, 0.9);
  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(11, 42, 36, 0.16) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-caption {
  margin-top: 8px;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.6;
  color: var(--mist);
}

/* ---------- 9. 显现 ---------- */
[data-reveal] {
  transition: opacity 0.18s ease, transform 0.18s ease;
}

[data-reveal].is-out {
  opacity: 0;
  transform: translateY(12px);
}

/* ---------- 10. 工具类 ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 11. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

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

  .rail,
  .rail-cta,
  .site-nav {
    transition: none !important;
  }
}
