:root{color-scheme:light;--ink:#203b34;--muted:#52675f;--paper:#f7f6ef;--white:#fffefa;--line:#d7dfd4;--green:#193d36;--accent:#dceabe;--red:#8b2929;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:18px}
*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:var(--paper);color:var(--ink)}.shell{max-width:880px;margin:auto;padding:30px 28px;padding-bottom:max(30px,env(safe-area-inset-bottom))}header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:16px;border-bottom:1px solid var(--line)}header a{color:var(--ink);font-size:21px;font-weight:700;text-decoration:none}.mark{background:var(--green);color:white;border-radius:10px;display:inline-block;padding:5px 11px;margin-right:8px}.device,.eyebrow{font-size:12px;letter-spacing:1.6px;font-weight:700;color:var(--muted)}.save-line{display:flex;align-items:center;gap:12px;margin:13px 0 26px;font-size:14px;color:var(--muted);min-height:26px}.save-line button{font-size:14px;min-height:40px;padding:6px 12px}h1{font-size:38px;line-height:1.15;letter-spacing:-1.1px;margin:14px 0 16px}h2{font-size:26px;line-height:1.25;margin:12px 0 18px}p{line-height:1.55}p.help,.subtle{color:var(--muted)}.intro{max-width:600px}.card{border:1px solid var(--line);border-radius:20px;background:var(--white);padding:28px;margin:20px 0;box-shadow:0 6px 20px #183c3405}.actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:22px}button,.file-button{font:inherit;border-radius:12px;border:1px solid var(--line);background:white;color:var(--ink);padding:13px 20px;min-height:52px;cursor:pointer;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:7px}button:hover,.file-button:hover{background:#eef2e7}button.primary{background:var(--green);border-color:var(--green);color:white}button.primary:hover{background:#2e574b}button:disabled{opacity:.5;cursor:default}.quiet{border-color:transparent;background:transparent}.choice{display:block;text-align:left;width:100%;margin:9px 0;justify-content:flex-start}.choice.selected{border:2px solid var(--green);background:#edf3e4}.choice.selected:before{content:'✓';margin-right:6px}.scale{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.scale .choice{margin:0;text-align:center;justify-content:center}input,textarea,select{font:inherit;font-size:19px;display:block;width:100%;border:1px solid #91a297;border-radius:12px;background:white;color:var(--ink);padding:16px;margin-top:10px;min-height:56px}textarea{resize:vertical;min-height:128px;line-height:1.45}input[type=number]{max-width:340px}input[type=checkbox]{width:24px;min-height:24px;margin:0}input[type=file]{font-size:16px}input:focus,textarea:focus,button:focus-visible,a:focus-visible{outline:3px solid #739b58;outline-offset:3px}.progress{margin:0 0 22px}.stages{display:flex;gap:12px;justify-content:space-between;font-size:13px;font-weight:600;color:var(--muted);margin-bottom:12px}.stages .current{color:var(--green);text-decoration:underline;text-underline-offset:5px}progress{width:100%;height:8px;appearance:none;display:block;border:0;border-radius:5px;overflow:hidden;background:var(--line)}progress::-webkit-progress-bar{background:var(--line)}progress::-webkit-progress-value{background:var(--green)}progress::-moz-progress-bar{background:var(--green)}.count{font-size:13px;color:var(--muted);margin-top:9px}.question-card{padding:30px}.question-card h1{font-size:31px;letter-spacing:-.6px}.question-nav{display:flex;flex-wrap:wrap;gap:10px;margin-top:30px;border-top:1px solid var(--line);padding-top:24px}.question-nav .next{margin-left:auto}.question-nav .exit{font-size:15px;padding:10px 12px}details{margin:18px 0;background:#eff3e8;padding:16px;border-radius:12px;font-size:16px;line-height:1.6}summary{font-weight:600;cursor:pointer}details ul{padding-left:22px}a{color:#235447;overflow-wrap:anywhere}.exercise-meta{font-size:14px;font-weight:600;color:var(--muted)}.results{max-height:360px;overflow-y:auto;margin-top:14px}.exercise-result{width:100%;display:block;text-align:left;margin-bottom:10px;padding:14px 16px}.exercise-result small{display:block;font-weight:400;line-height:1.45;margin-top:6px;color:var(--muted)}.selected-exercise{border-left:4px solid var(--green);padding:14px 16px;background:#edf3e4;border-radius:6px;margin:15px 0}.history-row{padding:20px 0;border-bottom:1px solid var(--line)}.history-row:last-child{border:0}.history-row h3{margin:6px 0;font-size:21px}.history-row p{margin:8px 0}.history-row .actions{margin-top:12px}.tag{font-size:13px;background:var(--accent);padding:5px 9px;border-radius:7px;display:inline-block}.tag.open{background:#f2e6c9}.notice{border-left:3px solid #7d9964;padding-left:15px;color:var(--muted);font-size:16px}.summary-text{white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit;font-size:16px;line-height:1.65;background:var(--white);border:1px solid var(--line);border-radius:16px;padding:24px}#message{background:#fff0ed;color:var(--red);border:1px solid #dca09a;padding:16px;margin:20px 0;border-radius:12px;line-height:1.5}.error{color:var(--red);font-size:16px}.checkbox-label{display:flex;gap:12px;align-items:center;font-size:16px;margin:20px 0}.summary-select{min-height:200px;font-size:16px}footer{font-size:13px;color:var(--muted);border-top:1px solid var(--line);margin-top:36px;padding-top:18px;display:flex;justify-content:space-between;gap:14px}.phone-address{font-size:16px;overflow-wrap:anywhere}.status-dirty{color:var(--red)}
@media(max-width:600px){.shell{padding:18px 16px}header a{font-size:18px}.device{font-size:10px;letter-spacing:.8px}.mark{padding:3px 8px;margin-right:4px}h1{font-size:32px}.card,.question-card{padding:22px 18px;border-radius:16px}.question-card h1{font-size:27px}.question-nav{gap:8px}.question-nav button{flex:1}.question-nav .next{margin-left:0;flex-basis:42%}.question-nav .exit{order:4;flex-basis:100%}.stages{font-size:11px;gap:7px}.actions button,.actions .file-button{flex-grow:1}.scale{grid-template-columns:repeat(3,1fr)}footer{display:block;line-height:1.6}footer span{display:block}input[type=number]{max-width:none}.summary-text{padding:18px;font-size:15px}}
/* Program builder */
.goal-line{font-size:17px;line-height:1.6;color:var(--ink)}.goal-line span{color:var(--muted);font-size:15px}.checkin{max-width:660px}.checkin label{display:block;font-weight:600;margin:24px 0 10px}.checkin label:first-child{margin-top:0}.input-unit{display:flex;align-items:center;gap:14px}.input-unit input{max-width:210px}.input-unit span{color:var(--muted)}.checkin select{max-width:100%;width:100%;font:inherit;min-height:52px;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--white);color:var(--ink)}.checkin #build{margin-top:30px}.session-meta{display:flex;gap:15px;flex-wrap:wrap;color:var(--muted);font-size:16px;margin:20px 0}.session-meta strong{color:var(--ink)}#progress-count{font-size:16px;color:var(--muted);margin:25px 0}.movement-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px}.movement-heading h2{margin:0}.movement-heading span{white-space:nowrap}.prescription{font-size:19px;margin:18px 0 8px}.effort{font-size:16px;color:var(--muted);line-height:1.5}.phase-heading{font-size:17px;color:var(--muted);margin:28px 0 14px}.sets{display:grid;gap:10px;margin:20px 0}.set-actions{display:flex;gap:8px;flex-wrap:wrap}.set-actions button{font-size:15px;padding:10px 14px;min-height:44px}.done[aria-pressed=true]{background:#dcebdc;border-color:#789976;color:#193d36}.skip[aria-pressed=true]{background:#eee9df;color:var(--muted)}.note-label{display:block;font-size:16px;margin:18px 0 10px}.note-label span{font-size:13px;color:var(--muted);margin-left:6px}.movement-note{min-height:98px;font-size:16px;resize:vertical}.movement-guide{margin-top:18px;font-size:15px;line-height:1.65}.movement-guide summary,.planner-details summary,details summary{cursor:pointer;padding:10px 0;min-height:44px}.movement-guide p,.planner-details p{font-size:15px}.actual{display:flex;gap:14px;flex-wrap:wrap;padding:12px 0}.actual[hidden]{display:none}.actual label{font-size:13px;max-width:180px}.actual input{margin-top:7px;min-height:44px;font-size:16px;padding:9px}.planner-details{font-size:15px;color:var(--muted);line-height:1.65;margin-top:25px}.legacy-fields{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}.set-row{padding-bottom:7px;border-bottom:1px solid var(--line)}
@media(max-width:600px){.movement-heading h2{font-size:22px}.movement-heading{align-items:start}.movement-heading span{font-size:12px}.note-label span{display:block;margin:5px 0 0}.session-meta{gap:8px;font-size:14px}.checkin #build{width:100%}.actual label{max-width:45%;flex:1}.prescription{font-size:17px}}

/* Dated program calendar */
.schedule-panel { border:2px solid #357766; }
.calendar-row {padding:18px 0;border-bottom:1px solid #d9e1dd;}
.calendar-row h3 {margin:6px 0 12px;}
.movement-review {width:100%;margin:8px 0 16px;}

/* Sync and performance controls */
.sync-panel {border:1px solid #c9d7d2;padding:12px 16px;border-radius:12px;margin:14px 0;background:#f4f8f5;}
#sync-status p {font-size:.85rem;margin:6px 0;overflow-wrap:anywhere;}
#journal-nav {gap:8px;flex-wrap:wrap;}
.table-wrap {overflow-x:auto;}
table {border-collapse:collapse;width:100%;}th,td {text-align:left;vertical-align:top;padding:12px 8px;border-bottom:1px solid #d4ded8;}
pre {white-space:pre-wrap;overflow-wrap:anywhere;font-size:.8rem;}
canvas {max-width:100%;}button {touch-action:manipulation;}
.actual {gap:12px;}
@media(max-width:600px){.actual {display:grid;grid-template-columns:1fr;}#journal-nav button{flex:1;min-width:130px;}td{min-width:120px;}.set-actions{flex-wrap:wrap;}}
/* Keep record safety visible while scrolling a workout. */
.phone-status{position:sticky;top:0;z-index:20;background:#faf9f6;border:1px solid #b7c6bc;border-radius:10px;padding:8px 12px;display:grid;gap:4px;font-size:.78rem;box-shadow:0 3px 8px #193d3615}.phone-status strong{font-size:.95rem}.phone-status .actions{margin:0;gap:6px}.phone-status button{padding:6px 9px;font-size:.78rem}.phone-status [hidden]{display:none}.phone-status #offline-status{color:#42604f}dialog{width:min(620px,calc(100vw - 24px));max-height:85vh;overflow:auto;border:1px solid #b7c6bc;border-radius:14px;background:#faf9f6;color:#193d36;padding:24px}dialog::backdrop{background:#122d2466}dialog h1{font-size:1.6rem}dialog h2{font-size:1.05rem;margin-top:24px}dialog button{margin:4px}.phone-status #phone-save-detail{overflow-wrap:anywhere}@media(max-width:450px){.phone-status{top:env(safe-area-inset-top,0px)}.phone-status .actions{flex-wrap:wrap}dialog{padding:16px}}

.phone-status .actions{display:flex;flex-wrap:nowrap}.phone-status .actions button{width:auto;flex:0 1 auto;min-width:0;white-space:nowrap}
