/* Museum of Unlived Lives — custom frontend styles.
   Served as a static asset by gr.Server (see app.py /static mount). */

:root {
  --ink: #08070b;
  --ink-2: #0e0c13;
  --panel: #141119;
  --panel-2: #191521;
  --line: #2a2533;
  --line-soft: #221e2b;
  --text: #e9e4f0;
  --muted: #9b93ac;
  --faint: #6f677e;
  --brass: #c9a86a;
  --brass-dim: #9c8350;
  --violet: #8b5cf6;
  --violet-soft: #a78bfa;
  --glow: rgba(139, 92, 246, 0.45);
  --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --maxw: 760px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
html { height: 100%; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- living museum atmosphere ---------- */
:root { --px: 0; --py: 0; }
.atmosphere { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.atmosphere > * { position: absolute; inset: 0; }

.hall-bg {
  background: radial-gradient(125% 95% at 50% -12%, #1d1726 0%, #120e1a 36%, #08070b 100%);
}
.hall-bg::after {
  content: ""; position: absolute; inset: -10%;
  background:
    radial-gradient(38% 30% at 18% 22%, rgba(139, 92, 246, 0.18), transparent 70%),
    radial-gradient(36% 30% at 84% 28%, rgba(201, 168, 106, 0.12), transparent 70%),
    radial-gradient(60% 48% at 50% 118%, rgba(139, 92, 246, 0.12), transparent 70%);
  transform: translate3d(calc(var(--px) * -14px), calc(var(--py) * -14px), 0);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* slow drifting aurora wash — the breath of the hall */
.aurora {
  inset: -25%;
  background:
    radial-gradient(42% 55% at 28% 32%, rgba(139, 92, 246, 0.20), transparent 62%),
    radial-gradient(40% 50% at 74% 40%, rgba(201, 168, 106, 0.14), transparent 64%),
    radial-gradient(50% 60% at 50% 78%, rgba(94, 78, 168, 0.16), transparent 66%);
  filter: blur(34px); opacity: 0.85;
  background-size: 160% 160%;
  animation: aurora-drift 38s ease-in-out infinite alternate;
  transform: translate3d(calc(var(--px) * -22px), calc(var(--py) * -18px), 0);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes aurora-drift {
  0%   { background-position: 0% 0%, 100% 0%, 50% 100%; }
  50%  { background-position: 40% 30%, 60% 40%, 40% 70%; }
  100% { background-position: 100% 60%, 0% 80%, 70% 30%; }
}

/* god-ray light beams sweeping the gallery */
.beams { mix-blend-mode: screen; opacity: 0.5; }
.beam {
  position: absolute; top: -30%; height: 160%; width: 38%;
  background: linear-gradient(180deg, rgba(201, 168, 106, 0.10), rgba(201, 168, 106, 0) 70%);
  filter: blur(26px); transform-origin: top center;
  animation: beam-sweep 24s ease-in-out infinite;
}
.beam-1 { left: 6%;  transform: rotate(11deg);  animation-delay: 0s; }
.beam-2 { left: 44%; transform: rotate(-7deg); width: 30%;
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.12), rgba(167, 139, 250, 0) 72%);
  animation-delay: -9s; }
.beam-3 { right: 6%; transform: rotate(-14deg); animation-delay: -16s; }
@keyframes beam-sweep {
  0%, 100% { opacity: 0.25; transform: translateX(0) rotate(var(--r, 10deg)) scaleY(1); }
  50%      { opacity: 0.7;  transform: translateX(24px) rotate(var(--r, 10deg)) scaleY(1.05); }
}
.beam-1 { --r: 11deg; }
.beam-2 { --r: -7deg; }
.beam-3 { --r: -14deg; }

.spot { border-radius: 50%; filter: blur(72px); opacity: 0.5; }
.spot.a { width: 460px; height: 460px; left: -120px; top: -90px; inset: auto;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.5), transparent 65%); animation: drift1 26s ease-in-out infinite; }
.spot.b { width: 500px; height: 500px; right: -160px; top: 90px; left: auto; inset: auto;
  background: radial-gradient(circle, rgba(201, 168, 106, 0.32), transparent 65%); animation: drift2 32s ease-in-out infinite; }
@keyframes drift1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(60px, 50px); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-50px, 40px); } }

