/* ==========================================================
   羞答答影院 · 全站共享样式 /assets/site.css
   深紫档案库 · 复古胶片感 · 非对称编辑版式
   ========================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}
* {
  margin: 0;
  padding: 0;
}
html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
body {
  min-height: 100vh;
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}
input, button, textarea, select {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: none;
  cursor: pointer;
}
ul, ol {
  list-style: none;
}
a {
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* ---------- Variables ---------- */
:root {
  --purple-deep: #2D1B4E;
  --red-dark: #5C1A2B;
  --gray-dark: #1F1F1F;
  --orange-bright: #FF6B35;
  --yellow-bright: #FFD23F;
  --blue-electric: #00E5FF;
  --green-fluoro: #39FF14;
  --pink-rose: #FF4DAB;
  --purple-light: #C792EA;
  --white: #FFFFFF;
  --gray-light: #B3B3B3;
  --gray-border: #404040;

  --font-title: Impact, "Helvetica Neue", "Arial Narrow", sans-serif;
  --font-body: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-label: Consolas, "Lucida Console", monospace;

  --container-w: 1440px;
  --header-min-h: 76px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --shadow-sm: 2px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-lg: 10px 10px 0 rgba(0, 0, 0, 0.45);
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  background-color: var(--purple-deep);
  color: var(--white);
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.12;
  color: var(--white);
  margin-bottom: 0.5em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: 0.01em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
p { margin-bottom: 1em; }
a { color: var(--blue-electric); }
strong { color: var(--yellow-bright); }
::selection {
  background: var(--blue-electric);
  color: var(--purple-deep);
}
:focus-visible {
  outline: 3px solid var(--blue-electric);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}
.container--narrow {
  max-width: 960px;
}
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }
}

#main-content {
  scroll-margin-top: 90px;
}
main,
.main-content {
  display: block;
  min-height: 60vh;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: 2000;
  padding: 10px 18px;
  background: var(--yellow-bright);
  color: var(--purple-deep);
  font-family: var(--font-label);
  font-weight: 700;
  text-decoration: none;
  border: 3px solid var(--purple-deep);
  box-shadow: var(--shadow-sm);
}
.skip-link:focus-visible {
  top: var(--space-sm);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--purple-deep);
  border-bottom: 4px solid var(--red-dark);
}
.header-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  min-height: var(--header-min-h);
  padding: 10px var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
  flex-shrink: 0;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: var(--gray-dark);
  border: 2px solid var(--blue-electric);
  color: var(--blue-electric);
  font-family: var(--font-title);
  font-size: 30px;
  line-height: 1;
  box-shadow: 4px 4px 0 rgba(0, 229, 255, 0.18);
  transform: rotate(-2deg);
  transition: transform 0.2s ease;
}
.site-brand:hover .brand-mark {
  transform: rotate(0deg) scale(1.04);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  gap: 2px;
}
.brand-cn {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.05em;
  color: var(--blue-electric);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
}
.brand-sub {
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--gray-light);
  text-transform: uppercase;
  white-space: nowrap;
}
.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--yellow-bright), var(--pink-rose), var(--blue-electric));
  z-index: 5;
  pointer-events: none;
}

/* ---------- Navigation ---------- */
.main-nav {
  display: block;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  display: inline-block;
  padding: 9px 14px;
  color: var(--white);
  font-family: var(--font-label);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}
.nav-link:hover {
  color: var(--yellow-bright);
  border-color: var(--yellow-bright);
}
.nav-link[aria-current="page"] {
  color: var(--purple-deep);
  background-color: var(--yellow-bright);
  border-color: var(--yellow-bright);
  font-weight: 700;
}

/* ---------- Nav Toggle ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  background: var(--gray-dark);
  border: 2px solid var(--blue-electric);
  flex-shrink: 0;
}
.toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--blue-electric);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(2) {
  background-color: transparent;
}
.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Search ---------- */
.site-search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  padding: 8px 14px;
  background: var(--gray-dark);
  border: 2px solid var(--gray-border);
  text-decoration: none;
  flex-shrink: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.site-search:hover,
.site-search:focus-visible {
  border-color: var(--blue-electric);
  box-shadow: 3px 3px 0 rgba(0, 229, 255, 0.25);
}
.search-icon {
  width: 14px;
  height: 14px;
  border: 2px solid var(--blue-electric);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.search-icon::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 7px;
  background: var(--blue-electric);
  right: -4px;
  bottom: -3px;
  transform: rotate(45deg);
}
.search-placeholder {
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--gray-light);
  letter-spacing: 0.03em;
}

