/**
 * Home V1 — primary training card + 2×2 secondary tile grid + helper line.
 * Scoped to .home-v1 to avoid any bleed into legacy.
 */

.home-v1 {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 520px;
  margin: 0 auto;
}

/* ── Structured onboarding prompt ────────────────────────────────── */
.home-onboarding {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 12px;
  border: 1.5px solid color-mix(in srgb, var(--t-cta-bg) 40%, transparent);
  border-radius: var(--t-radius-row);
  background: color-mix(in srgb, var(--t-cta-bg) 9%, var(--t-card));
  color: var(--t-text);
  box-shadow: var(--t-row-shadow);
}

.home-onboarding__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.home-onboarding__ico {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--t-cta-bg);
  color: var(--t-cta-fg);
  box-shadow: var(--t-cta-inset);
}

.home-onboarding__text {
  flex: 1;
  min-width: 0;
}

.home-card-dismiss-form {
  flex: 0 0 auto;
  margin: 0;
}

.home-card-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--t-border);
  border-radius: 50%;
  background: color-mix(in srgb, var(--t-text-muted) 7%, var(--t-card));
  color: var(--t-text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.home-card-dismiss svg {
  display: block;
}

.home-card-dismiss:active {
  transform: scale(0.96);
}

.home-onboarding__title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--t-text);
  line-height: 1.2;
}

.home-onboarding__sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--t-text-muted);
  line-height: 1.4;
}

.home-onboarding__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 38px;
  padding: 9px 16px;
  border-radius: var(--t-radius-pill);
  background: var(--t-cta-bg);
  color: var(--t-cta-fg);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: var(--t-cta-glow), var(--t-cta-inset);
  transition: box-shadow var(--t-motion-base, 180ms) var(--t-ease-premium, ease),
              transform var(--t-motion-fast, 120ms) var(--t-ease-premium, ease);
}

.home-onboarding__btn:active {
  transform: scale(0.98);
  box-shadow: var(--t-cta-glow-hover), var(--t-cta-inset);
}

@media (max-width: 420px) {
  .home-onboarding__btn {
    align-self: stretch;
  }
}

/* ── Primary training card (hero) ──────────────────────────────────
   Deep violet branded surface on all themes, landing-aligned premium
   treatment. Single surface across all variants — differentiation lives
   in the icon, not in surface tint. No green surfaces anywhere. */

.home-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 240px;
  max-height: 320px;
  padding: 24px 20px 20px;
  border: 1.5px solid var(--t-hero-border);
  border-radius: var(--t-radius-lg);
  background: var(--t-hero-bg);
  color: var(--t-hero-text);
  text-decoration: none;
  box-shadow: var(--t-hero-glow);
  overflow: hidden;
  transition: box-shadow var(--t-motion-base, 180ms) var(--t-ease-premium, ease),
              border-color var(--t-motion-base, 180ms) var(--t-ease-premium, ease);
  -webkit-tap-highlight-color: transparent;
}

/* Yellow top stripe for the workout-done variant — landing pattern.
   Replaces the old green success-wash treatment entirely. */
.home-card[data-variant="D"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--t-hero-stripe, #F5C800);
}

@media (min-height: 720px) {
  .home-card {
    min-height: 280px;
    padding: 32px 24px 24px;
  }
  .home-card__title { font-size: 30px; }
  .home-card__subtitle { font-size: 16px; }
}

.home-card:active {
  border-color: var(--t-hero-border-hover);
  box-shadow: var(--t-hero-glow-hover);
}

.home-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--t-hero-icon-bg);
  color: var(--t-hero-icon-fg);
  line-height: 1;
  box-shadow: var(--t-chip-inset);
}
.home-card__icon svg {
  display: block;
}

.home-card__title {
  margin: 0;
  font-family: var(--t-font-display, 'Unbounded', var(--t-font));
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--t-hero-text);
  line-height: 1.15;
}

