/* =========================================================
   777电玩城 · 共享外壳样式表  /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, figure, blockquote,
dl, dd, ul, ol {
  margin: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

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

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

table { border-collapse: collapse; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid #22D3EE;
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #0E1116;
  --slate: #1B2027;
  --bone: #E9E3D5;
  --moss: #7C8B6B;
  --clay: #C2703F;
  --violet: #A855F7;
  --cyan: #22D3EE;
  --magenta: #FF3DBE;
  --lime: #B6FF3B;
  --rule: #2A313A;

  --rail-w: 88px;
  --bar-h: 56px;
  --shell: 1240px;
  --prose-max: 40em;

  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-head: "Archivo", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 10px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --glow-violet: 0 0 0 1px rgba(168, 85, 247, .35), 0 0 24px -6px rgba(168, 85, 247, .75);
  --glow-cyan: 0 0 0 1px rgba(34, 211, 238, .38), 0 0 24px -6px rgba(34, 211, 238, .7);
  --glow-lime: 0 0 0 1px rgba(182, 255, 59, .38), 0 0 24px -6px rgba(182, 255, 59, .7);
}

html[data-density="compact"] {
  --prose-max: 100%;
}

/* ---------- 3. 页面基底 ---------- */
body {
  min-height: 100vh;
  padding-left: var(--rail-w);
  padding-top: var(--bar-h);
  background-color: var(--ink);
  background-image:
    radial-gradient(900px 620px at 86% -8%, rgba(168, 85, 247, .17), transparent 62%),
    radial-gradient(760px 540px at -6% 32%, rgba(34, 211, 238, .12), transparent 60%),
    radial-gradient(700px 520px at 64% 106%, rgba(255, 61, 190, .11), transparent 62%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

#main-content {
  scroll-margin-top: calc(var(--bar-h) + 20px);
  display: block;
}

::selection {
  background: rgba(168, 85, 247, .45);
  color: #fff;
}

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 300;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--lime);
  color: #0B0E12;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  transform: translate(-50%, -190%);
  transition: transform .18s var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ---------- 5. 头部骨架 ---------- */
.site-header {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}

.brand-rail,
.command-bar {
  pointer-events: auto;
}

/* ---------- 6. 左侧品牌轨道 ---------- */
.brand-rail {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 14px 0 18px;
  background: linear-gradient(180deg, #12171D 0%, #0B0E13 100%);
  border-right: 1px solid var(--rule);
  overflow: hidden;
}

.brand-rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(168, 85, 247, .75) 16%,
    rgba(34, 211, 238, .6) 56%,
    transparent 94%);
  opacity: .75;
}

.rail-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.rail-brand__mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.04em;
  color: #0B0E12;
  background: linear-gradient(140deg, var(--violet) 0%, var(--magenta) 58%, var(--clay) 100%);
  box-shadow: 0 0 20px -3px rgba(168, 85, 247, .85), inset 0 1px 0 rgba(255, 255, 255, .34);
}

.rail-brand__text {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-indent: .22em;
  color: var(--moss);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  margin: auto 0;
  padding: 6px 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.rail-nav::-webkit-scrollbar { display: none; }

.rail-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 8px 4px;
  border-radius: 12px;
  color: #6E7681;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  transition: color .16s var(--ease), background .16s var(--ease);
}

.rail-link__dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: #3A424D;
  border: 1px solid #4B545F;
  transition: background .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease);
}

.rail-link__label {
  white-space: nowrap;
}

.rail-link:hover {
  color: var(--bone);
  background: rgba(233, 227, 213, .05);
}

.rail-link:hover .rail-link__dot {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(34, 211, 238, .9);
}

.rail-link.is-active {
  color: var(--cyan);
}

.rail-link.is-active .rail-link__dot {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 13px rgba(34, 211, 238, .95);
}

.rail-link[aria-current="page"] {
  color: var(--lime);
}

.rail-link[aria-current="page"] .rail-link__dot {
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 0 14px rgba(182, 255, 59, .95);
}

.rail-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.rail-status__lamp {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(182, 255, 59, .14), 0 0 16px rgba(182, 255, 59, .9);
  animation: lampPulse 2.7s ease-in-out infinite;
}

.rail-status__readout {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--moss);
  font-variant-numeric: tabular-nums;
}

@keyframes lampPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .42; }
}

/* ---------- 7. 顶部命令栏 ---------- */
.command-bar {
  position: absolute;
  top: 0;
  left: var(--rail-w);
  right: 0;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 clamp(14px, 3vw, 34px);
  background: rgba(14, 17, 22, .88);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}

.command-brand {
  display: none;
}

