/* =========================================================
   盈佳国际站 · 共享样式 /assets/site.css
   轨道导航 + 切角面板 + 等宽索引
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

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

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

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

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

a { color: inherit; }

/* ---------- 2. 变量 ---------- */
:root {
  --deep: #0B2545;
  --deep-700: #143A5A;
  --deep-800: #0E3350;
  --coral: #FF6B4A;
  --coral-soft: #FF8B70;
  --sand: #D9B26A;
  --mist: #8FA99B;
  --paper: #F4EFE6;
  --ink: #08131C;
  --cloud: #E7ECEA;
  --signal: #3D7EA6;
  --alert: #C94F3D;

  --rail-w: 240px;
  --header-h: 64px;
  --sp: 0;

  --font-display: 'HarmonyOS Sans SC', 'Noto Sans SC', 'Source Han Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Roboto Mono', 'SFMono-Regular', Consolas, monospace;

  --line-light: rgba(244, 239, 230, .14);
  --line-dark: rgba(8, 19, 28, .12);
  --text-dim: rgba(244, 239, 230, .66);

  --radius: 2px;
  --gutter: clamp(1rem, 2.6vw, 2.25rem);
  --pad-section: clamp(3.5rem, 7vw, 6.5rem);
}

@media (min-width: 1280px) {
  :root { --rail-w: 264px; }
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: clamp(1rem, .96rem + .18vw, 1.0625rem);
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(circle at 82% -10%, rgba(20, 58, 90, .07), transparent 58%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
}

::selection {
  background: var(--coral);
  color: #170B06;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.015em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -.03em;
}

h2 { font-size: clamp(1.6rem, 2.7vw, 2.2rem); }
h3 { font-size: clamp(1.12rem, 1.6vw, 1.35rem); font-weight: 700; }

p { max-width: 72ch; }

strong { font-weight: 700; }

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

.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--sand);
}

#main-content {
  display: block;
  min-height: 60vh;
}

/* ---------- 4. 跳至主要内容 ---------- */
.skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 200;
  padding: .7rem 1.15rem;
  background: var(--coral);
  color: #170B06;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  border-radius: var(--radius);
  transform: translateY(-160%);
  transition: transform .2s ease;
}

.skip-link:focus-visible {
  transform: none;
  outline-color: #170B06;
}

/* ---------- 5. 头部 / 左侧轨道 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 70;
  background: var(--deep);
  background-image: radial-gradient(circle at 0% 100%, rgba(255, 107, 74, .16), transparent 55%);
  color: var(--paper);
  border-right: 1px solid var(--line-light);
}

.site-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 190px;
  background-image: repeating-linear-gradient(135deg, rgba(255, 107, 74, .18) 0 1px, transparent 1px 13px);
  -webkit-mask-image: linear-gradient(to top, #000, transparent);
  mask-image: linear-gradient(to top, #000, transparent);
  pointer-events: none;
}

.rail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
  padding: 1.5rem 1.1rem 1.35rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .25rem .3rem;
  text-decoration: none;
  color: var(--paper);
  border-radius: var(--radius);
}

.brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
  color: var(--paper);
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .02em;
}

.brand-note {
  margin-top: .3rem;
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .07em;
  color: var(--text-dim);
  white-space: nowrap;
}

/* 移动端开关 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: .55rem;
  padding: .5rem .7rem;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  color: var(--paper);
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}

.nav-toggle:hover {
  border-color: var(--coral);
  background: rgba(255, 107, 74, .1);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform .22s ease, opacity .22s ease;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-toggle-label {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.site-header[data-open] .nav-toggle-bars { background: transparent; }
.site-header[data-open] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* 导航 */
.site-nav {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: .4rem;
}

.nav-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding-left: .45rem;
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.nav-index-label { color: var(--coral); }

.nav-track {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .55rem .5rem;
  border-left: 2px solid transparent;
  text-decoration: none;
  font-size: .94rem;
  color: var(--text-dim);
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, padding-left .2s ease;
}

