:root {
  --bg: #050505;
  --white: #f4f4f0;
  --muted: #d8d0dd;
  --red: #c889c9;
  --pink: #d49ad5;
  --blood: #a61b2b;
  --plum: #7d4f83;
  --black: #000;
  --paper: #f5f0e6;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); overflow: hidden; color: var(--white); font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', system-ui, sans-serif; }
body { touch-action: none; overscroll-behavior: none; }

.app {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #030303;
  overflow: hidden;
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #030303;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 20% 8%, rgba(255,255,255,.14), transparent 24%),
    radial-gradient(circle at 70% 80%, rgba(200,137,201,.22), transparent 28%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 5px),
    linear-gradient(120deg, #050505 0%, #111 48%, #050505 100%);
  z-index: 20;
  overflow: hidden;
}
.screen.active { display: flex; }
.screen::before {
  content: 'NO DEAL   BLOOD MONEY   THE SUNSET A GO-GO   WE CANNOT BREATHE   BURN THE CONTRACT';
  position: absolute;
  left: -20vw;
  top: 10vh;
  width: 150vw;
  color: rgba(255,255,255,.07);
  font-size: clamp(48px, 16vw, 96px);
  line-height: .78;
  transform: rotate(-11deg);
  pointer-events: none;
}
.screen::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(0,0,0,.32) 0 2px, transparent 2px 6px);
  mix-blend-mode: screen;
}

.poster-wall {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(104deg, transparent 0 12%, rgba(255,255,255,.18) 12% 14%, transparent 14% 100%),
    linear-gradient(22deg, transparent 0 68%, rgba(200,137,201,.30) 68% 72%, transparent 72% 100%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.12), transparent 18%);
  opacity: .9;
}
.poster-wall::before,
.poster-wall::after {
  content: 'BLOOD MONEY\A NO DEAL\A KILLAH CORTEZ\A SAVE YOUR SOUL\A SUNSET A GO-GO';
  white-space: pre;
  position: absolute;
  font-size: 44px;
  line-height: .85;
  color: rgba(245,245,240,.13);
  text-shadow: 3px 3px 0 #000;
  transform: rotate(8deg);
}
.poster-wall::before { left: 8vw; top: 16vh; }
.poster-wall::after { right: -8vw; bottom: 18vh; transform: rotate(-12deg); color: rgba(200,137,201,.18); }

