:root {
  color-scheme: dark;
  --bg: #10111a;
  --text: #f1f0f6;
  --muted: #b5b5c6;
  --line: #dddcef29;
  --gold: #afa3ff;
  --panel: #181925;
  --purple: #6850cb;
  --control-radius: 10px;
  --font:
    "Avenir Next", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 var(--font);
  overflow-x: clip;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
}
button:disabled {
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}
button,
a {
  touch-action: manipulation;
}
button:active,
.button:active {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  z-index: 30;
  top: 8px;
  left: 10px;
  background: #f3ede0;
  color: #151c25;
  padding: 10px 20px;
  transform: translateY(-150%);
}
.skip:focus {
  transform: none;
}
.header {
  position: fixed;
  z-index: 20;
  left: 32px;
  right: 32px;
  top: 16px;
  height: 62px;
  display: flex;
  align-items: center;
  padding: 0 30px;
  gap: 45px;
  border: 1px solid #dfcead23;
  border-radius: 20px;
  background: #0a111bd9;
  backdrop-filter: blur(12px);
}
.wordmark {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.13em;
  white-space: nowrap;
}
.header nav {
  display: flex;
  gap: 31px;
  font-size: 13px;
}
.header nav a {
  color: #d3d4d5;
  transition: color 0.2s;
}
.header nav a:hover {
  color: var(--gold);
}
.header-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}
.header-tools button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 13px;
}
.header-tools button:hover {
  background: #ffffff0d;
}
#menu {
  display: none;
}
.scene-surface {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #111526;
  container-type: size;
}
#canvas-host,
.world-canvas,
.poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.world-canvas {
  display: block;
  touch-action: none;
  cursor: grab;
}
.poster {
  background: #070b17 url("./assets/observatory-opening.webp") center / auto 100% no-repeat;
}
.scene-surface:not([data-state="ready"]) #canvas-host {
  visibility: hidden;
}
.scene-surface[data-state="ready"] .poster {
  visibility: hidden;
}
@media (max-width: 759px), (max-height: 500px) and (pointer: coarse) {
  .poster {
    background-image: url("./assets/observatory-opening-mobile.webp");
    /* Match the sky camera's vertical tangent: clamp(.43, .58 / aspect, .89). */
    background-size: auto clamp(100%, 153.4483cqw, 206.9767%);
  }
}
#experience {
  position: relative;
  z-index: 1;
}
.scene-status {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  padding: 9px 16px;
  border-radius: 30px;
  background: #0b1220cc;
  color: #d6d6d2;
  white-space: nowrap;
  pointer-events: none;
}
#scene-retry {
  pointer-events: auto;
  margin-inline-start: .55em;
  padding: .3em .6em;
  border: 1px solid #c7bbef88;
  border-radius: 6px;
  color: var(--text);
  background: #3a2d6e;
  font: inherit;
  cursor: pointer;
}
.scene-surface[data-state="ready"] .scene-status {
  display: none;
  top: auto;
  bottom: 26px;
  transform: translateX(-50%);
  background: none;
  color: #c5c8cb9c;
  font-size: 11px;
}
.scene-tools {
  position: absolute;
  right: 46px;
  bottom: 26px;
  display: flex;
  gap: 4px;
  z-index: 6;
  pointer-events: auto;
}
.scene-tools button {
  font-size: 11px;
  color: #d0d3d7;
  padding: 8px 13px;
  min-height: 36px;
  border: 1px solid #d6c19c2b;
  border-radius: 24px;
  background: #0c1421a3;
}
.scene-tools button:hover {
  border-color: #c9a46b88;
}
.chapters {
  position: relative;
  z-index: 2;
  pointer-events: none;
}
.chapter {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px max(7vw, 32px) 100px;
  scroll-margin-top: 0;
}
.chapter::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #060c15e8 0%,
    #060c15b5 26%,
    #060c1529 49%,
    transparent 66%
  );
  z-index: -1;
  pointer-events: none;
}
.copy {
  max-width: 370px;
  pointer-events: auto;
}
.intro-line {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #c3bcad;
  margin: 0 0 22px;
}
.copy h1 {
  font-size: clamp(52px, 6.2vw, 96px);
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 1.1;
  margin: 0 0 24px;
}
.copy h2 {
  font-size: clamp(36px, 4vw, 60px);
  font-weight: 400;
  line-height: 1.38;
  letter-spacing: 0.02em;
  margin: 0 0 20px;
}
.tagline {
  font-size: 20px;
  font-weight: 400;
  margin: 0 0 23px;
  letter-spacing: 0.05em;
}
.description {
  font-size: 14px;
  color: #bec2c7;
  line-height: 2.1;
  margin: 0 0 31px;
}
.actions {
  display: flex;
  gap: 25px;
  align-items: center;
  flex-wrap: wrap;
  pointer-events: auto;
}
.button {
  min-height: 46px;
  border-radius: 28px;
  padding: 12px 25px;
  display: inline-flex;
  gap: 13px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  transition:
    background 0.2s,
    transform 0.2s;
}
.primary {
  color: #171b22;
  background: #eee9df;
  box-shadow: 0 4px 28px #0002;
}
.primary:hover {
  background: #fff5e0;
}
.play-symbol {
  font-size: 19px;
  line-height: 1;
}
.text-link {
  padding: 10px 0;
  min-height: 44px;
  font-size: 12px;
  color: #d3d1cc;
}
.text-link:hover {
  color: #e0bc82;
}
.scroll-hint {
  position: absolute;
  left: max(7vw, 32px);
  bottom: 42px;
  display: flex;
  align-items: center;
  gap: 13px;
  color: #b4b7bb;
  font-size: 12px;
}
.mouse-symbol {
  display: inline-block;
  border: 1px solid #a4aaa9;
  width: 16px;
  height: 27px;
  border-radius: 10px;
  position: relative;
}
.mouse-symbol::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 5px;
  height: 6px;
  border-left: 1px solid #ccc;
}
.chapter-nav {
  position: fixed;
  z-index: 7;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-end;
  transition: opacity 0.2s;
  background: #07111dbf;
  padding: 12px 14px;
  border: 1px solid #c4b59d24;
  border-radius: 14px;
  right: 24px;
}
.chapter-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 3px 0;
  pointer-events: auto;
  color: #c1c8d4;
  font-size: 12px;
}
.chapter-nav a::after {
  content: "";
  width: 5px;
  height: 5px;
  border: 1px solid #b5bbc5;
  border-radius: 50%;
}
.chapter-nav a[aria-current] {
  color: #f0d3a1;
}
.chapter-nav a[aria-current]::after {
  background: #d6b984;
  border-color: #d6b984;
  box-shadow: 0 0 0 4px #d6b98413;
}
.hover-hint {
  position: absolute;
  bottom: 100px;
  left: 60%;
  pointer-events: none;
  font-size: 12px;
  color: #e6d6bd;
  background: #101923c9;
  padding: 7px 16px;
  border-radius: 20px;
}
.mobile-dock {
  display: none;
}
.collection {
  position: relative;
  z-index: 8;
  max-width: 1240px;
  margin: 0 auto;
  padding: 100px 40px 80px;
  background: #0b1220f0;
  border-top: 1px solid var(--line);
  border-radius: 30px 30px 0 0;
}
.collection-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 32px;
}
.collection h2 {
  font-size: 30px;
  font-weight: 400;
  margin: 0 0 5px;
}
.collection p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.search-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.search-label input {
  width: 230px;
  max-width: 100%;
  min-height: 44px;
  background: #ffffff05;
  color: var(--text);
  border: 1px solid #65708066;
  border-radius: 8px;
  padding: 10px 14px;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.game-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  min-width: 0;
  border: 1px solid #8090a529;
  border-radius: 12px;
  background: #17213188;
  transition:
    transform 0.2s,
    background 0.2s,
    border-color 0.2s;
}
.game-card:hover {
  transform: translateY(-3px);
  background: #1d2a3e;
  border-color: #c9a46b66;
}
.game-card img {
  flex: none;
  width: 54px;
  height: 54px;
}
.game-card strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
}
.game-card small {
  color: var(--muted);
  font-size: 12px;
}
.card-arrow {
  color: #aeb9c8;
  margin-left: auto;
  font-size: 20px;
}
.game-card > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
#empty {
  padding: 35px 0;
}
footer {
  position: relative;
  z-index: 8;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 40px 45px;
  border-top: 1px solid var(--line);
  background: #0b1220f5;
  font-size: 11px;
  color: var(--muted);
}
footer p {
  margin: 0;
}
footer .wordmark {
  font-size: 17px;
  color: var(--text);
}
.no-js {
  position: fixed;
  bottom: 0;
  padding: 15px;
  background: #141b25;
  z-index: 30;
}
.scene-off .scene-status {
  color: #ddd;
}
.reduced .chapter {
  scroll-behavior: auto;
}
@media (min-width: 1800px) {
  .copy {
    max-width: 460px;
  }
  .description {
    font-size: 16px;
  }
}
@media (max-width: 1000px) {
  .header {
    gap: 30px;
    padding: 0 20px;
  }
  .header nav {
    gap: 22px;
  }
  .chapter {
    padding-left: 5vw;
  }
  .copy {
    max-width: 300px;
  }
  .chapter-nav {
    right: 24px;
  }
  .scene-tools {
    right: 24px;
  }
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 759px), (max-height: 500px) and (pointer: coarse) {
  html {
    scroll-padding-top: 72px;
  }
  .header {
    left: 0;
    right: 0;
    top: 0;
    padding: 0 20px;
    height: 64px;
    background: #0b121ced;
    border: 0;
    border-radius: 0;
    backdrop-filter: blur(10px);
  }
  .wordmark {
    font-size: 19px;
  }
  .header-tools {
    gap: 0;
  }
  .header-tools button {
    width: 40px;
    height: 42px;
  }
  #menu {
    display: block;
    font-size: 19px;
  }
  .header nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 12px;
    right: 12px;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
  }
  .header nav.is-open {
    display: flex;
  }
  .header nav a {
    padding: 12px;
  }
  .scene-surface {
    position: absolute;
    top: 143px;
    left: 0;
    right: 0;
    height: clamp(220px, 44svh, 450px);
    border-radius: 0;
    background: #0a1421;
  }
  .scene-surface::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 65px;
    background: linear-gradient(transparent, var(--bg));
    pointer-events: none;
  }
  .chapters {
    padding-top: 75px;
  }
  .chapter {
    display: none;
    min-height: 0;
    padding: 16px 23px 0;
    text-align: center;
    scroll-margin: 0;
  }
  .chapter.is-mobile-active {
    display: block;
  }
  .chapter::before {
    display: none;
  }
  .copy {
    max-width: none;
  }
  .copy .intro-line,
  .copy .description,
  .copy .actions,
  .copy .scroll-hint {
    display: none;
  }
  .copy h1,
  .copy h2 {
    font-size: 25px;
    letter-spacing: 0.03em;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
  }
  .copy h1 {
    font-size: 29px;
    letter-spacing: 0.12em;
  }
  .copy .tagline {
    font-size: 12px;
    color: #a2b0bf;
    margin: 5px 0 0;
  }
  .intro .tagline {
    font-size: 13px;
  }
  .chapter-nav {
    display: none;
  }
  .scene-status {
    font-size: 10px;
    z-index: 2;
  }
  .scene-surface[data-state="ready"] .scene-status {
    display: none;
  }
  .scene-tools {
    bottom: 22px;
    right: 14px;
    z-index: 5;
    gap: 0;
  }
  .scene-tools button {
    font-size: 10px;
    padding: 7px 10px;
    min-height: 34px;
    background: #091322c9;
  }
  .hover-hint {
    display: none;
  }
  #experience {
    min-height: calc(143px + clamp(220px, 44svh, 450px) + 217px);
    padding-bottom: 22px;
  }
  .mobile-dock {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3;
    margin-top: calc(clamp(220px, 44svh, 450px) + 14px);
    padding: 0 22px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .game-selectors {
    display: flex;
    width: min(100%, 420px);
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding: 3px;
  }
  .game-selector {
    flex: 1 0 88px;
    min-height: 90px;
    scroll-snap-align: center;
    background: linear-gradient(145deg, #20314266, #18212c66);
    border: 1px solid #95a5b624;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #9eacbb;
    transition:
      border-color 0.2s,
      background 0.2s;
  }
  .game-selector.is-active {
    border-color: #cbb58d;
    background: linear-gradient(145deg, #324139a0, #1b2729b0);
    color: #eee9df;
    box-shadow: inset 0 0 12px #d2b07b0c;
  }
  .game-selector svg {
    width: 47px;
    height: 32px;
    fill: #8199ae;
    stroke: #afbccc;
    stroke-width: 0.4;
  }
  .ball-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    font:
      bold 17px Georgia,
      serif;
    color: #17231c;
    background: radial-gradient(
      circle at 35% 28%,
      #fff9e6,
      #d8d5c6 38%,
      #133c2a 40%,
      #03140c 70%,
      #34624b
    );
    width: 37px;
    height: 37px;
    border-radius: 50%;
    text-shadow: none;
    box-shadow: 0 4px 8px #0004;
  }
  .cards-icon {
    font:
      19px/1.1 Georgia,
      serif;
    background: #e8deca;
    color: #29303d;
    width: 25px;
    height: 35px;
    border-radius: 3px;
    transform: rotate(9deg);
    position: relative;
    box-shadow:
      -6px -2px 0 #d6cbb6,
      -10px -2px 0 #bfb398;
    text-align: left;
    padding-left: 3px;
  }
  .cards-icon > span {
    display: block;
    font-size: 15px;
  }
  .mobile-dock > p {
    font-size: 11px;
    color: #b7bdc6;
    margin: 12px 0;
  }
  #mobile-play {
    min-width: 185px;
    padding: 11px 25px;
    min-height: 44px;
  }
  .collection {
    margin: 12px 12px 0;
    border-radius: 18px 18px 0 0;
    padding: 35px 16px 30px;
  }
  .collection-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 22px;
  }
  .collection h2 {
    font-size: 25px;
  }
  .collection p {
    font-size: 12px;
  }
  .search-label {
    gap: 5px;
  }
  .search-label input {
    width: 100%;
    font-size: 16px;
  }
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .game-card {
    padding: 13px 10px;
    gap: 9px;
    min-height: 92px;
    flex-direction: column;
    align-items: flex-start;
  }
  .game-card img {
    width: 37px;
    height: 37px;
  }
  .game-card strong {
    font-size: 12px;
  }
  .game-card small {
    font-size: 10px;
  }
  .card-arrow {
    display: none;
  }
  .game-card:hover {
    transform: none;
  }
  footer {
    margin: 0 12px;
    padding: 26px 17px calc(28px + env(safe-area-inset-bottom, 0px));
    flex-wrap: wrap;
    gap: 12px;
  }
  footer p {
    flex-basis: 100%;
    order: 4;
  }
  .game-selector:active {
    transform: scale(0.98);
  }
}
@media (max-width: 360px) {
  .header {
    padding: 0 14px;
  }
  .mobile-dock {
    padding-inline: 16px;
  }
  .game-selector {
    min-height: 82px;
    font-size: 10px;
    flex-basis: 80px;
  }
  .game-selectors {
    gap: 7px;
  }
  .scene-surface {
    top: 138px;
  }
  .copy h1 {
    font-size: 27px;
  }
  .collection {
    margin-inline: 8px;
  }
  .game-card {
    padding: 11px 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
  }
}