/* ghost frames — the empty exhibits of lives never lived, hung in the dark */
.frames { perspective: 900px; }
.ghost-frame {
  position: absolute; border-radius: 3px;
  border: 1px solid rgba(201, 168, 106, 0.16);
  box-shadow:
    inset 0 0 0 6px rgba(201, 168, 106, 0.05),
    inset 0 0 38px rgba(0, 0, 0, 0.6),
    0 0 1px rgba(201, 168, 106, 0.18);
  background:
    linear-gradient(160deg, rgba(34, 30, 43, 0.42), rgba(10, 9, 14, 0.5));
  opacity: 0; filter: blur(0.4px);
  animation: frame-breathe 26s ease-in-out infinite;
}
.ghost-frame::after {
  content: ""; position: absolute; inset: 9px; border-radius: 1px;
  border: 1px solid rgba(201, 168, 106, 0.08);
}
.gf-1 { left: 3.5%;  top: 16%; width: 92px;  height: 120px; transform: rotateY(34deg);  animation-delay: 0s; }
.gf-2 { left: 8%;    top: 52%; width: 74px;  height: 96px;  transform: rotateY(30deg);  animation-delay: -7s; }
.gf-3 { right: 3.5%; top: 22%; width: 96px;  height: 126px; transform: rotateY(-34deg); animation-delay: -13s; }
.gf-4 { right: 9%;   top: 58%; width: 70px;  height: 92px;  transform: rotateY(-28deg); animation-delay: -19s; }
.gf-5 { left: 50%;   top: 6%;  width: 64px;  height: 84px;  transform: translateX(-50%) scale(0.86); animation-delay: -4s; }
@keyframes frame-breathe {
  0%, 100% { opacity: 0.10; }
  50%      { opacity: 0.32; }
}

/* floating dust motes (canvas, painted in app.js) */
.dust { width: 100%; height: 100%; opacity: 0.9; }

/* drifting "What if…" whispers — counterfactuals overheard in the hall */
.whispers { overflow: hidden; }
.whisper {
  position: absolute; left: 0; top: 0;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(15px, 2vw, 22px); letter-spacing: 0.01em;
  color: rgba(201, 168, 106, 0.0);
  text-shadow: 0 0 24px rgba(139, 92, 246, 0.18);
  white-space: nowrap; filter: blur(0.5px);
  will-change: transform, opacity;
}

/* lantern — the warm light the visitor carries through the dark */
.lantern {
  left: 0; top: 0; width: 620px; height: 620px;
  margin-left: -310px; margin-top: -310px;
  border-radius: 50%; mix-blend-mode: screen; opacity: 0;
  background: radial-gradient(circle,
    rgba(201, 168, 106, 0.16) 0%,
    rgba(167, 139, 250, 0.08) 32%,
    rgba(201, 168, 106, 0.0) 64%);
  transform: translate3d(var(--lx, 50vw), var(--ly, 40vh), 0);
  transition: opacity 0.8s ease;
}
.lantern.lit { opacity: 1; }

.grain {
  pointer-events: none; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 7s steps(6) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -2%); }
  60% { transform: translate(-2%, -3%); }
  80% { transform: translate(4%, 2%); }
  100% { transform: translate(0, 0); }
}
.vignette { pointer-events: none; box-shadow: inset 0 0 240px 60px rgba(0, 0, 0, 0.85); }

@keyframes whisper-rise {
  0%   { opacity: 0; transform: translate3d(var(--wx), var(--wy), 0) translateY(28px); }
  18%  { opacity: var(--wo, 0.22); }
  82%  { opacity: var(--wo, 0.22); }
  100% { opacity: 0; transform: translate3d(var(--wx), var(--wy), 0) translateY(-70px); }
}

