:root {
  --deep: #0F3D3E;
  --teal: #2E7D78;
  --aqua: #7FC7C2;
  --cream: #F2E7D5;
  --mauve: #C86B85;
  --red: #E13B2B;
  --mustard: #F5B82E;
  --ink: #2B2A28;
  --kraft: #DCC49B;
  --display: 'Big Shoulders Stencil', 'Arial Narrow', sans-serif;
  --text: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Azeret Mono', 'Courier New', monospace;
  --star: polygon(50% 0%, 59% 15%, 76% 6%, 80% 24%, 99% 25%, 91% 42%, 100% 55%, 84% 65%, 92% 83%, 73% 84%, 68% 100%, 52% 92%, 36% 100%, 31% 84%, 12% 83%, 20% 65%, 4% 55%, 13% 42%, 5% 25%, 24% 24%, 28% 6%, 45% 15%);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--deep);
  color: var(--ink);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

body { overflow: hidden; }

button { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

#app {
  position: fixed;
  inset: 0;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--deep);
}

#game {
  position: absolute;
  inset: 0;
  z-index: 0;
}
#game canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
#app.playing #game { touch-action: none; }

.hidden { display: none !important; }

.kicker {
  font-family: var(--text);
  font-weight: 800;
  font-size: 9px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
}

.money {
  font-family: var(--mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

/* ---------- boot ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: var(--deep);
  transition: opacity .35s ease, visibility .35s ease;
}
.boot.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 34px 20px;
  background: var(--cream);
  border: 4px solid var(--ink);
  box-shadow: 7px 8px 0 rgba(43,42,40,.55);
  transform: rotate(-1deg);
}
.boot-card strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 8vw, 54px);
  line-height: .85;
  text-transform: uppercase;
  color: var(--red);
}
.boot-kicker {
  font-family: var(--text);
  font-weight: 800;
  font-size: 9px;
  text-transform: uppercase;
}
.boot-press {
  margin-top: 2px;
  font-family: var(--text);
  font-weight: 800;
  font-size: 9px;
  line-height: 1.2;
  text-transform: uppercase;
  text-align: center;
  color: var(--deep);
  max-width: 210px;
}
.boot.queued .boot-press { color: var(--red); }
.boot-dots { display: flex; gap: 6px; margin-top: 4px; }
.boot-dots i {
  width: 8px; height: 8px;
  border: 2px solid var(--ink);
  background: var(--mustard);
  border-radius: 50%;
  animation: blink 1s steps(2, end) infinite;
}
.boot-dots i:nth-child(2) { animation-delay: .2s; }
.boot-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- start screen ---------- */
.screen {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.start-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  overflow-x: hidden;
  padding: max(16px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  background: rgba(242, 231, 213, 0.12);
  -webkit-overflow-scrolling: touch;
}

.start-wrap {
  width: min(100%, 1080px);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
}

.marquee-wrap {
  width: 100%;
  position: relative;
  padding-top: 30px;
  margin-bottom: clamp(12px, 3.2vh, 34px);
}

.marquee {
  position: relative;
  transform: rotate(-0.7deg);
  filter: drop-shadow(9px 11px 0 rgba(43,42,40,.32));
}

.wire {
  position: absolute;
  top: -32px;
  width: 3px;
  height: 36px;
  background: var(--ink);
  z-index: 1;
}
.wire::before {
  content: "";
  position: absolute;
  top: -8px; left: 50%;
  width: 12px; height: 12px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--deep);
}
.wire-a { left: 9%; }
.wire-b { left: 50%; }
.wire-c { right: 9%; }

.marquee-plate {
  position: relative;
  background: var(--red);
  border: 4px solid var(--ink);
  padding: clamp(12px, 2.2vw, 22px) clamp(14px, 3vw, 34px) clamp(20px, 3vw, 30px);
  overflow: hidden;
}
.marquee-plate::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px dashed rgba(242,231,213,.55);
  pointer-events: none;
}
.marquee-plate::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--ink) 1px, transparent 1px);
  background-size: 11px 11px;
  opacity: .07;
  pointer-events: none;
}

.marquee-top {
  position: relative;
  z-index: 3;
  display: table;
  margin: 0 auto 6px;
  padding: 4px 12px 3px;
  background: var(--mustard);
  border: 3px solid var(--ink);
  font-family: var(--text);
  font-weight: 800;
  font-size: clamp(8px, 1.5vw, 11px);
  text-transform: uppercase;
  transform: rotate(1.2deg);
}

