:root {
  --bg: #050b18;
  --bg-2: #0c1d35;
  --panel: rgba(12, 24, 44, 0.72);
  --panel-2: rgba(16, 32, 58, 0.78);
  --line: rgba(140, 200, 255, 0.14);
  --line-strong: rgba(140, 200, 255, 0.22);
  --text: #f1f7ff;
  --muted: #93acca;
  --muted-2: #6f87a4;
  --cyan: #7af0ff;
  --blue: #6ca8ff;
  --green: #58e5b4;
  --violet: #a48cff;
  --pink: #ff7a96;
  --red: #ff6b7a;
  --yellow: #ffce5b;

  --shadow-card: 0 24px 80px rgba(2, 8, 20, 0.45), 0 2px 0 rgba(255, 255, 255, 0.04) inset;
  --shadow-soft: 0 8px 28px rgba(0, 0, 0, 0.28);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max: 1140px;
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  background-color: var(--bg);
}

body {
  margin: 0;
  font-family: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  font-feature-settings: "ss01", "ss02";
  color: var(--text);
  background-image:
    radial-gradient(ellipse at 80% -10%, rgba(122, 240, 255, 0.08), transparent 50%),
    radial-gradient(ellipse at -10% 110%, rgba(124, 102, 255, 0.10), transparent 50%),
    linear-gradient(180deg, #06101e 0%, #050b18 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
  will-change: transform;
}
.orb-a { width: 38vw; height: 38vw; left: -10vw; top: -12vw; background: #1d4ed8; animation: drift1 22s ease-in-out infinite; }
.orb-b { width: 28vw; height: 28vw; right: -8vw; top: 18vh; background: #06b6d4; animation: drift2 26s ease-in-out infinite; }
.orb-c { width: 22vw; height: 22vw; left: 30vw; bottom: -10vh; background: #7e3af2; opacity: 0.22; animation: drift3 30s ease-in-out infinite; }

@keyframes drift1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(20px, 30px); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-30px, 20px); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(20px, -25px); } }

.app-shell {
  width: min(calc(100% - 24px), var(--max));
  margin: 0 auto;
  padding: 22px 0 30px;
  position: relative;
  z-index: 1;
}

.hero-card,
.panel {
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.hero-card {
  background: linear-gradient(180deg, rgba(13, 24, 44, 0.78), rgba(10, 20, 38, 0.86));
  border-radius: var(--radius-xl);
  padding: 26px;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122, 240, 255, 0.5), transparent);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(122, 240, 255, 0.08);
  border: 1px solid rgba(122, 240, 255, 0.16);
  color: #d8f7ff;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

h1, h2, h3 { margin: 0; font-weight: 700; }
h1 {
  font-size: clamp(2.2rem, 7.5vw, 4.2rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  font-weight: 700;
}
.h1-accent {
  background: linear-gradient(135deg, #7af0ff 0%, #a48cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  margin: 16px 0 0;
  max-width: 56ch;
  line-height: 1.6;
  color: var(--muted);
  font-size: 1rem;
}

/* ---------- Wheel layout ---------- */
.wheel-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: center;
  margin-top: 28px;
}

.wheel-wrap {
  position: relative;
  width: min(100%, 580px);
  margin: 0 auto;
  aspect-ratio: 1 / 1;
}

#wheelCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.55),
    0 0 0 6px rgba(255, 255, 255, 0.04),
    0 0 0 7px rgba(122, 240, 255, 0.18);
  will-change: transform;
}

.pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 36px solid #ffffff;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 14px rgba(122, 240, 255, 0.35));
  z-index: 4;
}

/* ---------- Spin button (refined glass orb) ---------- */
/* Rotating conic gradient halo BEHIND the button */
.spin-btn-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26%;
  aspect-ratio: 1;
  min-width: 122px;
  max-width: 160px;
  border-radius: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  background: conic-gradient(
    from 0deg,
    #7af0ff 0%,
    #6ca8ff 25%,
    #a48cff 50%,
    #ff7a96 75%,
    #7af0ff 100%
  );
  filter: blur(8px);
  opacity: 0.85;
  animation: haloRotate 6s linear infinite;
  pointer-events: none;
}

/* Inward-radiating ring pulse (separate from button so transforms don't conflict) */
.wheel-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22%;
  aspect-ratio: 1;
  min-width: 100px;
  max-width: 140px;
  border-radius: 50%;
  z-index: 5;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  transform: translate(-50%, -50%);
  animation: ringRadiate 2.6s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
  pointer-events: none;
}

@keyframes haloRotate {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes ringRadiate {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.7; }
  70%  {                                              opacity: 0;   }
  100% { transform: translate(-50%, -50%) scale(1.45);opacity: 0;   }
}

