/* Heart Museum — photoreal gallery rooms (damask / wood / ornate frames) */

:root {
  --ex-cream: #f7efe4;
  --ex-gold: #e2c57a;
  --ex-ink: #14080c;
  --ex-serif: "Cormorant Garamond", Georgia, serif;
  --ex-display: "Cinzel", serif;
  --ex-script: "Great Vibes", cursive;
  --ex-body: "Sora", system-ui, sans-serif;
  --ex-cta-h: 5.5rem;
}

.exhibit-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ex-body);
  color: var(--ex-cream);
  background: #12080c;
  overflow-x: hidden;
}

.exhibit-app {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

.ex-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.ex-haze {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 30%, rgba(255, 200, 140, 0.08), transparent 60%);
}

.ex-dust span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 235, 190, 0.55);
  left: calc(2% + var(--d) * 5%);
  top: 110%;
  animation: ex-dust-rise calc(14s + var(--d) * 0.4s) linear infinite;
  animation-delay: calc(var(--d) * -0.7s);
}

@keyframes ex-dust-rise {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: 0.7; }
  100% { transform: translateY(-120vh); opacity: 0; }
}

.ex-progress {
  position: fixed;
  top: max(0.85rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(10, 4, 6, 0.55);
  border: 1px solid rgba(226, 197, 122, 0.3);
  backdrop-filter: blur(10px);
}

.ex-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 240, 210, 0.25);
}

.ex-progress-dot.is-active {
  background: linear-gradient(180deg, #f3e0a8, #c9a24a);
  box-shadow: 0 0 12px rgba(240, 215, 154, 0.55);
}

.ex-progress-line {
  width: 14px;
  height: 1px;
  background: rgba(226, 197, 122, 0.35);
}

.ex-curtain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  display: flex;
  opacity: 0;
}

.ex-curtain-panel {
  flex: 1;
  background: linear-gradient(180deg, #5a1a28, #1a080c);
  transform: scaleX(0);
  transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1);
}

.ex-curtain-panel--l { transform-origin: left center; }
.ex-curtain-panel--r { transform-origin: right center; }
.ex-curtain.is-closing { opacity: 1; }
.ex-curtain.is-closing .ex-curtain-panel { transform: scaleX(1); }
.ex-curtain.is-opening { opacity: 1; }
.ex-curtain.is-opening .ex-curtain-panel { transform: scaleX(0); }

/* ——— Rooms ——— */
.ex-room {
  position: relative;
  display: none;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 3.75rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 2;
  background: #1a0a10;
}

.ex-room.is-on {
  display: flex;
  animation: ex-room-in 0.7s ease both;
}

@keyframes ex-room-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ex-room-body {
  position: relative;
  z-index: 4;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* Realistic wall shell */
.ex-wall-real {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ex-wall-damask {
  position: absolute;
  inset: 0 0 22% 0;
  background-color: #5a1e28;
  background-image: var(--ex-damask);
  background-size: 280px auto;
  background-repeat: repeat;
  filter: saturate(1.05) contrast(1.05);
}

.ex-wall-wood {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24%;
  background-color: #2a1810;
  background-image: var(--ex-wood);
  background-size: cover;
  background-position: center top;
  box-shadow: inset 0 18px 28px rgba(0, 0, 0, 0.45);
  border-top: 3px solid #4a3018;
}

.ex-wall-wood::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 10px;
  background: linear-gradient(180deg, #d4b56a, #6a4820 60%, #3a2810);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.ex-wall-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 50% at 50% 35%, transparent 20%, rgba(8, 2, 4, 0.55) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.25), transparent 30%, rgba(0, 0, 0, 0.35) 100%);
}

.ex-wall-spot {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(90vw, 720px);
  height: 70%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 220, 160, 0.28), transparent 65%);
  mix-blend-mode: screen;
}

/* Typography on wall */
.ex-foyer-copy,
.ex-room-head--onwall {
  text-align: center;
  margin: 0 0 0.75rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
}

.ex-script {
  margin: 0;
  font-family: var(--ex-script);
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  font-weight: 400;
  color: #fff8ee;
  line-height: 1.1;
}

