/* =========================================================
   爱游戏赛场 · 全站共享样式
   文件路径：/assets/site.css
   ========================================================= */

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

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

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
}

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

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

:focus-visible {
  outline: 2px solid #FF6A1A;
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 02 变量 ---------- */
:root {
  --ink: #06251C;
  --ink-deep: #041A14;
  --ink-soft: #082E23;
  --grass: #0F5C3F;
  --orange: #FF6A1A;
  --orange-soft: #FFB27A;
  --blue: #2D7DFF;
  --silver: #C9D1D9;
  --paper: #F7F1E6;
  --black: #0B0F0D;
  --ok: #7DDF7A;
  --warn: #FF4D4D;

  --font-display: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Courier New', monospace;

  --rail-w: 112px;
  --topbar-h: 64px;
  --page-max: 1240px;
  --gutter: clamp(1.1rem, 4vw, 2.75rem);

  --line: rgba(201, 209, 217, .16);
  --line-strong: rgba(201, 209, 217, .32);

  --shadow-lift: 0 18px 40px -24px rgba(0, 0, 0, .85);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

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

/* ---------- 03 基础排版 ---------- */
body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--paper);
  background-color: var(--ink);
  padding-left: var(--rail-w);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60vw 46vw at 84% -10%, rgba(45, 125, 255, .16), transparent 68%),
    radial-gradient(52vw 42vw at 4% 106%, rgba(255, 106, 26, .12), transparent 70%);
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: inherit;
}

h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.25rem; font-weight: 800; line-height: 1.35; }
h4 { font-size: 1.05rem; font-weight: 700; line-height: 1.45; }

p { max-width: 72ch; }

strong { font-weight: 800; }

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

::selection {
  background: rgba(255, 106, 26, .35);
  color: var(--paper);
}

/* ---------- 04 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: .6rem;
  left: 50%;
  z-index: 200;
  padding: .6rem 1.2rem;
  border-radius: 999px;
  background: var(--orange);
  color: var(--black);
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .04em;
  transform: translate(-50%, -180%);
  transition: transform .2s var(--ease);
}

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

/* ---------- 05 头部：侧边轨道 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 90;
  width: var(--rail-w);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .85rem;
  padding: 1.25rem .8rem 1.5rem;
  background: linear-gradient(180deg, var(--ink-soft) 0%, var(--ink) 48%, var(--ink-deep) 100%);
  border-right: 1px solid var(--line);
}

.site-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--orange), var(--orange-soft) 45%, var(--blue));
  pointer-events: none;
}

/* 品牌 */
.brand {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: .2rem 0 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--paper);
  text-align: center;
}

.brand__mark {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--grass), #0A4430);
  border: 1px solid rgba(255, 178, 122, .5);
}

.brand__mark::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  box-shadow: 0 0 12px rgba(255, 106, 26, .55);
}

.brand__mark::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 50%;
  height: 1px;
  background: rgba(201, 209, 217, .5);
}

.brand__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .12rem;
}

.brand__name {
  font-family: var(--font-display);
  font-size: .96rem;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1.2;
}

.brand__tag {
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .12em;
  color: var(--orange);
}

/* 抽屉按钮（桌面隐藏） */
.nav-toggle {
  display: none;
  align-items: center;
  gap: .55rem;
  padding: .48rem .85rem .48rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 178, 122, .5);
  background: rgba(15, 92, 63, .55);
  color: var(--paper);
  cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--orange);
  background: rgba(15, 92, 63, .88);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
  transition: transform .22s var(--ease);
}

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

.site-header[data-open] .nav-toggle__bars { background: transparent; }
.site-header[data-open] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.nav-toggle__label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
}

/* 轨道导航 */
.rail-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.rail-nav__list {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.rail-nav__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .18rem;
  padding: .68rem .3rem;
  border: 1px solid transparent;
  border-radius: 12px;
  color: rgba(247, 241, 230, .74);
  text-align: center;
  transition: color .18s var(--ease), background-color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease);
}

