/* The Price Is Roca — game-show palette on a TCGplayer-blue stage.
   --brand / --brand-deep are overridden at runtime from Admin → Settings → Brand colors. */
:root {
  --brand: #0b3d91;
  --brand-deep: #061a42;
  --brand-ink: color-mix(in srgb, var(--brand-deep) 70%, black);
  --brand-hi: color-mix(in srgb, var(--brand) 70%, white);

  --yellow: #ffd23f;
  --gold: #ffb700;
  --orange: #ff8c1a;
  --red: #f2293a;
  --pink: #ff3e9a;
  --green: #21c55d;
  --sky: #2ec4f1;
  --cream: #fff8e7;
  --ink: #1b0f00;

  --text: #ffffff;
  --muted: color-mix(in srgb, white 72%, var(--brand));
  --line: rgba(255, 255, 255, 0.16);
  --panel: color-mix(in srgb, var(--brand) 55%, var(--brand-deep));
  --panel-2: color-mix(in srgb, var(--brand) 35%, var(--brand-deep));
  --radius: 22px;

  --show: 'Luckiest Guy', 'Impact', system-ui, sans-serif;
  --digits: 'Bungee', 'Impact', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--body);
  font-weight: 600;
  color: var(--text);
  background: var(--brand-deep);
  line-height: 1.4;
  touch-action: manipulation;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
a { color: var(--yellow); }
button { font: inherit; color: inherit; }
img { max-width: 100%; }

/* ------------------------------------------------------------ stage background: sunburst + vignette */

.stage-bg {
  position: fixed;
  inset: -50vmax;
  z-index: -2;
  background: repeating-conic-gradient(from 0deg, var(--brand) 0deg 9deg, color-mix(in srgb, var(--brand) 80%, var(--brand-deep)) 9deg 18deg);
  animation: spin 120s linear infinite;
}
.stage-bg::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, transparent 0%, color-mix(in srgb, var(--brand-deep) 55%, transparent) 45%, var(--brand-deep) 85%);
}
.stage-vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 20%, transparent 0 35%, color-mix(in srgb, var(--brand-ink) 80%, transparent) 100%);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 70s rainbow stripe */
.rainbow {
  height: 10px;
  background: linear-gradient(90deg, var(--red) 0 16.6%, var(--orange) 0 33.3%, var(--yellow) 0 50%, var(--green) 0 66.6%, var(--sky) 0 83.3%, var(--pink) 0);
}

/* ------------------------------------------------------------ show text */

