/* The Infinite Museum (play/museum.html) and the Play page's card art. Uses the tokens from site.css.
   The corridor fills the screen under the site header; labels are cream cards with dark ink, like a real
   wall label, so they stay readable over any painting. */
.mz-stage { position: relative; height: calc(100vh - var(--mz-top, 64px)); height: calc(100svh - var(--mz-top, 64px)); min-height: 480px; overflow: hidden; background: #0b0a09; isolation: isolate; }
.mz-stage [hidden] { display: none !important; }
.mz-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline: none; }
.mz-canvas:active { cursor: grabbing; }
.mz-canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--emit); }

/* top bar: where you are, and two actions */
.mz-top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 16px;
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) 28px max(16px, env(safe-area-inset-left, 0px));
  background: linear-gradient(180deg, rgba(11, 10, 9, 0.78), rgba(11, 10, 9, 0)); pointer-events: none; }
.mz-top > * { pointer-events: auto; }
.mz-stage:not(.is-in) .mz-top { visibility: hidden; }
.mz-where { font-family: var(--font-data); font-size: var(--step--1); color: var(--ink); line-height: 1.35; margin: 0; padding-top: 10px; max-width: 40ch; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.mz-where .label { color: var(--emit); font-size: inherit; margin-right: 6px; }
.mz-top-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mz-pill { font-family: var(--font-data); font-size: var(--step--1); font-weight: 500; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(237, 231, 219, 0.55);
  background: rgba(13, 12, 11, 0.72); color: var(--ink); cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); touch-action: manipulation; }
.mz-pill.quiet { border-color: rgba(237, 231, 219, 0.22); }
@media (hover: hover) and (pointer: fine) { .mz-pill:hover { border-color: var(--emit); } }

