:root {
  --ink: #f7f4ee;
  --muted: rgba(247, 244, 238, 0.66);
  --panel: rgba(8, 10, 12, 0.68);
  --panel-strong: rgba(8, 10, 12, 0.86);
  --line: rgba(255, 255, 255, 0.14);
  --gold: #d9b36c;
  --teal: #4fc3b3;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #050607;
  color: var(--ink);
}

button {
  font: inherit;
  cursor: pointer;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #050607;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  align-items: end;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(5, 6, 7, 0.04), rgba(5, 6, 7, 0.22) 38%, rgba(5, 6, 7, 0.72)),
    radial-gradient(circle at 50% 32%, rgba(79, 195, 179, 0.08), rgba(0, 0, 0, 0) 32%);
  transition: opacity 260ms ease, visibility 260ms ease;
}

.intro__content {
  width: min(520px, calc(100vw - 36px));
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 10, 12, 0.74);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.32);
}

.intro__content h2 {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 3.15rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.intro__content p:not(.eyebrow) {
  max-width: 31em;
}

.intro__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.intro__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.intro__loading {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  margin-top: 18px;
  color: rgba(247, 244, 238, 0.64);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.intro__loading strong {
  color: rgba(244, 208, 142, 0.92);
  font-size: 0.72rem;
}

.intro__loading i {
  grid-column: 1 / -1;
  position: relative;
  display: block;
  height: 2px;
  overflow: hidden;
  background: rgba(247, 244, 238, 0.12);
}

.intro__loading b {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--asset-progress, 0%);
  background: linear-gradient(90deg, rgba(79, 195, 179, 0.72), rgba(244, 208, 142, 0.96));
  box-shadow: 0 0 18px rgba(244, 208, 142, 0.32);
  transition: width 180ms ease;
}

.is-assets-ready .intro__loading {
  color: rgba(247, 244, 238, 0.44);
}

.intro__chips span,
.intro__button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
}

.intro__chips span {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(247, 244, 238, 0.92);
}

.intro__button {
  background: var(--teal);
  color: #051313;
}

.intro__button--secondary {
  background: rgba(217, 179, 108, 0.96);
  color: #120e06;
}

.intro__button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.is-xr .topbar,
.is-xr .help-panel,
.is-xr .info-panel,
.is-xr .minimap,
.is-xr .room-toast,
.is-xr .intro {
  display: none !important;
}

.intro.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.topbar {
  position: fixed;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px 8px 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
}

.brand__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 179, 108, 0.62);
  color: var(--gold);
  background: rgba(0, 0, 0, 0.22);
  font-weight: 800;
}

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

.brand strong {
  font-size: 14px;
  letter-spacing: 0;
}

.brand small {
  max-width: 360px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.room-tabs {
  max-width: min(720px, calc(100vw - 470px));
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
  pointer-events: auto;
}

.room-tab {
  min-width: 88px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: rgba(247, 244, 238, 0.76);
  background: var(--panel);
  backdrop-filter: blur(16px);
  font-size: 12px;
  font-weight: 800;
  user-select: none;
}

.room-tab.is-active {
  color: #06100f;
  border-color: rgba(79, 195, 179, 0.8);
  background: var(--teal);
}

.help-toggle {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel);
  backdrop-filter: blur(16px);
  pointer-events: auto;
  font-weight: 800;
}

.help-panel {
  position: fixed;
  top: 64px;
  right: 18px;
  z-index: 10;
  display: grid;
  gap: 8px;
}

[hidden] {
  display: none !important;
}

.help-panel span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  color: rgba(247, 244, 238, 0.76);
  font-size: 0.72rem;
  font-weight: 700;
}

.info-panel {
  position: fixed;
  left: 18px;
  bottom: 194px;
  z-index: 10;
  width: min(420px, calc(100vw - 36px));
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
p {
  margin-top: 0;
}

.info-panel h1 {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: 0;
}

.info-panel p:not(.eyebrow) {
  margin-bottom: 0;
  color: rgba(247, 244, 238, 0.72);
  font-size: 13px;
  line-height: 1.52;
}

.minimap {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 10;
  width: 220px;
  height: 168px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
}

.minimap__head {
  padding: 10px 12px 0;
}

.minimap__head strong,
.minimap__head span {
  display: block;
}

.minimap__head strong {
  font-size: 0.82rem;
  line-height: 1.18;
}

.minimap__head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.minimap__stage {
  position: absolute;
  inset: 46px 10px 10px;
}

.mini-zone {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(247, 244, 238, 0.78);
  font-size: 0.64rem;
  font-weight: 750;
}

.mini-zone--rotunda {
  left: 72px;
  top: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.mini-zone--art3d {
  right: 16px;
  top: 12px;
  width: 52px;
  height: 34px;
}

.mini-zone--photo {
  left: 16px;
  top: 12px;
  width: 52px;
  height: 34px;
}

.mini-zone--music {
  right: 12px;
  bottom: 10px;
  width: 56px;
  height: 34px;
}

.mini-zone--open {
  left: 12px;
  bottom: 10px;
  width: 56px;
  height: 34px;
}

.mini-zone.is-active {
  border-color: rgba(79, 195, 179, 0.8);
  color: #06100f;
  background: rgba(79, 195, 179, 0.88);
}

.mini-zone.is-target {
  border-color: rgba(217, 179, 108, 0.76);
  color: #fff5e5;
  background: rgba(217, 179, 108, 0.18);
}

.mini-player {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid #060708;
  box-shadow: 0 0 18px rgba(217, 179, 108, 0.28);
  transform: translate(-50%, -50%);
}

.mini-player span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 12px;
  border-radius: 999px;
  background: #07100f;
  transform: translate(-50%, -100%);
  transform-origin: 50% calc(100% - 1px);
}

.room-toast {
  position: fixed;
  left: 50%;
  top: 72px;
  z-index: 11;
  display: grid;
  gap: 3px;
  min-width: 220px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.room-toast strong {
  font-size: 0.8rem;
}

.room-toast span {
  color: var(--muted);
  font-size: 0.72rem;
}

#app:not(.is-started) .topbar,
#app:not(.is-started) .help-panel,
#app:not(.is-started) .info-panel,
#app:not(.is-started) .minimap,
#app:not(.is-started) .room-toast {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 840px) {
  .intro {
    padding: 12px;
  }

  .intro__content {
    width: calc(100vw - 24px);
    padding: 16px;
  }

  .topbar {
    top: 12px;
    left: 12px;
    right: 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .room-tabs {
    max-width: none;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    grid-column: 1 / -1;
  }

  .room-tab {
    min-width: 82px;
    flex: 0 0 auto;
  }

  .brand small {
    max-width: 260px;
  }

  .help-panel {
    top: 56px;
    right: 12px;
  }

  .info-panel {
    left: 12px;
    right: 12px;
    bottom: 170px;
    width: auto;
  }

  .minimap {
    left: 12px;
    bottom: 12px;
    transform: scale(0.92);
    transform-origin: bottom left;
  }

  .room-toast {
    top: 96px;
  }
}
