/* rule 38: On scene -> text the dispatcher */
.r1-scene{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;border-radius:14px;background:#1fa463;color:#fff;font:800 16px/1 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;cursor:pointer;-webkit-tap-highlight-color:transparent}
.r1-scene svg{width:20px;height:20px;flex:none}
.r1-scene.done{background:#0f6b3f}
.r1-scene-trip{position:fixed;z-index:7;right:max(12px,env(safe-area-inset-right));bottom:120px;min-height:48px;padding:0 16px;box-shadow:0 4px 14px rgba(0,0,0,.35);border:2px solid #fff}
.r1-scene-trip[hidden]{display:none}
.r1-scene-big{display:flex;width:100%;min-height:64px;margin:12px 0 10px;font-size:19px;box-shadow:0 6px 18px #1fa46355}
.r1-scene-big svg{width:26px;height:26px}
.r1-scene-dlg{border:0;border-radius:18px;padding:20px;max-width:340px;width:calc(100% - 40px);font:16px/1.4 system-ui,-apple-system,sans-serif;color:#13233d}
.r1-scene-dlg::backdrop{background:#0009}
.r1-scene-dlg h2{margin:0 0 6px;font-size:20px}.r1-scene-dlg p{margin:0 0 12px;color:#4a5a72;font-size:14.5px}
.r1-scene-dlg input{box-sizing:border-box;width:100%;height:52px;border:2px solid #b6c6db;border-radius:12px;padding:0 12px;font:700 22px system-ui,sans-serif}
.r1-scene-dlg .err{color:#c62828;min-height:18px;margin:6px 0 0}
.r1-scene-dlg .row{display:flex;gap:10px;margin-top:8px}.r1-scene-dlg .row button{flex:1;min-height:48px;border-radius:12px;border:0;background:#1fa463;color:#fff;font:700 16px system-ui,sans-serif}
.r1-scene-dlg .row .ghost{background:#e8eef6;color:#13233d}
#r1SceneSettings{margin:10px 0 4px;padding:12px;border:1px solid #b6cfca;border-radius:10px;font-size:14px;color:#173438}#r1SceneSettings a{margin-left:6px;font-weight:700}

/* On/Off duty (Nov 4 2026, task 977feb91) */
.r1-duty{position:fixed;z-index:7;display:flex;align-items:center;gap:10px;border:2px solid #fff;cursor:pointer;-webkit-tap-highlight-color:transparent;font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;box-shadow:0 4px 14px rgba(0,0,0,.35);background:#3c4043;color:#fff}
.r1-duty[hidden]{display:none}
.r1-duty i{flex:none;width:14px;height:14px;border-radius:50%;background:#9aa0a6;box-shadow:0 0 0 3px rgba(255,255,255,.18)}
.r1-duty.on{background:#137333}
.r1-duty.on i{background:#fff;animation:r1DutyPulse 1.8s ease-out infinite}
.r1-duty.busy{opacity:.75}
@keyframes r1DutyPulse{0%{box-shadow:0 0 0 0 rgba(255,255,255,.75)}70%{box-shadow:0 0 0 10px rgba(255,255,255,0)}100%{box-shadow:0 0 0 0 rgba(255,255,255,0)}}
.r1-duty-home{left:50%;transform:translateX(-50%);bottom:calc(env(safe-area-inset-bottom) + 24px);height:52px;min-width:190px;max-width:calc(100vw - 150px);padding:0 16px 0 14px;border-radius:26px;text-align:left}
.r1-duty-home span{display:flex;flex-direction:column;min-width:0;line-height:1.1}
.r1-duty-home b{font:900 16px/1.1 system-ui,-apple-system,Roboto,sans-serif;letter-spacing:.06em}
.r1-duty-home small{font:600 11.5px/1.2 system-ui,-apple-system,Roboto,sans-serif;opacity:.92;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.r1-duty-nav{left:max(12px,env(safe-area-inset-left));bottom:120px;height:40px;padding:0 13px 0 11px;border-radius:20px;gap:8px}
.r1-duty-nav b{font:900 13px/1 system-ui,-apple-system,Roboto,sans-serif;letter-spacing:.06em}
.r1-duty-nav i{width:11px;height:11px}
.r1-duty-toast{position:fixed;z-index:46;left:50%;transform:translateX(-50%);bottom:calc(env(safe-area-inset-bottom) + 92px);max-width:min(92vw,420px);padding:10px 14px;border-radius:12px;background:#202124;color:#fff;font:500 14.5px/1.3 system-ui,-apple-system,Roboto,sans-serif;box-shadow:0 4px 14px rgba(0,0,0,.3);text-align:center}
.r1-duty-toast[hidden]{display:none}
.r1-duty-toast.on b{color:#81c995}
.r1-duty-dlg .off{background:#c5221f!important;color:#fff!important}
@media (orientation:landscape) and (max-height:500px){.r1-duty-home{bottom:calc(env(safe-area-inset-bottom) + 14px)}}
#r1DutySettings{margin:10px 0 4px;padding:12px;border:1px solid #b6cfca;border-radius:10px;font-size:14px;color:#173438}#r1DutySettings a{margin-left:6px;font-weight:700}
.r1-scene-call{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:48px;margin:0 0 10px;border:2px solid #1fa463;border-radius:14px;background:#fff;color:#0f6b3f;font:800 16px/1 system-ui,-apple-system,sans-serif;cursor:pointer}
.r1-scene-call[hidden]{display:none}.r1-scene-call svg{width:20px;height:20px}
body.r1-night .r1-scene-call{background:#202124;color:#81c995}
