/* ==========================================================================
   Simon Xia · Portfolio v2 Aesthetic & Architectural Design System
   Six Distinct Chromatic Acts + Two-Tier Gallery Walls & <dialog> Rooms
   ========================================================================== */

:root {
  /* Core Neutral Xuan Paper */
  --bg-paper: #F5F2EB;
  --bg-paper-alt: #EBE6DA;
  --ink: #151515;
  --ink-secondary: #524D46;
  --ink-muted: #766F66;

  /* Hall 01: Misty Xuan-Paper Celadon */
  --bg-yujian: #E9EDE6;
  --bg-yujian-room: #EFF2EC;
  --pine: #1D2A22;
  --sage: #4B5E50;

  /* Hall 02: Charcoal Darkroom */
  --bg-dark: #121315;
  --bg-dark-panel: #18191C;
  --ink-light: #F2EFE9;
  --ink-light-secondary: #B8B2A8;
  --ink-light-muted: #868077;
  --brass: #C8B08A;

  /* Hall 03: Cream Drawing Paper + Pop Primaries */
  --bg-miffy: #FBF8F1;
  --miffy-red: #C63322;
  --miffy-yellow: #E5B82E;
  --miffy-blue: #24538A;

  /* Hall 04: Deep Nocturnal Burgundy */
  --bg-burgundy: #231117;
  --bg-burgundy-panel: #2B151D;
  --bg-burgundy-hover: #351B24;
  --ivory: #F4EFE6;
  --ivory-secondary: #CBBEC2;
  --champagne: #D6BE9B;

  /* Architectural 1px Hairlines */
  --hairline: rgba(21, 21, 21, 0.13);
  --hairline-strong: rgba(21, 21, 21, 0.26);
  --hairline-dark: rgba(242, 239, 233, 0.14);
  --hairline-dark-strong: rgba(242, 239, 233, 0.28);
  --hairline-burgundy: rgba(244, 239, 230, 0.16);
  --hairline-burgundy-strong: rgba(214, 190, 155, 0.36);

  /* Editorial Typography Spine */
  --font-serif-zh: 'Noto Serif SC', 'Songti SC', 'STSong', Georgia, serif;
  --font-serif-en: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* Layout & Physical Motion Curve (3 Canonical Tokens) */
  --container-max: 1180px;
  --gutter: clamp(1rem, 3.2vw, 2.5rem);
  --header-h: 56px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  background: var(--bg-paper);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background-color: var(--bg-paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.62;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  position: relative;
}

/* Subtle Paper / Film Micro-Grain Overlay (~2.5%) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

.hall-02 :focus-visible,
.room-theme-dark :focus-visible,
.site-header.is-dark :focus-visible {
  outline-color: var(--brass);
}

.hall-04 :focus-visible,
.room-theme-burgundy :focus-visible,
.site-header.is-burgundy :focus-visible {
  outline-color: var(--champagne);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg-paper);
  padding: 0.65rem 1rem;
  z-index: 200;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  color: var(--ink-muted);
}

/* ---------- Top Sticky Navigation Bar (Multi-Hall Chrome Breathing) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  height: var(--header-h);
  background: rgba(245, 242, 235, 0.94);
  color: var(--ink);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
  transition: background-color 280ms var(--ease-out),
              color 280ms var(--ease-out),
              border-color 280ms var(--ease-out);
}

.site-header.is-celadon {
  background: rgba(233, 237, 230, 0.94);
  border-bottom-color: rgba(29, 42, 34, 0.14);
}

.site-header.is-cream {
  background: rgba(251, 248, 241, 0.94);
  border-bottom-color: rgba(21, 21, 21, 0.14);
}

.site-header.is-dark {
  background: rgba(18, 19, 21, 0.94);
  color: var(--ink-light);
  border-bottom-color: var(--hairline-dark);
}

.site-header.is-dark.is-burgundy {
  background: rgba(35, 17, 23, 0.94);
  color: var(--ivory);
  border-bottom-color: var(--hairline-burgundy);
}

.header-inner {
  max-width: var(--container-max);
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-en {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.13em;
}

.brand-sep {
  color: var(--ink-muted);
  transition: color 220ms var(--ease-out);
}

.site-header.is-dark .brand-sep {
  color: var(--ink-light-muted);
}

.site-header.is-burgundy .brand-sep {
  color: var(--ivory-secondary);
}

.brand-zh {
  font-family: var(--font-serif-zh);
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.45rem);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-link {
  font-size: 0.86rem;
  color: var(--ink-secondary);
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

.nav-link:focus-visible,
.nav-link.is-current {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.site-header.is-dark .nav-link {
  color: var(--ink-light-secondary);
}

.site-header.is-dark .nav-link:focus-visible,
.site-header.is-dark .nav-link.is-current {
  color: var(--ink-light);
  border-bottom-color: var(--brass);
}

.site-header.is-burgundy .nav-link {
  color: var(--ivory-secondary);
}

.site-header.is-burgundy .nav-link:focus-visible,
.site-header.is-burgundy .nav-link.is-current {
  color: var(--ivory);
  border-bottom-color: var(--champagne);
}

.nav-resume {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.35rem 0.72rem;
  border: 1px solid var(--hairline-strong);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 160ms var(--ease-out);
}

.nav-resume:active {
  transform: scale(0.97);
  transition-duration: 140ms;
}

.site-header.is-dark .nav-resume {
  border-color: var(--hairline-dark-strong);
  color: var(--ink-light);
}

.site-header.is-burgundy .nav-resume {
  border-color: var(--hairline-burgundy-strong);
  color: var(--ivory);
}

@media (hover: hover) and (pointer: fine) {
  .nav-link:hover {
    color: var(--ink);
    border-bottom-color: var(--ink);
  }
  .site-header.is-dark .nav-link:hover {
    color: var(--ink-light);
    border-bottom-color: var(--brass);
  }
  .site-header.is-burgundy .nav-link:hover {
    color: var(--ivory);
    border-bottom-color: var(--champagne);
  }
  .nav-resume:hover {
    background: var(--ink);
    color: var(--bg-paper);
    border-color: var(--ink);
  }
  .site-header.is-dark .nav-resume:hover {
    background: var(--ink-light);
    color: var(--bg-dark);
    border-color: var(--ink-light);
  }
  .site-header.is-burgundy .nav-resume:hover {
    background: var(--champagne);
    color: var(--bg-burgundy);
    border-color: var(--champagne);
  }
}

@media (max-width: 520px) {
  .nav-hide-mobile { display: none; }
  .brand-en { font-size: 0.68rem; letter-spacing: 0.08em; }
  .brand-zh { font-size: 0.88rem; }
  .site-nav { gap: 0.65rem; }
  .nav-link { font-size: 0.8rem; }
  .nav-resume { padding: 0.34rem 0.56rem; font-size: 0.68rem; }
}

/* ---------- Desktop Right-Edge 1px Curatorial Vertical Scale ---------- */
.curatorial-scale {
  display: none;
}

@media (min-width: 1280px) {
  .curatorial-scale {
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    color: var(--ink-muted);
    transition: color 240ms var(--ease-out);
  }

  .curatorial-scale.is-dark {
    color: var(--ink-light-secondary);
  }

  .curatorial-scale.is-burgundy {
    color: var(--champagne);
  }

  .scale-track {
    position: relative;
    width: 1px;
    height: 120px;
    background: var(--hairline-strong);
    transition: background-color 240ms var(--ease-out);
  }

  .curatorial-scale.is-dark .scale-track {
    background: var(--hairline-dark-strong);
  }

  .curatorial-scale.is-burgundy .scale-track {
    background: rgba(214, 190, 155, 0.38);
  }

  .scale-needle {
    position: absolute;
    left: -3px;
    top: 0;
    width: 7px;
    height: 7px;
    border: 1px solid var(--ink);
    background: var(--bg-paper);
    transition: transform 200ms var(--ease-out), border-color 240ms var(--ease-out), background-color 240ms var(--ease-out);
  }

  .curatorial-scale.is-dark .scale-needle {
    border-color: var(--brass);
    background: var(--bg-dark);
  }

  .curatorial-scale.is-burgundy .scale-needle {
    border-color: var(--champagne);
    background: var(--bg-burgundy);
  }

  .scale-readout {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    color: inherit;
    white-space: nowrap;
  }
}

/* ---------- Act 0 · Hero · Warm Xuan Paper (#F5F2EB) · Break-Frame Composition ---------- */
.hero {
  background: var(--bg-paper);
  border-bottom: 1px solid var(--hairline);
}

.hero-inner {
  min-block-size: min(calc(94dvh - var(--header-h)), 775px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-block: clamp(1rem, 2.2vh, 1.65rem) clamp(1.1rem, 2.2vh, 1.55rem);
  gap: clamp(1rem, 2.5vh, 1.75rem);
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1.25rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--hairline);
}

.hero-break-stage {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  margin-block: auto;
  position: relative;
}

.hero-plate-wrap {
  grid-column: 6 / 13;
  grid-row: 1;
  margin: 0;
  position: relative;
  height: clamp(350px, 50vh, 455px);
  justify-self: end;
  width: 96%;
  overflow: hidden;
  z-index: 1;
}

/* Feather-soft left mist seam so the break-frame dark headline slices into the image cleanly */
.hero-plate-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(245, 242, 235, 0.96) 0%,
    rgba(245, 242, 235, 0.8) 24%,
    rgba(245, 242, 235, 0.26) 46%,
    rgba(245, 242, 235, 0) 68%
  );
}

.hero-plate-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
}

.hero-plate-tag {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 3;
  padding: 0.2rem 0.5rem;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: rgba(245, 242, 235, 0.92);
  background: rgba(21, 21, 21, 0.42);
  backdrop-filter: blur(4px);
}

.hero-statement {
  grid-column: 1 / 9;
  grid-row: 1;
  z-index: 3;
  padding-right: 0;
}

.hero-title {
  margin: 0 0 1.05rem;
  font-family: var(--font-serif-zh);
  font-weight: 500;
  font-size: clamp(2.15rem, 1.25rem + 2.45vw, 3.55rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
}

.hero-title-en {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-serif-en);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.22rem, 0.85rem + 1.15vw, 1.85rem);
  color: var(--ink-secondary);
  letter-spacing: 0.01em;
}

.hero-identity {
  max-width: min(25.5rem, 38vw);
  margin-bottom: 1.35rem;
}

.hero-identity p {
  margin: 0;
  font-size: clamp(0.88rem, 0.84rem + 0.18vw, 0.97rem);
  color: var(--ink-secondary);
  line-height: 1.66;
  text-wrap: pretty;
}

.hero-identity p + p {
  margin-top: 0.25rem;
}

.hero-nowrap {
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.45rem;
}

/* Slender Ink-Line Action (Replaces heavy black button on Hero) */
.ink-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.2rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
  transition: color 180ms ease, border-color 180ms ease, transform 160ms var(--ease-out);
}

.ink-cta > span[aria-hidden="true"] {
  display: inline-block;
  transition: transform 180ms var(--ease-out);
}

.ink-cta:focus-visible {
  color: var(--pine);
  border-bottom-color: var(--pine);
}

.ink-cta:focus-visible > span[aria-hidden="true"] {
  transform: translateX(4px);
}

.ink-cta:active {
  transform: scale(0.97);
  transition-duration: 140ms;
}

.ink-cta-sage {
  color: var(--pine);
  border-bottom-color: rgba(29, 42, 34, 0.45);
}

.ink-cta-sage:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.hero-quick-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-text-copy {
  background: transparent;
  border: 0;
  padding: 0.45rem 0.2rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--ink-secondary);
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease, transform 160ms var(--ease-out);
}

.btn-text-copy:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.btn-text-copy:active {
  transform: scale(0.97);
  transition-duration: 140ms;
}

@media (hover: hover) and (pointer: fine) {
  .ink-cta:hover {
    color: var(--pine);
    border-bottom-color: var(--pine);
  }
  .ink-cta:hover > span[aria-hidden="true"] {
    transform: translateX(4px);
  }
  .ink-cta-sage:hover {
    color: var(--ink);
    border-bottom-color: var(--ink);
  }
  .btn-text-copy:hover {
    color: var(--ink);
    border-bottom-color: var(--ink);
  }
}

.mono-k {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.copy-divider {
  color: var(--hairline-strong);
}

/* Single-Row Hard-Credential Coordinate Strip (4A Finalized) */
.credential-strip {
  margin: 0;
  padding-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem 1.5rem;
  border-top: 1px solid var(--hairline-strong);
}

.credential-cell {
  padding: 0.15rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.credential-cell dt {
  margin: 0;
}

.cred-line {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.24rem;
}

.cred-value {
  margin: 0;
  font-family: var(--font-serif-zh);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-size: clamp(1.12rem, 0.98rem + 0.42vw, 1.34rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.24;
  white-space: nowrap;
}

.cred-sub {
  margin: 0;
  font-size: 0.76rem;
  color: var(--ink-secondary);
  line-height: 1.4;
}

@media (max-width: 960px) {
  .hero-inner {
    min-block-size: auto;
  }
  .hero-break-stage {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }
  .hero-statement {
    grid-column: 1;
    grid-row: 1;
    padding-right: 0;
  }
  .hero-plate-wrap {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }
  .hero-plate-wrap::before {
    display: none;
  }
  .hero-identity {
    max-width: 100%;
  }
  .credential-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1.25rem;
  }
}

@media (max-width: 520px) {
  .hero-meta-axis,
  .hero-meta-loc {
    display: none;
  }
  .hero-title {
    font-size: clamp(1.9rem, 7.5vw, 2.4rem);
  }
}

/* ---------- Reusable Editorial Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.25rem;
  font-size: 0.86rem;
  font-weight: 500;
  border: 1px solid var(--ink);
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 160ms var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
  transition-duration: 140ms;
}

.btn-sm {
  min-height: 38px;
  padding: 0 0.95rem;
  font-size: 0.78rem;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg-paper);
}

.btn-sage {
  background: var(--pine);
  color: #F4F6F1;
  border-color: var(--pine);
}

.btn-brass {
  background: var(--brass);
  color: var(--bg-dark);
  border-color: var(--brass);
}

.btn-miffy {
  background: var(--ink);
  color: var(--bg-miffy);
  border: 1.5px solid var(--ink);
}

.btn-champagne {
  background: transparent;
  color: var(--ivory);
  border: 1px solid var(--champagne);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: var(--pine);
    border-color: var(--pine);
  }
  .btn-sage:hover {
    background: var(--ink);
    border-color: var(--ink);
  }
  .btn-brass:hover {
    background: var(--ink-light);
    border-color: var(--ink-light);
  }
  .btn-miffy:hover {
    background: var(--miffy-red);
    border-color: var(--miffy-red);
  }
  .btn-champagne:hover {
    background: var(--champagne);
    color: var(--bg-burgundy);
  }
}

/* ---------- Act 1 · Curated Index (#F5F2EB) ---------- */
.curated-index {
  background: var(--bg-paper);
  padding-block: clamp(2.4rem, 5vh, 3.6rem);
  border-bottom: 1px solid var(--hairline);
}

.section-head {
  margin-bottom: clamp(1.35rem, 3vh, 2rem);
}

.section-head-main {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 0.75rem 2rem;
  align-items: end;
}

.section-title {
  margin: 0;
  font-family: var(--font-serif-zh);
  font-size: clamp(1.75rem, 1.3rem + 1.3vw, 2.35rem);
  font-weight: 500;
  line-height: 1.15;
}

.section-lead {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 0.9rem;
  max-width: 38rem;
}

#about .section-head-main {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.45rem;
  align-items: start;
}

.index-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 0.98fr);
  gap: 2.25rem;
  align-items: start;
}

