/* ==========================================================================
   MANBET 品牌站 — /assets/site.css
   共享层：reset / 变量 / 中文排版 / 头部 / 页脚 / 通用组件
   ========================================================================== */

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

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

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

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

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

/* ---------- 变量 ---------- */
:root {
  --void: #0A1026;
  --void-2: #131C3F;
  --ink: #05080F;
  --orange: #FF6B2C;
  --orange-soft: #FF9A5E;
  --blue: #2F80FF;
  --violet: #7A5CF0;
  --lime: #A6F25C;
  --gray: #B9C2D4;
  --paper: #EFE9DC;
  --text: #E6EAF2;
  --white: #FFFFFF;

  --rail-w: 76px;
  --topbar-h: 48px;
  --radius: 8px;
  --gutter: 24px;
  --maxw: 1280px;

  --font-display: "Saira Condensed", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Noto Sans SC", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- 中文排版基础 ---------- */
body {
  min-height: 100vh;
  padding-left: var(--rail-w);
  padding-top: var(--topbar-h);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--void);
  background-image:
    radial-gradient(circle at 84% -8%, rgba(122, 92, 240, 0.22), transparent 42%),
    radial-gradient(circle at 6% 108%, rgba(47, 128, 255, 0.16), transparent 46%),
    linear-gradient(180deg, #0A1026 0%, #080D1C 58%, #05080F 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.12;
  color: var(--white);
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; letter-spacing: 0; }

p {
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: #7FB0FF;
  text-underline-offset: 3px;
}

strong {
  color: var(--white);
  font-weight: 700;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

/* ---------- 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: calc(var(--rail-w) + 10px);
  z-index: 300;
  padding: 10px 18px;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  box-shadow: 3px 3px 0 var(--ink);
  transform: translateY(-200%);
  transition: transform 0.18s ease;
}

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

/* ---------- 头部外壳 ---------- */
.site-header {
  display: block;
  position: relative;
}

/* 左侧竖向导轨 = 一级导航 */
.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 10px 0 14px;
  background: linear-gradient(180deg, #131C3F 0%, #0A1026 55%, #05080F 100%);
  border-right: 1px solid var(--ink);
  box-shadow: inset -1px 0 0 rgba(47, 128, 255, 0.25);
  z-index: 130;
}

.rail__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px 0 14px;
  margin: 0 8px 10px;
  border-bottom: 1px solid rgba(185, 194, 212, 0.16);
  text-decoration: none;
  flex: 0 0 auto;
}

.rail__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 2px 2px 0 var(--ink);
  transition: background-color 0.16s ease, transform 0.16s ease;
}

.rail__brand:hover .rail__mark,
.rail__brand:focus-visible .rail__mark {
  background: var(--lime);
  transform: translateY(-2px);
}

.rail__brand-name {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.45;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--gray);
}

.rail__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
}

.rail__item {
  width: 100%;
}

.rail__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 9px 3px;
  text-decoration: none;
  color: var(--gray);
  border-left: 3px solid transparent;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.rail__link:hover {
  color: var(--white);
  background: rgba(255, 107, 44, 0.10);
  border-left-color: var(--orange-soft);
}

.rail__link[aria-current="page"] {
  color: var(--white);
  background: linear-gradient(90deg, rgba(255, 107, 44, 0.24), rgba(255, 107, 44, 0));
  border-left-color: var(--orange);
}

.rail__num {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: rgba(185, 194, 212, 0.5);
  transition: color 0.16s ease;
}

.rail__link:hover .rail__num {
  color: var(--orange-soft);
}

.rail__link[aria-current="page"] .rail__num {
  color: var(--orange);
}

.rail__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}

.rail__tag {
  flex: 0 0 auto;
  width: 44px;
  margin: 10px auto 0;
  padding-top: 10px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(166, 242, 92, 0.8);
  border-top: 1px solid rgba(185, 194, 212, 0.14);
}

