/* ============ JOMBASTIC — Kick Live Giveaway ============
   Horizontal avatar roulette with fixed gold pointers, winner reveal, local sound
   toggle, participant list and (admins only) the controls panel. Assets are the
   extracted sprite-sheet elements in assets/giveaway/. Scales with --u (1px at
   1672px wide) like the rest of the neon design system. */

.lg {
  --lg-card: clamp(84px, calc(150 * var(--u)), 150px);
  --lg-gap: clamp(8px, calc(14 * var(--u)), 14px);
  /* frame border widths = sprite slice × 0.58 at full width, scaling down with --u but never below a usable size */
  --lg-ft: max(30px, calc(68 * var(--u)));
  --lg-fs: max(34px, calc(75 * var(--u)));
  --lg-fb: max(28px, calc(64 * var(--u)));
  position: relative;
  width: min(calc(1560 * var(--u)), 100% - 32px);
  margin: 0 auto;
  padding-top: calc(24 * var(--u));
  text-align: center;
  color: var(--white);
}
.lg * { box-sizing: border-box; }

/* page background artwork behind the whole giveaway block */
.kl-page.lg-page { background-image: url('../assets/giveaway/bg-giveaway.webp'); background-size: 100% auto; }
@media (max-width: 560px) { .kl-page.lg-page { background-size: auto 100svh; } }