@media (prefers-reduced-motion: reduce) {
  .lb-arc-slide { transition: none !important; }
  .aurora, .beam, .spot.a, .spot.b, .grain, .ghost-frame, .whisper { animation: none !important; }
  .hall-bg::after, .aurora { transition: none !important; transform: none !important; }
  .whispers, .lantern { display: none !important; }
}

/* ---------- layout ---------- */
.hall {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(32px, 5vh, 64px) clamp(22px, 4vw, 48px) 64px;
  position: relative; min-height: 100vh; min-height: 100dvh;
}

/* ---------- hero ---------- */
.hero { text-align: center; margin-bottom: clamp(26px, 4.5vh, 48px); }
.eyebrow {
  font-family: var(--sans); font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--brass-dim); margin: 0 0 16px;
}
.title {
  position: relative;
  font-family: var(--serif); font-weight: 500; line-height: 1.0; margin: 0;
  font-size: clamp(38px, 6.2vw, 64px); letter-spacing: 0.005em;
  background-image: linear-gradient(180deg, #fbf7ff 0%, #d8cdea 46%, #9a8fb4 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-wrap: balance;
  animation: title-breathe 7s ease-in-out infinite;
}
.title::after {
  content: attr(data-title); position: absolute; inset: 0;
  background-image: linear-gradient(
    105deg,
    transparent 38%,
    rgba(201, 168, 106, 0.85) 50%,
    transparent 62%);
  background-size: 280% 100%; background-position: 180% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  pointer-events: none;
  animation: title-glint 9s ease-in-out 2s infinite;
}
@keyframes title-breathe {
  0%, 100% { text-shadow: 0 0 60px rgba(167, 139, 250, 0.16); }
  50%      { text-shadow: 0 0 78px rgba(167, 139, 250, 0.30); }
}
@keyframes title-glint {
  0%, 72%, 100% { background-position: 180% 0; }
  86%           { background-position: -80% 0; }
}
.subtitle {
  font-family: var(--serif); font-style: italic; font-size: clamp(15px, 2.1vw, 20px);
  color: var(--muted); margin: 14px 0 0; font-weight: 400;
}
.rule { width: 0; height: 0; margin: 22px auto 0; border: 0; position: relative; }
.rule::before {
  content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 110px; height: 1px; background: linear-gradient(90deg, transparent, var(--brass), transparent);
}
.rule::after {
  content: "\2726"; position: absolute; left: 50%; top: -10px; transform: translateX(-50%);
  color: var(--brass); font-size: 12px;
}

/* ---------- composer ---------- */
.composer { position: relative; }
.composer-label {
  display: block; font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 11px; padding-left: 2px;
}
.field {
  display: flex; align-items: flex-start; gap: 12px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 22px 50px -30px rgba(0, 0, 0, 0.9);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.field:focus-within {
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.25), 0 0 40px -8px var(--glow), 0 22px 50px -30px rgba(0, 0, 0, 0.9);
}
.whatif {
  font-family: var(--serif); font-style: italic; font-size: clamp(19px, 2.7vw, 25px);
  color: var(--brass); line-height: 1.5; white-space: nowrap; padding-top: 1px; user-select: none;
}
#line {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; resize: none;
  color: var(--text); font-family: var(--serif); font-size: clamp(19px, 2.7vw, 25px); line-height: 1.5;
  padding: 0; overflow: hidden;
}
#line::placeholder { color: #5a5368; font-style: italic; }

.cta {
  position: relative; display: block; width: 100%; margin-top: 14px; cursor: pointer;
  border: 1px solid rgba(201, 168, 106, 0.35); border-radius: 12px; padding: 14px 22px; overflow: hidden;
  font-family: var(--serif); font-size: 17px; letter-spacing: 0.06em; color: #fff;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 45%, #4c1d95 100%);
  box-shadow: 0 14px 36px -16px rgba(124, 58, 237, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transition: transform 0.2s ease, box-shadow 0.35s ease, filter 0.35s ease;
}
.cta::after {
  content: ""; position: absolute; top: 0; left: -130%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg); transition: left 0.7s ease;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 20px 46px -16px rgba(124, 58, 237, 0.95); }
