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

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: #050a14;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.stage-root {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 24% 20%, #0d1a2c 0%, #050a14 70%);
}

#stage {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.fallback-frame {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fallback-frame[hidden] {
  display: none;
}

.fallback-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.brand-mark {
  position: fixed;
  top: calc(clamp(20px, 2.8vh, 32px) + env(safe-area-inset-top, 0px));
  left: calc(clamp(22px, 2.4vw, 36px) + env(safe-area-inset-left, 0px));
  z-index: 10;
  pointer-events: none;
}

.wordmark {
  font-family: "Iowan Old Style", "Baskerville", "Palatino Linotype", "Didot", "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1;
  letter-spacing: 0.24em;
  color: rgba(232, 239, 248, 0.82);
  text-shadow:
    0 1px 14px rgba(4, 9, 18, 0.72),
    0 0 2px rgba(210, 228, 248, 0.18);
}

.sound-toggle {
  position: fixed;
  top: calc(clamp(16px, 2.4vh, 28px) + env(safe-area-inset-top, 0px));
  right: calc(clamp(18px, 2.2vw, 32px) + env(safe-area-inset-right, 0px));
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0.56;
  transition: opacity 0.35s ease;
  -webkit-tap-highlight-color: transparent;
}

.sound-toggle[hidden] {
  display: none;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  opacity: 0.92;
  outline: none;
}

.sound-toggle[data-state="active"] {
  opacity: 0.76;
}

.sound-toggle[data-state="active"]:hover {
  opacity: 0.96;
}

.sound-bars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 14px;
}

.sound-bars i {
  display: block;
  width: 1.5px;
  height: 3px;
  border-radius: 1px;
  background: rgba(232, 239, 248, 0.88);
  box-shadow: 0 1px 10px rgba(4, 9, 18, 0.72);
  transform-origin: center;
  transition: height 0.14s ease-out, opacity 0.25s ease;
}

.sound-toggle[data-state="muted"] .sound-bars i {
  height: 2px !important;
  opacity: 0.42;
}

.sound-toggle[data-state="locked"] .sound-bars i {
  height: 3.5px;
  opacity: 0.62;
}

.sound-toggle[data-state="locked"] .sound-bars .b2 {
  height: 7px;
}

.sound-toggle[data-state="locked"] .sound-bars .b3 {
  height: 5px;
}

@media (max-aspect-ratio: 4/5) {
  .brand-mark {
    top: calc(22px + env(safe-area-inset-top, 0px));
    left: calc(20px + env(safe-area-inset-left, 0px));
  }

  .wordmark {
    font-size: 13.5px;
    letter-spacing: 0.22em;
  }

  .sound-toggle {
    top: calc(16px + env(safe-area-inset-top, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
  }
}
