/* =========================================================
   澳门新京葡指南 · 共享样式 /assets/site.css
   框架导航 + 堆叠画板 + 编号章节
   ========================================================= */

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

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

body,
h1, h2, h3, h4, h5,
p, ul, ol, li,
figure, figcaption, blockquote, dl, 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;
  cursor: pointer;
}

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

/* ---------- 2. 变量 ---------- */
:root {
  --ink-deep: #071E33;
  --panel-blue: #0E2A45;
  --gold: #D4A64A;
  --gold-light: #F0D08A;
  --coral: #F26B4E;
  --celadon: #3FAE9A;
  --cyan: #37E0D0;
  --paper: #F4F0E8;
  --paper-lift: #FBF8F2;
  --paper-deep: #E7E0D3;
  --ink-black: #111820;
  --ink-soft: #4C5C6B;
  --mist: #A7B4C0;

  --line-gold: rgba(212, 166, 74, 0.42);
  --line-soft: rgba(167, 180, 192, 0.26);
  --line-ink: rgba(17, 24, 32, 0.13);

  --font-display: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
    "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-ui: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    system-ui, sans-serif;
  --font-body: "Songti SC", "Source Han Serif SC", "Noto Serif SC", SimSun,
    Georgia, serif;
  --font-num: "Bahnschrift", "DIN Alternate", "Futura", "Helvetica Neue",
    Arial, sans-serif;

  --shell: 1320px;
  --gutter: clamp(20px, 5vw, 72px);
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-panel: 0 18px 30px -26px rgba(7, 30, 51, 0.55);
  --shadow-frame: 0 18px 34px -30px rgba(0, 0, 0, 0.9);
}

/* ---------- 3. 基础排版 ---------- */
body {
  background: var(--paper);
  color: var(--ink-black);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--ink-deep);
}

h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.45rem); }
h3 { font-size: clamp(1.18rem, 1.9vw, 1.5rem); }
h4 { font-size: clamp(1.02rem, 1.4vw, 1.18rem); }

p { max-width: 72ch; }
strong, b { font-weight: 700; }

.num,
[data-num] {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

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

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

/* ---------- 4. 通用工具 ---------- */
.container {
  width: min(var(--shell), calc(100% - var(--gutter)));
  margin-inline: auto;
}

.grid {
  display: grid;
  gap: clamp(16px, 2.2vw, 30px);
}

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

.rule {
  height: 1px;
  border: 0;
  background: var(--line-ink);
  margin-block: clamp(20px, 3vw, 34px);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 1.4vw, 16px);
  align-items: center;
}

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

/* ---------- 5. 按钮与链接 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.76em 1.32em;
  font-family: var(--font-ui);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn--primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 12px 24px -16px rgba(242, 107, 78, 0.95);
}
.btn--primary:hover { background: #ff8163; transform: translateY(-1px); }

.btn--gold {
  background: var(--gold);
  color: var(--ink-deep);
}
.btn--gold:hover { background: var(--gold-light); transform: translateY(-1px); }

.btn--outline {
  border-color: rgba(17, 24, 32, 0.35);
  color: var(--ink-deep);
}
.btn--outline:hover {
  border-color: var(--ink-deep);
  background: rgba(7, 30, 51, 0.06);
}

.btn--ghost {
  border-color: var(--line-gold);
  color: var(--gold-light);
}
.btn--ghost:hover {
  border-color: var(--cyan);
  color: #fff;
  background: rgba(55, 224, 208, 0.1);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-deep);
  border-bottom: 1px solid var(--line-gold);
  padding-bottom: 0.15em;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.link-arrow:hover { color: var(--coral); border-color: var(--coral); }
.link-arrow::after { content: "→"; }

/* ---------- 6. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: clamp(12px, 4vw, 26px);
  top: -120px;
  z-index: 220;
  padding: 0.7rem 1.15rem;
  background: var(--gold);
  color: var(--ink-deep);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius);
  transition: top 0.18s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible { top: 0.55rem; }

/* =========================================================
   7. 页头 —— 框架式导航
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: linear-gradient(180deg, #071E33 0%, #0A2338 58%, #071E33 100%);
  color: var(--paper);
  border-bottom: 1px solid var(--line-gold);
  box-shadow: var(--shadow-frame);
  transition: box-shadow 0.25s var(--ease);
}
.site-header[data-stuck="true"] {
  box-shadow: 0 24px 42px -28px rgba(0, 0, 0, 0.95);
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 45%, var(--cyan) 100%);
  pointer-events: none;
  z-index: 3;
  transition: transform 0.12s linear;
}

.header-rail {
  width: min(var(--shell), calc(100% - var(--gutter)));
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(12px, 3vw, 40px);
  padding-block: clamp(12px, 1.6vw, 18px);
}

/* 品牌 */
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.brand-seal {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink-deep);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