.cta:hover::after { left: 140%; }
.cta:active { transform: translateY(0); }
.cta:disabled { cursor: progress; filter: saturate(0.5) brightness(0.8); }
.cta .dots { display: inline-block; }
.cta .dots::after { content: ""; animation: dots 1.4s steps(4, end) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "\B7"; } 50% { content: "\B7\B7"; } 75% { content: "\B7\B7\B7"; } 100% { content: ""; } }

/* ---------- stage ---------- */
.stage { margin-top: clamp(28px, 4.5vh, 52px); min-height: 8px; }

.curating {
  border: 1px solid var(--line-soft); border-radius: 16px; padding: 44px 28px; text-align: center;
  background: linear-gradient(180deg, var(--panel), var(--ink-2)); animation: fadeIn 0.5s ease both;
}
.curating .orb {
  width: 40px; height: 40px; margin: 0 auto 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--violet-soft), transparent 70%);
  box-shadow: 0 0 40px var(--glow); animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(0.85); opacity: 0.7; } 50% { transform: scale(1.1); opacity: 1; } }
.curating-title {
  font-family: var(--serif); font-style: italic; color: var(--text); font-size: 20px;
  margin: 0; letter-spacing: 0.02em;
}
.curating-sub {
  font-family: var(--sans); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--faint); margin: 14px 0 0; max-width: 36ch; margin-inline: auto; line-height: 1.55;
}

.notice {
  border: 1px solid rgba(201, 168, 106, 0.3); border-radius: 12px; padding: 18px 22px;
  background: rgba(201, 168, 106, 0.06); color: #e7d9b9; font-family: var(--serif); font-size: 18px;
  font-style: italic; text-align: center; animation: fadeIn 0.4s ease both;
}

/* ---------- exhibit reveal ---------- */
.reveal { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; position: relative; }
@keyframes rise { from { opacity: 0; transform: translateY(26px) scale(0.985); } to { opacity: 1; transform: none; } }
.spotlight {
  position: absolute; left: 50%; top: -40px; transform: translateX(-50%); width: 78%; height: 110px;
  background: radial-gradient(60% 100% at 50% 0, rgba(201, 168, 106, 0.22), transparent 75%);
  pointer-events: none; filter: blur(8px);
}

