/* ==========================================================================
   乐竞CN · 共享样式 /assets/site.css
   堆叠面板 · 前后分置导航 · 高原深蓝 + 经幡五色
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--board);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
input, select, textarea { font: inherit; }
strong, b { font-weight: 800; }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- tokens ---------- */
:root {
  --ink: #0B1B33;
  --night: #050A12;
  --board: #F2F5FA;
  --mist: #8A98AE;
  --panel: #1B2C48;
  --red: #E23B2C;
  --blue: #2F7FE0;
  --green: #12A56B;
  --yellow: #F2B01E;
  --white: #E9EEF7;

  --shell-w: 1240px;
  --gutter: clamp(16px, 3.2vw, 40px);
  --gap: clamp(16px, 2.4vw, 30px);
  --radius: clamp(16px, 2.6vw, 32px);
  --line: rgba(233, 238, 247, .12);

  --font-head: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --font-hand: "Bradley Hand", "Segoe Script", "STXingkai", "Xingkai SC", cursive;

  --ease: cubic-bezier(.22, .8, .3, 1);
}

/* ---------- 排版基线 ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -.02em;
  color: var(--board);
}

h1 { font-size: clamp(38px, 7.4vw, 96px); }
h2 { font-size: clamp(28px, 4.2vw, 52px); }
h3 { font-size: clamp(21px, 2.4vw, 30px); }
h4 { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.3; }

p { max-width: 74ch; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mist);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 4px;
  background: var(--red);
  border-radius: 2px;
  flex: 0 0 auto;
}

.section-title { margin: 14px 0 0; }

.lede {
  margin-top: 16px;
  font-size: clamp(15.5px, 1.5vw, 18px);
  line-height: 1.8;
  color: var(--mist);
}

.tally {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.hand-note {
  font-family: var(--font-hand);
  font-size: 15px;
  line-height: 1.5;
  color: var(--yellow);
  transform: rotate(-2.2deg);
  display: inline-block;
}

.divider {
  height: 1px;
  border: 0;
  margin: clamp(24px, 3vw, 44px) 0;
  background: var(--line);
}

.prose { max-width: 72ch; }
.prose > * + * { margin-top: 18px; }
.prose h2 { margin-top: 44px; }
.prose h3 { margin-top: 32px; }
.prose ul { padding-left: 20px; list-style: none; }
.prose ul li { position: relative; padding-left: 18px; margin-top: 10px; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 8px;
  height: 8px;
  background: var(--blue);
  border-radius: 2px;
}

/* ---------- 容器与网格 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.shell--narrow { max-width: 940px; }

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

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }
.offset-1 { grid-column-start: 2; }
.offset-2 { grid-column-start: 3; }

/* ---------- 堆叠画板 ---------- */
.panel {
  position: relative;
  z-index: 1;
  isolation: isolate;
  background: var(--ink);
  color: var(--board);
  padding: clamp(40px, 6vw, 88px) 0;
  margin-top: -18px;
  border-radius: var(--radius);
  box-shadow: 0 -30px 60px -34px rgba(0, 0, 0, .95);
}

.panel:first-of-type { margin-top: 0; }
.panel--mid { background: var(--panel); }
.panel--night { background: var(--night); }
.panel--bare { border-radius: 0; margin-top: 0; }

.panel--board { background: var(--board); color: var(--night); }
.panel--board h1,
.panel--board h2,
.panel--board h3,
.panel--board h4 { color: var(--night); }
.panel--board .lede,
.panel--board .eyebrow { color: #55637a; }

.section { padding: clamp(44px, 6vw, 88px) 0; }
.section--tight { padding: clamp(28px, 4vw, 56px) 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.2;
  transition: background .2s linear, color .2s linear, border-color .2s linear, transform .2s var(--ease);
}

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-primary:hover { background: #f4503f; transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  border-color: rgba(233, 238, 247, .34);
  color: var(--board);
}

.btn-ghost:hover { border-color: var(--board); background: rgba(233, 238, 247, .08); }

/* ---------- 五色图例 / 状态 ---------- */
.flag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.flag-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--board);
  background: rgba(27, 44, 72, .5);
}

.flag-chip::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--mist);
}

