/* style.css — one classroom, drawn with boxes and border-radius.
   Stacking is deliberate and spelled out, because "something invisible is
   covering the buttons" is the bug that keeps coming back:
     room and pupils .... 1
     bubbles ............ 20
     hud / noise ........ 50
     floating points .... 100
     end-of-round card .. 300                                              */

:root {
  --wall: #eef2f9;
  --wall2: #dde4f0;
  --chalk: #16305c;
  --wood: #33538c;
  --wood2: #24406e;
  --ink: #2a2a33;
  --good: #34a05a;
  --bad: #d8453f;
  --gold: #f0b429;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; height: 100%; overflow: hidden;
  font-family: "Baloo 2", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--wall);
  background-image:
    radial-gradient(1200px 700px at 50% -20%, #ffffff, transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 78px, rgba(0,0,0,.022) 78px 80px);
  user-select: none;
}
body { display: flex; flex-direction: column; }

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

/* ------------------------------------------------------------- the menu -- */
#menu {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: linear-gradient(160deg, #2c4f8f, #16305c 60%, #0d1d3a);
}
#menu[hidden] { display: none; }
.menu-box {
  width: min(560px, 100%); text-align: center; color: #f3f7f2;
  background: rgba(0,0,0,.22); border: 3px solid rgba(255,255,255,.16);
  border-radius: 26px; padding: clamp(22px, 5vw, 42px);
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.logo {
  font-size: clamp(44px, 13vw, 84px); font-weight: 800; letter-spacing: -1px; line-height: 1;
  color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.25);
}
.tagline { font-size: clamp(15px, 3.6vw, 18px); line-height: 1.6; opacity: .92; margin: 16px 0 8px; }
.note { font-size: 15px; opacity: .8; margin-bottom: 10px; }
.best { margin-top: 14px; font-size: 15px; opacity: .85; }
.linky { margin-top: 12px; font-size: 14px; opacity: .7; text-decoration: underline; }