.home-card__subtitle {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--t-hero-text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Weekly rhythm stat — 64×64 chip, mirror of the hero icon ─────
   Three visual treatments share the same outer 64×64 chip (size,
   radius, surface, shadow) so left and right are always a pair.
   Inner markup differs per treatment — switched via PHP constant
   HOME_CARD_STAT_STYLE in training_card.php.

   Treatments: --tile (active), --fraction (fallback), --ring (fallback).
*/
.home-card__stat {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--t-hero-icon-bg);
  color: var(--t-hero-icon-fg);
  box-shadow: var(--t-chip-inset);
  overflow: hidden;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.home-card--has-stat .home-card__body {
  padding-right: 80px;
}
@media (min-height: 720px) {
  .home-card__stat {
    width: 72px;
    height: 72px;
  }
  .home-card--has-stat .home-card__body {
    padding-right: 88px;
  }
}

/* ─────── Treatment A: tile (ACTIVE) — brand-yellow bottom-up fill ───
   Chip itself IS the progress bar. Solid --t-success fill (clean
   branded yellow, NO color-mix mud), with a soft 8px mask fade at the
   top edge so the border with the dark chip reads clean. Text color
   inverts via [data-tier]: light over dark (fill<50%), dark over
   yellow (fill>=50%) — matches CTA button contrast convention. */
.home-card__stat--tile .home-card__stat-fill {
  position: absolute;
  inset: auto 0 0 0;
  height: var(--stat-progress, 0%);
  background: var(--t-success);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 8px);
          mask-image: linear-gradient(to bottom, transparent 0, #000 8px);
  transition: height var(--t-motion-base, 220ms) var(--t-ease-premium, ease);
}
.home-card__stat--tile .home-card__stat-text {
  position: relative;
  z-index: 1;
  font-family: var(--t-font-display, 'Unbounded', var(--t-font));
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--t-hero-text);
  transition: color var(--t-motion-base, 220ms) var(--t-ease-premium, ease);
}
.home-card__stat--tile[data-tier="high"] .home-card__stat-text {
  color: var(--t-cta-fg, #1a1000);
}
.home-card__stat--tile[data-noplan="1"] .home-card__stat-fill {
  display: none;
}
@media (min-height: 720px) {
  .home-card__stat--tile .home-card__stat-text { font-size: 22px; }
}

/* ─────── Treatment B: fraction (FALLBACK) — pure typographic ───────
   Stacked done / hairline rule / target. Clean, bulletproof on any
   target count. Yellow accent only when closed. */
.home-card__stat--fraction {
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  font-family: var(--t-font-display, 'Unbounded', var(--t-font));
}
.home-card__stat--fraction .home-card__stat-num {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--t-hero-text);
}
.home-card__stat--fraction .home-card__stat-num--solo {
  font-size: 30px;
}
.home-card__stat--fraction .home-card__stat-rule {
  display: block;
  width: 26px;
  height: 1.5px;
  background: color-mix(in srgb, var(--t-hero-text) 60%, transparent);
  margin: 1px 0;
}
.home-card__stat--fraction .home-card__stat-den {
  font-size: 15px;
  font-weight: 700;
  color: var(--t-hero-text-muted);
}
.home-card__stat--fraction[data-closed="1"] .home-card__stat-den {
  color: var(--t-success);
}

/* ─────── Treatment C: ring (FALLBACK) — SVG-free conic progress ────
   Conic-gradient mask-based ring, centered number. Modern browsers
   only (Safari 15.4+, Chrome 88+) — targets match our prod audience. */
.home-card__stat--ring .home-card__stat-ring-track {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: conic-gradient(
    var(--t-success) calc(var(--stat-progress, 0) * 360deg),
    color-mix(in srgb, var(--t-hero-text) 14%, transparent) 0
  );
  -webkit-mask: radial-gradient(circle, transparent 55%, #000 57%);
          mask: radial-gradient(circle, transparent 55%, #000 57%);
}
.home-card__stat--ring .home-card__stat-text {
  position: relative;
  z-index: 1;
  font-family: var(--t-font-display, 'Unbounded', var(--t-font));
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--t-hero-text);
}
.home-card__stat--ring[data-closed="1"] .home-card__stat-text {
  color: var(--t-success);
}

/* ── Meta lines (day identity, program, effort) ─────────────────── */
.home-card__meta {
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home-card__meta-line {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--t-hero-text-muted);
  line-height: 1.4;
}
.home-card__meta-line:first-child {
  color: var(--t-hero-text);
  font-weight: 600;
  font-size: 16px;
}

/* Yellow CTA pill — mirrors `.tr-hero--primary .tr-hero__cta` from
   modules/training/index.php (the «Начать» button on the training-tab
   primary hero). Identical surface, padding, radius, glow, type so the
   home hero CTA reads one-to-one with the training-tab hero CTA. */
.home-card__cta {
  margin-top: auto;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 0;
  padding: 10px 24px;
  border: none;
  border-radius: var(--t-radius-pill);
  background: var(--t-cta-bg);
  color: var(--t-cta-fg);
  font-family: var(--t-font);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: normal;
  white-space: nowrap;
  box-shadow: var(--t-cta-glow), var(--t-cta-inset);
  transition: box-shadow var(--t-motion-base, 0.18s);
}

.home-card:active .home-card__cta,
.home-card__cta:active {
  box-shadow: var(--t-cta-glow-hover), var(--t-cta-inset);
  transform: none;
}

.home-card__cta-arrow {
  display: inline-flex;
  align-items: center;
}

/* Variant accents now live inside the card (via icon + stripe), not as
   surface washes. Keep these hooks for JS/data callers, no surface change. */
.home-card--primary,
.home-card--accent,
.home-card--success,
.home-card--neutral {
  /* intentionally empty — hero surface is the same across all variants */
}

/* ── Secondary rows (4 vertical app-style rows) ────────────────────── */

.home-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 14px 12px 12px;
  border: 1.5px solid var(--t-row-border);
  border-radius: var(--t-radius-row);
  background: var(--t-card);
  color: var(--t-text);
  text-decoration: none;
  box-shadow: var(--t-row-shadow);
  transition: transform var(--t-motion-fast, 120ms) var(--t-ease-premium, ease),
              border-color var(--t-motion-base, 180ms) var(--t-ease-premium, ease),
              box-shadow var(--t-motion-base, 180ms) var(--t-ease-premium, ease);
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .home-row:hover {
    transform: translateY(-1px);
    border-color: var(--t-row-border-hover);
    box-shadow: var(--t-row-shadow-hover);
  }
}

