.studio-document {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #edf1ef;
}

.studio-page {
  --studio-paper: #f7f8f6;
  --studio-surface: rgba(250, 251, 249, 0.94);
  --studio-ink: #17191f;
  --studio-muted: #5f686b;
  --studio-line: rgba(23, 25, 31, 0.2);
  --studio-teal: #246467;
  --studio-teal-dark: #183f41;
  --studio-plum: #786079;
  --studio-coral: #b56f66;
  --studio-blue: #587080;
  --studio-focus: #0b7175;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #edf1ef;
  color: var(--studio-ink);
  font-family: "Manrope", "Helvetica Neue", Arial, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.45;
  overscroll-behavior: none;
}

.studio-page *,
.studio-page *::before,
.studio-page *::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

.studio-page [hidden] {
  display: none !important;
}

.studio-page button,
.studio-page a {
  -webkit-tap-highlight-color: transparent;
}

.studio-canvas, .touch-controls, .arcade-touch {
  user-select: none;
  -webkit-user-select: none;
}

.studio-page button {
  font: inherit;
}

.studio-page button:focus-visible,
.studio-page a:focus-visible {
  outline: 3px solid var(--studio-focus);
  outline-offset: 3px;
}

.studio-shell,
.studio-canvas {
  position: fixed;
  inset: 0;
}

.studio-shell {
  overflow: hidden;
  isolation: isolate;
  background: #edf1ef;
}

.studio-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.studio-page.is-looking .studio-canvas canvas {
  cursor: grabbing;
}

