/* ============================================================
   米乐竞技场 · 全站共享样式
   /assets/site.css
   结构：变量 / Reset / 排版 / 按钮 / 头部 / 导航 / 页脚 / 通用组件
   ============================================================ */

/* ---------- 1. 变量 ---------- */
:root {
  --bg-deep: #0A1428;
  --bg-mid: #16335F;
  --bg-dark: #071021;
  --accent-red: #FF4B2E;
  --accent-gold: #FFB02E;
  --accent-lemon: #FDE047;
  --accent-soft: #FF8A5C;
  --text-white: #FFFFFF;
  --text-mist: #C0D8F0;

  --font-head: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --font-body: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-num: "Roboto Mono", "SF Mono", Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --container-w: 1200px;
  --content-pad: clamp(16px, 4vw, 32px);

  --header-top: 14px;
  --header-h: 68px;
  --header-offset: calc(var(--header-top) + var(--header-h) + 16px);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.35);

  --z-header: 100;
  --z-top: 101;
  --z-progress: 102;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-mist);
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse at 85% -10%, rgba(255, 75, 46, 0.1), transparent 48%),
    radial-gradient(ellipse at 5% 15%, rgba(22, 51, 95, 0.55), transparent 55%);
  min-height: 100vh;
  padding-top: var(--header-offset);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul,
ol {
  list-style: none;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

::selection {
  background: var(--accent-lemon);
  color: var(--bg-deep);
}

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

.main-content,
#main-content {
  scroll-margin-top: var(--header-offset);
}

main {
  display: block;
  min-height: 60vh;
  scroll-margin-top: var(--header-offset);
}

main [id] {
  scroll-margin-top: var(--header-offset);
}

[hidden] {
  display: none !important;
}

/* ---------- 3. 基础排版工具 ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--content-pad);
}

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  background: var(--accent-lemon);
  color: var(--bg-deep);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: top 0.28s ease;
}

.skip-link:focus {
  top: 16px;
}

/* ---------- 4. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition), border-color var(--transition), color var(--transition);
}

.btn:active {
  transform: scale(0.97);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-gold));
  color: var(--text-white);
  box-shadow: 0 4px 16px rgba(255, 75, 46, 0.35);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 75, 46, 0.5);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-white);
}

.btn-ghost:hover {
  border-color: var(--accent-lemon);
  color: var(--accent-lemon);
  background: rgba(253, 224, 71, 0.08);
  transform: translateY(-2px);
}

.btn-lemon {
  background: var(--accent-lemon);
  color: var(--bg-deep);
  font-weight: 800;
}

.btn-lemon:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(253, 224, 71, 0.4);
}

.btn-quick {
  padding: 8px 18px;
  font-size: 13px;
}

/* ---------- 5. 头部 ---------- */
.site-header {
  position: fixed;
  top: var(--header-top);
  left: 0;
  right: 0;
  z-index: var(--z-header);
  pointer-events: none;
}

.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 18px;
  background: linear-gradient(135deg, rgba(10, 20, 40, 0.82), rgba(22, 51, 95, 0.58));
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--bg-mid) 0%, var(--accent-red) 72%, var(--accent-gold) 100%);
  box-shadow: 0 4px 14px rgba(255, 75, 46, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

.brand-mark::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  width: 20px;
  height: 8px;
  background: var(--accent-lemon);
  border-radius: 50% 50% 0 0;
  box-shadow: 0 0 10px rgba(253, 224, 71, 0.55);
}

.brand-mark::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 2px;
  width: 15px;
  height: 2px;
  background: rgba(255, 255, 255, 0.6);
  transform: rotate(-30deg);
  transform-origin: right center;
  border-radius: 2px;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ---------- 6. 桌面端导航胶囊 ---------- */
.nav-capsule {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  background: rgba(7, 16, 33, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-pill);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-mist);
  white-space: nowrap;
  transition: color var(--transition), background-color var(--transition), box-shadow var(--transition);
}

.nav-link:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-link[aria-current="page"] {
  color: var(--accent-lemon);
  background: rgba(253, 224, 71, 0.1);
  box-shadow: inset 0 0 0 1px rgba(253, 224, 71, 0.2);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ---------- 7. 移动端汉堡按钮 ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background-color var(--transition);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

.nav-toggle-line {
  display: block;
  width: 15px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-white);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 8. 阅读进度与返回顶部 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-gold), var(--accent-lemon));
  border-radius: 0 3px 3px 0;
  box-shadow: 0 1px 8px rgba(255, 75, 46, 0.4);
  z-index: var(--z-progress);
  pointer-events: none;
}