.title-screen { flex-direction: column; justify-content: space-between; }
.kc-logo {
  width: min(88vw, 460px);
  max-height: 82px;
  object-fit: contain;
  margin-top: 8px;
  filter: drop-shadow(0 2px 1px #000) drop-shadow(5px 5px 0 rgba(200,137,201,.8));
  position: relative;
  z-index: 2;
}
.title-card, .score-card, .brief-card, .contract-card {
  width: min(94vw, 430px);
  position: relative;
  z-index: 2;
  background: rgba(0,0,0,.86);
  border: 2px solid rgba(255,255,255,.9);
  box-shadow: 10px 10px 0 rgba(200,137,201,.72), -5px -5px 0 rgba(255,255,255,.22), 0 0 40px rgba(0,0,0,.9);
  padding: 22px 18px;
  text-align: center;
}
.ripped-card { clip-path: polygon(0 2%, 98% 0, 100% 95%, 92% 100%, 4% 98%, 0 88%); }
.venue-stamp {
  display: inline-block;
  margin: 0 0 10px;
  padding: 5px 9px;
  transform: rotate(-2deg);
  background: var(--paper);
  color: #000;
  border: 2px solid #000;
  font-family: system-ui, sans-serif;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .08em;
}
.title-card h1 {
  margin: 0;
  display: grid;
  gap: 10px;
  color: var(--white);
  text-shadow: 4px 4px 0 #000, 7px 7px 0 var(--red);
}
.title-main {
  display: block;
  font-size: clamp(50px, 13vw, 74px);
  line-height: .84;
  letter-spacing: -0.05em;
}
.title-secondary {
  display: block;
  font-size: clamp(30px, 7.2vw, 40px);
  line-height: .9;
  letter-spacing: -0.03em;
}
.subtitle { font-size: 24px; margin: 18px 0 6px; letter-spacing: .01em; }
.tagline { font-family: system-ui, sans-serif; font-weight: 1000; text-transform: uppercase; font-size: 15px; color: var(--pink); margin: 6px 0 18px; letter-spacing: .06em; }
.hint { font-family: system-ui, sans-serif; font-size: 12px; color: #ddd; margin: 12px 0 0; }

.brief-card h2, .contract-card h2 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: .88;
  letter-spacing: -0.02em;
  text-shadow: 3px 3px 0 #000, 5px 5px 0 var(--red);
}
.brief-list {
  text-align: left;
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
  font-family: system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.22;
  font-weight: 750;
}
.brief-list p { margin: 0; border-left: 5px solid var(--red); padding-left: 9px; }
.objective-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 6px 0 18px;
}
.objective-item {
  background: rgba(255,255,255,.06);
  border: 2px dashed rgba(255,255,255,.25);
  padding: 8px;
  min-height: 124px;
  position: relative;
}
.objective-item.good { border-color: rgba(212,154,213,.8); }
.objective-item.bad { border-color: rgba(166,27,43,.75); }
.contract-demo-card { border-color: rgba(255,255,255,.5); }
.obj-label {
  display: block;
  font-family: system-ui, sans-serif;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.obj-demo {
  position: relative;
  width: 100%;
  height: 60px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.35));
  border: 1px solid rgba(255,255,255,.16);
}
.objective-item small {
  display: block;
  margin-top: 7px;
  font-family: system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: var(--white);
}
.obj-demo::before, .obj-demo::after { content: ''; position: absolute; }
.money-demo::before {
  width: 24px; height: 18px; left: -30px; top: 20px; background: var(--white); border: 2px solid #000;
  animation: objMove 1.5s linear infinite;
}
.money-demo::after {
  width: 20px; height: 2px; left: 0; right: 0; margin: auto; bottom: 10px; background: rgba(255,255,255,.25);
  box-shadow: -28px 0 0 rgba(255,255,255,.25), 28px 0 0 rgba(255,255,255,.25);
}
.fan-demo::before {
  width: 18px; height: 18px; left: -24px; top: 22px; background: var(--pink); transform: rotate(45deg);
  animation: objMove 1.7s linear infinite;
}
.fan-demo::after {
  width: 18px; height: 18px; left: -24px; top: 22px; background: var(--pink); border-radius: 50%;
  box-shadow: -8px 0 0 var(--pink), 0 -8px 0 var(--pink);
  animation: objMove 1.7s linear infinite;
}
.blood-demo::before {
  width: 24px; height: 18px; left: -30px; top: 20px; background: var(--blood); border: 2px solid #000;
  animation: objMove 1.5s linear infinite;
}
.jump-demo::before {
  left: -24px; top: 26px; width: 20px; height: 18px; background: var(--white); border: 2px solid #000;
  animation: objJump 1.7s ease-in-out infinite;
}
.jump-demo::after {
  left: 26px; bottom: 8px; width: 48px; height: 16px; background: linear-gradient(90deg, transparent 0 6px, var(--white) 6px 10px, transparent 10px 18px, var(--white) 18px 22px, transparent 22px 30px, var(--white) 30px 34px, transparent 34px);
}
.contract-demo::before {
  left: 12px; top: 14px; width: 62px; height: 34px; background: var(--paper); border: 2px solid #000;
}
.contract-demo::after {
  content: 'Deal'; color: #000; font: 1000 16px/34px system-ui, sans-serif; text-align: center;
  left: 12px; top: 14px; width: 62px; height: 34px; animation: objPulse 1.2s ease-in-out infinite;
}
@keyframes objMove { from { transform: translateX(0); } to { transform: translateX(110px); } }
@keyframes objJump { 0%,100% { transform: translate(0,0); } 40% { transform: translate(52px,-20px); } 60% { transform: translate(72px,-2px); } }
@keyframes objPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.contract-flavor { font-family: system-ui, sans-serif; font-weight: 850; color: #ddd; margin: -5px 0 14px; }
.trade-grid { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 14px 0; }
.trade {
  border: 2px dashed rgba(255,255,255,.85);
  background: rgba(255,255,255,.08);
  padding: 10px;
  text-align: left;
}
.trade span { display: block; color: var(--pink); font-family: system-ui, sans-serif; font-weight: 1000; font-size: 11px; letter-spacing: .08em; }
.trade strong { display: block; color: #fff; font-size: 22px; margin-top: 3px; }
.contract-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.danger-btn { background: var(--red) !important; color: #fff !important; box-shadow: 5px 5px 0 #fff !important; }

.primary-btn, .control-btn {
  appearance: none;
  border: 2px solid var(--white);
  background: var(--white);
  color: #000;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', system-ui, sans-serif;
  font-size: 24px;
  letter-spacing: .02em;
  padding: 14px 18px;
  min-height: 54px;
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--red);
}
.primary-btn:active, .control-btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--red); }