.index-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hairline-strong);
}

.index-row {
  border-bottom: 1px solid var(--hairline);
}

.index-link {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto 1.3rem;
  align-items: center;
  gap: 0.6rem 1rem;
  padding-block: 1.05rem;
  padding-inline: 0.5rem;
  transition: background-color 180ms ease;
}

.index-num,
.index-body {
  transition: transform 200ms var(--ease-out);
}

.index-link:focus-visible,
.index-link.is-active {
  background: rgba(21, 21, 21, 0.032);
}

.index-link:focus-visible .index-num,
.index-link:focus-visible .index-body,
.index-link.is-active .index-num,
.index-link.is-active .index-body {
  transform: translateX(6px);
}

.index-body {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
}

.index-title {
  font-family: var(--font-serif-zh);
  font-size: clamp(1.16rem, 1.04rem + 0.42vw, 1.4rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.index-sub {
  font-size: 0.8rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

.index-meta {
  white-space: nowrap;
}

.index-arrow {
  font-size: 0.95rem;
  color: var(--ink-muted);
  transition: transform 180ms var(--ease-out), color 180ms ease;
}

.index-link:focus-visible .index-arrow,
.index-link.is-active .index-arrow {
  transform: translate(2px, -2px);
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .index-link:hover {
    background: rgba(21, 21, 21, 0.032);
  }
  .index-link:hover .index-num,
  .index-link:hover .index-body {
    transform: translateX(6px);
  }
  .index-link:hover .index-arrow {
    transform: translate(2px, -2px);
    color: var(--ink);
  }
}

.index-preview {
  position: sticky;
  top: calc(var(--header-h) + 1.25rem);
}

.preview-mat {
  border: 1px solid var(--hairline);
  background: #EFECE3;
  padding: 0.9rem;
}

.preview-frame {
  position: relative;
  margin: 0 0 0.85rem;
  height: clamp(275px, 34vh, 330px);
  overflow: hidden;
  border: 0;
  background: radial-gradient(
    ellipse at 50% 44%,
    rgba(255, 255, 255, 0.58) 0%,
    rgba(235, 230, 218, 0.42) 66%,
    rgba(218, 211, 196, 0.48) 100%
  );
}

.preview-frame::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.45rem;
  width: 78%;
  transform: translateX(-50%) scaleX(1);
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(21, 21, 21, 0.16) 0%, rgba(21, 21, 21, 0) 72%);
  pointer-events: none;
  transition: transform 240ms var(--ease-out), opacity 220ms var(--ease-out);
}

.preview-frame[data-orientation="portrait"]::after {
  transform: translateX(-50%) scaleX(0.667);
  opacity: 1;
}

.preview-frame[data-orientation="landscape"]::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 0.72;
}

/* Portrait monographs stand like physical hardcover books; landscape decks mount like framed boards */
.preview-img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: calc(100% - 1.5rem);
  max-height: calc(100% - 1.75rem);
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transform: scale(1.02) translateY(3px);
  filter: blur(2px);
  transition: opacity 220ms var(--ease-out), transform 240ms var(--ease-out), filter 220ms var(--ease-out);
  pointer-events: none;
}

.preview-img[data-orientation="portrait"] {
  width: auto;
  height: calc(100% - 1.85rem);
  border: 1px solid rgba(21, 21, 21, 0.14);
  background: #FAF8F3;
  box-shadow:
    -3px 0 0 rgba(21, 21, 21, 0.08),
    0 14px 28px -10px rgba(21, 21, 21, 0.26),
    0 4px 10px -2px rgba(21, 21, 21, 0.12);
}

.preview-img[data-orientation="landscape"] {
  width: calc(100% - 1.5rem);
  height: auto;
  padding: 0.3rem;
  background: #FFFFFF;
  border: 1px solid rgba(21, 21, 21, 0.14);
  box-shadow:
    0 16px 30px -12px rgba(21, 21, 21, 0.22),
    0 3px 8px -2px rgba(21, 21, 21, 0.09);
}

.preview-img.is-shown {
  opacity: 1;
  transform: scale(1) translateY(0);
  filter: blur(0px);
}

.preview-caption {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.preview-role {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
}

.preview-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-secondary);
  line-height: 1.5;
}

@media (max-width: 960px) {
  .section-head-main { grid-template-columns: 1fr; }
  .index-layout { grid-template-columns: 1fr; }
  .index-preview { display: none; }
  .index-link {
    grid-template-columns: 2rem minmax(0, 1fr) 1.25rem;
    padding-block: 0.95rem;
  }
  .index-meta { grid-column: 2; white-space: normal; }
  .index-arrow { grid-column: 3; grid-row: 1 / span 2; }
}

/* ---------- Shared Level-1 Hall Geometry (~1 Viewport Each) ---------- */
.hall {
  padding-block: clamp(2.6rem, 5.5vh, 4rem);
}

.hall-kicker-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1.25rem;
  margin-bottom: 0.6rem;
}

.hall-title {
  margin: 0;
  font-family: var(--font-serif-zh);
  font-size: clamp(1.85rem, 1.35rem + 1.8vw, 2.95rem);
  font-weight: 500;
  line-height: 1.16;
}

.hall-case-sub {
  margin: 0.45rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.5rem;
  font-size: clamp(0.92rem, 0.86rem + 0.25vw, 1.08rem);
  line-height: 1.5;
}

.hall-case-sub .sub-en {
  font-family: var(--font-serif-en);
  font-style: italic;
  font-size: 1.14em;
  letter-spacing: 0.01em;
}

.hall-case-sub .sub-zh {
  font-family: var(--font-serif-zh);
  font-weight: 400;
}

.hall-01 .hall-case-sub { color: var(--sage); }
.hall-02 .hall-case-sub { color: var(--ink-light-secondary); }
.hall-03 .hall-case-sub { color: var(--ink-secondary); }
.hall-04 .hall-case-sub { color: var(--ivory-secondary); }

.hanging-title {
  margin-inline-start: -0.45em;
}

@media (max-width: 520px) {
  .hall-award-tag { font-size: 0.67rem; letter-spacing: 0.03em; }
  .hanging-title { margin-inline-start: -0.35em; }
}

/* ---------- Hall 01 · 《隅见·月枕山》 · Misty Xuan-Paper Celadon (#E9EDE6) ---------- */
.hall-01 {
  background: var(--bg-yujian);
  color: var(--pine);
  border-bottom: 1px solid rgba(29, 42, 34, 0.16);
}

.sage-tag {
  color: var(--sage);
}

.hall-01-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 2.5vh, 1.85rem);
}

.hall01-wall {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: clamp(1.75rem, 5vw, 4.5rem);
  align-items: center;
}

.yujian-book-box {
  border: 1px solid rgba(29, 42, 34, 0.18);
  background: #FAFBF8;
  padding: 0.65rem;
  box-shadow: 0 18px 40px -24px rgba(29, 42, 34, 0.24);
}

.plate-stage {
  position: relative;
  margin: 0;
  aspect-ratio: 1600 / 2262;
  overflow: hidden;
  background: #E2E6DE;
}

.yujian-plate-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.018) translateY(4px);
  filter: blur(2px);
  transition: opacity 240ms var(--ease-out), transform 260ms var(--ease-out), filter 240ms var(--ease-out);
  pointer-events: none;
}

.yujian-plate-img.is-active {
  opacity: 1;
  transform: scale(1) translateY(0);
  filter: blur(0px);
}

.plate-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding-top: 0.55rem;
  font-size: 0.74rem;
  color: var(--sage);
}

.plate-step-nav {
  margin-top: 0.48rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(29, 42, 34, 0.12);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.3rem;
}

.plate-step-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.32rem 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--sage);
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, transform 160ms var(--ease-out);
}

.plate-step-btn:active {
  transform: scale(0.97);
  transition-duration: 140ms;
}

.plate-step-btn.is-active {
  color: var(--pine);
  border-color: rgba(29, 42, 34, 0.28);
  background: rgba(75, 94, 80, 0.08);
}

@media (hover: hover) and (pointer: fine) {
  .plate-step-btn:hover { color: var(--pine); }
}

.hall-title-sub {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-serif-en);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.08rem, 0.9rem + 0.6vw, 1.38rem);
  color: var(--sage);
}

.editorial-quote-clean {
  margin: 1.25rem 0 1.1rem;
  padding: 0.95rem 1.25rem;
  border-left: 2px solid var(--sage);
  background: rgba(75, 94, 80, 0.07);
}

.editorial-quote-clean p {
  margin: 0;
  font-family: var(--font-serif-zh);
  font-size: clamp(1.18rem, 1.02rem + 0.45vw, 1.48rem);
  font-weight: 500;
  color: var(--pine);
}

.hall01-lead {
  margin: 0 0 1.35rem;
  max-width: 34rem;
  font-size: 0.94rem;
  color: #36473C;
  line-height: 1.72;
}

.yujian-ticks {
  margin: 0 0 1.65rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(29, 42, 34, 0.18);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
}

.yujian-tick dt { margin: 0 0 0.2rem; }
.yujian-tick dd {
  margin: 0;
  font-family: var(--font-serif-zh);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--pine);
}

.hall01-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.5rem;
}

@media (max-width: 860px) {
  .hall01-wall {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .yujian-monograph-col {
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
  }
  .yujian-ticks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
  }
  .yujian-tick dd { font-size: 1rem; }
}

/* ---------- Hall 02 · 《四维商业矩阵》 · Deep Charcoal Darkroom (#121315 · 2B Layout) ---------- */
.hall-02 {
  background: var(--bg-dark);
  color: var(--ink-light);
  border-bottom: 1px solid var(--hairline-dark);
}

.hall-02-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(1.35rem, 3vh, 2.2rem);
}

.hall-header-compact {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hairline-dark);
}

.brass-tag { color: var(--brass); }
.dark-muted { color: var(--ink-light-muted); }

.darkroom-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: stretch;
}

.darkroom-index-col {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--hairline-dark-strong);
}

.darkroom-item {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline-dark);
  padding: 1.15rem 0.75rem;
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  transition: background-color 180ms ease;
}

.darkroom-code,
.darkroom-item-body {
  transition: transform 200ms var(--ease-out);
}

.darkroom-item:focus-visible,
.darkroom-item.is-active {
  background: rgba(200, 176, 138, 0.06);
}

.darkroom-item:focus-visible .darkroom-code,
.darkroom-item:focus-visible .darkroom-item-body,
.darkroom-item.is-active .darkroom-code,
.darkroom-item.is-active .darkroom-item-body {
  transform: translateX(6px);
}

.darkroom-code {
  color: var(--brass);
  font-size: 0.74rem;
}

.darkroom-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.darkroom-item-title {
  font-family: var(--font-serif-zh);
  font-size: clamp(1.08rem, 0.96rem + 0.35vw, 1.32rem);
  font-weight: 500;
  color: var(--ink-light);
}

.darkroom-item.is-active .darkroom-item-title {
  color: var(--brass);
}

.darkroom-item-sub {
  font-size: 0.8rem;
  color: var(--ink-light-muted);
}

.darkroom-arrow {
  color: var(--ink-light-muted);
  transition: color 180ms ease, transform 200ms var(--ease-out);
}

.darkroom-item:focus-visible .darkroom-arrow,
.darkroom-item.is-active .darkroom-arrow {
  color: var(--brass);
  transform: translateX(3px);
}

@media (hover: hover) and (pointer: fine) {
  .darkroom-item:hover {
    background: rgba(200, 176, 138, 0.06);
  }
  .darkroom-item:hover .darkroom-code,
  .darkroom-item:hover .darkroom-item-body {
    transform: translateX(6px);
  }
  .darkroom-item:hover .darkroom-arrow {
    color: var(--brass);
    transform: translateX(3px);
  }
}