.ex-hint {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: rgba(255, 245, 230, 0.82);
}

.ex-room-kicker {
  margin: 0;
  font-family: var(--ex-display);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ex-gold);
}

.ex-room-title {
  margin: 0.25rem 0 0;
  font-family: var(--ex-serif);
  font-size: clamp(1.4rem, 4vw, 2.1rem);
  font-weight: 600;
  color: #fff4e8;
}

.ex-wall-sign {
  align-self: flex-start;
  margin: 0 0 0.85rem 0.5rem;
  padding: 0.45rem 0.75rem;
  background: #6a2230;
  border: 2px solid rgba(242, 220, 160, 0.75);
  color: #fff;
  font-family: var(--ex-serif);
  font-size: 0.92rem;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
}

/* Ornate gold frame with photo inset */
.ex-ornate {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55));
  transition: transform 0.22s ease, filter 0.22s ease;
}

button.ex-ornate:hover,
button.ex-ornate:focus-visible {
  transform: translateY(-4px) scale(1.02);
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 20px rgba(255, 210, 140, 0.2));
}

button.ex-ornate:focus-visible {
  outline: 2px solid #f0d79a;
  outline-offset: 6px;
}

.ex-ornate-border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 2;
  pointer-events: none;
}

.ex-ornate-photo {
  position: absolute;
  inset: 13% 15% 15% 15%;
  z-index: 1;
  overflow: hidden;
  background: #1a0c10;
}

.ex-ornate-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ex-ornate--oval .ex-ornate-photo {
  inset: 16% 18%;
  border-radius: 50%;
}

.ex-ornate--heart .ex-ornate-photo {
  inset: 16% 17% 14%;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23000' d='M50 92 C50 92 8 68 8 40 C8 24 20 14 34 14 C42 14 48 18 50 24 C52 18 58 14 66 14 C80 14 92 24 92 40 C92 68 50 92 50 92 Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23000' d='M50 92 C50 92 8 68 8 40 C8 24 20 14 34 14 C42 14 48 18 50 24 C52 18 58 14 66 14 C80 14 92 24 92 40 C92 68 50 92 50 92 Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.ex-hero-stage {
  position: relative;
  z-index: 4;
  width: min(58vw, 280px);
  margin: 0.25rem auto 0.5rem;
}

.ex-hero-stage .ex-ornate {
  cursor: default;
}

/* Velvet rope + stanchions */
.ex-rope-real {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  width: min(420px, 92vw);
  margin: 0.35rem auto 0;
  min-height: 88px;
}

.ex-rope-real--low {
  position: absolute;
  left: 50%;
  bottom: calc(var(--ex-cta-h) + 0.35rem);
  transform: translateX(-50%);
  margin: 0;
  opacity: 0.95;
  pointer-events: none;
}

.ex-stanchion {
  width: clamp(52px, 14vw, 78px);
  height: auto;
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45));
  object-fit: contain;
}

.ex-stanchion--r {
  transform: scaleX(-1);
}

.ex-velvet {
  flex: 1 1 auto;
  height: 14px;
  margin: 0 -6px 34px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #e07a8a, #8a2238 45%, #4a1018 100%);
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.35),
    inset 0 2px 0 rgba(255, 190, 200, 0.35);
}

/* Ticket CTA */
.ex-footer-cta {
  position: relative;
  z-index: 6;
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: var(--ex-cta-h);
  padding: 0.65rem 0 0.4rem;
  margin-top: auto;
}

.ex-footer-cta--spacer {
  min-height: 1rem;
  padding: 0;
}

.ex-ticket-real {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  padding: 0;
  width: min(220px, 70vw);
  transition: transform 0.2s ease;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.5));
}

.ex-ticket-real:hover { transform: translateY(-4px) scale(1.03); }
.ex-ticket-real:focus-visible {
  outline: 2px solid #f0d79a;
  outline-offset: 6px;
}

.ex-ticket-real img {
  display: block;
  width: 100%;
  height: auto;
}

.ex-ticket-real-label {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  font-family: var(--ex-display);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1a0c10;
  background: rgba(255, 248, 230, 0.82);
  padding: 0.15rem 0.45rem;
  white-space: nowrap;
}

