/* ==========================================================================
   LZUM1GUCE // V7 BORDERLESS FULL-BLEED HDR KNOCKOUT STENCIL STAGE
   Layer 0 (Fixed z:1): Full-Bleed Vivid HDR Gradient + Thick Laser Beams + Sine Orb
   Layer 1 (Fixed z:2): Full-Page Backdrop-Mapped Knockout FX (.global-stencil-fx-canvas)
   Layer 2 (Stage z:2..3): Per-Chapter Accessory/Heterochromia HDR Field & Stencil FX
   Layer 3 (Stage z:4): Borderless Centered Physically Punched-Out Marble Sculpture
   Layer 4 (Stage z:8..12): Weightless Floating Glass Work Plaques + Minimal Edge HUD
   Zero horizontal dividers, zero dark veil bars, generous seamless breath between chapters
   ========================================================================== */

:root {
  --font-display: 'Oswald', 'DIN Condensed', 'Bahnschrift', sans-serif;
  --font-serif: 'Instrument Serif', 'Noto Serif SC', 'Songti SC', Georgia, serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Mono', 'Consolas', monospace;

  --void: #050507;
  --panel: rgba(9, 9, 13, 0.80);
  --ink: #DCD7CD;
  --ink-bright: #F5F2EB;
  --ink-muted: #8C8983;
  --hairline: rgba(220, 215, 205, 0.12);
  --hairline-strong: rgba(220, 215, 205, 0.26);

  --glow: #FF5A24;
  --glow-hi: #FFA259;
  --glow-rgb: 255, 90, 36;

  --nav-h: 62px;
  --max-w: 1320px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Optical shadows keeping pure-white editorial type crisp over high-luminance HDR gradients */
  --hud-shadow: 0 1px 3px rgba(6, 4, 14, 0.56), 0 4px 20px rgba(6, 4, 14, 0.44);
  --hud-shadow-strong: 0 2px 6px rgba(6, 4, 14, 0.58), 0 8px 30px rgba(6, 4, 14, 0.44);
}

