:root {
  color-scheme: light;
  --paper: #f7f3ed;
  --gallery: #f8f8f3;
  --ink: #171412;
  --muted: rgba(23, 20, 18, 0.62);
  --line: rgba(23, 20, 18, 0.15);
  --green: #25463b;
  --brass: #a77a3c;
  --red: #9d3f2f;
  --glass: rgba(247, 243, 237, 0.72);
  --shadow: 0 18px 55px rgba(18, 16, 14, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.vr-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  background: var(--gallery);
}

.vr-stage,
.vr-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.vr-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.06), rgba(23, 20, 18, 0.08) 78%, rgba(23, 20, 18, 0.13) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(23, 20, 18, 0.035));
  mix-blend-mode: multiply;
  opacity: 0.22;
}

.vr-stage canvas {
  display: block;
  cursor: grab;
  filter: contrast(1.015) saturate(0.96);
  outline: none;
}

.vr-stage canvas:active {
  cursor: grabbing;
}

.is-capture-mode.vr-shell {
  min-height: 0;
}

.is-capture-mode .vr-stage {
  inset: 0 !important;
}

.is-capture-mode .topbar,
.is-capture-mode .art-panel,
.is-capture-mode .map-panel,
.is-capture-mode .view-panel,
.is-capture-mode .start-screen,
.is-capture-mode .editor-panel,
.is-capture-mode .focus-overlay,
.is-capture-mode .works-overlay {
  display: none !important;
}

.is-capture-mode .vr-stage canvas {
  cursor: default;
}

.is-capture-mode .vr-stage::after {
  opacity: 0.25;
}

.loading-screen {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: var(--paper);
  transition: opacity 240ms ease, visibility 240ms ease;
}

.is-ready .loading-screen {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.loading-screen span {
  width: 44px;
  height: 44px;
  border: 2px solid rgba(23, 20, 18, 0.14);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 820ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.topbar {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  pointer-events: none;
}

.brand {
  display: block;
  min-width: 0;
  padding: 0;
  color: var(--ink);
  text-decoration: none;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.62)) drop-shadow(0 14px 28px rgba(20, 18, 15, 0.14));
  line-height: 0;
  pointer-events: auto;
}

.brand-logo {
  display: block;
  width: clamp(68px, 7.2vw, 104px);
  height: auto;
  object-fit: contain;
}

.has-entered .brand {
  opacity: 0.88;
}