.quality-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #d0d3d7;
  border: 1px solid #d6c19c2b;
  border-radius: 24px;
  padding: 0 10px;
  background: #0c1421a3;
}
.quality-label select {
  border: 0;
  color: #e8d9bc;
  background: #101c2a;
  border-radius: 8px;
  font: inherit;
  min-height: 36px;
  cursor: pointer;
  max-width: 110px;
  padding: 3px;
}
.quality-label select:focus-visible {
  outline: 2px solid #d5b681;
  outline-offset: 2px;
}
@media (max-width: 759px), (max-height: 500px) and (pointer: coarse) {
  .quality-label {
    font-size: 10px;
    padding: 0 7px;
  }
  .quality-label select {
    min-height: 34px;
    max-width: 85px;
  }
}

.game-entry {
  position: relative;
  min-width: 0;
}
.game-entry .game-card {
  height: 100%;
  padding-right: 48px;
}
.game-info {
  position: absolute;
  right: 8px;
  top: 8px;
  min-width: 36px;
  min-height: 36px;
  color: var(--muted);
  font-size: 17px;
  border-radius: 50%;
}
.game-info:hover {
  color: var(--gold);
  background: #b59b6920;
}
#music {
  position: relative;
  font-size: 21px;
}
#music.is-playing::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d2b581;
  bottom: 6px;
  left: 19px;
}
#game-dialog {
  width: min(540px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px);
  padding: 32px;
  border: 1px solid #ad9c784d;
  border-radius: 20px;
  background: #101b29;
  color: #e7e9eb;
  box-shadow: 0 35px 100px #0008;
  overflow: auto;
}
#game-dialog::backdrop {
  background: #050a14c9;
  backdrop-filter: blur(5px);
}
.dialog-close {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 44px;
  height: 44px;
  color: #c3cbd4;
  font-size: 27px;
  border-radius: 50%;
}
.dialog-content > img {
  display: block;
  margin: 2px 0 20px;
}
.dialog-content h2 {
  font-size: 27px;
  font-weight: 400;
  line-height: 1.4;
  margin: 0 0 18px;
}
.dialog-content h3 {
  font-size: 13px;
  font-weight: 500;
  color: #d0b589;
  margin: 24px 0 6px;
}
.dialog-content p {
  font-size: 13px;
  line-height: 1.9;
  color: #aebbc9;
  margin: 0 0 10px;
}
.dialog-content a:not(.button) {
  font-size: 11px;
  color: #cbb995;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.dialog-content .button {
  margin-top: 23px;
  min-width: 150px;
}
@media (max-width: 759px), (max-height: 500px) and (pointer: coarse) {
  .header {
    gap: 8px;
  }
  .header-tools button {
    width: 38px;
  }
  .game-entry .game-card {
    padding-right: 24px;
  }
  .game-info {
    right: 0;
    top: 0;
    min-width: 40px;
    min-height: 40px;
    font-size: 15px;
  }
  #game-dialog {
    padding: 28px 23px;
  }
  .scene-tools button,
  .quality-label select {
    min-height: 40px;
  }
}

