:root{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',sans-serif;color-scheme:dark;font-synthesis:none;--bg:#101013;--surface:#202024;--surface2:#2b2b31;--line:#3b3b45;--text:#f6f6f8;--muted:#aaa9b4;--accent:#ef4444;--accent-active:#e33131;--radius:16px;--safe-bottom:env(safe-area-inset-bottom,0px);--safe-top:env(safe-area-inset-top,0px)}*{box-sizing:border-box}html,body{height:100%;margin:0;background:var(--bg);color:var(--text);overscroll-behavior:none;-webkit-tap-highlight-color:transparent}button,input,select,textarea{font:inherit}button{cursor:pointer;touch-action:manipulation;color:inherit}button:disabled{opacity:.4}input,select,textarea{width:100%;min-width:0;border:1px solid var(--line);border-radius:11px;background:#151518;color:var(--text);min-height:42px;padding:9px 11px;font-size:16px}input:focus,textarea:focus,select:focus,button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}textarea{resize:vertical;line-height:1.45}input[type='checkbox']{accent-color:var(--accent);width:22px;height:22px;min-height:0;flex-shrink:0}input[type='file']{font-size:13px;padding:10px;height:auto}input[type='file']::file-selector-button{border:0;border-radius:8px;color:#fff;background:#484850;padding:10px;margin-right:9px}h1,h2,h3,p{margin-top:0}h1{font-size:23px;letter-spacing:-.6px;margin-bottom:0}h2{font-size:17px;letter-spacing:-.2px;margin-bottom:0}h3{font-size:16px;margin-bottom:9px}p{line-height:1.5}small{font-size:12px}label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:#c9c8d0;min-width:0}strong{font-weight:650}.muted,.hint{color:var(--muted)}.hint{font-size:12px;line-height:1.45;margin:7px 0}.center{text-align:center}.margin-top{margin-top:8px}.warning{color:#ffb1b1}.boot,.fatal{max-width:430px;margin:20vh auto;text-align:center;padding:25px}.brand-icon{font-size:64px;color:var(--accent)}.shell{display:flex;flex-direction:column;height:100dvh;max-width:650px;margin:auto;background:var(--bg);overflow:hidden}.main-scroll{padding:calc(14px + var(--safe-top)) 16px 24px;overflow-x:hidden;overflow-y:auto;flex:1;min-height:0;scrollbar-width:thin;overscroll-behavior-y:contain}.topbar{display:flex;justify-content:space-between;align-items:center;min-height:58px;margin-bottom:15px}.brand{display:flex;align-items:center;gap:12px}.brand small,.edit-header small{color:var(--muted);display:block;margin-top:4px}.mini-logo svg{width:30px;height:30px}.mini-logo{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#341618;color:var(--accent);font-size:27px}.icon-btn{background:var(--surface);border:1px solid var(--line);border-radius:12px;width:43px;height:43px;font-size:21px}.tabs{display:grid;grid-template-columns:repeat(4,1fr);background:#19191e;border-top:1px solid var(--line);padding:7px 7px calc(7px + var(--safe-bottom));gap:4px;flex-shrink:0}.tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;background:transparent;border-radius:9px;min-height:48px;color:var(--muted)}.tab span{font-size:23px;line-height:1}.tab small{font-size:11px}.tab.active{color:#ff6767;background:#3b2023}.card{background:var(--surface);border:1px solid #33333b;border-radius:var(--radius);padding:15px;margin:10px 0}.highlight{border-color:#733435;background:linear-gradient(135deg,#331e22 0%,#231c20 100%)}.reminder{background:#242226}.split{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}.split>div{min-width:0}.split small{display:block;color:var(--muted);margin-top:5px}.call-to-action{display:flex;flex-direction:column;gap:13px;align-items:flex-start}.section{margin:23px 0}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.section .card{margin:8px 0}.btn{display:inline-flex;align-items:center;justify-content:center;min-width:0;min-height:42px;border:1px solid var(--line);border-radius:11px;padding:10px 13px;background:var(--surface2);white-space:normal;text-align:center;font-size:14px;font-weight:600;line-height:1.25}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.primary:active{background:var(--accent-active)}.btn.ghost{background:var(--surface)}.btn.dashed{background:#201719;border:1px dashed #b15151;color:#ffc1c1}.btn.dangerous{border-color:#a04343;background:#51282a;color:#ffd1d1}.btn.tile{min-height:75px;background:var(--surface);font-size:14px}.btn.large{min-height:50px;font-size:16px}.btn.small{min-height:37px;padding:7px 10px;font-size:12px}.btn.tiny{min-height:34px;min-width:34px;padding:4px 8px}.btn.icon-only{min-width:31px;min-height:31px;padding:3px;font-size:21px}.btn.full{width:100%;margin-top:10px}.btn.chosen{background:#6a272c;border-color:#a43940;color:#fff}.link-btn{border:0;padding:6px 0;background:none;color:#ff8e8e;text-align:left;font-size:12px;min-height:30px;display:inline-flex;align-items:center}.link-btn.danger{color:#df8188}.twocol{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:0}.summary-grid .card{min-height:93px}.summary-grid .card>span{display:block;font-size:12px;color:var(--muted)}.summary-grid .card>strong{font-size:26px;display:block;line-height:1.7}.summary-grid .card>strong small{font-size:14px;color:var(--muted)}.period-buttons{display:flex;flex-wrap:wrap;gap:5px;margin:10px 0 14px}.chip{background:#28272c;border:1px solid var(--line);border-radius:9px;min-height:33px;padding:6px 10px;font-size:12px;color:#c0bec7;flex:1 1 auto}.chip.selected{background:#69272c;border-color:#c1484f;color:#fff}.dates{margin:10px 0}.bars{display:flex;gap:7px;align-items:flex-end;height:155px;padding:8px 4px 0;background:#19191d;border-radius:12px}.bar-unit{display:flex;flex:1;min-width:0;height:100%;align-items:center;flex-direction:column;justify-content:flex-end}.bar-count{font-size:10px;color:#dad7de}.bar-track{height:113px;width:100%;max-width:42px;display:flex;flex-direction:column;justify-content:flex-end}.bar-fill{background:linear-gradient(0deg,#b32631,#ef4444);display:block;border-radius:5px 5px 1px 1px;min-height:1px}.bar-unit small{font-size:9px;margin:5px 0;color:var(--muted);white-space:nowrap}.muscle-row{display:flex;justify-content:space-between;align-items:center;gap:6px;padding:10px 0;border-bottom:1px solid #35353b;font-size:13px}.muscle-row:last-child{border-bottom:0}.muscle-chips{text-align:right;font-size:11px;white-space:nowrap}.muscle-chips small{display:block;color:var(--muted)}.list-card{background:var(--surface);border:1px solid var(--line);border-radius:15px;overflow:hidden;margin:10px 0}.list-button{width:100%;background:none;border:0;border-bottom:1px solid #35353c;padding:14px 13px;min-height:63px;display:flex;justify-content:space-between;align-items:center;gap:8px;text-align:left}.list-button:last-child{border-bottom:0}.list-button span:first-child{min-width:0}.list-button strong{display:block;font-size:14px;white-space:normal;overflow-wrap:anywhere}.list-button small{display:block;color:var(--muted);margin-top:5px;font-size:11px}.chevron{font-size:25px;color:#97949b}.empty{text-align:center;border:1px dashed #48444d;border-radius:14px;padding:25px 15px;font-size:13px;color:var(--muted);line-height:1.5;margin:12px 0}.tools{margin:14px 0}.tools .btn{flex-shrink:0}.template-list-item{display:flex;align-items:center;justify-content:space-between;gap:6px;border-bottom:1px solid #36343b;padding:9px 9px 9px 14px;min-height:67px}.template-list-item:last-child{border-bottom:0}.name-button{background:transparent;border:0;padding:4px 0;flex:1;text-align:left;min-width:0}.name-button strong{display:block;font-size:14px;overflow-wrap:anywhere}.name-button small{display:block;color:var(--muted);margin-top:6px}.item-actions{display:flex;gap:5px;flex-shrink:0}.segmented{display:flex;background:#232329;border:1px solid var(--line);padding:4px;gap:2px;border-radius:12px;margin:11px 0}.segmented .btn{flex:1;background:transparent;border:0;font-size:12px;min-height:35px;padding:7px 4px}.segmented .btn.chosen{background:#703035}.tabs-secondary{margin-bottom:15px}.search-label{margin:12px 0}.edit-header{display:flex;justify-content:space-between;margin:4px 0 15px}.edit-meta{display:grid;gap:12px}.text-label{margin:12px 0}.exercise-block{margin:16px 0;background:#202024;border:1px solid #393841;border-radius:16px;padding:12px}.exercise-head{display:flex;align-items:flex-start;justify-content:space-between;gap:9px}.exercise-head h3{margin:6px 0 0;font-size:16px;line-height:1.3;overflow-wrap:anywhere}.eyebrow{font-size:11px;letter-spacing:.3px;text-transform:uppercase;color:#a7a3ad}.reorder{display:flex;flex-shrink:0;gap:4px}.ex-tools{display:flex;flex-wrap:wrap;gap:12px;margin:5px 0}.set-list{margin:9px 0}.set-row{background:#19191d;border:1px solid #33323a;border-radius:12px;padding:8px;margin-bottom:8px}.set-row.done{background:#1c2521;border-color:#416d54}.set-line{display:flex;align-items:center;gap:6px;min-width:0}.set-count{font-size:12px;font-weight:700;color:var(--muted);flex:0 0 15px;text-align:center}.set-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;flex:1;min-width:0}.number-control{display:flex;flex-direction:column;min-width:0;gap:4px;color:var(--muted);font-size:10px}.number-body{display:flex;width:100%;min-width:0;align-items:center;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#28282f;height:38px}.number-body .num-step{border:0;background:#33333c;min-height:37px;min-width:23px;flex:0 0 23px;padding:0;font-size:15px}.number-body input{background:transparent;text-align:center;font-size:14px;border:0;border-radius:0;padding:0 1px;width:100%;min-width:0;height:37px;min-height:37px;appearance:textfield}.number-body input::-webkit-inner-spin-button,.number-body input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.complete-check{flex:0 0 31px;width:31px;min-height:37px;border:1px solid #6b5e64;background:#30272a;border-radius:9px;color:var(--muted);font-size:18px}.complete-check.checked{background:#146d46;color:#fff;border-color:#27885b}.set-note{border:0;background:transparent;min-height:30px;height:32px;font-size:12px;padding:3px 7px;color:#dad7df;margin-top:4px}.timer-card{position:sticky;top:0;z-index:2;border-color:#963d45;background:linear-gradient(125deg,#321f23,#242026);box-shadow:0 5px 16px #0008}.timer-value{display:block;font-size:31px;margin-top:4px;font-variant-numeric:tabular-nums}.timer-label{font-size:12px;color:#ff9c9c}.timer-progress{height:6px;background:#553236;border-radius:8px;overflow:hidden;margin:10px 0}.timer-progress>div{height:100%;background:var(--accent)}.timer-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.timer-actions .btn{padding:7px 2px}.chart-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:12px 9px;margin-top:14px}.chart-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:5px 7px}.chart-heading small{color:var(--muted)}.plot{width:100%;height:auto;max-height:235px;overflow:visible;touch-action:manipulation}.plot circle{cursor:pointer}.record{padding:14px;border-bottom:1px solid #38363e}.record:last-child{border-bottom:0}.record strong{display:block;font-size:14px}.record small{display:block;margin:6px 0;color:var(--muted)}.record summary{cursor:pointer;font-size:12px;color:#ff9999;margin-top:8px}.record details p{margin:4px 0;font-size:12px}.modal-layer{position:fixed;inset:0;z-index:100;display:flex;align-items:flex-end;justify-content:center;padding-top:var(--safe-top)}.modal-backdrop{position:absolute;inset:0;background:#000b;backdrop-filter:blur(3px)}.sheet{position:relative;z-index:1;width:min(100%,610px);max-height:calc(100dvh - var(--safe-top) - 12px);overflow:hidden;border-radius:22px 22px 0 0;background:#25252a;border:1px solid #44414b;box-shadow:0 -14px 35px #0008;display:flex;flex-direction:column;padding-bottom:var(--safe-bottom)}.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 16px 12px;border-bottom:1px solid #3a3941}.sheet-head h2{font-size:19px;overflow-wrap:anywhere}.sheet-head small{display:block;margin-top:4px;color:var(--muted)}.btn.close{font-size:25px;min-width:38px;min-height:38px;padding:1px 8px;flex-shrink:0}.sheet-content{overflow-y:auto;padding:16px 16px 26px;overscroll-behavior-y:contain}.sheet-content>label,.sheet-content>h3{margin:13px 0 9px}.sheet-content>h3{border-top:1px solid #404047;padding-top:20px}.sheet-content>h3:first-child{border-top:0;padding-top:0}.sheet-content .toggle-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center;min-height:44px}.sheet-content .btn.full{min-height:43px}.pick-list{max-height:35dvh;overflow:auto}.detail-ex{border-bottom:1px solid var(--line);padding:12px 0}.detail-ex p{font-size:13px;margin:7px 0}.detail-ex small{color:var(--muted)}.info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.info-grid strong,.info-grid small{display:block;overflow-wrap:anywhere}.info-grid small{color:var(--muted);margin-bottom:6px}.import-item,.import-ex{border:1px solid var(--line);padding:12px;border-radius:12px;margin:11px 0}.import-ex{background:#1d1d21}.import-ex strong,.import-ex small{display:block}.import-ex small{color:var(--muted);margin:4px 0}.import-set{margin:7px 0}.pr-item{padding:10px 12px;border-bottom:1px solid var(--line);margin:0;color:#ffc2c2}#toast{position:fixed;bottom:calc(85px + var(--safe-bottom));left:50%;transform:translate(-50%,20px);background:#36323b;color:#fff;border:1px solid #6a606e;border-radius:12px;padding:11px 14px;max-width:90vw;min-width:190px;text-align:center;font-size:13px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:300}#toast.show{opacity:1;transform:translate(-50%,0)}#toast.error{background:#6f2027;border-color:#ef4444}.fat a{color:var(--accent)}
@media(max-width:385px){.main-scroll{padding-left:11px;padding-right:11px}.exercise-block{padding:9px}.set-row{padding:6px}.set-line{gap:4px}.set-fields{gap:4px}.number-body .num-step{min-width:20px;flex-basis:20px;font-size:14px}.number-body input{font-size:13px}.complete-check{flex-basis:27px;width:27px}.set-count{flex-basis:11px}.item-actions .btn{padding-left:6px;padding-right:6px}.btn.small{font-size:11px}.tabs{gap:0}}
@media(min-width:650px){.shell{border-left:1px solid var(--line);border-right:1px solid var(--line)}.main-scroll{padding-left:25px;padding-right:25px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* FitTrack 1.1 – iPhone layout and interaction refinements */
html,body{width:100%;min-height:100%;overflow:hidden;background:#19191e}
#app{position:fixed;inset:0;overflow:hidden;background:#19191e}
.shell{position:relative;inset:auto;width:100%;height:100%;max-height:100%;min-height:0;overscroll-behavior:none}
.main-scroll{background:var(--bg);overflow-x:hidden;min-width:0;padding-bottom:calc(28px + var(--safe-bottom))}
.tabs{position:relative;bottom:0;left:0;width:100%;margin:0;z-index:4;background:#19191e;padding-bottom:calc(8px + var(--safe-bottom));border-bottom:0}
.twocol,.edit-meta,.card,.section,.filter-grid,.dates,.date-trigger{min-width:0;max-width:100%}
.dates{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.dates>label{min-width:0;overflow:hidden}
.date-trigger{display:flex;align-items:center;justify-content:space-between;gap:4px;width:100%;height:48px;text-align:left;border:1px solid var(--line);background:#161619;color:var(--text);border-radius:12px;padding:10px 11px;font-size:clamp(13px,3.7vw,16px);font-variant-numeric:tabular-nums;white-space:nowrap}
.date-trigger span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis}.date-trigger span:last-child{font-size:19px;color:#edabab;flex-shrink:0}
.edit-meta{overflow:hidden}.edit-meta>label{max-width:100%}
textarea[data-grow],#custom-description{overflow:hidden;resize:none;height:auto;min-height:64px;max-height:none;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.48}
.filter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.filter-grid>label:last-child{grid-column:1/-1}
.filter-grid select,.filter-grid label{min-width:0;width:100%}
.exercise-head>div:first-child{min-width:0;overflow-wrap:anywhere}
.exercise-head h3{margin:0 0 5px}.exercise-meta{color:#b5b2be;font-size:11px;display:block;line-height:1.45}
.exercise-info-btn{font-size:20px;border-radius:50%;flex-shrink:0;width:37px;height:37px;padding:0}
.ex-tools{gap:7px 12px}.abort-top{margin:3px 0 5px;width:100%;background:#352022}
.set-line{align-items:flex-end;gap:6px}.set-count{align-self:flex-end;line-height:38px;min-height:38px}
.set-fields{align-items:end;grid-template-columns:repeat(2,minmax(0,1fr))}.set-fields.single-field{grid-template-columns:minmax(0,1fr)}
.number-control{align-self:end}.number-control>span:first-child{height:16px;line-height:16px;white-space:nowrap}
.number-body{height:40px}.number-body .num-step{height:40px;min-height:40px}.number-body input{height:40px;min-height:40px}
.set-line .complete-check,.set-line .delete-set-btn{flex:0 0 38px;width:38px;height:40px;min-height:40px;align-self:flex-end;display:flex;align-items:center;justify-content:center;padding:0;border-radius:9px}
.set-line .delete-set-btn{font-size:24px}
.timer-actions{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.timer-actions .btn{min-width:0;font-size:12px;padding:7px 0;white-space:nowrap;line-height:1.15;min-height:39px}
.muscle-map{margin:4px 0 15px;border:1px solid var(--line);border-radius:14px;padding:12px;background:#1a1b20}.body-figures{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;justify-content:center;max-width:340px;margin:0 auto}.body-figure{text-align:center;min-width:0}.body-figure svg{display:block;width:100%;height:195px;max-width:125px;margin:auto}.body-figure span{font-size:11px;color:var(--muted);display:block;margin:3px auto 7px}.muscle-legend{display:flex;flex-wrap:wrap;gap:9px;font-size:12px;line-height:1.5;margin:8px 0}.muscle-legend>span{display:flex;align-items:flex-start;gap:6px}.muscle-legend i{display:inline-block;width:11px;height:11px;border-radius:3px;margin-top:4px;flex-shrink:0}.marker-primary{background:#ef4444}.marker-secondary{background:#fbab7b}.exercise-guide{line-height:1.55;color:#edeaed;margin:9px 0 18px;font-size:14px}
.calendar-sheet{max-width:440px}.calendar-sheet .sheet-content{padding:13px 15px 20px}.date-picks{margin:2px 0 15px}.date-picks .btn{min-height:44px;font-size:13px;font-variant-numeric:tabular-nums;padding:8px 4px}.calendar-month{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:5px 0 14px}.calendar-month strong{text-transform:capitalize;font-size:16px}.calendar-month button{width:41px;height:41px;border:1px solid var(--line);border-radius:11px;background:var(--surface2);font-size:26px}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.weekday{font-size:11px;color:var(--muted);text-align:center;padding:7px 0}.calendar-day{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1;min-height:37px;border:1px solid transparent;background:transparent;border-radius:12px;font-size:14px;font-variant-numeric:tabular-nums}.calendar-day.today{border-color:#af565d}.calendar-day.in-range{background:#3a2226;border-radius:7px}.calendar-day.active{background:var(--accent);color:#fff;font-weight:700}.calendar-footer{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0 0}.calendar-footer .btn{width:100%}
.reorder-sheet .sheet-content{padding:12px 15px 22px}.reorder-list{display:flex;flex-direction:column;gap:9px;margin:13px 0 20px}.reorder-item{display:flex;align-items:center;gap:10px;padding:8px;background:#1b1b21;border:1px solid #55505a;border-radius:12px;min-height:66px;user-select:none;-webkit-user-select:none}.reorder-item.dragging{z-index:3;position:relative;background:#3f2b31;box-shadow:0 10px 22px #0009;pointer-events:none}.reorder-item.drop-target{border-color:#ef4444;background:#37272c}.reorder-handle{width:39px;height:44px;display:grid;place-items:center;font-size:27px;flex-shrink:0;color:#eb9296;cursor:grab;touch-action:none;user-select:none}.reorder-title{flex:1;min-width:0;overflow-wrap:anywhere}.reorder-title strong,.reorder-title small{display:block}.reorder-title strong{font-size:14px}.reorder-title small{font-size:11px;color:var(--muted);margin-top:5px}.reorder-arrows{display:flex;gap:4px}.reorder-arrows .btn{min-width:31px;min-height:37px;padding:2px;font-size:18px}
@media(max-width:385px){.set-row{padding:6px}.set-line{gap:4px}.number-body .num-step{min-width:23px;flex-basis:23px}.set-line .complete-check,.set-line .delete-set-btn{flex-basis:34px;width:34px}.set-count{flex-basis:11px}.timer-actions{gap:4px}.timer-actions .btn{font-size:11px}.calendar-day{min-height:34px}}

/* FitTrack 1.1.1 – viewport-stabile Navigation und lesbare iOS-Eingaben */
/* Der App-Container besitzt die komplette Bildschirmhöhe. Die Tabs werden
   dadurch nicht mehr unterhalb eines nur inhaltshohen Flex-Containers platziert. */
html,body { width:100%; height:100vh; overflow:hidden; }
#app { position:fixed; inset:0; display:block; overflow:hidden; }
#app > .shell {
  position:absolute;
  top:0;
  right:0;
  bottom:0;
  left:0;
  width:100%;
  height:auto;
  min-height:0;
  max-height:none;
  max-width:650px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
#app .main-scroll { flex:1 1 auto; min-height:0; overflow-y:auto; }
#app .tabs { flex:0 0 auto; width:100%; margin-top:auto; }
/* iOS Safari vergrößert bei fokussierten Formularfeldern unter 16px den Viewport.
   Die Eingaben dürfen daher auch auf schmalen iPhones nicht kleiner werden. */
.number-body input { font-size:16px; }
@media (max-width:385px) { .number-body input { font-size:16px; } }

/* FitTrack 1.1.2 – iOS standalone Home Screen window
   iOS 26 can paint a dead band (roughly the STATUS-bar height) below the
   viewport with black-translucent + viewport-fit=cover. The HTML now uses
   an opaque status bar and the default viewport fitting; the Home Screen
   webview starts below the status bar and extends to the device bottom.
   Some iOS builds report env(safe-area-inset-bottom)=0 in that configuration.
   The one-time startup measurement in app.js adds home-indicator clearance
   for notched iPhones when needed. Do not shift the tab bar with transforms:
   it must stay in the normal flex layout at the bottom of the app shell. */
:root { --standalone-home-padding: 0px; --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--standalone-home-padding)); }
html, body { background:#101013; }
#app { background:#101013; }
#app > .shell { min-height:0; }

/* FitTrack 1.2.0: split chart, persistent editing controls and native-touch haptics */
.muscle-split{padding:16px 17px}
.muscle-share{margin-bottom:17px}
.muscle-share:last-child{margin-bottom:0}
.muscle-share-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px;font-size:14px}
.muscle-share-head strong{color:#c6c3cb;font-size:14px;min-width:42px;text-align:right;font-variant-numeric:tabular-nums}
.muscle-share-track{height:12px;border-radius:999px;background:#34343c;overflow:hidden}
.muscle-share-track>span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#b52d35,#ef4444)}
.detail-title{display:block;font-size:16px;line-height:1.38;overflow-wrap:anywhere}
.detail-meta{display:block;margin-top:4px;font-size:12px;line-height:1.5;color:var(--muted)}
.detail-ex{padding:15px 0}
.rest-timer-slot{position:sticky;top:0;z-index:4}
.rest-timer-slot:empty{display:none}
.rest-timer-slot .timer-card{position:relative;top:auto}
.live-pr{display:flex;flex-wrap:wrap;gap:6px}
.live-pr:empty{display:none}
.live-record{font-size:12px;font-weight:650;color:#ffd9a3;background:#412c1e;border:1px solid #986c35;border-radius:9px;padding:7px 9px;max-width:100%;overflow-wrap:anywhere}
.complete-check.unchecked{color:#9da1ac;background:#292a30;border-color:#5d5e67}
.complete-check.unchecked span{opacity:.47}
.complete-check.checked{color:#fff;background:#146d46}
/* Native iOS "switch" must receive a physical tap. No script-driven click is used. */
.ios-haptic{position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer;isolation:isolate;overflow:hidden;font-size:15px;flex-shrink:0}
.ios-haptic>span{pointer-events:none;display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:inherit;color:inherit}
.ios-haptic input.haptic-native,
.ios-haptic input[type='checkbox'].haptic-native{position:absolute;inset:0;z-index:2;display:block;width:100%;height:100%;min-height:100%;margin:0;padding:0;opacity:0;appearance:auto;-webkit-appearance:auto;border:none;border-radius:0;background:transparent;cursor:pointer;touch-action:manipulation}
.number-body .ios-haptic.num-step{flex:0 0 26px;min-width:26px;height:40px;min-height:40px;border:0;background:#33333c;padding:0}
.number-body input[type='number']{font-size:16px}
.set-line .ios-haptic.complete-check{flex:0 0 38px;width:38px;height:40px;min-height:40px}
.muscle-map{padding:15px;background:#18191d;border-color:#393943}
.muscle-map .muscle-legend{margin:0 0 17px;gap:7px}
.muscle-map .muscle-legend>span{border-radius:999px;background:#29292f;padding:6px 10px;font-size:11px;line-height:1.4}
.muscle-map .body-figures{max-width:420px;gap:14px}
.muscle-map .body-figure svg{max-width:170px;height:235px}
.muscle-map .body-figure span{font-size:12px;margin-top:4px}
@media(max-width:385px){.number-body input[type='number']{font-size:16px}.number-body .ios-haptic.num-step{flex-basis:23px;min-width:23px}.set-line .ios-haptic.complete-check{flex-basis:34px;width:34px}.muscle-map .body-figure svg{height:206px}}

/* FitTrack 1.2.1 – Library/status layout, coherent reorder icon, stable set editing */
.library-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
.library-filter-grid>label:last-child{grid-column:auto;}
.reorder-icon{color:var(--accent);stroke:currentColor;flex:0 0 18px;vertical-align:middle;margin-right:7px;}
[data-action="reorder-open"]{gap:0;}
.detail-section-title{font-size:17px;margin:20px 0 9px;}
.sheet-content .muscle-split{margin:8px 0;}
/* Do not let browser scroll anchoring move the entire workout while editing sets. */
.main-scroll:has(.exercise-block){overflow-anchor:none;}
.set-list{overflow-anchor:none;}

/* FitTrack 1.3.0 – unified exercise taxonomy and workout duration */
[hidden]{display:none!important}
.library-filter-grid>label:last-child{grid-column:auto}
.filter-grid:has(> label:nth-child(2):last-child)>label:last-child{grid-column:auto}
.summary-grid-three{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.summary-grid-three>.card:last-child{grid-column:1/-1}
.summary-grid-three>.card strong{font-size:clamp(19px,5vw,28px);line-height:1.25;overflow-wrap:anywhere}
.summary-grid-three>.card>small{color:var(--muted);display:block;margin-top:7px}
.training-clock{display:inline-flex;align-items:center;justify-content:center;gap:4px;font-size:12px;white-space:nowrap;color:#c8c4ca;font-variant-numeric:tabular-nums;min-width:0}
.edit-header:has(.training-clock){gap:7px}
.edit-header:has(.training-clock) .btn{min-width:0;padding:9px 10px;font-size:clamp(12px,3.5vw,15px)}
.secondary-groups{border:1px solid var(--line);border-radius:13px;padding:13px 11px;margin:15px 0 7px;min-width:0}
.secondary-groups legend{color:#c9c8d0;font-size:13px;padding:0 5px}
.secondary-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.secondary-check{display:flex;align-items:center;flex-direction:row;gap:8px;border:1px solid #434149;border-radius:10px;padding:9px 8px;min-width:0;line-height:1.3;font-size:12px;background:#1b1b20;color:#eee}
.secondary-check span{overflow-wrap:anywhere;flex:1}
.secondary-check input{width:19px;height:19px;flex:0 0 19px}
.exercise-history{margin:10px 0 15px}
.exercise-history-item{padding:12px 13px;border-bottom:1px solid #45434b;display:flex;flex-direction:column;gap:6px}
.exercise-history-item:last-child{border-bottom:none}
.exercise-history-item strong{font-size:13px;color:#f8f6f8}
.exercise-history-item small{font-size:12px;color:#c2bec7}
.figure-side-label{display:block;color:#ebc3c5!important;font-size:11px!important;font-weight:750;letter-spacing:1px;margin:8px auto 5px!important}
.body-figure svg{max-width:140px;height:213px;filter:drop-shadow(0 2px 4px #0007)}
@media(max-width:390px){.training-clock{font-size:11px}.edit-header:has(.training-clock) .btn{font-size:12px;padding:8px 7px}.body-figure svg{height:190px}}
/* FitTrack 1.4 – Projektquellenexport und bearbeitbare Importvorschau. */
.catalog-exports{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}
.catalog-exports .btn{flex:1 1 155px;font-size:12px;min-height:44px}
.import-new-fields{border:1px solid #885056;border-radius:12px;background:#241d21;padding:12px;margin:12px 0;min-width:0}
.import-new-fields legend{font-size:13px;color:#ffc0c0;padding:0 6px;font-weight:650}
.import-new-fields>label,.import-new-fields>.twocol{margin:11px 0}
.import-new-fields .secondary-groups{margin:14px 0}
.import-new-fields .secondary-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.import-new-fields .secondary-check{min-width:0;font-size:12px;overflow-wrap:anywhere}
.import-new-fields .twocol{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.import-new-fields input,.import-new-fields textarea,.import-new-fields select{font-size:16px;max-width:100%}
@media (max-width:380px){.catalog-exports .btn{flex:1 1 100%;}.import-new-fields{padding:9px}.import-new-fields .twocol{grid-template-columns:minmax(0,1fr)}}

/* FitTrack Beta: separate online catalog, enriched exercise cards, hold-time input */
.beta-catalog-cta{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;background:linear-gradient(110deg,#332025,#252126);border:1px solid #793e47;border-radius:17px;margin:13px 0 18px}
.beta-catalog-cta strong,.beta-catalog-cta small{display:block}.beta-catalog-cta small{font-size:12px;color:#bfb6bc;margin-top:6px;line-height:1.45}
.beta-catalog-cta button{max-width:140px;flex-shrink:0;font-size:12px;padding:11px 8px}
.beta-library-item{width:100%;display:flex;align-items:center;gap:12px;background:transparent;color:inherit;text-align:left;border:0;border-bottom:1px solid var(--line);padding:12px;min-height:78px}
.beta-library-item>span:nth-child(2){flex:1;min-width:0}.beta-library-item strong,.beta-library-item small{display:block}.beta-library-item strong{font-size:14px}.beta-library-item small{font-size:11px;color:var(--muted);margin-top:5px;line-height:1.4}
.exercise-thumb{width:65px;height:65px;flex:0 0 65px;border-radius:11px;object-fit:cover;background:#292a30;display:block;overflow:hidden}
.thumb-placeholder{display:flex;align-items:center;justify-content:center;border:1px solid #474049;color:#df6a72}
.thumb-placeholder svg{width:28px;height:28px}.level-tag{display:inline-block;width:max-content;border-radius:999px;margin-top:8px;padding:4px 9px;font-size:11px;font-weight:650;background:#33333b;color:#dbdbe4}
.level-tag.easy{background:#1b4637;color:#a5eccc}.level-tag.medium{background:#5b451e;color:#ffdc90}.level-tag.hard{background:#582931;color:#ffb9be}
.catalog-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:14px 0}.catalog-heading span{font-size:12px;color:var(--muted)}.catalog-intro{border-radius:14px;border:1px solid #47313a;background:linear-gradient(100deg,#332025,#18191c);padding:15px;margin-bottom:14px}.catalog-intro strong,.catalog-intro small{display:block}.catalog-intro small{color:#bbb2b8;font-size:12px;line-height:1.5;margin-top:6px}
.catalog-results{display:flex;flex-direction:column;gap:10px;margin:14px 0}.catalog-result{display:flex;gap:12px;background:var(--surface);border:1px solid var(--line);border-radius:15px;padding:12px;min-width:0}.catalog-result>.exercise-thumb{width:90px;height:100px;flex:0 0 90px}.catalog-result-body{display:flex;flex-direction:column;align-items:flex-start;gap:4px;flex:1;min-width:0}.catalog-result-body strong{font-size:14px;line-height:1.4;overflow-wrap:anywhere}.catalog-result-body small{font-size:11px;color:var(--muted);line-height:1.4}.catalog-result-tags{margin:0 0 5px}.catalog-result .btn{min-height:37px;line-height:1.2}
.catalog-footer{padding:16px 0 26px}.catalog-empty{margin:20px 0}.catalog-empty .btn{margin-top:12px}
.beta-media-row{display:flex;gap:10px;overflow-x:auto;padding:3px 0 12px;scroll-snap-type:x mandatory}.beta-media-row img{width:46%;max-width:215px;aspect-ratio:1/1;object-fit:cover;border-radius:14px;background:#2e2f36;flex:0 0 46%;scroll-snap-align:start;border:1px solid #47454e}.beta-media-row .thumb-placeholder{min-height:110px;padding:20px;border-radius:15px;width:100%}
.beta-info-pills{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0}.beta-info-pills .level-tag{margin:0}.beta-info-pills .pill{font-size:11px}
.hold-start{margin:8px 0 4px 30px;width:auto;min-height:36px;border-color:#7d4e55;color:#f4adb6}
.hold-timer-slot:not(:empty){position:sticky;top:0;z-index:5}.hold-banner{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid #b15a66;border-radius:11px;padding:9px 12px;background:#362429;box-shadow:0 4px 16px #0005;font-size:13px;font-weight:600}.hold-banner .btn{font-size:12px}
@media(max-width:385px){.beta-catalog-cta{padding:11px;gap:6px}.beta-catalog-cta button{font-size:11px;max-width:124px}.catalog-result>.exercise-thumb{width:75px;flex-basis:75px;height:92px}.catalog-result{padding:9px;gap:9px}}
/* Anatomical map (original Beta artwork + proportional muscle overlays) */
.anatomy-map{background:linear-gradient(160deg,#24242a,#16171b);border-color:#47414b;padding:14px 12px}
.anatomy-map .eyebrow{color:#f7b4b8;font-weight:700;letter-spacing:.08em;margin:0 0 12px}
.anatomy-map .body-figures{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-width:480px;gap:6px}
.anatomy-figure{min-width:0}.anatomy-photo{position:relative;width:100%;aspect-ratio:530/1024;border-radius:10px;overflow:hidden;background:#18191d}
.anatomy-photo img{display:block;width:100%;height:100%;object-fit:contain}
.anatomy-photo svg{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;mix-blend-mode:screen;filter:drop-shadow(0 0 3px #d32c3680)}
.anatomy-figure .figure-side-label{display:block;font-size:12px;font-weight:600;color:#e5e0e7;margin:9px 0 6px}
.anatomy-map .muscle-legend>span{font-size:11px}
