/* Главная из виджетов, вариант Д (founder 12.11, макет home-widgets-mock ?v=e): плитки — стекло в сетке 2 колонки,
   «Тренировка дня» — лак, «В клубе» — строки без карточек с линией сверху. Цвета — токены base.css. */
.hw-home { display: flex; flex-direction: column; }
.hw-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.hw { position: relative; grid-column: span 2; display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  min-width: 0; padding: 16px; border-radius: 26px; background: var(--glass); border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow); color: var(--fg); }
.hw.hw-half { grid-column: span 1; min-height: 168px; }
.hw-workout { background: var(--lac); border-color: transparent; box-shadow: var(--lac-shadow); }
.hw-skel { min-height: 168px; background: var(--tint); border-color: transparent; box-shadow: none; }
.hw-skel:nth-child(n + 4) { grid-column: span 1; }

.hw-link { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; flex: 1; color: inherit;
  text-decoration: none; -webkit-tap-highlight-color: transparent; }
/* «растянутая ссылка»: своего прямоугольника нет (ничего не накрывает), касание по всей карточке — через ::after */
.hw-cover { -webkit-tap-highlight-color: transparent; }
.hw-cover::after { content: ""; position: absolute; inset: 0; border-radius: 26px; }
.hw-cover:focus-visible { outline: none; }
.hw-cover:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; }
.hw-mwrap .hw-cover::after { border-radius: 50%; }
.hw .hw-plus, .hw [data-weigh], .hw a:not(.hw-cover, .hw-link) { position: relative; z-index: 1; }
.hw-row { display: flex; align-items: center; gap: 12px; }
.hw-grow { flex: 1; min-width: 0; }
.hw-lbl { display: flex; align-items: center; gap: 6px; font: 700 12px/1.2 var(--body); letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent); }
.hw-lbl svg { width: 15px; height: 15px; flex: none; }
.hw-mut { color: var(--muted); font-size: 14.5px; }
.hw-small { font-size: 12.5px; }
.hw-small a { color: var(--accent); }
.hw-big { font: 650 34px/1 var(--body); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hw-big small { margin-left: 3px; font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.hw-delta { margin-top: 4px; color: var(--ok); font-weight: 650; font-size: 13.5px; }
.hw-delta.up { color: var(--muted); }  /* прибавка — без зелёного «успеха»: цель бывает разной */
.hw-center { text-align: center; }
.hw-spark { display: block; width: 100%; height: 30px; color: var(--accent); }
.hw-chev { width: 16px; height: 16px; flex: none; color: var(--muted); }

.hw-workout h2 { margin: 12px 0 4px; font: 600 28px/1.1 var(--display); letter-spacing: -.02em; }
.hw-foot { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.hw-weeks { display: flex; gap: 4px; }
.hw-weeks i { flex: 1; height: 6px; border-radius: 3px; background: linear-gradient(180deg, var(--trk-a), var(--trk-b));
  box-shadow: inset 0 1px 1px var(--vol-inset); }
.hw-weeks i.f { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 62%, #fff), var(--accent) 55%,
  color-mix(in srgb, var(--accent) 78%, #000)); box-shadow: 0 1px 2px var(--vol-shadow); }
.hw-weeks + .hw-small { margin-top: 6px; }
.hw-gbtn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px;
  border-radius: 14px; background: var(--gloss); box-shadow: var(--gloss-shadow); color: var(--on-accent); font-weight: 650; }
.hw-plus { width: 44px; height: 44px; display: grid; place-items: center; flex: none; border-radius: 50%;
  background: var(--lac); border: 1px solid transparent; box-shadow: var(--lac-shadow); color: var(--accent); }
.hw-plus svg { width: 18px; height: 18px; }
.hw-sbtn { align-self: flex-start; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--tint);
  color: var(--accent); font: 650 14px var(--body); }

/* «Калории»: карточка дня из kbju_card; «Коротко» — кольцо 48 и таблетки Б/Ж/У */
.hw-kbju { display: flex; flex-direction: column; gap: 10px; }
.kshort { display: flex; align-items: center; gap: 12px; }
.kshort-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kshort-text b { font-size: 16px; }
.kpills { display: flex; gap: 6px; flex-wrap: nowrap; }
.kpill { padding: 3px 10px; border-radius: 999px; background: var(--tint); font-size: 13px; font-weight: 600; white-space: nowrap; }
.kpill.protein { color: #9a5634; } .kpill.fat { color: #7d6118; } .kpill.carbs { color: #43705e; }
:root[data-theme="dark"] .kpill.protein { color: #e0a582; }
:root[data-theme="dark"] .kpill.fat { color: #c9a24a; }
:root[data-theme="dark"] .kpill.carbs { color: #8fbca8; }

/* «В клубе» — журнал: линия сверху, подпись прописными, заголовок Lora */
.hw-jhead { margin: 26px 4px 0; font: 600 22px var(--display); letter-spacing: -.01em; }
.hw-jr { padding: 18px 4px; border-top: 1px solid var(--line); }
.hw-jhead + .hw-club > .hw-jr:first-child { margin-top: 12px; }
.hw-jr .hw-lbl { margin-bottom: 8px; font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.hw-jr .hw-link { gap: 0; }
.hw-t2 { display: block; font: 500 20px/1.25 var(--display); letter-spacing: -.01em; }
.hw-dot { display: inline-block; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--danger-fill);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger-fill) 15%, transparent); }

.hw-custom { display: flex; justify-content: center; margin: 22px 0 0; }
.hw-custom button { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0;
  border-radius: 22px; background: var(--tint); color: var(--accent); font: 650 15px var(--body); }
.hw-custom svg { width: 18px; height: 18px; }

/* Режим «Настроить главную»: список блоков карточками, «−» слева, ручка справа, панель внизу */
.hw-edit { padding-bottom: 170px; }
.hw-etop h1 { margin: 6px 0 14px; font: 600 24px var(--display); }
.hw-elist { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.hw-erow { position: relative; padding: 10px 6px 10px 4px; border-radius: 22px; background: var(--glass);
  border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow); transition: transform .15s ease-out, box-shadow .15s ease-out; }
.hw-erow .hw-grow { display: flex; flex-direction: column; gap: 2px; }
.hw-erow.ghost { opacity: .6; background: transparent; border: 1.5px dashed var(--line); box-shadow: none; }
.hw-erow.dragging { z-index: 2; box-shadow: var(--lac-shadow); transform: scale(1.03); }
.hw-minus { width: 44px; height: 44px; display: grid; place-items: center; flex: none; padding: 0; border: 0; background: none; }
.hw-minus i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--danger-fill);
  box-shadow: 0 2px 6px rgb(0 0 0 / .2); }
.hw-minus i::after { content: ""; width: 10px; height: 2px; border-radius: 1px; background: #fff; }
.hw-cico { width: 40px; height: 40px; display: grid; place-items: center; flex: none; border-radius: 14px; background: var(--tint); color: var(--accent); }
.hw-cico svg { width: 22px; height: 22px; }
.hw-handle { width: 44px; height: 44px; display: grid; place-items: center; flex: none; padding: 0; border: 0; background: none;
  color: var(--muted); touch-action: none; cursor: grab; }
.hw-handle svg { width: 22px; height: 22px; }
.hw-viewsel { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 44px); min-height: 44px;
  margin: 6px 0 0 44px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--tint); color: var(--fg); font: 600 14px var(--body); }
.hw-viewsel b { color: var(--accent); }
.hw-move { position: absolute; right: 8px; top: 52px; z-index: 3; display: flex; flex-direction: column; padding: 4px;
  border-radius: 14px; background: var(--card); box-shadow: var(--lac-shadow); }
.hw-move button { min-width: 120px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: none;
  color: var(--fg); font: 600 15px var(--body); text-align: left; }
.hw-move button:focus-visible { background: var(--tint); }
.hw-editbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; flex-direction: column; gap: 10px;
  padding: 28px 16px calc(16px + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 24px); }
.hw-row2 { display: flex; gap: 10px; }
.hw-row2 button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border: 1px solid transparent;
  border-radius: 14px; background: var(--lac); box-shadow: var(--lac-shadow); color: var(--accent); font: 650 15px var(--body); }
