/* Styles 9 — design 2.0 (v155, docs/DESIGN-2.md): tokens and the new components (the task check, the day card, the
   Path's date and pace, the Me profile, three tabs). Loaded last: its rules win. New CSS uses ONLY these tokens
   (DESIGN-2 Н12); the older files move onto them screen by screen later (stage 5). */
:root{
  /* type scale */
  --fs-xs: 12px; --fs-s: 14px; --fs-m: 16px; --fs-l: 18px; --fs-xl: 22px; --fs-2xl: 28px; --fs-3xl: 34px;
  /* spacing */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  /* motion: quick for small things, normal, slow for big changes; one easing */
  --dur-1: .15s; --dur-2: .25s; --dur-3: .4s; --ease: cubic-bezier(.2, .8, .2, 1);
  --tap: 44px; /* the smallest thing a finger must hit */
  --flame: #f08a3c;
}
@media (prefers-reduced-motion: reduce){ :root{ --dur-1: 0s; --dur-2: 0s; --dur-3: 0s; } }

/* Fields 16 px: iOS doesn't zoom into them on focus, so pinch-zoom can stay allowed (DESIGN-2 Н14). */
input[type="text"], input[type="password"], input[type="email"], input[type="date"], input:not([type]), textarea, select{font-size:max(16px, 1em);}

/* ---- THE TASK ROW: a big round check (DESIGN-2 Н2) ---- */
.task-list:not(.editing) li.task-row{padding:var(--sp-1) var(--sp-2) var(--sp-1) var(--sp-1); gap:var(--sp-1); min-height:56px; align-items:center;}
.task-check{flex:0 0 auto; width:var(--tap); height:var(--tap); display:flex; align-items:center; justify-content:center;
  background:none; border:0; padding:0; margin:0; cursor:pointer; color:inherit; -webkit-tap-highlight-color:transparent;}
.tc-ring{width:28px; height:28px; border-radius:50%; border:2px solid var(--muted); display:flex; align-items:center; justify-content:center;
  box-sizing:border-box; transition:background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);}
.tc-ring svg{width:16px; height:16px; fill:none; stroke:#fff; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; opacity:0; transition:opacity var(--dur-1) var(--ease);}
.task-check:active .tc-ring{transform:scale(.88);}
.task-check:focus-visible{outline:2px solid var(--accent); outline-offset:-2px; border-radius:50%;}
li.done .tc-ring{background:var(--ok); border-color:var(--ok);}
li.done .tc-ring svg{opacity:1;}
li.not_done .tc-ring{border-color:var(--bad);}
li.partial .tc-ring{border-color:var(--accent-fill);}
li.task-row .task-text{font-size:var(--fs-m); line-height:1.35;}
li.task-row.done .task-text{text-decoration:line-through; text-decoration-thickness:1.5px; color:var(--muted);}
.task-list li.task-row.done{color:var(--text);}
.task-meta{display:flex; flex-wrap:wrap; gap:var(--sp-1) var(--sp-2); margin-top:2px; text-decoration:none;}
li.task-row.done .task-meta{display:inline-flex;}
.task-stage{font-size:var(--fs-xs); color:var(--ms); font-weight:600;}
.task-personal{font-size:var(--fs-xs); color:var(--muted); font-weight:600;} /* 0.191, idea 83: the person's own task outside the goal */
.task-by{font-size:var(--fs-xs); color:var(--accent); font-weight:700;} /* 0.196: «до сб» — a task for a day (ahead.js) */
.tasks-ahead{margin-top:var(--sp-4);}
.ahead-box{display:flex; flex-direction:column; gap:var(--sp-2); min-width:0;}
.ahead-box.dc-ahead{margin-top:var(--sp-3);}
.ah-head{margin:0; font-size:var(--fs-xs); font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.04em;}
.ah-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:var(--sp-1);}
.ah-list li{display:flex; align-items:baseline; gap:var(--sp-2); min-width:0; font-size:var(--fs-s); color:var(--text);}
.ah-t{flex:1; min-width:0; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;}
.ah-day{flex:none; font-size:var(--fs-xs); font-weight:700; color:var(--accent);}
.ah-more{color:var(--muted);}
.ah-missed{padding:var(--sp-2) var(--sp-3); border-radius:12px; background:var(--accent-dim); min-width:0;}
.ah-missed p{margin:0 0 var(--sp-2); font-size:var(--fs-s); overflow-wrap:anywhere;}
.ah-acts{display:flex; flex-wrap:wrap; gap:var(--sp-2); align-items:center;}
.task-state{font-size:var(--fs-xs); font-weight:600;}
.task-state.not_done{color:var(--bad);}
.task-state.partial{color:var(--accent);}
.task-row .task-ico{width:36px; height:36px; opacity:.85;}

/* ---- ONE MOMENT (DESIGN-2 Н5): the Goose in the centre, the chain of what this action changed ---- */
.cel-day-goose{display:block; border-radius:50%; box-shadow:0 0 0 8px rgba(217,164,65,.35), 0 0 48px rgba(217,164,65,.45);}
.cel-day-goose svg{display:block; border-radius:50%;}
.cel-week .fs-week{margin:0 0 var(--sp-3);}
.cel-chain[hidden], .cel-week[hidden], .day-card[hidden], .gc-date[hidden], .path-weeks[hidden]{display:none !important;}
.cel-chain{list-style:none; margin:0 0 var(--sp-4); padding:var(--sp-3); width:100%; max-width:320px; box-sizing:border-box; text-align:left;
  display:flex; flex-direction:column; gap:var(--sp-2); background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.16); border-radius:16px;}