.home-row:active {
  transform: translateY(-1px);
  border-color: var(--t-row-border-hover);
  box-shadow: var(--t-row-shadow-hover);
}

.home-row__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--t-surface);
  line-height: 1;
  flex-shrink: 0;
  color: var(--t-text);
  box-shadow: var(--t-chip-inset);
}
.home-row__icon svg {
  display: block;
}

/* Per-row icon chip tone. Color lives ONLY inside the 48×48 chip — row
   surface stays neutral so rows remain clearly secondary to the hero card.
   Glyphs are emoji (no CSS tint), so the chip bg carries the identity.
   Each chip gets a 1px inner ring (role-coloured) on top of the shared
   white inset highlight — cleaner premium edge, not a box outline. */
.home-row[data-row="checkin"] .home-row__icon {
  background: var(--t-chip-rose-bg);
  color: var(--t-chip-rose-fg);
  box-shadow: var(--t-chip-inset), inset 0 0 0 1px var(--t-chip-rose-ring);
}
.home-row[data-row="measurements"] .home-row__icon {
  background: var(--t-chip-primary-bg);
  color: var(--t-chip-primary-fg);
  box-shadow: var(--t-chip-inset), inset 0 0 0 1px var(--t-chip-primary-ring);
}
.home-row[data-row="tips"] .home-row__icon {
  background: var(--t-chip-accent-bg);
  color: var(--t-chip-accent-fg);
  box-shadow: var(--t-chip-inset), inset 0 0 0 1px var(--t-chip-accent-ring);
}
/* Results row uses a deeper primary-dark shade — same violet family as
   Measurements, but visibly a step heavier so the two rows stop reading
   as identical primary chips. No new hue. */
.home-row[data-row="results"] .home-row__icon {
  background: var(--t-chip-primary-deep-bg);
  color: var(--t-chip-primary-deep-fg);
  box-shadow: var(--t-chip-inset), inset 0 0 0 1px var(--t-chip-primary-deep-ring);
}
.home-row[data-row="education"] .home-row__icon {
  background: var(--t-chip-primary-bg);
  color: var(--t-chip-primary-fg);
  box-shadow: var(--t-chip-inset), inset 0 0 0 1px var(--t-chip-primary-ring);
}

/* ── Optional module section ("Полезное") ─────────────────────────────── */

.home-optional__title {
  margin: 0 0 10px 4px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--t-text-muted);
}

.home-row__label {
  font-size: 17px;
  font-weight: 600;
  color: var(--t-text);
  line-height: 1.25;
  letter-spacing: -0.005em;
  min-width: 0;
}

.home-row__trailing {
  font-size: 13px;
  color: var(--t-text-muted);
  line-height: 1;
  white-space: nowrap;
}

.home-row__trailing--done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--t-done-bg);
  color: var(--t-done-fg);
  border: 1px solid var(--t-done-fg);
}
.home-row__trailing--done svg {
  display: block;
}

.home-row__trailing--dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.home-row__dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--t-border);
  transition: background 0.12s;
}

.home-row__dot--on {
  background: var(--t-primary);
}

.home-row__chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--t-text-muted);
  line-height: 1;
  opacity: 0.55;
}
.home-row__chev svg {
  display: block;
}

/* ── Check-in prompt card ──────────────────────────────────────────
   Actionable nudge between the hero and the rows, rendered only when
   today's check-in isn't filled yet. Single tap-target (<a>) with a
   rose-chip leading icon (same family as the checkin row), context-
   aware title, and a branded yellow CTA pill on the right. Replaces
   the earlier dead helper-line ("Сегодня можно отметить самочувствие")
   with something the thumb can actually hit. */
.home-prompt {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 10px 10px 14px;
  border: 1.5px solid var(--t-row-border);
  border-radius: var(--t-radius-row);
  background: var(--t-card);
  color: var(--t-text);
  text-decoration: none;
  box-shadow: var(--t-row-shadow);
  transition: transform var(--t-motion-fast, 120ms) var(--t-ease-premium, ease),
              border-color var(--t-motion-base, 180ms) var(--t-ease-premium, ease),
              box-shadow var(--t-motion-base, 180ms) var(--t-ease-premium, ease);
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .home-prompt:hover {
    transform: translateY(-1px);
    border-color: var(--t-row-border-hover);
    box-shadow: var(--t-row-shadow-hover);
  }
}

.home-prompt:active {
  transform: translateY(-1px);
  border-color: var(--t-row-border-hover);
  box-shadow: var(--t-row-shadow-hover);
}

.home-prompt__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--t-chip-rose-bg);
  color: var(--t-chip-rose-fg);
  line-height: 1;
  flex-shrink: 0;
  box-shadow: var(--t-chip-inset), inset 0 0 0 1px var(--t-chip-rose-ring);
}
.home-prompt__icon svg {
  display: block;
}

.home-prompt__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--t-text);
  line-height: 1.3;
  letter-spacing: -0.005em;
  min-width: 0;
}

