﻿:root {
  color-scheme: dark;
  --bg: #090e12;
  --bg-deep: #05080b;
  --surface: #0e1b21;
  --surface-raised: #132529;
  --surface-soft: #132529;
  --surface-stage: #0e1b21;
  --surface-card: #0e1b21;
  --line: #2e4d4f;
  --line-strong: rgba(74, 199, 163, 0.35);
  --text: #f2f5ed;
  --text-soft: #d8e2dc;
  --muted: #9eb2b0;
  --jade: #4ac7a3;
  --cyan: #4ac7a3;
  --gold: #f2b85c;
  --coral: #e06c75;
  --deep-teal: #144d47;
  --focus: #4ac7a3;

  --polish-bg: #090e12;
  --polish-surface: #0e1b21;
  --polish-surface-raised: #132529;
  --polish-line: #2e4d4f;
  --polish-line-strong: rgba(242, 184, 92, 0.35);
  --polish-text: #f2f5ed;
  --polish-muted: #9eb2b0;
  --polish-jade: #4ac7a3;
  --polish-deep-teal: #144d47;
  --polish-gold: #f2b85c;
  --polish-red: #e06c75;
  --polish-radius: 14px;
  --polish-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

html {
  background: var(--polish-bg);
  scrollbar-color: rgba(74, 199, 163, 0.45) transparent;
  scrollbar-width: thin;
}

body {
  background:
    radial-gradient(circle at 10% 4%, rgba(74, 199, 163, 0.08), transparent 32rem),
    radial-gradient(circle at 90% 12%, rgba(242, 184, 92, 0.07), transparent 30rem),
    var(--polish-bg);
  color: var(--polish-text);
  overflow-x: hidden;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--polish-gold);
  outline-offset: 3px;
}

.app-shell {
  width: min(100%, 1540px);
  margin-inline: auto;
  padding-inline: clamp(12px, 2.2vw, 34px);
  box-sizing: border-box;
}

.site-header {
  top: 0;
  z-index: 30;
  min-height: 72px;
  padding: 12px clamp(12px, 1.6vw, 24px);
  border: 1px solid transparent;
  border-bottom-color: var(--polish-line);
  background: rgba(9, 14, 18, 0.94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}

.header-brand img {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.32));
}

.header-brand strong {
  letter-spacing: 0.05em;
  color: var(--polish-text);
}

.header-brand span,
.section-kicker,
.pool-progress-reset,
.record-count,
.site-footer {
  color: var(--polish-muted);
}

.header-summary {
  max-width: min(56vw, 720px);
}

.account-bar {
  border-color: var(--polish-line);
  background: linear-gradient(135deg, rgba(19, 37, 41, 0.96), rgba(14, 27, 33, 0.96));
  box-shadow: none;
  border-radius: 10px;
}

.account-metric strong,
.draw-counter strong,
.reward-prize-value,
.pool-progress-heading > strong {
  color: var(--polish-text);
  font-variant-numeric: tabular-nums;
}

