@font-face {
  font-family: "icomoon";
  font-display: swap;
  src: url("https://imgotp.viva88athenae.com//icomoon/fonts/icomoon.ttf?1776321321")
    format("truetype");
  font-weight: 400;
  font-style: normal;
}

:root {
  --font-main:
    "Figtree", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif;
  --font-display: "Oswald", "Figtree", ui-sans-serif, system-ui, sans-serif;

  --bg: #02050a; /* overridden by detailed body background for casino theme */
  --panel: #081120;
  --panel-2: #0b1729;
  --gold-1: #fff8cf;
  --gold-2: #ffdc5f;
  --gold-3: #db981d;
  --gold-4: #6f3d06;
  --line: rgba(255, 221, 104, 0.78);
  --shadow-soft: rgba(0, 0, 0, 0.18);
  --shadow-deep: rgba(0, 0, 0, 0.28);
  --ring-edge: rgba(255, 255, 255, 0.15);
  --metal-outline: rgba(21, 29, 44, 0.84);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);

  --app-w: 100vw;
  --app-h: 100dvh;
  --stage-x: clamp(10px, 3vw, 24px);
  --stage-y: clamp(8px, 1.8dvh, 20px);
  --layout-gap: clamp(10px, 1.2dvh, 16px);
  --usable-h: calc(
    var(--app-h) - var(--safe-top) - var(--safe-bottom) - (var(--stage-y) * 2)
  );

  --plate-w: clamp(190px, min(48vw, 28dvh), 330px);
  --plate-h: calc(var(--plate-w) * 0.42);
  --ring-size: clamp(14px, min(2.75vw, 2.95dvh), 27px);
  --pointer-overflow: clamp(34px, 6.4dvh, 58px);

  --coupon-panel-h: clamp(48px, 6.2dvh, 62px);
  --coupon-gap: clamp(9px, 1.05dvh, 14px);
  --wheel-outer-max-w: calc(var(--app-w) - (var(--stage-x) * 2) - 8px);
  --wheel-outer-slot-h: calc(
    var(--usable-h) - var(--coupon-panel-h) - var(--coupon-gap) -
      var(--pointer-overflow)
  );
  --wheel-outer-size: clamp(
    220px,
    min(var(--wheel-outer-max-w), var(--wheel-outer-slot-h)),
    604px
  );
  --wheel-size: calc(var(--wheel-outer-size) - (var(--ring-size) * 2));
  --coupon-panel-w: min(calc(var(--wheel-outer-size) * 0.98), 456px);

  --toast-edge: clamp(8px, 1.05vw, 22px);
  --toast-w-fluid: clamp(286px, 22vw, 328px);
  --toast-radius-fluid: clamp(12px, 0.75vw, 16px);
  --toast-pad-y-fluid: clamp(10px, 0.62vw, 13px);
  --toast-pad-x-fluid: clamp(14px, 0.86vw, 18px);
  --toast-title-fluid: clamp(11px, 0.76vw, 13.6px);
  --toast-message-fluid: clamp(8.6px, 0.62vw, 11.6px);
  --toast-button-h-fluid: clamp(28px, 1.75vw, 36px);
  --toast-button-font-fluid: clamp(8.7px, 0.62vw, 11.2px);
  --toast-action-gap-fluid: clamp(7px, 0.5vw, 10px);

  --fx-glow-y: clamp(3px, 0.42vw, 8px);
  --fx-glow-blur: clamp(8px, 1vw, 18px);
  --fx-glow-gold-soft: rgba(255, 193, 7, 0.24);
  --fx-glow-gold-mid: rgba(255, 215, 0, 0.14);
  --fx-edge-gold: rgba(255, 211, 102, 0.62);
  --fx-shine-alpha: 0.44;
  --fx-shine-speed: 2.65s;
  --fx-glow-speed: 2.3s;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: #fff;
  font-family: var(--font-main);
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: var(--app-h);
  background:
    /* Rich deep casino navy-black base */
    linear-gradient(180deg, #0a0c14 0%, #02050a 48%, #010307 100%),
    /* Premium centered gold glow focused on wheel */
    radial-gradient(
      circle at 50% 42%,
      rgba(255, 215, 0, 0.13) 0%,
      rgba(255, 193, 7, 0.07) 16%,
      rgba(212, 160, 23, 0.03) 28%,
      transparent 46%
    ),
    /* Subtle blue depth accent */
    radial-gradient(
      circle at 50% 26%,
      rgba(35, 68, 135, 0.07),
      transparent 40%
    ),
    /* Fine premium texture (casino carpet / silk feel) */
    repeating-linear-gradient(
      142deg,
      rgba(255, 255, 255, 0.005) 0px,
      rgba(255, 255, 255, 0.005) 1px,
      transparent 2px,
      transparent 6px
    ) !important;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.stage {
  position: fixed;
  inset: 0;
  width: var(--app-w);
  height: var(--app-h);
  min-height: var(--app-h);
  display: grid;
  place-items: center;
  padding: calc(var(--safe-top) + var(--stage-y)) var(--stage-x)
    calc(var(--safe-bottom) + var(--stage-y));
  overflow: clip;
  isolation: isolate;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    /* Dark vignette for focus on wheel */
    radial-gradient(
      circle at 50% 48%,
      transparent 52%,
      rgba(0, 0, 0, 0.38) 78%,
      rgba(0, 0, 0, 0.68) 100%
    ),
    /* Subtle top luxury gold line / frame glow */
    linear-gradient(
      180deg,
      rgba(255, 215, 0, 0.06) 0%,
      transparent 9%,
      transparent 100%
    ),
    /* Soft center gold rim light */
    radial-gradient(
      circle at 50% 42%,
      rgba(255, 215, 0, 0.04) 0%,
      transparent 38%
    );
  opacity: 0.65;
}

.art-board {
  position: relative;
  width: min(100%, 1120px);
  height: var(--usable-h);
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: visible;
  transform: translate3d(0, 0, 0);
  contain: layout paint style;
  transition:
    opacity 0.2s ease,
    filter 0.22s ease;
}

.layout-shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  align-content: center;
  gap: var(--layout-gap);
}

