/* =========================================================
   太阳集团游戏刊 · 共享 Site Kit
   轨道坐标 / 蓝图网格 / 日光强调
   ========================================================= */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --ink: #1A1A1A;
  --ink-soft: #2B2B2B;
  --sand: #F4F1EA;
  --paper: #FFF8EC;
  --white: #FFFFFF;
  --gold: #F5A623;
  --gold-deep: #C97E12;
  --gold-pale: #FDE7BF;
  --orange: #D97706;
  --green: #3F6B4A;
  --blue: #2A6F97;
  --muted: #6B6B6B;

  --rule: rgba(26, 26, 26, 0.14);
  --rule-strong: rgba(26, 26, 26, 0.32);
  --rule-dark: rgba(244, 241, 234, 0.16);

  --rail: 104px;
  --topbar: 64px;
  --pad: clamp(20px, 5vw, 72px);
  --radius: 5px;

  --font-sans: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", Georgia, "Times New Roman", serif;

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

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

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

body {
  margin: 0;
  padding-top: var(--topbar);
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

@media (min-width: 1024px) {
  body {
    padding-top: 0;
    padding-left: var(--rail);
    font-size: 17px;
  }
}

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

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

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

h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

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

/* ---------- 3. 排版与工具类 ---------- */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.note {
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.75;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.lead {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.72;
  color: var(--ink-soft);
  max-width: 56ch;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  flex: 0 0 auto;
}

.rule {
  height: 1px;
  border: 0;
  background: var(--rule);
  margin: 0;
}

/* ---------- 4. 布局容器 ---------- */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.wrap--narrow { max-width: 860px; }

.section { padding-block: clamp(52px, 7vw, 104px); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(24px, 4vw, 44px);
}

.grid { display: grid; gap: clamp(20px, 3vw, 40px); }

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

@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 5. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 12px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--gold);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 0 0 var(--radius) var(--radius);
  transform: translateY(-130%);
  transition: transform 0.18s var(--ease);
}

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

/* ---------- 6. 头部轨道 ---------- */
.site-rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar);
  padding: 0 16px;
  background: #141414;
  color: var(--sand);
  border-bottom: 1px solid var(--rule-dark);
}

@media (min-width: 1024px) {
  .site-rail {
    width: var(--rail);
    right: auto;
    bottom: 0;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 22px 0 18px;
    border-bottom: 0;
    border-right: 1px solid var(--rule-dark);
    background: linear-gradient(180deg, #121212 0%, #1A1A1A 58%, #191919 100%);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}

.rail__bar {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (min-width: 1024px) {
  .rail__bar {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    width: 100%;
    padding: 0 10px;
  }
}

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

@media (min-width: 1024px) {
  .rail__brand { flex-direction: column; gap: 12px; }
}

.rail__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

@media (min-width: 1024px) {
  .rail__mark { width: 38px; height: 38px; font-size: 18px; }
}

.rail__name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  white-space: nowrap;
  color: var(--sand);
}

@media (min-width: 1024px) {
  .rail__name {
    writing-mode: vertical-rl;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.26em;
    line-height: 1.2;
    white-space: normal;
    color: rgba(244, 241, 234, 0.88);
  }
}

.rail__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(244, 241, 234, 0.3);
  border-radius: var(--radius);
  color: var(--sand);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.rail__toggle:hover { border-color: var(--gold); color: var(--gold); }

.rail__toggle[aria-expanded="true"] {
  border-color: var(--gold);
  color: var(--gold);
}

@media (min-width: 1024px) {
  .rail__toggle { display: none; }
}

.rail__toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.18s var(--ease);
}

.rail__toggle-bars::before,
.rail__toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease);
}

.rail__toggle-bars::before { top: -6px; }
.rail__toggle-bars::after { top: 6px; }

.rail__toggle-text { line-height: 1; }

.rail__nav {
  position: fixed;
  top: var(--topbar);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 79;
  display: flex;
  flex-direction: column;
  padding: 22px 20px 40px;
  background: #121212;
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.26s var(--ease), visibility 0s linear 0.26s;
}

.rail__nav[data-open] {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.26s var(--ease), visibility 0s linear 0s;
}

@media (min-width: 1024px) {
  .rail__nav {
    position: static;
    inset: auto;
    z-index: auto;
    width: 100%;
    flex: 1 1 auto;
    transform: none;
    visibility: visible;
    padding: 16px 8px 0;
    background: transparent;
    overflow: visible;
    border-top: 1px solid var(--rule-dark);
    transition: none;
  }
}

.rail__nav-title {
  padding-bottom: 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--rule-dark);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--gold-deep);
}

@media (min-width: 1024px) {
  .rail__nav-title { display: none; }
}

.rail__list { display: flex; flex-direction: column; }

.rail__item { border-bottom: 1px solid rgba(244, 241, 234, 0.12); }

.rail__link {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 2px;
  color: rgba(244, 241, 234, 0.76);
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.rail__link:hover { color: var(--gold); }

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

.rail__idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold-deep);
}

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