/* Right Giant Telemetry Stage (Zero Nested Boxes — Only Subtle 1px Geometric Marks) */
.darkroom-telemetry {
  position: relative;
  padding: clamp(1.35rem, 3vw, 2.25rem);
  border-top: 1px solid var(--hairline-dark);
  border-bottom: 1px solid var(--hairline-dark);
  background: radial-gradient(circle at 80% 35%, rgba(200, 176, 138, 0.06), transparent 65%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.corner-tl-mark,
.corner-tr-mark,
.corner-bl-mark,
.corner-br-mark {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  border-color: var(--brass);
  border-style: solid;
}

.corner-tl-mark { top: -1px; left: 0; border-width: 1px 0 0 1px; }
.corner-tr-mark { top: -1px; right: 0; border-width: 1px 1px 0 0; }
.corner-bl-mark { bottom: -1px; left: 0; border-width: 0 0 1px 1px; }
.corner-br-mark { bottom: -1px; right: 0; border-width: 0 1px 1px 0; }

.telemetry-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1rem;
}

.telemetry-num-mask {
  overflow: hidden;
  padding-block: 0.04em;
  min-height: clamp(3.3rem, 2.5rem + 3.4vw, 5.15rem);
  display: flex;
  align-items: flex-end;
}

.telemetry-number {
  font-family: var(--font-serif-zh);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-size: clamp(2.8rem, 2.1rem + 3.2vw, 4.85rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--brass);
}

.telemetry-number.is-compact {
  font-size: clamp(2.05rem, 1.45rem + 2.05vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.telemetry-caption {
  margin: 0.65rem 0 0.4rem;
  font-family: var(--font-serif-zh);
  font-size: clamp(1.08rem, 0.96rem + 0.35vw, 1.32rem);
  color: var(--ink-light);
}

.telemetry-detail {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-light-secondary);
  line-height: 1.65;
  max-width: 32rem;
  text-wrap: balance;
}

.telemetry-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.darkroom-telemetry .telemetry-hint,
.darkroom-telemetry #telemetryAward {
  color: rgba(216, 210, 200, 0.86);
}

@media (max-width: 900px) {
  .darkroom-stage {
    grid-template-columns: 1fr;
  }
}

/* ---------- Hall 03 · 《米菲展 · 北辰荟》 · Cream Paper (#FBF8F1) + Swiss Grid + 5 Pop Stamps ---------- */
.hall-03 {
  background-color: var(--bg-miffy);
  background-image:
    linear-gradient(to right, rgba(21, 21, 21, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(21, 21, 21, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
}

.hall-03-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(1.35rem, 2.8vh, 2rem);
}

.miffy-tag { color: var(--miffy-red); }

.miffy-upper-spread {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: clamp(1.5rem, 3.8vw, 3rem);
  align-items: center;
}

.miffy-cover-frame {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  background: #FFFFFF;
  border: 1.5px solid var(--ink);
  text-align: left;
  transition: transform 200ms var(--ease-out);
}

.miffy-cover-frame::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  pointer-events: none;
  box-shadow: 4px 4px 0 var(--ink);
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
}

.miffy-cover-frame:focus-visible {
  transform: translateY(-3px);
}

.miffy-cover-frame:focus-visible::after {
  opacity: 1;
}

.miffy-cover-frame:active {
  transform: scale(0.97);
  transition-duration: 140ms;
}

@media (hover: hover) and (pointer: fine) {
  .miffy-cover-frame:hover {
    transform: translateY(-3px);
  }
  .miffy-cover-frame:hover::after {
    opacity: 1;
  }
}

.miffy-cover-media {
  display: block;
  aspect-ratio: 16 / 9;
  background: #FFFFFF;
  overflow: hidden;
}

.miffy-cover-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.miffy-cover-strip {
  display: block;
  padding: 0.48rem 0.78rem;
  border-top: 1.5px solid var(--ink);
  background: #FFFFFF;
  color: var(--ink);
  font-size: 0.68rem;
}

.miffy-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.85rem 0 0.95rem;
}

.miffy-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.82rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
}

.miffy-pill-red { background: var(--miffy-red); color: #FFFFFF; }
.miffy-pill-yellow { background: var(--miffy-yellow); color: var(--ink); }

.miffy-principle {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  color: var(--ink-secondary);
  line-height: 1.68;
}

/* 5 Architectural Site-Selection Stamps */
.miffy-stamps-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
  padding-top: 0.4rem;
}

.miffy-stamp {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.95rem 0.9rem;
  background: #FFFFFF;
  border: 1.5px solid var(--ink);
  outline: 1px dashed rgba(21, 21, 21, 0.25);
  outline-offset: -5px;
  text-align: left;
  transition: transform 220ms var(--ease-out), opacity 200ms var(--ease-out);
}

.miffy-stamp::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  pointer-events: none;
  box-shadow: 4px 5px 0 var(--ink);
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
}

@media (prefers-reduced-motion: no-preference) {
  .miffy-stamp:nth-child(1) { --stamp-rot: -1.2deg; --stamp-rest-y: 0px; }
  .miffy-stamp:nth-child(2) { --stamp-rot: 0.9deg; --stamp-rest-y: 4px; }
  .miffy-stamp:nth-child(3) { --stamp-rot: -0.6deg; --stamp-rest-y: 0px; }
  .miffy-stamp:nth-child(4) { --stamp-rot: 1.1deg; --stamp-rest-y: 4px; }
  .miffy-stamp:nth-child(5) { --stamp-rot: -0.9deg; --stamp-rest-y: 0px; }

  .miffy-stamp {
    transform: rotate(var(--stamp-rot, 0deg)) translateY(var(--stamp-rest-y, 0px));
  }

  .miffy-stamp:focus-visible {
    transform: rotate(0deg) translateY(-6px);
    z-index: 2;
  }

  .miffy-stamp:focus-visible::after {
    opacity: 1;
  }

  @media (hover: hover) and (pointer: fine) {
    .miffy-stamp:hover {
      transform: rotate(0deg) translateY(-6px);
      z-index: 2;
    }
    .miffy-stamp:hover::after {
      opacity: 1;
    }
  }

  .miffy-stamp:active {
    transform: rotate(0deg) translateY(-2px) scale(0.97);
    transition-duration: 140ms;
  }
}

.stamp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.stamp-no {
  font-size: 0.72rem;
  color: var(--ink);
  font-weight: 500;
}

.stamp-seal {
  padding: 0.14rem 0.42rem;
  font-size: 0.62rem;
  border: 1px solid var(--ink);
  color: #FFFFFF;
}

.stamp-red .stamp-seal { background: var(--miffy-red); }
.stamp-blue .stamp-seal { background: var(--miffy-blue); }
.stamp-yellow .stamp-seal { background: var(--miffy-yellow); color: var(--ink); }

.stamp-name {
  font-family: var(--font-serif-zh);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}

.stamp-loc {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.stamp-pro {
  margin-top: auto;
  padding-top: 0.45rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.78rem;
  color: var(--ink-secondary);
  line-height: 1.45;
}

@media (max-width: 1024px) {
  .miffy-stamps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .miffy-upper-spread {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .miffy-stamps-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Hall 04 · 《双城实操》 · Deep Nocturnal Burgundy (#231117 · 3B Dual Pedestals) ---------- */
.hall-04 {
  background: var(--bg-burgundy);
  color: var(--ivory);
  border-bottom: 1px solid var(--hairline-burgundy);
}

.hall-04-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(1.35rem, 2.8vh, 2rem);
}

.hall-04 .hall-header-compact {
  border-bottom-color: var(--hairline-burgundy);
}

.champagne-tag { color: var(--champagne); }
.ivory-muted { color: var(--ivory-secondary); }

.pedestal-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: stretch;
}

@media (min-width: 881px) {
  .pedestal-grid::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 1px;
    background: var(--hairline-burgundy);
    transform: translateX(-50%);
    transform-origin: top center;
    pointer-events: none;
  }
}

.pedestal-card {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  padding: clamp(0.5rem, 1.4vh, 1.15rem) 0;
  background: transparent;
  border: 0;
}

.pedestal-kicker {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
}

.pedestal-object-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-block: 0.55rem;
}

/* Minimal Obsidian-Burgundy Standby Device Sleeve (No harsh guide.html iframe on L1) */
.standby-sleeve {
  width: min(100%, 348px);
  aspect-ratio: 4 / 3;
  padding: 1.05rem 1.15rem;
  background: linear-gradient(155deg, #1F0E14 0%, #15090D 100%);
  border: 1px solid rgba(214, 190, 155, 0.42);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform 220ms var(--ease-out), border-color 220ms ease;
}

.standby-sleeve::after,
.foil-booklet::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(214, 190, 155, 0.72);
  box-shadow: 0 0 22px rgba(214, 190, 155, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms var(--ease-out);
}

.standby-sleeve:focus-visible {
  transform: translateY(-4px);
  border-color: var(--champagne);
}

.standby-sleeve:active {
  transform: scale(0.97);
  transition-duration: 140ms;
}

@media (hover: hover) and (pointer: fine) {
  .standby-sleeve:hover {
    transform: translateY(-4px);
    border-color: var(--champagne);
  }
}

.sleeve-notch {
  align-self: center;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: rgba(214, 190, 155, 0.35);
}

.sleeve-top {
  font-size: 0.62rem;
  color: var(--champagne);
}

.sleeve-emblem {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.sleeve-bilingual {
  font-family: var(--font-serif-en);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--champagne);
}

.sleeve-title {
  font-family: var(--font-serif-zh);
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--ivory);
  line-height: 1.3;
}

.sleeve-sub {
  font-size: 0.58rem;
  color: var(--ivory-secondary);
}

.sleeve-status {
  font-size: 0.62rem;
  color: var(--champagne);
  border-top: 1px solid var(--hairline-burgundy);
  padding-top: 0.45rem;
  width: 100%;
}

/* Tactile Burgundy Hot-Foil Editorial Booklet Card */
.foil-booklet {
  position: relative;
  width: min(100%, 348px);
  aspect-ratio: 4 / 3;
  padding: 0.65rem;
  background: linear-gradient(145deg, #3A1924 0%, #261017 100%);
  border: 1px solid rgba(214, 190, 155, 0.48);
  border-radius: 6px;
  text-align: left;
  display: flex;
  overflow: hidden;
  transition: transform 220ms var(--ease-out), border-color 220ms ease;
}

.foil-booklet:focus-visible {
  transform: translateY(-4px);
  border-color: var(--champagne);
}

.foil-booklet:active {
  transform: scale(0.97);
  transition-duration: 140ms;
}

@media (hover: hover) and (pointer: fine) {
  .foil-booklet:hover {
    transform: translateY(-4px);
    border-color: var(--champagne);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .standby-sleeve:focus-visible::after,
  .foil-booklet:focus-visible::after {
    animation: artifact-gold-breathe 2.6s ease-in-out infinite;
  }

  @media (hover: hover) and (pointer: fine) {
    .standby-sleeve:hover::after,
    .foil-booklet:hover::after {
      animation: artifact-gold-breathe 2.6s ease-in-out infinite;
    }
  }
}

@keyframes artifact-gold-breathe {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.95; }
}

.foil-inner-border {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(214, 190, 155, 0.32);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.foil-eyebrow {
  font-size: 0.58rem;
  color: var(--champagne);
}

.foil-brand {
  font-family: var(--font-sans);
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.15;
  color: var(--ivory);
}

.foil-rule {
  width: 36px;
  height: 1px;
  background: var(--champagne);
}

.foil-subtitle {
  font-family: var(--font-serif-en);
  font-style: italic;
  font-size: 0.96rem;
  color: var(--champagne);
  line-height: 1.25;
}

.foil-author {
  font-size: 0.58rem;
  color: var(--ivory-secondary);
}

.pedestal-summary {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ivory-secondary);
  line-height: 1.62;
}

.pedestal-ticks {
  margin: 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--hairline-burgundy);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem 0.75rem;
}

.pedestal-ticks dt { font-size: 0.64rem; margin-bottom: 0.15rem; }
.pedestal-ticks dd {
  margin: 0;
  font-family: var(--font-serif-zh);
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--ivory);
}

.pedestal-card .btn-champagne {
  margin-top: auto;
  width: 100%;
}

@media (max-width: 880px) {
  .pedestal-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .pedestal-card + .pedestal-card {
    border-top: 1px solid var(--hairline-burgundy);
    padding-top: 2rem;
  }
}

/* ---------- Act 3 · About & Contact · Return to Warm Xuan Paper (#F5F2EB) ---------- */
.about-section {
  background: var(--bg-paper);
  padding-block: clamp(2.6rem, 5.5vh, 4rem);
  border-bottom: 1px solid var(--hairline);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: clamp(1.75rem, 4.5vw, 3.75rem);
  align-items: start;
}

.about-statement p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--ink-secondary);
  line-height: 1.75;
}

.about-statement p + p { margin-top: 0.58rem; }
.about-statement strong { color: var(--ink); font-weight: 600; }

.service-callout {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline-strong);
}

.service-numbers {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.service-numbers strong {
  display: block;
  font-family: var(--font-serif-zh);
  font-size: 1.24rem;
  font-weight: 600;
  color: var(--ink);
}

.service-numbers span {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.74rem;
  color: var(--ink-secondary);
}

.honors-list {
  margin-top: 1.15rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--hairline);
}

.honors-list p {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  color: var(--ink-secondary);
  line-height: 1.62;
}

.timeline-list {
  position: relative;
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0 0 0 1.25rem;
  border-top: 1px solid var(--hairline-strong);
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--hairline-strong);
  transform-origin: top center;
  pointer-events: none;
}

.timeline-list li {
  position: relative;
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 0.35rem 1rem;
  padding-block: 0.92rem;
  border-bottom: 1px solid var(--hairline);
}

.timeline-list li::before {
  content: "";
  position: absolute;
  left: calc(-1.25rem - 2px);
  top: 1.28rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  pointer-events: none;
}

.tl-body strong {
  display: block;
  font-size: 0.88rem;
  color: var(--ink);
  margin-bottom: 0.14rem;
}

.tl-body p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-secondary);
  line-height: 1.5;
}

.contact-strip {
  margin-top: clamp(1.75rem, 4vh, 2.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline-strong);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem 1.4rem;
  align-items: end;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.contact-action-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.contact-val {
  font-family: var(--font-serif-zh);
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--ink);
}

.mini-copy-btn {
  min-height: 34px;
  padding: 0 0.6rem;
  background: transparent;
  border: 1px solid var(--hairline-strong);
  color: var(--ink-secondary);
  font-size: 0.66rem;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 160ms var(--ease-out);
}

.mini-copy-btn:active {
  transform: scale(0.97);
  transition-duration: 140ms;
}

@media (hover: hover) and (pointer: fine) {
  .mini-copy-btn:hover {
    background: var(--ink);
    color: var(--bg-paper);
    border-color: var(--ink);
  }
}

.contact-resume-cell .btn { width: 100%; }