.top-btn {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: var(--z-top);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-red), var(--accent-gold));
  color: var(--text-white);
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(255, 75, 46, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition), box-shadow var(--transition);
  pointer-events: auto;
}

.top-btn:hover {
  box-shadow: 0 12px 32px rgba(255, 75, 46, 0.55);
}

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

.top-btn[data-visible]:hover {
  transform: translateY(-3px);
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  padding: 56px 0 0;
  background: var(--bg-dark);
  color: var(--text-mist);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}

.footer-horizon {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-red) 0%, var(--accent-gold) 35%, var(--accent-lemon) 72%, transparent 100%);
  opacity: 0.9;
}

.footer-shell {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--content-pad);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  padding-bottom: 40px;
}

.footer-brand-name {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.footer-trust {
  max-width: 360px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-mist);
  opacity: 0.85;
}

.footer-heading {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(255, 75, 46, 0.45);
}

.footer-nav,
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-link {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-mist);
  transition: color var(--transition), padding-left var(--transition), border-color var(--transition);
}

a.footer-link:hover {
  color: var(--accent-lemon);
  padding-left: 4px;
}

.footer-address {
  line-height: 1.6;
}

.footer-icp {
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.03em;
  opacity: 0.6;
  margin-top: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 13px;
}

.footer-copy {
  color: var(--text-mist);
  opacity: 0.8;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.footer-legal .footer-link {
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.footer-legal .footer-link:hover {
  padding-left: 0;
  color: var(--accent-lemon);
  border-bottom-color: var(--accent-lemon);
}

/* ---------- 10. 通栏与分区 ---------- */
.section-block {
  padding: clamp(40px, 6vw, 72px) 0;
}

.section-block + .section-block {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.section-head::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 28px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent-red), var(--accent-gold), var(--accent-lemon));
}

.section-head-title {
  font-family: var(--font-head);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.section-head-desc {
  margin-left: auto;
  max-width: 320px;
  font-size: 14px;
  color: var(--text-mist);
  text-align: right;
  line-height: 1.6;
}

/* ---------- 11. 卡片 / 标签 / 面包屑 ---------- */
.card {
  position: relative;
  padding: 24px;
  background: linear-gradient(155deg, rgba(22, 51, 95, 0.4), rgba(7, 16, 33, 0.65));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.card-float:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 176, 46, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--text-mist);
  background: rgba(22, 51, 95, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tag-dawn {
  color: var(--accent-soft);
  background: linear-gradient(135deg, rgba(255, 75, 46, 0.25), rgba(255, 176, 46, 0.15));
  border-color: rgba(255, 75, 46, 0.3);
}

.tag-hot {
  color: var(--accent-lemon);
  background: rgba(253, 224, 71, 0.1);
  border-color: rgba(253, 224, 71, 0.3);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-mist);
}

.breadcrumbs a {
  color: var(--text-mist);
  transition: color var(--transition);
}

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

.breadcrumbs-sep {
  color: rgba(192, 216, 240, 0.4);
}

.breadcrumbs-current {
  color: var(--text-white);
  font-weight: 600;
}

/* ---------- 12. 内页主视觉 ---------- */
.page-hero {
  position: relative;
  padding: clamp(40px, 7vw, 80px) 0 clamp(24px, 4vw, 40px);
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 75, 46, 0.18), rgba(22, 51, 95, 0.08) 62%, transparent 70%);
  pointer-events: none;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 15%;
  width: 420px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), var(--accent-red), transparent);
  opacity: 0.35;
  pointer-events: none;
}

.page-hero-title {
  position: relative;
  font-family: var(--font-head);
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 900;
  color: var(--text-white);
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.page-hero-sub {
  position: relative;
  max-width: 600px;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-mist);
}

.page-hero-meta {
  position: relative;
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- 13. 框景窗口 ---------- */
.frame-window {
  position: relative;
  padding: clamp(24px, 4vw, 48px);
  background: linear-gradient(150deg, rgba(22, 51, 95, 0.38), rgba(7, 16, 33, 0.65));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 20px 48px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.frame-window::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 160px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-gold), var(--accent-lemon));
  border-radius: 0 2px 2px 0;
}

.frame-window::after {
  content: '';
  position: absolute;
  right: -70px;
  bottom: -70px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 75, 46, 0.16), transparent 70%);
  pointer-events: none;
}