.wordmark {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: .76;
  color: var(--cream);
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
}
.word { display: flex; justify-content: center; white-space: nowrap; }
.word .l {
  display: inline-block;
  transform: rotate(var(--r)) translateY(var(--y));
  text-shadow:
    -2px -2px 0 var(--ink),
    2px -2px 0 var(--ink),
    -2px 2px 0 var(--ink),
    2px 2px 0 var(--ink),
    3px 5px 0 rgba(43,42,40,.45);
}
.word-mall {
  font-size: clamp(28px, 6.4vw, 60px);
  margin-left: -.28em;
  margin-bottom: 2px;
}
.word-stampede {
  font-size: clamp(50px, 13.2vw, 126px);
  margin-left: -.2em;
}
.word .loose { position: relative; }
.word .loose::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 2px;
  height: .38em;
  background: var(--ink);
  transform: translateX(-50%) rotate(6deg);
}

.marquee-sub {
  position: relative;
  z-index: 4;
  display: table;
  margin: 12px auto 0;
  padding: 4px 10px;
  background: var(--cream);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(7px, 1.4vw, 10px);
  text-transform: uppercase;
  transform: rotate(-1deg);
}

.star {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  width: clamp(38px, 7vw, 66px);
  aspect-ratio: 1;
  background: var(--mustard);
  color: var(--ink);
  font-family: var(--text);
  font-weight: 900;
  font-size: clamp(16px, 3vw, 28px);
  clip-path: var(--star);
  filter: drop-shadow(3px 4px 0 rgba(43,42,40,.55));
}
.star-1 { left: 4%; top: 30%; transform: rotate(-13deg); }
.star-2 {
  right: 3.5%;
  top: 8%;
  background: var(--cream);
  color: var(--red);
  transform: rotate(11deg);
}

.burst-cart {
  position: absolute;
  z-index: 6;
  width: clamp(130px, 28vw, 280px);
  height: auto;
  right: 1.5%;
  top: 22%;
  transform: rotate(3deg);
  filter: drop-shadow(4px 5px 0 rgba(43,42,40,.4));
  pointer-events: none;
}

.roster-space {
  width: 100%;
  min-height: clamp(40px, 10vh, 122px);
  flex: 0 0 auto;
}

.start-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  justify-items: center;
}

.start-copy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: min(100%, 460px);
}

.how {
  margin: 0;
  padding: 9px 13px 10px;
  background: var(--cream);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(43,42,40,.55);
  font-weight: 600;
  font-size: clamp(12px, 1.5vw, 14px);
  line-height: 1.3;
  text-align: left;
}

.sale-button {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 11px 20px 13px;
  background: var(--red);
  color: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 3px;
  box-shadow: 0 7px 0 var(--ink);
  transform: rotate(-1deg);
  cursor: pointer;
  text-align: left;
  transition: transform .08s steps(2), box-shadow .08s steps(2), background-color .12s;
}
.sale-button::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -6px -9px -5px -7px;
  background: var(--mustard);
  clip-path: var(--star);
  transform: rotate(4deg);
}
.sale-button:hover { transform: rotate(0deg) translateY(-1px); box-shadow: 0 8px 0 var(--ink); background: #ee4a39; }
.sale-button:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--ink); }
.sale-button:focus-visible { outline: 4px solid var(--aqua); outline-offset: 4px; }
.sale-button-kicker {
  font-family: var(--text);
  font-weight: 800;
  font-size: 9px;
  line-height: 1;
  text-transform: uppercase;
  opacity: .92;
}
.sale-button-main {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(27px, 4.6vw, 40px);
  line-height: .86;
  text-transform: uppercase;
}
.sale-button-key {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%) rotate(3deg);
  padding: 3px 5px;
  background: var(--cream);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 8px;
}
.sale-button.small { width: 100%; transform: none; margin: 0; }
.sale-button.small:hover { transform: translateY(-1px); }