.wheel-panel {
  width: min(100%, calc(var(--wheel-outer-size) + 32px));
  height: auto;
  max-height: var(--usable-h);
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  place-items: center;
  align-content: center;
  gap: var(--coupon-gap);
  margin: 0 auto;
  padding: 0;
  overflow: visible;
  transform: translate3d(0, calc(var(--pointer-overflow) * 0.22), 0);
  contain: layout style;
}

.stage.modal-open .art-board {
  opacity: 0.76;
  filter: blur(1.15px) saturate(0.99);
}

.brand-plate {
  display: none;
  position: relative;
  width: var(--plate-w);
  height: var(--plate-h);
  z-index: 30;
  place-items: center;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.brand-fallback-mark {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.6vw, 14px);
  padding: clamp(10px, 2.2vw, 18px);
  border: 1px solid rgba(255, 220, 95, 0.34);
  border-radius: clamp(16px, 3vw, 28px);
  background:
    linear-gradient(135deg, rgba(16, 31, 55, 0.92), rgba(7, 14, 26, 0.92)),
    radial-gradient(
      circle at 25% 20%,
      rgba(255, 220, 95, 0.18),
      transparent 46%
    );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-plate.is-empty .brand-logo {
  display: none;
}

.brand-plate.is-empty .brand-fallback-mark {
  display: flex;
}

.fallback-cube,
.win-cube {
  position: relative;
  width: clamp(34px, 7vw, 48px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  border-radius: 11px;
  background: linear-gradient(
    135deg,
    #ffe16b 0 34%,
    #20bfff 35% 62%,
    #f6f7fb 63% 100%
  );
  box-shadow: inset 0 -8px 12px rgba(0, 0, 0, 0.22);
  transform: rotate(45deg) scale(0.86);
}

.fallback-cube::after,
.win-cube::after {
  content: "";
  position: absolute;
  inset: 29%;
  border-radius: 4px;
  background: rgba(4, 9, 18, 0.72);
}

.fallback-brand-text,
.win-brand-copy {
  display: grid;
  font-family: var(--font-display);
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fallback-brand-text strong,
.win-brand-copy strong {
  color: #f8c431;
  font-size: clamp(23px, 5.2vw, 38px);
  font-weight: 950;
}

.fallback-brand-text span,
.win-brand-copy span {
  margin-top: 0.18em;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(12px, 2.8vw, 20px);
  font-weight: 900;
}

.wheel-stack {
  position: relative;
  z-index: 5;
  width: var(--wheel-outer-size);
  min-width: var(--wheel-outer-size);
  max-width: var(--wheel-outer-size);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: var(--ring-size);
  margin: 0 auto;
  overflow: visible;
  transform: translate3d(0, 0, 0);
  contain: layout paint style;
}

.wheel-metal {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 50% 50%,
      transparent 0 61.2%,
      rgba(255, 255, 255, 0.76) 61.8%,
      rgba(188, 199, 218, 0.96) 64.8%,
      rgba(73, 84, 104, 0.92) 68.5%,
      rgba(17, 24, 38, 0.98) 72.4%,
      rgba(4, 8, 16, 0.98) 77.5%,
      rgba(28, 37, 55, 0.98) 82.8%,
      rgba(210, 220, 236, 0.96) 86.2%,
      rgba(49, 59, 78, 0.98) 90.2%,
      rgba(6, 10, 19, 0.98) 96.2%,
      rgba(255, 255, 255, 0.72) 98.6%,
      rgba(18, 24, 36, 1) 100%
    ),
    conic-gradient(
      from 8deg,
      #f8fbff 0deg,
      #bac6d8 20deg,
      #3a4558 45deg,
      #0a1020 67deg,
      #202b3f 87deg,
      #edf4ff 111deg,
      #6d7b91 140deg,
      #101827 168deg,
      #fff 205deg,
      #8796ad 235deg,
      #1a2436 267deg,
      #f5f9ff 296deg,
      #48566f 329deg,
      #fbfdff 360deg
    );
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.68),
    inset 0 -8px 10px rgba(1, 5, 13, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 0 3px rgba(10, 16, 28, 0.94);
}

.wheel-metal::before,
.wheel-metal::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
}

.wheel-metal::before {
  inset: clamp(5px, 0.95vw, 9px);
  background:
    radial-gradient(
      circle at 50% 50%,
      transparent 0 59%,
      rgba(247, 251, 255, 0.64) 60.4%,
      rgba(176, 188, 208, 0.36) 63.2%,
      transparent 66.4%,
      transparent 73.6%,
      rgba(0, 5, 14, 0.62) 75.2%,
      rgba(255, 255, 255, 0.26) 77.1%,
      transparent 80.6%
    ),
    conic-gradient(
      from -18deg,
      rgba(255, 255, 255, 0.6) 0deg,
      rgba(91, 103, 123, 0.18) 31deg,
      rgba(255, 255, 255, 0.46) 62deg,
      rgba(24, 32, 48, 0.34) 96deg,
      rgba(255, 255, 255, 0.54) 132deg,
      rgba(66, 78, 98, 0.24) 179deg,
      rgba(255, 255, 255, 0.5) 226deg,
      rgba(17, 25, 40, 0.36) 280deg,
      rgba(255, 255, 255, 0.58) 360deg
    );
  opacity: 0.52;
  mix-blend-mode: screen;
}

.wheel-metal::after {
  inset: clamp(14px, 2.7vw, 25px);
  border: clamp(2px, 0.45vw, 4px) solid rgba(237, 244, 255, 0.84);
  background:
    radial-gradient(
      circle at 50% 50%,
      transparent 72%,
      rgba(255, 255, 255, 0.38) 75%,
      rgba(117, 132, 154, 0.24) 81%,
      transparent 84%
    ),
    conic-gradient(
      from 20deg,
      rgba(255, 255, 255, 0.72),
      rgba(86, 99, 122, 0.36),
      rgba(255, 255, 255, 0.58),
      rgba(33, 43, 61, 0.38),
      rgba(255, 255, 255, 0.72)
    );
  box-shadow:
    inset 0 0 0 1px rgba(7, 14, 28, 0.84),
    inset 0 2px 4px rgba(255, 255, 255, 0.34),
    inset 0 -4px 6px rgba(7, 11, 20, 0.3),
    0 0 0 1px rgba(0, 0, 0, 0.5);
  opacity: 0.94;
}

.wheel-canvas {
  position: relative;
  z-index: 2;
  display: block;
  width: var(--wheel-size);
  height: var(--wheel-size);
  border-radius: 50%;
  background: transparent;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 6px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(2, 7, 18, 0.88),
    0 0 0 clamp(2px, 0.42vw, 4px) rgba(225, 234, 250, 0.13);
  transform: translateZ(0) rotate(0rad);
  transform-origin: 50% 50%;
  will-change: transform;
  backface-visibility: hidden;
  contain: strict;
}

.wheel-gloss {
  position: absolute;
  z-index: 3;
  width: var(--wheel-size);
  height: var(--wheel-size);
  border-radius: 50%;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06) 0%,
    transparent 30%,
    transparent 74%,
    rgba(0, 0, 0, 0.09) 100%
  );
  opacity: 0.16;
}