.frame-corner-tl,
.frame-corner-tr,
.frame-corner-bl,
.frame-corner-br {
  position: absolute;
  width: 26px;
  height: 26px;
  pointer-events: none;
}

.frame-corner-tl {
  top: 10px;
  left: 10px;
  border-top: 2px solid var(--accent-lemon);
  border-left: 2px solid var(--accent-lemon);
  border-top-left-radius: 8px;
}

.frame-corner-tr {
  top: 10px;
  right: 10px;
  border-top: 2px solid var(--accent-lemon);
  border-right: 2px solid var(--accent-lemon);
  border-top-right-radius: 8px;
}

.frame-corner-bl {
  bottom: 10px;
  left: 10px;
  border-bottom: 2px solid var(--accent-lemon);
  border-left: 2px solid var(--accent-lemon);
  border-bottom-left-radius: 8px;
}

.frame-corner-br {
  bottom: 10px;
  right: 10px;
  border-bottom: 2px solid var(--accent-lemon);
  border-right: 2px solid var(--accent-lemon);
  border-bottom-right-radius: 8px;
}

/* ---------- 14. 图片容器 ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--bg-mid), var(--bg-deep) 60%, var(--accent-red));
}

.img-frame > img,
.img-frame > .img-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.22);
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.img-placeholder::before {
  content: 'IMAGE';
}

.img-ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.img-ratio-4-3 {
  aspect-ratio: 4 / 3;
}

.img-ratio-1-1 {
  aspect-ratio: 1 / 1;
}

.img-ratio-3-2 {
  aspect-ratio: 3 / 2;
}

/* ---------- 15. 章节目录 ---------- */
.chapter-nav {
  position: sticky;
  top: calc(var(--header-top) + var(--header-h) + 12px);
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  background: rgba(7, 16, 33, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.chapter-link {
  display: inline-block;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-mist);
  background: transparent;
  border: 1px solid transparent;
  transition: color var(--transition), background-color var(--transition), box-shadow var(--transition);
}

.chapter-link:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.06);
}

.chapter-link[aria-current="true"] {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-gold));
  color: var(--text-white);
  box-shadow: 0 4px 16px rgba(255, 75, 46, 0.35);
}

/* ---------- 16. 速度线装饰 ---------- */
.speed-line {
  position: absolute;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  opacity: 0.4;
  pointer-events: none;
}

.speed-line-red {
  background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
}

.speed-line-lemon {
  background: linear-gradient(90deg, transparent, var(--accent-lemon), transparent);
}

.speed-line-short {
  width: 72px;
}

.speed-line-long {
  width: 140px;
}

/* ---------- 17. 移动端适配 ---------- */
@media (max-width: 991px) {
  :root {
    --header-top: 10px;
    --header-h: 60px;
  }

  .header-shell {
    border-radius: 18px;
    padding: 0 14px;
    gap: 10px;
  }

  .header-actions .btn-quick {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-capsule {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px;
    max-height: calc(100vh - var(--header-offset) - 24px);
    overflow-y: auto;
    background: linear-gradient(150deg, rgba(10, 20, 40, 0.97), rgba(22, 51, 95, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  }

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

  .nav-link {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    justify-content: center;
  }

  .nav-link[aria-current="page"] {
    background: linear-gradient(90deg, rgba(255, 75, 46, 0.2), rgba(255, 176, 46, 0.12));
    box-shadow: inset 0 0 0 1px rgba(255, 176, 46, 0.2);
  }
}

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .frame-window {
    padding: 28px 20px;
  }

  .chapter-nav {
    top: calc(var(--header-top) + var(--header-h) + 8px);
  }
}

@media (max-width: 576px) {
  .brand-name {
    font-size: 16px;
    letter-spacing: 0.04em;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .skip-link {
    left: 8px;
    right: 8px;
    justify-content: center;
  }

  .skip-link:focus {
    top: 8px;
  }

  .top-btn {
    right: 16px;
    bottom: 16px;
    width: 40px;
    height: 40px;
  }
}

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

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

  .skip-link {
    transition: none;
  }

  .nav-capsule,
  .nav-toggle-line,
  .scroll-progress,
  .top-btn,
  .card-float,
  .btn,
  .nav-link,
  .chapter-link,
  .footer-link {
    transition: none;
  }

  .top-btn {
    transform: none;
  }

  .top-btn[data-visible]:hover {
    transform: none;
  }

  .btn-accent:hover,
  .btn-ghost:hover,
  .btn-lemon:hover,
  .card-float:hover {
    transform: none;
  }
}