.brand-text { display: grid; gap: 2px; min-width: 0; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.05em;
  color: var(--paper);
  white-space: nowrap;
}

.brand-line {
  font-family: var(--font-num);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--mist);
  white-space: nowrap;
}

.header-tagline {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: rgba(167, 180, 192, 0.85);
  max-width: none;
  padding-left: 1rem;
  border-left: 1px solid var(--line-soft);
}

.header-utility {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.search-entry {
  display: grid;
  gap: 1px;
  padding: 0.42rem 0.85rem;
  border: 1px dashed var(--line-gold);
  border-radius: var(--radius);
  background: rgba(55, 224, 208, 0.06);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.search-entry:hover,
.search-entry:focus-visible {
  border-color: var(--cyan);
  border-style: solid;
  background: rgba(55, 224, 208, 0.14);
}
.search-entry-label {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--gold-light);
}
.search-entry-hint {
  font-family: var(--font-num);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--mist);
}

.header-cta {
  padding: 0.54rem 0.95rem;
  background: var(--coral);
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.03em;
  border-radius: var(--radius);
  transition: background-color 0.2s var(--ease);
}
.header-cta:hover { background: #ff8163; }

/* 导航条 */
.header-nav-bar {
  position: relative;
  width: min(var(--shell), calc(100% - var(--gutter)));
  margin-inline: auto;
  display: flex;
  align-items: stretch;
  gap: 0.8rem;
  border-top: 1px solid rgba(167, 180, 192, 0.16);
}

.site-nav { flex: 1 1 auto; min-width: 0; }

.nav-list {
  counter-reset: navitem;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.nav-item { display: flex; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.82rem clamp(0.7rem, 1.4vw, 1.15rem);
  font-family: var(--font-ui);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(244, 240, 232, 0.8);
  border-right: 1px solid rgba(167, 180, 192, 0.14);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-link::before {
  counter-increment: navitem;
  content: counter(navitem, decimal-leading-zero);
  font-family: var(--font-num);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  opacity: 0.9;
}
.nav-link:hover {
  color: #fff;
  background: rgba(55, 224, 208, 0.09);
}
.nav-link[aria-current="page"] { color: #fff; }
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: clamp(0.7rem, 1.4vw, 1.15rem);
  right: clamp(0.7rem, 1.4vw, 1.15rem);
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--cyan));
}

.nav-utility { display: none; }

/* 移动按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--gold-light);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
  margin-block: 0.5rem;
}
.nav-toggle:hover { border-color: var(--cyan); color: #fff; }

.nav-toggle-box {
  display: grid;
  gap: 4px;
  width: 18px;
}
.nav-toggle-box span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.24s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* 框底刻度 */
.header-scale {
  height: 5px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--gold) 0 1px,
    transparent 1px 14px
  );
  opacity: 0.5;
}

/* =========================================================
   8. 页脚
   ========================================================= */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  background: linear-gradient(180deg, #071E33 0%, #0A2338 55%, #05182A 100%);
  color: rgba(244, 240, 232, 0.86);
  border-top: 1px solid var(--line-gold);
  overflow: hidden;
}

.footer-scale {
  height: 5px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--gold) 0 1px,
    transparent 1px 14px
  );
  opacity: 0.45;
}

.footer-main {
  width: min(var(--shell), calc(100% - var(--gutter)));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.9fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(32px, 5vw, 62px);
}

.footer-brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.05em;
  color: var(--paper);
}

.footer-intro {
  font-size: 0.92rem;
  line-height: 1.85;
  color: rgba(244, 240, 232, 0.72);
  max-width: 34ch;
}

.footer-note {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px dashed rgba(212, 166, 74, 0.3);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--mist);
  max-width: 34ch;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 34px);
}

.footer-col-title {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold-light);
  padding-bottom: 0.55rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--line-gold);
}

