/* ============================================================
   /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, h6,
p, ul, ol, dl, dd, figure, blockquote {
  margin: 0;
}

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

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

img { height: auto; }

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

button { background: none; border: 0; }

a { color: inherit; }

[hidden] { display: none !important; }

/* ---------- 2. tokens ---------- */
:root {
  --ink-900: #061826;
  --ink-700: #0C2436;
  --ink-500: #12314A;
  --emerald-500: #17C08A;
  --emerald-200: #6FF3C0;
  --gold-400: #FFC94A;
  --coral-500: #FF7A59;
  --violet-400: #A78BFA;
  --paper-50: #E8EEF2;
  --slate-300: #93A7B4;

  --font-display: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", system-ui, sans-serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-index: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --font-mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --line-soft: rgba(111, 243, 192, 0.22);
  --line-hard: rgba(23, 192, 138, 0.42);
  --line-slate: rgba(147, 167, 180, 0.22);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --header-h: 74px;
  --shell-max: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (max-width: 640px) {
  :root { --header-h: 66px; }
}

/* ---------- 3. base / 中文排版 ---------- */
body {
  margin: 0;
  padding-top: var(--header-h);
  background-color: var(--ink-900);
  background-image:
    linear-gradient(rgba(111, 243, 192, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 243, 192, 0.045) 1px, transparent 1px);
  background-size: 120px 120px;
  background-attachment: fixed;
  color: var(--paper-50);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
  word-break: normal;
}

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

h1 { font-size: clamp(32px, 4.6vw, 64px); }
h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; }
h3 { font-size: clamp(18px, 1.9vw, 22px); font-weight: 700; }

p { max-width: 38em; }

strong { color: var(--gold-400); font-weight: 700; }

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

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

/* ---------- 4. 布局助手 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

.section { padding: clamp(40px, 6vw, 76px) 0; }

.section-head {
  display: grid;
  gap: 8px;
  margin-bottom: clamp(18px, 2.6vw, 32px);
  border-left: 2px solid var(--emerald-500);
  padding-left: 14px;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--emerald-200);
}

.coord {
  font-family: var(--font-index);
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--gold-400);
}

.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--slate-300);
}

.lede {
  font-size: clamp(15px, 1.5vw, 17px);
  color: var(--paper-50);
  max-width: 36em;
}

.prose { max-width: 36em; }
.prose p { margin-bottom: 1em; }
.prose p:last-child { margin-bottom: 0; }

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

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

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s var(--ease), background-color 0.16s var(--ease),
    color 0.16s var(--ease), border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-feedback {
  border-color: var(--coral-500);
  color: var(--coral-500);
  background: rgba(255, 122, 89, 0.08);
}
.btn-feedback:hover {
  background: var(--coral-500);
  color: #1B0A05;
  box-shadow: 0 0 0 3px rgba(255, 122, 89, 0.22);
}

.btn-primary {
  background: var(--coral-500);
  color: #1B0A05;
}
.btn-primary:hover { background: #FF977A; }

.btn-ink {
  background: var(--ink-900);
  color: var(--gold-400);
  border-color: rgba(255, 201, 74, 0.4);
}
.btn-ink:hover {
  background: var(--ink-700);
  color: var(--emerald-200);
  border-color: var(--emerald-500);
}

.btn-ghost {
  border-color: var(--line-hard);
  color: var(--emerald-200);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--gold-400);
  color: var(--gold-400);
}

/* ---------- 6. 头部命令栏 ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--gold-400);
  color: var(--ink-900);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: top 0.18s var(--ease);
}
.skip-link:focus {
  top: 12px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: var(--header-h);
  background: rgba(6, 24, 38, 0.94);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: height 0.18s var(--ease), background-color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.site-header[data-scrolled] {
  height: calc(var(--header-h) - 12px);
  background: rgba(6, 24, 38, 0.99);
  border-bottom-color: var(--emerald-500);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  height: 100%;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--paper-50);
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: block;
}

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

.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--slate-300);
  text-transform: uppercase;
  margin-top: 2px;
}

.brand:hover .brand-name { color: var(--emerald-200); }

/* 主导航 */
.primary-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-wrap: nowrap;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 11px 8px 13px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  color: var(--paper-50);
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.nav-link::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 22%;
  height: 56%;
  width: 2px;
  border-radius: 2px;
  background: var(--emerald-500);
  transform: scaleY(0);
  transform-origin: 50% 50%;
  transition: transform 0.18s var(--ease);
}

.nav-link:hover {
  color: var(--emerald-200);
  background: rgba(23, 192, 138, 0.1);
}

.nav-link:hover::before,
.nav-link[aria-current="page"]::before { transform: scaleY(1); }