.hw-row2 svg { width: 16px; height: 16px; }
.hw-editbar .hw-gbtn { border: 0; font: 650 16px var(--body); }
.mini-short { display: flex; gap: 6px; } .mini-short i { width: 22px; height: 22px; border-radius: 50%; border: 4px solid var(--accent); }
@media (prefers-reduced-motion: reduce) { .hw-erow { transition: none; } .hw-erow.dragging { transform: none; } }
.hw-cat { margin: 0; padding: 0 16px 16px; list-style: none; }
.hw-cat > li { padding: 12px 0; border-top: 1px solid var(--line); }
.hw-cat .hw-grow { display: flex; flex-direction: column; gap: 2px; }
.hw-cico-lg { width: 44px; height: 44px; }
.hw-empty { align-items: center; gap: 0; padding: 36px 22px 26px; text-align: center; }
.hw-cico-xl { width: 64px; height: 64px; border-radius: 20px; }
.hw-empty h2 { margin: 16px 0 6px; font: 600 24px var(--display); }
.hw-empty p { margin: 0 0 20px; }
.hw-empty .hw-gbtn { border: 0; font: 650 16px var(--body); }

/* Вода стаканами (founder 12.11, макет `waterW`) */
.hw-wnum { display: flex; align-items: center; gap: 8px; }
.hw-wgoal { font-weight: 600; font-size: 16px; }
.hw-more { width: 44px; height: 44px; margin: -10px -10px -10px 0; display: grid; place-items: center; padding: 0; border: 0;
  background: none; color: var(--muted); }