.flag-chip[data-flag="red"]::before { background: var(--red); }
.flag-chip[data-flag="blue"]::before { background: var(--blue); }
.flag-chip[data-flag="green"]::before { background: var(--green); }
.flag-chip[data-flag="yellow"]::before { background: var(--yellow); }
.flag-chip[data-flag="white"]::before { background: var(--white); }

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--board);
}

.status-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mist);
  flex: 0 0 auto;
}

.status-ok::before { background: var(--green); }
.status-warn::before { background: var(--yellow); }
.status-info::before { background: var(--blue); }

/* ---------- 图片占位容器 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--night);
  border-radius: clamp(14px, 2vw, 24px) clamp(14px, 2vw, 24px) 6px clamp(14px, 2vw, 24px);
}

.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  filter: saturate(.88) contrast(1.06);
}

.media-frame--wide > img { aspect-ratio: 16 / 9; }
.media-frame--tall > img { aspect-ratio: 3 / 4; }
.media-frame--square > img { aspect-ratio: 1 / 1; }

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: radial-gradient(rgba(233, 238, 247, .5) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}

.media-caption {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .05em;
  color: var(--mist);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--mist);
}

.breadcrumb li { display: inline-flex; align-items: center; gap: 12px; }
.breadcrumb li + li::before { content: "/"; color: rgba(138, 152, 174, .6); }
.breadcrumb a:hover { color: var(--board); }
.breadcrumb [aria-current="page"] { color: var(--board); }

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 200;
  transform: translate(-50%, -130%);
  padding: 12px 20px;
  background: var(--yellow);
  color: var(--night);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 14px;
  border-radius: 0 0 12px 12px;
  transition: transform .2s var(--ease);
}

.skip-link:focus { transform: translate(-50%, 0); }

/* ==========================================================================
   页头
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 27, 51, .97);
  border-bottom: 1px solid var(--line);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 3px;
  width: calc(var(--scroll-p, 0) * 100%);
  max-width: 100%;
  background: var(--red);
  transition: width .12s linear;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  min-height: clamp(64px, 7vw, 84px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 20px);
  flex: 0 1 auto;
  min-width: 0;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: 0 0 auto;
}

.brand-mark {
  font-family: var(--font-head);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 900;
  letter-spacing: -.04em;
  color: var(--board);
}

.brand-suffix {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--red);
  color: #fff;
  line-height: 1;
}

.brand-tagline {
  font-family: var(--font-hand);
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--mist);
  max-width: 12ch;
  transform: rotate(-1.5deg);
}

/* 当前轮次 */
.round-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(27, 44, 72, .78);
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.round-badge-label {
  font-size: 11.5px;
  letter-spacing: .14em;
  color: var(--mist);
}

.round-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: -.01em;
  color: var(--red);
}

/* 导航 */
.primary-nav { margin-left: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.4vw, 22px);
}

.nav-link {
  position: relative;
  display: block;
  padding: 10px 2px 12px;
  font-family: var(--font-head);
  font-size: clamp(13.5px, 1.15vw, 15.5px);
  font-weight: 800;
  letter-spacing: .01em;
  color: rgba(233, 238, 247, .78);
  white-space: nowrap;
  transition: color .18s linear;
}

.nav-link:hover { color: var(--board); }

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

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 4px;
  border-radius: 2px;
  background: var(--red);
}

/* 移动端栏目按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--board);
  font-family: var(--font-head);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: .04em;
}

.nav-toggle-bars {
  position: relative;
  width: 16px;
  height: 10px;
  flex: 0 0 auto;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--board);
  transition: transform .22s var(--ease);
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-4px) rotate(-45deg); }

/* 轮次切换 */
.round-switch { position: relative; flex: 0 0 auto; }

.round-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(5, 10, 18, .6);
  transition: border-color .18s linear, background .18s linear;
}

.round-switch-btn:hover { border-color: rgba(233, 238, 247, .4); }

.round-switch-label {
  font-size: 11.5px;
  letter-spacing: .14em;
  color: var(--mist);
}

.round-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 168px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--night);
  box-shadow: 0 26px 46px -24px rgba(0, 0, 0, .95);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s linear, transform .2s var(--ease), visibility .2s;
  z-index: 70;
}

.round-switch[data-open] .round-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.round-menu-item {
  display: block;
  padding: 10px 12px;
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--board);
}

