:root{font-family:'DM Sans',sans-serif;color:#263326;background:#f5f6ef;--green:#304e36;--muted:#778074;--line:#e1e5d9;--lime:#dceda2}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #8eac53;outline-offset:2px}.app{max-width:840px;margin:auto;padding:34px 24px 18px}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--muted);font-weight:700;margin:0 0 9px}h1{font:800 36px 'Manrope',sans-serif;letter-spacing:-1.7px;margin:0}h1 span{color:#a3bb59}h2{font:800 24px 'Manrope',sans-serif;letter-spacing:-.7px;margin:0 0 7px}h3{font:700 17px 'Manrope',sans-serif;margin:0}p{line-height:1.5}.icon{border:1px solid var(--line);background:transparent;border-radius:50%;width:44px;height:44px;font-size:21px;color:var(--green)}.userbar{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:var(--muted);gap:10px}.segmented{display:flex;background:#e9edde;border-radius:12px;padding:4px;gap:3px}.segmented button{background:transparent;border:0;padding:10px 18px;border-radius:9px;color:#65705f;font-weight:600;min-height:42px}.segmented button.active{background:white;color:var(--green);box-shadow:0 2px 5px #25321d0b}.mainnav{display:flex;border-bottom:1px solid var(--line);margin:20px 0 0;gap:28px}.mainnav button{padding:15px 0;border:0;background:transparent;color:var(--muted);font-weight:600;border-bottom:3px solid transparent}.mainnav button.active{color:var(--green);border-color:var(--green)}.storage{font-size:11px;color:var(--muted);margin:12px 0 25px}.topline{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:22px}.sub{font-size:13px;color:var(--muted);margin:0}.dateinput{width:155px}input,select,textarea{border:1px solid var(--line);border-radius:10px;background:#fafbf7;padding:12px;color:#263326;max-width:100%;min-height:44px}label{display:block;font-size:12px;color:var(--muted);margin:10px 0 7px}textarea{width:100%;resize:vertical;min-height:65px}.card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px;margin-bottom:15px}.cardhead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.tag{font-size:10px;letter-spacing:1px;color:var(--muted);text-transform:uppercase}.previous{font-size:12px;background:#f4f6ec;border-radius:8px;padding:10px;color:#66705d}.sethead,.setrow{display:grid;grid-template-columns:40px 1fr 1fr 44px;gap:10px;align-items:center}.sethead{font-size:10px;color:var(--muted);letter-spacing:1px;text-transform:uppercase;margin:18px 0 8px}.setrow{margin-bottom:9px}.setrow input{width:100%;text-align:center}.setnum{width:30px;height:30px;background:#f1f4e9;display:grid;place-items:center;border-radius:50%;font-size:12px}.remove{border:0;background:transparent;color:#8b736b;min-height:44px;min-width:44px}.smallbtn{border:0;background:transparent;color:var(--green);font-weight:600;min-height:44px;padding:8px 0}.primary,.secondary,.danger{border:0;border-radius:12px;padding:14px 20px;font-weight:700;min-height:48px}.primary{background:var(--green);color:white}.secondary{background:#eaf0da;color:var(--green)}.danger{background:#f8e9e3;color:#a74630}.wide{width:100%}.addexercise{width:100%;border:1px dashed #b7c6a0;background:transparent;border-radius:14px;min-height:54px;color:var(--green);font-weight:600;margin:4px 0 18px}.savebar{display:flex;gap:10px;align-items:center}.savebar .primary{flex:1}.empty{text-align:center;padding:35px 18px}.empty .symbol{font-size:28px;width:64px;height:64px;margin:0 auto 15px;display:grid;place-items:center;border-radius:20px;background:#eff4df}.empty p{color:var(--muted);font-size:13px;margin:8px 0}.stats{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0}.stat{padding:20px;background:#eaf0db;border-radius:16px}.stat strong{font:800 34px 'Manrope',sans-serif;display:block;margin:8px 0 2px}.stat span{font-size:12px;color:#6b765f}.calendarhead{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.weekday{text-align:center;font-size:10px;color:var(--muted);padding-bottom:9px}.day{aspect-ratio:1;border:0;border-radius:12px;background:transparent;position:relative;font-size:13px;min-height:35px;color:#53604e}.day.trained{background:#e6efcd;font-weight:700;color:var(--green)}.day.trained:after{content:'';width:4px;height:4px;border-radius:50%;background:var(--green);position:absolute;bottom:5px;left:calc(50% - 2px)}.day.selected{background:var(--green);color:white}.day.selected:after{background:white}.legend{font-size:11px;color:var(--muted);margin:15px 0 0}.dot{display:inline-block;background:#bfd18c;border-radius:50%;width:7px;height:7px;margin-right:6px}.history{padding:12px 0;border-bottom:1px solid var(--line)}.history:last-child{border:0}.history p{font-size:13px;margin:6px 0;color:#6b765f}.exercise-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:20px}.exercise-grid .card{margin:0}.exercise-link{border:0;background:transparent;text-align:left;width:100%;padding:0;color:inherit;min-height:44px}.chart{width:100%;height:110px;display:block;margin:8px 0}.chart text{font-family:inherit;font-size:10px;fill:#7a8373}.metric{font-size:23px;font-weight:700;margin:12px 0 2px}.muted{color:var(--muted);font-size:12px}footer{text-align:center;color:#98a08f;font-size:11px;letter-spacing:.5px;margin:35px 0 10px}dialog{border:1px solid var(--line);border-radius:20px;padding:24px;width:440px;max-width:calc(100% - 28px);max-height:85vh;overflow:auto;color:inherit}dialog::backdrop{background:#20351c70}.dialoghead{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.dialoghead h2{font-size:21px}#dialog-body input,#dialog-body select{width:100%}#dialog-actions{display:flex;gap:9px;margin-top:18px}#dialog-actions button{flex:1}#dialog-error{color:#a74630;font-size:13px}#toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);background:var(--green);color:white;padding:12px 20px;border-radius:12px;font-size:13px;max-width:90%;display:none;z-index:5}.notice{background:#fff3df;border-radius:10px;padding:12px;color:#856236;font-size:12px}.settingsrow{padding:12px 0;border-bottom:1px solid var(--line)}@media(max-width:540px){.app{padding:24px 17px 16px}h1{font-size:32px}.eyebrow{font-size:9px}.card{padding:16px}.segmented button{padding:9px 14px}.exercise-grid{grid-template-columns:1fr}.topline{align-items:flex-start}h2{font-size:22px}.dateinput{width:145px;font-size:13px}.sethead,.setrow{gap:8px;grid-template-columns:30px 1fr 1fr 36px}.remove{min-width:36px}.day{border-radius:9px}}

.cloudbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:15px}.cloudbar .storage{margin:12px 0;font-size:11px}.cloudbar .smallbtn{font-size:12px;flex-shrink:0}

