* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #c9bb9f;
  color: #fff;
  font-family:
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
#scene,
#canvas,
#still,
.shade {
  position: fixed;
  inset: 0;
}
#scene {
  touch-action: none;
  cursor: grab;
}
#scene:active {
  cursor: grabbing;
}
#canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}
#still {
  background-position: center;
  background-size: cover;
  z-index: -1;
}
body.fallback #still {
  z-index: 0;
}
.shade {
  pointer-events: none;
}
.top {
  height: 176px;
  background: linear-gradient(#171e1a69, transparent);
}
.bottom {
  top: auto;
  height: 42%;
  background: linear-gradient(transparent, #151d19ac);
}
header {
  position: fixed;
  top: max(20px, env(safe-area-inset-top));
  left: max(26px, env(safe-area-inset-left));
  right: max(26px, env(safe-area-inset-right));
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
header > * {
  pointer-events: auto;
}
.topActions,
.set,
.zoom,
.steps {
  display: flex;
  align-items: center;
}
.topActions {
  gap: 8px;
}
.glass {
  background: #202822cc;
  color: #fff;
  border: 1px solid #ffffff27;
  text-decoration: none;
  backdrop-filter: blur(12px);
}
button,
select,
a,
input {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button,
a,
.speed {
  transition:
    background 0.18s,
    box-shadow 0.18s;
}
button:hover,
.speed:hover {
  background: #ffffff20;
}
.glass:hover {
  background: #202822eb;
}
button:focus-visible,
.speed:focus-within,
input:focus-visible,
a:focus-visible {
  outline: 3px solid #f2cd90;
  outline-offset: 3px;
}
.back,
.roomsBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  border-radius: 24px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
}
.round {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
svg {
  width: 18px;
  height: 18px;
  display: block;
}
.panel {
  position: fixed;
  right: 26px;
  top: 76px;
  background: #202822fa;
  border: 1px solid #ffffff26;
  border-radius: 16px;
  width: min(305px, calc(100vw - 40px));
  padding: 17px;
  z-index: 5;
  box-shadow: 0 10px 38px #0d171d2e;
}
.panelTitle {
  font-size: 15px;
  font-weight: 650;
  margin: 0 0 8px;
}
.panel p {
  color: #e1e4dd;
  font-size: 13px;
  line-height: 1.55;
  margin: 8px 0 0;
}
.panel button {
  display: flex;
  justify-content: space-between;
  text-align: left;
  width: 100%;
  padding: 11px 8px;
  background: none;
  border: 0;
  border-radius: 7px;
  font-size: 14px;
}
.panel button:hover,
.panel button[aria-current="true"] {
  background: #ffffff16;
}
.panel button span {
  font-size: 12px;
  color: #cbd0c7;
}
.controls {
  position: fixed;
  bottom: max(23px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(665px, calc(100% - 48px));
}
.info {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  text-shadow: 0 1px 10px #17201999;
  margin: 0 3px 16px;
}
.title > span {
  display: block;
  font:
    500 clamp(24px, 3.2vw, 40px)/1.1 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: -0.048em;
}
.title small {
  color: #eeeee9;
  font-size: 12px;
  display: block;
  margin-top: 5px;
}
.room {
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.rail {
  border-radius: 18px;
  background: #202822ee;
  border: 1px solid #ffffff31;
  backdrop-filter: blur(12px);
  padding: 9px 13px 10px;
}
.track {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 22px;
}
.track input {
  cursor: pointer;
  flex: 1;
  min-width: 0;
  height: 16px;
  margin: 0 1px;
  accent-color: #e7d8b4;
  background: transparent;
}
.track input::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 4px;
  background: linear-gradient(
    to right,
    #e9d7b1 var(--done, 0%),
    #687068 var(--done, 0%)
  );
}
.track input::-webkit-slider-thumb {
  margin-top: -6px;
}
.track output {
  font-variant-numeric: tabular-nums;
  color: #e0e2dc;
  font-size: 11px;
  min-width: 29px;
}
.transport {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.set {
  gap: 6px;
}
.transport button,
.speed {
  display: grid;
  place-items: center;
  width: 39px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
}
.transport button:hover,
.speed:hover,
.transport button[aria-pressed="true"] {
  background: #ffffff20;
}
.transport .play {
  width: 38px;
  height: 38px;
  background: #e8d9b8;
  color: #253229;
  border-radius: 50%;
  margin-right: 4px;
}
.transport .play:hover {
  background: #f4e6c7;
}
.speed {
  position: relative;
  display: flex;
  gap: 5px;
  width: auto;
  padding: 0 8px;
}
.speed svg {
  width: 15px;
  height: 15px;
}
.speed select {
  appearance: none;
  border: 0;
  outline: none;
  color: white;
  cursor: pointer;
  background: transparent;
  width: 37px;
  font-size: 13px;
  height: 36px;
  font-weight: 600;
}
.speed option {
  color: #202822;
}
.steps,
.zoom {
  border-left: 1px solid #ffffff2c;
  padding-left: 6px;
}
.steps {
  display: none;
}
#loading,
#message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 25px;
  background: #202822eb;
  color: #fff;
  padding: 11px 17px;
  font-size: 13px;
  pointer-events: none;
}
#message:empty {
  display: none;
}
#message {
  top: 26%;
  text-align: center;
  max-width: 85vw;
  min-width: 160px;
}
.fallback .rail {
  display: none;
}
.capture header,
.capture .panel,
.capture .controls,
.capture .shade,
.capture #message {
  display: none;
}
@media (pointer: coarse) {
  .steps {
    display: flex;
  }
}
@media (max-width: 660px) {
  header {
    left: 14px;
    right: 14px;
    top: max(14px, env(safe-area-inset-top));
  }
  .panel {
    right: 14px;
    top: 66px;
  }
  .controls {
    width: calc(100% - 26px);
    bottom: max(13px, env(safe-area-inset-bottom));
  }
  .info {
    margin-bottom: 11px;
    align-items: flex-end;
  }
  .title > span {
    font-size: 25px;
  }
  .title small {
    font-size: 10px;
  }
  .room {
    font-size: 11px;
  }
  .transport button,
  .speed {
    min-height: 40px;
  }
  .transport .play {
    height: 40px;
    width: 40px;
  }
  .rail {
    padding: 7px 9px 8px;
  }
  .set {
    gap: 1px;
  }
  .transport button {
    width: 35px;
  }
  .steps,
  .zoom {
    padding-left: 3px;
  }
  .speed {
    padding: 0 5px;
  }
  .steps {
    display: flex;
  }
}
@media (max-height: 520px) {
  .controls {
    bottom: 8px;
  }
  .info {
    margin-bottom: 5px;
  }
  .title > span {
    font-size: 19px;
  }
  .title small {
    display: none;
  }
  .rail {
    padding: 5px 8px;
  }
  .top {
    height: 80px;
  }
  .panel {
    top: 56px;
  }
  .back,
  .roomsBtn,
  .round {
    height: 34px;
  }
}
html,
body {
  height: 100%;
  overflow: hidden;
}
