/* /spin position wheel. Full-bleed bento under the shared top bar: hero strip (title, stats,
   prize ticker), the wheel stage, the ID tile on the right and a how-to strip under the wheel.
   Kit tiles and headers; sp-* only for the parts app.js paints. Motion is stepped. Breakpoints
   live in mobile.css. */
.v2-spin-grid {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: minmax(0, 1fr) 420px;
  grid-template-rows: var(--v2-nav-h) auto minmax(0, 1fr) auto;
  gap: var(--v2-rule);
  background: var(--v2-line);
}
.v2-spin-grid > .v2-nav {
  grid-column: 1 / -1;
  grid-row: 1;
}
/* Pixel label face shared by the page's small caps. */
.sp-h1,
.sp-sub,
.sp-k,
.sp-v,
.sp-track,
.sp-snd,
.sp-jackpot,
.sp-big,
.sp-hint,
.sp-ch,
.sp-nm,
.sp-cid,
.sp-acts,
.sp-go,
.sp-lbl,
.sp-pos,
.sp-pz,
.sp-feed-row,
.sp-no,
.sp-tx b {
  font-family: var(--pix);
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0;
  text-transform: uppercase;
  -webkit-font-smoothing: none;
}

/* ---- hero ---- */
.sp-hero {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-width: 0;
  background: var(--tile);
}
.sp-title {
  padding: 12px 18px;
  border-right: var(--v2-rule) solid var(--line);
}
.sp-h1 {
  margin: 0;
  color: var(--tx);
  font-size: var(--fs-33);
  line-height: 1;
  white-space: nowrap;
}
.sp-h1 em {
  font-style: normal;
  color: var(--acc-hi);
}
.sp-sub {
  margin: 8px 0 0;
  color: var(--mute);
  font-size: var(--fs-11);
  white-space: nowrap;
}
.sp-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-right: var(--v2-rule) solid var(--line);
  white-space: nowrap;
}
.sp-k {
  color: var(--mute);
  font-size: var(--fs-11);
}
.sp-v {
  color: var(--tx);
  font-size: var(--fs-22);
  line-height: 1;
}
.sp-gold {
  color: var(--warn);
}
.sp-pips {
  display: flex;
  gap: 4px;
  min-height: 14px;
}
.sp-pips i {
  display: block;
  width: 14px;
  height: 14px;
  background: var(--acc);
}
.sp-pips i.used {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}
.sp-ticker {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  background: var(--hatch), var(--bg);
}
.sp-track {
  display: flex;
  gap: 40px;
  padding-left: 100%;
  color: var(--mute);
  font-size: var(--fs-11);
  white-space: nowrap;
  animation: sp-marquee 40s steps(400) infinite;
}
.sp-track b {
  font-weight: 400;
  color: var(--tc, var(--tx));
}
@keyframes sp-marquee {
  to {
    transform: translateX(-100%);
  }
}

/* ---- stage ---- */
.sp-stage {
  grid-column: 1;
  grid-row: 3;
  min-width: 0;
  min-height: 0;
}
.sp-stage-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  height: 100%;
  min-height: 0;
  padding: 18px 12px;
  overflow: hidden;
  background: var(--hatch), var(--bg);
}
.sp-wheel-box {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 0;
  container-type: size;
}
.sp-wheel {
  display: block;
  width: min(100cqw, 100cqh, 600px);
  height: auto;
  aspect-ratio: 1 / 1;
  image-rendering: pixelated;
}
.sp-big {
  position: relative;
  flex: 0 0 auto;
  min-width: 280px;
  height: 64px;
  padding: 0 22px;
  border: 0;
  background: var(--acc-hi);
  color: var(--ink);
  font-size: var(--fs-22);
  cursor: pointer;
  box-shadow:
    inset -4px -4px 0 var(--v2-bevel-shade),
    inset 4px 4px 0 var(--v2-bevel-glint),
    0 6px 0 var(--v2-bevel-lip),
    0 6px 0 1px var(--ink);
  transform: translateY(0);
  transition: transform 66ms var(--st-1);
}
.sp-big:hover {
  filter: brightness(1.08);
}
.sp-big:active:not(:disabled) {
  transform: translateY(6px);
  box-shadow:
    inset -4px -4px 0 var(--v2-bevel-shade),
    inset 4px 4px 0 var(--v2-bevel-glint);
}
.sp-big:disabled {
  background: var(--line);
  color: var(--mute);
  box-shadow: 0 6px 0 var(--ink);
  cursor: not-allowed;
  filter: none;
}
.sp-big.ready {
  animation: sp-nudge 1.2s var(--st-2) infinite;
}
@keyframes sp-nudge {
  50% {
    filter: brightness(1.25);
  }
}
.sp-hint {
  flex: 0 0 auto;
  min-height: 14px;
  margin: 0;
  color: var(--mute);
  font-size: var(--fs-11);
  line-height: 1.3;
  text-align: center;
}
.sp-hint.err {
  color: var(--crit-tx);
}
.sp-hint.win {
  color: var(--acc-hi);
}
.sp-snd {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  min-height: 28px;
  padding: 0 8px;
  border: var(--v2-rule) solid var(--line);
  background: var(--tile);
  color: var(--mute);
  font-size: var(--fs-11);
  cursor: pointer;
}
.sp-snd[aria-pressed="true"] {
  color: var(--tx);
}
.sp-dim {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 264ms var(--st);
}
.sp-jackpot {
  position: absolute;
  top: 8%;
  right: 0;
  left: 0;
  z-index: 6;
  color: var(--warn);
  font-size: var(--fs-66);
  line-height: 1;
  text-align: center;
  text-shadow:
    6px 6px 0 var(--acc),
    10px 10px 0 var(--ink);
  opacity: 0;
  pointer-events: none;
}
.sp-bit {
  position: absolute;
  z-index: 7;
  pointer-events: none;
}
.sp-flash {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--tx);
  opacity: 0;
  pointer-events: none;
}