.nav-link[aria-current="page"] {
  color: var(--emerald-200);
  font-weight: 700;
  background: rgba(23, 192, 138, 0.12);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--gold-400);
  opacity: 0.85;
  margin-right: 6px;
}

.nav-link[aria-current="page"] .nav-index { opacity: 1; }

/* 右侧工具 */
.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.jump-wrap { position: relative; }

.jump-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line-hard);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--emerald-200);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease),
    border-color 0.16s var(--ease);
}

.jump-button::after {
  content: "▾";
  font-size: 10px;
  line-height: 1;
  color: var(--gold-400);
}

.jump-button:hover,
.jump-button[aria-expanded="true"] {
  background: var(--ink-500);
  border-color: var(--emerald-500);
  color: var(--paper-50);
}

.jump-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 232px;
  padding: 14px;
  background: var(--ink-700);
  border: 1px solid var(--line-hard);
  border-radius: var(--radius-md);
  box-shadow: 5px 5px 0 rgba(23, 192, 138, 0.16);
  z-index: 70;
}

.jump-menu-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate-300);
  margin-bottom: 10px;
}

.jump-list { display: grid; gap: 4px; }

.jump-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  text-decoration: none;
  color: var(--paper-50);
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}

.jump-link:hover {
  background: rgba(23, 192, 138, 0.14);
  color: var(--emerald-200);
}

.jump-link[aria-current="page"] {
  color: var(--emerald-200);
  background: rgba(23, 192, 138, 0.18);
}

.jump-coord {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--gold-400);
  border: 1px dashed rgba(255, 201, 74, 0.45);
  border-radius: 3px;
  padding: 1px 4px;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-hard);
  border-radius: var(--radius-pill);
  color: var(--emerald-200);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.nav-toggle:hover { background: rgba(23, 192, 138, 0.14); }

.site-header[data-open] .nav-toggle {
  background: var(--emerald-500);
  border-color: var(--emerald-500);
  color: var(--ink-900);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: background-color 0.18s var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.18s var(--ease);
}

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

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

/* 顶部进度线 */
.progress-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(23, 192, 138, 0.14);
  pointer-events: none;
}

.progress-line-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--emerald-500), var(--gold-400));
  transition: width 0.1s linear;
}

/* ---------- 7. 头部断点 ---------- */
@media (max-width: 1180px) {
  .nav-link { font-size: 13px; padding: 8px 8px 8px 11px; }
  .nav-index { font-size: 9.5px; margin-right: 4px; }
}

@media (max-width: 1100px) {
  .jump-wrap { display: none; }
}

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

  .primary-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-height: 0;
    overflow: hidden;
    background: var(--ink-700);
    border-bottom: 1px solid var(--line-hard);
    transition: max-height 0.22s var(--ease);
    flex: 0 0 auto;
  }

  .site-header[data-open] .primary-nav {
    max-height: 72vh;
    overflow-y: auto;
    padding: 10px clamp(16px, 4vw, 40px) 18px;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
  }

  .nav-link {
    display: flex;
    padding: 13px 14px;
    font-size: 15px;
    border-bottom: 1px dashed rgba(147, 167, 180, 0.16);
    border-radius: var(--radius-sm);
  }

  .nav-link::before { left: 0; top: 50%; height: 20px; margin-top: -10px; }

  .brand { margin-right: auto; }
  .header-tools { margin-left: 0; }
  .btn-feedback { padding: 8px 14px; font-size: 13px; }
}

@media (max-width: 560px) {
  .brand-sub { display: none; }
  .brand-name { font-size: 15px; }
  .brand-mark { width: 30px; height: 30px; }
  .nav-toggle-text { display: none; }
  .nav-toggle { padding: 8px 10px; }
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 104px);
  background: var(--ink-700);
  border-top: 1px solid var(--line-hard);
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--emerald-500) 0 26px,
    var(--gold-400) 26px 44px,
    var(--violet-400) 44px 52px,
    transparent 52px 64px
  );
  opacity: 0.55;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(40px, 5vw, 60px) clamp(16px, 4vw, 40px) clamp(28px, 3.4vw, 44px);
}

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

.brand-footer .brand-name { font-size: 18px; }

.footer-intro {
  margin-top: 16px;
  max-width: 34ch;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--slate-300);
}

.footer-nav { margin-top: 22px; }

.footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.footer-nav-list a {
  font-size: 14px;
  text-decoration: none;
  color: var(--paper-50);
  border-bottom: 1px dashed transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.footer-nav-list a:hover {
  color: var(--emerald-200);
  border-bottom-color: var(--emerald-200);
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--emerald-200);
  text-decoration: none;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease),
    color 0.16s var(--ease);
}

.tag:hover {
  background: rgba(23, 192, 138, 0.16);
  border-color: var(--emerald-500);
  color: var(--paper-50);
}

