/* Boom Run: HUD and garage (shared menu styles live in ../shared/game-ui.css). */
.hud-sub {
  padding: 4px 8px 2px;
  border-radius: 5px;
  background: rgba(14, 16, 20, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.plate.guide b { font-size: 26px; }
.plate.combo {
  flex-direction: row;
  gap: 8px;
  align-items: baseline;
  padding: 6px 10px 4px;
  background: var(--sign-orange);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--sign-orange), inset 0 0 0 3.5px var(--ink), 0 3px 0 rgba(0, 0, 0, 0.3);
}
.plate.combo b { font-size: 22px; margin: 0; }
.plate.combo span { font-size: 10px; font-weight: 900; letter-spacing: 0.12em; }
.plate.combo.bump { animation: bump 0.25s ease; }
.chips { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.chip {
  padding: 4px 8px 2px;
  border-radius: 5px;
  background: var(--c);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}
.timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
  padding: 6px 10px 4px;
  border-radius: 7px;
  background: var(--sign-white);
  color: var(--ink);
  line-height: 1;
  box-shadow: inset 0 0 0 2px var(--sign-white), inset 0 0 0 3.5px var(--ink), 0 3px 0 rgba(0, 0, 0, 0.3);
}
.timer span { font-size: 10px; font-weight: 900; letter-spacing: 0.16em; }
.timer b { font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums; }
.timer.low { background: var(--sign-red); color: var(--sign-white); box-shadow: inset 0 0 0 2px var(--sign-red), inset 0 0 0 3.5px var(--sign-white), 0 3px 0 rgba(0, 0, 0, 0.3); animation: bump 0.5s ease infinite; }

/* Boost (and BOOM): touch screens only */
.pedals {
  position: absolute;
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  pointer-events: none;
}
.pedal {
  pointer-events: auto;
  width: 86px;
  height: 58px;
  border: 0;
  border-radius: 10px;
  background: rgba(43, 47, 54, 0.82);
  color: var(--sign-white);
  font-family: var(--font-sign);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  box-shadow: inset 0 0 0 2px rgba(247, 247, 242, 0.8), 0 4px 0 rgba(0, 0, 0, 0.4);
  touch-action: none;
}
.pedal.go { background: rgba(252, 194, 27, 0.9); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink), 0 4px 0 var(--sign-yellow-deep); }
.pedal:active { transform: translateY(3px); }
@media (hover: hover) and (pointer: fine) { .pedals { display: none; } }

/* ---- Title ---------------------------------------------------------------------- */
.sign-arrow { flex: none; width: clamp(36px, 10vw, 64px); height: auto; color: var(--sign-white); }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .modes { grid-template-columns: 1fr 1fr; } .modes .m-hy { grid-column: span 2; } }
.mode-btn.m-hy { background: linear-gradient(120deg, #3b2468, #1d4f91 55%, #00a6c8); box-shadow: inset 0 0 0 3px #3b2468, inset 0 0 0 5px var(--sign-white), 0 5px 0 #22163f; }
.mode-btn.m-cp { background: var(--sign-green); box-shadow: inset 0 0 0 3px var(--sign-green), inset 0 0 0 5px var(--sign-white), 0 5px 0 var(--sign-green-deep); }
.mode-btn.m-ww { background: var(--sign-red); box-shadow: inset 0 0 0 3px var(--sign-red), inset 0 0 0 5px var(--sign-white), 0 5px 0 var(--sign-red-deep); }
.mode-btn { flex-direction: column; align-items: flex-start; gap: 4px; }
.mode-btn em { text-align: left; }
.mode-btn em:empty { display: none; }

/* ---- Report --------------------------------------------------------------------- */
.res-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.stamp {
  padding: 5px 10px 3px;
  border: 3px solid var(--sign-red);
  border-radius: 6px;
  color: var(--sign-red);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.12em;
  transform: rotate(-6deg);
}
@media (hover: none) { .kb-only { display: none; } }

/* ---- Garage --------------------------------------------------------------------- */
.car-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #d4d8df;
}
.car-card canvas { grid-row: span 2; width: 96px; height: 72px; border-radius: 6px; background: #3a3d44; }
.car-card button { justify-self: start; }
.car-card.equipped { box-shadow: inset 0 0 0 2.5px var(--sign-green); }
.car-card.poor button { opacity: 0.5; }
.bars { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.bars span { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 6px; font-size: 10px; font-weight: 900; letter-spacing: 0.06em; color: var(--ink-soft); }
.bars i { height: 5px; border-radius: 3px; background: linear-gradient(90deg, var(--sign-orange) var(--w), #e3e6ea var(--w)); }

.paint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-sign);
  cursor: pointer;
  box-shadow: inset 0 0 0 1.5px #d4d8df;
  text-align: left;
}
.paint .swatch { flex: none; width: 26px; height: 26px; border-radius: 6px; background: var(--paint); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25); }
.paint b { flex: 1; font-size: 14px; font-weight: 900; }
.paint em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.paint.on { box-shadow: inset 0 0 0 2.5px var(--sign-green); cursor: default; }
.paint:disabled:not(.on) { opacity: 0.5; cursor: default; }

/* The boost bar: fills from close calls, burns while you boost, and turns to BOOM */
.boostbar {
  position: relative;
  width: 168px;
  height: 20px;
  border-radius: 6px;
  background: rgba(14, 16, 20, 0.72);
  box-shadow: inset 0 0 0 2px rgba(247, 247, 242, 0.75);
  overflow: hidden;
}
.boostbar i {
  position: absolute;
  inset: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #ffb000, #ffd23f);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.boostbar span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: 2px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--sign-white);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}
.boostbar.burn i { background: linear-gradient(90deg, #ff7a1a, #ffe08a); }
.boostbar.ready { box-shadow: inset 0 0 0 2px #fff3c4, 0 0 0 2px #ff4f2e; animation: bump 0.6s ease infinite; }
.boostbar.ready i { background: linear-gradient(90deg, #ff4f2e, #ffb000); }
.boostbar.boom i { background: linear-gradient(90deg, #ff2e2e, #ff9a2e); }
.boostbar.boom { box-shadow: inset 0 0 0 2px #fff3c4, 0 0 14px rgba(255, 90, 40, 0.8); }
.pedal.boom { align-self: center; width: 104px; background: #ff4f2e; color: #fff; font-size: 16px; box-shadow: inset 0 0 0 2px #fff3c4, 0 4px 0 #a3271a; animation: bump 0.6s ease infinite; }
.controls.tip { max-width: 40ch; color: #ffd23f; }

/* upgrades in the garage */
.car-card.upg { grid-template-columns: 1fr; }
.pips { display: flex; gap: 4px; margin-top: 4px; }
.pips i { width: 16px; height: 6px; border-radius: 3px; background: #e3e6ea; }
.pips i.on { background: var(--sign-orange); }

/* on narrow screens the toasts drop below the HUD so they never cover the boost bar */
@media (max-width: 560px) { #hud .toasts { top: 168px; } }
