:root{
  --safe-t:max(env(safe-area-inset-top),var(--inset-top,0px));
  --safe-b:max(env(safe-area-inset-bottom),var(--inset-bottom,0px));
  --cream:#f4f0e5;
  --paper:#fffdf7;
  --charcoal:#22312d;
  --charcoal-2:#30423d;
  --sage:#87a281;
  --sage-dark:#526c59;
  --orange:#d9793e;
  --orange-dark:#a84f28;
  --blue:#b9d7dc;
  --ink:#1e2b27;
  --muted:#66746e;
  --line:rgba(31,46,41,.15);
  --shadow:0 12px 34px rgba(21,32,29,.26);
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body,#game{margin:0;width:100%;height:100%;overflow:hidden;background:#a8c7cd;color:var(--ink);font-family:Inter,"Avenir Next","Segoe UI",system-ui,-apple-system,sans-serif;touch-action:none;user-select:none;-webkit-user-select:none}
button{font:inherit;cursor:pointer}
button:focus-visible,a:focus-visible{outline:3px solid #fff;outline-offset:3px}
svg{display:block}
#world{position:absolute;inset:0;width:100%;height:100%;display:block;background:linear-gradient(#afcdd2 0 54%,#80997d 54%)}

/* Quiet utility bar leaves the neighborhood visible. */
#hud{position:absolute;z-index:10;top:var(--safe-t);left:0;right:0;height:62px;padding:8px 10px 8px 48px;display:flex;align-items:center;gap:7px;background:linear-gradient(180deg,rgba(28,44,40,.78),rgba(28,44,40,.32) 72%,transparent);pointer-events:none}
#hud>*{pointer-events:auto}
.brand{height:46px;display:flex;align-items:center;gap:9px;min-width:142px;color:var(--cream);text-shadow:0 1px 2px rgba(0,0,0,.2)}
.truckIcon{width:37px;height:30px;display:grid;place-items:center}
.truckIcon svg{width:37px;fill:var(--cream)}
.truckIcon .window{fill:#a9ccd1}.truckIcon .detail{fill:none;stroke:#667e73;stroke-width:1.3}
.brand>span:last-child{display:flex;flex-direction:column;line-height:1.08}
.brand b{font-size:11px;letter-spacing:1.35px;font-weight:800}.brand small{font-size:9px;color:#d4ded7;letter-spacing:.18px;margin-top:3px}
.meter{height:44px;border-radius:10px;background:rgba(255,253,247,.94);box-shadow:0 3px 13px rgba(18,31,27,.18);border:1px solid rgba(255,255,255,.65);display:flex;color:var(--charcoal)}
.meter small{font-size:7px;line-height:1;letter-spacing:1.15px;color:var(--muted);font-weight:800}
.meter b{font-size:17px;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:-.4px}
.meter.cash{min-width:82px;padding:7px 10px;flex-direction:column;justify-content:center;gap:4px}
.meter.load{min-width:104px;padding:6px 9px;align-items:center;gap:8px}
.meter.load>div{display:flex;flex-direction:column;gap:3px}.meter.load b{font-size:15px}.meter.load .divider{color:#91a099;margin:0 2px;font-weight:500}
.meter.load i{position:relative;width:31px;height:6px;overflow:hidden;border-radius:6px;background:#d9ddd6}
.meter.load em{position:absolute;inset:0 auto 0 0;width:0;border-radius:inherit;background:var(--orange);transition:width .3s ease}
.iconBtn{margin-left:auto;width:44px;height:44px;border:1px solid rgba(255,255,255,.28);border-radius:11px;background:rgba(34,49,45,.88);box-shadow:0 3px 12px rgba(0,0,0,.18);display:grid;place-items:center}
.iconBtn span,.iconBtn span:after{display:block;width:4px;height:16px;border-radius:3px;background:var(--cream)}
.iconBtn span{position:relative;transform:translateX(-4px)}.iconBtn span:after{content:"";position:absolute;left:8px;top:0}

#mission{position:absolute;z-index:7;top:calc(var(--safe-t) + 69px);left:12px;width:min(310px,calc(100% - 132px));min-height:48px;padding:8px 12px;background:rgba(255,253,247,.94);border:1px solid rgba(255,255,255,.72);border-radius:12px;box-shadow:0 4px 18px rgba(20,34,30,.18);display:flex;align-items:center;gap:9px;pointer-events:none;transition:opacity .35s ease}
#mission>i{width:7px;height:30px;flex:0 0 auto;border-radius:6px;background:var(--orange)}
#mission>span{min-width:0;display:flex;flex-direction:column;gap:2px}
#mission b{color:var(--charcoal);font-size:11px;letter-spacing:.15px}
#mission small{color:var(--muted);font-size:9px;line-height:1.25;white-space:normal}
#toast{position:absolute;z-index:30;left:50%;top:31%;transform:translate(-50%,-8px);max-width:calc(100% - 32px);padding:10px 16px;border-radius:11px;background:var(--charcoal);color:var(--cream);border-left:4px solid var(--orange);box-shadow:var(--shadow);font-size:12px;font-weight:750;letter-spacing:.05px;opacity:0;transition:.22s ease;pointer-events:none;white-space:nowrap}
#toast.on{opacity:1;transform:translate(-50%,0)}

/* Camera tools read as instruments, not floating game badges. */
#viewControls{position:absolute;z-index:8;right:12px;top:calc(var(--safe-t) + 69px);display:flex;flex-direction:column;gap:6px}
.pill{width:106px;height:44px;padding:0 9px;border:1px solid rgba(255,255,255,.28);border-radius:11px;color:var(--cream);background:rgba(34,49,45,.88);box-shadow:0 4px 14px rgba(20,32,28,.2);display:flex;align-items:center;gap:8px;text-align:left}
.pill>svg{width:18px;height:18px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.pill>span{display:flex;flex-direction:column;line-height:1.05}.pill small{font-size:6.5px;letter-spacing:1.15px;color:#b9c9c1;font-weight:800}.pill b{font-size:8.5px;letter-spacing:.7px;margin-top:3px;white-space:nowrap}
.pill.held{background:var(--cream);color:var(--charcoal);border-color:#fff}.pill.held small{color:var(--sage-dark)}

#driveControls{position:absolute;z-index:9;left:12px;right:12px;bottom:calc(var(--safe-b) + 12px);display:flex;align-items:flex-end;justify-content:space-between;pointer-events:none}
.steer{display:flex;gap:8px;pointer-events:auto}
.steer button{width:64px;height:64px;border:1px solid rgba(255,255,255,.65);border-radius:18px;background:rgba(255,253,247,.91);color:var(--charcoal);box-shadow:0 7px 20px rgba(23,37,32,.25);display:grid;place-items:center;transition:transform .08s,background .08s}
.steer svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.steer button.held{background:var(--sage);color:#fff;transform:translateY(3px)}
#drive{width:146px;height:84px;border:1px solid rgba(255,235,217,.6);border-radius:20px;background:linear-gradient(155deg,#e58a4f,var(--orange));color:#fff8ef;box-shadow:0 6px 0 var(--orange-dark),0 12px 25px rgba(45,28,19,.3);display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:auto;transition:transform .08s,box-shadow .08s}
#drive span{width:26px;height:19px;display:grid;place-items:center}#drive svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
#drive b{font-size:11px;letter-spacing:.85px}#drive small{font-size:7px;color:#ffe2cf;margin-top:3px;letter-spacing:.15px}
#drive.held{transform:translateY(5px);box-shadow:0 1px 0 var(--orange-dark),0 6px 15px rgba(45,28,19,.3)}

#context{position:absolute;z-index:11;right:12px;bottom:calc(var(--safe-b) + 108px);display:flex;flex-direction:column;align-items:flex-end;gap:7px}
.action{width:142px;min-height:57px;border:1px solid rgba(255,255,255,.66);border-radius:14px;background:rgba(34,49,45,.92);color:var(--cream);box-shadow:0 7px 20px rgba(21,33,29,.28);display:none;grid-template-columns:37px 1fr;grid-template-rows:26px 17px;text-align:left;padding:7px 9px;align-items:center}
.actionIcon{grid-row:1/3;width:31px;height:31px;border-radius:9px;background:rgba(255,255,255,.1);display:grid;place-items:center}
.actionIcon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.action b{font-size:10px;letter-spacing:.8px;align-self:end}.action small{font-size:8px;color:#c7d2cc;align-self:start;margin-top:2px;white-space:nowrap}
.action.show{display:grid}.action:disabled{opacity:.58;filter:saturate(.55)}
.action.pickup:not(:disabled){background:var(--sage-dark);border-color:#d9e5d7}.action.pickup:not(:disabled) .actionIcon{background:#728d77}
.action.dump{background:#b65e31}.action.dump small{color:#ffe0ca}.action.dump .actionIcon{background:#ca7447}
.action.shop{background:#3e696c}.action.shop small{color:#d1e4e3}.action.shop .actionIcon{background:#527d80}

#pickupProgress{position:absolute;z-index:12;left:50%;bottom:calc(var(--safe-b) + 111px);width:min(240px,62vw);height:36px;transform:translateX(-50%);border-radius:10px;background:rgba(34,49,45,.95);border:1px solid rgba(255,255,255,.38);display:none;overflow:hidden;box-shadow:0 7px 22px rgba(18,30,26,.32)}
#pickupProgress.on{display:block}#pickupProgress i{position:absolute;inset:0 auto 0 0;width:0;background:var(--sage-dark)}#pickupProgress span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;font-size:9px;font-weight:800;letter-spacing:.55px;text-transform:uppercase;text-shadow:0 1px 2px rgba(0,0,0,.25)}

/* Light paper panels establish the Maple Loop service identity. */
.panel{position:absolute;z-index:100;inset:0;display:none;align-items:center;justify-content:center;padding:calc(var(--safe-t) + 12px) 14px calc(var(--safe-b) + 12px);background:rgba(24,37,33,.74);touch-action:pan-y;overflow:auto}.panel.on{display:flex}
.card{position:relative;width:min(500px,100%);max-height:100%;overflow:auto;background:linear-gradient(145deg,var(--paper),#ede9dc);color:var(--ink);border:1px solid rgba(255,255,255,.72);border-radius:21px;padding:24px;box-shadow:0 22px 60px rgba(9,19,16,.42)}
.card.compact{width:min(390px,100%)}.card h1{margin:5px 40px 9px 0;font-family:Georgia,"Times New Roman",serif;font-size:27px;line-height:1.07;letter-spacing:-.55px;font-weight:700}.card p{margin:6px 0 17px;color:var(--muted);line-height:1.45;font-size:12px}
.close{position:absolute;right:12px;top:11px;width:37px;height:37px;border:1px solid var(--line);border-radius:50%;background:rgba(34,49,45,.06);color:var(--charcoal);font-size:24px;line-height:1}
.eyebrow{font-size:8px;letter-spacing:1.7px;color:var(--orange-dark);font-weight:900}
.primary,.secondary{width:100%;min-height:44px;border-radius:11px;padding:11px 15px;margin-top:8px;font-weight:800;font-size:11px;letter-spacing:.35px}
.primary{border:1px solid #475f4d;background:var(--sage-dark);color:#fff;box-shadow:0 3px 0 #31483a}.primary:active{transform:translateY(2px);box-shadow:0 1px 0 #31483a}
.secondary{border:1px solid rgba(34,49,45,.16);background:rgba(255,255,255,.48);color:var(--charcoal)}.link{display:block;text-align:center;text-decoration:none}
.routeMark{display:flex;align-items:center;gap:8px;margin:0 0 15px}.routeMark>span{width:34px;height:34px;border:2px solid var(--orange);border-radius:50%;display:grid;place-items:center;color:var(--orange-dark);font-size:10px;font-weight:900;letter-spacing:.5px}.routeMark small{color:var(--sage-dark);font-size:7px;line-height:1.25;letter-spacing:1.2px;font-weight:900}

.welcomeCard{width:min(470px,100%)}.welcomeTop{min-height:90px;margin:-5px 0 2px;display:flex;align-items:center;justify-content:space-between;gap:12px}.welcomeTop .routeMark{margin:0;flex:0 0 auto}.heroTruck{width:190px;max-width:58%;filter:drop-shadow(0 8px 5px rgba(24,38,33,.2))}.heroTruck svg{width:100%;overflow:visible}.heroTruck .body,.heroTruck .hopper{fill:#647f68}.heroTruck .cab{fill:#40564d}.heroTruck .window{fill:#b9d7dc}.heroTruck .arm{fill:none;stroke:#d9793e;stroke-width:6;stroke-linejoin:round}.heroTruck circle{fill:#293632;stroke:#f4f0e5;stroke-width:3}.heroTruck .hub{fill:#95a89c;stroke:none}
.welcomeCard h1{max-width:410px;font-size:30px;margin-top:6px}.welcomeCard>p{max-width:420px}
.how{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:15px 0 12px}.how>span{min-height:57px;padding:9px 8px;border-top:3px solid var(--sage);background:rgba(82,108,89,.07);display:flex;flex-direction:column;gap:5px}.how b{font-size:9px;color:var(--orange-dark);letter-spacing:1px}.how small{font-size:9px;color:var(--charcoal);line-height:1.15;font-weight:700}

.garageCard h1{margin-bottom:12px}.balance{margin:0 0 10px!important;padding:10px 12px!important;border:1px solid var(--line);border-radius:11px;background:rgba(255,255,255,.55);display:grid;grid-template-columns:1fr auto;align-items:center}.balance>span{font-size:7px;letter-spacing:1.2px;color:var(--muted);font-weight:900}.balance b{font-size:18px;color:var(--orange-dark);font-variant-numeric:tabular-nums}.balance #feeReserve{grid-column:1/3;color:var(--muted);font-size:8px;margin-top:2px}
.shopGrid{display:grid;gap:7px}.shopGrid article{min-height:62px;display:flex;align-items:center;gap:10px;border:1px solid var(--line);background:rgba(255,255,255,.45);border-radius:12px;padding:8px}.shopGrid article>div:nth-child(2){display:flex;flex-direction:column;flex:1;min-width:0}.shopGrid article>div:nth-child(2)>b{font-size:11px}.shopGrid article small{color:var(--muted);font-size:8px;margin-top:3px}.shopIcon{width:36px;height:36px;flex:0 0 auto;border-radius:10px;background:rgba(82,108,89,.1);display:grid;place-items:center;color:var(--sage-dark)}.shopIcon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.shopIcon circle{fill:currentColor;stroke:none}
.shopGrid article>button{min-width:58px;border:1px solid #c46131;border-radius:9px;background:var(--orange);color:#fff;padding:9px 8px;font-size:10px;font-weight:900}.shopGrid article>button:disabled{opacity:.36}.paint{flex-wrap:wrap}#colors{width:100%;display:flex;gap:9px;padding-left:46px}#colors button{width:32px;height:32px;border-radius:50%;border:3px solid var(--paper);padding:0;box-shadow:0 0 0 1px rgba(34,49,45,.18)}#colors button.selected{box-shadow:0 0 0 3px var(--orange)}
.toggle{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--line)}.toggle>span{display:flex;flex-direction:column;flex:1}.toggle b{font-size:11px}.toggle small{color:var(--muted);font-size:9px;line-height:1.35;margin-top:4px}.toggle input{display:none}.toggle>i{width:47px;height:27px;flex:0 0 auto;border-radius:20px;background:#c9cdc6;position:relative;transition:.2s}.toggle>i:after{content:"";position:absolute;top:3px;left:3px;width:21px;height:21px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:.2s}.toggle input:checked+i{background:var(--sage-dark)}.toggle input:checked+i:after{left:23px}
.credits a{color:var(--orange-dark);font-weight:700}.credits>small{display:block;color:var(--muted);font-size:8px;line-height:1.45;padding:9px 0;border-top:1px solid var(--line)}

body.busy #driveControls,body.busy #context{pointer-events:none;opacity:.45}body.modal #driveControls,body.modal #context,body.modal #viewControls{pointer-events:none}.portraitNote{display:none}

@media (max-width:620px){
  #hud{gap:6px}.brand{display:none}.meter.cash{min-width:79px}.meter.load{min-width:100px}.iconBtn{width:42px;height:42px}
  #mission{width:calc(100% - 138px)}
  .steer{flex-direction:column}.steer button{width:59px;height:52px;border-radius:16px}.steer svg{width:24px;height:24px}
  #drive{width:128px;height:92px}
  #context{bottom:calc(var(--safe-b) + 119px)}.action{width:132px}
  .card{padding:21px 18px}.card h1{font-size:25px}.welcomeCard h1{font-size:27px}
}

@media (max-width:370px){
  #hud{padding-left:44px;padding-right:7px;gap:5px}.meter.cash{min-width:72px;padding-left:8px;padding-right:8px}.meter.load{min-width:93px;padding-left:7px;padding-right:7px;gap:6px}.meter.load i{width:26px}
  #mission{left:9px;width:calc(100% - 130px)}#viewControls{right:9px}.pill{width:102px}
  #driveControls{left:9px;right:9px}.steer button{width:56px}.action{width:126px}#context{right:9px}
}

@media (orientation:landscape){
  #mission{left:50%;transform:translateX(-50%);width:min(320px,37vw)}
  #viewControls{flex-direction:row}.pill{width:105px}
  #context{bottom:calc(var(--safe-b) + 92px)}
  #drive{height:72px;width:145px}.steer button{width:62px;height:58px}
}

@media (orientation:landscape) and (max-height:520px){
  #hud{height:56px;padding-top:6px;padding-bottom:6px}.brand{height:42px}.meter{height:40px}.iconBtn{height:40px;width:40px}
  #mission,#viewControls{top:calc(var(--safe-t) + 59px)}#mission{min-height:42px;padding-top:6px;padding-bottom:6px}
  #driveControls{bottom:calc(var(--safe-b) + 8px)}#drive{height:62px;width:138px;border-radius:17px}.steer button{width:56px;height:52px;border-radius:15px}
  #context{bottom:calc(var(--safe-b) + 77px)}.action{min-height:50px;width:136px;grid-template-rows:22px 15px;padding:5px 8px}.actionIcon{width:29px;height:29px}
  #pickupProgress{bottom:calc(var(--safe-b) + 80px)}
  .panel{padding:calc(var(--safe-t) + 7px) 12px calc(var(--safe-b) + 7px)}.card{padding:16px 19px}.card h1{font-size:22px;margin-bottom:6px}.card p{margin-bottom:10px}.welcomeTop{min-height:62px}.heroTruck{width:135px}.welcomeTop .routeMark{transform:scale(.9);transform-origin:right center}.welcomeCard{width:min(650px,100%)}.welcomeCard h1{font-size:23px}.how{margin:8px 0 7px}.how>span{min-height:43px;padding:6px 8px}.primary,.secondary{min-height:39px;padding:8px 14px;margin-top:6px}.garageCard{width:min(720px,100%)}.shopGrid{grid-template-columns:repeat(3,1fr)}.shopGrid article{min-height:72px}.paint #colors{padding-left:0}.routeMark{margin-bottom:8px}
}

/* ───────── Build 2.0: real driving controls, combo, minimap, shift report ───────── */
.meter.time{min-width:64px;padding:7px 9px;flex-direction:column;justify-content:center;gap:4px;align-items:flex-start}
.meter.time small{letter-spacing:.4px;text-transform:none;font-size:7.5px}
.meter.time.late b{color:var(--orange-dark)}
#hud.full .meter.load{background:#ffe9d8;border-color:var(--orange);animation:fullPulse 1s ease-in-out infinite}
@keyframes fullPulse{50%{box-shadow:0 0 0 4px rgba(217,121,62,.35)}}

#viewControls{align-items:flex-end}
#minimap{width:126px;height:101px;border-radius:12px;background:rgba(34,49,45,.78);border:1px solid rgba(255,255,255,.28);box-shadow:0 4px 14px rgba(20,32,28,.22);pointer-events:none}

#combo{position:absolute;z-index:8;left:12px;top:calc(var(--safe-t) + 125px);min-width:92px;padding:6px 11px 8px;border-radius:12px;background:linear-gradient(155deg,#e58a4f,var(--orange));color:#fff8ef;box-shadow:0 5px 0 var(--orange-dark),0 10px 20px rgba(45,28,19,.28);display:grid;grid-template-columns:auto 1fr;align-items:baseline;column-gap:6px;opacity:0;transform:scale(.7) translateY(-6px);transform-origin:left top;transition:.18s cubic-bezier(.3,1.6,.5,1);pointer-events:none}
#combo.on{opacity:1;transform:none}
#combo b{font-size:22px;letter-spacing:-.5px;font-variant-numeric:tabular-nums}#combo small{font-size:8px;letter-spacing:1.4px;font-weight:900;color:#ffe2cf}
#combo i{grid-column:1/3;height:5px;margin-top:4px;border-radius:5px;background:rgba(0,0,0,.22);overflow:hidden;position:relative}#combo em{position:absolute;inset:0 auto 0 0;background:#fff8ef;border-radius:inherit}

#popups{position:absolute;inset:0;z-index:6;pointer-events:none;overflow:hidden}
.pop{position:absolute;left:0;top:0;font-weight:900;font-size:22px;letter-spacing:.2px;color:#fff;white-space:nowrap;text-shadow:0 2px 0 rgba(20,30,27,.55),0 0 10px rgba(20,30,27,.35);will-change:transform,opacity}
.pop.cash{color:#c9ffb8}.pop.gold{color:#ffd34d;font-size:28px}.pop.payout{color:#ffe28a;font-size:34px}.pop.perfect{color:#8ff0ff;font-size:16px;letter-spacing:1.6px}.pop.combo{color:#ffb27a;font-size:18px;letter-spacing:1.2px}.pop.bad{color:#ff8a7a;font-size:16px;letter-spacing:1.4px}

/* Left thumb steers, right thumb works the pedals. */
#driveControls{align-items:flex-end;gap:8px}
.steer button{width:78px;height:78px;border-radius:22px;touch-action:none}
.steer svg{width:34px;height:34px}
.dash{pointer-events:none;align-self:flex-end;margin-bottom:4px;min-width:74px;padding:6px 10px;border-radius:12px;background:rgba(34,49,45,.82);border:1px solid rgba(255,255,255,.22);color:var(--cream);display:grid;grid-template-columns:auto auto auto;align-items:baseline;justify-content:center;column-gap:5px;text-align:center}
.dash #gear{font-size:11px;font-weight:900;color:#9fd8a8;width:16px;height:16px;line-height:16px;border-radius:5px;background:rgba(255,255,255,.1);align-self:center}
.dash #gear.rev{color:#fff;background:#c4553f}
.dash b{font-size:20px;font-variant-numeric:tabular-nums;letter-spacing:-.5px}.dash small{font-size:7px;letter-spacing:.8px;color:#b9c9c1;font-weight:800}
.dash em{grid-column:1/4;font-style:normal;font-size:8px;letter-spacing:.4px;color:#ffd9a8;font-weight:800;margin-top:2px}
.pedals{display:grid;grid-template-columns:auto auto;grid-template-rows:auto auto;gap:8px;align-items:end;pointer-events:auto}
#horn{grid-column:1;grid-row:1;justify-self:end;width:48px;height:48px;border-radius:50%;border:1px solid rgba(255,255,255,.4);background:rgba(34,49,45,.88);color:var(--cream);display:grid;place-items:center;box-shadow:0 4px 12px rgba(20,32,28,.25);touch-action:none}
#horn svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}#horn:active{background:var(--cream);color:var(--charcoal)}
#brake{grid-column:1;grid-row:2;width:84px;height:72px;border-radius:18px;border:1px solid rgba(255,255,255,.55);background:linear-gradient(155deg,#5d6f69,#3f504a);color:#fff;box-shadow:0 5px 0 #26332f,0 10px 20px rgba(20,30,27,.3);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;touch-action:none;transition:transform .08s,box-shadow .08s}
#brake b{font-size:11px;letter-spacing:1px}#brake small{font-size:7px;color:#cbd8d2;letter-spacing:.2px}
#gas{grid-column:2;grid-row:1/3;width:96px;height:132px;border:1px solid rgba(255,235,217,.6);border-radius:22px;background:linear-gradient(155deg,#e58a4f,var(--orange));color:#fff8ef;box-shadow:0 6px 0 var(--orange-dark),0 12px 25px rgba(45,28,19,.3);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;touch-action:none;transition:transform .08s,box-shadow .08s}
#gas svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}#gas b{font-size:13px;letter-spacing:1.4px}
#gas.held{transform:translateY(5px);box-shadow:0 1px 0 var(--orange-dark),0 6px 15px rgba(45,28,19,.3)}
#brake.held{transform:translateY(4px);box-shadow:0 1px 0 #26332f,0 5px 12px rgba(20,30,27,.3)}
body.busy #driveControls,body.busy #context{pointer-events:auto;opacity:1}
#context{bottom:calc(var(--safe-b) + 170px)}

.resultCard{text-align:center}.resultCard h1{margin-right:0}
#resultStars{display:flex;justify-content:center;gap:10px;margin:6px 0 10px;font-size:54px;line-height:1}
#resultStars i{font-style:normal;color:#d5d2c4;transform:scale(.4);opacity:0;animation:starIn .45s cubic-bezier(.3,1.7,.5,1) forwards}
#resultStars i.on{color:#f0b323;text-shadow:0 3px 0 #b97b12,0 0 22px rgba(240,179,35,.5)}
@keyframes starIn{to{transform:none;opacity:1}}
.goals{list-style:none;margin:0 0 12px;padding:0;text-align:left;font-size:11px;color:var(--muted)}
.goals li{padding:7px 0 7px 26px;border-bottom:1px solid var(--line);position:relative}.goals li:before{content:"☆";position:absolute;left:4px;color:#b9bdb3}.goals li.ok{color:var(--ink);font-weight:700}.goals li.ok:before{content:"★";color:#f0b323}
.stats{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:8px}.stats span{padding:8px;border-radius:10px;background:rgba(82,108,89,.08);display:flex;flex-direction:column;gap:3px}.stats small{font-size:7px;letter-spacing:1.1px;color:var(--muted);font-weight:900}.stats b{font-size:16px;font-variant-numeric:tabular-nums}
.rankLine{display:block;font-size:9px;color:var(--sage-dark);font-weight:800;letter-spacing:.4px;margin:4px 0 2px}
.balance #shopRank{grid-column:1/3;color:var(--sage-dark);font-size:8px;margin-top:2px;font-weight:800}

@media (max-width:620px){
  .meter.time{min-width:58px}.meter.cash{min-width:70px}.meter.load{min-width:92px}
  #mission{width:calc(100% - 158px)}
  .steer{flex-direction:row}.steer button{width:70px;height:74px;border-radius:20px}
  .dash{display:none}
  #gas{width:88px;height:128px}#brake{width:76px;height:68px}
}
@media (max-width:370px){.steer button{width:62px}#gas{width:80px}#brake{width:70px}#minimap{width:112px;height:90px}}
@media (orientation:landscape){
  #mission{left:12px;transform:none;width:min(300px,34vw)}
  #viewControls{flex-direction:column}
  #gas{height:104px}#brake{height:60px}.steer button{width:84px;height:72px}
}
@media (orientation:landscape) and (max-height:520px){
  #combo{top:calc(var(--safe-t) + 108px)}#minimap{width:108px;height:86px}
  #gas{height:92px;width:90px}#brake{height:54px}#horn{width:42px;height:42px}.steer button{width:78px;height:64px}
  #context{bottom:calc(var(--safe-b) + 120px)}
  .resultCard{width:min(640px,100%)}#resultStars{font-size:40px;margin:2px 0 6px}.goals li{padding-top:4px;padding-bottom:4px}.stats{grid-template-columns:repeat(4,1fr)}
}

/* ───────── Build 2.1: money — fuel gauge, live profit, P&L report ───────── */
#ledger{position:absolute;z-index:8;left:12px;bottom:calc(var(--safe-b) + 100px);padding:7px 10px;border-radius:12px;background:rgba(34,49,45,.86);border:1px solid rgba(255,255,255,.24);color:var(--cream);display:flex;flex-direction:column;gap:5px;min-width:150px;pointer-events:none;box-shadow:0 4px 14px rgba(20,32,28,.22)}
#ledger span{display:flex;align-items:center;gap:7px}#ledger small{font-size:7px;letter-spacing:1.2px;font-weight:900;color:#b9c9c1;width:30px}
#ledger i{flex:1;height:7px;border-radius:6px;background:rgba(255,255,255,.16);overflow:hidden;position:relative;min-width:50px}#ledger i em{position:absolute;inset:0 auto 0 0;border-radius:inherit;background:#5aa9ff}
#ledger b{font-size:11px;font-variant-numeric:tabular-nums}#ledger #netText{font-size:15px;color:#b6f3a6}#ledger #netText.neg{color:#ff9a8a}
#ledger #feeText{font-style:normal;font-size:8px;color:#ffd9a8;font-weight:800;margin-left:auto}
#ledger.low{border-color:#ff8a6a;animation:fullPulse 1s ease-in-out infinite}#ledger.low i em{background:#ff7a5a}
#ledger.fueling i em{background:#8fd0ff}
#cash.neg{color:#c4422f}
.pop.fee{color:#ffb9a3;font-size:20px}
.pnl{margin:0 0 8px;text-align:left;font-size:11px}.pnl div{display:flex;justify-content:space-between;padding:6px 2px;border-bottom:1px solid var(--line)}
.pnl dt{color:var(--muted)}.pnl dd{margin:0;font-weight:800;font-variant-numeric:tabular-nums}
.pnl .total{border-bottom:0;border-top:2px solid var(--charcoal);margin-top:2px;padding-top:8px}.pnl .total dt{color:var(--ink);font-weight:900;letter-spacing:1px;font-size:10px;align-self:center}.pnl .total dd{font-size:22px;color:#2f7d46}.pnl .total dd.neg{color:#c4422f}
.pnl .bonus{border:0;padding-top:0}.pnl .bonus dd{color:var(--orange-dark)}
@media (orientation:landscape){#ledger{left:50%;transform:translateX(-50%);bottom:calc(var(--safe-b) + 8px);flex-direction:row;gap:14px}.dash{display:none}}
@media (orientation:landscape) and (max-height:520px){.pnl div{padding:3px 2px}.pnl .total dd{font-size:18px}}

/* ───────── Build 2.2: kids mode — one big GO button ───────── */
body.kids .steer,body.kids #brake{display:none}
body.kids .pedals{grid-template-columns:auto}body.kids #horn{grid-column:1;grid-row:1;width:64px;height:64px;justify-self:center}
body.kids #gas{grid-column:1;grid-row:2;width:min(220px,56vw);height:120px;border-radius:28px}body.kids #gas b{font-size:26px;letter-spacing:3px}
body.kids #driveControls{justify-content:center}
.kidsRow{border-bottom:0;border-top:1px solid var(--line);padding:9px 0 3px}
body.kids #ledger{bottom:calc(var(--safe-b) + 150px)}
@media (orientation:landscape){body.kids #ledger{bottom:auto;top:calc(var(--safe-t) + 125px);left:12px;transform:none}}

/* ───────── Build 2.3: packer button ───────── */
.action.pack{background:#8a5a2b;border-color:#f3d9b8}.action.pack .actionIcon{background:#a87340}.action.pack small{color:#ffe4c4}.action.pack:active{transform:translateY(3px)}
body.kids .action.pack{width:170px;min-height:74px;grid-template-columns:48px 1fr}body.kids .action.pack b{font-size:14px}body.kids .action.pack .actionIcon{width:42px;height:42px}

/* ───────── Build 2.4: curb mirror + voice picker ───────── */
.voiceRow select{font:inherit;font-size:12px;font-weight:700;padding:8px 10px;border-radius:9px;border:1px solid var(--line);background:#fff;color:var(--ink)}
.mini{width:38px;height:36px;border-radius:9px;border:1px solid #475f4d;background:var(--sage-dark);color:#fff;font-size:13px}
body.kids #ledger{bottom:calc(var(--safe-b) + 215px)}body.kids #context{bottom:calc(var(--safe-b) + 270px)}
.findRow{display:none;border-top:0;padding-top:0}body.kids .findRow{display:flex}

/* Municipal driving experience: quiet instruments, clear road, tactile controls. */
:root{--cream:#eef3f7;--paper:#edf1f3;--charcoal:#14202b;--charcoal-2:#223343;--sage:#7c99ac;--sage-dark:#28649a;--orange:#367eb9;--orange-dark:#204b70;--ink:#14202b;--muted:#576875;--line:rgba(36,54,68,.16)}
html,body,#game{font-family:"Segoe UI",system-ui,sans-serif;background:#9cb5c5}
#hud{height:68px;background:linear-gradient(180deg,rgba(12,22,31,.72),transparent);gap:9px}
.brand{min-width:166px}.brand b{font-size:12px;letter-spacing:2px}.brand small{font-size:10px;color:#d1dde6}.truckIcon{display:none}
.meter{background:rgba(18,31,43,.86);color:#eef4f8;border:1px solid rgba(215,232,245,.17);border-radius:7px;box-shadow:none;height:44px}
.meter small{color:#b1c4d1;font-size:8px}.meter b{font-size:19px;font-weight:600}.meter.load em{background:#81b5dd}.meter.load i{background:#465b6b}
#mission{background:rgba(17,31,43,.84);border:1px solid rgba(219,232,241,.16);border-radius:7px;color:#f2f5f7;box-shadow:none;padding:10px 12px;width:290px}
#mission b{font-size:13px;font-weight:600;color:#f2f5f7}#mission small{font-size:10px;color:#c4d3dd;line-height:1.4}#mission>i{background:#86b8d9;width:3px;border-radius:0}
#viewControls{top:calc(var(--safe-t) + 75px);gap:8px}#minimap{width:116px;height:93px;background:rgba(16,29,40,.75);border-radius:7px;box-shadow:none;border-color:rgba(215,232,245,.2)}
.pill,.iconBtn{background:rgba(17,31,43,.86);border-radius:7px;box-shadow:none;color:#eaf2f8;border-color:rgba(215,232,245,.22)}.pill{width:116px;min-height:44px}.pill small{color:#b1c4d1}.pill b{font-size:11px}
#driveControls{left:22px;right:22px;bottom:calc(var(--safe-b) + 20px)}
.steer{gap:12px}.steer button{width:92px;height:80px;border-radius:12px;background:linear-gradient(#314455,#192c3c);border:1px solid #8b9cac;color:#eff4f7;box-shadow:0 4px 0 #0d1720,0 7px 16px #0003}.steer button.held{background:#487ca3;transform:translateY(3px);box-shadow:0 1px 0 #0d1720}.steer svg{width:30px;height:30px}
#gas{width:103px;height:130px;border-radius:12px;background:linear-gradient(#397eb3,#26577d);border:1px solid #9bc2df;box-shadow:0 4px 0 #10283c,0 7px 16px #0003;color:#fff}#gas b{font-size:14px;letter-spacing:1.5px}
#brake{width:90px;height:77px;border-radius:10px;background:linear-gradient(#586673,#303e4b);border:1px solid #a7b3bd;box-shadow:0 4px 0 #17232d,0 7px 16px #0003}#brake small{font-size:8px;color:#d9e3e9}
#horn{border-radius:9px;background:#1b2d3d;border-color:#8293a1;width:44px;height:44px;box-shadow:none}
#context{right:22px;bottom:calc(var(--safe-b) + 168px)}.action,.action.pack,.action.shop{background:rgba(24,44,61,.94);border:1px solid #819aaa;border-radius:9px;box-shadow:none}.action .actionIcon,.action.pack .actionIcon{background:transparent;color:#d0e2ef}.action small,.action.pack small{color:#c7d8e4}.action b{font-size:11px;letter-spacing:1px}
.dash{display:grid!important;position:absolute;left:50%;bottom:0;transform:translateX(-50%);padding:8px 18px;background:rgba(15,26,36,.87);border-radius:8px;border-color:#8293a155;min-width:110px}.dash b{font-size:31px;font-weight:400}.dash #gear{background:#577284;color:white}.dash small{font-size:9px;color:#c9d5de}.dash em{display:none}
#ledger{bottom:calc(var(--safe-b) + 102px);background:rgba(15,26,36,.87);border-radius:7px;box-shadow:none;color:#e4edf4}#ledger small{color:#b9cbd8}
#toast{background:rgba(15,26,36,.92);color:#f0f4f7;border-radius:7px;font-size:12px;box-shadow:none}
#combo{background:#28587c;box-shadow:none;border-radius:7px}
.panel{background:rgba(11,20,29,.6);backdrop-filter:blur(3px)}.card{border-radius:14px;background:#edf1f3;box-shadow:0 16px 70px #0005;border:1px solid #ffffff60}.card h1,.welcomeCard h1{font-family:inherit;font-size:30px;letter-spacing:-1.3px;line-height:1.05;font-weight:650}.card p{font-size:13px;line-height:1.55}.eyebrow{font-size:9px;letter-spacing:2px;color:#28649a}.toggle b{font-size:13px}.toggle small{font-size:11px;line-height:1.5}.toggle>i{height:28px;background:#abb8c1}.toggle>i:after{top:3px}.toggle input:checked+i{background:#28649a}.toggle input{display:block;position:absolute;opacity:0;width:1px;height:1px}.toggle:focus-within{outline:2px solid #28649a;outline-offset:3px}.primary,.secondary{font-size:12px;border-radius:8px;min-height:46px;box-shadow:none}.primary{background:#28649a;border-color:#28649a;color:white}.primary:hover{background:#347db7}.secondary{background:#dfe6eb;border-color:#c5d1da;color:#213b4f}
#welcome{justify-content:flex-start;padding-left:5vw;background:linear-gradient(90deg,rgba(9,21,32,.84),rgba(9,21,32,.4) 47%,rgba(9,21,32,.08));backdrop-filter:none}
.welcomeCard{width:400px;max-height:calc(100% - 28px);padding:26px;background:rgba(19,35,49,.95);color:#f3f6f9;border-color:#a1bbcf38}.welcomeCard h1{font-size:39px;line-height:1.03;letter-spacing:-1.5px;margin:18px 0 15px}.welcomeCard p{color:#bdcedb;font-size:12px}.welcomeCard .eyebrow{color:#9fc4df}.welcomeTop{min-height:50px;margin-bottom:20px}.fleetBadge{font-size:34px;font-weight:300;letter-spacing:-1px;border-left:3px solid #85b5d6;padding-left:12px}.fleetBadge span{display:block;font-size:8px;letter-spacing:1.8px;font-weight:600;color:#b4c8d8}.routeMark{color:#cadbe7}.routeMark>span{border-color:#719bbb;color:#d1e4f1}.routeMark small{font-size:7px;color:inherit}.welcomeTop .routeMark{margin:0}.welcomeCard .how{gap:8px;margin:18px 0}.welcomeCard .how>span{background:transparent;border:0;border-top:1px solid #7990a255;padding:8px 0;min-height:57px}.welcomeCard .how b{color:#9fc4df}.welcomeCard .how small{font-size:10px;line-height:1.4;color:#d1dde6}.welcomeCard .toggle{border-color:#8298a233}.welcomeCard .toggle small{font-size:10px;color:#b8c9d5}.welcomeCard .toggle b{font-size:12px}.welcomeCard .primary{background:#377db1;border-color:#7daccc;margin-top:16px}.welcomeCard .keyboardHelp{font-size:9px;line-height:1.5;margin:14px 0 0;color:#96adbf}
body.relaxed #timerBox,body.relaxed .meter.cash,body.relaxed #combo,body.relaxed .resultCard .pnl,body.relaxed .resultCard .goals{display:none}
body.relaxed .pop.cash,body.relaxed .pop.combo,body.relaxed .pop.gold{visibility:hidden}
body.kids #driveControls{justify-content:flex-end}body.kids #gas{width:150px;height:112px;border-radius:12px}body.kids #gas b{font-size:22px}body.kids #horn{width:44px;height:44px}body.kids #context{bottom:calc(var(--safe-b) + 195px)}
@media (max-width:620px){#hud{padding-left:48px}.brand{display:none}#mission{left:12px;top:calc(var(--safe-t) + 73px);width:calc(100% - 155px)}#viewControls{right:12px}.steer{gap:8px}.steer button{width:59px;height:70px}#driveControls{left:12px;right:12px;bottom:calc(var(--safe-b) + 14px)}#gas{width:77px;height:115px}#brake{width:69px;height:66px;font-size:10px}#brake b{font-size:10px}#brake small{font-size:7px}.pedals{gap:7px}.dash{bottom:133px;padding:4px 9px;min-width:88px}.dash b{font-size:23px}#context{right:12px;bottom:calc(var(--safe-b) + 177px)}#welcome{justify-content:center;padding:14px}.welcomeCard{width:100%;max-width:420px;padding:22px}.welcomeCard h1{font-size:36px}.welcomeTop{margin-bottom:10px}.card h1{font-size:27px}.welcomeCard .keyboardHelp{display:none}.toggle small{font-size:10px}}
@media (orientation:landscape) and (max-height:550px){#hud{height:55px}.brand{height:40px}.meter{height:39px}#mission,#viewControls{top:calc(var(--safe-t) + 58px)}#minimap{width:98px;height:78px}.pill{width:98px;min-height:36px}#driveControls{bottom:calc(var(--safe-b) + 12px)}.steer button{width:75px;height:65px}#gas{height:96px;width:89px}#brake{height:58px;width:76px}#horn{width:34px;height:34px}#context{bottom:calc(var(--safe-b) + 128px)}.dash{bottom:0}.dash b{font-size:25px}.welcomeCard{width:395px;padding:17px 22px}.welcomeTop{display:none}.welcomeCard h1{font-size:30px;margin:8px 0 10px}.welcomeCard .how{margin:9px 0}.welcomeCard .how>span{min-height:43px}.welcomeCard p{font-size:11px;margin-bottom:9px}.welcomeCard .toggle{padding:6px 0}.welcomeCard .keyboardHelp{display:none}.welcomeCard .primary{margin-top:10px;min-height:41px}body.kids #gas{height:90px;width:140px}body.kids #context{bottom:calc(var(--safe-b) + 155px)}}

.secondary:disabled{opacity:.45;cursor:default}
body.modal #hud,body.modal #mission,body.modal #driveControls,body.modal #viewControls,body.modal #context{opacity:.25}

.card:not(.welcomeCard) .routeMark{color:#395a73}.card:not(.welcomeCard) .routeMark>span{color:#395a73;border-color:#719bbb}

/* Explicit manual reverse, paired with the horn above the brake pedal. */
#reverse{grid-column:1;grid-row:1;justify-self:start;width:90px;height:45px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:1px solid #a7b3bd;border-radius:9px;background:linear-gradient(#536978,#304756);color:#fff;pointer-events:auto;touch-action:none}
#reverse b{font-size:10px;letter-spacing:.8px}#reverse small{font-size:7px}#reverse.held{transform:translateY(3px);background:#6a8190}
.pedals #horn{position:absolute;left:0;right:auto;bottom:90px}
body.kids #reverse{display:none}body.kids .pedals #horn{position:static}
@media(max-width:620px){.pedals #horn{bottom:80px}#reverse{width:69px;height:42px}#reverse b{font-size:9px}}
@media(orientation:landscape) and (max-height:550px){.pedals #horn{bottom:75px}#reverse{width:76px;height:32px}#reverse small{display:none}}

body.mirror #minimap{display:none}body.mirror #viewControls{top:calc(var(--safe-t) + 75px)}

@media(orientation:landscape) and (max-height:550px){body.mirror #viewControls{top:calc(var(--safe-t) + 58px)}}

/* Keep the physical fuel gauge visible in every driving mode. */
#ledger,body.kids #ledger,body.relaxed #ledger{top:calc(var(--safe-t) + 149px);bottom:auto;left:12px;transform:none;min-width:0;width:170px;flex-direction:column;display:flex}
body.relaxed #ledger>span:nth-child(2){display:none}
@media (orientation:landscape) and (max-height:550px){#ledger,body.kids #ledger,body.relaxed #ledger{top:calc(var(--safe-t) + 121px)}body.mirror #shopBtn{margin-right:130px}}

/* Map picker (2026-10-26) */
.mapPick{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:12px 0 4px}.mapPick>span{grid-column:1/-1;font-size:11px;font-weight:700}.mapPick button{min-height:52px;border-radius:12px;border:2px solid var(--line);background:rgba(255,255,255,.08);color:inherit;font:inherit;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:6px 4px;cursor:pointer}.mapPick button b{font-size:12px}.mapPick button small{font-size:11px;opacity:.9}.mapPick button.on{border-color:#ffb27a;background:#d9793e;color:#fff;box-shadow:0 0 0 2px rgba(217,121,62,.25)}
@media (orientation:landscape) and (max-height:550px){.welcomeCard .how,.welcomeCard>p{display:none}}