.icon-command,
.account-link,
.history-retry,
.state-action,
.state-page-action {
  border-color: var(--polish-line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--polish-text);
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.icon-command:hover,
.account-link:hover,
.history-retry:hover:not(:disabled),
.state-action:hover,
.state-page-action:hover {
  border-color: rgba(74, 199, 163, 0.52);
  background: rgba(74, 199, 163, 0.1);
  color: #dff8ec;
  transform: translateY(-1px);
}

/* ===== Main layout & Viewport (No forced 100vh) ===== */
main {
  width: min(100% - 24px, 1280px);
  margin: 0 auto;
  padding: 0 0 32px;
  box-sizing: border-box;
}

.event-intro { padding: 38px 0 28px; max-width: 780px; }
.event-intro > span { color: var(--polish-jade); font-size: 11px; letter-spacing: .18em; font-weight: 650; }
.event-intro h1 { margin: 10px 0 12px; font-size: clamp(26px, 3.1vw, 38px); font-weight: 650; line-height: 1.4; letter-spacing: .02em; }
.event-intro p { color: var(--polish-muted); font-size: 13px; line-height: 1.85; }
.icon-command, .account-link, .dialog-close, .result-confirm { min-height: 44px; min-width: 44px; }

.lottery-viewport {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 0 16px !important;
}

.primary-layout {
  display: grid !important;
  grid-template-areas: "wheel pass" "legend legend";
  grid-template-columns: minmax(360px, 1.05fr) minmax(390px, .95fr);
  gap: clamp(14px, 1.8vw, 24px);
  align-items: start;
}

.detail-layout {
  display: grid;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--polish-line);
  grid-template-columns: minmax(0, 1fr);
}
.draw-pass-mount { grid-area: pass; min-width: 0; }
.draw-pass-mount .draw-unlock-card { margin: 0; height: 100%; padding: 24px; border-radius: 20px; }
.draw-pass-mount .draw-unlock-card__top { display: block; }
.draw-pass-mount .draw-unlock-day { display: block; padding: 0; margin-top: 8px; }
.draw-pass-mount .draw-unlock-content { grid-template-columns: 1fr; gap: 20px; margin-top: 20px; }
.draw-pass-mount .draw-unlock-lucky { padding: 18px 20px; }
.draw-pass-mount .draw-unlock-footer { margin-top: 16px; }
.draw-pass-mount .draw-unlock-card__bottom { flex-direction: column; align-items: stretch; }

.secondary-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 24px);
}

/* ===== (1) Spend Progress Panel (Wallet progress as intro) ===== */
.pool-progress {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 3.2fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 24px;
  border: 1px solid var(--polish-line);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(19, 37, 41, 0.98), rgba(14, 27, 33, 0.98));
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.pool-progress-heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 0 20px 0 0;
}

.pool-progress-heading > strong {
  font-size: 16px;
  color: var(--polish-text);
  font-weight: 700;
}

.pool-progress-heading > small {
  color: var(--polish-jade);
  font-size: 12px;
  font-weight: 600;
}

.pool-progress-reset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  font-size: 11px;
  color: var(--polish-muted);
}

.pool-progress-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pool-tier {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--polish-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  transition: all 160ms ease;
  min-width: 0;
}

.pool-tier-number {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--polish-line);
  background: rgba(255, 255, 255, 0.04);
}

.pool-tier-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pool-tier-copy strong {
  font-size: 12px;
  color: var(--polish-text);
  white-space: normal;
  overflow-wrap: anywhere;
}

.pool-tier-copy small {
  font-size: 11px;
  color: var(--polish-muted);
  white-space: normal;
}

.pool-tier-reached {
  border-color: rgba(74, 199, 163, 0.45);
  background: rgba(74, 199, 163, 0.07);
}

.pool-tier-reached .pool-tier-number {
  border-color: var(--polish-jade);
  background: var(--polish-deep-teal);
  color: #bcf0da;
}

.pool-tier-current {
  border-color: var(--polish-gold);
  background: rgba(242, 184, 92, 0.08);
}

/* ===== Wheel Stage & Controls ===== */
.wheel-stage {
  grid-area: wheel;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0 !important;
  padding: 24px;
  border: 1px solid var(--polish-line);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(19, 37, 41, 0.98), rgba(14, 27, 33, 0.98));
}

.wheel-stage::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--polish-jade), var(--polish-gold), transparent 88%);
  opacity: 0.88;
}

