/*
 * Member allocation dial.
 * A restrained market-desk treatment: one instrument, one ledger, one action.
 */
.giveaway-dialog {
  --draw-night: #0b1217;
  --draw-panel: #101b22;
  --draw-paper: #e8e7df;
  --draw-muted: #8d9aa1;
  --draw-brass: #c6a25a;
  --draw-blue: #7595a4;
  --draw-line: rgba(232,231,223,.11);
  width: min(94vw, 980px);
  max-width: calc(100vw - 24px);
  max-height: min(90dvh, 820px);
  overflow-y: auto;
  border: 1px solid var(--draw-line);
  border-radius: 10px;
  background: var(--draw-night);
  color: var(--draw-paper);
  box-shadow: 0 28px 90px rgba(0,0,0,.66), 0 0 0 1px rgba(0,0,0,.28);
}

.giveaway-dialog::backdrop {
  background: rgba(2,5,7,.88);
  backdrop-filter: blur(8px) saturate(.7);
}

.giveaway-dialog::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent 0 49.94%, rgba(232,231,223,.025) 50%, transparent 50.06%),
    linear-gradient(180deg, rgba(255,255,255,.018), transparent 28%);
  content: "";
}

.giveaway-dialog-shell { position: relative; z-index: 1; }
.giveaway-dialog .dialog-close-form { z-index: 12; top: 18px; right: 20px; }
.giveaway-dialog .dialog-close {
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #87939a;
}
.giveaway-dialog .dialog-close:hover {
  border-color: var(--draw-line);
  background: rgba(232,231,223,.035);
  color: var(--draw-paper);
}
.giveaway-dialog .dialog-close:focus-visible { outline: 2px solid var(--draw-brass); outline-offset: 2px; }
.giveaway-dialog .dialog-close:active { transform: scale(.97); }