/* 顶部细栏 */
.topbar {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(12px, 2vw, 24px);
  background: rgba(5, 8, 15, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(185, 194, 212, 0.14);
  z-index: 125;
}

.topbar__note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.version-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 107, 44, 0.55);
  border-radius: 4px;
  background: rgba(255, 107, 44, 0.10);
  color: var(--orange-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.version-chip__label {
  color: rgba(255, 154, 94, 0.72);
  letter-spacing: 0.1em;
  transition: color 0.16s ease;
}

.version-chip__code {
  letter-spacing: 0.02em;
}

.version-chip:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

.version-chip:hover .version-chip__label {
  color: rgba(10, 16, 38, 0.72);
}

.topbar__link {
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--gray);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.topbar__link:hover {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}

.topbar__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--violet) 55%, var(--orange));
  pointer-events: none;
}

/* 移动端触发按钮 */
.nav-toggle {
  display: none;
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 16px;
  height: 12px;
}

.nav-toggle__bars span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle__text {
  line-height: 1;
}

/* 移动端底部快捷通道 */
.dock {
  display: none;
}

.dock__link {
  text-decoration: none;
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--ink);
  border-top: 1px solid rgba(185, 194, 212, 0.14);
  color: var(--gray);
}

.footer__slice {
  height: 6px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange-soft) 22%, var(--violet) 55%, var(--blue) 78%, var(--lime) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 45%);
}

.footer__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 48px) clamp(24px, 3vw, 36px);
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(0, 1.7fr) minmax(200px, 1fr);
  gap: clamp(24px, 3.5vw, 48px);
  align-items: start;
}

.footer__brand {
  min-width: 0;
}

.footer__wordmark {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: var(--white);
}

.footer__wordmark span {
  margin-left: 8px;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--orange);
}

.footer__tagline {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--gray);
}

.footer__version {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 10px;
  border: 1px dashed rgba(166, 242, 92, 0.45);
  border-radius: 4px;
  font-size: 12px;
  color: rgba(185, 194, 212, 0.8);
}

.footer__version .mono {
  font-size: 12px;
  color: var(--lime);
}

.footer__nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 24px;
  min-width: 0;
}

.footer__col {
  min-width: 0;
}

.footer__col-title {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  line-height: 1.4;
  color: rgba(255, 154, 94, 0.92);
}

.footer__links {
  display: grid;
  gap: 8px;
}

