:root {
  color-scheme: dark;
  --paper: #090909;
  --surface: #151515;
  --ink: #f4f4f4;
  --muted: #a1a1a1;
  --line: #2d2d2d;
  --forest: #151515;
  --forest-2: #272727;
  --lime: #f3f3f3;
  --lime-dark: #c4c4c4;
  --peach: #353535;
  --lavender: #303030;
  --shadow: 0 16px 40px rgb(0 0 0 / 28%);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #93b765; outline-offset: 3px; }
a { color: inherit; }
.serif, h1, h2, h3 { font-family: "Manrope", "DM Sans", sans-serif; letter-spacing: -.045em; }
h1, h2, h3, p { margin-top: 0; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.app-shell { display: grid; min-height: 100dvh; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; height: 100dvh; flex-direction: column; padding: 28px 20px 20px; border-right: 1px solid var(--line); background: #f8f7f3; }
.brand { display: inline-flex; align-items: center; gap: 11px; padding: 0 10px; text-decoration: none; }
.brand-mark { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 12px; background: var(--forest); color: var(--lime); font-family: Manrope, sans-serif; font-size: 22px; font-weight: 800; }
.brand-name { font: 800 17px Manrope, sans-serif; letter-spacing: -.06em; }
.brand-tag { margin-top: 1px; color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.nav-label { margin: 43px 10px 12px; color: #a0a49d; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.nav-list { display: grid; gap: 5px; }
.nav-item { display: flex; min-height: 46px; align-items: center; gap: 13px; padding: 0 13px; border: 0; border-radius: 13px; background: transparent; color: #737b72; font-weight: 600; text-align: left; transition: background .2s, color .2s, transform .2s; }
.nav-item:hover { transform: translateX(2px); background: #eeeee8; }
.nav-item.active { background: var(--forest); color: #fff; }
.nav-icon { display: grid; width: 20px; place-items: center; font-size: 17px; }
.sidebar-spacer { flex: 1; }
.profile-mini { display: flex; align-items: center; gap: 11px; padding: 14px 10px 4px; border-top: 1px solid var(--line); }
.avatar { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--peach); color: #714f3e; font-size: 12px; font-weight: 700; }
.profile-name { overflow: hidden; max-width: 125px; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.profile-sub { margin-top: 2px; color: var(--muted); font-size: 11px; }
.main-area { min-width: 0; padding: 0 clamp(20px, 5vw, 72px) 68px; }
.topbar { display: flex; height: 84px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.date-label { color: var(--muted); font-size: 12px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.sync-pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #e6e8df; border-radius: 999px; background: #fafaf7; color: #677263; font-size: 11px; font-weight: 600; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #b1c982; }
.icon-button { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font-size: 17px; }
.page { max-width: 1180px; margin: 0 auto; padding-top: 40px; animation: enter .35s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-heading h1 { margin: 7px 0 5px; font-size: clamp(29px, 4vw, 40px); line-height: 1.12; }
.page-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.button { display: inline-flex; min-height: 45px; align-items: center; justify-content: center; gap: 9px; padding: 0 17px; border: 1px solid transparent; border-radius: 13px; background: var(--forest); color: #fff; font-size: 13px; font-weight: 700; transition: background .2s, transform .2s, box-shadow .2s; }
.button:hover { transform: translateY(-1px); background: var(--forest-2); box-shadow: 0 8px 18px rgb(34 43 36 / 12%); }
.button.secondary { border-color: var(--line); background: #fff; color: var(--ink); }
.button.secondary:hover { background: #f9f9f5; box-shadow: none; }
.button.lime { background: var(--lime); color: #293329; }
.button.lime:hover { background: #c4e47b; }
.button.ghost { min-height: 38px; padding: 0 12px; background: transparent; color: var(--forest); }
.button.danger { background: #fff0ed; color: #9a4637; }
.button.full { width: 100%; }
.button:disabled { cursor: not-allowed; opacity: .48; transform: none; }
.grid { display: grid; gap: 20px; }
.dashboard-grid { grid-template-columns: minmax(0, 1.6fr) minmax(250px, .9fr); }
.card { min-width: 0; padding: 23px; border: 1px solid #eaeae4; border-radius: 20px; background: var(--surface); box-shadow: 0 4px 14px rgb(34 43 36 / 2%); }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-title-row h2, .card-title-row h3 { margin: 0; font-size: 17px; }
.text-link { padding: 4px 0; border: 0; background: none; color: #738664; font-size: 12px; font-weight: 700; text-decoration: none; }
.hero-card { position: relative; overflow: hidden; min-height: 270px; padding: clamp(24px, 4vw, 38px); border: 0; background: var(--forest); color: #fff; }
.hero-card::after { position: absolute; top: -118px; right: -60px; width: 320px; height: 320px; border: 1px solid rgb(255 255 255 / 9%); border-radius: 50%; content: ""; }
.hero-card::before { position: absolute; top: -67px; right: -12px; width: 220px; height: 220px; border: 1px solid rgb(255 255 255 / 9%); border-radius: 50%; content: ""; }
.hero-card > * { position: relative; z-index: 1; }
.hero-card .eyebrow { color: #b7c2b5; }
.hero-card h2 { max-width: 410px; margin: 12px 0 9px; font-size: clamp(27px, 3.5vw, 36px); line-height: 1.15; }
.hero-card p { margin-bottom: 22px; color: #c4cec4; font-size: 13px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 24px; color: #d6ddd4; font-size: 12px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-card .button { min-height: 43px; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-top: 20px; }
.stat-card { padding: 18px; }
.stat-number { margin: 8px 0 4px; font: 700 25px Manrope, sans-serif; letter-spacing: -.06em; }
.stat-foot { color: var(--muted); font-size: 11px; }
.week-strip { display: flex; justify-content: space-between; gap: 6px; margin: 4px 0 18px; }
.day-dot { display: grid; width: 34px; height: 49px; justify-items: center; gap: 5px; color: #a1a69d; font-size: 10px; }
.day-dot i { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: #f2f2ed; color: #687267; font-size: 11px; font-style: normal; }
.day-dot.trained i { background: #edf4df; color: #71934b; }
.day-dot.today { color: var(--forest); font-weight: 700; }
.day-dot.today i { background: var(--forest); color: #fff; }
.session-list { display: grid; gap: 12px; }
.session-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: #fafaf7; }
.session-thumb { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: var(--lavender); font-size: 20px; }
.session-row:nth-child(even) .session-thumb { background: #edf2e4; }
.session-name { flex: 1; font-size: 12px; font-weight: 700; }
.session-detail { margin-top: 3px; color: var(--muted); font-size: 11px; }
.session-date { color: var(--muted); font-size: 10px; }
.progress-track { overflow: hidden; height: 6px; border-radius: 99px; background: #edeee8; }
.progress-fill { height: 100%; border-radius: inherit; background: #b4d476; transition: width .3s ease; }
.section-gap { margin-top: 22px; }
.plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan-card { position: relative; overflow: hidden; min-height: 230px; }
.plan-art { display: flex; height: 115px; align-items: center; justify-content: center; margin: -23px -23px 20px; background: #e7eddc; font-size: 43px; }
.plan-card:nth-child(3n + 2) .plan-art { background: #f5e8df; }
.plan-card:nth-child(3n) .plan-art { background: #e7e4f0; }
.plan-card h3 { margin: 0 0 5px; font-size: 17px; }
.plan-card p { margin: 0 0 15px; color: var(--muted); font-size: 12px; }
.plan-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 13px; border-top: 1px solid var(--line); }
.plan-count { color: var(--muted); font-size: 11px; }
.workout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.day-tabs { display: flex; gap: 8px; overflow-x: auto; margin: -7px 0 23px; padding: 2px 0 6px; }
.day-tab { min-height: 44px; flex: 0 0 auto; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; }
.day-tab.active { border-color: var(--lime); background: var(--lime); color: #293329; }
.day-tab:disabled:not(.active) { cursor: not-allowed; opacity: .48; }
.exercise-list { display: grid; gap: 12px; }
.exercise-card { display: flex; align-items: center; gap: 15px; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.exercise-art { display: grid; width: 58px; height: 58px; flex: 0 0 auto; overflow: hidden; place-items: center; border-radius: 15px; background: #eef2e7; font-size: 25px; }
.photo-trigger { padding: 0; border: 0; cursor: zoom-in; }
.exercise-photo-grid { display: grid; width: 100%; height: 100%; grid-template-columns: repeat(2, 1fr); gap: 2px; padding: 2px; }
.exercise-photo-grid.single { grid-template-columns: 1fr; }
.exercise-photo-grid img { width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: 4px; }
.exercise-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.exercise-gallery figure { min-width: 0; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 13px; background: #151c17; }
.exercise-gallery img { width: 100%; max-height: 300px; aspect-ratio: 1; border-radius: 8px; object-fit: contain; }
.exercise-gallery figcaption { overflow: hidden; margin-top: 7px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.exercise-info { min-width: 0; flex: 1; }
.exercise-info h3 { overflow: hidden; margin: 0 0 4px; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.exercise-info p { margin: 0; color: var(--muted); font-size: 11px; }
.exercise-last { margin-top: 8px; color: #75876c; font-size: 10px; font-weight: 600; }
.exercise-actions { display: flex; align-items: center; gap: 8px; }
.exercise-actions .icon-button { width: 35px; height: 35px; font-size: 14px; }
.side-panel { position: sticky; top: 20px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 99px; background: #f0f3ea; color: #657b55; font-size: 10px; font-weight: 700; }
.active-summary { display: flex; align-items: center; justify-content: space-between; margin: 0 0 16px; }
.set-card { padding: 20px; border-radius: 17px; background: #f8f9f4; }
.set-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.set-heading h2 { margin: 0 0 4px; font-size: 17px; }
.set-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.set-row { display: grid; grid-template-columns: 45px 1fr 1fr 44px; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid #e8eae2; }
.set-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.set-data { font-size: 12px; }
.set-data strong { font-size: 13px; }
.set-check { display: grid; width: 44px; height: 44px; place-items: center; border: 1.5px solid #d5dacd; border-radius: 50%; background: #fff; color: transparent; }
.set-check.done { border-color: var(--forest); background: var(--forest); color: #fff; }
.set-check:disabled { cursor: default; opacity: .65; }
.active-exercise { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.active-exercise + .active-exercise { margin-top: 13px; }
.active-exercise.complete { opacity: .65; }
.active-exercise .exercise-card { padding: 0 0 15px; border: 0; border-radius: 0; }
.set-actions { display: flex; flex-wrap: wrap; gap: 9px; padding-top: 13px; }
.history-list { display: grid; gap: 12px; }
.history-item { padding: 19px; }
.history-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.history-top h3 { margin: 0 0 4px; font-size: 15px; }
.history-top p { margin: 0; color: var(--muted); font-size: 11px; }
.history-time { color: var(--muted); font-size: 11px; }
.history-stats { display: flex; flex-wrap: wrap; gap: 19px; color: #667064; font-size: 11px; }
.history-stats strong { color: var(--ink); }
.chart-card { overflow: hidden; }
.chart-wrap { height: 240px; padding-top: 15px; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: #eceee8; stroke-dasharray: 4 5; }
.chart-line { fill: none; stroke: #7d9e5a; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }
.chart-area { fill: url(#chart-fill); }
.chart-point { fill: #fff; stroke: #7d9e5a; stroke-width: 2.5; }
.chart-axis { fill: #92988f; font: 10px "DM Sans", sans-serif; }
.empty-state { padding: 40px 20px; color: var(--muted); text-align: center; }
.empty-icon { margin-bottom: 12px; font-size: 30px; }
.notice { display: flex; gap: 11px; padding: 13px 15px; border: 1px solid #eddfbd; border-radius: 13px; background: #fbf8ee; color: #7a6943; font-size: 11px; line-height: 1.55; }
.notice strong { color: #5e5030; }
.demo-banner { padding: 12px 16px; border-bottom: 1px solid #e8e5d8; background: #f7f2e4; color: #766b4d; font-size: 11px; text-align: center; }
.demo-banner strong { color: #4d4938; }
.mobile-nav { display: none; }
.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; align-items: end; justify-items: center; padding: 20px; background: rgb(26 33 27 / 42%); backdrop-filter: blur(5px); animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(100%, 520px); max-height: min(88dvh, 760px); overflow: auto; padding: 25px; border-radius: 22px; background: #fff; box-shadow: 0 25px 80px rgb(0 0 0 / 20%); animation: sheet .25s cubic-bezier(.2,.8,.2,1); }
@keyframes sheet { from { transform: translateY(20px); opacity: .7; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.modal-header h2 { margin: 4px 0 5px; font-size: 23px; }
.modal-header p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.modal-close { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; background: #f3f4ef; color: #697066; font-size: 19px; }
.form-stack { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field label { color: #60695e; font-size: 11px; font-weight: 700; }
.field input, .field select { width: 100%; min-height: 45px; padding: 0 13px; border: 1px solid #e4e6de; border-radius: 11px; background: #fff; color: var(--ink); }
.field input::placeholder { color: #aeb3a9; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.modal-footer { display: flex; gap: 9px; margin-top: 20px; }
.modal-footer .button { flex: 1; }
.photo-preview { display: grid; min-height: 150px; overflow: hidden; place-items: center; margin: 13px 0; border: 1px dashed #d8ddcf; border-radius: 15px; background: #f8f9f4; color: var(--muted); text-align: center; }
.photo-preview.has-images { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; padding: 8px; }
.photo-preview img { width: 100%; max-height: 260px; border-radius: 9px; object-fit: cover; }
.photo-preview-empty { padding: 22px; font-size: 12px; }
.photo-preview-empty span { display: block; margin-bottom: 8px; font-size: 28px; }
.confirmation-value { padding: 17px; border-radius: 15px; background: #f2f5eb; font: 700 22px Manrope, sans-serif; text-align: center; }
.auth-screen { display: grid; min-height: 100vh; min-height: 100dvh; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr); background: #fff; }
.auth-brand-panel { position: relative; display: flex; min-height: 100dvh; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(30px, 6vw, 72px); background: var(--forest); color: #fff; }
.auth-brand-panel::before, .auth-brand-panel::after { position: absolute; right: -90px; bottom: -180px; width: 520px; height: 520px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 50%; content: ""; }
.auth-brand-panel::after { right: 0; bottom: -100px; width: 340px; height: 340px; }
.auth-brand-panel > * { position: relative; z-index: 1; }
.auth-brand-panel .brand { padding: 0; }
.auth-brand-panel .brand-name { font-size: 19px; }
.auth-quote { max-width: 580px; }
.auth-quote h1 { margin: 0 0 18px; font-size: clamp(37px, 5vw, 58px); line-height: 1.07; }
.auth-quote h1 span { color: var(--lime); }
.auth-quote p { max-width: 420px; color: #c6d0c4; font-size: 14px; line-height: 1.75; }
.auth-foot { color: #9ca99b; font-size: 11px; }
.auth-form-panel { display: grid; place-items: center; padding: 30px; }
.auth-box { width: min(100%, 390px); }
.auth-box h2 { margin: 0 0 8px; font-size: 29px; }
.auth-box > p { margin-bottom: 25px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 24px; padding: 4px; border-radius: 12px; background: #f3f4ef; }
.auth-tab { min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.auth-tab.active { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgb(34 43 36 / 7%); }
.auth-links { display: flex; justify-content: space-between; margin-top: 15px; }
.auth-links button { padding: 5px 0; border: 0; background: none; color: #71845f; font-size: 11px; font-weight: 700; }
.auth-demo-note { margin-top: 18px; }
.screen-reader { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
#toast-root { position: fixed; z-index: 20; right: 18px; bottom: 20px; display: grid; gap: 8px; }
.toast { max-width: min(380px, calc(100vw - 36px)); padding: 13px 16px; border-radius: 13px; background: var(--forest); color: #fff; box-shadow: var(--shadow); font-size: 12px; line-height: 1.5; animation: enter .2s ease; }

@media (min-width: 760px) {
  .modal-backdrop { align-items: center; }
}
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 78px minmax(0,1fr); }
  .sidebar { align-items: center; padding-inline: 11px; }
  .brand { padding: 0; }
  .brand-copy, .nav-label, .nav-item .nav-text, .profile-copy, .sidebar .profile-mini button { display: none; }
  .nav-list { width: 100%; margin-top: 34px; }
  .nav-item { width: 52px; justify-content: center; padding: 0; }
  .nav-icon { font-size: 19px; }
  .profile-mini { justify-content: center; padding: 14px 0 4px; }
}
@media (max-width: 760px) {
  .app-shell { display: block; min-height: 100dvh; }
  .sidebar { display: none; }
  .main-area { padding: 0 16px calc(88px + env(safe-area-inset-bottom)); }
  .topbar { height: 61px; }
  .date-label { font-size: 11px; }
  .sync-pill { padding: 7px 9px; font-size: 10px; }
  .page { padding-top: 27px; }
  .page-heading { align-items: flex-start; margin-bottom: 21px; }
  .page-heading h1 { font-size: 31px; }
  .page-heading p { max-width: 250px; font-size: 12px; line-height: 1.5; }
  .page-heading .button { min-height: 40px; padding: 0 12px; font-size: 11px; }
  .dashboard-grid, .workout-layout { grid-template-columns: 1fr; }
  .dashboard-grid { gap: 13px; }
  .dashboard-grid .side-panel { display: grid; grid-template-columns: 1fr; gap: 13px; }
  .card { padding: 18px; border-radius: 17px; }
  .hero-card { min-height: 250px; padding: 24px; }
  .hero-card h2 { font-size: 30px; }
  .hero-meta { gap: 12px; font-size: 11px; }
  .stats-row { gap: 8px; margin-top: 13px; }
  .stat-card { padding: 14px; }
  .stat-number { font-size: 22px; }
  .stat-foot { font-size: 10px; }
  .plan-grid { grid-template-columns: 1fr; gap: 13px; }
  .plan-card { min-height: 0; }
  .plan-art { height: 105px; }
  .workout-layout { gap: 13px; }
  .side-panel { position: static; }
  .exercise-card { gap: 11px; padding: 13px; }
  .exercise-art { width: 48px; height: 48px; font-size: 22px; }
  .exercise-actions { gap: 4px; }
  .exercise-actions .icon-button { width: 40px; height: 40px; }
  .mobile-nav { position: fixed; z-index: 5; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 9px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid #e7e8e1; background: rgb(250 250 247 / 94%); backdrop-filter: blur(15px); }
  .mobile-nav .nav-item { display: grid; width: auto; min-height: 55px; justify-items: center; gap: 2px; padding: 5px; border-radius: 12px; font-size: 9px; }
  .mobile-nav .nav-item.active { background: transparent; color: var(--forest); }
  .mobile-nav .nav-icon { font-size: 18px; }
  .mobile-nav .nav-text { display: block; }
  .modal-backdrop { padding: 0; }
  .modal { width: 100%; max-height: 91dvh; padding: 22px 19px calc(22px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
  .auth-screen { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .auth-form-panel { min-height: 100dvh; align-items: start; padding: max(42px, env(safe-area-inset-top)) 23px 32px; }
  .auth-box { margin: auto; }
  .auth-box::before { display: block; margin-bottom: 42px; color: var(--forest); content: "F  forme"; font: 800 18px Manrope, sans-serif; letter-spacing: -.06em; }
  .demo-banner { padding: 10px 12px; font-size: 10px; }
}
@media (max-width: 390px) {
  .main-area { padding-inline: 12px; }
  .hero-card { padding: 20px; }
  .hero-card h2 { font-size: 27px; }
  .stats-row { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .stat-card { padding: 12px 10px; }
  .stat-card .eyebrow { font-size: 9px; }
  .set-row { grid-template-columns: 38px 1fr 1fr 44px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* The app intentionally uses a single, full dark theme. */
body, .sidebar, .auth-form-panel { background: var(--paper); color: var(--ink); }
.sidebar { background: #151c17; }
.nav-item { color: #a3ada2; }
.nav-item:hover { background: #222b24; }
.nav-item.active { background: #29362c; color: #fff; }
.profile-mini { border-color: var(--line); }
.profile-sub, .date-label, .muted, .session-detail, .plan-count, .history-time { color: var(--muted); }
.history-stats { color: #b0bbb0; }
.day-tab { border-color: #3a453c; background: #222a24; color: #c1cbbd; }
.day-tab.active { border-color: var(--lime); background: var(--lime); color: #293329; }
.sync-pill { border-color: var(--line); background: #1b221d; color: #bac6b7; }
.icon-button { border-color: var(--line); background: #1b221d; color: var(--ink); }
.icon-button:hover, .modal-close:hover { background: #29332b; }
.button.secondary { border-color: #3a453c; background: #222a24; color: var(--ink); }
.button.secondary:hover { background: #2a342c; }
.button.ghost { color: #c9dfa5; }
.button.danger { background: #402b28; color: #f0aaa0; }
.card, .exercise-card, .active-exercise, .history-item { border-color: var(--line); background: var(--surface); }
.hero-card { background: #1a2a20; }
.hero-card::before, .hero-card::after { border-color: rgb(255 255 255 / 8%); }
.hero-card .eyebrow, .hero-meta { color: #bfccbd; }
.hero-card p { color: #b2beb2; }
.stat-foot, .eyebrow { color: var(--muted); }
.day-dot { color: #a2aca0; }
.day-dot i { background: #252e27; color: #c3cdc0; }
.day-dot.trained i { background: #303e2a; color: #c5df95; }
.day-dot.today { color: #e7eedf; }
.day-dot.today i { background: var(--lime); color: #202820; }
.session-row { background: #222a24; }
.session-thumb { background: #333044; }
.session-row:nth-child(even) .session-thumb { background: #313a2d; }
.plan-art { background: #29352a; }
.plan-card:nth-child(3n + 2) .plan-art { background: #3a2d28; }
.plan-card:nth-child(3n) .plan-art { background: #302d3b; }
.plan-card-footer { border-color: var(--line); }
.exercise-art { background: #2a352b; }
.tag { background: #303c2c; color: #c4dda0; }
.set-card { background: #151c17; }
.set-row { border-color: #303a32; }
.set-check { border-color: #4a574a; background: #222a24; color: transparent; }
.set-check.done { border-color: var(--lime); background: var(--lime); color: #263126; }
.progress-track { background: #303a32; }
.progress-fill { background: var(--lime); }
.text-link { color: #c7dda5; }
.notice { border-color: #574a31; background: #2c281d; color: #d7c89c; }
.notice strong { color: #f0e2b9; }
.demo-banner { border-color: #3f3a2a; background: #26241c; color: #c9bd91; }
.demo-banner strong { color: #eee1b1; }
.mobile-nav { border-color: #303a32; background: rgb(20 27 22 / 94%); }
.mobile-nav .nav-item.active { color: var(--lime); }
.modal-backdrop { background: rgb(0 0 0 / 66%); }
.modal { border: 1px solid #354037; background: #1b221d; color: var(--ink); }
.modal-close { background: #29332b; color: #cbd4c8; }
.field label { color: #c1cbbd; }
.field input, .field select { border-color: #3b463d; background: #121813; color: var(--ink); }
.field input::placeholder { color: #788276; }
.photo-preview { border-color: #465345; background: #151c17; color: var(--muted); }
.confirmation-value { background: #2a3528; color: #e9f1dc; }
.auth-screen { background: #111612; }
.auth-brand-panel { background: #17231a; }
.auth-brand-panel::before, .auth-brand-panel::after { border-color: rgb(255 255 255 / 8%); }
.auth-quote p { color: #c1ccc0; }
.auth-foot { color: #a5b1a3; }
.auth-tabs { background: #222a24; }
.auth-tab { color: #a0aa9e; }
.auth-tab.active { background: #343e35; color: #f0f3ec; box-shadow: none; }
.auth-links button { color: #c7dda5; }
.toast { background: #29362c; color: #f2f5ee; }
.chart-grid { stroke: #303a32; }
.chart-axis { fill: #a4aea2; }

/* Restrained monochrome finish across every screen and state. */
:root {
  --paper: #090909;
  --surface: #151515;
  --ink: #f4f4f4;
  --muted: #a1a1a1;
  --line: #2d2d2d;
  --forest: #151515;
  --forest-2: #272727;
  --lime: #f3f3f3;
  --lime-dark: #c4c4c4;
  --peach: #353535;
  --lavender: #303030;
}
body, .sidebar, .auth-form-panel { background: var(--paper); color: var(--ink); }
.sidebar { background: #101010; }
.brand-mark { background: #202020; color: #fff; }
.nav-item { color: #adadad; }
.nav-item:hover { background: #242424; }
.nav-item.active { background: #292929; color: #fff; }
.profile-mini { border-color: var(--line); }
.avatar { background: #333; color: #f4f4f4; }
.sync-pill { border-color: #303030; background: #171717; color: #d4d4d4; }
.sync-dot { background: #f0f0f0; }
.icon-button { border-color: #303030; background: #191919; color: #f5f5f5; }
.icon-button:hover, .modal-close:hover { background: #2a2a2a; }
.button { background: #242424; color: #fff; }
.button:hover { background: #353535; }
.button.lime { background: #f2f2f2; color: #111; }
.button.lime:hover { background: #d9d9d9; }
.button.secondary { border-color: #353535; background: #202020; color: #f2f2f2; }
.button.secondary:hover { background: #2a2a2a; }
.button.ghost, .text-link, .auth-links button { color: #ededed; }
.button.danger { background: #292929; color: #f0f0f0; }
.card, .exercise-card, .active-exercise, .history-item { border-color: #2b2b2b; background: #151515; }
.hero-card { background: #111; }
.hero-card .eyebrow, .hero-meta, .hero-card p { color: #d0d0d0; }
.day-dot { color: #aaa; }
.day-dot i { background: #252525; color: #ddd; }
.day-dot.trained i { background: #333; color: #fff; }
.day-dot.today { color: #fff; }
.day-dot.today i { background: #f3f3f3; color: #111; }
.session-row { background: #202020; }
.session-thumb, .session-row:nth-child(even) .session-thumb { background: #2b2b2b; }
.plan-art, .plan-card:nth-child(3n + 2) .plan-art, .plan-card:nth-child(3n) .plan-art { background: #252525; }
.exercise-art { background: #252525; }
.tag { background: #292929; color: #e8e8e8; }
.set-card { background: #101010; }
.set-row { border-color: #303030; }
.set-check { border-color: #555; background: #202020; }
.set-check.done { border-color: #f2f2f2; background: #f2f2f2; color: #111; }
.progress-track { background: #303030; }
.progress-fill { background: #f0f0f0; }
.notice, .demo-banner { border-color: #3a3a3a; background: #202020; color: #d5d5d5; }
.notice strong, .demo-banner strong { color: #fff; }
.mobile-nav { border-color: #303030; background: rgb(16 16 16 / 95%); }
.mobile-nav .nav-item.active { color: #fff; }
.modal { border-color: #353535; background: #171717; }
.modal-close { background: #292929; color: #eee; }
.field label { color: #d0d0d0; }
.field input, .field select { border-color: #3a3a3a; background: #0e0e0e; color: #f5f5f5; }
.field input::placeholder { color: #777; }
.photo-preview, .exercise-gallery figure { border-color: #404040; background: #101010; }
.confirmation-value { background: #292929; color: #f5f5f5; }
.auth-screen { background: #090909; }
.auth-brand-panel { background: #111; }
.auth-brand-panel::before, .auth-brand-panel::after { border-color: rgb(255 255 255 / 9%); }
.auth-quote p, .auth-foot { color: #ccc; }
.auth-tabs { background: #1e1e1e; }
.auth-tab { color: #aaa; }
.auth-tab.active { background: #333; color: #fff; }
.history-stats { color: #bbb; }
.day-tab { border-color: #383838; background: #1d1d1d; color: #ddd; }
.day-tab.active { border-color: #eee; background: #eee; color: #111; }
.chart-grid { stroke: #303030; }
.chart-axis { fill: #aaa; }
.chart-line { stroke: #dedede; }
.chart-area { fill: url(#chart-fill); }
.toast { background: #292929; color: #fff; }

html { color-scheme: dark; }
button:focus-visible, input:focus-visible, select:focus-visible { outline-color: #fff; }
.sync-pill { min-height: 34px; font-family: inherit; }
button.sync-pill { cursor: pointer; }
.sync-pill[data-action="retry-save"] { border-color: #777; color: #fff; }
.sync-pill[data-action="retry-save"] .sync-dot { background: #aaa; }
.sync-pill[data-action="retry-save"]:hover { background: #252525; }
.field-hint { color: #999; font-size: 11px; line-height: 1.4; }
.session-hint { margin: 12px 0 0; }
.auth-status { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #444; border-radius: 12px; background: #1c1c1c; font-size: 12px; line-height: 1.5; }
.auth-status.success { color: #eee; }
.auth-status.error { border-color: #777; color: #fff; }
.auth-demo-note { border-color: #383838; background: #1b1b1b; color: #ccc; }
.auth-demo-note strong { color: #fff; }
.auth-error-actions { display: grid; gap: 10px; margin-top: 20px; }
.auth-error-brand { margin: 0 0 34px; padding: 0; }
.auth-error-box > h2 { margin-top: 8px; }
.loading-screen { display: grid; min-height: 100vh; min-height: 100dvh; align-content: center; justify-items: center; gap: 18px; background: #090909; color: #eee; }
.loading-screen .brand-mark { width: 52px; height: 52px; border-radius: 17px; background: #f2f2f2; color: #090909; font-size: 30px; }
.loading-screen p { margin: 0; color: #aaa; font-size: 13px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.plan-art, .session-thumb, .button, .icon-button, .notice > span, .photo-preview-empty > span { filter: grayscale(1); }
.chart-line { stroke: #dedede; }
.chart-point { stroke: #dedede; }
.chart-grid { stroke: #303030; }
.chart-area { fill: url(#chart-fill); }
.notice, .notice strong { color: #ddd; }
.tag { color: #eee; }
.exercise-art:not(.photo-trigger) { filter: grayscale(1); }
@media (max-width: 760px) {
  .auth-error-box::before { display: none; }
  .auth-error-brand { margin-bottom: 28px; }
  .topbar-right { gap: 8px; }
  .sync-pill { max-width: 175px; padding-inline: 8px; }
  .sync-label { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .loading-screen p { animation: none; }
}
