:root{color-scheme:dark;--bg:#091625;--panel:#142a40;--panel2:#18334c;--line:#294057;--text:#f4f8fc;--muted:#91a9bf;--blue:#a5deff;--blue2:#6fc6f5}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#06111d;color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body{min-height:100dvh}.app-shell{height:100dvh;max-width:560px;margin:auto;background:var(--bg);display:flex;flex-direction:column;overflow:hidden;padding-top:env(safe-area-inset-top)}
.topbar{height:66px;flex:0 0 66px;display:flex;align-items:center;gap:11px;padding:0 18px;border-bottom:1px solid var(--line)}
.brand-mark{width:36px;height:36px;border-radius:11px;background:#183650;color:var(--blue);display:grid;place-items:center;font-weight:800;font-size:21px}
.brand{font-weight:800;letter-spacing:2px;font-size:17px}.brand-sub{font-size:9px;letter-spacing:1.5px;color:var(--muted);margin-top:2px}.top-spacer{flex:1}.avatar{color:var(--blue);font-size:23px}
.view{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:22px 17px 24px;scrollbar-width:thin}
.tabbar{height:calc(72px + env(safe-area-inset-bottom));flex:0 0 calc(72px + env(safe-area-inset-bottom));padding:7px 5px calc(7px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(5,1fr);background:#12263a;border-top:1px solid var(--line)}
.tab{position:relative;border:0;background:none;color:#71869a;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;padding:2px 0 0;transition:color .18s ease}.tab-icon{width:23px;height:23px;display:grid;place-items:center}.tab-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}.tab small{font-size:10px;font-weight:500;letter-spacing:.05px;white-space:nowrap}.tab.active{color:#b8e4ff}.tab.active:before{content:"";position:absolute;top:-7px;width:24px;height:2px;border-radius:2px;background:#8ed4fb;opacity:.9}.tab.active small{font-weight:650}
h1{font-size:27px;line-height:1.15;margin:0 0 7px}h2{font-size:18px;margin:22px 0 11px}h3{font-size:16px;margin:0}.subtitle,.muted,.hint{color:var(--muted)}.subtitle{font-size:13px;margin-bottom:20px}.hint{font-size:12px;line-height:1.45}
.card{background:var(--panel);border:1px solid rgba(255,255,255,.025);border-radius:16px;padding:16px;margin:12px 0}.hero{background:linear-gradient(135deg,#173650,#142a40)}.stats{display:grid;grid-template-columns:1fr 1fr;gap:14px}.metric{font-size:28px;font-weight:750;color:var(--blue);margin:4px 0}.metric-label{font-size:12px;color:var(--muted)}
.row{display:flex;align-items:center;justify-content:space-between;gap:12px}.divider{height:1px;background:var(--line);margin:12px 0}
button,.button{font:inherit}.primary{width:100%;border:0;border-radius:12px;padding:14px 16px;background:#8ed4fb;color:#082033;font-weight:750;margin:8px 0}.secondary{border:1px solid #34536d;background:#19344c;color:var(--blue);border-radius:11px;padding:10px 13px}.text-button{border:0;background:none;color:var(--blue);padding:7px}
input,select,textarea{width:100%;background:#0e2133;border:1px solid #34506a;border-radius:10px;padding:12px;color:var(--text);font:inherit}label{display:block;color:#b6c9d9;font-size:13px;margin:13px 0 7px}
.jump-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:12px 0 20px}.jump-choice{padding:13px 5px;border:1px solid #294057;background:#192d42;color:white;border-radius:12px;font-weight:750}.jump-choice.selected{background:#285271;border-color:#78c9f4;color:var(--blue)}
.attempt{padding:15px;margin:10px 0;background:var(--panel);border-radius:14px}.counter{display:flex;align-items:center;gap:15px}.counter button{width:34px;height:34px;border-radius:50%;border:1px solid #47718f;background:#1b3b55;color:var(--blue);font-size:20px}.counter strong{min-width:22px;text-align:center;font-size:21px}
.segment{display:flex;gap:5px;padding:4px;background:#0e2133;border-radius:12px}.segment button{flex:1;border:0;border-radius:9px;background:none;color:var(--muted);padding:10px}.segment button.active{background:#285271;color:var(--blue)}
.list-item{padding:14px;background:var(--panel);border-radius:13px;margin:9px 0}.pill{font-size:10px;color:var(--blue);background:#24445e;padding:5px 8px;border-radius:20px}
.empty{padding:20px;text-align:center;color:var(--muted);background:var(--panel);border-radius:14px}
.chart-placeholder{height:120px;border-radius:12px;background:linear-gradient(180deg,#18334c,#12263a);display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:12px}
@media(min-width:560px){.app-shell{border-left:1px solid #1b3044;border-right:1px solid #1b3044}}

/* Live training mode */
.live-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin:14px 0 22px}.live-jump{min-height:82px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;font-size:19px;border-radius:15px;background:linear-gradient(160deg,#1a3852,#142a40)}.live-jump small{font-size:11px;font-weight:500;color:#9bb4c8}.result-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}.result-actions button{min-height:56px;border-radius:12px;font-weight:700;font-size:14px}.result-success{border:1px solid #3b8b78;background:#173f3a;color:#a8f0d8}.result-fail{border:1px solid #8b5360;background:#432b39;color:#ffc0ca}.attempt-row{padding:11px 13px;margin:7px 0;background:#12263a;border-radius:10px}.result-label-ok{color:#9de5ca;font-size:13px}.result-label-fail{color:#ffb5c0;font-size:13px}.live-tools{gap:10px;margin:22px 0 10px}.live-tools button{flex:1}.finish-live{margin:0}.secondary:disabled,.primary:disabled{opacity:.4}

/* Training details and live progress analytics */
.training-card{display:block;width:100%;text-align:left;color:var(--text);cursor:pointer}
.training-open{display:flex;justify-content:space-between;align-items:center;margin-top:12px;padding-top:10px;border-top:1px solid var(--line);color:var(--blue);font-size:12px}
.training-open span{font-size:20px;line-height:12px}
.detail-counts{display:flex;flex-wrap:wrap;gap:8px 16px;margin:12px 0;color:var(--muted);font-size:12px}
.detail-counts b{color:var(--text)}.jump-rate{color:var(--blue)}
.detail-track{height:6px;background:#0b1c2c;border-radius:10px;overflow:hidden}.detail-track span{display:block;height:100%;background:#8ed4fb;border-radius:10px}
.progress-chart{margin-top:14px;padding:8px 2px 0;background:linear-gradient(180deg,#18334c,#12263a);border-radius:12px}
.progress-chart svg{display:block;width:100%;height:auto;overflow:visible}
.progress-chart line{stroke:#36516a;stroke-width:1;stroke-dasharray:3 4}
.progress-chart text{fill:#91a9bf;font-size:10px;font-family:inherit}
.progress-chart .chart-line{fill:none;stroke:#8ed4fb;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.progress-chart circle{fill:#a5deff;stroke:#142a40;stroke-width:2}
.progress-chart .point-label{fill:#c5eaff;font-size:10px;font-weight:700}
/* Program constructor */
.feature-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:12px 0}.feature-grid label{display:flex;align-items:center;gap:8px;margin:0;padding:10px;background:#142a40;border:1px solid #294057;border-radius:10px;font-size:12px;color:#d9e8f4}.feature-grid input{width:17px;height:17px;accent-color:#8ed4fb;margin:0}.element-types{margin:10px 0 15px}.goe-picker{display:grid;grid-template-columns:repeat(6,1fr);gap:3px}.goe-picker button{padding:9px 0}.score-preview{display:flex;flex-direction:column;gap:4px;padding:14px;margin:14px 0;background:#1a3852;border:1px solid #315675;border-radius:12px}.score-preview span,.score-preview small{color:#a7bfd2;font-size:12px}.score-preview strong{font-size:27px;color:#b8e4ff}.program-element{padding:13px;margin:9px 0;background:#142a40;border:1px solid #294057;border-radius:12px}.program-element .hint{margin-top:4px}.element-types button{font-size:12px;padding:10px 5px}
.combo-builder{margin:14px 0;padding:14px;border:1px solid var(--line,#31465e);border-radius:16px;background:rgba(120,170,210,.06)}
.combo-part{margin:12px 0;padding:12px;border-radius:14px;background:rgba(120,170,210,.07)}
.combo-part .jump-grid{margin:10px 0}
.combo-part label{display:block;margin:10px 0 6px}
.combo-builder>.secondary{width:100%;margin-top:8px}

/* Results analytics: tappable chart cards and full-size charts */
.result-chart-card{display:block;width:100%;text-align:left;color:var(--text);border:1px solid #294057;background:var(--panel);border-radius:16px;padding:15px;margin:14px 0;cursor:pointer;font:inherit}
.result-chart-card h2{margin:0 0 10px}.result-chevron{font-size:26px;color:var(--blue)}
.result-chart{background:linear-gradient(180deg,#1b354e,#12263a);border-radius:12px;padding:8px 4px;margin:8px 0 10px}
.result-chart svg{display:block;width:100%;height:auto;overflow:visible}
.result-chart line{stroke:#35526b;stroke-width:1;stroke-dasharray:3 4}
.result-chart text{fill:#9cb4c9;font-size:10px;font-family:inherit}
.result-chart .chart-line{fill:none;stroke:#8ed4fb;stroke-width:2.6;stroke-linejoin:round;stroke-linecap:round}
.result-chart circle{fill:#b0e5ff;stroke:#19344c;stroke-width:2}
.result-chart .point-label{fill:#d5efff;font-size:10px;font-weight:700}
.result-empty{height:116px;display:flex;align-items:center;justify-content:center;background:#12263a;border-radius:12px;color:var(--muted);font-size:12px}
.result-period{margin:10px 0 18px}

/* AXEL v1.9: interactive record history and saved protocol */
.record-history-card{display:block;width:100%;text-align:left;color:var(--text);cursor:pointer;font:inherit;margin:12px 0}.record-history-card .row{align-items:center}.record-score{font-size:19px;white-space:nowrap}.record-hint{margin-top:11px;padding-top:9px;border-top:1px solid var(--line);font-size:12px;color:var(--blue);display:flex;justify-content:space-between}.record-hint span{font-size:19px;line-height:12px}.record-total{font-size:42px;font-weight:800;color:var(--blue);margin:12px 0 3px}.protocol-head{display:flex;justify-content:space-between;color:var(--muted);font-size:12px;margin-bottom:8px}.protocol-row{padding:12px 0;border-top:1px solid var(--line)}.protocol-top{display:flex;align-items:flex-start;gap:10px}.protocol-number{color:var(--muted);min-width:18px}.protocol-name{flex:1;min-width:0;overflow-wrap:anywhere}.protocol-top strong{color:var(--blue);font-size:17px}.protocol-metrics{display:flex;flex-wrap:wrap;gap:7px 14px;margin:9px 0 0 28px;color:var(--muted);font-size:11px}.protocol-metrics b{color:var(--text)}.protocol-summary-line{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:10px 0}.protocol-summary-line span{color:var(--muted)}.protocol-grand{font-size:19px}.protocol-grand span,.protocol-grand b{color:var(--blue)}