.rail-nav__link:hover {
  color: var(--paper);
  background: rgba(15, 92, 63, .6);
  border-color: rgba(255, 178, 122, .4);
  transform: translateY(-2px);
}

.rail-nav__link[aria-current="page"] {
  color: var(--black);
  background: linear-gradient(135deg, var(--orange), #FF8A3D);
  border-color: var(--orange-soft);
  box-shadow: 0 10px 24px -14px rgba(255, 106, 26, 1);
}

.rail-nav__link[aria-current="page"]:hover {
  color: var(--black);
  background: linear-gradient(135deg, #FF7A31, #FF9A52);
}

.rail-nav__num {
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--orange);
}

.rail-nav__link[aria-current="page"] .rail-nav__num {
  color: rgba(11, 15, 13, .62);
}

.rail-nav__text {
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: .01em;
}

/* 轨道 CTA */
.rail-cta {
  flex: none;
  display: block;
  padding: .7rem .35rem;
  border: 1px solid var(--orange);
  border-radius: 12px;
  color: var(--orange);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: center;
  transition: color .18s var(--ease), background-color .18s var(--ease), box-shadow .18s var(--ease);
}

.rail-cta:hover {
  color: var(--black);
  background: var(--orange);
  box-shadow: 0 14px 28px -16px rgba(255, 106, 26, 1);
}

/* 抽屉遮罩 */
.rail-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 94;
  background: rgba(4, 26, 20, .68);
  opacity: 0;
  transition: opacity .3s var(--ease);
}

/* 滚动进度 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  z-index: 92;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--orange-soft) 42%, var(--blue));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* 回到顶部 */
.to-top {
  position: fixed;
  right: clamp(.9rem, 3vw, 2rem);
  bottom: clamp(.9rem, 3vw, 2rem);
  z-index: 92;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 178, 122, .55);
  background: rgba(6, 37, 28, .92);
  color: var(--orange);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .22s var(--ease), transform .22s var(--ease),
              visibility .22s var(--ease), background-color .18s var(--ease), color .18s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--orange);
  color: var(--black);
}

.to-top__icon {
  width: 11px;
  height: 11px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg) translate(1px, 1px);
}

/* ---------- 06 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(3rem, 9vw, 7rem);
  overflow: hidden;
  color: var(--paper);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 88% 0%, rgba(45, 125, 255, .14), transparent 58%),
    linear-gradient(180deg, var(--ink-deep), var(--ink) 58%, #08281F);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: min(46%, 520px);
  height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--orange-soft) 55%, transparent);
  pointer-events: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -220px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  border: 1px solid rgba(45, 125, 255, .22);
  box-shadow: inset 0 0 0 56px rgba(45, 125, 255, .05);
  pointer-events: none;
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  width: min(calc(100% - var(--gutter) * 2), var(--page-max));
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.25rem);
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.15fr);
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .9rem;
}

.site-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  max-width: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: .02em;
}

.site-footer__logo-mark {
  position: relative;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--grass), #0A4430);
  border: 1px solid rgba(255, 178, 122, .55);
}

.site-footer__logo-mark::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 50%;
  height: 1px;
  background: rgba(255, 178, 122, .85);
}

.site-footer__tag {
  max-width: 32ch;
  font-size: .92rem;
  line-height: 1.75;
  color: rgba(247, 241, 230, .7);
}

.site-footer__heading {
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--orange);
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.site-footer__list a {
  display: inline-block;
  font-size: .95rem;
  color: rgba(247, 241, 230, .78);
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.site-footer__list a:hover {
  color: var(--orange-soft);
  border-bottom-color: var(--orange-soft);
}

.site-footer__list--contact {
  gap: .9rem;
}

.site-footer__list--contact li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .1rem .6rem;
}

.site-footer__label {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  color: rgba(201, 209, 217, .62);
}

.site-footer__value {
  font-family: var(--font-mono);
  font-size: .86rem;
  line-height: 1.6;
  color: var(--paper);
  word-break: break-word;
}

.copy-btn {
  justify-self: end;
  padding: .22rem .62rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}

.copy-btn:hover {
  color: var(--black);
  background: var(--orange);
  border-color: var(--orange);
}

.copy-btn.is-copied {
  color: var(--black);
  background: var(--ok);
  border-color: var(--ok);
}

.site-footer__hours {
  margin-top: .9rem;
  max-width: none;
  font-family: var(--font-mono);
  font-size: .76rem;
  color: rgba(201, 209, 217, .66);
}

.site-footer__base {
  position: relative;
  z-index: 1;
  width: min(calc(100% - var(--gutter) * 2), var(--page-max));
  margin-inline: auto;
  padding: 1.1rem 0 clamp(1.6rem, 4vw, 2.4rem);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem 1.4rem;
  font-size: .8rem;
  color: rgba(201, 209, 217, .66);
}

.site-footer__copy,
.site-footer__icp {
  max-width: none;
  font-family: var(--font-mono);
  letter-spacing: .05em;
}

.site-footer__note {
  flex: 1 1 auto;
  max-width: none;
}

@media (min-width: 900px) {
  .site-footer__note {
    text-align: right;
  }
}

/* ---------- 07 容器与区块 ---------- */
.container {
  width: min(calc(100% - var(--gutter) * 2), var(--page-max));
  margin-inline: auto;
}

