/* ==========================================================================
   星力电玩牌局 · /assets/site.css
   共享外壳：reset / tokens / 侧边轨道页头 / 页脚 / 通用组件
   ========================================================================== */

/* ---------- 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 { margin: 0; }

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

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

a { color: inherit; }

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

/* ---------- 2. Tokens ---------- */
:root {
  --ink:        #071C16;
  --felt:       #0C3025;
  --neon:       #4DF5D3;
  --mist:       #B8FFEF;
  --amber:      #F4B94F;
  --paper:      #F3E8D2;
  --ember:      #D95C3B;
  --mint:       #8BAEA3;
  --brown:      #1B110B;

  --line:      rgba(184, 255, 239, 0.16);
  --line-soft: rgba(184, 255, 239, 0.08);
  --line-dark: rgba(27, 17, 11, 0.18);

  --font-display: "Barlow Condensed", "Oswald", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body:    "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif:   "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-mono:    "IBM Plex Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --rail-w: 208px;
  --topbar-h: 62px;
  --shell: 1160px;
  --measure: 40em;
  --pad-x: clamp(1.15rem, 4vw, 3.25rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  padding-top: var(--topbar-h);
  background-color: var(--ink);
  background-image:
    radial-gradient(circle at 84% 6%, rgba(77, 245, 211, 0.07), transparent 44%),
    radial-gradient(circle at 6% 94%, rgba(244, 185, 79, 0.05), transparent 46%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.005em;
  color: var(--mist);
}

h1 { font-size: clamp(2.8rem, 1.5rem + 5.6vw, 6rem); }
h2 { font-size: clamp(1.7rem, 1.25rem + 1.9vw, 2.7rem); }
h3 { font-size: clamp(1.15rem, 1.02rem + 0.6vw, 1.4rem); letter-spacing: 0.01em; }
h4 { font-size: 1.02rem; letter-spacing: 0.04em; }

p { line-height: 1.78; }

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

.mono {
  font-family: var(--font-mono);
  font-size: 0.82em;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mint);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--amber);
}

/* ---------- 4. 焦点与动效降级 ---------- */
:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
}

.btn:focus-visible,
.tag:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -4px;
}

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

/* ==========================================================================
   5. 页头
   ========================================================================== */
.site-header {
  position: relative;
  z-index: 110;
}

/* --- skip link --- */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  padding: 12px 20px;
  background: var(--neon);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  transform: translateY(-130%);
  transition: transform 0.18s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: -4px;
}

/* --- 滚动进度 --- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 130;
  pointer-events: none;
  background: rgba(184, 255, 239, 0.06);
}

.progress-bar__fill {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--neon) 0%, var(--neon) 62%, var(--amber) 100%);
  box-shadow: 0 0 12px rgba(77, 245, 211, 0.45);
}

.progress-bar[data-active] .progress-bar__fill {
  box-shadow: 0 0 16px rgba(77, 245, 211, 0.6);
}

/* --- 移动顶栏 --- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 clamp(0.9rem, 4vw, 1.5rem);
  background: rgba(7, 28, 22, 0.94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--paper);
  min-width: 0;
}

.brand__mark {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--neon);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  line-height: 1;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand__tagline {
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.16em;
  color: var(--mint);
  white-space: nowrap;
}

/* --- 汉堡按钮 --- */
.nav-toggle {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-content: center;
  gap: 5px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(77, 245, 211, 0.38);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.nav-toggle:hover {
  background: rgba(77, 245, 211, 0.1);
  border-color: var(--neon);
}

.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--neon);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) 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(-7px) rotate(-45deg); }

/* --- 轨道 / 抽屉（移动端默认形态） --- */
.rail {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  z-index: 115;
  max-height: calc(100dvh - var(--topbar-h));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  padding: 16px clamp(0.9rem, 4vw, 1.5rem) 26px;
  background: var(--felt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

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

.rail__head { margin-bottom: 14px; }

.rail__brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--paper);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.rail__brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--neon);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 19px;
  line-height: 1;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

.rail__brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.rail__brand-tag {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mint);
}

.rail__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail__item { margin: 0; }

.rail__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px 12px 12px;
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.35;
  border-left: 2px solid transparent;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.rail__num {
  flex: none;
  color: var(--mint);
  font-size: 11px;
  letter-spacing: 0.1em;
  transition: color 0.18s var(--ease);
}

.rail__label { min-width: 0; }

.rail__link:hover {
  background: rgba(77, 245, 211, 0.08);
  color: var(--mist);
  border-left-color: rgba(77, 245, 211, 0.5);
  transform: translateX(2px);
}