.show {
  font-family: var(--show);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--yellow);
  -webkit-text-stroke: 0.09em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 0.05em 0 var(--orange), 0 0.09em 0 var(--red), 0 0.14em 0 #7a1020, 0 0.2em 0.3em rgba(0, 0, 0, 0.45);
}
.show.white { color: #fff; text-shadow: 0 0.05em 0 var(--sky), 0 0.1em 0 var(--brand), 0 0.15em 0 var(--brand-ink), 0 0.2em 0.3em rgba(0, 0, 0, 0.45); }
.show.green { color: #b8ffcf; text-shadow: 0 0.05em 0 var(--green), 0 0.1em 0 #138a40, 0 0.15em 0 #0b4d24, 0 0.2em 0.3em rgba(0, 0, 0, 0.45); }

/* ------------------------------------------------------------ logo (pure CSS so web fonts apply) */

.logo {
  position: relative;
  display: inline-grid;
  place-items: center;
  padding: 0.35em 0.7em 0.45em;
  font-size: var(--logo-size, 18px);
  text-decoration: none;
  isolation: isolate;
}
.logo-burst {
  position: absolute;
  inset: -12% -4%;
  z-index: -1;
  background: conic-gradient(from 0deg, var(--yellow), var(--orange), var(--red), var(--pink), var(--orange), var(--yellow));
  clip-path: polygon(50% 0%, 58% 14%, 74% 4%, 75% 20%, 93% 16%, 86% 32%, 100% 40%, 88% 50%, 100% 60%, 86% 68%, 93% 84%, 75% 80%, 74% 96%, 58% 86%, 50% 100%, 42% 86%, 26% 96%, 25% 80%, 7% 84%, 14% 68%, 0% 60%, 12% 50%, 0% 40%, 14% 32%, 7% 16%, 25% 20%, 26% 4%, 42% 14%);
  filter: drop-shadow(0 4px 0 var(--ink));
}
.logo-plate {
  display: grid;
  place-items: center;
  padding: 0.25em 0.8em 0.35em;
  border-radius: 999px;
  background: radial-gradient(ellipse at 50% 30%, var(--brand-hi), var(--brand) 55%, var(--brand-deep));
  border: 0.18em solid var(--cream);
  box-shadow: 0 0 0 0.12em var(--ink), 0 0.25em 0 0.12em var(--ink);
}
.logo .l1 { font-family: var(--show); font-size: 0.85em; color: #fff; letter-spacing: 0.08em; -webkit-text-stroke: 0.12em var(--ink); paint-order: stroke fill; line-height: 1; }
.logo .l2 { font-size: 2.3em; margin-top: -0.05em; }
.logo-img { display: block; max-height: var(--logo-img-h, 72px); width: auto; }

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.02em;
  box-shadow: 0 3px 0 var(--ink);
  white-space: nowrap;
}
.brand-badge img { height: 26px; width: auto; display: block; }
.brand-badge.has-img { padding: 6px 12px; }

/* ------------------------------------------------------------ marquee lights */

.bulbs { position: relative; }
.bulbs::before {
  content: '';
  position: absolute;
  inset: -24px;
  border-radius: calc(var(--radius) + 20px);
  padding: 20px;
  /* 'round' fits a whole number of bulbs on every edge; the ring is exactly one bulb thick */
  background: radial-gradient(circle, #fffbe0 0 2.6px, var(--yellow) 3.8px, rgba(255, 210, 63, 0) 6.5px) 0 0 / 20px 20px round;
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  animation: chase 0.8s steps(2) infinite;
  pointer-events: none;
}
.bulbs.fast::before { animation-duration: 0.25s; }
@keyframes chase { to { background-position: 20px 20px; } }

/* ------------------------------------------------------------ panels */

.panel {
  position: relative;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, transparent), color-mix(in srgb, var(--panel-2) 95%, transparent));
  border: 4px solid var(--yellow);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--ink), 0 18px 40px rgba(0, 0, 0, 0.35);
  padding: 18px;
}
.panel.plain { border-color: var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  border: 2px solid var(--line);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.chip.yellow { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.chip.red { background: var(--red); color: #fff; border-color: var(--ink); }
.chip.green { background: var(--green); color: #052e14; border-color: var(--ink); }
.chip.sky { background: var(--sky); color: #04293a; border-color: var(--ink); }
.chip.white { background: #fff; color: var(--brand); border-color: var(--ink); }

.present-badge { font-family: var(--show); font-weight: 400; letter-spacing: 0.04em; font-size: 15px; padding: 7px 14px 5px; }

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
  color: #fff;
  background: color-mix(in srgb, var(--brand) 70%, white 10%);
  box-shadow: 0 5px 0 var(--ink);
  transition: transform 0.06s, box-shadow 0.06s, filter 0.15s, opacity 0.15s;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
}
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.big {
  font-family: var(--show);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0.04em;
  padding: 16px 22px 12px;
  border-radius: 20px;
  border-width: 4px;
  box-shadow: 0 7px 0 var(--ink);
}
.btn.big:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 2px 0 var(--ink); }
.btn.block { width: 100%; }
.btn.yellow { background: linear-gradient(180deg, #ffe680, var(--yellow) 50%, var(--gold)); color: var(--ink); }
.btn.red { background: linear-gradient(180deg, #ff6b78, var(--red)); }
.btn.green { background: linear-gradient(180deg, #5ee68f, var(--green)); color: #052e14; }
.btn.sky { background: linear-gradient(180deg, #7fdcf8, var(--sky)); color: #04293a; }
.btn.pink { background: linear-gradient(180deg, #ff7dbb, var(--pink)); }
.btn.white { background: #fff; color: var(--brand); }
.btn.ghost { background: rgba(0, 0, 0, 0.2); border-color: var(--line); box-shadow: none; color: #fff; }
.btn.ghost:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
.btn.sm { padding: 8px 12px; font-size: 14px; border-radius: 12px; box-shadow: 0 3px 0 var(--ink); border-width: 2px; }
.btn.sm.ghost { box-shadow: none; }

/* ------------------------------------------------------------ drums */

.drums {
  --h: clamp(44px, 6.6vh, 58px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border-radius: 24px;
  background: linear-gradient(180deg, #1a1300, #0d0900);
  border: 4px solid var(--ink);
  box-shadow: inset 0 0 0 3px var(--gold), inset 0 0 30px rgba(0, 0, 0, 0.8), 0 6px 0 var(--ink);
  user-select: none;
  -webkit-user-select: none;
}
.drums .sym {
  font-family: var(--digits);
  font-size: calc(var(--h) * 0.75);
  color: var(--yellow);
  line-height: 1;
  text-shadow: 0 0 14px rgba(255, 210, 63, 0.6);
}
.drum {
  --h: inherit;
  position: relative;
  height: calc(var(--h) * 5);
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  border-radius: 16px;
  outline: none;
  background: linear-gradient(180deg, #000 0%, #2a2210 50%, #000 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}
.drum:focus-visible { box-shadow: inset 0 0 0 3px var(--sky); }
.drum.is-dragging { cursor: grabbing; }
.drum-dollars { width: calc(var(--h) * 3); }
.drum-cents { width: calc(var(--h) * 2.15); }
.drum-track { position: absolute; inset: 0; perspective: 520px; }
.drum-band {
  position: absolute;
  left: 4px;
  right: 4px;
  top: calc(50% - var(--h) / 2);
  height: var(--h);
  border-radius: 12px;
  border: 3px solid var(--yellow);
  background: rgba(255, 210, 63, 0.1);
  box-shadow: 0 0 20px rgba(255, 210, 63, 0.45);
  pointer-events: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.drums.is-taken .drum-band { border-color: var(--red); background: rgba(242, 41, 58, 0.18); box-shadow: 0 0 22px rgba(242, 41, 58, 0.6); }
.drums.is-open .drum-band { border-color: var(--green); background: rgba(33, 197, 93, 0.14); box-shadow: 0 0 22px rgba(33, 197, 93, 0.55); }
.drum::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.92), transparent 34%, transparent 66%, rgba(0, 0, 0, 0.92));
}
.drum-item {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% - var(--h) / 2);
  height: var(--h);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--digits);
  font-size: calc(var(--h) * 0.62);
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  backface-visibility: hidden;
  will-change: transform;
}
.drum-item.is-center { color: #fff; text-shadow: 0 0 14px rgba(255, 240, 200, 0.6); }
.drum-item.taken .drum-num { color: var(--red); text-decoration: line-through; text-decoration-thickness: 4px; }
.drum-item.taken::before {
  content: '\2715';
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  font: 900 13px var(--body);
  color: var(--red);
}
.drum-item[data-badge]:not([data-badge=''])::after {
  content: attr(data-badge);
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--red);
  border: 2px solid var(--ink);
  color: #fff;
  font: 900 11px/17px var(--body);
  text-align: center;
}
.drum-item.full .drum-num { color: var(--red); opacity: 0.6; }

.price-status {
  margin: 12px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 16px;
  border: 3px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  transition: background 0.15s, color 0.15s;
}
.price-status .amt { font-family: var(--digits); font-size: 20px; }
.price-status.open { background: var(--green); color: #052e14; }
.price-status.taken { background: var(--red); color: #fff; }

.suggest { min-height: 40px; margin-top: 8px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; align-items: center; color: var(--muted); font-weight: 800; }

/* price tape */
.tape {
  position: relative;
  height: 40px;
  border-radius: 12px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 10%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.25));
  border: 2px solid var(--line);
  touch-action: none;
  cursor: pointer;
  overflow: hidden;
}
.tape .tick { position: absolute; top: 8px; bottom: 8px; width: 3px; margin-left: -1.5px; background: var(--red); border-radius: 2px; }
.tape .needle { position: absolute; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: var(--yellow); box-shadow: 0 0 10px var(--yellow); }
.tape-labels { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 700; }

.link-btn { background: none; border: none; color: var(--yellow); text-decoration: underline; cursor: pointer; padding: 6px; font-size: 14px; font-weight: 800; }

/* ------------------------------------------------------------ forms */

.fields { display: grid; gap: 12px; }
label.field { display: grid; gap: 6px; font-weight: 900; font-size: 15px; }
.field .hint { font-weight: 600; color: var(--muted); }
input[type='text'], input[type='email'], input[type='tel'], input[type='number'], input[type='password'], input[type='search'], textarea, select {
  width: 100%;
  font-family: inherit;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.08);
}
textarea { font-size: 16px; min-height: 84px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #8a7f6a; font-weight: 600; }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 4px var(--sky); }
.field.invalid input { border-color: var(--red); box-shadow: 0 0 0 3px rgba(242, 41, 58, 0.5); }
.field .err { color: #ffb3ba; font-size: 14px; font-weight: 800; }
.field .err:empty { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--muted); cursor: pointer; font-weight: 700; }
.check input { width: 24px; height: 24px; margin: 0; accent-color: var(--yellow); flex: none; }

.form-error { color: #ffb3ba; font-weight: 900; text-align: center; margin-top: 12px; }
.form-error:empty { display: none; }
.fine { font-size: 12px; color: var(--muted); text-align: center; margin: 10px 0 0; font-weight: 600; }

/* ------------------------------------------------------------ toast + confetti */

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(140px);
  max-width: calc(100vw - 32px);
  background: #fff;
  color: var(--ink);
  border: 3px solid var(--ink);
  padding: 12px 18px;
  border-radius: 16px;
  font-weight: 900;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform 0.25s;
  z-index: 80;
}
.toast:not(.on) { visibility: hidden; transition: transform 0.25s, visibility 0s 0.25s; }
.toast.on { transform: translateX(-50%) translateY(0); }
.toast.bad { background: var(--red); color: #fff; }

.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 70; }
.confetti i { position: absolute; top: -20px; width: 11px; height: 17px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(115vh) rotate(900deg); } }

.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; transform: scale(0.98); } }
.wiggle { animation: wiggle 2.4s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }

@media (prefers-reduced-motion: reduce) {
  .stage-bg, .bulbs::before, .pulse, .wiggle { animation: none !important; }
}

/* Sifting animation: cards dropping into the machine */
.sifter { position: relative; height: 150px; width: 220px; margin: 18px auto 0; }
.sifter-box {
  position: absolute; left: 0; right: 0; bottom: 0; height: 80px; z-index: 2;
  border-radius: 18px; border: 4px solid var(--ink);
  background: linear-gradient(180deg, #fff, #dfe6f3);
  display: grid; place-items: center; box-shadow: 0 6px 0 var(--ink);
}
.sifter-box .show { font-size: 34px; color: var(--brand); text-shadow: none; -webkit-text-stroke: 0; }
.sifter i {
  position: absolute; left: 50%; top: 0; width: 44px; height: 62px; margin-left: -22px; border-radius: 6px;
  background: linear-gradient(135deg, var(--red), var(--orange)); border: 3px solid var(--ink);
  animation: deal 1.8s cubic-bezier(.5,0,.8,.6) infinite;
}
.sifter i:nth-child(3) { animation-delay: .3s; background: linear-gradient(135deg, var(--sky), var(--brand)); }
.sifter i:nth-child(4) { animation-delay: .6s; background: linear-gradient(135deg, var(--green), #0b7a3b); }
.sifter i:nth-child(5) { animation-delay: .9s; background: linear-gradient(135deg, var(--yellow), var(--orange)); }
.sifter i:nth-child(6) { animation-delay: 1.2s; background: linear-gradient(135deg, var(--pink), var(--red)); }
.sifter i:nth-child(7) { animation-delay: 1.5s; }
@keyframes deal {
  0% { transform: translate(var(--x, -90px), -30px) rotate(-30deg); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(0, 90px) rotate(0deg); opacity: 1; }
}
.sifter i:nth-child(even) { --x: 90px; }