.settings {
  position: relative;
}
.settings > summary {
  list-style: none;
  cursor: pointer;
  width: 40px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 19px;
  color: #c3c9cf;
  touch-action: manipulation;
}
.settings > summary::-webkit-details-marker {
  display: none;
}
.settings .scene-tools {
  position: absolute;
  top: 51px;
  right: 0;
  bottom: auto;
  width: 280px;
  max-width: calc(100vw - 32px);
  grid-template-columns: minmax(0, 1fr);
  padding: 16px;
  display: grid;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 40px #0005;
}
.settings .scene-tools button {
  width: 100%;
  min-width: 0;
  height: auto;
  line-height: 1.45;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  min-height: 42px;
  font-size: 12px;
}
.settings .quality-label {
  border-radius: 8px;
  justify-content: space-between;
  font-size: 12px;
}
.settings .quality-label select {
  min-height: 42px;
  font-size: 12px;
  max-width: 130px;
}
@media (max-width: 759px), (max-height: 500px) and (pointer: coarse) {
  .settings > summary {
    width: 36px;
  }
  .settings .scene-tools {
    top: 50px;
    right: -35px;
  }
  .header {
    padding-inline: 16px;
    gap: 5px;
  }
  .header-tools {
    gap: 0;
  }
  .header-tools > button {
    width: 34px;
  }
  .wordmark {
    font-size: 18px;
  }
}
@media (max-width: 360px) {
  .wordmark {
    font-size: 16px;
  }
  .header {
    padding-inline: 12px;
  }
  .settings > summary {
    width: 32px;
  }
  .header-tools > button {
    width: 32px;
  }
}

