/* ==========================================================================
   皇家8828 · 共享站点样式  /assets/site.css
   设计系统：皇家礼宾手册 / 深蓝纸面 · 金编号 · 粗描边 · 硬阴影
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --royal: #0E2749;
  --royal-2: #16345C;
  --royal-3: #0A1C34;
  --gold: #C9A227;
  --gold-light: #E6CE8C;
  --gold-deep: #7A6212;
  --coral: #E8674B;
  --mint: #3FA98C;
  --cream: #F6F1E7;
  --paper: #EFE7D6;
  --ink: #1C1F26;
  --fog: #8A93A3;

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

  --fs-12: 12px;
  --fs-14: 14px;
  --fs-17: 17px;
  --fs-20: 20px;
  --fs-26: 26px;
  --fs-34: 34px;
  --fs-48: 48px;
  --fs-72: 72px;

  --shell: 1200px;
  --shell-wide: 1440px;
  --gutter: 24px;
  --header-h: 88px;
  --radius: 4px;
  --stroke: 3px;

  --shadow-hard: 6px 6px 0 rgba(14, 39, 73, 0.92);
  --shadow-gold: 6px 6px 0 rgba(201, 162, 39, 0.9);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

ul[class],
ol[class] { list-style: none; padding: 0; }

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

button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; }

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

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

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

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

/* ---------- 3. 中文排版基线 ---------- */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-17);
  line-height: 1.85;
  color: var(--ink);
  background-color: var(--cream);
  word-break: break-word;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
  padding-top: var(--header-h);
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--royal);
  text-wrap: balance;
}

h1 { font-size: clamp(34px, 5.4vw, 72px); }
h2 { font-size: clamp(26px, 3.4vw, 48px); }
h3 { font-size: clamp(20px, 2.3vw, 26px); }
h4 { font-size: var(--fs-20); }
h5 { font-size: var(--fs-17); }

p { text-wrap: pretty; }

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

.wrapper--wide {
  max-width: var(--shell-wide);
}

.grid {
  display: grid;
  gap: var(--gutter);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--7-3 { grid-template-columns: 7fr 3fr; }
.grid--5-4-3 { grid-template-columns: 5fr 4fr 3fr; }
.grid--aside { grid-template-columns: minmax(190px, 240px) minmax(0, 1fr); }

@media (max-width: 900px) {
  .grid--2,
  .grid--3,
  .grid--7-3,
  .grid--5-4-3,
  .grid--aside { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 5. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  transform: translateY(-180%);
  padding: 11px 20px;
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--royal);
  background: var(--gold);
  border: 2px solid var(--royal);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--coral);
  transition: transform .22s var(--ease);
}

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

/* ---------- 6. 丝带页头 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 120;
  background-color: transparent;
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 39, 73, .78) 0%, rgba(14, 39, 73, .32) 62%, rgba(14, 39, 73, 0) 100%);
  opacity: 1;
  transition: opacity .35s var(--ease);
}

.site-header.is-solid {
  background-color: var(--royal);
  box-shadow: 0 1px 0 var(--gold), 0 10px 26px -18px rgba(10, 28, 52, .95);
}

.site-header.is-solid::before { opacity: 0; }

.header-ribbon {
  height: 4px;
  background: linear-gradient(90deg,
    var(--gold) 0 60%,
    var(--gold-light) 60% 86%,
    var(--coral) 86% 100%);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 34px);
  width: 100%;
  max-width: var(--shell-wide);
  min-height: calc(var(--header-h) - 4px);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 40px);
}

.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--gold-light), var(--coral));
  will-change: transform;
}

/* 品牌 */
.brand {
  order: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-seal {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--royal);
  background: var(--gold);
  border: 2px solid var(--gold-light);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--coral);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.brand:hover .brand-seal {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--coral);
}

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

.brand-name {
  display: block;
  font-family: var(--font-serif);
  font-size: var(--fs-20);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  color: #FFFFFF;
}

.brand-tagline {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  line-height: 1.4;
  letter-spacing: .1em;
  color: var(--gold-light);
}

