:root{
  /* Палитра Pocket Coach — всегда тёмная тема */
  --primary:#BBF75E; --primary-hover:#ABE951; --primary-muted:#7BB33F;
  --background:#131716; --surface-base:#282E2D; --surface-elevated:#404645;
  --text-primary:#F5F6F5; --text-secondary:#A6AAA8;
  --success:#83D69A; --warning:#FFC56B; --error:#FF7373; --info-c:#79B8F5;

  /* рабочие токены приложения */
  --bg:var(--background); --surface:var(--surface-base); --surface-2:var(--surface-elevated);
  --fg:var(--text-primary); --muted:var(--text-secondary); --line:rgba(245,246,245,.09);
  --accent:var(--primary); --accent-ink:#131716; --accent-soft:rgba(187,247,94,.14);
  --danger:var(--error); --danger-soft:rgba(255,115,115,.14);
  --ok:var(--success); --ok-soft:rgba(131,214,154,.14);
  --warn:var(--warning); --warn-soft:rgba(255,197,107,.14);
  --info:var(--info-c); --info-soft:rgba(121,184,245,.14);
  --p25:#E5484D; --p20:#3E7FE0; --p15:#F2C14E; --p10:#43A85E; --p5:#E9ECEB; --p2:#6B7170; --p1:#A6AAA8;
  --display:"Unbounded","Golos Text",system-ui,sans-serif; --body:"Golos Text",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --safe-b:max(env(safe-area-inset-bottom,0px),var(--tg-safe-area-inset-bottom,0px));
  --safe-t:var(--tg-content-safe-area-inset-top,0px);
  color-scheme:dark;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
[hidden]{display:none!important}
html,body{margin:0;height:100%}
body{background:var(--bg);color:var(--fg);font-family:var(--body);font-size:15px;line-height:1.4;font-variant-numeric:tabular-nums}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none;padding:0}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--info);outline-offset:2px}
input,select,textarea{font:inherit;color:var(--fg)}
#app{display:flex;flex-direction:column;min-height:100%}
.top{position:sticky;top:0;z-index:5;display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:calc(12px + var(--safe-t)) 16px 10px;background:var(--surface);border-bottom:1px solid var(--line)}
.top-row{display:flex;align-items:center;gap:8px;min-width:0}
.preview-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--info-soft);color:var(--info);border-radius:12px;padding:8px 12px;font-size:13px}
.preview-bar button{font-weight:700;color:var(--info);flex:none}
.top h1{font-family:var(--display);font-size:16px;font-weight:600;margin:0;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top .act{font-size:14px;font-weight:600;color:var(--accent)}
.back{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--surface-2);font-size:20px;line-height:1}
.screen{flex:1;padding:16px 16px calc(88px + var(--safe-b));display:flex;flex-direction:column;gap:14px;max-width:640px;width:100%;margin:0 auto}
.tabs{position:fixed;left:0;right:0;bottom:0;z-index:5;display:flex;background:var(--surface);border-top:1px solid var(--line);padding:6px 6px calc(8px + var(--safe-b))}
.tabs button{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px 2px;border-radius:12px;font-size:11px;font-weight:600;color:var(--muted)}
.tabs svg{width:22px;height:22px}
.tabs button[aria-current="true"]{color:var(--accent)}
.loading{color:var(--muted);text-align:center;padding:40px 0}
.card{background:var(--surface);border-radius:18px;padding:14px;display:flex;flex-direction:column;gap:10px;min-width:0}
.eyebrow{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:600}
.h2{font-family:var(--display);font-size:20px;font-weight:600;margin:0;text-wrap:balance;line-height:1.2}
.big{font-family:var(--display);font-weight:700;font-size:28px;line-height:1.05}
.muted{color:var(--muted)}
.row{display:flex;align-items:center;gap:10px;min-width:0}
.between{justify-content:space-between}
.wrap{flex-wrap:wrap}
.grow{flex:1;min-width:0}
.list{display:flex;flex-direction:column;gap:8px}
.item{background:var(--surface);border-radius:16px;padding:12px 14px;display:flex;align-items:center;gap:12px;text-align:left;width:100%;min-width:0}
.item.dashed{background:transparent;border:1px dashed var(--line)}
.time{font-family:var(--display);font-weight:600;font-size:15px;width:52px;flex:none}
.name{font-weight:600;overflow-wrap:anywhere}
.sub{font-size:13px;color:var(--muted)}
.ava{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:14px;flex:none;color:#fff}
.chip{display:inline-flex;align-items:center;gap:4px;font-size:12px;font-weight:600;padding:3px 9px;border-radius:999px;white-space:nowrap}
.c-ok{background:var(--ok-soft);color:var(--ok)}.c-warn{background:var(--warn-soft);color:var(--warn)}
.c-info{background:var(--info-soft);color:var(--info)}.c-acc{background:var(--danger-soft);color:var(--danger)}.c-pri{background:var(--accent-soft);color:var(--accent)}
.c-mut{background:var(--surface-2);color:var(--muted)}
.btn{display:block;background:var(--accent);color:var(--accent-ink);font-weight:600;border-radius:14px;padding:13px 16px;text-align:center;width:100%}
.btn.ghost{background:var(--surface-2);color:var(--fg)}
.btn.small{padding:9px 12px;font-size:14px;width:auto}
.btn.danger{background:var(--danger-soft);color:var(--danger)}
.btn:not(.ghost):not(.danger):not(:disabled):hover{background:var(--primary-hover)}
.btn:not(.ghost):not(.danger):not(:disabled):active{background:var(--primary-muted)}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btns{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.alert{display:flex;gap:10px;align-items:flex-start;background:var(--warn-soft);border-radius:14px;padding:10px 12px;font-size:13px;text-align:left;width:100%}
.alert b{color:var(--warn)}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.stat{background:var(--surface-2);border-radius:12px;padding:10px;text-align:left}
.stat .v{font-family:var(--display);font-weight:600;font-size:17px}
.stat .l{font-size:11px;color:var(--muted)}
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-size:13px;color:var(--muted);font-weight:500}
.inp{width:100%;background:var(--surface-2);border:1px solid transparent;border-radius:12px;padding:11px 12px}
.inp:focus{border-color:var(--info);outline:none}
textarea.inp{min-height:70px;resize:vertical}
.check{display:flex;align-items:center;gap:10px;font-size:14px}
.check input{width:20px;height:20px;accent-color:var(--accent)}
/* logger */
.ex{background:var(--surface);border-radius:18px;padding:14px;display:flex;flex-direction:column;gap:10px}
.sets{display:grid;grid-template-columns:22px minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) 40px;gap:6px;align-items:center}
.sets .hd{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.sets input{width:100%;min-width:0;background:var(--surface-2);border:1px solid transparent;border-radius:10px;padding:9px 4px;text-align:center;font-weight:600}
.sets input:focus{border-color:var(--info);outline:none}
.done{width:40px;height:38px;border-radius:10px;background:var(--surface-2);display:grid;place-items:center;font-size:16px;color:var(--muted)}
.done[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink)}
.note{font-size:13px;color:var(--muted)}
.bar{display:flex;align-items:center;gap:2px;height:44px;flex:none}
.bar .rod{height:6px;width:26px;background:var(--p1);border-radius:2px}
.bar .collar{height:14px;width:5px;background:var(--p1);border-radius:2px;margin-right:2px}
.pl{width:9px;border-radius:2px}
.pl25{height:44px;background:var(--p25)}.pl20{height:44px;background:var(--p20)}.pl15{height:38px;background:var(--p15)}
.pl10{height:32px;background:var(--p10)}.pl5{height:24px;background:var(--p5);border:1px solid var(--line)}.pl2{height:19px;background:var(--p2)}.pl1{height:15px;background:var(--p1)}
/* table */
.tbl{overflow-x:auto}
table{border-collapse:collapse;width:100%;font-size:13px;min-width:340px}
th{font-size:11px;font-weight:600;color:var(--muted);text-align:left;padding:6px;text-transform:uppercase;letter-spacing:.05em;border-bottom:1px solid var(--line)}
td{padding:9px 6px;border-bottom:1px solid var(--line);vertical-align:middle}
tr:last-child td{border-bottom:0}
.n{text-align:right}
.up{color:var(--ok);font-weight:600}.down{color:var(--danger);font-weight:600}
.chips{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chips button{flex:none;padding:7px 12px;border-radius:999px;background:var(--surface);font-size:13px;font-weight:600;color:var(--muted)}
.chips button[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink)}
.day{display:flex;flex-direction:column;align-items:center;min-width:48px}
.day b{font-family:var(--display);font-size:16px}
.day span{font-size:11px;text-transform:uppercase}
.slots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.slot{padding:11px 4px;border-radius:12px;background:var(--surface);font-weight:600;text-align:center;font-size:14px}
.slot:disabled{opacity:.35;cursor:not-allowed;text-decoration:line-through}
.slot.mine{background:var(--accent);color:var(--accent-ink)}
.slot.sel{outline:2px solid var(--accent);outline-offset:-2px}
.hours{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
.hours button{padding:7px 0;border-radius:10px;background:var(--surface-2);font-size:13px;font-weight:600;color:var(--muted)}
.hours button[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink)}
.chart svg{display:block;width:100%;height:auto}
.ring{width:64px;height:64px;flex:none}
.steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.stepper{display:flex;align-items:center;justify-content:space-between;background:var(--surface-2);border-radius:10px}
.stepper button{width:34px;height:36px;font-size:18px;color:var(--muted);flex:none}
.stepper span{flex:1;text-align:center;font-weight:600}
.prog-item{background:var(--surface);border-radius:16px;padding:12px;display:flex;flex-direction:column;gap:10px}
.icon-btn{width:32px;height:32px;border-radius:10px;background:var(--surface-2);display:grid;place-items:center;color:var(--muted);flex:none}
.err{color:var(--danger);font-size:13px;font-weight:500}
.empty{text-align:center;color:var(--muted);padding:28px 12px;display:flex;flex-direction:column;gap:12px;align-items:center}
.code{font-family:ui-monospace,Menlo,monospace;font-size:13px;background:var(--surface-2);padding:10px;border-radius:10px;overflow-wrap:anywhere;user-select:all}
/* sheet */
.sheet-wrap{position:fixed;inset:0;z-index:20;display:flex;align-items:flex-end;justify-content:center}
.sheet-bg{position:absolute;inset:0;background:rgba(0,0,0,.6)}
.sheet{position:relative;background:var(--surface);width:100%;max-width:640px;max-height:min(85vh, calc(var(--tg-viewport-stable-height, 100vh) * .85));overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;border-radius:22px 22px 0 0;padding:18px 16px calc(18px + var(--safe-b));display:flex;flex-direction:column;gap:12px;animation:up .2s ease}
.sheet .item,.card .item{background:var(--surface-2)}
.sheet>*{flex-shrink:0}
.sheet-wrap{overscroll-behavior:contain;touch-action:none}
.sheet{touch-action:pan-y}
/* Шторка-выбор: заголовок и кнопка закреплены, прокручивается только список */
.sheet.picker{overflow:hidden;height:min(85vh, calc(var(--tg-viewport-stable-height, 100vh) * .85));gap:0;padding-bottom:0}
.sheet.picker .sheet-head{display:flex;flex-direction:column;gap:10px;padding-bottom:12px}
.sheet.picker .sheet-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding-bottom:12px}
.sheet.picker .sheet-foot{padding:12px 0 calc(14px + var(--safe-b));border-top:1px solid var(--line);background:var(--surface)}
@keyframes up{from{transform:translateY(30px);opacity:.6}to{transform:none;opacity:1}}
.toast{position:fixed;left:16px;right:16px;bottom:calc(84px + var(--safe-b));z-index:30;background:var(--surface-2);color:var(--fg);box-shadow:0 10px 30px rgba(0,0,0,.4);padding:12px 14px;border-radius:14px;font-size:14px;font-weight:500;max-width:600px;margin:0 auto}
.toast.bad{background:var(--danger);color:#131716}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ================= полировка интерфейса ================= */
:root{ --r-card:20px; --r-item:18px; --r-ctl:14px; --ease:cubic-bezier(.2,.7,.2,1); --edge:rgba(245,246,245,.05) }
body{-webkit-font-smoothing:antialiased;letter-spacing:.005em}
::selection{background:var(--accent);color:var(--accent-ink)}

/* иконки */
.ic{width:20px;height:20px;flex:none;display:block}
.chip .ic{width:13px;height:13px;stroke-width:2.6}
.btn .ic{width:18px;height:18px}
.btn{display:flex;align-items:center;justify-content:center;gap:8px}
.icon-btn .ic{width:18px;height:18px}
.chev{color:var(--muted);opacity:.7}
.chev .ic{width:18px;height:18px}
.note.with-ic{display:flex;gap:8px;align-items:flex-start}
.note.with-ic .ic{width:16px;height:16px;margin-top:2px;color:var(--muted)}
.al-ic{color:var(--warn);display:flex}
.al-ic .ic{width:18px;height:18px}

/* шапка */
.top{background:rgba(19,23,22,.82);-webkit-backdrop-filter:saturate(1.4) blur(18px);backdrop-filter:saturate(1.4) blur(18px);border-bottom:1px solid var(--edge);padding:calc(14px + var(--safe-t)) 16px 12px}
.top h1{font-size:17px;font-weight:600;letter-spacing:-.01em}
.top.root{border-bottom-color:transparent}
.top.root h1{font-size:24px;font-weight:700;letter-spacing:-.02em;padding-top:4px}
.back{width:36px;height:36px;background:var(--surface);border:1px solid var(--edge);color:var(--fg)}
.back .ic{width:18px;height:18px}

/* нижнее меню */
.tabs{background:rgba(28,33,32,.86);-webkit-backdrop-filter:saturate(1.4) blur(18px);backdrop-filter:saturate(1.4) blur(18px);border-top:1px solid var(--edge);padding:8px 8px calc(10px + var(--safe-b))}
.tabs button{gap:4px;font-size:11px;letter-spacing:.01em;transition:color .2s var(--ease)}
.tabs svg{width:22px;height:22px;box-sizing:content-box;padding:4px 16px;border-radius:999px;transition:background .25s var(--ease),transform .25s var(--ease)}
.tabs button[aria-current="true"] svg{background:var(--accent-soft);transform:translateY(-1px)}
.tabs button:active svg{transform:scale(.92)}

/* экран и появление контента */
.screen{padding-top:18px;gap:12px}
@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.screen.enter>*{animation:rise .35s var(--ease) both}
.screen.enter>*:nth-child(2){animation-delay:.03s}.screen.enter>*:nth-child(3){animation-delay:.06s}
.screen.enter>*:nth-child(4){animation-delay:.09s}.screen.enter>*:nth-child(n+5){animation-delay:.12s}

/* карточки и списки */
.card{border-radius:var(--r-card);padding:16px;gap:12px;border:1px solid var(--edge)}
.card.hero{background:linear-gradient(150deg,rgba(187,247,94,.13),rgba(187,247,94,.02) 55%),var(--surface);border-color:rgba(187,247,94,.22)}
.item{border-radius:var(--r-item);padding:14px;border:1px solid var(--edge);transition:transform .15s var(--ease),background .2s var(--ease)}
button.item:active{transform:scale(.985)}
@media (hover:hover){button.item:hover{background:#2E3533}}
.item.is-done{opacity:.72}
.item.is-done .time{color:var(--muted)}
.sheet .item,.card .item{border-color:transparent}
.list{gap:10px}
.prog-item{border-radius:var(--r-item);padding:14px;border:1px solid var(--edge)}
.ex{border-radius:var(--r-card);padding:16px;border:1px solid var(--edge)}

/* типографика */
.h2{font-size:22px;letter-spacing:-.015em}
.big{letter-spacing:-.02em}
.eyebrow{font-size:11px;letter-spacing:.1em}
.time{font-size:16px;letter-spacing:-.01em}
.name{letter-spacing:-.005em}

/* кнопки и поля */
.btn{min-height:50px;border-radius:var(--r-ctl);font-weight:700;letter-spacing:.01em;transition:transform .12s var(--ease),background .2s var(--ease),opacity .2s}
.btn:active:not(:disabled){transform:scale(.98)}
.btn.ghost{background:var(--surface-2);border:1px solid var(--edge)}
.btn.small{min-height:40px;padding:8px 16px}
.icon-btn{width:36px;height:36px;border-radius:12px;background:var(--surface-2);color:var(--fg);transition:transform .12s var(--ease)}
.icon-btn:active{transform:scale(.92)}
.icon-btn:disabled{opacity:.35}
.inp{border-radius:var(--r-ctl);padding:13px 14px;border:1px solid var(--edge);transition:border-color .2s,box-shadow .2s}
.inp:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.inp::placeholder{color:#7C817F}
button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* фишки, бейджи, статистика */
.chip{padding:4px 10px;font-weight:700;letter-spacing:.01em}
.stat{border-radius:14px;padding:12px;border:1px solid var(--edge)}
.stat .v{font-size:19px;letter-spacing:-.01em}
.alert{border-radius:16px;padding:12px 14px;border:1px solid rgba(255,197,107,.18);align-items:center}
.progress{height:6px;border-radius:999px;background:rgba(245,246,245,.08);overflow:hidden}
.progress span{display:block;height:100%;border-radius:inherit;background:var(--accent);transition:width .6s var(--ease)}
.legend-dot{display:inline-block;width:12px;height:12px;border-radius:4px;background:var(--accent);margin-right:6px;vertical-align:-1px}

/* дни, слоты, часы */
.day{min-width:50px;padding:8px 0;border-radius:16px!important;gap:2px}
.day span{font-size:10px;letter-spacing:.08em;opacity:.8}
.slot{border-radius:14px;padding:13px 4px;border:1px solid var(--edge);transition:transform .12s var(--ease),background .2s}
.slot:active:not(:disabled){transform:scale(.96)}
.slot.mine{border-color:transparent}
.hours button{border-radius:10px;transition:background .15s}

/* журнал тренировки */
.sets{gap:8px}
.sets input{border-radius:12px;padding:11px 4px;font-size:16px;border:1px solid transparent;transition:background .2s,border-color .2s}
.sets input.on{background:rgba(187,247,94,.1);color:var(--fg)}
.done{width:42px;height:42px;border-radius:12px;transition:background .2s,transform .12s var(--ease)}
.done .ic{width:18px;height:18px;stroke-width:2.6}
.done:active{transform:scale(.9)}

/* шторка */
.sheet{border-radius:26px 26px 0 0;border:1px solid var(--edge);border-bottom:0;padding-top:26px}
.sheet::before{content:"";position:absolute;top:9px;left:50%;width:38px;height:4px;margin-left:-19px;border-radius:2px;background:rgba(245,246,245,.18)}
.sheet-bg{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
@keyframes up{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
.sheet{animation:up .28s var(--ease)}

/* пустые состояния и загрузка */
.empty{padding:36px 16px;gap:14px;font-size:14px;line-height:1.5}
.empty-ic{width:56px;height:56px;border-radius:18px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--edge);color:var(--accent)}
.empty-ic .ic{width:26px;height:26px}
@keyframes shimmer{from{background-position:-200px 0}to{background-position:calc(200px + 100%) 0}}
.skel{border-radius:var(--r-card);background:linear-gradient(90deg,var(--surface) 0,#323837 50%,var(--surface) 100%) no-repeat;background-size:200px 100%;background-color:var(--surface);animation:shimmer 1.2s infinite linear}

/* тост */
.toast{border-radius:16px;border:1px solid var(--edge);animation:up .25s var(--ease)}

/* предпросмотр глазами клиента */
.preview-bar{border:1px solid rgba(121,184,245,.2);border-radius:14px}
.preview-bar .ic{width:16px;height:16px}

@media (prefers-reduced-motion:reduce){.screen.enter>*,.sheet,.toast,.skel{animation:none!important}}

/* ================= оценка сложности ================= */
:root{ --r1:#79B8F5; --r2:#83D69A; --r3:#BBF75E; --r4:#FFC56B; --r5:#FF7373 }
.rate-scale{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.rate-opt{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 2px 10px;border-radius:14px;background:var(--surface-2);border:1px solid var(--edge);transition:transform .12s var(--ease),background .2s,border-color .2s}
.rate-opt b{font-family:var(--display);font-size:18px;font-weight:700;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:rgba(245,246,245,.06);color:var(--fg);transition:background .2s,color .2s}
.rate-opt span{font-size:10px;letter-spacing:-.01em;line-height:1.15;color:var(--muted);text-align:center;font-weight:600}
.rate-opt:active{transform:scale(.95)}
.rate-opt[aria-checked="true"]{border-color:var(--rc);background:rgba(245,246,245,.04)}
.rate-opt[aria-checked="true"] span{color:var(--fg)}
.rate-opt.r1{--rc:var(--r1)}.rate-opt.r2{--rc:var(--r2)}.rate-opt.r3{--rc:var(--r3)}.rate-opt.r4{--rc:var(--r4)}.rate-opt.r5{--rc:var(--r5)}
.rate-opt[aria-checked="true"] b{background:var(--rc);color:#131716}
.rate-chip{gap:7px;background:var(--surface-2);color:var(--fg)}
.rate-dots{display:inline-flex;gap:2px;font-style:normal}
.rate-dots b{width:5px;height:12px;border-radius:2px;background:rgba(245,246,245,.18)}
.rate-chip.r1 .rate-dots b.on{background:var(--r1)}.rate-chip.r2 .rate-dots b.on{background:var(--r2)}.rate-chip.r3 .rate-dots b.on{background:var(--r3)}
.rate-chip.r4 .rate-dots b.on{background:var(--r4)}.rate-chip.r5 .rate-dots b.on{background:var(--r5)}
.fb{display:flex;flex-direction:column;gap:8px;padding-top:10px;margin-top:2px;border-top:1px solid var(--line)}
.link-btn{align-self:flex-start;font-size:13px;font-weight:600;color:var(--info)}
.rate-card textarea{min-height:64px}

/* ================= новые блоки ================= */
.link-btn{display:inline-flex;align-items:center;gap:6px}
.link-btn .ic{width:16px;height:16px}
/* требуют внимания */
.att{gap:4px}
.att .row:first-child{margin-bottom:6px}
.att-row{display:flex;align-items:center;gap:12px;padding:9px 0;text-align:left;width:100%;border-top:1px solid var(--line);font-size:14px}
.att-row .sub{font-size:13px}
.att-ic{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;flex:none}
.att-ic .ic{width:17px;height:17px}
.t-warn{background:var(--warn-soft);color:var(--warn)}.t-info{background:var(--info-soft);color:var(--info)}
.t-danger{background:var(--danger-soft);color:var(--danger)}
.rep-ic{display:inline-flex;color:var(--info);vertical-align:-2px}
.rep-ic .ic{width:14px;height:14px}
.chkline{display:flex;align-items:center;gap:6px;margin-top:6px;min-width:0}
.chkline .sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* тело */
.mgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.mgrid.form{grid-template-columns:repeat(2,minmax(0,1fr))}
.mgrid .stat .v{font-size:16px}
/* рекорды */
.trophy-ic{color:var(--warn);display:flex}
.rec-row{padding:7px 0;border-top:1px solid var(--line)}
.rec-v{font-family:var(--display);font-size:16px;white-space:nowrap}
.rec-v .muted{font-family:var(--body);font-size:14px;font-weight:600}
/* самочувствие */
.chk-scale{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.chk-opt{display:flex;flex-direction:column;align-items:center;gap:4px;padding:12px 4px;border-radius:14px;background:var(--surface-2);border:1px solid var(--edge);font-size:13px;font-weight:600;color:var(--muted);transition:transform .12s var(--ease),border-color .2s}
.chk-opt span{font-size:26px;line-height:1}
.chk-opt[aria-pressed="true"]{border-color:var(--accent);color:var(--fg);background:var(--accent-soft)}
.chk-opt:active{transform:scale(.95)}
.chk-done{text-align:left;width:100%}
.chk-banner{padding:12px 14px}
.checkin-card textarea{min-height:56px}
/* подсказка по технике */
.cue{display:flex;align-items:center;gap:10px;background:var(--info-soft);color:var(--fg);border-radius:12px;padding:9px 12px;font-size:13px}
.cue .link-btn{flex:none}
.cue-inp{font-size:13px;padding:10px 12px}
/* слоты: занято / лист ожидания */
.slot{position:relative}
.slot.taken{opacity:.42;text-decoration:line-through}
.slot.taken.sel{opacity:1;text-decoration:none;outline-color:var(--info)}
.slot.taken.waiting{opacity:.75}
.wait-dot{position:absolute;top:6px;right:7px;width:7px;height:7px;border-radius:50%;background:var(--info)}
/* сегменты */
.seg{display:grid;grid-template-columns:1fr 1fr;background:var(--surface);border:1px solid var(--edge);border-radius:14px;padding:4px;gap:4px}
.seg button{padding:9px 0;border-radius:10px;font-weight:700;font-size:14px;color:var(--muted)}
.seg button[aria-pressed="true"]{background:var(--surface-2);color:var(--fg)}
/* пакет */
.pk-own{grid-column:span 1;padding:7px 4px;text-align:center;font-size:13px;border-radius:10px}
/* деньги */
.fin-card{text-align:left;width:100%}
.bars{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;align-items:end;height:170px}
.bar-col{display:flex;flex-direction:column;align-items:center;gap:6px;height:100%}
.bar-v{font-size:11px;color:var(--muted);font-weight:600;height:14px}
.bar-track{flex:1;width:100%;max-width:36px;display:flex;align-items:flex-end;background:rgba(245,246,245,.04);border-radius:10px;overflow:hidden}
.bar-track span{display:block;width:100%;background:var(--surface-2);border-radius:10px;transition:height .6s var(--ease)}
.bar-col.cur .bar-track span{background:var(--accent)}
.bar-col.cur .bar-v{color:var(--accent)}
.bar-l{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
/* таймер отдыха */
.rest{position:fixed;left:12px;right:12px;bottom:calc(78px + var(--safe-b));z-index:15;max-width:616px;margin:0 auto;display:flex;align-items:center;gap:12px;
  background:rgba(40,46,45,.94);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid var(--edge);border-radius:18px;padding:10px 10px 10px 14px;box-shadow:0 12px 34px rgba(0,0,0,.45);animation:up .25s var(--ease)}
.rest-ic{color:var(--accent);display:flex}
.rest-t{font-family:var(--display);font-weight:600;font-size:15px;font-variant-numeric:tabular-nums}
.rest-bar{height:4px;border-radius:99px;background:rgba(245,246,245,.1);margin-top:6px;overflow:hidden}
.rest-bar span{display:block;height:100%;background:var(--accent);border-radius:inherit;transition:width .5s linear}
.rest button{flex:none;height:36px;padding:0 12px;border-radius:11px;background:var(--surface-2);font-size:13px;font-weight:700;display:grid;place-items:center}
.rest button .ic{width:16px;height:16px}
.rest.over{background:var(--accent);color:var(--accent-ink)}
.rest.over .rest-ic{color:var(--accent-ink)}
.rest.over .rest-bar{background:rgba(19,23,22,.2)}.rest.over .rest-bar span{background:var(--accent-ink)}
.rest.over button{background:rgba(19,23,22,.12);color:var(--accent-ink)}
.screen{padding-bottom:calc(150px + var(--safe-b))}

/* первый вход: выбор роли */
.welcome{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:12px 8px 4px}
.welcome img{border-radius:20px;box-shadow:0 12px 40px rgba(187,247,94,.18)}
.role-pick{display:flex;flex-direction:column;gap:10px}
.role-opt{display:flex;align-items:center;gap:14px;text-align:left;width:100%;background:var(--surface);border:1px solid var(--edge);border-radius:var(--r-item);padding:16px;transition:border-color .2s,background .2s,transform .12s var(--ease)}
.role-opt:active{transform:scale(.985)}
.role-opt[aria-pressed="true"]{border-color:var(--accent);background:linear-gradient(150deg,rgba(187,247,94,.12),rgba(187,247,94,.02) 60%),var(--surface)}
.role-ic{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);flex:none}
.role-ic .ic{width:22px;height:22px}

/* ================= питание ================= */
:root{ --mp:#BBF75E; --mf:#FFC56B; --mc:#79B8F5 }
.seg.seg3{grid-template-columns:repeat(3,1fr)}
.macro-bar{display:flex;height:10px;border-radius:99px;overflow:hidden;gap:3px}
.macro-bar span{display:block;height:100%;border-radius:99px}
.mp{background:var(--mp)}.mf{background:var(--mf)}.mc{background:var(--mc)}
.dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px;vertical-align:1px}
.nut-trend{background:var(--surface-2);border-radius:14px;padding:12px 14px;display:flex;flex-direction:column;gap:6px;font-size:14px}
.how{border-top:1px solid var(--line);padding-top:10px}
.how summary{cursor:pointer;font-size:14px;font-weight:600;color:var(--info);list-style:none}
.how summary::-webkit-details-marker{display:none}
.how summary::after{content:"›";display:inline-block;margin-left:6px;transition:transform .2s}
.how[open] summary::after{transform:rotate(90deg)}
.how-rows{display:flex;flex-direction:column;gap:8px;margin-top:10px;font-size:14px}
.how-row{display:flex;justify-content:space-between;gap:10px}
.how-row span{color:var(--muted)}
.how-row.strong{border-top:1px solid var(--line);padding-top:8px}
.how-row.strong span{color:var(--fg);font-weight:600}
.how-sub{font-size:12px;color:var(--muted);margin-top:-4px;padding-left:10px;border-left:2px solid var(--line)}
.how-sub.warn{color:var(--warn);border-color:var(--warn)}
.hist{display:flex;flex-direction:column;gap:2px;padding-bottom:6px;border-bottom:1px solid var(--line)}
.tips{display:flex;flex-direction:column;gap:10px}
.tip{display:flex;gap:10px;font-size:14px;line-height:1.4;color:var(--muted)}
.tip b{color:var(--fg);font-weight:600}
.tip-dot{width:7px;height:7px;border-radius:50%;background:var(--accent);margin-top:7px;flex:none}
.small-note{font-size:11px;opacity:.8}
.nform{display:flex;flex-direction:column;gap:12px;padding-bottom:6px}
.item.opt[aria-pressed="true"]{border-color:var(--accent)!important;background:var(--accent-soft)}
.item.opt{border:1px solid var(--edge)!important}