.top-actions {
  position: fixed;
  left: calc(50% + min(5vw, 64px));
  right: auto;
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  max-width: calc(100vw - 28px);
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: rgba(247, 243, 237, 0.66);
  box-shadow: 0 18px 50px rgba(20, 18, 15, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(26px) saturate(1.25);
  -webkit-backdrop-filter: blur(26px) saturate(1.25);
  pointer-events: auto;
  transform: translateX(-50%);
}

.work-nav-controls,
.tool-controls {
  display: inline-flex;
  align-items: center;
}

.work-nav-controls {
  gap: 15px;
}

.tool-controls {
  gap: 12px;
}

.control-divider {
  display: block;
  width: 1px;
  height: 46px;
  margin: 0 8px 0 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 1px 0 0 rgba(23, 20, 18, 0.14);
  flex: 0 0 auto;
}

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: rgba(23, 20, 18, 0.76);
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
  touch-action: manipulation;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.icon-btn.wide {
  font-size: 16px;
}

.icon-btn svg {
  display: block;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.icon-btn .icon-fill {
  fill: currentColor;
  stroke: none;
}

.top-actions .icon-btn[data-prev],
.top-actions .icon-btn[data-next] {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-color: rgba(255, 255, 255, 0.74);
  background: linear-gradient(180deg, rgba(255, 255, 252, 0.94), rgba(248, 246, 239, 0.82));
  color: var(--green);
  font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 42px;
  font-weight: 800;
  line-height: 0.84;
  box-shadow: 0 12px 30px rgba(20, 18, 15, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.62);
}

.top-actions .icon-btn[data-prev] svg,
.top-actions .icon-btn[data-next] svg {
  width: 34px;
  height: 34px;
  stroke-width: 3.2;
}

.top-actions .tool-controls .icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-color: rgba(255, 255, 255, 0.58);
  background: linear-gradient(180deg, rgba(255, 255, 252, 0.74), rgba(238, 234, 226, 0.56));
  color: rgba(42, 37, 31, 0.86);
  font-size: 20px;
  box-shadow: 0 7px 18px rgba(20, 18, 15, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.top-actions .tool-controls .icon-btn.wide {
  font-size: 18px;
}

.top-actions .tool-controls .icon-btn:hover,
.top-actions .tool-controls .icon-btn:focus-visible,
.top-actions .tool-controls .icon-btn[aria-pressed="true"] {
  border-color: rgba(37, 70, 59, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 252, 0.9), rgba(228, 238, 233, 0.76));
  color: var(--green);
  transform: translateY(-1px);
}

.top-actions .icon-btn[data-prev]:hover,
.top-actions .icon-btn[data-prev]:focus-visible,
.top-actions .icon-btn[data-next]:hover,
.top-actions .icon-btn[data-next]:focus-visible {
  border-color: rgba(37, 70, 59, 0.26);
  background: linear-gradient(180deg, rgba(255, 255, 252, 0.98), rgba(234, 241, 237, 0.88));
  color: #1f3c33;
  transform: translateY(-1px);
}

.icon-btn:hover,
.icon-btn:focus-visible,
.icon-btn[aria-pressed="true"] {
  border-color: rgba(37, 70, 59, 0.25);
  background: rgba(37, 70, 59, 0.1);
  color: var(--green);
  outline: none;
}

.icon-btn:active {
  transform: translateY(1px) scale(0.98);
}

.icon-btn::after {
  content: attr(aria-label);
  position: absolute;
  left: 50%;
  top: auto;
  bottom: calc(100% + 8px);
  z-index: 4;
  max-width: 180px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(23, 20, 18, 0.88);
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(2px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.icon-btn:hover::after,
.icon-btn:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.xr-holder {
  display: inline-flex;
}

.xr-holder[hidden] {
  display: none;
}

.xr-holder #VRButton {
  position: static !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.58) !important;
  border-radius: 50% !important;
  background: linear-gradient(180deg, rgba(255, 255, 252, 0.74), rgba(238, 234, 226, 0.56)) !important;
  color: rgba(37, 70, 59, 0.9) !important;
  box-shadow: 0 7px 18px rgba(20, 18, 15, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
  font: 700 12px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  letter-spacing: 0 !important;
}

.art-panel {
  position: absolute;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(38px, calc(env(safe-area-inset-bottom) + 26px));
  z-index: 22;
  width: min(300px, calc(100vw - 104px));
  padding: 10px 12px 9px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: rgba(247, 243, 237, 0.36);
  box-shadow: 0 8px 22px rgba(20, 18, 15, 0.08);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.art-panel p,
.art-panel h1 {
  margin: 0;
}

.art-panel p {
  color: var(--brass);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.art-panel h1 {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.18;
}

.art-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.map-panel {
  position: absolute;
  top: max(78px, calc(env(safe-area-inset-top) + 70px));
  right: max(14px, env(safe-area-inset-right));
  z-index: 24;
  width: clamp(198px, 18vw, 248px);
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(247, 243, 237, 0.52), rgba(255, 255, 255, 0.3)),
    rgba(37, 70, 59, 0.07);
  box-shadow:
    0 14px 32px rgba(20, 18, 15, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(10px) saturate(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
  opacity: 0;
  pointer-events: none;
  cursor: default;
  transform: translateY(-4px);
  transition: opacity 180ms ease, transform 180ms ease, width 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.map-expanded .map-panel,
.map-panel:hover {
  z-index: 36;
  width: min(430px, calc(100vw - 28px));
  background:
    linear-gradient(135deg, rgba(247, 243, 237, 0.7), rgba(255, 255, 255, 0.42)),
    rgba(37, 70, 59, 0.08);
  box-shadow:
    0 20px 44px rgba(20, 18, 15, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  cursor: default;
}

.map-expanded .map-canvas,
.map-panel:hover .map-canvas {
  height: min(40vh, 318px);
  min-height: 246px;
}

.view-panel {
  position: fixed;
  top: clamp(118px, 17vh, 168px);
  left: max(18px, env(safe-area-inset-left));
  bottom: auto;
  z-index: 27;
  display: none;
  width: 236px;
  max-height: calc(100dvh - 220px);
  overflow: hidden;
  padding: 18px 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(248, 248, 243, 0.7);
  box-shadow: 0 18px 52px rgba(20, 18, 15, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(24px) saturate(1.22);
  -webkit-backdrop-filter: blur(24px) saturate(1.22);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.show-camera-palette .view-panel {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.view-panel p {
  margin: 0 0 16px;
  color: var(--green);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.view-list {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  justify-content: space-between;
  gap: 16px 14px;
  min-width: 0;
  overflow: visible;
  padding: 0;
  scrollbar-width: none;
}

.view-list::-webkit-scrollbar {
  display: none;
}

.view-chip {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  appearance: none;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 9px 22px rgba(20, 18, 15, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  color: rgba(23, 20, 18, 0.82);
  cursor: pointer;
  font-size: 21px;
  font-weight: 720;
  line-height: 1;
  touch-action: manipulation;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.view-chip-number {
  position: relative;
  z-index: 1;
}

.view-chip-label {
  display: none;
}

.view-chip:hover,
.view-chip:focus-visible,
.view-chip[aria-pressed="true"] {
  border-color: rgba(255, 255, 255, 0.88);
  background: var(--green);
  box-shadow: 0 12px 24px rgba(20, 18, 15, 0.16), 0 0 0 3px rgba(37, 70, 59, 0.14);
  color: #fff;
  outline: none;
}

.view-chip:hover,
.view-chip:focus-visible {
  transform: translateY(-1px);
}

.view-chip[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 50%;
  width: 12px;
  height: 16px;
  border-radius: 2px;
  background: var(--green);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: translateY(-50%);
}

.vr-shell:not(.is-editor-shots) .map-camera-shot,
.vr-shell:not(.is-editor-shots) .map-camera-shot-cone,
.vr-shell:not(.is-editor-shots) .map-camera-ray,
.vr-shell:not(.is-editor-shots) .map-camera-leader,
.vr-shell:not(.is-editor-shots) .map-camera-anchor {
  display: none;
}

.editor-panel {
  position: absolute;
  top: max(82px, calc(env(safe-area-inset-top) + 72px));
  right: max(16px, env(safe-area-inset-right));
  z-index: 34;
  width: min(372px, calc(100vw - 32px));
  max-height: calc(100dvh - 112px);
  overflow: auto;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(248, 248, 243, 0.78);
  box-shadow: 0 18px 48px rgba(20, 18, 15, 0.15);
  backdrop-filter: blur(24px) saturate(1.28);
  -webkit-backdrop-filter: blur(24px) saturate(1.28);
}

.editor-panel[hidden] {
  display: none;
}

.editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.editor-head p,
.editor-head h2,
.editor-section h3,
.editor-status {
  margin: 0;
}

.editor-head p {
  color: var(--brass);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editor-head h2 {
  margin-top: 3px;
  font-size: 18px;
  font-weight: 720;
  letter-spacing: 0;
}

.editor-section {
  display: grid;
  gap: 9px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid rgba(23, 20, 18, 0.12);
}

.editor-section[hidden] {
  display: none;
}

.editor-section h3 {
  color: var(--green);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.editor-field,
.editor-field.compact {
  display: grid;
  gap: 5px;
}

.editor-field label,
.editor-inline label,
.editor-three label {
  color: rgba(23, 20, 18, 0.7);
  font-size: 11px;
  font-weight: 700;
}

.editor-field select,
.editor-field input,
.editor-inline input,
.editor-three input,
.editor-output {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(23, 20, 18, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 12px;
  outline: none;
}

.editor-field select,
.editor-field input,
.editor-inline input,
.editor-three input {
  padding: 0 9px;
}

.editor-field select:disabled,
.editor-field input:disabled,
.editor-inline input:disabled,
.editor-three input:disabled,
.editor-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.editor-field input[type="range"] {
  min-height: 26px;
  padding: 0;
  accent-color: var(--green);
}

.editor-inline {
  display: grid;
  grid-template-columns: 1fr 92px;
  align-items: end;
  gap: 8px;
}

.editor-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.editor-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.editor-nudge {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.editor-button {
  min-height: 34px;
  border: 1px solid rgba(37, 70, 59, 0.2);
  border-radius: 6px;
  background: rgba(37, 70, 59, 0.1);
  color: var(--green);
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.editor-button:hover,
.editor-button:focus-visible {
  border-color: rgba(37, 70, 59, 0.38);
  background: rgba(37, 70, 59, 0.16);
  outline: none;
}

.editor-button:active {
  transform: translateY(1px);
}

.editor-button.danger {
  border-color: rgba(157, 63, 47, 0.24);
  background: rgba(157, 63, 47, 0.09);
  color: var(--red);
}

.editor-button.primary {
  border-color: rgba(37, 70, 59, 0.58);
  background: var(--green);
  color: #fffdf8;
}

.editor-button.primary:hover,
.editor-button.primary:focus-visible {
  border-color: rgba(23, 20, 18, 0.18);
  background: #1f3c33;
}

.editor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.editor-history-actions {
  grid-template-columns: minmax(0, 1fr) 44px 44px;
}

.editor-actions.single {
  grid-template-columns: 1fr;
}

.editor-status {
  min-height: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.editor-output {
  min-height: 92px;
  padding: 8px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.35;
}

.is-editing .map-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.is-editing .vr-stage {
  inset: auto max(16px, env(safe-area-inset-right)) max(74px, calc(env(safe-area-inset-bottom) + 64px)) auto;
  z-index: 32;
  width: min(372px, calc(100vw - 32px));
  height: min(220px, 34dvh);
  min-height: 170px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: var(--gallery);
  box-shadow: 0 18px 48px rgba(20, 18, 15, 0.2);
  overflow: hidden;
}

.is-editing .vr-stage::before {
  content: "VR Preview";
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(23, 20, 18, 0.64);
  color: #fff;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.04em;
  pointer-events: none;
  text-transform: uppercase;
}

.is-editor-shots .vr-stage::before {
  content: "Camera Preview";
}

.is-editing .art-panel,
.is-editing .view-panel {
  opacity: 0;
  pointer-events: none;
}

.is-editing .map-canvas {
  height: min(44vh, 420px);
  min-height: 300px;
  background:
    linear-gradient(rgba(37, 70, 59, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 70, 59, 0.045) 1px, transparent 1px),
    rgba(255, 255, 255, 0.66);
  background-size: 22px 22px;
}

.is-editing .map-wall {
  cursor: grab;
}

.is-editor-walls .map-wall[data-wall-id] {
  z-index: 28;
}

.is-editor-walls .map-wall[data-wall-id].is-selected {
  z-index: 38;
}

.is-editor-none .map-wall,
.is-editor-frames .map-wall {
  cursor: default;
}

.is-editing .map-wall:active {
  cursor: grabbing;
}

.map-wall.is-selected {
  z-index: 12;
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92), 0 0 0 5px rgba(157, 63, 47, 0.22);
}

.map-hanging-surface {
  z-index: 24;
  border-radius: 999px;
  background: rgba(37, 70, 59, 0.62);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.82), 0 8px 18px rgba(37, 70, 59, 0.14);
  cursor: pointer;
}

.map-hanging-surface.is-current {
  background: rgba(167, 122, 60, 0.76);
}

.map-hanging-surface.is-selected {
  z-index: 34;
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.94), 0 0 0 6px rgba(37, 70, 59, 0.22);
}

.is-editor-frames .map-hanging-surface {
  background: rgba(37, 70, 59, 0.42);
  cursor: default;
}

.is-editor-frames .map-hanging-surface.is-current {
  background: rgba(167, 122, 60, 0.78);
}

.map-wall-number {
  position: absolute;
  z-index: 50;
  display: none;
  min-width: 30px;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 6px;
  background: rgba(247, 243, 237, 0.96);
  color: var(--ink);
  cursor: pointer;
  font-size: 10px;
  font-weight: 820;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(23, 20, 18, 0.18);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
  transform: translate(-50%, -50%);
}

.is-editing.is-editor-walls .map-wall-number {
  display: block;
}

.map-wall-number.is-selected {
  border-color: rgba(255, 255, 255, 0.96);
  background: var(--red);
  color: #fff;
}

.map-wall-number.is-current {
  border-color: rgba(255, 255, 255, 0.96);
  background: var(--brass);
  color: #fff;
  opacity: 1;
}

.is-editing .map-wall-number {
  z-index: 60;
  min-width: 40px;
  min-height: 26px;
  font-size: 12px;
  box-shadow: 0 8px 18px rgba(23, 20, 18, 0.2);
}

.is-dragging-frame .map-wall-number {
  z-index: 80;
  border-color: rgba(37, 70, 59, 0.34);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 24px rgba(23, 20, 18, 0.26);
}

.is-dragging-frame .map-dot {
  opacity: 0.42;
}

.is-dragging-frame .map-dot.is-current {
  opacity: 0.86;
}

.map-wall-handle {
  position: absolute;
  z-index: 44;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 8px 18px rgba(23, 20, 18, 0.24);
  cursor: grab;
  transform: translate(-50%, -50%);
}

.map-wall-handle.is-move {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--green);
}

.map-surface-handle {
  z-index: 48;
  border-color: #fff;
  background: var(--green);
}

.map-surface-handle.is-move {
  background: var(--brass);
}

.map-wall-handle:focus-visible {
  outline: 2px solid rgba(37, 70, 59, 0.52);
  outline-offset: 3px;
}

.map-wall-handle:active {
  cursor: grabbing;
}

.map-camera-ray {
  position: absolute;
  z-index: 34;
  border-radius: 999px;
  background: rgba(157, 63, 47, 0.28);
  pointer-events: none;
  transform-origin: center;
}

.map-camera-ray.is-selected {
  z-index: 39;
  background: rgba(157, 63, 47, 0.78);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.86);
}

.map-camera-leader {
  position: absolute;
  z-index: 36;
  border-radius: 999px;
  background: rgba(37, 70, 59, 0.3);
  pointer-events: none;
  transform-origin: center;
}

.map-camera-anchor {
  position: absolute;
  z-index: 37;
  width: 6px;
  height: 6px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 1px 4px rgba(23, 20, 18, 0.2);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.map-camera-shot-cone {
  position: absolute;
  z-index: 30;
  width: 46px;
  height: 26px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(157, 63, 47, 0.2), rgba(157, 63, 47, 0.04));
  clip-path: polygon(0 50%, 100% 5%, 100% 95%);
  pointer-events: none;
  transform-origin: left center;
}

.map-camera-shot-cone.is-selected {
  z-index: 38;
  background: linear-gradient(90deg, rgba(157, 63, 47, 0.26), rgba(157, 63, 47, 0.06));
}

.map-expanded .map-camera-ray {
  height: 3px !important;
  background: rgba(157, 63, 47, 0.46);
}

.map-expanded .map-camera-ray.is-selected {
  height: 4px !important;
  background: rgba(157, 63, 47, 0.82);
}

.map-expanded .map-camera-shot-cone {
  width: 72px;
  height: 42px;
  background: linear-gradient(90deg, rgba(157, 63, 47, 0.19), rgba(157, 63, 47, 0.035));
}

.map-expanded .map-camera-shot-cone.is-selected {
  background: linear-gradient(90deg, rgba(157, 63, 47, 0.3), rgba(157, 63, 47, 0.08));
}

.map-live-camera {
  position: absolute;
  z-index: 19;
  width: 44px;
  height: 30px;
  pointer-events: none;
  transform-origin: left center;
  filter: drop-shadow(0 2px 4px rgba(23, 20, 18, 0.16));
}

.map-live-camera::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    rgba(37, 70, 59, 0.88) 0%,
    rgba(37, 70, 59, 0.42) 44%,
    rgba(37, 70, 59, 0) 100%
  );
  clip-path: polygon(0 42%, 100% 0, 100% 100%, 0 58%);
}

.map-live-camera::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  display: block;
  width: 6px;
  height: 6px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 1px 5px rgba(23, 20, 18, 0.24);
  transform: translate(-50%, -50%);
}

.map-expanded .map-live-camera,
.map-panel:hover .map-live-camera {
  width: 66px;
  height: 42px;
}

.map-camera-shot {
  position: absolute;
  z-index: 32;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  min-width: 0;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  appearance: none;
  background: var(--green);
  box-shadow: 0 9px 20px rgba(23, 20, 18, 0.24);
  color: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  touch-action: manipulation;
  transform: translate(-50%, -50%);
}

.map-camera-shot.is-editable {
  cursor: grab;
}

.map-camera-shot.is-selected {
  z-index: 37;
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.94), 0 0 0 7px rgba(157, 63, 47, 0.24), 0 12px 22px rgba(23, 20, 18, 0.2);
}

.map-expanded .map-camera-shot {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.map-expanded .map-camera-anchor {
  width: 7px;
  height: 7px;
}

.map-expanded .map-camera-leader {
  height: 2px !important;
  background: rgba(37, 70, 59, 0.42);
}

.map-panel:hover .map-camera-ray {
  height: 3px !important;
  background: rgba(157, 63, 47, 0.46);
}

.map-panel:hover .map-camera-ray.is-selected {
  height: 4px !important;
  background: rgba(157, 63, 47, 0.82);
}

.map-panel:hover .map-camera-shot-cone {
  width: 72px;
  height: 42px;
  background: linear-gradient(90deg, rgba(157, 63, 47, 0.19), rgba(157, 63, 47, 0.035));
}

.map-panel:hover .map-camera-shot-cone.is-selected {
  background: linear-gradient(90deg, rgba(157, 63, 47, 0.3), rgba(157, 63, 47, 0.08));
}

.map-panel:hover .map-camera-shot {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.map-panel:hover .map-camera-anchor {
  width: 7px;
  height: 7px;
}

.map-panel:hover .map-camera-leader {
  height: 2px !important;
  background: rgba(37, 70, 59, 0.42);
}

.map-camera-target {
  position: absolute;
  z-index: 45;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  min-width: 0;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  appearance: none;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(23, 20, 18, 0.2);
  color: #fff;
  cursor: grab;
  font-size: 12px;
  font-weight: 840;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.map-camera-target.is-selected {
  background: var(--red);
}

.map-camera-shot:active,
.map-camera-target:active,
.is-dragging-camera .map-camera-target,
.is-dragging-camera .map-camera-shot {
  cursor: grabbing;
}

.is-editing .map-dot {
  z-index: 46;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-color: #fff;
  background: var(--green);
  color: #fff;
  cursor: grab;
  font-size: 7.5px;
  font-weight: 840;
  line-height: 1;
  text-align: center;
  text-transform: lowercase;
}

.is-editor-none .map-dot,
.is-editor-walls .map-dot,
.is-editor-shots .map-dot {
  opacity: 0.24;
  pointer-events: none;
}

.is-editor-shots .map-camera-shot {
  z-index: 52;
  width: 38px;
  height: 38px;
  font-size: 13px;
}

.is-editor-shots .map-camera-shot.is-selected {
  z-index: 56;
}

.is-editor-none .map-hanging-surface {
  opacity: 0;
  pointer-events: none;
}

.is-editor-frames .map-wall-number {
  opacity: 0.52;
  pointer-events: none;
}

.is-editing .map-dot:active {
  cursor: grabbing;
}

.is-editing .map-dot.is-current {
  z-index: 58;
  width: 28px;
  height: 28px;
  background: var(--red);
  font-size: 8px;
}

@media (min-width: 981px) {
  .is-editing .editor-panel {
    bottom: max(308px, calc(env(safe-area-inset-bottom) + 298px));
    max-height: none;
  }

  .is-editing .map-panel {
    top: max(82px, calc(env(safe-area-inset-top) + 72px));
    left: max(16px, env(safe-area-inset-left));
    right: 404px;
    bottom: max(16px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    width: auto;
    z-index: 33;
  }

  .is-editing .map-canvas {
    flex: 1;
    height: auto;
    min-height: 0;
  }
}

.has-entered .map-panel,
.show-map .map-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.map-head {
  display: none;
}

.map-canvas {
  position: relative;
  --map-dot-scale: 1;
  height: 142px;
  margin-top: 0;
  border: 1px solid rgba(37, 70, 59, 0.16);
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 50%, rgba(37, 70, 59, 0.065), rgba(37, 70, 59, 0) 62%),
    linear-gradient(rgba(37, 70, 59, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 70, 59, 0.045) 1px, transparent 1px),
    rgba(255, 255, 255, 0.38);
  background-size: 18px 18px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.42),
    inset 0 0 34px rgba(37, 70, 59, 0.06);
  overflow: hidden;
}

.map-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(rgba(37, 70, 59, 0.35), rgba(37, 70, 59, 0.35)) left 12px top 12px / 34px 1px no-repeat,
    linear-gradient(rgba(37, 70, 59, 0.35), rgba(37, 70, 59, 0.35)) left 12px top 12px / 1px 34px no-repeat,
    linear-gradient(rgba(37, 70, 59, 0.35), rgba(37, 70, 59, 0.35)) right 12px top 12px / 34px 1px no-repeat,
    linear-gradient(rgba(37, 70, 59, 0.35), rgba(37, 70, 59, 0.35)) right 12px top 12px / 1px 34px no-repeat,
    linear-gradient(rgba(37, 70, 59, 0.35), rgba(37, 70, 59, 0.35)) left 12px bottom 12px / 34px 1px no-repeat,
    linear-gradient(rgba(37, 70, 59, 0.35), rgba(37, 70, 59, 0.35)) left 12px bottom 12px / 1px 34px no-repeat,
    linear-gradient(rgba(37, 70, 59, 0.35), rgba(37, 70, 59, 0.35)) right 12px bottom 12px / 34px 1px no-repeat,
    linear-gradient(rgba(37, 70, 59, 0.35), rgba(37, 70, 59, 0.35)) right 12px bottom 12px / 1px 34px no-repeat;
  opacity: 0.8;
  pointer-events: none;
}

.map-canvas::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 1;
  border: 1px solid rgba(37, 70, 59, 0.1);
  border-radius: 4px;
  pointer-events: none;
}

.map-expanded .map-canvas {
  border-color: rgba(37, 70, 59, 0.18);
  background:
    radial-gradient(circle at 50% 50%, rgba(37, 70, 59, 0.075), rgba(37, 70, 59, 0) 64%),
    linear-gradient(rgba(37, 70, 59, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 70, 59, 0.055) 1px, transparent 1px),
    rgba(255, 255, 255, 0.5);
  background-size: 22px 22px;
}

.map-panel:hover .map-canvas {
  border-color: rgba(37, 70, 59, 0.18);
  background:
    radial-gradient(circle at 50% 50%, rgba(37, 70, 59, 0.075), rgba(37, 70, 59, 0) 64%),
    linear-gradient(rgba(37, 70, 59, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 70, 59, 0.055) 1px, transparent 1px),
    rgba(255, 255, 255, 0.5);
  background-size: 22px 22px;
}

.map-wall {
  position: absolute;
  z-index: 3;
  background: rgba(23, 20, 18, 0.32);
  transform-origin: center;
}

.map-wall.is-solid {
  background: rgba(23, 20, 18, 0.18);
}

.map-curve {
  background: rgba(37, 70, 59, 0.52);
}

.map-fixture,
.map-entry-fixture,
.map-projection,
.map-stair,
.map-stair-base,
.map-stair-landing,
.map-stair-wall,
.map-banner,
.map-large-print,
.map-glass-door,
.map-glass-door-surround,
.map-detail {
  position: absolute;
  z-index: 4;
  border-radius: 2px;
  transform: translateZ(0);
}

.map-fixture {
  border: 1px solid rgba(23, 20, 18, 0.2);
  background: rgba(23, 20, 18, 0.1);
}

.map-fixture polygon {
  fill: rgba(23, 20, 18, 0.1);
  stroke: rgba(23, 20, 18, 0.2);
  stroke-width: 1.5px;
}

.map-entry-fixture {
  border: 1px solid rgba(167, 122, 60, 0.42);
  background: rgba(167, 122, 60, 0.18);
}

.is-editor-walls .map-entry-fixture.is-draggable {
  z-index: 42;
  cursor: grab;
  border-color: rgba(37, 70, 59, 0.5);
  background: rgba(167, 122, 60, 0.32);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 8px 18px rgba(23, 20, 18, 0.18);
}

.is-editor-walls .map-entry-fixture.is-draggable:active {
  cursor: grabbing;
}

.map-projection {
  border: 1px solid rgba(157, 63, 47, 0.48);
  background: rgba(157, 63, 47, 0.2);
}

.map-stair-base {
  z-index: 3;
  border: 1px solid rgba(37, 70, 59, 0.18);
  background: rgba(37, 70, 59, 0.045);
}

.map-stair {
  z-index: 5;
  border: 1px solid rgba(37, 70, 59, 0.28);
  background: repeating-linear-gradient(
    0deg,
    rgba(37, 70, 59, 0.08),
    rgba(37, 70, 59, 0.08) 5px,
    rgba(37, 70, 59, 0.18) 5px,
    rgba(37, 70, 59, 0.18) 6px
  );
}

.map-stair.is-upper {
  border-color: rgba(157, 63, 47, 0.25);
  background: repeating-linear-gradient(
    0deg,
    rgba(157, 63, 47, 0.07),
    rgba(157, 63, 47, 0.07) 5px,
    rgba(157, 63, 47, 0.16) 5px,
    rgba(157, 63, 47, 0.16) 6px
  );
}

.map-stair-landing {
  z-index: 4;
  border: 1px solid rgba(167, 122, 60, 0.35);
  background: rgba(167, 122, 60, 0.15);
}

.map-stair-wall {
  border: 1px solid rgba(23, 20, 18, 0.2);
  background: rgba(23, 20, 18, 0.24);
}

.map-banner {
  border: 1px solid rgba(157, 63, 47, 0.5);
  background: rgba(157, 63, 47, 0.28);
}

.map-large-print {
  z-index: 6;
  border: 1px solid rgba(37, 70, 59, 0.42);
  background: rgba(37, 70, 59, 0.22);
}

.map-detail {
  border: 1px solid rgba(23, 20, 18, 0.12);
  background: rgba(23, 20, 18, 0.07);
}

.map-glass-door {
  z-index: 8;
  border: 1px solid rgba(37, 70, 59, 0.38);
  background: rgba(115, 174, 180, 0.36);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62);
}

.map-glass-door-surround {
  z-index: 7;
  border: 1px solid rgba(23, 20, 18, 0.16);
  background: rgba(23, 20, 18, 0.16);
}

.map-dot {
  position: absolute;
  z-index: 20;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: calc(8px * var(--map-dot-scale, 1));
  height: calc(8px * var(--map-dot-scale, 1));
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  appearance: none;
  background: rgba(157, 63, 47, 0.94);
  box-shadow: 0 1px 5px rgba(23, 20, 18, 0.2);
  color: transparent;
  cursor: pointer;
  font-size: 0;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  transition: width 160ms ease, height 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.map-dot.is-current {
  z-index: 24;
  width: calc(11px * var(--map-dot-scale, 1));
  height: calc(11px * var(--map-dot-scale, 1));
  background: #6f2c22;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.82),
    0 0 0 4px rgba(157, 63, 47, 0.22),
    0 2px 7px rgba(23, 20, 18, 0.22);
}

.map-panel p {
  display: none;
}

.start-screen {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: max(34px, env(safe-area-inset-top)) max(34px, env(safe-area-inset-right)) max(54px, env(safe-area-inset-bottom)) max(34px, env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(90deg, rgba(8, 7, 6, 0.62), rgba(8, 7, 6, 0.28) 34%, rgba(8, 7, 6, 0.06) 68%, rgba(8, 7, 6, 0.1)),
    linear-gradient(0deg, rgba(8, 7, 6, 0.48), rgba(8, 7, 6, 0.04) 46%, rgba(8, 7, 6, 0.1)),
    url("../images/entrance/gallery-entrance.webp?v=20260611-ek-16") center / cover no-repeat,
    var(--ink);
  transition: opacity 420ms ease, visibility 420ms ease;
}

.has-entered .start-screen {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.start-poster {
  display: none;
  width: min(440px, 36vw);
  aspect-ratio: 1314 / 1746;
  justify-self: end;
  border: 1px solid rgba(23, 20, 18, 0.14);
  background: rgba(255, 255, 255, 0.7) center / cover no-repeat;
  box-shadow: 0 26px 70px rgba(23, 20, 18, 0.22);
}

.start-copy {
  width: min(680px, 88vw);
  color: #f7f3ed;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.42);
}

.start-copy p {
  margin: 0 0 10px;
  color: rgba(247, 243, 237, 0.78);
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.start-copy h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Apple SD Gothic Neo", serif;
  font-size: clamp(58px, 8vw, 124px);
  font-weight: 520;
  letter-spacing: 0;
  line-height: 0.98;
}

.start-copy dl {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 34px;
  margin: 26px 0 28px;
}

.start-copy dt {
  color: rgba(247, 243, 237, 0.64);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.start-copy dd {
  margin: 5px 0 0;
  font-size: 18px;
  font-weight: 650;
}

.enter-button {
  position: relative;
  z-index: 1;
  min-height: 46px;
  padding: 0 24px;
  border: 1px solid rgba(247, 243, 237, 0.74);
  border-radius: 8px;
  background: rgba(247, 243, 237, 0.92);
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  font-weight: 760;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
  touch-action: manipulation;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.enter-button:hover,
.enter-button:focus-visible {
  border-color: rgba(247, 243, 237, 0.95);
  background: #fff;
  outline: none;
}

.enter-button:active {
  transform: translateY(1px);
}

.works-overlay,
.focus-overlay {
  position: absolute;
  inset: 0;
  z-index: 55;
  background: rgba(247, 243, 237, 0.88);
  backdrop-filter: blur(24px) saturate(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
}

.works-overlay[hidden],
.focus-overlay[hidden] {
  display: none;
}

.overlay-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: max(20px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) 12px max(22px, env(safe-area-inset-left));
}

.overlay-head p,
.overlay-head h2 {
  margin: 0;
}

.overlay-head p {
  color: var(--brass);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overlay-head h2 {
  margin-top: 4px;
  font-size: 30px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  max-height: calc(100vh - 112px);
  padding: 0 max(22px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  overflow: auto;
}

.work-card {
  display: grid;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.work-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(23, 20, 18, 0.12);
  object-fit: cover;
  background: #fff;
}

.work-card strong {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
}

.work-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.focus-overlay {
  display: grid;
  place-items: center;
  padding: 72px 76px;
}

.focus-overlay figure {
  display: grid;
  gap: 12px;
  justify-items: center;
  width: min(1120px, calc(100vw - 152px));
  max-width: 100%;
  max-height: calc(100dvh - 144px);
  margin: 0;
}

.focus-overlay img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, calc(100vw - 152px));
  max-height: calc(100dvh - 170px);
  border: 1px solid rgba(23, 20, 18, 0.18);
  object-fit: contain;
  background: #fff;
  box-shadow: 0 24px 80px rgba(20, 18, 15, 0.25);
}

.focus-overlay figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.focus-overlay figcaption strong {
  color: var(--ink);
  font-size: 18px;
}

.focus-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
}

.focus-nav {
  position: absolute;
  top: 50%;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 12px 34px rgba(20, 18, 15, 0.13);
}

.focus-prev {
  left: max(18px, env(safe-area-inset-left));
}

.focus-next {
  right: max(18px, env(safe-area-inset-right));
}

.vr-shell:not(.has-entered) .topbar,
.vr-shell:not(.has-entered) .art-panel,
.vr-shell:not(.has-entered) .map-panel,
.vr-shell:not(.has-entered) .view-panel {
  opacity: 0;
  pointer-events: none;
}

.is-touring .art-panel {
  opacity: 0;
}

@media (max-width: 760px) {
  .vr-shell {
    height: 100dvh;
    min-height: 0;
  }

  .start-screen {
    align-items: flex-end;
    padding: max(22px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(72px, calc(env(safe-area-inset-bottom) + 56px)) max(22px, env(safe-area-inset-left));
    background-position: 58% center;
  }

  .start-copy {
    width: min(100%, 360px);
  }

  .start-copy h2 {
    font-size: clamp(46px, 15vw, 72px);
  }

  .start-copy dl {
    gap: 10px 22px;
    margin: 18px 0 22px;
  }

  .brand-logo {
    width: 72px;
  }

  .top-actions {
    left: 50%;
    right: auto;
    bottom: max(12px, env(safe-area-inset-bottom));
    justify-content: center;
    gap: 7px;
    max-width: calc(100vw - 18px);
    padding: 7px 8px;
    overflow-x: visible;
    overflow-y: visible;
    transform: translateX(-50%);
    scrollbar-width: none;
  }

  .top-actions::-webkit-scrollbar {
    display: none;
  }

  .work-nav-controls {
    gap: 8px;
  }

  .tool-controls {
    gap: 5px;
    min-width: 0;
  }

  .control-divider {
    height: 36px;
    margin: 0 2px 0 0;
  }

  .top-actions .tool-controls .icon-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }

  .top-actions .tool-controls .icon-btn[data-fullscreen] {
    display: none;
  }

  .top-actions .tool-controls .icon-btn svg {
    width: 18px;
    height: 18px;
  }

  .icon-btn::after {
    display: none;
  }

  .top-actions .icon-btn[data-prev],
  .top-actions .icon-btn[data-next] {
    width: 52px;
    height: 52px;
    min-width: 52px;
  }

  .top-actions .icon-btn[data-prev] svg,
  .top-actions .icon-btn[data-next] svg {
    width: 28px;
    height: 28px;
  }

  .xr-holder #VRButton {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    overflow: hidden !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .xr-holder #VRButton::before {
    content: "VR";
    color: var(--green);
    font-size: 10px;
    font-weight: 800;
  }

  .art-panel {
    left: 50%;
    right: auto;
    bottom: max(94px, calc(env(safe-area-inset-bottom) + 86px));
    width: min(340px, calc(100vw - 48px));
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
    text-shadow: 0 1px 10px rgba(247, 243, 237, 0.86), 0 1px 2px rgba(20, 18, 15, 0.16);
    transform: translateX(-50%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .art-panel p {
    display: none;
  }

  .art-panel h1 {
    margin: 0;
    color: rgba(23, 20, 18, 0.88);
    font-size: 17px;
    font-weight: 760;
    line-height: 1.12;
  }

  .art-meta {
    display: block;
    margin-top: 4px;
    color: rgba(23, 20, 18, 0.64);
    font-size: 10px;
    font-weight: 560;
    line-height: 1.25;
  }

  .map-panel {
    top: max(16px, calc(env(safe-area-inset-top) + 12px));
    left: auto;
    right: max(12px, env(safe-area-inset-right));
    bottom: auto;
    width: min(208px, calc(100vw - 28px));
    padding: 5px;
  }

  .map-expanded .map-panel {
    width: min(380px, calc(100vw - 28px));
  }

  .map-expanded .map-canvas {
    height: min(38dvh, 286px);
    min-height: 224px;
  }

  .editor-panel {
    top: auto;
    left: max(14px, env(safe-area-inset-left));
    right: max(14px, env(safe-area-inset-right));
    bottom: max(84px, calc(env(safe-area-inset-bottom) + 74px));
    width: auto;
    max-height: min(58dvh, 520px);
  }

  .is-editing .map-panel {
    top: max(92px, calc(env(safe-area-inset-top) + 82px));
    bottom: auto;
    left: max(14px, env(safe-area-inset-left));
    right: max(14px, env(safe-area-inset-right));
    width: auto;
  }

  .is-editing .map-canvas {
    height: min(34dvh, 280px);
    min-height: 210px;
  }

  .view-panel {
    top: max(94px, calc(env(safe-area-inset-top) + 80px));
    left: max(12px, env(safe-area-inset-left));
    right: auto;
    bottom: auto;
    width: 188px;
    max-height: calc(100dvh - 178px);
    padding: 14px;
  }

  .view-list {
    grid-template-columns: repeat(3, 46px);
    gap: 12px 10px;
    overflow: visible;
  }

  .view-chip {
    width: 46px;
    height: 46px;
    font-size: 17px;
  }

  .view-panel p {
    display: block;
    margin-bottom: 12px;
    font-size: 9px;
  }
}

@media (max-width: 480px) {
  .view-panel {
    top: max(82px, calc(env(safe-area-inset-top) + 72px));
    width: 160px;
    padding: 12px;
  }

  .view-list {
    grid-template-columns: repeat(3, 38px);
    gap: 9px 8px;
  }

  .view-chip {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .map-canvas {
    height: 136px;
  }

  .editor-inline,
  .editor-two,
  .editor-three {
    grid-template-columns: 1fr;
  }

  .focus-overlay {
    padding: max(58px, env(safe-area-inset-top)) 14px max(76px, calc(env(safe-area-inset-bottom) + 64px));
  }

  .focus-overlay figure {
    width: min(100%, calc(100vw - 28px));
    max-height: calc(100dvh - 134px);
  }

  .focus-overlay img {
    max-width: calc(100vw - 28px);
    max-height: calc(100dvh - 178px);
  }

  .focus-overlay figcaption {
    flex-wrap: wrap;
    width: min(100%, calc(100vw - 28px));
    gap: 4px 12px;
  }

  .focus-nav {
    top: auto;
    bottom: max(18px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  .top-actions {
    gap: 8px;
    padding: 6px 8px;
  }

  .work-nav-controls {
    gap: 9px;
  }

  .tool-controls {
    gap: 6px;
  }

  .control-divider {
    height: 34px;
    margin: 0 2px 0 0;
  }

  .top-actions .tool-controls .icon-btn {
    width: 33px;
    height: 33px;
    min-width: 33px;
    font-size: 16px;
  }

  .top-actions .tool-controls .icon-btn svg {
    width: 18px;
    height: 18px;
  }

  .top-actions .icon-btn[data-prev],
  .top-actions .icon-btn[data-next] {
    width: 50px;
    height: 50px;
    min-width: 50px;
  }

  .top-actions .icon-btn[data-prev] svg,
  .top-actions .icon-btn[data-next] svg {
    width: 27px;
    height: 27px;
  }

  .xr-holder #VRButton {
    width: 33px !important;
    min-width: 33px !important;
    height: 33px !important;
  }
}

@media (max-height: 560px) {
  .vr-shell {
    height: 100dvh;
    min-height: 0;
  }

  .start-screen {
    align-items: flex-end;
    padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(58px, calc(env(safe-area-inset-bottom) + 46px)) max(18px, env(safe-area-inset-left));
    background-position: center;
  }

  .start-copy {
    width: min(470px, calc(100vw - 36px));
  }

  .start-copy p {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .start-copy h2 {
    font-size: 42px;
    line-height: 0.95;
  }

  .start-copy dl {
    gap: 8px 20px;
    margin: 12px 0 14px;
  }

  .start-copy dt {
    font-size: 10px;
  }

  .start-copy dd {
    margin-top: 3px;
    font-size: 15px;
  }

  .enter-button {
    min-height: 42px;
    padding: 0 20px;
    font-size: 14px;
  }

  .editor-panel {
    top: auto;
    bottom: max(70px, env(safe-area-inset-bottom));
    max-height: calc(100dvh - 84px);
  }
}

@media (hover: none) {
  .icon-btn::after {
    display: none;
  }
}