.home-prompt__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--t-radius-pill);
  background: var(--t-cta-bg);
  color: var(--t-cta-fg);
  font-family: var(--t-font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  box-shadow: var(--t-cta-glow), var(--t-cta-inset);
  transition: transform var(--t-motion-fast, 120ms) var(--t-ease-premium, ease),
              box-shadow var(--t-motion-base, 180ms) var(--t-ease-premium, ease);
}

.home-prompt:active .home-prompt__cta {
  transform: scale(0.98);
  box-shadow: var(--t-cta-glow-hover), var(--t-cta-inset);
}

@media (min-width: 900px) {
  .home-prompt {
    min-height: 72px;
    padding: 12px 12px 12px 16px;
  }
  .home-prompt__icon {
    width: 48px;
    height: 48px;
  }
  .home-prompt__icon svg {
    width: 22px;
    height: 22px;
  }
  .home-prompt__title {
    font-size: 16px;
  }
  .home-prompt__cta {
    padding: 11px 20px;
    font-size: 15px;
  }
}

/* ── Morning Check-In hero (v2.124.0) ──────────────────────────────────
   Dark-violet hero surface sharing the training_card token family (same
   border, glow, radius). Renders ABOVE the training card when wellness
   is pending for today — single primary "Отметить" action. */
.home-check-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 18px 18px 20px;
  border: 1.5px solid var(--t-hero-border);
  border-radius: var(--t-radius-lg);
  background: var(--t-hero-bg);
  color: var(--t-hero-text);
  text-decoration: none;
  box-shadow: var(--t-hero-glow);
  transition: box-shadow var(--t-motion-base, 180ms) var(--t-ease-premium, ease),
              border-color var(--t-motion-base, 180ms) var(--t-ease-premium, ease);
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .home-check-hero:hover {
    border-color: var(--t-hero-border-hover);
    box-shadow: var(--t-hero-glow-hover);
  }
}
.home-check-hero:active {
  border-color: var(--t-hero-border-hover);
  box-shadow: var(--t-hero-glow-hover);
}
.home-check-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--t-hero-icon-bg);
  color: var(--t-hero-icon-fg);
  line-height: 1;
  flex-shrink: 0;
  box-shadow: var(--t-chip-inset);
}
.home-check-hero__icon svg { display: block; }
.home-check-hero__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.home-check-hero__title {
  margin: 0;
  font-family: var(--t-font-display, 'Unbounded', var(--t-font));
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--t-hero-text);
}
.home-check-hero__sub {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--t-hero-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-check-hero__cta {
  margin: 0;
  align-self: center;
  background: var(--t-cta-bg);
  color: var(--t-cta-fg);
  border: none;
  border-radius: var(--t-radius-pill);
  padding: 12px 22px;
  min-height: 0;
  font-family: var(--t-font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: var(--t-cta-glow), var(--t-cta-inset);
  transition: transform var(--t-motion-fast, 120ms) var(--t-ease-premium, ease),
              box-shadow var(--t-motion-base, 180ms) var(--t-ease-premium, ease);
}
.home-check-hero:active .home-check-hero__cta {
  transform: scale(0.98);
  box-shadow: var(--t-cta-glow-hover), var(--t-cta-inset);
}

@media (max-width: 380px) {
  .home-check-hero {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    padding: 16px 16px 16px 18px;
  }
  .home-check-hero__body { grid-column: 2; }
  .home-check-hero__cta  { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
}

@media (min-width: 900px) {
  .home-check-hero { padding: 22px 22px 22px 24px; }
  .home-check-hero__icon { width: 64px; height: 64px; }
  .home-check-hero__title { font-size: 22px; }
  .home-check-hero__sub { font-size: 14px; }
  .home-check-hero__cta { padding: 13px 26px; font-size: 15px; }
}

/* ── Compact Check-In summary strip (v2.124.0) ─────────────────────────
   Rendered in the same slot as the hero when wellness is already
   filled today — slim, quiet, still tappable for edits. Five dots
   mirror the wellness 1–5 score; active dots paint brand yellow. */
.home-check-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid var(--t-border);
  border-radius: var(--t-radius-pill);
  background: color-mix(in srgb, var(--t-success, #F5C800) 10%, var(--t-card));
  color: var(--t-text);
  text-decoration: none;
  box-shadow: var(--t-row-shadow);
  transition: transform var(--t-motion-fast, 120ms) var(--t-ease-premium, ease),
              border-color var(--t-motion-base, 180ms) var(--t-ease-premium, ease);
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .home-check-strip:hover {
    border-color: var(--t-row-border-hover);
    transform: translateY(-1px);
  }
}
.home-check-strip:active {
  transform: translateY(-1px);
  border-color: var(--t-row-border-hover);
}
.home-check-strip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--t-radius-pill);
  background: var(--t-success, #F5C800);
  color: var(--t-cta-fg, #1a1000);
  flex-shrink: 0;
  line-height: 1;
}
.home-check-strip__icon svg { display: block; }
.home-check-strip__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.3;
}
.home-check-strip__title {
  font-weight: 700;
  color: var(--t-text);
}
.home-check-strip__label {
  color: var(--t-text-muted);
  font-weight: 500;
}
.home-check-strip__dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.home-check-strip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--t-text-muted) 35%, transparent);
}
.home-check-strip__dot--on {
  background: var(--t-success, #F5C800);
}

@media (min-width: 900px) {
  .home-check-strip { min-height: 56px; padding: 12px 16px; }
  .home-check-strip__text { font-size: 15px; }
}

/* Enter motion for the new slot — matches the existing hero stagger. */
.home-v1 .home-check-hero,
.home-v1 .home-check-strip {
  animation: home-enter-row var(--t-motion-base, 180ms) var(--t-ease-premium, ease) 40ms both;
}
@media (prefers-reduced-motion: reduce) {
  .home-v1 .home-check-hero,
  .home-v1 .home-check-strip {
    animation: none;
    transition: none;
  }
}

/* ── Helper line ───────────────────────────────────────────────────── */

.home-helper {
  text-align: center;
  font-size: 13px;
  color: var(--t-text-muted);
  padding: 0 8px;
  line-height: 1.35;
}

/* ── Desktop / tablet polish (≥900px handled by shell.css too) ─────── */

@media (min-width: 900px) {
  .home-v1 {
    /* max-width controlled centrally by shell.css --app-frame-w ≥640px. */
    padding-top: 24px;
    gap: 32px;
  }
  .home-card {
    min-height: 320px;
    padding: 40px 28px 28px;
  }
  .home-card__title { font-size: 32px; }
  .home-card__icon { width: 72px; height: 72px; }
  .home-card__icon svg { width: 34px; height: 34px; }
  .home-rows {
    gap: 12px;
  }
  .home-row {
    min-height: 80px;
    padding: 14px 16px 14px 14px;
  }
  .home-row__icon {
    width: 52px;
    height: 52px;
  }
  .home-row__icon svg {
    width: 24px;
    height: 24px;
  }
  .home-row__label {
    font-size: 18px;
  }
}

/* ── Tier-B: quiet context strip, large screens only ──────────────── */
.home-strip {
  display: none;
}

@media (min-width: 768px) {
  .home-strip {
    display: block;
    margin-top: -8px; /* pull closer to helper line for calm grouping */
    padding: 10px 16px;
    border-top: 1px solid var(--t-border);
    text-align: center;
    font-size: 13px;
    line-height: 1.4;
    color: var(--t-text-muted);
  }
  .home-strip__dot {
    display: inline-block;
    margin: 0 6px;
    opacity: 0.5;
  }
}

/* ── Enter motion — one-shot on first paint ──────────────────────────
   Quiet fade + small lift. Hero first, rows staggered (25ms apart),
   helper last. Animations run once (iteration 1, fill-mode both) — on
   bfcache back-nav the elements stay visible since final state is the
   natural static state. Fully suppressed under prefers-reduced-motion. */
@keyframes home-enter-hero {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes home-enter-row {
  from { opacity: 0; transform: translateY(3px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes home-enter-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.home-v1 .home-card {
  animation: home-enter-hero var(--t-motion-enter, 200ms) var(--t-ease-premium, ease) both;
}
.home-v1 .home-row {
  animation: home-enter-row var(--t-motion-base, 180ms) var(--t-ease-premium, ease) both;
}
.home-v1 .home-row:nth-child(1) { animation-delay: 60ms; }
.home-v1 .home-row:nth-child(2) { animation-delay: 85ms; }
.home-v1 .home-row:nth-child(3) { animation-delay: 110ms; }
.home-v1 .home-row:nth-child(4) { animation-delay: 135ms; }
.home-v1 .home-prompt {
  animation: home-enter-row var(--t-motion-base, 180ms) var(--t-ease-premium, ease) 45ms both;
}
.home-v1 .home-onboarding {
  animation: home-enter-row var(--t-motion-base, 180ms) var(--t-ease-premium, ease) 35ms both;
}
.home-v1 .home-helper,
.home-v1 .home-strip {
  animation: home-enter-fade var(--t-motion-enter, 200ms) var(--t-ease-premium, ease) 160ms both;
}

@media (prefers-reduced-motion: reduce) {
  .home-v1 .home-card,
  .home-v1 .home-row,
  .home-v1 .home-prompt,
  .home-v1 .home-onboarding,
  .home-v1 .home-helper,
  .home-v1 .home-strip {
    animation: none;
  }
  .home-row,
  .home-prompt,
  .home-card,
  .home-card__cta {
    transition: none;
  }
}

/* ── Morning quick-entry tiles (above secondary rows) ─────────────────
   Two tap-targets (Вес, Шаги) rendered as app-tiles: leading chip icon,
   label, big value, tiny hint. Open a shared bottom sheet with focus on
   the tapped section. "Empty" state uses muted "—" number + pulse-free
   appearance so the card still reads as an actionable surface. */
.home-morning {
  display: block;
}
.home-morning__tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.home-mtile {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "icon  label"
    "icon  value"
    "hint  hint";
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  padding: 12px 14px;
  border: 1.5px solid var(--t-row-border);
  border-radius: var(--t-radius-row);
  background: var(--t-card);
  color: var(--t-text);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--t-row-shadow);
  transition: transform var(--t-motion-fast, 120ms) var(--t-ease-premium, ease),
              border-color var(--t-motion-base, 180ms) var(--t-ease-premium, ease),
              box-shadow var(--t-motion-base, 180ms) var(--t-ease-premium, ease);
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .home-mtile:hover {
    transform: translateY(-1px);
    border-color: var(--t-row-border-hover);
    box-shadow: var(--t-row-shadow-hover);
  }
}
.home-mtile:active {
  transform: translateY(-1px);
  border-color: var(--t-row-border-hover);
  box-shadow: var(--t-row-shadow-hover);
}
.home-mtile__icon {
  grid-area: icon;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--t-chip-primary-bg);
  color: var(--t-chip-primary-fg);
  box-shadow: var(--t-chip-inset), inset 0 0 0 1px var(--t-chip-primary-ring);
}
.home-mtile[data-mtile="steps"] .home-mtile__icon {
  background: var(--t-chip-accent-bg);
  color: var(--t-chip-accent-fg);
  box-shadow: var(--t-chip-inset), inset 0 0 0 1px var(--t-chip-accent-ring);
}
.home-mtile__icon svg { display: block; }
.home-mtile__label {
  grid-area: label;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--t-text-muted);
  line-height: 1;
}
.home-mtile__value {
  grid-area: value;
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  line-height: 1;
}
.home-mtile__num {
  font-family: var(--t-font-display, 'Unbounded', var(--t-font));
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--t-text);
  line-height: 1;
}
.home-mtile__num--empty {
  color: var(--t-text-muted);
  font-weight: 700;
}
.home-mtile__unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--t-text-muted);
}
.home-mtile__hint {
  grid-area: hint;
  margin-top: 6px;
  font-size: 12px;
  color: var(--t-text-muted);
  line-height: 1.3;
  min-height: 1em;
}
.home-mtile--empty .home-mtile__hint {
  color: var(--t-primary);
  font-weight: 600;
}
/* Settled-state tile: value present for the expected day. Quietly signals
 * "done" via a small check glyph and softens the icon-chip so the tile
 * reads as past-tense instead of a pending prompt. No color hack — uses
 * --t-success (brand yellow across all themes). */
