* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000000;
}

hr {
  width: 100%;
  color: rgba(255, 255, 255, 0.85);
}

/* EXP: Hamburger button menu opener. */
#menu-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 20;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.68);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

#menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 1px;
}

#menu-toggle[aria-expanded="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* EXP: Visually hides the hamburger button while keeping it clickable. */
#menu-toggle.menu-toggle-invisible {
  opacity: 0;
}

/* EXP: Slide-out tray. */
#tray {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 15;
  height: 100%;
  width: min(260px, 80vw);
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  padding: 72px 20px 20px;
  overflow-y: auto;
}

#tray.open {
  transform: translateX(0);
}

#tray-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.68);
  color: #ffffff;
  font: 600 20px/1 sans-serif;
  cursor: pointer;
}

#controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#controls button {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.68);
  color: #ffffff;
  font: 600 12px/1 sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

#tour-toggle[aria-pressed="true"] {
  border-color: #ffffff;
  background: #ffffff;
  color: #000000;
}

/* EXP: Slider-switch style toggles. */
.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font: 600 12px/1 sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  flex: 0 0 auto;
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.45);
  transition: background 0.2s ease;
}

.switch-track::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.2s ease;
}

.switch input:checked + .switch-track {
  background: #ffffff;
}

.switch input:checked + .switch-track::before {
  transform: translateX(18px);
  background: #000000;
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.switch-label {
  line-height: 1.2;
}

/* EXP: Range slider control (e.g. tour speed). */
.slider-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #ffffff;
  font: 600 12px/1 sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.slider-control input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: pointer;
}

.slider-control input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
}

.slider-control input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
}

.slider-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.slider-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.slider-control input[type="range"]:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

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

canvas:active {
  cursor: grabbing;
}

canvas.cursor-hidden {
  cursor: none;
}

.external-link {
  margin-top: 1rem;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font: 600 20px/1 sans-serif;
}

.external-link a svg {
  margin-top: .5rem;
  width: 42%;
  height: 42%;
}