/* ==========================================================================
   电子游戏888 — /assets/site.css
   共享层：reset / 变量 / 中文排版 / 头部 / 页脚 / 通用组件
   ========================================================================== */

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

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

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, figcaption,
blockquote, dl, dd, table, th, td { margin: 0; }

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

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

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

table { border-collapse: collapse; width: 100%; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink-900: #0B1220;
  --ink-800: #111C30;
  --ink-700: #1B2A44;

  --paper: #E8F1FF;
  --cyan: #5FF2E0;
  --orange: #FF8A3D;
  --violet: #A88BE0;
  --green: #33D69F;
  --mute: #7C8DA8;

  --soft: #A9BBD6;
  --cyan-a12: rgba(95, 242, 224, 0.12);
  --cyan-a22: rgba(95, 242, 224, 0.22);
  --violet-a08: rgba(168, 139, 224, 0.08);
  --shadow-color: #05090F;

  --shadow-hard: 4px 4px 0 0 var(--shadow-color);
  --shadow-hard-lg: 6px 6px 0 0 var(--shadow-color);

  --border: 2px solid var(--ink-700);
  --radius: 4px;

  --header-h: 64px;
  --shell: 1280px;
  --gutter: clamp(16px, 4vw, 48px);

  --font-display: "Archivo Narrow", "Oswald", "Barlow Condensed",
                  "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace,
               "SFMono-Regular", Menlo, Consolas, "Noto Sans Mono CJK SC", monospace;

  --dur: 200ms;
  --dur-slow: 260ms;
  --ease: cubic-bezier(0.22, 0.72, 0.3, 1);
}

@media (max-width: 960px) {
  :root { --header-h: 58px; }
}

/* ---------- 3. 基础与中文排版 ---------- */
body {
  position: relative;
  min-height: 100vh;
  padding-top: var(--header-h);
  background-color: var(--ink-900);
  background-image:
    repeating-linear-gradient(135deg,
      rgba(95, 242, 224, 0.022) 0 1px,
      transparent 1px 9px),
    radial-gradient(1100px 620px at 84% -10%, rgba(95, 242, 224, 0.075), transparent 62%),
    radial-gradient(900px 520px at -12% 86%, rgba(168, 139, 224, 0.065), transparent 62%);
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, fixed;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: clamp(16px, 1.06vw, 18px);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { font-size: 1.05rem; letter-spacing: 0; }

p { max-width: 38em; }
p + p { margin-top: 0.9em; }

.mono,
code,
kbd {
  font-family: var(--font-mono);
  font-size: 0.82em;
  font-weight: 400;
  letter-spacing: 0.04em;
}

strong { font-weight: 700; }

::selection {
  background: var(--cyan);
  color: var(--ink-900);
}

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

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

.section {
  padding-block: clamp(32px, 5vw, 64px);
}

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

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

@media (max-width: 960px) {
  .col-3, .col-4, .col-5 { grid-column: span 6; }
  .col-7, .col-8, .col-9 { grid-column: span 12; }
}

@media (max-width: 600px) {
  .col-3, .col-4, .col-5, .col-6 { grid-column: span 12; }
}

/* ---------- 5. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--cyan);
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  border: 2px solid var(--ink-900);
  border-radius: var(--radius);
  transform: translateY(-180%);
  transition: transform var(--dur) var(--ease);
}

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

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 2px solid var(--cyan);
  border-radius: var(--radius);
  background: transparent;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.3;
  box-shadow: var(--shadow-hard);
  transition: transform 180ms var(--ease),
              box-shadow 180ms var(--ease),
              background-color 180ms var(--ease),
              color 180ms var(--ease),
              border-color 180ms var(--ease);
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-hard-lg);
}

.btn:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 0 var(--shadow-color);
}

.btn--cta {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink-900);
  font-weight: 700;
}

.btn--cta:hover {
  background: #FFA263;
  border-color: #FFA263;
}

.btn--ghost {
  border-color: var(--ink-700);
  color: var(--paper);
}

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

/* ---------- 7. 头部 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: linear-gradient(180deg,
              rgba(11, 18, 32, 0.94) 0%,
              rgba(11, 18, 32, 0.64) 100%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(95, 242, 224, 0.14);
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}

.site-header[data-scrolled] {
  background: var(--ink-900);
  background-image: none;
  border-bottom: 2px solid var(--cyan);
  box-shadow: 0 1px 0 0 rgba(95, 242, 224, 0.16);
}

.header-shell {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 32px);
  height: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding-block: 4px;
}

.brand-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(95, 242, 224, 0.85),
              0 0 0 3px rgba(95, 242, 224, 0.12);
  animation: brandPulse 2.8s var(--ease) infinite;
}

@keyframes brandPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(95, 242, 224, 0.85), 0 0 0 3px rgba(95, 242, 224, 0.12); }
  50%      { box-shadow: 0 0 14px rgba(95, 242, 224, 0.55), 0 0 0 6px rgba(95, 242, 224, 0.02); }
}

.brand-word {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.brand-meta {
  padding-left: 10px;
  border-left: 1px solid var(--ink-700);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--mute);
}

/* 导航 */
.primary-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.4vw, 22px);
}