.nav-link:hover {
  color: var(--paper);
  background: rgba(244, 239, 230, .05);
  border-left-color: var(--sand);
  padding-left: .72rem;
}

.nav-num {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .06em;
  color: var(--sand);
  opacity: .8;
}

.nav-link[aria-current="page"] {
  color: #fff;
  background: rgba(255, 107, 74, .12);
  border-left-color: var(--coral);
}

.nav-link[aria-current="page"] .nav-num {
  color: var(--coral);
  opacity: 1;
}

.nav-foot {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line-light);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .7rem 1rem;
  background: var(--coral);
  color: #170B06;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none;
  border-radius: var(--radius);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: background-color .2s ease, transform .2s ease;
}

.nav-cta:hover {
  background: var(--coral-soft);
  transform: translateY(-2px);
}

.nav-meta {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .08em;
  color: var(--text-dim);
  text-align: center;
}

/* 滚动轨迹 */
.scroll-track {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  width: 2px;
  height: 100vh;
  z-index: 90;
  background: rgba(244, 239, 230, .08);
  pointer-events: none;
}

.scroll-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--coral);
  transform: scaleY(var(--sp, 0));
  transform-origin: top center;
}

/* 回到顶部 */
.to-top {
  position: fixed;
  right: clamp(.875rem, 2vw, 1.75rem);
  bottom: clamp(.875rem, 2vw, 1.75rem);
  z-index: 80;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  background: var(--deep);
  color: var(--paper);
  border: 1px solid var(--coral);
  border-radius: var(--radius);
  font-size: 1.05rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background: var(--coral);
  color: #170B06;
}

/* 移动端遮罩 */
.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(8, 19, 28, .62);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

/* ---------- 6. 头部响应式 ---------- */
@media (max-width: 1023px) {
  .site-header {
    bottom: auto;
    width: 100%;
    height: var(--header-h);
    border-right: 0;
    border-bottom: 1px solid var(--line-light);
  }

  .site-header::before { display: none; }

  .rail {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 100%;
    padding: 0 clamp(.875rem, 4vw, 1.6rem);
  }

  .brand { position: relative; z-index: 5; }
  .brand-note { display: none; }

  .nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 5;
  }

  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100dvh;
    width: min(86vw, 340px);
    z-index: 2;
    padding: 4.75rem 1.25rem 2rem;
    background: var(--deep);
    background-image: radial-gradient(circle at 100% 100%, rgba(255, 107, 74, .16), transparent 60%);
    border-right: 1px solid var(--line-light);
    overflow-y: auto;
    transform: translateX(-104%);
    visibility: hidden;
    transition: transform .34s cubic-bezier(.2, .7, .3, 1), visibility .34s;
  }

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

  .nav-scrim { display: block; }

  html[data-nav-open] .nav-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  html[data-nav-open],
  html[data-nav-open] body {
    overflow: hidden;
  }

  .scroll-track {
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(244, 239, 230, .14);
  }

  .scroll-bar {
    height: 100%;
    transform: scaleX(var(--sp, 0));
    transform-origin: left center;
  }
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--deep);
  background-image: radial-gradient(circle at 12% 0%, rgba(20, 58, 90, .9), transparent 55%);
  color: var(--paper);
  padding-block: clamp(3rem, 6vw, 5rem) 2rem;
  border-top: 1px solid var(--line-light);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--coral), var(--sand) 44%, transparent 82%);
}

.site-footer::after {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -45%;
  width: 62%;
  height: 130%;
  background-image: repeating-linear-gradient(120deg, rgba(244, 239, 230, .05) 0 1px, transparent 1px 15px);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3rem);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.75rem, 4vw, 3rem);
}

.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: .01em;
  color: var(--paper);
}

.footer-summary {
  margin-top: .75rem;
  max-width: 34ch;
  font-size: .95rem;
  line-height: 1.72;
  color: var(--text-dim);
}