@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; }
  .contact-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .service-numbers,
  .contact-strip { grid-template-columns: 1fr; }
  .timeline-list li { grid-template-columns: 1fr; gap: 0.2rem; }
}

.site-footer {
  background: var(--bg-paper);
  padding-block: 1.35rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem 1.5rem;
}

.footer-left,
.footer-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.footer-top {
  color: var(--ink);
  border-bottom: 1px solid var(--hairline-strong);
  padding-bottom: 0.1rem;
}

/* ---------- Chapter Transition Rituals (Opening Threshold & Closing Plaque) ---------- */
.chapter-threshold {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(0.4rem, 1vh, 0.75rem);
}

.chapter-threshold-close {
  margin-bottom: clamp(0.9rem, 2vh, 1.45rem);
}

.chapter-threshold .mono-tag {
  white-space: nowrap;
  flex-shrink: 0;
}

.threshold-line {
  flex: 1;
  height: 1px;
  background: var(--hairline-strong);
  transform-origin: left center;
}

.chapter-threshold-open .threshold-line {
  background: rgba(29, 42, 34, 0.22);
}

.chapter-threshold-open .threshold-line:first-child,
.chapter-threshold-close .threshold-line:first-child {
  transform-origin: right center;
}

@media (prefers-reduced-motion: no-preference) {
  .threshold-line {
    transform: scaleX(0.45);
    transition: transform 320ms var(--ease-out);
  }
  .is-act-active .threshold-line,
  .is-entered .threshold-line {
    transform: scaleX(1);
  }
  html.no-sda .hall-01 .yujian-book-box {
    transform: translateY(10px) scale(0.975);
    transition: transform 320ms var(--ease-out);
  }
  html.no-sda .hall-01.is-act-active .yujian-book-box {
    transform: translateY(0) scale(1);
  }
}

.snap-anchor {
  display: none;
}

/* ---------- Desktop Full-Screen Framing, Sticky Stacking & Scroll Snap (@media (min-width: 1024px)) ---------- */
@media (min-width: 1024px) {
  html {
    scroll-padding-top: 0;
  }

  .site-header {
    position: fixed;
    top: 0;
    inset-inline: 0;
  }

  .snap-anchor {
    display: block;
    height: 1px;
    margin-bottom: -1px;
    opacity: 0;
    pointer-events: none;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  #hero,
  #index,
  #hall-01,
  #hall-02,
  #hall-03,
  #hall-04,
  #about {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Physical sticky-card depth stack */
  #hero { position: sticky; top: 0; z-index: 1; }
  #index { position: sticky; top: 0; z-index: 2; }
  #hall-01 { position: sticky; top: 0; z-index: 3; }
  #hall-02 { position: sticky; top: 0; z-index: 4; }
  #hall-03 {
    position: sticky;
    top: 0;
    z-index: 5;
    border-top: 1px solid rgba(21, 21, 21, 0.08);
    box-shadow: 0 -18px 36px rgba(0, 0, 0, 0.28);
  }

  .finale-wrap {
    position: relative;
    z-index: 6;
  }

  #hall-04 {
    position: relative;
    z-index: 2;
  }

  #about {
    position: sticky;
    bottom: 0;
    z-index: 1;
  }

  .site-footer {
    position: relative;
    z-index: 7;
    scroll-snap-align: end;
    scroll-snap-stop: normal;
  }

  #hero {
    padding-top: var(--header-h);
    padding-bottom: 0;
  }

  .hero-inner {
    flex: 1;
    min-block-size: calc(100svh - var(--header-h));
    padding-block: clamp(1.15rem, 2.5vh, 1.9rem) clamp(1.45rem, 3vh, 2.15rem);
  }

  .hero-plate-wrap {
    height: clamp(380px, 54vh, 500px);
  }

  .hero-title .mask-rise-inner {
    white-space: nowrap;
  }

  #index,
  #hall-01,
  #hall-02,
  #hall-03,
  #hall-04,
  #about {
    padding-block: calc(var(--header-h) + clamp(1.35rem, 3.2vh, 2.5rem)) clamp(1.35rem, 3.2vh, 2.5rem);
  }

  .hall-01-inner {
    gap: clamp(1.1rem, 2.4vh, 1.85rem);
  }

  .hall-02-inner,
  .hall-03-inner,
  .hall-04-inner {
    gap: clamp(1.6rem, 3.4vh, 2.5rem);
  }

  .yujian-book-box {
    max-width: 340px;
  }

  .darkroom-item {
    padding: 1.35rem 0.75rem;
  }

  .miffy-stamps-grid {
    padding-top: 0.75rem;
  }

  .contact-strip {
    margin-top: clamp(1.65rem, 3.5vh, 2.4rem);
  }
}

@media (min-width: 1024px) and (min-height: 760px) {
  html {
    scroll-snap-type: y proximity;
  }
  html.is-anchor-jumping {
    scroll-snap-type: none;
    scroll-behavior: auto;
  }
}

/* ---------- 4 Physically Distinct Desktop Scroll-Driven Morph Transitions ---------- */
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    main {
      timeline-scope: --s-index, --s-hall01, --s-hall02, --s-hall03, --s-hall04, --s-finale;
    }

    #index { view-timeline-name: --s-index; view-timeline-axis: block; }
    #hall-01 { view-timeline-name: --s-hall01; view-timeline-axis: block; }
    #hall-02 { view-timeline-name: --s-hall02; view-timeline-axis: block; }
    #hall-03 { view-timeline-name: --s-hall03; view-timeline-axis: block; }
    #hall-04 { view-timeline-name: --s-hall04; view-timeline-axis: block; }
    .finale-wrap { view-timeline-name: --s-finale; view-timeline-axis: block; }

    /* 1. #hero -> #index: Paper stack recede + plate scroll parallax + soft #index glide */
    #hero > .container {
      transform-origin: center top;
      animation: hero-recede cubic-bezier(0.32, 0, 0.16, 1) both;
      animation-timeline: --s-index;
      animation-range: entry 0% entry 96%;
    }

    #hero .hero-plate-img {
      animation: hero-plate-parallax cubic-bezier(0.32, 0, 0.16, 1) both;
      animation-timeline: --s-index;
      animation-range: entry 0% entry 96%;
    }

    /* 2. Ritual A (#index -> #hall-01): Index glide in/out + center-axis gallery doors + book advance */
    #index > .container {
      transform-origin: center center;
      animation:
        hall-enter-soft cubic-bezier(0.26, 0, 0.14, 1) backwards,
        index-recede cubic-bezier(0.32, 0, 0.16, 1) forwards;
      animation-timeline: --s-index, --s-hall01;
      animation-range: entry 0% entry 96%, entry 0% entry 96%;
    }

    #hall-01 {
      animation: hall01-doors cubic-bezier(0.28, 0, 0.14, 1) both;
      animation-timeline: --s-hall01;
      animation-range: entry 0% entry 96%;
    }

    #hall-01 > .container {
      transform-origin: center center;
      animation:
        hall-enter-soft cubic-bezier(0.26, 0, 0.14, 1) backwards,
        hall-recede-soft cubic-bezier(0.32, 0, 0.16, 1) forwards;
      animation-timeline: --s-hall01, --s-hall02;
      animation-range: entry 0% entry 96%, entry 0% entry 96%;
    }

    .hall-01 .yujian-book-box {
      animation: book-advance cubic-bezier(0.26, 0, 0.14, 1) both;
      animation-timeline: --s-hall01;
      animation-range: entry 8% entry 96%;
    }

    /* 3a. Hall 01 -> Hall 02: Darkroom centered viewfinder aperture */
    #hall-02 {
      animation: hall02-aperture cubic-bezier(0.28, 0, 0.14, 1) both;
      animation-timeline: --s-hall02;
      animation-range: entry 0% entry 96%;
    }

    /* 3b. Hall 02 -> Hall 03: Hard card-stock cover + soft #hall-03 glide */
    #hall-02 > .container {
      transform-origin: center center;
      animation:
        hall-enter-soft cubic-bezier(0.26, 0, 0.14, 1) backwards,
        darkroom-recede cubic-bezier(0.32, 0, 0.16, 1) forwards;
      animation-timeline: --s-hall02, --s-hall03;
      animation-range: entry 0% entry 96%, entry 0% entry 96%;
    }

    /* 3c. Hall 03 -> Hall 04: Restrained burgundy velvet press */
    #hall-03 > .container {
      transform-origin: center center;
      animation:
        hall-enter-soft cubic-bezier(0.26, 0, 0.14, 1) backwards,
        hall-recede-soft cubic-bezier(0.32, 0, 0.16, 1) forwards;
      animation-timeline: --s-hall03, --s-hall04;
      animation-range: entry 0% entry 96%, entry 0% entry 96%;
    }

    #hall-04 {
      animation:
        hall04-velvet-enter cubic-bezier(0.28, 0, 0.14, 1) both,
        hall04-curtain-lift cubic-bezier(0.32, 0, 0.16, 1) both;
      animation-timeline: --s-hall04, --s-hall04;
      animation-range: entry 0% entry 96%, exit 0% exit 92%;
    }

    #hall-04 > .container {
      transform-origin: center center;
      animation: hall-enter-soft cubic-bezier(0.26, 0, 0.14, 1) backwards;
      animation-timeline: --s-hall04;
      animation-range: entry 0% entry 96%;
    }

    /* 4. Ritual B (#hall-04 -> #about): Smooth lights-on crossfade as curtain lifts */
    #about {
      animation: about-stage-ready cubic-bezier(0.26, 0, 0.14, 1) both;
      animation-timeline: --s-finale;
      animation-range: entry 50% entry 96%;
    }
  }
}

@keyframes hero-recede {
  from { transform: scale(1) translateY(0); opacity: 1; }
  to { transform: scale(0.955) translateY(-2.5%); opacity: 0.42; }
}

@keyframes hero-plate-parallax {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-20px) scale(1.035); }
}

@keyframes hall-enter-soft {
  from { translate: 0 16px; opacity: 0.82; }
  to { translate: 0 0; opacity: 1; }
}

@keyframes index-recede {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(0.95); opacity: 0.38; }
}

@keyframes hall01-doors {
  0% { clip-path: inset(0% 10% 0% 10% round 10px); }
  100% { clip-path: inset(0% 0% 0% 0% round 0px); }
}

@keyframes book-advance {
  from { transform: translateY(16px) scale(0.968); }
  to { transform: translateY(0) scale(1); }
}

@keyframes hall-recede-soft {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(0.955); opacity: 0.42; }
}

@keyframes hall02-aperture {
  0% { clip-path: inset(6% 5% 6% 5% round 16px); }
  100% { clip-path: inset(0% 0% 0% 0% round 0px); }
}

@keyframes darkroom-recede {
  from { transform: scale(1) translateY(0); opacity: 1; }
  to { transform: scale(0.955) translateY(-2%); opacity: 0.36; }
}

@keyframes hall04-velvet-enter {
  0% { clip-path: inset(5% 3% 0% 3% round 14px 14px 0 0); }
  100% { clip-path: inset(0% 0% 0% 0% round 0px); }
}

@keyframes hall04-curtain-lift {
  from { clip-path: inset(0% 0% 0% 0% round 0px); }
  to { clip-path: inset(0% 4.5% 0% 4.5% round 12px); }
}

@keyframes about-stage-ready {
  0% { opacity: 0.18; transform: translateY(16px) scale(0.988); pointer-events: none; }
  18% { pointer-events: none; }
  100% { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
}

@media (prefers-reduced-motion: reduce) {
  #hero > .container,
  #hero .hero-plate-img,
  #index > .container,
  #hall-01,
  #hall-01 > .container,
  #hall-02,
  #hall-02 > .container,
  #hall-03,
  #hall-03 > .container,
  #hall-04,
  #hall-04 > .container,
  #about {
    animation: none;
    clip-path: none;
    filter: none;
    transform: none;
    translate: none;
    opacity: 1;
  }
}

dialog,
.room-body {
  scroll-snap-type: none;
}

/* ==========================================================================
   LEVEL-2 NATIVE <dialog> EXHIBITION ROOMS & LIGHTBOX
   Smooth @starting-style + transition-behavior: allow-discrete + scroll lock
   ========================================================================== */

dialog {
  margin: auto;
  padding: 0;
  border: 0;
  overscroll-behavior: contain;
  opacity: 0;
  transition-property: opacity, transform, display, overlay;
  transition-duration: 180ms;
  transition-timing-function: var(--ease-drawer);
  transition-behavior: allow-discrete;
}

@media (prefers-reduced-motion: no-preference) {
  dialog {
    transform: translateY(10px) scale(0.97);
  }
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background-color: rgba(12, 13, 15, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  overflow: hidden;
  overscroll-behavior: contain;
  transition-property: background-color, backdrop-filter, -webkit-backdrop-filter, display, overlay;
  transition-duration: 180ms;
  transition-timing-function: var(--ease-drawer);
  transition-behavior: allow-discrete;
}

:is(dialog[open]):where(:not([data-closing])) {
  display: grid;
  opacity: 1;
  transition-duration: 280ms;
  transition-timing-function: var(--ease-drawer);

  @starting-style {
    opacity: 0;
  }

  @media (prefers-reduced-motion: no-preference) {
    transform: translateY(0) scale(1);

    @starting-style {
      transform: translateY(10px) scale(0.97);
    }
  }

  &::backdrop {
    background-color: rgba(12, 13, 15, 0.74);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition-duration: 280ms;
    transition-timing-function: var(--ease-drawer);

    @starting-style {
      background-color: rgba(12, 13, 15, 0);
      backdrop-filter: blur(0px);
      -webkit-backdrop-filter: blur(0px);
    }
  }
}

:is(dialog.room-dialog[open]).is-receded-by-album {
  opacity: 0;
  pointer-events: none;
  transition-duration: 180ms;
  transition-timing-function: var(--ease-drawer);
}

@media (prefers-reduced-motion: no-preference) {
  :is(dialog.room-dialog[open]).is-receded-by-album {
    transform: scale(0.96);
  }
}

:is(dialog.room-dialog[open]).is-receded-by-album::backdrop {
  background-color: rgba(12, 13, 15, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition-duration: 180ms;
}

@media (prefers-reduced-motion: reduce) {
  dialog,
  dialog::backdrop,
  :is(dialog[open]):where(:not([data-closing])),
  :is(dialog[open]):where(:not([data-closing]))::backdrop,
  :is(dialog.room-dialog[open]).is-receded-by-album,
  :is(dialog.room-dialog[open]).is-receded-by-album::backdrop {
    transition-duration: 120ms;
  }
}

/* Room Dialog Dimensions & Theme Skins */
.room-dialog {
  width: min(94vw, 1140px);
  max-width: min(94vw, 1140px);
  max-height: min(86dvh, 820px);
  height: auto;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34);
}

.room-theme-yujian {
  color-scheme: light;
  background: var(--bg-yujian-room);
  color: var(--pine);
  border: 1px solid rgba(29, 42, 34, 0.25);
}

.room-theme-dark {
  color-scheme: dark;
  background: var(--bg-dark);
  color: var(--ink-light);
  border: 1px solid var(--hairline-dark-strong);
}

.room-theme-miffy {
  color-scheme: light;
  background: var(--bg-miffy);
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.room-theme-burgundy {
  color-scheme: dark;
  background: var(--bg-burgundy);
  color: var(--ivory);
  border: 1px solid var(--hairline-burgundy-strong);
}

.room-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(86dvh, 820px);
  width: 100%;
}

.room-topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: clamp(0.9rem, 2vw, 1.35rem) clamp(1.1rem, 2.5vw, 1.85rem);
  border-bottom: 1px solid var(--hairline);
}