/* ---- reveal card ---- */
.sp-reveal {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.sp-reveal.on {
  display: flex;
}
.sp-card {
  width: min(340px, 100%);
  border: var(--v2-rule) solid var(--line);
  background: var(--tile);
  box-shadow: var(--v2-shadow-10) var(--ink);
  text-align: center;
  transform: scale(0);
}
.sp-ch {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  background: var(--tc, var(--acc));
  color: var(--ink);
  font-size: var(--fs-11);
}
.sp-icon {
  display: block;
  margin: 24px auto 10px;
  image-rendering: pixelated;
}
.sp-nm {
  padding: 0 12px;
  color: var(--tc, var(--acc));
  font-size: var(--fs-33);
  line-height: 1.1;
}
.sp-ds {
  margin: 0;
  padding: 10px 18px 0;
  color: var(--mute);
  font-family: var(--mono);
  font-size: var(--fs-12);
  line-height: 1.5;
}
.sp-cid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 18px 0;
  padding: 0 0 0 10px;
  border: var(--v2-rule) dashed var(--line);
  color: var(--tx);
  font-size: var(--fs-11);
}
.sp-cid[hidden] {
  display: none;
}
.sp-cid button {
  text-transform: inherit;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  background: var(--acc-hi);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.sp-acts {
  display: flex;
  gap: var(--v2-rule);
  margin-top: 18px;
  border-top: var(--v2-rule) solid var(--line);
  background: var(--line);
}
.sp-acts button {
  text-transform: inherit;
  flex: 1 1 0;
  height: 44px;
  border: 0;
  background: var(--alt);
  color: var(--tx);
  font: inherit;
  font-size: var(--fs-11);
  cursor: pointer;
}
.sp-acts button.p {
  background: var(--acc-hi);
  color: var(--ink);
}
.sp-acts button[hidden] {
  display: none;
}

/* ---- side ---- */
.sp-side {
  grid-column: 2;
  grid-row: 3 / span 2;
  min-width: 0;
  min-height: 0;
}
.sp-r {
  margin-left: auto;
  color: var(--acc-hi);
}
.sp-side-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: auto;
  background: var(--tile);
}
.sp-form {
  display: flex;
  flex: 0 0 auto;
  margin: 0;
  border-bottom: var(--v2-rule) solid var(--line);
}
.sp-field {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  background: var(--bg);
}
.sp-field:focus-within {
  box-shadow: inset 0 0 0 1px var(--acc);
}
.sp-field input {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--tx);
  font-family: var(--mono);
  font-size: var(--fs-16);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.sp-field input::placeholder {
  color: var(--mute);
}
.sp-go {
  flex: 0 0 96px;
  border: 0;
  background: var(--acc-hi);
  color: var(--ink);
  font-size: var(--fs-11);
  cursor: pointer;
}
.sp-go:disabled {
  background: var(--line);
  color: var(--mute);
  cursor: not-allowed;
}
.sp-sec {
  flex: 0 0 auto;
  padding-bottom: 10px;
  border-bottom: var(--v2-rule) solid var(--line);
}
.sp-sec[hidden] {
  display: none;
}
.sp-lbl {
  display: flex;
  margin: 0;
  padding: 12px 12px 6px;
  color: var(--mute);
  font-size: var(--fs-11);
}
.sp-empty {
  margin: 0 12px;
  color: var(--mute);
  font-family: var(--mono);
  font-size: var(--fs-12);
}