.pointer {
  --pointer-w: clamp(31px, calc(var(--wheel-outer-size) * 0.096), 58px);
  --pointer-h: clamp(43px, calc(var(--wheel-outer-size) * 0.126), 76px);
  --pointer-lift: clamp(40px, calc(var(--wheel-outer-size) * 0.112), 68px);
  --pointer-drop: 35px;
  --pointer-wing: clamp(10px, calc(var(--wheel-outer-size) * 0.032), 20px);
  --pointer-tip: clamp(25px, calc(var(--wheel-outer-size) * 0.074), 45px);
  position: absolute;
  left: 50%;
  top: var(
    --pointer-lock-top,
    calc(var(--ring-size) - var(--pointer-lift) + var(--pointer-drop))
  );
  z-index: 13;
  width: var(--pointer-w);
  height: var(--pointer-h);
  pointer-events: none;
  transform: translate3d(-50%, 0, 0);
  transform-origin: 50% calc(27% + var(--pointer-tip));
  transform-box: border-box;
  will-change: transform;
  backface-visibility: hidden;
  contain: layout paint style;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.22));
}

.pointer::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 50%;
  width: 74%;
  height: 43%;
  border-radius: 8px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: linear-gradient(
    135deg,
    #fffad7 0%,
    #ffd33c 43%,
    #d89013 72%,
    #5f3305 100%
  );
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.66),
    inset 0 -4px 6px rgba(79, 38, 0, 0.28);
  transform: translateX(-50%) rotate(45deg);
}

.pointer::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 27%;
  width: 0;
  height: 0;
  border-left: var(--pointer-wing) solid transparent;
  border-right: var(--pointer-wing) solid transparent;
  border-top: var(--pointer-tip) solid #f2ad1e;
  transform: translateX(-50%);
}

.spin-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 14;
  width: clamp(68px, calc(var(--wheel-size) * 0.225), 122px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(132, 76, 5, 0.72);
  border-radius: 50%;
  color: #763707;
  cursor: pointer;
  font-family: inherit;
  font-synthesis: none;
  background: radial-gradient(
    circle at 50% 38%,
    #fff2a6 0%,
    #ffe06a 36%,
    #efb934 63%,
    #c88912 100%
  );
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.56),
    inset 0 -5px 7px rgba(114, 61, 3, 0.22),
    0 4px 6px rgba(0, 0, 0, 0.16),
    0 0 0 3px rgba(171, 104, 7, 0.64);
  transform: translate3d(-50%, -50%, 0);
  transition:
    transform 0.14s ease,
    filter 0.14s ease;
  will-change: transform;
  overflow: hidden;
  isolation: isolate;
}

.spin-btn::before {
  content: "";
  position: absolute;
  inset: clamp(5px, 1.1vw, 8px);
  border: 1px solid rgba(255, 247, 180, 0.34);
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 50% 28%,
      rgba(255, 255, 255, 0.7) 0%,
      rgba(255, 245, 174, 0.48) 22%,
      rgba(255, 216, 78, 0.08) 54%,
      transparent 72%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.14),
      rgba(255, 255, 255, 0) 46%,
      rgba(120, 62, 0, 0.1) 100%
    );
}

.spin-btn:active {
  transform: translate3d(-50%, -50%, 0) scale(0.965);
}

.spin-btn:disabled {
  cursor: not-allowed;
  filter: saturate(0.9) brightness(0.94);
}