.room-theme-dark .room-topbar { border-bottom-color: var(--hairline-dark); }
.room-theme-burgundy .room-topbar { border-bottom-color: var(--hairline-burgundy); }
.room-theme-miffy .room-topbar { border-bottom-color: var(--ink); }

.room-title {
  margin: 0.2rem 0 0;
  font-family: var(--font-serif-zh);
  font-size: clamp(1.15rem, 0.98rem + 0.65vw, 1.6rem);
  font-weight: 500;
  line-height: 1.25;
}

.room-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.room-close,
.album-close {
  min-height: 38px;
  padding: 0 0.9rem;
  background: transparent;
  border: 1px solid currentColor;
  font-size: 0.82rem;
  opacity: 0.85;
  transition: opacity 180ms ease, background-color 180ms ease, color 180ms ease, transform 160ms var(--ease-out);
}

.room-close:focus-visible,
.album-close:focus-visible {
  opacity: 1;
}

.room-close:active,
.album-close:active {
  transform: scale(0.97);
  transition-duration: 140ms;
}

@media (hover: hover) and (pointer: fine) {
  .room-close:hover,
  .album-close:hover {
    opacity: 1;
  }
}

.room-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.1rem, 2.8vw, 2rem) clamp(1.1rem, 2.8vw, 2rem);
  --scrollbar-thumb: #766F66;
  --scrollbar-track: #EFEAE0;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.room-theme-yujian .room-body {
  --scrollbar-thumb: #5F7364;
  --scrollbar-track: #E5EAE2;
}

.room-theme-dark .room-body {
  --scrollbar-thumb: #7C7468;
  --scrollbar-track: #18191C;
}

.room-theme-miffy .room-body {
  --scrollbar-thumb: #766F66;
  --scrollbar-track: #EFEAE0;
}

.room-theme-burgundy .room-body {
  --scrollbar-thumb: #8F756C;
  --scrollbar-track: #2B151D;
}

@supports not (scrollbar-color: auto) {
  .room-body {
    scrollbar-width: auto;
  }

  .room-body::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  .room-body::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }

  .room-body::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
  }
}

/* Room 01 Yujian Content Styles */
.editorial-quote {
  margin: 0 0 1.45rem;
  padding: 1rem 1.25rem;
  border-left: 2px solid var(--sage);
  background: rgba(75, 94, 80, 0.08);
}

.editorial-quote p {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif-zh);
  font-size: 1.32rem;
  font-weight: 500;
  color: var(--pine);
}

.yujian-room-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
  margin: 0 0 1.45rem;
}

.yujian-room-thumb {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #E4E9E0;
  border: 1px solid rgba(29, 42, 34, 0.18);
  text-align: left;
  overflow: hidden;
  transition: transform 200ms var(--ease-out), border-color 180ms ease, background-color 180ms ease;
}

.yujian-room-thumb:focus-visible {
  transform: translateY(-2px);
  border-color: var(--sage);
  background: #DCE4D8;
}

.yujian-room-thumb:active {
  transform: scale(0.97);
  transition-duration: 140ms;
}

.yujian-thumb-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0.55rem;
  background: radial-gradient(ellipse at 50% 44%, #F4F6F1 0%, #E1E7DD 100%);
}

.yujian-thumb-media img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border: 1px solid rgba(29, 42, 34, 0.12);
  box-shadow:
    -2px 0 0 rgba(29, 42, 34, 0.08),
    0 8px 18px -8px rgba(29, 42, 34, 0.28);
}

.yujian-thumb-cap {
  display: block;
  padding: 0.46rem 0.65rem;
  border-top: 1px solid rgba(29, 42, 34, 0.14);
  background: rgba(239, 242, 236, 0.92);
  color: var(--pine);
  font-size: 0.68rem;
  transition: color 180ms ease;
}

.yujian-room-thumb:focus-visible .yujian-thumb-cap {
  color: var(--sage);
}

@media (hover: hover) and (pointer: fine) {
  .yujian-room-thumb:hover {
    transform: translateY(-2px);
    border-color: var(--sage);
    background: #DCE4D8;
  }
  .yujian-room-thumb:hover .yujian-thumb-cap {
    color: var(--sage);
  }
}

@media (max-width: 720px) {
  .yujian-room-strip {
    grid-template-columns: 1fr;
  }
}

.room-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2.25rem;
  margin-bottom: 1.5rem;
}

.room-block {
  padding-top: 1.15rem;
  border-top: 1px solid rgba(29, 42, 34, 0.15);
}

.block-label { margin: 0 0 0.5rem; color: var(--pine); }
.block-body { margin: 0 0 0.75rem; font-size: 0.9rem; color: #36473C; }

.metric-bullets {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.86rem;
  color: var(--pine);
}
.metric-bullets li + li { margin-top: 0.32rem; }

.mini-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(29, 42, 34, 0.18);
  gap: 0.75rem;
  padding-top: 0.75rem;
}

.mini-stat { display: flex; flex-direction: column; gap: 0.12rem; }
.stat-num { font-family: var(--font-serif-zh); font-size: 1.18rem; font-weight: 600; color: var(--pine); }
.stat-lbl { font-size: 0.74rem; color: #36473C; }

.space-matrix {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(29, 42, 34, 0.16);
}

.space-matrix li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding-block: 0.55rem;
  border-bottom: 1px solid rgba(29, 42, 34, 0.12);
  font-size: 0.88rem;
}

.space-name small { margin-left: 0.35rem; font-size: 0.68rem; }
.space-price { color: var(--pine); white-space: nowrap; }
.matrix-footnote { margin: 0.7rem 0 0; font-size: 0.8rem; color: #4B5E50; line-height: 1.58; }

@media (max-width: 820px) {
  .room-two-col { grid-template-columns: 1fr; }
  .mini-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .space-matrix li { flex-direction: column; gap: 0.2rem; }
}

/* Room 02 Darkroom Tablist & Panels */
.tablist-scroll {
  display: flex;
  overflow-x: auto;
  gap: 0.25rem;
  border-bottom: 1px solid var(--hairline-dark);
  margin-bottom: 1.5rem;
  scrollbar-width: none;
  scroll-snap-type: inline proximity;
}

.tablist-scroll::-webkit-scrollbar { display: none; }

[role="tab"] {
  flex: none;
  scroll-snap-align: start;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 0.95rem;
  background: transparent;
  border: 0;
  font-size: 0.86rem;
  color: var(--ink-light-secondary);
  white-space: nowrap;
  transition: color 0.18s ease;
}

[role="tab"]:focus-visible,
[role="tab"][aria-selected="true"] { color: var(--ink-light); }

[role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  border-block-end: 2px solid var(--brass);
}

@media (hover: hover) and (pointer: fine) {
  [role="tab"]:hover { color: var(--ink-light); }
}

.tab-code { color: var(--brass); }

@keyframes panel-morph-in {
  from { opacity: 0.72; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

[role="tabpanel"]:not([hidden]) {
  animation: panel-morph-in 200ms var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  [role="tabpanel"]:not([hidden]) { animation: none; }
}

.panel-frame {
  position: relative;
  background: var(--bg-dark-panel);
  border: 1px solid var(--hairline-dark);
  padding: clamp(1.15rem, 2.8vw, 2rem);
}

.corner-brackets::before,
.corner-brackets::after,
.corner-tr,
.corner-bl {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
  border-color: var(--brass);
  border-style: solid;
}

.corner-brackets::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.corner-brackets::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.corner-tr { top: -1px; right: -1px; border-width: 1px 1px 0 0; }
.corner-bl { bottom: -1px; left: -1px; border-width: 0 0 1px 1px; }

.case-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem 1.75rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--hairline-dark);
}

.case-title {
  margin: 0.4rem 0 0;
  font-family: var(--font-serif-zh);
  font-size: clamp(1.32rem, 1.05rem + 0.8vw, 1.82rem);
  font-weight: 500;
}

.case-kpis { display: flex; flex-wrap: wrap; gap: 0.7rem 1.3rem; }
.kpi-box { display: flex; flex-direction: column; padding-left: 0.8rem; border-left: 1px solid var(--hairline-dark-strong); }
.kpi-num { font-family: var(--font-serif-zh); font-size: 1.42rem; font-weight: 600; color: var(--brass); line-height: 1.18; }
.kpi-lbl { font-size: 0.72rem; color: var(--ink-light-muted); }

.case-intro { margin: 1.1rem 0 0; color: var(--ink-light-secondary); max-width: 56rem; font-size: 0.92rem; }
.case-intro strong { color: var(--ink-light); font-weight: 500; }

.dark-section { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--hairline-dark); }
.diagram-caption { margin-bottom: 0.85rem; color: var(--ink-light-muted); }
.consulting-svg { width: 100%; height: auto; }
.mobile-dual-chain { display: none; }

@media (max-width: 720px) {
  .desktop-only-svg { display: none; }
  .mobile-dual-chain { display: flex; flex-direction: column; gap: 0.55rem; }
  .m-chain-node, .m-chain-nexus { padding: 0.8rem 0.9rem; border-left: 2px solid var(--hairline-dark-strong); }
  .m-chain-nexus { border-left-color: var(--brass); background: rgba(200, 176, 138, 0.06); }
  .m-chain-node strong, .m-chain-nexus strong { display: block; margin: 0.22rem 0; font-size: 0.94rem; color: var(--ink-light); }
  .m-chain-node p, .m-chain-nexus p { margin: 0; font-size: 0.82rem; color: var(--ink-light-secondary); }
  .m-chain-connector { padding-left: 0.9rem; color: var(--brass); font-size: 0.68rem; }
}

.wyndham-two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2.25rem; }
.dark-subblock h4 { margin: 0; }
.season-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem 1rem; margin-bottom: 1rem; }
.season-pills { display: inline-flex; gap: 0.35rem; }

.season-pill {
  min-height: 34px;
  padding: 0 0.72rem;
  background: transparent;
  border: 1px solid var(--hairline-dark-strong);
  color: var(--ink-light-secondary);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 160ms var(--ease-out);
}

.season-pill:active {
  transform: scale(0.97);
  transition-duration: 140ms;
}

.season-pill.is-active { background: var(--brass); border-color: var(--brass); color: var(--bg-dark); font-weight: 500; }

@media (hover: hover) and (pointer: fine) {
  .season-pill:hover { border-color: var(--brass); color: var(--ink-light); }
}

.season-metrics { display: flex; flex-direction: column; gap: 0.9rem; }
.season-metric-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; margin-bottom: 0.35rem; }
.season-lbl { font-size: 0.84rem; color: var(--ink-light-secondary); }
.season-num { font-family: var(--font-serif-zh); font-size: 1.65rem; font-weight: 600; color: var(--ink-light); line-height: 1.1; }
.season-num.accent-num { color: var(--brass); }
.season-track { width: 100%; height: 6px; background: rgba(242, 239, 233, 0.09); overflow: hidden; }
.season-bar {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transition: transform 240ms var(--ease-out);
}
.bar-wk { background: rgba(242, 239, 233, 0.45); }
.bar-we { background: var(--brass); }
.season-insight { margin: 0.85rem 0 0; font-size: 0.82rem; color: var(--ink-light-muted); }

.dark-ordered-list { margin: 0.8rem 0 0; padding-left: 1.15rem; font-size: 0.86rem; color: var(--ink-light-secondary); }
.dark-ordered-list li + li { margin-top: 0.48rem; }
.dark-ordered-list strong { color: var(--ink-light); }

.case-footer-link { margin-top: 1.45rem; padding-top: 1rem; border-top: 1px solid var(--hairline-dark); display: flex; justify-content: flex-end; }
.dark-pdf-link { display: inline-flex; align-items: center; gap: 0.45rem; background: transparent; border: 0; padding: 0.3rem 0; font-family: var(--font-mono); font-size: 0.76rem; color: var(--brass); border-bottom: 1px solid rgba(200, 176, 138, 0.35); transition: color 180ms ease, border-color 180ms ease, transform 160ms var(--ease-out); }
.dark-pdf-link:active { transform: scale(0.97); transition-duration: 140ms; }
.dark-pdf-link:focus-visible { color: var(--ink-light); border-bottom-color: var(--ink-light); }

.ifs-report-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.ifs-thumb { padding: 0; background: var(--bg-dark); border: 1px solid var(--hairline-dark); text-align: left; overflow: hidden; transition: transform 200ms var(--ease-out), border-color 180ms ease; }
.ifs-thumb:focus-visible { transform: translateY(-2px); border-color: var(--brass); }
.ifs-thumb:active { transform: scale(0.97); transition-duration: 140ms; }
.ifs-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.ifs-thumb span { display: block; padding: 0.48rem 0.65rem; border-top: 1px solid var(--hairline-dark); color: var(--ink-light-secondary); font-size: 0.68rem; transition: color 180ms ease; }
.ifs-thumb:focus-visible span { color: var(--brass); }