.giveaway-dialog-header {
  position: relative;
  padding: 28px 78px 24px 34px;
  border-bottom: 1px solid var(--draw-line);
  background: transparent;
  text-align: left;
}
.giveaway-dialog-header::after {
  position: absolute;
  bottom: -1px;
  left: 34px;
  width: 76px;
  height: 1px;
  background: var(--draw-brass);
  content: "";
}
.giveaway-dialog-header .eyebrow {
  display: block;
  min-height: 0;
  margin: 0 0 9px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--draw-brass);
  font-family: var(--font-utility);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .16em;
}
.giveaway-dialog-header h2 {
  max-width: none;
  color: var(--draw-paper);
  font-size: clamp(30px,3.2vw,40px);
  font-weight: 620;
  line-height: 1.05;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.giveaway-dialog-header .dialog-intro {
  max-width: 620px;
  margin: 9px 0 0;
  color: var(--draw-muted);
  font-size: 12px;
  line-height: 1.55;
  text-wrap: pretty;
}

.giveaway-dialog-body {
  display: grid;
  grid-template-columns: minmax(370px,1.08fr) minmax(300px,.92fr);
  gap: 42px;
  align-items: center;
  padding: 30px 34px 34px;
}
.giveaway-wheel-panel { display: grid; min-width: 0; justify-items: center; padding: 0; }
.wheel-stage {
  width: min(100%, 404px);
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.3));
}
.wheel-stage::before {
  inset: 3px;
  background: repeating-conic-gradient(from -1deg, rgba(232,231,223,.42) 0deg .65deg, transparent .65deg 7.5deg);
  -webkit-mask: radial-gradient(circle, transparent 0 48.2%, #000 48.6% 49.5%, transparent 49.9%);
  mask: radial-gradient(circle, transparent 0 48.2%, #000 48.6% 49.5%, transparent 49.9%);
}
.prize-wheel {
  inset: 27px;
  border: 11px solid #151f25;
  background-clip: padding-box;
  box-shadow: 0 0 0 1px rgba(232,231,223,.16), 0 12px 30px rgba(0,0,0,.24);
  filter: saturate(.62) brightness(.92);
}
.prize-wheel::before {
  background: radial-gradient(circle at 50% 46%, rgba(255,255,255,.06), transparent 36%, rgba(3,7,9,.24) 100%);
}
.wheel-pointer {
  z-index: 9;
  top: 10px;
  width: 26px;
  height: 36px;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,.45));
}
.wheel-pointer::before {
  border-radius: 1px;
  background: var(--draw-brass);
  clip-path: polygon(50% 100%, 14% 0, 86% 0);
}
.wheel-pointer span { top: 4px; width: 5px; height: 5px; background: #11191e; }
.wheel-label {
  display: grid;
  place-items: center;
  width: 88px;
  min-height: 44px;
  padding: 3px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0b1217;
  font-size: 10px;
  line-height: 1.15;
  letter-spacing: 0;
  text-align: center;
  box-shadow: none;
  text-shadow: 0 1px rgba(255,255,255,.16);
}
.wheel-label.light,
.wheel-label.dark { color: #10161a; text-shadow: 0 1px rgba(255,255,255,.2); }
.wheel-label small {
  display: block;
  margin-bottom: 2px;
  color: currentColor;
  font-family: var(--font-utility);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: .13em;
  opacity: .62;
}
.wheel-label b {
  display: -webkit-box;
  overflow: hidden;
  max-width: 78px;
  font-size: 10px;
  font-weight: 650;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.prize-wheel.dense-wheel .wheel-label { width: 38px; min-height: 32px; padding: 2px; }
.prize-wheel.dense-wheel .wheel-label small { margin: 0; font-size: 10px; font-weight: 750; opacity: .86; }
.prize-wheel.dense-wheel .wheel-label b { display: none; }
.wheel-hub {
  z-index: 10;
  inset: calc(50% - 46px);
  border: 1px solid rgba(232,231,223,.28);
  background: #10181e;
  color: var(--draw-paper);
  box-shadow: 0 0 0 8px rgba(16,24,30,.94), 0 0 0 9px rgba(232,231,223,.12), 0 8px 18px rgba(0,0,0,.28);
}
.wheel-hub span { font-size: 10px; font-weight: 650; letter-spacing: .16em; }
.giveaway-integrity {
  max-width: 380px;
  margin: 14px 0 0;
  color: #748188;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.giveaway-console-panel { display: flex; min-width: 0; flex-direction: column; align-items: stretch; padding: 0; }
.giveaway-prize-list {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-columns: auto;
  grid-auto-flow: row;
  width: 100%;
  max-height: 286px;
  gap: 0;
  margin: 0 0 18px;
  overflow-y: auto;
  overscroll-behavior-block: contain;
  scroll-snap-type: block proximity;
  scrollbar-width: none;
  counter-reset: giveaway-prize;
}
.giveaway-prize-list::-webkit-scrollbar { display: none; }
.giveaway-prize-card {
  min-height: 56px;
  display: grid;
  grid-template-columns: 30px 8px minmax(0,1fr);
  gap: 2px 10px;
  align-content: center;
  border: 0;
  border-bottom: 1px solid var(--draw-line);
  border-radius: 0;
  padding: 9px 0;
  background: transparent;
  scroll-snap-align: start;
  counter-increment: giveaway-prize;
}
.giveaway-prize-card:first-child { border-top: 1px solid var(--draw-line); }
.giveaway-prize-card::before {
  display: block;
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  color: #6e7b82;
  font-family: var(--font-utility);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  content: counter(giveaway-prize, decimal-leading-zero);
}
.giveaway-prize-card i {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  width: 6px;
  height: 20px;
  border-radius: 1px;
  background: color-mix(in srgb,var(--prize-color) 62%,var(--draw-blue));
  box-shadow: none;
}
.giveaway-prize-card strong { grid-column: 3; color: var(--draw-paper); font-size: 12px; font-weight: 600; }
.giveaway-prize-card span {
  grid-column: 3;
  overflow: hidden;
  color: #758289;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wheel-result {
  min-height: 70px;
  width: 100%;
  display: grid;
  align-content: center;
  justify-content: stretch;
  gap: 3px;
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(198,162,90,.5);
  border-bottom: 1px solid var(--draw-line);
  padding: 13px 0;
  background: transparent;
  color: #9aa5aa;
  font-size: 12px;
  text-align: left;
}
.wheel-result strong { color: var(--draw-paper); font-size: 21px; font-weight: 620; }
.giveaway-actions { width: 100%; margin: 15px 0 0; }
.giveaway-actions .button { min-height: 48px; border-radius: 4px; font-weight: 700; }
.giveaway-actions .button-signal {
  border-color: var(--draw-paper);
  background: var(--draw-paper);
  color: #11181d;
  box-shadow: none;
}
.giveaway-actions .button-signal:hover { border-color: #fff; background: #fff; }
.giveaway-actions .button:active { transform: scale(.98); }
.giveaway-limit { margin: 9px 0 0; color: #7e8a90; font-size: 10px; text-align: left; }
.giveaway-rules { width: 100%; margin: 12px 0 0; border-top-color: var(--draw-line); }
.giveaway-rules summary { min-height: 40px; justify-content: space-between; color: #87939a; font-size: 11px; font-weight: 500; }
.giveaway-rules summary::after { color: var(--draw-brass); font-size: 15px; }

@media (max-width: 720px) {
  .giveaway-dialog { width: calc(100vw - 18px); max-width: calc(100vw - 18px); max-height: calc(100dvh - 18px); border-radius: 8px; }
  .giveaway-dialog .dialog-close-form { top: 10px; right: 10px; }
  .giveaway-dialog-header { padding: 22px 56px 18px 20px; }
  .giveaway-dialog-header::after { left: 20px; width: 54px; }
  .giveaway-dialog-header h2 { font-size: 28px; }
  .giveaway-dialog-header .dialog-intro { font-size: 11px; }
  .giveaway-dialog-body { grid-template-columns: minmax(0,1fr); gap: 20px; padding: 20px; }
  .wheel-stage { width: min(100%, 326px); }
  .giveaway-integrity { max-width: 326px; }
  .giveaway-prize-list {
    grid-template-columns: none;
    grid-auto-columns: minmax(144px,42vw);
    grid-auto-flow: column;
    max-height: none;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
  }
  .giveaway-prize-card {
    min-height: 62px;
    grid-template-columns: 22px 6px minmax(0,1fr);
    gap: 2px 7px;
    border: 1px solid var(--draw-line);
    border-radius: 4px;
    padding: 9px;
    background: rgba(232,231,223,.025);
  }
  .giveaway-prize-card:first-child { border-top: 1px solid var(--draw-line); }
  .wheel-result { min-height: 58px; text-align: center; }
  .giveaway-limit { text-align: center; }
}

@media (max-width: 380px) {
  .giveaway-dialog-header { padding: 20px 52px 16px 16px; }
  .giveaway-dialog-header::after { left: 16px; }
  .giveaway-dialog-header h2 { font-size: 25px; }
  .giveaway-dialog-body { gap: 17px; padding: 16px; }
  .wheel-stage { width: min(100%, 274px); }
  .prize-wheel { inset: 22px; border-width: 9px; }
  .wheel-hub { inset: calc(50% - 38px); }
  .wheel-label { width: 66px; min-height: 36px; }
  .wheel-label b { max-width: 57px; font-size: 8px; }
  .giveaway-prize-list { grid-auto-columns: minmax(136px,44vw); }
}

@media (prefers-reduced-motion: reduce) {
  .giveaway-dialog .dialog-close,
  .giveaway-actions .button { transition-duration: .01ms; }
}
