/* ============================================================
   site.css · 斗地主现金局 · 夜巡牌桌共享外壳
   令牌 / reset / 中文排版 / 头部 / 页脚 / 通用组件
   ============================================================ */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --table: #0B3D2E;
  --table-deep: #072A20;
  --chip: #C62839;
  --chip-dark: #8C1A27;
  --gold: #D4A64A;
  --ink: #121417;
  --cream: #F3EDE2;
  --cyan: #3FE0C5;
  --wine: #6E1F2B;
  --sage: #C9D6C8;
  --ivory: #FFF9EF;

  --shell: 1180px;
  --gutter: clamp(16px, 4vw, 52px);
  --r: 3px;
  --hair-light: 1px solid rgba(18, 20, 23, 0.14);
  --hair-dark: 1px solid rgba(201, 214, 200, 0.18);
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --shadow-card: 0 18px 44px -34px rgba(18, 20, 23, 0.75);
  --shadow-chip: inset 0 0 0 3px rgba(255, 249, 239, 0.18), 0 3px 0 var(--chip-dark), 0 12px 20px -14px rgba(0, 0, 0, 0.9);
}

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

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

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

ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

/* ---------- 3. 中文基础排版 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 10% 4%, rgba(212, 166, 74, 0.14), transparent 42%),
    radial-gradient(circle at 92% 0%, rgba(11, 61, 46, 0.10), transparent 46%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.3rem, 6.4vw, 4rem); }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.35rem); }
h3 { font-size: clamp(1.18rem, 2.2vw, 1.5rem); letter-spacing: -0.01em; }
h4 { font-size: 1.05rem; letter-spacing: 0; }

p { margin: 0; }
strong { font-weight: 800; }
::selection { background: var(--cyan); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
  box-shadow: 0 0 0 4px rgba(18, 20, 23, 0.35);
}

/* ---------- 4. 版式容器 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(38px, 6vw, 84px);
}
.section--table { background: var(--table); color: var(--ivory); }
.section--wine { background: var(--wine); color: var(--ivory); border-block: 1px solid rgba(212, 166, 74, 0.28); }
.section--dark { background: var(--table-deep); color: var(--ivory); }
.section--table .eyebrow,
.section--wine .eyebrow,
.section--dark .eyebrow { color: var(--gold); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--chip);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  flex: 0 0 auto;
}

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

.prose {
  max-width: 70ch;
  font-size: 1.03rem;
  line-height: 1.82;
}
.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 1.9em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.2em; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose a {
  color: var(--chip);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: rgba(18, 20, 23, 0.07);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

.crumbs {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: rgba(18, 20, 23, 0.62);
}
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.5em; }
.crumbs li { display: flex; align-items: center; gap: 0.5em; }
.crumbs li + li::before { content: "/"; color: var(--gold); }
.crumbs a { border-bottom: 1px solid transparent; }
.crumbs a:hover { border-bottom-color: currentColor; }
.crumbs [aria-current="page"] { color: var(--table); font-weight: 700; }

/* ---------- 5. 网格 ---------- */
.grid {
  display: grid;
  gap: clamp(18px, 3vw, 34px);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--editorial { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid--editorial > * { grid-column: 1 / -1; }

@media (min-width: 820px) {
  .grid--editorial > * { grid-column: auto; }
  .grid--editorial .col-note { grid-column: span 3; }
  .grid--editorial .col-main { grid-column: span 6; }
  .grid--editorial .col-aside { grid-column: span 3; }
  .grid--editorial .col-wide { grid-column: span 7; }
  .grid--editorial .col-slim { grid-column: span 5; }
}
@media (max-width: 819px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
}

/* ---------- 6. 按钮：筹码堆叠 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.75em 1.2em;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  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--chip {
  background: var(--chip);
  color: var(--ivory);
  border-color: var(--chip);
  box-shadow: var(--shadow-chip);
}
.btn--chip:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 3px rgba(255, 249, 239, 0.3), 0 5px 0 var(--chip-dark),
    0 18px 26px -14px rgba(0, 0, 0, 0.85);
}
.btn--chip:active {
  transform: translateY(1px);
  box-shadow: inset 0 0 0 3px rgba(255, 249, 239, 0.22), 0 1px 0 var(--chip-dark);
}
.btn--gold {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(212, 166, 74, 0.16);
}
.btn--gold:hover {
  transform: translateY(-2px);
  background: rgba(212, 166, 74, 0.12);
  color: var(--ivory);
}
.btn--sm { padding: 0.52em 0.85em; font-size: 0.82rem; }

/* ---------- 7. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.32em 0.6em;
  border: 1px solid rgba(18, 20, 23, 0.18);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--table);
  background: transparent;
}
.tag--gold { color: #7A5A12; border-color: rgba(212, 166, 74, 0.7); background: rgba(212, 166, 74, 0.16); }
.tag--cyan { color: #0C4A40; border-color: var(--cyan); background: rgba(63, 224, 197, 0.2); }
.tag--chip { color: var(--chip); border-color: rgba(198, 40, 57, 0.45); background: rgba(198, 40, 57, 0.08); }

/* ---------- 8. 图片容器基础规则 ---------- */
.figure-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(18, 20, 23, 0.18);
  border-radius: var(--r);
  background-color: var(--table);
  box-shadow: var(--shadow-card);
}
.figure-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure-frame--table {
  aspect-ratio: 16 / 10;
  background-image:
    radial-gradient(circle at 50% 48%, rgba(63, 224, 197, 0.16), transparent 62%),
    repeating-linear-gradient(45deg, rgba(255, 249, 239, 0.05) 0 1px, transparent 1px 9px),
    linear-gradient(160deg, var(--table), var(--table-deep));
}
.figure-frame--hand { aspect-ratio: 4 / 5; }
.figure-frame--wide { aspect-ratio: 21 / 9; }
.figure-frame--square { aspect-ratio: 1 / 1; }
.figure-cap {
  margin-top: 0.55em;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

/* ---------- 9. 分段切换 ---------- */
.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: var(--hair-light);
}
.tab {
  padding: 0.5em 0.85em;
  border: 1px solid rgba(18, 20, 23, 0.2);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.tab:hover { border-color: var(--gold); color: var(--table); }
.tab[aria-selected="true"] {
  background: var(--table);
  border-color: var(--table);
  color: var(--ivory);
}
.tabpanel { padding-top: clamp(18px, 3vw, 30px); }

/* ---------- 10. 头部 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  transform: translateY(-180%);
  padding: 0.55em 0.9em;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--ivory);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.16s var(--ease);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
}

.header-rail {
  background: var(--ink);
  color: var(--sage);
  font-size: 12px;
  letter-spacing: 0.03em;
}
.rail-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 34px;
  padding-block: 6px;
}
.rail-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ivory);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.rail-chip {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border: 1px dashed var(--gold);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--ivory) 0 22%, var(--chip) 24% 100%);
}
.rail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--sage);
}
.rail-dot { color: var(--gold); }

.header-main {
  position: relative;
  color: var(--ivory);
  background-color: var(--table);
  background-image: repeating-linear-gradient(135deg, rgba(255, 249, 239, 0.035) 0 1px, transparent 1px 7px);
  border-bottom: 1px solid rgba(212, 166, 74, 0.32);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 30px);
  min-height: 74px;
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 4px 2px;
  border-radius: 2px;
}
.brand-mark {
  position: relative;
  display: block;
  width: 26px;
  height: 36px;
  flex: 0 0 auto;
}
.brand-chip {
  --c: var(--chip);
  position: absolute;
  left: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c);
  box-shadow:
    inset 0 0 0 2px var(--ivory),
    inset 0 0 0 4px var(--c),
    inset 0 0 0 5px rgba(255, 249, 239, 0.5);
}
.brand-chip:nth-child(1) { top: 0; --c: var(--gold); }
.brand-chip:nth-child(2) { top: 5px; --c: var(--chip); }
.brand-chip:nth-child(3) { top: 10px; --c: var(--cyan); }

.brand-text { display: block; }
.brand-name {
  display: block;
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.25;
  color: var(--ivory);
  transition: color 0.18s var(--ease);
}
.brand-tag {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(201, 214, 200, 0.82);
}
.brand:hover .brand-name { color: var(--cyan); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 0.55em 0.75em;
  border: 1px solid rgba(212, 166, 74, 0.55);
  border-radius: 2px;
  background: rgba(7, 42, 32, 0.45);
  color: var(--ivory);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.nav-toggle-text { line-height: 1; }
.nav-toggle-bars { display: grid; gap: 3px; width: 16px; }
.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: var(--gold);
  transition: transform 0.18s var(--ease), opacity 0.18s var(--ease);
}
.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); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  margin-left: auto;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
}
.nav-link {
  display: inline-block;
  padding: 0.45em 0;
  border-bottom: 2px solid transparent;
  font-size: 0.93rem;
  font-weight: 700;
  color: rgba(255, 249, 239, 0.88);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.nav-link:hover { color: var(--cyan); border-bottom-color: rgba(63, 224, 197, 0.5); }
.nav-link[aria-current="page"] { color: var(--cyan); border-bottom-color: var(--cyan); }
.nav-cta { flex: 0 0 auto; }

.scroll-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 249, 239, 0.1);
  pointer-events: none;
}
.scroll-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--chip), var(--gold) 55%, var(--cyan));
  transition: transform 0.12s linear;
}

/* ---------- 11. 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--table-deep);
  color: var(--sage);
  border-top: 1px solid rgba(212, 166, 74, 0.32);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--chip), var(--gold) 45%, var(--cyan));
  opacity: 0.9;
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 44px);
  padding-block: clamp(34px, 5vw, 64px);
}
.footer-brand { max-width: 36ch; }
.footer-brand .brand-mark { margin-bottom: 12px; height: 34px; }
.footer-name {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--ivory);
}
.footer-line {
  margin-top: 10px;
  font-size: 0.92rem;
  line-height: 1.78;
  color: rgba(201, 214, 200, 0.84);
}
.footer-title {
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212, 166, 74, 0.24);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.footer-links li + li { margin-top: 8px; }
.footer-links a {
  display: inline-block;
  padding-block: 2px;
  font-size: 0.95rem;
  color: var(--cream);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.footer-links a:hover { color: var(--cyan); border-bottom-color: rgba(63, 224, 197, 0.6); }

.contact-list { display: block; }
.contact-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.contact-row + .contact-row { margin-top: 12px; }
.contact-row dt {
  flex: 0 0 100%;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(212, 166, 74, 0.9);
}
.contact-row dd { margin: 0; }
.contact-value {
  font-size: 0.92rem;
  color: var(--cream);
  overflow-wrap: anywhere;
}
.copy-btn {
  margin-left: 0.4em;
  padding: 0.26em 0.55em;
  border: 1px solid rgba(212, 166, 74, 0.55);
  border-radius: 2px;
  background: transparent;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.copy-btn:hover { background: rgba(212, 166, 74, 0.2); color: var(--ivory); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 22px;
  padding-block: 18px;
  border-top: var(--hair-dark);
  font-size: 12.5px;
  color: rgba(201, 214, 200, 0.75);
}
.footer-copy .mono { color: var(--gold); }
.legal-list { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.legal-list a {
  color: var(--sage);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.legal-list a:hover { color: var(--cyan); border-bottom-color: rgba(63, 224, 197, 0.6); }
.copy-status {
  flex: 1 0 100%;
  min-height: 1.2em;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--gold);
}

/* ---------- 12. 响应式 ---------- */
@media (min-width: 720px) {
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-col--contact { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .footer-top { grid-template-columns: 1.5fr 0.85fr 0.85fr 1.4fr; }
  .footer-col--contact { grid-column: auto; }
}

@media (max-width: 1080px) {
  .nav-link { font-size: 0.87rem; }
  .nav-list { gap: 10px; }
}

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 5;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin: 0;
    padding: 16px var(--gutter) 22px;
    max-height: calc(100vh - 92px);
    overflow-y: auto;
    background-color: var(--table-deep);
    background-image: repeating-linear-gradient(135deg, rgba(255, 249, 239, 0.03) 0 1px, transparent 1px 7px);
    border-bottom: 1px solid rgba(212, 166, 74, 0.35);
    box-shadow: 0 26px 44px -30px rgba(0, 0, 0, 0.92);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s linear;
  }
  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-item { border-bottom: 1px solid rgba(201, 214, 200, 0.16); }
  .nav-link {
    display: block;
    padding: 0.85em 0 0.85em 10px;
    border-bottom: 0;
    border-left: 2px solid transparent;
    font-size: 1rem;
  }
  .nav-link:hover { border-bottom-color: transparent; }
  .nav-link[aria-current="page"] {
    border-left-color: var(--cyan);
    background: rgba(63, 224, 197, 0.08);
  }
  .nav-cta { width: 100%; justify-content: center; }
}

@media (max-width: 700px) {
  .rail-meta { display: none; }
  .rail-brand { font-size: 11.5px; letter-spacing: 0; }
  .header-inner { min-height: 64px; gap: 10px; }
  .brand-name { font-size: 1rem; }
  .brand-tag { font-size: 9.5px; letter-spacing: 0.1em; }
  .rail-inner { min-height: 30px; }
  .footer-bottom { font-size: 12px; }
}

@media (max-width: 400px) {
  .nav-toggle-text { display: none; }
  .brand-mark { width: 22px; height: 32px; }
  .brand-chip { width: 22px; height: 22px; }
  .brand-chip:nth-child(2) { top: 4px; }
  .brand-chip:nth-child(3) { top: 8px; }
}

@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-fill { transition: none; }
}
