/* GymTrack screens */
/* exercises */
.filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--space-3);margin:var(--space-3) 0}
@media (max-width:899px){.filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
.ex-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:var(--space-3)}
.ex-card{display:flex;flex-direction:column;gap:var(--space-2);text-align:left;cursor:pointer;background:var(--surface-000);border:1px solid var(--line);border-radius:var(--radius-lg);padding:var(--space-3);box-shadow:var(--shadow-card)}
.ex-card:hover{border-color:var(--edge)}
.ex-card .top{display:flex;gap:var(--space-3);align-items:center}
.ex-card .name{font-weight:700;line-height:1.3}
.ex-card .meta{font-size:12px;color:var(--muted)}
.pager{display:flex;align-items:center;justify-content:center;gap:var(--space-4);margin-top:var(--space-5)}
.ex-photos{display:grid;grid-template-columns:repeat(2,1fr);gap:var(--space-2)}
.ex-photos figure{margin:0;border:1px solid var(--line);border-radius:var(--radius-md);overflow:hidden;background:var(--surface-200)}
.ex-photos img{width:100%;aspect-ratio:4/3;object-fit:cover}
.ex-photos figcaption{font-size:11px;padding:4px 8px;color:var(--muted)}
.steps{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px}
.pill-list{display:flex;flex-wrap:wrap;gap:6px}

/* routines editor */
.rt-ex{display:grid;grid-template-columns:auto 1fr auto;align-items:start;gap:var(--space-3);align-items:center;padding:var(--space-3) 0;border-top:1px solid var(--line-soft)}
.rt-targets{display:flex;gap:var(--space-2);margin-top:6px}
.rt-targets .input{width:70px;min-height:30px;padding:0 8px}

/* week plan */
.week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:var(--space-2)}
@media (max-width:899px){.week{grid-template-columns:1fr}}
.day{border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface-000);padding:var(--space-3);display:flex;flex-direction:column;gap:var(--space-2);min-height:150px}
.day.today{border-color:var(--edge);box-shadow:var(--shadow-pop)}
.day .dn{font-size:11px;color:var(--muted);letter-spacing:.06em;text-transform:uppercase}
.day .dd{font-size:18px;font-weight:700}
.day.s-done{background:var(--done-fill)}
.day.s-planned{background:var(--planned)}
.day.s-missed{background:var(--missed)}
.day.s-rest{background:var(--rest)}
.day .rname{font-weight:700;line-height:1.25}
.day .acts{margin-top:auto;display:flex;gap:6px;flex-wrap:wrap}

/* session logger */
.sess-ex{margin-top:var(--space-4)}
.sets{width:100%;border-collapse:collapse}
.sets th{font-size:10px;letter-spacing:.08em;color:var(--muted);text-align:center;padding:4px}
.sets td{padding:4px;text-align:center}
.sets td.sn{width:48px;font-weight:700}
.sets .input{text-align:center;padding:0 4px;min-height:40px}
.sets tr.done .input{background:var(--done-fill);border-color:var(--done)}
.sets tr.warm td.sn{color:var(--muted)}
.chk{width:44px;height:44px;border-radius:var(--radius-md);border:1px solid var(--edge);background:var(--surface-000);font-size:18px;font-weight:700}
.chk[aria-pressed="true"]{background:var(--done);color:#17361a}
.rest-bar{position:sticky;bottom:80px;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);background:var(--ink-000);color:var(--bg-000);padding:var(--space-3) var(--space-4);border-radius:var(--radius-lg);box-shadow:var(--shadow-pop-lg);margin-top:var(--space-4)}
@media (min-width:900px){.rest-bar{bottom:16px}}
.rest-bar b{font-size:22px}

/* dashboard */
.bars{display:flex;align-items:flex-end;gap:6px;height:140px;padding-top:var(--space-2)}
.bars .b{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px;height:100%}
.bars .b i{display:block;width:100%;background:var(--chart-2);border-radius:var(--radius-xs) var(--radius-xs) 0 0;min-height:2px}
.bars .b.cur i{background:var(--chart-1)}
.bars .b span{font-size:10px;color:var(--muted)}