.start-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(100%, 460px);
}
.best-tag {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 7px 14px 8px;
  background: var(--kraft);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(43,42,40,.55);
  transform: rotate(2deg);
}
.best-tag .money { font-size: clamp(18px, 3vw, 24px); }
.start-note {
  padding: 6px 10px;
  background: var(--cream);
  border: 2px solid var(--ink);
  font-family: var(--text);
  font-weight: 700;
  font-size: 10px;
  line-height: 1.25;
  text-transform: uppercase;
  transform: rotate(-1.5deg);
  text-align: center;
}

/* ---------- HUD ---------- */
.hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: max(7px, env(safe-area-inset-top)) 12px 0;
  pointer-events: none;
}
.hud-strip {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 48px;
  background: var(--red);
  border-bottom: 3px solid var(--ink);
}
.hud-strip::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(242,231,213,.5) 0 9px, transparent 9px 18px);
}
.hud-strip::after {
  content: "";
  position: absolute;
  right: 12%; top: 0;
  width: 30px; height: 11px;
  background: var(--mustard);
  border: 2px solid var(--ink);
  border-top: 0;
  transform: skewX(-16deg);
}

.hud-chase {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  padding: 2px 3px 1px;
  border-top: 2px solid rgba(43,42,40,.35);
  pointer-events: none;
}
.chase-kicker {
  font-family: var(--text);
  font-weight: 900;
  font-size: 7px;
  letter-spacing: .04em;
  line-height: 1;
  color: var(--ink);
}
.chase-pips { display: flex; gap: 2px; }
.chase-pips i {
  display: block;
  width: 8px; height: 4px;
  background: rgba(43,42,40,.18);
  border: 1.5px solid var(--ink);
}
.hud-chase[data-level="1"] .chase-pips i:nth-child(-n+1),
.hud-chase[data-level="2"] .chase-pips i:nth-child(-n+2),
.hud-chase[data-level="3"] .chase-pips i:nth-child(-n+3) { background: var(--red); }
.hud-chase[data-level="3"] .chase-kicker { color: var(--red); }

.hud-cart {
  position: relative;
  padding-top: 5px;
  pointer-events: none;
}
.tag-hole {
  position: absolute;
  z-index: 2;
  left: 20px;
  top: -2px;
  width: 11px; height: 11px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--deep);
}
.tag-hole::before {
  content: "";
  position: absolute;
  left: 50%; bottom: 9px;
  width: 2px; height: 15px;
  background: var(--ink);
  transform: translateX(-50%);
}
.kraft-tag {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 138px;
  padding: 8px 11px 8px;
  background: var(--kraft);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(43,42,40,.45);
  transform: rotate(-1.6deg);
}
.cart-figure { display: flex; align-items: baseline; gap: 5px; }
#hud-value { font-size: clamp(19px, 3.4vw, 25px); line-height: 1; }
.cart-meter { display: flex; align-items: center; gap: 6px; }
.slot-meter { display: flex; gap: 2px; flex: 0 0 auto; }
.slot-meter i {
  display: block;
  width: clamp(4px, .85vw, 6px);
  height: 9px;
  border: 1.5px solid var(--ink);
  background: rgba(242,231,213,.45);
}
.slot-meter i.on { background: var(--red); }
.slots { font-family: var(--mono); font-weight: 700; font-size: 9px; }

.hud-right {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-top: 4px;
  pointer-events: auto;
}
.shelf-talker {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 6px 10px 7px;
  background: var(--mustard);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(43,42,40,.45);
  transform: rotate(1.2deg);
}
.shelf-talker .money { font-size: clamp(15px, 2.8vw, 20px); line-height: 1; }
.round-btn {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  padding: 0;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 3px 3px 0 rgba(43,42,40,.45);
  cursor: pointer;
  transition: transform .08s steps(2), background-color .12s;
}
.round-btn:hover { background: var(--mustard); }
.round-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(43,42,40,.45); }
.round-btn:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; }
.pause-bars { display: flex; gap: 4px; }
.pause-bars i { display: block; width: 5px; height: 16px; background: var(--ink); }

.hint {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%) rotate(-.8deg);
  z-index: 30;
  padding: 5px 10px;
  background: var(--mustard);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(43,42,40,.5);
  font-family: var(--text);
  font-weight: 800;
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

/* ---------- overlays ---------- */
.overlay {
  z-index: 40;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  background: rgba(15, 61, 62, .82);
  overflow-y: auto;
}