.home-mtile__check {
  grid-area: icon;
  align-self: start;
  justify-self: end;
  display: none;
  width: 16px;
  height: 16px;
  border-radius: var(--t-radius-pill);
  background: var(--t-success);
  color: var(--t-cta-fg, #1a1000);
  align-items: center;
  justify-content: center;
  margin-top: -4px;
  margin-right: -4px;
  box-shadow: 0 0 0 2px var(--t-card);
  pointer-events: none;
}
.home-mtile__check svg { display: block; }
.home-mtile--done .home-mtile__check {
  display: inline-flex;
}
.home-mtile--done .home-mtile__icon {
  opacity: 0.7;
}
.home-mtile--done .home-mtile__hint {
  color: var(--t-text-muted);
  font-weight: 500;
}

/* "Утро закрыто" micro-caption below the tiles when both are settled. */
.home-morning__caption {
  margin: 8px 2px 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--t-text-muted);
  letter-spacing: 0.01em;
}
.home-morning__caption::before {
  content: '✓';
  display: inline-block;
  margin-right: 6px;
  color: var(--t-success);
  font-weight: 700;
}
.home-morning__caption[hidden] { display: none; }

@keyframes home-mtile-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--t-success) 55%, transparent); }
  70%  { box-shadow: 0 0 0 10px color-mix(in srgb, var(--t-success) 0%, transparent); }
  100% { box-shadow: var(--t-row-shadow); }
}
.home-mtile--pulse {
  animation: home-mtile-pulse 600ms var(--t-ease-premium, ease) 1;
}