.spin-btn .spin-copy {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  height: 100%;
  padding: 0 8%;
  color: #793907;
  font-family: var(--font-display);
  font-size: clamp(12px, calc(var(--wheel-size) * 0.041), 22px);
  font-weight: 950;
  font-kerning: none;
  line-height: 1;
  letter-spacing: 0.006em;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 239, 159, 0.38);
  white-space: nowrap;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
}

.spin-btn .spin-word {
  display: block;
  width: 100%;
  line-height: 0.92;
  text-align: center;
}

.spin-btn small {
  display: block;
  width: 100%;
  margin-top: clamp(4px, calc(var(--wheel-size) * 0.018), 8px);
  color: #8a4307;
  font-family: var(--font-main);
  font-size: clamp(7.5px, calc(var(--wheel-size) * 0.021), 11px);
  font-weight: 850;
  font-kerning: none;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0.005em;
  text-align: center;
  text-shadow: none;
  white-space: nowrap;
}

.spin-btn small b,
#chanceText {
  display: inline-block;
  min-width: 1ch;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.spinwheel-badge {
  position: absolute;
  top: clamp(2px, calc(var(--wheel-size) * 0.012), 5px);
  right: clamp(2px, calc(var(--wheel-size) * 0.012), 5px);
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(16px, calc(var(--wheel-size) * 0.044), 22px);
  height: clamp(16px, calc(var(--wheel-size) * 0.044), 22px);
  padding: 2px 5px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #fff;
  font-family: var(--font-main);
  font-size: clamp(8px, calc(var(--wheel-size) * 0.02), 10px);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.035em;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 35% 20%,
      rgba(255, 255, 255, 0.48),
      transparent 38%
    ),
    linear-gradient(135deg, #ff4d4d 0%, #e30024 48%, #8f0013 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 4px 10px rgba(255, 0, 32, 0.28),
    0 0 14px rgba(255, 32, 64, 0.24);
  transform: translate3d(0, 0, 0);
}

.spinwheel-badge[hidden] {
  display: none;
}

/* Coupon input: frontend only submits code to Worker KV. Generator/list UI is intentionally removed. */
.coupon-panel {
  position: relative;
  z-index: 18;
  width: min(
    var(--coupon-panel-w),
    calc(var(--app-w) - (var(--stage-x) * 2) - 8px)
  );
  height: var(--coupon-panel-h);
  min-height: var(--coupon-panel-h);
  max-height: var(--coupon-panel-h);
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  justify-self: center;
  align-self: start;
  padding: clamp(7px, calc(var(--coupon-panel-h) * 0.14), 10px);
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: var(--toast-radius-fluid);
  color: rgba(255, 255, 255, 0.96);
  background:
    linear-gradient(
      180deg,
      rgba(14, 19, 31, 0.965) 0%,
      rgba(8, 12, 21, 0.955) 100%
    ),
    radial-gradient(circle at 0% 0%, rgba(255, 211, 77, 0.12), transparent 42%);
  -webkit-backdrop-filter: blur(clamp(8px, 0.72vw, 14px)) saturate(1.03);
  backdrop-filter: blur(clamp(8px, 0.72vw, 14px)) saturate(1.03);
  box-shadow:
    0 var(--fx-glow-y) var(--fx-glow-blur) rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  overflow: hidden;
  isolation: isolate;
  contain: paint style;
}

.coupon-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 58%),
    linear-gradient(
      112deg,
      transparent 20%,
      rgba(255, 255, 255, 0.028) 44%,
      transparent 70%
    );
  opacity: 0.62;
}

.coupon-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  min-height: 0;
}

.coupon-input {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 999px;
  outline: none;
  padding-inline: clamp(14px, calc(var(--coupon-panel-w) * 0.042), 20px);
  color: rgba(255, 255, 255, 0.94);
  font-family: var(--font-main);
  font-size: clamp(10px, calc(var(--coupon-panel-w) * 0.028), 13px);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: center;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coupon-input::placeholder {
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.045em;
}

.coupon-input:focus {
  border-color: rgba(255, 211, 102, 0.5);
  background: rgba(255, 255, 255, 0.052);
  box-shadow:
    0 0 0 1px rgba(255, 211, 102, 0.08),
    0 0 18px rgba(255, 215, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.coupon-input.is-loading {
  cursor: progress;
  opacity: 0.78;
}

.toast-host {
  position: fixed;
  left: calc(var(--safe-left) + var(--toast-edge));
  top: calc(var(--safe-top) + var(--toast-edge));
  z-index: 180;
  display: grid;
  justify-items: start;
  gap: clamp(6px, 0.48vw, 10px);
  width: min(
    var(--toast-w-fluid),
    calc(var(--app-w) - var(--safe-left) - (var(--toast-edge) * 2))
  );
  max-width: min(
    var(--toast-w-fluid),
    calc(var(--app-w) - var(--safe-left) - (var(--toast-edge) * 2))
  );
  pointer-events: none;
}

.app-toast {
  position: relative;
  display: grid;
  align-content: center;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  padding: var(--toast-pad-y-fluid) var(--toast-pad-x-fluid)
    var(--toast-pad-y-fluid) calc(var(--toast-pad-x-fluid) + 3px);
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: var(--toast-radius-fluid);
  color: rgba(255, 255, 255, 0.96);
  text-decoration: none;
  cursor: default;
  pointer-events: auto;
  background:
    linear-gradient(
      180deg,
      rgba(14, 19, 31, 0.965) 0%,
      rgba(8, 12, 21, 0.955) 100%
    ),
    radial-gradient(circle at 0% 0%, rgba(255, 211, 77, 0.12), transparent 42%);
  -webkit-backdrop-filter: blur(clamp(8px, 0.72vw, 14px)) saturate(1.03);
  backdrop-filter: blur(clamp(8px, 0.72vw, 14px)) saturate(1.03);
  box-shadow:
    0 var(--fx-glow-y) var(--fx-glow-blur) rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  opacity: 0;
  overflow: hidden;
  isolation: isolate;
  contain: paint style;
  transform: translate3d(-10px, -10px, 0) scale(0.985);
  transition:
    opacity 0.24s ease,
    transform 0.28s cubic-bezier(0.18, 0.82, 0.22, 1),
    filter 0.22s ease;
  will-change: opacity, transform;
}

.app-toast.show {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.app-toast::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--toast-pad-y-fluid);
  bottom: var(--toast-pad-y-fluid);
  width: clamp(2px, 0.16vw, 3px);
  border-radius: 999px;
  background: #5d9eff;
  box-shadow: 0 0 14px rgba(93, 158, 255, 0.28);
}

.app-toast::after,
.win-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 58%),
    linear-gradient(
      112deg,
      transparent 20%,
      rgba(255, 255, 255, 0.028) 44%,
      transparent 70%
    );
  opacity: 0.62;
}