.hw-wg { display: grid; gap: 8px 2px; margin: 2px 0; }
.hw-gl { width: 100%; min-width: 30px; height: 58px; display: flex; align-items: flex-end; justify-content: center; padding: 0;
  border: 0; background: none; -webkit-tap-highlight-color: transparent; }
.hw-gl svg { width: 100%; max-width: 40px; height: 52px; overflow: visible; transition: transform .12s; }
.hw-gl:active svg { transform: scale(.92); }
.hw-gl .wtr { transform: translateY(40px); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.hw-gl[data-state="f"] .wtr { transform: none; }
.hw-gl[data-state="f"].pour .wtr { transform: translateY(40px); transition: none; }
.hw-gl .hint { opacity: 0; transition: opacity .2s; }
.hw-gl[data-state="n"] .hint { opacity: 1; }
.hw-wdone { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 650; font-size: 14px; }
.hw-wset { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 20px; }
.hw-wcap { margin: 8px 0 0; font-weight: 600; }
.hw-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hw-chip { height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1.5px solid transparent; border-radius: 16px; background: var(--tint); color: var(--fg); font: 650 14px var(--body); }
.hw-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--card); }
.hw-goal { display: flex; align-items: center; gap: 12px; padding: 6px 0 10px; text-align: center; }
.hw-goal .hw-big { font-size: 30px; }
.hw-plus:disabled { opacity: .4; }
.hw-wset .hw-gbtn { border: 0; font: 650 16px var(--body); }
@media (prefers-reduced-motion: reduce) { .hw-gl .wtr, .hw-gl svg, .hw-gl .hint { transition: none; } }

/* «Питание» (приёмы пищи) — компактно (макет `mealsW`): круги с кольцом доли нормы, «+» снизу; полностью — приёмы «Дневника» */
.hw-mlink { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin: -12px -6px -12px 0; padding: 0 6px;
  color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; }
.hw-mlink .hw-chev { width: 16px; height: 16px; }
.hw-mgrid { display: flex; flex-wrap: wrap; justify-content: center; row-gap: 14px; margin-top: 6px; }
/* доля ширины на круг одинаковая: полный ряд — от края до края, неполный второй ряд — по центру */
.hw-meal { flex: 0 0 calc(100% / var(--cols)); padding: 0 2px; display: flex; flex-direction: column; align-items: center;
  text-align: center; min-width: 0; }
.hw-mwrap { position: relative; }
.hw-mc { position: relative; display: block; --kc: var(--accent); }
.hw-mc .kring { position: absolute; inset: 0; width: 100%; height: 100%; }
.hw-mci { position: absolute; inset: 9px; display: grid; place-items: center; border-radius: 50%; background: var(--tint);
  color: var(--muted); }
