/* ==========================================================================
   3368财神棋牌 · /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 头部 / 页脚 / 通用组件 / 动效
   ========================================================================== */

/* ---------- 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, dt, dd, figure, blockquote {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

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

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

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

table { border-collapse: collapse; }

[hidden] { display: none !important; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 矿物色体系 */
  --red: #C8102E;
  --red-deep: #8C0A1F;
  --gold: #D4A017;
  --gold-lite: #F2D27A;
  --jade: #0F6B5C;
  --night: #0B1B2B;
  --night-2: #163A5F;
  --stone: #6B6B6B;
  --rice: #F7F3E9;
  --paper: #FFFDF7;
  --ink: #1A1A1A;
  --neon: #7B2CBF;

  /* 字体栈 */
  --font-title: "ZCOOL QingKe HuangYou", "Alibaba PuHuiTi Heavy", "Noto Sans SC Black", "Noto Sans SC", "PingFang SC", sans-serif;
  --font-num: "JetBrains Mono", "IBM Plex Mono", "DIN Alternate", "SFMono-Regular", "Courier New", monospace;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-anno: "Noto Serif SC", "Songti SC", "SimSun", serif;

  /* 尺寸节奏 */
  --shell: 1200px;
  --gutter: clamp(18px, 4vw, 44px);
  --header-h: 82px;
  --radius: 6px;
  --hairline: rgba(26, 26, 26, 0.14);
  --hairline-gold: rgba(242, 210, 122, 0.28);
  --shadow-paper: 0 1px 0 rgba(26, 26, 26, 0.05), 0 18px 40px -28px rgba(11, 27, 43, 0.55);
  --shadow-float: 0 30px 70px -34px rgba(11, 27, 43, 0.65);
}

/* ---------- 3. 基础排版 ---------- */
body {
  background-color: var(--rice);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(200, 16, 46, 0.05), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(15, 107, 92, 0.06), transparent 46%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.015em;
}

strong { font-weight: 700; }

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

::selection {
  background: var(--red);
  color: var(--paper);
}