.command-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.command-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.command-link {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 10px;
  font-family: var(--font-head);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: #8C949E;
  white-space: nowrap;
  transition: color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}

.command-link__idx {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #4E5762;
  transition: color .16s var(--ease);
}

.command-link:hover {
  color: var(--bone);
  background: rgba(34, 211, 238, .08);
}

.command-link:hover .command-link__idx {
  color: var(--cyan);
}

.command-link[aria-current="page"] {
  color: var(--bone);
  background: rgba(168, 85, 247, .15);
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, .42);
}

.command-link[aria-current="page"] .command-link__idx {
  color: var(--lime);
}

.command-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(182, 255, 59, .3);
  background: rgba(182, 255, 59, .07);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--lime);
  white-space: nowrap;
}

.status-chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: lampPulse 2.4s ease-in-out infinite;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: rgba(27, 32, 39, .85);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #98A0AA;
  white-space: nowrap;
  transition: color .16s var(--ease), border-color .16s var(--ease),
              box-shadow .16s var(--ease), background .16s var(--ease);
}

.tool-btn__icon {
  font-size: 12px;
  line-height: 1;
}

.tool-btn__count {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: .8;
  font-variant-numeric: tabular-nums;
}

.tool-btn:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, .55);
  box-shadow: 0 0 18px -6px rgba(34, 211, 238, .9);
}

.tool-btn[aria-pressed="true"] {
  color: #0B0E12;
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 0 20px -5px rgba(182, 255, 59, .95);
}

.tool-btn[aria-pressed="true"] .tool-btn__count {
  opacity: 1;
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid var(--rule);
  background: rgba(27, 32, 39, .9);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}

.nav-toggle:hover {
  border-color: rgba(182, 255, 59, .5);
  box-shadow: 0 0 18px -6px rgba(182, 255, 59, .9);
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--bone);
  transition: transform .18s var(--ease), background .18s var(--ease);
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

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

.nav-toggle.is-open .nav-toggle__bars { background: transparent; }
.nav-toggle.is-open .nav-toggle__bars::before {
  background: var(--lime);
  transform: translateY(5px) rotate(45deg);
}
.nav-toggle.is-open .nav-toggle__bars::after {
  background: var(--lime);
  transform: translateY(-5px) rotate(-45deg);
}

.command-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--violet) 0%, var(--cyan) 48%, var(--lime) 100%);
  box-shadow: 0 0 12px rgba(34, 211, 238, .85);
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 124px);
  background: linear-gradient(180deg, #10151B 0%, #090C10 100%);
  border-top: 1px solid var(--rule);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(168, 85, 247, .7) 20%,
    rgba(34, 211, 238, .62) 52%,
    rgba(255, 61, 190, .55) 78%,
    transparent 100%);
}

.site-footer::after {
  content: "";
  position: absolute;
  bottom: -170px;
  left: 50%;
  width: min(780px, 92%);
  height: 340px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(168, 85, 247, .3), transparent 72%);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(38px, 5vw, 64px) clamp(20px, 4vw, 44px) clamp(26px, 3vw, 40px);
  display: grid;
  grid-template-columns: minmax(220px, 1.05fr) minmax(0, 2fr);
  gap: clamp(28px, 4vw, 64px);
}

.footer-brand__row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-brand__mark {
  display: inline-grid;
  place-items: center;
  padding: 7px 14px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #0B0E12;
  background: linear-gradient(130deg, var(--violet) 0%, var(--magenta) 100%);
  box-shadow: 0 0 22px -5px rgba(255, 61, 190, .9);
}

.footer-brand__name {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--bone);
}

.footer-brand__tag {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.7;
  color: #B4AD9E;
  max-width: 20em;
  margin-bottom: 14px;
}

.footer-brand__meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.9;
  letter-spacing: .02em;
  color: #626B77;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 40px);
}

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--moss);
}

.footer-col__title::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--clay);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-link {
  display: inline-block;
  padding: 5px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #9AA2AC;
  transition: color .16s var(--ease), transform .16s var(--ease);
}

.footer-link:hover {
  color: var(--cyan);
  transform: translateX(3px);
}

.footer-link[aria-current="page"] {
  color: var(--lime);
}

.footer-link--static {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #79828E;
  word-break: break-all;
  cursor: default;
}

.footer-link--static:hover {
  color: #79828E;
  transform: none;
}

.footer-legal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 18px clamp(20px, 4vw, 44px) 32px;
  border-top: 1px dashed var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
}

.footer-legal__item {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .03em;
  color: #5F6874;
}