/* ── Morning sheet contents (inside vb_form_sheet #morning) ─────────── */
/* ── Morning sheet: compact, purple, less noise ────────────────────── */
.ms-sheet {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ms-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ms-block + .ms-block {
  padding-top: 12px;
  border-top: 1px solid var(--t-row-border);
}

.ms-q {
  font-size: 14px;
  font-weight: 600;
  color: var(--t-text);
  line-height: 1.3;
}
.ms-micro {
  font-size: 11px;
  color: var(--t-text-muted);
  line-height: 1.35;
}
.ms-status {
  font-size: 12px;
  line-height: 1.3;
  min-height: 1.2em;
  color: var(--t-text-muted);
}
.ms-status[data-ms-status-kind="ok"] {
  color: var(--t-primary);
  font-weight: 600;
}
.ms-status[data-ms-status-kind="err"] {
  color: var(--t-danger, #d54c4c);
  font-weight: 600;
}

/* Stepper: [−] [input] [+] — compact */
.ms-stepper {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 6px;
  align-items: stretch;
}
.ms-step {
  border: none;
  background: var(--t-primary);
  color: var(--t-tab-active-fg, #ffffff);
  border-radius: 10px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  min-height: 40px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: transform var(--t-motion-fast, 120ms) var(--t-ease-premium, ease),
              background var(--t-motion-base, 180ms) var(--t-ease-premium, ease);
}
.ms-step:active {
  transform: scale(0.96);
  background: var(--t-primary-dark, var(--t-primary));
}
.ms-stepper__input {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--t-row-border);
  border-radius: 10px;
  padding: 0 10px;
  background: var(--t-card);
  min-height: 40px;
}
.ms-stepper__input:focus-within {
  border-color: var(--t-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--t-primary) 18%, transparent);
}
.ms-num {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--t-text);
  font-family: var(--t-font-display, 'Unbounded', var(--t-font));
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.ms-num::-webkit-outer-spin-button,
.ms-num::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ms-num--weight { font-size: 20px; }
.ms-num--steps  { font-size: 18px; }
.ms-num__unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--t-text-muted);
}

