/* ==========================================================================
   KAIYUN 体育在线 V4 · Site Kit
   共享样式 · /assets/site.css
   ========================================================================== */

:root {
  --color-cream: #FFF8E7;
  --color-ink: #2D1F14;
  --color-accent: #E85D2F;
  --color-deep: #1A2A6E;
  --color-neon: #C6F630;
  --color-purple: #6A0DAD;
  --color-gray: #F0EFEA;
  --color-white: #FFFFFF;

  --font-head: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Noto Serif SC", "Source Serif Pro", "Songti SC", "SimSun", Georgia, serif;
  --font-data: "JetBrains Mono", "SFMono-Regular", "Roboto Mono", Menlo, Consolas, monospace;

  --header-h: 64px;
  --site-w: 1200px;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-1: 0 2px 10px rgba(45, 31, 20, 0.08);
  --shadow-2: 0 10px 28px rgba(45, 31, 20, 0.14);
  --tilt: 2.5deg;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  background-color: var(--color-cream);
  background-image:
    linear-gradient(rgba(45, 31, 20, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 31, 20, 0.032) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--color-ink);
  margin-bottom: 0.6em;
}
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.5rem, 2.6vw, 2.25rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1em; }
strong { font-weight: 700; }
em { font-style: italic; }

a {
  color: var(--color-deep);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
  transition: color 0.18s ease;
}
a:hover { color: var(--color-accent); }

ul, ol {
  padding-left: 1.4em;
  margin-bottom: 1em;
}
li { margin-bottom: 0.4em; }

blockquote {
  margin: 1.5em 0;
  padding: 12px 20px;
  border-left: 4px solid var(--color-accent);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0 8px 8px 0;
}

code, kbd, samp {
  font-family: var(--font-data);
  font-size: 0.88em;
  padding: 2px 6px;
  background: rgba(45, 31, 20, 0.06);
  border-radius: 4px;
}

pre {
  background: var(--color-ink);
  color: var(--color-cream);
  padding: 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: 1em;
}
pre code { background: transparent; padding: 0; color: inherit; }

hr {
  border: 0;
  height: 1px;
  margin: 2em 0;
  background: rgba(45, 31, 20, 0.12);
}

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

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

main:focus { outline: none; }

#main-content {
  padding-top: var(--header-h);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

[data-chapter] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.container {
  width: calc(100% - 48px);
  max-width: var(--site-w);
  margin-inline: auto;
}
.container--narrow {
  max-width: 780px;
}

.section {
  padding: 72px 0;
}
.section--tight {
  padding: 36px 0;
}

.prose {
  max-width: 72ch;
}
.prose p { margin-bottom: 1.2em; }
.prose h2,
.prose h3,
.prose h4 { margin-top: 1.6em; }
.prose ul,
.prose ol { margin-bottom: 1.2em; }

/* ---------- 头部 ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 310;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  background: var(--color-accent);
  color: var(--color-cream);
  font-family: var(--font-data);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  box-shadow: var(--shadow-2);
}
.skip-link:focus {
  left: 0;
}

.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 248, 231, 0.82);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid rgba(45, 31, 20, 0.08);
  box-shadow: 0 2px 16px rgba(45, 31, 20, 0.06);
}
.site-head::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-neon) 0%, var(--color-deep) 32%, var(--color-accent) 100%);
  opacity: 0.4;
  pointer-events: none;
}

.site-head__inner {
  position: relative;
  max-width: var(--site-w);
  height: 100%;
  margin-inline: auto;
  padding-inline: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-ink);
  text-decoration: none;
  flex-shrink: 0;
  transition: none;
}
.brand:hover { color: var(--color-deep); }
.brand__mark {
  position: relative;
  width: 28px;
  height: 28px;
  display: inline-block;
  flex-shrink: 0;
}
.brand__bar {
  position: absolute;
  left: 3px;
  top: 4px;
  width: 7px;
  height: 20px;
  background: var(--color-deep);
  border-radius: 2px;
}
.brand__slash {
  position: absolute;
  left: 14px;
  top: 6px;
  width: 12px;
  height: 5px;
  background: var(--color-accent);
  border-radius: 2px;
  transform: skewX(-35deg);
}
.brand__name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--color-ink);
  line-height: 1;
  white-space: nowrap;
}
.brand__sub {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: rgba(45, 31, 20, 0.55);
  line-height: 1;
  white-space: nowrap;
}

.head-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline: auto;
  counter-reset: nav-index;
}
.head-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 8px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 500;
  color: rgba(45, 31, 20, 0.72);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.head-nav__link::before {
  content: counter(nav-index, decimal-leading-zero);
  counter-increment: nav-index;
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 500;
  color: var(--color-accent);
  line-height: 1;
}
.head-nav__link:hover {
  background: rgba(26, 42, 110, 0.08);
  color: var(--color-deep);
}
.head-nav__link[aria-current="page"] {
  background: var(--color-ink);
  color: var(--color-cream);
  box-shadow: inset 0 -2px 0 var(--color-neon);
}
.head-nav__link[aria-current="page"]::before {
  color: var(--color-neon);
}

.head-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.head-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(26, 42, 110, 0.05);
  border: 1px solid rgba(26, 42, 110, 0.16);
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-deep);
}
.head-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-neon);
  box-shadow: 0 0 4px rgba(198, 246, 48, 0.9);
  animation: pulse-ring 2s ease-out infinite;
}
.head-status__text {
  line-height: 1;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(198, 246, 48, 0.8); }
  70% { box-shadow: 0 0 0 8px rgba(198, 246, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(198, 246, 48, 0); }
}

.fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(45, 31, 20, 0.14);
  background: rgba(255, 255, 255, 0.7);
  color: var(--color-deep);
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.fav-btn:hover {
  background: var(--color-deep);
  border-color: var(--color-deep);
  color: var(--color-neon);
  transform: translateY(-2px);
}
.fav-btn__icon {
  line-height: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(45, 31, 20, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 2px 0;
  border-radius: 2px;
  background: var(--color-ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- 页脚 ---------- */