.hw-mci .ico { width: 42%; height: 42%; opacity: .7; }
.hw-mci.on { background: var(--surface); color: var(--accent); }
.hw-mphoto { overflow: hidden; }
.hw-mphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hw-mci.on .ico { opacity: 1; }
.hw a.hw-madd { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gloss); box-shadow: var(--gloss-shadow); color: var(--on-accent, #fff);
  border: 2px solid var(--card); }
.hw-madd::before { content: ""; position: absolute; inset: -7px; }
.hw-madd svg { width: 15px; height: 15px; }
.hw-mn { margin-top: 12px; font-weight: 650; font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; hyphens: auto; }
.hw-mtotal { font-weight: 600; font-size: 14px; white-space: nowrap; }
/* «Полностью» — приёмы карточками «Дневника» как есть (founder 13.11: «точно как в Дневнике»): блок без своего стекла,
   над карточками — только строка «Питание · N ккал» */
.hw.hw-meals[data-view=full] { padding: 0; background: none; border: 0; box-shadow: none; gap: 8px; }
.hw.hw-meals[data-view=full] > .hw-row { padding: 0 4px; }
.hw-mfull { display: flex; flex-direction: column; gap: 12px; }
.hw-mfull[aria-busy] { min-height: 160px; }

/* Поздравления (макет `celebrate`): подсветка карточки, частицы, плашка сверху, «пружинка» стакана цели */
.hw.cele { animation: hw-cele 1.8s cubic-bezier(.2, .8, .2, 1); }
@keyframes hw-cele {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
  15%, 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent), 0 18px 40px -12px color-mix(in srgb, var(--accent) 45%, transparent); }
  32% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
}
.hw-water.cele { animation-name: hw-cele-water; }
@keyframes hw-cele-water {
  0% { box-shadow: 0 0 0 0 rgb(61 155 224 / 0); }
  15%, 50% { box-shadow: 0 0 0 6px rgb(61 155 224 / .25), 0 18px 40px -12px rgb(61 155 224 / .45); }
  32% { box-shadow: 0 0 0 2px rgb(61 155 224 / .12); }
  100% { box-shadow: 0 0 0 0 rgb(61 155 224 / 0); }
}
/* частица всплеска; свой класс: .hw-spark — линия веса, .hw-dot — точка (founder 13.11: линия вылезала из плитки) */
.hw-burst { position: fixed; z-index: 50; pointer-events: none; border-radius: 50%; }
.hw-toast { position: fixed; left: 16px; right: 16px; top: calc(12px + var(--safe-t)); z-index: 60; display: flex;
  align-items: center; gap: 12px; padding: 12px 16px; border-radius: 20px; background: var(--card); color: var(--fg);
  border: 1px solid var(--line, rgb(0 0 0 / .06)); box-shadow: 0 14px 40px -12px rgb(46 35 28 / .45);
  transform: translateY(-160%); transition: transform .45s cubic-bezier(.2, 1.2, .3, 1); pointer-events: none; }
.hw-toast.on { transform: none; }
.hw-toast b { font-weight: 650; }
.hw-toast small { display: block; color: var(--muted); font-size: 13px; }
.hw-ti { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #fff;
  background: var(--gloss); }
.hw-toast[data-goal="water"] .hw-ti { background: linear-gradient(180deg, var(--water-a), var(--water-c)); }
.hw-ti svg { width: 22px; height: 22px; }
.hw-gl.pop svg { animation: hw-pop .7s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes hw-pop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .hw.cele, .hw-gl.pop svg { animation: none; }
  .hw-toast { transition: opacity .2s; transform: none; opacity: 0; }
  .hw-toast.on { opacity: 1; }
}
/* «Первые шаги» (SPEC-bodyglow-onboarding §6.2): список дел новой участницы над блоками главной */
.steps-card { display: flex; flex-direction: column; gap: 8px; }
.steps-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.steps-t { font-size: 1.05rem; font-weight: 600; }
.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps-row { display: flex; align-items: center; gap: 10px; min-height: var(--tap); color: var(--fg); text-decoration: none; }
.steps-row[data-done] { color: var(--muted); }
.steps-dot { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--line); color: var(--on-accent); }
.steps-row[data-done] .steps-dot { border-color: transparent; background: var(--ok-badge); }
.steps-hide { align-self: flex-end; }