/* Mobile frames one focal exhibit while retaining the complete explorable room. */
.mobile-appearance {
  display: none;
}
@media (max-width: 759px), (max-height: 500px) and (pointer: coarse) {
  .mobile-curated {
    --mobile-header: calc(56px + env(safe-area-inset-top, 0px));
  }
  .mobile-curated .header {
    height: var(--mobile-header);
    padding: env(safe-area-inset-top, 0px) 22px 0;
    gap: 12px;
    background: #0b121cf2;
  }
  .mobile-curated .header-tools {
    gap: 5px;
  }
  .mobile-curated .header-tools > button,
  .mobile-curated .settings > summary {
    width: 42px;
    height: 44px;
  }
  .mobile-curated .wordmark {
    font-size: 17px;
    letter-spacing: 0.14em;
  }
  .mobile-curated .header nav {
    top: var(--mobile-header);
  }
  .mobile-curated .chapters {
    padding-top: calc(var(--mobile-header) + 4px);
  }
  .mobile-curated .chapter {
    padding: 6px 23px 0;
    text-align: left;
  }
  .mobile-curated .copy h2 {
    font-size: 27px;
    line-height: 1.25;
    letter-spacing: 0.02em;
  }
  .mobile-curated .copy .tagline {
    font-size: 12px;
    margin-top: 7px;
    color: var(--muted);
  }
  .mobile-curated .scene-surface {
    top: calc(var(--mobile-header) + 76px);
    height: clamp(230px, 43svh, 405px);
  }
  .mobile-curated #experience {
    min-height: calc(
      var(--mobile-header) + 76px + clamp(230px, 43svh, 405px) + 190px
    );
    padding-bottom: 15px;
  }
  .mobile-curated .mobile-dock {
    margin-top: calc(clamp(230px, 43svh, 405px) + 22px);
    padding: 0 22px calc(8px + env(safe-area-inset-bottom, 0px));
    align-items: stretch;
  }
  .mobile-curated .game-selectors {
    width: 100%;
    gap: 0;
    padding: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }
  .mobile-curated .game-selector {
    min-height: 54px;
    flex: 1 1 0;
    flex-direction: row;
    gap: 8px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    box-shadow: none;
    font-size: 12px;
  }
  .mobile-curated .game-selector.is-active {
    background: transparent;
    border-bottom-color: var(--gold);
    color: var(--text);
  }
  .mobile-curated .game-selector svg {
    width: 28px;
    height: 24px;
  }
  .mobile-curated .ball-icon {
    width: 26px;
    height: 26px;
    font-size: 12px;
    box-shadow: none;
  }
  .mobile-curated .cards-icon {
    width: 16px;
    height: 24px;
    font-size: 12px;
    box-shadow:
      -4px -1px 0 #c8bea8,
      -7px -1px 0 #8f938e;
  }
  .mobile-curated .cards-icon > span {
    font-size: 10px;
  }
  .mobile-curated #mobile-detail {
    font-size: 12px;
    line-height: 1.6;
    margin: 14px 0;
    color: var(--muted);
    min-height: 20px;
  }
  .mobile-curated #mobile-play {
    width: 100%;
    min-height: 48px;
    border-radius: 11px;
    justify-content: center;
    font-size: 13px;
  }
  .mobile-curated .mobile-appearance {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .mobile-curated .mobile-appearance button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-height: 44px;
    font-size: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
  }
  .mobile-curated .mobile-option-label {
    font-size: 12px;
  }
  .mobile-curated .mobile-appearance #music::after {
    display: none;
  }
  .mobile-curated .settings .scene-tools {
    top: 49px;
    right: -43px;
    width: 245px;
  }
  .mobile-curated .cabinet-selectors {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 9px 0 0;
  }
  .mobile-curated .cabinet-selectors button {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 11px;
    color: var(--muted);
    text-align: left;
    background: #18232b55;
  }
  .mobile-curated .cabinet-selectors button[aria-pressed="true"] {
    color: var(--text);
    border-color: #c9a46b99;
    background: #ad926915;
  }
  .mobile-curated .exhibit-number {
    font-size: 9px;
    color: var(--gold);
  }
  .mobile-curated #mobile-return {
    min-height: 32px;
    padding: 0;
    text-align: left;
    font-size: 11px;
    align-self: flex-start;
    color: var(--muted);
  }
  .mobile-curated .mobile-info {
    min-height: 42px;
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px;
  }
  .mobile-curated .collection {
    scroll-margin-top: calc(var(--mobile-header) + 10px);
  }
}
@media (max-height: 500px) and (pointer: coarse) and (min-width: 600px) {
  .mobile-curated #experience {
    display: grid;
    grid-template-columns: 57% 43%;
    grid-template-rows: auto 1fr;
    padding-top: var(--mobile-header);
    min-height: 100svh;
  }
  .mobile-curated .scene-surface {
    top: var(--mobile-header);
    right: 43%;
    height: calc(100% - var(--mobile-header));
  }
  .mobile-curated .chapters {
    grid-column: 2;
    padding-top: 12px;
  }
  .mobile-curated .chapter {
    padding-inline: 16px;
  }
  .mobile-curated .copy h2 {
    font-size: 23px;
  }
  .mobile-curated .mobile-dock {
    grid-column: 2;
    margin-top: 8px;
    padding: 0 16px 12px;
  }
  .mobile-curated .game-selector {
    min-height: 42px;
    font-size: 10px;
    gap: 5px;
  }
  .mobile-curated #mobile-detail {
    font-size: 11px;
    margin: 10px 0;
    line-height: 1.5;
  }
  .mobile-curated #mobile-play {
    min-height: 42px;
  }
  .mobile-curated .game-selectors .ball-icon {
    width: 21px;
    height: 21px;
  }
  .mobile-curated .game-selectors svg {
    width: 23px;
    height: 21px;
  }
  .mobile-curated .cabinet-selectors button {
    min-height: 40px;
    font-size: 10px;
  }
}
@media (min-width: 760px) and (min-height: 501px) {
  #cabinet .copy {
    max-width: 300px;
  }
  #cabinet .copy h2 {
    font-size: 40px;
    line-height: 1.4;
  }
  body[data-scene="cabinet"] .chapter-nav {
    top: auto;
    bottom: 22px;
    right: 32px;
    transform: none;
    flex-direction: column;
    gap: 2px;
    padding: 5px;
  }
}
@media (max-height: 500px) and (pointer: coarse) and (min-width: 600px) {
  .mobile-curated .header {
    padding-left: max(22px, env(safe-area-inset-left, 0px));
    padding-right: max(22px, env(safe-area-inset-right, 0px));
  }
  .mobile-curated .mobile-dock {
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
}

/* Ready scenes use quiet, actionable controls; loading never covers the finished subject. */
.reset-view {
  position: absolute;
  top: 100px;
  right: 18px;
  z-index: 4;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #c5d3dc33;
  border-radius: 8px;
  color: #e0e5e7;
  background: #101a25e8;
  font-size: 11px;
  pointer-events: auto;
}
.explore-help {
  position: absolute;
  bottom: 8px;
  left: 12px;
  right: 12px;
  z-index: 3;
  text-align: center;
  font-size: 10px;
  line-height: 1.5;
  color: #c6cdd3;
  text-shadow: 0 1px 3px #000;
  pointer-events: none;
}
#settings-sheet {
  color: var(--text);
  background: #101923;
  border: 1px solid #a5b4be38;
  border-radius: 20px 20px 0 0;
  margin: auto 0 0;
  inset: auto 0 0;
  width: 100%;
  max-width: none;
  max-height: 85vh;
  max-height: 85dvh;
  padding: 20px 22px max(20px, env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
}
#settings-sheet::backdrop {
  background: #030810b8;
}
.settings-open {
  overflow: hidden;
}
.sheet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.sheet-heading h2 {
  font-size: 18px;
  font-weight: 500;
  margin: 0;
}
.sheet-heading button {
  min-height: 44px;
  min-width: 64px;
  color: var(--gold);
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 14px;
  white-space: nowrap;
}
#settings-sheet .scene-tools {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 0;
  width: 100%;
  border: 0;
  background: none;
  box-shadow: none;
}
#settings-sheet .scene-tools > .quality-label {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
  gap: 12px;
  padding: 0 12px;
}
#settings-sheet .scene-tools button,
#settings-sheet .quality-label {
  border: 1px solid #aab9c42f;
  border-radius: 10px;
  background: #1b2732;
  color: #e5e8e9;
  font-size: 13px;
  min-height: 48px;
  line-height: 1.4;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  padding: 10px 12px;
  width: 100%;
}
#settings-sheet .quality-label select {
  background: #111d28;
  color: #e5e8e9;
  border: 1px solid #c0ced138;
  border-radius: 7px;
  min-height: 40px;
  padding: 5px 10px;
  max-width: 60%;
  font-size: 13px;
}
#settings-sheet .mobile-appearance {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
#settings-sheet .mobile-appearance button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
#settings-sheet .mobile-option-label {
  font-size: 13px;
}
@media (max-width: 759px), (max-height: 500px) and (pointer: coarse) {
  .mobile-curated .cabinet-selectors button:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
  }
  .mobile-curated .cabinet-selectors button:nth-child(5) {
    grid-column: 2;
    grid-row: 2;
  }
  .mobile-curated .cabinet-selectors button:nth-child(6) {
    grid-column: 1;
    grid-row: 2;
  }
  .mobile-curated .reset-view {
    top: 8px;
    right: 12px;
    min-height: 36px;
    font-size: 10px;
  }
  .mobile-curated .explore-help {
    bottom: 6px;
    font-size: 9px;
  }
}
@media (min-width: 600px) {
  #settings-sheet {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
}

