:root{--blue: #22598F;--blue-dark: #1a4470;--forest: #285943;--forest-dark: #1d3e30;--teal: #519872;--teal-dark: #3d7a5a;--sage-mid: #A4B494;--sage-light: #BEC5AD;--white: #ffffff;--off-white: #f6f5f2;--dark: #1a1a1a;--text: #2d2d2d;--muted: #666666;--border: #dddad4;--success: #285943;--error: #C03030;--warning: #C07820;--radius: 12px;--radius-sm: 8px;--tap: 56px;--t: .2s ease}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:var(--off-white);color:var(--text);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}.app{display:flex;flex-direction:column;min-height:100dvh}.app-main{flex:1;display:flex;flex-direction:column;padding:16px 16px 32px;max-width:520px;width:100%;margin:0 auto;gap:12px}.header{background:var(--forest-dark);padding:0 20px;height:64px;display:flex;align-items:center;gap:12px;flex-shrink:0}.header-icon{height:36px;width:auto;filter:brightness(0) invert(1)}.header-wordmark-img{height:56px;width:auto;filter:brightness(0) invert(1);opacity:.9}.offline-banner{background:var(--warning);color:#fff;font-size:13px;font-weight:600;padding:8px 20px;text-align:center;flex-shrink:0}.offline-banner.cached{background:var(--teal-dark)}.btn{display:inline-flex;align-items:center;justify-content:center;min-height:var(--tap);padding:12px 24px;border:none;border-radius:var(--radius);font-size:16px;font-weight:600;font-family:inherit;cursor:pointer;transition:background var(--t),opacity var(--t),box-shadow var(--t);width:100%;text-align:center;-webkit-user-select:none;user-select:none}.btn:active{opacity:.85}.btn:disabled{opacity:.4;cursor:not-allowed}.btn-primary{background:var(--blue);color:#fff}.btn-primary:hover:not(:disabled){background:var(--blue-dark);box-shadow:0 4px 14px #22598f4d}.btn-secondary{background:transparent;color:var(--blue);border:2px solid var(--blue)}.btn-secondary:hover:not(:disabled){background:#22598f12}.btn-ghost{background:transparent;color:var(--muted);font-size:14px;min-height:auto;padding:8px 16px;width:auto}.home{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;flex:1;padding:32px 0;text-align:center}.home-brand{display:flex;align-items:center;gap:14px;margin-bottom:6px}.home-icon{width:64px;height:auto}.home-wordmark-img{height:96px;width:auto}.home-title{font-size:26px;font-weight:700;letter-spacing:-.4px;color:var(--dark)}.home-sub{font-size:13px;color:var(--muted);letter-spacing:.02em}.firmware-status{display:flex;flex-direction:column;align-items:center;width:100%;max-width:320px}.firmware-status-toggle{display:flex;align-items:center;gap:6px;background:none;border:none;cursor:pointer;padding:4px 0;font-size:13px;font-weight:600;color:var(--forest);font-family:inherit}.firmware-ready-dot{width:8px;height:8px;border-radius:50%;background:var(--forest);flex-shrink:0}.firmware-arrow{font-size:16px;line-height:1;transition:transform .15s ease;display:inline-block}.firmware-arrow.open{transform:rotate(180deg)}.firmware-status-list{margin-top:6px;width:100%;background:#2859430f;border:1px solid rgba(40,89,67,.18);border-radius:var(--radius-sm);padding:6px 0;text-align:left}.firmware-status-item{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:6px 14px;font-size:13px}.firmware-device{font-weight:600;color:var(--text);white-space:nowrap}.firmware-versions{display:flex;flex-direction:column;align-items:flex-end;gap:2px}.firmware-version-chip{color:var(--muted);font-size:12px}.center-screen{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;text-align:center}.center-screen h2{font-size:20px;font-weight:700;color:var(--dark)}.center-screen p{font-size:15px;color:var(--muted);max-width:300px}.alert-icon{font-size:40px;color:var(--warning)}@keyframes spin{to{transform:rotate(360deg)}}.spinner{width:36px;height:36px;border:3px solid var(--border);border-top-color:var(--blue);border-radius:50%;animation:spin .8s linear infinite}.spinner-sm{width:20px;height:20px;border-width:2px}.session-list{display:flex;flex-direction:column;gap:10px}.device-card{background:var(--white);border:1.5px solid var(--border);border-radius:var(--radius);padding:16px;display:flex;flex-direction:column;gap:10px}.device-card.active{border-color:var(--blue);box-shadow:0 0 0 3px #22598f1f}.device-card.status-complete{border-color:var(--success)}.device-card.status-error{border-color:var(--error)}.card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}.card-names{flex:1}.card-device-name{font-size:16px;font-weight:700;font-family:Courier New,monospace;letter-spacing:.02em}.card-device-type{font-size:12px;color:var(--muted);margin-top:2px}.card-status-icon{font-size:22px;flex-shrink:0;line-height:1;margin-top:2px}.icon-success{color:var(--success)}.icon-error{color:var(--error)}.icon-muted{color:var(--muted)}.card-version{font-size:13px;color:var(--muted);display:flex;align-items:center;gap:6px}.version-arrow{color:var(--blue);font-weight:700}.card-status-text{font-size:13px;font-weight:600;display:flex;align-items:center;gap:8px}.card-status-text.muted{color:var(--muted);font-weight:400}.card-status-text.ok{color:var(--success)}.card-status-text.err{color:var(--error)}.card-status-text.active{color:var(--blue)}.card-error-detail{font-size:12px;color:var(--error);background:#fdecea;border-radius:var(--radius-sm);padding:8px 10px;line-height:1.4}.progress-bar-wrap{width:100%;height:8px;background:var(--border);border-radius:999px;overflow:hidden}.progress-bar-fill{height:100%;background:var(--blue);border-radius:999px;transition:width .2s ease}.progress-label{font-size:12px;color:var(--muted);text-align:right;margin-top:4px}.scanning-hint{display:flex;align-items:center;gap:12px;padding:16px;background:var(--white);border:1.5px dashed var(--border);border-radius:var(--radius);font-size:14px;color:var(--muted)}.action-row{display:flex;flex-direction:column;gap:10px;margin-top:4px}.complete-banner{display:flex;align-items:center;gap:12px;background:#28594314;border:1.5px solid var(--success);border-radius:var(--radius);padding:16px;font-size:15px;font-weight:600;color:var(--success);flex-wrap:wrap}.complete-icon{font-size:22px}.error-toast{display:flex;align-items:center;justify-content:space-between;background:#fdecea;border:1.5px solid var(--error);border-radius:var(--radius);padding:12px 16px;font-size:13px;color:var(--error);gap:12px}.error-toast button{background:none;border:none;color:var(--error);cursor:pointer;font-size:16px;flex-shrink:0;min-height:36px;min-width:36px;display:flex;align-items:center;justify-content:center}.version-picker{background:var(--white);border:1.5px solid var(--blue);border-radius:var(--radius);padding:16px;display:flex;flex-direction:column;gap:12px;box-shadow:0 0 0 3px #22598f1f}.version-picker-label{font-size:13px;font-weight:600;color:var(--muted)}.version-picker-select{width:100%;padding:10px 12px;border:1.5px solid var(--border);border-radius:var(--radius-sm);font-size:15px;font-family:inherit;background:var(--off-white);color:var(--text);cursor:pointer;min-height:44px}.version-picker-select:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px #22598f1a}.muted{color:var(--muted)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0000008c;display:flex;align-items:center;justify-content:center;z-index:200;padding:1.5rem}.modal-card{background:var(--white);border-radius:var(--radius);padding:1.75rem 1.5rem 1.5rem;width:100%;max-width:360px;box-shadow:0 16px 48px #00000038}.modal-title{font-size:1.125rem;font-weight:700;color:var(--dark);margin:0 0 .375rem}.modal-sub{font-size:.875rem;color:var(--muted);margin:0 0 1.25rem;line-height:1.4}.unlock-form{display:flex;flex-direction:column;gap:.75rem}.unlock-input{width:100%;box-sizing:border-box;padding:.75rem 1rem;border:1.5px solid var(--border);border-radius:var(--radius-sm);font-size:1rem;font-family:inherit;letter-spacing:.08em;color:var(--text);background:var(--off-white);transition:border-color var(--t),box-shadow var(--t)}.unlock-input:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px #22598f1f}.unlock-error{font-size:.875rem;color:var(--error);margin:0}.unlock-actions{display:flex;gap:.625rem;justify-content:flex-end;margin-top:.25rem}.firmware-channel-badge{font-size:.75em;color:var(--muted);font-style:italic}.channel-lock-btn{opacity:.6;font-size:.8rem}