.pause-card {
  position: relative;
  width: min(100%, 380px);
  padding: 22px 22px 20px;
  background: var(--cream);
  border: 4px solid var(--ink);
  box-shadow: 8px 9px 0 rgba(43,42,40,.5);
  transform: rotate(-.8deg);
  text-align: center;
}
.pause-card::before {
  content: "";
  position: absolute;
  left: -4px; right: -4px; top: -4px;
  height: 13px;
  background: var(--mustard);
  border-bottom: 3px solid var(--ink);
}
.pause-card h2 {
  margin: 12px 0 2px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(48px, 12vw, 72px);
  line-height: .8;
  text-transform: uppercase;
  color: var(--red);
}
.pause-card p {
  margin: 8px 0 16px;
  font-size: 13px;
  font-weight: 600;
}
.pause-card .sale-button { margin-bottom: 12px; }

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 11px;
  background: var(--cream);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 rgba(43,42,40,.45);
  font-family: var(--text);
  font-weight: 800;
  font-size: 9px;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}
.ghost-button:hover { background: var(--mustard); }
.ghost-button:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(43,42,40,.45); }

/* ---------- receipt ---------- */
#summary-screen { z-index: 45; align-items: start; }
.receipt-shell {
  position: relative;
  width: min(100%, 520px);
  margin: auto;
  filter: drop-shadow(8px 10px 0 rgba(43,42,40,.42));
}
.receipt {
  position: relative;
  background: var(--cream);
  border: 3px solid var(--ink);
  padding: clamp(16px, 3.6vw, 26px) clamp(14px, 4vw, 26px) 18px;
}
@keyframes print-in {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}
.receipt-tear { position: relative; height: 12px; z-index: 2; }
.receipt-tear.top {
  background: var(--cream);
  clip-path: polygon(0 0, 100% 0, 100% 55%, 97% 100%, 94% 45%, 91% 85%, 88% 40%, 85% 100%, 82% 50%, 79% 88%, 76% 40%, 73% 100%, 70% 50%, 67% 88%, 64% 40%, 61% 100%, 58% 50%, 55% 88%, 52% 40%, 49% 100%, 46% 50%, 43% 88%, 40% 40%, 37% 100%, 34% 50%, 31% 88%, 28% 40%, 25% 100%, 22% 50%, 19% 88%, 16% 40%, 13% 100%, 10% 50%, 7% 88%, 4% 40%, 1% 100%, 0 55%);
  margin-bottom: -1px;
}
.receipt-tear.bottom {
  background: var(--cream);
  clip-path: polygon(0 45%, 3% 100%, 6% 50%, 9% 90%, 12% 40%, 15% 100%, 18% 55%, 21% 92%, 24% 45%, 27% 100%, 30% 52%, 33% 90%, 36% 40%, 39% 100%, 42% 55%, 45% 92%, 48% 45%, 51% 100%, 54% 52%, 57% 90%, 60% 40%, 63% 100%, 66% 55%, 69% 92%, 72% 45%, 75% 100%, 78% 52%, 81% 90%, 84% 40%, 87% 100%, 90% 55%, 93% 92%, 96% 45%, 99% 100%, 100% 45%);
  margin-top: -1px;
}

.receipt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.receipt-brand { display: flex; align-items: center; gap: 10px; }
.receipt-cart {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  background: var(--red);
  border: 3px solid var(--ink);
  color: var(--cream);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  transform: rotate(-3deg);
}
.receipt-brand strong {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(25px, 6vw, 36px);
  line-height: .82;
  text-transform: uppercase;
  color: var(--ink);
}
.receipt-brand span:not(.receipt-cart) {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 7px;
}
.receipt-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 8px;
  white-space: nowrap;
}
.receipt-rule {
  height: 0;
  border-top: 2px dashed var(--ink);
  margin: 12px 0;
  opacity: .7;
}

.receipt-items { display: flex; flex-direction: column; gap: 7px; }
.rline {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  line-height: 1.15;
}
@keyframes row-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.rline .qty { flex: 0 0 auto; font-family: var(--mono); font-weight: 700; font-size: 10px; }
.rline .rname { flex: 0 1 auto; font-weight: 600; }
.rline .dots { flex: 1 1 auto; border-bottom: 2px dotted rgba(43,42,40,.4); transform: translateY(-2px); }
.rline .price { flex: 0 0 auto; font-family: var(--mono); font-weight: 700; font-size: 11px; }
.receipt-lines .rline { justify-content: space-between; font-family: var(--mono); font-weight: 700; font-size: 10px; gap: 20px; }
.receipt-lines .rline span:first-child { font-family: var(--text); font-weight: 800; font-size: 9px; }