/* Preset chips — fill-on-tap, not save */
.ms-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.ms-chip {
  border: 1px solid var(--t-row-border);
  background: var(--t-card);
  color: var(--t-text);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 0;
  border-radius: 10px;
  cursor: pointer;
  min-height: 34px;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-motion-fast, 120ms) var(--t-ease-premium, ease),
              border-color var(--t-motion-base, 180ms) var(--t-ease-premium, ease),
              background var(--t-motion-base, 180ms) var(--t-ease-premium, ease),
              color var(--t-motion-base, 180ms) var(--t-ease-premium, ease);
}
.ms-chip:active {
  transform: scale(0.97);
  border-color: var(--t-primary);
}
.ms-chip--picked {
  border-color: var(--t-primary);
  background: color-mix(in srgb, var(--t-primary) 10%, var(--t-card));
  color: var(--t-primary);
}
.ms-chip[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Save button — purple primary, compact, full-width */
.ms-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: none;
  border-radius: 10px;
  background: var(--t-primary);
  color: var(--t-tab-active-fg, #ffffff);
  font-family: var(--t-font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 10px 16px;
  min-height: 40px;
  cursor: pointer;
  transition: transform var(--t-motion-fast, 120ms) var(--t-ease-premium, ease),
              opacity var(--t-motion-base, 180ms) var(--t-ease-premium, ease),
              background var(--t-motion-base, 180ms) var(--t-ease-premium, ease);
}
.ms-save:active:not([disabled]) {
  transform: scale(0.98);
  background: var(--t-primary-dark, var(--t-primary));
}
.ms-save[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .home-mtile,
  .ms-step,
  .ms-chip,
  .ms-save {
    transition: none;
  }
  .home-mtile--pulse {
    animation: none;
  }
}

/* ──────────────────────────────────────────────────────────────────
   Returning-after-break re-entry card
   Rendered above the training hero when $data['long_absence'] is set
   and the user has prior workouts. Quiz-like CTA: one primary + text links.
   ────────────────────────────────────────────────────────────────── */
.home-returning-wrap {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.home-returning {
  position: relative;
  padding: 16px;
  border-radius: var(--t-radius-row);
  background: var(--t-hero-bg);
  border: 1.5px solid var(--t-hero-border);
  box-shadow: var(--t-hero-glow);
  color: var(--t-hero-text);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.home-returning__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.home-returning__ico {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--t-hero-icon-bg);
  color: var(--t-hero-icon-fg);
}
.home-returning__copy {
  flex: 1;
  min-width: 0;
  padding-right: 30px;
}
.home-returning__title {
  margin: 0 0 5px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--t-hero-text);
  line-height: 1.2;
}
.home-returning__sub {
  margin: 0;
  font-size: 0.86rem;
  color: var(--t-hero-text-muted);
  line-height: 1.45;
}
.home-returning__primary {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 42px;
  padding: 10px 20px;
  border-radius: var(--t-radius-pill);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  background: var(--t-cta-bg);
  color: var(--t-cta-fg);
  box-shadow: var(--t-cta-glow), var(--t-cta-inset);
  transition: transform var(--t-motion-fast, 120ms) var(--t-ease-premium, ease),
              box-shadow var(--t-motion-base, 180ms) var(--t-ease-premium, ease);
}
.home-returning__primary:active {
  transform: scale(0.98);
  box-shadow: var(--t-cta-glow-hover), var(--t-cta-inset);
}
.home-returning__secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--t-text-muted);
  font-size: 13px;
  line-height: 1.25;
  padding: 0 12px;
}
.home-returning__link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.home-returning__link:focus-visible,
.home-returning__link:hover {
  text-decoration: underline;
}
.home-returning__dot {
  color: var(--t-text-muted);
}

.home-returning .home-card-dismiss-form {
  position: absolute;
  top: 10px;
  right: 10px;
}

.home-returning .home-card-dismiss {
  width: 32px;
  height: 32px;
  border-color: color-mix(in srgb, var(--t-hero-text) 16%, transparent);
  background: color-mix(in srgb, var(--t-hero-text) 8%, transparent);
  color: var(--t-hero-text-muted);
}

/* ──────────────────────────────────────────────────────────────────────
 * Morning Hero — ritual surface 04:00–11:00 МСК, deferred commit.
 * Mirrors .hero--checkin (style.css); uses --t-hero-* / --t-cta-* tokens.
 * Controllers: assets/js/home_morning_hero.js, assets/js/home_morning.js.
 * ────────────────────────────────────────────────────────────────────── */