.big {
  display: inline-block; margin-top: 12px;
  background: var(--gold); color: #3a2a00; font-weight: 800;
  font-size: clamp(19px, 4.6vw, 24px); padding: 16px 34px; border-radius: 999px;
  box-shadow: 0 6px 0 #c8920f; transition: transform .08s, box-shadow .08s;
}
.big:active { transform: translateY(4px); box-shadow: 0 2px 0 #c8920f; }

/* ------------------------------------------------------------ the scene -- */
.scene {
  position: relative; flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  padding: max(8px, env(safe-area-inset-top)) 10px calc(8px + env(safe-area-inset-bottom));
  gap: 8px;
}
.scene[hidden] { display: none; }

/* ------------------------------------------------------------- the hud --- */
.hud {
  position: relative; z-index: 50; flex: none;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 2px solid #ccd8ea; border-radius: 16px;
  padding: 8px 12px; box-shadow: 0 3px 0 rgba(0,0,0,.06);
}
.hud-title { font-weight: 800; font-size: clamp(15px, 3.4vw, 19px); }
.hud-stats { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.stat {
  display: flex; align-items: center; gap: 5px;
  background: #f2f5fb; border-radius: 10px; padding: 4px 9px; font-size: 14px;
}
.stat b { font-size: 17px; }
.stat .lbl { opacity: .6; font-size: 12px; }
.stat.pop { animation: pop .35s ease; }
@keyframes pop { 0%{transform:scale(1)} 45%{transform:scale(1.22)} 100%{transform:scale(1)} }

.clock { position: relative; width: 100%; height: 12px; background: #d5deee; border-radius: 999px; overflow: hidden; }
.clock-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #57b979, #8fd35f); transition: width .1s linear; }
.clock.low .clock-fill { background: linear-gradient(90deg, #e8664f, #f0a03c); }
.clock-num {
  position: absolute; right: 8px; top: -20px; font-size: 13px; font-weight: 800; opacity: .65;
}

/* ------------------------------------------------------ floaty bits ------ */
.say {
  position: absolute; z-index: 100; left: 50%; top: 64px; transform: translateX(-50%);
  background: rgba(28,28,34,.9); color: #fff; font-weight: 700;
  font-size: clamp(14px, 3.4vw, 17px); padding: 9px 18px; border-radius: 999px;
  animation: sayin .28s ease; pointer-events: none; max-width: 92%; text-align: center;
}
.say.good { background: rgba(36,132,74,.94); }
.say.bad { background: rgba(190,53,47,.94); }
.say.out { opacity: 0; transform: translate(-50%, -10px); transition: .3s; }
@keyframes sayin { from { opacity: 0; transform: translate(-50%, 10px) } }

.float {
  position: absolute; z-index: 100; transform: translate(-50%, -50%);
  font-weight: 800; font-size: clamp(16px, 4vw, 22px); pointer-events: none;
  animation: floaty .9s ease-out forwards; text-shadow: 0 2px 0 rgba(255,255,255,.7);
}
.float.good { color: #1c8a4a; } .float.bad { color: #c8342e; }
@keyframes floaty { to { transform: translate(-50%, -220%); opacity: 0 } }

/* --------------------------------------------------------- round card ---- */
.card-screen {
  position: absolute; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  background: rgba(22,30,26,.72); backdrop-filter: blur(3px);
  animation: sayin .22s ease;
}
.card-box {
  width: min(480px, 100%); text-align: center; color: #23231f;
  background: #ffffff; border: 4px solid #ccd8ea; border-radius: 24px;
  padding: clamp(22px, 5vw, 36px); box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.card-screen.bad .card-box { border-color: #eec0bc; }
.card-box h2 { margin: 0 0 12px; font-size: clamp(23px, 6vw, 32px); }
.card-box p { margin: 7px 0; font-size: clamp(14px, 3.6vw, 17px); line-height: 1.55; }
.stars { font-size: clamp(22px, 6vw, 30px); letter-spacing: 3px; }

/* on anything wide the carpet sits them six across instead of four */
@media (min-width: 680px) { .carpetarea { grid-template-columns: repeat(6, 1fr); } }

/* --------------------------------------------------------------- juice --- */
.bit {
  position: absolute; z-index: 110; width: 9px; height: 9px; border-radius: 2px;
  transform: translate(-50%, -50%); pointer-events: none;
  animation: bitfly .68s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes bitfly {
  to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(220deg); opacity: 0; }
}
@keyframes shakesm { 0%,100%{transform:translate(0,0)} 25%{transform:translate(-5px,2px)} 75%{transform:translate(5px,-2px)} }
@keyframes shakelg { 0%,100%{transform:translate(0,0)} 20%{transform:translate(-11px,4px)} 60%{transform:translate(11px,-4px)} 85%{transform:translate(-5px,2px)} }
.shake-sm { animation: shakesm .28s ease; }
.shake-lg { animation: shakelg .42s ease; }

.combo {
  position: absolute; z-index: 105; left: 50%; top: 96px; transform: translateX(-50%);
  font-weight: 800; font-size: clamp(15px, 3.8vw, 21px); color: #b4700c;
  background: #fff6dd; border: 3px solid #f0b429; border-radius: 999px;
  padding: 5px 16px; pointer-events: none; white-space: nowrap;
  box-shadow: 0 4px 0 rgba(0,0,0,.1);
}
.combo[hidden] { display: none; }
.combo.hot { color: #fff; background: linear-gradient(90deg, #f0803e, #e8534a); border-color: #c33a34; }
.combo.bump { animation: bump .3s ease; }
@keyframes bump { 0%{transform:translateX(-50%) scale(1)} 45%{transform:translateX(-50%) scale(1.2)} 100%{transform:translateX(-50%) scale(1)} }

/* --------------------------------------------------------- playground --- */
.yard { }
.yardarea {
  position: relative; flex: 1; min-height: 0; border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, #9dc9e8 0 26%, #8fbf6a 26% 34%, #b9b2a6 34%);
  border: 4px solid #cbb287;
}
.yardarea .markings {
  position: absolute; left: 50%; top: 58%; transform: translate(-50%,-50%);
  width: min(230px, 46%); aspect-ratio: 1; border: 5px solid rgba(255,255,255,.5); border-radius: 50%;
}
.yardarea .fence {
  position: absolute; left: 0; right: 0; top: 26%; height: 8%;
  background: repeating-linear-gradient(90deg, #7b8a99 0 4px, transparent 4px 16px);
}
.pupil.roam {
  position: absolute; width: auto; max-width: none; transform: translate(-50%,-50%);
  transition: left 1.3s ease-in-out, top 1.3s ease-in-out;
  padding: 10px 14px;              /* a bigger target than the child is drawn */
}
/* Once they are in trouble they stop dead. Chasing a child who is still
   sliding across the playground is not a fair thing to ask of a thumb. */
.pupil.roam.trouble {
  transition: none; animation: jiggle .35s ease-in-out infinite; z-index: 10;
}
@keyframes jiggle { 0%,100%{transform:translate(-50%,-50%) rotate(-6deg)} 50%{transform:translate(-50%,-50%) rotate(6deg)} }

/* -------------------------------------------------------- dinner hall --- */
.hallarea {
  position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column;
  justify-content: space-between; gap: 10px;
  background: linear-gradient(180deg, #f4e7cd, #e6d2ab);
  border: 4px solid #cbb287; border-radius: 16px; padding: 12px 10px;
}
.tables {
  position: absolute; left: 0; right: 0; top: 8%;
  display: flex; justify-content: space-around; font-size: clamp(18px, 4.5vw, 30px); opacity: .28;
}
.tables::before, .tables::after {
  content: ''; position: absolute; left: 4%; right: 4%; height: 10px;
  background: #c49a63; border-radius: 4px; opacity: .5;
}
.tables::before { top: -14px; } .tables::after { top: 46px; }
.queue {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(4px, 1.6vw, 16px); flex: 1; min-height: 0; padding-bottom: 4px;
}
.pupil.queuer {
  /* the padding is the point: it makes the drop target far bigger than the
     child is drawn, which on a phone is the difference between 29px and 50px
     of something to aim a finger at */
  position: relative; width: auto; max-width: none; flex: none;
  padding: 6px 12px; min-width: 58px;
  opacity: .8; transform: scale(.85); transform-origin: bottom center;
  transition: transform .22s ease, opacity .22s ease;
  animation: joinq .28s ease;
}
/* The one you are actually serving: full size, full colour, and lit up. */
.pupil.queuer.front {
  opacity: 1; transform: scale(1.12);
  filter: drop-shadow(0 0 0 rgba(0,0,0,0));
}
.pupil.queuer.front::before {
  content: ''; position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%);
  width: 108%; height: 16px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(240,180,41,.75), transparent 70%);
}
.pupil.queuer .bubble { top: -46%; font-size: clamp(15px, 3.6vw, 22px); }
.pupil.queuer.front .bubble {
  top: -86%; font-size: clamp(24px, 6.5vw, 40px); padding: 5px 12px;
  border-color: #f0b429; border-width: 3px;
}
.pupil.queuer.front .tag::after { content: ''; }
/* while you are carrying something, everyone who could take it lights up */
.queue.taking .pupil.queuer { outline: 4px dashed rgba(240,180,41,.85); outline-offset: 3px; border-radius: 14px; }
@keyframes joinq { from { opacity: 0; transform: translateX(40px) scale(.6) } }
.pupil.queuer.going { opacity: 0; transform: translateY(-16px) scale(.7); transition: .26s; }
.pupil.queuer.impatient .kid { animation: jiggle .3s ease-in-out infinite; }
.patience {
  display: block; width: 80%; height: 8px; margin: 6px auto 0;
  background: #d9c8a5; border-radius: 999px; overflow: hidden;
}
.pupil.queuer.front .patience { height: 11px; box-shadow: 0 0 0 2px rgba(240,180,41,.4); }
.patience i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg,#57b979,#e8c34f); }
.pupil.queuer.impatient .patience i { background: linear-gradient(90deg,#f0803e,#e0453f); }

.hatch { flex: none; background: #ffffff; border: 3px solid #d8c39a; border-radius: 14px; padding: 8px; }
.hatchtop { text-align: center; font-size: 13px; font-weight: 800; opacity: .6; margin-bottom: 6px; }
.trays { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(6px, 2vw, 14px); }
.tray {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: #f2f5fb; border: 3px solid #d8c39a; border-radius: 14px;
  padding: 7px clamp(9px, 3vw, 20px); box-shadow: 0 4px 0 rgba(0,0,0,.1);
}
.tray-ic { font-size: clamp(23px, 6vw, 36px); line-height: 1; }
.tray-lbl { font-size: clamp(10px, 2.4vw, 12.5px); font-weight: 700; opacity: .65; }
.tray:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.1); }

/* ---------------------------------------------- dragging and holding ----- */
.ghost {
  position: fixed; z-index: 500; transform: translate(-50%,-50%);
  font-size: clamp(30px, 8vw, 50px); pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); animation: lift .14s ease;
}
@keyframes lift { from { transform: translate(-50%,-50%) scale(.7) } }
.lifted { opacity: .45; }
.droptarget { outline: 4px dashed #f0b429; outline-offset: 4px; border-radius: 14px; }

.holdring {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%,-50%);
  width: clamp(46px, 12vw, 74px); aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(#f0b429 calc(var(--k) * 360deg), rgba(255,255,255,.35) 0);
  pointer-events: none; opacity: 0; transition: opacity .12s;
  -webkit-mask: radial-gradient(circle, transparent 56%, #000 58%);
  mask: radial-gradient(circle, transparent 56%, #000 58%);
}
.holding .holdring, .pupil[data-k]:not([data-k="0"]) .holdring { opacity: 1; }

.trail {
  position: absolute; z-index: 108; height: 7px; border-radius: 999px;
  transform-origin: left center; pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,0), #fff);
  animation: fadetrail .3s ease forwards;
}
@keyframes fadetrail { to { opacity: 0 } }

/* --------------------------------------------------------- story time --- */
.carpetarea {
  position: relative; flex: 1; min-height: 0; border-radius: 16px;
  border: 4px solid #cbb287; padding: 10px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  align-content: center; justify-items: center; gap: clamp(4px, 1.4vw, 12px);
  background:
    radial-gradient(ellipse at 50% 60%, #d98fa6 0 32%, #c2607a 32% 56%, #a94f66 56%),
    #f4e7cd;
}
.pupil.sitter { max-width: 110px; touch-action: none; }
.pupil.sitter.fidgeting .kid { animation: jiggle .3s ease-in-out infinite; }
.pupil.sitter.holding .kid { animation: none; }
.pupil.sitter .holdring { z-index: 22; }

/* ---------------------------------------------------------------- PE ---- */
.court {
  position: relative; flex: 1; min-height: 0; overflow: hidden;
  border: 4px solid #cbb287; border-radius: 16px; touch-action: none;
  background: linear-gradient(180deg, #f0e2c4, #dcc79f);
}
.court .net {
  position: absolute; left: 0; right: 0; top: 62%; height: 10%;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.75) 0 3px, transparent 3px 12px);
  border-top: 4px solid rgba(255,255,255,.85);
}
.court .line {
  position: absolute; left: 8%; right: 8%; bottom: 12%; height: 5px;
  background: rgba(255,255,255,.7); border-radius: 3px;
}
.flier {
  position: absolute; transform: translate(-50%,-50%);
  font-size: clamp(30px, 8vw, 50px); line-height: 1; pointer-events: none;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.28));
}
.flier.notball { filter: drop-shadow(0 3px 4px rgba(0,0,0,.28)) saturate(1.3); }
.flier.whacked { animation: whacked .3s ease forwards; }
@keyframes whacked { to { transform: translate(-50%,-50%) scale(1.9) rotate(90deg); opacity: 0 } }
.flier.fouled { animation: fouled .3s ease forwards; }
@keyframes fouled { to { transform: translate(-50%,-50%) scale(.4); opacity: 0 } }






/* -------------------------------------------------------- control room -- */
.controlarea { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 9px; }
.calls {
  flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 7px;
  padding: 8px; overflow: auto;
  background: #12244a; border: 4px solid #24406e; border-radius: 14px;
}
.calls.choosing .call { outline: 3px dashed #f0b429; outline-offset: -5px; }
.call {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  background: #1d3a6e; color: #eaf1fb; border: 3px solid #33538c; border-radius: 11px;
  padding: 8px 11px; text-align: left; width: 100%;
}
.call.urgent { border-color: #e0453f; background: #35244a; }
.ctag { font-size: 10px; font-weight: 800; letter-spacing: 1.5px; opacity: .8; }
.call.urgent .ctag { color: #ff9c93; }
.ctext { font-size: clamp(13px, 3.4vw, 17px); font-weight: 700; }
.cwait { display: block; width: 100%; height: 6px; background: rgba(255,255,255,.18); border-radius: 999px; overflow: hidden; margin-top: 3px; }
.cwait i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg,#57b979,#e8c34f); }
.call.running-out .cwait i { background: linear-gradient(90deg,#f0803e,#e0453f); }
.call.running-out { animation: buzzrow .35s ease-in-out infinite; }
@keyframes buzzrow { 0%,100%{transform:translateX(0)} 50%{transform:translateX(2px)} }
.call.done { opacity: 0; transform: translateX(30px); transition: .28s; }
.call.lost { opacity: 0; transform: scale(.9); transition: .28s; }

.fleet { flex: none; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.unit {
  position: relative; display: flex; flex-direction: column; align-items: center;
  background: #fff; border: 3px solid #ccd8ea; border-radius: 12px;
  padding: 6px 10px; min-width: clamp(64px, 17vw, 94px);
  box-shadow: 0 4px 0 rgba(0,0,0,.1);
}
.unit.picked { border-color: #f0b429; box-shadow: 0 0 0 4px rgba(240,180,41,.35); }
.unit.out { opacity: .42; }
.uic { font-size: clamp(22px, 6vw, 32px); line-height: 1.1; }
.uname { font-size: clamp(8px, 2.1vw, 11px); font-weight: 700; opacity: .6; white-space: nowrap; }
.ubusy { display: block; width: 100%; height: 4px; background: #d5deee; border-radius: 999px; overflow: hidden; margin-top: 3px; }
.ubusy i { display: block; height: 100%; width: 100%; background: #33538c; }

/* --------------------------------------------------------- fingerprints -- */
.forensicarea { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.scenecard {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: #fff; border: 4px solid #ccd8ea; border-radius: 14px; padding: 9px;
}
.sclabel { font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; opacity: .55; }
.print {
  position: relative; display: block; width: clamp(54px, 14vw, 82px); aspect-ratio: 4/5;
  background: #f6e6c9; border: 3px solid #c9a86a; border-radius: 46% 46% 42% 42%;
  overflow: hidden;
}
.print.big { width: clamp(78px, 20vw, 116px); }
.ridges { position: absolute; inset: 0; }
.print.loop .ridges {
  background: repeating-radial-gradient(ellipse at 38% 45%, transparent 0 4px, #8a6a3a 4px 6px);
}
.print.whorl .ridges {
  background: repeating-radial-gradient(circle at 50% 48%, transparent 0 4px, #8a6a3a 4px 6px);
}
.print.arch .ridges {
  background: repeating-linear-gradient(175deg, transparent 0 4px, #8a6a3a 4px 6px);
}
.marks {
  position: absolute; inset: 14% 12%; display: grid;
  grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
}
.marks i { display: block; }
.marks i.on {
  background: #c8392f; border-radius: 50%; width: 58%; aspect-ratio: 1;
  margin: auto; box-shadow: 0 0 0 2px rgba(255,255,255,.85);
}
.filerow {
  flex: 1; min-height: 0; display: grid; gap: clamp(5px, 1.6vw, 11px);
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  align-content: center; justify-items: center; overflow: auto;
  background: #e7edf7; border: 4px solid #ccd8ea; border-radius: 14px; padding: 8px;
}
.filecard {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: #fff; border: 3px solid #ccd8ea; border-radius: 11px; padding: 7px 5px;
  box-shadow: 0 4px 0 rgba(0,0,0,.09); width: 100%; max-width: 118px;
}
.filecard:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.09); }
.filecard.hit { border-color: #34a05a; background: #eef9f2; }
.filecard.miss { border-color: #d8453f; background: #fbe4e2; animation: shakesm .3s ease; }
.fcname { font-size: clamp(9px, 2.2vw, 11px); font-weight: 800; opacity: .55; }

/* ---------------------------------------------------------- plate watch -- */
.roadarea { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 9px; }
.radio {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 12px;
  background: #12244a; color: #eaf1fb; border: 4px solid #24406e; border-radius: 14px; padding: 9px;
}
.rlabel { font-size: clamp(11px, 2.8vw, 14px); font-weight: 800; opacity: .8; }
.wanted {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800;
  font-size: clamp(20px, 6vw, 32px); letter-spacing: 2px;
  background: #f2d94a; color: #1b1b1b; border-radius: 6px; padding: 3px 12px;
}
.wanted.flash { animation: bump .5s ease; }
.wanted.hidden { color: #d7e0ef; background: #243755; letter-spacing: .18em; }
@keyframes bump { 0%,100%{transform:scale(1)} 40%{transform:scale(1.12)} }
.road {
  position: relative; flex: 1; min-height: 0; overflow: hidden;
  background: linear-gradient(180deg, #93b3d6 0 14%, #5b5f66 14%);
  border: 4px solid #ccd8ea; border-radius: 14px;
}
.lane {
  position: absolute; left: 0; right: 0; top: 52%; height: 5px;
  background: repeating-linear-gradient(90deg, #eee 0 30px, transparent 30px 60px);
}
.traffic { position: absolute; inset: 0; }
.car2 {
  position: absolute; display: flex; flex-direction: column; align-items: center; gap: 1px;
  transform: translateY(-50%); padding: 4px;
}
.cbody2 { font-size: clamp(26px, 7vw, 40px); line-height: 1; transform: scaleX(-1); }
.plate {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800;
  font-size: clamp(10px, 2.7vw, 14px); letter-spacing: 1px;
  background: #f2d94a; color: #1b1b1b; border: 2px solid #b09a1f; border-radius: 3px; padding: 1px 5px;
}
.car2.stopped { animation: bump .4s ease; }
.car2.stopped .plate { background: #7fd6a0; }
.car2.nope .plate { background: #f0908a; animation: shakesm .3s ease; }