/* Vivid Per-Realm Tokens (Subpages & Active State) */
[data-realm="claude"]   { --glow: #FF5A24; --glow-hi: #FFA259; --glow-rgb: 255, 90, 36; }
[data-realm="gpt"]      { --glow: #9054FF; --glow-hi: #C8A6FF; --glow-rgb: 144, 84, 255; }
[data-realm="grok"]     { --glow: #FFB21C; --glow-hi: #FFE082; --glow-rgb: 255, 178, 28; }
[data-realm="gemini"]   { --glow: #E240FA; --glow-hi: #F69EFF; --glow-rgb: 226, 64, 250; }
[data-realm="glm"]      { --glow: #00D2FF; --glow-hi: #7EEBFF; --glow-rgb: 0, 210, 255; }
[data-realm="kimi"]     { --glow: #FFD65C; --glow-hi: #FFF0B3; --glow-rgb: 255, 214, 92; }
[data-realm="qwen"]     { --glow: #4C76FF; --glow-hi: #9DB6FF; --glow-rgb: 76, 118, 255; }
[data-realm="deepseek"] { --glow: #00A6FF; --glow-hi: #78E8FF; --glow-rgb: 0, 166, 255; }

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background: var(--void);
  color: var(--ink);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body { margin: 0; font-family: var(--font-body); background: var(--void); color: var(--ink); line-height: 1.7; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, video, canvas, svg { display: block; max-width: 100%; }
:focus-visible { outline: 1.5px solid var(--glow-hi); outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Global Full-Viewport HDR Backdrop & Full-Page Seamless Knockout / Mural FX Canvases */
.void-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  pointer-events: none;
  z-index: 1;
}
.global-stencil-fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  pointer-events: none;
  z-index: 2;
}
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 95;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   MINIMAL TOP BAR (Translucent HDR Glass — Zero Heavy Bar Artifacts)
   ========================================================================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 70;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(20px, 3.6vw, 52px);
  color: #FFFFFF;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  text-shadow: var(--hud-shadow);
}
.site-nav.is-pinned {
  background: rgba(10, 8, 18, 0.38);
  border-bottom-color: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
}
.nav-left { display: flex; align-items: center; gap: 14px; }
.brand-mark { display: inline-flex; align-items: center; height: 24px; }
.brand-mark img { height: 20px; width: auto; object-fit: contain; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45)); }
.nav-center {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}
.nav-center b {
  color: #FFFFFF;
  font-weight: 600;
  text-shadow: 0 0 14px rgba(var(--glow-rgb), 0.7), var(--hud-shadow);
}
.nav-right { display: flex; align-items: center; justify-content: flex-end; gap: clamp(14px, 1.8vw, 24px); }
.nav-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
  transition: color 0.18s, text-shadow 0.18s;
}
.nav-link:hover, .nav-link.is-active {
  color: #FFFFFF;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.55), var(--hud-shadow);
}
.nav-cmd-btn {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(12, 10, 20, 0.42);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  color: #FFFFFF;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 16px rgba(0, 0, 0, 0.22);
  transition: background 0.16s, color 0.16s, border-color 0.16s, box-shadow 0.2s;
}
.nav-cmd-btn:hover {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: #09080E;
  text-shadow: none;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.45);
}
.nav-cmd-btn kbd { font-family: var(--font-mono); font-size: 9.5px; opacity: 0.78; }

/* Minimal Top-Bar Audio Soundscape Toggle (Muted by Default) */
.nav-sound-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  min-width: 34px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(12, 10, 20, 0.42);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.20), 0 4px 14px rgba(0, 0, 0, 0.22);
  transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.22s;
}
.nav-sound-btn:hover {
  border-color: rgba(255, 255, 255, 0.78);
  color: #FFFFFF;
  background: rgba(20, 16, 34, 0.68);
}
.nav-sound-btn.is-on,
.nav-sound-btn[aria-pressed="true"] {
  border-color: var(--glow-hi);
  color: #FFFFFF;
  background: rgba(var(--glow-rgb), 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 18px rgba(var(--glow-rgb), 0.55);
}

/* H-Key Pure Exhibition Immersion Mode */
.site-nav,
.chapter-rail {
  transition: opacity 0.45s var(--ease-out), background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
body.is-gallery-pure .site-nav,
body.is-gallery-pure .chapter-rail,
body.is-gallery-pure .codename-seal {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Right-Edge Minimal 01–08 Chapter Rail */
.chapter-rail {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 11px;
  padding: 12px 9px 12px 0;
}
/* V10.12.1 纤细垂直深墨半透胶囊底槽：精准包裹右侧 8 条进度标尺，亮白铜版翼板上 100% 锐利可辨且不随左侧标签撑宽 */
.chapter-rail::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 38px;
  background: rgba(8, 7, 13, 0.64);
  border: 1px solid rgba(239, 235, 226, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.44);
  pointer-events: none;
  z-index: -1;
}
.rail-node {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(249, 246, 238, 0.86);
  opacity: 0.90;
  transition: opacity 0.2s, color 0.2s;
  text-shadow: var(--hud-shadow);
}
.rail-node span {
  display: none;
  align-items: center;
  background: rgba(9, 8, 14, 0.88);
  border: 1px solid rgba(239, 235, 226, 0.30);
  padding: 3px 10px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.52);
  color: #F9F6EE;
  line-height: 1.2;
}
.rail-node i {
  display: block;
  width: 14px;
  height: 2px;
  margin-right: 3px;
  border-radius: 2px;
  background: rgba(249, 246, 238, 0.82);
  box-shadow: 0 0 0 1px rgba(8, 7, 13, 0.78), 0 1px 4px rgba(0, 0, 0, 0.55);
  transition: width 0.25s var(--ease-out), background 0.25s, box-shadow 0.25s;
}
.rail-node:hover, .rail-node.is-active { opacity: 1; color: #FFFFFF; }
.rail-node:hover span, .rail-node.is-active span { display: inline-flex; }
.rail-node.is-active i {
  width: 22px;
  height: 2.5px;
  margin-right: 0;
  background: #FFFFFF;
  box-shadow: 0 0 0 1px rgba(8, 7, 13, 0.84), 0 0 10px rgba(255, 255, 255, 0.92), 0 0 18px rgba(var(--glow-rgb), 0.78);
}

/* ==========================================================================
   V7 BORDERLESS NATIVE FULL-BLEED HDR SCULPTURE STAGE
   Zero borders, zero dark boxes, zero veil bands, bold unattenuated alpha,
   generous 42svh seamless mural-corridor breath between consecutive sculptures
   ========================================================================== */
.page-shell { position: relative; z-index: 3; }

/* Generous seamless mural corridor spacing (100svh stage + 42svh mural breath = 142svh pitch) */
.page-shell--home {
  display: flex;
  flex-direction: column;
  gap: 42svh;
  padding-bottom: 12svh;
}

.chapter-page {
  position: relative;
  min-height: 100svh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  contain: layout style;
}

.chapter-page--stencil {
  min-height: 100svh;
  border: 0;
  background: transparent;
  overflow: visible;
}

/* Completely borderless full-viewport native stage (overflow: visible eliminates any horizontal clip seams!) */
.stencil-frame {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: none;
  height: 100svh;
  min-height: 680px;
  border: 0;
  background: transparent;
  overflow: visible;
  box-shadow: none;
}

/* STAGE LAYER 1: ACCESSORY / HETEROCHROMIA HDR COLOR FIELD & EDGE PETRIFICATION */
.underlayer-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  z-index: 2;
  pointer-events: none;
}

/* STAGE LAYER 2: PER-CHAPTER BACKDROP-MAPPED KNOCKOUT FX CANVAS (Above underlayer, below sculpture) */
.stencil-fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  z-index: 3;
  pointer-events: none;
}

/* STAGE LAYER 3: NATIVE BORDERLESS CENTERED MARBLE KNOCKOUT SCULPTURE (Full bold opacity, zero washout) */
.stencil-parallax-wrap {
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 1;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
}
/* V10.12.1 精准抬升靴底/脚尖安全留白（保持 06 KIMI 100% 原样 0 改动）：
   让 01 CLAUDE 右军靴与 02/04/05/07 鞋底稳落安静主石板内，距 17px 石刻立面上缘留出 10-16px 优雅余白且顶部火炬 0 截断 */
.chapter-page[data-chapter="claude"] .stencil-parallax-wrap {
  padding-top: 0;
  padding-bottom: 26px;
}
.chapter-page[data-chapter="gpt"] .stencil-parallax-wrap,
.chapter-page[data-chapter="gemini"] .stencil-parallax-wrap,
.chapter-page[data-chapter="glm"] .stencil-parallax-wrap {
  padding-top: 6px;
  padding-bottom: 14px;
}
.chapter-page[data-chapter="qwen"] .stencil-parallax-wrap {
  padding-top: 10px;
  padding-bottom: 6px;
}
.stencil-plate {
  height: min(92svh, 900px);
  width: auto;
  max-width: 88vw;
  opacity: 1;
  object-fit: contain;
  object-position: center center;
  transition: filter 0.12s linear;
  backface-visibility: hidden;
}
.stencil-plate--color {
  position: absolute;
  height: 82%;
  width: auto;
  max-width: 60%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.stencil-frame[data-view="color"] .stencil-plate--stencil { opacity: 0.14; }
.stencil-frame[data-view="color"] .stencil-plate--color { opacity: 1; }

/* Removed dark bottom veil bar in V7 to eliminate visible horizontal band seams between characters */
.stencil-bottom-veil { display: none; }

/* ==========================================================================
   STAGE LAYER 4: WEIGHTLESS FLOATING HDR GLASS WORK PLAQUES (.orbit-card)
   Origin locked at stage center (top: 50%; left: 50%) for seamless JS / fallback positioning
   ========================================================================== */
.orbit-stage {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

/* Optional breathing fallback if an SVG ring is ever dynamically mounted */
.orbit-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.08;
}

.orbit-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(190px, 14.8vw, 224px);
  padding: 13px 15px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  outline: 0.5px solid rgba(255, 255, 255, 0.12);
  outline-offset: -1px;
  background: linear-gradient(
    148deg,
    rgba(16, 13, 28, 0.74) 0%,
    rgba(8, 7, 16, 0.86) 100%
  );
  backdrop-filter: blur(20px) saturate(1.55);
  -webkit-backdrop-filter: blur(20px) saturate(1.55);
  color: #FFFFFF;
  text-align: left;
  pointer-events: auto;
  overflow: hidden;
  backface-visibility: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    inset 0 -1px 0 rgba(var(--ch-rgb, var(--glow-rgb)), 0.34),
    inset 0 0 22px rgba(var(--ch-rgb, var(--glow-rgb)), 0.14),
    0 14px 36px rgba(4, 3, 12, 0.38),
    0 0 24px rgba(var(--ch-rgb, var(--glow-rgb)), 0.28);
  transition: border-color 0.20s var(--ease-out), background 0.20s var(--ease-out), box-shadow 0.22s var(--ease-out);
}

/* Top & bottom laser-refraction prism glint on cards embedded inside rotating laser beams */
.orbit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1.5px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.86) 28%,
    var(--ch-hi, var(--glow-hi)) 50%,
    rgba(255, 255, 255, 0.86) 72%,
    transparent 100%
  );
  opacity: 0.84;
  pointer-events: none;
  transition: opacity 0.20s;
}

