/* SportsBadger: Slot Receiver (play/slot.html). Loaded after sb.css and sb-play.css. Phone first.

   The machine and the scoreboard stay dark in both themes; the reels and the category chips stay light, so the six
   category colors (set per element as --c) read the same everywhere. Gold is for wins: pairs, Three-Peats, the Nudge.
   --sr-stop is the height of one reel stop: a reel shows three, and the Nudge slides a reel by one (sb-slot.js). */

:root {
  --sr-gold: #F2C14E;
  --sr-board: #142019;          /* the machine and the scoreboard */
  --sr-window: #0B1410;
  --sr-dim: #B9C7BD;            /* small text on the board */
  --sr-off: #3A4A40;            /* unlit bulbs and pips */
  --sr-reel: #FFFFFF;
  --sr-wash: rgba(255, 255, 255, .62);
  --sr-ring: #24543A;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --sr-board: #18261E; --sr-reel: #EEF2EE; --sr-wash: rgba(238, 242, 238, .62); --sr-ring: #2E6B4A; }
}
:root[data-theme="dark"] { --sr-board: #18261E; --sr-reel: #EEF2EE; --sr-wash: rgba(238, 242, 238, .62); --sr-ring: #2E6B4A; }

#sr { --sr-stop: 62px; padding-bottom: 8px; }
@media (max-width: 359px) { #sr { --sr-stop: 56px; } }
@media (min-width: 600px) { #sr { --sr-stop: 70px; } }
.sr-vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- scoreboard ---------- */
.sr-score {
  margin-top: 4px; padding: 10px 16px; border-radius: 14px; background: var(--sr-board); color: #FFFFFF;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.sr-score small { display: block; font: 600 .7rem/1.2 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--sr-dim); }
.sr-score b { display: block; font: 700 2.1rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.sr-score .mid { text-align: center; }
.sr-score .mid b { font-size: 1.6rem; line-height: 1.1; color: var(--sr-gold); }
.sr-score .r { text-align: right; }
.sr-pips { display: flex; justify-content: center; gap: 4px; margin-top: 4px; }
.sr-pips i { width: 18px; height: 5px; border-radius: 3px; background: var(--sr-off); }
.sr-pips i.done { background: #8FB59C; }
.sr-pips i.now { background: var(--sr-gold); }
.sr-score .mid b.sr-fin { font-size: 1.4rem; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- the machine ---------- */
.sr-machine {
  margin-top: 12px; padding: 10px 12px 12px; border-radius: 22px; background: var(--sr-board);
  box-shadow: inset 0 0 0 3px var(--sr-ring); transition: box-shadow .3s;
}
.sr-machine.lit { box-shadow: inset 0 0 0 3px var(--sr-gold), 0 0 26px rgba(242, 193, 78, .35); animation: sr-glow 1.1s ease-in-out 3 alternate; }
.sr-marquee { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 4px 0 10px; overflow: hidden; }
.sr-marquee b { font: 700 1.5rem/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: #FFFFFF; white-space: nowrap; }
@media (max-width: 400px) {
  .sr-marquee { gap: 8px; }
  .sr-marquee b { font-size: 1.3rem; letter-spacing: .08em; }
  .sr-bulbs i:nth-child(n+3) { display: none; }
}
.sr-bulbs { display: flex; gap: 5px; }
.sr-bulbs i { width: 7px; height: 7px; border-radius: 50%; background: var(--sr-off); }
.sr-bulbs i:nth-child(odd) { background: var(--sr-gold); }
.sr-bulbs.lit i { background: var(--sr-gold); animation: sr-bulb .8s steps(1) infinite; }
.sr-bulbs.lit i:nth-child(2n) { animation-delay: .4s; }

.sr-window {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  padding: 10px 14px; border-radius: 14px; background: var(--sr-window);
}
.sr-arrow { position: absolute; top: 50%; margin-top: -8px; width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.sr-arrow.l { left: 2px; border-left: 10px solid var(--sr-gold); }
.sr-arrow.r { right: 2px; border-right: 10px solid var(--sr-gold); }

.sr-reel {
  position: relative; isolation: isolate; height: calc(3 * var(--sr-stop)); overflow: hidden; border-radius: 10px;
  background: var(--sr-reel); transition: box-shadow .25s;
}
/* the glass: fades the stops above and below the line */
.sr-reel::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, var(--sr-wash), transparent 30%, transparent 70%, var(--sr-wash));
  box-shadow: inset 0 16px 14px -12px rgba(0, 0, 0, .35), inset 0 -16px 14px -12px rgba(0, 0, 0, .35);
}
.sr-reel.hit { box-shadow: 0 0 0 2px var(--sr-gold); }
.sr-col { position: relative; will-change: transform; }
.sr-col.slide { transition: transform .55s cubic-bezier(.3, 1.35, .5, 1); }
.sr-stop {
  height: var(--sr-stop); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 0 3px; color: var(--c); overflow: hidden;
}
.sr-stop svg { flex: none; }
.sr-stop b {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 700 .82rem/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase;
}
.sr-stop .sr-chipface { box-shadow: 0 0 0 2px var(--sr-gold); }
.sr-line {
  position: absolute; z-index: 2; left: 3px; right: 3px; top: var(--sr-stop); height: var(--sr-stop);
  border: 2px solid rgba(20, 32, 25, .1); border-radius: 8px; pointer-events: none;
}
.sr-reel.hit .sr-line { border-color: var(--sr-gold); background: rgba(242, 193, 78, .14); }
.sr-machine.lit .sr-reel.hit .sr-line { animation: sr-flash .5s ease-in-out 4 alternate; }
/* the Nudge: the stop that would move into line */
.sr-reel.target-top::before, .sr-reel.target-bot::before {
  content: ""; position: absolute; z-index: 3; left: 3px; right: 3px; height: var(--sr-stop);
  border: 3px dashed #D9A21B; border-radius: 8px; background: rgba(242, 193, 78, .2); pointer-events: none;
  animation: sr-pulse .9s ease-in-out infinite alternate;
}
.sr-reel.target-top::before { top: 0; }
.sr-reel.target-bot::before { top: calc(2 * var(--sr-stop)); }
.sr-status {
  margin: 10px 0 0; min-height: 30px; display: flex; align-items: center; justify-content: center; text-align: center;
  font: 700 1.3rem/1.1 var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--sr-dim);
}
.sr-status.gold { color: var(--sr-gold); }
@media (max-width: 400px) { .sr-status { font-size: 1.12rem; } }

/* the spin */
.sr-col.sr-spinning { animation: sr-spin .36s linear infinite; filter: blur(.7px); }
.sr-reel[data-r="1"] .sr-spinning { animation-duration: .33s; }
.sr-reel[data-r="2"] .sr-spinning { animation-duration: .39s; }
.sr-reel.settle .sr-col { animation: sr-settle .3s ease-out; }
@keyframes sr-spin { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes sr-settle { 0% { transform: translateY(-24px); } 70% { transform: translateY(4px); } 100% { transform: translateY(0); } }
@keyframes sr-pulse { from { opacity: .55; } to { opacity: 1; } }
@keyframes sr-flash { from { background: rgba(242, 193, 78, .1); } to { background: rgba(242, 193, 78, .4); } }
@keyframes sr-bulb { 50% { background: var(--sr-off); } }
@keyframes sr-glow { from { box-shadow: inset 0 0 0 3px var(--sr-gold), 0 0 10px rgba(242, 193, 78, .2); } to { box-shadow: inset 0 0 0 3px var(--sr-gold), 0 0 30px rgba(242, 193, 78, .5); } }

/* ---------- HIKE! and what comes next ---------- */
.sr-hike { margin-top: 14px; }
.sr-hike p { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: .9rem; }
.btn.sr-go {
  width: 100%; min-height: 64px; justify-content: center; gap: 10px; background: var(--turf); border-color: var(--turf); color: var(--chalk);
  font: 700 1.9rem/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase;
}
.btn.sr-go:disabled { opacity: .55; cursor: default; }
.btn.sr-go.sm { min-height: 58px; background: var(--ink); border-color: var(--ink); font: 700 1.15rem/1 var(--font-body); letter-spacing: 0; text-transform: none; }
.sr-panel {
  margin-top: 14px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  display: grid; gap: 10px;
}
.sr-panel > h2 { font-size: 2.1rem; line-height: 1; text-transform: uppercase; }
.sr-panel > p { margin: 0; line-height: 1.45; }
.sr-panel > .pl-kicker { margin-bottom: -6px; }
.sr-nudge, .sr-three { border: 2px solid var(--sr-gold); }
.sr-three { background: color-mix(in srgb, var(--sr-gold) 10%, var(--surface)); }
.sr-nudge .pl-actions .btn { flex: 1 1 120px; }
.sr-fine { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.sr-fine.c { margin-top: 12px; text-align: center; }
.sr-fine.c:empty { display: none; }
.sr-big { margin: 0; font: 700 3.2rem/1 var(--font-display); }
.sr-big small { font: 500 1rem/1 var(--font-body); color: var(--muted); }

/* how it pays */
.sr-pays { margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.sr-pays summary {
  display: flex; justify-content: space-between; align-items: center; min-height: 28px; cursor: pointer; list-style: none;
  font: 700 .78rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase;
}
.sr-pays summary::-webkit-details-marker { display: none; }
.sr-pays summary::after { content: "+"; font-size: 1.2rem; color: var(--muted); }
.sr-pays[open] summary::after { content: "−"; }
.sr-pays ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.sr-pays li { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 10px; }
.sr-pays li b { display: block; font-size: .95rem; }
.sr-pays li small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.3; }
.sr-pays p { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: .9rem; line-height: 1.4; }
.sr-trio { display: flex; gap: 4px; }
.sr-trio i {
  width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c, #142019) 10%, #FFFFFF); color: var(--c, #142019);
}

/* the Badger's face */
.sr-chipface { display: block; flex: none; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; background: #ECEEF1; }
.sr-chipface svg { display: block; width: 100%; height: 100%; }

/* ---------- questions ---------- */
.sr-qhead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 14px; }
.sr-qhead span { color: var(--muted); font-size: .92rem; }
.sr-minis { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sr-mini {
  position: relative; padding: 6px 6px 5px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line);
  display: grid; justify-items: center; gap: 3px;
}
.sr-mini.now { border-color: var(--ink); }
.sr-mini.ok { border-color: var(--pl-ok); }
.sr-mini.no { border-color: var(--pl-no); }
.sr-mini small { font-size: .75rem; font-weight: 700; color: var(--muted); }
.sr-mini.ok small { color: var(--pl-ok); }
.sr-mini.no small { color: var(--pl-no); }
.sr-mini .sr-x {
  position: absolute; top: -9px; right: -6px; padding: 1px 7px; border-radius: 999px;
  background: var(--sr-gold); color: #142019; font: 700 .85rem/1.2 var(--font-display);
}
.sr-mface {
  display: flex; align-items: center; justify-content: center; color: var(--c);
  background: color-mix(in srgb, var(--c) 10%, #FFFFFF);
}
.sr-mini .sr-mface { width: 100%; flex-direction: column; gap: 2px; padding: 5px 2px 4px; border-radius: 8px; }
.sr-mface .sr-chipface, .sr-trio .sr-chipface { box-shadow: 0 0 0 1.5px var(--sr-gold); }
.sr-mface b {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 700 .82rem/1 var(--font-display); letter-spacing: .05em; text-transform: uppercase;
}
.sr-card {
  margin-top: 14px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  display: grid; gap: 12px;
}
.sr-qtags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pl-tag.sr-cat { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 3px; border-color: var(--line); }
.pl-tag.sr-gold { background: var(--sr-gold); border-color: var(--sr-gold); color: #142019; }
.sr-dot {
  width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 14%, #FFFFFF); color: var(--c);
}
.sr-dot .sr-chipface { width: 22px !important; height: 22px !important; }
#sr .pl-timer i { background: var(--turf); }
#sr-q { font: 600 1.35rem/1.25 var(--font-body); text-transform: none; }
.sr-card .pl-qsub, .sr-panel .pl-qsub { margin: -6px 0 0; }
.sr-card .pl-qsub:empty, .sr-panel .pl-qsub:empty { display: none; }
.sr-pts {
  display: inline-block; margin-right: 2px; padding: 0 6px; border-radius: 6px; background: color-mix(in srgb, var(--sr-gold) 40%, transparent);
  font: 700 1.05rem/1.35 var(--font-display); color: var(--ink);
}
.sr-badger { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .95rem; }

/* ---------- the final ---------- */
.sr-result { margin-top: 16px; }
.sr-head { margin-top: 6px; font-size: clamp(2.3rem, 10vw, 3rem); line-height: .95; text-transform: uppercase; }
.sr-kpis { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sr-kpis > div { padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.sr-kpis small { display: block; font: 600 .7rem/1.2 var(--font-body); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sr-kpis b { display: block; font: 700 2.1rem/1 var(--font-display); }
.sr-kpis p { margin: 2px 0 0; font-size: .82rem; color: var(--muted); }
.sr-result > .sr-sh { margin-top: 20px; font-size: 1.4rem; }
.pl-compare .sr-sh { margin: 10px 0 4px; font: 700 .8rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sr-spread { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sr-spread li { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: .88rem; }
.sr-spread span { font-weight: 600; color: var(--muted); }
.sr-spread i { display: block; height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 22%, transparent); }
.sr-spread b { text-align: right; font-weight: 600; }
.sr-spread b small { color: var(--muted); font-weight: 500; }
.sr-spread li.me span { color: var(--ink); }
.sr-spread li.me i { background: var(--turf); }
.sr-spins { list-style: none; margin: 4px 0 0; padding: 0; }
.sr-spins li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sr-spins li > span:nth-child(2) { display: grid; line-height: 1.25; }
.sr-spins li > span:nth-child(2) b { font-size: .95rem; }
.sr-spins li > span:nth-child(2) small { color: var(--muted); font-size: .82rem; }
.sr-tiles { display: flex; gap: 4px; }
.sr-tile { display: grid; justify-items: center; gap: 2px; }
.sr-tile .sr-mface { width: 32px; height: 32px; border-radius: 8px; }
.sr-tile small { font-size: .75rem; font-weight: 700; line-height: 1; }
.sr-tile.ok small { color: var(--pl-ok); }
.sr-tile.no small { color: var(--pl-no); }
.sr-sp { font: 700 1.6rem/1 var(--font-display); }
.sr-result > .sr-fine { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  .sr-col.sr-spinning, .sr-reel.settle .sr-col, .sr-bulbs.lit i, .sr-machine.lit, .sr-machine.lit .sr-reel.hit .sr-line,
  .sr-reel.target-top::before, .sr-reel.target-bot::before { animation: none; }
  .sr-col.slide, .sr-machine, .sr-reel { transition: none; }
}
