/* ==========================================================================
   皇冠入口 · CROWN ACCESS — 共享样式 /assets/site.css
   视觉框架：皇家档案室 × 技术蓝图
   ========================================================================== */

/* ---------- 1. CSS 变量 ---------- */
:root {
  /* 色彩 */
  --bg-primary: #0A0E13;
  --bg-secondary: #0F141C;
  --bg-elevated: #141B26;
  --gold: #D4AF37;
  --gold-bright: #E6C64A;
  --red: #8B0000;
  --text-primary: #E0E4E8;
  --text-secondary: #A0A8B0;
  --text-muted: #6B7682;
  --border-metal: #2A2F36;
  --border-metal-2: #3A424C;
  --green: #2E7D32;
  --bronze: #B87333;

  /* 字体 */
  --font-heading: 'Playfair Display', 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-body: Inter, -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;

  /* 布局 */
  --container-width: 1280px;
  --header-top-offset: 16px;
  --header-bar-height: 56px;
  --header-height: calc(var(--header-top-offset) + var(--header-bar-height));

  /* 动效 */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 0.2s;
  --duration-base: 0.4s;
  --duration-slow: 0.7s;

  /* 层级 */
  --z-header: 100;
  --z-nav: 110;
  --z-back-to-top: 90;
  --z-skip: 1000;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 蓝图网格背景 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(42, 47, 54, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 47, 54, 0.14) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* 右上角金辉光晕 */
body::after {
  content: '';
  position: fixed;
  top: -220px;
  right: -220px;
  z-index: 0;
  pointer-events: none;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.06), transparent 65%);
}

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

ul, ol {
  list-style: none;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--duration-fast) ease, border-color var(--duration-fast) ease, background-color var(--duration-fast) ease;
}

a:hover {
  color: var(--gold);
}

button {
  font-family: var(--font-body);
}

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

::selection {
  background: rgba(212, 175, 55, 0.3);
  color: var(--text-primary);
}

/* ---------- 3. 正文容器与基础排版 ---------- */
main,
#main-content {
  display: block;
  position: relative;
  z-index: 1;
  min-height: 70vh;
  padding-top: calc(var(--header-height) + 40px);
  overflow: clip;
}

p {
  margin-bottom: 1em;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.container {
  width: min(100% - 48px, var(--container-width));
  margin-inline: auto;
}

/* ---------- 4. 分区与网格 ---------- */
.section {
  margin-bottom: clamp(64px, 8vw, 112px);
}

.section--narrow {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.section--wide {
  max-width: min(100vw - 24px, calc(var(--container-width) + 96px));
  margin-left: auto;
  margin-right: auto;
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 28px;
}

.section__index {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.section__title::after {
  content: '';
  display: block;
  margin-top: 10px;
  width: 48px;
  height: 2px;
  background: var(--gold);
  transform-origin: left;
  transition: width var(--duration-slow) var(--ease-out);
}

.section.is-inview .section__title::after,
.section__title:hover::after {
  width: 96px;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ---------- 5. 分割线 ---------- */
.divider {
  height: 1px;
  background: var(--border-metal);
  border: none;
  margin: 40px 0;
}

.divider--gold {
  height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--bronze) 55%, transparent 100%);
  border: none;
  margin: 32px 0;
}

.divider--diagonal {
  height: 8px;
  background: repeating-linear-gradient(
    135deg,
    var(--border-metal) 0,
    var(--border-metal) 6px,
    transparent 6px,
    transparent 12px
  );
  border: none;
  margin: 24px 0;
}

/* ---------- 6. 头部悬浮胶囊 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  padding: var(--header-top-offset) 24px 0;
}

.site-header__inner {
  position: relative;
  max-width: min(100%, var(--container-width));
  margin-inline: auto;
  height: var(--header-bar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 6px 0 20px;
  background: rgba(10, 14, 19, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-metal);
  border-radius: 999px;
  transition: background-color var(--duration-base) ease, box-shadow var(--duration-base) ease;
}

.site-header.is-scrolled .site-header__inner {
  background: rgba(10, 14, 19, 0.92);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

/* 品牌 */
.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text-primary);
}

.site-header__brand:hover {
  color: var(--text-primary);
}

.brand-crown {
  width: 28px;
  height: auto;
  color: var(--gold);
  flex-shrink: 0;
}