/* ---------- Header Responsive ---------- */
@media (max-width: 1120px) {
  .nav-toggle {
    display: inline-flex;
  }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--purple-deep);
    border-bottom: 4px solid var(--red-dark);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    padding: var(--space-md);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }
  .main-nav[data-open] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .nav-link {
    display: block;
    font-size: 15px;
    padding: 12px 16px;
  }
}
@media (max-width: 760px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px var(--space-md);
  }
  .site-search {
    order: 10;
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, var(--purple-deep) 0%, #1A102E 100%);
  border-top: 4px solid var(--red-dark);
}
.site-footer::before {
  content: '';
  display: block;
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--gray-border) 0 4px, transparent 4px 8px);
}
.footer-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl) var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.footer-link {
  display: inline-block;
  padding: 6px 12px;
  color: var(--gray-light);
  font-family: var(--font-label);
  font-size: 13px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.footer-link:hover {
  color: var(--yellow-bright);
  border-color: var(--gray-border);
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.footer-logo {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue-electric);
  letter-spacing: 0.08em;
  text-decoration: none;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.6);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
}
.footer-tagline {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--gray-light);
  text-transform: uppercase;
}
.footer-legal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}
.footer-link--legal {
  font-size: 12px;
  border-bottom: 1px solid var(--gray-border);
}
.footer-link--legal:hover {
  color: var(--blue-electric);
  border-bottom-color: var(--blue-electric);
}
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--gray-light);
  line-height: 1.5;
}
.footer-copy {
  color: var(--white);
}
.footer-icp {
  letter-spacing: 0.08em;
}
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.03em;
}
.footer-sep {
  color: var(--gray-border);
}
@media (max-width: 600px) {
  .footer-inner {
    padding: var(--space-xl) var(--space-md) var(--space-lg);
  }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--font-label);
  font-size: 13px;
  margin-bottom: var(--space-xl);
}
.breadcrumb a {
  color: var(--blue-electric);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--yellow-bright);
  text-decoration: underline;
}
.breadcrumb__sep {
  color: var(--gray-light);
}
.breadcrumb [aria-current="page"] {
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  background: var(--gray-dark);
  border: 2px solid var(--gray-border);
  color: var(--white);
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.btn:hover {
  border-color: var(--blue-electric);
  color: var(--blue-electric);
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}
.btn--primary {
  background: var(--orange-bright);
  border-color: var(--orange-bright);
  color: var(--gray-dark);
}
.btn--primary:hover {
  background: var(--yellow-bright);
  border-color: var(--yellow-bright);
  color: var(--gray-dark);
}
.btn--ghost {
  background: transparent;
  border-color: var(--blue-electric);
  color: var(--blue-electric);
}
.btn--ghost:hover {
  background: rgba(0, 229, 255, 0.12);
  color: var(--blue-electric);
}

/* ---------- Section Bands ---------- */
.section-band {
  padding: var(--space-2xl) 0;
  border-top: 3px solid var(--gray-dark);
  border-bottom: 3px solid var(--gray-dark);
}
.section-band--purple {
  background-color: var(--purple-deep);
}
.section-band--red {
  background-color: var(--red-dark);
}
.section-band--dark {
  background-color: var(--gray-dark);
}
.section-band--gradient {
  background: linear-gradient(125deg, var(--purple-deep) 0%, var(--red-dark) 75%, #3D1020 100%);
}

/* ---------- Section Headings ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}
.section-index {
  font-family: var(--font-title);
  font-size: 3.6rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--yellow-bright);
  letter-spacing: 0.02em;
  user-select: none;
}
.section-kicker {
  display: block;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray-light);
  margin-bottom: 4px;
}
.section-title {
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  font-weight: 700;
  color: var(--yellow-bright);
  -webkit-text-stroke: 1px var(--blue-electric);
  text-shadow: 3px 3px 0 rgba(255, 107, 53, 0.35);
  margin-bottom: 0;
}
.section-title--orange {
  color: var(--white);
  -webkit-text-stroke: 1px var(--orange-bright);
}
.section-intro {
  color: var(--gray-light);
  max-width: 56ch;
}

/* ---------- Card Grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}
.card-grid--tight {
  gap: var(--space-md);
}

/* ---------- Entry Card ---------- */
.entry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--space-lg);
  background: var(--gray-dark);
  border: 2px solid var(--gray-border);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.entry-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue-electric);
  box-shadow: 8px 8px 0 rgba(0, 229, 255, 0.16);
}
.entry-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.entry-card__title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
  line-height: 1.2;
  text-decoration: none;
}
.entry-card__meta {
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--gray-light);
  letter-spacing: 0.04em;
}
.entry-card__desc {
  font-size: 14px;
  color: var(--gray-light);
  line-height: 1.55;
  margin: 0;
}
.entry-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

