:root{--bg:#f4f5f9;--surface:#fff;--surface-2:#eef0f6;--text:#1c2030;--muted:#6b7185;--border:#e1e4ee;--accent:#4f46e5;--accent-soft:#e8e7fd;--ok:#15803d;--ok-soft:#dcfce7;--warn:#b45309;--warn-soft:#fef3c7;--bad:#b91c1c;--bad-soft:#fee2e2;--radius:14px;--tabbar-h:62px;color:var(--text);background:var(--bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}@media (prefers-color-scheme:dark){:root{--bg:#101118;--surface:#1a1c26;--surface-2:#242734;--text:#e8e9f0;--muted:#9aa0b4;--border:#2c2f3d;--accent:#818cf8;--accent-soft:#2b2b52;--ok:#4ade80;--ok-soft:#14321f;--warn:#fbbf24;--warn-soft:#3a2c0b;--bad:#f87171;--bad-soft:#3d1717}}*{box-sizing:border-box}body{background:var(--bg);min-height:100dvh;margin:0}body.no-scroll{overflow:hidden}a{color:var(--accent)}h1,h2,h3{margin:0}input,select,textarea,button{font:inherit;font-size:16px}input,select,textarea{border:1px solid var(--border);background:var(--surface);width:100%;min-height:44px;color:var(--text);border-radius:10px;padding:.6rem .75rem}textarea{resize:vertical}input[type=checkbox]{width:1.25rem;height:1.25rem;min-height:0;accent-color:var(--accent)}button,.button{background:var(--accent);color:#fff;cursor:pointer;border:0;border-radius:10px;justify-content:center;align-items:center;gap:.35rem;min-height:44px;padding:.6rem 1rem;font-weight:600;text-decoration:none;display:inline-flex}button:disabled{opacity:.5;cursor:default}button.secondary,.button.secondary{background:var(--surface-2);color:var(--text)}button.small,.button.small{min-height:36px;padding:.35rem .8rem;font-size:.9rem}button.full,.button.full{width:100%;margin:.5rem 0}.link-btn{color:var(--accent);background:0 0;justify-content:flex-start;min-height:0;padding:.25rem 0;font-weight:600}.icon-btn{color:var(--text);background:0 0;min-width:40px;min-height:40px;padding:0;font-size:1.4rem;font-weight:400}.icon-btn.subtle{color:var(--muted);font-size:1.1rem}.danger-link{color:var(--bad);background:0 0;margin:1rem auto;font-weight:500;display:block}.danger-btn{background:var(--bad)}.app{max-width:640px;padding:calc(env(safe-area-inset-top) + .25rem) 1rem calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 1.5rem);margin:0 auto}.page-header{align-items:center;gap:.5rem;min-height:56px;display:flex}.page-header h1{text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:1.35rem;overflow:hidden}.page-header-action{align-items:center;display:flex}.section-title{justify-content:space-between;align-items:center;margin:1.4rem 0 .6rem;font-size:1.05rem;display:flex}.group-title{text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:1rem 0 .4rem;font-size:.8rem}.card-title{margin-bottom:.5rem;font-size:1rem}.stack{flex-direction:column;gap:.75rem;display:flex}.stack.compact{gap:.4rem}.row{align-items:flex-end;gap:.5rem;display:flex}.row>*{flex:1;min-width:0}.row.tight{gap:0}.row.tight>*{flex:none}.row-between{justify-content:space-between;align-items:center;gap:.5rem;display:flex}.muted{color:var(--muted)}.center{text-align:center}.right{text-align:right}.block{display:block}.prewrap{white-space:pre-wrap;margin:0}.error{color:var(--bad);margin:.5rem 0}.empty{color:var(--muted);text-align:center;padding:1.5rem .5rem}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:.75rem;padding:.9rem 1rem;display:block}.card.stack{display:flex}.card-link{color:inherit;text-decoration:none}.card.inactive{opacity:.6}.field{color:var(--muted);flex-direction:column;gap:.3rem;font-size:.85rem;display:flex}.field>small{font-size:.75rem}.check-label{align-items:center;gap:.5rem;display:flex}.tabbar{z-index:10;height:calc(var(--tabbar-h) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:color-mix(in srgb, var(--surface) 92%, transparent);-webkit-backdrop-filter:blur(12px);border-top:1px solid var(--border);display:flex;position:fixed;inset:auto 0 0}.tabbar a{color:var(--muted);flex-direction:column;flex:1;justify-content:center;align-items:center;gap:2px;font-size:.7rem;text-decoration:none;display:flex}.tabbar a span{filter:grayscale();opacity:.7;font-size:1.35rem}.tabbar a.active{color:var(--accent);font-weight:600}.tabbar a.active span{filter:none;opacity:1}.list{flex-direction:column;gap:.4rem;margin:0;padding:0;list-style:none;display:flex}.list-item{background:var(--surface);border:1px solid var(--border);width:100%;color:var(--text);text-align:left;border-radius:12px;flex-direction:column;align-items:flex-start;gap:.15rem;padding:.7rem .9rem;font-weight:500;text-decoration:none;display:flex}.list-item small{color:var(--muted);font-weight:400}.list-item.on{border-color:var(--accent);background:var(--accent-soft)}.list-item.with-thumb{flex-direction:row;align-items:center;gap:.75rem}.list-item.with-thumb>span:last-child{flex-direction:column;gap:.15rem;display:flex}.list-item.with-thumb img,.machine-icon{object-fit:cover;background:var(--surface-2);border-radius:10px;flex:none;place-items:center;width:48px;height:48px;font-size:1.4rem;display:grid}.chips{flex-wrap:wrap;gap:.4rem;display:flex}.chip{background:var(--surface-2);min-height:32px;color:var(--text);border:1px solid #0000;border-radius:999px;align-items:center;gap:.25rem;padding:.25rem .7rem;font-size:.85rem;font-weight:500;display:inline-flex}.chip.small{min-height:0;padding:.1rem .5rem;font-size:.75rem}.chip.on{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}.pill{border-radius:999px;padding:.15rem .6rem;font-size:.75rem;font-weight:700}.pill.ok{background:var(--ok-soft);color:var(--ok)}.pill.warn{background:var(--warn-soft);color:var(--warn)}.pill.bad{background:var(--bad-soft);color:var(--bad)}.pill.muted{background:var(--surface-2);color:var(--muted)}.source-badge{color:var(--muted);font-size:.85rem}.segmented{background:var(--surface-2);border-radius:10px;margin-bottom:.75rem;padding:3px;display:flex}.segmented button{min-height:36px;color:var(--muted);background:0 0;flex:1;padding:.3rem .6rem;font-weight:600}.segmented button.on{background:var(--surface);color:var(--text);box-shadow:0 1px 3px #0000001f}.field .segmented{margin:0}.big-button{border-radius:var(--radius);background:var(--accent);color:#fff;justify-content:center;align-items:center;width:100%;min-height:56px;margin:.75rem 0;font-size:1.1rem;font-weight:700;text-decoration:none;display:flex}.alert{border-radius:var(--radius);flex-direction:column;gap:.2rem;margin-bottom:.6rem;padding:.8rem 1rem;text-decoration:none;display:flex}.alert.warn{background:var(--warn-soft);color:var(--warn)}.alert.bad{background:var(--bad-soft);color:var(--bad)}.alert span{font-size:.9rem}.stats{grid-template-columns:repeat(3,1fr);gap:.5rem;margin-bottom:.75rem;display:grid}.stats div{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);text-align:center;padding:.7rem .4rem}.stats strong{font-size:1.6rem;display:block}.stats span{color:var(--muted);font-size:.75rem}.routine-card{align-items:flex-start;gap:.5rem;display:flex}.routine-card .card-link{flex-direction:column;flex:1;gap:.3rem;display:flex}.star{color:var(--muted);background:0 0;min-width:44px;padding:0;font-size:1.5rem;font-weight:400}.star.on{color:#f59e0b}.big-button.active-workout{background:var(--ok);flex-direction:column;gap:.15rem}.big-button.active-workout small{opacity:.9;font-variant-numeric:tabular-nums;font-size:.85rem;font-weight:600}.workout-timer{top:calc(env(safe-area-inset-top) + .25rem);z-index:5;border-radius:var(--radius);background:var(--surface-2);color:var(--muted);justify-content:space-between;align-items:center;margin-bottom:.75rem;padding:.55rem 1rem;font-size:.9rem;display:flex;position:sticky}.workout-timer strong{color:var(--text);font-variant-numeric:tabular-nums;font-size:1.35rem}.workout-timer.running{background:var(--ok-soft);color:var(--ok)}.workout-timer.running strong{color:var(--ok)}.save-status{color:var(--muted);white-space:nowrap;font-size:.75rem}.save-status.error{color:var(--bad)}.exercise-block{flex-direction:column;gap:.5rem;display:flex}.exercise-name{color:var(--text);text-align:left;font-size:1.05rem}.exercise-name small{color:var(--accent)}.machine{background:var(--surface-2);min-height:0;color:var(--text);text-align:left;justify-content:flex-start;align-items:center;gap:.6rem;padding:.35rem;font-size:.9rem;font-weight:500;display:flex}.machine img{object-fit:cover;border-radius:8px;width:44px;height:44px}.machine .machine-icon{width:44px;height:44px}.set-row{align-items:center;gap:.35rem;display:flex}.set-row input{text-align:center;flex:1;min-width:0;padding:.5rem .3rem}.set-row.done input{background:var(--ok-soft);border-color:#0000}.set-index{text-align:center;width:1.4rem;color:var(--muted);flex:none;font-weight:700}.check{background:var(--surface-2);min-width:44px;color:var(--muted);padding:0;font-size:1.1rem}.check.on{background:var(--ok);color:#fff}.unit-toggle{background:var(--surface-2);border-radius:10px;flex:none;padding:2px;display:inline-flex}.unit-toggle button{min-height:40px;color:var(--muted);background:0 0;padding:0 .7rem;font-weight:700}.unit-toggle button.on{background:var(--surface);color:var(--accent);box-shadow:0 1px 2px #00000026}.unit-toggle.small button{padding:0 .45rem;font-size:.8rem}.mood-picker{justify-content:space-between;display:flex}.mood-picker button{background:var(--surface-2);filter:grayscale(.6);border:2px solid #0000;min-width:52px;min-height:52px;padding:0;font-size:1.7rem}.mood-picker button.on{border-color:var(--accent);background:var(--accent-soft);filter:none;transform:scale(1.08)}.mood-big{font-size:1.6rem}.gallery{grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:.4rem;margin:.5rem 0;display:grid}.thumb{aspect-ratio:1;background:var(--surface-2);border-radius:10px;padding:0;overflow:hidden}.thumb img{object-fit:cover;width:100%;height:100%}.mini-thumb{object-fit:cover;border-radius:8px;flex:none;width:44px;height:44px}.viewer{z-index:50;padding:env(safe-area-inset-top) 1rem calc(env(safe-area-inset-bottom) + 1rem);background:#000000eb;flex-direction:column;justify-content:center;align-items:center;gap:1rem;display:flex;position:fixed;inset:0}.viewer img{object-fit:contain;border-radius:8px;max-width:100%;max-height:80dvh}.viewer-actions{gap:.75rem;display:flex}.photo-capture button{width:100%}.links{flex-direction:column;gap:.5rem;margin:0;padding:0;list-style:none;display:flex}.links li{align-items:center;gap:.25rem;display:flex}.link-card{color:var(--text);background:var(--surface-2);border-radius:10px;flex:1;align-items:center;gap:.75rem;padding:.4rem;text-decoration:none;display:flex}.link-card img{aspect-ratio:16/9;object-fit:cover;border-radius:6px;width:96px}.link-card .link-icon{aspect-ratio:16/9;background:var(--surface);border-radius:6px;place-items:center;width:96px;font-size:1.4rem;display:grid}.link-card span{flex-direction:column;min-width:0;display:flex}.link-card small{color:var(--muted)}.availability{flex-direction:column;gap:.5rem;margin:0;padding:0;list-style:none;display:flex}.availability li{border-radius:10px;flex-direction:column;gap:.3rem;padding:.6rem .7rem;display:flex}.availability li.ok{background:var(--ok-soft)}.availability li.missing{background:var(--bad-soft)}.availability .alternatives{flex-direction:column;gap:.4rem;display:flex}.routine-exercises{margin:.75rem 0;padding:0;list-style:none}.amenity-grid{grid-template-columns:repeat(4,1fr);gap:.4rem;display:grid}.amenity{background:var(--surface);border:1px solid var(--border);color:var(--text);text-align:center;flex-direction:column;gap:.1rem;padding:.5rem .2rem;font-size:.72rem;font-weight:500}.amenity-icon{font-size:1.4rem}.amenity.yes{background:var(--ok-soft);border-color:#0000}.amenity.no{opacity:.55}.amenity.no .amenity-icon{filter:grayscale()}.amenity.unknown{border-style:dashed}.amenity small{font-size:.68rem}.calendar{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:.5rem}.calendar-nav{justify-content:space-between;align-items:center;display:flex}.calendar-grid{text-align:center;grid-template-columns:repeat(7,1fr);gap:3px;display:grid}.weekday{color:var(--muted);padding:.3rem 0;font-size:.75rem}.day{aspect-ratio:1;min-height:0;color:var(--text);background:0 0;border-radius:10px;flex-direction:column;gap:0;padding:0;font-weight:500}.day:disabled{opacity:1}.day small{font-size:.75rem;line-height:1}.day.went{background:var(--accent-soft);color:var(--accent);font-weight:700}.day.today{outline:2px solid var(--accent);outline-offset:-2px}.timeline .card{flex-direction:column;gap:.4rem;display:flex}.filters{flex-direction:column;gap:.5rem;margin-bottom:.75rem;display:flex}.line-chart{width:100%;height:auto}.line-chart .grid{stroke:var(--border)}.line-chart .line{fill:none;stroke:var(--accent);stroke-width:2.5px;stroke-linejoin:round;stroke-linecap:round}.line-chart .dot{fill:var(--accent)}.line-chart text{fill:var(--muted);font-size:10px}.table{border-collapse:collapse;width:100%;margin-top:.5rem;font-size:.9rem}.table th{text-align:left;color:var(--muted);padding:.3rem 0;font-size:.75rem;font-weight:600}.table td{border-top:1px solid var(--border);vertical-align:top;padding:.45rem 0}.table tr.clickable{cursor:pointer}.upcoming{border-bottom:1px solid var(--border);padding:.4rem 0}.total{padding-top:.4rem}.preview{color:var(--accent);margin:0;font-weight:600}.sheet-backdrop{z-index:40;background:#00000073;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.sheet{background:var(--bg);width:100%;max-width:640px;max-height:88dvh;padding-bottom:env(safe-area-inset-bottom);border-radius:18px 18px 0 0;flex-direction:column;animation:.18s ease-out slide-up;display:flex}.sheet-header{justify-content:space-between;align-items:center;padding:.6rem .6rem .4rem 1rem;display:flex}.sheet-header h2{font-size:1.1rem}.sheet-body{flex-direction:column;gap:.5rem;padding:0 1rem 1rem;display:flex;overflow-y:auto}@keyframes slide-up{0%{opacity:.5;transform:translateY(30%)}}.login{place-items:center;min-height:100dvh;padding:1rem;display:grid}.login .card{gap:1rem;width:min(360px,100%);padding:1.5rem;display:grid}.login .card h1{text-align:center}.login .card label{color:var(--muted);gap:.35rem;font-size:.9rem;display:grid}