/* Next room ornate plaque button */
.ex-next-real {
  appearance: none;
  border: 0;
  cursor: pointer;
  width: min(280px, 86vw);
  min-height: 4.4rem;
  padding: 1.1rem 1.6rem 1rem;
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  color: #1a1008;
  background-image: var(--ex-next);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.45));
  transition: transform 0.2s ease;
}

.ex-next-real:hover { transform: translateY(-3px); }
.ex-next-real:focus-visible {
  outline: 2px solid #fff6d0;
  outline-offset: 4px;
}

.ex-next-real strong {
  font-family: var(--ex-display);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
}

.ex-next-real span {
  font-family: var(--ex-serif);
  font-size: 0.78rem;
  opacity: 0.75;
}

/* Gallery salon collage */
.ex-room-body--gallery {
  max-width: 100%;
  padding-bottom: 5.5rem;
}

.ex-salon-wall {
  position: relative;
  z-index: 4;
  width: min(1040px, 100%);
  min-height: 52vh;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.85rem 0.65rem;
  align-items: end;
  padding: 0.5rem 0.35rem 1rem;
}

.ex-salon-piece {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  animation: ex-hang-in 0.55s ease both;
  animation-delay: calc(var(--i, 0) * 0.06s);
}

@keyframes ex-hang-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.ex-salon-piece--0 { grid-column: 1 / 3; }
.ex-salon-piece--1 { grid-column: 3 / 5; }
.ex-salon-piece--2 { grid-column: 5 / 7; }
.ex-salon-piece--3 { grid-column: 2 / 4; }
.ex-salon-piece--4 { grid-column: 4 / 6; }
.ex-salon-piece--5 { grid-column: 1 / 3; }
.ex-salon-piece--3 .ex-ornate,
.ex-salon-piece--1 .ex-ornate {
  width: min(100%, 200px);
}

.ex-salon-piece .ex-ornate {
  width: min(100%, 170px);
}

.ex-didactic {
  width: min(100%, 170px);
  min-height: 4.6rem;
  padding: 0.45rem 0.5rem 0.55rem;
  background: #f4ebe0;
  color: #241810;
  border: 1px solid rgba(255, 250, 240, 0.7);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
  text-align: left;
}

.ex-didactic span {
  display: block;
  font-family: var(--ex-display);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a6230;
}

.ex-didactic strong {
  display: block;
  margin-top: 0.15rem;
  font-family: "Cinzel", var(--ex-serif), serif;
  font-size: 0.78rem;
  line-height: 1.2;
}

.ex-didactic p {
  margin: 0.25rem 0 0;
  font-family: "Great Vibes", cursive;
  font-size: 1.05rem;
  line-height: 1.25;
  color: #3a2418;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Music hall */
.ex-music-hall {
  position: relative;
  z-index: 4;
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 0.7fr 1.2fr 0.7fr;
  gap: 0.5rem;
  align-items: end;
  padding: 0.5rem 0 1rem;
}

.ex-bust {
  width: 100%;
  max-width: 180px;
  margin: 0 auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.5));
  user-select: none;
}

.ex-music-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.ex-vinyl-real {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  width: min(260px, 70vw);
  padding: 0;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.5));
  transition: transform 0.22s ease;
}

.ex-vinyl-real:hover:not(:disabled) { transform: scale(1.03); }
.ex-vinyl-real:disabled,
.ex-vinyl-real.is-empty { opacity: 0.55; cursor: not-allowed; }
.ex-vinyl-real:focus-visible {
  outline: 2px solid #f0d79a;
  outline-offset: 6px;
}

.ex-vinyl-real img {
  display: block;
  width: 100%;
  height: auto;
}

.ex-vinyl-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 42%;
  text-align: center;
  font-family: var(--ex-serif);
  font-size: clamp(0.7rem, 2.4vw, 0.95rem);
  color: #fff8ee;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  line-height: 1.2;
}

.ex-vinyl-real.is-playing .ex-vinyl-hint { opacity: 0.35; }