.footer-links { display: grid; gap: 0.5rem; }

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: rgba(244, 240, 232, 0.76);
  transition: color 0.2s var(--ease);
}
.footer-link::before {
  content: "";
  width: 8px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
  transition: width 0.2s var(--ease), opacity 0.2s var(--ease);
}
.footer-link:hover { color: #fff; }
.footer-link:hover::before { width: 16px; opacity: 1; }

.footer-contact-list { display: grid; gap: 0.65rem; }

.footer-contact-item { display: grid; gap: 1px; }

.footer-contact-key {
  font-family: var(--font-num);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.footer-contact-value {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(244, 240, 232, 0.82);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footer-contact-note {
  margin-top: 0.9rem;
  font-size: 0.76rem;
  line-height: 1.7;
  color: var(--mist);
  max-width: 30ch;
}

.footer-base {
  width: min(var(--shell), calc(100% - var(--gutter)));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.8rem;
  padding-block: 1.05rem;
  border-top: 1px solid rgba(167, 180, 192, 0.18);
  font-family: var(--font-ui);
  font-size: 0.79rem;
  color: var(--mist);
}

.footer-copy,
.footer-icp { max-width: none; }

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.15rem;
}
.footer-legal-links a {
  color: rgba(244, 240, 232, 0.7);
  transition: color 0.2s var(--ease);
}
.footer-legal-links a:hover { color: var(--gold-light); }

.footer-icp {
  font-family: var(--font-num);
  letter-spacing: 0.06em;
}

/* =========================================================
   9. 共享内容组件
   ========================================================= */
/* 面包屑 */
.breadcrumb { padding-block: clamp(14px, 2vw, 22px); }

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.79rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.breadcrumb-list li { display: inline-flex; align-items: center; gap: 0.5rem; }
.breadcrumb-list li + li::before {
  content: "/";
  color: var(--gold);
}
.breadcrumb-list a { color: var(--ink-soft); }
.breadcrumb-list a:hover { color: var(--coral); }
.breadcrumb-list [aria-current="page"] { color: var(--ink-deep); font-weight: 700; }

/* 章节 */
.section { padding-block: clamp(38px, 6vw, 78px); }
.section--paper { background: var(--paper); }
.section--panel { background: var(--panel-blue); color: rgba(244, 240, 232, 0.88); }
.section--ink { background: var(--ink-deep); color: rgba(244, 240, 232, 0.88); }
.section--ink h2,
.section--ink h3,
.section--panel h2,
.section--panel h3 { color: var(--paper); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: clamp(10px, 2vw, 26px);
  margin-bottom: clamp(18px, 3vw, 34px);
}

.section-num {
  font-family: var(--font-num);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.02em;
  color: rgba(212, 166, 74, 0.3);
  -webkit-text-stroke: 1px var(--gold);
}

.section-title { font-size: clamp(1.5rem, 3vw, 2.4rem); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}
.kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--gold);
}
.section--ink .kicker,
.section--panel .kicker { color: var(--gold-light); }

.lead {
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 60ch;
}
.section--ink .lead,
.section--panel .lead { color: rgba(244, 240, 232, 0.78); }

/* 面板与叠层 */
.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 30px);
  background: var(--paper-lift);
  border: 1px solid var(--line-ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
}
.panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 56px;
  height: 2px;
  background: var(--gold);
}

.panel--ink {
  background: rgba(14, 42, 69, 0.92);
  border-color: var(--line-gold);
  color: rgba(244, 240, 232, 0.88);
}
.panel--ink h2,
.panel--ink h3,
.panel--ink h4 { color: #fff; }

.layer-stack {
  display: grid;
  gap: 0;
}
.layer-stack > .panel + .panel { margin-top: -1px; }
.layer-stack > .panel:nth-child(even) {
  margin-inline-start: clamp(10px, 4vw, 48px);
}

/* 标签 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.26em 0.7em;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.55);
}
.chip--gold {
  border-color: var(--line-gold);
  color: #8A6A1F;
  background: rgba(212, 166, 74, 0.14);
}
.chip--celadon {
  border-color: rgba(63, 174, 154, 0.45);
  color: #1F7566;
  background: rgba(63, 174, 154, 0.13);
}
.chip--cyan {
  border-color: rgba(55, 224, 208, 0.5);
  color: #0E6A63;
  background: rgba(55, 224, 208, 0.14);
}

/* 数据 */
.stat { display: grid; gap: 0.25rem; }
.stat-value {
  font-family: var(--font-num);
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
  color: var(--ink-deep);
  font-variant-numeric: tabular-nums;
}
.section--ink .stat-value,
.section--panel .stat-value,
.panel--ink .stat-value { color: var(--gold-light); }
.stat-label {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
.section--ink .stat-label,
.section--panel .stat-label { color: var(--mist); }

/* 时间轴基座 */
.timeline {
  display: flex;
  gap: clamp(14px, 2vw, 26px);
  overflow-x: auto;
  padding-block: 0.6rem 1.1rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.timeline-item {
  flex: 0 0 min(280px, 78vw);
  scroll-snap-align: start;
  padding-top: 0.9rem;
  border-top: 2px solid var(--line-gold);
}
.timeline-item-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--ink-deep);
}

/* 图像容器基座 */
.figure-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, var(--panel-blue), #123A5C 60%, #0B2438);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
}
.figure-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(212, 166, 74, 0.28);
  pointer-events: none;
}
.figure-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure-frame[data-ratio="16x9"] { aspect-ratio: 16 / 9; }
.figure-frame[data-ratio="4x3"] { aspect-ratio: 4 / 3; }
.figure-frame[data-ratio="3x4"] { aspect-ratio: 3 / 4; }
.figure-frame[data-ratio="1x1"] { aspect-ratio: 1 / 1; }
.figure-frame[data-ratio="21x9"] { aspect-ratio: 21 / 9; }