/* bottom bar: rooms and paintings */
.mz-hud { position: absolute; z-index: 3; left: 50%; bottom: max(16px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 6px;
  padding: 6px; border-radius: 999px; background: rgba(13, 12, 11, 0.8); border: 1px solid var(--rule); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mz-stage:not(.is-in) .mz-hud, .mz-stage.is-reading .mz-hud, .mz-stage.is-commissioning .mz-hud { display: none; }
.mz-works { display: flex; gap: 6px; }
.mz-round, .mz-work { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(237, 231, 219, 0.28); background: transparent; color: var(--ink);
  font-family: var(--font-data); font-size: var(--step--1); cursor: pointer; touch-action: manipulation; display: inline-grid; place-items: center; padding: 0; }
.mz-round { font-size: 1.5rem; line-height: 1; }
.mz-round:disabled { opacity: 0.35; cursor: default; }
@media (hover: hover) and (pointer: fine) { .mz-round:not(:disabled):hover, .mz-work:hover { border-color: var(--emit); color: var(--emit); } }
.mz-pill:focus-visible, .mz-round:focus-visible, .mz-work:focus-visible { outline: 2px solid var(--emit); outline-offset: 2px; }

/* notes that come and go */
.mz-hint, .mz-toast { position: absolute; z-index: 4; left: 50%; transform: translateX(-50%); margin: 0; max-width: calc(100% - 32px); width: max-content; text-align: center;
  font-family: var(--font-data); font-size: var(--step--1); color: var(--ink); background: rgba(13, 12, 11, 0.86); border: 1px solid var(--rule); border-radius: 999px; padding: 10px 18px; }
.mz-hint { bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 70px); pointer-events: none; }
.mz-toast { top: 76px; border-radius: 12px; overflow-wrap: anywhere; }
.mz-wall { position: absolute; z-index: 2; left: max(16px, env(safe-area-inset-left, 0px)); top: 84px; max-width: min(440px, calc(100% - 32px)); margin: 0;
  background: rgba(242, 237, 227, 0.95); color: #1a1714; padding: 16px 20px; font-size: var(--step-0); line-height: 1.5; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.mz-wall strong { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; display: inline-block; margin-bottom: 4px; }
.mz-stage.is-reading .mz-wall, .mz-stage.is-commissioning .mz-wall { display: none; }
@media (max-width: 600px) { .mz-wall { top: 132px; font-size: 1.02rem; padding: 14px 16px; } .mz-toast { top: 132px; } }

/* the way in */
.mz-intro { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px; overflow-y: auto;
  background: radial-gradient(ellipse at 50% 40%, rgba(11, 10, 9, 0.35), rgba(11, 10, 9, 0.82)); }
.mz-intro-card { max-width: 580px; display: grid; gap: 16px; justify-items: start; background: rgba(20, 18, 16, 0.84); border: 1px solid var(--rule); padding: clamp(22px, 4vw, 36px);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.mz-intro-card .label { color: var(--emit); }
.mz-intro-card h1 { font-weight: 300; font-size: var(--step-3); letter-spacing: -0.025em; }
.mz-lede { color: #d8d0c3; font-size: var(--step-1); line-height: 1.5; }
.mz-help { font-family: var(--font-data); font-size: var(--step--1); color: #bdb4a6; }
.mz-help .mz-touch { display: none; }
.is-touch .mz-help .mz-touch { display: inline; }
.is-touch .mz-help .mz-keys { display: none; }
.mz-intro-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.mz-intro-actions .btn { min-height: 44px; cursor: pointer; }
.mz-how { font-family: var(--font-data); font-size: var(--step--1); color: #bdb4a6; min-height: 44px; display: inline-flex; align-items: center; }

/* the label: a cream card with dark ink */
.mz-plaque { position: absolute; z-index: 6; top: 76px; right: max(16px, env(safe-area-inset-right, 0px)); bottom: 16px; width: min(400px, calc(100% - 32px)); overflow-y: auto;
  background: #f2ede3; color: #1a1714; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); outline: none; overscroll-behavior: contain; }
.mz-plaque-in { padding: 26px 26px 22px; display: grid; gap: 10px; }
.mz-plaque .label { color: #5e5143; }
.mz-plaque h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.45rem, 2.4vw, 1.8rem); line-height: 1.15; color: #14110e; }
.mz-plaque.is-loading h2 { color: #6d6253; }
.mz-p-artist { font-family: var(--font-data); font-size: 1rem; }
.mz-p-artist strong { font-weight: 600; }
.mz-p-artist span, .mz-p-place { color: #4a4137; font-family: var(--font-data); font-size: var(--step--1); }
.mz-p-bio { color: #3b342c; font-size: var(--step--1); line-height: 1.5; }
.mz-p-medium { font-style: italic; color: #3b342c; font-size: var(--step--1); padding-bottom: 6px; border-bottom: 1px solid #d5ccbd; }
.mz-p-text { font-size: 1.05rem; line-height: 1.6; }
.mz-p-status { font-style: italic; color: #4a4137; }
.mz-p-status:empty { display: none; }
.mz-p-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.mz-plaque .btn { color: #1a1714; border-color: #1a1714; min-height: 44px; cursor: pointer; }
.mz-plaque .btn.primary { background: #1a1714; color: #f2ede3; }
@media (hover: hover) and (pointer: fine) { .mz-plaque .btn:hover { border-color: #8a3a12; } .mz-plaque .btn.primary:hover { background: #8a3a12; border-color: #8a3a12; color: #fff; } }
.mz-plaque .btn:focus-visible { outline: 2px solid #8a3a12; outline-offset: 3px; }
.mz-p-by { font-family: var(--font-data); font-size: 0.78rem; color: #5e5143; }
.mz-p-made { margin-top: 4px; }
.mz-p-by:empty { display: none; }

/* the painting itself, large, beside its label (wide screens) or above the label sheet (narrow ones) */
.mz-view { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 76px 440px 16px max(16px, env(safe-area-inset-left, 0px));
  background: rgba(11, 10, 9, 0.84); cursor: zoom-out; animation: mz-in 0.35s ease-out; }
.mz-view-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border: 10px solid #171310;
  box-shadow: 0 0 0 1px rgba(237, 231, 219, 0.12), 0 24px 60px rgba(0, 0, 0, 0.6); background: #2a2521; filter: blur(0.6px); transition: filter 0.4s ease-out; }
.mz-view.is-sharp .mz-view-img { filter: none; }
@keyframes mz-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 899px) {
  .mz-view { inset: 0 0 auto 0; height: 44%; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); }
  .mz-view-img { border-width: 6px; }
}
@media (max-width: 899px) {
  .mz-plaque { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 56%; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .mz-plaque-in { padding: 20px 18px 18px; gap: 8px; }
}

/* commissioning a room */
.mz-commission { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; padding: 16px; overflow-y: auto; background: rgba(8, 7, 6, 0.74); }
.mz-commission-in { width: min(540px, 100%); display: grid; gap: 14px; background: var(--panel); border: 1px solid var(--rule); padding: clamp(20px, 4vw, 30px); }
.mz-commission-in .label { color: var(--emit); }
.mz-commission-in h2 { font-weight: 300; font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.mz-c-label { font-family: var(--font-data); font-size: var(--step--1); color: #cfc6b8; }
.mz-c-input { width: 100%; font-family: var(--font-body); font-size: 1.15rem; padding: 12px 14px; min-height: 48px; background: #0f0e0c; color: var(--ink); border: 1px solid #6b6258; border-radius: 8px; }
.mz-c-input::placeholder { color: #8f8679; }
.mz-c-input:focus { outline: 2px solid var(--emit); outline-offset: 1px; border-color: transparent; }
.mz-c-ideas { display: flex; flex-wrap: wrap; gap: 8px; }
.mz-c-ideas .chip { font-family: var(--font-data); font-size: 0.85rem; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid #4a433b; background: transparent; color: #d8d0c3; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .mz-c-ideas .chip:hover { border-color: var(--emit); } }
.mz-c-ideas .chip:focus-visible { outline: 2px solid var(--emit); outline-offset: 2px; }
.mz-c-status { color: var(--emit); font-family: var(--font-data); font-size: var(--step--1); }
.mz-c-status:empty { display: none; }
.mz-c-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.mz-c-actions .btn { min-height: 44px; cursor: pointer; }
.mz-c-actions .btn:disabled { opacity: 0.55; cursor: progress; }

/* without WebGL: the room on one wall */
.mz-flat { position: absolute; inset: 0; overflow-y: auto; padding: 84px 16px 96px; background: #1b1815; }
.mz-flat-note { color: #cfc6b8; font-family: var(--font-data); font-size: var(--step--1); max-width: 1120px; margin: 0 auto 16px; }
.mz-flat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 20px; max-width: 1120px; margin: 0 auto; align-items: start; }
.mz-flat-work { display: grid; gap: 8px; padding: 12px; background: #2a2521; border: 1px solid var(--rule); color: var(--ink); cursor: pointer; font-family: var(--font-data); font-size: var(--step--1); text-align: left; }
.mz-flat-work canvas, .mz-flat-work img { width: 100%; height: auto; display: block; border: 8px solid #171310; background: #2a2521; }

/* how it works */
.mz-about { padding-block: 72px; }
.mz-about .page { display: grid; gap: 20px; }
.mz-about .page > .label { color: var(--emit); }
.mz-about h2 { font-weight: 300; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
.mz-about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 860px) { .mz-about-grid { grid-template-columns: 1fr; gap: 22px; } }
.mz-about-grid h3, .mz-schools-h { font-size: 1.3rem; margin-bottom: 6px; }
.mz-about-grid p { color: #cfc6b8; }
.mz-schools-h { margin-top: 12px; }
.mz-schools { padding-left: 1.2em; display: grid; gap: 6px; color: #cfc6b8; }
.mz-schools strong { color: var(--ink); font-weight: 500; }
.mz-back a { font-family: var(--font-data); font-size: var(--step--1); min-height: 44px; display: inline-flex; align-items: center; }

@media (prefers-reduced-motion: reduce) { .mz-pill, .mz-round, .mz-work, .mz-view-img { transition: none; } .mz-view { animation: none; } }

/* Sound Surfaces: the toggle, and what you hear on the label */
.mz-sound[aria-pressed="true"] { border-color: var(--emit); color: var(--emit); }
.mz-p-sound { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0 2px; border-top: 1px solid #d5ccbd; }
.mz-p-viz { width: 72px; height: 22px; flex: none; display: block; }
.mz-p-hear { flex: 1 1 200px; margin: 0; font-family: var(--font-data); font-size: var(--step--1); line-height: 1.45; color: #3b342c; }
.mz-p-listen { font-family: var(--font-data); font-size: var(--step--1); min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid #1a1714;
  background: transparent; color: #1a1714; cursor: pointer; touch-action: manipulation; }
@media (hover: hover) and (pointer: fine) { .mz-p-listen:hover { border-color: #8a3a12; color: #8a3a12; } }
.mz-p-listen:focus-visible { outline: 2px solid #8a3a12; outline-offset: 3px; }
@media (max-width: 600px) { .mz-top-actions { gap: 6px; } .mz-top-actions .mz-pill { padding: 0 13px; } .mz-wide { display: none; } }