/* ---------- Corner Badge ---------- */
.corner-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  padding: 4px 10px;
  background: var(--orange-bright);
  border: 2px solid var(--purple-deep);
  color: var(--gray-dark);
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
}

/* ---------- Tile Matrix ---------- */
.tile-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
}
.category-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 120px;
  padding: var(--space-md);
  background: var(--gray-dark);
  border: 2px solid var(--gray-border);
  color: var(--white);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.35);
  border-color: var(--blue-electric);
}
.category-tile--orange:hover,
.category-tile--yellow:hover,
.category-tile--blue:hover,
.category-tile--rose:hover {
  border-color: var(--purple-deep);
}
.tile-name {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}
.tile-count {
  margin-top: auto;
  align-self: flex-end;
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--gray-light);
}
.category-tile--orange {
  background: var(--orange-bright);
  border-color: var(--orange-bright);
  color: var(--gray-dark);
}
.category-tile--orange .tile-count {
  color: var(--gray-dark);
}
.category-tile--yellow {
  background: var(--yellow-bright);
  border-color: var(--yellow-bright);
  color: var(--gray-dark);
}
.category-tile--yellow .tile-count {
  color: var(--gray-dark);
}
.category-tile--blue {
  background: var(--blue-electric);
  border-color: var(--blue-electric);
  color: var(--gray-dark);
}
.category-tile--blue .tile-count {
  color: var(--gray-dark);
}
.category-tile--rose {
  background: var(--pink-rose);
  border-color: var(--pink-rose);
  color: var(--gray-dark);
}
.category-tile--rose .tile-count {
  color: var(--gray-dark);
}
.category-tile--gray {
  background: var(--gray-dark);
  border-color: var(--gray-border);
}

/* ---------- Entry List ---------- */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.entry-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--gray-dark);
  border: 2px solid var(--gray-border);
  text-decoration: none;
  color: var(--white);
  transition: border-color 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}
.entry-row:hover {
  border-color: var(--blue-electric);
  transform: translateX(4px);
  background-color: #2A2A2A;
}
.entry-row__index {
  font-family: var(--font-title);
  font-size: 1.6rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--orange-bright);
  text-align: center;
}
.entry-row__name {
  font-weight: 700;
  font-size: 15px;
}
.entry-row__meta {
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--gray-light);
  text-align: right;
}

/* ---------- Tag Cloud ---------- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 2px solid var(--gray-border);
  color: var(--white);
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}
.tag-chip:hover {
  border-color: var(--orange-bright);
  color: var(--orange-bright);
  transform: translateY(-2px);
}
.tag-chip--sm { font-size: 11px; padding: 4px 8px; }
.tag-chip--lg { font-size: 14px; padding: 8px 16px; }
.tag-chip--xl { font-size: 17px; padding: 10px 20px; border-width: 3px; }
.tag-chip--orange { background: var(--orange-bright); border-color: var(--orange-bright); color: var(--gray-dark); font-weight: 700; }
.tag-chip--yellow { background: var(--yellow-bright); border-color: var(--yellow-bright); color: var(--gray-dark); font-weight: 700; }
.tag-chip--blue { background: var(--blue-electric); border-color: var(--blue-electric); color: var(--gray-dark); font-weight: 700; }
.tag-chip--rose { background: var(--pink-rose); border-color: var(--pink-rose); color: var(--gray-dark); font-weight: 700; }
.tag-chip--ghost { background: transparent; border-color: var(--gray-light); color: var(--gray-light); }

/* ---------- Status Badge ---------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border: 1px solid currentColor;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status-badge--new { color: var(--green-fluoro); }
.status-badge--hot { color: var(--pink-rose); }
.status-badge--done { color: var(--purple-light); }
.status-badge--pause { color: var(--gray-light); }

/* ---------- Seq Number ---------- */
.seq-num {
  display: inline-block;
  min-width: 1.6em;
  font-family: var(--font-title);
  font-size: 2.6rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--yellow-bright);
  letter-spacing: 0.03em;
  user-select: none;
}

