* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0d211d;
  font-family: "Arial Black", "Impact", "Trebuchet MS", system-ui, -apple-system, sans-serif;
  color: #f6eed7;
  touch-action: none;
}

/* ── HAND-INKED COMIC ARENA BACKDROP (Capitol Hill Fighting Ground; .scene-store for Hemp Store Rampage Cutscene!) ── */
#storeBg {
  position: fixed;
  inset: -3%;
  width: 106%;
  height: 106%;
  background: url('./assets/capitol_bg.jpg') center 48% / cover no-repeat;
  z-index: 0;
  will-change: transform;
}
#storeBg.scene-store {
  background-image: url('./assets/store_bg.jpg');
}

#gameCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
}

#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.hidden {
  display: none !important;
}

/* ── SIGNATURE COMIC HUD PANEL STYLE (Charcoal Ink + Thick Cream Border) ── */
.comic-panel {
  background: #141817;
  border: 3.5px solid #f4ecd4;
  border-radius: 12px;
  box-shadow: 0 0 0 3px #090b0a, 0 6px 0 rgba(0, 0, 0, 0.55);
}

/* ── TOP COMIC HUD BAR ── */
.top-bar {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

/* TOP-LEFT: PURE CHANCES ● ● ○ */
.chances-card {
  padding: 10px 18px;
  min-width: 224px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.chances-card.danger {
  border-color: #ff4252;
  box-shadow: 0 0 0 3px #090b0a, 0 0 20px rgba(255, 66, 82, 0.55);
}

.chances-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.comic-title-sm {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #f6eed7;
  font-style: italic;
}

.chances-pips {
  display: flex;
  gap: 9px;
  align-items: center;
}

.chance-pip {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 3px solid #f4ecd4;
  background: transparent;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.chance-pip.full {
  background: #f4ecd4;
  box-shadow: 0 0 10px rgba(244, 236, 212, 0.5);
}
.chances-card.danger .chance-pip.full {
  background: #ff4252;
  border-color: #ffe847;
  box-shadow: 0 0 12px rgba(255, 66, 82, 0.85);
}

/* ── TWIN VERTICAL SIDE STAMINA BARS (Drains clearly per punch, surges on clean dodge!) ── */
.stamina-rail {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 34px;
  padding: 6px 5px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border-radius: 10px;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 100ms ease;
}
.stamina-rail-left { left: 16px; }
.stamina-rail-right { right: 16px; }

.stamina-bolt {
  font-size: 14px;
  line-height: 1;
  color: #ffe847;
  text-shadow: 0 1px 0 #090b0a;
}

.stamina-track-v {
  position: relative;
  width: 16px;
  height: clamp(140px, 28vh, 210px);
  background: #1b2421;
  border: 2.5px solid #090b0a;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.stamina-fill-v {
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, #ff9d24 0%, #ffe838 45%, #b5f542 100%);
  transition: height 95ms cubic-bezier(0.2, 0.9, 0.3, 1), filter 100ms ease;
}

.stamina-ticks {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  pointer-events: none;
}
.stamina-ticks i {
  display: block;
  width: 100%;
  height: 2px;
  background: rgba(9, 11, 10, 0.65);
}

.stamina-tag {
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #f4ecd4;
}

.stamina-rail.draining {
  border-color: #ffe847;
  box-shadow: 0 0 0 3px #090b0a, 0 0 18px rgba(255, 232, 71, 0.7);
  transform: translateY(-50%) scale(1.06);
}
.stamina-rail.draining .stamina-fill-v {
  filter: brightness(1.38);
}

.stamina-rail.surging {
  border-color: #b5f542;
  box-shadow: 0 0 0 3px #090b0a, 0 0 20px rgba(181, 245, 66, 0.78);
}

.stamina-rail.low {
  border-color: #ff3b4f;
  box-shadow: 0 0 0 3px #090b0a, 0 0 18px rgba(255, 59, 79, 0.75);
}
.stamina-rail.low .stamina-fill-v {
  background: linear-gradient(0deg, #b80f24 0%, #ff3b4f 100%);
}
.stamina-rail.low .stamina-bolt {
  color: #ff4d5f;
}

.stamina-rail.empty-shake {
  animation: stamShake 260ms ease-in-out;
}
@keyframes stamShake {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  25% { transform: translateY(-50%) translateX(-4px); }
  50% { transform: translateY(-50%) translateX(4px); }
  75% { transform: translateY(-50%) translateX(-3px); }
}

.slim-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.slim-track {
  width: 100%;
  height: 6px;
  border-radius: 4px;
  overflow: hidden;
  background: #27302d;
}
.slim-track.stam {
  height: 4px;
}
.opp-track {
  height: 7px;
  margin-top: 2px;
}

.bar-track {
  width: 100%;
  border: 2.5px solid #090b0a;
  border-radius: 6px;
  overflow: hidden;
  background: #1d2723;
}

.bar-fill {
  height: 100%;
  width: 100%;
  transition: width 70ms linear;
}
.player-hp { background: linear-gradient(90deg, #3ee877, #9cf53b); }
.player-stam { background: linear-gradient(90deg, #ffda3d, #ffa624); }
.opp-hp { background: linear-gradient(90deg, #ff4742, #ff8b38); }
.power-lime { background: linear-gradient(90deg, #86eb2c, #c5ff4d); }

/* TOP-CENTER: DEAD-CENTER OL' MITCH BOSS CARD */
.power-card {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: min(310px, 42vw);
  padding: 7px 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.power-card.powered {
  border-color: #b4f73e;
  box-shadow: 0 0 0 3px #090b0a, 0 0 24px rgba(164, 245, 50, 0.55);
}

.power-top-track {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  overflow: hidden;
  background: #232b28;
  border: 2px solid #090b0a;
}

.power-header {
  font-size: clamp(17px, 2.2vw, 24px);
  font-weight: 900;
  letter-spacing: 1px;
  color: #f6eed7;
  font-style: italic;
  line-height: 1.05;
  text-align: center;
}
.power-card.powered .power-header {
  color: #c6ff52;
}

.opp-stage-line {
  font-size: 13px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 1.1px;
  color: #ffe847;
  line-height: 1.1;
}

.opp-strength {
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #b5f542;
  line-height: 1.15;
}

/* TOP-RIGHT: CLEAN COMIC PAUSE BUTTON */
.pause-btn {
  width: 56px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
}
.pause-btn:hover { background: #222926; }
.pause-btn:active { transform: translateY(2px); }

.pause-bars {
  display: flex;
  gap: 7px;
}
.pause-bars i {
  display: block;
  width: 7px;
  height: 24px;
  border-radius: 2px;
  background: #f4ecd4;
}

/* ── 5-SECOND COUNTDOWN CARD (Positioned cleanly at bottom-center so Mitch & Wheelchair are 100% visible!) ── */
.countdown-card {
  position: absolute;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, 92vw);
  padding: 7px 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 14px;
  row-gap: 3px;
  pointer-events: auto;
}

.cd-num {
  grid-row: 1 / 3;
  grid-column: 1;
  font-size: 40px;
  line-height: 0.95;
  min-width: 34px;
  text-align: center;
  font-weight: 900;
  color: #ffe847;
  text-shadow: 0 3px 0 #080a09;
}

.cd-phase {
  grid-row: 1;
  grid-column: 2;
  font-size: 13px;
  font-weight: 900;
  color: #b5f542;
  letter-spacing: 0.8px;
  text-align: left;
  font-style: italic;
}

.cd-sub {
  display: none;
}

.cd-track {
  grid-row: 2;
  grid-column: 2;
  height: 11px;
  width: 100%;
}
.cd-fill {
  width: 0%;
  background: linear-gradient(90deg, #98f238, #ffe24a);
}

.cd-footer {
  grid-row: 1 / 3;
  grid-column: 3;
  font-size: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.cd-footer .mini-btn {
  font-size: 12px;
  white-space: nowrap;
}

/* ── CALLOUTS & BANNERS ── */
.callout-box {
  position: absolute;
  top: 104px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  padding: 0 14px;
}

.center-banner {
  font-size: clamp(24px, 3.8vw, 42px);
  font-weight: 900;
  font-style: italic;
  color: #ffe844;
  -webkit-text-stroke: 1.5px #090b0a;
  text-shadow: 0 4px 0 #090b0a, 0 0 20px rgba(0, 0, 0, 0.75);
  letter-spacing: 1px;
}

.move-callout {
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 900;
  font-style: italic;
  color: #fff8de;
  text-shadow: 0 3px 0 #090b0a;
}

.sub-callout {
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: clamp(13px, 1.5vw, 16px);
  font-weight: 900;
  color: #b2ff4d;
  text-shadow: 0 2px 0 #090b0a;
}

/* ── BOTTOM-LEFT: COMIC STICK RADAR PIP (Matches Mockup!) ── */
.radar-pip {
  position: absolute;
  left: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: 244px;
  overflow: hidden;
  pointer-events: auto;
}
.radar-pip.pip-off {
  opacity: 0;
  pointer-events: none;
}

.pip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px 5px;
  background: #141817;
  border-bottom: 2px solid #2a302d;
  gap: 4px;
}

.pip-title {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.4px;
  color: #f4ecd4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pip-actions {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.pip-btn {
  font-family: "Trebuchet MS", system-ui, sans-serif;
  background: #1a201e;
  color: #f4ecd4;
  border: 1.5px solid #c9c1ab;
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.pip-btn:hover { background: #2c3532; }
.pip-btn.active {
  background: #b5f542;
  color: #0f1411;
  border-color: #090b0a;
}

.pip-stage {
  position: relative;
  width: 100%;
  height: 150px;
  background: #0d1311;
}

.cam-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  opacity: 0.72;
}
.cam-video.cam-off {
  opacity: 0;
  pointer-events: none;
}

#radarCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.pip-move-tag {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 5px;
  text-align: center;
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: #6dfdb1;
  text-shadow: 0 1px 3px #000;
  pointer-events: none;
}

/* ── BOTTOM-CENTER: MASSIVE COMIC DODGE / ACTION BANNER ("LEAN RIGHT ➔") ── */
.dodge-action-bar {
  position: absolute;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  min-width: min(460px, 68vw);
  padding: 10px 28px;
  text-align: center;
  font-size: clamp(26px, 4.2vw, 50px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 1.5px;
  color: #f6eed7;
  line-height: 1.05;
  animation: comicPop 180ms ease-out;
}
.dodge-action-bar.tone-yellow { border-color: #ffe03b; color: #fff4c2; }
.dodge-action-bar.tone-orange { border-color: #ff942e; color: #ffe0b8; }
.dodge-action-bar.tone-cyan { border-color: #3cf2ff; color: #d4fcff; }
.dodge-action-bar.tone-crimson {
  border-color: #ff3b4f;
  background: #2b0c12;
  color: #ffe847;
  box-shadow: 0 0 0 3px #090b0a, 0 0 28px rgba(255, 59, 79, 0.7);
}
.dodge-action-bar.tone-lime { border-color: #b4f73e; color: #d7ff78; }

@keyframes comicPop {
  from { transform: translateX(-50%) scale(0.88); opacity: 0.4; }
  to { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* ── BUTTONS & PAUSE MODAL ── */
.mini-btn {
  font-family: "Trebuchet MS", system-ui, sans-serif;
  background: #1f2926;
  color: #f4ecd4;
  border: 2px solid #f4ecd4;
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.mini-btn:hover { background: #2d3c37; }
.mini-btn.accent, .mini-btn.active {
  background: #b5f542;
  color: #101411;
  border-color: #0a0d0b;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 28;
  background: rgba(8, 16, 14, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pause-card {
  width: min(440px, 94vw);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  pointer-events: auto;
}
.pause-title {
  font-size: 24px;
  font-style: italic;
  color: #ffe847;
  letter-spacing: 1px;
}
.pause-section-label {
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.4px;
  color: #9ff542;
  margin-top: 2px;
}
.pause-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pause-keys {
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: 11.5px;
  color: #c9c3af;
  line-height: 1.45;
  border-top: 1.5px solid #2b3431;
  padding-top: 8px;
}

/* ── SCREEN 1 & 2: VINTAGE COMIC HALFTONE + NEWSPRINT TYPEWRITER INTRO (Matches "Starting Scene.gif"!) ── */
.satire-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background-color: #163731;
  background-image:
    radial-gradient(circle, rgba(6, 17, 15, 0.55) 2.2px, transparent 2.5px),
    linear-gradient(142deg, rgba(10, 28, 25, 0.82) 0%, rgba(24, 58, 52, 0.25) 45%, rgba(9, 22, 19, 0.9) 100%);
  background-size: 10px 10px, 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.satire-frame-wrap {
  position: relative;
  width: min(860px, 92vw);
}
.splash-wrap {
  width: min(580px, 94vw);
}

.satire-lime-tab {
  position: absolute;
  top: -5px;
  left: -3px;
  width: 28px;
  height: 9px;
  background: #b5e83a;
  z-index: 4;
}

.satire-shadow {
  position: absolute;
  top: 12px;
  left: 10px;
  right: -14px;
  bottom: -14px;
  background: #8c374b;
  border: 3.5px solid #0b0f0e;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
  z-index: 1;
}

.satire-card {
  position: relative;
  z-index: 2;
  background: #ebd7ab;
  color: #1c1d1a;
  border: 3.5px solid #0e1311;
  padding: 10px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
  cursor: pointer;
}

.satire-inner-border {
  border: 1.5px solid rgba(28, 29, 26, 0.35);
  min-height: clamp(270px, 48vh, 420px);
  padding: clamp(24px, 4.5vw, 52px) clamp(24px, 4.5vw, 54px) 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.satire-copy {
  font-family: Georgia, "Times New Roman", Cambria, serif;
  font-size: clamp(19px, 2.5vw, 30px);
  line-height: 1.52;
  color: #1c1d1a;
  font-weight: 400;
}
.satire-copy em.satire-brand {
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.satire-cursor {
  display: inline-block;
  font-weight: 400;
  color: #2f332c;
  animation: blinkCaret 0.72s steps(1) infinite;
}
@keyframes blinkCaret {
  50% { opacity: 0; }
}

.satire-footer {
  display: flex;
  justify-content: flex-end;
  min-height: 46px;
}

.satire-continue-btn {
  font-family: "Trebuchet MS", system-ui, sans-serif;
  background: #172a24;
  color: #f4ecd4;
  border: 2.5px solid #0b0f0e;
  border-radius: 7px;
  padding: 10px 22px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 0 #0a0d0b;
}
.satire-continue-btn:hover { background: #213c34; }
.satire-arrow { color: #b5e83a; font-weight: 900; font-size: 18px; }

/* SCREEN 2: COMIC LAUNCH SPLASH (Same Newsprint Palette!) */
.splash-comic-card { cursor: default; }
.splash-inner {
  min-height: auto;
  padding: 24px 24px 20px;
  text-align: center;
  gap: 12px;
  align-items: stretch;
}
.splash-eyebrow {
  font-family: "Trebuchet MS", sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #8c374b;
}
.splash-title {
  font-size: clamp(36px, 7vw, 54px);
  font-weight: 900;
  font-style: italic;
  color: #141c19;
  text-shadow: 3px 3px 0 #b5e83a;
  line-height: 1.0;
}
.splash-desc {
  font-family: Georgia, serif;
  font-size: 15.5px;
  line-height: 1.45;
  color: #21241f;
}
.splash-rules {
  font-family: "Trebuchet MS", sans-serif;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #141b19;
  color: #f4ecd4;
  border: 2.5px solid #090b0a;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 800;
}
.c-yellow { color: #ffe03b; }
.c-orange { color: #ff9838; }
.c-cyan { color: #40f2ff; }

.preload-status {
  font-family: "Trebuchet MS", sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  color: #182c25;
  background: rgba(20, 40, 34, 0.12);
  border: 1.5px solid rgba(20, 40, 34, 0.35);
  border-radius: 8px;
  padding: 5px 10px;
}
.preload-status.ready {
  background: #172b24;
  color: #b5f542;
  border-color: #0b0f0e;
}

.splash-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.primary-btn {
  background: #152822;
  color: #f6eed7;
  border: 3px solid #090b0a;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.8px;
  cursor: pointer;
  box-shadow: 0 4px 0 #8c374b;
}
.primary-btn:hover { background: #1e3b32; }
.primary-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #8c374b; }
.primary-btn:disabled { opacity: 0.72; cursor: wait; }

.secondary-btn {
  font-family: "Trebuchet MS", sans-serif;
  background: #d8c08f;
  color: #161a18;
  border: 2.5px solid #0b0f0e;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}
.secondary-btn:hover { background: #cbb17d; }

.splash-privacy {
  font-family: "Trebuchet MS", sans-serif;
  font-size: 11.5px;
  color: #464336;
  font-weight: 700;
}

/* ── SCREEN 3: FULL-SCREEN STANCE & FIST POSITIONING INTRO ── */
.stance-intro {
  position: fixed;
  inset: 0;
  z-index: 25;
  background-color: #112a25;
  background-image:
    radial-gradient(circle, rgba(6, 15, 13, 0.52) 2px, transparent 2.4px),
    radial-gradient(circle at 50% 44%, #183d35 0%, #0b1b18 76%, #07100e 100%);
  background-size: 10px 10px, 100% 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  gap: 10px;
}

.intro-top { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.intro-eyebrow { font-family: "Trebuchet MS", sans-serif; font-size: 12px; font-weight: 900; letter-spacing: 2px; color: #b5f542; }
.intro-guide {
  font-size: clamp(20px, 3.4vw, 34px);
  font-weight: 900;
  font-style: italic;
  color: #ffe847;
  text-shadow: 0 3px 0 #08100c;
  letter-spacing: 0.6px;
}

.intro-stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  max-width: 980px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#introRadarCanvas {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  border: 3.5px solid #f4ecd4;
  background: radial-gradient(circle at 50% 46%, #0f1d19 0%, #080f0d 100%);
  box-shadow: 0 0 0 3px #090b0a, 0 12px 36px rgba(0, 0, 0, 0.6);
  display: block;
}

.intro-bottom {
  width: min(640px, 96vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.intro-checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chk-pill {
  font-family: "Trebuchet MS", sans-serif;
  background: #141a18;
  border: 2.5px solid #c9c1ab;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 12.5px;
  font-weight: 900;
  color: #d7d0bc;
}
.chk-pill.ok {
  background: #214e2a;
  border-color: #b5f542;
  color: #f6fff5;
  box-shadow: 0 0 14px rgba(181, 245, 66, 0.4);
}
.intro-lock-track { height: 13px; width: 100%; }
.intro-lock-fill { width: 0%; background: linear-gradient(90deg, #86eb2c, #ffe847); transition: width 60ms linear; }
.intro-actions { display: flex; gap: 10px; }

.splash-over-capitol {
  background-color: rgba(11, 28, 24, 0.58);
  background-image: radial-gradient(circle, rgba(6, 17, 15, 0.35) 2px, transparent 2.4px);
  background-size: 10px 10px;
}

.c-red { color: #c41428; }

/* ── ACT 2: HEMP STORE RAMPAGE CUTSCENE OVERLAY ("NO MORE HEMP!!!!") ── */
.cutscene-overlay {
  position: fixed;
  inset: 0;
  z-index: 32;
  pointer-events: auto;
}

.comic-speech-bubble {
  position: absolute;
  top: clamp(22px, 6vh, 58px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff6dc;
  color: #cf1424;
  border: 4.5px solid #090b0a;
  border-radius: 26px;
  padding: 14px 32px;
  font-size: clamp(26px, 4.6vw, 54px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 1px;
  text-shadow: 2px 3px 0 #090b0a;
  box-shadow: 8px 9px 0 #8c374b, 0 0 0 3px #090b0a;
  white-space: nowrap;
  animation: bubbleShout 0.28s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.comic-speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 24px 18px 0 18px;
  border-style: solid;
  border-color: #090b0a transparent transparent transparent;
}
.comic-speech-bubble::before {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  border-width: 18px 13px 0 13px;
  border-style: solid;
  border-color: #fff6dc transparent transparent transparent;
}
@keyframes bubbleShout {
  from { transform: translateX(-50%) scale(0.55) rotate(-4deg); opacity: 0; }
  to { transform: translateX(-50%) scale(1) rotate(-1.5deg); opacity: 1; }
}

.cutscene-caption {
  position: absolute;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 9px 22px;
  font-size: clamp(14px, 2vw, 20px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 1px;
  color: #ffe847;
  text-align: center;
  white-space: nowrap;
}

.cutscene-skip-btn {
  position: absolute;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 40;
  padding: 9px 16px;
  font-size: 13px;
}

/* Live Capitol Hill Title Overlay — sits cleanly over live Capitol Hill & Mitch behind his "Ban Hemp" podium! */
.scene-wipe {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: linear-gradient(
    180deg,
    rgba(10, 24, 20, 0.72) 0%,
    rgba(10, 24, 20, 0.14) 36%,
    rgba(10, 24, 20, 0.08) 76%,
    rgba(10, 24, 20, 0.56) 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: clamp(22px, 5.5vh, 52px);
  padding-inline: 16px;
  pointer-events: none;
  animation: wipePop 0.28s ease-out;
}
.scene-wipe-card {
  padding: 14px 30px 12px;
  text-align: center;
  border-color: #ffe847;
  box-shadow: 0 0 0 3px #090b0a, 8px 8px 0 #8c374b;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.scene-wipe-title {
  font-size: clamp(28px, 5vw, 54px);
  font-weight: 900;
  font-style: italic;
  color: #ffe847;
  text-shadow: 0 4px 0 #090b0a;
  letter-spacing: 1.4px;
  line-height: 1.05;
}
.scene-wipe-sub {
  font-family: "Trebuchet MS", sans-serif;
  font-size: clamp(12px, 1.6vw, 16px);
  font-weight: 900;
  color: #b5f542;
  letter-spacing: 1.4px;
}
@keyframes wipePop {
  from { opacity: 0; transform: translateY(-14px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── MOBILE RESPONSIVE LAYOUT ── */
@media (max-width: 780px) {
  .top-bar { top: max(8px, env(safe-area-inset-top)); left: 8px; right: 8px; gap: 6px; }
  .chances-card { min-width: 0; padding: 6px 8px; flex-shrink: 0; }
  .chances-row { gap: 6px; }
  .chances-pips { gap: 4px; }
  .comic-title-sm { font-size: 12px; }
  .chance-pip { width: 13px; height: 13px; border-width: 2px; }
  .power-card { position: static; transform: none; width: auto; min-width: 0; flex: 1 1 auto; padding: 5px 8px; overflow: hidden; }
  .power-header { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .opp-stage-line { font-size: 11px; }
  .opp-strength { font-size: 9.5px; }
  .pause-btn { width: 38px; height: 38px; flex-shrink: 0; }
  .pause-bars i { width: 4px; height: 16px; }
  .radar-pip { width: 168px; left: 8px; bottom: 68px; }
  .pip-stage { height: 112px; }
  .dodge-action-bar { min-width: 0; width: calc(100vw - 24px); padding: 8px 14px; font-size: 24px; bottom: 10px; }
  .callout-box { top: 96px; }
  .countdown-card { bottom: 8px; padding: 6px 10px; }
  .cd-num { font-size: 32px; }
  .stamina-rail { width: 26px; padding: 5px 3px; top: 44%; }
  .stamina-rail-left { left: 6px; }
  .stamina-rail-right { right: 6px; }
  .stamina-track-v { width: 12px; height: 128px; }
  .stamina-bolt { font-size: 11px; }
  .stamina-tag { font-size: 8px; }
}

/* ── SIDE RAILS AS STAR PUNCH CHARGE (was stamina) ──
   Three segments = the three stars. Fills from dodges and counters, empties only when a Star Punch lands. */
.stamina-fill-v {
  transition: height 320ms cubic-bezier(0.2, 0.9, 0.3, 1), filter 100ms ease;
}
.stamina-ticks i:nth-child(n+3) { display: none; }
.stamina-rail.charged {
  border-color: #ffe847;
  box-shadow: 0 0 0 3px #090b0a, 0 0 22px rgba(255, 232, 71, 0.85);
  animation: chargeReady 0.7s ease-in-out infinite alternate;
}
.stamina-rail.charged .stamina-fill-v {
  background: linear-gradient(0deg, #ffe838 0%, #fff7b0 50%, #b5f542 100%);
}
.stamina-rail.charged .stamina-bolt { color: #ffe847; }
.stamina-rail.flurry-unlimited {
  border-color: #4af2ff;
  box-shadow: 0 0 0 3px #090b0a, 0 0 26px rgba(74, 242, 255, 0.92);
  animation: chargeReady 0.35s ease-in-out infinite alternate;
}
.stamina-rail.flurry-unlimited .stamina-fill-v {
  background: linear-gradient(0deg, #16c9ff 0%, #73fff2 50%, #ffe847 100%);
}
.stamina-rail.flurry-unlimited .stamina-bolt,
.stamina-rail.flurry-unlimited .stamina-tag {
  color: #73fff2;
  font-weight: 900;
  font-size: 13px;
  line-height: 1;
}
@keyframes chargeReady {
  from { filter: brightness(1); }
  to { filter: brightness(1.28); }
}
@media (prefers-reduced-motion: reduce) {
  .stamina-rail.charged { animation: none; }
}

/* ── PERFECT COUNTER STAMP + FLASH (js/main.js showPerfectStamp) ── */
.screen-flash {
  position: fixed;
  inset: 0;
  background: #fffbe0;
  opacity: 0;
  pointer-events: none;
  z-index: 6;
}
.screen-flash.play { animation: screenFlash 0.32s ease-out; }
@keyframes screenFlash {
  0% { opacity: 0.7; }
  100% { opacity: 0; }
}
.perfect-stamp {
  position: fixed;
  left: 50%;
  top: 27%;
  transform: translate(-50%, -50%) rotate(-7deg) scale(0);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  z-index: 7;
  white-space: nowrap;
  opacity: 0;
}
.perfect-stamp-main {
  font-size: clamp(46px, 11vw, 96px);
  font-weight: 900;
  font-style: italic;
  line-height: 0.95;
  letter-spacing: 1px;
  color: #ffe847;
  -webkit-text-stroke: 3px #0b0f0e;
  paint-order: stroke fill;
  text-shadow: 5px 6px 0 #ff2942, 5px 6px 0 #0b0f0e, 0 0 26px rgba(255, 232, 71, 0.75);
}
.perfect-stamp-sub {
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: clamp(14px, 3.2vw, 24px);
  font-weight: 900;
  letter-spacing: 3px;
  color: #101411;
  background: #b5f542;
  border: 3px solid #0b0f0e;
  border-radius: 8px;
  padding: 2px 12px;
}
.perfect-stamp.play { animation: perfectStamp 1.15s cubic-bezier(0.2, 1.5, 0.4, 1) forwards; }
@keyframes perfectStamp {
  0% { transform: translate(-50%, -50%) rotate(-7deg) scale(2.8); opacity: 0; }
  16% { transform: translate(-50%, -50%) rotate(-7deg) scale(1); opacity: 1; }
  24% { transform: translate(-50%, -50%) rotate(-5deg) scale(1.08); opacity: 1; }
  72% { transform: translate(-50%, -50%) rotate(-7deg) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -62%) rotate(-7deg) scale(0.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .screen-flash.play { animation: none; }
  .perfect-stamp.play { animation: perfectStampFade 1s linear forwards; transform: translate(-50%, -50%) rotate(-7deg) scale(1); }
  @keyframes perfectStampFade { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }
}

/* Stage-cleared variant of the centre stamp: longer text, green instead of yellow. */
.perfect-stamp.stage .perfect-stamp-main {
  font-size: clamp(30px, 7.4vw, 70px);
  color: #b5f542;
  text-shadow: 5px 6px 0 #0b0f0e, 0 0 26px rgba(181, 245, 66, 0.7);
}
.perfect-stamp.stage .perfect-stamp-sub {
  background: #ffe847;
  font-size: clamp(12px, 2.6vw, 20px);
  letter-spacing: 1.5px;
}
.perfect-stamp.stage.play { animation-duration: 1.9s; }

/* MOTION TABLED variant of the centre stamp: an official red rubber stamp on parchment. */
.perfect-stamp.tabled .perfect-stamp-main {
  font-size: clamp(32px, 8vw, 78px);
  color: #d3122a;
  background: rgba(255, 246, 220, 0.94);
  border: 6px solid #d3122a;
  border-radius: 12px;
  padding: 0 22px 4px;
  -webkit-text-stroke: 0;
  text-shadow: none;
  letter-spacing: 3px;
}
.perfect-stamp.tabled .perfect-stamp-sub {
  background: #101a1c;
  color: #b5f542;
  font-size: clamp(11px, 2.3vw, 18px);
  letter-spacing: 1.5px;
}
.perfect-stamp.tabled.play { animation-duration: 1.9s; }

/* Player got hit: dramatic crimson edge vignette + unmistakable "HIT!" stamp */
.hurt-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  background: radial-gradient(ellipse at center, rgba(255, 20, 48, 0) 42%, rgba(255, 18, 42, 0.58) 78%, rgba(190, 0, 22, 0.92) 100%);
  box-shadow: inset 0 0 85px rgba(255, 16, 40, 0.95);
}
.hurt-vignette.play {
  animation: hurtVignette 0.62s ease-out forwards;
}
@keyframes hurtVignette {
  0% { opacity: 0.96; }
  22% { opacity: 0.82; }
  100% { opacity: 0; }
}
.perfect-stamp.hurt .perfect-stamp-main {
  font-size: clamp(44px, 10vw, 88px);
  color: #ff2b44;
  -webkit-text-stroke: 3.5px #0b0f0e;
  text-shadow: 5px 6px 0 #0b0f0e, 0 0 28px rgba(255, 43, 68, 0.85);
}
.perfect-stamp.hurt .perfect-stamp-sub {
  background: #0e1416;
  color: #ffe847;
  border-color: #ff2b44;
  font-size: clamp(12px, 2.6vw, 20px);
  letter-spacing: 2px;
}
.perfect-stamp.hurt.play { animation-duration: 0.88s; }

/* ── LOST A CHANCE: big "-1" token flies from mid-screen to the pip it removes (js/main.js flyLostChance) ── */
.lost-chance {
  position: fixed;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  z-index: 8;
}
.lost-chance-disc {
  width: clamp(92px, 19vmin, 168px);
  height: clamp(92px, 19vmin, 168px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ff2942;
  border: clamp(5px, 1vmin, 9px) solid #f4ecd4;
  box-shadow: 0 0 0 5px #0b0f0e, 0 0 46px rgba(255, 41, 66, 0.9);
  color: #fff6d8;
  font-size: clamp(44px, 10vmin, 86px);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: -2px;
  -webkit-text-stroke: 2px #0b0f0e;
  paint-order: stroke fill;
  opacity: 0;
  will-change: transform;
}
.lost-chance-label {
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: clamp(15px, 3.4vmin, 26px);
  font-weight: 900;
  letter-spacing: 2px;
  white-space: nowrap;
  color: #fff6d8;
  background: #0b0f0e;
  border: 3px solid #ff2942;
  border-radius: 8px;
  padding: 4px 14px;
  opacity: 0;
}
/* The pip the token lands on: red burst, then it empties. */
.chance-pip.lost-pop { animation: chanceLostPop 0.8s ease-out; }
@keyframes chanceLostPop {
  0% { transform: scale(2.6); background: #ff2942; border-color: #ffe847; box-shadow: 0 0 0 0 rgba(255, 41, 66, 0.9), 0 0 26px rgba(255, 41, 66, 1); }
  35% { transform: scale(0.7); background: #ff2942; border-color: #ffe847; box-shadow: 0 0 0 22px rgba(255, 41, 66, 0), 0 0 18px rgba(255, 41, 66, 0.7); }
  60% { transform: scale(1.25); background: transparent; }
  100% { transform: scale(1); background: transparent; box-shadow: none; }
}
.chances-card.hit-shake { animation: chancesHitShake 0.5s linear; }
@keyframes chancesHitShake {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-7px, 3px) rotate(-2deg); }
  30% { transform: translate(6px, -3px) rotate(2deg); }
  45% { transform: translate(-5px, 2px) rotate(-1deg); }
  60% { transform: translate(4px, -2px); }
  80% { transform: translate(-2px, 1px); }
}
/* Fight begins: the three chances swell and light up one after another. */
.chances-card.intro-pulse { animation: chancesIntro 2.4s ease-in-out; transform-origin: top left; z-index: 8; }
@keyframes chancesIntro {
  0%, 100% { transform: scale(1); box-shadow: none; }
  12%, 80% { transform: scale(1.2); box-shadow: 0 0 0 3px #090b0a, 0 0 26px rgba(255, 232, 71, 0.9); }
}
.chances-card.intro-pulse .chance-pip.full { animation: chancePipIntro 0.55s ease-out 3; }
.chances-card.intro-pulse .chance-pip:nth-child(2) { animation-delay: 0.18s; }
.chances-card.intro-pulse .chance-pip:nth-child(3) { animation-delay: 0.36s; }
.chances-card.intro-pulse .chance-pip:nth-child(4) { animation-delay: 0.54s; }
@keyframes chancePipIntro {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.5); background: #ffe847; box-shadow: 0 0 16px rgba(255, 232, 71, 1); }
}
@media (prefers-reduced-motion: reduce) {
  .chance-pip.lost-pop, .chances-card.hit-shake, .chances-card.intro-pulse, .chances-card.intro-pulse .chance-pip.full { animation: none; }
}

/* Teaching stamp: the dodge for a new attack, spelled out while he winds up slowly (js/main.js, combat teachNote). */
.perfect-stamp.teach { top: 30%; }
.perfect-stamp.teach .perfect-stamp-main {
  font-size: clamp(40px, 8vw, 92px);
  color: #fff6d8;
  text-shadow: 5px 6px 0 #ff2942, 5px 6px 0 #0b0f0e, 0 0 30px rgba(255, 41, 66, 0.85);
}
.perfect-stamp.teach .perfect-stamp-sub {
  background: #ffe847;
  letter-spacing: 2px;
}
.perfect-stamp.teach.play { animation-duration: 1.3s; }

/* ── TOP-RIGHT LIVE ?challenge= RIVALRY METER ── */
.challenge-hud {
  padding: 7px 12px 8px;
  min-width: 176px;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-color: #ffe847;
}
.challenge-hud.beaten {
  border-color: #b5f542;
  box-shadow: 0 0 0 3px #090b0a, 0 0 20px rgba(181, 245, 66, 0.65);
}
.challenge-hud-label {
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.7px;
  color: #ffe847;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.challenge-hud.beaten .challenge-hud-label { color: #b5f542; }
.challenge-track { height: 7px; }
.challenge-fill { background: linear-gradient(90deg, #ff9d24, #ffe847); }
.challenge-hud.beaten .challenge-fill { background: linear-gradient(90deg, #7ef03a, #c7ff54); }
.challenge-hud-sub {
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #f4ecd4;
  letter-spacing: 0.5px;
}

/* ── STAGE 5 SENATE FREEZE, COMEBACK HEAL & CHALLENGE CRUSHED STAMPS ── */
.perfect-stamp.freeze .perfect-stamp-main {
  font-size: clamp(30px, 7.2vw, 72px);
  color: #6ce8ff;
  text-shadow: 5px 6px 0 #0b0f0e, 0 0 28px rgba(108, 232, 255, 0.85);
}
.perfect-stamp.freeze .perfect-stamp-sub {
  background: #ffe847;
  color: #101411;
  font-size: clamp(12px, 2.5vw, 20px);
  letter-spacing: 1.5px;
}
.perfect-stamp.freeze.play { animation-duration: 2.1s; }

.perfect-stamp.heal .perfect-stamp-main {
  font-size: clamp(28px, 6.8vw, 64px);
  color: #b5f542;
  text-shadow: 5px 6px 0 #0b0f0e, 0 0 28px rgba(181, 245, 66, 0.85);
}
.perfect-stamp.heal .perfect-stamp-sub {
  background: #6ce8ff;
  color: #0b161a;
  font-size: clamp(12px, 2.5vw, 19px);
}
.perfect-stamp.heal.play { animation-duration: 2.0s; }

.perfect-stamp.challenge .perfect-stamp-main {
  font-size: clamp(32px, 7.5vw, 74px);
  color: #ffe847;
  text-shadow: 5px 6px 0 #8c374b, 5px 6px 0 #0b0f0e, 0 0 28px rgba(255, 232, 71, 0.9);
}
.perfect-stamp.challenge .perfect-stamp-sub {
  background: #b5f542;
  color: #101411;
}
.perfect-stamp.challenge.play { animation-duration: 2.1s; }

/* Little Rick Hemp Drink Relaxation stamp: vibrant raspberry-pink & lime! */
.perfect-stamp.relax .perfect-stamp-main {
  font-size: clamp(24px, 6.2vw, 62px);
  color: #ff6eb4;
  text-shadow: 5px 6px 0 #0b0f0e, 0 0 28px rgba(255, 110, 180, 0.85);
}
.perfect-stamp.relax .perfect-stamp-sub {
  background: #b5f542;
  color: #101411;
  font-size: clamp(11px, 2.2vw, 18px);
  letter-spacing: 1.4px;
}
.perfect-stamp.relax.play { animation-duration: 2.2s; }

@media (max-width: 780px) {
  .challenge-hud {
    position: fixed;
    top: max(68px, calc(env(safe-area-inset-top) + 60px));
    right: 8px;
    min-width: 132px;
    padding: 5px 8px;
  }
  .challenge-hud-label { font-size: 9.5px; }
  .challenge-hud-sub { font-size: 9px; }
}

/* ── BOTTOM-RIGHT SLEEK MUTE BUTTON ── */
.mute-btn {
  position: fixed;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 26;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  color: #f4ecd4;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 110ms ease, border-color 140ms ease, background 140ms ease;
}
.mute-btn:hover { background: #222b28; transform: scale(1.06); }
.mute-btn:active { transform: scale(0.95); }
.mute-btn.muted {
  border-color: #ff4757;
  background: #2b0f14;
}
@media (max-width: 780px) {
  .mute-btn {
    right: 8px;
    bottom: max(66px, calc(env(safe-area-inset-bottom) + 58px));
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
}

/* A stamp with no second line shows no empty pill. */
.perfect-stamp-sub:empty { display: none; }

/* ── KNEES-UP FRAMING (wide screens) ──
   The boxer is drawn smaller there and shows from the knees up (FightersRig.framePlayer, same 1.15 aspect cut-off),
   so the dodge cue moves from the bottom of the screen, where it would cover his legs, to just under Mitch's card.
   The rare top banner sits under it, and both are a little smaller so neither reaches Mitch's face. */
@media (min-aspect-ratio: 23/20) and (min-width: 781px) {
  .dodge-action-bar {
    top: 120px; /* just under Mitch's card */
    bottom: auto;
    min-width: 0;
    padding: 5px 22px;
    font-size: clamp(20px, 2.6vw, 32px);
  }
  .callout-box { top: 172px; }
  .center-banner { font-size: clamp(20px, 2.8vw, 34px); }
  /* The big stamps drop a little so they clear the cue bar. */
  .perfect-stamp { top: 35%; }
  .perfect-stamp.teach { top: 37%; }
}

/* ── TOP-RIGHT: LIVE SCORE + CLEAN-DODGE STREAK MULTIPLIER ── */
.top-right-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}
.score-hud {
  padding: 6px 14px 7px;
  min-width: 132px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.score-hud.hidden { display: none; }
.score-hud-label {
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.6px;
  color: #6ce8ff;
}
.score-hud-num {
  font-size: 27px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  color: #f6eed7;
  transform-origin: right center;
}
.score-hud.no-num .score-hud-label,
.score-hud.no-num .score-hud-num { display: none; }
.score-hud-streak {
  margin-top: 4px;
  padding: 2px 8px;
  border: 2px solid #090b0a;
  border-radius: 6px;
  background: #ffe847;
  color: #141817;
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.6px;
  white-space: nowrap;
}
.score-hud-streak.hidden { display: none; }
.score-hud-streak.lost { background: #ff3b4f; color: #fff; }
@media (max-width: 780px) {
  .top-right-col { gap: 4px; flex-shrink: 0; }
  .score-hud { min-width: 0; padding: 4px 8px 5px; }
  .score-hud-label { font-size: 9px; }
  .score-hud-num { font-size: 17px; }
  .score-hud-streak { font-size: 9.5px; padding: 1px 5px; }
}

/* ── KEYBOARD LEGEND (a computer fight without the camera): bottom-left, where the radar is for camera players ── */
.keys-legend {
  position: absolute;
  left: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  padding: 8px 12px 9px;
  color: #f4ecd4;
  font: 700 12.5px/1.75 "Trebuchet MS", system-ui, sans-serif;
  letter-spacing: 0.3px;
  pointer-events: none;
}
.keys-legend.hidden { display: none; }
.keys-legend-title { color: #ffe847; font-weight: 900; font-size: 11px; letter-spacing: 1.6px; line-height: 1.3; }
.keys-legend-note { color: #b9c9c2; font-size: 11px; line-height: 1.5; margin-top: 2px; }
.keys-legend kbd {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border: 2px solid #090b0a;
  border-radius: 5px;
  background: #f6ecd3;
  color: #141817;
  font: 900 11.5px/1.45 "Trebuchet MS", system-ui, sans-serif;
  text-align: center;
}
@media (max-width: 780px) { .keys-legend { display: none; } }

/* Phones make the share clip upright (9:16, js/clipper.js): its small preview on the score card is upright too. */
html.device-handheld video.endcard-card-preview { aspect-ratio: 9 / 16; }

/* ── PHONES AND TABLETS: A SMALLER CARD FOR MITCH (owner, 26 Nov 2026) ──
   A phone held sideways has very little height (under 300px once the browser's own bars are counted), and the
   card sat over Mitch's head. So there: no green star-charge bar on top (the charge has its own meter), no
   STRENGTH line, smaller type. `html.pad-mode` is included so the phone controller can be tried on a computer. */
:is(html.device-handheld, html.pad-mode) .power-top-track,
:is(html.device-handheld, html.pad-mode) .opp-strength { display: none; }
:is(html.device-handheld, html.pad-mode) .power-card { padding: 4px 10px 6px; gap: 1px; }
:is(html.device-handheld, html.pad-mode) .power-header { font-size: 14px; }
:is(html.device-handheld, html.pad-mode) .opp-stage-line { font-size: 10.5px; white-space: nowrap; }
:is(html.device-handheld, html.pad-mode) .opp-track { height: 6px; margin-top: 3px; }
@media (orientation: landscape) {
  /* Sideways: the whole top row is smaller, and stays clear of the notch and the rounded corners. */
  :is(html.device-handheld, html.pad-mode) .top-bar {
    top: max(6px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
  }
  :is(html.device-handheld, html.pad-mode) .power-card {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: min(210px, 30vw);
    flex: none;
  }
  :is(html.device-handheld, html.pad-mode) .chances-card { min-width: 0; padding: 6px 11px; flex-shrink: 0; }
  :is(html.device-handheld, html.pad-mode) .chances-row { gap: 7px; }
  :is(html.device-handheld, html.pad-mode) .comic-title-sm { font-size: 13px; }
  :is(html.device-handheld, html.pad-mode) .chance-pip { width: 15px; height: 15px; border-width: 2.5px; }
  :is(html.device-handheld, html.pad-mode) .score-hud { min-width: 0; padding: 4px 10px 5px; }
  :is(html.device-handheld, html.pad-mode) .score-hud-label { font-size: 9px; }
  :is(html.device-handheld, html.pad-mode) .score-hud-num { font-size: 19px; }
  :is(html.device-handheld, html.pad-mode) .score-hud-streak { font-size: 9.5px; padding: 1px 5px; }
}
@media (min-aspect-ratio: 23/20) and (min-width: 781px) {
  /* The cue sits just under the smaller card. */
  :is(html.device-handheld, html.pad-mode) .dodge-action-bar { top: 64px; }
  :is(html.device-handheld, html.pad-mode) .callout-box { top: 108px; }
}