/* Subtle corner optical index pip */
.orbit-card::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ch-hi, var(--glow-hi));
  box-shadow: 0 0 12px rgba(var(--ch-rgb, var(--glow-rgb)), 0.95);
  opacity: 0.88;
  pointer-events: none;
}

/* Graceful 4-quadrant fallback positions (used under prefers-reduced-motion or pre-JS paint; JS inline transform overrides) */
.orbit-card[data-float-slot="0"] { transform: translate3d(calc(-50% - clamp(260px, 28vw, 430px)), calc(-50% - clamp(95px, 14vh, 145px)), 0); }
.orbit-card[data-float-slot="1"] { transform: translate3d(calc(-50% - clamp(275px, 30vw, 455px)), calc(-50% + clamp(75px, 11vh, 125px)), 0); }
.orbit-card[data-float-slot="2"] { transform: translate3d(calc(-50% + clamp(260px, 28vw, 430px)), calc(-50% - clamp(95px, 14vh, 145px)), 0); }
.orbit-card[data-float-slot="3"] { transform: translate3d(calc(-50% + clamp(275px, 30vw, 455px)), calc(-50% + clamp(75px, 11vh, 125px)), 0); }

.orbit-card:hover,
.orbit-card:focus-visible,
.orbit-card.is-locked,
.orbit-card.is-laser-focus {
  border-color: rgba(255, 255, 255, 0.84);
  background: linear-gradient(
    148deg,
    rgba(22, 18, 38, 0.88) 0%,
    rgba(10, 8, 20, 0.94) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    inset 0 -1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 22px rgba(var(--ch-rgb, var(--glow-rgb)), 0.22),
    0 20px 48px rgba(0, 0, 0, 0.46),
    0 0 26px rgba(var(--ch-rgb, var(--glow-rgb)), 0.46),
    0 0 42px rgba(255, 255, 255, 0.12);
  z-index: 30 !important;
}
.orbit-card:hover::before,
.orbit-card:focus-visible::before,
.orbit-card.is-locked::before,
.orbit-card.is-laser-focus::before { opacity: 1; }

.orbit-card--primary {
  border-color: rgba(var(--ch-rgb, var(--glow-rgb)), 0.64);
  background: linear-gradient(
    148deg,
    rgba(24, 18, 38, 0.72) 0%,
    rgba(11, 9, 22, 0.84) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 0 22px rgba(var(--ch-rgb, var(--glow-rgb)), 0.15),
    0 16px 40px rgba(4, 3, 12, 0.38),
    0 0 24px rgba(var(--ch-rgb, var(--glow-rgb)), 0.24);
}
.orbit-card-thumb {
  width: 100%;
  height: 76px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 9px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(8, 8, 14, 0.78);
}
.orbit-card-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ch-hi, var(--glow-hi));
  text-shadow: 0 0 12px rgba(var(--ch-rgb, var(--glow-rgb)), 0.55);
  margin-bottom: 4px;
  padding-right: 12px;
}
.orbit-card-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.15;
  color: #FFFFFF;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}
