/* ==========================================================================
   老虎游戏机游 · 共享样式 /assets/site.css
   框架：左侧 88px 深色导轨 + 顶部 64px 横框 + 连续画布正文 + 夜蓝页脚
   ========================================================================== */

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

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

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

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

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

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

a { color: inherit; }

table { border-collapse: collapse; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #14100E;
  --paper: #F4EDE2;
  --paper-light: #FFFBF4;
  --paper-shadow: #DCD2C4;
  --orange: #E0591F;
  --orange-deep: #A83A0E;
  --teal: #0E7C8C;
  --teal-soft: #7FC6D0;
  --gold: #D9A227;
  --night: #0B1B22;
  --green: #2F7D4F;
  --brick: #B0392E;

  --rail-w: 88px;
  --bar-h: 64px;
  --bar-h-sm: 56px;
  --radius: 2px;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace,
    SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(
      115deg,
      rgba(224, 89, 31, 0.035) 0 12px,
      transparent 12px 34px
    );
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--bar-h-sm);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p { max-width: 34em; }

strong, b { font-weight: 700; }

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

/* ---------- 4. 焦点与可访问性 ---------- */
:focus-visible {
  outline: 2px solid var(--teal-soft);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(14, 124, 140, 0.28);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  transform: translateY(-140%);
  padding: 12px 22px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
  transition: transform 0.2s var(--ease);
}

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

/* ---------- 5. 页头：顶部横框 ---------- */
.site-header {
  position: relative;
  z-index: 60;
}

.frame-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--bar-h-sm);
  z-index: 70;
  background: var(--night);
  color: var(--paper);
}

.frame-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
  padding: 0 clamp(14px, 2.4vw, 32px);
}

.frame-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--paper);
  flex: 0 1 auto;
  min-width: 0;
}

.frame-brand__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  background: var(--orange);
  color: var(--paper-light);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  border-radius: var(--radius);
  transform: rotate(-4deg);
  box-shadow: 2px 2px 0 rgba(217, 162, 39, 0.55);
}

.frame-brand__name {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frame-bar__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.version-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(14, 124, 140, 0.18);
  border: 1px solid rgba(127, 198, 208, 0.5);
  border-radius: var(--radius);
  color: var(--paper);
  cursor: pointer;
  transition: background-color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.version-chip__label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--teal-soft);
  white-space: nowrap;
}

.version-chip__num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--teal-soft);
}

.version-chip:hover {
  background: rgba(14, 124, 140, 0.34);
  border-color: var(--teal-soft);
}

.version-chip.is-copied {
  background: rgba(217, 162, 39, 0.24);
  border-color: var(--gold);
}

.version-chip.is-copied .version-chip__num,
.version-chip.is-copied .version-chip__label {
  color: var(--gold);
}

.version-chip.is-failed {
  background: rgba(176, 57, 46, 0.28);
  border-color: var(--brick);
}

/* 阅读进度条 */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(224, 89, 31, 0.22);
  overflow: hidden;
}

.scroll-meter__fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--teal) 0%, var(--orange) 62%, var(--gold) 100%);
}

/* ---------- 6. 页头：左侧导轨 ---------- */
.frame-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(292px, 84vw);
  z-index: 90;
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: var(--paper);
  border-right: 2px solid var(--orange);
  box-shadow: 14px 0 34px rgba(20, 16, 14, 0.28);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(-100%);
  transition: transform 0.28s var(--ease);
}

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

.frame-rail__top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(244, 237, 226, 0.16);
}

.frame-rail__seal {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  background: var(--orange);
  color: var(--paper-light);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  border-radius: var(--radius);
  transform: rotate(-4deg);
  box-shadow: 3px 3px 0 rgba(217, 162, 39, 0.5);
}

.frame-rail__type {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--teal-soft);
  white-space: nowrap;
}

.rail-nav {
  padding: 10px 0;
}

.rail-nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-nav__link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 16px;
  border-left: 4px solid transparent;
  color: rgba(244, 237, 226, 0.8);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: 0.04em;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.rail-nav__index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--teal-soft);
  flex: 0 0 auto;
}

.rail-nav__name {
  font-weight: 500;
}

.rail-nav__link:hover {
  color: var(--paper-light);
  background: rgba(224, 89, 31, 0.16);
  border-left-color: rgba(224, 89, 31, 0.6);
}