.footer-coord {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.25rem;
  padding: .4rem .7rem;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .1em;
  color: var(--sand);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.coord-dot {
  display: block;
  width: .5rem;
  height: .5rem;
  background: var(--coral);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

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

.footer-title {
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mist);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .34rem 0;
  font-size: .94rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color .2s ease, transform .2s ease;
}

.footer-links a::before {
  content: "";
  width: .45rem;
  height: 1px;
  background: var(--sand);
  opacity: .5;
  transition: width .2s ease, background-color .2s ease, opacity .2s ease;
}

.footer-links a:hover {
  color: var(--paper);
  transform: translateX(3px);
}

.footer-links a:hover::before {
  width: .9rem;
  background: var(--coral);
  opacity: 1;
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4rem .6rem;
  padding: .55rem 0;
  border-bottom: 1px dashed var(--line-light);
  font-size: .9rem;
}

.contact-label {
  flex: 0 0 auto;
  min-width: 2.4rem;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sand);
}

.contact-value {
  flex: 1 1 12ch;
  min-width: 0;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.copy-btn {
  flex: 0 0 auto;
  padding: .16rem .5rem;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.copy-btn:hover {
  color: var(--coral);
  border-color: var(--coral);
}

.copy-btn.is-done {
  background: var(--mist);
  border-color: var(--mist);
  color: var(--ink);
}

.footer-note {
  margin-top: 1rem;
  max-width: 38ch;
  font-size: .8rem;
  line-height: 1.72;
  color: var(--text-dim);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--line-light);
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--text-dim);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem 1rem;
  max-width: none;
}

.footer-icp { color: var(--sand); }

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1.25rem;
}

.footer-legal-links a {
  text-decoration: none;
  color: var(--text-dim);
  transition: color .2s ease;
}

.footer-legal-links a:hover { color: var(--coral); }

@media (min-width: 760px) {
  .footer-top { grid-template-columns: 1.2fr 1fr; }
}

@media (min-width: 760px) and (max-width: 1079px) {
  .footer-contact { grid-column: 1 / -1; }
}

@media (min-width: 1080px) {
  .footer-top { grid-template-columns: 1.5fr .8fr 1.2fr; }
}