.hidden { display: none !important; }

.hud {
  position: absolute;
  left: 8px;
  right: 8px;
  top: max(8px, env(safe-area-inset-top));
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  pointer-events: none;
}
.hud-item {
  background: rgba(0,0,0,.76);
  border: 1px solid rgba(255,255,255,.9);
  padding: 6px 5px;
  text-align: center;
  min-height: 42px;
  box-shadow: 3px 3px 0 rgba(208,24,24,.45);
}
.hud-item span {
  display: block;
  font-family: system-ui, sans-serif;
  font-weight: 1000;
  font-size: 9px;
  letter-spacing: .06em;
  color: #ddd;
}
.hud-item strong { display: block; font-size: 18px; line-height: 1.05; }
.hud-item.blood strong { color: var(--red); }

.controls {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 12;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.control-btn {
  font-size: 20px;
  min-height: 60px;
  padding: 10px 12px;
  background: rgba(0,0,0,.9);
  color: var(--white);
}
.no-deal { box-shadow: 5px 5px 0 #fff; }
.chorus { box-shadow: 5px 5px 0 var(--red); }
.chorus.ready {
  color: #000;
  background: var(--white);
  animation: pulse 0.64s infinite alternate;
}
.chorus:disabled { opacity: .42; }
@keyframes pulse {
  from { filter: brightness(1); transform: scale(1); }
  to { filter: brightness(1.7); transform: scale(1.035); }
}

.meters {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(max(88px, env(safe-area-inset-bottom) + 78px));
  z-index: 11;
  pointer-events: none;
}
.meter-label { font-family: system-ui, sans-serif; font-size: 10px; font-weight: 1000; letter-spacing: .08em; color: #eee; margin-bottom: 4px; }
.meter { height: 12px; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.75); overflow: hidden; }
.meter-fill { width: 0%; height: 100%; background: var(--white); box-shadow: 0 0 12px var(--red); transition: width 90ms linear; }

.score-card h2 {
  margin: 0 0 8px;
  font-size: 44px;
  line-height: .9;
  letter-spacing: -0.04em;
  text-shadow: 3px 3px 0 #000, 6px 6px 0 var(--red);
}
.rank-line { font-family: system-ui, sans-serif; font-weight: 1000; color: var(--pink); margin: 0 0 14px; }
.score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.score-grid div {
  border: 1px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.08);
  padding: 8px;
}
.score-grid .wide { grid-column: 1 / -1; }
.score-grid span { display: block; font-family: system-ui, sans-serif; font-weight: 1000; font-size: 10px; color: #ccc; letter-spacing: .08em; }
.score-grid strong { display: block; font-size: 26px; }
.link-row { display: grid; gap: 8px; margin-top: 14px; }
.link-row a {
  display: block;
  color: var(--white);
  background: rgba(208,24,24,.78);
  text-decoration: none;
  border: 1px solid var(--white);
  padding: 11px;
  font-size: 16px;
}

@media (min-width: 620px) {
  .app { width: min(100vw, 460px); height: 100vh; margin: 0 auto; box-shadow: 0 0 0 1px #333, 0 0 90px #000; }
}


/* V4 title screen redesign */
.title-screen {
  justify-content: center;
  gap: 18px;
  background: #ffffff;
}
.title-screen::before,
.title-screen::after,
.title-screen .poster-wall {
  display: none;
}
.title-screen .title-card {
  width: min(92vw, 430px);
  background: #ffffff;
  color: #000;
  border: 4px solid #000;
  box-shadow: 12px 12px 0 rgba(200,137,201,.65);
  padding: 26px 18px 24px;
}
.title-screen .venue-stamp {
  color: #000;
  background: #fff;
  border: 2px solid #000;
  letter-spacing: .16em;
}
.title-screen .title-main,
.title-screen .title-secondary,
.title-screen .tagline,
.title-screen .hint {
  color: #000;
  text-shadow: none;
}
.title-screen .title-main { color: #b46bb7; }
.title-screen .title-secondary { color: #000; }
.title-screen .hint { opacity: .75; }
.title-screen .primary-btn {
  background: #000;
  color: #fff;
  border-color: #000;
  box-shadow: 4px 4px 0 rgba(200,137,201,.65);
}
.title-screen .primary-btn:hover,
.title-screen .primary-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(200,137,201,.65); }
.title-screen .kc-logo {
  width: min(54vw, 210px);
  max-height: 54px;
  margin: 0 auto 14px;
  filter: none;
}


/* V4.1 arcade polish pass */
:root {
  --arcade-pink: #c889c9;
  --arcade-hot: #ff3bd2;
  --arcade-yellow: #fff36b;
}

.screen { background-color: #050505; }
.title-screen {
  background:
    linear-gradient(#fff 0 0) padding-box,
    repeating-linear-gradient(0deg, rgba(0,0,0,.035) 0 2px, transparent 2px 6px),
    #fff;
}
.title-screen .title-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: min(76vh, 650px);
  border: 5px solid #000;
  outline: 5px solid #fff;
  outline-offset: -13px;
  box-shadow: 0 0 0 3px #000, 12px 12px 0 var(--arcade-pink);
  clip-path: none;
  text-transform: uppercase;
}
.title-screen .kc-logo {
  width: min(46vw, 175px);
  max-height: 44px;
  object-fit: contain;
  margin: 0 auto 18px;
}
.title-screen .venue-stamp {
  transform: none;
  margin-bottom: 16px;
  font-size: 11px;
}
.title-screen .title-card h1 {
  width: 100%;
  padding: 12px 6px;
  border-top: 4px solid #000;
  border-bottom: 4px solid #000;
}
.title-screen .title-main {
  font-size: clamp(42px, 11vw, 62px);
  color: var(--arcade-pink);
  -webkit-text-stroke: 1px #000;
}
.title-screen .title-secondary {
  font-size: clamp(24px, 6vw, 34px);
  margin-top: 6px;
}
.title-screen .tagline {
  color: #000;
  background: var(--arcade-yellow);
  border: 3px solid #000;
  padding: 8px 10px;
  transform: rotate(-1deg);
}
.arcade-scoreline {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 5px;
  margin: 0 0 13px;
  color: #000;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 1000;
  font-size: 10px;
  letter-spacing: .04em;
}
.arcade-scoreline span { border: 2px solid #000; padding: 5px 3px; background: #fff; }
.arcade-start { animation: arcadeBlink 0.85s steps(2, start) infinite; }
.insert-coin {
  margin: 10px 0 0;
  color: #000;
  font: 1000 11px/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .12em;
  animation: arcadeBlink 1.2s steps(2, start) infinite;
}
@keyframes arcadeBlink { 50% { opacity: .35; } }

.brief-card, .contract-card, .score-card {
  border: 3px solid #fff;
  box-shadow: 0 0 0 4px #000, 10px 10px 0 var(--arcade-pink);
}
.objective-item {
  border-style: solid;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.25);
}
.objective-item.bad .obj-label { color: #ffb7e9; }
.objective-item.good .obj-label { color: #fff; }
.primary-btn, .control-btn {
  border-width: 3px;
  text-transform: uppercase;
  box-shadow: 6px 6px 0 var(--arcade-pink);
}
.danger-btn { background: var(--blood) !important; box-shadow: 6px 6px 0 var(--arcade-yellow) !important; }

.hud {
  gap: 5px;
  left: 7px;
  right: 7px;
}
.hud-item {
  border: 2px solid #fff;
  box-shadow: 3px 3px 0 var(--arcade-pink);
  background: rgba(0,0,0,.88);
}
.hud-item strong { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; }
.hud-item.blood strong { color: var(--arcade-hot); }
.control-btn { border: 2px solid #fff; background: rgba(0,0,0,.94); }
.chorus.ready { background: var(--arcade-yellow); color: #000; box-shadow: 0 0 0 3px #000, 6px 6px 0 var(--arcade-pink); }
.meter { height: 14px; border: 2px solid #fff; background: #000; }
.meter-fill { background: linear-gradient(90deg, #fff, var(--arcade-yellow), var(--arcade-pink)); }
.score-card h2 { text-transform: uppercase; }
.rank-line {
  display: inline-block;
  padding: 6px 10px;
  border: 2px solid #fff;
  background: #000;
  color: var(--arcade-yellow);
}
.ending-story {
  border: 2px dashed rgba(255,255,255,.75);
  padding: 10px;
  background: rgba(255,255,255,.06);
}
.link-row a { background: #000; border: 2px solid #fff; box-shadow: 4px 4px 0 var(--arcade-pink); }


/* V5.3 readability pass: bigger status boxes + danger state */
.hud {
  left: 6px;
  right: 6px;
  top: max(6px, env(safe-area-inset-top));
  gap: 7px;
}
.hud-item {
  min-height: 58px;
  padding: 8px 5px;
  border-width: 3px;
}
.hud-item span {
  font-size: 10px;
  letter-spacing: .075em;
}
.hud-item strong {
  font-size: clamp(17px, 4.8vw, 24px) !important;
  line-height: 1.05;
}
.hud-item.blood {
  transform-origin: center top;
}
.hud-item.blood.danger {
  background: #2a0008;
  border-color: var(--arcade-hot, #ff3c8f);
  box-shadow: 0 0 0 3px #000, 0 0 18px rgba(255, 60, 143, .95), 5px 5px 0 var(--arcade-pink);
  animation: debtPulse .34s infinite alternate;
}
.hud-item.blood.danger span::after {
  content: ' CRITICAL';
  color: var(--arcade-yellow, #ffd400);
}
@keyframes debtPulse {
  from { transform: scale(1); filter: brightness(1); }
  to { transform: scale(1.045); filter: brightness(1.45); }
}
.meters {
  bottom: calc(max(96px, env(safe-area-inset-bottom) + 86px));
}
.meter { height: 18px; }
.meter-label { font-size: 11px; }


/* V5.4 hidden deal values + deal pitch */
.hidden-trades { display: none !important; }
.deal-pitch {
  margin: 8px auto 16px;
  padding: 9px 10px;
  max-width: 94%;
  color: #000;
  background: #f4f4f0;
  border: 3px solid #000;
  box-shadow: 5px 5px 0 rgba(200,137,201,.8);
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  font-size: clamp(18px, 6vw, 30px);
  line-height: .95;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.contract-card .primary-btn { min-height: 58px; }


/* V5.5 readability/control polish */
.contract-card h2 {
  font-size: clamp(40px, 10vw, 54px);
  line-height: .86;
  margin-bottom: 16px;
}
.contract-flavor {
  font-size: clamp(20px, 5.4vw, 25px);
  line-height: 1.16;
  color: #fff;
  margin: 2px 0 18px;
}
.controls {
  left: 50%;
  right: auto;
  width: min(82vw, 360px);
  transform: translateX(-50%);
  grid-template-columns: 1fr;
  justify-items: stretch;
  bottom: max(18px, env(safe-area-inset-bottom));
}
.controls .chorus {
  width: 100%;
  min-height: 68px;
  font-size: 25px;
  border-width: 3px;
  text-align: center;
}
.chorus.ready {
  animation: chorusReadyFlash .38s steps(2, start) infinite !important;
}
@keyframes chorusReadyFlash {
  0% { background: var(--arcade-yellow, #fff36b); color: #000; box-shadow: 0 0 0 4px #000, 0 0 24px rgba(255, 243, 107, .95), 8px 8px 0 var(--arcade-pink, #c889c9); transform: scale(1); }
  50% { background: var(--arcade-hot, #ff3bd2); color: #fff; box-shadow: 0 0 0 4px #000, 0 0 34px rgba(255, 59, 210, 1), 8px 8px 0 var(--arcade-yellow, #fff36b); transform: scale(1.045); }
  100% { background: var(--arcade-yellow, #fff36b); color: #000; box-shadow: 0 0 0 4px #000, 0 0 24px rgba(255, 243, 107, .95), 8px 8px 0 var(--arcade-pink, #c889c9); transform: scale(1); }
}


/* V5.6 requested polish */
.title-screen .title-card {
  min-height: min(84vh, 710px);
  justify-content: flex-start;
  padding-top: clamp(30px, 6vh, 68px);
}
.title-screen .kc-logo {
  width: min(78vw, 330px) !important;
  max-height: 118px !important;
  margin: clamp(8px, 2.4vh, 24px) auto clamp(44px, 7vh, 76px) !important;
}
.brief-card .brief-list,
.brief-card .venue-stamp {
  display: none !important;
}
.brief-card h2 {
  margin-bottom: 20px;
  font-size: clamp(38px, 10vw, 54px);
}
.flash-start {
  animation: startLevelFlash .52s steps(2, start) infinite !important;
}
@keyframes startLevelFlash {
  0%, 100% { background: var(--arcade-yellow, #fff36b); color: #000; box-shadow: 0 0 0 4px #000, 0 0 22px rgba(255,243,107,.9), 7px 7px 0 var(--arcade-pink, #c889c9); }
  50% { background: var(--arcade-hot, #ff3bd2); color: #fff; box-shadow: 0 0 0 4px #000, 0 0 30px rgba(255,59,210,1), 7px 7px 0 var(--arcade-yellow, #fff36b); }
}
.contract-demo::before,
.contract-demo::after {
  display: none !important;
}
.mini-contract-buttons {
  position: absolute;
  inset: 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-content: center;
}
.mini-contract-buttons span {
  display: block;
  padding: 6px 4px;
  border: 2px solid #000;
  background: #f4f4f0;
  color: #000;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  font-size: 12px;
  line-height: 1;
  box-shadow: 3px 3px 0 rgba(200,137,201,.75);
}
.mini-contract-buttons span:first-child {
  background: var(--blood, #a61b2b);
  color: #fff;
  box-shadow: 3px 3px 0 var(--arcade-yellow, #fff36b);
}


/* V5.7 scoring/objective/replay polish */
.objective-grid .contract-demo-card {
  grid-column: 1 / -1;
  width: min(74%, 250px);
  justify-self: center;
  margin-top: 2px;
}
.score-grid {
  grid-template-columns: 1fr 1fr;
}
.score-grid strong {
  font-size: clamp(18px, 5.2vw, 26px);
  line-height: 1.02;
  word-break: keep-all;
}
#scoreSoulWorth,
#scoreCrowdPower {
  font-size: clamp(16px, 4.4vw, 22px) !important;
}
#playAgainButton.flash-start {
  animation: startLevelFlash .52s steps(2, start) infinite !important;
}


/* V6.1 level transition */
.level-transition-screen {
  background:
    radial-gradient(circle at 18% 20%, rgba(200,137,201,.25), transparent 24%),
    linear-gradient(135deg, #050505 0%, #171717 55%, #050505 100%);
}
.transition-card {
  width: min(92vw, 430px);
  text-align: center;
  border-color: #f4f4f0;
  box-shadow: 10px 10px 0 rgba(200,137,201,.75), -4px -4px 0 rgba(255,255,255,.16);
}
.transition-card h2 {
  margin: 6px 0 12px;
  font-size: clamp(42px, 12vw, 64px);
  line-height: .82;
  letter-spacing: -.04em;
  text-shadow: 4px 4px 0 #000, 7px 7px 0 #c889c9;
}
.transition-copy {
  font-family: system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 850;
  color: #f4f4f0;
  margin: 0 0 16px;
}
.transition-stats {
  display: grid;
  gap: 8px;
  margin: 12px 0 18px;
  font-family: system-ui, sans-serif;
}
.transition-stats div {
  background: rgba(255,255,255,.08);
  border: 2px dashed rgba(255,255,255,.35);
  padding: 9px;
}
.transition-stats span {
  display: block;
  color: #c889c9;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 1000;
}
.transition-stats strong {
  display: block;
  color: #fff;
  font-size: 16px;
  margin-top: 2px;
}


/* V6.4: Stream button flashes with Play Again */
.end-screen .link-row a:first-child {
  animation: startLevelFlash .52s steps(2, start) infinite !important;
  border-color: #f4f4f0;
  box-shadow: 0 0 12px rgba(200,137,201,.75);
}


/* V6.5 objective icon + health-bar clarity pass */
.objective-item.power { border-color: var(--arcade-yellow, #fff36b); }
.objective-item.power .obj-label { color: var(--arcade-yellow, #fff36b); }
.money-demo::before,
.blood-demo::before {
  content: '$' !important;
  width: 38px !important;
  height: 25px !important;
  left: -44px !important;
  top: 17px !important;
  border: 3px solid #000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font: 1000 22px/1 Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif !important;
  transform: rotate(-6deg);
  animation: objMove 1.5s linear infinite !important;
  box-shadow: 3px 3px 0 rgba(200,137,201,.75);
}
.money-demo::before { background: var(--white) !important; color: #000 !important; }
.money-demo::after { display: none !important; }
.blood-demo::before {
  background: var(--blood) !important;
  color: #fff !important;
  text-shadow: 2px 2px 0 #000;
  box-shadow: 0 0 0 3px rgba(200,137,201,.85), 3px 3px 0 #000;
}
.blood-demo::after { display: none !important; }
.fan-demo::before {
  content: '' !important;
  width: 32px !important;
  height: 32px !important;
  left: -38px !important;
  top: 14px !important;
  background: var(--pink) !important;
  transform: rotate(45deg) !important;
  border: 3px solid #000;
  animation: fanHeartMove 1.7s linear infinite !important;
  box-shadow: 3px 3px 0 rgba(0,0,0,.35);
}
.fan-demo::after {
  content: '' !important;
  width: 32px !important;
  height: 32px !important;
  left: -38px !important;
  top: 14px !important;
  background: transparent !important;
  border-radius: 50%;
  box-shadow: -10px -10px 0 var(--pink), 10px -10px 0 var(--pink), -10px -10px 0 3px #000, 10px -10px 0 3px #000;
  animation: fanHeartMove 1.7s linear infinite !important;
}
@keyframes fanHeartMove { from { transform: translateX(0) rotate(45deg); } to { transform: translateX(110px) rotate(45deg); } }
.fan-demo::after { transform: rotate(45deg); }
.chorus-demo::before {
  content: 'DROP' !important;
  width: 70px; height: 34px; left: -80px; top: 13px;
  display: flex; align-items: center; justify-content: center;
  background: var(--arcade-yellow, #fff36b); color: #000; border: 3px solid #000;
  font: 1000 18px/1 Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  animation: chorusObjRush 1.2s linear infinite;
  box-shadow: 4px 4px 0 var(--arcade-pink, #c889c9);
}
.chorus-demo::after {
  content: '$  ♥  $' !important;
  position: absolute; left: -78px; top: 22px; width: 72px; text-align: center;
  color: #000; font: 1000 14px/1 system-ui, sans-serif;
  animation: chorusObjRush 1.2s linear infinite;
}
@keyframes chorusObjRush { from { transform: translateX(0) scale(1); } 50% { transform: translateX(70px) scale(1.12); } to { transform: translateX(150px) scale(1); } }
.hud-item.health {
  position: relative;
  overflow: hidden;
}
.hud-item.health::before {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 5px;
  height: 8px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.55);
}
.hud-item.health::after {
  content: '';
  position: absolute;
  left: 7px;
  bottom: 6px;
  height: 6px;
  width: calc(var(--health, 100) * 1% - 2px);
  max-width: calc(100% - 14px);
  min-width: 0;
  background: linear-gradient(90deg, #a61b2b, #ff3c8f, #fff36b);
  box-shadow: 0 0 10px rgba(255,60,143,.8);
  transition: width 100ms linear;
}
.hud-item.health strong { padding-bottom: 8px; }
.hud-item.health.danger strong { color: #fff36b !important; }
.hud-item.health.danger span::after { content: ' LOW' !important; color: var(--arcade-yellow, #fff36b); }


/* V6.6 fixed 3-level beta polish */
.chorus-text-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 124px;
}
.chorus-text-demo {
  margin: 6px 0 0;
  font-family: system-ui, sans-serif;
  font-weight: 1000;
  font-size: 13px;
  line-height: 1.22;
  text-transform: uppercase;
  color: #fff36b;
  text-shadow: 2px 2px 0 #000;
}


/* V6.8 objective layout + static pickup icons */
.objective-grid .chorus-text-card,
.objective-grid .contract-demo-card {
  grid-column: auto !important;
  width: auto !important;
  justify-self: stretch !important;
  margin-top: 0 !important;
}
.objective-grid .chorus-text-card { order: 5; }
.objective-grid .contract-demo-card { order: 6; }

/* Keep the instruction pickup icons still, readable, and matching the game objects. */
.money-demo::before,
.blood-demo::before {
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) rotate(-6deg) !important;
  animation: none !important;
}
.money-demo::after,
.blood-demo::after { display: none !important; }
.fan-demo::before {
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -40%) rotate(45deg) !important;
  animation: none !important;
}
.fan-demo::after {
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -40%) rotate(45deg) !important;
  animation: none !important;
}
.chorus-text-card .chorus-text-demo {
  font-size: 12px;
  line-height: 1.15;
}
.contract-demo-card .obj-demo {
  height: 76px;
}
.contract-demo-card .mini-contract-buttons {
  inset: 7px;
  gap: 7px;
}
.contract-demo-card .mini-contract-buttons span {
  font-size: 12px;
  padding: 7px 4px;
}


/* V6.10 objective Fan Love icon exactly matches in-game Fan Love heart. */
.fan-demo::before {
  content: '♥' !important;
  left: 50% !important;
  top: 50% !important;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: translate(-50%, -52%) !important;
  animation: none !important;
  color: #d49ad5 !important;
  font: 1000 54px/1 Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif !important;
  -webkit-text-stroke: 3px #000;
  text-shadow: none !important;
}
.fan-demo::after {
  content: 'FAN' !important;
  left: 50% !important;
  top: 50% !important;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: translate(-50%, 8px) !important;
  animation: none !important;
  color: #fff !important;
  font: 1000 10px/1 Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif !important;
  text-shadow: 1px 1px 0 #000;
}