.orbit-card-desc {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.48;
  color: rgba(248, 245, 240, 0.92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.52);
  margin-top: 4px;
}

/* ==========================================================================
   STAGE LAYER 5: ULTRA-MINIMAL GALLERY CODENAME SEAL (V8 TEXT-FREE STAGE)
   Single compact frosted dark-glass codename pill tucked cleanly at bottom-left
   corner clear of white marble diagonal rhombus beams — zero clutter, zero bars!
   ========================================================================== */
.stencil-hud {
  position: relative;
  z-index: 12;
  height: 100%;
  width: 100%;
  padding: calc(var(--nav-h) + 14px) clamp(20px, 2.8vw, 38px) clamp(18px, 2.6vh, 30px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  pointer-events: none;
}
.stencil-hud a, .stencil-hud button { pointer-events: auto; }

.codename-seal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: linear-gradient(148deg, rgba(11, 9, 20, 0.82) 0%, rgba(7, 6, 14, 0.90) 100%);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #FFFFFF;
  text-shadow: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 8px 24px rgba(0, 0, 0, 0.42),
    0 0 18px rgba(var(--ch-rgb, var(--glow-rgb)), 0.16);
  transition: opacity 0.45s var(--ease-out), border-color 0.22s, box-shadow 0.22s, transform 0.22s var(--ease-out);
}
.codename-seal-num {
  color: var(--ch-hi, var(--glow-hi));
  font-weight: 600;
  text-shadow: 0 0 10px rgba(var(--ch-rgb, var(--glow-rgb)), 0.65);
}
.codename-seal i {
  display: inline-block;
  width: 14px;
  height: 1px;
  background: rgba(255, 255, 255, 0.52);
}
.codename-seal:hover,
.codename-seal:focus-visible {
  border-color: rgba(255, 255, 255, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.50),
    0 10px 28px rgba(0, 0, 0, 0.46),
    0 0 24px rgba(var(--ch-rgb, var(--glow-rgb)), 0.54);
  transform: translateY(-1px);
}

/* Kept for subpage compatibility (.chapter-frame uses .codename-badge) */
.codename-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #FFFFFF;
  text-shadow: var(--hud-shadow);
}
.codename-badge i {
  display: inline-block;
  width: 22px;
  height: 1.5px;
  background: #FFFFFF;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.72);
}