.receipt-total {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(140px, 26vw, 176px);
  margin: 6px 0 2px;
}
.total-burst {
  position: absolute;
  width: clamp(156px, 32vw, 196px);
  aspect-ratio: 1;
  background: var(--mustard);
  clip-path: var(--star);
  filter: drop-shadow(4px 5px 0 rgba(43,42,40,.5));
}
.total-burst::before {
  content: "";
  position: absolute;
  inset: 12%;
  background: var(--red);
  clip-path: var(--star);
}
.total-label {
  position: relative;
  z-index: 2;
  margin-top: -18px;
  padding: 3px 8px 2px;
  background: var(--cream);
  border: 2px solid var(--ink);
  font-family: var(--text);
  font-weight: 800;
  font-size: 9px;
  text-transform: uppercase;
  transform: rotate(-2deg);
}
.total-number {
  position: relative;
  z-index: 2;
  margin-top: -7px;
  color: var(--cream);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(46px, 10vw, 66px);
  line-height: .8;
  text-shadow: 2px 3px 0 rgba(43,42,40,.55);
  transform: rotate(1deg);
}
.receipt-best {
  display: table;
  margin: 4px auto 8px;
  padding: 4px 10px;
  background: var(--mustard);
  border: 2px solid var(--ink);
  font-family: var(--text);
  font-weight: 900;
  font-size: 10px;
  text-transform: uppercase;
  transform: rotate(-2deg);
}
.receipt-word {
  margin: 8px 0 14px;
  text-align: center;
  font-family: var(--text);
  font-weight: 600;
  font-size: 11px;
}
.receipt-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.receipt-actions .sale-button { width: 100%; }
.receipt-secondary { display: flex; gap: 8px; }
.receipt-secondary .ghost-button { flex: 1 1 0; }
.barcode {
  height: 34px;
  margin-top: 15px;
  background: repeating-linear-gradient(90deg,
    var(--ink) 0 2px, transparent 2px 5px,
    var(--ink) 5px 6px, transparent 6px 10px,
    var(--ink) 10px 13px, transparent 13px 15px,
    var(--ink) 15px 16px, transparent 16px 21px);
}
.receipt-foot {
  margin-top: 5px;
  text-align: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 7px;
}

/* ---------- responsive ---------- */
@media (min-width: 820px) {
  .start-row {
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr);
    justify-items: stretch;
    align-items: end;
  }
  .start-copy { justify-self: start; }
  .start-side { align-items: flex-end; text-align: right; }
  .start-side .best-tag { transform: rotate(1.5deg); }
}
@media (max-width: 500px) {
  .hud { padding-left: 8px; padding-right: 8px; }
  .kraft-tag { min-width: 128px; padding: 7px 9px; }
  .shelf-talker { padding: 5px 8px 6px; }
  .hud-right { gap: 6px; }
  .round-btn { width: 38px; height: 38px; }
  .slot-meter i { width: 4px; }
  .star-2 { top: 2%; }
  .burst-cart { top: 27%; }
}
@media (max-height: 620px) {
  .roster-space { min-height: 18px; }
  .marquee-wrap { padding-top: 18px; margin-bottom: 10px; }
  .word-stampede { font-size: clamp(42px, 9.5vw, 88px); }
  .word-mall { font-size: clamp(24px, 4.6vw, 44px); }
  .start-note { display: none; }
  .how { padding: 7px 11px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .receipt { animation: none; }
  .receipt-items .rline { animation: none; }
  .boot-dots i { animation: none; }
  .marquee { transform: none; }
}

/* hit feedback */
#app.hit::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 26;
  pointer-events: none;
  box-shadow: inset 0 0 0 10px rgba(225, 59, 43, .62);
  animation: hit-flash .22s ease-out forwards;
}
@keyframes hit-flash {
  from { opacity: 1; }
  to { opacity: 0; }
}