/* ---------- Metric Bar ---------- */
.metric-bar {
  display: grid;
  grid-template-columns: 88px 1fr 48px;
  align-items: center;
  gap: 10px;
}
.metric-label {
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metric-track {
  height: 8px;
  background: var(--gray-border);
  overflow: hidden;
}
.metric-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue-electric), var(--orange-bright));
  transition: width 0.4s ease;
}
.metric-value {
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--yellow-bright);
  text-align: right;
}

/* ---------- Rank List ---------- */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rank-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  grid-template-areas:
    "num name val"
    "num bar bar";
  align-items: center;
  gap: 2px 14px;
  padding: 12px 16px;
  background: var(--gray-dark);
  border: 2px solid var(--gray-border);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.rank-item:hover {
  border-color: var(--pink-rose);
  transform: translateX(4px);
}
.rank-num {
  grid-area: num;
  font-family: var(--font-title);
  font-size: 2rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--pink-rose);
  text-align: center;
}
.rank-name {
  grid-area: name;
  font-weight: 700;
  font-size: 15px;
}
.rank-val {
  grid-area: val;
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--gray-light);
}
.rank-bar {
  grid-area: bar;
  height: 6px;
  background: var(--gray-border);
  overflow: hidden;
}
.rank-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--pink-rose), var(--orange-bright));
}

/* ---------- Index Strip ---------- */
.index-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.index-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 8px 6px;
  background: var(--gray-dark);
  border: 2px solid var(--gray-border);
  color: var(--white);
  font-family: var(--font-label);
  font-size: 13px;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.index-cell:hover {
  border-color: var(--blue-electric);
  color: var(--blue-electric);
}
.index-cell--active {
  background: var(--yellow-bright);
  border-color: var(--yellow-bright);
  color: var(--purple-deep);
  font-weight: 700;
}

/* ---------- Rail ---------- */
.rail {
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar {
  height: 8px;
}
.rail::-webkit-scrollbar-thumb {
  background: var(--gray-border);
}
.rail::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}
.rail-track {
  display: flex;
  gap: var(--space-md);
  min-width: max-content;
  padding: 2px;
}
.rail-track > * {
  width: 300px;
  max-width: 86vw;
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* ---------- Table ---------- */
.table-wrap {
  overflow-x: auto;
  border: 2px solid var(--gray-border);
  background: var(--gray-dark);
}
.spec-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 14px;
}
.spec-table th,
.spec-table td {
  padding: 12px 16px;
  border: 1px solid var(--gray-border);
  text-align: left;
  vertical-align: top;
}
.spec-table thead th {
  background: #2A2A2A;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow-bright);
}
.spec-table tbody tr:hover {
  background: rgba(0, 229, 255, 0.07);
}
.spec-highlight {
  color: var(--blue-electric);
  font-family: var(--font-label);
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 28px;
  list-style: none;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--gray-border);
}
.timeline-node {
  position: relative;
  margin-bottom: var(--space-lg);
}
.timeline-node::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 4px;
  width: 10px;
  height: 10px;
  background: var(--purple-deep);
  border: 3px solid var(--orange-bright);
  border-radius: 50%;
  transition: background-color 0.2s ease;
}
.timeline-node[data-open]::before {
  background: var(--orange-bright);
}
button.timeline-node__head {
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}
.timeline-node__head {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.timeline-node__date {
  font-family: var(--font-label);
  font-size: 13px;
  color: var(--yellow-bright);
  letter-spacing: 0.04em;
}
.timeline-node__meta {
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--gray-light);
}
.timeline-node__detail {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.35s ease, visibility 0s linear 0.35s;
}
.timeline-node__detail > * {
  overflow: hidden;
  min-height: 0;
}
.timeline-node__detail > * > * {
  margin-top: var(--space-md);
}
.timeline-node[data-open] .timeline-node__detail {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.35s ease, visibility 0s;
}