/* ---------- title + live pill + instructions ---------- */
.lg-title { display: flex; justify-content: center; margin: 0 auto; }
.lg-title img { width: min(calc(820 * var(--u)), 92vw); height: auto; }
.lg-live {
  display: inline-flex; align-items: center; gap: 10px;
  margin: calc(6 * var(--u)) auto 0; padding: 0 22px; min-height: 46px;
  font: italic 800 17px/1 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--white);
  text-decoration: none;
  --nf-fill: linear-gradient(180deg, rgba(10, 30, 8, 0.9), rgba(5, 14, 4, 0.95));
}
.lg-live .ico { width: 20px; height: 20px; color: var(--green); }
.lg-live .ico svg { width: 100%; height: 100%; fill: currentColor; }
.lg-live .lg-dot { width: 10px; height: 10px; border-radius: 50%; background: #666; box-shadow: none; }
.lg-live.is-live .lg-dot { background: var(--green); box-shadow: 0 0 8px var(--green), 0 0 16px rgba(83, 252, 24, 0.6); animation: lg-pulse 1.6s ease-in-out infinite; }
.lg-live.is-off { --nf-fill: linear-gradient(180deg, rgba(30, 8, 36, 0.9), rgba(14, 1, 22, 0.95)); }
.lg-live.is-off .ico { color: var(--muted); }
.lg-live.is-unknown .lg-dot { background: #a08cb0; }
@keyframes lg-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.lg-howto { margin: calc(14 * var(--u)) 0 0; font-size: clamp(16px, calc(24 * var(--u)), 24px); font-weight: 600; color: var(--white); }
.lg-howto b { font: italic 900 1.15em/1 var(--font-display); color: var(--magenta); text-shadow: 0 0 12px rgba(237, 0, 255, 0.7); }
.lg-howto a { color: var(--white); text-decoration: underline; text-decoration-color: rgba(237, 0, 255, 0.6); text-underline-offset: 3px; }

/* ---------- badges row ---------- */
.lg-badges { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 14px 60px; margin-top: calc(26 * var(--u)); min-height: 52px; }
/* badges: chamfered neon hexagon drawn in CSS (keeps proportions at any width); the
   sprite versions stretched their middle section when the text got long */
.lg-badge {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 52px; padding: 10px 40px; color: #fff; --chamfer: 24px;
  font: italic 800 clamp(14px, calc(18 * var(--u)), 18px)/1.1 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase;
  filter: drop-shadow(0 0 5px rgba(237, 0, 255, 0.9)) drop-shadow(0 0 16px rgba(237, 0, 255, 0.45));
}
.lg-badge::before, .lg-badge::after { content: ''; position: absolute; z-index: -1; }
.lg-badge::before { inset: 0; background: linear-gradient(90deg, #ff4dff, var(--magenta) 30%, var(--magenta) 70%, #ff4dff); clip-path: polygon(var(--chamfer) 0, calc(100% - var(--chamfer)) 0, 100% 50%, calc(100% - var(--chamfer)) 100%, var(--chamfer) 100%, 0 50%); }
.lg-badge::after { inset: 2px; background: linear-gradient(180deg, #2b0540, #130220); clip-path: polygon(calc(var(--chamfer) - 1px) 0, calc(100% - var(--chamfer) + 1px) 0, 100% 50%, calc(100% - var(--chamfer) + 1px) 100%, calc(var(--chamfer) - 1px) 100%, 0 50%); }
.lg-badge .ear { position: absolute; top: 50%; width: 12px; height: 12px; border: 2px solid var(--magenta); border-radius: 50%; background: #0c0218; transform: translateY(-50%); }
.lg-badge .ear.l { left: -18px; }
.lg-badge .ear.r { right: -18px; }
.lg-badge .ear::before { content: ''; position: absolute; top: 50%; width: 8px; height: 2px; background: var(--magenta); transform: translateY(-50%); }
.lg-badge .ear.l::before { right: -9px; }
.lg-badge .ear.r::before { left: -9px; }
.lg-badge .ico { width: 28px; height: 28px; color: var(--magenta); flex: 0 0 auto; }
.lg-badge .ico svg { width: 100%; height: 100%; stroke-width: 1.9; }
.lg-badge-status { grid-column: 2; justify-self: center; min-width: 250px; }
.lg-badge-status.is-open { color: #b6ffa3; }
.lg-badge-status.is-drawing { color: var(--gold); }
.lg-badge-status.is-winner { color: var(--gold); }
.lg-badge-prize { grid-column: 3; justify-self: end; padding-left: 30px; }
.lg-badge-prize .lg-prize-amt { font-size: 1.15em; }
.lg-badge-prize.hidden { display: none; }
@media (max-width: 1100px) {
  .lg-badges { grid-template-columns: 1fr; justify-items: center; gap: 18px; }
  .lg-badge-status, .lg-badge-prize { grid-column: 1; justify-self: center; }
}

/* ---------- roulette ---------- */
.lg-roulette { position: relative; margin-top: clamp(22px, calc(30 * var(--u)), 30px); isolation: isolate; }
.lg-frame {
  position: relative; z-index: 2; pointer-events: none;
  border-style: solid;
  border-width: var(--lg-ft) var(--lg-fs) var(--lg-fb) var(--lg-fs);
  border-image: url('../assets/giveaway/roulette-frame.webp') 117 130 110 130 stretch;
  box-sizing: content-box; /* the content box must hold a card plus its name */
  min-height: calc(var(--lg-card) + 56px);
}
.lg-frame::before { /* dark inset behind the cards */
  content: ''; position: absolute; inset: calc(var(--lg-ft) * -0.35) calc(var(--lg-fs) * -0.25) calc(var(--lg-fb) * -0.35);
  background: linear-gradient(180deg, rgba(20, 2, 32, 0.92), rgba(8, 1, 14, 0.96));
  z-index: -1;
}
.lg-viewport { position: absolute; left: 8px; right: 8px; top: 0; bottom: 0; overflow: hidden; z-index: 1; }
.lg-viewport::before, .lg-viewport::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: clamp(40px, 12%, 180px); z-index: 3; pointer-events: none;
}
.lg-viewport::before { left: 0; background: linear-gradient(90deg, rgba(12, 2, 24, 0.95), transparent); }
.lg-viewport::after { right: 0; background: linear-gradient(270deg, rgba(12, 2, 24, 0.95), transparent); }
.lg-track { position: absolute; top: 50%; left: 0; display: flex; gap: var(--lg-gap); transform: translate3d(0, -50%, 0); will-change: transform; }

.lg-card { position: relative; flex: 0 0 var(--lg-card); width: var(--lg-card); text-align: center; }
.lg-card-art { position: relative; width: var(--lg-card); height: var(--lg-card); }
.lg-card-img { position: absolute; inset: 9%; width: 82%; height: 82%; object-fit: cover; border-radius: 6px; background: #1a0526; }
.lg-card-frame { position: absolute; inset: -13%; width: 126%; max-width: none; height: 126%; pointer-events: none; }
.lg-crown, .lg-winner-avatar img.frame, .lg-winner-avatar img.pic { max-width: none; }
.lg-card-frame.gold { display: none; }
.lg-card-name {
  display: block; margin-top: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 700 clamp(11px, calc(15 * var(--u)), 15px)/1.2 var(--font-body); color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}
.lg-card.center { z-index: 2; }
.lg-card.winner .lg-card-frame.magenta { display: none; }
.lg-card.winner .lg-card-frame.gold { display: block; animation: lg-gold-in 0.6s ease-out; }
.lg-card.winner .lg-card-name { color: var(--gold); background: rgba(10, 2, 18, 0.9); border: 1px solid var(--gold); border-radius: 4px; padding: 2px 6px; }
.lg-card.winner .lg-crown { display: block; }
.lg-crown { display: none; position: absolute; left: 50%; top: -14%; width: 38%; height: auto; transform: translateX(-50%); z-index: 3; animation: lg-crown-in 0.7s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes lg-gold-in { from { opacity: 0; transform: scale(1.15); } to { opacity: 1; transform: none; } }
@keyframes lg-crown-in { from { opacity: 0; transform: translate(-50%, -40%); } to { opacity: 1; transform: translateX(-50%); } }
/* fallback avatar when Kick has no picture */
.lg-avatar-fallback {
  position: absolute; inset: 9%; display: flex; align-items: center; justify-content: center; border-radius: 6px;
  font: italic 900 clamp(26px, calc(48 * var(--u)), 48px)/1 var(--font-display); color: #fff; text-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
  background: linear-gradient(135deg, #5a0a7a, #ed00ff 55%, #ff5fc8);
}
.lg-avatar-fallback.h1 { background: linear-gradient(135deg, #1b1a7a, #4b69ff 55%, #58d6ff); }
.lg-avatar-fallback.h2 { background: linear-gradient(135deg, #0a4a2a, #19b55f 55%, #9dff8a); }
.lg-avatar-fallback.h3 { background: linear-gradient(135deg, #7a2a0a, #ff7a1a 55%, #ffd36b); }
.lg-avatar-fallback.h4 { background: linear-gradient(135deg, #5e0a2a, #ff009d 55%, #ff8ad8); }
.lg-card.placeholder .lg-avatar-fallback { background: linear-gradient(135deg, #22072f, #3b0b52); color: rgba(255, 255, 255, 0.35); }
.lg-card.placeholder .lg-card-name { color: var(--dim); }

/* fixed gold pointers */
.lg-pointer { position: absolute; left: 50%; width: clamp(34px, calc(60 * var(--u)), 60px); transform: translateX(-50%); z-index: 4; pointer-events: none; }
.lg-pointer.top { top: calc(-1 * clamp(14px, calc(26 * var(--u)), 26px)); }
.lg-pointer.bottom { bottom: calc(-1 * clamp(14px, calc(26 * var(--u)), 26px)); }
.lg-pointer img { width: 100%; height: auto; display: block; }
.lg-roulette.is-drawing .lg-pointer { animation: lg-pointer-glow 0.9s ease-in-out infinite; }
@keyframes lg-pointer-glow { 50% { filter: brightness(1.35) drop-shadow(0 0 8px rgba(255, 196, 0, 0.8)); } }

/* empty / message overlay in the reel */
.lg-reel-msg {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 2; padding: 0 12%;
  font: italic 800 clamp(15px, calc(22 * var(--u)), 22px)/1.3 var(--font-display); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.8); pointer-events: none;
}
.lg-reel-msg.hidden { display: none; }

/* ---------- bottom row ---------- */
.lg-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: calc(22 * var(--u)); }
.lg-sound {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 20px 0 14px;
  font: 600 15px/1 var(--font-body); color: #fff; background: none; border: 0; cursor: pointer;
}
.lg-sound img { width: 30px; height: auto; }
.lg-sound[aria-pressed="false"] img { filter: grayscale(1) brightness(0.75); }
.lg-sound[aria-pressed="false"]::after { content: ''; position: absolute; left: 20px; top: 50%; width: 26px; height: 2px; background: #ff6b8e; transform: rotate(-35deg); box-shadow: 0 0 6px #ff6b8e; }
.lg-sound { position: relative; }
.lg-roll {
  justify-self: center; position: relative; display: block; width: min(calc(470 * var(--u)), 86vw); padding: 0; margin: 0;
  background: none; border: 0; cursor: pointer; transition: transform 0.15s, filter 0.15s;
}
.lg-roll img { width: 100%; height: auto; display: block; }
.lg-roll:hover:not(:disabled) { transform: translateY(-2px) scale(1.02); filter: brightness(1.1) drop-shadow(0 0 18px rgba(237, 0, 255, 0.7)); }
.lg-roll:active:not(:disabled) { transform: scale(0.98); }
.lg-roll:disabled { cursor: not-allowed; filter: grayscale(0.6) brightness(0.55); }
.lg-roll:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.lg-roll-text { display: none; }
.lg-status-line { justify-self: center; font: italic 800 clamp(14px, calc(20 * var(--u)), 20px)/1.3 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lg-entries {
  justify-self: end; display: inline-flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 22px 0 14px;
  --nf-fill: linear-gradient(180deg, rgba(40, 4, 48, 0.75), rgba(14, 1, 22, 0.9));
}
.lg-entries img { width: 32px; height: auto; }
.lg-entries .num { font: italic 900 24px/1 var(--font-display); color: #fff; }
.lg-entries .lbl { font: italic 800 14px/1 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--magenta); }
.lg-entries .num.tick { animation: lg-tick 0.35s ease-out; }
@keyframes lg-tick { 0% { transform: scale(1.3); color: var(--gold); } }
@media (max-width: 760px) {
  .lg-bottom { grid-template-columns: 1fr 1fr; }
  .lg-roll, .lg-status-line { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
}

/* ---------- winner panel ---------- */
.lg-winner {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; text-align: left;
  width: min(640px, 100%); margin: 18px auto 0; padding: 16px 22px;
  --nf-fill: linear-gradient(180deg, rgba(44, 20, 4, 0.8), rgba(20, 8, 2, 0.95));
  animation: lg-winner-in 0.6s cubic-bezier(0.2, 1.2, 0.4, 1);
}
.lg-winner.hidden { display: none; }
.lg-winner-avatar { position: relative; width: 96px; height: 96px; }
.lg-winner-avatar img.pic { position: absolute; inset: 10%; width: 80%; height: 80%; object-fit: cover; border-radius: 6px; background: #1a0526; }
.lg-winner-avatar .lg-avatar-fallback { inset: 10%; font-size: 34px; }
.lg-winner-avatar img.frame { position: absolute; inset: -13%; width: 126%; height: 126%; }
.lg-winner-kicker { display: block; font: italic 800 13px/1 var(--font-display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.lg-winner-name { display: block; margin-top: 6px; font: italic 900 clamp(24px, calc(34 * var(--u)), 34px)/1.1 var(--font-display); color: #fff; text-shadow: 0 0 14px rgba(255, 196, 0, 0.6); overflow-wrap: anywhere; }
.lg-winner-prize { display: block; margin-top: 4px; font-size: 16px; color: var(--muted); }
.lg-winner-prize b { color: #fff; }
@keyframes lg-winner-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }
.lg-confetti { position: absolute; inset: -40px 0 0; pointer-events: none; overflow: visible; }
.lg-confetti i {
  position: absolute; top: 0; left: var(--x); width: 7px; height: 11px; border-radius: 2px; background: var(--c); opacity: 0;
  animation: lg-confetti 1.8s var(--d) ease-out forwards;
}
@keyframes lg-confetti {
  0% { opacity: 0; transform: translateY(0) rotate(0); }
  10% { opacity: 1; }
  100% { opacity: 0; transform: translateY(190px) rotate(var(--r)); }
}

/* ---------- participants (public) ---------- */
.lg-participants { width: 100%; margin: 16px auto 0; text-align: left; }
.lg-participants summary {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; padding: 10px 16px;
  font: italic 800 15px/1 var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; color: #fff;
  border: 1px solid rgba(237, 0, 255, 0.5); border-radius: 6px; background: rgba(14, 1, 22, 0.8);
}
.lg-participants summary::-webkit-details-marker { display: none; }
.lg-participants summary .count { color: var(--magenta); }
.lg-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.lg-chip {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px;
  border: 1px solid rgba(237, 0, 255, 0.45); border-radius: 6px; background: rgba(14, 1, 22, 0.8);
}
.lg-chip .av { position: relative; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 4px; overflow: hidden; background: #1a0526; }
.lg-chip .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lg-chip .av .lg-avatar-fallback { inset: 0; border-radius: 4px; font-size: 16px; }
.lg-chip .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; color: #fff; }
.lg-chip.removed { opacity: 0.55; }
.lg-chip.removed .nm { text-decoration: line-through; }
.lg-chip.won .nm::after { content: ' 👑'; }
.lg-chip .act { flex: 0 0 auto; }
.lg-note { margin: 12px 0 0; font-size: 13px; color: var(--dim); }

/* ---------- admin controls ---------- */
.lg-admin { width: 100%; margin: 18px auto 0; text-align: left; }
/* compact stream-safe control bar */
.lg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; --nf-fill: linear-gradient(180deg, rgba(28, 3, 36, 0.88), rgba(12, 1, 20, 0.95)); }
.lg-bar-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.lg-bar-field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.lg-bar-field input { width: 220px; max-width: 100%; height: 38px; padding: 0 12px; color: #fff; font: 600 14px/1 var(--font-body); background: rgba(9, 1, 18, 0.85); border: 1px solid rgba(237, 0, 255, 0.5); border-radius: 6px; }
.lg-bar-field.sm input { width: 130px; }
.lg-bar-field.xs input { width: 84px; }
.lg-bar-field input:focus { outline: none; border-color: var(--magenta); box-shadow: 0 0 10px rgba(237, 0, 255, 0.5); }
.lg-bar-field input:disabled { opacity: 0.5; }
.lg-bar-form .btn-mini { height: 38px; }
.lg-bar-sep { width: 1px; height: 36px; background: rgba(237, 0, 255, 0.35); }
.lg-bar-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: #fff; }
.lg-bar-note { font-size: 13px; color: var(--muted); }
.lg-bar-right { display: inline-flex; gap: 8px; margin-left: auto; }
@media (max-width: 760px) { .lg-bar-sep { display: none; } .lg-bar-right { margin-left: 0; } .lg-bar-field input { width: 100%; } .lg-bar-form { width: 100%; } .lg-bar-field { flex: 1 1 140px; } }
.lg-admin.hidden { display: none; }
.lg-admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.lg-admin-head h2 { margin: 0; font-size: 26px; }
.lg-admin-grid { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(0, 2fr); gap: 18px; }
@media (max-width: 1000px) { .lg-admin-grid { grid-template-columns: 1fr; } }
.lg-panel { padding: 20px 22px 18px; }
.lg-panel h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font: italic 800 18px/1.2 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; color: #fff; }
.lg-panel h3 .accent { color: var(--magenta); }
.lg-panel h3 img { width: 26px; height: auto; }
.lg-panel h3 .right { margin-left: auto; font: 500 13px/1 var(--font-body); letter-spacing: 0; text-transform: none; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.lg-health { display: grid; gap: 6px; margin-bottom: 14px; font-size: 14px; color: var(--muted); }
.lg-health .row { display: flex; gap: 10px; align-items: baseline; }
.lg-health .row .k { flex: 0 0 120px; color: var(--dim); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.lg-health .row .v { flex: 1; min-width: 0; color: #fff; overflow-wrap: anywhere; }
.lg-health code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--magenta); overflow-wrap: anywhere; }
.lg-dotst { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #777; margin-right: 6px; vertical-align: middle; }
.lg-dotst.ok { background: var(--green); box-shadow: 0 0 6px var(--green); }
.lg-dotst.warn { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.lg-dotst.bad { background: #ff4d6d; box-shadow: 0 0 6px #ff4d6d; }
.lg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lg-actions .btn-mini.primary { background: rgba(237, 0, 255, 0.35); }
.lg-actions .btn-mini.gold { border-color: var(--gold); background: rgba(255, 196, 0, 0.15); color: #fff; }
.lg-actions .btn-mini.gold:hover:not(:disabled) { background: rgba(255, 196, 0, 0.35); box-shadow: 0 0 10px rgba(255, 196, 0, 0.5); }
.lg-form .field-row { grid-template-columns: 1fr 1fr; }
.lg-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 0 14px; border: 1px solid rgba(237, 0, 255, 0.5); border-radius: 6px; background: rgba(9, 1, 18, 0.85); color: #fff; font-size: 15px; font-weight: 600; }
.lg-toggle { position: relative; width: 54px; height: 28px; border-radius: 14px; border: 0; background: rgba(120, 100, 130, 0.5); cursor: pointer; transition: background 0.2s; }
.lg-toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.lg-toggle[aria-checked="true"] { background: var(--magenta); box-shadow: 0 0 10px rgba(237, 0, 255, 0.7); }
.lg-toggle[aria-checked="true"]::after { transform: translateX(26px); background: url('../assets/giveaway/orb-magenta.png') center / 160% no-repeat #fff; }
.lg-toggle:disabled { opacity: 0.5; cursor: not-allowed; }
.lg-confirm { margin-top: 10px; padding: 12px 14px; border: 1px solid rgba(255, 196, 0, 0.6); border-radius: 6px; background: rgba(40, 24, 2, 0.6); }
.lg-confirm.hidden { display: none; }
.lg-confirm p { margin: 0 0 8px; font-size: 14px; color: #fff; }
.lg-confirm input { width: 100%; height: 40px; padding: 0 12px; margin-bottom: 8px; color: #fff; font: inherit; background: rgba(9, 1, 18, 0.85); border: 1px solid rgba(255, 196, 0, 0.5); border-radius: 6px; }
.lg-search { width: 100%; height: 42px; padding: 0 12px; margin-bottom: 10px; color: #fff; font: inherit; background: rgba(9, 1, 18, 0.85); border: 1px solid rgba(237, 0, 255, 0.5); border-radius: 6px; }
.lg-search:focus { outline: none; border-color: var(--magenta); box-shadow: 0 0 10px rgba(237, 0, 255, 0.5); }
.lg-admin .lg-chips { max-height: 420px; overflow: auto; padding-right: 4px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
/* admin page: entrants as a scrollable list with room for names, time and actions */
.ag .lg-admin-grid { grid-template-columns: minmax(340px, 1fr) minmax(0, 1.5fr); }
.ag .lg-chips { grid-template-columns: 1fr; gap: 6px; max-height: 520px; overflow: auto; padding-right: 4px; }
.ag .lg-chip { min-height: 44px; padding: 4px 8px 4px 6px; }
.ag .lg-chip .meta { flex: 0 0 auto; font-size: 12px; color: var(--dim); white-space: nowrap; }
.ag .lg-chip .act .btn-mini { min-height: 30px; padding: 5px 10px; font-size: 11px; }
.ag .lg-health .row .k { flex-basis: 108px; }
.ag .lg-health { font-size: 13px; }
@media (max-width: 700px) { .ag .lg-chip .meta { display: none; } }
.lg-history { margin-top: 18px; }
.lg-history summary { cursor: pointer; font: italic 800 15px/1.2 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; color: #fff; }
.lg-history table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 13px; color: var(--muted); }
.lg-history th, .lg-history td { padding: 6px 8px; text-align: left; border-bottom: 1px solid rgba(237, 0, 255, 0.2); vertical-align: top; }
.lg-history th { color: var(--dim); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 11px; }
.lg-audit { margin: 10px 0 0; padding: 0; list-style: none; max-height: 240px; overflow: auto; font-size: 13px; color: var(--muted); }
.lg-audit li { padding: 5px 0; border-bottom: 1px solid rgba(237, 0, 255, 0.15); }
.lg-audit time { color: var(--dim); margin-right: 8px; font-variant-numeric: tabular-nums; }
.lg-audit b { color: #fff; font-weight: 600; }
.lg-msg { min-height: 1.4em; margin: 10px 0 0; font-size: 14px; }
.lg-msg.error { color: #ff6b8e; }
.lg-msg.success { color: #9dff8a; }
.lg-show-controls { position: fixed; right: 14px; bottom: 14px; z-index: 2000; opacity: 1; background: rgba(20, 2, 30, 0.95); box-shadow: 0 0 12px rgba(237, 0, 255, 0.6); }
.lg-show-controls:hover, .lg-show-controls:focus-visible { opacity: 1; }
.lg-show-controls.hidden { display: none; }
.lg-setup { margin: 14px auto 0; max-width: 720px; padding: 14px 18px; text-align: left; font-size: 14px; color: var(--muted); border: 1px solid rgba(255, 196, 0, 0.5); border-radius: 6px; background: rgba(40, 24, 2, 0.55); }
.lg-setup code { font-family: ui-monospace, Menlo, monospace; color: var(--gold); }
.lg-setup.hidden { display: none; }

/* loading skeleton */
.lg[aria-busy="true"] .lg-track { opacity: 0.4; }

@media (prefers-reduced-motion: reduce) {
  .lg-live.is-live .lg-dot, .lg-roulette.is-drawing .lg-pointer, .lg-entries .num.tick { animation: none; }
  .lg-winner, .lg-card.winner .lg-card-frame.gold, .lg-crown { animation: none; }
  .lg-confetti { display: none; }
}

/* admin: sound rows */
.lg-sounds { display: grid; gap: 8px; }
.lg-sound-row { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid rgba(237, 0, 255, 0.35); border-radius: 6px; background: rgba(9, 1, 18, 0.6); color: #fff; text-transform: uppercase; font: italic 800 13px/1 var(--font-display); letter-spacing: 0.08em; }
.lg-sound-row .lg-note { text-transform: none; font: 400 12px/1.3 var(--font-body); letter-spacing: 0; }
@media (max-width: 600px) { .lg-sound-row { grid-template-columns: 56px 1fr; } .lg-sound-row .lg-actions { grid-column: 1 / -1; } }

/* ---------- OBS overlay mode (live-giveaway.html?overlay=1[&bg=0][&scale=1.2]) ---------- */
html.overlay { --header-h: 0px; --overlay-scale: 1; }
html.overlay body { overflow: hidden; }
html.overlay .sh, html.overlay .sf, html.overlay .intro, html.overlay .push-toast, html.overlay .skip-link,
html.overlay .lg-sound, html.overlay .lg-participants, html.overlay .lg-admin, html.overlay .lg-show-controls, html.overlay .lg-setup,
html.overlay .lg-roll, html.overlay .hero-particles { display: none !important; }
html.overlay .page-inner { padding-top: 0; min-height: 100vh; }
html.overlay .kl-page::after { display: none; }
html.overlay .lg { zoom: var(--overlay-scale); padding-top: 12px; padding-bottom: 24px; }
html.overlay .lg-bottom { grid-template-columns: 1fr auto 1fr; }
html.overlay .lg-status-line { display: block !important; }
html.overlay .lg-entries { grid-column: 3; }
html.overlay.overlay-nobg body, html.overlay.overlay-nobg .kl-page, html.overlay.overlay-nobg .page-inner { background: transparent !important; }
html.overlay.overlay-nobg .lg-frame::before { background: linear-gradient(180deg, rgba(20, 2, 32, 0.96), rgba(8, 1, 14, 0.98)); }
html.overlay.overlay-nobg .lg-howto, html.overlay.overlay-nobg .lg-status-line { text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9); }

/* overlay: the winner card pops up in front of the roulette instead of below it */
html.overlay .lg-winner {
  position: fixed; left: 50%; top: 50%; z-index: 100; margin: 0;
  width: min(720px, 92vw); padding: 26px 34px; grid-template-columns: auto 1fr; gap: 28px;
  --nf-fill: linear-gradient(180deg, rgba(52, 24, 4, 0.96), rgba(22, 8, 2, 0.98));
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 24px rgba(255, 196, 0, 0.55)) drop-shadow(0 0 60px rgba(237, 0, 255, 0.35));
  animation: lg-winner-pop 0.7s cubic-bezier(0.2, 1.3, 0.4, 1);
}
html.overlay .lg-winner.hidden { display: none; }
html.overlay .lg-winner-avatar { width: 150px; height: 150px; }
html.overlay .lg-winner-avatar .lg-avatar-fallback { font-size: 56px; }
html.overlay .lg-winner-kicker { font-size: 18px; letter-spacing: 0.22em; }
html.overlay .lg-winner-name { font-size: clamp(34px, 4vw, 56px); margin-top: 8px; }
html.overlay .lg-winner-prize { font-size: 22px; margin-top: 8px; }
html.overlay .lg-confetti { inset: -60px -40px 0; }
html.overlay .lg-confetti i { width: 10px; height: 16px; }
@keyframes lg-winner-pop { from { opacity: 0; transform: translate(-50%, -50%) scale(0.6); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@media (prefers-reduced-motion: reduce) { html.overlay .lg-winner { animation: none; } }

/* winner claim countdown */
.lg-claim { display: block; margin-top: 10px; }
.lg-claim.hidden { display: none; }
.lg-claim-text { display: block; font: 700 14px/1.3 var(--font-body); color: var(--gold); }
.lg-claim-bar { display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: rgba(255, 196, 0, 0.18); overflow: hidden; }
.lg-claim-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ffc400, #ff7a1a); box-shadow: 0 0 8px rgba(255, 196, 0, 0.8); transition: width 0.25s linear; }
.lg-claim.is-claimed .lg-claim-text { color: #9dff8a; }
.lg-claim.is-claimed .lg-claim-bar i { background: #53fc18; box-shadow: 0 0 8px rgba(83, 252, 24, 0.8); }
.lg-claim.is-expired .lg-claim-text, .lg-claim.is-cancelled .lg-claim-text { color: #ff6b8e; }
html.overlay .lg-claim-text { font-size: 20px; }
html.overlay .lg-claim-bar { height: 10px; margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .lg-claim-bar i { transition: none; } }

/* overlay bottom row: status text centered under the pointer, counter on the right */
html.overlay .lg-bottom { grid-template-columns: 1fr auto 1fr; }
html.overlay .lg-status-line { grid-column: 2; }
html.overlay .lg-entries { grid-column: 3; justify-self: end; }
html.overlay .lg-badges { gap: 18px 72px; }
