:root {
  --bg: #000000;
  --card: #151517;
  --ink: #f5f4f1;
  --soft: rgba(245, 244, 241, 0.5);
  --line: rgba(255, 255, 255, 0.08);
  --accent: #ff7a59;
  --row: 44px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}
/* a faint warm light behind the card */
.stage::before { content: ""; position: absolute; left: 50%; top: 50%; width: min(520px, 100%); height: min(420px, 100%); transform: translate(-50%, -50%); background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 14%, transparent), transparent); pointer-events: none; }

.gw { position: relative; width: min(320px, 100%); padding: 14px; border-radius: 24px; background: linear-gradient(180deg, #1c1c1f 0%, var(--card) 45%); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 30px 50px -30px rgba(0, 0, 0, 0.9); }
.gw__top { display: flex; align-items: center; gap: 11px; height: 44px; padding: 0 2px; }
.gw__mark { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.gw__mark svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.500; stroke-linecap: round; stroke-linejoin: round; }
.gw__title { min-width: 0; display: grid; gap: 1px; }
.gw__title b { font-size: 15px; line-height: 20px; font-weight: 700; font-stretch: 104%; letter-spacing: -0.005em; white-space: nowrap; }
.gw__status { display: block; height: 16px; overflow: hidden; font-size: 12px; line-height: 16px; color: var(--soft); font-variant-numeric: tabular-nums; }
.gw__status span { display: block; white-space: nowrap; }

/* the reel: three rows in view, the middle one inside the frame */
.gw__reel { position: relative; height: calc(var(--row) * 3); margin-top: 12px; border-radius: 16px; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px var(--line), inset 0 8px 14px -8px rgba(0, 0, 0, 0.8); overflow: hidden; }
.gw__reel::before, .gw__reel::after { content: ""; position: absolute; left: 0; right: 0; height: 40px; z-index: 2; pointer-events: none; }
.gw__reel::before { top: 0; background: linear-gradient(180deg, #0e0e10, rgba(14, 14, 16, 0)); }
.gw__reel::after { bottom: 0; background: linear-gradient(0deg, #0e0e10, rgba(14, 14, 16, 0)); }
.gw__track { list-style: none; will-change: transform; }
.gw__row { display: flex; align-items: center; gap: 10px; height: var(--row); padding: 0 16px 0 14px; }
.gw__avatar { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(150deg, #3b3b40, #242427); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16); font-size: 10px; font-weight: 700; letter-spacing: 0.02em; color: rgba(245, 244, 241, 0.8); }
.gw__row b { flex: 1; min-width: 0; font-size: 15px; line-height: 20px; font-weight: 480; letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: font-weight 0.5s cubic-bezier(0.3, 1.4, 0.5, 1), letter-spacing 0.5s ease; }
.gw__ticket { flex: none; font-size: 12px; font-weight: 550; color: var(--soft); font-variant-numeric: tabular-nums; transition: opacity 0.25s ease; }
/* the winner: its name gains weight, its ticket makes room for the tag */
.gw__row.is-winner b { font-weight: 780; letter-spacing: -0.012em; }
.gw__row.is-winner .gw__avatar { background: var(--accent); color: #1c0d07; }
.gw__row.is-winner .gw__ticket { opacity: 0; }

.gw__frame { position: absolute; left: 6px; right: 6px; top: calc(var(--row) + 2px); height: calc(var(--row) - 4px); z-index: 3; border-radius: 12px; box-shadow: inset 0 0 0 1.500px rgba(255, 255, 255, 0.22); overflow: hidden; pointer-events: none; transition: box-shadow 0.4s ease, background-color 0.4s ease; }
.gw__frame.is-on { background: color-mix(in srgb, var(--accent) 13%, transparent); box-shadow: inset 0 0 0 1.500px var(--accent), 0 0 22px -6px var(--accent); }
.gw__tag { position: absolute; right: 9px; top: 50%; height: 20px; margin-top: -10px; padding: 0 8px; border-radius: 10px; background: var(--accent); color: #1c0d07; font-size: 11px; line-height: 20px; font-weight: 750; transform: scale(0); }
.gw__shine { position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5) 50%, transparent); opacity: 0; }
.gw__sparks { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 4; pointer-events: none; }
.gw__sparks i { position: absolute; left: -5px; top: -1px; width: 10px; height: 2px; border-radius: 1px; background: var(--accent); opacity: 0; }

.gw__btn { display: block; width: 100%; height: 44px; margin-top: 12px; border: 0; border-radius: 14px; background: var(--accent); color: #1c0d07; font: inherit; font-size: 15px; font-weight: 720; cursor: pointer; outline: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 12px 18px -12px var(--accent); transition: filter 0.3s ease, opacity 0.3s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.gw__btn:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.gw__btn[aria-busy="true"] { cursor: progress; filter: saturate(0.5); opacity: 0.7; }
@media (hover: hover) { .gw__btn:not([aria-busy="true"]):hover { filter: brightness(1.08); } }
.gw__btntext { display: block; height: 20px; line-height: 20px; overflow: hidden; }
.gw__btntext span { display: block; white-space: nowrap; }

.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #ffffff; stroke: #101014; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); z-index: 6; }