.spin-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22%;
  aspect-ratio: 1;
  min-width: 100px;
  max-width: 140px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  z-index: 6;
  background:
    radial-gradient(circle at 35% 25%, #ffffff 0%, #e3f1ff 45%, #b8d6f0 100%);
  color: #07111f;
  font-family: inherit;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  box-shadow:
    /* Tight bright rim */
    0 0 0 1px rgba(255, 255, 255, 0.55),
    /* Drop shadow */
    0 16px 36px rgba(0, 0, 0, 0.50),
    /* Cyan ambient bloom */
    0 0 50px rgba(122, 240, 255, 0.35),
    /* Inner top highlight */
    inset 0 2px 2px rgba(255, 255, 255, 1),
    /* Inner bottom shadow gives orb depth */
    inset 0 -8px 14px rgba(60, 110, 170, 0.30);
  -webkit-tap-highlight-color: transparent;
}

.spin-btn-label {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.005em;
  line-height: 1;
  color: #07111f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.spin-btn:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.65),
    0 18px 44px rgba(0, 0, 0, 0.55),
    0 0 70px rgba(122, 240, 255, 0.5),
    inset 0 2px 2px rgba(255, 255, 255, 1),
    inset 0 -8px 14px rgba(60, 110, 170, 0.30);
}
.spin-btn:active:not(:disabled) {
  transform: translate(-50%, -50%) scale(0.94);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.5),
    0 4px 10px rgba(0, 0, 0, 0.55),
    0 0 30px rgba(122, 240, 255, 0.40),
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    inset 0 -3px 6px rgba(60, 110, 170, 0.25);
}
.spin-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}
.spin-btn:disabled ~ .spin-btn-halo,
.spin-btn.is-spinning ~ .spin-btn-halo {
  /* Halo and ring keep going during spin & disabled — but we can still fade the ring during disabled */
}

/* During spin, hide the ring pulse (replaces .spin-btn.is-spinning) */
.wheel-wrap.is-spinning::after { animation: none; opacity: 0; }
.wheel-wrap.is-spinning .spin-btn-halo { animation-duration: 1.5s; opacity: 1; filter: blur(10px); }

/* ---------- Result card ---------- */
.result-card,
.panel {
  background: linear-gradient(180deg, rgba(15, 28, 52, 0.74), rgba(11, 21, 40, 0.86));
  border-radius: var(--radius-lg);
  padding: 22px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  background: rgba(122, 240, 255, 0.08);
  color: #dcfbff;
  border: 1px solid rgba(122, 240, 255, 0.18);
  margin-bottom: 16px;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}
.status-pill.is-spinning .status-dot {
  background: var(--yellow);
  box-shadow: 0 0 8px var(--yellow);
  animation: blink 0.5s linear infinite;
}
.status-pill.is-error .status-dot {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

.result-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 600;
  margin-bottom: 6px;
}

.last-result {
  font-size: clamp(1.6rem, 5.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  min-height: 1.3em;
  line-height: 1.05;
  background: linear-gradient(135deg, #ffffff 0%, #c1ecff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}
.last-result.empty {
  color: var(--muted-2);
  background: none;
  -webkit-text-fill-color: var(--muted-2);
  font-weight: 500;
  font-size: clamp(1.1rem, 3vw, 1.4rem);
}
.last-result.revealed {
  animation: resultReveal 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes resultReveal {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

.muted, .helper, .panel-note {
  color: var(--muted);
  line-height: 1.55;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.mini-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.mini-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 4px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mini-card strong {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* ---------- Panels ---------- */
.panel-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  margin-top: 20px;
}

.panel-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.panel-head h3 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}
.panel-note {
  font-size: 0.85rem;
  display: block;
}

/* ---------- Option rows (with color button) ---------- */
.option-list {
  display: grid;
  gap: 8px;
}

.option-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 8px 6px 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  transition: border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
  position: relative;
}
.option-row:hover {
  border-color: var(--line-strong);
}
.option-row.is-inactive {
  opacity: 0.55;
}
.option-row.is-inactive .option-input {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}
.option-row.is-empty .option-input {
  font-style: italic;
}
.option-row.is-color-open {
  border-color: rgba(122, 240, 255, 0.35);
  background: rgba(122, 240, 255, 0.04);
}

.option-toggle {
  position: relative;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.option-toggle input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.option-toggle .checkmark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}
.option-toggle input:checked + .checkmark {
  background: linear-gradient(135deg, #7af0ff 0%, #6ca8ff 100%);
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(122, 240, 255, 0.5), 0 0 12px rgba(122, 240, 255, 0.4);
}
.option-toggle input:checked + .checkmark::after {
  content: "";
  width: 11px;
  height: 6px;
  border-left: 2px solid #07111f;
  border-bottom: 2px solid #07111f;
  transform: rotate(-45deg) translate(1px, -1px);
}
.option-toggle:hover .checkmark {
  border-color: rgba(255, 255, 255, 0.4);
}

/* Color swatch button */
.option-color-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background-color: var(--swatch, #FF6B8A);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  position: relative;
  transition: transform 0.16s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  -webkit-tap-highlight-color: transparent;
}
.option-color-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.18);
}
.option-color-btn.is-open {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px rgba(122, 240, 255, 0.6), 0 0 14px rgba(122, 240, 255, 0.4);
}

.option-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.98rem;
  padding: 11px 4px;
  outline: none;
  font-weight: 500;
}
.option-input::placeholder {
  color: var(--muted-2);
  font-weight: 400;
}

.option-remove {
  background: transparent;
  border: 0;
  color: var(--muted-2);
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  flex-shrink: 0;
}
.option-remove:hover {
  background: rgba(255, 107, 122, 0.12);
  color: var(--red);
}
.option-remove:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* Color palette popover (inline, expands the row) */
.option-color-popover {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  padding: 8px 4px 4px;
  margin-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  animation: popoverIn 0.18s ease-out;
}
@keyframes popoverIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid transparent;
  background-color: var(--swatch, #FF6B8A);
  cursor: pointer;
  padding: 0;
  transition: transform 0.16s ease, border-color 0.16s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  -webkit-tap-highlight-color: transparent;
}
.color-swatch:hover {
  transform: scale(1.15);
}
.color-swatch.is-selected {
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 2px rgba(122, 240, 255, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-add {
  padding: 8px 14px;
  min-height: 38px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-add-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(122, 240, 255, 0.18);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ---------- Buttons ---------- */
.btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  transition: transform 0.16s ease, border-color 0.18s ease, opacity 0.18s ease, background 0.18s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--line-strong); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, rgba(122, 240, 255, 0.22), rgba(108, 168, 255, 0.22));
  border-color: rgba(122, 240, 255, 0.28);
  box-shadow: 0 0 30px rgba(122, 240, 255, 0.15);
  font-weight: 600;
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 0 40px rgba(122, 240, 255, 0.25); }

.btn-secondary { background: rgba(255, 255, 255, 0.06); }
.btn-ghost { background: transparent; }
.btn-ghost.danger {
  border-color: rgba(255, 138, 150, 0.22);
  color: #ffd0d6;
}
.btn-ghost.danger:hover:not(:disabled) {
  background: rgba(255, 107, 122, 0.08);
  border-color: rgba(255, 138, 150, 0.4);
}

.message-box {
  margin-top: 14px;
  min-height: 22px;
  font-size: 0.92rem;
  font-weight: 500;
}
.message-box.ok { color: var(--green); }
.message-box.error { color: var(--red); }

/* ---------- History ---------- */
.history-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  counter-reset: hist;
}
.history-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  counter-increment: hist;
  transition: background 0.18s ease;
}
.history-list li:hover {
  background: rgba(255, 255, 255, 0.04);
}
.history-list li::before {
  content: counter(hist);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.05);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}
