/* J&K Sportsbook — shared theme for the guest app, commissioner page and big board. */
:root {
  --bg: #07070b;
  --panel: #12121b;
  --panel-2: #1b1b28;
  --line: #2b2b3d;
  --gold: #bf9b45;
  --gold-hi: #dfc27a;
  --gold-lo: #8a6a26;
  --green: #35e08a;
  --red: #ff5470;
  --wine: #7d1a28;      /* the wedding burgundy, matched to the tie */
  --wine-hi: #a8283d;   /* same hue, lifted so it reads on near-black */
  --text: #f4f1e8;
  --mute: #9c9aae;
  --display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(191, 155, 69, 0.13), transparent 70%),
    radial-gradient(900px 520px at 100% 100%, rgba(125, 26, 40, 0.42), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.gold { color: var(--gold); }
.green { color: var(--green); }
.red { color: var(--red); }
.mute { color: var(--mute); }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line);
  font-weight: 600; letter-spacing: 0.01em;
  transition: transform 0.08s, filter 0.15s, background 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 45%, var(--gold-lo));
  color: #1a1403; border: 0; font-weight: 800;
  box-shadow: 0 6px 24px rgba(191, 155, 69, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-danger { border-color: rgba(255, 84, 112, 0.5); color: var(--red); }
.btn-sm { min-height: 36px; padding: 0 12px; border-radius: 9px; font-size: 13px; }
.btn-block { width: 100%; }
.input {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px;
  background: #0c0c13; border: 1px solid var(--line); outline: none;
  font-size: 16px; /* 16px stops iOS zooming on focus */
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(191, 155, 69, 0.18); }
textarea.input { padding: 12px 14px; min-height: 80px; resize: vertical; }

/* ---------- marquee logo ---------- */
.logo { font-family: var(--display); letter-spacing: 0.04em; line-height: 0.95; }
.logo .amp { color: var(--wine-hi); text-shadow: 0 0 22px rgba(168, 40, 61, 0.75); }
.logo-gold {
  background: linear-gradient(180deg, #f0dca6, var(--gold) 50%, var(--gold-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(191, 155, 69, 0.35));
}
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--wine-hi); box-shadow: 0 0 10px var(--wine-hi);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- join screen ---------- */
.join {
  min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 28px 22px calc(28px + env(safe-area-inset-bottom)); text-align: center; gap: 22px;
}
.join .bulbs { display: flex; gap: 10px; justify-content: center; }
.join .bulbs i {
  width: 9px; height: 9px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 12px var(--gold); animation: pulse 1.2s ease-in-out infinite;
}
.join .bulbs i:nth-child(even) { animation-delay: 0.6s; }
.join .logo { font-size: clamp(64px, 22vw, 120px); }
.join .sub { font-family: var(--display); font-size: 26px; letter-spacing: 0.22em; color: var(--text); }
.join .date { color: var(--mute); letter-spacing: 0.18em; text-transform: uppercase; font-size: 12px; }
.join form { width: 100%; max-width: 380px; display: grid; gap: 12px; }
.join .perks { display: grid; gap: 8px; max-width: 380px; width: 100%; text-align: left; }
.join .perk {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(18, 18, 27, 0.7);
}
.join .perk b { font-family: var(--display); font-size: 22px; color: var(--gold); min-width: 74px; letter-spacing: 0.04em; }
.join .perk span { color: var(--mute); font-size: 13.5px; }
.join .fine { color: var(--mute); font-size: 12px; max-width: 340px; }
.err { color: var(--red); min-height: 20px; font-size: 14px; }

/* ---------- app shell ---------- */
.app { max-width: 620px; margin: 0 auto; padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 7, 11, 0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; gap: 12px; }
.top .logo { font-size: 30px; }
.top .who { font-size: 11.5px; color: var(--mute); letter-spacing: 0.06em; text-transform: uppercase; }
.bank { text-align: right; }
.bank .chips { font: 700 21px/1 var(--mono); color: var(--gold); display: flex; align-items: center; gap: 7px; justify-content: flex-end; }
.bank .chips::before {
  content: ""; width: 15px; height: 15px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold) 38%, #1a1403 40% 52%, var(--gold) 54%);
  border: 2px dashed #1a1403; outline: 2px solid var(--gold);
}
.bank .rank { font-size: 11.5px; color: var(--mute); margin-top: 4px; }
.bank.bump .chips { animation: bump 0.5s; }
@keyframes bump { 30% { transform: scale(1.18); color: #fff; } }

.ticker { overflow: hidden; border-top: 1px solid var(--line); background: #0b0b12; height: 30px; display: flex; align-items: center; }
.ticker-track { display: inline-flex; gap: 38px; white-space: nowrap; padding-left: 100%; animation: ticker linear infinite; font: 500 12.5px var(--mono); color: var(--mute); }
.ticker-track span b { color: var(--gold); font-weight: 600; }
.ticker-track .final { color: var(--green); }
.ticker-track .whale { color: #fff; font-weight: 700; }
@keyframes ticker { to { transform: translateX(-100%); } }

.announce {
  margin: 12px 16px 0; padding: 10px 14px; border-radius: 12px;
  background: var(--wine); border: 1px solid var(--wine-hi); font-weight: 600; font-size: 14px;
}
main { padding: 14px 16px 0; }
.section-title {
  font-family: var(--display); font-size: 24px; letter-spacing: 0.08em; color: var(--gold);
  margin: 22px 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.section-title small { font: 500 12px var(--body); color: var(--mute); letter-spacing: 0; }
.section-title:first-child { margin-top: 4px; }
.hint { color: var(--mute); font-size: 13.5px; margin-bottom: 12px; }
.empty { text-align: center; color: var(--mute); padding: 36px 16px; border: 1px dashed var(--line); border-radius: 16px; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(11, 11, 18, 0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabs button {
  display: grid; justify-items: center; gap: 3px; padding: 10px 4px 9px;
  color: var(--mute); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; position: relative;
}
.tabs svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs button.on { color: var(--gold); }
.tabs button.on::before { content: ""; position: absolute; top: -1px; left: 26%; right: 26%; height: 2px; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.tabs .dot { position: absolute; top: 7px; left: calc(50% + 8px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--wine-hi); color: #fff; font: 700 10.5px/17px var(--body); letter-spacing: 0; }

/* ---------- sportsbook ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.prop-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.badge { font: 700 10.5px var(--body); letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--mute); }
.badge.open { color: var(--green); border-color: rgba(53, 224, 138, 0.4); }
.badge.locked { color: var(--gold); border-color: rgba(191, 155, 69, 0.4); }
.badge.settled { color: #111; background: var(--gold); border-color: var(--gold); }
.badge.void { color: var(--mute); }
.prop h3 { font-size: 16.5px; font-weight: 700; line-height: 1.3; }
.prop .note { color: var(--mute); font-size: 12.5px; margin-top: 3px; }
.opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.opts.odd .opt:last-child { grid-column: 1 / -1; }
.opt {
  position: relative; overflow: hidden; text-align: left; padding: 10px 12px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line); display: grid; gap: 2px; min-height: 62px; align-content: center;
  transition: transform 0.08s, border-color 0.15s;
}
.opt:not(:disabled):active { transform: scale(0.97); }
.opt:disabled { cursor: default; }
.opt .bar { position: absolute; inset: 0 auto 0 0; background: rgba(191, 155, 69, 0.07); pointer-events: none; transition: width 0.5s; }
.opt .lbl { position: relative; font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.opt .row { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.opt .odds { font: 700 16px var(--mono); color: var(--gold); }
.opt .pct { font-size: 11px; color: var(--mute); }
.opt.mine { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.opt.win { border-color: var(--green); background: rgba(53, 224, 138, 0.12); }
.opt.win .odds { color: var(--green); }
.prop.closed .opt:not(.win):not(.mine) { opacity: 0.55; }
.ticket {
  margin-top: 10px; padding: 9px 12px; border-radius: 10px; font-size: 13px; display: flex; justify-content: space-between; gap: 10px; align-items: center;
  background: repeating-linear-gradient(135deg, rgba(191, 155, 69, 0.1) 0 8px, rgba(191, 155, 69, 0.05) 8px 16px); border: 1px dashed rgba(191, 155, 69, 0.5);
}
.ticket.won { background: rgba(53, 224, 138, 0.12); border: 1px solid rgba(53, 224, 138, 0.5); }
.ticket.lost { background: rgba(255, 84, 112, 0.08); border: 1px solid rgba(255, 84, 112, 0.35); color: var(--mute); }
.ticket.void { background: none; border: 1px dashed var(--line); color: var(--mute); }
.ticket b { font-family: var(--mono); white-space: nowrap; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.stat b { display: block; font: 700 19px var(--mono); color: var(--text); }
.stat span { font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- bet slip sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.66); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.15s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 620px; background: var(--panel); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 22px 22px 0 0; padding: 18px 18px calc(20px + env(safe-area-inset-bottom)); animation: rise 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes rise { from { transform: translateY(40%); opacity: 0; } }
.sheet .slip-title { font-family: var(--display); letter-spacing: 0.14em; color: var(--mute); font-size: 15px; display: flex; justify-content: space-between; }
.sheet h3 { font-size: 15px; color: var(--mute); font-weight: 500; margin-top: 8px; }
.sheet .pick { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 4px 0 14px; }
.sheet .pick strong { font-size: 21px; line-height: 1.2; }
.sheet .pick .odds { font: 700 22px var(--mono); color: var(--gold); }
.stake-row { display: flex; gap: 8px; align-items: stretch; }
.stake-row .input { font: 700 22px var(--mono); text-align: center; min-height: 54px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 14px; }
.payout { display: flex; justify-content: space-between; padding: 6px 2px; font-size: 14px; color: var(--mute); }
.payout b { font-family: var(--mono); color: var(--text); font-size: 16px; }
.payout.big b { color: var(--green); font-size: 20px; }

/* ---------- trivia ---------- */
.q h3 { font-size: 16.5px; line-height: 1.3; }
.q .reward { font: 700 12px var(--mono); color: var(--gold); }
.answers { display: grid; gap: 8px; margin-top: 12px; }
.answers.two { grid-template-columns: 1fr 1fr; }
.ans { text-align: center; padding: 13px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 600; transition: transform 0.08s; }
.ans:not(:disabled):active { transform: scale(0.97); }
.ans:disabled { cursor: default; opacity: 0.5; }
.ans.right { opacity: 1; border-color: var(--green); background: rgba(53, 224, 138, 0.14); color: var(--green); }
.ans.wrong { opacity: 1; border-color: var(--red); background: rgba(255, 84, 112, 0.1); color: var(--red); }

/* ---------- scavenger hunt ---------- */
.hunt-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.hunt-item .shot {
  flex: none; width: 58px; height: 58px; border-radius: 12px; border: 1px dashed var(--gold); color: var(--gold);
  display: grid; place-items: center; background: rgba(191, 155, 69, 0.06); overflow: hidden;
}
.hunt-item .shot svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hunt-item .shot img { width: 100%; height: 100%; object-fit: cover; }
.hunt-item.done .shot { border: 1px solid var(--green); }
.hunt-item .txt { flex: 1; min-width: 0; }
.hunt-item .txt b { display: block; font-size: 14.5px; line-height: 1.3; }
.hunt-item .txt span { font-size: 12.5px; color: var(--mute); }
.hunt-item .pts { font: 700 15px var(--mono); color: var(--gold); white-space: nowrap; }
.hunt-item.done .pts { color: var(--green); }
.hunt-item.busy { opacity: 0.6; pointer-events: none; }
.wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wall button { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.wall img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wall span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 10.5px; font-weight: 600; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, 0.8)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.94); display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 16px; animation: fade 0.15s; }
.lightbox img { max-width: 100%; max-height: 100%; min-height: 0; border-radius: 12px; object-fit: contain; }
.lightbox p { padding: 12px 0 calc(8px + env(safe-area-inset-bottom)); text-align: center; color: var(--mute); font-size: 14px; }
.lightbox p b { color: var(--text); display: block; }

/* ---------- leaderboard ---------- */
.prize { text-align: center; padding: 16px; border-radius: 16px; margin-bottom: 14px; border: 1px solid rgba(191, 155, 69, 0.5); background: linear-gradient(180deg, rgba(191, 155, 69, 0.14), rgba(191, 155, 69, 0.03)); }
.prize small { display: block; font: 700 11px var(--body); letter-spacing: 0.2em; color: var(--gold); text-transform: uppercase; margin-bottom: 4px; }
.prize b { font-size: 17px; }
.lb { display: grid; gap: 6px; }
.lb-row { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.lb-row .pos { font: 400 22px var(--display); color: var(--mute); text-align: center; }
.lb-row .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .nm small { color: var(--gold); font-weight: 700; letter-spacing: 0.1em; font-size: 10.5px; margin-left: 6px; }
.lb-row .net { font: 700 16px var(--mono); color: var(--gold); }
.lb-row.p1 { border-color: var(--gold); background: linear-gradient(90deg, rgba(191, 155, 69, 0.2), var(--panel) 70%); }
.lb-row.p1 .pos { color: var(--gold); }
.lb-row.p2 .pos { color: #d5d8e0; }
.lb-row.p3 .pos { color: #d79a62; }
.lb-row.me { background: linear-gradient(90deg, rgba(125, 26, 40, 0.75), var(--panel) 85%); border-color: var(--wine-hi); }
.champ { text-align: center; padding: 24px 16px; border-radius: 18px; margin-bottom: 14px; border: 1px solid var(--gold); background: radial-gradient(circle at 50% 0, rgba(191, 155, 69, 0.3), transparent 70%), var(--panel); }
.champ small { letter-spacing: 0.3em; color: var(--gold); font-weight: 700; font-size: 11px; }
.champ .logo { font-size: 54px; margin: 6px 0; }

/* ---------- toasts & confetti ---------- */
.toasts { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 0; right: 0; z-index: 60; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { padding: 12px 18px; border-radius: 14px; background: #1f1f2e; border: 1px solid var(--line); font-weight: 600; font-size: 14.5px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); animation: drop 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2); max-width: 100%; text-align: center; }
.toast.good { border-color: var(--green); color: var(--green); }
.toast.bad { border-color: var(--red); color: var(--red); }
.toast.gold { border-color: var(--gold); color: var(--gold); }
.toast.out { opacity: 0; transform: translateY(-10px); transition: 0.3s; }
@keyframes drop { from { transform: translateY(-24px); opacity: 0; } }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 55; pointer-events: none; }
.offline { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 35; background: #2a1820; border: 1px solid var(--red); color: var(--red); padding: 6px 14px; border-radius: 20px; font-size: 12.5px; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .ticker-track { animation: none; padding-left: 16px; }
}