.wheel-heading h2 { font-size: 27px; font-weight: 650; }
.draw-batch-row { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.draw-batch-row button { min-height: 44px; padding: 8px 20px; border: 1px solid var(--polish-line); border-radius: 10px; background: #132529; color: var(--polish-text); font: inherit; cursor: pointer; }
.draw-batch-row button strong, .draw-batch-row button span { display: block; }
.draw-batch-row button small { display: block; color: var(--polish-muted); font-size: 11px; }
.draw-batch-row button:disabled { color: var(--polish-muted); cursor: not-allowed; }

.wheel-shell {
  position: relative;
  display: grid;
  width: min(100%, 460px) !important;
  height: auto !important;
  min-width: 0 !important;
  aspect-ratio: 1 / 1;
  align-self: center;
  place-items: center;
  margin: 28px auto 12px !important;
  border-radius: 50%;
  background:
    conic-gradient(from 215deg at 50% 50%, #24313f, #0c1420 28%, #2a3746 50%, #0b131f 72%, #16212c),
    linear-gradient(145deg, #2d3745, #0c141f);
  box-shadow: 0 0 0 8px #132529, 0 0 0 9px #4b6863, 0 20px 38px rgba(0,0,0,.25);
  isolation: isolate;
}

.wheel-shell::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.20), transparent 30%),
    radial-gradient(circle, transparent 62%, rgba(255, 214, 140, 0) 66%, rgba(255, 214, 140, 0.55) 72%, rgba(255, 214, 140, 0) 78%);
  opacity: 0.42;
}

.wheel-shell:has(.wheel-rotor-spinning)::before {
  animation: lotEdgeGlow 2.6s ease-in-out infinite;
}

.wheel-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  background:
    radial-gradient(circle at 32% 20%, rgba(255, 255, 255, 0.10), transparent 34%),
    radial-gradient(circle at 72% 84%, rgba(242, 184, 92, 0.06), transparent 42%);
}

.wheel-rotor {
  --wheel-number-radius: calc(-1 * min(11rem, 20vw, 155px)) !important;
  --wheel-spin-duration: 5.2s;
  --wheel-spin-easing: cubic-bezier(.12, .04, .18, 1);
  position: relative;
  width: 94%;
  aspect-ratio: 1;
  border: 4px solid #d5ddc6;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 0 0 4px #132529;
  filter: none;
  will-change: auto;
  backface-visibility: hidden;
}

.wheel-rotor-spinning {
  will-change: transform;
}

.wheel-number {
  will-change: auto;
  backface-visibility: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.58);
}

.wheel-rotor-spinning .wheel-number {
  will-change: transform;
}

.wheel-pointer {
  filter: drop-shadow(0 0 6px rgba(242, 184, 92, 0.5)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6));
  transition: transform 0.18s cubic-bezier(0.22, 1.2, 0.36, 1);
}

.wheel-shell:has(.wheel-rotor-spinning)::after {
  background:
    conic-gradient(from 0deg,
      rgba(255, 255, 255, 0) 0deg 8deg,
      rgba(255, 236, 190, 0.0) 20deg,
      rgba(255, 255, 255, 0.28) 36deg,
      rgba(255, 236, 190, 0.12) 50deg,
      rgba(255, 255, 255, 0) 64deg),
    radial-gradient(circle at 32% 20%, rgba(255, 255, 255, 0.10), transparent 34%),
    radial-gradient(circle at 72% 84%, rgba(242, 184, 92, 0.06), transparent 42%);
  mix-blend-mode: screen;
  animation: lotGlareSweep 2.1s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}

.wheel-shell:has(.wheel-rotor-spinning) .wheel-pointer {
  animation: lotPointerJitter 0.09s linear infinite;
  transition: none;
}

.wheel-shell:not(:has(.wheel-rotor-spinning)) .wheel-pointer {
  animation: lotPointerSettle 0.5s cubic-bezier(0.24, 1.5, 0.4, 1) both;
}

@keyframes lotEdgeGlow { 0%, 100% { opacity: 0.32; } 50% { opacity: 0.62; } }
@keyframes lotGlareSweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes lotPointerJitter {
  0%, 100% { transform: translate(-50%) rotate(0deg); }
  25%      { transform: translate(-50%) translateY(-1px) rotate(1.8deg); }
  50%      { transform: translate(-50%) translateY(1px) rotate(-1.3deg); }
  75%      { transform: translate(-50%) rotate(1.1deg); }
}
@keyframes lotPointerSettle {
  0%   { transform: translate(-50%) rotate(2.2deg); }
  55%  { transform: translate(-50%) rotate(-0.8deg); }
  100% { transform: translate(-50%) rotate(0deg); }
}