.footer__link {
  display: inline-block;
  font-size: 14px;
  color: var(--gray);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.footer__link:hover,
.footer__link:focus-visible {
  color: var(--white);
  border-bottom-color: var(--orange);
}

.footer__contact {
  min-width: 0;
}

.contact-line {
  display: flex;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.6;
}

.contact-line__key {
  flex: 0 0 auto;
  min-width: 2.6em;
  padding-top: 1px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(185, 194, 212, 0.55);
}

.contact-line__val {
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  word-break: break-word;
}

.footer__base {
  width: min(100% - 40px, var(--maxw));
  margin: 0 auto;
  padding: 18px 0 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  border-top: 1px solid rgba(185, 194, 212, 0.12);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(185, 194, 212, 0.65);
}

.footer__icp {
  margin: 0;
}

.footer__copy {
  margin: 0;
}

/* ---------- 通用布局组件 ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.section {
  padding: clamp(32px, 5vw, 68px) 0;
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.section__title {
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange-soft);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 2px;
  background: var(--orange);
  transform: skewX(-6deg);
}

#main-content {
  display: block;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.btn--primary {
  background: var(--orange);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.btn--primary:hover {
  background: var(--orange-soft);
  transform: translate(-1px, -2px);
  box-shadow: 4px 5px 0 var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(185, 194, 212, 0.4);
}

.btn--ghost:hover {
  background: rgba(255, 107, 44, 0.10);
  border-color: var(--orange);
  color: var(--white);
}

.btn--lime {
  background: var(--lime);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.btn--lime:hover {
  background: #BDFA7E;
  transform: translate(-1px, -2px);
  box-shadow: 4px 5px 0 var(--ink);
}

/* ---------- 印刷标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid rgba(185, 194, 212, 0.4);
  border-radius: 3px;
  background: transparent;
  color: var(--gray);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.tag:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

.tag[aria-pressed="true"] {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

.tag--lime {
  border-color: rgba(166, 242, 92, 0.5);
  color: var(--lime);
}

.tag--lime[aria-pressed="true"] {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}

.tag--blue {
  border-color: rgba(47, 128, 255, 0.5);
  color: #7FB0FF;
}

.tag--blue[aria-pressed="true"] {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(185, 194, 212, 0.7);
}

.breadcrumb a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.16s ease;
}

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

.breadcrumb__sep {
  color: rgba(185, 194, 212, 0.35);
}

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

/* ---------- 正文容器 ---------- */
.prose {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}

.prose h2 {
  margin: 1.6em 0 0.6em;
}

.prose h3 {
  margin: 1.4em 0 0.5em;
}

.prose p {
  margin: 0 0 1em;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose li::marker {
  color: var(--orange);
}

.prose a {
  color: #7FB0FF;
  text-decoration: underline;
  text-decoration-color: rgba(47, 128, 255, 0.5);
}

.prose a:hover {
  color: var(--orange-soft);
  text-decoration-color: currentColor;
}

.prose blockquote {
  margin: 1.5em 0;
  padding: 12px 18px;
  border-left: 3px solid var(--orange);
  background: rgba(255, 107, 44, 0.07);
  color: var(--gray);
}

/* ---------- Bento 网格 ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: start;
}

.bento__cell {
  position: relative;
  grid-column: span 12;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--void-2);
  box-shadow: 0 1px 0 rgba(47, 128, 255, 0.06);
  transition: border-color 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.bento__cell:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
}

.bento__cell--paper {
  background: var(--paper);
  color: #16181F;
  border-color: var(--ink);
}

.bento__cell--paper h2,
.bento__cell--paper h3,
.bento__cell--paper h4 {
  color: #10121A;
}

.bento__cell--paper a {
  color: #0A1026;
  text-decoration-color: rgba(10, 16, 38, 0.45);
}

.bento__cell--paper .cell-tag {
  border-color: rgba(10, 16, 38, 0.45);
  background: rgba(239, 233, 220, 0.9);
  color: #0A1026;
}

.cell-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 2px 8px;
  border: 1px solid rgba(255, 107, 44, 0.45);
  border-radius: 3px;
  background: rgba(10, 16, 38, 0.6);
  color: var(--orange-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  line-height: 1.6;
  white-space: nowrap;
}

@media (min-width: 720px) {
  .bento__cell--h2 { grid-column: span 6; }
  .bento__cell--h3 { grid-column: span 4; }
  .bento__cell--h4 { grid-column: span 3; }
  .bento__cell--h5 { grid-column: span 5; }
  .bento__cell--h7 { grid-column: span 7; }
  .bento__cell--h8 { grid-column: span 8; }
  .bento__cell--h9 { grid-column: span 9; }
}

/* ---------- 数据条 ---------- */
.data-bar {
  position: relative;
  display: block;
  height: 8px;
  border-radius: 2px;
  background: rgba(185, 194, 212, 0.15);
  overflow: hidden;
}

.data-bar__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--violet) 55%, var(--orange));
}

.data-bar.is-visible .data-bar__fill {
  width: var(--value, 0%);
  transition: width 0.8s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 折叠面板 ---------- */
.panel {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--void-2);
  overflow: hidden;
}

.panel + .panel {
  margin-top: 10px;
}

.panel__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  color: var(--white);
  transition: color 0.16s ease, background-color 0.16s ease;
}

.panel__summary::-webkit-details-marker {
  display: none;
}

.panel__summary:hover {
  color: var(--orange-soft);
  background: rgba(255, 107, 44, 0.06);
}

.panel__summary::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--orange);
}

.panel[open] .panel__summary::after {
  content: "−";
}

.panel__body {
  padding: 0 20px 18px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--gray);
  animation: panelIn 0.18s ease;
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 响应式图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 28% 18%, rgba(122, 92, 240, 0.45), transparent 55%),
    radial-gradient(circle at 76% 82%, rgba(255, 107, 44, 0.35), transparent 52%),
    linear-gradient(135deg, #131C3F 0%, #05080F 100%);
}

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

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

