/* ==========================================================================
   财神棋牌888 · 共享样式表 /assets/site.css
   纸纹暖白 + 深墨绿 + 财神红 + 鎏金；粗边框、硬阴影、非对称编辑部骨相
   ========================================================================== */

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

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

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

ul, ol { list-style: none; }

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

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

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

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

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

hr { border: 0; }

[hidden] { display: none !important; }

/* ---------- 2. Design tokens ---------- */
:root {
  /* 色彩 */
  --red: #C5232C;
  --red-deep: #7E1A20;
  --gold: #F2B544;
  --wheat: #FFD98A;
  --ink-green: #123B2E;
  --ink-green-2: #1B5341;
  --cream: #FFF6E5;
  --cream-2: #FFFDF7;
  --ink: #171512;
  --copper: #61706A;
  --paper: #EDE3D0;
  --teal: #2E7D6B;
  --on-dark: #E7EFE9;
  --on-dark-soft: #A9BAB3;

  /* 字体 */
  --font-display: "ZCOOL KuaiLe", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 结构与节奏 */
  --header-h: 74px;
  --page-max: 1240px;
  --edge: clamp(16px, 4vw, 48px);
  --radius: 4px;

  /* 边框与阴影 */
  --line: 3px solid var(--ink);
  --line-soft: 1px solid rgba(23, 21, 18, .16);
  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-gold: 6px 6px 0 var(--gold);
  --shadow-red: 6px 6px 0 var(--red);

  /* 动效 */
  --t-fast: 160ms ease;
  --t-mid: 240ms ease;
}

@media (max-width: 959px) {
  :root { --header-h: 62px; }
}

/* ---------- 3. 中文排版基底 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  color: var(--ink);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.005em;
  text-wrap: balance;
}

h1 { font-size: clamp(34px, 5.4vw, 68px); }
h2 { font-size: clamp(24px, 3.4vw, 40px); }
h3 { font-size: clamp(19px, 2.2vw, 26px); }
h4 { font-size: 18px; }

p { text-wrap: pretty; }

strong, b { font-weight: 800; }

small { font-size: 13px; }

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

/* 全局焦点 */
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--gold);
}

/* 主内容固定头偏移 */
#main-content {
  display: block;
  padding-top: var(--header-h);
  scroll-margin-top: calc(var(--header-h) + 12px);
}

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, -160%);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--gold);
  background: var(--ink);
  border: 3px solid var(--gold);
  border-radius: 0 0 var(--radius) var(--radius);
  transition: transform var(--t-fast);
}

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

/* ---------- 5. 页头 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  color: var(--cream);
  background: rgba(23, 21, 18, .78);
  border-bottom: 3px solid rgba(23, 21, 18, .55);
  transition: background-color var(--t-mid), color var(--t-mid), border-color var(--t-mid), box-shadow var(--t-mid);
}

.site-header[data-scrolled] {
  color: var(--ink);
  background: var(--cream);
  border-bottom-color: var(--ink);
  box-shadow: 0 6px 0 rgba(197, 35, 44, .14);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 2vw, 30px);
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--edge);
  min-height: var(--header-h);
  position: relative;
}

/* 品牌牌匾 */
.brand-plaque {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 13px 5px 5px;
  color: #FFF3DD;
  background: var(--red);
  border: 2px solid var(--gold);
  border-radius: 3px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .5);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.brand-plaque:hover {
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .5);
}

.brand-plaque__seal {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  color: var(--red-deep);
  background: var(--wheat);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.brand-plaque__stack {
  display: block;
  min-width: 0;
}

.brand-plaque__name {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: .04em;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .35);
  white-space: nowrap;
}

.brand-plaque__sub {
  display: block;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .34em;
  color: var(--wheat);
  white-space: nowrap;
}

/* 移动导航开关 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
  color: inherit;
  border: 2px solid currentColor;
  border-radius: 3px;
  transition: background-color var(--t-fast), color var(--t-fast);
}

.nav-toggle:hover { background: rgba(242, 181, 68, .22); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background-color var(--t-fast);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform var(--t-fast);
}

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

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

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

/* 主导航 */
.site-nav {
  min-width: 0;
}