.app-toast.toast-success::before,
.app-toast.is-coupon-success::before,
.app-toast.is-welcome::before {
  background: linear-gradient(180deg, #fff4b0 0%, #ffd84f 42%, #d89514 100%);
  box-shadow:
    0 0 16px rgba(255, 215, 0, 0.34),
    0 0 28px rgba(255, 193, 7, 0.16);
}

.app-toast.toast-error::before,
.app-toast.is-empty::before {
  background: #ff5b5b;
  box-shadow: 0 0 14px rgba(255, 91, 91, 0.28);
}

.app-toast strong,
.app-toast span,
.app-toast-actions {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.app-toast strong {
  color: rgba(255, 255, 255, 0.985);
  font-family: var(--font-main);
  font-size: var(--toast-title-fluid);
  font-weight: 950;
  line-height: 1.16;
  letter-spacing: -0.012em;
  white-space: normal;
}

.app-toast span {
  margin-top: clamp(1px, 0.15vw, 3px);
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-main);
  font-size: var(--toast-message-fluid);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.006em;
}

.app-toast-actions {
  display: flex;
  width: 100%;
  margin-top: var(--toast-action-gap-fluid);
}

.app-toast-button,
.toast-action-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--toast-button-h-fluid);
  min-height: var(--toast-button-h-fluid);
  border: 1px solid var(--fx-edge-gold);
  border-radius: 999px;
  padding: 0 clamp(12px, 0.9vw, 19px);
  color: #5b3b00;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: var(--toast-button-font-fluid);
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.045em;
  white-space: nowrap;
  background: linear-gradient(
    135deg,
    #ffd400 0%,
    #ffb800 35%,
    #ffdf66 50%,
    #ffb800 65%,
    #ffd400 100%
  );
  background-size: 180% 180%;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 3px 9px var(--fx-glow-gold-soft),
    0 0 12px var(--fx-glow-gold-mid);
  overflow: hidden;
  isolation: isolate;
  contain: paint style;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition:
    transform 0.16s ease,
    filter 0.18s ease,
    box-shadow 0.18s ease;
  animation:
    toastCasinoGlow var(--fx-glow-speed) ease-in-out infinite,
    toastCasinoShine var(--fx-shine-speed) linear infinite;
  will-change: background-position, box-shadow;
}

.app-toast-button::before,
.toast-action-btn::before {
  content: "";
  position: absolute;
  top: -38%;
  left: 0;
  width: 26%;
  height: 176%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.16) 32%,
    rgba(255, 255, 255, 0.62) 50%,
    rgba(255, 255, 255, 0.16) 68%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-145%, 0, 0) rotate(18deg);
  animation: toastCasinoSweep var(--fx-shine-speed)
    cubic-bezier(0.32, 0.02, 0.28, 1) infinite;
  will-change: transform, opacity;
}

.app-toast-button::after,
.toast-action-btn::after {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(255, 249, 220, 0.24);
  border-radius: inherit;
  opacity: 0.58;
  pointer-events: none;
}

.app-toast-button:hover,
.toast-action-btn:hover {
  transform: translateY(-1px) translateZ(0);
  filter: brightness(1.015);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.13) inset,
    0 4px 11px rgba(255, 193, 7, 0.3),
    0 0 14px rgba(255, 215, 0, 0.18);
}

.app-toast-button:active,
.toast-action-btn:active {
  transform: scale(0.976);
  filter: brightness(0.985);
}

.win-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: calc(var(--safe-top) + 16px) 14px calc(var(--safe-bottom) + 16px);
  background: transparent;
  opacity: 0;
  pointer-events: none;
  isolation: isolate;
  transition: opacity 0.22s ease;
}

.win-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  pointer-events: none;
  -webkit-backdrop-filter: blur(3px) saturate(1.01);
  backdrop-filter: blur(3px) saturate(1.01);
  transition: opacity 0.24s ease;
}

.win-overlay[hidden] {
  display: none;
}

.win-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.win-overlay.show::before {
  opacity: 1;
}