@media (hover: hover) and (pointer: fine) {
  .dark-pdf-link:hover { color: var(--ink-light); border-bottom-color: var(--ink-light); }
  .ifs-thumb:hover { transform: translateY(-2px); border-color: var(--brass); }
  .ifs-thumb:hover span { color: var(--brass); }
}

@media (max-width: 720px) {
  .ifs-report-strip { grid-template-columns: 1fr; }
}

.niccolo-split { display: grid; grid-template-columns: minmax(160px, 210px) minmax(0, 1fr); gap: 1.35rem 1.85rem; align-items: center; margin-top: 1.2rem; }
.niccolo-cover-plate { margin: 0; border: 1px solid var(--hairline-dark-strong); padding: 0.35rem; background: var(--bg-dark); }
.niccolo-cover-plate img { width: 100%; aspect-ratio: 1400 / 1812; object-fit: contain; }
.niccolo-brief .case-intro { margin-top: 0; }
.dark-bullet-list { margin: 0.85rem 0 0; padding-left: 1.15rem; font-size: 0.86rem; color: var(--ink-light-secondary); }
.dark-bullet-list li + li { margin-top: 0.42rem; }
.dark-bullet-list strong { color: var(--ink-light); }

.dark-three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.35rem 1.85rem; }
.dark-body-sm { margin: 0.45rem 0 0; font-size: 0.84rem; color: var(--ink-light-secondary); line-height: 1.58; }
.brand-stance { margin: 0.3rem 0 0; font-family: var(--font-serif-zh); font-size: 1.15rem; font-weight: 500; color: var(--ink-light); }

.ifs-folding-strip { display: grid; grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1fr); gap: 1rem 1.75rem; align-items: center; }
.folding-equation { margin-top: 0.4rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; font-family: var(--font-serif-zh); font-size: 1.15rem; color: var(--ink-light); }
.folding-equation strong { color: var(--brass); font-size: 1.35rem; }
.eq-cross { color: var(--ink-light-muted); }
.ifs-folding-strip .case-intro { margin: 0; }

.amn-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem 1.85rem; }
.amn-step { padding-top: 0.6rem; border-top: 1px solid rgba(200, 176, 138, 0.35); }
.amn-step strong { display: block; margin: 0.3rem 0 0.25rem; font-size: 0.92rem; color: var(--ink-light); }
.amn-step p { margin: 0; font-size: 0.82rem; color: var(--ink-light-secondary); line-height: 1.55; }

@media (max-width: 820px) {
  .wyndham-two-col, .dark-three-col, .ifs-folding-strip, .amn-flow, .niccolo-split { grid-template-columns: 1fr; }
}

/* Container-Query Responsive Tables (Luckin & Miffy inside Level-2 Rooms) */
.table-wrapper { overflow-x: auto; max-inline-size: 100%; container-type: inline-size; }
.strategy-table, .miffy-table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: 0.86rem; }
.strategy-table caption, .miffy-table caption { text-align: left; margin-bottom: 0.85rem; }

.strategy-table thead th {
  padding: 0.65rem 0.8rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--brass);
  background: var(--bg-dark-panel); border-top: 1px solid var(--hairline-dark-strong); border-bottom: 1px solid var(--hairline-dark-strong);
}
.strategy-table tbody th, .strategy-table tbody td { padding: 0.75rem 0.8rem; border-bottom: 1px solid var(--hairline-dark); vertical-align: top; }
.strategy-table tbody th { font-weight: 600; color: var(--ink-light); white-space: nowrap; }
.strategy-table tbody td { color: var(--ink-light-secondary); }

@container (width < 600px) {
  .strategy-table, .strategy-table caption, .strategy-table thead, .strategy-table tbody, .strategy-table tr, .strategy-table th, .strategy-table td { display: block; width: 100%; }
  .strategy-table thead { display: none; }
  .strategy-table tr { margin-block-end: 1rem; border-top: 1px solid var(--hairline-dark-strong); padding-top: 0.25rem; }
  .strategy-table tbody th { padding: 0.5rem 0 0.3rem; border-bottom: 1px solid var(--hairline-dark); color: var(--brass); }
  .strategy-table tbody td { padding: 0.4rem 0; border-bottom: 0; }
  .strategy-table td:nth-child(2)::before { content: "早期瑞幸 (2017–2019)："; display: block; font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-light-muted); }
  .strategy-table td:nth-child(3)::before { content: "转型后瑞幸 (2020–2025)："; display: block; font-family: var(--font-mono); font-size: 0.68rem; color: var(--brass); }
}

/* Room 03 Miffy Content */
.miffy-room-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.5rem 2rem;
  align-items: start;
  margin-bottom: 1.6rem;
}

.miffy-room-note h3 { margin: 0 0 0.45rem; color: var(--ink); }
.miffy-room-note p { margin: 0; font-size: 0.9rem; color: var(--ink-secondary); }
.miffy-checklist-note { margin-top: 0.7rem !important; font-size: 0.84rem !important; }

.miffy-mini-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.miffy-mini-card {
  padding: 0;
  background: #FFFFFF;
  border: 1.5px solid var(--ink);
  text-align: left;
  overflow: hidden;
  transition: transform 180ms var(--ease-out);
}

.miffy-mini-card:active {
  transform: scale(0.97);
  transition-duration: 140ms;
}
.miffy-mini-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #FFFFFF; }
.miffy-mini-card span { display: block; padding: 0.36rem 0.45rem; border-top: 1px solid var(--hairline-strong); font-size: 0.66rem; color: var(--ink); }

.miffy-table-wrapper { border-top: 1.5px solid var(--ink); padding-top: 1.15rem; }
.miffy-table caption { color: var(--ink-secondary); }
.miffy-table thead th { padding: 0.68rem 0.8rem; background: var(--ink); color: var(--bg-miffy); font-family: var(--font-mono); font-size: 0.72rem; }
.miffy-table tbody th, .miffy-table tbody td { padding: 0.75rem 0.8rem; border-bottom: 1px solid var(--hairline-strong); vertical-align: top; }
.miffy-table tbody th { font-family: var(--font-mono); font-size: 0.8rem; color: var(--miffy-red); white-space: nowrap; }
.miffy-table tbody td { color: var(--ink-secondary); }
.miffy-table tbody tr.is-highlighted { background: rgba(229, 184, 46, 0.2); }

.table-jump-btn {
  padding: 0.28rem 0.55rem;
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 0.68rem;
  white-space: nowrap;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 160ms var(--ease-out);
}

.table-jump-btn:active {
  transform: scale(0.97);
  transition-duration: 140ms;
}

@media (hover: hover) and (pointer: fine) {
  .miffy-mini-card:hover { transform: translateY(-2px); }
  .table-jump-btn:hover { background: var(--miffy-red); border-color: var(--miffy-red); color: #FFFFFF; }
}

@media (max-width: 860px) {
  .miffy-room-intro { grid-template-columns: 1fr; }
  .miffy-mini-strip { grid-template-columns: 1fr; }
}

@container (width < 600px) {
  .miffy-table, .miffy-table caption, .miffy-table thead, .miffy-table tbody, .miffy-table tr, .miffy-table th, .miffy-table td { display: block; width: 100%; }
  .miffy-table thead { display: none; }
  .miffy-table tr { margin-block-end: 1rem; border: 1.5px solid var(--ink); background: #FFFFFF; padding: 0.7rem 0.85rem; }
  .miffy-table tbody th { padding: 0 0 0.4rem; border-bottom: 1px solid var(--hairline); margin-bottom: 0.4rem; }
  .miffy-table tbody td { padding: 0.3rem 0; border-bottom: 0; }
  .miffy-table td:nth-child(2)::before { content: "主展位置："; display: block; font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-muted); }
  .miffy-table td:nth-child(3)::before { content: "核心优势："; display: block; font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-muted); }
  .miffy-table td:nth-child(4)::before { content: "限制与待核实："; display: block; font-family: var(--font-mono); font-size: 0.68rem; color: var(--miffy-red); }
}

/* Room 04-A & 04-B Deep Burgundy Rooms */
.conf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1.75rem 2.5rem;
  align-items: start;
}

.conf-lead { margin: 0 0 1.2rem; color: var(--ivory-secondary); font-size: 0.92rem; }
.conf-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  padding-block: 1rem;
  border-top: 1px solid var(--hairline-burgundy);
  border-bottom: 1px solid var(--hairline-burgundy);
}
.conf-item h3 { margin: 0 0 0.35rem; }
.conf-item p { margin: 0; font-size: 0.85rem; color: var(--ivory-secondary); line-height: 1.58; }

.conf-diagram-wrap { margin-top: 1.25rem; }
.mobile-light-flow { display: none; }
@media (max-width: 720px) {
  .conf-cards { grid-template-columns: 1fr; }
  .mobile-light-flow { display: flex; flex-direction: column; gap: 0.5rem; }
  .ml-step { padding: 0.6rem 0.8rem; border-left: 2px solid var(--champagne); background: var(--bg-burgundy-panel); font-size: 0.84rem; color: var(--ivory); }
}

.compliance-note {
  margin: 1rem 0 0;
  padding: 0.65rem 0.9rem;
  border-left: 2px solid var(--champagne);
  font-size: 0.78rem;
  color: var(--ivory-secondary);
}

.guide-intro-box { margin-top: 1.25rem; border-top: 1px solid var(--champagne); padding-top: 0.95rem; }
.guide-intro-box h4 { margin: 0.35rem 0 0.35rem; font-family: var(--font-serif-zh); font-size: 1.15rem; font-weight: 500; color: var(--ivory); }
.guide-intro-box p { margin: 0; font-size: 0.86rem; color: var(--ivory-secondary); }

.phone-bezel {
  position: relative;
  width: 100%;
  max-width: 392px;
  margin-inline: auto;
  padding: 12px 10px 14px;
  border-radius: 34px;
  background: linear-gradient(160deg, #252326 0%, #141315 55%, #0D0C0E 100%);
  border: 1.5px solid rgba(214, 190, 155, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.65),
    0 24px 48px -12px rgba(0, 0, 0, 0.62),
    0 4px 12px rgba(0, 0, 0, 0.36);
  overflow: hidden;
}

.phone-notch {
  width: 72px;
  height: 5px;
  margin: 0 auto 9px;
  border-radius: 999px;
  background: #080709;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.phone-screen {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #FFFFFF;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid rgba(244, 239, 230, 0.12);
  background: #161215;
  color: var(--champagne);
  font-size: 0.65rem;
}

.phone-iframe {
  display: block;
  width: 100%;
  height: 520px;
  border: 0;
}

.phone-home-bar {
  width: 108px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: rgba(244, 239, 230, 0.24);
}

.album-ext-link { color: var(--champagne); border-bottom: 1px solid rgba(214, 190, 155, 0.45); padding-bottom: 0.1rem; font-size: 0.72rem; }

.mp-metrics-strip {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  border-top: 1px solid var(--champagne);
}
.mp-metric-cell { display: flex; flex-direction: column; gap: 0.22rem; }
.mp-metric-cell dt { margin: 0; }
.mp-metric-cell .cred-value { color: var(--ivory); }
.mp-metric-cell .cred-sub { color: var(--ivory-secondary); }

.ai-scenarios-grid {
  margin-top: 1.45rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline-burgundy);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 2rem;
}
.ai-scenario h4 { margin: 0.25rem 0 0.3rem; font-family: var(--font-serif-zh); font-size: 1.08rem; font-weight: 500; color: var(--ivory); }
.ai-scenario p { margin: 0; font-size: 0.85rem; color: var(--ivory-secondary); }

.copilot-strip { margin-top: 1.45rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.copilot-thumb {
  padding: 0;
  background: var(--bg-burgundy-panel);
  border: 1px solid var(--hairline-burgundy-strong);
  border-radius: 4px;
  text-align: left;
  overflow: hidden;
  transition: transform 200ms var(--ease-out), border-color 180ms ease, background-color 180ms ease;
}
.copilot-thumb:focus-visible {
  transform: translateY(-2px);
  border-color: var(--champagne);
  background: var(--bg-burgundy-hover);
}
.copilot-thumb:active {
  transform: scale(0.97);
  transition-duration: 140ms;
}
.copilot-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #1B0D12;
  filter: brightness(0.95) contrast(1.02);
  transition: filter 180ms ease;
}
.copilot-thumb:focus-visible img {
  filter: brightness(1) contrast(1.03);
}
.copilot-thumb span {
  display: block;
  padding: 0.5rem 0.68rem;
  border-top: 1px solid var(--hairline-burgundy);
  background: rgba(21, 9, 13, 0.72);
  color: var(--ivory);
  font-size: 0.68rem;
  transition: color 180ms ease;
}
.copilot-thumb:focus-visible span {
  color: var(--champagne);
}

@media (hover: hover) and (pointer: fine) {
  .copilot-thumb:hover {
    transform: translateY(-2px);
    border-color: var(--champagne);
    background: var(--bg-burgundy-hover);
  }
  .copilot-thumb:hover img {
    filter: brightness(1) contrast(1.03);
  }
  .copilot-thumb:hover span {
    color: var(--champagne);
  }
}

@media (max-width: 900px) {
  .conf-grid, .ai-scenarios-grid, .copilot-strip { grid-template-columns: 1fr; }
  .mp-metrics-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Fullscreen Curated Album Lightbox (<dialog id="albumDialog">) */
.album-dialog {
  max-width: 100vw;
  max-height: 100dvh;
  width: 100vw;
  height: 100dvh;
  background: rgba(18, 19, 21, 0.97);
  color: var(--ink-light);
}

.album-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  width: 100%;
  padding: clamp(0.75rem, 2vw, 1.35rem);
  gap: 0.75rem;
}

.album-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--hairline-dark);
}