.exhibit-actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.ghost-btn {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.04em; color: var(--text);
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 18px; transition: all 0.25s ease; text-decoration: none;
}
.ghost-btn:hover { border-color: var(--brass); color: #fff; background: rgba(201, 168, 106, 0.08); transform: translateY(-1px); }
.ghost-btn svg { width: 15px; height: 15px; }

/* ---------- museum card (HTML returned by the API) ---------- */
.museum-card {
  --shape-0: #8b5cf6; --shape-1: #c9a86a; --shape-2: #5b4b8a;
  position: relative; border: 1px solid var(--line); border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 30%),
    linear-gradient(180deg, #16131d, #100d15);
  padding: 34px 32px 30px; overflow: hidden;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.museum-card::before, .museum-card::after {
  content: ""; position: absolute; width: 18px; height: 18px; border: 1px solid var(--brass-dim); opacity: 0.7;
}
.museum-card::before { top: 16px; left: 16px; border-right: 0; border-bottom: 0; }
.museum-card::after { bottom: 16px; right: 16px; border-left: 0; border-top: 0; }
.museum-card__shape-wrap { display: flex; justify-content: center; margin: 2px 0 22px; }
.museum-card__shape {
  width: 150px; height: 150px; display: grid; place-items: center;
  filter: drop-shadow(0 12px 28px rgba(139, 92, 246, 0.28));
}
.museum-card__shape svg, .museum-shape-svg { width: 100%; height: 100%; display: block; }
.museum-card__mood {
  margin: 0 0 10px; text-align: center; font-family: var(--sans);
  font-size: 11px; letter-spacing: 0.4em; color: var(--brass);
}
.museum-card__title {
  margin: 0 0 16px; text-align: center; font-family: var(--serif); font-weight: 600;
  font-size: clamp(28px, 4.6vw, 40px); line-height: 1.05; color: #f4eefb;
}
.museum-card__narrative {
  margin: 0 auto; max-width: 54ch; font-family: var(--serif);
  font-size: clamp(17px, 2.3vw, 20px); line-height: 1.6; color: #cdc5db; text-align: center;
}
.museum-card__placard {
  margin: 26px auto 0; max-width: 52ch; padding-top: 20px;
  border-top: 1px solid var(--line-soft); text-align: center;
}
.museum-card__placard-label {
  display: inline-block; font-family: var(--sans); font-size: 10px;
  letter-spacing: 0.38em; text-transform: uppercase; color: var(--faint); margin-bottom: 9px;
}
.museum-card__artifact { margin: 0; font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.55; color: #b7aec9; }

/* ---------- personal gallery (carousel) ---------- */
.gallery { margin-top: clamp(48px, 7vh, 80px); }
.gallery-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
  border-bottom: 1px solid var(--line-soft); padding-bottom: 14px; margin-bottom: 8px;
}
.gallery-head-text { min-width: 0; }
.gallery-head h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 22px; color: var(--text); }
.gallery-hint {
  margin: 6px 0 0; font-family: var(--sans); font-size: 12px; letter-spacing: 0.04em;
  color: var(--faint); font-style: normal;
}
.gallery-head > span {
  flex-shrink: 0; font-family: var(--sans); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--faint);
}
.gallery-empty {
  color: var(--faint); font-family: var(--serif); font-style: italic; font-size: 17px;
  text-align: center; padding: 32px 0 12px; margin: 0;
}
.gallery-empty[hidden], .gallery-carousel[hidden] { display: none !important; }

.gallery-carousel {
  position: relative;
  margin-left: calc(-1 * clamp(22px, 4vw, 48px));
  margin-right: calc(-1 * clamp(22px, 4vw, 48px));
  padding: 12px 0 8px;
}

.carousel-viewport {
  position: relative; overflow: hidden;
  height: clamp(310px, 44vw, 400px);
  perspective: 1200px;
  perspective-origin: 50% 36%;
  mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
  touch-action: pan-y pinch-zoom;
}
.carousel-viewport:focus { outline: none; }
.carousel-viewport:focus-visible {
  outline: 1px solid rgba(201, 168, 106, 0.35);
  outline-offset: 4px;
}

.carousel-track {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
}

.carousel-slide {
  position: absolute; left: 50%; top: 56%;
  width: clamp(148px, 34vw, 196px);
  margin: 0; padding: 0; cursor: pointer;
  transform-origin: center center;
  backface-visibility: hidden;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: #0c0a11;
  box-shadow: 0 20px 44px -24px rgba(0, 0, 0, 0.92);
  transition:
    transform 0.58s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.48s ease,
    box-shadow 0.45s ease,
    border-color 0.35s ease;
  will-change: transform, opacity;
}
.carousel-slide.is-active {
  border-color: rgba(201, 168, 106, 0.55);
  box-shadow: 0 28px 56px -20px rgba(0, 0, 0, 0.95),
    0 0 36px -12px rgba(139, 92, 246, 0.22),
    0 0 0 1px rgba(201, 168, 106, 0.12);
}
.carousel-slide:hover { filter: brightness(1.06); }
.carousel-slide.is-active:hover {
  box-shadow: 0 32px 64px -18px rgba(0, 0, 0, 0.96),
    0 0 40px -8px rgba(201, 168, 106, 0.35);
}

.carousel-slide img {
  display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  opacity: 0.94; transition: opacity 0.3s ease;
}
.carousel-slide:hover img, .carousel-slide.is-active img { opacity: 1; }

