/* Machine-connection panel. Shared by the running, cycling and stairs pages;
   both page themes already define --lime, so the panel inherits either one. */
.machine-link{margin-top:20px;padding-top:18px;border-top:1px solid #ffffff1f}
.machine-head{display:flex;align-items:center;gap:8px;font-size:12px;margin-bottom:12px}
.machine-head small{margin-left:auto;font:9px sans-serif;letter-spacing:1.6px;color:#8f9fa3}
.machine-dot{width:7px;height:7px;border-radius:50%;background:#7d8d90;flex:none}
.machine-link[data-phase=connected] .machine-dot{background:#d4ed93;box-shadow:0 0 0 4px #d4ed9322}
.machine-link[data-phase=connecting] .machine-dot,.machine-link[data-phase=requesting] .machine-dot,.machine-link[data-phase=reconnecting] .machine-dot{background:#ecc46b;animation:machine-pulse 1.1s ease-in-out infinite}
.machine-link[data-phase=error] .machine-dot{background:#ef8b6a}
@keyframes machine-pulse{50%{opacity:.25}}
.machine-status{margin:0 0 12px;font-size:11px;line-height:1.7;color:#aebbbb}
.machine-link[data-phase=error] .machine-status{color:#f0a488}
.machine-readout{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px;margin:0 0 14px}
.machine-readout[hidden]{display:none}
.machine-readout dt{font:9px sans-serif;letter-spacing:.8px;color:#8b9b9d}
.machine-readout dd{margin:2px 0 0;font:600 17px/1.1 'Barlow Condensed','Arial Narrow',sans-serif;font-variant-numeric:tabular-nums;color:#e6ecdd}
.machine-readout dd span{font:9px sans-serif;color:#7e9094;margin-left:4px}
.machine-button{width:100%;border:1px solid #d4ed9355;background:#d4ed9316;color:var(--lime,#d4ed93);border-radius:6px;padding:10px;font-size:12px;font-weight:600}
.machine-link[data-phase=connected] .machine-button{border-color:#ffffff2e;background:transparent;color:#b9c7c5}
.machine-button:disabled{opacity:.55;cursor:progress}
.machine-scan[hidden]{display:none}
.machine-scan{display:flex;align-items:center;gap:7px;margin-top:10px;font-size:10px;color:#8b9b9d;cursor:pointer}
.machine-scan input{accent-color:var(--lime,#d4ed93);width:13px;height:13px;margin:0}
.machine-scan input:disabled{opacity:.5}
.machine-note{margin:10px 0 0;font-size:10px;line-height:1.7;color:#7f9194}
@media(max-width:700px){
 .machine-link{margin-top:14px;padding-top:12px}
 .machine-head{font-size:11px;margin-bottom:8px}
 .machine-head small{display:none}
 .machine-status{font-size:10px;margin-bottom:9px}
 .machine-readout{gap:6px;margin-bottom:10px}
 .machine-readout dd{font-size:15px}
 .machine-button{padding:8px;font-size:11px}
 .machine-note{display:none}
}
@media(prefers-reduced-motion:reduce){.machine-dot{animation:none!important}}

/* A control the machine is driving is shown locked, with its source named. */
.machine-driven .control-label:after,.machine-driven .control-title:after{content:'機台';margin-left:7px;padding:2px 6px;border:1px solid #d4ed9355;border-radius:999px;color:var(--lime,#d4ed93);font:600 8px sans-serif;letter-spacing:1px;vertical-align:middle}
.machine-driven input[type=range]{opacity:.45;cursor:not-allowed}
.machine-driven button:disabled{opacity:.35;cursor:not-allowed}

/* iOS has no Web Bluetooth in any browser, so the panel shows the way round it. */
.machine-ios ol{margin:0 0 13px;padding-left:19px;font-size:11px;line-height:1.95;color:#aebbbb}
.machine-ios strong{color:#e6ecdd}
.machine-ios .machine-button{display:block;text-align:center;text-decoration:none;margin-bottom:8px}
.machine-ios .ghost{border-color:#ffffff2e;background:transparent;color:#b9c7c5}
@media(max-width:700px){.machine-ios ol{font-size:10px;line-height:1.85;padding-left:16px}}
