.vehicle{position:absolute;z-index:5;overflow:visible;border-radius:clamp(8px,1.6vw,15px);box-shadow:0 9px 14px rgba(0,0,0,.32),inset 0 2px rgba(255,255,255,.35);border:2px solid rgba(255,255,255,.3);cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;transition:filter .15s,transform .22s cubic-bezier(.2,.75,.25,1);will-change:transform}
.vehicle:hover{filter:brightness(1.08)}
.vehicle.selected{outline:none;z-index:10}
.vehicle.blocked{animation:shake .28s}
.vehicle.dragging{cursor:grabbing;filter:brightness(1.14) saturate(1.08);transition:none;box-shadow:0 16px 26px rgba(0,0,0,.45)}
.vehicle.bus{border-radius:clamp(8px,1.6vw,15px);border-width:2px 3px 4px}
.vehicle.car{border-radius:clamp(8px,1.6vw,15px)}
.vehicle .roof{position:absolute;inset:8% 7%;background:linear-gradient(135deg,rgba(255,255,255,.24),rgba(0,0,0,.08));border:1px solid rgba(255,255,255,.15);border-radius:8px;pointer-events:none}
.vehicle .window{position:absolute;background:linear-gradient(145deg,#e7f8ff,#b8e5f5);border:1px solid rgba(255,255,255,.72);border-radius:5px;box-shadow:inset 0 0 8px rgba(0,0,0,.18),0 1px 3px rgba(0,0,0,.16);pointer-events:none}
.vehicle .bus-window{border-radius:4px}
.vehicle .stripe{position:absolute;left:0;right:0;top:70%;height:7%;background:rgba(255,255,255,.2);pointer-events:none}
.vehicle.vertical .stripe{left:70%;right:auto;top:0;bottom:0;width:7%;height:auto}
.vehicle .front-detail,.vehicle .rear-detail{position:absolute;z-index:2;border-radius:3px;pointer-events:none}
.vehicle .front-detail{background:#fff4bd;box-shadow:0 0 6px rgba(255,245,190,.8)}
.vehicle .rear-detail{background:#ff5260;box-shadow:0 0 4px rgba(255,30,50,.55)}
.vehicle .wheel{position:absolute;z-index:3;background:linear-gradient(145deg,#273548,#101722);border:2px solid #8995a5;border-radius:50%;width:16%;aspect-ratio:1;box-shadow:0 2px 2px #0008;pointer-events:none}
.vehicle.horizontal .wheel-a{left:12%;bottom:-7%}
.vehicle.horizontal .wheel-b{right:12%;bottom:-7%}
.vehicle.vertical .wheel-a{left:-7%;bottom:15%}
.vehicle.vertical .wheel-b{right:-7%;bottom:15%}
.vehicle .exhaust-puff{display:none;position:absolute;z-index:4;width:12%;aspect-ratio:1;border-radius:50%;background:rgba(220,231,238,.72);filter:blur(2px);pointer-events:none}
.vehicle.facing-right .exhaust-puff{left:-5%}
.vehicle.facing-left .exhaust-puff{right:-5%}
.vehicle.facing-down .exhaust-puff{top:-5%}
.vehicle.facing-up .exhaust-puff{bottom:-5%}
.vehicle.horizontal .exhaust-puff{top:64%}
.vehicle.vertical .exhaust-puff{left:64%}
.vehicle .puff-a{animation-delay:0s}
.vehicle .puff-b{animation-delay:.18s}
.vehicle .puff-c{animation-delay:.36s}
.vehicle.dragging .exhaust-puff,.vehicle.exit-driving .exhaust-puff{display:block;animation:exhaust .54s ease-out infinite}
.vehicle.facing-right{--smoke-x:-14px;--smoke-y:4px;--exit-x:115%;--exit-y:0}
.vehicle.facing-left{--smoke-x:14px;--smoke-y:4px;--exit-x:-115%;--exit-y:0}
.vehicle.facing-down{--smoke-x:4px;--smoke-y:-14px;--exit-x:0;--exit-y:115%}
.vehicle.facing-up{--smoke-x:4px;--smoke-y:14px;--exit-x:0;--exit-y:-115%}
.vehicle.exit-driving{pointer-events:none}
.vehicle .seat-count{position:absolute;right:4px;top:4px;background:rgba(0,0,0,.38);border-radius:999px;padding:1px 5px;font-size:clamp(7px,1.8cqw,10px);font-weight:900;line-height:1.5}
.vehicle .dir{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-weight:1000;font-size:clamp(9px,3.6cqw,20px);text-shadow:0 2px 2px rgba(0,0,0,.25);pointer-events:none}
.vehicle .dir::before{content:""}
.vehicle.engine-running .exhaust-puff{display:block;animation:exhaust .62s ease-out infinite}
.vehicle.engine-running{animation:engineVibration .12s ease-in-out infinite alternate}
.vehicle.exit-driving{animation:driveOff .52s cubic-bezier(.35,.05,.8,.3) forwards}
.vehicle.exit-driving .exhaust-puff{display:block;animation:exhaust .38s ease-out infinite}

@keyframes exhaust{0%{opacity:.7;transform:translate(0,0) scale(.45)}100%{opacity:0;transform:translate(var(--smoke-x),var(--smoke-y)) scale(1.7)}}
@keyframes engineVibration{from{translate:0 0}to{translate:0 -1px}}
@keyframes driveOff{0%{opacity:1;transform:translate3d(0,0,0) scale(1)}100%{opacity:0;transform:translate3d(var(--exit-x),var(--exit-y),0) scale(.96)}}