.site-header__brand:hover .brand-crown {
  color: var(--gold-bright);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text__cn {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}

.brand-text__en {
  font-size: 0.58rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* 导航 */
.site-nav__list {
  display: flex;
  gap: 2px;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  border: 1px solid transparent;
  white-space: nowrap;
}

.site-nav__link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

.site-nav__link[aria-current="page"] {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.09);
  border-color: rgba(212, 175, 55, 0.22);
}

.site-nav__index {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

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

/* 移动端汉堡按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color var(--duration-fast) ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform var(--duration-base) var(--ease-out), opacity var(--duration-base) ease;
}

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

/* 移动端断点 */
@media (max-width: 900px) {
  .site-header {
    padding: 12px 16px 0;
  }

  .site-header__inner {
    max-width: 100%;
    height: 54px;
    padding-left: 16px;
    padding-right: 6px;
    border-radius: 18px;
  }

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

  .site-nav {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: min(268px, 88vw);
    background: rgba(15, 20, 28, 0.97);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-metal);
    border-radius: 14px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--duration-base) ease, transform var(--duration-base) var(--ease-out), visibility var(--duration-base);
  }

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

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

  .site-nav__link {
    padding: 10px 16px;
    border-radius: 10px;
    width: 100%;
  }

  .brand-text__en {
    font-size: 0.52rem;
  }
}

@media (max-width: 480px) {
  .brand-text__en {
    display: none;
  }

  .site-header__inner {
    gap: 8px;
  }
}

/* ---------- 7. 跳转链接与滚动进度 ---------- */
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: var(--z-skip);
  background: var(--gold);
  color: var(--bg-primary);
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 4px;
  transition: top var(--duration-fast) ease;
}

.skip-link:focus-visible {
  top: 16px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  z-index: var(--z-skip);
  background: var(--gold);
  pointer-events: none;
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 96px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-metal);
}

.site-footer__line {
  height: 3px;
  background: linear-gradient(90deg, var(--red) 0%, var(--bronze) 30%, var(--gold) 65%, transparent 100%);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px;
  padding: 56px 0 40px;
}

.site-footer__brand-name {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.08em;
  margin-top: 16px;
  margin-bottom: 4px;
}

.site-footer__brand-en {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.site-footer__trust {
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 46ch;
}

.site-footer__info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.site-footer__heading {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-metal);
}

.site-footer__list li {
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

.site-footer__list a {
  color: var(--text-secondary);
}

.site-footer__list a:hover {
  color: var(--gold);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px 0 24px;
  border-top: 1px solid var(--border-metal);
}

.site-footer__copyright {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.site-footer__legal {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-footer__legal a {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.site-footer__legal a:hover {
  color: var(--gold);
}

.brand-crown--lg {
  width: 40px;
}

.coordinate {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
}

.coordinate::before {
  content: '+';
  color: var(--gold);
  font-size: 1.2rem;
  line-height: 1;
}

@media (max-width: 900px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 44px 0 28px;
  }

  .site-footer__info {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 540px) {
  .site-footer__info {
    grid-template-columns: 1fr;
  }

  .site-footer__legal {
    flex-wrap: wrap;
    gap: 12px;
  }
}

/* ---------- 9. 按钮 ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-decoration: none;
  padding: 12px 26px;
  border: 1px solid var(--border-metal-2);
  background: transparent;
  border-radius: 0;
  cursor: pointer;
  text-align: center;
  transition: border-color var(--duration-fast) ease, background-color var(--duration-fast) ease, color var(--duration-fast) ease;
}

.btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  text-decoration: none;
}

.btn--primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg-primary);
  font-weight: 600;
}

.btn--primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--bg-primary);
}

.btn--ghost {
  border-color: var(--border-metal-2);
  color: var(--text-primary);
}

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

.btn--sm {
  padding: 8px 18px;
  font-size: 0.78rem;
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.breadcrumb a {
  color: var(--text-secondary);
}

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

.breadcrumb__sep {
  color: var(--text-muted);
  margin: 0 4px;
}

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

/* ---------- 11. 页面标题 ---------- */
.page-title {
  position: relative;
  margin-bottom: clamp(40px, 6vw, 72px);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-metal);
}

.page-title__main {
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.02em;
}

.page-title__en {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-top: 10px;
}

.page-title__note {
  position: absolute;
  right: 0;
  bottom: 24px;
  writing-mode: vertical-rl;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .page-title__note {
    display: none;
  }
}

/* ---------- 12. 卡片 ---------- */
.card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-metal);
  padding: 28px;
  border-radius: 2px;
  transition: border-color var(--duration-base) ease, background-color var(--duration-base) ease;
}

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

.card--cut::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-top: 14px solid var(--bg-primary);
  border-left: 14px solid transparent;
  z-index: 1;
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.card__text {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.card__meta {
  margin-top: 16px;
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ---------- 13. 标签 ---------- */
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border: 1px solid var(--border-metal-2);
  color: var(--text-secondary);
  border-radius: 999px;
  background: transparent;
}

.tag--gold {
  color: var(--gold);
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.08);
}

.tag--red {
  color: #C77;
  border-color: rgba(139, 0, 0, 0.55);
  background: rgba(139, 0, 0, 0.14);
}

.tag--bronze {
  color: var(--bronze);
  border-color: rgba(184, 115, 51, 0.4);
  background: rgba(184, 115, 51, 0.08);
}

/* ---------- 14. 面板 ---------- */
.panel {
  border: 1px solid var(--border-metal);
  background: var(--bg-secondary);
  margin-bottom: 12px;
  border-radius: 2px;
  transition: border-color var(--duration-fast) ease;
}

.panel[data-open] {
  border-color: rgba(212, 175, 55, 0.35);
}

.panel__head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: color var(--duration-fast) ease;
}

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