/* ---------- 4. 工具类 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.rule {
  height: 1px;
  border: 0;
  margin-block: clamp(28px, 5vw, 56px);
  background: linear-gradient(90deg, transparent, var(--gold) 35%, var(--red) 65%, transparent);
  opacity: 0.7;
}

.anno {
  font-family: var(--font-anno);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--stone);
}

.anno--vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.34em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 10px;
  z-index: 130;
  padding: 10px 18px;
  background: var(--gold);
  color: var(--night);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  border-radius: 2px;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.6);
  transform: translateY(-180%);
  transition: transform 0.22s ease;
}

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

/* ---------- 5. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: var(--paper);
  background: linear-gradient(180deg, rgba(11, 27, 43, 0.82) 0%, rgba(11, 27, 43, 0.4) 62%, rgba(11, 27, 43, 0) 100%);
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.site-header[data-scrolled] {
  background: var(--night);
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.95);
}

.header-rail {
  height: 3px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 22%, var(--gold) 44%, var(--gold-lite) 62%, var(--jade) 78%, var(--night-2) 100%);
}

.header-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 34px);
  min-height: calc(var(--header-h) - 3px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 auto;
  min-width: 0;
}

.brand-seal {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  background: linear-gradient(150deg, var(--red), var(--red-deep));
  color: var(--paper);
  font-family: var(--font-title);
  font-size: 22px;
  line-height: 1;
  border: 1px solid var(--gold-lite);
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
  box-shadow: inset 0 0 14px rgba(242, 210, 122, 0.35);
}

.brand-seal--lg {
  width: 56px;
  height: 56px;
  font-size: 28px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-title);
  font-size: 20px;
  letter-spacing: 0.06em;
  line-height: 1.2;
  color: var(--paper);
  white-space: nowrap;
}

.brand-tag {
  font-family: var(--font-anno);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold-lite);
  white-space: nowrap;
}

.site-nav {
  margin-inline: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.9vw, 10px);
}

.nav-item { display: block; }

.nav-link {
  position: relative;
  display: block;
  padding: 9px 12px;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: rgba(247, 243, 233, 0.82);
  transition: color 0.22s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 3px;
  background: var(--gold);
  transform: skewX(-20deg) scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.26s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--gold-lite);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: skewX(-20deg) scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--paper);
  font-weight: 700;
}

.nav-link[aria-current="page"]::after {
  transform: skewX(-20deg) scaleX(1);
}

.nav-note {
  display: none;
  font-family: var(--font-anno);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: rgba(242, 210, 122, 0.68);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.header-cta { white-space: nowrap; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--hairline-gold);
  border-radius: 2px;
  color: var(--gold-lite);
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.nav-toggle:hover {
  background: rgba(242, 210, 122, 0.12);
  border-color: var(--gold);
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.28s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--red), var(--gold) 55%, var(--jade));
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, var(--night-2) 0%, var(--night) 34%, #060f19 100%);
  color: rgba(247, 243, 233, 0.78);
  border-top: 1px solid var(--hairline-gold);
}

.footer-bunting {
  height: 8px;
  background: repeating-linear-gradient(90deg,
    var(--red) 0 26px,
    var(--gold) 26px 52px,
    var(--jade) 52px 78px,
    var(--night-2) 78px 104px);
  opacity: 0.85;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(26px, 4vw, 48px);
  padding-block: clamp(38px, 6vw, 72px) clamp(26px, 4vw, 44px);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-title {
  font-family: var(--font-title);
  font-size: 24px;
  letter-spacing: 0.06em;
  color: var(--paper);
}

.footer-statement {
  max-width: 30ch;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(247, 243, 233, 0.72);
}

.footer-anno {
  font-family: var(--font-anno);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: rgba(242, 210, 122, 0.8);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.footer-col-title {
  font-family: var(--font-title);
  font-size: 15px;
  letter-spacing: 0.2em;
  color: var(--gold);
}

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

.footer-link {
  position: relative;
  display: inline-block;
  padding: 5px 0 5px 16px;
  font-size: 15px;
  color: rgba(247, 243, 233, 0.78);
  transition: color 0.22s ease, transform 0.22s ease;
}

.footer-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 7px;
  height: 2px;
  background: var(--jade);
  transition: background-color 0.22s ease, width 0.22s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--gold-lite);
  transform: translateX(3px);
}

.footer-link:hover::before,
.footer-link:focus-visible::before {
  width: 11px;
  background: var(--gold);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-key {
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(242, 210, 122, 0.72);
}

.contact-val {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(247, 243, 233, 0.88);
  word-break: break-word;
}

.copy-chip {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px dashed rgba(242, 210, 122, 0.5);
  border-radius: 2px;
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gold-lite);
  cursor: pointer;
  vertical-align: middle;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.copy-chip:hover {
  border-color: var(--gold);
  background: rgba(242, 210, 122, 0.14);
}

.copy-chip[data-copied] {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--night);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 28px;
  padding-block: 18px;
  border-top: 1px dashed var(--hairline-gold);
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(247, 243, 233, 0.55);
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-legal-links a {
  transition: color 0.22s ease;
}

.footer-legal-links a:hover,
.footer-legal-links a:focus-visible {
  color: var(--gold-lite);
}

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 30px);
  bottom: clamp(14px, 3vw, 30px);
  z-index: 70;
  padding: 10px 16px;
  background: var(--night);
  color: var(--gold-lite);
  border: 1px solid var(--hairline-gold);
  border-radius: 2px;
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.to-top[data-visible] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.to-top:hover {
  background: var(--red);
  color: var(--paper);
}

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.06em;
  cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn--gold {
  background: linear-gradient(150deg, var(--gold-lite), var(--gold));
  color: var(--night);
  box-shadow: inset 0 0 0 1px rgba(255, 253, 247, 0.5), 0 14px 26px -18px rgba(212, 160, 23, 0.9);
}

.btn--gold:hover { background: linear-gradient(150deg, var(--gold), var(--gold-lite)); }

.btn--red {
  background: linear-gradient(150deg, var(--red), var(--red-deep));
  color: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(242, 210, 122, 0.45);
}

.btn--red:hover { background: linear-gradient(150deg, #d8183a, var(--red)); }

.btn--jade {
  background: var(--jade);
  color: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(247, 243, 233, 0.25);
}

.btn--jade:hover { background: #0d5b4f; }

.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--hairline-gold);
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(242, 210, 122, 0.14);
  border-color: var(--gold);
}

.btn--sm {
  padding: 10px 16px;
  font-size: 13px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.btn--block {
  width: 100%;
  clip-path: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ---------- 8. 面包屑 / 章节 / 标题 ---------- */
