:root{font-family:'DM Sans',sans-serif;color:#1e2520;background:#f5f7f3;font-synthesis:none;text-rendering:optimizeLegibility;--ink:#1e2520;--muted:#778079;--green:#347b55;--lime:#d9f184;--line:#e9ede7}
*{box-sizing:border-box}html,body,#app{margin:0;min-height:100%;width:100%}body{background:#f5f7f3}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit}.app-shell{max-width:560px;min-height:100vh;margin:0 auto;background:#fbfcfa;padding-bottom:calc(82px + env(safe-area-inset-bottom));box-shadow:0 0 50px #27352a0b}.topbar{height:68px;display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:1px solid #f0f2ef}.brand{display:flex;align-items:center;gap:9px;color:var(--ink);font-family:Manrope,sans-serif;font-size:19px;font-weight:800;letter-spacing:-1px;text-decoration:none}.brand-light{font-weight:500;color:#818980}.brand-mark{height:29px;width:29px;border-radius:10px;background:var(--green);color:white;display:grid;place-items:center;font-size:21px;font-weight:800;letter-spacing:-2px}.avatar{width:36px;height:36px;border:0;border-radius:50%;background:#e9efe9;color:#386248;font-weight:700}.app-shell main{padding:28px 20px 14px}.welcome{padding:4px 4px 24px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:1.45px;color:#899189}.welcome h1{font:800 37px/1.06 Manrope,sans-serif;letter-spacing:-1.8px;margin:12px 0 8px}.welcome h1:focus{outline:none}.welcome h1 em{color:var(--green);font-style:normal}.welcome p{margin:0;color:#778079;font-size:14px}.workout-card{border:1px solid #e9eee8;border-radius:20px;background:white;padding:21px 18px 17px;box-shadow:0 8px 24px #30423208}.workout-heading{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:20px}.accent{color:#61896c}.workout-heading h2{font:800 23px/1.2 Manrope,sans-serif;letter-spacing:-.7px;margin:7px 0 6px}.workout-meta{display:flex;align-items:center;gap:10px;color:#858d86;font-size:12px}.meta-dot{color:#c3c9c1}.badge{display:flex;align-items:center;gap:5px;padding:8px 10px;border-radius:30px;background:#eff6e6;color:#658041;font-size:12px}.badge span{font-size:9px;font-weight:800;letter-spacing:.8px}.progress-copy{display:flex;justify-content:space-between;font-size:11px;font-weight:600;color:#747d75;margin-bottom:8px}.progress-copy span:last-child{color:#436c4f}.progress-track{height:6px;border-radius:9px;background:#edf1eb;overflow:hidden;margin-bottom:13px}.progress-track span{height:100%;display:block;border-radius:inherit;background:#79ad70;transition:width .2s ease}.exercise-list{border-top:1px solid var(--line)}.exercise-row{display:grid;grid-template-columns:39px 1fr 47px;align-items:center;min-height:64px;border-bottom:1px solid var(--line);position:relative;column-gap:10px;padding:7px 0}.check-button{width:30px;height:30px;border-radius:50%;border:1.5px solid #d7ded6;background:white;color:white;display:grid;place-items:center;font-size:16px;font-weight:700;cursor:pointer;justify-self:center;transition:all .15s}.check-button:hover{border-color:#78a881}.is-complete .check-button{background:#57966b;border-color:#57966b}.exercise-main{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0;text-align:left;border:0;background:transparent;padding:7px 0;cursor:pointer;min-height:44px}.exercise-title{font-size:13px;font-weight:700;color:#303832}.exercise-target{font-size:11px;color:#899189}.is-complete .exercise-title{text-decoration:line-through;color:#8b948c}.exercise-art{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;font-size:20px}.art-1{background:#f0f1e8}.art-2{background:#f8eee5}.art-3{background:#eaf2ee}.art-4{background:#f2edf5}.art-5{background:#f8f1dc}.exercise-detail{grid-column:2/4;color:#69736b;font-size:12px;line-height:1.5;padding:0 2px 10px 0}.save-state{min-height:35px;display:flex;align-items:center;gap:7px;color:#617369;font-size:10px}.status-dot{width:7px;height:7px;border-radius:50%;background:#6ba87a}.offline .status-dot{background:#d69a50}.sync-note{margin-left:auto;color:#929991;font-size:9px;text-align:right}.finish-button{height:49px;width:100%;border:0;border-radius:14px;background:#284b36;color:white;font-weight:700;font-size:13px;padding:0 16px;display:flex;align-items:center;justify-content:space-between;cursor:pointer}.finish-button span{font-size:19px;color:#cce78d}.footer-note{text-align:center;color:#959c95;font-size:11px;margin:19px 0}.footer-note span{color:#8cad6d;margin-left:3px}.bottom-nav{position:fixed;z-index:5;bottom:0;left:50%;transform:translateX(-50%);width:min(560px,100%);height:calc(67px + env(safe-area-inset-bottom));padding:8px 12px env(safe-area-inset-bottom);display:flex;justify-content:space-around;align-items:center;background:#ffffffed;border-top:1px solid #e9ede7;backdrop-filter:blur(14px)}.nav-item{min-width:62px;min-height:48px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;text-decoration:none;color:#969d96;font-size:9px;font-weight:600}.nav-item span{font-size:18px;line-height:20px}.nav-item.active{color:#3e7952}.deep-link-note{margin:14px 20px 0;background:#eef5e9;border:1px solid #e0ebd9;border-radius:12px;padding:11px 13px;display:flex;gap:10px;align-items:center;color:#54734d}.link-icon{height:26px;width:26px;border-radius:8px;display:grid;place-items:center;background:#dcebcf}.deep-link-note strong,.deep-link-note small{display:block}.deep-link-note strong{font-size:11px}.deep-link-note small{font-size:10px;margin-top:2px;color:#7b8a75}
@media(min-width:600px){body{padding:20px 0}.app-shell{min-height:calc(100vh - 40px);border-radius:22px;overflow:hidden}.bottom-nav{bottom:20px;border-radius:0 0 22px 22px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
.preview-label{font-size:10px;font-weight:800;letter-spacing:1px;color:#55785f;background:#edf4e9;border-radius:20px;padding:8px 10px}.preview-note{margin-top:20px;padding:14px 15px;border-radius:14px;background:#edf5eb;color:#385b43;font-size:12px;line-height:1.5}.preview-note strong,.preview-note span{display:block}.preview-note span{margin-top:3px}.check-button{width:44px;height:44px}.check-button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid #347b55;outline-offset:3px}.app-shell{padding-bottom:env(safe-area-inset-bottom)}
.top-actions{display:flex;align-items:center;gap:12px}.account-link{color:#347b55;font-size:12px;font-weight:700;min-height:44px;display:inline-flex;align-items:center;text-decoration:none}.account-signin{text-decoration:none}.account-status{font-size:12px;line-height:1.5;color:#52675a;margin:16px 0}.account-signout{background:transparent;border:0;color:#347b55;font-weight:700;min-height:44px;padding:8px 0;cursor:pointer}

.theme-toggle {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.theme-toggle:hover { background: var(--line); }
.theme-toggle:disabled { cursor: default; }

#blazor-error-ui {
    display: none;
    position: fixed;
    z-index: 10;
    inset: auto 0 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #fff2cc;
    color: #362c14;
}

#blazor-error-ui a { color: inherit; }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }

@media (max-width: 360px) {
    .topbar { padding-inline: 16px; }
    .top-actions { gap: 8px; }
    .preview-label { padding-inline: 6px; }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #eff5ee;
    --muted: #b1beb3;
    --green: #a2d9ac;
    --line: #364439;
    --dark-surface: #202a23;
    --dark-tint: #2b3b30;
    color: var(--ink);
    background: #101612;
}

[data-theme="dark"] body { background: #101612; }
[data-theme="dark"] .app-shell { background: #161d18; }
[data-theme="dark"] .topbar { border-color: var(--line); }
[data-theme="dark"] .workout-card { background: var(--dark-surface); border-color: var(--line); }
[data-theme="dark"] .brand-mark { color: #153221; }
[data-theme="dark"] :is(.brand-light, .eyebrow, .welcome p, .workout-meta, .exercise-detail,
    .exercise-target, .is-complete .exercise-title, .sync-note, .footer-note,
    .deep-link-note small, .nav-item) { color: var(--muted); }
[data-theme="dark"] :is(.accent, .account-link, .account-signout, .account-status,
    .progress-copy, .progress-copy span:last-child, .save-state, .nav-item.active) { color: var(--green); }
[data-theme="dark"] .exercise-title { color: var(--ink); }
[data-theme="dark"] .meta-dot { color: var(--muted); }
[data-theme="dark"] :is(.preview-note, .preview-label, .badge, .deep-link-note, .link-icon) {
    background: var(--dark-tint);
    border-color: var(--line);
    color: var(--green);
}
[data-theme="dark"] .progress-track { background: var(--line); }
[data-theme="dark"] .check-button { background: var(--dark-surface); border-color: #819786; }
[data-theme="dark"] .is-complete .check-button { background: var(--green); border-color: var(--green); color: #153221; }
[data-theme="dark"] .exercise-art { background: #304136; }
[data-theme="dark"] .finish-button { background: #385d45; }
[data-theme="dark"] .bottom-nav { background: #202a23f2; border-color: var(--line); }
[data-theme="dark"] :is(button, a):focus-visible { outline-color: var(--green); }