.win-card {
  position: relative;
  z-index: 1;
  width: min(calc(var(--app-w) - 24px), 388px);
  max-width: 100%;
  max-height: min(56dvh, 244px);
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: var(--toast-radius-fluid);
  color: rgba(255, 255, 255, 0.96);
  background:
    linear-gradient(
      180deg,
      rgba(14, 19, 31, 0.965) 0%,
      rgba(8, 12, 21, 0.955) 100%
    ),
    radial-gradient(circle at 0% 0%, rgba(255, 211, 77, 0.12), transparent 42%);
  -webkit-backdrop-filter: blur(clamp(8px, 0.72vw, 14px)) saturate(1.03);
  backdrop-filter: blur(clamp(8px, 0.72vw, 14px)) saturate(1.03);
  box-shadow:
    0 var(--fx-glow-y) var(--fx-glow-blur) rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  overflow: hidden;
  isolation: isolate;
  contain: paint style;
  opacity: 1;
  transform: translate3d(0, 12px, 0) scale(0.985);
  transition:
    transform 0.26s cubic-bezier(0.2, 0.82, 0.22, 1),
    opacity 0.22s ease;
}

.win-overlay.show .win-card {
  transform: translate3d(0, 0, 0) scale(1);
}

.win-card::before {
  content: none;
}

.win-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: var(--toast-pad-y-fluid) var(--toast-pad-x-fluid) 0
    calc(var(--toast-pad-x-fluid) + 6px);
}

.win-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-main);
  font-size: clamp(9.4px, 0.76vw, 11.4px);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.win-close {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: clamp(28px, 2vw, 32px);
  min-width: clamp(28px, 2vw, 32px);
  height: clamp(28px, 2vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0;
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  font-size: clamp(11px, 0.82vw, 13px);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition:
    transform 0.14s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.win-body {
  position: relative;
  z-index: 2;
  padding: 4px var(--toast-pad-x-fluid) var(--toast-pad-y-fluid)
    calc(var(--toast-pad-x-fluid) + 6px);
  text-align: center;
}

.win-title {
  margin: 2px 0 8px;
  color: rgba(255, 255, 255, 0.985);
  font-family: var(--font-main);
  font-size: clamp(13px, 1.08vw, 16px);
  font-weight: 950;
  line-height: 1.22;
  letter-spacing: -0.012em;
}

.win-divider {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 8px;
  margin: 0 auto 10px;
}

.win-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  opacity: 0.72;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 24%,
    rgba(255, 216, 79, 0.18) 50%,
    rgba(255, 255, 255, 0.1) 76%,
    transparent 100%
  );
}

.win-divider span {
  display: none;
}

.win-prize {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  min-width: min(100%, 220px);
  max-width: 100%;
  margin: 0 auto 12px;
  padding: 2px 10px 4px;
  color: #f2ca52;
  font-family: var(--font-main);
  font-size: clamp(30px, 5.1vw, 38px);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1.08;
  letter-spacing: -0.03em;
  white-space: nowrap;
  text-overflow: clip;
  text-shadow: 0 0 16px rgba(255, 215, 0, 0.12);
  overflow: visible;
}

.win-action {
  width: 100%;
  min-height: 28px;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition:
    transform 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease;
}

.win-action::before,
.win-action::after {
  content: none;
}

.win-action:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.win-close:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  transform: scale(1.03);
}

.win-action:active,
.win-close:active {
  transform: scale(0.975);
}

.confetti {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.confetti i {
  position: absolute;
  width: 9px;
  height: 15px;
  border-radius: 2px;
  opacity: 0.82;
  background: #ffd459;
  transform: rotate(28deg);
}

.confetti i:nth-child(1) {
  left: 12%;
  top: 22%;
  background: #20bfff;
  transform: rotate(-28deg);
}
.confetti i:nth-child(2) {
  left: 86%;
  top: 25%;
  width: 7px;
  height: 13px;
}
.confetti i:nth-child(3) {
  left: 76%;
  top: 64%;
  background: #ffcf46;
  transform: rotate(44deg);
}
.confetti i:nth-child(4) {
  left: 19%;
  top: 70%;
  background: #1a75ff;
  width: 7px;
  height: 12px;
}
.confetti i:nth-child(5) {
  left: 89%;
  top: 76%;
  background: #c8922d;
  width: 8px;
  height: 15px;
}
.confetti i:nth-child(6) {
  left: 7%;
  top: 50%;
  background: #d79c32;
  width: 7px;
  height: 12px;
}

@keyframes toastCasinoGlow {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.11) inset,
      0 3px 9px rgba(255, 193, 7, 0.22),
      0 0 10px rgba(255, 215, 0, 0.12);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.14) inset,
      0 4px 12px rgba(255, 193, 7, 0.3),
      0 0 15px rgba(255, 215, 0, 0.18);
  }
}

@keyframes toastCasinoShine {
  0% {
    background-position: 14% 50%;
  }
  50% {
    background-position: 86% 50%;
  }
  100% {
    background-position: 14% 50%;
  }
}

@keyframes toastCasinoSweep {
  0% {
    opacity: 0;
    transform: translate3d(-145%, 0, 0) rotate(18deg);
  }
  18%,
  52% {
    opacity: var(--fx-shine-alpha);
  }
  100% {
    opacity: 0;
    transform: translate3d(430%, 0, 0) rotate(18deg);
  }
}

@media (min-width: 700px) and (pointer: fine) {
  :root {
    --toast-edge: clamp(14px, 1.25vw, 28px);
    --toast-w-fluid: clamp(294px, 22vw, 332px);
    --toast-radius-fluid: clamp(13px, 0.82vw, 17px);
    --toast-pad-y-fluid: clamp(11px, 0.72vw, 14px);
    --toast-pad-x-fluid: clamp(16px, 0.98vw, 19px);
    --toast-title-fluid: clamp(11.2px, 0.74vw, 13.8px);
    --toast-message-fluid: clamp(8.8px, 0.62vw, 11.6px);
    --toast-button-h-fluid: clamp(30px, 1.9vw, 36px);
    --toast-button-font-fluid: clamp(8.8px, 0.62vw, 11.2px);
    --toast-action-gap-fluid: clamp(7px, 0.48vw, 10px);
  }
}

