*,
*::after,
*::before {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Montserrat', sans-serif;
}

#viewer {
  --side-inset: clamp(20px, -0.807rem + 5.06vw, 60px);
  --tower-scroll-bleed: 20px;
  position: relative;
  width: 100vw;
  height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
}

#viewer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 55%;
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.2) 45%,
    rgba(0, 0, 0, 0) 100%
  );
}

button {
  cursor: pointer;
  background-color: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 1.2rem;
  font-weight: 500;
  line-height: 1;
  font-size: 16px;
  font-family: 'Montserrat', sans-serif;
  color: white;
  border-radius: 50px;
  flex-shrink: 0;
  white-space: nowrap;
}

button:disabled {
  cursor: not-allowed;
}

@media screen and (hover: hover) {
  button:not(:disabled):hover {
    background-color: hsl(0 0% 100%);
    color: #414244;
  }
}

button[aria-current='true'] {
  background-color: hsl(0 0% 100%);
  color: #414244;
}

.viewer-logo {
  position: absolute;
  top: 40px;
  right: 60px;
  right: clamp(20px, -0.807rem + 5.06vw, 60px);
  z-index: 20;
  display: block;
  line-height: 0;
}

.viewer-logo img {
  display: block;
  width: 152px;
  height: auto;
}

.tower-controls-area {
  position: absolute;
  top: 40px;
  left: 0;
  right: 0;
  z-index: 20;
  padding-inline: var(--side-inset);
  pointer-events: none;
}

.tower-controls-scroll {
  margin-inline: calc(-1 * var(--tower-scroll-bleed));
  padding-inline: var(--tower-scroll-bleed);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  pointer-events: none;
}

.tower-controls {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  width: max-content;
  position: relative;
  overflow: hidden;
  border-radius: 50px;
  background-color: transparent;
  border: 1px solid #ffffff;
  pointer-events: auto;
  touch-action: pan-x;
}

.tower-controls::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--tower-highlight-left, 0);
  width: var(--tower-highlight-width, 0);
  height: 100%;
  border-radius: 50px;
  background-color: #ffffff;
}

.tower-controls[data-highlight-ready='true']::before {
  transition: left 220ms ease, width 220ms ease;
}

.tower-controls button {
  position: relative;
  z-index: 1;
  background-color: transparent;
  transition: color 220ms ease;
}

.tower-controls button[aria-current='true'] {
  background-color: transparent;
  color: #ffffff;
}

.tower-controls button[data-highlighted='true'] {
  background-color: transparent;
  color: #414244;
}

.floor-controls-area {
  position: absolute;
  top: 190px;
  left: 0;
  right: 0;
  z-index: 20;
  padding-inline: var(--side-inset);
  pointer-events: none;
}

.floor-controls-scroll {
  margin-inline: calc(-1 * var(--tower-scroll-bleed));
  padding-inline: var(--tower-scroll-bleed);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  pointer-events: none;
}

.tower-controls-scroll[data-overflowing='true'],
.floor-controls-scroll[data-overflowing='true'],
.time-controls-scroll[data-overflowing='true'] {
  pointer-events: auto;
}

.floor-controls {
  display: inline-flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 10px;
  width: max-content;
  border-radius: 50px;
  pointer-events: auto;
  touch-action: pan-x;
}

.floor-controls button {
  flex-shrink: 0;
  white-space: nowrap;
}

.floor-controls button[aria-current='true'] {
  border: 1px solid #fff;
}

.floor-controls button[aria-current='false'] {
  border: 1px solid #fff;
}

.time-controls-area {
  position: absolute;
  top: 115px;
  left: 0;
  right: 0;
  z-index: 20;
  padding-inline: var(--side-inset);
  pointer-events: none;
}

.time-controls-scroll {
  margin-inline: calc(-1 * var(--tower-scroll-bleed));
  padding-inline: var(--tower-scroll-bleed);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  pointer-events: none;
}

.time-controls {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  width: max-content;
  position: relative;
  overflow: hidden;
  border-radius: 50px;
  background-color: transparent;
  border: 1px solid #ffffff;
  pointer-events: auto;
  touch-action: pan-x;
}

.time-controls::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--time-highlight-left, 0);
  width: var(--time-highlight-width, 0);
  height: 100%;
  border-radius: 50px;
  background-color: #ffffff;
}

.time-controls[data-highlight-ready='true']::before {
  transition: left 220ms ease, width 220ms ease;
}

.time-controls button {
  position: relative;
  z-index: 1;
  background-color: transparent;
  transition: color 220ms ease;
}

.time-controls button[aria-current='true'] {
  background-color: transparent;
  color: #ffffff;
}

.time-controls button[data-highlighted='true'] {
  background-color: transparent;
  color: #414244;
}

@media(max-width:650px) {
  .viewer-logo {
    display: none;
  }
}
.viewer-footer {
  position: fixed;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  right: calc(10px + env(safe-area-inset-right, 0px));
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.4;
  z-index: 30;
}
.viewer-footer a {
  color: #ffffff;
  text-decoration: none;
}