.ex-red-plaque {
  width: min(280px, 85%);
  padding: 0.7rem 0.9rem;
  background: #6a2230;
  border: 2px solid rgba(255, 245, 230, 0.85);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.ex-red-plaque p {
  margin: 0;
  font-family: var(--ex-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: #fff8ee;
}

.ex-audio {
  width: min(420px, 100%);
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid rgba(226, 197, 122, 0.3);
}

.ex-audio iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Letter */
.ex-room--letter .letter-bloom {
  position: relative;
  z-index: 4;
  width: min(440px, 100%);
}

.ex-letter-card {
  padding: 1.25rem;
  background: linear-gradient(180deg, #fff8ee, #f0e2d0);
  color: #2a1810;
  border: 1px solid rgba(168, 124, 56, 0.35);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45);
}

.ex-letter-kicker {
  margin: 0 0 0.55rem;
  font-family: var(--ex-display);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8a6230;
}

.ex-letter-body {
  font-family: var(--ex-serif);
  font-size: 1.15rem;
  line-height: 1.55;
}

.ex-letter-cta { margin: 1rem 0 0; text-align: center; }

.ex-demo-cta {
  display: inline-flex;
  min-height: 2.6rem;
  padding: 0.7rem 1.2rem;
  background: linear-gradient(180deg, #f0d79a, #c4a060);
  color: #1a0c10;
  font-weight: 700;
  text-decoration: none;
}

/* Lightbox */
.ex-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 3, 5, 0.9);
  backdrop-filter: blur(6px);
}

.ex-lightbox[hidden] { display: none !important; }

.ex-lightbox-close {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: 1rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid rgba(226, 197, 122, 0.45);
  background: rgba(20, 8, 12, 0.85);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 2;
}

.ex-lightbox-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 0.7fr);
  gap: 1rem;
  align-items: center;
  width: min(920px, 94vw);
  max-height: 88vh;
}

.ex-lightbox-ornate {
  position: relative;
  margin: 0;
  width: min(100%, 360px);
  aspect-ratio: 3 / 4;
  justify-self: end;
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.55));
}

.ex-lightbox-didactic {
  background: #f4ebe0;
  color: #241810;
  padding: 1.2rem 1.1rem;
  border: 1px solid rgba(255, 250, 240, 0.8);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  max-height: 70vh;
  overflow: auto;
}

.ex-lightbox-no {
  margin: 0;
  font-family: var(--ex-display);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a6230;
}

.ex-lightbox-didactic h3 {
  margin: 0.35rem 0 0;
  font-family: var(--ex-display);
  font-size: 1.15rem;
}

.ex-lightbox-didactic p:last-child {
  margin: 0.65rem 0 0;
  font-family: "Great Vibes", cursive;
  font-size: 1.45rem;
  line-height: 1.35;
  color: #3a2418;
}

.ex-demo-bar {
  position: fixed;
  top: max(0.65rem, env(safe-area-inset-top));
  left: 0.65rem;
  z-index: 45;
  min-height: 2rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(226, 197, 122, 0.3);
}

@media (max-width: 820px) {
  .ex-salon-wall {
    grid-template-columns: repeat(2, 1fr);
    min-height: 0;
  }

  .ex-salon-piece--0,
  .ex-salon-piece--1,
  .ex-salon-piece--2,
  .ex-salon-piece--3,
  .ex-salon-piece--4,
  .ex-salon-piece--5 {
    grid-column: span 1;
  }

  .ex-salon-piece .ex-ornate {
    width: min(100%, 160px);
  }

  .ex-music-hall {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .ex-bust {
    display: none;
  }

  .ex-rope-real--low {
    display: none;
  }

  .ex-lightbox-stage {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .ex-lightbox-ornate {
    justify-self: center;
    width: min(72vw, 280px);
  }

  .ex-wall-wood { height: 18%; }
  .ex-wall-damask { inset: 0 0 16% 0; }
}

@media (min-width: 900px) {
  .ex-hero-stage { width: min(34vw, 300px); }
  .ex-bust { max-width: 210px; }
}

@media (prefers-reduced-motion: reduce) {
  .ex-dust span,
  .ex-room.is-on,
  .ex-salon-piece {
    animation: none !important;
  }
  .ex-curtain-panel { transition: none !important; }
}