/* 主导航 */
.site-nav {
  order: 2;
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.4vw, 22px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-item { flex: 0 0 auto; }

.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 2px;
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  line-height: 1.4;
  color: rgba(246, 241, 231, .84);
  transition: color .2s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s var(--ease);
}

.nav-link:hover { color: #FFFFFF; }
.nav-link:hover::after { transform: scaleX(1); }

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

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

/* 移动面板内的快捷入口（默认隐藏） */
.nav-shortcut { display: none; }

/* 桌面快捷入口 */
.header-shortcut {
  order: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding-left: clamp(10px, 1.8vw, 24px);
  border-left: 1px solid rgba(230, 206, 140, .3);
}

.shortcut-link {
  padding: 6px 2px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: .06em;
  color: rgba(246, 241, 231, .78);
  border-bottom: 1px dashed transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.shortcut-link:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold-light);
}

.shortcut-cta {
  display: inline-block;
  padding: 9px 16px;
  font-size: var(--fs-14);
  font-weight: 500;
  line-height: 1.3;
  color: var(--royal);
  background: var(--coral);
  border: 2px solid var(--coral);
  border-radius: 3px;
  box-shadow: 3px 3px 0 var(--gold);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.shortcut-cta:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--gold);
}

/* 移动导航按钮 */
.nav-toggle {
  order: 4;
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 13px;
  color: var(--gold-light);
  background: rgba(14, 39, 73, .35);
  border: 2px solid rgba(230, 206, 140, .55);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}

.nav-toggle:hover {
  background: rgba(22, 52, 92, .7);
  border-color: var(--gold-light);
}

.nav-toggle-icon {
  display: grid;
  gap: 4px;
  width: 18px;
}

.nav-toggle-icon span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}

.nav-toggle-text {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: .16em;
}

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

/* ---------- 7. 页脚 ---------- */
.site-footer {
  margin-top: auto;
  color: rgba(246, 241, 231, .78);
  background-color: var(--royal);
  background-image:
    repeating-linear-gradient(90deg, rgba(230, 206, 140, .055) 0 1px, transparent 1px 96px),
    linear-gradient(180deg, var(--royal) 0%, var(--royal-3) 100%);
}

.footer-ribbon {
  height: 6px;
  background: linear-gradient(90deg,
    var(--gold) 0 58%,
    var(--coral) 58% 78%,
    var(--gold-light) 78% 100%);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) repeat(4, minmax(0, 1fr));
  gap: 36px 28px;
  padding-block: 56px 44px;
  border-bottom: 1px solid rgba(230, 206, 140, .2);
}

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

.footer-seal {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--royal);
  background: var(--gold);
  border: 2px solid var(--gold-light);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--coral);
}

.footer-brand-name {
  font-family: var(--font-serif);
  font-size: var(--fs-20);
  font-weight: 700;
  line-height: 1.3;
  color: #FFFFFF;
}

.footer-brand-line {
  font-size: var(--fs-14);
  line-height: 1.7;
  color: rgba(246, 241, 231, .62);
}

.footer-cta {
  display: inline-block;
  padding: 11px 20px;
  font-size: var(--fs-14);
  font-weight: 500;
  line-height: 1.3;
  color: var(--royal);
  background: var(--gold-light);
  border: 2px solid var(--gold-light);
  border-radius: 3px;
  box-shadow: 4px 4px 0 var(--coral);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}

.footer-cta:hover {
  transform: translate(-2px, -2px);
  background: #FFFFFF;
  box-shadow: 6px 6px 0 var(--coral);
}

.footer-col-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--cream);
  border-bottom: 1px solid rgba(201, 162, 39, .42);
}

.footer-col-num {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--gold);
}

.footer-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-list li {
  max-width: 28ch;
  font-size: var(--fs-14);
  line-height: 1.68;
  color: rgba(246, 241, 231, .7);
}