.site-nav__list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.site-nav__link {
  display: block;
  padding: 8px 13px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  color: inherit;
  border-bottom: 3px solid transparent;
  border-radius: 3px 3px 0 0;
  transition: color var(--t-fast), background-color var(--t-fast), border-color var(--t-fast);
}

.site-nav__link:hover {
  background: rgba(242, 181, 68, .22);
  border-bottom-color: var(--gold);
}

.site-nav__link[aria-current="page"] {
  color: #FFF3DD;
  background: var(--red);
  border-bottom-color: var(--gold);
}

.site-header[data-scrolled] .site-nav__link[aria-current="page"] {
  color: #FFF3DD;
  background: var(--red);
}

/* 页头右侧 */
.site-header__aside {
  display: flex;
  align-items: center;
  gap: 10px;
}

.version-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  white-space: nowrap;
  color: inherit;
  background: rgba(242, 181, 68, .14);
  border: 2px solid var(--gold);
  border-radius: 3px;
}

.version-badge__label { color: inherit; opacity: .82; }

.version-badge__num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--gold);
}

.site-header[data-scrolled] .version-badge {
  color: var(--ink);
  background: var(--wheat);
  border-color: var(--ink);
}

.site-header[data-scrolled] .version-badge__num { color: var(--red-deep); }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
  color: var(--gold);
  background: transparent;
  border: 2px solid var(--gold);
  border-radius: 3px;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.header-cta:hover {
  color: var(--ink);
  background: var(--gold);
}

.site-header[data-scrolled] .header-cta {
  color: #FFF3DD;
  background: var(--red);
  border-color: var(--ink);
}

.site-header[data-scrolled] .header-cta:hover {
  background: var(--red-deep);
  color: #FFF3DD;
}

/* 滚动进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}

.scroll-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
  transition: width 80ms linear;
}

.site-header[data-scrolled] .scroll-progress__bar {
  background: var(--red);
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  color: var(--on-dark);
  background: var(--ink-green);
  border-top: 8px solid var(--red);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 8px 0 auto 0;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 14px, transparent 14px 28px);
  opacity: .5;
  pointer-events: none;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.5fr;
  gap: clamp(24px, 3vw, 46px);
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding: clamp(38px, 5vw, 66px) var(--edge) clamp(28px, 4vw, 46px);
}

.footer-brand {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.footer-brand__seal {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  color: var(--red-deep);
  background: var(--gold);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(242, 181, 68, .28);
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .04em;
  color: var(--cream);
}

.footer-brand__note {
  max-width: 26ch;
  font-size: 13px;
  line-height: 1.7;
  color: var(--on-dark-soft);
}

.footer-brand__version {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2em;
  color: var(--wheat);
}

.footer-brand__num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--gold);
}

.footer-col { min-width: 0; }

.footer-col__title {
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .28em;
  color: var(--gold);
}

.footer-nav { min-width: 0; }

.footer-nav__list {
  display: grid;
  gap: 9px;
  font-size: 14px;
  line-height: 1.6;
}

.footer-nav__list a {
  display: inline-block;
  color: var(--on-dark);
  border-bottom: 2px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
}

.footer-nav__list a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.footer-contact {
  display: grid;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.6;
}

.footer-contact li {
  display: grid;
  gap: 2px;
}

.footer-contact__key {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .24em;
  color: var(--gold);
}

.footer-contact__val {
  color: var(--on-dark);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 32px;
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding: 18px var(--edge) 28px;
  border-top: 1px solid rgba(242, 181, 68, .3);
}

.footer-meta {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--wheat);
}

.footer-meta--soft {
  max-width: 62ch;
  color: var(--on-dark-soft);
}

/* ---------- 7. 正文容器与网格 ---------- */
.shell {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--edge);
}