/* 反馈卡 */
.feedback-card {
  position: relative;
  padding: clamp(20px, 2.6vw, 28px);
  border-radius: var(--radius-lg);
  background: linear-gradient(158deg, var(--coral-500), #FF9C74 92%);
  color: #24100A;
  box-shadow: 6px 6px 0 rgba(255, 201, 74, 0.22);
  transition: box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}

.feedback-card:hover {
  transform: translateY(-2px);
  box-shadow: 8px 8px 0 rgba(255, 201, 74, 0.3);
}

.feedback-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(36, 16, 10, 0.72);
}

.feedback-title {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1B0A05;
}

.feedback-text {
  margin: 8px 0 16px;
  max-width: 30ch;
  font-size: 14px;
  line-height: 1.7;
  color: #2A120B;
}

.feedback-card .btn-ink { margin-bottom: 4px; }

.feedback-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(36, 16, 10, 0.34);
}

.feedback-list li {
  display: grid;
  gap: 1px;
  font-size: 13px;
  line-height: 1.55;
}

.feedback-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(36, 16, 10, 0.66);
}

.feedback-value { color: #210D07; font-weight: 600; }

/* 底栏 */
.footer-bottom {
  background: var(--ink-900);
  border-top: 1px solid var(--line-slate);
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
  padding: 16px clamp(16px, 4vw, 40px);
  font-size: 12.5px;
  color: var(--slate-300);
}

.footer-legal { color: var(--slate-300); }
.footer-region { color: var(--slate-300); }

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-legal-links a {
  text-decoration: none;
  color: var(--emerald-200);
  border-bottom: 1px dashed transparent;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease);
}

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

.footer-copy {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--slate-300);
}

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-copy { margin-left: 0; }
}

/* ---------- 9. 通用组件 ---------- */
.card {
  position: relative;
  padding: clamp(16px, 2vw, 22px);
  background: var(--ink-700);
  border: 1px solid var(--line-hard);
  border-radius: var(--radius-md);
  box-shadow: 4px 4px 0 rgba(23, 192, 138, 0.14);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--emerald-500);
  box-shadow: 6px 6px 0 rgba(255, 201, 74, 0.22);
}

.card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--paper-50);
}

.card-meta {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--gold-400);
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 0 0;
  font-size: 12.5px;
  color: var(--slate-300);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  font-family: var(--font-mono);
  color: var(--gold-400);
  opacity: 0.7;
}

.breadcrumb a {
  text-decoration: none;
  color: var(--emerald-200);
  border-bottom: 1px dashed transparent;
  transition: border-color 0.16s var(--ease);
}

.breadcrumb a:hover { border-bottom-color: var(--emerald-200); }

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

/* 插画 / 图片容器基础规则（页面阶段填充） */
.figure-frame {
  position: relative;
  margin: 0;
  background: var(--ink-500);
  border: 1px solid var(--line-hard);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 5px 5px 0 rgba(23, 192, 138, 0.12);
}

.figure-frame > img,
.figure-frame > svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--ink-500);
}

.figure-frame[data-ratio="4x3"] > img,
.figure-frame[data-ratio="4x3"] > svg { aspect-ratio: 4 / 3; }

.figure-frame[data-ratio="3x2"] > img,
.figure-frame[data-ratio="3x2"] > svg { aspect-ratio: 3 / 2; }

.figure-frame[data-ratio="1x1"] > img,
.figure-frame[data-ratio="1x1"] > svg { aspect-ratio: 1 / 1; }

.figure-caption {
  display: block;
  padding: 10px 14px;
  border-top: 1px dashed var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--slate-300);
}

/* ---------- 10. 滚动显现 & 返回顶部 ---------- */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

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

.to-top {
  position: fixed;
  right: clamp(14px, 2.4vw, 26px);
  bottom: clamp(16px, 2.6vw, 28px);
  z-index: 55;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-hard);
  border-radius: 50%;
  background: rgba(12, 36, 54, 0.95);
  color: var(--emerald-200);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease),
    visibility 0.2s var(--ease), border-color 0.2s var(--ease);
}

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

.to-top:hover {
  border-color: var(--gold-400);
  color: var(--gold-400);
}

.to-top svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}

.to-top__track {
  fill: none;
  stroke: rgba(147, 167, 180, 0.24);
  stroke-width: 2;
}

.to-top__ring {
  fill: none;
  stroke: var(--gold-400);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  transition: stroke-dashoffset 0.1s linear;
}

.to-top__arrow {
  position: relative;
  font-size: 17px;
  line-height: 1;
  font-family: var(--font-mono);
}

/* ---------- 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;
  }

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

  .card:hover,
  .feedback-card:hover,
  .btn:hover { transform: none; }
}
