:root{--bg:#07131f;--bg-elevated:#0b1d2e;--fg:#e8f0f8;--fg-muted:#7a9ab5;--accent:#14b8a6;--accent-bright:#5eead4;--accent-dim:#0d9488;--card:#0e2438;--border:#1a3a52;--focus:#5eead4;--error:#f87171;--warning:#fbbf24;--success:#34d399;--shadow:#0006;--radius:12px;--radius-sm:8px;--transition:.2s ease}*{box-sizing:border-box}html,body{background:var(--bg);height:100%;color:var(--fg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;padding:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:16px;line-height:1.5}.skip-link{background:var(--accent);color:var(--bg);border-radius:var(--radius-sm);z-index:1000;padding:.5rem 1rem;font-weight:600;text-decoration:none;position:absolute;top:-100%;left:1rem}.skip-link:focus{top:1rem}.app-shell{min-height:100vh;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);grid-template-rows:auto 1fr auto;display:grid}.app-header{background:linear-gradient(180deg, var(--bg-elevated), transparent);border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;gap:1rem;padding:1rem;display:flex}.brand{color:var(--fg);align-items:center;gap:.5rem;font-size:1.1rem;font-weight:700;text-decoration:none;display:flex}.brand-mark{gap:2px;display:flex}.brand-mark i{background:var(--accent);border-radius:2px;width:8px;height:8px;animation:2s ease-in-out infinite brand-pulse}.brand-mark i:last-child{animation-delay:.3s}@keyframes brand-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.9)}}.app-header h1{letter-spacing:.02em;margin:0;font-size:1.25rem;font-weight:600}.header-actions{gap:.5rem;display:flex}.hud-button{background:var(--card);border:1px solid var(--border);color:var(--fg);border-radius:var(--radius-sm);letter-spacing:.05em;text-transform:uppercase;cursor:pointer;transition:all var(--transition);padding:.5rem 1rem;font-size:.8rem;font-weight:600}.hud-button:hover,.hud-button:focus{border-color:var(--accent);background:var(--bg-elevated);outline:none}.hud-button:focus-visible{box-shadow:0 0 0 2px var(--focus)}.hud-button.emphasis{background:var(--accent);border-color:var(--accent);color:var(--bg)}.hud-button.emphasis:hover{background:var(--accent-bright)}.breath-visual{flex-direction:column;flex:1;justify-content:center;align-items:center;padding:2rem 1rem;display:flex;position:relative;overflow:hidden}.tunnel-canvas{z-index:1;width:100%;height:100%;display:block;position:absolute;inset:0}.tunnel-canvas[hidden]{display:none}.breath-svg{filter:drop-shadow(0 0 40px #14b8a64d);width:100%;max-width:400px;height:auto;transition:filter .3s}.breath-svg:focus-within{filter:drop-shadow(0 0 60px #14b8a680)}.breath-circle{transform-origin:200px 200px;transition:r .15s ease-out;animation:4s ease-in-out infinite subtle-pulse}@keyframes subtle-pulse{0%,to{opacity:.9}50%{opacity:1}}.breath-ring{transition:r .15s ease-out}.breath-ring-inner{transition:r .15s ease-out;animation:20s linear infinite ring-rotate}@keyframes ring-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.breath-center{animation:2s ease-in-out infinite center-pulse}@keyframes center-pulse{0%,to{r:8;opacity:.8}50%{r:10;opacity:1}}.breath-labels{text-align:center;flex-direction:column;align-items:center;gap:.5rem;margin-top:1.5rem;display:flex}.phase-label{text-transform:capitalize;color:var(--accent-bright);text-shadow:0 0 20px #14b8a680;transition:color var(--transition);font-size:1.5rem;font-weight:600}.phase-label[data-phase=inhale]{color:#5eead4}.phase-label[data-phase=exhale]{color:#2dd4bf}.phase-label[data-phase=hold]{color:var(--fg-muted)}.bpm-label{color:var(--fg-muted);font-variant-numeric:tabular-nums;font-size:1rem}.connection-badge{background:var(--card);border:1px solid var(--border);box-shadow:0 4px 20px var(--shadow);border-radius:999px;align-items:center;gap:.5rem;padding:.5rem 1rem;font-size:.85rem;font-weight:500;display:flex;position:absolute;bottom:1rem;left:50%;transform:translate(-50%)}.connection-badge[hidden]{display:none}.badge-dot{background:var(--warning);width:8px;height:8px;box-shadow:0 0 10px var(--warning);border-radius:50%;animation:1.5s ease-in-out infinite dot-pulse}.badge-dot.connected{background:var(--success);box-shadow:0 0 15px var(--success);animation:none}.status-panel{background:var(--bg-elevated);border-top:1px solid var(--border);flex-direction:column;align-items:center;gap:.25rem;padding:1rem;display:flex}.status-row{align-items:center;gap:.5rem;font-size:.9rem;display:flex}.status-dot{background:var(--border);width:10px;height:10px;transition:all var(--transition);border-radius:50%;box-shadow:0 0 #0000}.status-dot.connected{background:var(--success);box-shadow:0 0 15px var(--success)}.status-dot.connecting{background:var(--accent);box-shadow:0 0 10px var(--accent);animation:1s ease-in-out infinite dot-pulse}.status-dot.waiting{background:var(--warning);box-shadow:0 0 10px var(--warning);animation:1.5s ease-in-out infinite dot-pulse}@keyframes dot-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(1.2)}}.status-hint{color:var(--fg-muted);text-align:center;max-width:90%;margin:0;font-size:.8rem}.pair-dialog{border-radius:var(--radius);background:var(--card);box-shadow:0 20px 60px var(--shadow);border:none;width:360px;max-width:90vw;padding:0}.pair-dialog::backdrop{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:#000c}.pair-dialog-content{flex-direction:column;gap:0;display:flex}.pair-dialog-header{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;padding:1rem 1.25rem;display:flex}.pair-dialog-header h2{margin:0;font-size:1.1rem;font-weight:600}.dialog-close{width:32px;height:32px;color:var(--fg-muted);cursor:pointer;border-radius:var(--radius-sm);transition:all var(--transition);background:0 0;border:none;font-size:1.5rem;line-height:1}.dialog-close:hover{background:var(--bg);color:var(--fg)}.pair-dialog-body{text-align:center;flex-direction:column;align-items:center;gap:1rem;padding:1.5rem;display:flex}.pair-instruction{color:var(--fg-muted);margin:0;font-size:.9rem}.qr-container{border-radius:var(--radius);box-shadow:0 4px 20px var(--shadow);background:#fff;padding:1rem}#qr-canvas{display:block}.pair-hint{color:var(--fg-muted);margin:0;font-size:.8rem}.pair-status{min-height:1.25rem;color:var(--accent-bright);font-size:.85rem}.pair-dialog-footer{border-top:1px solid var(--border);justify-content:flex-end;padding:1rem 1.25rem;display:flex}.name-dialog form{text-align:center;flex-direction:column;align-items:center;gap:1rem;padding:1.5rem;display:flex}.name-dialog h2{letter-spacing:.02em;margin:0;font-size:1.4rem;font-weight:600}.name-dialog form p{color:var(--fg-muted);margin:0;font-size:.9rem}.name-dialog label{flex-direction:column;align-items:flex-start;gap:.4rem;width:100%;display:flex}.name-dialog label span{letter-spacing:.08em;text-transform:uppercase;color:var(--fg-muted);font-size:.75rem;font-weight:600}.name-dialog input{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);width:100%;color:var(--fg);text-align:center;padding:.8rem 1rem;font-family:inherit;font-size:1.05rem}.name-status{min-height:1.25rem;color:var(--fg-muted);margin:0;font-size:.9rem}.name-status.maker-verdict{color:var(--accent-bright);letter-spacing:.04em;text-shadow:0 0 16px #14b8a680;font-weight:700}.name-dialog{border-radius:var(--radius);background:var(--card);box-shadow:0 20px 60px var(--shadow);border:none;width:360px;max-width:90vw;padding:0}.name-dialog::backdrop,.request-dialog::backdrop{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:#000c}.name-dialog form{flex-direction:column;gap:1rem;padding:1.5rem;display:flex}.name-dialog h2,.request-dialog h2{margin:0;font-size:1.1rem;font-weight:600}.name-dialog p{color:var(--fg-muted);margin:0;font-size:.9rem}.name-dialog label{color:var(--fg-muted);flex-direction:column;gap:.5rem;font-size:.85rem;display:flex}.name-dialog input{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--fg);padding:.875rem 1rem;font-family:inherit;font-size:1rem}.name-dialog input:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 2px #14b8a633}.request-dialog{border-radius:var(--radius);background:var(--card);box-shadow:0 20px 60px var(--shadow);border:none;flex-direction:column;gap:.75rem;width:420px;max-width:90vw;padding:1.5rem;display:flex}.request-dialog section{border:1px solid var(--border);border-radius:var(--radius-sm);flex-direction:column;gap:.75rem;padding:1rem;display:flex}.request-dialog section p{color:var(--fg);margin:0;font-size:.95rem}.request-dialog section div{gap:.5rem;display:flex}.request-dialog button{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--fg);cursor:pointer;transition:all var(--transition);padding:.625rem 1rem;font-family:inherit}.request-dialog button:hover{border-color:var(--accent);color:var(--accent)}.button{border-radius:var(--radius-sm);cursor:pointer;transition:all var(--transition);border:1px solid #0000;justify-content:center;align-items:center;padding:.75rem 1.5rem;font-size:.9rem;font-weight:600;text-decoration:none;display:inline-flex}.button.primary{background:var(--accent);color:var(--bg);border-color:var(--accent)}.button.primary:hover:not(:disabled){background:var(--accent-bright)}.button.ghost{color:var(--fg);border-color:var(--border);background:0 0}.button.ghost:hover:not(:disabled){border-color:var(--accent);color:var(--accent)}.button:disabled{opacity:.5;cursor:not-allowed}.button:focus-visible{outline:2px solid var(--focus);outline-offset:2px}@media (width<=480px){.app-header{flex-wrap:wrap}.app-header h1{text-align:center;order:3;width:100%;margin-top:.5rem}.breath-svg{max-width:320px}.phase-label{font-size:1.25rem}}