.section {
  padding-block: clamp(3rem, 8vw, 7rem);
}

.section--ink {
  color: var(--paper);
  background: linear-gradient(180deg, rgba(4, 26, 20, .96), rgba(6, 37, 28, 1));
}

.section--paper {
  color: var(--black);
  background: var(--paper);
  border-block: 1px solid rgba(11, 15, 13, .08);
}

.section--paper .lede {
  color: rgba(11, 15, 13, .72);
}

.section--paper .eyebrow {
  color: var(--grass);
}

.section--paper .card {
  background: #FFFDF8;
  border-color: rgba(11, 15, 13, .12);
}

.section--paper .card__meta {
  color: rgba(11, 15, 13, .6);
}

/* ---------- 08 通用文本组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--orange);
}

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

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.lede {
  max-width: 62ch;
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.85;
  color: rgba(247, 241, 230, .78);
}

.prose {
  max-width: 72ch;
}

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

.prose h2 {
  margin-top: 2.2em;
}

.prose h3 {
  margin-top: 1.6em;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li + li {
  margin-top: .4em;
}

.prose a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.prose a:hover {
  color: var(--orange);
}

.prose code {
  font-family: var(--font-mono);
  font-size: .9em;
  padding: .1em .38em;
  border-radius: 4px;
  background: rgba(45, 125, 255, .14);
}

.prose blockquote {
  padding-left: 1.1rem;
  border-left: 2px solid var(--orange);
  color: rgba(247, 241, 230, .8);
}

/* ---------- 09 面包屑 ---------- */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .05em;
  color: rgba(201, 209, 217, .7);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.breadcrumbs li + li::before {
  content: "/";
  color: rgba(255, 106, 26, .7);
}

.breadcrumbs a:hover {
  color: var(--orange);
}

.breadcrumbs [aria-current="page"] {
  color: var(--paper);
}

.section--paper .breadcrumbs {
  color: rgba(11, 15, 13, .6);
}

.section--paper .breadcrumbs [aria-current="page"] {
  color: var(--black);
}

/* ---------- 10 按钮 ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  --btn-border: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .78rem 1.4rem;
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s var(--ease),
              color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  --btn-bg: linear-gradient(135deg, var(--orange), #FF8A3D);
  --btn-fg: var(--black);
  --btn-border: transparent;
  box-shadow: 0 14px 30px -18px rgba(255, 106, 26, .95);
}

.btn--primary:hover {
  box-shadow: 0 20px 38px -18px rgba(255, 106, 26, 1);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  --btn-border: rgba(255, 178, 122, .55);
}

.btn--ghost:hover {
  --btn-bg: rgba(255, 178, 122, .14);
  --btn-border: var(--orange);
}

.btn--soft {
  --btn-bg: var(--paper);
  --btn-fg: var(--black);
  --btn-border: transparent;
}

.btn--soft:hover {
  --btn-bg: #FFFFFF;
}

/* ---------- 11 网格与卡片 ---------- */
.grid {
  display: grid;
  gap: clamp(1rem, 2.6vw, 1.75rem);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }

.card {
  position: relative;
  padding: clamp(1.15rem, 2.4vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 92, 63, .34), rgba(6, 37, 28, .72));
  transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 178, 122, .55);
  box-shadow: var(--shadow-lift);
}

.card__index {
  display: block;
  margin-bottom: .5rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .12em;
  color: var(--orange);
}

.card__title {
  margin-bottom: .4rem;
  font-size: 1.15rem;
  font-weight: 800;
}

.card__meta {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .04em;
  color: rgba(201, 209, 217, .7);
}

.panel {
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(4, 26, 20, .62);
}

/* ---------- 12 状态标签 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .62rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--silver);
}

.badge--ok { color: var(--ok); }
.badge--warn { color: var(--warn); }
.badge--info { color: var(--blue); }

/* ---------- 13 图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(15, 92, 63, .85), rgba(4, 26, 20, .95) 62%),
    var(--ink-deep);
  aspect-ratio: 16 / 9;
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(45, 125, 255, .18), transparent 46%);
  pointer-events: none;
}

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

.media-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: .9rem 1.1rem;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .06em;
  color: var(--paper);
  background: linear-gradient(0deg, rgba(4, 26, 20, .92), transparent);
}

/* ---------- 14 平板与移动端 ---------- */
@media (max-width: 1023px) {
  body {
    padding-left: 0;
    padding-top: var(--topbar-h);
  }

  .site-header {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: var(--topbar-h);
    flex-direction: row;
    align-items: center;
    gap: .75rem;
    padding: 0 clamp(.8rem, 3vw, 1.25rem);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, var(--ink-soft), var(--ink-deep) 78%);
  }

  .site-header::before {
    top: 0;
    bottom: auto;
    height: 3px;
  }

  .brand {
    flex-direction: row;
    align-items: center;
    gap: .6rem;
    padding: 0;
    border-bottom: 0;
    text-align: left;
  }

  .brand__mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .brand__name { font-size: .98rem; }
  .brand__tag { display: none; }

  .brand__text {
    flex-direction: row;
    align-items: baseline;
    gap: .45rem;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .rail-nav {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    z-index: 96;
    width: min(86vw, 340px);
    height: calc(100dvh - var(--topbar-h));
    margin: 0;
    padding: 1rem clamp(.85rem, 3vw, 1.25rem) 2.4rem;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--ink-soft), var(--ink-deep));
    border-right: 1px solid var(--line-strong);
    transform: translateX(-103%);
    visibility: hidden;
    transition: transform .34s var(--ease), visibility .34s var(--ease);
  }

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

  .site-header[data-open] .rail-scrim {
    display: block;
    opacity: 1;
  }

  .rail-nav__list { gap: .3rem; }

  .rail-nav__link {
    flex-direction: row;
    align-items: center;
    gap: .8rem;
    padding: .8rem .9rem;
    border-radius: 14px;
    text-align: left;
  }

  .rail-nav__num { font-size: .72rem; }
  .rail-nav__text { font-size: 1rem; }

  .rail-cta { display: none; }

  body.is-nav-open { overflow: hidden; }

  .scroll-progress {
    top: var(--topbar-h);
    left: 0;
  }

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

@media (max-width: 640px) {
  :root {
    --topbar-h: 60px;
  }

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

  .nav-toggle__label { display: none; }

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

/* ---------- 15 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .btn:hover,
  .card:hover,
  .rail-nav__link:hover,
  .to-top {
    transform: none;
  }

  body::before {
    background: none;
  }
}