.nav-link {
  position: relative;
  display: block;
  padding: 8px 4px;
  font-size: 0.94rem;
  color: var(--soft);
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}

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

.nav-link:hover { color: var(--paper); }
.nav-link:hover::after { transform: scaleX(0.55); }

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

/* 移动端专属法律链接 */
.nav-legal { display: none; }

/* 右侧动作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

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

/* 汉堡 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 2px solid var(--ink-700);
  border-radius: var(--radius);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  transition: border-color 180ms var(--ease), color 180ms var(--ease);
}

.nav-toggle:hover { border-color: var(--cyan); color: var(--cyan); }

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

.nav-toggle-bars i {
  display: block;
  height: 2px;
  background: var(--cyan);
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
}

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

/* JS 注入的阅读进度条 */
.header-progress {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
  transition: transform 80ms linear;
}

/* ---------- 8. 头部移动断点 ---------- */
@media (max-width: 960px) {
  .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .brand-meta { display: none; }

  .primary-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: clamp(20px, 5vw, 40px) var(--gutter) 56px;
    background-color: var(--ink-900);
    background-image: linear-gradient(180deg, rgba(95, 242, 224, 0.07), transparent 240px);
    border-top: 2px solid var(--cyan);
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity var(--dur) var(--ease),
                transform var(--dur) var(--ease),
                visibility var(--dur) var(--ease);
  }

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

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

  .nav-item + .nav-item { border-top: 1px solid var(--ink-700); }

  .nav-link {
    padding: 16px 0 16px 14px;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 5vw, 1.7rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--paper);
  }

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

  .nav-link[aria-current="page"] {
    color: var(--cyan);
    box-shadow: inset 3px 0 0 var(--cyan);
    background: linear-gradient(90deg, rgba(95, 242, 224, 0.08), transparent 70%);
  }

  .nav-legal {
    display: grid;
    gap: 2px;
    margin-top: auto;
    padding-top: 28px;
    border-top: 1px solid var(--ink-700);
  }

  .nav-legal a {
    display: block;
    padding: 9px 0;
    font-family: var(--font-mono);
    font-size: 12.5px;
    letter-spacing: 0.05em;
    color: var(--mute);
    transition: color var(--dur) var(--ease);
  }

  .nav-legal a:hover { color: var(--cyan); }
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  margin-top: clamp(56px, 8vw, 112px);
  border-top: 2px solid var(--cyan);
  background: var(--ink-800);
  color: var(--paper);
}

.footer-shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(36px, 6vw, 68px) var(--gutter) 26px;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 20px;
  padding-bottom: clamp(22px, 3vw, 34px);
  margin-bottom: clamp(24px, 4vw, 44px);
  border-bottom: 2px solid var(--ink-700);
}

.brand--footer .brand-word { font-size: 1.3rem; }

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--mute);
  max-width: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
}

.footer-block { min-width: 0; }

.footer-title {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink-700);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--cyan);
}

.footer-links li {
  margin-bottom: 9px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--soft);
  word-break: break-word;
}

.footer-links a {
  transition: color var(--dur) var(--ease);
}

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

.footer-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--mute);
}

.copy-mail {
  margin-top: 10px;
  padding: 6px 10px;
  border: 1px solid var(--cyan-a22);
  border-radius: var(--radius);
  background: transparent;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  transition: background-color 180ms var(--ease),
              color 180ms var(--ease),
              border-color 180ms var(--ease);
}

.copy-mail:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink-900);
}

.copy-mail[data-copied] {
  background: var(--green);
  border-color: var(--green);
  color: var(--ink-900);
}

.footer-note {
  margin-top: 14px;
  max-width: 30em;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--mute);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: 18px;
  border-top: 1px solid var(--ink-700);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mute);
}

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

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- 10. 状态条 ---------- */
.status-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  min-height: 44px;
  padding: 10px 16px;
  border: 2px solid var(--ink-700);
  border-left: 2px solid var(--cyan);
  border-radius: var(--radius);
  background: var(--ink-800);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mute);
}

.status-strip .is-key {
  color: var(--paper);
  font-weight: 400;
}

/* ---------- 11. 面包屑 ---------- */
.crumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--mute);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.crumbs li {
  display: inline-flex;
  align-items: center;
}

.crumbs li::after {
  content: "/";
  margin-left: 8px;
  color: var(--ink-700);
}