/* calendar */
.cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.cal .h{font-size:11px;color:var(--muted);text-align:center;padding:4px 0}
.cal .c{height:84px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--heat-0);display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;padding:4px 6px;font-size:12px;text-align:left}
.cal .c.out{opacity:.35}
.cal .c.today{border:2px solid var(--edge)}
.cal .c.h1{background:var(--heat-1)}.cal .c.h2{background:var(--heat-2)}.cal .c.h3{background:var(--heat-3)}.cal .c.h4{background:var(--heat-4)}
.cal .c.planned{background:var(--planned)}.cal .c.missed{background:var(--missed)}.cal .c.rest{background:var(--rest)}
.cal .c .mk{font-size:10px;font-weight:700}
.legend{display:flex;align-items:center;gap:4px;font-size:11px;color:var(--muted)}
.legend i{width:14px;height:14px;border-radius:3px;border:1px solid var(--line)}

/* cycles */
.cyc-compare{width:100%;border-collapse:collapse}
.cyc-compare th,.cyc-compare td{padding:var(--space-2) var(--space-3);border-top:1px solid var(--line-soft);text-align:right}
.cyc-compare th:first-child,.cyc-compare td:first-child{text-align:left}
.cyc-compare thead th{border-top:0;font-size:11px;color:var(--muted)}
.thumb{position:relative;width:56px;height:56px;flex:none;display:block}
.thumb .tile{position:absolute;inset:0}
.thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:var(--radius-md);border:1px solid var(--tile-line);background:var(--surface-200)}

@media (max-width:899px){
  .nav a{padding:4px 2px;white-space:nowrap;font-size:10px;min-width:0;flex:1}
  .day{min-height:0}
}
@media (max-width:899px){.cal .c{height:56px}}
.cal .c.sel{box-shadow:inset 0 0 0 2px var(--accent)}
.cal .c{height:52px}
@media (max-width:899px){.cal .c{height:46px}}
@media (max-width:899px){.g2{grid-template-columns:1fr}}