.rail__link:hover .rail__num { color: var(--amber); }

.rail__link[aria-current="page"] {
  background: rgba(77, 245, 211, 0.11);
  color: var(--neon);
  border-left-color: var(--neon);
}

.rail__link[aria-current="page"] .rail__num { color: var(--amber); }

.rail__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--amber);
  transform: translateY(-50%) rotate(45deg);
}

.rail__foot {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.rail__cta { width: 100%; }

.rail__note {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.55;
  letter-spacing: 0.1em;
  color: var(--mint);
  font-family: var(--font-mono);
}

/* --- 遮罩 --- */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 112;
  display: none;
  background: rgba(4, 15, 12, 0.72);
  border: 0;
}

.site-header[data-nav-open] .nav-scrim { display: block; }

body.is-nav-open { overflow: hidden; }

/* --- 桌面端：侧边轨道 --- */
@media (min-width: 860px) {
  body {
    padding-top: 0;
    padding-left: var(--rail-w);
  }

  .topbar { display: none; }
  .nav-scrim { display: none !important; }
  body.is-nav-open { overflow: visible; }

  .progress-bar { left: var(--rail-w); }

  .rail {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: auto;
    width: var(--rail-w);
    max-height: none;
    padding: 26px 16px 22px;
    gap: 0;
    overflow-y: auto;
    background: linear-gradient(180deg, #081F19 0%, #0A2A20 58%, #071C16 100%);
    border-top: 0;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: none;
  }

  .rail__brand-name { font-size: 19px; }
  .rail__brand-tag { font-size: 10px; letter-spacing: 0.1em; }

  .rail__link {
    font-size: 14.5px;
    padding: 9px 10px 9px 11px;
    gap: 9px;
  }

  .rail__link[aria-current="page"]::after {
    right: 9px;
    width: 5px;
    height: 5px;
  }

  .rail__foot { margin-top: auto; }
  .rail__cta { font-size: 12px; padding: 10px 12px; }
}

@media (min-width: 860px) and (max-width: 1099px) {
  :root { --rail-w: 182px; }
  .rail { padding: 22px 13px 20px; }
  .rail__link { font-size: 14px; }
}

/* ==========================================================================
   6. 页脚
   ========================================================================== */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 8vw, 6rem);
  padding-top: clamp(2.2rem, 5vw, 3.6rem);
  background-color: var(--ink);
  background-image:
    radial-gradient(circle at 88% 10%, rgba(77, 245, 211, 0.09), transparent 40%),
    linear-gradient(180deg, #0A2A20 0%, #071C16 68%);
  background-repeat: no-repeat;
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(340px, 46%);
  height: 3px;
  background: linear-gradient(90deg, var(--neon) 0%, var(--amber) 100%);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.6rem, 4vw, 3rem);
  padding-bottom: clamp(1.8rem, 4vw, 2.8rem);
}

.footer__brand { min-width: 0; }

.footer__brand-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--paper);
}

.footer__brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--neon);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 21px;
  line-height: 1;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

.footer__brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.footer__summary {
  margin-top: 1rem;
  max-width: 36ch;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--mint);
}

.footer__contact {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__contact-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--paper);
}

.footer__contact-key {
  flex: none;
  min-width: 3.2em;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--amber);
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: clamp(1.1rem, 3vw, 2rem);
  align-content: start;
}