.draw-button {
  border: 1px solid rgba(242, 184, 92, 0.55);
  background: linear-gradient(145deg, #f2b85c, #c99739);
  color: #1b160b;
  box-shadow: 0 12px 30px rgba(201, 151, 57, 0.24);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.wheel-shell .draw-button strong, .wheel-shell .draw-button > span { color: #2d210b; text-shadow: none; }
.wheel-shell .draw-button:disabled strong, .wheel-shell .draw-button:disabled > span { color: #d3dfd8; }
.draw-batch-row button > span { color: var(--polish-muted); font-size: 11px; }

.draw-button:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 16px 36px rgba(201, 151, 57, 0.31);
}

.draw-button:active:not(:disabled) {
  transform: translateY(0);
}

.draw-button:disabled {
  box-shadow: none;
  filter: saturate(0.35);
}

/* ===== (5) Legend Panel & Balanced Prize Grid ===== */
.legend-panel {
  grid-area: legend;
  display: flex;
  flex-direction: column;
  min-height: 0 !important;
  padding: 24px;
  border: 1px solid var(--polish-line);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(19, 37, 41, 0.98), rgba(14, 27, 33, 0.98));
}

.reward-zones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 10px;
  border-top: 1px solid var(--polish-line);
}

.reward-zone {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--polish-line);
}

.reward-zone:last-child {
  border-bottom: none;
  grid-column: span 2;
}

.reward-zone-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.reward-zone-heading > div { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; width: 100%; }
.reward-zone-details { flex: 1; min-width: 120px; color: var(--polish-muted); font-size: 12px; }
.reward-zone-details summary { min-height: 32px; padding: 6px 0; cursor: pointer; width: fit-content; }
.reward-zone-details p { margin: 4px 0 8px; line-height: 1.8; }
.reward-zone-details summary:focus-visible { outline: 2px solid var(--polish-gold); outline-offset: 3px; }

.reward-zone-marker {
  width: 4px;
  height: 38px;
  flex: 0 0 4px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--group-color-start), var(--group-color-middle), var(--group-color-end));
}

.reward-zone-heading strong {
  font-size: 14px;
  color: var(--polish-text);
  display: block;
}

.reward-zone-heading small {
  font-size: 11px;
  color: var(--polish-muted);
  line-height: 1.35;
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.reward-zone-list {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 6px !important;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}
.reward-zone:last-child .reward-zone-list { grid-template-columns: 1fr 1fr !important; }

.reward-prize {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 52px;
  gap: 3px;
  padding: 12px 10px;
  border: 1px solid var(--polish-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.reward-prize:before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--prize-color);
  content: "";
}

.reward-prize:hover {
  border-color: rgba(74, 199, 163, 0.35);
  background: rgba(74, 199, 163, 0.06);
  transform: translateY(-1px);
}

.reward-prize-topline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-number {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  color: var(--polish-text);
  border: 1px solid var(--prize-color);
  background: rgba(0, 0, 0, 0.25);
}

.reward-prize-topline > strong {
  font-size: 11px;
  font-weight: 700;
  color: var(--prize-color);
}

.reward-prize-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--polish-text);
  line-height: 1.3;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
}

.reward-prize-state {
  font-size: 11px;
  line-height: 1.3;
  color: var(--polish-jade);
  white-space: normal;
  overflow: visible;
}

.reward-prize-locked {
  border-color: var(--polish-line);
  background: rgba(255, 255, 255, 0.015);
}

.reward-prize-locked .reward-prize-state {
  color: var(--polish-muted);
}

.reward-prize-lock {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 4px;
  border: 1px solid rgba(74, 199, 163, 0.35);
  background: rgba(74, 199, 163, 0.1);
  color: var(--polish-jade);
}

.reward-prize-locked .reward-prize-lock {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--polish-muted);
}

/* ===== (2) Daily Benefits Bar (Draw Access Bar) ===== */
.draw-access-bar {
  display: grid;
  min-width: 0;
  min-height: 84px;
  border: 1px solid var(--polish-line);
  border-radius: 12px;
  background: linear-gradient(155deg, rgba(19, 37, 41, 0.98), rgba(14, 27, 33, 0.98));
  align-items: stretch;
}