.figure-caption {
  margin-top: 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--mist);
}

/* 长文与提示 */
.prose { max-width: 68ch; }
.prose p + p,
.prose p + ul,
.prose ul + p { margin-top: 1em; }
.prose ul { display: grid; gap: 0.45em; }
.prose li {
  position: relative;
  padding-left: 1.1em;
}
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 1px;
  background: var(--gold);
}

.note {
  border-left: 3px solid var(--coral);
  background: rgba(242, 107, 78, 0.09);
  padding: 0.85rem 1.1rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--ink-deep);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* 显现动效 */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* =========================================================
   10. 响应式
   ========================================================= */
@media (max-width: 1180px) {
  .footer-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  }
  .footer-contact { grid-column: 1 / -1; }
  .footer-contact-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .header-rail { grid-template-columns: auto 1fr; }
  .header-tagline { display: none; }
  .header-utility { justify-self: end; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .header-nav-bar { align-items: center; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    background: linear-gradient(180deg, #0E2A45, #071E33);
    border-top: 1px solid var(--line-gold);
    transition: max-height 0.32s var(--ease), visibility 0.32s var(--ease);
  }
  .site-nav[data-open="true"] {
    max-height: min(74vh, 560px);
    overflow-y: auto;
    visibility: visible;
    box-shadow: 0 28px 44px -26px rgba(0, 0, 0, 0.9);
  }

  .nav-list {
    flex-direction: column;
    flex-wrap: nowrap;
    counter-reset: navitem;
  }
  .nav-item { border-bottom: 1px solid rgba(167, 180, 192, 0.14); }
  .nav-link {
    display: flex;
    width: 100%;
    padding: 1rem clamp(16px, 5vw, 30px);
    font-size: 1rem;
    border-right: 0;
  }
  .nav-link::before { font-size: 0.72rem; }
  .nav-link[aria-current="page"] { background: rgba(55, 224, 208, 0.08); }
  .nav-link[aria-current="page"]::after {
    left: 0;
    right: auto;
    top: 0;
    bottom: 0;
    width: 3px;
    height: auto;
    background: var(--gold);
  }

  .nav-utility {
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem clamp(16px, 5vw, 30px) 1.3rem;
  }
  .nav-utility-link {
    font-family: var(--font-ui);
    font-size: 0.84rem;
    letter-spacing: 0.06em;
    color: var(--mist);
    padding: 0.35rem 0;
  }
  .nav-utility-link:hover { color: var(--gold-light); }

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

@media (max-width: 720px) {
  .header-rail {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem;
  }
  .brand-name { font-size: 0.94rem; }
  .brand-line { font-size: 0.6rem; letter-spacing: 0.12em; }
  .brand-seal { width: 34px; height: 34px; font-size: 0.95rem; }
  .header-cta { display: none; }
  .search-entry { padding: 0.36rem 0.6rem; }
  .search-entry-label { font-size: 0.82rem; }
  .search-entry-hint { display: none; }

  .footer-main { grid-template-columns: minmax(0, 1fr); }
  .footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-contact-list { grid-template-columns: minmax(0, 1fr); }
  .footer-contact { grid-column: auto; }
  .footer-base { flex-direction: column; align-items: flex-start; }

  .section-num { font-size: clamp(2rem, 11vw, 3rem); }
}

@media (max-width: 480px) {
  .footer-columns { grid-template-columns: minmax(0, 1fr); }
  .nav-toggle-text { display: none; }
  .btn { width: 100%; }
  .btn-row { gap: 10px; }
}

/* =========================================================
   11. 动效降级与打印
   ========================================================= */
@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-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .scroll-progress { transition: none; }
}

@media print {
  .site-header,
  .site-footer,
  .scroll-progress,
  .skip-link,
  .nav-toggle { display: none !important; }
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    line-height: 1.8;
  }
  .panel,
  .figure-frame {
    box-shadow: none;
    border: 1px solid #999;
  }
  a { text-decoration: underline; }
  .section { padding-block: 12pt; }
}
