.render-bus { --bus-w: 184px; --stop-w: 62px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-width: 0; width: 100%; max-width: 360px; box-sizing: border-box; }
/* Codex-NOTE: on phones the entire header must scroll away, including the restored bus. */
@media (max-width: 1023px) {
  .topbar.app-sidebar { position: static; }
  .render-bus { order: 3; flex: 1 1 100%; max-width: 100%; }
}
.bus-progress { display: block; width: 100%; height: 8px; accent-color: var(--gold); }
.render-bus summary { cursor: pointer; list-style: none; display: grid; gap: 5px; }
.render-bus summary::-webkit-details-marker { display: none; }
.render-bus summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.bus-scene { position: relative; display: block; height: 132px; overflow: hidden; }
/* road spanning the full widget width */
.bus-road { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: var(--panel-2); border-top: 2px solid var(--line); }
.bus-road::after { content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 2px; background: repeating-linear-gradient(90deg, var(--muted) 0 12px, transparent 12px 23px); opacity: .6; }
.bus-vehicle { position: absolute; bottom: 7px; width: var(--bus-w); height: 86px; left: calc((100% - var(--bus-w) - var(--stop-w)) * var(--pos, .05)); transition: left 20s linear; }
.bus-body { position: absolute; inset: 0 0 11px 0; display: block; background: var(--gold); border: 2px solid var(--line); border-radius: 12px 14px 6px 6px; }
.bus-side-label { position: absolute; left: 6px; right: 6px; bottom: 16px; text-align: center; color: var(--bg); font-weight: 800; line-height: 1.05; white-space: normal; overflow-wrap: anywhere; }
.bus-seats { position: absolute; left: 6px; right: 22px; top: 4px; display: flex; gap: 3px; justify-content: flex-end; }
.bus-cab { position: absolute; right: 3px; top: 5px; width: 14px; height: 30px; border-radius: 3px 8px 3px 3px; background: var(--panel-2); opacity: .85; }
.bus-chip { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 1px; min-width: 34px; height: 36px; padding: 2px 1px 0; box-sizing: border-box; border-radius: 4px; background: var(--panel-2); color: var(--text); font: inherit; border: 0; }
.bus-fig { position: relative; width: 12px; height: 15px; }
.bus-fig::before { content: ""; position: absolute; left: 3px; top: 0; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bus-fig::after { content: ""; position: absolute; left: 0; bottom: 0; width: 12px; height: 8px; border-radius: 6px 6px 0 0; background: currentColor; }
.bus-chip-id { font-size: 10px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.bus-front { box-shadow: 0 0 0 2px var(--gold-2), 0 0 10px 2px var(--gold-2); color: var(--gold-2); }
.bus-more { justify-content: center; min-width: 26px; font-size: 11px; font-weight: 800; }
.bus-wheel { position: absolute; bottom: 0; width: 22px; height: 22px; box-sizing: border-box; border-radius: 50%; background: var(--panel); border: 3px solid var(--text); }
.bus-wheel::after { content: ""; position: absolute; inset: 3px 8px; background: var(--muted); border-radius: 2px; }
.bus-wheel-a { left: 20px; } .bus-wheel-b { right: 24px; }
/* bus stop at the right end */
.bus-stop-sign { position: absolute; right: 4px; top: 0; padding: 1px 5px; font-size: 9px; font-weight: 800; color: var(--bg); background: var(--gold-2); border-radius: 3px; }
.bus-stop { position: absolute; right: 0; bottom: 9px; width: var(--stop-w); display: flex; flex-wrap: wrap-reverse; gap: 2px; justify-content: flex-end; align-content: flex-start; }
.bus-done { cursor: pointer; background: transparent; color: var(--text); min-width: 28px; height: 33px; }
.bus-done:focus-visible { outline: 2px solid var(--gold); }
.bus-done .bus-chip-id { color: var(--gold-2); }
.stepping-off { animation: bus-step-off 1.8s ease-out both; }
/* next model's bus parked behind, small */
.bus-next-bus { position: absolute; left: 0; top: 4px; display: flex; align-items: center; gap: 4px; opacity: .85; }
.bus-next-bus[hidden] { display: none; }
.bus-next-body { width: 34px; height: 16px; border-radius: 5px 6px 2px 2px; background: var(--gold); opacity: .55; border: 1px solid var(--line); }
.bus-next-label { font-size: 10px; color: var(--muted); max-width: 150px; overflow-wrap: anywhere; line-height: 1.1; }
.bus-tally, .bus-lane { font-size: 12px; overflow-wrap: anywhere; }
.bus-message, .bus-next { margin: 8px 0; color: var(--muted); }
.bus-passengers { padding: 0; list-style: none; max-height: 180px; overflow-y: auto; }
.bus-passengers li { padding: 5px 0; border-top: 1px solid var(--line); }
/* offline / paused: parked and grey */
.render-bus[data-online="false"] .bus-scene { filter: grayscale(1); opacity: .5; }
.render-bus[data-phase="driving"] .bus-body { animation: bus-bounce .6s ease-in-out infinite alternate; }
.render-bus[data-phase="driving"] .bus-wheel { animation: bus-roll .8s linear infinite; }
.render-bus[data-phase="driving"] .bus-road::after { animation: bus-road .7s linear infinite; }
.render-bus[data-phase="boarding"] .bus-seats { animation: bus-board 1.6s ease-out; }
.render-bus:not([data-phase="driving"]) .bus-vehicle { transition-duration: 0s !important; }
@keyframes bus-bounce { to { transform: translateY(-1.5px); } }
@keyframes bus-roll { to { transform: rotate(360deg); } }
@keyframes bus-road { to { background-position: -23px 0; } }
@keyframes bus-step-off { 0% { opacity: 0; transform: translate(-70px, -10px); } 60% { opacity: 1; transform: translate(-10px, 0); } 100% { opacity: 1; transform: none; } }
@keyframes bus-board { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: none; } }
/* CLAUDE-NOTE (Ilyas 2026-10-16 "the bus progress animation is no longer working"): he wants the bus animated on his
   phone; Android battery saver turns on prefers-reduced-motion, which froze it. The bounce is small, so it always runs. */
@media (max-width: 760px) { .render-bus { max-width: 100%; } }
.bus-countdown { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gold-2); }
.bus-countdown[hidden] { display: none; }
.bus-countdown[data-delayed="true"] { color: #e8a317; padding-left: 6px; border-left: 3px solid #e8a317; }
.render-bus[data-delayed="true"] .bus-front { box-shadow: 0 0 0 2px #e8a317, 0 0 10px 2px #e8a317; color: #e8a317; }

/* CLAUDE-NOTE (Ilyas 2026-10-16): start-frame image jobs row beside the GPU bus. */
.bus-frames { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
.bus-frames[hidden] { display: none; }
.bus-frames-title { font-size: 12px; opacity: .8; margin-right: 2px; }
.bus-frame { cursor: pointer; }
.bus-frame-generating { outline: 1px solid var(--gold); }
.bus-frame-waiting { outline: 1px dashed var(--gold); }

/* CLAUDE-NOTE (Ilyas 2026-10-16): idle queue = the driver sits on a stool beside the parked bus with a steaming coffee. */
.bus-driver { display: none; position: absolute; bottom: 9px; width: 26px; height: 40px;
  left: calc((100% - var(--bus-w) - var(--stop-w)) * .05 + var(--bus-w) + 10px); color: var(--text); }
.render-bus[data-idle="true"] .bus-driver { display: block; }
.bus-driver-stool { position: absolute; left: 4px; bottom: 0; width: 14px; height: 9px; border-top: 3px solid var(--muted);
  border-left: 2px solid var(--muted); border-right: 2px solid var(--muted); box-sizing: border-box; }
.bus-driver-body { position: absolute; left: 4px; bottom: 9px; width: 14px; height: 15px; border-radius: 7px 7px 2px 2px; background: currentColor; }
.bus-driver-body::before { content: ""; position: absolute; left: 3px; top: -10px; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.bus-driver-body::after { content: ""; position: absolute; left: 1px; top: -12px; width: 12px; height: 4px; border-radius: 3px 3px 0 0; background: var(--gold); }
.bus-driver-cup { position: absolute; left: 18px; bottom: 15px; width: 6px; height: 6px; border-radius: 0 0 2px 2px; background: var(--gold-2); }
.bus-driver-cup::before, .bus-driver-cup::after { content: ""; position: absolute; bottom: 7px; width: 2px; height: 7px; border-radius: 2px;
  background: var(--muted); opacity: 0; animation: bus-steam 2.4s ease-out infinite; }
.bus-driver-cup::before { left: 1px; }
.bus-driver-cup::after { left: 3px; animation-delay: 1.2s; }
@keyframes bus-steam { 0% { transform: translateY(0) scaleY(.6); opacity: 0; } 30% { opacity: .7; } 100% { transform: translateY(-8px) scaleY(1); opacity: 0; } }