/* ---------- 9. 通用容器与栅格 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: clamp(18px, 4vw, 44px);
}

.section {
  padding-block: clamp(40px, 6vw, 88px);
}

.section--tight {
  padding-block: clamp(26px, 3.6vw, 52px);
}

.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)); }
.grid--6-4 { grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); }
.grid--4-6 { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }
.grid--7-3 { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); }
.grid--3-7 { grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); }

.stack > * + * {
  margin-top: var(--stack, 16px);
}

/* ---------- 10. 章节标记 / 正文 ---------- */
.chapter {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  margin-bottom: clamp(18px, 2.4vw, 30px);
}

.chapter__num {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 9px;
  border: 1px solid rgba(194, 112, 63, .45);
  background: rgba(194, 112, 63, .1);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--clay);
  font-variant-numeric: tabular-nums;
}

.chapter__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.2;
  letter-spacing: .01em;
  color: var(--bone);
}

.chapter__title em {
  font-style: normal;
  color: var(--violet);
  text-shadow: 0 0 28px rgba(168, 85, 247, .6);
}

.chapter__rule {
  flex: 1 1 auto;
  min-width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--rule) 0%, transparent 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.lede {
  max-width: 34em;
  font-family: var(--font-display);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.72;
  color: #C9C2B4;
}

.prose {
  max-width: var(--prose-max);
  font-size: 16.5px;
  line-height: 1.78;
  color: #C6BFB1;
  transition: max-width .2s var(--ease);
}

.prose p + p { margin-top: 1em; }

.prose strong {
  color: var(--bone);
  font-weight: 600;
}

.prose a {
  color: var(--cyan);
  border-bottom: 1px solid rgba(34, 211, 238, .4);
}

.divider {
  height: 1px;
  border: 0;
  background: var(--rule);
}

.divider--dashed {
  background: repeating-linear-gradient(90deg, var(--rule) 0 8px, transparent 8px 16px);
}

.divider--glow {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(168, 85, 247, .65) 30%,
    rgba(34, 211, 238, .55) 68%,
    transparent 100%);
}

/* ---------- 11. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: #6E7681;
}

.breadcrumb a {
  color: #8C949E;
  transition: color .16s var(--ease);
}

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

.breadcrumb__sep { color: var(--rule); }

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

/* ---------- 12. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease),
              background .16s var(--ease), color .16s var(--ease),
              border-color .16s var(--ease);
}

.btn--primary {
  background: linear-gradient(120deg, var(--violet) 0%, var(--magenta) 100%);
  color: #0B0E12;
  box-shadow: 0 0 28px -10px rgba(255, 61, 190, .95), inset 0 1px 0 rgba(255, 255, 255, .32);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 36px -8px rgba(255, 61, 190, 1), inset 0 1px 0 rgba(255, 255, 255, .42);
}

.btn--lime {
  background: var(--lime);
  color: #0B0E12;
  box-shadow: 0 0 28px -10px rgba(182, 255, 59, .95);
}

.btn--lime:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 36px -8px rgba(182, 255, 59, 1);
}

.btn--ghost {
  background: rgba(27, 32, 39, .72);
  border-color: var(--rule);
  color: var(--bone);
}

.btn--ghost:hover {
  border-color: rgba(34, 211, 238, .58);
  color: var(--cyan);
  box-shadow: var(--glow-cyan);
}

.btn--link {
  min-height: 0;
  padding: 0;
  border-radius: 6px;
  color: var(--cyan);
}

.btn--link:hover {
  color: var(--lime);
}

/* ---------- 13. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(233, 227, 213, .14);
  background: rgba(233, 227, 213, .06);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--moss);
  white-space: nowrap;
}

.tag--violet { color: var(--violet); background: rgba(168, 85, 247, .12); border-color: rgba(168, 85, 247, .36); }
.tag--cyan   { color: var(--cyan);   background: rgba(34, 211, 238, .11); border-color: rgba(34, 211, 238, .36); }
.tag--magenta{ color: var(--magenta);background: rgba(255, 61, 190, .11); border-color: rgba(255, 61, 190, .36); }
.tag--lime   { color: var(--lime);   background: rgba(182, 255, 59, .1);  border-color: rgba(182, 255, 59, .34); }
.tag--clay   { color: var(--clay);   background: rgba(194, 112, 63, .13); border-color: rgba(194, 112, 63, .42); }

/* ---------- 14. 档案夹 / 卡带 ---------- */
.folder {
  position: relative;
  margin-top: 14px;
  padding: clamp(20px, 2.4vw, 28px);
  border-radius: 4px 18px 18px 18px;
  border: 1px solid var(--rule);
  background: linear-gradient(160deg, rgba(27, 32, 39, .96) 0%, rgba(17, 21, 27, .96) 100%);
}