.rail-nav__link[aria-current="page"] {
  color: var(--paper-light);
  background: rgba(224, 89, 31, 0.2);
  border-left-color: var(--orange);
}

.rail-nav__link[aria-current="page"] .rail-nav__name {
  font-weight: 900;
}

.rail-nav__link[aria-current="page"] .rail-nav__index {
  color: var(--gold);
}

.frame-rail__foot {
  margin-top: auto;
  padding: 14px 14px 20px;
  border-top: 1px solid rgba(244, 237, 226, 0.14);
}

.frame-rail__foot .btn {
  font-size: 13px;
  padding: 12px 10px;
}

/* 遮罩 */
.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 85;
  padding: 0;
  border: 0;
  background: rgba(20, 16, 14, 0.56);
  cursor: pointer;
}

.nav-scrim[data-visible="true"] {
  display: block;
}

/* ---------- 7. 按钮 ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--paper-shadow);
}

.btn:active {
  transform: translate(0, 0);
  box-shadow: none;
}

.btn--primary {
  --btn-bg: var(--orange);
  --btn-fg: var(--paper-light);
  --btn-bd: var(--orange-deep);
}

.btn--primary:hover {
  --btn-bg: var(--orange-deep);
  box-shadow: 4px 4px 0 rgba(20, 16, 14, 0.32);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  --btn-bd: rgba(244, 237, 226, 0.42);
}

.btn--ghost:hover {
  --btn-bd: var(--teal-soft);
  --btn-fg: var(--paper-light);
  background: rgba(14, 124, 140, 0.22);
  box-shadow: 4px 4px 0 rgba(224, 89, 31, 0.4);
}

.btn--quiet {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--ink);
}

.btn--quiet:hover {
  --btn-bg: var(--paper-light);
  --btn-bd: var(--orange);
  --btn-fg: var(--orange-deep);
}

.btn--block {
  width: 100%;
}

/* ---------- 8. 移动导航开关 ---------- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(244, 237, 226, 0.42);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.18s var(--ease),
    background-color 0.18s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--teal-soft);
  background: rgba(14, 124, 140, 0.2);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 20px;
  height: 14px;
}

.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--paper);
  transition: transform 0.22s var(--ease), opacity 0.18s var(--ease);
}

.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 6px; }
.nav-toggle__bars span:nth-child(3) { top: 12px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(6px) 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(-6px) rotate(-45deg);
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  padding-top: clamp(30px, 4vw, 46px);
  background: var(--night);
  color: var(--paper);
  border-top: 3px solid var(--orange);
}

.footer-mark {
  height: 10px;
  margin: 0 auto clamp(26px, 4vw, 44px);
  max-width: 1280px;
  background: repeating-linear-gradient(
    112deg,
    var(--orange) 0 14px,
    transparent 14px 30px
  );
  opacity: 0.5;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 40px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(26px, 4vw, 40px);
}

.footer-brand__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--paper);
}

.footer-brand__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  background: var(--orange);
  color: var(--paper-light);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  border-radius: var(--radius);
  transform: rotate(-4deg);
  box-shadow: 3px 3px 0 rgba(217, 162, 39, 0.55);
}

.footer-brand__name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.footer-brand__summary {
  margin-top: 16px;
  max-width: 32em;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(244, 237, 226, 0.76);
}

.footer-brand__cta {
  margin-top: 20px;
}

.footer-col__title {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(244, 237, 226, 0.18);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--teal-soft);
  text-transform: uppercase;
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col__link {
  display: inline-block;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(244, 237, 226, 0.82);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.footer-col__link:hover {
  color: var(--paper-light);
  border-bottom-color: var(--orange);
}

.footer-contact {
  max-width: 1280px;
  margin: clamp(30px, 4vw, 46px) auto 0;
  padding: clamp(22px, 3vw, 28px) clamp(18px, 4vw, 40px) 0;
  border-top: 1px solid rgba(244, 237, 226, 0.16);
}

.footer-contact__title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--teal-soft);
  text-transform: uppercase;
}

.footer-contact__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px 32px;
}

.footer-contact__row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.footer-contact__key {
  flex: 0 0 auto;
  min-width: 5.5em;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(127, 198, 208, 0.9);
}

.footer-contact__value {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(244, 237, 226, 0.88);
  word-break: break-word;
}

.footer-bottom {
  margin-top: clamp(28px, 4vw, 44px);
  border-top: 1px solid rgba(244, 237, 226, 0.16);
  background: rgba(20, 16, 14, 0.45);
}

.footer-bottom__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px clamp(18px, 4vw, 40px) 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(244, 237, 226, 0.6);
}

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

.footer-bottom__icp {
  max-width: none;
  color: rgba(127, 198, 208, 0.85);
}

/* ---------- 10. 通用布局与内容组件 ---------- */
.shell {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 40px);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(20, 16, 14, 0.6);
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb__link {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.breadcrumb__link:hover {
  color: var(--orange-deep);
  border-bottom-color: var(--orange);
}

.breadcrumb__sep {
  color: var(--paper-shadow);
}

.breadcrumb__current {
  color: var(--ink);
  font-weight: 700;
}

.breadcrumb--invert { color: rgba(244, 237, 226, 0.6); }
.breadcrumb--invert .breadcrumb__link { color: var(--teal-soft); }
.breadcrumb--invert .breadcrumb__link:hover { color: var(--gold); border-bottom-color: var(--gold); }
.breadcrumb--invert .breadcrumb__sep { color: rgba(244, 237, 226, 0.32); }
.breadcrumb--invert .breadcrumb__current { color: var(--paper-light); }

.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background-color: var(--paper-shadow);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--paper-shadow);
}

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

