:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  font-synthesis: none;
  --ink: #f4f5ff;
  --muted: #a9b4d2;
  --gold: #eddaa4;
  --line: rgba(204, 222, 255, .17);
}

:host {
  color-scheme: dark;
  color: #f4f5ff;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  font-synthesis: none;
  --ink: #f4f5ff;
  --muted: #a9b4d2;
  --gold: #eddaa4;
  --line: rgba(204, 222, 255, .17);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { min-height: 100%; background: #080d1c; }
body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 50% -10%, #233455 0, #101a33 30%, #090e1e 73%);
}
body.modal-open { overflow: hidden; }
button, a { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid #b5e7fa; outline-offset: 3px; }
.ambient-haze {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 35%, rgba(90, 130, 211, .12), transparent 30%),
    radial-gradient(circle at 88% 72%, rgba(155, 99, 193, .09), transparent 31%);
}
.ambient-haze::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .25;
  background-image: radial-gradient(circle, white .65px, transparent 1px);
  background-size: 77px 93px;
  mask-image: linear-gradient(to bottom, #000, transparent 90%);
}
.exhibition-shell { width: min(100%, 520px); margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom)); }
.exhibition-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 42px; }
.return-link, .sound-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(17, 27, 52, .72);
  color: #d8e4f6;
  font-size: 12px;
  font-weight: 600;
}
.return-link span { font-size: 20px; line-height: 1; }
.sound-toggle span:first-child { font-size: 19px; color: var(--gold); }
.sound-toggle[aria-pressed="false"] span:first-child { opacity: .45; }
.topbar-mark { color: #d8c79b; letter-spacing: .08em; font-family: Georgia, serif; font-size: 19px; font-weight: 700; }
.topbar-mark span { font-size: 8px; vertical-align: super; margin-left: 1px; }
.exhibition-intro { text-align: center; padding: 31px 8px 25px; }
.eyebrow { margin: 0 0 10px; color: #b5c4df; font-size: 9px; font-weight: 700; letter-spacing: .24em; }
.exhibition-intro h1 { margin: 0; color: #fff8e9; font-family: Georgia, "Yu Mincho", serif; font-weight: 600; font-size: clamp(27px, 8vw, 36px); letter-spacing: .08em; text-shadow: 0 0 24px rgba(247, 218, 159, .15); }
.exhibition-intro p:last-child { margin: 13px 0 0; color: #aebbd2; font-size: 12px; line-height: 1.8; }
.gallery-room {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 25px 13px 22px;
  border: 1px solid rgba(221, 207, 171, .24);
  border-radius: 24px 24px 18px 18px;
  background:
    linear-gradient(90deg, rgba(224, 192, 129, .09), transparent 10%, transparent 90%, rgba(224, 192, 129, .09)),
    radial-gradient(ellipse at 50% 4%, rgba(204, 203, 229, .22), transparent 36%),
    linear-gradient(#202b48 0, #131f38 24%, #10192e 68%, #0b1426 100%);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .38), inset 0 0 0 5px rgba(11, 17, 33, .48);
}
.gallery-room::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 95px 5% 0;
  pointer-events: none;
  opacity: .85;
  background:
    linear-gradient(90deg, transparent 48%, rgba(223, 194, 141, .08) 50%, transparent 52%),
    repeating-linear-gradient(to bottom, transparent 0 248px, rgba(230, 204, 147, .16) 249px, transparent 251px),
    linear-gradient(90deg, rgba(5, 10, 23, .62), transparent 15%, transparent 85%, rgba(5, 10, 23, .62));
}
.gallery-room::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 7%; right: 7%; bottom: -8px; height: 240px;
  pointer-events: none;
  opacity: .7;
  background: repeating-linear-gradient(90deg, transparent 0 23%, rgba(220, 189, 135, .1) 24%, transparent 25%), linear-gradient(transparent, rgba(93, 102, 142, .17));
  clip-path: polygon(28% 0, 72% 0, 100% 100%, 0 100%);
}
.ceiling-light { position: absolute; left: 50%; top: -76px; width: 235px; height: 190px; transform: translateX(-50%); pointer-events: none; border-radius: 50%; background: radial-gradient(ellipse, rgba(252, 229, 169, .19), transparent 70%); }
.gallery-heading { display: flex; align-items: center; gap: 12px; justify-content: center; margin: 4px 0 22px; text-align: center; }
.gallery-heading-line { width: min(15%, 50px); height: 1px; background: linear-gradient(90deg, transparent, rgba(226, 209, 171, .55)); }
.gallery-heading-line:last-child { transform: rotate(180deg); }
.gallery-heading p { margin: 0 0 5px; color: #c7c29f; font-size: 9px; letter-spacing: .2em; }
.gallery-heading h2 { margin: 0; font-family: Georgia, "Yu Mincho", serif; font-weight: 500; font-size: 16px; letter-spacing: .09em; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 12px; }
.exhibit-card {
  --object-glow: #add7eb;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(202, 207, 224, .22);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(56, 67, 100, .54), rgba(14, 24, 45, .93) 63%);
  box-shadow: 0 15px 22px rgba(0, 0, 0, .23), inset 0 1px rgba(255, 255, 255, .06);
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.exhibit-card:active { transform: scale(.975); }
.exhibit-card:hover, .exhibit-card:focus-visible { border-color: var(--object-glow); box-shadow: 0 12px 28px rgba(0, 0, 0, .35), 0 0 23px color-mix(in srgb, var(--object-glow) 23%, transparent); }
.exhibit-card.final-object { grid-column: 1 / -1; flex-direction: row; align-items: stretch; min-height: 194px; margin-top: 5px; }
.object-window {
  position: relative;
  display: block;
  height: 170px;
  overflow: hidden;
  flex: 1 1 auto;
  background: radial-gradient(ellipse at 50% 72%, color-mix(in srgb, var(--object-glow) 20%, transparent), transparent 58%);
}
.object-window::before { content: ""; position: absolute; left: 8%; right: 8%; top: 10px; bottom: 15px; border: 1px solid rgba(240, 233, 211, .09); border-radius: 75px 75px 12px 12px; box-shadow: inset 0 12px 26px rgba(4, 8, 21, .23); }
.object-window::after { content: ""; position: absolute; left: 4%; right: 4%; bottom: 11px; height: 9px; border-radius: 50%; background: var(--object-glow); opacity: .12; filter: blur(8px); }
.object-window canvas { display: block; position: relative; width: 100%; height: 154px; pointer-events: none; }
.plinth { display: block; position: relative; z-index: 1; width: 75%; height: 10px; margin: -6px auto 0; border-radius: 2px 2px 6px 6px; background: linear-gradient(#a7a5b0, #50617b 27%, #22334f 58%, #17243b); box-shadow: 0 6px 9px rgba(0, 0, 0, .3), 0 -2px 8px color-mix(in srgb, var(--object-glow) 30%, transparent); }
.plinth::before { content: ""; position: absolute; left: 5%; right: 5%; top: -2px; height: 2px; background: #e9d7ad; opacity: .65; }
.object-plaque { display: grid; gap: 4px; padding: 11px 10px 13px; min-height: 71px; border-top: 1px solid rgba(233, 220, 188, .13); background: linear-gradient(140deg, rgba(27, 38, 66, .9), rgba(12, 21, 40, .95)); }
.object-plaque small { color: #cfc59f; font-size: 8px; letter-spacing: .1em; }
.object-plaque strong { color: #f0f3fb; font-size: 12px; line-height: 1.3; font-weight: 600; }
.final-object .object-window { flex: 1 1 48%; height: 194px; }
.final-object .object-window canvas { height: 181px; }
.final-object .object-plaque { flex: 1 1 48%; display: flex; flex-direction: column; justify-content: center; border-top: 0; border-left: 1px solid rgba(233, 220, 188, .13); padding: 16px; }
.final-object .object-plaque strong { font-size: 15px; }
.final-object .plinth { position: absolute; width: 75%; left: 12.5%; bottom: 3px; }
.future-display { display: flex; align-items: center; gap: 13px; margin: 27px 4px 0; padding: 14px; border: 1px dashed rgba(196, 209, 234, .23); border-radius: 13px; background: rgba(9, 17, 34, .65); }
.future-light { color: #b1bdd8; font-size: 23px; opacity: .65; }
.future-display div { display: grid; gap: 4px; flex: 1; }
.future-display small { color: #949fba; font-size: 8px; letter-spacing: .19em; }
.future-display strong { color: #c3cadb; font-size: 11px; font-weight: 500; }
.future-dash { color: #8994ac; }
.gallery-footnote { margin: 22px 0 0; color: #9ca8c1; text-align: center; font-size: 9px; letter-spacing: .16em; }
.exhibition-footer { display: flex; justify-content: space-between; gap: 10px; padding: 23px 2px 4px; color: #8995b0; font-size: 9px; letter-spacing: .05em; }

.focus-overlay { position: fixed; inset: 0; z-index: 20; display: flex; align-items: end; justify-content: center; padding-top: env(safe-area-inset-top); }
.focus-backdrop { position: absolute; inset: 0; background: rgba(3, 7, 17, .83); backdrop-filter: blur(9px); }
.focus-panel {
  --object-glow: #add7eb;
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 510px);
  max-height: calc(100dvh - env(safe-area-inset-top) - 8px);
  overflow-y: auto;
  padding: 16px 18px calc(17px + env(safe-area-inset-bottom));
  border: 1px solid rgba(219, 204, 166, .34);
  border-bottom: 0;
  border-radius: 23px 23px 0 0;
  background: radial-gradient(circle at 50% 26%, color-mix(in srgb, var(--object-glow) 13%, transparent), transparent 48%), linear-gradient(#202b47, #0e182e 65%, #0b1326);
  box-shadow: 0 -25px 65px rgba(0, 0, 0, .52);
  animation: sheet-in .32s ease-out both;
}
@keyframes sheet-in { from { opacity: .3; transform: translateY(32px); } to { opacity: 1; transform: translateY(0); } }
.focus-header { display: flex; align-items: center; justify-content: space-between; min-height: 35px; }
.focus-header div { display: grid; gap: 2px; }
.focus-header small { font-size: 8px; letter-spacing: .2em; color: #c9cba9; }
.focus-header strong { font-family: Georgia, serif; font-size: 16px; font-weight: 500; letter-spacing: .1em; }
.focus-close { width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; background: rgba(7, 15, 31, .55); font-size: 23px; line-height: 1; }
.focus-stage { position: relative; flex: 0 0 auto; height: clamp(275px, 46dvh, 398px); overflow: hidden; margin: 4px -8px 0; background: radial-gradient(ellipse at 50% 56%, color-mix(in srgb, var(--object-glow) 14%, transparent), transparent 61%); }
.focus-stage::after { content: ""; position: absolute; left: 16%; right: 16%; bottom: 17px; height: 8px; border-radius: 50%; background: var(--object-glow); filter: blur(18px); opacity: .35; pointer-events: none; }
.focus-stage canvas { position: relative; z-index: 2; display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.focus-stage canvas:active { cursor: grabbing; }
.focus-orbit { position: absolute; top: 50%; left: 50%; width: 84%; aspect-ratio: 1; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--object-glow) 34%, transparent); transform: translate(-50%, -50%) rotate(-24deg) scaleY(.56); pointer-events: none; }
.focus-orbit-two { width: 64%; transform: translate(-50%, -50%) rotate(30deg) scaleY(.75); border-style: dashed; opacity: .37; }
.focus-beam { position: absolute; inset: 4% 13%; opacity: .15; pointer-events: none; background: radial-gradient(ellipse at center, var(--object-glow), transparent 67%); filter: blur(30px); }
.focus-panel.effect .focus-beam { animation: exhibit-flare .85s ease-out; }
@keyframes exhibit-flare { 0% { opacity: .1; transform: scale(.7); } 35% { opacity: .34; transform: scale(1.05); } 100% { opacity: .15; transform: scale(1); } }
.focus-spark { position: absolute; z-index: 3; pointer-events: none; color: var(--object-glow); text-shadow: 0 0 12px var(--object-glow); }
.focus-spark-one { top: 17%; left: 19%; font-size: 12px; }
.focus-spark-two { right: 20%; top: 31%; font-size: 19px; }
.focus-spark-three { bottom: 25%; right: 14%; font-size: 27px; }
.focus-copy { text-align: center; }
.focus-copy > p:first-child { margin: 0 0 7px; color: #c8c29f; font-size: 9px; letter-spacing: .18em; }
.focus-copy h2 { margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(20px, 5.5vw, 27px); font-weight: 600; letter-spacing: .06em; }
.focus-rule { display: flex; align-items: center; justify-content: center; gap: 11px; margin: 9px 0; color: var(--object-glow); font-size: 10px; }
.focus-rule span { width: 50px; height: 1px; background: linear-gradient(90deg, transparent, var(--object-glow)); opacity: .6; }
.focus-rule span:last-child { transform: rotate(180deg); }
.focus-description { max-width: 340px; min-height: 40px; margin: 0 auto; color: #cbd5e6; font-size: 12px; line-height: 1.7; }
.focus-hint { display: block; margin-top: 8px; color: #95a7c2; font-size: 10px; }
.focus-actions { display: flex; gap: 9px; margin-top: 16px; }
.focus-actions button { min-height: 45px; border: 1px solid rgba(203, 222, 244, .25); border-radius: 10px; background: rgba(20, 34, 60, .84); font-size: 11px; font-weight: 600; }
.focus-actions button:first-child { flex: 1.25; }
.focus-actions button:last-child { flex: 1; }
.focus-actions .focus-action-icon { color: var(--object-glow); font-size: 16px; }
.focus-actions .focus-action-label { position: relative; top: -2px; }

@media (max-width: 355px) {
  .gallery-room { padding-inline: 10px; }
  .gallery-grid { gap: 13px 9px; }
  .object-window { height: 149px; }
  .object-window canvas { height: 135px; }
  .object-plaque strong { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