[hidden] { display: none !important; }
.start-screen { background: rgba(242, 231, 213, .24); }
.wordmark { z-index: 5; }
.burst-cart {
  width: clamp(118px, 24vw, 210px);
  right: 1%;
  top: 36%;
  z-index: 4;
}

/* ---------- roster, locker and third-person UI ---------- */
.start-screen {
  align-items: flex-start;
  padding-top: max(12px, env(safe-area-inset-top));
}
.start-wrap { margin: 0 auto; }
.roster-block {
  width: 100%;
  max-width: 860px;
  margin: 0 auto 10px;
}
.roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 7px;
  padding: 5px 9px;
  background: var(--cream);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(43,42,40,.5);
  transform: rotate(-.5deg);
}
.roster-head .kicker { font-size: 10px; }
.roster-wearing {
  font-family: var(--text);
  font-weight: 700;
  font-size: 9px;
  text-transform: uppercase;
}
.roster-wearing b { color: var(--red); font-weight: 900; }
.roster-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.char-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  min-width: 0;
  padding: 6px 7px 8px;
  background: var(--cream);
  border: 3px solid var(--ink);
  box-shadow: 4px 5px 0 rgba(43,42,40,.55);
  cursor: pointer;
  text-align: left;
  transform: rotate(-.6deg);
  transition: transform .1s steps(2), background-color .12s;
}
.char-card:nth-child(2) { transform: rotate(.5deg); }
.char-card:nth-child(3) { transform: rotate(-1.1deg); }
.char-card:hover { transform: translateY(-2px) rotate(0); }
.char-card.selected {
  border-color: var(--red);
  background: #fff7e7;
  box-shadow: 4px 5px 0 var(--red);
}
.char-card .char-portrait {
  display: block;
  width: 100%;
  height: clamp(90px, 15vh, 126px);
  object-fit: contain;
  object-position: center bottom;
  margin: -4px 0 1px;
  pointer-events: none;
}
.char-role {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(13px, 2.8vw, 20px);
  line-height: .85;
  text-transform: uppercase;
}
.char-name {
  font-family: var(--text);
  font-weight: 800;
  font-size: 8px;
  text-transform: uppercase;
  color: var(--teal);
}
.char-perk {
  font-family: var(--text);
  font-weight: 700;
  font-size: clamp(7px, 1.5vw, 9px);
  line-height: 1.15;
  text-transform: uppercase;
  min-height: 2.2em;
}
.pick-flag {
  position: absolute;
  top: -9px;
  right: -7px;
  padding: 2px 6px;
  background: var(--red);
  color: var(--cream);
  border: 2px solid var(--ink);
  font-family: var(--text);
  font-weight: 900;
  font-size: 7px;
  text-transform: uppercase;
  transform: rotate(4deg);
}
.start-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  margin: 2px auto 12px;
}
.locker-link { background: var(--mustard); }
.points-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  background: var(--kraft);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(43,42,40,.5);
  transform: rotate(1deg);
}
.points-tag .money { font-size: 17px; }

.hud-perk {
  display: block;
  margin-top: 2px;
  font-family: var(--text);
  font-weight: 800;
  font-size: 7px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--red);
  max-width: 145px;
}
.hud-skin {
  display: block;
  margin-top: 1px;
  font-family: var(--text);
  font-weight: 800;
  font-size: 7px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--teal);
  max-width: 145px;
}