/* Minimal Crisp Buttons & Floating Tags */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.h-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px; font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; border: 1px solid transparent; white-space: nowrap;
  transition: transform 0.15s var(--ease-out), background 0.16s, color 0.16s, border-color 0.16s, box-shadow 0.2s;
  text-shadow: none;
}
.h-btn:hover { transform: translateY(-2px); }
.h-btn--primary { background: #FFFFFF; color: #0A090F; border-color: #FFFFFF; font-weight: 600; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28); }
.h-btn--primary:hover { background: var(--ch-hi, var(--glow-hi)); border-color: var(--ch-hi, var(--glow-hi)); box-shadow: 0 0 28px rgba(255, 255, 255, 0.50); }
.h-btn--ghost { background: rgba(12, 10, 20, 0.48); color: #FFFFFF; border-color: rgba(255, 255, 255, 0.46); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); }
.h-btn--ghost:hover { background: rgba(255, 255, 255, 0.22); border-color: #FFFFFF; box-shadow: 0 0 22px rgba(255, 255, 255, 0.24); }
.stencil-hud .h-btn { border-radius: 6px; }
.stencil-hud .h-btn--ghost {
  background: rgba(12, 10, 22, 0.78);
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34);
}
.stencil-hud .h-btn--ghost:hover {
  background: rgba(24, 20, 40, 0.92);
  border-color: #FFFFFF;
}

.float-tag {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #FFFFFF; background: rgba(12, 10, 18, 0.48); border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(10px); white-space: nowrap; will-change: transform;
}
.float-tag::before { content: ''; width: 4px; height: 4px; background: #FFFFFF; }

/* ==========================================================================
   SUBPAGE COMPATIBILITY CLASSES (Keeps all 8 subpages working seamlessly!)
   ========================================================================== */
.chapter-frame {
  position: relative; width: 100%; max-width: var(--max-w); height: clamp(560px, 78svh, 760px);
  border: 1px solid rgba(var(--ch-rgb, var(--glow-rgb)), 0.36); background: #050507; overflow: hidden;
  box-shadow: 0 36px 96px rgba(0, 0, 0, 0.76);
}
.frame-backdrop { position: absolute; inset: -10% 0; pointer-events: none; z-index: 1; will-change: transform; }
.frame-aura { position: absolute; inset: 0; background: radial-gradient(circle at 70% 44%, rgba(var(--ch-rgb, var(--glow-rgb)), 0.22) 0%, transparent 66%); }
.frame-halo { position: absolute; right: 5%; top: 10%; width: 440px; height: 440px; color: rgb(var(--ch-rgb, var(--glow-rgb))); opacity: 0; }
.chapter-frame[data-view="color"] .frame-halo { opacity: 0.65; }
.frame-portrait { position: absolute; right: 4%; top: 10%; height: 84%; width: auto; max-width: 64%; object-fit: contain; transition: opacity 0.4s; }
.frame-portrait--color { opacity: 0; }
.chapter-frame[data-view="color"] .frame-portrait--art { opacity: 0; }
.chapter-frame[data-view="color"] .frame-portrait--color { opacity: 1; }
.frame-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.24; filter: saturate(0.35); }
.frame-veil { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(90deg, rgba(5,5,7,0.9) 0%, rgba(5,5,7,0.68) 38%, rgba(5,5,7,0.12) 66%, rgba(5,5,7,0.22) 100%); }
.frame-content { position: relative; z-index: 6; height: 100%; padding: clamp(28px, 4vw, 54px); display: flex; flex-direction: column; justify-content: space-between; }
.frame-top-bar, .frame-bottom-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.frame-num-ghost { font-family: var(--font-display); font-size: clamp(32px, 3.6vw, 52px); color: var(--ch-hi, var(--glow-hi)); }
.frame-main-copy { max-width: 540px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.frame-section-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--ink-muted); }
.frame-headline { font-family: var(--font-display); font-weight: 500; font-size: clamp(42px, 5.4vw, 82px); line-height: 0.95; margin: 0; color: var(--ink-bright); }
.frame-headline em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--ch-hi, var(--glow-hi)); }
.frame-brief { font-size: 14px; line-height: 1.88; color: var(--ink); opacity: 0.86; margin: 4px 0 0; }
.frame-actions, .frame-float-pair { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.view-toggle-btn { padding: 6px 10px; border: 1px solid var(--hairline-strong); background: rgba(8,8,12,0.65); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--ink-muted); }
.view-toggle-btn:hover { border-color: var(--glow-hi); color: var(--ink-bright); }