.site-foot {
  margin-top: 96px;
  background: var(--color-ink);
  color: rgba(255, 248, 231, 0.74);
  position: relative;
  overflow: hidden;
}
.site-foot::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-purple) 30%, var(--color-deep) 62%, var(--color-neon) 100%);
}
.site-foot::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(106, 13, 173, 0.22) 0%, transparent 70%);
  pointer-events: none;
}
.site-foot__inner {
  max-width: var(--site-w);
  margin-inline: auto;
  padding: 64px 24px 48px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: 48px;
  position: relative;
  z-index: 1;
}
.site-foot__col {
  min-width: 0;
}
.site-foot__col--brand .brand {
  margin-bottom: 18px;
}
.brand--foot {
  color: var(--color-cream);
}
.brand--foot .brand__bar {
  background: var(--color-neon);
}
.brand--foot .brand__slash {
  background: var(--color-accent);
}
.brand--foot .brand__name {
  color: var(--color-cream);
}
.brand--foot .brand__sub {
  color: rgba(255, 248, 231, 0.55);
}
.site-foot__desc {
  max-width: 48ch;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 248, 231, 0.6);
}
.site-foot__trust {
  max-width: 52ch;
  margin-top: 14px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 248, 231, 0.6);
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 10px 10px 0;
}
.site-foot__title {
  margin-bottom: 16px;
  padding-bottom: 10px;
  font-family: var(--font-data);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-neon);
  border-bottom: 1px solid rgba(255, 248, 231, 0.12);
}
.site-foot__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-foot__item {
  margin-bottom: 9px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 248, 231, 0.78);
}
.site-foot__item--links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.site-foot__sep {
  color: rgba(255, 248, 231, 0.32);
}
.site-foot__item a {
  color: rgba(255, 248, 231, 0.78);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}
.site-foot__item a:hover {
  color: var(--color-neon);
  border-color: var(--color-neon);
}
.site-foot__icp {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 248, 231, 0.16);
  border-radius: 5px;
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255, 248, 231, 0.58);
}
.site-foot__bottom {
  max-width: var(--site-w);
  margin-inline: auto;
  padding: 18px 24px 24px;
  border-top: 1px solid rgba(255, 248, 231, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-data);
  font-size: 12px;
  color: rgba(255, 248, 231, 0.46);
  position: relative;
  z-index: 1;
}
.site-foot__bottom p {
  margin: 0;
}
.site-foot__ver {
  letter-spacing: 0.08em;
}

/* ---------- 分屏首屏 ---------- */

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  min-height: calc(100vh - var(--header-h));
  padding: 48px 0;
}
.hero-split__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

/* ---------- 通用网格 ---------- */

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