/* ---------- locker ---------- */
#locker-screen { z-index: 46; align-items: flex-start; }
.locker-card {
  position: relative;
  width: min(96vw, 880px);
  margin: auto;
  padding: 14px 16px 16px;
  background: var(--cream);
  border: 4px solid var(--ink);
  box-shadow: 9px 10px 0 rgba(43,42,40,.5);
}
.locker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 3px solid var(--ink);
}
.locker-head h2 {
  margin: 1px 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 6vw, 48px);
  line-height: .82;
  text-transform: uppercase;
  color: var(--red);
}
.locker-points {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 5px 9px;
  background: var(--mustard);
  border: 2px solid var(--ink);
  transform: rotate(1deg);
}
.locker-points strong { font-size: 20px; }
.locker-close {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  color: var(--red);
  flex: 0 0 auto;
}
.locker-preview {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(100px, 170px) minmax(0,1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 2px dashed rgba(43,42,40,.5);
}
.locker-who, .locker-wearing { display: flex; flex-direction: column; gap: 3px; }
.locker-who strong, .locker-wearing strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(22px, 4vw, 34px);
  line-height: .84;
  text-transform: uppercase;
}
.locker-who span:last-child, .locker-skin-note, #locker-skin-note {
  font-family: var(--text);
  font-weight: 700;
  font-size: 9px;
  text-transform: uppercase;
}
.locker-preview-frame {
  display: grid;
  place-items: center;
  min-height: 100px;
  background: rgba(127,199,194,.22);
  border: 2px solid var(--ink);
  transform: rotate(-1deg);
}
.locker-preview-frame img {
  display: block;
  width: 100%;
  max-height: 170px;
  object-fit: contain;
}
.locker-wearing { align-items: flex-end; text-align: right; }
.locker-wearing strong { color: var(--red); }
#locker-skin-note { color: var(--ink); opacity: .8; }
.locker-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 9px 0 3px;
}
.locker-tab {
  flex: 1 1 0;
  min-width: 92px;
  padding: 6px 7px;
  background: var(--mustard);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 rgba(43,42,40,.4);
  font-family: var(--text);
  font-weight: 800;
  font-size: 8px;
  text-transform: uppercase;
  cursor: pointer;
}
.locker-tab.active { background: var(--red); color: var(--cream); }
.locker-section { margin-top: 12px; }
.locker-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.locker-section h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  line-height: .8;
  text-transform: uppercase;
}
.locker-section-head > span {
  font-family: var(--text);
  font-weight: 800;
  font-size: 7px;
  text-transform: uppercase;
  opacity: .75;
  text-align: right;
}
.skin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 7px;
}
.skin-card {
  display: grid;
  grid-template-columns: 58px minmax(0,1fr);
  grid-template-rows: auto auto auto;
  gap: 1px 7px;
  padding: 6px;
  background: #fbf3e4;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 rgba(43,42,40,.35);
}
.skin-card.equipped { border-color: var(--red); box-shadow: 2px 2px 0 var(--red); }
.skin-card img {
  grid-row: 1 / span 3;
  display: block;
  width: 58px;
  height: 70px;
  object-fit: contain;
}
.skin-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  line-height: .85;
  text-transform: uppercase;
}
.skin-note {
  font-family: var(--text);
  font-weight: 600;
  font-size: 7px;
  line-height: 1.15;
}
.skin-type {
  font-family: var(--text);
  font-weight: 900;
  font-size: 6px;
  text-transform: uppercase;
  color: var(--red);
}
.skin-btn {
  grid-column: 2;
  justify-self: stretch;
  margin-top: 3px;
  padding: 4px 5px;
  background: var(--mustard);
  border: 2px solid var(--ink);
  font-family: var(--text);
  font-weight: 900;
  font-size: 8px;
  text-transform: uppercase;
  cursor: pointer;
}
.skin-btn:disabled { opacity: .55; cursor: default; background: var(--cream); }
.skin-btn.buy { background: var(--red); color: var(--cream); }
.skin-btn[data-daily="1"] { background: var(--aqua); }
.daily-card {
  display: grid;
  grid-template-columns: 110px minmax(0,1fr);
  gap: 10px;
  align-items: center;
  padding: 9px;
  margin-bottom: 8px;
  background: #fff6e3;
  border: 3px solid var(--red);
  box-shadow: 4px 4px 0 rgba(43,42,40,.4);
}
.daily-frame {
  display: grid;
  place-items: center;
  background: rgba(200,107,133,.2);
  border: 2px solid var(--ink);
  transform: rotate(-1deg);
}
.daily-frame img { width: 100%; max-height: 120px; object-fit: contain; }
.daily-copy { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.daily-copy strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  line-height: .82;
  text-transform: uppercase;
}
.daily-copy p { margin: 0; font-family: var(--text); font-weight: 600; font-size: 9px; }
.daily-copy .sale-button.small { width: auto; min-width: 160px; padding: 6px 10px 7px; }
.daily-copy .sale-button-main { font-size: 19px; }
.daily-copy .sale-button-kicker { font-size: 7px; }
.daily-status { display: block; margin-top: 6px; font-family: var(--text); font-weight: 800; font-size: 8px; text-transform: uppercase; color: var(--teal); position: relative; z-index: 2; }
.daily-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.daily-grid .skin-card { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; }
.daily-grid .skin-card img { grid-row: auto; width: 100%; height: 68px; }
.daily-grid .skin-btn { grid-column: 1; }
.locker-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 9px;
  border-top: 3px solid var(--ink);
}
.locker-foot > span {
  font-family: var(--text);
  font-weight: 800;
  font-size: 7px;
  text-transform: uppercase;
  opacity: .75;
  max-width: 55%;
}
.receipt-actions .locker-link { width: 100%; background: var(--mustard); }