.footer-list a {
  color: rgba(246, 241, 231, .74);
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.footer-list a:hover {
  color: var(--gold-light);
  border-bottom-color: rgba(230, 206, 140, .65);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 32px;
  padding-block: 24px 40px;
}

.footer-legal {
  max-width: 62ch;
  font-size: var(--fs-12);
  line-height: 1.75;
  color: rgba(246, 241, 231, .52);
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: .08em;
  color: rgba(230, 206, 140, .72);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: .06em;
  color: rgba(246, 241, 231, .68);
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(230, 206, 140, .35);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

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

/* ---------- 8. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .02em;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 3px;
  box-shadow: 5px 5px 0 rgba(14, 39, 73, .9);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              background-color .2s var(--ease), color .2s var(--ease);
}

.btn--primary {
  color: var(--royal);
  background: var(--coral);
  border-color: var(--coral);
}

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

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

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

.btn--ghost {
  color: var(--royal);
  background: transparent;
  border-color: var(--royal);
  box-shadow: 5px 5px 0 var(--gold);
}

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

.btn--on-dark {
  color: var(--cream);
  background: transparent;
  border-color: var(--gold-light);
  box-shadow: 5px 5px 0 rgba(201, 162, 39, .55);
}

.btn--on-dark:hover {
  transform: translate(-2px, -2px);
  color: var(--royal);
  background: var(--gold-light);
  box-shadow: 8px 8px 0 rgba(232, 103, 75, .85);
}

/* ---------- 9. 基础组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--coral);
}

.index-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--gold-light);
  background: var(--royal);
  border-left: 3px solid var(--coral);
  border-radius: 2px;
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(63, 169, 140, .22);
}

[data-pulse] .status-dot {
  animation: status-pulse 1.1s var(--ease) 1 both;
}

@keyframes status-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(63, 169, 140, .55); }
  70%  { box-shadow: 0 0 0 10px rgba(63, 169, 140, 0); }
  100% { box-shadow: 0 0 0 3px rgba(63, 169, 140, .22); }
}

.card {
  position: relative;
  padding: 26px 24px;
  background: #FFFFFF;
  border: var(--stroke) solid var(--royal);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.card:hover {
  transform: translate(-2px, -4px);
  box-shadow: 10px 10px 0 rgba(14, 39, 73, .92);
}

.card--paper {
  background: var(--paper);
}

.card--dark {
  color: rgba(246, 241, 231, .84);
  background: var(--royal-2);
  border-color: var(--royal-2);
  box-shadow: var(--shadow-gold);
}

.card--dark h2,
.card--dark h3,
.card--dark h4 {
  color: #FFFFFF;
}

.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper);
  border: var(--stroke) solid var(--royal);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

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

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

.index-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-14);
  background: #FFFFFF;
  border: 2px solid var(--royal);
}

.index-table caption {
  padding-bottom: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: .1em;
  text-align: left;
  color: var(--gold-deep);
}

.index-table th {
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: .08em;
  text-align: left;
  color: var(--cream);
  background: var(--royal);
  border-bottom: 2px solid var(--gold);
}

.index-table td {
  padding: 12px 14px;
  line-height: 1.7;
  border-bottom: 1px solid rgba(14, 39, 73, .16);
}

.index-table tbody tr:nth-child(even) {
  background: var(--paper);
}

.index-table .num {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--gold-deep);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: .06em;
  color: var(--fog);
}

.breadcrumb a {
  color: var(--fog);
  border-bottom: 1px dashed currentColor;
}

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

.breadcrumb [aria-current="page"] {
  color: var(--royal);
  font-weight: 500;
}

.breadcrumb-sep { color: var(--gold-deep); }

.prose { max-width: 72ch; }

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

.prose h2 { margin-top: 2em; font-size: var(--fs-34); }
.prose h3 { margin-top: 1.6em; }

.prose ul,
.prose ol { padding-left: 1.35em; }

.prose li + li { margin-top: .45em; }

.prose strong {
  font-weight: 600;
  color: var(--royal);
}

.prose blockquote {
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--gold);
  color: var(--royal-2);
}

/* 左侧章节小目录 */
.toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
}

.toc-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid rgba(14, 39, 73, .16);
}

.toc-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-left: -2px;
  padding: 9px 12px;
  font-size: var(--fs-14);
  line-height: 1.6;
  color: var(--fog);
  border-left: 2px solid transparent;
  transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}