.footer__col-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
}

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__link {
  display: inline-block;
  padding-block: 2px;
  color: var(--paper);
  font-size: 14.5px;
  line-height: 1.6;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.footer__link:hover {
  color: var(--neon);
  border-bottom-color: var(--neon);
}

.footer__link[aria-current="page"] {
  color: var(--neon);
  border-bottom-color: rgba(77, 245, 211, 0.5);
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 1.6rem;
  padding-block: 1.1rem 1.6rem;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.7;
  color: var(--mint);
}

.footer__meta p { margin: 0; max-width: none; }

.footer__icp { color: var(--mist); letter-spacing: 0.08em; }

.footer__note { flex: 1 1 260px; color: var(--mint); }

.footer__year { color: var(--mint); white-space: nowrap; }

@media (min-width: 860px) {
  .footer__grid {
    grid-template-columns: minmax(250px, 0.92fr) minmax(0, 1.5fr);
    align-items: start;
  }
}

@media (max-width: 480px) {
  .footer__note { flex-basis: 100%; }
}

/* ==========================================================================
   7. 通用组件
   ========================================================================== */

/* --- 布局 --- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section {
  position: relative;
  padding-block: clamp(2.4rem, 6vw, 5rem);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 1.5rem;
  margin-bottom: clamp(1.2rem, 3vw, 2.2rem);
}

.section-title { margin: 0; }

.section-lede {
  max-width: 42ch;
  font-size: 15px;
  line-height: 1.75;
  color: var(--mint);
}

.grid {
  display: grid;
  gap: clamp(1rem, 2.2vw, 1.7rem);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

.divider {
  height: 1px;
  border: 0;
  margin-block: clamp(1.4rem, 4vw, 2.8rem);
  background: linear-gradient(90deg, var(--amber) 0%, rgba(244, 185, 79, 0) 72%);
}

/* --- 按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn--primary {
  background: var(--neon);
  color: var(--ink);
  font-weight: 700;
}

.btn--primary:hover {
  background: var(--mist);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--neon);
  border-color: rgba(77, 245, 211, 0.45);
}

.btn--ghost:hover {
  background: rgba(77, 245, 211, 0.12);
  border-color: var(--neon);
  transform: translateY(-2px);
}

.btn--amber {
  background: var(--amber);
  color: var(--brown);
  font-weight: 700;
}

.btn--amber:hover {
  background: #FFD07A;
  transform: translateY(-2px);
}

/* --- 面板 --- */
.panel {
  position: relative;
  padding: clamp(1.05rem, 2.4vw, 1.85rem);
  background: var(--felt);
  border: 1px solid var(--line);
  color: var(--paper);
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease),
              box-shadow 0.18s var(--ease);
}

.panel--felt { background: var(--felt); }

.panel--paper {
  background: var(--paper);
  border-color: var(--line-dark);
  color: var(--brown);
}

.panel--paper h2,
.panel--paper h3,
.panel--paper h4 { color: var(--brown); }

.panel--paper a { color: #A0431F; }

.panel--paper .section-lede,
.panel--paper .eyebrow { color: #6C5847; }

.panel--cut {
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

.panel--link { display: block; text-decoration: none; }

.panel--link:hover,
.panel--link:focus-visible {
  transform: translateY(-2px);
  border-color: var(--neon);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

/* --- 标签 --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--mist);
  background: rgba(77, 245, 211, 0.1);
  border: 1px solid rgba(77, 245, 211, 0.34);
  border-radius: 2px;
}

.tag--amber {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--brown);
}

.tag--ember {
  background: var(--ember);
  border-color: var(--ember);
  color: var(--paper);
}

/* --- 面包屑 --- */
.breadcrumb { padding-block: 1.1rem 0.35rem; }

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mint);
}

.breadcrumb__list > li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: rgba(139, 174, 163, 0.55);
}

.breadcrumb__link {
  color: var(--mint);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.breadcrumb__link:hover {
  color: var(--neon);
  border-bottom-color: var(--neon);
}

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

/* --- 长文阅读区 --- */
.reading {
  background: var(--paper);
  color: var(--brown);
  padding: clamp(1.3rem, 3.6vw, 3rem);
  border: 1px solid var(--line-dark);
}

.reading > * + * { margin-top: 1.05em; }

.reading p,
.reading li {
  max-width: var(--measure);
  font-size: 17px;
  line-height: 1.85;
  color: var(--brown);
}

.reading h2 {
  margin-top: 1.8em;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  color: var(--brown);
}

.reading h3 {
  margin-top: 1.4em;
  color: var(--brown);
}

.reading a {
  color: #A0431F;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reading strong { color: var(--brown); }

.reading ul { list-style: square; padding-left: 1.2em; margin-block: 1em; }
.reading ol { list-style: decimal; padding-left: 1.4em; margin-block: 1em; }
.reading li + li { margin-top: 0.4em; }

.reading blockquote {
  border-left: 3px solid var(--ember);
  padding-left: 1rem;
  font-family: var(--font-serif);
  font-size: 1.02em;
  color: #4A3325;
}

/* --- 图片容器基础规则 --- */
.media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--felt);
  border: 1px solid var(--line);
}

.media__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: var(--mint);
  font-size: 12px;
}

.media__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: var(--mist);
  background: linear-gradient(180deg, rgba(7, 28, 22, 0) 0%, rgba(7, 28, 22, 0.88) 100%);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(150deg, rgba(77, 245, 211, 0.14) 0%, transparent 44%, rgba(7, 28, 22, 0.55) 100%);
}

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

.media--cut {
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
}

/* --- 跳转目标 --- */
#main-content { scroll-margin-top: calc(var(--topbar-h) + 14px); }

@media (min-width: 860px) {
  #main-content { scroll-margin-top: 14px; }
}