.folder__tab {
  position: absolute;
  top: -12px;
  left: 16px;
  padding: 3px 12px;
  border-radius: 9px;
  background: var(--moss);
  color: #0B0E12;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
}

.folder__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--rule);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .03em;
  color: #78808C;
}

.folder__body {
  font-size: 15.5px;
  line-height: 1.75;
  color: #BDB6A9;
}

.folder__body p + p { margin-top: .85em; }

.folder__body strong { color: var(--bone); font-weight: 600; }

.tape {
  position: relative;
  padding: clamp(16px, 2vw, 24px);
  border-radius: 18px;
  border: 1px solid var(--rule);
  background: rgba(27, 32, 39, .72);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}

.tape:hover {
  border-color: rgba(168, 85, 247, .48);
  box-shadow: 0 0 34px -16px rgba(168, 85, 247, .95);
}

/* ---------- 15. 图片容器 ---------- */
.media-frame {
  position: relative;
  isolation: isolate;
  width: 100%;
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid var(--rule);
  background: linear-gradient(150deg, #1B2027 0%, #11151B 72%);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 92% at 88% 6%, rgba(168, 85, 247, .34), transparent 56%),
    radial-gradient(92% 82% at 6% 96%, rgba(34, 211, 238, .22), transparent 62%);
  mix-blend-mode: screen;
}

.media-frame__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: saturate(1.14) contrast(1.06);
}

.media-frame--wide .media-frame__img { aspect-ratio: 21 / 9; }
.media-frame--tall .media-frame__img { aspect-ratio: 3 / 4; }
.media-frame--square .media-frame__img { aspect-ratio: 1 / 1; }

.media-frame__cap {
  position: relative;
  z-index: 2;
  padding: 10px 14px;
  border-top: 1px solid rgba(42, 49, 58, .9);
  background: rgba(11, 14, 18, .55);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--moss);
}

/* ---------- 16. 工具类 ---------- */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.lime { color: var(--lime); }
.violet { color: var(--violet); }
.cyan { color: var(--cyan); }
.magenta { color: var(--magenta); }
.muted { color: #848C97; }
.nowrap { white-space: nowrap; }

/* ---------- 17. 显现动效 ---------- */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
}

.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

/* ---------- 18. 平板与窄桌面 ---------- */
@media (max-width: 1180px) {
  .status-chip { display: none; }
}

@media (max-width: 1080px) {
  .tool-btn__label { display: none; }
  .tool-btn { padding: 8px 12px; }
}

/* ---------- 19. 移动端与平板：底部命令栏 ---------- */
@media (max-width: 1024px) {
  :root {
    --rail-w: 0px;
    --bar-h: 0px;
  }

  body {
    padding-left: 0;
    padding-top: 0;
    padding-bottom: 74px;
    background-attachment: scroll;
  }

  .brand-rail { display: none; }

  #main-content { scroll-margin-top: 20px; }

  .command-bar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding: 0 14px;
    border-bottom: 0;
    border-top: 1px solid var(--rule);
    background: rgba(11, 14, 18, .95);
    box-shadow: 0 -16px 44px -22px rgba(168, 85, 247, .95);
  }

  .command-brand {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: -.04em;
    color: #0B0E12;
    background: linear-gradient(135deg, var(--violet) 0%, var(--magenta) 100%);
    box-shadow: 0 0 20px -4px rgba(255, 61, 190, .9);
  }

  .command-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 76px;
    z-index: 2;
    max-height: min(70vh, 520px);
    padding: 10px;
    overflow-y: auto;
    border: 1px solid var(--rule);
    border-radius: 20px;
    background: rgba(19, 23, 29, .97);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 26px 60px -26px rgba(0, 0, 0, .95), 0 0 0 1px rgba(168, 85, 247, .1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(.98);
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s linear;
  }

  .command-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .command-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .command-link {
    padding: 13px 14px;
    border-radius: 13px;
    font-size: 15px;
  }

  .command-link[aria-current="page"] {
    box-shadow: inset 0 0 0 1px rgba(168, 85, 247, .5), 0 0 22px -12px rgba(168, 85, 247, .9);
  }

  .nav-toggle { display: grid; }

  .command-progress {
    top: -1px;
    bottom: auto;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; }

  .footer-cols {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px 18px;
  }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .grid--2,
  .grid--3,
  .grid--6-4,
  .grid--4-6,
  .grid--7-3,
  .grid--3-7 {
    grid-template-columns: minmax(0, 1fr);
  }

  .chapter__title { font-size: clamp(23px, 7vw, 32px); }
}

/* ---------- 20. 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

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

  .btn:hover,
  .footer-link:hover {
    transform: none;
  }
}