.draw-access-bar.no-windows,
.draw-access-bar:not(:has(.access-windows)) {
  grid-template-columns: minmax(180px, .6fr) minmax(0, 2fr) !important;
}

.draw-access-bar.has-windows,
.draw-access-bar:has(.access-windows) {
  grid-template-columns: 180px minmax(280px, 1.2fr) minmax(320px, 1fr) auto !important;
}

.access-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 16px;
  border-right: 1px solid var(--polish-line);
}

.access-summary > strong {
  color: var(--polish-gold);
  font-size: 17px;
  font-weight: 750;
  margin-top: 4px;
}

.access-summary > span:last-child {
  color: var(--polish-muted);
  font-size: 12px;
  line-height: 1.4;
  margin-top: 2px;
}

.sponsorship-access {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-color: var(--polish-line);
  background: transparent;
}
.sponsorship-access > svg { display: none; }
.sponsorship-meta { grid-column: 1 / -1; }
.sponsorship-redeem-form input, .sponsorship-redeem-form button { min-height: 44px; }

.sponsorship-copy strong {
  font-size: 13px;
  color: var(--polish-text);
  display: block;
}

.sponsorship-copy small {
  font-size: 11px;
  color: var(--polish-muted);
  display: block;
}

.sponsorship-meta {
  font-size: 11px;
  color: var(--polish-muted);
}

/* ===== Secondary Sections: Awards & History ===== */
.benefit-section,
.history-section {
  border: 1px solid var(--polish-line);
  border-radius: 12px;
  background: linear-gradient(155deg, rgba(19, 37, 41, 0.98), rgba(14, 27, 33, 0.98));
  padding: 16px;
}

.benefit-row,
.history-row {
  border-color: var(--polish-line);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 6px;
  transition: all 160ms ease;
}

.benefit-row:hover,
.history-row:hover {
  border-color: rgba(74, 199, 163, 0.32);
  background: rgba(74, 199, 163, 0.055);
  transform: translateY(-1px);
}

/* ===== Dialogs & Drawers ===== */
.dialog-backdrop,
.drawer-backdrop {
  background: rgba(4, 8, 11, 0.82);
  backdrop-filter: blur(6px);
}

.result-dialog,
.rules-drawer {
  border: 1px solid var(--polish-line);
  background: linear-gradient(155deg, rgba(19, 37, 41, 0.99), rgba(14, 27, 33, 0.99));
  box-shadow: var(--polish-shadow);
  border-radius: 14px;
}