.round-menu-item:hover { background: rgba(27, 44, 72, .9); }
.round-menu-item:first-child { color: var(--red); }

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  position: relative;
  background: var(--night);
  color: var(--mist);
  padding: clamp(48px, 6vw, 84px) 0 26px;
  border-top: 1px solid var(--line);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 2.1fr;
  gap: clamp(28px, 4vw, 68px);
}

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

.footer-tagline {
  font-family: var(--font-hand);
  font-size: 16px;
  line-height: 1.4;
  color: var(--yellow);
  transform: rotate(-1.6deg);
  max-width: 16ch;
}

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

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 36px);
}

.footer-col-title {
  margin-bottom: 16px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--board);
}

.footer-list li + li { margin-top: 11px; }

.footer-list a {
  position: relative;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--mist);
  transition: color .18s linear, padding-left .18s var(--ease);
}

.footer-list a::before {
  content: "";
  position: absolute;
  left: 0;
  top: .68em;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width .2s var(--ease);
}

.footer-list a:hover { color: var(--board); padding-left: 14px; }
.footer-list a:hover::before { width: 9px; }

.footer-contact {
  margin-top: clamp(32px, 4vw, 56px);
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px clamp(24px, 4vw, 56px);
}

.contact-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
}

.contact-key {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  color: var(--red);
}

.contact-value {
  color: var(--board);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  letter-spacing: .01em;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px clamp(18px, 3vw, 34px);
  padding-top: 22px;
  font-size: 13px;
}

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

.footer-legal a {
  color: var(--mist);
  border-bottom: 1px solid rgba(138, 152, 174, .4);
  padding-bottom: 1px;
}

.footer-legal a:hover { color: var(--board); border-color: var(--board); }

.footer-icp { font-family: var(--font-mono); letter-spacing: .04em; }

.footer-copy { margin-left: auto; font-family: var(--font-mono); letter-spacing: .04em; }

/* ---------- 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: clamp(14px, 2.4vw, 30px);
  bottom: clamp(14px, 2.4vw, 30px);
  z-index: 75;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(233, 238, 247, .22);
  background: rgba(27, 44, 72, .9);
  color: var(--board);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .22s linear, transform .22s var(--ease), background .22s linear, visibility .22s;
}

.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.to-top:hover { background: #f4503f; }

/* ---------- 显现协议 ---------- */
html.js [data-reveal="pending"] {
  opacity: 0;
  transform: translateY(18px);
}

[data-reveal="in"] {
  opacity: 1;
  transform: none;
  transition: opacity .32s linear, transform .32s var(--ease);
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1100px) {
  .brand-tagline { display: none; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; margin-left: auto; }

  .primary-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-left: 0;
    padding: 10px var(--gutter) 22px;
    background: var(--night);
    border-top: 1px solid var(--line);
    box-shadow: 0 30px 50px -28px rgba(0, 0, 0, .95);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .22s linear, transform .22s var(--ease), visibility .22s;
    z-index: 65;
  }

  .primary-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list { display: block; }

  .nav-link {
    display: block;
    padding: 15px 0 15px 0;
    font-size: 17px;
    border-bottom: 1px solid var(--line);
  }

  .nav-link[aria-current="page"]::after { display: none; }

  .nav-link[aria-current="page"] {
    color: var(--red);
    padding-left: 16px;
  }

  .nav-link[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 22px;
    border-radius: 2px;
    background: var(--red);
  }

  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9 {
    grid-column: span 12;
  }

  .offset-1, .offset-2 { grid-column-start: auto; }

  .footer-top { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-copy { margin-left: 0; }

  .panel { margin-top: -12px; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }

  .header-inner { gap: 10px; }

  .round-badge { display: none; }

  .footer-cols { grid-template-columns: 1fr 1fr; gap: 22px 16px; }

  .contact-list { flex-direction: column; gap: 10px; }

  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .to-top { width: 42px; height: 42px; border-radius: 12px; }
}

@media (min-width: 901px) {
  .primary-nav { display: block !important; }
}

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  html.js [data-reveal="pending"],
  [data-reveal="pending"] {
    opacity: 1 !important;
    transform: none !important;
  }

  .site-header::after { transition: none; }
}