@media (max-width: 960px), (max-height: 760px) {
  :root {
    --layout-gap: clamp(10px, 1.05dvh, 14px);
    --coupon-panel-h: clamp(46px, 6.1dvh, 58px);
    --coupon-gap: clamp(8px, 0.95dvh, 12px);
    --wheel-outer-slot-h: calc(
      var(--usable-h) - var(--coupon-panel-h) - var(--coupon-gap) -
        var(--pointer-overflow)
    );
    --wheel-outer-size: clamp(
      176px,
      min(var(--wheel-outer-max-w), var(--wheel-outer-slot-h)),
      382px
    );
    --wheel-size: calc(var(--wheel-outer-size) - (var(--ring-size) * 2));
  }

  .art-board {
    width: min(100%, 680px);
  }

  .layout-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    align-content: center;
  }
}

@media (max-width: 768px), (pointer: coarse) {
  :root {
    --shadow-soft: rgba(0, 0, 0, 0.14);
    --shadow-deep: rgba(0, 0, 0, 0.22);
  }

  .stage::before {
    opacity: 0.28;
  }

  .brand-plate,
  .wheel-stack,
  .pointer {
    filter: none;
  }

  .stage.modal-open .art-board {
    opacity: 0.8;
    filter: blur(1.05px) saturate(0.99);
  }

  .win-overlay::before {
    -webkit-backdrop-filter: blur(1.25px) saturate(1.01);
    backdrop-filter: blur(1.25px) saturate(1.01);
  }

  .wheel-metal::before {
    opacity: 0.36;
    mix-blend-mode: normal;
  }

  .wheel-metal::after {
    opacity: 0.84;
  }

  .wheel-gloss {
    opacity: 0.1;
  }

  .spin-btn {
    box-shadow:
      inset 0 2px 3px rgba(255, 255, 255, 0.48),
      inset 0 -4px 6px rgba(114, 61, 3, 0.18),
      0 3px 5px rgba(0, 0, 0, 0.1),
      0 0 0 2px rgba(171, 104, 7, 0.56);
  }

  .spin-btn::before {
    opacity: 0.78;
  }

  .win-card {
    box-shadow:
      0 8px 18px rgba(0, 0, 0, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.07);
  }
}

@media (max-width: 540px), (pointer: coarse) {
  :root {
    --stage-x: 10px;
    --stage-y: clamp(4px, 0.7dvh, 8px);
    --layout-gap: clamp(10px, 0.95dvh, 13px);
    --coupon-panel-h: clamp(48px, 6.6dvh, 60px);
    --coupon-gap: clamp(7px, 0.9dvh, 11px);
    --wheel-outer-slot-h: calc(
      var(--usable-h) - var(--coupon-panel-h) - var(--coupon-gap) -
        var(--pointer-overflow)
    );
    --wheel-outer-size: clamp(
      178px,
      min(calc(var(--app-w) - 34px), var(--wheel-outer-slot-h)),
      342px
    );
    --wheel-size: calc(var(--wheel-outer-size) - (var(--ring-size) * 2));
    --toast-edge: 8px;
    --toast-w-fluid: clamp(268px, 86vw, 304px);
    --toast-radius-fluid: 10px;
    --toast-pad-y-fluid: 8px;
    --toast-pad-x-fluid: 13px;
    --toast-title-fluid: clamp(9.6px, 2.55vw, 11px);
    --toast-message-fluid: clamp(8px, 2.15vw, 9.4px);
    --toast-button-h-fluid: clamp(26px, 6.2vw, 31px);
    --toast-button-font-fluid: clamp(7.8px, 2.06vw, 9.2px);
    --toast-action-gap-fluid: 7px;
    --fx-glow-y: 2px;
    --fx-glow-blur: 9px;
    --fx-glow-gold-soft: rgba(255, 193, 7, 0.18);
    --fx-glow-gold-mid: rgba(255, 215, 0, 0.09);
    --fx-shine-alpha: 0.3;
    --fx-shine-speed: 3.05s;
    --fx-glow-speed: 2.75s;
  }

  .art-board {
    width: 100%;
  }

  .wheel-panel {
    width: 100%;
    transform: translate3d(0, calc(var(--pointer-overflow) * 0.18), 0);
  }

  .coupon-panel {
    width: min(
      calc(var(--app-w) - 28px),
      calc(var(--wheel-outer-size) * 0.99),
      356px
    );
  }

  .coupon-input,
  input.coupon-input {
    min-height: 32px;
    font-size: 16px;
    line-height: 1;
    letter-spacing: 0.012em;
    transform: translateZ(0);
  }

  .coupon-input::placeholder {
    font-size: 16px;
    letter-spacing: 0.012em;
    opacity: 0.72;
  }

  .app-toast-button:hover,
  .toast-action-btn:hover {
    transform: translateZ(0);
  }

  .app-toast {
    box-shadow:
      0 4px 12px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.045);
    -webkit-backdrop-filter: blur(7px) saturate(1.01);
    backdrop-filter: blur(7px) saturate(1.01);
  }

  .win-overlay {
    padding-inline: 10px;
  }

  .win-card {
    width: min(calc(var(--app-w) - 20px), 344px);
    max-height: min(52dvh, 228px);
  }

  .win-prize {
    padding-inline: 8px;
    font-size: clamp(26px, 7.8vw, 32px);
  }
}

@supports (-webkit-touch-callout: none) {
  @media (pointer: coarse), (max-width: 540px) {
    .coupon-input,
    input.coupon-input {
      font-size: 16px;
      -webkit-user-select: text;
      user-select: text;
    }
  }
}