/* ---------- 8. 布局与正文 ---------- */
.container {
  width: min(1180px, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.section { padding-block: var(--pad-section); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  max-width: 62ch;
  margin-bottom: clamp(1.75rem, 3vw, 2.75rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--coral);
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
}

.index {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  color: var(--signal);
}

.lead {
  font-size: clamp(1.04rem, 1.4vw, 1.22rem);
  line-height: 1.72;
  color: rgba(8, 19, 28, .78);
  max-width: 60ch;
}

.prose {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-width: 70ch;
}

.prose p {
  max-width: 70ch;
  color: rgba(8, 19, 28, .84);
}

.prose h2 { margin-top: .6rem; }
.prose h3 { margin-top: .4rem; }

.canvas {
  background: var(--paper);
  color: var(--ink);
}

.canvas-dark {
  position: relative;
  background: var(--deep);
  color: var(--paper);
}

.canvas-dark h1,
.canvas-dark h2,
.canvas-dark h3,
.canvas-dark h4 { color: var(--paper); }

.canvas-dark .lead { color: rgba(244, 239, 230, .78); }
.canvas-dark .prose p { color: rgba(244, 239, 230, .8); }
.canvas-dark .index { color: var(--sand); }

.divider-track {
  position: relative;
  height: 1px;
  margin-block: clamp(2rem, 4vw, 3.5rem);
  background: var(--line-dark);
}

.divider-track::before {
  content: "";
  position: absolute;
  left: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  background: var(--coral);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

.canvas-dark .divider-track { background: var(--line-light); }

/* ---------- 9. 按钮与链接 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 2.9rem;
  padding: .75em 1.45em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.1;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}

.btn-primary {
  background: var(--coral);
  color: #170B06;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.btn-primary:hover {
  background: var(--coral-soft);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -14px rgba(255, 107, 74, .85);
}

.btn-ghost {
  background: transparent;
  color: currentColor;
  border-color: currentColor;
}

.btn-ghost:hover {
  background: rgba(8, 19, 28, .06);
  transform: translateY(-2px);
}

.canvas-dark .btn-ghost:hover { background: rgba(244, 239, 230, .1); }

.btn-quiet {
  background: transparent;
  color: var(--signal);
  padding-inline: .2em;
  border-bottom: 1px solid rgba(61, 126, 166, .4);
  border-radius: 0;
}

.btn-quiet:hover {
  color: var(--coral);
  border-bottom-color: var(--coral);
}

.canvas-dark .btn-quiet { color: var(--sand); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding-bottom: 2px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .94rem;
  text-decoration: none;
  color: var(--signal);
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease, gap .2s ease;
}

.link-arrow::after {
  content: "→";
  transition: transform .2s ease;
}

.link-arrow:hover {
  color: var(--coral);
  border-bottom-color: currentColor;
}

.link-arrow:hover::after { transform: translateX(4px); }

.canvas-dark .link-arrow { color: var(--sand); }
.canvas-dark .link-arrow:hover { color: var(--coral); }

/* ---------- 10. 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  color: rgba(8, 19, 28, .55);
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.crumb + .crumb::before {
  content: "/";
  color: var(--mist);
}

.breadcrumbs a {
  text-decoration: none;
  color: inherit;
  transition: color .2s ease;
}

.breadcrumbs a:hover { color: var(--coral); }

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

.canvas-dark .breadcrumbs { color: rgba(244, 239, 230, .6); }
.canvas-dark .breadcrumbs [aria-current="page"] { color: var(--paper); }

/* ---------- 11. 网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2.4vw, 1.75rem);
}

@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3,
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1080px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- 12. 面板与标签 ---------- */
.panel {
  position: relative;
  padding: clamp(1.15rem, 2.4vw, 2rem);
  background: rgba(255, 255, 255, .58);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
}

.panel-cut {
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

.panel-index {
  display: block;
  margin-bottom: .75rem;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sand);
}

.canvas-dark .panel {
  background: rgba(244, 239, 230, .06);
  border-color: var(--line-light);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .28rem .65rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--signal);
}

.chip:hover { color: var(--coral); }

.tag {
  display: inline-block;
  padding: .25rem .55rem;
  border-radius: var(--radius);
  background: rgba(217, 178, 106, .2);
  color: #7a5a1e;
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.canvas-dark .tag {
  background: rgba(217, 178, 106, .16);
  color: var(--sand);
}

.canvas-dark .chip { color: var(--sand); }
.canvas-dark .chip:hover { color: var(--coral); }

/* 地图图例 */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem 1.25rem;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: inherit;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.legend-swatch {
  display: block;
  width: .7rem;
  height: .7rem;
  background: var(--coral);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

.legend-swatch.is-sand { background: var(--sand); }
.legend-swatch.is-mist { background: var(--mist); }

.canvas-dark .legend { color: var(--text-dim); }

/* ---------- 13. 图片容器基础 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(150deg, var(--deep-700), var(--deep) 72%);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(244, 239, 230, .06) 0 1px, transparent 1px 11px);
  pointer-events: none;
}

.media-frame {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, .45);
}

.media img,
.media svg,
.media video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-caption {
  display: block;
  margin-top: .65rem;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .08em;
  color: rgba(8, 19, 28, .55);
}

.canvas-dark .media-caption { color: var(--text-dim); }

.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-4x3 { aspect-ratio: 4 / 3; }
.ratio-1x1 { aspect-ratio: 1 / 1; }

/* ---------- 14. 渐显 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .62s ease, transform .62s ease;
}

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

/* ---------- 15. 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

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

  .nav-cta:hover,
  .btn:hover,
  .to-top,
  .footer-links a:hover { transform: none; }
}