.settings-icon {
  width: 20px;
  height: 20px;
  display: block;
}
.settings > summary:hover {
  color: var(--gold);
}
#cabinet::before {
  background: linear-gradient(
    90deg,
    #060c15a8 0%,
    #060c1570 25%,
    #060c1526 48%,
    transparent 65%
  );
}

/* Shared visual language for the room, chapter controls, and game index. */
.header {
  top: 15px;
  left: clamp(18px, 2.2vw, 42px);
  right: clamp(18px, 2.2vw, 42px);
  height: 60px;
  padding: 0 28px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: #0b0c14db;
  backdrop-filter: none;
}
.wordmark {
  font-size: 18px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.09em;
}
.wordmark::before,
#overview .intro-line::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 11px;
  margin-right: 8px;
  background: linear-gradient(90deg, #9d87ff 0 34%, transparent 34% 55%, #b4a5ff 55% 89%, transparent 89%);
  transform: skew(-16deg);
}
.header nav {
  gap: 8px;
  font-size: 13px;
}
.header nav a {
  padding: 7px 13px;
  border-radius: 18px;
}
.header nav a[aria-current] {
  background: #7860d42e;
  color: #dcd3ff;
}
.header-tools { gap: 5px; }
.header-tools > button,
.settings > summary,
.reset-view {
  border-radius: var(--control-radius);
}
.reset-view {
  top: 91px;
  right: clamp(18px, 2.2vw, 42px);
  min-height: 40px;
  background: #10121cdb;
  color: var(--text);
  border: 1px solid var(--line);
}
.chapter {
  padding-inline: clamp(30px, 4.6vw, 90px);
}
.chapter::before,
#cabinet::before {
  background: linear-gradient(90deg, #0a0b13ec 0%, #0a0b13ad 16%, #0a0b1347 29%, transparent 47%);
}
.copy {
  max-width: 345px;
}
.copy .intro-line {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.075em;
  color: #dddbe7;
  margin-bottom: 16px;
}
.copy h1 {
  font: italic 700 clamp(50px, 6vw, 104px)/1.02 var(--font);
  letter-spacing: -0.051em;
  white-space: nowrap;
  margin: 0 0 18px;
}
.copy h1::after {
  content: "";
  display: inline-block;
  width: 0.14em;
  height: 0.65em;
  margin-left: 0.12em;
  background: #8c6df7;
  transform: skew(-18deg);
}
.copy h2 {
  font-size: clamp(36px, 4.15vw, 66px);
  font-weight: 450;
  letter-spacing: 0;
  line-height: 1.18;
}
.copy .tagline { letter-spacing: 0; margin-bottom: 16px; }
.copy .description { color: var(--muted); line-height: 1.9; }
.actions { gap: 12px; }
.button {
  border-radius: var(--control-radius);
  min-height: 44px;
}
.primary { background: var(--purple); color: #fff; box-shadow: none; }
.primary:hover { background: #765edf; }
.secondary { border: 1px solid #bbb7d56b; background: #1415208c; color: var(--text); }
.secondary:hover { background: #242336; }
.text-link { color: var(--muted); }
.text-link:hover { color: var(--text); }
.scroll-hint {
  bottom: 34px;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}
.mouse-symbol { width: 10px; height: 18px; border-radius: 4px; }
.mouse-symbol::before { left: 4px; top: 3px; height: 4px; }
.chapter-nav {
  top: clamp(150px, 23vh, 234px);
  bottom: auto;
  right: clamp(18px, 2.2vw, 42px);
  transform: none;
  width: 148px;
  gap: 2px;
  padding: 5px;
  align-items: stretch;
  border: 1px solid #a3b3d020;
  border-radius: 12px;
  background: #090c14b8;
}
.chapter-nav a {
  gap: 8px;
  min-height: 44px;
  border-radius: 9px;
  border: 0;
  padding: 4px 9px;
  color: #e4e1ed;
  font-size: 12px;
  font-weight: 500;
  text-shadow: 0 1px 3px #090b12, 0 0 7px #090b12;
  pointer-events: auto;
}
.chapter-nav a:hover {
  background: #282638aa;
}
.chapter-nav a img { width: 23px; height: 23px; flex: none; }
.chapter-nav .scene-more::before {
  content: "";
  display: block;
  width: 23px;
  height: 23px;
  flex: none;
  background:
    linear-gradient(#aaa6bf, #aaa6bf) 3px 3px / 6px 6px,
    linear-gradient(#aaa6bf, #aaa6bf) 13px 3px / 6px 6px,
    linear-gradient(#aaa6bf, #aaa6bf) 3px 13px / 6px 6px,
    linear-gradient(#aaa6bf, #aaa6bf) 13px 13px / 6px 6px;
  background-repeat: no-repeat;
}
.chapter-nav a::after {
  width: 15px;
  height: 2px;
  margin-left: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  flex: none;
}
.chapter-nav a[aria-current] {
  color: #f4efff;
  font-weight: 650;
}
.chapter-nav a[aria-current]::after {
  background: #b5a6ff;
  box-shadow: none;
}
.chapter-nav :is([href="#cabinet"], [href="#about"]) { display: none; }
body[data-scene="cabinet"] .chapter-nav { width: 148px; top: auto; bottom: 22px; }
body[data-scene="cabinet"] .chapter-nav [href="#cabinet"],
body[data-scene="about"] .chapter-nav [href="#about"] { display: flex; }
.scene-status,
.hover-hint { background: #141522eb; border-radius: var(--control-radius); }
.explore-help { color: #dedceb; text-shadow: 0 1px 4px #0c0e19; }
.collection, footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.collection { border-radius: 0; }
.collection-heading { border-bottom: 1px solid var(--line); padding-bottom: 23px; }
.game-grid { gap: 0 30px; }
.game-card {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding-inline: 8px 16px;
}
.game-card:hover { transform: none; background: #1b1a2b; border-color: var(--gold); }
.game-card img { width: 38px; height: 38px; filter: saturate(0.52); }
#game-dialog, #settings-sheet {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: none;
}
#settings-sheet .scene-tools button, #settings-sheet .quality-label {
  color: var(--text);
  background: #222332;
  border-color: var(--line);
  border-radius: var(--control-radius);
}
#settings .scene-tools {
  border-radius: var(--control-radius);
  box-shadow: none;
}
#settings-sheet .quality-label select {
  color: var(--text);
  background: var(--bg);
  border-color: var(--line);
}

@media (max-width: 759px), (max-height: 500px) and (pointer: coarse) {
  .mobile-curated .header {
    left: 0;
    right: 0;
    top: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: #10111a;
  }
  .mobile-curated .header nav { background: var(--panel); }
  .mobile-curated .chapter::before { background: none; }
  .mobile-curated .game-selector {
    color: var(--muted);
    border-bottom-width: 1px;
    font-weight: 500;
  }
  .mobile-curated .game-selector.is-active {
    color: var(--text);
    font-weight: 700;
    border-bottom-color: #a795ff;
  }
  .mobile-curated .game-selector :is(.ball-icon, svg, .cards-icon) { display: none; }
  .mobile-curated #mobile-play { border-radius: var(--control-radius); }
  .mobile-curated .collection { background: var(--bg); border-radius: 0; }
  .mobile-curated .collection-heading { margin-bottom: 10px; }
  .mobile-curated .game-grid { gap: 0 14px; }
}

@media (max-width: 759px) and (orientation: portrait) {
  .mobile-curated #experience {
    display: grid;
    grid-template-areas: "heading" "scene" "dock";
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: calc(var(--mobile-header) + 16px) 0 28px;
    min-height: 0;
  }
  .mobile-curated .chapters { grid-area: heading; padding: 0; }
  .mobile-curated .chapter { padding: 0 23px; min-height: 0; }
  .mobile-curated .copy .intro-line {
    display: block;
    color: #b9adf3;
    margin: 0 0 5px;
    font-size: 10px;
  }
  .mobile-curated .copy h2 { font-size: clamp(26px, 7.5vw, 35px); }
  .mobile-curated .copy .tagline { margin: 5px 0 0; }
  .mobile-curated :is(#minecraft, #billiards, #flight, #cards) .tagline { display: none; }
  .mobile-curated .scene-surface {
    position: relative;
    grid-area: scene;
    inset: auto;
    margin: 0 14px;
    height: clamp(245px, 41svh, 410px);
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
  }
  .mobile-curated .scene-surface::after { display: none; }
  .mobile-curated .reset-view { min-height: 44px; }
  .mobile-curated .mobile-dock { grid-area: dock; margin-top: 0; }
  .mobile-curated #mobile-detail { margin-block: 12px; }
}

.scene-surface[data-state="standby"] .scene-status { visibility: hidden; }
body:not([data-scene="overview"])
  .scene-surface:is([data-gallery="loading"], [data-gallery="failed"]) .scene-status {
  display: block;
  visibility: visible;
}
button.game-card[data-info="minecraft"] {
  width: 100%;
  text-align: start;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}
#mobile-play[aria-haspopup="dialog"] .play-symbol { display: none; }
@media (min-width: 760px) and (min-height: 501px) {
  #overview {
    align-items: flex-end;
    padding-bottom: clamp(80px, 11vh, 120px);
  }
  #overview::before {
    background: linear-gradient(18deg, #07090ff5, #07090f66 27%, transparent 53%);
  }
  #overview .copy h1 { font-size: clamp(46px, 5.1vw, 80px); }
  #overview .copy .intro-line { margin-bottom: 8px; }
  #overview .copy .description { margin-bottom: 17px; }
  #overview .copy .tagline { margin-bottom: 6px; }
  #about .copy { max-width: 310px; }
  #about .copy h2 { font-size: clamp(33px, 3.4vw, 54px); }
}

@media (max-width: 759px), (max-height: 500px) and (pointer: coarse) {
  .mobile-curated .game-selectors:not([hidden]) {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
  }
  .mobile-curated .game-selector {
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 53px;
    padding: 4px 2px;
    gap: 4px;
    font-size: clamp(10px, 2.8vw, 12px);
    line-height: 1.12;
    white-space: normal;
  }
  .mobile-curated .game-selector :is(.ball-icon, svg, .cards-icon, img, .panorama-icon) {
    display: inline-grid;
    width: 17px;
    height: 17px;
    place-items: center;
    flex: none;
    margin: 0;
    font-size: 9px;
  }
  .mobile-curated .game-selector .panorama-icon {
    border: 1px solid currentColor;
    border-radius: 3px;
    background: linear-gradient(currentColor, currentColor) center / 7px 1px no-repeat;
  }
  html[lang="en"] .mobile-curated [data-game="overview"] [data-text="panorama"] {
    max-width: 100%;
    font-size: min(1em, 2.65vw);
    overflow-wrap: anywhere;
  }
  .mobile-curated .game-selector .cards-icon > span { display: none; }
  .mobile-curated .game-selector.is-active { color: #f3edff; background: #9183cf1c; }
  .mobile-curated .scene-surface {
    border-color: #8996ba34;
    background: #07090f;
  }
}