.import-confirm{display:flex;align-items:center;gap:10px;line-height:1.5;color:#263326}.import-confirm input{width:22px!important;min-height:22px;height:22px;flex-shrink:0}input[type=file]{font-size:13px}

/* Q's theme follows the stable profile ID; xb retains the original palette. */
:root[data-theme="black"]{color-scheme:dark;background:#101010;color:#f1f1f1;--green:#e4e4e4;--muted:#a5a5a5;--line:#353535;--lime:#dedede}
[data-theme="black"] h1 span{color:#aaa}
[data-theme="black"] .card,[data-theme="black"] dialog{background:#1a1a1a}
[data-theme="black"] input,[data-theme="black"] select,[data-theme="black"] textarea{background:#242424;color:#f1f1f1}
[data-theme="black"] .segmented{background:#252525}
[data-theme="black"] .segmented button{color:#aaa}
[data-theme="black"] .segmented button.active{background:#444;color:#fff;box-shadow:none}
[data-theme="black"] .primary,[data-theme="black"] #toast{background:#eee;color:#101010}
[data-theme="black"] .previous,[data-theme="black"] .setnum,[data-theme="black"] .empty .symbol,[data-theme="black"] .stat,[data-theme="black"] .secondary{background:#292929;color:#eee}
[data-theme="black"] .stat span,[data-theme="black"] .history p{color:#b8b8b8}
[data-theme="black"] .addexercise{border-color:#707070}
[data-theme="black"] .remove{color:#d4a99d}
[data-theme="black"] .day{color:#ccc}
[data-theme="black"] .day.trained{background:#383838;color:#fff}
[data-theme="black"] .day.selected{background:#eee;color:#101010}
[data-theme="black"] .day.selected:after{background:#101010}
[data-theme="black"] .dot{background:#ccc}
[data-theme="black"] .chart polyline{stroke:#ddd}
[data-theme="black"] .chart circle{fill:#ddd}
[data-theme="black"] .chart line{stroke:#454545}
[data-theme="black"] .chart text{fill:#b8b8b8}
[data-theme="black"] .danger{background:#482720;color:#ffd3c6}
[data-theme="black"] .notice{background:#3b3222;color:#f0d19a}
[data-theme="black"] #dialog-error{color:#ffb6a2}
[data-theme="black"] .import-confirm{color:#eee}
[data-theme="black"] footer{color:#999}
[data-theme="black"] dialog::backdrop{background:#0009}
[data-theme="black"] :is(button,input,select,textarea):focus-visible{outline-color:#ddd}

/* Soft sage accents for Q's dark theme. */
:root[data-theme="black"]{--green:#c5e6a5;--lime:#c5e6a5}
[data-theme="black"] h1 span{color:var(--lime)}
[data-theme="black"] .primary,[data-theme="black"] #toast{background:var(--lime);color:#172113}
[data-theme="black"] .segmented button.active{background:var(--lime);color:#172113}
[data-theme="black"] .day.trained{background:#293b23;color:var(--lime)}
[data-theme="black"] .day.selected{background:var(--lime);color:#172113}
[data-theme="black"] .day.selected:after{background:#172113}
[data-theme="black"] .dot{background:var(--lime)}
[data-theme="black"] .chart polyline{stroke:var(--lime)}
[data-theme="black"] .chart circle{fill:var(--lime)}
[data-theme="black"] .addexercise{border-color:#799269}
[data-theme="black"] :is(button,input,select,textarea):focus-visible{outline-color:var(--lime)}
