html {
  background: var(--tg-theme-secondary-bg-color, var(--cream));
  overflow-x: hidden;
}

body {
  min-height: var(--tg-viewport-stable-height, 100dvh);
  overflow-x: hidden;
  touch-action: manipulation;
}

.app-shell {
  min-height: var(--tg-viewport-stable-height, 100dvh);
  padding-top: max(env(safe-area-inset-top, 0px), var(--tg-content-safe-area-inset-top, 0px));
  padding-right: max(env(safe-area-inset-right, 0px), var(--tg-content-safe-area-inset-right, 0px));
  padding-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px));
  padding-left: max(env(safe-area-inset-left, 0px), var(--tg-content-safe-area-inset-left, 0px));
}

.wheel-stage {
  max-width: 100%;
}

.hub-button,
.retry-button,
.how-button,
.dialog-close,
.promo-row button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.how-button {
  min-height: 44px;
}

.dialog-close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
}

.promo-row button {
  min-width: 44px;
  min-height: 44px;
}

.game-status {
  min-height: 22px;
  margin: 12px auto 0;
  max-width: 360px;
  color: #8f5744;
  font-size: 14px;
  line-height: 1.4;
}

.retry-button {
  min-height: 44px;
  margin: 10px auto 0;
  padding: 10px 20px;
  border: 1px solid #ad664e;
  border-radius: 99px;
  background: #fff5ed;
  color: #7d4837;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.retry-button:focus-visible,
.how-button:focus-visible,
.dialog-close:focus-visible,
.promo-row button:focus-visible {
  outline: 3px solid #2aabee;
  outline-offset: 3px;
}

.redemption-note {
  margin: 22px 0 0 !important;
  color: #795c4b;
  line-height: 1.45;
}

body[data-ui-state="loading"] .wheel-static-button,
body[data-ui-state="error"] .wheel-static-button,
body[data-ui-state="retryable-error"] .wheel-static-button,
body[data-ui-state="preview"] .wheel-static-button,
body[data-ui-state="spinning"] .wheel-static-button,
body[data-ui-state="animating"] .wheel-static-button {
  filter: grayscale(.25);
  opacity: .65;
}

.rules-dialog {
  max-height: min(86dvh, 760px);
}

@media (max-width: 390px) {
  .game-status { font-size: 13px; }
  .rules-consent { margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .wheel-stage > .wheel {
    transition-duration: .01ms !important;
  }

  .balloons-fly .balloon-left,
  .balloons-fly .balloon-right {
    animation: none !important;
  }
}