.rail__label {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

@media (min-width: 1024px) {
  .rail__list { gap: 2px; }
  .rail__item { border-bottom: 0; }

  .rail__link {
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 9px 2px;
    border-radius: var(--radius);
    color: rgba(244, 241, 234, 0.66);
  }

  .rail__link:hover {
    background: rgba(245, 166, 35, 0.12);
    color: var(--sand);
  }

  .rail__link[aria-current="page"] {
    background: rgba(245, 166, 35, 0.16);
    color: var(--sand);
  }

  .rail__idx { font-size: 9.5px; }

  .rail__label {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
  }
}

.rail__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  padding: 13px 8px;
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  white-space: nowrap;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.rail__cta:hover { background: var(--gold-pale); }

@media (min-width: 1024px) {
  .rail__cta {
    margin-top: 18px;
    padding: 12px 4px;
    font-size: 12.5px;
    letter-spacing: 0.06em;
  }
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  padding: clamp(48px, 7vw, 92px) var(--pad) 0;
  background: var(--ink);
  color: var(--sand);
  border-top: 2px solid var(--gold);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(244, 241, 234, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 241, 234, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 72%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 72%);
}

.footer__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(30px, 4vw, 48px);
  max-width: 1200px;
  margin-inline: auto;
}

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

@media (min-width: 1080px) {
  .footer__grid {
    grid-template-columns: 1.35fr 0.8fr 0.8fr 1.2fr;
    gap: clamp(28px, 3vw, 56px);
  }
}

.footer__brand { min-width: 0; }

.footer__mark {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 6px;
  background: var(--gold);
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.footer__name {
  margin-top: 16px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--sand);
}

.footer__tag {
  margin-top: 8px;
  max-width: 24em;
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.1em;
  color: rgba(244, 241, 234, 0.58);
}

.footer__col { min-width: 0; }

.footer__title {
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--rule-dark);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer__list a {
  display: inline-block;
  padding-bottom: 2px;
  font-size: 14.5px;
  color: rgba(244, 241, 234, 0.76);
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.footer__list a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold-deep);
}

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(244, 241, 234, 0.72);
}

.footer__contact li { word-break: break-word; }

.footer__label {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(244, 241, 234, 0.4);
}

.footer__bottom {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: clamp(36px, 5vw, 60px) auto 0;
  padding: 22px 0 30px;
  border-top: 1px solid var(--rule-dark);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 26px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: rgba(244, 241, 234, 0.55);
}

.footer__copyright { margin: 0; }

.footer__legal {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

/* ---------- 8. 按钮 / 标签 / 面板 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--gold-pale); }

.btn--dark { background: var(--ink); color: var(--sand); }
.btn--dark:hover { background: var(--ink-soft); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn--ghost:hover { background: var(--paper); border-color: var(--ink); }

.btn--ghost-light {
  background: transparent;
  color: var(--sand);
  border-color: rgba(244, 241, 234, 0.34);
}
.btn--ghost-light:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.06);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

.tag--gold { background: var(--gold-pale); color: var(--ink); }
.tag--green { background: rgba(63, 107, 74, 0.14); color: var(--green); }
.tag--blue { background: rgba(42, 111, 151, 0.13); color: var(--blue); }
.tag--orange { background: rgba(217, 119, 6, 0.14); color: var(--orange); }

.panel {
  padding: clamp(20px, 3vw, 32px);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
}

.panel--dark {
  background: var(--ink-soft);
  border-color: var(--rule-dark);
  color: var(--sand);
}

/* ---------- 9. 面包屑 ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

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

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: rgba(26, 26, 26, 0.28);
}

.breadcrumb a {
  border-bottom: 1px solid var(--rule);
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.breadcrumb a:hover { color: var(--ink); border-bottom-color: var(--gold); }

/* ---------- 10. 正文排版 ---------- */
.prose {
  max-width: 72ch;
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
}

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

.prose h2 {
  margin-top: 2em;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin-top: 1.7em;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.45;
}

.prose ul { list-style: disc; padding-left: 1.35em; }
.prose ol { list-style: decimal; padding-left: 1.35em; }
.prose ul li,
.prose ol li { margin-top: 0.4em; }

.prose a {
  color: var(--blue);
  border-bottom: 1px solid rgba(42, 111, 151, 0.35);
}

.prose a:hover { border-bottom-color: var(--blue); }

.prose blockquote {
  padding-left: 18px;
  border-left: 3px solid var(--gold);
  font-family: var(--font-serif);
  color: var(--muted);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: rgba(26, 26, 26, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

/* ---------- 11. 图片容器基座 ---------- */
.img-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background:
    linear-gradient(rgba(26, 26, 26, 0.05) 1px, transparent 1px) 0 0 / 100% 28px,
    var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 10px;
}

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

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

@media (max-width: 719px) {
  .img-frame--band { aspect-ratio: 16 / 9; }
}

/* ---------- 12. 阅读进度与显现 ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  height: 3px;
  pointer-events: none;
  background: transparent;
}

.reading-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
  transition: width 0.1s linear;
}

@media (min-width: 1024px) {
  .reading-progress { left: var(--rail); }
}

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 13. 减少动效 ---------- */
@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;
    scroll-behavior: auto !important;
  }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .rail__nav { transition: none; }
  .reading-progress__bar { transition: none; }
}