.toc-num {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--fog);
  transition: color .2s var(--ease);
}

.toc-link:hover {
  color: var(--royal);
  background: rgba(201, 162, 39, .08);
}

.toc-link.is-active {
  color: var(--royal);
  font-weight: 500;
  background: rgba(201, 162, 39, .12);
  border-left-color: var(--gold);
}

.toc-link.is-active .toc-num {
  color: var(--gold-deep);
  font-weight: 600;
}

@media (max-width: 900px) {
  .toc { position: static; }
}

/* 标签筛选 */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: .08em;
  color: var(--royal);
  background: transparent;
  border: 2px solid rgba(14, 39, 73, .28);
  border-radius: 3px;
  cursor: pointer;
  transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}

.tag:hover {
  border-color: var(--royal);
  background: var(--paper);
}

.tag.is-active {
  color: var(--cream);
  background: var(--royal);
  border-color: var(--royal);
  box-shadow: 3px 3px 0 var(--gold);
}

/* ---------- 10. 动效 ---------- */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .42s var(--ease), transform .42s var(--ease);
}

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

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 110;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: .12em;
  color: var(--gold-light);
  background: var(--royal);
  border: 2px solid var(--gold);
  border-radius: 3px;
  box-shadow: 4px 4px 0 var(--coral);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease),
              visibility .3s var(--ease), background-color .2s var(--ease);
}

.to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover { background: var(--royal-2); }

.to-top-mark {
  font-size: 14px;
  line-height: 1;
  color: var(--coral);
}

.to-top-text { line-height: 1; }

body.nav-open { overflow: hidden; }

/* ---------- 11. 响应式：页头 ---------- */
@media (max-width: 1180px) {
  .header-shortcut { display: none; }
}

@media (max-width: 1000px) {
  :root { --header-h: 76px; }

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

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 115;
    display: block;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--royal);
    background-image: linear-gradient(180deg, var(--royal) 0%, var(--royal-3) 100%);
    border-top: 1px solid rgba(230, 206, 140, .28);
    box-shadow: 0 18px 30px -20px rgba(0, 0, 0, .7);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .26s var(--ease), transform .26s var(--ease), visibility .26s var(--ease);
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px var(--gutter) 18px;
  }

  .nav-item {
    border-bottom: 1px solid rgba(230, 206, 140, .14);
  }

  .nav-link {
    display: block;
    padding: 15px 4px;
    font-size: var(--fs-17);
    color: var(--cream);
  }

  .nav-link::after { display: none; }

  .nav-link[aria-current="page"] {
    padding-left: 14px;
    color: var(--gold-light);
    box-shadow: inset 3px 0 0 var(--gold);
    background: rgba(230, 206, 140, .07);
  }

  .nav-shortcut {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 0 var(--gutter) 22px;
  }

  .nav-shortcut-label {
    width: 100%;
    font-family: var(--font-mono);
    font-size: var(--fs-12);
    letter-spacing: .18em;
    color: rgba(230, 206, 140, .6);
  }

  .nav-shortcut-link {
    padding: 9px 14px;
    font-family: var(--font-mono);
    font-size: var(--fs-12);
    letter-spacing: .06em;
    color: var(--royal);
    background: var(--gold-light);
    border-radius: 3px;
    box-shadow: 3px 3px 0 var(--coral);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  }

  .nav-shortcut-link:hover {
    transform: translate(-1px, -1px);
    box-shadow: 5px 5px 0 var(--coral);
  }
}

@media (max-width: 760px) {
  .brand-tagline { display: none; }
  .brand-seal { width: 40px; height: 40px; font-size: 12px; }
  .brand-name { font-size: var(--fs-17); }
}

@media (max-width: 599px) {
  :root { --gutter: 18px; }
  .header-inner { padding-inline: 16px; }
  .footer-main { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 600px) and (max-width: 1023px) {
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- 12. 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .js-ready [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .card:hover,
  .btn:hover,
  .footer-cta:hover,
  .shortcut-cta:hover,
  .nav-shortcut-link:hover {
    transform: none;
  }
}