.section {
  padding-block: clamp(36px, 5.5vw, 84px);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 24px;
  margin-bottom: clamp(20px, 3vw, 36px);
  padding-bottom: 14px;
  border-bottom: 3px solid var(--ink);
}

.section__title { font-size: clamp(24px, 3.4vw, 38px); }

.grid {
  display: grid;
  gap: clamp(18px, 2.6vw, 34px);
}

.grid--75 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.grid--84 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- 8. 基础组件 ---------- */
.panel {
  padding: clamp(18px, 2.4vw, 30px);
  background: var(--cream-2);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.panel--ink {
  color: var(--cream);
  background: var(--ink-green);
}

.panel--ink h2,
.panel--ink h3,
.panel--ink h4 { color: var(--cream); }

.panel--paper {
  background: var(--paper);
  box-shadow: none;
}

.panel--flat { box-shadow: none; }

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .3em;
  color: var(--red);
}

.panel--ink .eyebrow { color: var(--gold); }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  font-weight: 700;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.8;
  letter-spacing: .06em;
  color: var(--ink);
  background: var(--wheat);
  border: 2px solid var(--ink);
  border-radius: 2px;
}

.divider {
  height: 3px;
  margin-block: clamp(24px, 4vw, 48px);
  background: var(--ink);
  border: 0;
}

.notice {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--wheat);
  border-left: 6px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .02em;
  text-align: center;
  color: var(--ink);
  background: var(--cream-2);
  border: 3px solid var(--ink);
  border-radius: 3px;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast), color var(--t-fast);
}

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

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

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

.btn--primary:hover { background: var(--red-deep); }

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

.btn--ghost {
  color: inherit;
  background: transparent;
  box-shadow: none;
}

.btn--ghost:hover {
  transform: none;
  box-shadow: none;
  background: rgba(242, 181, 68, .24);
}

.btn--sm {
  padding: 7px 14px;
  font-size: 13px;
  box-shadow: 3px 3px 0 var(--ink);
}

/* 面包屑 */
.breadcrumbs {
  padding-block: 18px 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--copper);
}

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

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs li + li::before {
  content: "/";
  font-weight: 800;
  color: var(--gold);
}

.breadcrumbs a {
  font-weight: 700;
  color: var(--ink);
  border-bottom: 2px solid var(--gold);
  transition: color var(--t-fast);
}

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

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

/* 响应式图片容器 */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(45deg, rgba(23, 21, 18, .06) 0 10px, transparent 10px 20px);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

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

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

.media-frame__caption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--copper);
}

/* ---------- 9. 响应式 ---------- */
@media (max-width: 1024px) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-col:last-child { grid-column: 1 / -1; }
}

@media (max-width: 959px) {
  .site-header__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0;
    padding-block: 7px;
  }

  .brand-plaque { grid-column: 1; }
  .brand-plaque__seal { width: 30px; height: 30px; font-size: 17px; }
  .brand-plaque__name { font-size: 15px; }
  .brand-plaque__sub { font-size: 9px; letter-spacing: .28em; }

  .nav-toggle {
    display: inline-flex;
    grid-column: 2;
    justify-self: end;
  }

  .site-header__aside { display: none; }

  .site-nav {
    grid-column: 1 / -1;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--t-mid);
  }

  .site-nav[data-open] {
    max-height: min(74vh, 560px);
    overflow-y: auto;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding-block: 6px 10px;
    overflow-x: visible;
    border-top: 2px solid rgba(242, 181, 68, .4);
  }

  .site-nav__link {
    padding: 13px 8px;
    font-size: 16px;
    border-bottom: 2px solid rgba(242, 181, 68, .18);
    border-radius: 0;
  }

  .site-nav__link[aria-current="page"] {
    border-radius: 3px;
    border-bottom-color: var(--gold);
  }

  .grid--75,
  .grid--84,
  .grid--2,
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 719px) {
  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .footer-col:last-child { grid-column: auto; }

  .site-footer__base { flex-direction: column; }

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

/* ---------- 10. 无障碍与减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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