.panel__index {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.panel__icon {
  position: relative;
  width: 14px;
  height: 14px;
  margin-left: auto;
  flex-shrink: 0;
}

.panel__icon::before,
.panel__icon::after {
  content: '';
  position: absolute;
  background: var(--gold);
  transition: transform var(--duration-base) var(--ease-out);
}

.panel__icon::before {
  top: 6.5px;
  left: 0;
  width: 14px;
  height: 1px;
}

.panel__icon::after {
  top: 0;
  left: 6.5px;
  width: 1px;
  height: 14px;
}

.panel[data-open] .panel__icon::after {
  transform: scaleY(0);
}

.panel__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--duration-base) var(--ease-out);
}

.panel__body > * {
  overflow: hidden;
}

.panel[data-open] .panel__body {
  grid-template-rows: 1fr;
}

.panel__body-text {
  padding: 0 20px 20px;
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

/* ---------- 15. 章节目录 ---------- */
.toc {
  border-left: 1px solid var(--border-metal);
}

.toc__link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.toc__link:hover {
  color: var(--text-primary);
  border-left-color: var(--border-metal-2);
}

.toc__link.is-active {
  color: var(--gold);
  border-left-color: var(--gold);
}

.toc__index {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* ---------- 16. 仪表板数据块 ---------- */
.stat-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--border-metal);
  background: var(--border-metal);
  gap: 1px;
}

.stat {
  background: var(--bg-secondary);
  padding: 22px 24px;
}

.stat__value {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat__label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ---------- 17. 时间线 ---------- */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border-metal-2);
}

.timeline__item {
  position: relative;
  padding-bottom: 32px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -31px;
  top: 8px;
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}

.timeline__item::after {
  content: '';
  position: absolute;
  left: -26px;
  top: 13px;
  width: 16px;
  height: 1px;
  background: var(--border-metal-2);
}

.timeline__date {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.timeline__title {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.timeline__text {
  font-size: 0.83rem;
  color: var(--text-secondary);
}

/* ---------- 18. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-metal);
  overflow: hidden;
}

.media-frame::before {
  content: '';
  display: block;
}

.media-frame--wide::before {
  padding-top: 56.25%;
}

.media-frame--standard::before {
  padding-top: 75%;
}

.media-frame--portrait::before {
  padding-top: 133.33%;
}

.media-frame__content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  background:
    linear-gradient(135deg, transparent 0%, transparent calc(50% - 1px), rgba(42, 47, 54, 0.5) 50%, transparent calc(50% + 1px)) 0 0 / 24px 24px repeat,
    var(--bg-secondary);
}

.media-frame:hover {
  border-color: var(--border-metal-2);
}

/* ---------- 19. 返回顶部 ---------- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: var(--z-back-to-top);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(10, 14, 19, 0.82);
  border: 1px solid var(--gold);
  color: var(--gold);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--duration-base) ease, transform var(--duration-base) var(--ease-out), visibility var(--duration-base), background-color var(--duration-fast) ease;
}

.back-to-top:hover {
  background: var(--gold);
  color: var(--bg-primary);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- 20. 工具类 ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

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

/* ---------- 21. 响应式修正 ---------- */
@media (max-width: 1024px) {
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding-left: 12px;
    padding-right: 12px;
  }

  .container {
    width: min(100% - 32px, var(--container-width));
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }

  .card {
    padding: 20px;
  }
}

/* ---------- 22. 可访问性与动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

  .panel__body {
    transition: none;
  }

  .back-to-top {
    transition: none;
  }
}