.toast {
  position: fixed;
  left: 50%;
  top: 13%;
  z-index: 55;
  transform: translate(-50%, -50%) rotate(-2deg);
  padding: 5px 10px;
  background: var(--red);
  color: var(--cream);
  border: 3px solid var(--ink);
  box-shadow: 4px 5px 0 rgba(43,42,40,.5);
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  line-height: .95;
  max-width: calc(100vw - 28px);
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
  animation: toast-pop .2s ease-out;
}
.toast.perk { background: var(--mustard); color: var(--ink); }
.toast.slow { background: var(--red); color: var(--cream); }
@keyframes toast-pop {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(-2deg) scale(.7); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(-2deg) scale(1); }
}

@media (max-width: 560px) {
  .locker-card { padding: 11px 10px 12px; }
  .locker-preview { grid-template-columns: minmax(0,1fr) 92px; }
  .locker-wearing { grid-column: 1 / -1; align-items: flex-start; text-align: left; }
  .locker-preview-frame { min-height: 80px; }
  .locker-preview-frame img { max-height: 100px; }
  .skin-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 5px; }
  .daily-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 4px; }
  .daily-grid .skin-card { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; padding: 4px; gap: 1px; }
  .daily-grid .skin-card img { grid-row: auto; width: 100%; height: 48px; }
  .daily-grid .skin-name { font-size: 11px; }
  .daily-grid .skin-note { display: none; }
  .daily-grid .skin-type { font-size: 5px; }
  .daily-grid .skin-btn { grid-column: 1; font-size: 7px; padding: 3px 2px; }
  .daily-card { grid-template-columns: 86px minmax(0,1fr); }
  .locker-section-head > span { max-width: 45%; }
}
@media (min-width: 820px) {
  .skin-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .daily-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 380px) {
  .roster-cards { gap: 5px; }
  .char-card { padding: 4px 5px 6px; }
  .char-role { font-size: 12px; }
}

/* keep HUD plates and the pause control above the hanging strip */
.hud-cart, .hud-right { position: relative; z-index: 2; }

.start-skins {
  width: 100%;
  max-width: 860px;
  margin: 10px auto 0;
  padding: 7px 8px 8px;
  background: var(--cream);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(43,42,40,.55);
}
.start-skins-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  line-height: .8;
  text-transform: uppercase;
}
.start-skins-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-start;
  margin-top: 5px;
}
.start-skin {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 58px;
  padding: 2px;
  background: #fbf3e4;
  border: 2px solid var(--ink);
  cursor: pointer;
}
.start-skin img { display: block; width: 100%; height: 50px; object-fit: contain; }
.start-skin-name { font-family: var(--display); font-weight: 700; font-size: 8px; line-height: .8; text-transform: uppercase; text-align: center; }
.start-skin-price { font-family: var(--mono); font-weight: 700; font-size: 6px; }
.start-skins-open {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 4px;
  background: var(--mustard);
  border: 2px solid var(--ink);
  font-family: var(--text);
  font-weight: 900;
  font-size: 8px;
  text-transform: uppercase;
  cursor: pointer;
}

/* crowd chase feedback */
#app.chase-warn::before,
#app.chase-hot::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 26;
  pointer-events: none;
}
#app.chase-warn::before {
  box-shadow: inset 0 0 0 5px rgba(225, 59, 43, .24), inset 0 -70px 90px -50px rgba(225, 59, 43, .42);
}
#app.chase-hot::before {
  box-shadow: inset 0 0 0 10px rgba(225, 59, 43, .52), inset 0 -100px 120px -45px rgba(225, 59, 43, .6);
  animation: chase-pulse .55s ease-in-out infinite alternate;
}
@keyframes chase-pulse {
  from { opacity: .65; }
  to { opacity: 1; }
}
