/* ============================================================
   GiveawayGems — light, bright, PURPLE (real brand #474099)
   white + blush→lilac gradients · Poppins display + Inter data · diamond motif
   ============================================================ */
:root {
  /* real brand purple (exact, from footer-mark.svg / wordmark.png) */
  --purple: #474099;
  --purple-deep: #352a72;
  --purple-bright: #6b5fd6;
  --purple-200: #d9d4f2;
  --lilac: #eceaf6;
  --blush: #fbf2f3;

  --surface: #ffffff;
  --ink: #232338;          /* body text: dark slate */
  --muted: #6c6c88;
  --muted-2: #9a9ab2;

  --line: rgba(71, 64, 153, 0.12);
  --line-strong: rgba(71, 64, 153, 0.30);
  --glow: rgba(107, 95, 214, 0.18);

  --ok: #2f9e6e;
  --warn: #b8852b;
  --danger: #c0405a;

  --radius: 16px;
  --radius-lg: 22px;
  --shadow-soft: 0 8px 24px rgba(71, 64, 153, 0.10);
  --shadow: 0 18px 46px rgba(71, 64, 153, 0.18);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font-display: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  background: linear-gradient(155deg, var(--blush) 0%, #f6f1f8 38%, var(--lilac) 100%) fixed;
}
/* airy light depth: soft blush + lilac glows */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 88% -6%, rgba(233, 182, 198, 0.30), transparent 60%),
    radial-gradient(55% 45% at 6% 4%, rgba(124, 108, 230, 0.12), transparent 60%),
    radial-gradient(70% 50% at 50% 108%, rgba(107, 95, 214, 0.08), transparent 60%);
}
a { color: var(--purple); text-decoration: none; }
::selection { background: rgba(107, 95, 214, 0.22); }

h1, h2, h3 { font-family: var(--font-display); color: var(--purple); }

/* ---- topbar ---- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,0.6), 0 6px 24px rgba(71,64,153,0.05);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { height: 40px; width: auto; display: block; }
/* the gem fallback is square — keep it smaller than the wide wordmark */
.brand-mark.logo-fallback { height: 32px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--purple); }
.who { color: var(--muted-2); font-size: 12.5px; letter-spacing: 0.02em; }