/* ---------- Batch Group ---------- */
.batch-group {
  background: rgba(31, 31, 31, 0.4);
  border: 2px solid var(--gray-border);
}
.batch-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--gray-dark);
  border-bottom: 2px solid var(--gray-border);
}
.batch-badge {
  padding: 4px 10px;
  background: var(--yellow-bright);
  border: 1px solid var(--gray-dark);
  color: var(--gray-dark);
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.batch-badge--red {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--white);
}
.batch-badge--blue {
  background: var(--blue-electric);
  border-color: var(--blue-electric);
  color: var(--gray-dark);
}
.batch-title {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
}
.batch-count {
  margin-left: auto;
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--gray-light);
}
.batch-body {
  padding: var(--space-md);
}

/* ---------- Tabs ---------- */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 3px solid var(--gray-border);
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  margin-bottom: -3px;
  background: var(--gray-dark);
  border: 2px solid var(--gray-border);
  border-bottom: none;
  color: var(--gray-light);
  font-family: var(--font-label);
  font-size: 13px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.tab-btn + .tab-btn {
  margin-left: 4px;
}
.tab-btn:hover {
  color: var(--yellow-bright);
  border-color: var(--blue-electric);
}
.tab-btn[aria-selected="true"] {
  background: var(--yellow-bright);
  border-color: var(--yellow-bright);
  color: var(--purple-deep);
  font-weight: 700;
}
.tab-panel {
  padding: var(--space-lg) 0;
}
.tab-panel[hidden] {
  display: none;
}

/* ---------- Image Placeholder ---------- */
.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 4px),
    linear-gradient(135deg, rgba(255, 107, 53, 0.10), rgba(0, 229, 255, 0.06)),
    var(--gray-dark);
  border: 2px dashed var(--gray-border);
  color: var(--gray-light);
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ph::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}
.ph:hover::after {
  left: 120%;
}
.ph--16x9 { aspect-ratio: 16 / 9; }
.ph--4x3 { aspect-ratio: 4 / 3; }
.ph--1x1 { aspect-ratio: 1 / 1; }
.ph--poster { aspect-ratio: 3 / 4; }

/* ---------- Video Frame ---------- */
.video-frame {
  position: relative;
  background: var(--gray-dark);
  border: 3px solid var(--gray-border);
  box-shadow: var(--shadow-lg);
}
.video-frame::before {
  content: '';
  display: block;
  aspect-ratio: 16 / 9;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 4px),
    linear-gradient(135deg, var(--purple-deep), #111111);
}
.video-frame__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--gray-light);
  border-top: 2px solid var(--gray-border);
}

/* ---------- Art Caption ---------- */
.art-caption {
  padding: 10px 14px;
  background: var(--gray-dark);
  border-left: 3px solid var(--orange-bright);
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--gray-light);
  letter-spacing: 0.04em;
  line-height: 1.6;
}

/* ---------- Side Rail ---------- */
.side-rail {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: rgba(31, 31, 31, 0.72);
  border: 2px solid var(--gray-border);
}
.side-rail a {
  display: block;
  padding: 8px 12px;
  color: var(--gray-light);
  font-family: var(--font-label);
  font-size: 13px;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}
.side-rail a:hover {
  color: var(--yellow-bright);
  border-left-color: var(--yellow-bright);
}
.side-rail a[aria-current="true"],
.side-rail a[aria-current="page"] {
  color: var(--blue-electric);
  border-left-color: var(--blue-electric);
  background: rgba(0, 229, 255, 0.08);
}

/* ---------- Editorial Split ---------- */
.editorial-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--space-xl);
  align-items: start;
}
.aside-note {
  font-family: var(--font-label);
  font-size: 13px;
  color: var(--gray-light);
  line-height: 1.7;
  padding-left: 12px;
  border-left: 3px solid var(--orange-bright);
}
.split-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: var(--space-xl);
  align-items: center;
}
@media (max-width: 900px) {
  .editorial-grid,
  .split-screen {
    grid-template-columns: 1fr;
  }
}

/* ---------- Helpers ---------- */
.text-display {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: 0.03em;
}
.mono {
  font-family: var(--font-label);
}
.text-light {
  color: var(--gray-light);
}
.text-blue {
  color: var(--blue-electric);
}
.text-yellow {
  color: var(--yellow-bright);
}
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mt-lg { margin-top: var(--space-lg); }