.cel-line{display:flex; align-items:center; gap:var(--sp-2); font-size:var(--fs-s); line-height:1.3; color:#fff;}
.celebrate.show .cel-line{animation:onb-in var(--dur-3) both var(--ease);}
.celebrate.show .cel-line:nth-child(2){animation-delay:.12s;} .celebrate.show .cel-line:nth-child(3){animation-delay:.24s;} .celebrate.show .cel-line:nth-child(n+4){animation-delay:.36s;}
.cl-ico{flex:0 0 auto; width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.12);}
.cl-ico svg{width:16px; height:16px; fill:none; stroke:#fff; stroke-width:3; stroke-linecap:round; stroke-linejoin:round;}
.cl-ico svg .fill{fill:#fff; stroke:none;}
.cel-line.task .cl-ico{background:var(--ok);}
.cel-line.streak .cl-ico svg .fill{fill:var(--flame);}
.cel-line.ach .cl-ico svg .fill{fill:#d9a441;}
.cel-line.feather .cl-ico svg, .cel-line.egg .cl-ico svg{stroke:none; fill:initial; width:18px; height:18px;}

/* ---- THREE TABS (DESIGN-2 Н7): Сьогодні · Шлях · Я; Tasks / Progress are pages lit under Шлях / Я ---- */
.tabbar .tab-btn[hidden]{display:none !important;}
.tabbar.tabbar-3 button{font-size:var(--fs-xs); position:relative;}
body[data-tab="tasks"] .tab-btn[data-tab="goal"], body[data-tab="progress"] .tab-btn[data-tab="settings"]{color:var(--accent); font-weight:600;}

/* ---- THE DAY CARD (DESIGN-2 Н1) → v191: a one-line STRIP over the chat + the SHEET of the day over the whole screen
   (DESIGN-3-AUDIT §3). The sheet sits inside #day-card with position:fixed — nothing above it may get a transform. ---- */
.day-card{flex:0 0 auto; margin:var(--sp-2) var(--sp-3) 0; padding:var(--sp-1) var(--sp-1) var(--sp-1) var(--sp-2); background:var(--panel-2);
  border:1px solid var(--line); border-radius:16px; box-shadow:0 4px 16px rgba(0,0,0,.12);}
.dc-head{display:flex; align-items:center; gap:var(--sp-2); min-height:56px;}
.dc-ring{flex:0 0 auto; position:relative; width:36px; height:36px; color:var(--accent);}
.dc-ring svg{position:absolute; inset:0; width:36px; height:36px;}
.dc-ring .dr-track circle{fill:none; stroke:var(--line); stroke-width:3;}
.dc-ring .dr-track circle.dr-fill{stroke:var(--ok); stroke-linecap:round; transition:stroke-dasharray var(--dur-3) var(--ease);}
.dc-ring .dr-ico{inset:9px; width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}
.dc-ring.full{color:var(--ok);}
.dc-titles{flex:1; min-width:0; display:flex; flex-direction:column; align-items:stretch; text-align:left; background:none; border:0; padding:var(--sp-1) 0;
  margin:0; color:inherit; font:inherit; cursor:pointer; min-height:var(--tap); justify-content:center; -webkit-tap-highlight-color:transparent;}
.dc-title{font-size:var(--fs-m); line-height:1.3; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.dc-sub{font-size:var(--fs-xs); color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.dc-streak{flex:0 0 auto; display:flex; align-items:center; gap:2px; padding:4px 10px; border-radius:999px; background:var(--panel); border:1px solid var(--line); font-size:var(--fs-s);}
.dc-streak svg{width:16px; height:16px; fill:var(--flame);}
.dc-next-check{flex:0 0 auto; width:var(--tap); height:var(--tap); display:flex; align-items:center; justify-content:center; background:none; border:0;
  padding:0; margin:0; cursor:pointer; color:inherit; -webkit-tap-highlight-color:transparent;}
.dc-next-check:active .tc-ring{transform:scale(.88);}
.dc-next-check.ticked .tc-ring{background:var(--ok); border-color:var(--ok);}
.dc-next-check.ticked .tc-ring svg{opacity:1;}
.dc-next-check:focus-visible{outline:2px solid var(--accent); outline-offset:-2px; border-radius:50%;}
.dc-ask{flex:0 0 auto; min-height:36px; padding:0 12px; border:0; border-radius:999px; background:var(--accent-dim); color:var(--accent); font:inherit;
  font-size:var(--fs-s); font-weight:700; cursor:pointer; white-space:nowrap;}
.dc-open{flex:0 0 auto; width:var(--tap); height:var(--tap); color:var(--muted);}
.dc-open svg, .dc-close svg{width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}
/* the sheet: slides up from the bottom; hidden — not seen and not reached (visibility), still in the page */
.dc-sheet{position:fixed; inset:0; z-index:12; display:flex; flex-direction:column; background:var(--bg); color:var(--text);
  transform:translateY(100%); visibility:hidden; transition:transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
  padding:0 var(--safe-right) 0 var(--safe-left);}
.day-card.sheet-open .dc-sheet{transform:none; visibility:visible; transition:transform var(--dur-2) var(--ease), visibility 0s;}
.dc-sheet-head{flex:0 0 auto; position:relative; display:flex; align-items:center; gap:var(--sp-2); padding:calc(var(--safe-top) + 14px) var(--sp-3) var(--sp-2) var(--sp-1);
  background:var(--panel); border-bottom:1px solid var(--line); touch-action:none; cursor:grab;}
.dc-grip{position:absolute; left:50%; top:calc(var(--safe-top) + 5px); width:36px; height:4px; margin-left:-18px; border-radius:2px; background:var(--line);}
.dc-close{flex:0 0 auto; width:var(--tap); height:var(--tap); color:var(--muted);}
.dc-stitles{flex:1; min-width:0; display:flex; flex-direction:column;}
.dc-stitles b{font-size:var(--fs-l); line-height:1.3; overflow-wrap:anywhere;}
.dc-stitles small{font-size:var(--fs-xs); color:var(--muted);}
.dc-sheet .dc-body{flex:1; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
  padding:var(--sp-3) var(--sp-3) calc(var(--safe-bottom) + var(--sp-5)); margin:0;}
.dc-sheet .dc-all{align-self:stretch; min-height:var(--tap); justify-content:center; text-align:center; color:var(--accent); font-weight:600;}
.dc-body{display:flex; flex-direction:column; gap:var(--sp-2); margin-top:var(--sp-1);}
.dc-tasks{margin:0 !important; gap:6px !important;}
.dc-tasks li.task-row{background:var(--panel); border:1px solid transparent; border-radius:12px;}
.dc-tasks li.task-row.done{background:var(--ok-bg); border-color:var(--ok-border);}
.dc-plan{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px;}
.dc-plan li{display:flex; gap:var(--sp-2); padding:var(--sp-2) var(--sp-3); border-radius:12px; background:var(--panel); font-size:var(--fs-m);}
.dc-plan li i{flex:0 0 auto; width:8px; height:8px; margin-top:8px; border-radius:50%; background:var(--ms);}
.dc-plan li span{display:flex; flex-direction:column;}
.dc-acts{display:flex; gap:var(--sp-2);}
.dc-acts .primary-btn{flex:1; min-height:var(--tap);}
.dc-acts .ghost-btn{min-height:var(--tap);}
.dc-note{margin:0; font-size:var(--fs-s); color:var(--muted);}
.dc-because{color:var(--text); overflow-wrap:anywhere;} /* v183: what the evening answer changed */
.dc-q{margin:0; font-size:var(--fs-m); font-weight:700;}
.dc-energy{display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:6px;}
.dc-energy button{min-height:56px; border:1px solid var(--line); border-radius:12px; background:var(--panel); color:var(--text); cursor:pointer;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; font:inherit; padding:4px 2px;}
.dc-energy button span{font-size:var(--fs-xl); line-height:1;}
.dc-energy button small{font-size:var(--fs-xs); color:var(--muted); line-height:1.1; text-align:center;}
.dc-energy button:active{transform:scale(.95);}
.dc-week{display:flex; align-items:center; gap:var(--sp-3); padding:var(--sp-2) var(--sp-3); border-radius:12px; background:var(--panel);}
.dc-week span{display:flex; flex-direction:column;}
.dc-week b{font-size:var(--fs-l);}
.dc-week small{font-size:var(--fs-xs); color:var(--muted);}
.dc-week .text-btn{margin-left:auto;}
.dc-notif{display:flex; align-items:center; gap:var(--sp-2); padding:6px var(--sp-2) 6px var(--sp-3); border-radius:12px; border:1px dashed var(--line);}
.dc-notif > svg{flex:0 0 auto; width:18px; height:18px; fill:none; stroke:var(--muted); stroke-width:2; stroke-linecap:round;}
.dc-notif span{flex:1; font-size:var(--fs-xs); color:var(--muted);}
.dc-notif .pill-btn{min-height:36px; padding:0 12px; border:0; border-radius:999px; background:var(--accent-dim); color:var(--accent); font:inherit; font-size:var(--fs-s); font-weight:700; cursor:pointer;}
.dc-x{width:36px; height:36px;}
.dc-x svg{width:16px; height:16px; fill:none; stroke:var(--muted); stroke-width:2; stroke-linecap:round;}
.dc-all{align-self:flex-start; font-size:var(--fs-s);}
.plan-in-card{color:var(--muted);}

/* ---- THE PATH: the goal's date and pace, the stage now, the weeks (DESIGN-2 Н3, Н4, Н6) ---- */
.gc-date{display:flex; align-items:center; flex-wrap:wrap; gap:var(--sp-2); margin-top:var(--sp-3); padding-top:var(--sp-3); border-top:1px solid var(--goal-border); position:relative;}
.gd-days{display:flex; align-items:baseline; gap:var(--sp-2); flex-wrap:wrap;}
.gd-days b{font-size:var(--fs-xl); line-height:1.1;}
.gd-days small{font-size:var(--fs-s); color:var(--muted);}
.gd-past{font-size:var(--fs-s); color:var(--muted);}
.gd-pace{font-size:var(--fs-xs); font-weight:700; padding:3px 10px; border-radius:999px;}
.gd-pace.on, .gd-pace.ahead{background:var(--ok-bg); color:var(--ok);}
.gd-pace.behind{background:var(--accent-dim); color:var(--accent);}
.gd-edit{margin-left:auto; width:var(--tap); height:var(--tap); color:var(--muted);}
.gd-edit svg{width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round;}
.gd-input{position:absolute; right:0; bottom:0; opacity:0; width:1px; height:1px;}
.milestone-list li.current{border-color:var(--ms);}
.ms-tasks{margin-top:var(--sp-2); display:flex; flex-direction:column; gap:var(--sp-1);}
.ms-tasks small{font-size:var(--fs-xs); color:var(--muted);}
.ms-tasks .ms-count{color:var(--ms); font-weight:600;}
.ms-task-list{display:flex; flex-direction:column; gap:2px;}
.ms-task{display:flex; align-items:center; gap:var(--sp-2); font-size:var(--fs-s);}
.ms-task i{flex:0 0 auto; width:12px; height:12px; border-radius:50%; border:2px solid var(--muted); box-sizing:border-box;}
.ms-task.done{color:var(--muted); text-decoration:line-through;}
.ms-task.done i{background:var(--ok); border-color:var(--ok);}
.path-weeks{margin-top:var(--sp-5); display:flex; flex-direction:column; gap:var(--sp-2);}
.pw-week{display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:6px; margin-bottom:var(--sp-3);}
.pw-day{display:flex; flex-direction:column; align-items:center; gap:4px;}
.pw-day i{width:30px; height:30px; border-radius:50%; border:2px solid var(--line); box-sizing:border-box;}
.pw-day.lit i{background:var(--ms); border-color:var(--ms);}
.pw-day.today i{border-color:var(--accent);}
.pw-day.future i{opacity:.5;}
.pw-day small{font-size:var(--fs-xs); color:var(--muted);}
.pw-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px;}
.pw-list li{display:flex; justify-content:space-between; gap:var(--sp-2); flex-wrap:wrap; padding:var(--sp-3); border-radius:12px; background:var(--panel-2); border:1px solid var(--line); font-size:var(--fs-s);}
.pw-list small{color:var(--muted); font-size:var(--fs-s);}

/* ---- «Я» (DESIGN-2 Н7) ---- */
.me-card{display:flex; flex-direction:column; gap:var(--sp-3); margin-bottom:var(--sp-4);}
.me-card:empty{display:none;}
.me-head{display:flex; align-items:center; gap:var(--sp-3);}
.me-av svg{display:block; border-radius:50%;}
.me-head > span:last-child{display:flex; flex-direction:column; min-width:0;}
.me-head b{font-size:var(--fs-xl);}
.me-head small{font-size:var(--fs-s); color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.me-stats{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:var(--sp-2);}
.me-stat{display:flex; flex-direction:column; align-items:flex-start; gap:2px; padding:var(--sp-3); border-radius:12px; background:var(--panel-2); border:1px solid var(--line); color:var(--text); font:inherit; text-align:left; cursor:pointer;}
.me-stat b{font-size:var(--fs-xl); line-height:1.1;}
/* v165: one colour for the three numbers; the level shows its name (long ones shrink, never spill) */
.me-stat b.lvl{font-size:var(--fs-l); line-height:calc(var(--fs-xl) * 1.1); max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.me-stat small{font-size:var(--fs-xs); color:var(--muted);}
.me-ach{background:var(--panel-2); border:1px solid var(--line) !important; border-radius:var(--r);}
.me-more-kicker{display:block; margin:0 0 var(--sp-2);}

/* ---- v156: a stage — a tap opens its tasks; the round button on the right marks it reached ---- */
.milestone-list li .ms-check{display:none;}
.ms-reach{flex:0 0 auto; width:var(--tap); height:var(--tap); margin:-6px -6px -6px 0; display:flex; align-items:center; justify-content:center;
  background:none; border:0; padding:0; cursor:pointer; color:inherit; -webkit-tap-highlight-color:transparent;}
.ms-reach:active .tc-ring{transform:scale(.88);}
.ms-reach:focus-visible{outline:2px solid var(--accent); outline-offset:-2px; border-radius:50%;}
.milestone-list li.reached .ms-reach .tc-ring{background:var(--ok); border-color:var(--ok);}
.milestone-list li.reached .ms-reach .tc-ring svg{opacity:1;}
.milestone-list li{cursor:default;}
.milestone-list li.has-tasks .ms-body{cursor:pointer;}
.milestone-list li.has-tasks .ms-name::after{content:""; display:inline-block; width:7px; height:7px; margin:0 0 2px 8px; border-right:2px solid var(--muted);
  border-bottom:2px solid var(--muted); transform:rotate(45deg); transition:transform var(--dur-2) var(--ease);}
.milestone-list li.has-tasks.open .ms-name::after{transform:rotate(-135deg); margin-bottom:-2px;}
.ms-when{margin-left:auto; padding-left:var(--sp-2); font-size:var(--fs-xs); color:var(--muted); text-decoration:none; white-space:nowrap;}
.ms-task.done .ms-when{text-decoration:none;}
.ms-more{font-size:var(--fs-xs); color:var(--muted);}

/* ---- v156: closer to the mockup (design/mockup-2.0) ---- */
/* The chat header: the manager's portrait on the left, the name and role beside it (classic skin; others keep theirs) */
:root:not([data-skin]) .chat-header .hdr-side, [data-skin="classic"] .chat-header .hdr-side, [data-skin="glass"] .chat-header .hdr-side{display:none;}
:root:not([data-skin]) .chat-header .hdr-avatar, [data-skin="classic"] .chat-header .hdr-avatar, [data-skin="glass"] .chat-header .hdr-avatar{order:-1; width:40px; height:40px;}
:root:not([data-skin]) .chat-header .hdr-center, [data-skin="classic"] .chat-header .hdr-center, [data-skin="glass"] .chat-header .hdr-center{text-align:left;}
.chat-header .hdr-name{font-weight:700;}

/* The goal card: the days big, then one bar — stages reached (fill) against time gone (a mark), then the pace */
.gc-date{align-items:flex-start;}
.gd-days b{font-size:var(--fs-2xl);}
.gd-bar{flex:1 0 100%; display:flex; flex-direction:column; gap:6px;}
.gd-track{position:relative; height:6px; overflow:hidden; border-radius:999px; background:var(--line);}
.gd-fill{position:absolute; left:0; top:0; bottom:0; border-radius:999px; background:var(--accent-fill); transition:width var(--dur-3) var(--ease);}
.gd-edit{margin-top:-6px;}
/* v164: «Досягнуто» — a word button on the current stage only (a circle looked like a task's check) */
/* on its own row under the stage (beside it, it squeezed the stage's name and tasks to a narrow column) */
.milestone-list li.current{flex-wrap:wrap;}
.milestone-list li.current .ms-body{flex:1 1 calc(100% - 44px); min-width:0;}
.ms-reach.now{flex:0 0 auto; width:auto; min-height:var(--tap); margin:8px 0 0 44px; padding:0 14px; gap:6px; border-radius:999px;
  border:1.5px solid var(--line); color:var(--text); font:inherit; font-size:var(--fs-s); font-weight:600; white-space:nowrap;}
.ms-reach.now svg{width:16px; height:16px; fill:none; stroke:var(--ok); stroke-width:2.6; stroke-linecap:round; stroke-linejoin:round;}
.ms-reach.now:active{transform:scale(.95);}
.ms-reach.now:focus-visible{border-radius:999px;}
/* 0.208, BUG-24: «Етап справді досягнуто? Так / Ні» — on its own row under the stage, where the button was */
.milestone-list li.ms-asking{flex-wrap:wrap;}
.milestone-list li.ms-asking .ms-body{flex:1 1 calc(100% - 44px); min-width:0;}
.ms-confirm{flex:1 1 100%; display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:8px 0 0 44px; max-width:calc(100% - 44px); box-sizing:border-box;}
.ms-confirm-q{flex:1 1 100%; font-size:var(--fs-s); font-weight:600;}
.ms-confirm button{min-height:var(--tap); padding:0 18px; font-size:var(--fs-s);}
/* v164: days before the person's start — no circle, a pale name (not a miss) */
.fs-day.before i{border-color:transparent; background:none;}
.fs-day.before small{opacity:.35;}

/* The day's moment: the Goose, its words, the title, the chain — then «Мій шлях» · «Далі» side by side */
.celebrate[data-kind="day"] .cel-card > *{order:5;}
.celebrate[data-kind="day"] .cel-kicker{order:0;}
.celebrate[data-kind="day"] .cel-badge{order:1;}
.celebrate[data-kind="day"] .cel-goose{order:2; display:flex; margin:0 0 var(--sp-3);}
.celebrate[data-kind="day"] #cel-goose-face{display:none;}
.celebrate[data-kind="day"] .cel-name{order:3;}
.celebrate[data-kind="day"] .cel-desc{order:4;}
.celebrate[data-kind="day"] .cel-btns{order:9; flex-direction:row; width:100%; max-width:320px;}
.celebrate[data-kind="day"] .cel-btns button{flex:1 1 0; min-height:48px;}
.celebrate[data-kind="day"] #cel-close{background:var(--accent-fill); color:var(--on-accent); border-color:transparent; font-weight:700;}
.cel-btns button[hidden]{display:none !important;}

/* ================= v157 — STAGE 5: POLISH (DESIGN-2 §10) ================= */
/* The live Goose: blinks now and then; hops in the day's moment; hops when tapped in «Я» */
.goose .g-eye{transform-box:fill-box; transform-origin:center; animation:goose-blink 5.2s infinite;}
@keyframes goose-blink{0%, 93%, 100%{transform:scaleY(1);} 95.5%{transform:scaleY(.1);}}
@keyframes goose-hop{0%{transform:translateY(0) rotate(0);} 30%{transform:translateY(-14px) rotate(-6deg);} 55%{transform:translateY(0) rotate(3deg);} 72%{transform:translateY(-5px) rotate(0);} 100%{transform:translateY(0);}}
.celebrate.show .cel-day-goose{animation:goose-hop .9s .25s both var(--ease);}
.me-av{padding:0; border:0; background:none; cursor:pointer; border-radius:50%; -webkit-tap-highlight-color:transparent;}
.me-av.hop{animation:goose-hop .7s var(--ease);}
@media (prefers-reduced-motion: reduce){ .goose .g-eye, .celebrate.show .cel-day-goose, .me-av.hop{animation:none;} }

/* The check: only the row just ticked — the ring pops, the row in the day card slides in at the bottom */
@keyframes check-pop{0%{transform:scale(.6);} 55%{transform:scale(1.18);} 100%{transform:scale(1);}}
@keyframes row-sink{0%{opacity:0; transform:translateY(-10px);} 100%{opacity:1; transform:none;}}
li.task-row.just-done .tc-ring{animation:check-pop var(--dur-3) var(--ease);}
.dc-tasks li.task-row.just-done{animation:row-sink var(--dur-3) var(--ease);}
.dc-body.enter{animation:row-sink var(--dur-2) var(--ease);}
@media (prefers-reduced-motion: reduce){ li.task-row.just-done .tc-ring, .dc-tasks li.task-row.just-done, .dc-body.enter{animation:none;} }

/* Interface icons instead of emoji: the action cards in the chat, the hub tiles, buttons */
.ac-title .ac-ico{width:16px; height:16px; vertical-align:-3px; margin-right:2px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}
.btn-ico{width:18px; height:18px; vertical-align:-4px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}
.ht-ic svg{width:24px; height:24px; fill:none; stroke:var(--accent); stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round;}
.fbh-ic svg{width:22px; height:22px; fill:none; stroke:var(--accent); stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}

/* Progress: the level card in gold (as «рівень» in «Я»), not violet */
.lvl-badge{filter:drop-shadow(0 4px 10px rgba(217,164,65,.4));}
.lvl-bar i{background:linear-gradient(90deg, var(--accent-fill), #f0c870);}
.lvl-rank{color:var(--accent);}

/* ---- The new parts in the skins ---- */
/* Retro computer: square, bevelled */
[data-skin="retro"] .day-card, [data-skin="retro"] .me-stat, [data-skin="retro"] .pw-list li, [data-skin="retro"] .dc-week{border-radius:0; border:none; background:#c0c0c0; box-shadow:var(--raised);}
[data-skin="retro"] .dc-tasks li.task-row, [data-skin="retro"] .dc-plan li, [data-skin="retro"] .dc-energy button{border-radius:0; border:none; background:#fff; box-shadow:var(--sunken);}
[data-skin="retro"] .tc-ring{border-radius:0;}
[data-skin="retro"] .gd-track, [data-skin="retro"] .gd-fill{border-radius:0;}
[data-skin="retro"] .dc-ico, [data-skin="retro"] .dc-streak, [data-skin="retro"] .gd-pace{border-radius:0;}
/* Glass: the same light edge as its other panels; the card itself is dense (a blur per card draws late on phones, v118) */
html[data-skin="glass"] .day-card, html[data-skin="glass"] .me-stat, html[data-skin="glass"] .pw-list li{
  background-color:rgba(30,34,74,.78); border-color:var(--line); box-shadow:inset 0 1px 0 rgba(255,255,255,.14), 0 8px 24px rgba(0,0,0,.25);}
html[data-skin="glass"] .dc-tasks li.task-row, html[data-skin="glass"] .dc-plan li, html[data-skin="glass"] .dc-energy button{background-color:rgba(255,255,255,.06);}
/* Medieval: parchment and a gold edge */
[data-skin="medieval"] .day-card, [data-skin="medieval"] .me-stat, [data-skin="medieval"] .pw-list li{background:#fbf4e2; border:1px solid var(--gold); color:#3b2a14;}
[data-skin="medieval"] .dc-tasks li.task-row, [data-skin="medieval"] .dc-plan li{background:rgba(255,255,255,.55);}

/* ---- v158: sign-in (DESIGN-2 Н15) — «показати пароль», an error that reads as one ---- */
.pass-wrap{position:relative;}
.pass-wrap input{width:100%; padding-right:52px; box-sizing:border-box;}
.pass-eye{position:absolute; right:2px; top:50%; transform:translateY(-50%); width:var(--tap); height:var(--tap); display:flex; align-items:center; justify-content:center;
  background:none; border:0; padding:0; cursor:pointer; color:var(--muted); -webkit-tap-highlight-color:transparent;}
.pass-eye svg{width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}
.pass-eye[aria-pressed="true"]{color:var(--accent);}
.pass-eye[aria-pressed="true"] svg{stroke-dasharray:none;}
.pass-eye[aria-pressed="true"]::after{content:""; position:absolute; width:22px; height:2px; background:currentColor; transform:rotate(-40deg); border-radius:1px;}
.pass-eye:focus-visible{outline:2px solid var(--accent); outline-offset:-4px; border-radius:50%;}
.acc-note.bad{color:var(--bad); font-weight:600;}
#acc-form input.need{border-color:var(--bad); box-shadow:0 0 0 3px var(--bad-bg);}

/* ---- v159: the design check (DESIGN-2 §12) — nothing under 12 px, every tap ≥ 40 px, icons not emoji ---- */
.ms-label, .gc-kicker, .j-date, .j-badge, .wn-tag, .tag, .shop-short, .cal-heads span, .report-days small{font-size:var(--fs-xs) !important;}
.list-head .text-btn, #milestones-edit, #tasks-edit, #open-policy{min-height:40px; padding:0 10px; display:inline-flex; align-items:center;}
.list-head .text-btn{margin-right:-10px;}
.tpl-cat, .shop-act, [data-shop-tab]{min-height:40px;}
.rr-ico{width:16px; height:16px; vertical-align:-3px; margin-right:2px; fill:none; stroke:var(--accent); stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}
.fl-ico{fill:var(--flame); stroke:none;}
.streak-fire .fl-ico{width:16px; height:16px; vertical-align:-3px;}
.frz-ico{width:13px; height:13px; vertical-align:-2px; margin-right:1px; fill:none; stroke:#7cc4ff; stroke-width:2; stroke-linecap:round;}
.gift-row > svg:first-child{flex:0 0 auto;}

/* v159 — contrast ≥ 4.5 (the check found 2.5–4.3): a deeper gold and flame in the light theme, dark digits on the green node,
   a readable line under «Ти тестуєш Gooseppe». Skins keep their own colours (:not([data-skin])). */
@media (prefers-color-scheme: light){ :root:not([data-theme="dark"]):not([data-skin]){ --accent:#7c540a; --flame:#b84a0c; } }
:root[data-theme="light"]:not([data-skin]){ --accent:#7c540a; --flame:#b84a0c; }
.milestone-list li.reached .ms-node b{color:#132116;}
.fb-hero .fbh-txt small{color:var(--text); opacity:.82;}
:root{--on-ok:#132116;}
@media (prefers-color-scheme: light){ :root:not([data-theme="dark"]):not([data-skin]){ --on-ok:#ffffff; } }
:root[data-theme="light"]:not([data-skin]){ --on-ok:#ffffff; }
.milestone-list li.reached .ms-node b{color:var(--on-ok);}
.milestone-list li.reached .ms-label{color:var(--ok-text);}
.gd-pace.on, .gd-pace.ahead{color:var(--ok-text);}
.task-state.not_done{color:var(--bad-text);}
.ph-streak .ph-frz{color:var(--text);}
/* v159: one motion — pages and the toast on the same duration and curve as tabs and sheets */
.subpage{transition-duration:var(--dur-2) !important; transition-timing-function:var(--ease) !important;}
.toast{animation-timing-function:var(--ease) !important;}
.rd-grid small{font-size:var(--fs-xs);}
.streak-card .streak-fire .fl-ico{width:44px; height:44px;}
.streak-frz .frz .frz-ico{width:18px; height:18px; opacity:.35;}
.streak-frz .frz.on .frz-ico{opacity:1;}
/* v161: the guided flow — the gate in an app's own browser has no «continue here»; the sign-in name before installing */
.install-guide.ig-locked .ig-top{display:none;}
.fs-login{margin:0 0 var(--sp-3); padding:var(--sp-2) var(--sp-3); border-radius:12px; background:rgba(255,255,255,.1); font-weight:600;}
.frun-acts.wrap{flex-wrap:wrap;}
/* v163: the install gate («Крок 2 з 3») and step 3 in the icon app */
.ig-kicker, .fs-kicker{margin:0 0 var(--sp-2); font-size:var(--fs-xs); font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--accent);}
.ig-login{margin:0 0 var(--sp-3); padding:var(--sp-2) var(--sp-3); border-radius:12px; background:var(--surface-2, rgba(127,127,127,.12)); font-weight:600; line-height:1.45; overflow-wrap:anywhere;}
/* v188 (DESIGN-2 §18 крок 1 (б)): «Створюю акаунт…» — a spinner on the sign-in button while the server works */
#acc-go.busy{display:inline-flex; align-items:center; justify-content:center; gap:8px; opacity:.85; cursor:progress;}
#acc-go.busy::before{content:""; width:16px; height:16px; border-radius:50%; border:2px solid currentColor; border-right-color:transparent; animation:acc-spin .8s linear infinite;}
@keyframes acc-spin{to{transform:rotate(360deg);}}
@media (prefers-reduced-motion: reduce){ #acc-go.busy::before{animation-duration:2.4s;} }
.ig-open-icon{margin:var(--sp-3) 0 0; padding:var(--sp-3); border-radius:12px; border:1px solid var(--accent); font-weight:600; line-height:1.45; text-align:center;}
.ig-open-icon.ig-installed{margin:0 0 var(--sp-3);}
.ig-help-btn{display:block; margin:var(--sp-3) auto 0; min-height:var(--tap, 44px); color:var(--muted);}
.ig-helpbox{margin-top:var(--sp-3); display:flex; flex-direction:column; gap:var(--sp-2);}
.ig-helpbox label{font-weight:600;}
.ig-helpbox textarea{width:100%; box-sizing:border-box; border-radius:12px; padding:var(--sp-2) var(--sp-3); font:inherit; font-size:16px; background:var(--surface-2, transparent); color:var(--text); border:1px solid var(--line, rgba(127,127,127,.35));}

/* v165 (design check, item 8): finger-sized — the chat's suggestions and «Усі задачі» are at least 44 px tall */
.qr-chip{min-height:var(--tap); display:inline-flex; align-items:center;}
.dc-all{min-height:var(--tap); display:inline-flex; align-items:center;}

/* v166 (design check, item 6): «Застосунок на головному екрані» — a card: icon, title, one line, «Як встановити» */
.install-card{display:grid; grid-template-columns:auto 1fr; column-gap:var(--sp-3); row-gap:4px; align-items:center;
  margin:0 0 var(--sp-3); padding:var(--sp-3); border-radius:12px; background:var(--panel-2); border:1px solid var(--line);}
.install-card[hidden]{display:none;}
.install-card .ic-phone{grid-row:1 / span 2; width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:var(--accent-dim); color:var(--accent);}
.install-card .ic-phone svg{width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;}
.install-card .install-title{font-size:var(--fs-m);}
.install-card .hint{margin:0; grid-column:2;}
.install-actions{grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:var(--sp-2); margin-top:var(--sp-2);}
.install-actions button{min-height:var(--tap); flex:1 1 auto;}
.install-actions button[hidden]{display:none;}

/* v166 (item 9): a stage's icon is a picture on the Path; in «Змінити» it is a 44 px button beside the name */
span.item-icon{cursor:inherit;}
span.item-icon:active{transform:none;}
.milestone-list.editing li .ms-ico{width:var(--tap); height:var(--tap); flex:0 0 auto;}

/* v168: while the keyboard is open the day card was folded to one line; v191: it is always one line (the strip). */

/* v169 (app review, groups Б+В): one «Змінити» on the goal card; a stage in short; weeks the same; wrapping fields */
.gc-bar .gc-edit{margin-left:auto; min-width:0; min-height:var(--tap); padding:0 4px; font-weight:600;}
.gc-bar .gc-winbtns{margin-left:var(--sp-2);}
[data-skin="retro"] .gc-bar .gc-edit{color:#fff; min-height:0;}
.goal-card.editing{outline:2px solid var(--accent); outline-offset:-2px;}
.goal-card .goal-rename-input{flex:1; min-width:0; font:inherit; font-size:var(--fs-l); font-weight:700;}
.gd-edit{display:inline-flex; align-items:center; gap:6px; min-height:var(--tap); padding:0 10px; margin-top:0; font-size:var(--fs-s); font-weight:600;}
.gd-edit svg{width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8;}
#goal-complete .goal-postpone{width:100%; min-height:var(--tap);}
.ms-done-toggle, .ms-res-toggle{align-self:flex-start; min-height:36px; padding:0; background:none; border:0; color:var(--ms); font:inherit; font-size:var(--fs-s); font-weight:600; cursor:pointer; text-align:left;}
.ms-done-toggle::after, .ms-res-toggle::after{content:""; display:inline-block; width:6px; height:6px; margin:0 0 2px 8px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg);}
.ms-done-toggle[aria-expanded="true"]::after, .ms-res-toggle[aria-expanded="true"]::after{transform:rotate(-135deg); margin-bottom:-2px;}
.ms-task.done{text-decoration:none;}
.ms-task.done .ms-t{text-decoration:line-through;}
.ms-task .ms-t{flex:1; min-width:0;}
.pw-day i{display:flex; align-items:center; justify-content:center; font-style:normal; font-size:16px;}
.pw-day.lit i{background:var(--accent-dim); border-color:var(--flame, #f08a3c);}
.pw-list li{flex-direction:column; align-items:flex-start; gap:2px;}
.pw-list .pw-dates{font-weight:600;}
/* 0.191 (DESIGN-3-AUDIT §10): «Тиждень N з M · Етап K», «4 з 6 задач», past weeks — rows that open the week card */
.pw-head{font-size:var(--fs-m); font-weight:700; line-height:1.3; overflow-wrap:anywhere;}
.pw-week{margin-bottom:0;}
.pw-count{margin:0 0 var(--sp-2); font-size:var(--fs-s); color:var(--muted);}
.pw-day.frozen i{border-color:#7cc4ff; color:#7cc4ff;}
.pw-day.off i, .pw-day.off small{opacity:.45;}
.pw-list li{padding:0; display:block;}
.pw-row{width:100%; display:flex; align-items:center; gap:var(--sp-3); min-height:56px; padding:var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3);
  background:none; border:0; color:inherit; font:inherit; text-align:left; cursor:pointer; border-radius:inherit; -webkit-tap-highlight-color:transparent;}
.pw-row:active{background:var(--accent-dim);}
.pw-txt{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px;}
.pw-mini{flex:0 0 auto; display:flex; gap:3px;}
.pw-mini i{width:8px; height:8px; border-radius:50%; background:var(--line);}
.pw-mini i.lit{background:var(--flame);}
.pw-mini i.frozen{background:#7cc4ff;}
.pw-mini i.off{opacity:.35;}
.pw-row .chev{flex:0 0 auto; width:18px; height:18px; fill:none; stroke:var(--muted); stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}
.pw-more{align-self:stretch; min-height:var(--tap); justify-content:center;}
.wk-sum{margin:0 0 var(--sp-3); font-size:var(--fs-m); font-weight:600;}
.wk-reached{margin:0 0 var(--sp-3); padding:var(--sp-2) var(--sp-3); border-radius:12px; background:var(--ok-bg); color:var(--text); font-size:var(--fs-s); overflow-wrap:anywhere;}
.wk-day{margin:0 0 var(--sp-3);}
.wk-day b{display:block; font-size:var(--fs-s); color:var(--muted); font-weight:600; margin-bottom:var(--sp-1);}
.wk-day ul{margin:0; padding-left:var(--sp-5); display:flex; flex-direction:column; gap:2px; font-size:var(--fs-m); overflow-wrap:anywhere;}
textarea.row-input{resize:none; overflow:hidden; font:inherit; line-height:1.35; min-height:36px; box-sizing:border-box; display:block;}
textarea.goal-rename-input{resize:none; overflow:hidden; line-height:1.3; box-sizing:border-box; padding:8px 10px;}
/* 0.206 (BUG-23): «Змінити» — the goal's name on its own line, the whole width (the ring is hidden); a stage's row:
   ⊖ on the left, ≡ on the right, the field between them, its icon (44 px) under ⊖ */
.goal-card.editing .gc-main{flex-wrap:wrap;}
.goal-card .goal-title[hidden], .goal-card .goal-title.long[hidden]{display:none;} /* a long name's clamp showed it beside the field */
.goal-card.editing .goal-rename-input{flex:1 1 100%; width:100%;}
.milestone-list.editing li{display:grid; grid-template-columns:auto minmax(0, 1fr) auto; grid-template-rows:auto auto; column-gap:6px; row-gap:2px; align-items:center;}
.milestone-list.editing li > .row-del{grid-column:1; grid-row:1;}
.milestone-list.editing li > .ms-ico{grid-column:1; grid-row:2; width:var(--tap); height:var(--tap); justify-self:center;} /* 44 px — a finger (v166) */
.milestone-list.editing li > .row-input{grid-column:2; grid-row:1 / span 2; align-self:stretch;}
.milestone-list.editing li > .row-handle{grid-column:3; grid-row:1 / span 2; -webkit-touch-callout:none; user-select:none; -webkit-user-select:none;}
.row-handle{-webkit-touch-callout:none; user-select:none; -webkit-user-select:none;}
.gc-date .gd-edit{flex:1 0 100%; justify-content:flex-start; padding-left:0;}

/* v169 (owner: long names must not take over blocks) — people's and the manager's words wrap anywhere (a link, a long
   word) and long ones are clamped where space is tight; the whole text is one tap / one page away */
.goal-title, .ms-name, .ms-t, .task-text, .tt, .msg, .cel-chain, .cel-name, .me-head small{overflow-wrap:anywhere;}
.clamp-2, .ms-tasks .ms-t{display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;}
.goal-card .goal-title.long{font-size:var(--fs-m); line-height:1.3; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; cursor:pointer;}
.goal-card .goal-title.long.full{-webkit-line-clamp:unset; display:block;}
.milestone-list li:not(.open):not(.current) .ms-name{display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;}
.task-text .tt{display:block;}

/* v170 (app review, groups Г+Д): «Я» — icons for the numbers, the medals card, the «Ще» icons, one gap of 16 px */
.me-stat-ic{width:22px; height:22px; margin-bottom:2px; color:var(--muted);}
.me-stat-ic svg{width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;}
.me-stat-ic.lvl{color:var(--accent);} .me-stat-ic.fl{color:var(--flame);} .me-stat-ic.fe{color:var(--ms);}
.me-ach{gap:var(--sp-3);}
.me-ach-badges{display:flex; flex:0 0 auto;}
.me-ach-badges svg{width:30px; height:30px;}
.me-ach-badges svg + svg{margin-left:-8px;}
.me-card{margin-bottom:var(--sp-4);}
.set-root > .set-menu, .set-root > .install-card, .set-root > .fb-hero{margin:0 0 var(--sp-4);}
.set-root > .me-more-kicker{display:block; margin:0 0 var(--sp-2);}
.c-me-progress{background:#3a9d6e;} .c-me-shop{background:#d9a441;} .c-me-games{background:#8a63d2;} .c-me-friends{background:#2a9db5;}
.set-row small{display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
/* the achievements — a grid of 3; a tap shows the description under its grid */
.ach-grid{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:var(--sp-2);}
.ach-grid .ach{flex-direction:column; align-items:center; justify-content:flex-start; gap:6px; padding:var(--sp-3) var(--sp-2); text-align:center; color:var(--text); font:inherit; cursor:pointer; min-height:120px;}
.ach-grid .ach .ach-name{font-size:var(--fs-xs); font-weight:600; line-height:1.3; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; overflow-wrap:anywhere; letter-spacing:0;}
.ach-grid .ach.locked .ach-name{letter-spacing:0;}
.ach-grid .ach .ach-prog{width:100%; margin-top:auto;}
/* v174: a medal from the Achievements page in the celebration window, calm — no glow for a locked one; long text wraps */
.celebrate[data-kind="view"] .cel-name, .celebrate[data-kind="view"] .cel-desc{overflow-wrap:anywhere;}
.celebrate[data-kind="view"] .cel-when{margin:0; color:var(--muted); font-size:var(--fs-s);}
.celebrate[data-kind="view"] .ach-prog{width:min(220px, 70%); margin:var(--sp-2) auto 0;}
.celebrate[data-kind="view"] .ach-prog i{background:var(--accent);}
.celebrate[data-metal="none"]{--cel-glow:transparent;}
.cel-goose[hidden]{display:none;}
#confetti[hidden]{display:none;}

/* v177 (DESIGN-2 §16 П0): one after another — an entry waiting its turn (animation-delay, chat-view.js queueTurn) stays
   invisible until then; «↓ New» while reading older messages (takes no room: pulled up over the chat's bottom edge) */
#messages .anim-in, #messages .w{animation-fill-mode:both;}
.chat-jump{align-self:flex-end; position:relative; z-index:3; margin:calc(-1 * var(--tap) - var(--sp-2)) var(--sp-3) var(--sp-2) 0;
  display:inline-flex; align-items:center; gap:var(--sp-1); min-height:var(--tap); padding:0 var(--sp-4) 0 var(--sp-3);
  border-radius:999px; border:1px solid var(--line); background:var(--panel-2); color:var(--accent); font:inherit;
  font-size:var(--fs-s); font-weight:600; box-shadow:0 6px 18px rgba(0,0,0,.28); cursor:pointer;
  animation:jump-in var(--dur-2) var(--ease) both;}
.chat-jump[hidden]{display:none;}
.chat-jump svg{width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round;}
.chat-jump .cj-n{min-width:20px; height:20px; padding:0 6px; box-sizing:border-box; border-radius:999px; background:var(--accent-fill, var(--accent));
  color:var(--on-accent, #26210f); font-size:var(--fs-xs); line-height:20px; text-align:center;}
@keyframes jump-in{from{opacity:0; transform:translateY(8px) scale(.94);} to{opacity:1; transform:none;}}

/* v179 (DESIGN-2 §16 П3): in every bottom sheet a finger hits every button — ≥ 44 px tall, the ✕ a 44×44 area around
   the same glyph (the look stays: only the touch area grows) */
.drawer button{min-height:var(--tap);}
.drawer .close-sheet{min-width:var(--tap); display:inline-flex; align-items:center; justify-content:center;}

/* v180 (DESIGN-2 §16 П6): «typing» at the bottom, under the messages (like Teams — where the eyes are after sending);
   an empty chat — the portrait in the middle, with dots while the manager prepares its first words */
.chat-typing{flex:0 0 auto; display:flex; align-items:center; gap:2px; padding:0 var(--sp-4) var(--sp-1); min-height:20px; font-size:var(--fs-xs); color:var(--muted); min-width:0;}
.chat-typing[hidden]{display:none;}
.chat-typing .ct-who{min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.chat-typing .typing-dots{flex:0 0 auto; color:var(--accent);}
[data-skin="retro"] .chat-typing{background:#008080; color:#fff;}
[data-skin="retro"] .chat-typing .typing-dots{color:#fff;}
#messages{position:relative;}
.chat-empty .ce-dots{color:var(--accent); margin:0;}
.chat-empty .ce-dots i{width:6px; height:6px;}
.chat-empty.leaving{position:absolute; left:0; right:0; top:30%; margin:0 auto; pointer-events:none; animation:ce-out var(--dur-2) var(--ease) both;}
@keyframes ce-out{to{opacity:0; transform:translateY(-8px);}}

/* v181 (DESIGN-2 §16 П7): the goal's two lines — «Етапи» (gold) over «Час» (grey): shorter on top = behind, seen at a glance */
.gd-line{display:grid; grid-template-columns:minmax(44px, max-content) minmax(0, 1fr); align-items:center; gap:var(--sp-2); font-size:var(--fs-xs); color:var(--muted);}
.gd-line.time .gd-fill{background:var(--muted);}
/* v181 (П8): the «Я» icons in one colour, the brand's; only «Почати заново» warns. Retro and Medieval keep their own look. */
html:not([data-skin="retro"]):not([data-skin="medieval"]) .set-ic{background:var(--accent-dim); color:var(--accent);}
html:not([data-skin="retro"]):not([data-skin="medieval"]) .set-ic.c-danger{background:var(--bad-bg); color:var(--bad);}
/* v181 (П9): «Увійти» as wide as the fields above it */
#acc-go{width:100%;}
/* v181: the longer «Позначити досягнутим» wraps inside its stage on a narrow phone (flex:0 0 auto pushed it out at 320 px) */
.ms-reach.now{flex:0 1 auto; max-width:calc(100% - 44px); box-sizing:border-box; text-align:left;}
.ms-reach.now svg{flex:0 0 auto;}
.ms-reach.now span{min-width:0; white-space:normal;}

/* Idea 77: the start quiz's cards in the chat (guided.js) */
.gp-card{align-self:stretch; box-sizing:border-box; max-width:92%; min-width:0; margin:4px 0 10px; padding:14px; border-radius:16px; background:var(--panel-2); border:1px solid var(--line, rgba(127,127,127,.25)); overflow-wrap:anywhere;}
.gp-text{font-weight:600; margin-bottom:10px; line-height:1.35;}
.gp-options{display:flex; flex-wrap:wrap; gap:8px;}
.gp-opt{min-height:44px; max-width:100%; white-space:normal; overflow-wrap:anywhere; text-align:left; padding:8px 14px; border-radius:12px; cursor:pointer; font:inherit; color:inherit;}
.gp-opt{background:transparent; border:1px solid var(--accent, currentColor);}
/* 0.196 step 3: «Як ведемо:» — the goal's shape under the summary, smaller than «Так» / «Виправити» (guided.js) */
.gp-shapes{display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:10px;}
.gp-shapes-label{flex-basis:100%; font-size:var(--fs-xs); color:var(--muted); font-weight:600;}
.gp-shape{min-height:40px; max-width:100%; padding:6px 12px; border-radius:999px; font:inherit; font-size:var(--fs-s); color:var(--muted); background:transparent; border:1px solid var(--line); cursor:pointer; overflow-wrap:anywhere;}
.gp-shape[aria-pressed="true"]{color:var(--text); border-color:var(--accent); background:var(--accent-dim); font-weight:600;}
/* Step 5 of DESIGN-2 §18: the plan as a proposal — the goal, the deadline, the stages, «Так, почнемо» / «Змінити щось» */
.gp-kicker{font-size:12px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; opacity:.7; margin-bottom:4px;}
.gp-goal{font-weight:700; font-size:18px; line-height:1.3; margin-bottom:4px;}
.gp-when{font-size:12px; opacity:.75; margin-bottom:8px;}
.gp-stages{margin:0 0 10px; padding-left:22px; line-height:1.4;}
.gp-stage{margin:2px 0;}
.gp-proposal .gp-text{font-weight:400;}
.gp-yes{background:var(--accent-fill); color:var(--on-accent); border:0; font-weight:600;}

/* Step 7 of DESIGN-2 §18: the new start's one task card — the first task lit, the rest of today's list under it */
.fw-card .fw-list{list-style:none; margin:6px 0 8px; padding:0; display:flex; flex-direction:column; gap:4px; overflow-wrap:anywhere;}
.fw-card .fw-next{padding:2px 10px; color:var(--muted); font-size:14px;}
/* docs/HELPER.md: «Як це зробити?» on a task, the offer of help, 👍 / 👎 under the help (helper.js) */
/* v191 (DESIGN-3-AUDIT §2): a quiet bulb 44×44 at the right of the row; gold — there was help with this task */
.task-help{flex:0 0 auto; width:var(--tap); height:var(--tap); display:flex; align-items:center; justify-content:center; align-self:center;
  margin:0 -6px 0 0; padding:0; border:0; background:none; color:var(--muted); cursor:pointer; -webkit-tap-highlight-color:transparent;}
.task-help svg{width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;}
.task-help.helped{color:var(--accent);}
.task-help.helped svg path:last-child{fill:var(--accent-dim);}
.task-help:active{transform:scale(.9);}
.task-help:focus-visible{outline:2px solid var(--accent); outline-offset:-4px; border-radius:50%;}
/* v191: a tap on the name opens the task card */
li.task-row .task-text{cursor:pointer;}
#task-sheet{z-index:14;}
body:has(#task-sheet.open) .overlay{z-index:13;}
.tk-name{margin:0 0 var(--sp-1); font-size:var(--fs-l); line-height:1.35; font-weight:600; overflow-wrap:anywhere;}
.tk-meta{margin:0 0 var(--sp-4); font-size:var(--fs-s); color:var(--muted);}
.tk-acts{display:flex; flex-direction:column; gap:var(--sp-2);}
.tk-acts button{min-height:var(--tap); width:100%;}
.help-rate{display:flex; gap:var(--sp-2, 8px); align-items:center; margin:2px 0 8px;}
.help-rate button{border:1px solid var(--line, rgba(127,127,127,.3)); background:transparent; border-radius:14px; padding:4px 10px; font-size:14px; line-height:1.2; cursor:pointer;}
.help-rate small{color:var(--muted); font-size:12px;}
/* 0.191 (DESIGN-3-AUDIT §11): the head of «Я» opens «Профіль і акаунт»; the install card is one row on a phone */
.me-open{flex:1; min-width:0; display:flex; align-items:center; gap:var(--sp-2); min-height:var(--tap); padding:0; margin:0; border:0;
  background:none; color:inherit; font:inherit; text-align:left; cursor:pointer; -webkit-tap-highlight-color:transparent;}
.me-open .me-who{flex:1; min-width:0; display:flex; flex-direction:column;}
.me-open .chev{flex:0 0 auto; width:20px; height:20px; fill:none; stroke:var(--muted); stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}
.me-open:active{opacity:.7;}
.install-card.ic-row{grid-template-columns:auto 1fr auto; padding-top:var(--sp-2); padding-bottom:var(--sp-2);}
.install-card.ic-row .ic-phone{grid-row:auto;}
.install-card.ic-row .install-actions{grid-column:auto; margin:0; flex-wrap:nowrap;}
.install-card.ic-row .install-actions button{flex:0 0 auto; padding:0 var(--sp-3);}
.acc-more{margin-top:var(--sp-4);}
/* 0.191 (DESIGN-3-AUDIT §4, §7): a chat note is a pill — a soft background, 13 px, an icon; a secret one is tappable; a warning
   is warm. Never like a bubble of the manager. */
.msg.system-note{display:inline-flex; align-items:center; gap:6px; max-width:min(92%, 420px); padding:5px 12px; border-radius:16px;
  background:var(--panel-2); border:1px solid var(--line); color:var(--muted); font-size:13px; font-style:normal; line-height:1.35;
  text-align:left; box-sizing:border-box; overflow-wrap:anywhere;}
.msg.system-note .sn-ico{flex:0 0 auto; display:flex; width:16px; height:16px;}
.msg.system-note .sn-ico svg{width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}
.msg.system-note .sn-emoji{font-size:14px; line-height:16px; justify-content:center;}
.msg.system-note .sn-t{min-width:0;}
.msg.system-note.tap{cursor:pointer; color:var(--text); -webkit-tap-highlight-color:transparent;}
.msg.system-note.tap:active{background:var(--accent-dim);}
.msg.system-note.tap:focus-visible{outline:2px solid var(--accent); outline-offset:2px;}
.msg.system-note .chev{flex:0 0 auto; width:14px; height:14px; fill:none; stroke:var(--muted); stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}
.msg.system-note.warn{color:var(--accent); border-color:var(--accent-dim); background:var(--accent-dim);}
/* 0.191 (DESIGN-3-AUDIT §6): the light moment of an ordinary day — one line at the top for ~3 s (the streak, the gift joins it) */
.moment-chip{position:fixed; z-index:16; left:50%; top:calc(var(--safe-top) + 64px); transform:translateX(-50%); width:max-content; max-width:calc(100vw - 32px); box-sizing:border-box;
  display:flex; align-items:center; gap:6px; padding:8px 16px; border-radius:999px; background:var(--panel); border:1px solid var(--line);
  box-shadow:0 8px 24px rgba(0,0,0,.25); color:var(--text); font-size:var(--fs-s); font-weight:600; pointer-events:none;
  animation:chip-drop var(--dur-3) var(--ease) both;}
.moment-chip[hidden]{display:none;}
@keyframes chip-drop{from{opacity:0; transform:translate(-50%, -12px);} to{opacity:1; transform:translate(-50%, 0);}}
@media (prefers-reduced-motion: reduce){ .moment-chip{animation:none;} }
/* 0.191 (DESIGN-3-AUDIT §5, §7 — five roles of text): section titles in sentence case 13 px bold (no CAPS; small badges like
   «Скоро» stay caps), explanations 14 px, numbers with steady digits, journal dates in the normal font. */
.section-kicker, .gc-kicker, .cel-kicker, .ig-kicker, .fs-kicker, .gp-kicker, .lvl-label, .gp-label{text-transform:none; letter-spacing:0;}
.section-kicker, .gc-kicker{font-size:13px; font-weight:700;}
.ms-label{display:none;} /* «ЕТАП N» over a stage — the number is in its circle on the line already */
.hint{font-size:14px;}
.hint.app-diag{font-size:12px;}
.dc-sub, .dc-streak b, .pw-count, .pw-sum, .me-stat b, .gd-days b, .streak-num, .wk-sum, .ph-sub{font-variant-numeric:tabular-nums;}
.j-ms-list .j-date, .j-task-list .j-date{font-family:var(--sans);}
/* 0.191 (DESIGN-3-AUDIT §8, §12): more quick replies than fit — the right edge fades (they scroll); every icon button ≥ 44 */
.quick-replies{-webkit-mask-image:linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image:linear-gradient(to right, #000 calc(100% - 28px), transparent);}
.icon-btn, .back-btn, #ph-back{min-width:var(--tap); min-height:var(--tap);}
.ph-back, .back-btn{width:var(--tap); height:var(--tap);}
#ph-journal, .cal-nav .icon-btn{width:var(--tap); height:var(--tap);}
/* 0.191 (DESIGN-3-AUDIT §6): tabs are not «deeper» — a new tab fades in, it doesn't slide from the side */
.panel.enter-from-right, .panel.enter-from-left{animation:tab-fade var(--dur-2) var(--ease);}
@keyframes tab-fade{from{opacity:0;} to{opacity:1;}}
@media (prefers-reduced-motion: reduce){ .panel.enter-from-right, .panel.enter-from-left{animation:none;} }
/* 0.191 (DESIGN-3-AUDIT §5, step 9; owner 2026-11-19: «Nunito»): one display font for the titles and the big numbers — Gooseppe
   looks the same on every phone; the body text stays the system font. The files are in the app (app/fonts, offline too; SIL Open
   Font License — app/fonts/LICENSE.txt); until they load the system font shows (swap). */
@font-face{font-family:"Nunito"; font-style:normal; font-weight:700 800; font-display:swap; src:url("../fonts/nunito-cyrillic.woff2") format("woff2");
  unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:"Nunito"; font-style:normal; font-weight:700 800; font-display:swap; src:url("../fonts/nunito-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
:root{--display:"Nunito", var(--sans);}
.ph-title, .goal-title, #goal-title-text, .gd-days b, .me-stat b, .me-head b, .cel-name, .pw-head, .streak-num, .dc-stitles b, .wk-sum, .tk-name, .chat-empty b{
  font-family:var(--display); font-weight:800; letter-spacing:-.005em;}
/* a long goal title wraps with a hyphen (Ukrainian rules — html lang), not mid-word without a sign */
.goal-title, #goal-title-text{hyphens:auto; -webkit-hyphens:auto; overflow-wrap:break-word;}
/* Nunito is a bit wider: on narrow phones the level's name and a long word in the goal's title get a size that fits */
.me-stat b.lvl{font-size:var(--fs-m); line-height:1.2;}
@media (max-width: 360px){ #goal-title-text{font-size:18px;} #goal-title-text.long{font-size:16px;} .me-stat b.lvl{font-size:var(--fs-s);} }
/* Idea 85: a working day kept by the evening answer (A) or brought back by «наздогнати» (B) — a pale flame, a dashed ring */
.pw-day.kept i, .fs-day.kept i{border:1.5px dashed var(--flame, #f08a3c); background:transparent; opacity:.75;}
.cd.kept{outline:1.5px dashed var(--flame, #f08a3c); outline-offset:-2px;}
/* owner 2026-11-19 (after the redesign): «💡 Як?» — a round pill with a word (a bare bulb said nothing); 44 px to hit */
.task-help{width:auto; min-width:var(--tap); padding:0; margin:0 -4px 0 0;}
.task-help .th-pill{display:inline-flex; align-items:center; gap:4px; height:30px; padding:0 10px 0 8px; border-radius:999px;
  border:1px solid var(--line); background:var(--panel-2); color:var(--muted); font-size:var(--fs-s); font-weight:600; white-space:nowrap;}
.task-help .th-pill svg{width:16px; height:16px;}
.task-help.helped .th-pill{color:var(--accent); border-color:var(--accent-dim); background:var(--accent-dim);}
.task-help.helped svg path:last-child{fill:none;}
/* the strip: three things (ring, task, check) and a grip on top — it pulls up into the sheet */
.dc-head{position:relative;}
.dc-strip-grip{position:absolute; left:50%; top:-1px; width:32px; height:4px; margin-left:-16px; border-radius:2px; background:var(--line);}
.dc-head .dc-ring{cursor:pointer;}
/* «Змінити» / «Готово» in the sheet's head; «+ Додати задачу» under the list being edited */
.dc-sheet-head .dc-edit{flex:0 0 auto; min-height:var(--tap); min-width:0; padding:0 var(--sp-2); font-weight:600;}
.dc-add{display:flex; gap:var(--sp-2); align-items:center; margin-top:var(--sp-2);}
.dc-add input{flex:1; min-width:0; min-height:var(--tap); padding:0 12px; border-radius:12px; border:1px solid var(--line); background:var(--panel); color:var(--text);}
.dc-add .pill-btn{flex:0 0 auto; min-height:var(--tap); padding:0 14px; border:0; border-radius:999px; background:var(--accent-dim); color:var(--accent); font:inherit; font-weight:700; cursor:pointer;}
.dc-tasks.editing li{display:flex; align-items:center; gap:var(--sp-2); padding:var(--sp-1) var(--sp-2); background:var(--panel); border-radius:12px;}
/* 2026-11-20 (owner): after 👍 / 👎 the chosen one stays lit, with a short «Дякую» */
.help-rate .hr-chosen{display:inline-flex; align-items:center; justify-content:center; min-width:36px; height:30px; padding:0 8px; border-radius:14px;
  border:1px solid var(--accent); background:var(--accent-dim); font-size:14px; line-height:1;}
.help-rate .hr-chosen.down{border-color:var(--line); background:var(--panel-2);}
.help-rate small{color:var(--muted); font-size:var(--fs-xs);}
/* 0.197 (reserve.js): the stage's task list on the Path — «Задачі етапу: N з M», «Взяти сьогодні» */
.ms-res-row{align-items:center; min-height:36px;}
.ms-res-take{flex:0 0 auto; min-height:32px; padding:0 10px; border:1px solid var(--line, currentColor); border-radius:999px; background:none; color:var(--ms); font:inherit; font-size:var(--fs-s); font-weight:600; cursor:pointer; white-space:nowrap;}
.ms-res-today{flex:0 0 auto; color:var(--muted); font-size:var(--fs-s); white-space:nowrap;}

/* 0.199: the mode «Здоров'я і спорт» (health.js) — the Path's card, «Перейти в режим», the technique, the food */
.hs-path{margin:var(--sp-3) 0;}
.hs-card{padding:var(--sp-3); border:1px solid var(--line); border-radius:var(--r); background:var(--panel-2); display:flex; flex-direction:column; gap:var(--sp-2);}
.hs-card p{margin:0;}
.hs-kicker{font-size:var(--fs-xs); font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--muted);}
.hs-norm{font-weight:600; overflow-wrap:anywhere;}
.hs-red{color:var(--bad-text); background:var(--bad-bg); border:1px solid var(--bad-border); border-radius:var(--r-sm); padding:var(--sp-2);}
.hs-data, .hs-limits{font-size:var(--fs-s); color:var(--muted); overflow-wrap:anywhere;}
.hs-data .text-btn{min-height:var(--tap); padding:0 var(--sp-1);}
.hs-warn{font-size:var(--fs-xs);}
.hs-form{display:grid; grid-template-columns:1fr 1fr; gap:var(--sp-2);}
.hs-form label{display:flex; flex-direction:column; gap:4px; font-size:var(--fs-xs); color:var(--muted); min-width:0;}
.hs-form input, .hs-form select{min-height:var(--tap); font:inherit; font-size:var(--fs-s); color:var(--text); background:var(--panel); border:1px solid var(--line); border-radius:var(--r-sm); padding:0 var(--sp-2); min-width:0;}
.hs-form-row, .hs-form-note{grid-column:1 / -1;}
.hs-form-row{display:flex; gap:var(--sp-2); align-items:center;}
.hs-switch{display:flex; flex-direction:column; align-items:flex-start; gap:2px; width:100%; min-height:var(--tap); padding:var(--sp-2) var(--sp-3); border:1px dashed var(--line); border-radius:var(--r); background:none; color:var(--text); font:inherit; text-align:left; cursor:pointer;}
.hs-switch small{color:var(--muted); font-size:var(--fs-xs);}
.ex-card{margin:var(--sp-2) 0; display:flex; flex-direction:column; gap:var(--sp-2);}
.ex-title{margin:0; font-size:var(--fs-xs); font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--muted);}
.ex-item{border:1px solid var(--line); border-radius:var(--r-sm); background:var(--panel-2);}
.ex-item summary{min-height:var(--tap); display:flex; align-items:center; padding:0 var(--sp-3); font-weight:600; cursor:pointer; overflow-wrap:anywhere;}
.ex-body-wrap{padding:0 var(--sp-3) var(--sp-3);}
.ex-pic{display:block; width:100%; max-width:240px; height:auto; margin:0 auto var(--sp-2); color:var(--text);}
.ex-pic .ex-body{fill:none; stroke:currentColor; stroke-width:3; stroke-linecap:round; stroke-linejoin:round;}
.ex-pic .ex-body circle{fill:var(--panel); }
.ex-pic .ex-floor{stroke:var(--line); stroke-width:2;}
.ex-pic .ex-obj{fill:var(--accent-dim); stroke:var(--accent); stroke-width:1.5;}
.ex-steps{margin:0 0 var(--sp-2); padding-left:1.3em; font-size:var(--fs-s); display:flex; flex-direction:column; gap:4px;}
.ex-err{margin:0; font-size:var(--fs-s); color:var(--muted);}
.ex-warn{margin:0; font-size:var(--fs-xs);}
/* BUG-19 (0.210): the exercises right under a workout task / in the chat card — names as chips, an opened one takes the row */
.ex-inline{display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; min-width:0; max-width:100%;}
.ex-inline .ex-item{flex:0 1 auto; min-width:0; max-width:100%; background:var(--panel);}
.ex-inline .ex-item[open]{flex-basis:100%;}
.ex-inline .ex-item summary{min-height:var(--tap); padding:0 var(--sp-3); font-size:var(--fs-s); list-style:none;}
.ex-inline .ex-item summary::-webkit-details-marker{display:none;}
.ex-inline .ex-item summary::before{content:"▸"; margin-right:6px; color:var(--muted);}
.ex-inline .ex-item[open] summary::before{content:"▾";}
.ex-inline .ex-body-wrap{display:flex; flex-direction:column; gap:var(--sp-2);}
.ex-inline .ex-pic{max-width:200px;}
.ac-list .ex-inline{font-weight:400;}
.hs-menu{display:flex; flex-direction:column; gap:var(--sp-2); padding-top:var(--sp-2); border-top:1px solid var(--line);}
.hs-sub{margin:0; font-weight:700; font-size:var(--fs-s);}
.hs-day, .hs-shop{border:1px solid var(--line); border-radius:var(--r-sm); background:var(--panel);}
.hs-day summary, .hs-shop summary{min-height:var(--tap); display:flex; align-items:center; padding:0 var(--sp-3); cursor:pointer; font-size:var(--fs-s); font-weight:600;}
.hs-meals{list-style:none; margin:0; padding:0 var(--sp-3) var(--sp-2); display:flex; flex-direction:column; gap:var(--sp-2);}
.hs-meals li{display:flex; flex-wrap:wrap; gap:2px var(--sp-1); font-size:var(--fs-s); overflow-wrap:anywhere;}
.hs-meals small{flex-basis:100%; color:var(--muted);}
/* 0.203 (IDEA-94): «З'їв» on a meal of today's menu */
.hs-meals li{position:relative;}
.hs-eat{margin-left:auto; min-height:32px; padding:0 var(--sp-2); font:inherit; font-size:var(--fs-xs); color:var(--accent); background:transparent; border:1px solid var(--accent); border-radius:999px; cursor:pointer;}
.hs-meals li.eaten .hs-eat{color:var(--bg); background:var(--accent);}
.hs-meals li.eaten b{text-decoration:line-through; text-decoration-color:var(--muted);}
.hs-kcal{color:var(--muted);}
.hs-shop-row{display:flex; align-items:center; gap:var(--sp-2); min-height:var(--tap); padding:0 var(--sp-3); font-size:var(--fs-s); overflow-wrap:anywhere;}
.hs-shop-row input{width:20px; height:20px; flex:0 0 auto;}
.hs-shop-row.got span{text-decoration:line-through; color:var(--muted);}
.hs-menu-btn{align-self:flex-start;}
.hs-today{display:flex; flex-direction:column; gap:var(--sp-3); margin-top:var(--sp-3);}
.hs-today .hs-menu{border-top:0; padding:var(--sp-3); border:1px solid var(--line); border-radius:var(--r); background:var(--panel-2);}
.hs-bar{height:6px; border-radius:3px; background:var(--line); overflow:hidden;}
.hs-bar i{display:block; height:100%; background:var(--accent-fill, var(--accent)); border-radius:3px;}
.hs-food-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column;}
.hs-food-row{display:flex; align-items:center; gap:var(--sp-1); min-height:var(--tap); font-size:var(--fs-s); border-bottom:1px solid var(--line);}
.hs-food-row:last-child{border-bottom:0;}
.hs-food-name{flex:1; min-width:0; overflow-wrap:anywhere;}
.hs-food-row .text-btn{min-height:var(--tap); padding:0 var(--sp-1); font-size:var(--fs-xs);}
.hs-food-del{width:var(--tap); height:var(--tap); flex:0 0 auto;}
.hs-food-del svg{width:16px; height:16px; stroke:currentColor; stroke-width:2; fill:none;}
.hs-food-form{display:flex; flex-wrap:wrap; align-items:flex-end; gap:var(--sp-2); padding:var(--sp-2) 0; width:100%;}
.hs-food-form label{display:flex; flex-direction:column; gap:4px; font-size:var(--fs-xs); color:var(--muted); flex:1 1 90px; min-width:0;}
.hs-food-form input{min-height:var(--tap); font:inherit; font-size:var(--fs-s); color:var(--text); background:var(--panel); border:1px solid var(--line); border-radius:var(--r-sm); padding:0 var(--sp-2); min-width:0;}
.hs-food-form .hs-food-name{flex-basis:100%;}
.hs-graph{display:block; width:100%; height:auto; max-height:140px;}
.hs-graph .hs-line{fill:none; stroke:var(--accent); stroke-width:2.5; stroke-linejoin:round; stroke-linecap:round;}
.hs-graph .hs-pt{fill:var(--accent);}
/* 0.203 (IDEA-93): the goal's number — the same card for every room (numbers.js) */
.num-path{margin:var(--sp-3) 0;}
.num-path-box{display:flex; flex-direction:column; gap:var(--sp-2);}
.num-no{align-self:flex-start; margin:0 var(--sp-3) var(--sp-2);}
.num-no-opts{display:flex; flex-wrap:wrap; gap:var(--sp-2); padding:0 var(--sp-3) var(--sp-2);}
.num-card .num-form{padding:var(--sp-2) var(--sp-3);}
/* 0.203 (IDEA-91): «Як було?» under a workout ticked today (health.js) */
.hs-feel{display:flex; flex-wrap:wrap; align-items:center; gap:var(--sp-1); margin-top:var(--sp-1);}
.hs-feel small{color:var(--muted); font-size:var(--fs-xs);}
.hs-feel-btn{min-height:32px; padding:0 var(--sp-2); font:inherit; font-size:var(--fs-xs); color:var(--text); background:var(--panel); border:1px solid var(--line); border-radius:999px; cursor:pointer;}
.ex-sore{margin:var(--sp-2) 0 0;}
.hs-graph .hs-aim{stroke:var(--ok); stroke-width:1.5; stroke-dasharray:5 4;}
.hs-fbars{position:relative; display:flex; align-items:flex-end; gap:6px; height:56px;}
.hs-fbar{flex:1; background:var(--accent-dim); border:1px solid var(--accent); border-radius:3px 3px 0 0;}
.hs-fbar.empty{background:none; border:1px dashed var(--line);}
.hs-fnorm{position:absolute; left:0; right:0; border-top:1.5px dashed var(--ok); pointer-events:none;}
.hs-weigh-form{display:flex; align-items:flex-end; gap:var(--sp-2); flex-wrap:wrap;}
.hs-weigh-form label{display:flex; flex-direction:column; gap:4px; font-size:var(--fs-xs); color:var(--muted); flex:1 1 120px;}
.hs-weigh-form input{min-height:var(--tap); font:inherit; color:var(--text); background:var(--panel); border:1px solid var(--line); border-radius:var(--r-sm); padding:0 var(--sp-2);}