/* ---------- Bento ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(120px, auto);
  gap: 20px;
}
.bento__item {
  position: relative;
  min-height: 120px;
  padding: 24px;
  border: 1px solid rgba(45, 31, 20, 0.08);
  border-radius: var(--radius);
  background: rgba(240, 239, 234, 0.82);
  overflow: hidden;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}
.bento__item:hover {
  transform: translateY(-4px) rotate(1deg);
  box-shadow: 0 14px 32px rgba(45, 31, 20, 0.12);
  border-color: rgba(26, 42, 110, 0.2);
}
.bento__item--lg {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 280px;
}
.bento__item--md {
  grid-column: span 2;
  min-height: 140px;
}
.bento__item--accent {
  background: var(--color-accent);
  border-color: transparent;
  color: var(--color-cream);
}
.bento__item--deep {
  background: var(--color-deep);
  border-color: transparent;
  color: var(--color-cream);
}
.bento__item--ink {
  background: var(--color-ink);
  border-color: transparent;
  color: var(--color-cream);
}
.bento__item--neon {
  background: var(--color-neon);
  border-color: transparent;
  color: var(--color-ink);
}

/* ---------- 玻璃与数据面板 ---------- */

.glass {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 8px 24px rgba(45, 31, 20, 0.06);
}
.panel-data {
  position: relative;
  padding: 28px 24px 24px;
  border: 1px solid rgba(198, 246, 48, 0.18);
  border-radius: var(--radius);
  background: var(--color-ink);
  color: rgba(255, 248, 231, 0.82);
  font-family: var(--font-data);
  font-size: 14px;
  line-height: 1.7;
  box-shadow: inset 0 0 48px rgba(26, 42, 110, 0.28);
}
.panel-data::before {
  content: '● LIVE';
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--color-neon);
  opacity: 0.9;
}

/* ---------- 面包屑 ---------- */

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 36px;
  font-family: var(--font-data);
  font-size: 13px;
}
.crumb a {
  color: var(--color-deep);
  text-decoration: none;
}
.crumb a:hover {
  text-decoration: underline;
  color: var(--color-accent);
}
.crumb__sep {
  color: rgba(45, 31, 20, 0.32);
  user-select: none;
}
.crumb [aria-current="page"] {
  color: var(--color-accent);
  font-weight: 500;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: var(--color-accent);
  color: var(--color-cream);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s var(--ease);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(232, 93, 47, 0.28);
  color: var(--color-cream);
}
.btn:active {
  transform: translateY(0);
}
.btn--deep {
  background: var(--color-deep);
}
.btn--deep:hover {
  box-shadow: 0 10px 24px rgba(26, 42, 110, 0.3);
  color: var(--color-cream);
}
.btn--ghost {
  background: transparent;
  border: 1.5px solid rgba(45, 31, 20, 0.25);
  color: var(--color-ink);
}
.btn--ghost:hover {
  border-color: var(--color-deep);
  color: var(--color-deep);
  box-shadow: none;
}
.btn--data {
  font-family: var(--font-data);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ---------- 徽章 ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--color-gray);
  border: 1px solid transparent;
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-ink);
}
.badge--accent { background: var(--color-accent); color: var(--color-cream); }
.badge--deep { background: var(--color-deep); color: var(--color-cream); }
.badge--neon { background: var(--color-neon); color: var(--color-ink); }
.badge--ink { background: var(--color-ink); color: var(--color-cream); }

/* ---------- 数据排版 ---------- */

.sec-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.sec-label::before {
  content: '';
  display: inline-block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-neon);
}

.stat {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}
.stat__num {
  font-family: var(--font-data);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--color-deep);
}
.stat__num--accent { color: var(--color-accent); }
.stat__num--neon { color: var(--color-neon); }
.stat__num--ink { color: var(--color-ink); }
.stat__label {
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(45, 31, 20, 0.58);
}

.data-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(45, 31, 20, 0.12);
  font-family: var(--font-data);
  font-size: 13px;
  line-height: 1.5;
}
.data-row:last-child {
  border-bottom: 0;
}
.data-row__k {
  color: rgba(45, 31, 20, 0.58);
}
.data-row__v {
  font-weight: 500;
  color: var(--color-ink);
  text-align: right;
}

/* ---------- 编辑部索引 ---------- */

.article-index {
  counter-reset: article-index;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.article-index__item {
  counter-increment: article-index;
  margin: 0;
}
.article-index__link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(45, 31, 20, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-ink);
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s var(--ease);
}
.article-index__link::before {
  content: counter(article-index, decimal-leading-zero);
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-accent);
}
.article-index__link:hover {
  background: var(--color-white);
  color: var(--color-deep);
  transform: translateX(4px);
}

/* ---------- 章节跟随 ---------- */