.carousel-slide figcaption {
  padding: 10px 10px 12px; margin: 0;
  font-family: var(--serif); font-size: 13px; line-height: 1.35;
  color: #e8e0f2; text-align: center;
  background: linear-gradient(180deg, rgba(12, 10, 17, 0.2), rgba(8, 7, 11, 0.95));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.carousel-nav {
  position: absolute; top: 50%; z-index: 3;
  transform: translateY(-50%);
  width: 42px; height: 42px; padding: 0;
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line);
  background: rgba(14, 12, 19, 0.88); color: var(--muted);
  backdrop-filter: blur(10px); cursor: pointer;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.8);
  transition: color 0.25s, border-color 0.25s, background 0.25s, opacity 0.25s, transform 0.25s;
}
.carousel-nav svg { width: 18px; height: 18px; }
.carousel-nav:hover:not(:disabled) {
  color: #fff; border-color: var(--brass); background: rgba(20, 17, 25, 0.95);
  transform: translateY(calc(-50% - 1px));
}
.carousel-nav:disabled { opacity: 0.25; cursor: default; pointer-events: none; }
.carousel-prev { left: clamp(8px, 2vw, 18px); }
.carousel-next { right: clamp(8px, 2vw, 18px); }

.carousel-footer {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 4px clamp(22px, 4vw, 48px) 0; flex-wrap: wrap;
}
.carousel-dots { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.carousel-dot {
  width: 6px; height: 6px; padding: 0; border: none; border-radius: 50%;
  background: var(--line); cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease, width 0.3s ease;
}
.carousel-dot:hover { background: var(--muted); }
.carousel-dot.is-active {
  width: 22px; border-radius: 3px; background: linear-gradient(90deg, var(--brass-dim), var(--brass));
}
.carousel-counter {
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--faint); min-width: 4.5em; text-align: center;
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50; display: none; place-items: center;
  padding: clamp(36px, 4vh, 52px) 12px clamp(16px, 2vh, 28px);
  overflow-x: hidden; overflow-y: auto;
  background: transparent; animation: fadeIn 0.25s ease both;
}
.lightbox::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: #07060a;
}
.lightbox.open { display: grid; }
.lightbox-inner {
  position: relative; z-index: 1; display: flex; flex-direction: column;
  align-items: center; gap: 14px; width: min(98vw, 960px);
  animation: fadeIn 0.3s ease both;
}

/* curved arc in zoom view — side cards in 3D track; center card is flat on top */
.lb-arc-viewport {
  position: relative; width: 100%;
  min-height: 320px;
  overflow: hidden;
}
.lb-arc-track {
  position: absolute; inset: 0;
  perspective: 1500px;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
  mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
  pointer-events: none;
}
.lb-arc-slide {
  position: absolute; left: 50%; top: 50%;
  width: min(94vw, 860px);
  transform-origin: center center;
  transition:
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.5s ease;
  pointer-events: auto;
}
.lb-arc-slide.is-side {
  cursor: pointer;
  filter: brightness(0.72);
  backface-visibility: hidden;
  will-change: transform, opacity;
}
.lb-arc-slide .museum-card {
  box-shadow: 0 48px 120px -36px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.lb-arc-slide.is-side .museum-card {
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.92);
}
.lb-arc-slide.is-side:hover { filter: brightness(0.88); }

/* Center card: zero transforms, native text rasterization */
.lb-center-stage {
  position: relative; z-index: 40;
  width: min(94vw, 860px);
  margin: 0 auto;
  contain: layout style;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}