.media-frame--grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(185, 194, 212, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(185, 194, 212, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.35;
  pointer-events: none;
}

.media-frame__label {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(239, 233, 220, 0.62);
}

/* ---------- 进入动画 ---------- */
html.reveal-enabled [data-reveal]:not(.is-visible) {
  opacity: 0;
  transform: translateY(12px);
}

html.reveal-enabled [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ---------- 平板 ---------- */
@media (max-width: 1080px) {
  .footer__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  }

  .footer__contact {
    grid-column: 1 / -1;
  }
}

/* ---------- 移动端 ---------- */
@media (max-width: 900px) {
  :root {
    --rail-w: 0px;
    --topbar-h: 48px;
  }

  body {
    padding-left: 0;
    padding-bottom: 82px;
    background-attachment: scroll;
  }

  .skip-link {
    left: 12px;
  }

  .topbar {
    left: 0;
    padding: 0 14px;
  }

  .topbar__note {
    display: none;
  }

  .topbar__link {
    display: none;
  }

  .topbar__tools {
    margin-left: auto;
  }

  .rail {
    top: 0;
    bottom: 0;
    left: auto;
    right: 0;
    width: min(86vw, 330px);
    padding: 16px 0 calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translateX(104%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: none;
    border-left: 1px solid rgba(185, 194, 212, 0.18);
    box-shadow: -10px 0 40px rgba(5, 8, 15, 0.65);
    overflow-y: auto;
    z-index: 130;
  }

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

  .rail__brand {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    margin: 0;
    padding: 0 18px 14px;
    border-bottom: 1px solid rgba(185, 194, 212, 0.16);
  }

  .rail__brand-name {
    font-size: 12px;
    letter-spacing: 0.06em;
    text-align: left;
    line-height: 1.4;
  }

  .rail__list {
    flex: 0 0 auto;
    overflow: visible;
  }

  .rail__link {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 13px 18px;
  }

  .rail__link:hover {
    border-left-color: var(--orange);
  }

  .rail__text {
    font-size: 15px;
  }

  .rail__num {
    font-size: 11px;
    min-width: 1.6em;
  }

  .rail__tag {
    width: auto;
    margin: 16px 18px 0;
    padding-top: 12px;
    text-align: left;
  }

  .dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 122;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 84px 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(5, 8, 15, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 107, 44, 0.35);
  }

  .dock__link {
    flex: 1 1 0;
    min-width: 0;
    padding: 9px 4px;
    text-align: center;
    border: 1px solid rgba(185, 194, 212, 0.22);
    border-radius: 6px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
  }

  .dock__link:hover {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--ink);
  }

  .dock__link[aria-current="page"] {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--ink);
  }

  .nav-toggle {
    position: fixed;
    right: 12px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 145;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border: 1px solid var(--ink);
    border-radius: 7px;
    background: var(--orange);
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: 2px 2px 0 var(--ink);
    transition: background-color 0.16s ease, transform 0.16s ease;
  }

  .nav-toggle:hover {
    transform: translateY(-1px);
  }

  .nav-toggle[aria-expanded="true"] {
    background: var(--lime);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
  }

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

  .footer__contact {
    grid-column: auto;
  }

  .footer__nav {
    gap: 20px;
  }

  .footer__base {
    width: min(100% - 32px, var(--maxw));
    font-size: 10.5px;
    padding-bottom: 20px;
  }
}

@media (max-width: 420px) {
  .dock {
    padding-right: 78px;
    gap: 5px;
  }

  .dock__link {
    font-size: 11px;
    padding: 9px 2px;
  }

  .nav-toggle {
    padding: 9px 11px;
    font-size: 11px;
  }
}

/* ---------- 减少动效 ---------- */
@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;
  }

  .bento__cell:hover,
  .btn--primary:hover,
  .btn--lime:hover,
  .book-toggle:hover,
  .nav-toggle:hover {
    transform: none;
  }

  html.reveal-enabled [data-reveal]:not(.is-visible) {
    opacity: 1;
    transform: none;
  }

  .data-bar.is-visible .data-bar__fill {
    transition: none;
  }
}