.crumbs li:last-child::after { content: ""; margin: 0; }

.crumbs a { transition: color var(--dur) var(--ease); }
.crumbs a:hover { color: var(--cyan); }
.crumbs [aria-current="page"] { color: var(--paper); }

/* ---------- 12. Bento 卡片 ---------- */
.bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(18px, 2.4vw, 28px);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--ink-800);
  box-shadow: var(--shadow-hard);
  transition: transform 180ms var(--ease),
              box-shadow 180ms var(--ease),
              border-color 180ms var(--ease);
}

.bento-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hard-lg);
  border-color: var(--ink-700);
}

/* ---------- 13. 控制台面板 ---------- */
.console-panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 26px);
  border: 2px solid var(--cyan);
  border-radius: var(--radius);
  background: var(--ink-700);
  box-shadow: var(--shadow-hard),
              inset 0 1px 0 0 rgba(95, 242, 224, 0.18);
}

/* ---------- 14. 旁注 ---------- */
.note-margin {
  padding: 14px 16px;
  border-left: 2px solid var(--violet);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--violet-a08);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.7;
  color: #C6D4E8;
}

.note-margin p { max-width: none; }

/* ---------- 15. 结尾行动块 ---------- */
.next-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 2.6vw, 28px);
  border: 2px solid var(--ink-700);
  border-left: 6px solid var(--orange);
  border-radius: var(--radius);
  background: var(--ink-800);
  box-shadow: var(--shadow-hard);
}

.next-step p {
  margin: 0;
  max-width: 34em;
  font-size: 0.96rem;
  color: var(--soft);
}

/* ---------- 16. 标签与状态点 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 3px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.6;
  white-space: nowrap;
}

.tag--version { color: var(--violet); }
.tag--new { color: var(--orange); }
.tag--ok { color: var(--green); }

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.dot--ok { color: var(--green); }
.dot--warn { color: var(--violet); }
.dot--live { color: var(--cyan); }

/* ---------- 17. 更新日志流 ---------- */
.log-list {
  border-top: 1px solid var(--ink-700);
}

.log-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 6px 22px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ink-700);
}

.log-item__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--violet);
}

@media (max-width: 600px) {
  .log-item { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- 18. 表格卡 ---------- */
.table-card {
  border: var(--border);
  border-radius: var(--radius);
  background: var(--ink-800);
  box-shadow: var(--shadow-hard);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-card table {
  min-width: 560px;
  font-size: 0.92rem;
}

.table-card th {
  padding: 12px 16px;
  border-bottom: 2px solid var(--ink-700);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--cyan);
  text-align: left;
  white-space: nowrap;
}

.table-card td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink-700);
  color: var(--soft);
  vertical-align: top;
}

.table-card tbody tr:nth-child(even) { background: var(--ink-700); }
.table-card tbody tr:last-child td { border-bottom: 0; }

.table-card th:first-child,
.table-card td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--ink-800);
}

.table-card tbody tr:nth-child(even) td:first-child { background: var(--ink-700); }

.table-card td .mono { color: var(--paper); }

/* ---------- 19. 图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 2px solid var(--cyan);
  border-radius: var(--radius);
  background: var(--ink-700);
  box-shadow: var(--shadow-hard);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.04);
}

.media-frame figcaption {
  padding: 10px 14px;
  border-top: 2px solid var(--ink-700);
  background: var(--ink-800);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--mute);
  line-height: 1.6;
}

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

.media-frame--16x9 figcaption,
.media-frame--4x3 figcaption,
.media-frame--1x1 figcaption,
.media-frame--wide figcaption {
  position: relative;
}

/* ---------- 20. 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: clamp(12px, 3vw, 28px);
  bottom: clamp(12px, 3vw, 28px);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 46px;
  height: 46px;
  padding: 0 10px;
  border: 2px solid var(--cyan);
  border-radius: var(--radius);
  background: var(--ink-800);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow-hard);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              visibility var(--dur) var(--ease),
              background-color 180ms var(--ease),
              color 180ms var(--ease);
}

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

.to-top:hover {
  background: var(--cyan);
  color: var(--ink-900);
}

/* ---------- 21. 显现动画 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-slow) var(--ease),
              transform var(--dur-slow) var(--ease);
}

[data-reveal="left"] { transform: translateX(-12px); }

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

/* ---------- 22. 减少动效 ---------- */
@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 !important;
    transform: none !important;
  }

  .brand-dot { animation: none !important; }

  .bento-card:hover { transform: none; }
}

/* ---------- 23. 打印 ---------- */
@media print {
  .site-header,
  .site-footer,
  .to-top,
  .skip-link,
  .header-progress { display: none !important; }

  body {
    padding-top: 0;
    background: #fff;
    color: #000;
  }
}