.album-title { margin: 0.15rem 0 0; font-family: var(--font-serif-zh); font-size: clamp(1rem, 0.92rem + 0.5vw, 1.3rem); font-weight: 500; }
.album-controls-top { display: flex; align-items: center; gap: 0.85rem; flex-shrink: 0; }
.album-counter { color: var(--brass); }

.album-stage {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 0;
}

.album-figure {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 0;
}

.album-figure img {
  max-height: calc(100dvh - 185px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border: 1px solid var(--hairline-dark);
  background: #FFFFFF;
}

.album-caption { font-size: 0.84rem; color: var(--ink-light-secondary); text-align: center; }

.album-nav {
  width: 44px;
  height: 56px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline-dark);
  color: var(--ink-light);
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 180ms ease, color 180ms ease, transform 160ms var(--ease-out);
}

.album-nav:focus-visible { border-color: var(--brass); color: var(--brass); }
.album-nav:active { transform: scale(0.97); transition-duration: 140ms; }

@media (hover: hover) and (pointer: fine) {
  .album-nav:hover { border-color: var(--brass); color: var(--brass); }
}
.album-bottombar { text-align: center; padding-top: 0.5rem; border-top: 1px solid var(--hairline-dark); }
.album-hint { color: var(--ink-light-muted); }

@media (max-width: 640px) {
  .album-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .album-nav { position: absolute; bottom: 0.25rem; z-index: 2; height: 44px; }
  .album-prev { left: 0; }
  .album-next { right: 0; }
  .album-figure img { max-height: calc(100dvh - 210px); }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: calc(var(--header-h) + 14px);
  bottom: auto;
  transform: translate(-50%, -100%);
  z-index: 120;
  background: var(--ink);
  color: var(--bg-paper);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.6rem 1.1rem;
  font-size: 0.82rem;
  white-space: nowrap;
  max-width: calc(100vw - 2rem);
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast.is-visible {
    transform: translate(-50%, 0);
    transition: opacity 150ms ease;
  }
}

/* ---------- Step 4: Hero-Only Wave Choreography & Lightweight Non-Blocking Act Accents ---------- */
@keyframes act-rise-soft {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes timeline-dot-pop {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .mask-rise {
    display: block;
    overflow: hidden;
    padding-bottom: 0.08em;
    margin-bottom: -0.08em;
  }

  /* Only #hero executes a wave entrance; Acts 1-6 remain visible immediately on arrival */
  html.anim-ready #hero:not(.is-entered) .mask-rise-inner {
    transform: translateY(104%);
  }

  #hero .mask-rise-inner {
    display: block;
    transition: transform 400ms var(--ease-out);
  }

  html.anim-ready #hero.is-entered .mask-rise-inner {
    transform: translateY(0);
  }

  #hero .hero-plate-wrap.curtain-reveal {
    transition: clip-path 480ms var(--ease-out);
  }

  #hero .hero-plate-wrap.curtain-reveal img {
    transition: transform 540ms var(--ease-out);
  }

  html.anim-ready #hero:not(.is-entered) .hero-plate-wrap.curtain-reveal {
    clip-path: inset(100% 0 0 0);
  }

  html.anim-ready #hero:not(.is-entered) .hero-plate-wrap.curtain-reveal img {
    transform: scale(1.045);
  }

  html.anim-ready #hero.is-entered .hero-plate-wrap.curtain-reveal {
    clip-path: inset(0 0 0 0);
  }

  html.anim-ready #hero.is-entered .hero-plate-wrap.curtain-reveal img {
    transform: scale(1);
  }

  html.anim-ready #hero.is-entered .hero-title .mask-rise:nth-child(1) .mask-rise-inner {
    transition-delay: 0ms;
  }

  html.anim-ready #hero.is-entered .hero-title .mask-rise:nth-child(2) .mask-rise-inner {
    transition-delay: 65ms;
  }

  html.anim-ready #hero .hero-title-en,
  html.anim-ready #hero .hero-identity,
  html.anim-ready #hero .hero-actions {
    transition: opacity 340ms var(--ease-out), transform 340ms var(--ease-out);
  }

  html.anim-ready #hero:not(.is-entered) .hero-title-en,
  html.anim-ready #hero:not(.is-entered) .hero-identity,
  html.anim-ready #hero:not(.is-entered) .hero-actions,
  html.anim-ready #hero:not(.is-entered) .credential-cell {
    opacity: 0;
    transform: translateY(10px);
  }

  html.anim-ready #hero.is-entered .hero-title-en { transition-delay: 115ms; }
  html.anim-ready #hero.is-entered .hero-identity { transition-delay: 160ms; }
  html.anim-ready #hero.is-entered .hero-actions {
    transition-duration: 320ms;
    transition-delay: 200ms;
  }

  html.anim-ready #hero.is-entered .credential-cell {
    animation: act-rise-soft 320ms var(--ease-out) both;
  }

  html.anim-ready #hero.is-entered .credential-cell:nth-child(1) { animation-delay: 215ms; }
  html.anim-ready #hero.is-entered .credential-cell:nth-child(2) { animation-delay: 255ms; }
  html.anim-ready #hero.is-entered .credential-cell:nth-child(3) { animation-delay: 285ms; }
  html.anim-ready #hero.is-entered .credential-cell:nth-child(4) { animation-delay: 310ms; }

  /* ---- Acts 1-6: Zero-delay, non-blocking micro-breath accents ---- */
  html.anim-ready #hall-02 .corner-tl-mark,
  html.anim-ready #hall-02 .corner-tr-mark,
  html.anim-ready #hall-02 .corner-bl-mark,
  html.anim-ready #hall-02 .corner-br-mark {
    transition: transform 260ms var(--ease-out), opacity 240ms var(--ease-out);
  }

  html.anim-ready #hall-02:not(.is-entered) .corner-tl-mark { opacity: 0.35; transform: translate(-6px, -6px); }
  html.anim-ready #hall-02:not(.is-entered) .corner-tr-mark { opacity: 0.35; transform: translate(6px, -6px); }
  html.anim-ready #hall-02:not(.is-entered) .corner-bl-mark { opacity: 0.35; transform: translate(-6px, 6px); }
  html.anim-ready #hall-02:not(.is-entered) .corner-br-mark { opacity: 0.35; transform: translate(6px, 6px); }

  html.anim-ready #hall-02.is-entered .corner-tl-mark,
  html.anim-ready #hall-02.is-entered .corner-tr-mark,
  html.anim-ready #hall-02.is-entered .corner-bl-mark,
  html.anim-ready #hall-02.is-entered .corner-br-mark {
    opacity: 1;
    transform: translate(0, 0);
  }

  html.anim-ready #hall-03:not(.is-entered) .miffy-stamp {
    transform: rotate(var(--stamp-rot, 0deg)) translateY(calc(var(--stamp-rest-y, 0px) + 6px));
  }

  html.anim-ready #hall-03.is-entered .miffy-stamp:nth-child(1) { transition-delay: 0ms; }
  html.anim-ready #hall-03.is-entered .miffy-stamp:nth-child(2) { transition-delay: 25ms; }
  html.anim-ready #hall-03.is-entered .miffy-stamp:nth-child(3) { transition-delay: 45ms; }
  html.anim-ready #hall-03.is-entered .miffy-stamp:nth-child(4) { transition-delay: 65ms; }
  html.anim-ready #hall-03.is-entered .miffy-stamp:nth-child(5) { transition-delay: 80ms; }

  html.anim-ready #hall-04 .pedestal-grid::before {
    transition: transform 300ms var(--ease-out), opacity 240ms var(--ease-out);
  }

  html.anim-ready #hall-04:not(.is-entered) .pedestal-grid::before {
    opacity: 0.35;
    transform: translateX(-50%) scaleY(0.25);
  }

  html.anim-ready #hall-04.is-entered .pedestal-grid::before {
    opacity: 1;
    transform: translateX(-50%) scaleY(1);
  }

  html.anim-ready #about:not(.is-entered) .timeline-list li::before {
    opacity: 0;
    transform: scale(0.85);
  }

  html.anim-ready #about .timeline-list::before {
    transition: transform 300ms var(--ease-out), opacity 240ms var(--ease-out);
  }

  html.anim-ready #about:not(.is-entered) .timeline-list::before {
    opacity: 0.35;
    transform: scaleY(0.2);
  }

  html.anim-ready #about.is-entered .timeline-list::before {
    opacity: 1;
    transform: scaleY(1);
  }

  html.anim-ready #about.is-entered .timeline-list li::before {
    animation: timeline-dot-pop 220ms var(--ease-out) both;
  }

  html.anim-ready #about.is-entered .timeline-list li:nth-child(1)::before { animation-delay: 0ms; }
  html.anim-ready #about.is-entered .timeline-list li:nth-child(2)::before { animation-delay: 35ms; }
  html.anim-ready #about.is-entered .timeline-list li:nth-child(3)::before { animation-delay: 65ms; }
  html.anim-ready #about.is-entered .timeline-list li:nth-child(4)::before { animation-delay: 90ms; }
  html.anim-ready #about.is-entered .timeline-list li:nth-child(5)::before { animation-delay: 110ms; }

  /* Mobile & no-SDA lightweight container settle (single container per act, non-blocking) */
  @media (max-width: 1023px) {
    html.anim-ready section:not(#hero) > .container {
      transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
    }
    html.anim-ready section:not(#hero):not(.is-entered) > .container {
      opacity: 0.88;
      transform: translateY(10px);
    }
    html.anim-ready section:not(#hero).is-entered > .container {
      opacity: 1;
      transform: translateY(0);
    }
  }

  html.anim-ready.no-sda section:not(#hero) > .container {
    transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
  }
  html.anim-ready.no-sda section:not(#hero):not(.is-entered) > .container {
    opacity: 0.88;
    transform: translateY(10px);
  }
  html.anim-ready.no-sda section:not(#hero).is-entered > .container {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   v3: Visual Enrichment (Darkroom Plates, Burgundy Materiality,
       Miffy Peeking Charms & 6-Act Minimal Art Ornaments)
   ========================================================================== */

/* ---------- Act 00 & 01 · Hero & Index Ornaments ---------- */
.hero-meta-loc {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.ornament-crosshair-sm {
  color: var(--ink-muted);
  opacity: 0.72;
  flex-shrink: 0;
}

.ornament-exlibris {
  margin-left: auto;
  color: var(--ink);
  opacity: 0.24;
  flex-shrink: 0;
  transition: opacity 220ms var(--ease-out), transform 260ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .ornament-exlibris:hover {
    opacity: 0.48;
    transform: rotate(3deg);
  }
}

.index-list-col {
  display: flex;
  flex-direction: column;
}

.index-colophon {
  margin-top: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-muted);
  opacity: 0.68;
}

.ornament-index-crosshair {
  color: var(--ink);
  opacity: 0.45;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .ornament-exlibris {
    display: none;
  }
}

/* ---------- Hall 01 · Luoxiao Mountain Contours & < 40 dB Quiet Wave ---------- */
.hall01-summary {
  position: relative;
}

.ornament-mountain-svg {
  position: absolute;
  top: -0.35rem;
  right: 0;
  color: var(--sage);
  opacity: 0.28;
  pointer-events: none;
}

.yujian-tick dt {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ornament-wave-svg {
  color: var(--sage);
  opacity: 0.62;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .ornament-mountain-svg {
    width: 112px;
    height: auto;
    opacity: 0.2;
  }
}

/* ---------- Hall 02 · Linked Darkroom Visual Plates & Optical Reticle ---------- */
.telemetry-top,
.telemetry-figure-wrap,
.telemetry-actions {
  position: relative;
  z-index: 2;
}

.darkroom-plates {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.darkroom-plates::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      90deg,
      #121315 0%,
      rgba(18, 19, 21, 0.95) 38%,
      rgba(18, 19, 21, 0.56) 68%,
      rgba(18, 19, 21, 0.8) 100%
    ),
    linear-gradient(
      180deg,
      rgba(18, 19, 21, 0.72) 0%,
      rgba(18, 19, 21, 0.14) 26%,
      rgba(18, 19, 21, 0.36) 62%,
      rgba(18, 19, 21, 0.92) 86%,
      rgba(18, 19, 21, 0.97) 100%
    );
}

.darkroom-plate {
  position: absolute;
  top: 0;
  right: 0;
  width: 66%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  filter: brightness(0.86) contrast(1.04) blur(2px);
  transform: scale(1.025) translateX(6px);
  transition: opacity 260ms var(--ease-out),
              transform 260ms var(--ease-out),
              filter 260ms var(--ease-out);
}

.darkroom-plate.is-active {
  opacity: 0.72;
  filter: brightness(0.86) contrast(1.04) blur(0px);
  transform: scale(1) translateX(0);
}

.darkroom-reticle {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  color: var(--brass);
}

.darkroom-reticle-svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 240ms var(--ease-out);
}

@media (max-width: 640px) {
  .darkroom-plate {
    width: 100%;
  }
  .darkroom-plate.is-active {
    opacity: 0.36;
  }
}

/* ---------- Hall 03 · Miffy Peeking Charms, Circular Postmark & Scale Bar ---------- */
.miffy-cover-frame {
  position: relative;
  overflow: visible;
}

.miffy-edge-peek {
  position: absolute;
  left: calc(100% - 1px);
  bottom: 52px;
  height: 50px;
  width: auto;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(21, 21, 21, 0.08));
  transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out);
}

.miffy-cover-frame:focus-visible .miffy-edge-peek {
  transform: translateX(4px);
}

.miffy-upper-copy {
  position: relative;
}

.ornament-postmark-svg {
  position: absolute;
  top: -4px;
  right: 0;
  width: 112px;
  height: auto;
  color: var(--miffy-red);
  opacity: 0.44;
  transform: rotate(-3deg);
  pointer-events: none;
}

.miffy-cta-row {
  padding-top: 22px;
}

.hall-03 .btn-miffy {
  position: relative;
  overflow: visible;
}

.hall-03 .btn-miffy > span {
  position: relative;
  z-index: 2;
}

.miffy-btn-peek {
  position: absolute;
  right: 14px;
  bottom: calc(100% - 2px);
  height: 32px;
  width: auto;
  z-index: 1;
  pointer-events: none;
  transform-origin: bottom center;
  filter: drop-shadow(0 2px 3px rgba(21, 21, 21, 0.1));
  transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out);
}

