:root{color-scheme:dark;--bg: #0b1220;--surface: #121c2e;--surface-elevated: #18263d;--border: #233554;--text: #f1f5f9;--text-muted: #94a3b8;--accent: #38bdf8;--accent-strong: #0284c7;--running: #10b981;--warning: #f59e0b;--danger: #ef4444;--radius: 16px}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body,#root{margin:0;padding:0;height:100%;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,Inter,Segoe UI,Roboto,sans-serif;overscroll-behavior:none;user-select:none;-webkit-user-select:none}.app-shell{display:flex;flex-direction:column;height:100dvh;max-width:520px;margin:0 auto;padding:max(10px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom));gap:10px}.top-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0}.brand{display:flex;align-items:center;gap:7px;font-weight:700;font-size:.95rem;letter-spacing:-.01em}.brand-dot{width:10px;height:10px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#f87171,#dc2626);box-shadow:0 0 8px #ef4444b3}.mode-toggle{display:flex;background:var(--surface);border:1px solid var(--border);border-radius:999px;padding:2px}.mode-btn{border:none;background:transparent;color:var(--text-muted);font-size:.78rem;font-weight:600;padding:5px 10px;border-radius:999px;cursor:pointer;transition:background .15s,color .15s}.mode-btn.active{background:var(--accent-strong);color:#fff}.top-actions{display:flex;align-items:center;gap:6px}.icon-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--text-muted);cursor:pointer}.icon-btn:active{transform:scale(.95)}.icon-btn.active-lock{color:#fbbf24;border-color:#fbbf2459}.history-btn .badge{position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--accent);color:#0b1220;font-size:.68rem;font-weight:800;display:inline-flex;align-items:center;justify-content:center}.prediction-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:10px 12px 6px;flex-shrink:0;transition:border-color .2s}.prediction-card.tone-in-range{border-color:#38bdf880}.prediction-card.tone-through{border-color:#f97316a6}.prediction-card.tone-short{border-color:#94a3b880}.prediction-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:4px}.prediction-eyebrow{display:block;font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--text-muted)}.prediction-main{display:flex;align-items:baseline;gap:10px;margin-top:2px}.prediction-value{font-size:1.9rem;font-weight:800;line-height:1;font-variant-numeric:tabular-nums;color:var(--accent)}.tone-through .prediction-value{color:#fb923c}.tone-short .prediction-value,.tone-idle .prediction-value,.tone-timing .prediction-value{color:var(--text-muted)}.prediction-label{font-size:.95rem;font-weight:600;color:var(--text)}.cal-pill{border:1px solid var(--border);background:var(--surface-elevated);color:var(--text-muted);font-size:.72rem;font-weight:600;padding:4px 9px;border-radius:999px;cursor:pointer;white-space:nowrap}.cal-pill.status-calibrated{color:#34d399;border-color:#34d39959}.cal-pill.status-calibrating{color:#fbbf24;border-color:#fbbf2459}.sheet-viz{width:100%}.sheet-svg{display:block;width:100%;height:auto;max-height:82px}.stone-marker{transition:transform .08s linear}.timer-pad{position:relative;flex:1 1 auto;min-height:165px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:22px;border:2px solid var(--border);background:radial-gradient(circle at 50% 35%,#162540,#0f192b);cursor:pointer;touch-action:manipulation;transition:border-color .15s,background .15s,box-shadow .15s,transform .06s;outline:none}.timer-pad:active{transform:scale(.992)}.timer-pad.state-running{border-color:var(--running);background:radial-gradient(circle at 50% 35%,#10b98138,#0d1f24);box-shadow:0 0 32px #10b98138,inset 0 0 24px #10b98114}.timer-pad.state-stopped{border-color:#38bdf8a6;background:radial-gradient(circle at 50% 35%,#0284c733,#0f1c30)}.reset-chip{position:absolute;top:12px;right:12px;display:inline-flex;align-items:center;gap:5px;padding:6px 11px;border-radius:999px;border:1px solid rgba(148,163,184,.3);background:#0f172abf;color:var(--text-muted);font-size:.76rem;font-weight:600;cursor:pointer}.reset-chip:active{transform:scale(.95)}.timer-digits{font-size:clamp(3.6rem,15vw,5.2rem);font-weight:800;letter-spacing:-.03em;line-height:1;font-variant-numeric:tabular-nums;color:#fff}.timer-unit{font-size:.42em;font-weight:600;color:var(--text-muted);margin-left:3px}.timer-cta{margin-top:14px;padding:6px 16px;border-radius:999px;font-size:.82rem;font-weight:800;letter-spacing:.1em;background:#38bdf824;color:var(--accent)}.state-running .timer-cta{background:#10b98138;color:#34d399}.timer-subhint{margin-top:8px;font-size:.78rem;color:var(--text-muted)}.zone-panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:10px;flex-shrink:0;transition:opacity .15s}.zone-panel.inactive{opacity:.6}.zone-panel-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.zone-panel-title{font-size:.78rem;font-weight:700;color:var(--text)}.zone-panel-hint{font-size:.72rem;color:var(--text-muted)}.zone-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}.zone-btn{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 1px;border-radius:11px;border:1.5px solid var(--border);background:var(--surface-elevated);color:var(--text);cursor:pointer;touch-action:manipulation;transition:transform .08s,border-color .15s,background .15s}.zone-btn:disabled{cursor:not-allowed}.zone-btn:not(:disabled):active{transform:scale(.94)}.zone-btn.group-short{border-color:#94a3b873;background:#64748b29}.zone-btn.group-guard{border-color:#94a3b847}.zone-btn.group-front-house{border-color:#38bdf84d}.zone-btn.group-button{border-color:#ef444480;background:#ef44441f}.zone-btn.group-back-house{border-color:#6366f159}.zone-btn.group-through{border-color:#f973168c;background:#f9731624}.zone-btn.predicted{box-shadow:0 0 0 2px #38bdf8a6}.zone-btn.selected{background:#fbbf24;border-color:#fde68a;color:#0b1220;box-shadow:0 0 14px #fbbf2466}.zone-num{font-size:1.15rem;font-weight:800;line-height:1.1}.zone-sub{font-size:.62rem;font-weight:600;opacity:.8;margin-top:2px;white-space:nowrap}.zone-actions{margin-top:8px}.log-btn{width:100%;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 14px;border-radius:12px;border:none;background:var(--accent-strong);color:#fff;font-size:.9rem;font-weight:700;cursor:pointer;transition:opacity .15s,transform .08s}.log-btn:disabled{background:var(--surface-elevated);color:var(--text-muted);cursor:not-allowed}.log-btn:not(:disabled):active{transform:scale(.985)}.toast{position:fixed;bottom:max(20px,env(safe-area-inset-bottom));left:50%;transform:translate(-50%);background:#10b981;color:#052e16;font-weight:700;font-size:.85rem;padding:9px 16px;border-radius:999px;box-shadow:0 8px 24px #00000073;z-index:60;white-space:nowrap}.drawer-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#020617bf;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:flex-end;justify-content:center;z-index:50}.drawer-sheet{width:100%;max-width:520px;max-height:84dvh;overflow-y:auto;background:var(--surface);border-top:1px solid var(--border);border-radius:22px 22px 0 0;padding:16px 16px max(20px,env(safe-area-inset-bottom))}.drawer-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.drawer-header h2{margin:0;font-size:1.1rem}.drawer-subtitle{margin:3px 0 0;font-size:.78rem;color:var(--text-muted)}.cal-card{background:var(--bg);border:1px solid var(--border);border-radius:14px;padding:12px;margin-bottom:16px}.cal-card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.cal-badge{font-size:.74rem;font-weight:700;padding:3px 9px;border-radius:999px;background:var(--surface-elevated);color:var(--text-muted)}.cal-badge.status-calibrated{background:#10b9812e;color:#34d399}.cal-badge.status-calibrating{background:#fbbf242e;color:#fbbf24}.cal-mae{font-size:.75rem;color:var(--text-muted)}.cal-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:10px}.cal-stat{background:var(--surface);border-radius:10px;padding:8px 10px}.cal-stat-label{display:block;font-size:.7rem;color:var(--text-muted)}.cal-stat-value{font-size:1.25rem;font-weight:800;font-variant-numeric:tabular-nums}.ref-table{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.ref-cell{background:var(--surface);border-radius:8px;padding:6px 4px;text-align:center}.ref-zone{display:block;font-size:.64rem;color:var(--text-muted)}.ref-time{font-size:.85rem;font-weight:700;font-variant-numeric:tabular-nums;color:var(--accent)}.history-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.history-header h3{margin:0;font-size:.9rem}.clear-btn{display:inline-flex;align-items:center;gap:5px;border:1px solid rgba(239,68,68,.35);background:#ef44441f;color:#fca5a5;font-size:.75rem;font-weight:600;padding:5px 10px;border-radius:8px;cursor:pointer}.empty-history{text-align:center;padding:24px 12px;font-size:.84rem;color:var(--text-muted);line-height:1.5}.history-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}.history-item{display:grid;grid-template-columns:32px 66px 1fr auto 32px;align-items:center;gap:8px;padding:9px 10px;border-radius:10px;background:var(--bg);border:1px solid var(--border);font-size:.82rem}.history-index{color:var(--text-muted);font-size:.74rem;font-weight:600}.history-time{font-weight:800;font-variant-numeric:tabular-nums;color:#fff}.history-zone{display:flex;flex-direction:column}.history-zone-main{font-weight:700}.history-zone-sub{font-size:.7rem;color:var(--text-muted)}.history-pred{text-align:right;font-size:.74rem;color:var(--text-muted);font-variant-numeric:tabular-nums}.history-delta{display:block;font-size:.68rem}.delete-throw-btn{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:8px;border:none;background:transparent;color:var(--text-muted);cursor:pointer}.delete-throw-btn:hover{color:#f87171;background:#ef44441f}