.crumbs { margin-top: 18px; }

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--stone);
}

.crumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--gold);
}

.crumbs a { color: var(--stone); transition: color 0.2s ease; }
.crumbs a:hover { color: var(--red); }
.crumbs [aria-current="page"] { color: var(--ink); }

.section {
  position: relative;
  padding-block: clamp(46px, 7vw, 96px);
}

.section--paper { background: var(--paper); }
.section--rice { background: var(--rice); }

.section--night {
  background: linear-gradient(165deg, var(--night-2) 0%, var(--night) 55%, #06111c 100%);
  color: rgba(247, 243, 233, 0.82);
}

.section--red {
  background: linear-gradient(160deg, var(--red) 0%, var(--red-deep) 100%);
  color: var(--paper);
}

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

.section--night .section-head,
.section--red .section-head {
  border-bottom-color: var(--hairline-gold);
}

.section-title {
  font-size: clamp(26px, 3.6vw, 40px);
  color: var(--ink);
}

.section--night .section-title,
.section--red .section-title { color: var(--paper); }

.section-note {
  max-width: 46ch;
  font-family: var(--font-anno);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.1em;
  color: var(--stone);
}

.section--night .section-note { color: rgba(242, 210, 122, 0.75); }
.section--red .section-note { color: rgba(255, 253, 247, 0.82); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--gold);
  transform: skewX(-20deg);
}

.section--night .eyebrow { color: var(--gold-lite); }
.section--red .eyebrow { color: var(--gold-lite); }

.display {
  font-family: var(--font-title);
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.section--night .display,
.section--red .display { color: var(--paper); }

.lede {
  max-width: 56ch;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.8;
  color: rgba(26, 26, 26, 0.78);
}

.section--night .lede { color: rgba(247, 243, 233, 0.8); }
.section--red .lede { color: rgba(255, 253, 247, 0.9); }

/* ---------- 9. 网格 / Bento ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.2vw, 26px);
  grid-template-columns: 1fr;
}

.bento {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.bento-item { grid-column: span 12; min-width: 0; }

/* ---------- 10. 卡片 / 档案卡 ---------- */
.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 30px);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-paper);
}

.card--night {
  background: linear-gradient(160deg, var(--night-2), var(--night));
  border-color: var(--hairline-gold);
  color: rgba(247, 243, 233, 0.86);
}

.card--red {
  background: linear-gradient(150deg, var(--red), var(--red-deep));
  border-color: rgba(242, 210, 122, 0.45);
  color: var(--paper);
}

.card--notch {
  border-radius: 0;
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}

.card--print::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(200, 16, 46, 0.22);
  border-radius: 3px;
  pointer-events: none;
}

.card--night.card--print::after,
.card--red.card--print::after {
  border-color: rgba(242, 210, 122, 0.28);
}

.filecard {
  position: relative;
  padding: 22px clamp(18px, 2.2vw, 26px);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-top: 6px solid var(--red);
  border-radius: 2px 2px var(--radius) var(--radius);
  box-shadow: var(--shadow-paper);
}

.filecard--jade { border-top-color: var(--jade); }
.filecard--gold { border-top-color: var(--gold); }

.filecard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 14px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--hairline);
}

.filecard-index {
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--red);
}