.hall-03 .btn-miffy:focus-visible .miffy-btn-peek {
  transform: translateY(-4px) rotate(2deg);
}

@media (hover: hover) and (pointer: fine) {
  .miffy-cover-frame:hover .miffy-edge-peek {
    transform: translateX(4px);
  }
  .hall-03 .btn-miffy:hover .miffy-btn-peek {
    transform: translateY(-4px) rotate(2deg);
  }
}

.miffy-scale-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-bottom: -0.5rem;
  opacity: 0.72;
}

.miffy-scale-bar .mono-tag {
  font-size: 0.62rem;
  color: var(--ink-secondary);
}

@media (max-width: 900px) {
  .miffy-edge-peek,
  .ornament-postmark-svg {
    display: none;
  }
}

@media (max-width: 540px) {
  .miffy-scale-bar {
    justify-content: flex-start;
    margin-bottom: -0.25rem;
  }
}

/* ---------- Hall 04 · Dual-City Emblem, G-Floor Contour Sleeve & Harbour Foil Booklet ---------- */
.hall-04-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
}

.hall-header-copy {
  flex: 1;
  min-width: 0;
}

.ornament-dualcity-svg {
  color: var(--champagne);
  opacity: 0.54;
  flex-shrink: 0;
  margin-bottom: 0.15rem;
}

.standby-sleeve,
.foil-booklet {
  overflow: hidden;
}

.standby-sleeve::after,
.foil-booklet::after {
  inset: 0;
}

.sleeve-notch,
.sleeve-top,
.sleeve-emblem,
.sleeve-status {
  position: relative;
  z-index: 2;
}

.sleeve-contour-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.36;
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
}

.standby-sleeve:focus-visible .sleeve-contour-svg {
  opacity: 0.58;
  transform: scale(1.03);
}

.foil-ambient-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  opacity: 0.84;
  filter: brightness(1.42) contrast(1.08) saturate(0.92);
  z-index: 0;
  pointer-events: none;
  transition: transform 260ms var(--ease-out), opacity 240ms var(--ease-out);
}

.foil-booklet:focus-visible .foil-ambient-img {
  transform: scale(1.045);
  opacity: 0.94;
}

@media (hover: hover) and (pointer: fine) {
  .standby-sleeve:hover .sleeve-contour-svg {
    opacity: 0.58;
    transform: scale(1.03);
  }
  .foil-booklet:hover .foil-ambient-img {
    transform: scale(1.045);
    opacity: 0.94;
  }
}

.foil-inner-border {
  position: relative;
  z-index: 2;
  border-radius: 3px;
  background: linear-gradient(
    150deg,
    rgba(35, 17, 23, 0.42) 0%,
    rgba(35, 17, 23, 0.16) 52%,
    rgba(28, 12, 18, 0.44) 100%
  );
}

@media (max-width: 900px) {
  .ornament-dualcity-svg {
    display: none;
  }
}

/* ---------- Act 03 · About Film Sprocket Bar & Calligraphic Seal ---------- */
.about-film-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-top: -0.5rem;
  margin-bottom: 0.85rem;
  color: var(--ink-muted);
  opacity: 0.56;
}

.about-film-bar .mono-tag {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
}

.about-signature-seal {
  margin-top: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.signature-flourish {
  color: var(--ink);
  opacity: 0.58;
}

.cinnabar-seal {
  color: #9C3830;
  opacity: 0.78;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  #about {
    justify-content: flex-start;
    padding-top: calc(var(--header-h) + clamp(4.6rem, 7.8vh, 5.6rem));
    padding-bottom: 1.15rem;
  }

  #about .chapter-threshold-close {
    margin-bottom: clamp(0.6rem, 1.3vh, 0.9rem);
  }

  #about .about-film-bar {
    margin-top: -0.3rem;
    margin-bottom: 0.55rem;
  }

  #about .section-head {
    margin-bottom: clamp(0.95rem, 2vh, 1.35rem);
  }

  #about .timeline-list li {
    padding-block: 0.78rem;
  }

  #about .contact-strip {
    margin-top: clamp(1rem, 2.2vh, 1.45rem);
    padding-top: 1rem;
  }
}

/* ---------- Stage 4: Ornament & Plate Breath Accents (Zero Delay, Visible Pre-State) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.anim-ready #hero .ornament-exlibris {
    transition: opacity 360ms var(--ease-out) 210ms, transform 360ms var(--ease-out) 210ms;
  }
  html.anim-ready #hero:not(.is-entered) .ornament-exlibris {
    opacity: 0;
    transform: translateY(6px) rotate(-4deg);
  }
  html.anim-ready #hero.is-entered .ornament-exlibris {
    opacity: 0.24;
    transform: translateY(0) rotate(0deg);
  }

  html.anim-ready #index .index-colophon {
    transition: opacity 240ms var(--ease-out), transform 260ms var(--ease-out);
  }
  html.anim-ready #index:not(.is-entered) .index-colophon {
    opacity: 0.45;
    transform: translateY(5px);
  }

  html.anim-ready #hall-01 .ornament-mountain-svg {
    transition: opacity 240ms var(--ease-out), transform 260ms var(--ease-out);
  }
  html.anim-ready #hall-01:not(.is-entered) .ornament-mountain-svg {
    opacity: 0.16;
    transform: translateX(6px);
  }

  html.anim-ready #hall-02:not(.is-entered) .darkroom-plate.is-active {
    opacity: 0.56;
    transform: scale(1.02);
  }

  html.anim-ready #hall-03 .ornament-postmark-svg {
    transition: opacity 240ms var(--ease-out), transform 260ms var(--ease-out);
  }
  html.anim-ready #hall-03:not(.is-entered) .ornament-postmark-svg {
    opacity: 0.26;
    transform: scale(1.06) rotate(-6deg);
  }
  html.anim-ready #hall-03.is-entered .ornament-postmark-svg {
    opacity: 0.44;
    transform: scale(1) rotate(-3deg);
  }

  html.anim-ready #hall-03 .miffy-btn-peek {
    transition: transform 240ms var(--ease-out), opacity 220ms var(--ease-out);
  }
  html.anim-ready #hall-03:not(.is-entered) .miffy-btn-peek {
    opacity: 0.65;
    transform: translateY(5px);
  }

  html.anim-ready #hall-03 .miffy-edge-peek {
    transition: transform 240ms var(--ease-out), opacity 220ms var(--ease-out);
  }
  html.anim-ready #hall-03:not(.is-entered) .miffy-edge-peek {
    opacity: 0.65;
    transform: translateX(-5px);
  }

  html.anim-ready #hall-04 .ornament-dualcity-svg {
    transition: opacity 240ms var(--ease-out), transform 260ms var(--ease-out);
  }
  html.anim-ready #hall-04:not(.is-entered) .ornament-dualcity-svg {
    opacity: 0.34;
    transform: translateY(4px) scaleX(0.95);
  }

  html.anim-ready #about .about-film-bar,
  html.anim-ready #about .about-signature-seal {
    transition: opacity 240ms var(--ease-out), transform 260ms var(--ease-out);
  }
  html.anim-ready #about:not(.is-entered) .about-film-bar,
  html.anim-ready #about:not(.is-entered) .about-signature-seal {
    opacity: 0.45;
    transform: translateY(5px);
  }
}

/* ==========================================================================
   Step 4: Composited Sliding Rails, Spotlight & Tactile Continuity
   ========================================================================== */

/* ---------- Act 1 · #index Sliding Rail ---------- */
.index-list-wrap {
  position: relative;
}

.index-link {
  position: relative;
  z-index: 1;
}

html.has-sliding-rails .index-link.is-active {
  background: transparent;
}

.index-sliding-rail {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  transform-origin: 0 0;
  background: rgba(21, 21, 21, 0.042);
  border-left: 2px solid var(--ink);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}

.index-sliding-rail.is-ready {
  opacity: 1;
  transition: transform 220ms var(--ease-out), opacity 160ms ease;
}

.index-sliding-rail.is-instant {
  transition: none;
}

/* ---------- Hall 01 · Sliding Step Pill ---------- */
.plate-step-nav {
  position: relative;
}

.plate-step-btn {
  position: relative;
  z-index: 1;
}

html.has-sliding-rails .plate-step-btn.is-active {
  background: transparent;
  border-color: transparent;
}

.plate-step-pill {
  position: absolute;
  top: 0.45rem;
  bottom: 0;
  left: 0;
  width: calc((100% - 0.9rem) / 4);
  transform-origin: 0 0;
  border: 1px solid rgba(29, 42, 34, 0.28);
  background: rgba(75, 94, 80, 0.09);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}

.plate-step-pill.is-ready {
  opacity: 1;
  transition: transform 200ms var(--ease-out), opacity 160ms ease;
}

.plate-step-pill.is-instant {
  transition: none;
}

/* ---------- Hall 02 · Sliding Rail ---------- */
.darkroom-index-col {
  position: relative;
}

.darkroom-item {
  position: relative;
  z-index: 1;
}

html.has-sliding-rails .darkroom-item.is-active {
  background: transparent;
}

.darkroom-sliding-rail {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  transform-origin: 0 0;
  background: rgba(200, 176, 138, 0.075);
  border-left: 2px solid var(--brass);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}

.darkroom-sliding-rail.is-ready {
  opacity: 1;
  transition: transform 220ms var(--ease-out), opacity 160ms ease;
}

.darkroom-sliding-rail.is-instant {
  transition: none;
}

@media (max-width: 440px) {
  .darkroom-item-sub {
    font-size: 0.75rem;
  }
}

/* ---------- Hall 03 · Stamp Spotlight ---------- */
@media (hover: hover) and (pointer: fine) {
  .miffy-stamps-grid:has(.miffy-stamp:hover) .miffy-stamp:not(:hover) {
    opacity: 0.76;
  }
}

/* ---------- Hall 04 · Dual-Pedestal Spotlight, Glass/Foil Sheen & Flow Trace ---------- */
.pedestal-card {
  transition: opacity 220ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) and (min-width: 881px) {
  .pedestal-grid:has(.pedestal-card:hover) .pedestal-card:not(:hover) {
    opacity: 0.68;
  }
}

.standby-sleeve::before,
.foil-booklet::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transform: translateX(-130%);
  transition: transform 420ms var(--ease-out);
}

.standby-sleeve::before {
  background: linear-gradient(115deg, transparent 30%, rgba(214, 190, 155, 0.12) 50%, transparent 70%);
}

.foil-booklet::before {
  background: linear-gradient(115deg, transparent 28%, rgba(214, 190, 155, 0.16) 50%, transparent 72%);
}

.standby-sleeve:focus-visible::before,
.foil-booklet:focus-visible::before {
  transform: translateX(130%);
}

@media (hover: hover) and (pointer: fine) {
  .standby-sleeve:hover::before,
  .foil-booklet:hover::before {
    transform: translateX(130%);
  }
}

.sleeve-flow-path {
  stroke-dasharray: 220;
  stroke-dashoffset: 38;
  opacity: 0.55;
  transition: stroke-dashoffset 240ms var(--ease-out), opacity 220ms var(--ease-out);
}

.sleeve-flow-node {
  transition: fill 200ms var(--ease-out);
}

.standby-sleeve:focus-visible .sleeve-flow-path {
  stroke-dashoffset: 0;
  opacity: 0.92;
}

.standby-sleeve:focus-visible .sleeve-flow-node {
  fill: rgba(214, 190, 155, 0.45);
}

@media (hover: hover) and (pointer: fine) {
  .standby-sleeve:hover .sleeve-flow-path {
    stroke-dashoffset: 0;
    opacity: 0.92;
  }
  .standby-sleeve:hover .sleeve-flow-node {
    fill: rgba(214, 190, 155, 0.45);
  }
}

/* ---------- Level-2 Rooms · Tab Sliding Bar ---------- */
.tablist-scroll {
  position: relative;
}

.tablist-scroll [role="tab"] {
  position: relative;
  z-index: 1;
}

html.has-sliding-rails .tablist-scroll [role="tab"][aria-selected="true"]::after {
  opacity: 0;
}

.tab-sliding-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 2px;
  transform-origin: 0 0;
  background: var(--brass);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
}

.tab-sliding-bar.is-ready {
  opacity: 1;
  transition: transform 200ms var(--ease-out), opacity 160ms ease;
}

.tab-sliding-bar.is-instant {
  transition: none;
}

/* ---------- Reduced Motion Safety Overrides (Keep Gentle 150ms Opacity/Color Fades) ---------- */
@media (prefers-reduced-motion: reduce) {
  .index-sliding-rail,
  .plate-step-pill,
  .darkroom-sliding-rail,
  .tab-sliding-bar,
  .preview-img,
  .preview-caption,
  .yujian-plate-img,
  .plate-meta-bar,
  .darkroom-plate,
  .pedestal-card,
  .foil-ambient-img,
  .sleeve-contour-svg,
  .sleeve-flow-path,
  .sleeve-flow-node,
  .season-bar,
  .ornament-exlibris {
    transition-property: opacity, color, background-color, border-color;
    transition-duration: 150ms;
    transition-timing-function: ease;
    filter: none;
  }

  .index-num,
  .index-body,
  .index-arrow,
  .darkroom-code,
  .darkroom-item-body,
  .darkroom-arrow,
  .darkroom-reticle-svg,
  .miffy-btn-peek,
  .miffy-edge-peek,
  .miffy-cover-frame,
  .miffy-stamp,
  .standby-sleeve,
  .standby-sleeve::before,
  .foil-booklet,
  .foil-booklet::before,
  .ink-cta > span[aria-hidden="true"],
  .scale-needle,
  .threshold-line,
  .yujian-room-thumb,
  .ifs-thumb,
  .miffy-mini-card,
  .copilot-thumb {
    transition-property: opacity, color, background-color, border-color;
    transition-duration: 150ms;
    transition-timing-function: ease;
    animation: none;
  }

  .standby-sleeve::after,
  .foil-booklet::after {
    animation: none;
    transition: opacity 150ms ease;
  }
}