.chapter-nav {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(45, 31, 20, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.chapter-nav__link {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 500;
  color: rgba(45, 31, 20, 0.72);
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.chapter-nav__link:hover {
  background: rgba(26, 42, 110, 0.08);
  color: var(--color-deep);
}
.chapter-nav__link[aria-current="location"] {
  background: var(--color-deep);
  color: var(--color-cream);
  box-shadow: inset -2px 0 0 var(--color-neon);
}

/* ---------- 旁注 ---------- */

.sidenote {
  margin: 10px 0 18px;
  padding: 6px 0 6px 16px;
  border-left: 3px solid var(--color-deep);
  font-size: 13px;
  line-height: 1.7;
  color: rgba(45, 31, 20, 0.6);
}

/* ---------- 图片占位 ---------- */

.img-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-gray);
  isolation: isolate;
}
.img-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, rgba(26, 42, 110, 0.66) 0%, rgba(106, 13, 173, 0.5) 45%, rgba(232, 93, 47, 0.32) 100%);
}
.img-wrap--cover::before {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 8px),
    linear-gradient(135deg, rgba(26, 42, 110, 0.9) 0%, rgba(106, 13, 173, 0.7) 40%, rgba(232, 93, 47, 0.45) 100%);
}
.img-wrap::after {
  content: attr(data-label);
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(45, 31, 20, 0.7);
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.img-wrap--16x9 { aspect-ratio: 16 / 9; }
.img-wrap--4x3 { aspect-ratio: 4 / 3; }
.img-wrap--1x1 { aspect-ratio: 1 / 1; }

/* ---------- 倾斜与纹理 ---------- */

.tilt {
  transform: rotate(var(--tilt));
}
.tilt--rev {
  transform: rotate(calc(var(--tilt) * -0.6));
}
.stripes {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.08) 0 8px,
    transparent 8px 20px
  );
  pointer-events: none;
}

/* ---------- 滚动进度条 ---------- */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-neon), var(--color-deep) 50%, var(--color-accent));
  z-index: 300;
  border-radius: 0 2px 2px 0;
  will-change: width;
}

/* ---------- 返回顶部 ---------- */

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(45, 31, 20, 0.14);
  background: rgba(255, 248, 231, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--color-ink);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background-color 0.2s;
  box-shadow: 0 8px 24px rgba(45, 31, 20, 0.14);
}
.to-top--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.to-top:hover {
  background: var(--color-deep);
  color: var(--color-cream);
}
.to-top__icon {
  font-size: 16px;
  line-height: 1;
}
.to-top__label {
  font-size: 13px;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1100px) {
  .head-nav__link {
    padding: 7px 9px;
    font-size: 13px;
    gap: 5px;
  }
  .brand__name { font-size: 16px; }
  .brand__sub { font-size: 12px; }
}

@media (max-width: 960px) {
  .nav-toggle {
    display: flex;
  }
  .head-tools .head-status {
    display: none;
  }
  .head-nav {
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    display: none;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    border: 1px solid rgba(45, 31, 20, 0.12);
    border-top: 3px solid var(--color-neon);
    border-radius: 0 0 16px 16px;
    background: rgba(255, 248, 231, 0.96);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    box-shadow: 0 20px 40px rgba(45, 31, 20, 0.18);
    counter-reset: nav-index;
  }
  .head-nav[data-open] {
    display: flex;
  }
  .head-nav__link {
    padding: 13px 16px;
    font-size: 15px;
    border-bottom: 1px solid rgba(45, 31, 20, 0.06);
    border-radius: 8px;
  }
  .head-nav__link:last-child {
    border-bottom: 0;
  }
  .head-nav__link::before {
    font-size: 11px;
  }

  .hero-split {
    grid-template-columns: 1fr;
    gap: 32px;
    min-height: auto;
    padding: 32px 0;
  }
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-foot__inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .site-foot__col--brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .container {
    width: calc(100% - 32px);
  }
  .section {
    padding: 48px 0;
  }
  .brand__sub {
    display: none;
  }
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
  .bento {
    grid-template-columns: 1fr;
  }
  .bento__item--lg,
  .bento__item--md {
    grid-column: span 1;
    grid-row: span 1;
  }
  .site-foot__inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 40px;
  }
  .site-foot__bottom {
    flex-direction: column;
    text-align: center;
  }
  .to-top {
    right: 16px;
    bottom: 16px;
    padding: 0 14px;
  }
  .to-top__label {
    display: none;
  }
}

/* ---------- 无障碍与减少动效 ---------- */

@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;
  }
}