/* motion thumbnails */
.motion{position:relative;display:block;flex:none;width:56px;height:56px;border-radius:var(--radius-md);overflow:hidden;border:1px solid var(--tile-line);background:var(--surface-200)}
.motion.sm{width:44px;height:44px}.motion.lg{width:96px;height:96px}.motion.xl{width:128px;height:128px}
.motion .tile{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:0}
.motion img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.motion .m1{opacity:0;animation:mfade 1.8s ease-in-out infinite alternate}
@keyframes mfade{0%,30%{opacity:0}70%,100%{opacity:1}}
.motion-btn{padding:0;border:0;background:none;border-radius:var(--radius-md);flex:none;display:block}
.motion-btn:active{transform:scale(.97)}
.motion-strip{display:flex;gap:6px;margin:var(--space-3) 0}
/* guided "now" card */
.now-wrap{margin-top:var(--space-4);position:sticky;top:8px;z-index:25}
.now{background:var(--surface-000);border:1px solid var(--edge);border-radius:var(--radius-xl);box-shadow:var(--shadow-pop-lg);padding:var(--space-4)}
.now.rest{background:var(--ink-000);color:var(--bg-000)}
.now.rest .muted,.now.rest .eyebrow{color:inherit;opacity:.75}
.now.rest .btn{background:var(--bg-000);color:var(--ink-000);border-color:var(--bg-000);box-shadow:none}
.now.rest .btn.primary{background:var(--accent);color:#fff;border-color:var(--accent)}
.now.done{text-align:center;display:flex;flex-direction:column;gap:var(--space-3)}
.clock-row{display:flex;align-items:baseline;gap:var(--space-3);margin:var(--space-3) 0}
.clock{font-size:44px;font-weight:700;line-height:1;letter-spacing:-.02em}
.progress.big{height:14px}
.now.rest .progress{background:rgba(255,255,255,.18);border-color:transparent}
.now.rest .progress i{background:var(--done)}
.steppers{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:var(--space-3);margin-top:var(--space-3)}
.stepper .sv{min-width:56px;text-align:center;font-size:22px}
.stepper .btn.icon{min-width:48px;min-height:48px;font-size:22px}
.btn.big{width:100%;min-height:56px;font-size:16px}
.sets tr.cur{outline:2px solid var(--accent);outline-offset:-2px;border-radius:var(--radius-sm)}
@media (max-width:640px){.g3{grid-template-columns:minmax(0,1fr)}.motion-strip{flex-wrap:wrap}}
/* compact sticky session header + now card */
.sess-top{position:sticky;top:var(--mt,0px);z-index:25;background:var(--bg-000);margin:0 calc(-1*var(--space-4));padding:var(--space-2) var(--space-4) var(--space-2);border-bottom:1px solid var(--line)}
.sess-bar{display:flex;align-items:center;gap:var(--space-2)}
.sess-t{font-weight:700;font-size:16px;line-height:1.2}.sess-s{font-size:12px}
.progress.thin{height:6px;margin:var(--space-2) 0}
.sess-top .now-wrap{margin:0;position:static}
.sess-top .now{padding:var(--space-3);box-shadow:none;border-radius:var(--radius-lg);display:flex;flex-direction:column;gap:var(--space-2)}
.now-h{display:flex;gap:var(--space-3);align-items:center}
.now-h .nm{font-weight:700;font-size:16px;line-height:1.2}
.now-h .eyebrow{font-size:11px}
.sess-top .steppers{display:flex;gap:var(--space-3);margin:0;justify-content:space-between}
.stepper{display:flex;align-items:center;gap:4px}
.stepper .eyebrow{font-size:10px;min-width:30px}
.stepper .sv{min-width:40px;font-size:20px}
.stepper .btn.icon{min-width:42px;min-height:44px}
.now-act{display:flex;align-items:center;gap:var(--space-2)}
.now-act .clock{font-size:28px;min-width:72px}
.now-act .btn.primary{min-height:48px}
.now-act .progress.big{height:12px}
.now-next{font-size:12px;opacity:.8}
.now.done{flex-direction:row!important;justify-content:space-between;align-items:center}
.motion.md{width:64px;height:64px}
.alt-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-2)}
.alt{display:flex;align-items:center;gap:var(--space-2);text-align:left;padding:6px;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--surface-000);min-height:72px;font:inherit;color:inherit;cursor:pointer}
.alt span:last-child{font-size:13px;font-weight:600;line-height:1.25;overflow-wrap:anywhere}
@media (max-width:899px){.sess-top{--mt:52px}}
.table-wrap{overflow-x:auto}
/* compare: stacked rows instead of a cramped table */
.cmp-row{padding:var(--space-3) 0;border-top:1px solid var(--line-soft)}.cmp-row:first-child{border-top:0;padding-top:0}
.cmp-l{font-weight:600;margin-bottom:var(--space-2)}
.cmp-v{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-2)}
.cmp-v span{display:flex;flex-direction:column;gap:2px;min-width:0}
.cmp-v i,.cmp-tops i{font-style:normal;font-size:11px;color:var(--muted);letter-spacing:.06em}
.cmp-v b{font-size:18px;white-space:nowrap}
.cmp-tops{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-3)}
.cmp-lift{display:flex;flex-direction:column;margin-top:6px;font-size:12px;line-height:1.3}.cmp-lift b{font-weight:600;overflow-wrap:anywhere}
.cmp-gl summary{cursor:pointer;font-weight:700;min-height:32px}
.cmp-gl dl{margin:var(--space-3) 0 0}.cmp-gl .gl{margin-bottom:var(--space-3)}.cmp-gl dt{font-weight:700}.cmp-gl dd{margin:2px 0 0;color:var(--muted);font-size:13px;line-height:1.4}
/* day cards: raised surface + status stripe instead of a flat tint */
.day{box-shadow:var(--shadow-pop);border:1px solid var(--edge);border-left-width:6px;background:var(--surface-000)}
.day.s-done{background:var(--surface-000);border-left-color:var(--done)}
.day.s-planned{background:var(--surface-000);border-left-color:var(--planned-ink)}
.day.s-in_progress{border-left-color:var(--accent)}
.day.s-missed{border-left-color:var(--missed-ink,#a4572b)}
.day.s-rest,.day.s-empty{box-shadow:none;border-color:var(--line);border-left-width:1px;background:var(--surface-100,var(--surface-000))}
.day.s-done .dd::after{content:" ✓";color:var(--done-ink,#2e6b2a);font-size:14px}
.day-body{all:unset;box-sizing:border-box;display:flex;flex-direction:column;gap:var(--space-2);cursor:pointer;border-radius:var(--radius-md);width:100%;min-width:0}
.day-body:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.day .motion-strip{margin:0;gap:4px;flex-wrap:wrap;min-width:0}.day .motion-strip .motion{width:36px;height:36px}.day .motion-strip .more{align-self:center;font-size:12px}
.day{min-width:0;overflow:hidden}.day>.row.spread{flex-wrap:wrap;gap:4px}.day .badge{white-space:nowrap}.day .rname{min-width:0;overflow-wrap:anywhere}.day .row{min-width:0}
