/* Train Roof Obby (shared 3D styles: sim3d.css) */
#game-root .sim-controls-help { margin-top: 14px; }
.sim-stage { cursor: grab; }
.sim-stage:active { cursor: grabbing; }
.ro-hud { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); display: flex; gap: 6px; align-items: center; }
.ro-hud > div { background: rgba(8, 16, 28, .66); border: 1px solid rgba(255, 255, 255, .15); border-radius: 12px; padding: 5px 11px; font: 900 16px system-ui, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ro-time { font-size: 20px !important; min-width: 84px; text-align: center; }
/* progress along the train: back (start) on the left, the locomotive on the right */
.ro-prog { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); width: min(420px, 60%); display: flex; align-items: center; gap: 6px; }
.ro-prog__bar { position: relative; flex: 1; height: 8px; border-radius: 4px; background: rgba(8, 16, 28, .55); border: 1px solid rgba(255, 255, 255, .25); }
.ro-prog__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; background: linear-gradient(90deg, #22c55e, #facc15); }
.ro-prog__cp { position: absolute; top: -3px; width: 4px; height: 14px; margin-left: -2px; border-radius: 2px; background: #e5e7eb; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.ro-prog__me { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; border: 3px solid #2563eb; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.ro-prog__end { font-size: 16px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
/* bridge / tunnel warning */
.ro-warn { position: absolute; left: 50%; top: 80px; transform: translateX(-50%); padding: 8px 16px; border-radius: 12px; text-align: center; opacity: 0; transition: opacity .2s;
  background: rgba(120, 53, 15, .88); border: 2px solid #facc15; font: 900 clamp(15px, 2.4vw, 22px) system-ui, sans-serif; text-shadow: 0 2px 4px rgba(0, 0, 0, .5); }
.ro-warn.is-on { opacity: 1; animation: ro-pulse .5s ease-in-out infinite alternate; }
.ro-warn.is-tunnel { background: rgba(30, 41, 59, .9); border-color: #93c5fd; }
.ro-warn small { display: block; font-size: .62em; font-weight: 700; opacity: .95; }
@keyframes ro-pulse { to { transform: translateX(-50%) scale(1.05); } }
.ro-stars { list-style: none; padding: 0; margin: 8px auto; text-align: left; display: inline-block; }
.ro-stars li { margin: 3px 0; opacity: .6; font-weight: 700; }
.ro-stars li.is-ok { opacity: 1; }
/* touch: big jump / duck buttons on the right */
.sim-has-touch .sim-tbtns { left: auto; right: 14px; bottom: 58px; flex-direction: column; align-items: flex-end; }
.sim-has-touch .sim-tbtns .sim-tbtn { width: 70px; height: 70px; border-radius: 50%; font-size: 24px; line-height: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; }
.sim-tbtn small { font-size: 10px; font-weight: 700; margin-top: 2px; }
.sim-has-touch .sim-tbtn[data-id="jump"] { width: 84px; height: 84px; background: rgba(37, 99, 235, .7); }
@container (max-width: 480px) {
  .ro-hud { top: 8px; left: auto; right: 8px; transform: none; gap: 4px; }
  .ro-hud > div { font-size: 13px; padding: 3px 7px; border-radius: 9px; }
  .ro-time { font-size: 15px !important; min-width: 64px; }
  .ro-prog { top: 90px; width: 70%; }
  .ro-warn { top: 112px; max-width: 90%; }
  .sim-toolbar { right: 8px; }
  .sim-has-touch .sim-tbtns { bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { .ro-warn.is-on { animation: none; } }