@media (max-width: 390px) {
  :root {
    --stage-x: 9px;
    --coupon-panel-h: clamp(46px, 6.4dvh, 56px);
    --coupon-gap: 7px;
    --layout-gap: 10px;
    --wheel-outer-slot-h: calc(
      var(--usable-h) - var(--coupon-panel-h) - var(--coupon-gap) -
        var(--pointer-overflow)
    );
    --wheel-outer-size: clamp(
      166px,
      min(calc(var(--app-w) - 30px), var(--wheel-outer-slot-h)),
      322px
    );
    --wheel-size: calc(var(--wheel-outer-size) - (var(--ring-size) * 2));
  }

  .coupon-panel {
    width: min(
      calc(var(--app-w) - 24px),
      calc(var(--wheel-outer-size) * 1.02),
      326px
    );
  }

  .coupon-input {
    padding-inline: 12px;
    font-size: 16px;
  }

  .win-title {
    font-size: clamp(11.6px, 4vw, 12.8px);
  }

  .win-prize {
    line-height: 1.1;
    letter-spacing: -0.03em;
  }
}

@media (max-width: 360px) {
  :root {
    --toast-w-fluid: clamp(242px, 90vw, 286px);
    --toast-title-fluid: 9.2px;
    --toast-message-fluid: 7.8px;
    --toast-button-font-fluid: 7.6px;
    --toast-button-h-fluid: 24px;
  }
}

@media (max-height: 660px) and (max-width: 540px) {
  :root {
    --stage-y: 3px;
    --coupon-panel-h: 46px;
    --coupon-gap: 6px;
    --layout-gap: 8px;
    --wheel-outer-slot-h: calc(
      var(--usable-h) - var(--coupon-panel-h) - var(--coupon-gap) -
        var(--pointer-overflow)
    );
    --wheel-outer-size: clamp(
      150px,
      min(calc(var(--app-w) - 42px), var(--wheel-outer-slot-h)),
      292px
    );
    --wheel-size: calc(var(--wheel-outer-size) - (var(--ring-size) * 2));
  }

}

@media (max-height: 620px) {
  :root {
    --stage-y: clamp(4px, 0.9dvh, 9px);
    --ring-size: clamp(12px, min(2.45vw, 2.7dvh), 22px);
    --pointer-overflow: clamp(26px, 5.4dvh, 44px);
    --wheel-outer-size: clamp(
      196px,
      min(var(--wheel-outer-max-w), var(--wheel-outer-slot-h)),
      462px
    );
    --wheel-size: calc(var(--wheel-outer-size) - (var(--ring-size) * 2));
  }

  .win-card {
    max-height: min(calc(100dvh - 18px), 228px);
  }

  .win-top {
    padding-top: 8px;
  }

  .win-body {
    padding-top: 4px;
    padding-bottom: 10px;
  }

  .win-prize {
    margin-bottom: 8px;
    font-size: clamp(24px, 7.1dvh, 30px);
    line-height: 1.08;
  }

  .win-action {
    min-height: 28px;
  }
}

@media (max-height: 560px) {
  .wheel-panel {
    transform: translate3d(0, calc(var(--pointer-overflow) * 0.12), 0);
  }
}

@media (max-height: 520px) {
  :root {
    --ring-size: clamp(10px, min(2.2vw, 2.5dvh), 17px);
    --pointer-overflow: 24px;
    --wheel-outer-size: clamp(
      172px,
      min(var(--wheel-outer-max-w), var(--wheel-outer-slot-h)),
      368px
    );
    --wheel-size: calc(var(--wheel-outer-size) - (var(--ring-size) * 2));
  }

  .win-title {
    margin-bottom: 8px;
  }

  .win-divider {
    display: none;
  }
}

@media (max-height: 430px) {
  :root {
    --stage-y: 3px;
    --ring-size: clamp(8px, 2vw, 14px);
    --pointer-overflow: 20px;
    --wheel-outer-size: clamp(
      148px,
      min(var(--wheel-outer-max-w), var(--wheel-outer-slot-h)),
      304px
    );
    --wheel-size: calc(var(--wheel-outer-size) - (var(--ring-size) * 2));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
  }

  .app-toast,
  .win-overlay,
  .win-card,
  .spin-btn,
  .coupon-input,
  .win-action,
  .win-close,
  .app-toast-button,
  .toast-action-btn {
    transition: none;
  }

  .app-toast-button,
  .toast-action-btn,
  .app-toast-button::before,
  .toast-action-btn::before {
    animation: none;
  }

  .app-toast-button::before,
  .toast-action-btn::before {
    opacity: 0;
  }
}


/* v8 compact neutral coupon toast */
.app-toast.is-neutral-coupon {
  border-color: rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(180deg, rgba(15, 20, 34, 0.975) 0%, rgba(8, 12, 22, 0.965) 100%),
    radial-gradient(circle at 0% 0%, rgba(255, 211, 77, 0.14), transparent 44%);
  box-shadow:
    0 clamp(4px, 0.55vw, 10px) clamp(14px, 1.15vw, 22px) rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

.app-toast.is-neutral-coupon > span:empty {
  display: none;
}

.app-toast.is-neutral-coupon strong {
  text-align: left;
  letter-spacing: -0.02em;
}

.app-toast.is-neutral-coupon > span {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 800;
  letter-spacing: -0.018em;
}

.app-toast.is-neutral-coupon .app-toast-actions {
  margin-top: var(--toast-action-gap-fluid);
}

.app-toast.is-neutral-coupon .app-toast-button {
  letter-spacing: 0.05em;
}