.media-frame--ratio { aspect-ratio: 16 / 9; }
.media-frame--portrait { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame--dark {
  background-color: rgba(11, 27, 34, 0.9);
  border-color: rgba(244, 237, 226, 0.35);
  box-shadow: 5px 5px 0 rgba(224, 89, 31, 0.35);
}

.stripe-band {
  height: 12px;
  border-top: 1px solid rgba(20, 16, 14, 0.12);
  border-bottom: 1px solid rgba(20, 16, 14, 0.12);
  background-image: repeating-linear-gradient(
    115deg,
    rgba(224, 89, 31, 0.22) 0 10px,
    transparent 10px 28px
  );
}

/* ---------- 11. 响应式 ---------- */
@media (max-width: 479px) {
  .version-chip__label { display: none; }
  .frame-brand__name { font-size: 13px; }
  .frame-bar__inner { gap: 10px; }
}

@media (max-width: 767px) {
  .frame-bar .btn--ghost,
  .frame-bar .btn--primary { display: none; }
  .footer-contact__row { flex-direction: column; gap: 2px; }
  .footer-contact__key { min-width: 0; }
}

@media (min-width: 768px) {
  .footer-contact__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

  .frame-bar {
    left: var(--rail-w);
    height: var(--bar-h);
  }

  .frame-rail {
    width: var(--rail-w);
    transform: none;
    box-shadow: none;
    border-right: 1px solid rgba(224, 89, 31, 0.85);
    overflow-x: hidden;
  }

  .frame-rail__top {
    flex-direction: column;
    gap: 8px;
    padding: 18px 0 14px;
    text-align: center;
  }

  .frame-rail__seal {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .frame-rail__type {
    font-size: 9px;
    letter-spacing: 0.16em;
    white-space: normal;
    line-height: 1.4;
  }

  .rail-nav {
    padding: 8px 0;
  }

  .rail-nav__list {
    gap: 1px;
  }

  .rail-nav__link {
    display: block;
    padding: 10px 6px 10px 5px;
    border-left-width: 3px;
    font-size: 12px;
    line-height: 1.35;
    letter-spacing: 0.05em;
    text-align: center;
  }

  .rail-nav__index {
    display: block;
    margin-bottom: 2px;
    font-size: 9px;
    letter-spacing: 0.14em;
  }

  .rail-nav__name {
    display: block;
  }

  .frame-rail__foot {
    padding: 10px 6px 16px;
  }

  .frame-rail__foot .btn {
    font-size: 11px;
    padding: 10px 4px;
    line-height: 1.4;
  }

  .nav-toggle {
    display: none;
  }

  .nav-scrim {
    display: none !important;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
    gap: clamp(24px, 3vw, 44px);
  }

  .footer-contact__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .footer-contact__row {
    flex-direction: column;
    gap: 2px;
  }
}

@media (min-width: 1280px) {
  .rail-nav__link {
    font-size: 12.5px;
  }
}

/* ---------- 12. 用户偏好 ---------- */
@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;
  }

  .btn:hover,
  .btn:active {
    transform: none;
    box-shadow: none;
  }

  .frame-rail { transition: none; }

  .skip-link { transition: none; }
}