.abyss-section { position: relative; width: 100%; max-width: var(--max-w); margin: 0 auto; padding: clamp(48px, 6vw, 88px) clamp(20px, 5vw, 84px); z-index: 4; }
.abyss-section--compact { padding-top: 36px; padding-bottom: 36px; }
.abyss-rule { width: min(calc(100% - 40px), var(--max-w)); margin: 0 auto; border: 0; border-top: 1px solid var(--hairline); }
.band-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid rgba(var(--glow-rgb), 0.24); margin-bottom: 36px; }
.band-eyebrow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.18em; color: var(--glow-hi); margin-bottom: 8px; }
.band-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(30px, 3.8vw, 52px); line-height: 1; margin: 0; color: var(--ink-bright); }
.band-title-cn { font-size: 14px; color: var(--ink-muted); margin: 10px 0 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ed-card { border: 1px solid var(--hairline-strong); background: var(--panel); display: flex; flex-direction: column; transition: border-color 0.25s, transform 0.25s; }
.ed-card:hover { border-color: var(--glow-hi); transform: translateY(-3px); }
.ed-card-media { aspect-ratio: 16 / 10; overflow: hidden; background: #050507; border-bottom: 1px solid var(--hairline); }
.ed-card-media img { width: 100%; height: 100%; object-fit: cover; }
.ed-card-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ed-card-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--glow-hi); display: flex; justify-content: space-between; }
.ed-card h3 { font-family: var(--font-display); font-size: 22px; font-weight: 500; margin: 0; color: var(--ink-bright); }
.ed-card p { font-size: 13.5px; line-height: 1.8; color: var(--ink-muted); margin: 0; }
.sacred-frame { padding: 14px; border: 1px solid rgba(var(--glow-rgb), 0.34); background: rgba(9,9,13,0.88); }
.sacred-frame-inner { border: 1px solid var(--hairline); overflow: hidden; }
.sacred-frame-cap { display: flex; justify-content: space-between; padding-top: 10px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-muted); }
.cli-panel { border: 1px solid rgba(var(--glow-rgb), 0.32); background: rgba(7,7,11,0.88); font-family: var(--font-mono); }
.cli-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--hairline); }
.cli-tabs button { padding: 11px 14px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); border-right: 1px solid var(--hairline); }
.cli-tabs button:last-child { border-right: 0; }
.cli-tabs button.is-active { background: rgba(var(--glow-rgb), 0.22); color: var(--glow-hi); font-weight: 600; }
.cli-code-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; font-size: 12.5px; overflow-x: auto; }
.cli-code-row .prompt { color: var(--glow-hi); margin-right: 8px; }
.cli-copy-btn { padding: 6px 12px; border: 1px solid rgba(var(--glow-rgb), 0.45); font-family: var(--font-mono); font-size: 10px; color: var(--ink-bright); }
.cli-copy-btn.is-copied { background: var(--glow); color: #050507; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--panel); border: 1px solid var(--hairline); }
.spec-table th, .spec-table td { text-align: left; padding: 14px 16px; border-bottom: 1px dashed var(--hairline-strong); }
.spec-table th { font-family: var(--font-mono); font-size: 10.5px; color: var(--glow-hi); border-bottom-style: solid; background: rgba(var(--glow-rgb), 0.06); }
.spec-table .mono-cell { font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
.spec-table .col-highlight { background: rgba(var(--glow-rgb), 0.08); }
.realm-corridor { width: min(calc(100% - 40px), var(--max-w)); margin: 0 auto 48px; display: grid; grid-template-columns: 1fr auto 1fr; border: 1px solid var(--hairline-strong); background: rgba(9,9,13,0.82); }
.corridor-link { display: flex; flex-direction: column; gap: 4px; padding: 20px 26px; }
.corridor-link:hover { background: rgba(var(--glow-rgb), 0.14); }
.corridor-link--next { text-align: right; align-items: flex-end; }
.corridor-link--hub { justify-content: center; align-items: center; border-left: 1px solid var(--hairline); border-right: 1px solid var(--hairline); font-family: var(--font-mono); font-size: 11px; color: var(--glow-hi); }
.corridor-label { font-family: var(--font-mono); font-size: 10px; color: var(--ink-muted); }
.corridor-title { font-family: var(--font-display); font-size: 24px; }

.void-footer {
  position: relative;
  z-index: 4;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 5, 8, 0.86);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  padding: clamp(36px, 5vw, 56px) clamp(20px, 5vw, 84px) 26px;
}
.footer-inner { width: 100%; max-width: var(--max-w); margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.footer-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; }
.footer-top img { height: 21px; width: auto; }
.footer-codes { display: flex; flex-wrap: wrap; gap: 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.78); }
.footer-codes a:hover { color: #FFFFFF; }
.footer-bottom { padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.14); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-family: var(--font-mono); font-size: 11px; color: rgba(255, 255, 255, 0.76); }
.footer-bottom a:hover { color: #FFFFFF; text-decoration: underline; }

.realm-palette { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; background: rgba(4,4,6,0.88); backdrop-filter: blur(12px); padding: 20px; }
.realm-palette[hidden] { display: none !important; }
.palette-box { width: min(820px, 100%); max-height: 86svh; overflow-y: auto; background: #09090D; color: var(--ink-bright); border: 1px solid rgba(var(--glow-rgb), 0.45); }
.palette-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--hairline); font-family: var(--font-mono); font-size: 11px; color: var(--glow-hi); }
.palette-close { padding: 4px 10px; border: 1px solid var(--hairline-strong); font-family: var(--font-mono); font-size: 10.5px; }
.palette-close:hover { background: var(--glow); color: #050507; }
.palette-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.palette-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.palette-item:hover, .palette-item.is-current { background: color-mix(in srgb, var(--item-accent, #FF5A24) 18%, #09090D); }
.palette-item img { width: 46px; height: 56px; object-fit: cover; object-position: center 26%; flex-shrink: 0; background: radial-gradient(circle at center, rgba(255,255,255,0.08), #050507); border: 1px solid var(--hairline-strong); }
.palette-item-top { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; }
.palette-swatch { width: 7px; height: 7px; background: var(--item-accent); display: inline-block; }
.palette-item-domain { font-size: 13px; margin-top: 3px; }
.palette-foot { display: flex; justify-content: space-between; padding: 12px 20px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-muted); }

.lightbox { position: fixed; inset: 0; z-index: 130; background: rgba(4,4,6,0.94); backdrop-filter: blur(12px); display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none !important; }
.lightbox-card { max-width: min(1100px, 96vw); max-height: 92svh; background: #09090D; border: 1px solid rgba(var(--glow-rgb), 0.4); display: flex; flex-direction: column; }
.lightbox-card img { max-height: 76svh; width: auto; max-width: 100%; object-fit: contain; margin: 0 auto; }
.lightbox-meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--hairline); font-family: var(--font-mono); font-size: 11.5px; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: translateY(0); }

@media (max-width: 1180px) {
  .chapter-rail { display: none; }
  .orbit-card { width: 174px; padding: 10px 12px 11px; }
  .orbit-card-thumb { height: 60px; }
  .orbit-card-title { font-size: 15.5px; }
  .orbit-card-desc { font-size: 11px; }
}
@media (max-width: 820px) {
  .site-nav { grid-template-columns: 1fr auto; }
  .nav-center, .nav-link--hide-sm, .nav-cmd-btn kbd { display: none; }
  .page-shell--home { gap: 30svh; padding-bottom: 10svh; }
  .stencil-frame { height: 100svh; min-height: 580px; }
  .stencil-plate { height: min(72svh, 560px); max-width: 92vw; }
  .stencil-hud { padding: calc(var(--nav-h) + 10px) 16px 18px; }
  .codename-seal { padding: 6px 12px; font-size: 10px; }
  .orbit-stage { display: none; } /* Clean uncluttered zero-overflow focus on mobile viewports */
  .grid-2, .grid-3, .palette-grid, .realm-corridor { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}


.ed-card h3[id], .abyss-section[id] { scroll-margin-top: calc(var(--nav-h) + 12px); }
@media (max-width: 820px) { .nav-left .author-project { font-size: 10px; letter-spacing: 0; } }

/* Chapter works stay within reading reach while the surrounding lighting moves. */
.orbit-stage {display:grid;grid-template-columns:minmax(190px,22%) 1fr minmax(165px,19%);grid-template-rows:repeat(3,auto);
  gap:10px 0;align-content:center;padding:0 clamp(62px,9vw,170px) 0 clamp(32px,6vw,115px);}
.orbit-stage .orbit-card[data-float-slot] {position:relative;top:auto;left:auto;grid-column:3;width:100%;transform:none;
  opacity:1;visibility:visible;pointer-events:auto;align-self:center;border-radius:5px;background:rgba(15,14,20,.94);
  box-shadow:0 3px 14px #0006;backdrop-filter:none;}
.featured-stack {grid-column:1;grid-row:1/span 3;align-self:center;display:grid;gap:8px;min-width:0;}
.featured-entry {pointer-events:auto;display:flex;align-items:center;gap:clamp(6px,.65vw,12px);padding:7px 10px;
  color:#fff9ed;background:#121117f5;border:1px solid var(--ch-hi,#d4bc92);border-radius:2px;text-decoration:none;}
.featured-entry strong {font-size:clamp(17px,1.5vw,25px);white-space:nowrap;line-height:1.15;}
.featured-entry span {padding-left:.65em;border-left:1px solid #ffffff42;color:#e3ded5;font-size:clamp(11px,.82vw,14px);line-height:1.35;}
.featured-entry i {margin-left:auto;color:var(--ch-hi);font-style:normal;}
.featured-entry:hover,.featured-entry:focus-visible {outline:2px solid var(--ch-hi);outline-offset:2px;}
.orbit-stage .work-lead[data-float-slot] {grid-column:1;grid-row:auto;padding:clamp(12px,1.2vw,22px);border-top:2px solid var(--ch-hi);}
.work-lead .orbit-card-thumb {height:clamp(85px,9vw,158px);border-radius:2px;}
.work-lead .orbit-card-title {font-size:clamp(18px,1.55vw,28px);line-height:1.2;}
.orbit-stage .orbit-card:not(.work-lead) .orbit-card-thumb {display:none;}
.work-action {display:inline-block;margin-top:.7em;color:var(--ch-hi,#eac999);font-size:13px;font-weight:650;}
.work-nav {white-space:nowrap;}
body.is-gallery-pure .orbit-stage {visibility:hidden;}
body.is-gallery-pure .orbit-stage .orbit-card {visibility:hidden;pointer-events:none;}
.work-focus,.works-index {position:relative;z-index:4;color:#f7f1e7;background:#101016;}
.work-focus {scroll-margin-top:80px;display:grid;grid-template-columns:minmax(0,1.04fr) minmax(0,1fr);
  gap:clamp(25px,4vw,75px);align-items:center;padding:clamp(32px,5vw,90px);border-block:1px solid #ffffff26;}
.work-focus figure {margin:0;}
.work-focus img,.selected-work img {width:100%;display:block;}
.work-focus figcaption,.works-index nav {margin-top:.65em;color:#cdc2ad;font-size:13px;}
.work-focus h2,.works-list h2 {line-height:1.2;font-size:clamp(22px,2.5vw,42px);}
.work-focus h3 {margin-top:1.15em;font-size:15px;color:#dec59c;}
.work-focus p,.works-list p {line-height:1.65;color:#dcd7d1;}
.work-focus .work-result {margin:.65em 0;font-size:clamp(17px,1.4vw,24px);color:#fff;}
.work-focus .work-action {margin-right:1.3em;}
.works-page {background:#101016;}
.works-index {width:min(1320px,92%);margin:auto;padding:6vh 0 10vh;}
.works-index h1 {margin:7vh 0 4vh;font-size:clamp(32px,4vw,72px);}
.works-list {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(16px,2.5vw,40px);}
.selected-work {display:block;border-top:1px solid #ae9470;color:inherit;}
.selected-work img {aspect-ratio:16/10;object-fit:cover;}
.selected-work div {padding:20px 0;}
.selected-work h2 {font-size:clamp(20px,2vw,32px);}
.selected-work p {margin-top:12px;}
.selected-work:hover .work-action,.selected-work:focus-visible .work-action {text-decoration:underline;}
@media(max-width:820px){
 .work-focus,.works-list {grid-template-columns:1fr;}
 .featured-stack {display:contents;}
 .featured-entry {grid-column:1/-1;grid-row:1;}
 .orbit-stage {inset:auto 0 5.5%;padding:0 3%;grid-template-columns:1fr 1fr;gap:5px;grid-template-rows:auto auto;}
 .orbit-stage .orbit-card[data-float-slot]{grid-column:auto;align-self:stretch;padding:7px 9px;}
 .orbit-stage .work-lead[data-float-slot]{grid-row:auto;grid-column:auto;}
 .orbit-stage .orbit-card-thumb,.orbit-stage .orbit-card-tag,.orbit-stage .orbit-card-desc,.orbit-stage .work-action {display:none;}
 .orbit-card-title,.work-lead .orbit-card-title {font-size:14px;}
}

.catalog-features {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(24px,3.5vw,54px);}
.catalog-feature {min-width:0;border-top:1px solid #937c59;padding-top:16px;}
.catalog-feature:first-child {grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:clamp(24px,4vw,64px);align-items:center;}
.catalog-cover {display:block;background:#09090d;}
.catalog-cover img {display:block;width:100%;aspect-ratio:2.25;object-fit:cover;}
.catalog-feature:first-child .catalog-cover img {aspect-ratio:1.65;object-fit:contain;}
.catalog-feature h2 {font-size:clamp(22px,2.5vw,38px);line-height:1.18;margin:18px 0 10px;}
.catalog-feature:first-child h2 {font-size:clamp(32px,4.2vw,68px);overflow-wrap:anywhere;}
.catalog-feature p,.catalog-item p {color:#cec8be;line-height:1.65;}
.catalog-feature:first-child p {font-size:clamp(17px,1.5vw,24px);}
.catalog-feature .work-action {color:#f2d49d;}
.work-related,.catalog-nav {display:flex;flex-wrap:wrap;gap:7px 16px;}
.work-related {margin-top:16px;font-size:13px;color:#ceb896;}
.works-index .catalog-nav {margin:clamp(44px,6vw,90px) 0 0;padding:16px 0;border-block:1px solid #514939;font-size:15px;}
.catalog-section {padding-top:clamp(28px,4.5vw,64px);scroll-margin-top:16px;}
.catalog-section>h2 {font-size:clamp(23px,2.4vw,36px);margin:0 0 20px;}
.catalog-items {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px 28px;}
.catalog-item {padding-top:13px;border-top:1px solid #ffffff2c;}
.catalog-item img {width:100%;aspect-ratio:2.3;object-fit:cover;margin-bottom:10px;}
.catalog-item h3 {font-size:clamp(17px,1.25vw,22px);margin:0 0 4px;line-height:1.35;}
.catalog-item p {font-size:14px;}
.works-index a:hover {color:#f5d499;}
.works-index a:focus-visible {outline:2px solid #f5d499;outline-offset:3px;}
.ed-card h3[id] {scroll-margin-top:100px;}
@media(max-width:760px){
 .catalog-items,.catalog-features,.catalog-feature:first-child {grid-template-columns:1fr;}
 .catalog-feature:first-child {gap:0;}
 .catalog-nav {line-height:1.7;}
}


@media (max-width: 600px) {
  .site-nav {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 8px;
    padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right));
  }
  .nav-left { min-width: 0; gap: clamp(6px, 2vw, 12px); }
  .brand-mark { min-width: 44px; height: 44px; }
  .brand-mark img { max-width: clamp(54px, 17vw, 78px); height: auto; max-height: 20px; }
  .nav-left .nav-link { display: inline-flex; align-items: center; min-height: 44px; letter-spacing: 0; }
  .nav-cmd-btn, .palette-close, .view-toggle-btn, .art-switch button,
  .frame-actions .h-btn, .codename-seal { min-width: 44px; min-height: 44px; }
  .band-head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 24px; }
  .float-tag { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .chapter-frame { height: auto; min-height: min(650px, 95svh); }
  .frame-content { height: auto; min-height: inherit; gap: 22px; padding: 22px 16px; }
  .frame-main-copy { min-width: 0; overflow-wrap: anywhere; }
  .frame-veil { background: linear-gradient(0deg, #050507f5 0%, #050507b8 62%, #05050730 100%); }
  .frame-actions { gap: 8px; }
  .page-shell--home { gap: 12svh; }
  .orbit-stage { bottom: calc(70px + env(safe-area-inset-bottom)); }
  .featured-entry, .orbit-stage .orbit-card[data-float-slot] { min-height: 44px; }
  .lightbox { padding: 10px; }
  .lightbox-card { max-width: 100%; max-height: 94dvh; overflow: auto; }
  .lightbox-meta { gap: 8px; padding: 8px 12px; }
  .lightbox-meta span { overflow-wrap: anywhere; }
  .lightbox-meta button { flex-shrink: 0; }
  .prompt-list, .prompt-btn span:first-child { min-width: 0; overflow-wrap: anywhere; }
  .cli-code-row { flex-wrap: wrap; }
  .cli-code-row code { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
  .cli-copy-btn { min-height: 44px; }
  .palette-box { overscroll-behavior: contain; }
  .spec-table td, .spec-table th { padding: 9px 6px; overflow-wrap: anywhere; }
  .spec-table .mono-cell { white-space: normal; }
}

/* Preserve responsive aspect ratios when the image dimensions reserve space. */
.works-page img[width][height] { height: auto; }
