html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  color: #f4f7f2;
  color-scheme: light;
  font-family: "Segoe UI", "Source Sans 3", sans-serif;
}

body {
  overflow: hidden;
}

.stage {
  width: 100%;
  height: 100%;
  display: flex;
  padding: 4vh 4vw;
  box-sizing: border-box;
}

.stage.top { align-items: flex-start; }
.stage.middle { align-items: center; }
.stage.bottom { align-items: flex-end; }
.stage.left { justify-content: flex-start; text-align: left; }
.stage.center { justify-content: center; text-align: center; }
.stage.right { justify-content: flex-end; text-align: right; }

.block {
  max-width: 100%;
}

.label,
.sub {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: calc(var(--scale, 1) * 2.4vw);
  text-shadow: var(--shade, none);
}

.time,
.headline {
  margin: 0.1em 0;
  font-weight: 700;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  font-size: calc(var(--scale, 1) * 11vw);
  letter-spacing: -0.03em;
  text-shadow: var(--shade, none);
}

.sub {
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: calc(var(--scale, 1) * 2.2vw);
  font-weight: 600;
}

.goal {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6vh;
  padding: 2vh 2vw;
  box-sizing: border-box;
}

.goal-top,
.goal-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  font-size: calc(var(--scale, 1) * clamp(16px, 16vh, 42px));
  text-shadow: var(--shade, none);
}

.track {
  height: 42%;
  min-height: 18px;
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
  border: 2px solid var(--accent, #d6f25c);
}

.track.rounded {
  border-radius: 999px;
}

.fill {
  height: 100%;
  width: 0;
  background: var(--accent, #d6f25c);
  transform-origin: left center;
}

.lower {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  min-height: 28%;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

.lower-accent {
  width: 1.1vw;
  min-width: 8px;
  background: var(--accent, #d6f25c);
}

.lower-copy {
  background: rgba(10, 14, 12, 0.82);
  padding: 1.4vh 1.6vw;
  min-width: min(70vw, 920px);
}

.lower-copy h1,
.lower-copy p {
  margin: 0;
}

.lower-copy h1 {
  font-size: calc(var(--scale, 1) * clamp(22px, 18vh, 56px));
}

.lower-copy p {
  font-size: calc(var(--scale, 1) * clamp(16px, 12vh, 32px));
  opacity: 0.92;
}

.ticker {
  width: 100%;
  overflow: hidden;
  background: rgba(10, 14, 12, 0.82);
  border-top: 4px solid var(--accent, #d6f25c);
  border-bottom: 4px solid var(--accent, #d6f25c);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker var(--duration, 18s) linear infinite;
}

.ticker-item {
  padding: 1.6vh 3vw;
  font-size: calc(var(--scale, 1) * clamp(18px, 22vh, 48px));
  font-weight: 700;
  white-space: nowrap;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.safe {
  position: relative;
  width: 100%;
  height: 100%;
}

.zone {
  position: absolute;
  border: 2px dashed rgba(255, 255, 255, 0.9);
  box-sizing: border-box;
}

.zone span {
  position: absolute;
  left: 0.4rem;
  top: 0.4rem;
  background: rgba(10, 14, 12, 0.82);
  color: #f4f7f2;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.wheel-stage {
  position: relative;
  width: min(86vmin, 920px);
  height: min(86vmin, 920px);
  margin: 0 auto;
}

.wheel-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  transform: rotate(var(--rotation, 0deg));
  transition: transform 4.6s cubic-bezier(0.12, 0.7, 0.12, 1);
}

.wheel-stage canvas.instant {
  transition: none;
}

.pointer {
  position: absolute;
  left: 50%;
  top: -2%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 28px solid #f4f7f2;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6));
  z-index: 2;
}

.winner {
  margin: 1vh 0 0;
  text-align: center;
  font-size: calc(var(--scale, 1) * 5vh);
  font-weight: 800;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
  }

  .wheel-stage canvas {
    transition: none;
  }
}