/* A confirmed result is the primary feedback, independent of wheel animation. */
.result-feedback-backdrop {
  z-index: 1000;
  padding: max(16px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  overflow-y: auto;
  background: rgba(4, 8, 11, 0.9);
}

.result-feedback-backdrop .result-dialog,
.result-feedback-backdrop .batch-dialog {
  position: relative;
  width: min(100%, 560px);
  max-height: min(88vh, 820px);
  max-height: min(88dvh, 820px);
  margin: auto;
  padding: clamp(20px, 4vw, 36px);
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: var(--polish-radius);
  background: var(--polish-surface-raised);
  color: var(--polish-text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.56);
  text-align: center;
  overflow-wrap: anywhere;
  animation: resultReveal 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.result-feedback-backdrop .dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  color: var(--polish-text);
}

.result-feedback-backdrop .result-icon {
  width: 72px;
  height: 72px;
  margin: 8px auto 20px;
  border: 1px solid var(--polish-gold);
  color: var(--polish-gold);
  background: rgba(242, 184, 92, 0.08);
}

.result-feedback-backdrop h2 {
  margin: 8px 0 14px;
  padding-inline: 16px;
  color: var(--polish-text);
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1.4;
  text-wrap: balance;
}

.result-congratulations {
  display: block;
  margin-bottom: 10px;
  color: var(--polish-text);
  font-size: 18px;
  font-weight: 500;
}

.result-prize-name { color: var(--polish-gold); }
.result-feedback-backdrop .result-prize-value { margin: 0 0 18px; color: var(--polish-gold); font-size: 18px; line-height: 1.6; }
.result-feedback-backdrop .result-description,
.result-feedback-backdrop .result-status-note,
#batch-result-note { display: block; margin: 12px 0; color: var(--text-soft); font-size: 16px; line-height: 1.7; }
.result-feedback-backdrop .result-fulfillment { margin-top: 24px; padding: 12px; font-size: 16px; line-height: 1.5; }
.result-feedback-backdrop .result-fulfillment-success { background: rgba(74, 199, 163, 0.1); color: var(--polish-jade); }
.result-feedback-backdrop .result-fulfillment-pending,
.result-feedback-backdrop .result-fulfillment-review { background: rgba(242, 184, 92, 0.1); color: var(--polish-gold); }
.result-feedback-backdrop .result-zone { display: block; margin-top: 16px; color: var(--polish-muted); font-size: 14px; }
.result-feedback-backdrop .result-confirm { width: 100%; min-height: 48px; margin-top: 24px; border: 0; border-radius: 10px; background: var(--polish-gold); color: #171a17; font-size: 16px; font-weight: 700; cursor: pointer; }
.result-feedback-backdrop .result-confirm:hover { background: #ffd28f; }
.result-feedback-backdrop .result-confirm:active { background: #dfaa54; }
.result-feedback-backdrop .batch-dialog-list { list-style: none; display: grid; gap: 0; margin: 20px 0 0; padding: 0; }
.result-feedback-backdrop .batch-dialog-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 16px 0; border: 0; border-bottom: 1px solid var(--polish-line); background: transparent; text-align: left; }
.result-feedback-backdrop .batch-dialog-item-zone { padding-top: 3px; color: var(--polish-muted); font-size: 14px; }
.result-feedback-backdrop .batch-dialog-item-copy { display: grid; min-width: 0; gap: 6px; }
.result-feedback-backdrop .batch-dialog-item-copy strong { color: var(--polish-gold); font-size: 18px; line-height: 1.5; }
.result-feedback-backdrop .batch-dialog-item-copy span { color: var(--text-soft); font-size: 16px; line-height: 1.6; }
.result-feedback-backdrop .batch-status { color: var(--polish-jade); font-size: 14px; line-height: 1.5; }
.result-feedback-backdrop .batch-status-pending,
.result-feedback-backdrop .batch-status-review { color: var(--polish-gold); }
.wheel-rotor:not(.wheel-rotor-spinning) { --wheel-spin-duration: 180ms; }

@keyframes resultReveal {
  from { transform: translateY(10px) scale(0.98); }
  to { transform: translateY(0) scale(1); }
}

@media (max-width: 420px) {
  .result-feedback-backdrop .result-dialog,
  .result-feedback-backdrop .batch-dialog { padding: 24px 18px; }
  .result-feedback-backdrop h2 { padding-inline: 8px; }
  .result-feedback-backdrop .batch-dialog-item { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

.rule-block {
  border-color: var(--polish-line);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

.inline-alert {
  border-color: rgba(224, 108, 117, 0.45);
  background: rgba(224, 108, 117, 0.1);
  color: #ffd5cf;
  border-radius: 8px;
}

/* ===== Responsive Breakpoints (390px no overflow!) ===== */
@media (max-width: 980px) {
  .primary-layout {
    grid-template-areas:
      "wheel"
      "pass"
      "legend";
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .pool-progress {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 14px;
  }

  .pool-progress-list {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .wheel-shell {
    width: min(100%, 400px) !important;
  }

  .wheel-rotor {
    --wheel-number-radius: calc(-1 * min(9.5rem, 26vw, 135px)) !important;
  }

  .draw-access-bar.no-windows,
  .draw-access-bar:not(:has(.access-windows)),
  .draw-access-bar.has-windows,
  .draw-access-bar:has(.access-windows) {
    grid-template-columns: 1fr !important;
  }

  .access-summary {
    border-right: none;
    border-bottom: 1px solid var(--polish-line);
  }

  .secondary-layout {
    grid-template-columns: 1fr;
  }
  .reward-zones { grid-template-columns: 1fr 1fr; }
  .reward-zone:last-child { grid-column: span 2; }
  .draw-pass-mount .draw-unlock-card { padding: 20px; }
}

@media (max-width: 640px) {
  .app-shell {
    padding-inline: 10px;
  }

  .site-header {
    min-height: 60px;
    padding-inline: 10px;
    position: sticky;
    grid-template-areas: "brand actions";
    grid-template-columns: 1fr auto;
  }

  .header-brand span,
  .header-summary {
    display: none;
  }

  .header-brand img {
    width: 32px;
    height: 32px;
  }

  .header-actions {
    margin-left: auto;
  }

  .account-link span {
    max-width: 84px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .reward-zone {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px 0;
  }
  .reward-zones { grid-template-columns: 1fr; }
  .reward-zone:last-child { grid-column: auto; }

  .reward-zone-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .sponsorship-access {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .sponsorship-redeem-form {
    width: 100%;
  }

  .draw-button {
    width: 102px;
    height: 102px;
  }
  .draw-button strong { font-size: 15px; }
  .draw-button small { font-size: 10px; }
  .event-intro { padding: 26px 4px 22px; }
  .event-intro p { font-size: 12px; }
  .wheel-stage { padding: 20px 14px !important; }
  .wheel-shell { width: min(100%, 290px) !important; }
  .pool-progress { padding: 20px 16px; }
  .pool-progress-heading { padding: 0 0 12px; }
  .pool-progress-list { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 5px; }
  .pool-tier { flex-direction: column; align-items: center; padding: 9px 2px; gap: 6px; text-align: center; }
  .pool-tier-copy strong { font-size: 10px; }
  .pool-tier-copy small { font-size: 10px; }
  .pool-tier > svg { display: none; }
  .pool-tier-copy > svg { display: none; }
  .reward-prize { padding: 10px !important; }
  .reward-prize-value { font-size: 12px !important; }
  .reward-prize-state { font-size: 11px !important; }
  .reward-zone-details summary { min-height: 44px; padding: 12px 0; }
  .reward-zone-list { gap: 8px !important; }
  .legend-panel { padding: 20px 16px; }
  .draw-access-bar.no-windows, .draw-access-bar:not(:has(.access-windows)) { grid-template-columns: 1fr !important; }
}

@media (max-width: 390px) {
  .app-shell {
    padding-inline: 8px !important;
  }

  .site-header {
    padding-inline: 8px !important;
  }

  main {
    width: 100% !important;
    padding: 0 4px 24px !important;
  }

  .wheel-stage {
    padding: 12px 8px !important;
  }

  .wheel-shell {
    width: min(100%, 290px) !important;
  }

  .wheel-rotor {
    --wheel-number-radius: calc(-1 * min(6.5rem, 28vw, 98px)) !important;
  }

  .draw-counter strong {
    font-size: 26px !important;
  }

  .reward-zone-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  .reward-prize {
    padding: 10px !important;
    min-height: 46px !important;
  }

  .legend-number {
    width: 19px !important;
    height: 19px !important;
    font-size: 10px !important;
  }

  .reward-prize-topline > strong {
    font-size: 10px !important;
  }

  .reward-prize-value {
    font-size: 12px !important;
  }

  .reward-prize-state {
    font-size: 11px !important;
  }

  .pool-progress-list {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .spin-icon,
  .wheel-rotor-spinning,
  .wheel-shell::before,
  .wheel-shell::after,
  .wheel-shell:has(.wheel-rotor-spinning)::after,
  .wheel-shell:has(.wheel-rotor-spinning) .wheel-pointer,
  .wheel-shell:not(:has(.wheel-rotor-spinning)) .wheel-pointer {
    animation: none !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }

  .wheel-pointer {
    transition: none !important;
  }

  .icon-command,
  .account-link,
  .history-retry,
  .state-action,
  .state-page-action,
  .draw-button,
  .reward-prize,
  .benefit-row,
  .history-row {
    transition-duration: 1ms !important;
  }
}
