/* Rail Shunt - dispatcher's enamel board. Dark green board, cream rails, lamp-amber highlights. */
.rs{--board:#0f1b17;--panel:#16251f;--line:#2c3d34;--cream:#d6cfb4;--lamp:#ffd166;--ink:#0a110f;
  width:100%;max-width:420px;margin:0 auto;color:var(--cream);
  padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom);
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif}
.rs button{font-family:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent;cursor:pointer}
.rs button:focus-visible,.rs canvas:focus-visible{outline:3px solid var(--lamp);outline-offset:2px}
.rs-hud{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;align-items:center;gap:8px;background:var(--board);
  border:1px solid var(--line);border-bottom:0;border-radius:12px 12px 0 0;padding:4px 6px 4px 10px}
.rs-lv{display:flex;flex-direction:column;line-height:1.2;min-width:0}
.rs-lv b{font-size:.82rem;color:var(--cream);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rs-lv span{font-size:.72rem;color:#8d9c90;font-variant-numeric:tabular-nums}
.rs-lives{display:flex;gap:5px}
.rs-lives i{width:12px;height:12px;border-radius:50%;background:#2a2321;border:1px solid #4a3c37;transition:background .2s,box-shadow .2s}
.rs-lives i.on{background:#ff6b3d;border-color:#ffb08f;box-shadow:0 0 6px #ff6b3d99}
.rs-stat{display:flex;flex-direction:column;align-items:flex-end;line-height:1.2;min-width:52px}
.rs-stat b{font-size:.9rem;color:var(--lamp);font-variant-numeric:tabular-nums}
.rs-stat span{font-size:.72rem;color:#8d9c90;font-variant-numeric:tabular-nums}
.rs-btns{display:flex}
.rs-ib{width:44px;height:44px;background:transparent;border:0;color:var(--cream);display:grid;place-items:center;border-radius:10px}
.rs-ib svg{width:20px;height:20px;fill:currentColor}
.rs-ib[aria-pressed="true"]{color:var(--lamp);background:#ffd16622}
.rs-ib.muted #mute-wave{display:none}
.rs-stage{position:relative;background:var(--board);border:1px solid var(--line);border-top:0;border-radius:0 0 12px 12px;overflow:hidden}
.rs-stage canvas{display:block;touch-action:none;-webkit-user-select:none;user-select:none;margin:0 auto}
.rs-banner{position:absolute;left:10px;right:10px;bottom:48px;pointer-events:none;text-align:center;font-size:.85rem;color:var(--ink);
  background:var(--lamp);border-radius:8px;padding:6px 10px;opacity:0;transform:translateY(6px);transition:opacity .25s,transform .25s}
.rs-banner.show{opacity:1;transform:none}
.rs-keys{font-size:.72rem;color:#8d9c90;text-align:center;margin-top:6px}
@media (hover:none){.rs-keys{display:none}}
.rs-ov{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(8,14,12,.88);padding:14px;animation:rsin .2s ease-out}
.rs-ov[hidden]{display:none}
@keyframes rsin{from{opacity:0}to{opacity:1}}
.rs-card{width:100%;max-height:100%;overflow:auto;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:18px 16px;text-align:center}
.rs-logo{font-size:1.9rem;font-weight:900;letter-spacing:.14em;color:var(--cream);line-height:1}
.rs-logo em{font-style:normal;color:var(--lamp)}
.rs-sub{font-size:.88rem;color:#aab5a8;margin:8px 0 14px;line-height:1.4}
.rs-rule{height:3px;margin:12px auto;width:64px;background:repeating-linear-gradient(90deg,var(--cream) 0 8px,transparent 8px 12px)}
.rs-col{display:flex;flex-direction:column;gap:8px}
.rs-b{min-height:48px;border-radius:10px;border:1px solid var(--line);background:#22352c;color:var(--cream);font-weight:700;font-size:.98rem;padding:8px 14px}
.rs-b.pri{background:var(--lamp);color:var(--ink);border-color:var(--lamp)}
.rs-b small{display:block;font-weight:500;font-size:.72rem;opacity:.8}
.rs-b:disabled{opacity:.4;cursor:default}
.rs-row{display:flex;gap:8px}.rs-row .rs-b{flex:1}
.rs-h{font-size:1.15rem;font-weight:800;color:var(--cream)}
.rs-stars{display:flex;justify-content:center;gap:6px;margin:10px 0}
.st{display:inline-block;width:11px;height:11px;background:#f0b429;clip-path:polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)}
.st.off{background:#3a4a40}
.rs-stars-in,.row{display:flex;gap:6px}.row{gap:1px}
.rs-stars .st{width:34px;height:34px;animation:rspop .4s ease-out both}
.rs-stars .st:nth-child(2){animation-delay:.12s}.rs-stars .st:nth-child(3){animation-delay:.24s}
@keyframes rspop{from{transform:scale(.2) rotate(-30deg);opacity:0}to{transform:none;opacity:1}}
.rs-stats{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:8px 0 12px;text-align:left}
.rs-stats div{background:#101c17;border:1px solid var(--line);border-radius:8px;padding:6px 10px;font-size:.72rem;color:#8d9c90}
.rs-stats b{display:block;font-size:1rem;color:var(--cream);font-variant-numeric:tabular-nums}
.rs-tag{display:inline-block;background:var(--lamp);color:var(--ink);font-size:.72rem;font-weight:800;border-radius:99px;padding:2px 10px;margin:2px}
.rs-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin:10px 0}
.rs-lvb{min-height:54px;border-radius:9px;border:1px solid var(--line);background:#22352c;color:var(--cream);font-weight:800;font-size:.95rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:2px}
.rs-lvb .row{display:flex;gap:1px;height:9px}
.rs-lvb:disabled{opacity:.35;cursor:default}
.rs-lvb[aria-current="true"]{border-color:var(--lamp)}
.rs-about{margin:1rem 0;line-height:1.55;font-size:.92rem}
.rs-about h2{font-size:1.05rem;margin-bottom:.4rem}.rs-about p{margin-bottom:.6rem}
@media (prefers-reduced-motion:reduce){.rs *,.rs-ov{animation:none!important;transition:none!important}}

.rs-stat span.over{color:#ff8a5c}
.rs-prev{font-size:.78rem;color:#8d9c90;margin:2px 0 8px;line-height:1.4}
.rs-prev b{color:var(--cream);font-variant-numeric:tabular-nums}
.rs-tip{font-size:.84rem;color:var(--cream);background:#101c17;border:1px solid var(--line);border-left:3px solid var(--lamp);border-radius:8px;padding:8px 10px;margin:8px 0;text-align:left;line-height:1.4}
.rs-bar{display:block;height:6px;border-radius:3px;background:#101c17;border:1px solid var(--line);margin:8px 0 0;overflow:hidden}
.rs-bar i{display:block;height:100%;background:var(--lamp)}
.rs-new{display:inline-block;background:var(--lamp);color:var(--ink);font-size:.62rem;font-weight:800;border-radius:99px;padding:1px 7px;margin-left:6px;vertical-align:middle}
/* full screen (shell adds html.pip-immersive or html.pip-native) */
html.pip-immersive .game-wrap,html.pip-native .game-wrap{display:flex;flex-direction:column;padding:0;overflow:hidden}
html.pip-immersive .rs-about,html.pip-immersive .rs-keys,html.pip-immersive .pip-actions,html.pip-immersive .hub-bar,html.pip-immersive .playyard-ad,html.pip-immersive .below-content,
html.pip-native .rs-about,html.pip-native .rs-keys,html.pip-native .pip-actions,html.pip-native .hub-bar,html.pip-native .playyard-ad,html.pip-native .below-content{display:none}
html.pip-immersive .rs,html.pip-native .rs{flex:1 1 0;min-height:0;max-width:none;width:100%;margin:0;display:flex;flex-direction:column;padding-bottom:max(env(safe-area-inset-bottom),0px)}
html.pip-immersive .rs-stage,html.pip-native .rs-stage{flex:1 1 0;min-height:0;display:flex;align-items:center;justify-content:center;border-radius:0;background:radial-gradient(ellipse at 50% 40%,#16251f,#0a110f 80%)}
html.pip-immersive .rs-stage canvas,html.pip-native .rs-stage canvas{margin:0;max-width:100%;max-height:100%;border-radius:8px;box-shadow:0 6px 28px #000a}
html.pip-immersive .rs-hud,html.pip-native .rs-hud{flex:none}
@media (orientation:landscape) and (max-height:520px){
  html.pip-immersive .rs,html.pip-native .rs{flex-direction:row}
  html.pip-immersive .rs-hud,html.pip-native .rs-hud{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:10px;width:170px;padding:8px 10px;border-radius:0}
  html.pip-immersive .rs-btns,html.pip-native .rs-btns{justify-content:space-between}
  html.pip-immersive .rs-stat,html.pip-native .rs-stat{align-items:flex-start}
  html.pip-immersive .rs-card,html.pip-native .rs-card{padding:10px 12px}
  html.pip-immersive .rs-sub,html.pip-native .rs-sub{margin:4px 0 8px}
  html.pip-immersive .rs-rule,html.pip-native .rs-rule{display:none}
}