.app { max-width: 1100px; margin: 0 auto; padding: 40px 24px 80px; }
.loading, .empty { color: var(--muted); padding: 64px 0; text-align: center; font-family: var(--font-display); font-size: 18px; }
.empty code { color: var(--purple); background: var(--lilac); padding: 2px 7px; border-radius: 6px; }
.error { color: var(--danger); background: #fdecef; border: 1px solid #f3c9d2; padding: 14px 16px; border-radius: 12px; margin: 16px 0; }

h1 { font-size: clamp(30px, 5vw, 44px); margin: 4px 0 6px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.08; }
h1 em, .accent { font-style: normal; color: var(--purple-bright); }
h2 { font-size: 18px; margin: 40px 0 16px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.sub { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.34em; font-size: 11px; color: var(--purple-bright); font-family: var(--font-ui); font-weight: 600; }
.back { display: inline-block; margin-bottom: 16px; color: var(--muted); font-size: 13px; letter-spacing: 0.04em; transition: color .2s; }
.back:hover { color: var(--purple); }
.muted { color: var(--muted-2); }

/* ---- competition cards ---- */
.grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }
.card {
  position: relative; display: block; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card-hero { position: relative; aspect-ratio: 16 / 11; overflow: hidden; background: linear-gradient(160deg, var(--blush), var(--lilac)); }
.card-hero .hero-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
a.card:hover .hero-img { transform: scale(1.05); }
.card-hero .img-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.card-hero .img-fallback img { width: 34%; opacity: .55; }
.card-hero .badge { position: absolute; top: 12px; left: 12px; }
.price-tag {
  position: absolute; top: 12px; right: 12px; font-family: var(--font-ui); font-weight: 700;
  font-variant-numeric: tabular-nums; font-size: 13px; padding: 5px 12px; border-radius: 999px;
  background: #fff; color: var(--purple); box-shadow: var(--shadow-soft); border: 1px solid var(--line);
}
/* diamond stat badge — echoes the storefront "% SOLD" diamond.
   Sits fully inside the hero (the hero clips overflow, so it can't hang below). */
.diamond-badge {
  position: absolute; bottom: 22px; right: 20px; width: 64px; height: 64px;
  background: linear-gradient(150deg, var(--purple-bright), var(--purple)); transform: rotate(45deg);
  border-radius: 14px; box-shadow: 0 8px 18px rgba(71,64,153,0.35); border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
}
.diamond-badge > span { transform: rotate(-45deg); text-align: center; color: #fff; line-height: 1; }
.diamond-badge .num { font-family: var(--font-display); font-weight: 700; font-size: 18px; display: block; }
.diamond-badge .lbl { font-size: 8px; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
.card-body { padding: 22px 20px 20px; }
.card-body .title { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.25; color: var(--purple); }
.card-body .vendor { color: var(--muted-2); font-size: 11px; text-transform: uppercase; letter-spacing: .16em; margin-top: 5px; }
.card-body .meta { color: var(--muted); font-size: 13px; margin-top: 14px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.big { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--purple); font-variant-numeric: tabular-nums; }
.countdown { font-size: 12px; font-weight: 600; color: var(--purple); background: var(--lilac); padding: 4px 10px; border-radius: 999px; }

.badge {
  font-family: var(--font-ui); font-size: 10px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .12em; white-space: nowrap; border: 1px solid transparent; box-shadow: var(--shadow-soft);
}
.badge.open { color: #fff; background: linear-gradient(135deg, var(--purple-bright), var(--purple)); }
.badge.closed { color: var(--muted); background: #fff; border-color: var(--line); }
.badge.drawn { color: var(--purple); background: #fff; border-color: var(--line-strong); }

/* ---- buttons ---- */
.btns { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0; align-items: center; }
button, .btn {
  font-family: var(--font-ui); font-size: 14px; font-weight: 600; cursor: pointer; line-height: 1;
  border-radius: 12px; padding: 13px 22px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--purple); letter-spacing: 0.02em;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .2s var(--ease), color .2s var(--ease), filter .2s var(--ease);
}
button:active, .btn:active { transform: translateY(1px); }
.btn-primary {
  border: none; color: #fff;
  background: linear-gradient(135deg, var(--purple-bright), var(--purple) 70%);
  box-shadow: 0 8px 22px rgba(71, 64, 153, 0.32);
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 10px 28px rgba(71, 64, 153, 0.4); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: #fff; }
.btn-ghost:hover { border-color: var(--purple); background: var(--lilac); }

/* ---- entries table ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--purple); font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; background: var(--lilac); }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s var(--ease); }
tbody tr:hover { background: #faf8fe; }
td.ticket { font-family: var(--font-ui); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16px; letter-spacing: 2px; color: var(--purple); }
tr.voided td.ticket { color: var(--muted-2); text-decoration: line-through; }
.pill { font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .1em; }
.pill.eligible { color: var(--purple); background: var(--lilac); }
.pill.voided { color: var(--muted-2); background: #f0f0f4; }

/* ---- privacy: contact reveal ---- */
.reveal-btn { padding: 8px 14px; border-radius: 10px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line-strong); background: #fff; color: var(--purple); }
.reveal-btn:hover { background: var(--lilac); }
.pd-note { display: flex; align-items: center; gap: 6px; color: var(--muted-2); font-size: 11px; margin-top: 7px; }
.pd-note::before { content: "🔒"; font-size: 10px; }
.contact { display: none; font-size: 13.5px; line-height: 1.7; }
.contact.show { display: block; animation: fade .25s var(--ease); }
.contact .crow { display: flex; gap: 10px; }
.contact .clabel { color: var(--purple); min-width: 64px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; padding-top: 2px; }
.contact .hide-btn { margin-top: 10px; font-size: 12px; padding: 5px 12px; border-radius: 9px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
@keyframes fade { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* ---- detail hero (product) ---- */
.detail-hero { display: flex; gap: 30px; align-items: flex-start; margin: 6px 0 10px; }
.detail-media { flex: 0 0 40%; max-width: 420px; }
.detail-img, .detail-media .img-fallback {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; border-radius: var(--radius-lg);
  border: 1px solid var(--line); box-shadow: var(--shadow-soft);
}
.detail-media .img-fallback { display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--blush), var(--lilac)); }
.detail-media .img-fallback img { width: 34%; opacity: .55; }
.detail-info { flex: 1; min-width: 0; }
.detail-price { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--purple); }
.detail-vendor { color: var(--muted-2); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; margin: 4px 0 16px; }
.detail-desc { color: var(--muted); line-height: 1.7; font-size: 14.5px; }
.detail-desc p { margin: 0 0 10px; }
.detail-desc :is(h1,h2,h3,h4) { font-family: var(--font-display); color: var(--ink); text-transform: none; letter-spacing: 0; margin: 14px 0 6px; }
.detail-desc a { color: var(--purple); }
.detail-desc img { max-width: 100%; height: auto; border-radius: 10px; }
@media (max-width: 760px) { .detail-hero { flex-direction: column; gap: 18px; } .detail-media { flex-basis: auto; max-width: none; width: 100%; } }

/* prefix editor */
.prefix-row { display: flex; align-items: center; gap: 12px; margin: 2px 0 18px; flex-wrap: wrap; }
.prefix-label { color: var(--muted-2); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; }
.prefix-code { font-family: var(--font-ui); letter-spacing: 2px; color: var(--purple); font-weight: 700; background: var(--lilac); padding: 5px 12px; border-radius: 8px; }
.ctl-sm { padding: 6px 12px; border-radius: 8px; font-size: 12.5px; border: 1px solid var(--line-strong); background: #fff; color: var(--purple); }
.ctl-sm:hover { background: var(--lilac); }

/* ============================================================
   LIVE-DRAW STAGE — light, purple, diamond, camera-ready
   ============================================================ */
/* Live-stream takeover: while the stage is open, hide ALL admin chrome so the
   entries table, CSV export, draw/admin buttons and any PII can never bleed
   into a screen-share. The opaque full-screen overlay is the only thing shown. */
body.presenting { overflow: hidden; }
body.presenting .topbar,
body.presenting #app { display: none !important; }

.overlay {
  position: fixed; inset: 0; z-index: 100; overflow: hidden;
  display: flex; flex-direction: column; text-align: center;
  background: linear-gradient(160deg, var(--blush) 0%, #f4eef7 40%, var(--lilac) 100%);
  animation: fade .35s var(--ease);
}
.overlay::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(50% 40% at 85% 6%, rgba(233,182,198,0.4), transparent 60%),
    radial-gradient(55% 45% at 10% 96%, rgba(124,108,230,0.14), transparent 60%);
}
/* prize image as a soft hero behind the stage (light) */
.stage-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; background-size: cover; background-position: center; opacity: 0.10; filter: blur(28px) saturate(1.1); transform: scale(1.15); }
/* scrollable, centred content area — generous top/bottom padding so nothing
   touches the viewport edges or the docked controls */
.stage-scroll {
  position: relative; z-index: 2; flex: 1 1 auto; min-height: 0; width: 100%;
  overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(76px, 11vh, 132px) 24px clamp(24px, 4vh, 48px);
}
.draw-stage { position: relative; z-index: 2; width: 100%; max-width: 720px; margin: auto; display: flex; flex-direction: column; align-items: center; }
/* controls docked in their own row at the bottom — never overlap content */
.stage-dock { position: relative; z-index: 6; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; width: 100%; padding: 16px 24px clamp(34px, 6vh, 72px); }
.stage-exit { position: fixed; top: 22px; right: 24px; z-index: 6; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--muted); box-shadow: var(--shadow-soft); }
.stage-exit:hover { color: var(--purple); }
.stage-brand { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.stage-brand .stage-logo { height: 52px; }
.stage-brand .stage-logo.logo-fallback { height: 44px; }
.stage-brand .stage-wordmark { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: .12em; text-transform: uppercase; color: var(--purple); }
.stage-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 4vw, 32px); margin: 0 0 26px; color: var(--ink); text-transform: uppercase; letter-spacing: .06em; }
.stage-title .accent { color: var(--purple); }
/* in the clean stream view the prize panel already names the prize */
.overlay.is-presentation .stage-title { display: none; }
.stage-main { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: clamp(20px, 4vw, 56px); width: 100%; }
.prize-panel { display: flex; flex-direction: column; align-items: center; gap: 14px; flex: 0 0 auto; max-width: 300px; }
.prize-img { width: clamp(170px, 23vw, 290px); aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); }
.prize-meta { text-align: center; }
.prize-name { font-family: var(--font-display); font-weight: 600; font-size: clamp(18px, 2.4vw, 24px); color: var(--purple); max-width: 18ch; }
.prize-price { color: var(--purple-bright); font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 4px; }

/* wheel (small draws) */
.draw-stage[data-mode="wheel"] .reel-wrap { display: none; }
.draw-stage[data-mode="reel"] .wheel-wrap { display: none; }
.wheel-wrap { position: relative; width: min(86vw, 480px); height: min(86vw, 480px); margin: 0 auto; }
.wheel-glow { position: absolute; inset: -12%; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 62%); filter: blur(22px); }
.wheel-ring { position: absolute; inset: 0; border-radius: 50%; padding: 12px; background: conic-gradient(from 0deg, var(--purple-deep), var(--purple-bright), #fff, var(--purple), var(--purple-deep), var(--purple-bright), var(--purple)); box-shadow: 0 0 0 1px var(--line), 0 24px 60px rgba(71,64,153,0.3); }
.wheel-wrap canvas { position: relative; width: 100%; height: 100%; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 5px #fff; }
.pointer { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); z-index: 4; width: 0; height: 0; border-left: 20px solid transparent; border-right: 20px solid transparent; border-top: 36px solid var(--purple); filter: drop-shadow(0 3px 5px rgba(71,64,153,0.4)); }
.hub { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3; width: 84px; height: 84px; border-radius: 50%; background: #fff; border: 2px solid var(--purple); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(71,64,153,0.25); }
.hub img { width: 46px; }
.draw-status { margin-top: 28px; font-family: var(--font-display); font-weight: 500; font-size: clamp(15px, 3vw, 20px); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); min-height: 26px; }

.stage-cta { margin-top: 26px; }
.stage-cta .btn-primary { font-size: 16px; padding: 16px 40px; }

/* winner reveal */
.winner-reveal { position: relative; z-index: 2; margin-top: 10px; animation: rise .6s var(--ease); }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.winner-reveal .label { color: var(--purple-bright); font-size: 12px; letter-spacing: .42em; text-transform: uppercase; margin-bottom: 4px; padding-left: .42em; }
.winner-reveal .winner-name {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(38px, 9vw, 84px);
  line-height: 1.05; margin: 6px auto 18px; max-width: 18ch; color: var(--purple);
  letter-spacing: .01em;
}
.winner-reveal .ticket-chip { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-ui); font-variant-numeric: tabular-nums; font-size: clamp(20px, 5vw, 30px); font-weight: 700; letter-spacing: 3px; padding: 12px 26px; border-radius: 999px; color: var(--purple); background: #fff; border: 1px solid var(--line-strong); box-shadow: var(--shadow-soft); }
.winner-reveal .ticket-chip .t-label { font-family: var(--font-ui); font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--purple-bright); }
.preview-tag { margin-top: 16px; display: inline-block; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--purple); border: 1px dashed var(--line-strong); border-radius: 999px; padding: 5px 14px; }
.draw-close { margin-top: 30px; }
#confetti { position: fixed; inset: 0; z-index: 110; pointer-events: none; }

/* persistent (private) winner note on detail */
.winner-note { margin: 18px 0; padding: 20px 22px; border-radius: var(--radius); background: linear-gradient(135deg, var(--lilac), #fff); border: 1px solid var(--line-strong); box-shadow: var(--shadow-soft); }
.winner-note .label { color: var(--purple-bright); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; }
.winner-note .wn-name { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--purple); margin: 6px 0 2px; }
.winner-note .wn-meta { color: var(--muted); font-size: 14px; }
.winner-note .wn-meta strong { color: var(--purple); font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.winner-note .wn-audit { color: var(--muted-2); font-size: 11px; font-family: var(--font-ui); margin-top: 12px; word-break: break-all; }

/* stage controls — light pill, docked at the bottom (in normal flow) */
.stage-controls { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); flex-wrap: wrap; justify-content: center; max-width: 100%; }
.overlay.controls-hidden .stage-controls { display: none; }
.show-controls { display: none; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); box-shadow: var(--shadow-soft); }
.overlay.controls-hidden .show-controls { display: inline-flex; }
.seg { display: inline-flex; background: var(--lilac); border-radius: 999px; padding: 3px; }
.seg button { border: none; background: transparent; color: var(--muted); padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.seg button.seg-on { background: linear-gradient(135deg, var(--purple-bright), var(--purple)); color: #fff; }
.ctl { padding: 9px 15px; border-radius: 999px; font-size: 12.5px; border: 1px solid var(--line); background: #fff; color: var(--muted); }
.ctl:hover { color: var(--purple); border-color: var(--line-strong); }
.ctl-debug { color: var(--purple); border-style: dashed; }
.ctl-debug:hover { background: var(--lilac); }

/* ============================================================
   TICKET REEL — slot-machine / odometer (primary for large draws)
   ============================================================ */
.reel-wrap { max-width: 96vw; overflow: hidden; }
.reel {
  position: relative; display: flex; align-items: center; justify-content: center;
  gap: clamp(3px, 0.8vw, 8px); padding: clamp(12px, 2.6vw, 22px) clamp(14px, 3vw, 26px);
  border-radius: 22px; background: #fff; border: 1px solid var(--line-strong); overflow: hidden;
  box-shadow: var(--shadow), inset 0 0 0 1px #fff;
}
.reel-col {
  position: relative; width: clamp(30px, 6.4vw, 58px); height: var(--dh); overflow: hidden;
  border-radius: 10px; background: linear-gradient(180deg, #fbfaff, #f1eefb);
  border: 1px solid var(--line); box-shadow: inset 0 0 12px rgba(71,64,153,0.06);
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.reel-col::before, .reel-col::after { content: ""; position: absolute; left: 0; right: 0; height: 34%; z-index: 2; pointer-events: none; }
.reel-col::before { top: 0; background: linear-gradient(180deg, #ffffff, transparent); }
.reel-col::after { bottom: 0; background: linear-gradient(0deg, #ffffff, transparent); }
.reel-col.locked { border-color: var(--purple); box-shadow: 0 0 18px rgba(107,95,214,0.4); }
.reel-strip { display: flex; flex-direction: column; will-change: transform; }
.reel-cell, .reel-sep { display: flex; align-items: center; justify-content: center; font-family: var(--font-ui); font-weight: 700; font-variant-numeric: tabular-nums; font-size: clamp(28px, 6vw, 50px); color: var(--purple); line-height: 1; }
.reel-sep { color: var(--purple-bright); padding: 0 1px; height: var(--dh); }
.reel.reel-done::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 38%, rgba(107,95,214,0.22) 50%, transparent 62%); transform: translateX(-120%); animation: reelShimmer 1s var(--ease) 1; }
@keyframes reelShimmer { to { transform: translateX(120%); } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ============================================================
   DETAIL — competition stats: entries, closes-in, sold progress
   ============================================================ */
.comp-stats { display: flex; gap: 28px; flex-wrap: wrap; margin: 16px 0 20px; }
.cstat { display: flex; flex-direction: column; gap: 3px; }
.cstat-num { font-family: var(--font-display); font-weight: 700; font-size: 26px; color: var(--purple); line-height: 1; font-variant-numeric: tabular-nums; }
.cstat-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; color: var(--muted-2); }

.cd-box { background: linear-gradient(135deg, var(--lilac), #fff); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 20px; }
.cd-label { font-size: 11px; text-transform: uppercase; letter-spacing: .2em; color: var(--purple-bright); font-weight: 600; margin-bottom: 8px; }
.cd-timer { display: flex; gap: 16px; }
.cd-seg { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 4vw, 30px); color: var(--purple); font-variant-numeric: tabular-nums; line-height: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cd-seg i { font-family: var(--font-ui); font-style: normal; font-weight: 600; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.cd-seg.cd-closed { font-size: 22px; }
.cd-none { color: var(--muted-2); font-size: 14px; }

.sold-box { margin: 0 0 8px; }
.sold-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sold-title { font-family: var(--font-display); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink); }
.sold-bar { position: relative; height: 12px; background: var(--lilac); border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(71,64,153,0.08); }
.sold-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--purple-bright), var(--purple)); transition: width .6s var(--ease); }
.sold-bar.no-cap { background: repeating-linear-gradient(90deg, var(--lilac) 0 10px, #fff 10px 20px); }
.sold-meta { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
/* diamond % SOLD badge in the stats header (smaller, inline) */
.sold-badge { position: static; width: 58px; height: 58px; border-radius: 13px; }
.sold-badge .num { font-size: 15px; }
.sold-badge .lbl { font-size: 7.5px; }

/* ============================================================
   PREFIX EDIT — locked state + confirm modal
   ============================================================ */
.ctl-sm:disabled { opacity: .5; cursor: not-allowed; background: #fff; color: var(--muted-2); border-color: var(--line); }
.prefix-lock { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted-2); }

.modal-overlay {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(35, 35, 56, 0.45); backdrop-filter: blur(4px); animation: fade .2s var(--ease);
}
.modal {
  width: 100%; max-width: 460px; text-align: left; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 26px 24px;
}
.modal-title { font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--purple); margin: 0 0 16px; text-transform: none; letter-spacing: 0; line-height: 1.35; }
.modal-input {
  width: 100%; font-family: var(--font-ui); font-weight: 700; font-size: 22px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--purple); padding: 12px 14px; border: 1px solid var(--line-strong);
  border-radius: 12px; background: var(--lilac);
}
.modal-input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(107,95,214,0.22); }
.modal-warn { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 14px 0 0; }
.modal-warn strong { color: var(--purple); font-family: var(--font-ui); font-variant-numeric: tabular-nums; }
.modal-err { color: var(--danger); font-size: 13px; font-weight: 500; margin-top: 12px; min-height: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 18px; }
.modal-actions .btn { padding: 11px 20px; }

/* highlighted winning entry in the entries table */
tr.winner-row td { background: linear-gradient(90deg, rgba(107,95,214,0.10), rgba(107,95,214,0.02)); }
tr.winner-row td.ticket { color: var(--purple); font-weight: 800; }
.pill.winner { color: #fff; background: linear-gradient(135deg, var(--purple-bright), var(--purple)); }

/* celebratory pop + glow when the ticket reel locks the winner */
.reel.reel-done { animation: reelPop .65s var(--ease) 1; }
@keyframes reelPop {
  0%   { transform: scale(1);    box-shadow: var(--shadow); }
  38%  { transform: scale(1.045); box-shadow: 0 0 0 1px var(--purple), 0 0 50px rgba(107,95,214,0.55), 0 24px 70px rgba(71,64,153,0.35); }
  100% { transform: scale(1);    box-shadow: var(--shadow); }
}

/* card sold-progress bar (sits at the bottom edge of the hero image) */
.card-sold { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(255,255,255,0.55); }
.card-sold-fill { height: 100%; background: linear-gradient(90deg, var(--purple-bright), var(--purple)); }

/* ============================================================
   ENTRIES — search toolbar + pagination
   ============================================================ */
.entries-toolbar { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; flex-wrap: wrap; }
.entry-search {
  flex: 1 1 280px; min-width: 220px; font-family: var(--font-ui); font-size: 14px;
  padding: 11px 15px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: #fff; color: var(--ink);
}
.entry-search::placeholder { color: var(--muted-2); }
.entry-search:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(107,95,214,0.18); }
.entry-count { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { max-height: 70vh; overflow: auto; }
.table-wrap thead th { position: sticky; top: 0; z-index: 1; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 16px 0 0; }
.pager .ctl-sm:disabled { opacity: .45; cursor: not-allowed; }
.pg-info { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