/* ---------- 11. 标签 / chips / 数据 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1.6;
}

.tag--gold { color: #8a6608; background: rgba(212, 160, 23, 0.12); }
.tag--red { color: var(--red); background: rgba(200, 16, 46, 0.08); }
.tag--jade { color: var(--jade); background: rgba(15, 107, 92, 0.09); }
.tag--night { color: var(--gold-lite); background: rgba(11, 27, 43, 0.88); border-color: var(--hairline-gold); }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 15px;
  border: 1px solid rgba(26, 26, 26, 0.22);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 13px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.chip:hover {
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-1px);
}

.chip[aria-pressed="true"] {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--gold);
}

.stat-label {
  font-family: var(--font-anno);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--stone);
}

/* ---------- 12. 图片容器基础规则 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 120px;
  border-radius: var(--radius);
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(135deg, rgba(212, 160, 23, 0.1) 0 6px, rgba(11, 27, 43, 0.05) 6px 12px),
    linear-gradient(160deg, var(--paper), var(--rice));
}

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

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

.media--frame {
  padding: 10px;
  background-color: var(--paper);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-paper);
}

.media--frame > img,
.media--frame > picture > img {
  border-radius: 3px;
}

.media--grain::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 253, 247, 0.4) 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0.55;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.media-cap {
  margin-top: 10px;
  font-family: var(--font-anno);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--stone);
}

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

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

.prose h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin-top: 1.7em;
}

.prose h3 {
  font-size: 20px;
  margin-top: 1.5em;
}

.prose ul { padding-left: 1.2em; }

.prose ul > li {
  position: relative;
  padding-left: 0.1em;
}

.prose ul > li::before {
  content: "";
  position: absolute;
  left: -0.95em;
  top: 0.72em;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}

.prose a {
  color: var(--red);
  border-bottom: 1px solid rgba(200, 16, 46, 0.35);
}

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

.section--night .prose { color: rgba(247, 243, 233, 0.85); }
.section--night .prose a { color: var(--gold-lite); border-bottom-color: rgba(242, 210, 122, 0.4); }

/* ---------- 14. 滚动显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.62s ease, transform 0.62s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

[data-filter-item][hidden] { display: none !important; }

/* ---------- 15. 响应式 ---------- */
@media (min-width: 700px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-item--half,
  .bento-item--third,
  .bento-item--two-thirds { grid-column: span 6; }
}

@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bento-item--third { grid-column: span 4; }
  .bento-item--quarter { grid-column: span 3; }
  .bento-item--half { grid-column: span 6; }
  .bento-item--two-thirds { grid-column: span 8; }
  .bento-item--full { grid-column: span 12; }
}

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

@media (min-width: 1000px) {
  .footer-inner { grid-template-columns: 1.5fr 1fr 1.5fr 1fr; }
  .footer-brand { grid-column: auto; }
}

/* 移动 / 平板：导航转下拉面板 */
@media (max-width: 900px) {
  :root { --header-h: 66px; }

  .header-inner { gap: 12px; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    max-height: 100dvh;
    overflow-y: auto;
    padding: calc(var(--header-h) + 14px) var(--gutter) 30px;
    background: linear-gradient(180deg, var(--night) 74%, #08131f 100%);
    border-bottom: 1px solid var(--hairline-gold);
    box-shadow: 0 34px 60px -32px rgba(0, 0, 0, 0.85);
    transform: translateY(-101%);
    visibility: hidden;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease, visibility 0.4s;
  }

  .site-nav[data-open] {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-link {
    padding: 15px 4px;
    font-size: 19px;
    border-bottom: 1px dashed rgba(242, 210, 122, 0.16);
  }

  .nav-link::after {
    left: 4px;
    right: auto;
    width: 40px;
    bottom: 8px;
  }

  .nav-note {
    display: block;
    margin-top: 22px;
  }

  .brand-tag { display: none; }
}

@media (max-width: 560px) {
  .nav-toggle-text { display: none; }
  .brand-name { font-size: 16px; letter-spacing: 0.04em; }
  .brand-seal { width: 36px; height: 36px; font-size: 19px; }
  .header-cta { padding: 9px 12px; font-size: 12px; }
  .footer-legal { flex-direction: column; }
}

/* ---------- 16. 降低动效偏好 ---------- */
@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;
  }

  [data-reveal] {
    opacity: 0;
    transform: none;
    transition: opacity 0.2s linear !important;
  }

  [data-reveal].is-revealed { opacity: 1; }

  .btn:hover,
  .chip:hover,
  .footer-link:hover { transform: none; }
}
