@font-face {
  font-family: "Pixelify Sans";
  src: url("./assets/pixelify-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  font-family: "Pixelify Sans", monospace;
  color: #f0ebf1;
  background: #110e18;
  --edge-left: max(16px, env(safe-area-inset-left));
  --edge-top: max(16px, env(safe-area-inset-top));
  --line: #ffffff1a;
  --gold: #e8cd9f;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { -webkit-font-smoothing: antialiased; }
button, input, output, a { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button { border: 0; padding: 0; cursor: pointer; background: none; }
button:disabled { opacity: .38; cursor: default; }
a { text-decoration: none; }
:focus-visible { outline: 2px solid #d4b7ed; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.exhibit {
  isolation: isolate;
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #191320;
}
.scene-bg, .scene-tint, .view { position: absolute; inset: 0; }
.scene-bg {
  z-index: 0;
  background: url('./assets/chamber.webp') 58% 50% / cover no-repeat;
  transition: filter .55s;
}
.scene-tint {
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, #b292d20d, transparent 48%, #09071165 103%);
}
.exhibit[data-light="day"] .scene-bg { filter: sepia(.58) saturate(.92) hue-rotate(338deg) brightness(1.44); }
.exhibit[data-light="ember"] .scene-bg { filter: sepia(.8) saturate(1.7) hue-rotate(322deg) brightness(1.1); }
.view { z-index: 2; }
#world { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#world:active { cursor: grabbing; }
#world:focus-visible { outline-offset: -3px; }
.poster { display: block; position: absolute; inset: 0; margin: auto; width: 100%; height: 100%; pointer-events: none; object-fit: contain; }
.menu-toggle {
  position: absolute;
  z-index: 5;
  left: var(--edge-left);
  top: var(--edge-top);
  display: grid;
  place-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  border-radius: 9px;
  color: #d9d0d5;
  opacity: .70;
  transition: opacity .15s, background .15s;
}
.menu-toggle span { display: block; width: 18px; height: 1px; background: currentColor; box-shadow: 0 1px 3px #08060c; }
.menu-toggle:is(:hover, :focus-visible, [aria-expanded="true"]) { opacity: 1; background: #17121dcc; }
.controls {
  position: absolute;
  z-index: 4;
  top: calc(var(--edge-top) + 50px);
  left: var(--edge-left);
  width: min(310px, calc(100% - var(--edge-left) - max(16px, env(safe-area-inset-right))));
  max-height: calc(100% - var(--edge-top) - 60px - env(safe-area-inset-bottom));
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  border: 1px solid #b99dc73b;
  border-radius: 12px;
  background: linear-gradient(145deg, #25212bee, #14111aeb);
  box-shadow: 0 16px 44px #08060d65;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.panel-head, .brightness-row, .switch-row, .download { display: flex; align-items: center; }
.panel-head { justify-content: space-between; gap: 10px; }
h1, h2 { margin: 0; }
h1 { font-size: 20px; line-height: 24px; font-weight: 600; letter-spacing: .04em; }
h2 { font-size: 16px; line-height: 20px; font-weight: 500; margin-bottom: 8px; }
.render-status { font-size: 14px; line-height: 1.3; color: #c4b9cd; letter-spacing: .07em; }
.exhibit[data-output="hdr"] .render-status { color: var(--gold); }
.panel-section { border-top: 1px solid var(--line); margin-top: 13px; padding-top: 13px; }
.light-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.light-choice { min-width: 0; border: 1px solid #ffffff1c; border-radius: 6px; overflow: hidden; background: #ffffff03; }
.light-choice[aria-pressed="true"] { border-color: #c9a8d5; background: #b080c51e; }
.light-choice:hover { border-color: #bca8c8; }
.light-choice img { display: block; width: 100%; height: 34px; object-fit: cover; image-rendering: pixelated; }
.light-choice b { display: block; font-size: 15px; font-weight: 500; line-height: 23px; white-space: nowrap; }
.brightness-row { justify-content: space-between; margin-top: 14px; font-size: 16px; }
.brightness-row output, .download small { color: var(--gold); font-size: 14px; line-height: 1; }
#brightness { display: block; width: 100%; height: 25px; cursor: pointer; margin: 1px 0 0; accent-color: #d4b37f; }
.toggles { display: grid; gap: 2px; }
.switch-row { width: 100%; min-height: 32px; gap: 9px; text-align: left; font-size: 16px; border-radius: 4px; }
.switch-row:hover, .view-tools button:hover { background: #ffffff0a; }
[data-icon] { display: inline-flex; align-items: center; flex: none; color: #c5b5cf; }
[data-icon] canvas { display: block; }
.switch { width: 30px; height: 17px; display: flex; align-items: center; padding: 2px; border: 1px solid #ffffff27; border-radius: 10px; margin-left: auto; background: #37313d; }
.switch:before { content: ""; width: 11px; height: 11px; background: #a89dae; border-radius: 50%; transition: transform .15s; }
[aria-checked="true"] .switch { background: #9879aa; }
[aria-checked="true"] .switch:before { transform: translateX(12px); background: #fcf0fd; }
.view-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.view-tools button { display: grid; place-content: center; height: 34px; border: 1px solid var(--line); border-radius: 5px; }
.download { justify-content: center; gap: 8px; min-height: 36px; margin-top: 10px; border: 1px solid #9a805b6b; color: var(--gold); background: #a1804b0d; border-radius: 5px; font-size: 16px; }
.download:hover { background: #a1804b22; }
.download [data-icon] { color: inherit; }
.controls [data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: calc(100% + 5px);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(200px, 65vw);
  padding: 5px 8px;
  border: 1px solid #8e7b95;
  background: #211b28;
  color: #fff3dc;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: normal;
  text-align: left;
  pointer-events: none;
  visibility: hidden;
}
.view-tools :first-child[data-tip]::after { left: 0; transform: none; }
.view-tools :last-child[data-tip]::after,
.render-status[data-tip]::after { left: auto; right: 0; transform: none; }
.render-status[data-tip]::after { bottom: auto; top: calc(100% + 4px); }
.menu-toggle[data-tip]::after { left: calc(100% + 5px); bottom: 50%; transform: translateY(50%); }
[data-tip]:focus-visible::after { visibility: visible; }
@media (hover: hover) {
  [data-tip]:hover::after { visibility: visible; }
}
@media (max-width: 600px) {
  :root { --edge-left: max(9px, env(safe-area-inset-left)); --edge-top: max(9px, env(safe-area-inset-top)); }
  .controls { padding: 15px; }
}
@media (prefers-reduced-motion: reduce) { *, ::before { transition-duration: 0s !important; } }