.history-list .history-value {
  font-weight: 600;
  font-size: 0.98rem;
}
.history-list .history-time {
  color: var(--muted-2);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.history-list .history-empty {
  text-align: center;
  color: var(--muted-2);
  padding: 24px 12px;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.08);
}
.history-list .history-empty::before { display: none; }

.app-footer {
  margin-top: 30px;
  text-align: center;
  color: var(--muted-2);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.app-footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.18);
}
.app-footer a:hover { color: var(--cyan); }
.dot-sep { opacity: 0.5; }

.celebration-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 200;
}

.cookie-banner {
  position: fixed;
  bottom: 14px;
  left: 14px;
  right: 14px;
  z-index: 300;
}
.cookie-banner__inner {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  background: rgba(13, 24, 44, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
}
.cookie-banner__text { font-size: 0.92rem; color: var(--muted); line-height: 1.5; }
.cookie-banner__btn { padding: 0 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .wheel-layout,
  .panel-grid {
    grid-template-columns: 1fr;
  }
  .hero-card { padding: 22px; }
  .wheel-layout { gap: 18px; }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(calc(100% - 14px), var(--max));
    padding: 12px 0 22px;
  }
  .hero-card,
  .panel {
    padding: 18px;
    border-radius: 22px;
  }
  .control-row {
    flex-direction: column;
  }
  .control-row .btn {
    width: 100%;
  }
  .panel-head {
    grid-template-columns: 1fr auto;
  }
  .stats-grid { gap: 10px; }
  .cookie-banner__inner {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .cookie-banner__btn { width: 100%; }
  h1 { font-size: clamp(1.9rem, 9vw, 2.6rem); }
  .option-color-popover {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .spin-btn, .option-color-btn, .color-swatch {
    transition: none;
    animation: none !important;
  }
  .bg-orb,
  .spin-btn-halo,
  .wheel-wrap::after { animation: none !important; }
  .last-result.revealed { animation: none; }
}

/* ===== v5: nyertes-overlay ===== */
.winner-overlay {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 24px; text-align: center;
  background: rgba(5, 11, 24, 0.85);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.winner-overlay.visible { opacity: 1; pointer-events: auto; }
.winner-overlay__label {
  font-size: 14px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase;
  color: #9fb2d9;
}
.winner-overlay__name {
  font-weight: 800; font-size: clamp(46px, 13vw, 120px); line-height: 1.05;
  color: #fff; word-break: break-word; max-width: 92vw;
  text-shadow: 0 10px 50px rgba(0, 0, 0, 0.55);
  animation: winnerPop 0.55s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.winner-overlay__hint { font-size: 12px; color: #7c8bad; }
@keyframes winnerPop {
  0% { transform: scale(0.55); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
