.wishka-snowboard-page {
  margin: 0;
  min-height: 100vh;
  background: #140546;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

.wishka-snowboard-game,
.wishka-snowboard-game * {
  box-sizing: border-box;
}

.wishka-snowboard-game {
  --wsg-purple: #652AD4;
  --wsg-deep-purple: #402074;
  --wsg-night: #320972;
  --wsg-abyss: #140546;
  --wsg-gold: #F2D46B;
  --wsg-white: #FFFFFF;
  --wsg-moon: #F5F4FF;
  --wsg-ice: #BFEFFF;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  overscroll-behavior: none;
  padding: max(14px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
  color: var(--wsg-white);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(191,239,255,0.24), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(242,212,107,0.2), transparent 26%),
    linear-gradient(160deg, var(--wsg-night), var(--wsg-abyss));
}

.wishka-snowboard-page.wsg-playing {
  overflow: hidden;
  height: 100vh;
  height: 100svh;
  touch-action: none;
}

.wishka-snowboard-game button {
  font: inherit;
}

.wsg-stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.86) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(191,239,255,0.7) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(242,212,107,0.65) 0 1.2px, transparent 2px);
  background-size: 98px 120px, 150px 150px, 210px 190px;
  background-position: 10px 12px, 70px 54px, 28px 104px;
  opacity: 0.48;
}

.wsg-shell {
  width: min(100%, 520px);
  margin: 0 auto;
}

.wsg-header {
  display: grid;
  gap: 10px;
  padding-bottom: 12px;
}

.wsg-playing .wsg-header {
  display: none;
}

.wsg-kicker,
.wsg-header h1,
.wsg-touch-hint,
.wsg-overlay-card p,
.wsg-overlay-card h2 {
  margin: 0;
}

.wsg-kicker {
  color: rgba(245,244,255,0.76);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.wsg-header h1 {
  font-size: clamp(28px, 8vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

.wsg-score-strip,
.wsg-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wsg-score-strip span,
.wsg-hud span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  color: var(--wsg-moon);
  font-size: 13px;
  font-weight: 900;
}

.wsg-stage {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 26px;
  padding: 10px;
  background: rgba(255,255,255,0.1);
  box-shadow: 0 22px 46px rgba(7,0,35,0.3);
  touch-action: none;
  overscroll-behavior: contain;
}

.wsg-hud {
  padding-bottom: 9px;
}

.wsg-icon-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: var(--wsg-deep-purple);
  background: var(--wsg-gold);
  cursor: pointer;
  font-size: 18px;
  font-weight: 1000;
  box-shadow: 0 10px 22px rgba(242,212,107,0.22);
}

.wsg-mini-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--wsg-deep-purple);
  background: var(--wsg-gold);
  text-decoration: none;
  font-weight: 1000;
  white-space: nowrap;
}

.wsg-icon-btn:focus-visible,
.wsg-mini-link:focus-visible,
.wsg-btn:focus-visible {
  outline: 3px solid rgba(242,212,107,0.95);
  outline-offset: 3px;
}

#wishkaSnowboardCanvas {
  display: block;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 360 / 520;
  margin: 0 auto;
  border-radius: 22px;
  background: #140546;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.wsg-touch-hint {
  padding: 10px 4px 2px;
  color: rgba(245,244,255,0.78);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  font-weight: 800;
}

.wsg-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(20,5,70,0.7);
  backdrop-filter: blur(10px);
}

.wsg-overlay-visible {
  display: grid;
}

.wsg-overlay-card {
  width: min(100%, 430px);
  padding: 22px 18px 18px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 28px;
  color: var(--wsg-white);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(191,239,255,0.2), transparent 42%),
    linear-gradient(160deg, rgba(101,42,212,0.94), rgba(50,9,114,0.96));
  box-shadow: 0 24px 70px rgba(0,0,0,0.38);
}

.wsg-hero-wrap {
  position: relative;
  width: min(52vw, 190px);
  height: min(52vw, 190px);
  margin: 0 auto 4px;
}

.wsg-hero-wrap::after {
  content: "";
  position: absolute;
  left: 17%;
  right: 17%;
  bottom: 9%;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--wsg-gold), #8A58F0 52%, var(--wsg-purple));
  border: 2px solid rgba(255,255,255,0.75);
  transform: rotate(-7deg);
  box-shadow: 0 10px 20px rgba(0,0,0,0.22);
}

.wsg-overlay-card img {
  position: relative;
  z-index: 1;
  width: min(52vw, 190px);
  height: min(52vw, 190px);
  object-fit: contain;
  filter: drop-shadow(0 16px 26px rgba(0,0,0,0.28));
}

.wsg-overlay-tag {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--wsg-deep-purple);
  background: var(--wsg-gold);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wsg-overlay-card h2 {
  margin-top: 12px;
  font-size: clamp(28px, 8vw, 40px);
  line-height: 1.05;
}

.wsg-overlay-card p[data-overlay-text] {
  margin-top: 10px;
  color: rgba(245,244,255,0.88);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 750;
}

.wsg-overlay-score {
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
  color: var(--wsg-deep-purple);
  background: rgba(245,244,255,0.92);
  font-size: 16px;
  font-weight: 900;
}

.wsg-overlay-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.wsg-btn {
  min-height: 52px;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  color: var(--wsg-white);
  background: linear-gradient(135deg, #7D48E8, var(--wsg-purple));
  box-shadow: 0 12px 24px rgba(8,0,34,0.24);
  font-size: 16px;
  font-weight: 1000;
}

.wsg-btn-gold {
  color: var(--wsg-deep-purple);
  background: linear-gradient(135deg, #FFEAA3, var(--wsg-gold));
}

.wsg-btn-ghost {
  border: 1px solid rgba(245,244,255,0.24);
  background: rgba(255,255,255,0.1);
}

.wsg-live-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (min-width: 760px) {
  .wishka-snowboard-game {
    padding-block: 24px;
  }

  .wsg-header {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

@media (max-width: 759px) {
  .wishka-snowboard-game {
    padding: max(10px, env(safe-area-inset-top)) 8px max(10px, env(safe-area-inset-bottom));
  }

  .wsg-shell {
    width: 100%;
  }

  .wsg-playing .wishka-snowboard-game {
    min-height: 100vh;
    min-height: 100svh;
    padding-top: max(6px, env(safe-area-inset-top));
  }

  .wsg-playing .wsg-stage {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: var(--wsg-play-height, calc(100svh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom))));
    min-height: 430px;
    padding: 8px;
    border-radius: 20px;
  }

  .wsg-playing .wsg-hud {
    padding-bottom: 6px;
  }

  .wsg-playing .wsg-hud span {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .wsg-playing .wsg-icon-btn {
    width: 38px;
    height: 38px;
  }

  .wsg-playing #wishkaSnowboardCanvas {
    width: min(100%, calc((var(--wsg-play-height, 100svh) - 96px) * 0.6923));
    max-width: 100%;
    align-self: center;
  }

  .wsg-playing .wsg-touch-hint {
    padding-top: 6px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wsg-overlay {
    backdrop-filter: none;
  }
}