.lb-center-stage .museum-card {
  padding: 38px 38px 34px;
  border-color: rgba(201, 168, 106, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 28%),
    linear-gradient(180deg, #1e1b26, #15121b);
  box-shadow: 0 40px 100px -36px rgba(0, 0, 0, 0.92),
    0 0 0 1px rgba(201, 168, 106, 0.18);
}
.lb-center-stage .museum-card__shape {
  width: 176px; height: 176px;
}
.lb-center-stage .museum-card__title {
  font-size: 42px;
  font-weight: 600;
  margin-bottom: 18px;
  color: #ffffff;
  letter-spacing: 0.005em;
}
.lb-center-stage .museum-card__narrative {
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.7;
  max-width: 56ch;
  color: #f0eaf6;
  letter-spacing: 0.01em;
}
.lb-center-stage .museum-card__mood {
  font-size: 12px; margin-bottom: 12px;
  color: #e0c88a;
  letter-spacing: 0.38em;
  font-weight: 500;
}
.lb-center-stage .museum-card__placard-label {
  color: #b5a9c4;
  font-weight: 500;
}
.lb-center-stage .museum-card__artifact {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  font-style: italic;
  color: #e8e0f0;
  letter-spacing: 0.01em;
}
.lb-center-stage.is-compact .museum-card {
  padding: 32px 32px 28px;
}
.lb-center-stage.is-compact .museum-card__shape {
  width: 148px; height: 148px;
}
.lb-center-stage.is-compact .museum-card__title {
  font-size: 36px;
  margin-bottom: 14px;
}
.lb-center-stage.is-compact .museum-card__narrative {
  font-size: 17px;
  line-height: 1.65;
}
.lb-center-stage.is-compact .museum-card__artifact {
  font-size: 16px;
}
.lb-center-stage.is-tight .museum-card {
  padding: 26px 26px 22px;
}
.lb-center-stage.is-tight .museum-card__shape {
  width: 120px; height: 120px;
}
.lb-center-stage.is-tight .museum-card__title {
  font-size: 30px;
  margin-bottom: 12px;
}
.lb-center-stage.is-tight .museum-card__narrative {
  font-size: 15px;
  line-height: 1.6;
}
.lb-center-stage.is-tight .museum-card__artifact {
  font-size: 14px;
}
@media (max-width: 720px) {
  .lb-center-stage .museum-card__title { font-size: 34px; }
  .lb-center-stage .museum-card__narrative { font-size: 17px; }
}
body.lb-open .grain { opacity: 0; }
body.lb-open .whisper { opacity: 0 !important; }
.lb-arc-fallback {
  display: block; width: 100%; height: auto;
  border-radius: 12px; border: 1px solid var(--line);
  box-shadow: 0 40px 100px -30px #000;
}
.lb-actions {
  display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
}
.lb-counter {
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--faint); min-width: 4.5em; text-align: center;
}
.lb-nav {
  position: fixed; top: 50%; z-index: 52;
  width: 46px; height: 46px; padding: 0;
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line);
  background: rgba(14, 12, 19, 0.9); color: var(--muted);
  backdrop-filter: blur(10px); cursor: pointer;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.8);
  transform: translateY(-50%);
  transition: color 0.25s, border-color 0.25s, opacity 0.25s, transform 0.25s;
}
.lb-nav svg { width: 18px; height: 18px; }
.lb-nav:hover:not(:disabled) {
  color: #fff; border-color: var(--brass);
  transform: translateY(-50%) translateY(-1px);
}
.lb-nav:disabled { opacity: 0.22; cursor: default; pointer-events: none; }
.lb-prev { left: clamp(12px, 3vw, 28px); }
.lb-next { right: clamp(12px, 3vw, 28px); }
.lightbox .lb-close {
  position: fixed; top: 22px; right: 26px; z-index: 52;
  font-size: 30px; color: var(--muted);
  cursor: pointer; line-height: 1; font-family: var(--serif);
}
.lightbox .lb-close:hover { color: #fff; }

/* ---------- footer ---------- */
.footer {
  margin-top: clamp(48px, 7vh, 76px); padding-top: 20px; border-top: 1px solid var(--line-soft);
  text-align: center; color: var(--faint); font-family: var(--serif); font-style: italic; font-size: 14px;
}
.footer a { color: var(--brass-dim); text-decoration: none; }
.footer a:hover { color: var(--brass); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 520px) {
  .field { padding: 14px 14px; }
  .whatif, #line { font-size: 20px; }
  .carousel-nav { width: 36px; height: 36px; }
  .carousel-viewport { height: clamp(280px, 52vw, 340px); }
  .lb-nav { width: 40px; height: 40px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}