.studio-skip,
.studio-visually-hidden {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.studio-skip:focus {
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  width: auto;
  height: auto;
  clip: auto;
  clip-path: none;
  border-radius: 4px;
  background: var(--studio-ink);
  color: #fff;
  padding: 0.7rem 0.9rem;
}

.studio-bar {
  position: fixed;
  z-index: 20;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  left: max(0.75rem, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: none;
}

.studio-brand,
.studio-actions {
  pointer-events: auto;
}

.studio-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid rgba(23, 25, 31, 0.12);
  border-radius: 6px;
  background: var(--studio-surface);
  color: var(--studio-ink);
  padding: 0.5rem 0.7rem;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(23, 25, 31, 0.08);
  backdrop-filter: blur(14px);
}

.studio-brand img {
  display: block;
  width: 2rem;
  height: 2rem;
}

.studio-brand strong,
.studio-brand small {
  display: block;
}

.studio-brand strong {
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.2;
}

.studio-brand small {
  color: var(--studio-muted);
  font-size: 0.67rem;
  line-height: 1.25;
  text-transform: uppercase;
}

.studio-actions {
  display: flex;
  gap: 0.4rem;
}

.studio-control,
.icon-button {
  display: inline-flex;
  min-height: 2.7rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(23, 25, 31, 0.16);
  border-radius: 5px;
  background: var(--studio-surface);
  color: var(--studio-ink);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(23, 25, 31, 0.07);
  backdrop-filter: blur(14px);
}

.studio-control {
  gap: 0.42rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 680;
}

.studio-control:hover,
.icon-button:hover,
.studio-secondary:hover {
  border-color: rgba(23, 25, 31, 0.42);
  background: #fff;
}

.studio-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.studio-icon {
  display: block;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.studio-status {
  position: fixed;
  z-index: 30;
  inset: 50% auto auto 50%;
  display: flex;
  min-width: 15rem;
  align-items: center;
  gap: 0.85rem;
  transform: translate(-50%, -50%);
  border: 1px solid var(--studio-line);
  border-radius: 6px;
  background: var(--studio-paper);
  padding: 0.9rem 1rem;
  box-shadow: 0 18px 48px rgba(23, 25, 31, 0.12);
}

.studio-status strong,
.studio-status span {
  display: block;
}

.studio-status strong {
  font-size: 0.9rem;
}

.studio-status span:not(.loading-mark) {
  margin-top: 0.1rem;
  color: var(--studio-muted);
  font-size: 0.74rem;
}

.loading-mark {
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 auto;
  border: 2px solid rgba(36, 100, 103, 0.2);
  border-top-color: var(--studio-teal);
  border-radius: 50%;
  animation: studio-spin 800ms linear infinite;
}

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

.studio-welcome,
.studio-fallback {
  position: fixed;
  z-index: 16;
  top: 50%;
  left: clamp(1rem, 6%, 5rem);
  width: min(27rem, calc(100% - 2rem));
  transform: translateY(-48%);
  border-left: 3px solid var(--studio-teal);
  background: rgba(250, 251, 249, 0.95);
  padding: 1.4rem 1.5rem 1.25rem;
  box-shadow: 0 20px 60px rgba(23, 25, 31, 0.15);
  backdrop-filter: blur(16px);
}

.studio-welcome h1,
.studio-fallback h1 {
  margin: 0.2rem 0 0.65rem;
  color: var(--studio-ink);
  font-size: 2.65rem;
  font-weight: 520;
  line-height: 1;
}

.studio-welcome > p:not(.studio-eyebrow),
.studio-fallback > p:not(.studio-eyebrow) {
  margin: 0;
  color: var(--studio-muted);
  font-size: 0.95rem;
}

.studio-eyebrow {
  margin: 0;
  color: var(--studio-teal);
  font-size: 0.68rem;
  font-weight: 740;
  text-transform: uppercase;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.studio-primary,
.studio-secondary {
  display: inline-flex;
  min-height: 2.7rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.62rem 0.9rem;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.studio-primary {
  background: var(--studio-ink);
  color: #fff;
}

.studio-primary:hover {
  background: var(--studio-teal-dark);
}

.studio-secondary {
  border-color: var(--studio-line);
  background: transparent;
  color: var(--studio-ink);
}

.arcade-actions .studio-secondary {
  gap: 0.42rem;
}

.welcome-hint {
  margin-top: 0.85rem !important;
  font-size: 0.72rem !important;
}

.touch-hint {
  display: none;
}

.help-panel {
  position: fixed;
  z-index: 19;
  top: calc(max(0.75rem, env(safe-area-inset-top)) + 3.2rem);
  right: max(0.75rem, env(safe-area-inset-right));
  width: 18rem;
  border: 1px solid var(--studio-line);
  border-radius: 5px;
  background: var(--studio-surface);
  padding: 0.8rem 0.9rem;
  box-shadow: 0 14px 40px rgba(23, 25, 31, 0.12);
  backdrop-filter: blur(14px);
}

.help-panel strong {
  font-size: 0.78rem;
}

.help-panel p {
  margin: 0.35rem 0 0;
  color: var(--studio-muted);
  font-size: 0.73rem;
}

.help-action {
  min-height: 2.3rem;
  margin-top: 0.65rem;
  border: 1px solid var(--studio-line);
  border-radius: 4px;
  background: transparent;
  color: var(--studio-ink);
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 720;
}

.help-action:hover {
  border-color: var(--studio-teal);
  color: var(--studio-teal-dark);
}

.studio-reticle {
  position: fixed;
  z-index: 10;
  top: 50%;
  left: 50%;
  width: 0.7rem;
  height: 0.7rem;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
}

.studio-reticle::before,
.studio-reticle::after {
  position: absolute;
  background: rgba(23, 25, 31, 0.72);
  content: "";
}

.studio-reticle::before {
  top: 0;
  bottom: 0;
  left: calc(50% - 1px);
  width: 2px;
}

.studio-reticle::after {
  top: calc(50% - 1px);
  right: 0;
  left: 0;
  height: 2px;
}

.studio-page.is-exploring .studio-reticle {
  opacity: 1;
}

.interaction-prompt {
  position: fixed;
  z-index: 14;
  bottom: max(1.1rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(23, 25, 31, 0.2);
  border-radius: 4px;
  background: rgba(250, 251, 249, 0.92);
  color: var(--studio-ink);
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 8px 30px rgba(23, 25, 31, 0.1);
  backdrop-filter: blur(12px);
}

.orbit-message {
  position: fixed;
  z-index: 13;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: min(20rem, calc(100% - 2rem));
  border-left: 3px solid #2ec6c7;
  background: rgba(9, 26, 38, 0.92);
  color: #f6fbfb;
  padding: 0.7rem 0.8rem;
  font-size: 0.76rem;
  box-shadow: 0 10px 34px rgba(9, 26, 38, 0.22);
}

.touch-controls {
  position: fixed;
  z-index: 11;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: max(1rem, env(safe-area-inset-left));
  justify-content: space-between;
  pointer-events: none;
}

.touch-pad {
  position: relative;
  width: 7rem;
  height: 7rem;
  border: 1px solid rgba(23, 25, 31, 0.25);
  border-radius: 50%;
  background: rgba(250, 251, 249, 0.42);
  color: rgba(23, 25, 31, 0.72);
  pointer-events: auto;
  touch-action: none;
  backdrop-filter: blur(8px);
}

.touch-pad-label {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  font-size: 0.67rem;
  font-weight: 750;
  text-transform: uppercase;
}

.move-stick {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.6rem;
  height: 2.6rem;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(23, 25, 31, 0.18);
  border-radius: 50%;
  background: rgba(250, 251, 249, 0.86);
  box-shadow: 0 5px 18px rgba(23, 25, 31, 0.12);
}

.studio-fallback {
  border-left-color: var(--studio-coral);
}

.studio-fallback > a:last-child {
  display: inline-block;
  margin-left: 0.75rem;
  color: var(--studio-teal);
  font-size: 0.84rem;
  font-weight: 700;
}

.studio-dialog {
  width: min(34rem, calc(100% - 2rem));
  max-height: min(44rem, calc(100dvh - 2rem));
  overflow: auto;
  border: 1px solid rgba(23, 25, 31, 0.22);
  border-radius: 6px;
  background: #f9faf8;
  color: var(--studio-ink);
  padding: 1.2rem;
  box-shadow: 0 28px 90px rgba(23, 25, 31, 0.25);
}

.studio-dialog:not([open]) {
  display: none;
}

.studio-dialog::backdrop {
  background: rgba(15, 20, 22, 0.58);
  backdrop-filter: blur(5px);
}

.dialog-topline,
.arcade-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
}

.dialog-topline > span {
  color: var(--studio-muted);
  font-size: 0.68rem;
  font-weight: 720;
  text-transform: uppercase;
}

.studio-dialog .dialog-topline {
  position: sticky;
  top: -1.2rem;
  z-index: 2;
  padding: .5rem 0;
  background: #f9faf8;
}
.projects-dialog [hidden] { display: none; }

.icon-button {
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  padding: 0;
  font-size: 1.45rem;
  line-height: 1;
  box-shadow: none;
}

.exhibit-dialog {
  border-top: 4px solid var(--exhibit-accent, var(--studio-teal));
}

.exhibit-dialog .studio-eyebrow {
  margin-top: 1rem;
  color: var(--exhibit-accent, var(--studio-teal));
}

.exhibit-dialog h2,
.projects-dialog h2,
.arcade-dialog h2 {
  margin: 0.28rem 0 0.8rem;
  color: var(--studio-ink);
  font-size: 2rem;
  font-weight: 560;
  line-height: 1.08;
}

.exhibit-dialog > p:not(.studio-eyebrow) {
  margin: 0 0 1.25rem;
  color: var(--studio-muted);
}

.projects-dialog {
  width: min(45rem, calc(100% - 2rem));
  padding: 1rem;
}

.projects-heading {
  margin: 0.7rem 0 1.1rem;
}

.projects-dialog nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--studio-line);
}

.projects-dialog nav a,
.projects-dialog nav button {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.1rem 0.7rem;
  min-width: 0;
  padding: 0.9rem 0.65rem;
  border-bottom: 1px solid var(--studio-line);
  border-top: 0;
  border-left: 0;
  color: var(--studio-ink);
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.projects-dialog nav > :nth-child(odd) {
  border-right: 1px solid var(--studio-line);
}

.projects-dialog nav a:hover,
.projects-dialog nav button:hover {
  background: #edf3f2;
}

.projects-dialog nav span {
  grid-row: 1 / span 2;
  color: var(--studio-teal);
  font-size: 0.78rem;
  font-weight: 760;
}

.projects-dialog nav strong {
  min-width: 0;
  font-size: 0.9rem;
}

.projects-dialog nav small {
  color: var(--studio-muted);
  font-size: 0.7rem;
}

.projects-dialog nav button:last-child {
  border-right: 1px solid var(--studio-line);
}

.arcade-dialog {
  width: min(54rem, calc(100% - 1rem));
  background: #10181d;
  color: #f1f8f7;
  padding: 0.85rem;
}

.arcade-dialog .studio-eyebrow {
  color: #63d5d0;
}

.arcade-dialog h2 {
  margin-bottom: 0;
  color: #f1f8f7;
}

.arcade-dialog .icon-button,
.arcade-dialog .studio-secondary {
  border-color: rgba(255, 255, 255, 0.24);
  background: #18252b;
  color: #f1f8f7;
}

.arcade-dialog .icon-button:hover,
.arcade-dialog .studio-secondary:hover {
  border-color: #63d5d0;
  background: #20343a;
}

.arcade-hud {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 2.25rem;
  margin-top: 0.8rem;
  border-block: 1px solid rgba(255, 255, 255, 0.16);
  color: #adbec1;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.arcade-hud strong {
  color: #fff;
}

.arcade-hud #arcade-state {
  margin-left: auto;
  color: #63d5d0;
}

.arcade-host {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #071117;
}

.arcade-host canvas {
  display: block;
  max-width: 100%;
  margin: auto;
}

.arcade-actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.arcade-touch {
  display: none;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.arcade-touch button {
  min-height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  background: #18252b;
  color: #f1f8f7;
  font-weight: 760;
  touch-action: manipulation;
}

.arcade-touch #arcade-fire {
  border-color: rgba(99, 213, 208, 0.55);
  background: #21494b;
}

.arcade-hint {
  margin: 0.65rem 0 0;
  color: #91a4a7;
  font-size: 0.68rem;
  text-align: right;
}

.no-script-panel {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  align-content: center;
  gap: 0.7rem;
  overflow: auto;
  background: var(--studio-paper);
  padding: 2rem max(1.25rem, calc((100% - 42rem) / 2));
}

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

.no-script-panel a {
  border-top: 1px solid var(--studio-line);
  color: var(--studio-teal);
  padding-top: 0.7rem;
  font-weight: 700;
}

@media (hover: none), (pointer: coarse) {
  .touch-hint {
    display: inline;
  }

  .desktop-hint {
    display: none !important;
  }

  .studio-page.is-exploring .touch-controls {
    display: flex;
  }

  .studio-page.is-exploring .studio-reticle {
    opacity: 0.65;
  }

  .arcade-touch {
    display: grid;
  }

  .arcade-hint {
    display: none;
  }
}

@media (max-width: 900px) {
  .touch-hint {
    display: inline;
  }

  .desktop-hint {
    display: none !important;
  }

  .studio-page.is-exploring .touch-controls {
    display: flex;
  }

  .arcade-touch {
    display: grid;
  }

  .arcade-hint {
    display: none;
  }
}

@media (max-width: 720px) {
  .studio-bar {
    align-items: flex-start;
  }

  .studio-brand small,
  .studio-control > span:last-child {
    display: none;
  }

  .studio-brand {
    padding: 0.42rem;
  }

  .studio-brand img {
    width: 1.85rem;
    height: 1.85rem;
  }

  .studio-control {
    width: 2.7rem;
    padding: 0;
  }

  .studio-welcome,
  .studio-fallback {
    top: auto;
    bottom: max(1rem, env(safe-area-inset-bottom));
    left: 1rem;
    transform: none;
    padding: 1.15rem;
  }

  .studio-welcome h1,
  .studio-fallback h1 {
    font-size: 2.1rem;
  }

  .interaction-prompt {
    bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 7.7rem);
    max-width: calc(100% - 10rem);
    white-space: normal;
  }

  .orbit-message {
    right: 50%;
    bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 7.7rem);
    width: min(22rem, calc(100% - 2rem));
    transform: translateX(50%);
  }

  .projects-dialog nav {
    grid-template-columns: 1fr;
  }

  .projects-dialog nav > :nth-child(odd),
  .projects-dialog nav button:last-child {
    border-right: 0;
  }

  .arcade-dialog h2,
  .exhibit-dialog h2,
  .projects-dialog h2 {
    font-size: 1.55rem;
  }

  .arcade-hud {
    gap: 0.7rem;
  }

  .arcade-host {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 420px) {
  .studio-actions {
    gap: 0.25rem;
  }

  .studio-control {
    width: 2.45rem;
    min-height: 2.45rem;
  }

  .studio-brand strong {
    display: none;
  }

  .touch-pad {
    width: 6.3rem;
    height: 6.3rem;
  }

  .interaction-prompt,
  .orbit-message {
    bottom: calc(max(0.75rem, env(safe-area-inset-bottom)) + 7rem);
  }
}

.scene-curtain { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: #080e18; color: #dceae8; font-size: .9rem; }
.scene-curtain[hidden], .studio-control[hidden], .arcade-reward[hidden] { display: none; }
.arcade-reward { margin: 0 0 .75rem; color: #ead390; font-size: .85rem; }
.collectible-dialog { width: min(41rem, calc(100% - 2rem)); }
.collectible-dialog h2 { margin: .25rem 0 .75rem; font-size: 1.8rem; line-height: 1.2; }
.collectible-viewer { width: 100%; height: min(48svh, 24rem); min-height: 10rem; border-radius: 4px; background: #263235; touch-action: none; cursor: grab; }
.collectible-viewer:active { cursor: grabbing; }
.collectible-viewer canvas { display: block; width: 100%; height: 100%; }
.collectible-viewer:focus-visible { outline: 2px solid #246467; outline-offset: 3px; }
.collectible-dialog > p { margin: 1rem 0 0; font-size: .9rem; line-height: 1.6; }
.exhibit-details { margin: 1.5rem 0; border-top: 1px solid #d3dbd7; }
.exhibit-details section { padding: 1rem 0 0; }
.exhibit-details h3, .collection-heading { margin: 0 0 .35rem; font-size: .9rem; font-weight: 700; }
.exhibit-details p { margin: 0; font-size: .9rem; line-height: 1.65; }
.exhibit-visit { margin: .65rem 0 0 .5rem; }
.exhibit-visit[hidden] { display: none; }
.projects-dialog button[hidden] { display: none; }
.team-exhibit-dialog .exhibit-details section { padding: 1rem 0; border-bottom: 1px solid var(--studio-line); }
.team-exhibit-dialog .exhibit-details h3 { color: #246467; }
.team-exhibit-dialog .exhibit-details section:nth-child(2) h3 { color: #943e71; }
.article-preview-dialog .exhibit-details { border-top: 0; margin-top: 1rem; }
.article-preview-dialog .exhibit-details > p { margin: 0 0 1rem; }
.article-preview-dialog .article-byline { color: #63726e; font-size: .8rem; }
.article-preview-dialog blockquote { margin: 1.25rem 0; padding: .25rem 0 .25rem 1rem; border-left: 3px solid var(--exhibit-accent); font-size: 1.2rem; line-height: 1.55; color: #293b3a; }
.collection-heading { margin-top: 1.5rem; }
.collection-index { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.collection-index button { padding: .5rem 0; border: 0; background: transparent; color: #246467; font: inherit; font-size: .85rem; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.is-observatory .studio-reticle { color: #e9f8f7; }
@media (max-width: 600px) {
  .collectible-dialog h2 { font-size: 1.4rem; }
  .is-observatory .studio-brand strong { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .studio-page *,
  .studio-page *::before,
  .studio-page *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