.sp-pos {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  margin: 0 12px 6px;
  padding: 10px;
  border: var(--v2-rule) solid var(--line);
  background: var(--bg);
}
.sp-pos.sel {
  border-color: var(--acc);
  box-shadow: inset 0 0 0 1px var(--acc);
}
.sp-pos .c {
  color: var(--tx);
  font-size: var(--fs-22);
  line-height: 1;
}
.sp-pos .c em {
  margin-left: 6px;
  padding: 2px 5px;
  color: var(--ink);
  font-size: var(--fs-11);
  font-style: normal;
  vertical-align: 4px;
}
.sp-pos .c em.long {
  background: var(--acc-hi);
}
.sp-pos .c em.short {
  background: var(--bone);
}
.sp-pos .st {
  align-self: center;
  justify-self: end;
  font-size: var(--fs-11);
}
.sp-pos .st.ok {
  color: var(--ok);
}
.sp-pos .st.no {
  color: var(--mute);
}
.sp-pos .bar {
  display: flex;
  grid-column: 1 / -1;
  gap: 2px;
}
.sp-pos .bar i {
  flex: 1 1 0;
  height: 6px;
  background: var(--line);
}
.sp-pos .bar i.on {
  background: var(--acc);
}
.sp-pos .meta {
  align-self: center;
  color: var(--mute);
  font-size: var(--fs-11);
}
.sp-pos button {
  text-transform: inherit;
  justify-self: end;
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  background: var(--acc-hi);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-11);
  cursor: pointer;
}
.sp-pos button:disabled {
  background: var(--line);
  color: var(--mute);
  cursor: not-allowed;
}

.sp-prizes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--v2-rule);
  margin: 0 12px;
  border: var(--v2-rule) solid var(--line);
  background: var(--line);
}
.sp-pz {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 18px 6px 8px;
  background: var(--bg);
}
/* Leftover grid cell → hatch. */
.sp-pz.pad {
  background: var(--hatch), var(--bg);
}
.sp-pz canvas {
  image-rendering: pixelated;
}
.sp-pz .n {
  color: var(--tx);
  font-size: var(--fs-11);
  text-align: center;
}
.sp-pz .t {
  position: absolute;
  top: 0;
  left: 0;
  padding: 1px 4px;
  background: var(--tc);
  color: var(--ink);
  font-size: var(--fs-11);
}
.sp-pz.on {
  background: var(--tc);
}
.sp-pz.on .n {
  color: var(--ink);
}
.sp-pz.top {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: center;
  gap: 14px;
  padding: 12px;
  background: var(--hatch), var(--bg);
}
.sp-pz.top .n {
  color: var(--warn);
  font-size: var(--fs-22);
}
.sp-pz.top.on {
  background: var(--tc);
}
.sp-pz.top.on .n {
  color: var(--ink);
}

.sp-feed {
  margin: 0 12px;
}
.sp-feed .sp-empty {
  margin: 0;
}
.sp-feed-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: var(--v2-rule) dashed var(--line);
  font-size: var(--fs-11);
}
.sp-feed-row:first-child {
  border-top: 0;
}
.sp-feed-row .w {
  color: var(--mute);
}
.sp-feed-row .ago {
  margin-left: auto;
  color: var(--mute);
}
.sp-rules {
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 12px;
  color: var(--mute);
  font-family: var(--mono);
  font-size: var(--fs-12);
  line-height: 1.6;
}
/* Leftover band → hatch (kit .x-fill). */
.sp-fill {
  flex: 1 1 auto;
  min-height: 12px;
  background: var(--hatch);
}

/* ---- how-to strip ---- */
.sp-how {
  grid-column: 1;
  grid-row: 4;
  display: flex;
  flex-direction: row;
  min-width: 0;
  background: var(--tile);
}
.sp-step {
  display: flex;
  flex: 1 1 0;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-right: var(--v2-rule) solid var(--line);
}
.sp-step:last-child {
  border-right: 0;
}
.sp-no {
  color: var(--acc-hi);
  font-size: var(--fs-22);
  line-height: 1;
}
.sp-tx {
  color: var(--mute);
  font-family: var(--mono);
  font-size: var(--fs-12);
  line-height: 1.5;
}
.sp-tx b {
  display: block;
  margin-bottom: 4px;
  color: var(--tx);
  font-size: var(--fs-11);
}

@media (prefers-reduced-motion: reduce) {
  .sp-track,
  .sp-big.ready {
    animation: none;
  }
  /* No marquee: park the prize names at the left edge. */
  .sp-track {
    padding-left: 18px;
  }
}