.home-morning-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 20px 18px;
  border: 1.5px solid var(--t-hero-border);
  border-radius: var(--kit-hero-radius, 20px);
  background: var(--t-hero-bg);
  color: var(--t-hero-text);
  box-shadow: var(--t-hero-glow);
  overflow: hidden;
}
.home-morning-hero__eyebrow {
  position: relative; z-index: 1;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-hero-text-muted);
}
.home-morning-hero__title {
  position: relative; z-index: 1;
  margin: 0;
  font-family: var(--t-font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--t-hero-text);
}
.home-morning-hero__title strong {
  color: var(--t-cta-bg);
  font-weight: 800;
}
.home-morning-hero__slots {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mh-slot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 72px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--t-hero-text) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--t-hero-text) 18%, transparent);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.mh-slot:hover,
.mh-slot:focus-within {
  border-color: var(--t-hero-field-filled-border);
}
.mh-slot--filled {
  background: color-mix(in srgb, var(--t-cta-bg) 65%, transparent);
  border-color: color-mix(in srgb, var(--t-cta-bg) 90%, transparent);
}
.mh-slot--full { grid-column: 1 / -1; cursor: default; }
.mh-slot__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--t-hero-text-muted);
}
.mh-slot__value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--t-font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--t-hero-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.mh-slot__unit {
  font-family: var(--t-font);
  font-size: 13px;
  font-weight: 500;
  color: var(--t-hero-text-muted);
  letter-spacing: 0;
}
.mh-slot__placeholder {
  font-family: var(--t-font);
  font-size: 15px;
  font-weight: 500;
  color: var(--t-hero-placeholder);
}

.mh-moods {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 4px;
}
.mh-mood {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px;
  padding: 0;
  background: color-mix(in srgb, var(--t-hero-text) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--t-hero-text) 26%, transparent);
  border-radius: 12px;
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(.2,.7,.1,1),
              background 0.18s ease,
              border-color 0.18s ease;
}
.mh-mood.is-on {
  background: var(--t-hero-mood-on-bg);
  border-color: var(--t-hero-mood-on-border);
  transform: scale(1.06);
}

.mh-cta {
  position: relative; z-index: 1;
  margin-top: 4px;
  width: 100%;
  min-height: 56px;
  padding: 16px 24px;
  background: var(--t-cta-bg);
  color: var(--t-cta-fg);
  border: 0;
  border-radius: 999px;
  font-family: var(--t-font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: var(--t-cta-glow), var(--t-cta-inset);
  transition: transform 0.08s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.mh-cta:active { transform: scale(0.985); }
.mh-cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.mh-error {
  position: relative; z-index: 1;
  margin: 0;
  font-size: 13px;
  color: var(--danger, #ef4444);
}

/* Row accent — calm yellow nudge, not an alarm. Used when morning ritual
   is missed after 11:00 Europe/Moscow. Border + icon tint shift to brand
   yellow, trailing text picks up accent color. No red, no pulse, no
   urgency glyphs. The row stays fully tappable and visually coherent
   with its neighbors. */
.home-row--accent {
  border-color: var(--t-cta-bg);
  background: var(--t-hero-field-filled-bg);
}
.home-row--accent .home-row__icon {
  background: var(--t-hero-field-filled-bg);
  color: var(--t-cta-bg);
  box-shadow: inset 0 0 0 1px var(--t-hero-field-filled-border);
}
.home-row--accent .home-row__label {
  color: var(--t-text);
  font-weight: 700;
}
.home-row--accent .home-row__trailing--text {
  color: var(--t-cta-bg);
  font-weight: 700;
}
@media (hover: hover) {
  .home-row--accent:hover {
    border-color: var(--t-cta-bg);
    box-shadow: 0 0 0 2px var(--t-hero-field-filled-border);
  }
}

/* ── Training Carousel ──────────────────────────────────────────────
   Horizontal scroll-snap carousel wrapping N≥1 .home-card slides.
   Single-slide case: dots hidden, swipe inert, visually identical to
   legacy single-card layout. Multi-slide: native touch scroll-snap,
   dot pagination, keyboard nav via home_training_carousel.js. */
.home-carousel {
  position: relative;
}
.home-carousel__stat {
  position: absolute;
  top: 24px;
  right: 20px;
  z-index: 2;
  /* Размеры/оформление наследуются от .home-card__stat / .home-card__stat--ring */
}
@media (min-height: 720px) {
  .home-carousel__stat {
    top: 32px;
    right: 24px;
  }
}
.home-carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.home-carousel__track::-webkit-scrollbar {
  display: none;
}
.home-carousel__track > .home-card {
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.home-carousel:has(.home-carousel__stat) .home-card__body {
  padding-right: 80px; /* отступ под общий stat chip — только в body, чтобы CTA оставался во всю ширину карточки */
}
@media (min-height: 720px) {
  .home-carousel:has(.home-carousel__stat) .home-card__body {
    padding-right: 88px;
  }
}

.home-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.home-carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--t-row-border);
  cursor: pointer;
  transition: background 180ms var(--t-ease-premium, ease),
              transform 180ms var(--t-ease-premium, ease);
}
.home-carousel__dot:hover {
  background: var(--t-text-muted);
}
.home-carousel__dot.is-active {
  background: var(--t-primary);
  transform: scale(1.25);
}
.home-carousel__dot:focus-visible {
  outline: 2px solid var(--t-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .home-carousel__track { scroll-behavior: auto; }
  .home-carousel__dot { transition: none; }
}
