/* ============================================================
   СОВЁНОК — Design System v2.0
   Warm professional identity: deep evergreen + owl amber on paper
   ============================================================ */

:root {
  /* Palette */
  --ink: #182622;
  --ink-2: #3D4C46;
  --muted: #68746E;
  --faint: #93A099;
  --bg: #F6F4EE;
  --surface: #FFFFFF;
  --surface-2: #FBFAF6;
  --line: #E8E4D9;
  --line-2: #EFEBE1;

  --primary: #14473A;
  --primary-2: #0E3830;
  --primary-soft: #E9F1EC;
  --primary-line: #CFE0D6;

  --amber: #EE9F2E;
  --amber-2: #D98A1C;
  --amber-soft: #FCF2E0;

  --danger: #C94F4F;
  --danger-soft: #F9E9E7;
  --ok: #2E8B62;
  --ok-soft: #E6F3EC;
  --info: #3E6FA3;
  --info-soft: #E9F0F7;

  /* Development areas */
  --area-body: #0E9F8A;
  --area-mind: #7C5CFC;
  --area-art: #E8664C;
  --area-social: #EE9F2E;
  --area-life: #3E6FA3;

  /* Geometry */
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  /* Spacing scale — единый шаг 4/8/12/16/20/24/32 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --gap-media: 6px;
  --card-pad: var(--sp-4);
  --card-pad-lg: var(--sp-5);

  --shadow-sm: 0 1px 2px rgba(24, 38, 34, .05);
  --shadow-md: 0 1px 2px rgba(24, 38, 34, .04), 0 10px 28px -14px rgba(24, 38, 34, .14);
  --shadow-lg: 0 2px 4px rgba(24, 38, 34, .05), 0 24px 48px -20px rgba(24, 38, 34, .22);

  --header-h: 64px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.18; }
h2 { font-size: 21px; font-weight: 800; letter-spacing: -.015em; line-height: 1.25; }
h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
::selection { background: rgba(238, 159, 46, .28); }
:focus-visible { outline: 3px solid rgba(20, 71, 58, .28); outline-offset: 2px; border-radius: 6px; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.center { text-align: center; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--primary); box-shadow: var(--shadow-sm); }
.logo-text { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.logo-text em { font-style: normal; color: var(--amber-2); }

.main-nav { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.nav-link {
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background .15s, color .15s;
  white-space: nowrap;
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.on { background: var(--primary-soft); color: var(--primary); font-weight: 700; }

.nav-more { position: relative; }
.nav-more > .nav-link { display: inline-flex; align-items: center; gap: 6px; }
.nav-more .caret { transition: transform .18s; }
.nav-more.open .caret { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: grid;
  gap: 2px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .16s, transform .16s;
}
.nav-more.open .nav-dropdown { opacity: 1; transform: translateY(0); pointer-events: auto; }
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.nav-dropdown a:hover { background: var(--surface-2); color: var(--ink); }
.nav-dropdown a.on { background: var(--primary-soft); color: var(--primary); }
.nav-dropdown .dd-ico { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); color: var(--ink-2); flex-shrink: 0; }
.nav-dropdown a.on .dd-ico { background: rgba(20, 71, 58, .1); color: var(--primary); }
.nav-dropdown .dd-ico svg { width: 16px; height: 16px; }
.nav-dropdown hr { border: 0; border-top: 1px solid var(--line-2); margin: 6px 4px; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Bell */
.alert-wrap { position: relative; }
.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  position: relative;
}
.icon-btn:hover { border-color: var(--primary-line); background: var(--surface-2); }
.alert-dot {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 19px; height: 19px;
  padding: 0 5px;
  display: grid; place-items: center;
  background: var(--amber);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  border: 2px solid #fff;
}
.alert-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 60;
}
.alert-panel-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 8px 12px 6px; }
.alert-item { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; transition: background .15s; }
.alert-item:hover { background: var(--surface-2); }
.alert-item b { font-size: 14px; font-weight: 700; }
.alert-item span { font-size: 13px; color: var(--muted); }

/* User chip */
.user-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 15px;
  font-weight: 800;
  border: 1px solid var(--primary-line);
  overflow: hidden;
  flex-shrink: 0;
}
.user-chip img { width: 100%; height: 100%; object-fit: cover; }

/* Search */
.top-search { position: relative; flex-shrink: 0; }
.top-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.top-search input {
  width: 190px;
  height: 40px;
  padding: 0 14px 0 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  transition: width .2s, border-color .15s, background .15s;
}
.top-search input::placeholder { color: var(--faint); }
.top-search input:focus { width: 240px; outline: none; border-color: var(--primary-line); background: #fff; }

/* ============================================================
   BUTTONS / CHIPS / BADGES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, transform .1s, box-shadow .15s, border-color .15s, color .15s;
  text-align: center;
}
.btn:hover { background: var(--primary-2); box-shadow: 0 6px 16px -6px rgba(14, 56, 48, .45); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: var(--surface);
  color: var(--ink-2);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--primary-line); box-shadow: var(--shadow-sm); }
.btn-soft { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.btn-soft:hover { background: #DDEAE2; box-shadow: none; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #B03E3E; box-shadow: 0 6px 16px -6px rgba(201, 79, 79, .5); }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-danger-soft:hover { background: #F2D9D6; color: var(--danger); box-shadow: none; }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 16px; border-radius: 14px; }
.btn-amber { background: var(--amber); color: #3A2604; }
.btn-amber:hover { background: var(--amber-2); color: #fff; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: all .15s;
}
.chip:hover { border-color: var(--primary-line); color: var(--primary); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--ink-2);
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-amber { background: var(--amber-soft); color: var(--amber-2); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-info { background: var(--info-soft); color: var(--info); }

.tag {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary);
}

.dot { width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.card.pad-lg { padding: 26px; }
.card-h {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 14px;
}
.card-h .cnt { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--amber-2); background: var(--amber-soft); padding: 3px 10px; border-radius: 999px; }
.card-h .card-ico {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  flex-shrink: 0;
}
.card-h .card-ico svg { width: 17px; height: 17px; }
.card-sub { font-size: 13.5px; color: var(--muted); margin: -8px 0 14px; }

/* ============================================================
   FORMS
   ============================================================ */
input:not([type]), input[type="text"], input[type="search"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], input[type="time"], input[type="tel"], input[type="url"],
select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
textarea { min-height: 96px; resize: vertical; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2368746E' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 71, 58, .12);
}
input[type="date"], input[type="time"] { min-height: 42px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--faint); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; cursor: pointer; }

/* ============================================================
   FLASH / ALERTS
   ============================================================ */
.flash-wrap {
  max-width: 1140px;
  margin: 16px auto 0;
  padding: 0 24px;
  display: grid;
  gap: 8px;
}
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--r-md);
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.flash::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--info); flex-shrink: 0; }
.flash-success { background: var(--ok-soft); border-color: #CBE5D6; color: #1E5C40; }
.flash-success::before { background: var(--ok); }
.flash-error, .flash-warning { background: var(--danger-soft); border-color: #F0D3D0; color: #8F3535; }
.flash-error::before, .flash-warning::before { background: var(--danger); }

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.main { max-width: 1140px; margin: 0 auto; padding: 28px 24px 96px; }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-head .crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--faint); margin-bottom: 6px; }
.page-head .crumbs a:hover { color: var(--primary); }
.page-head p.sub { margin-top: 4px; color: var(--muted); font-size: 14.5px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cols-app { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.cols-app > .col-main { min-width: 0; display: grid; gap: 16px; }
.cols-app > .col-side { display: grid; gap: 16px; }
.stack { display: grid; gap: 16px; }

.section-gap { height: 16px; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-grid > * { min-width: 0; }
.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.stat-ico {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  flex-shrink: 0;
  background: var(--primary-soft);
  color: var(--primary);
}
.stat-ico svg { width: 21px; height: 21px; }
.stat-card .stat-n { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-card .stat-l { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.stat-card.accent { background: linear-gradient(135deg, var(--primary), #1E5C48); border: 0; color: #fff; }
.stat-card.accent .stat-ico { background: rgba(255, 255, 255, .16); color: #FFD9A0; }
.stat-card.accent .stat-l { color: rgba(255, 255, 255, .75); }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 4px;
  padding: 26px 16px;
  color: var(--muted);
  font-size: 14px;
}
.empty .empty-ico {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  color: var(--faint);
  margin-bottom: 8px;
}
.empty .empty-ico svg { width: 24px; height: 24px; }
.empty b { color: var(--ink-2); font-size: 15px; font-weight: 700; }
.empty .btn { margin-top: 10px; }

/* ============================================================
   AVATARS
   ============================================================ */
.kid-av {
  width: 40px; height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}
.kid-av.md { width: 48px; height: 48px; font-size: 18px; border-radius: 15px; }
.kid-av.xl { width: 76px; height: 76px; font-size: 30px; border-radius: 22px; box-shadow: var(--shadow-md); }
.kid-av img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   LIST ROWS
   ============================================================ */
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line-2);
}
.list-row:last-child { border-bottom: 0; }
.list-row b { font-weight: 700; font-size: 14.5px; }
.list-row .row-main { flex: 1; min-width: 0; }
.list-row .row-sub { font-size: 13px; color: var(--muted); margin-top: 1px; }
.row-btns { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

.goal-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
}
.goal-active { background: var(--amber-soft); color: var(--amber-2); }
.goal-done { background: var(--ok-soft); color: var(--ok); }
.goal-paused { background: var(--surface-2); color: var(--muted); }

/* Skill pips */
.pip-row { display: inline-flex; gap: 4px; }
.pip { width: 8px; height: 8px; border-radius: 999px; background: var(--line); }
.pip.on { background: var(--amber); }

/* Progress bar */
.bar { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), #2A7A5F); transition: width .3s; }
.bar.amber > i { background: linear-gradient(90deg, #F2B95C, var(--amber-2)); }
.bar.danger > i { background: linear-gradient(90deg, #E48383, var(--danger)); }

/* ============================================================
   BOTTOM NAV (mobile)
   ============================================================ */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 95;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-2);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}
.bottom-nav a {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--faint);
}
.bottom-nav a.on { color: var(--primary); }
.bottom-nav svg { width: 21px; height: 21px; }
.sheet-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 99;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow-lg);
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateY(110%);
  transition: transform .26s cubic-bezier(.32, .72, .28, 1);
}
.sheet-nav.open { transform: translateY(0); }
.sheet-nav .sheet-grip { width: 44px; height: 5px; border-radius: 999px; background: var(--line); margin: 0 auto 14px; }
.sheet-nav .sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet-nav a {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 13px 6px;
  border-radius: 14px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
}
.sheet-nav a.on { background: var(--primary-soft); color: var(--primary); }
.sheet-nav svg { width: 20px; height: 20px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line-2);
  background: var(--surface);
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--muted);
}
.footer-inner nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-inner a:hover { color: var(--primary); }
.footer-inner a { font-weight: 600; }

/* ============================================================
   LANDING
   ============================================================ */
body.landing { background: var(--bg); }
body.landing .main { padding: 0; max-width: none; }

.hero { position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(52% 46% at 84% 12%, rgba(238, 159, 46, .14) 0%, transparent 66%),
    radial-gradient(44% 50% at 8% 88%, rgba(20, 71, 58, .10) 0%, transparent 62%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  padding: 84px 24px 72px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--amber-soft);
  border: 1px solid #F3DDAE;
  color: var(--amber-2);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--amber); }
.hero h1 { font-size: 47px; line-height: 1.08; letter-spacing: -.03em; }
.hero h1 .hl { color: var(--primary); position: relative; white-space: nowrap; }
.hero h1 .hl::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 3px;
  height: 10px;
  background: rgba(238, 159, 46, .3);
  border-radius: 999px;
  z-index: -1;
}
.hero .lead { margin-top: 20px; font-size: 17.5px; line-height: 1.62; color: var(--ink-2); max-width: 54ch; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-note { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.hero-note svg { color: var(--ok); flex-shrink: 0; }

/* Гостевая шапка: «Приложение» прячем на узких экранах — ссылка есть в футере */
@media (max-width: 760px) {
  .header-actions .guest-app { display: none; }
}
@media (max-width: 480px) {
  .header-actions .btn-sm { padding: 9px 12px; font-size: 13px; }
}

/* Hero visual mockup */
.hero-visual { position: relative; }
.mock-stack { position: relative; display: grid; gap: 12px; }
.mock-card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.mock-card.raise { transform: translateX(26px); }
@media (max-width: 860px) {
  .mock-card.raise { transform: none; }
}
.mock-av {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  flex-shrink: 0;
}
.mock-main { flex: 1; min-width: 0; }
.mock-main b { font-size: 14.5px; }
.mock-main .m-sub { font-size: 12.5px; color: var(--muted); }
.mock-val { font-size: 13px; font-weight: 800; color: var(--primary); white-space: nowrap; }
.mock-tags { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.mock-tags span { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }
.mock-float {
  position: absolute;
  top: -18px; right: -6px;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
}
.mock-float svg { color: #FFC66B; }
.mock-chip-float {
  position: absolute;
  bottom: -16px; left: -10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  box-shadow: var(--shadow-md);
  display: flex;
  gap: 7px;
  align-items: center;
}
.mock-chip-float svg { color: var(--ok); }

/* Landing sections */
.section { max-width: 1140px; margin: 0 auto; padding: 64px 24px; }
.section.tint { background: var(--surface); border-block: 1px solid var(--line-2); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head .kicker { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-2); margin-bottom: 10px; }
.section-head h2 { font-size: 32px; letter-spacing: -.025em; line-height: 1.14; }
.section-head p { margin-top: 14px; font-size: 16px; color: var(--muted); line-height: 1.6; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-line); }
.feature-ico {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
  margin-bottom: 16px;
  background: var(--primary-soft);
  color: var(--primary);
}
.feature-ico svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 16.5px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--muted); line-height: 1.58; }

/* Compare table */
.compare-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.compare thead th { background: var(--surface-2); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.compare thead th.us { color: var(--primary); background: var(--primary-soft); }
.compare td.us { background: #F4F9F6; font-weight: 600; }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare .yes { color: var(--ok); font-weight: 700; }
.compare .no { color: var(--faint); }
.compare .rowname { font-weight: 700; color: var(--ink-2); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step-card { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 24px; position: relative; }
.step-num {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--ink);
  color: #FFC66B;
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 16px;
}
.step-card h3 { margin-bottom: 8px; }
.step-card p { font-size: 14px; color: var(--muted); line-height: 1.58; }

/* Quote / positioning band */
.pos-band {
  background: linear-gradient(135deg, var(--primary), #1E5C48);
  border-radius: 24px;
  color: #fff;
  padding: 44px 48px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  box-shadow: var(--shadow-lg);
}
.pos-band .pos-ico { width: 64px; height: 64px; border-radius: 20px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; }
.pos-band .pos-ico svg { width: 30px; height: 30px; color: #FFC66B; }
.pos-band h2 { color: #fff; font-size: 24px; margin-bottom: 8px; }
.pos-band p { color: rgba(255, 255, 255, .82); font-size: 15.5px; line-height: 1.6; max-width: 68ch; }

/* CTA band */
.cta-band {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 24px;
  padding: 44px 48px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(46% 72% at 50% -18%, rgba(238, 159, 46, .16), transparent 64%);
  pointer-events: none;
}
.cta-band h2 { font-size: 30px; letter-spacing: -.025em; }
.cta-band p { margin: 12px auto 26px; max-width: 52ch; color: var(--muted); font-size: 15.5px; }
.cta-band .hero-cta { justify-content: center; margin-top: 0; }

/* Auth pages */
body.auth .main { display: grid; place-items: start center; padding-top: 64px; }
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  padding: 36px 34px;
}
.auth-card .auth-ico { width: 56px; height: 56px; border-radius: 18px; background: var(--primary-soft); display: grid; place-items: center; margin-bottom: 18px; color: var(--primary); }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .auth-sub { color: var(--muted); font-size: 14.5px; margin-bottom: 24px; }
.auth-alt { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 14px; color: var(--muted); text-align: center; }
.auth-alt a { color: var(--primary); font-weight: 700; }
.auth-alt a:hover { text-decoration: underline; }

/* ============================================================
   DASHBOARD specifics
   ============================================================ */
.hello-card {
  background: linear-gradient(120deg, var(--primary) 0%, #1C5A47 62%, #26684F 100%);
  border-radius: 22px;
  color: #fff;
  padding: 26px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.hello-card::after {
  content: "";
  position: absolute;
  right: -60px; top: -80px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(238, 159, 46, .22), transparent 66%);
  pointer-events: none;
}
.hello-card h2 { color: #fff; font-size: 23px; letter-spacing: -.02em; }
.hello-card .h-sub { color: rgba(255, 255, 255, .78); font-size: 14px; margin-top: 4px; }
.hello-card .h-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; }
.hello-card .btn-ghost { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .28); color: #fff; }
.hello-card .btn-ghost:hover { background: rgba(255, 255, 255, .2); }
.hello-card .btn-amber { border: 0; }

.kids-filter { display: flex; gap: 8px; flex-wrap: wrap; }

/* Today rows */
.today-list { display: grid; gap: 8px; }
.today-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  transition: border-color .15s, background .15s;
}
.today-row:hover { border-color: var(--primary-line); background: #fff; }
.today-time {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 14px;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 6px 10px;
  border-radius: 10px;
  flex-shrink: 0;
}
.today-main { flex: 1; min-width: 0; }
.today-main b { font-size: 14.5px; display: block; }
.today-main .t-sub { font-size: 12.5px; color: var(--muted); }
.today-main .packing-line { font-size: 12px; color: var(--amber-2); font-weight: 600; margin-top: 2px; }

/* Where now */
.where-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.where-row:last-child { border-bottom: 0; }
.where-badge {
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  margin-top: 2px;
}
.where-badge.soon { background: var(--info-soft); color: var(--info); }
.where-row b { font-size: 14.5px; }
.where-row .w-sub { font-size: 13px; color: var(--muted); }
.coach-tel { color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* Week strip / stats pills */
.pill-strip { display: flex; gap: 10px; flex-wrap: wrap; }
.pill-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.pill-stat svg { color: var(--amber-2); }
.pill-stat b { color: var(--primary); }
.pill-stat.ok b { color: var(--ok); }
.pill-stat.miss b { color: var(--danger); }

/* Insights */
.insight {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
}
.insight b { font-size: 14px; }
.insight span { font-size: 13px; color: var(--muted); }
.insight.tone-positive { background: var(--ok-soft); border-color: #CBE5D6; }
.insight.tone-positive b { color: #1E5C40; }
.insight.tone-warning { background: var(--amber-soft); border-color: #F3DDAE; }
.insight.tone-warning b { color: var(--amber-2); }
.insight.tone-neutral { background: var(--info-soft); border-color: #D3E2F0; }
.insight.tone-neutral b { color: var(--info); }
.insights-list { display: grid; gap: 8px; }

/* Week load */
.load-meter { display: grid; gap: 8px; margin-bottom: 16px; }
.load-meter-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.load-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.load-day { display: grid; gap: 6px; justify-items: center; padding: 10px 4px 8px; border-radius: var(--r-md); border: 1px solid transparent; }
.load-day.today { background: var(--amber-soft); border-color: #F3DDAE; }
.ld-bar-wrap { height: 56px; width: 100%; max-width: 34px; display: flex; align-items: flex-end; }
.ld-bar { width: 100%; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #4E9C7E, var(--primary)); min-height: 4px; }
.ld-h { font-size: 12px; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ld-l { font-size: 11px; font-weight: 700; color: var(--faint); }
.lba-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; }
.lba-name { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lba-bar-wrap { display: flex; align-items: center; gap: 10px; }
.lba-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.lba-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), #2A7A5F); }
.lba-target { font-size: 11.5px; color: var(--faint); font-weight: 600; white-space: nowrap; }
.lba-h { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Evening ritual */
.evening-list { display: grid; gap: 8px; }
.evening-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  border-radius: var(--r-md);
  font-size: 14.5px;
  font-weight: 600;
  transition: all .15s;
}
.evening-check {
  width: 26px; height: 26px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #fff;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: all .15s;
  padding: 0;
  line-height: 1;
}
.evening-row.is-done { background: var(--ok-soft); border-color: #CBE5D6; color: #1E5C40; }
.evening-row.is-done .evening-check { background: var(--ok); border-color: var(--ok); }

/* Board */
.board-input-row { display: flex; gap: 10px; margin-bottom: 14px; }
.board-input-row input { flex: 1; }
.board-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 14px;
}
.board-row:last-child { border-bottom: 0; }
.board-row .b-when { margin-left: auto; font-size: 12px; color: var(--faint); white-space: nowrap; }

/* Birthdays / budget rows */
.bday-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.bday-row:last-child { border-bottom: 0; }
.bday-ico { width: 34px; height: 34px; border-radius: 11px; background: var(--amber-soft); display: grid; place-items: center; color: var(--amber-2); flex-shrink: 0; }
.budget-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.budget-row:last-child { border-bottom: 0; }
.budget-row b { font-variant-numeric: tabular-nums; }
.budget-total { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 12px 16px; background: var(--primary-soft); border-radius: var(--r-md); font-weight: 800; color: var(--primary); }

/* Ideas */
.idea-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.idea-card { border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 14px; background: var(--surface-2); display: grid; gap: 8px; align-content: start; }
.idea-area { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.idea-card p { font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.idea-done-btn { justify-self: start; }
.area-body { color: var(--area-body); }
.area-mind { color: var(--area-mind); }
.area-art { color: var(--area-art); }
.area-social { color: var(--area-social); }
.area-life { color: var(--area-life); }

/* Focus hint */
.focus-band {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(120deg, var(--amber-soft), #FFF7E8);
  border: 1px solid #F3DDAE;
  border-radius: var(--r-md);
  padding: 13px 16px;
  font-size: 14px;
}
.focus-band .f-k { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-2); display: block; }
.focus-band svg { color: var(--amber-2); flex-shrink: 0; }

/* Quiet banner */
.quiet-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-line);
  color: var(--primary);
  border-radius: var(--r-md);
  padding: 11px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}
.quiet-banner svg { flex-shrink: 0; }

/* ============================================================
   SCHEDULE WEEK
   ============================================================ */
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: start; }
.week-col { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 10px; min-height: 130px; }
.week-col.today-col { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(238, 159, 46, .14); }
.wc-head { display: flex; align-items: baseline; justify-content: space-between; padding: 2px 4px 8px; border-bottom: 1px solid var(--line-2); margin-bottom: 8px; }
.wc-day { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.week-col.today-col .wc-day { color: var(--amber-2); }
.wc-date { font-size: 12px; font-weight: 700; color: var(--faint); }
.wc-slot {
  display: grid;
  gap: 2px;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-left: 3px solid var(--ac, var(--primary));
  background: color-mix(in srgb, var(--ac, var(--primary)) 8%, #fff);
}
.wc-slot b { font-size: 12.5px; line-height: 1.3; }
.wc-slot .s-time { font-size: 11.5px; font-weight: 800; color: var(--ink-2); font-variantnumeric: tabular-nums; }
.wc-slot .s-child { font-size: 11px; color: var(--muted); font-weight: 600; }
.wc-empty { font-size: 12px; color: var(--faint); text-align: center; padding: 14px 4px; }

/* ============================================================
   CALENDAR
   ============================================================ */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.cal-title { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.cal-nav { display: flex; gap: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); text-align: center; padding: 6px 0; }
.cal-cell {
  min-height: 86px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .15s;
}
.cal-cell:hover { border-color: var(--primary-line); }
.cal-cell.pad { background: transparent; border-color: transparent; }
.cal-cell.other { opacity: .55; }
.cal-cell.today { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(238, 159, 46, .14); }
.cal-num { font-size: 12.5px; font-weight: 800; color: var(--ink-2); }
.cal-ev {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  padding: 3px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ac, var(--primary)) 12%, #fff);
  color: var(--ink-2);
  border-left: 3px solid var(--ac, var(--primary));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-ev.mood-great, .cal-ev.mood-good { background: var(--ok-soft); border-left-color: var(--ok); }
.cal-ev.mood-ok { background: var(--info-soft); border-left-color: var(--info); }
.cal-ev.mood-hard, .cal-ev.mood-sad { background: var(--danger-soft); border-left-color: var(--danger); }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

/* ============================================================
   WEEK REVIEW / HEATMAP
   ============================================================ */
.index-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1E5C48 100%);
  border-radius: 22px;
  color: #fff;
  padding: 28px 30px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.index-hero::after {
  content: "";
  position: absolute;
  right: -40px; bottom: -80px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(238, 159, 46, .18), transparent 66%);
  pointer-events: none;
}
.index-ring {
  width: 108px; height: 108px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
  background:
    radial-gradient(closest-side, #1E5C48 82%, transparent 83% 100%),
    conic-gradient(#FFC66B calc(var(--pct, 0) * 1%), rgba(255, 255, 255, .16) 0);
}
.index-ring .ir-val { font-size: 30px; font-weight: 800; position: relative; }
.index-ring .ir-cap { position: absolute; bottom: 16px; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.index-hero h2 { color: #fff; font-size: 21px; margin-bottom: 6px; }
.index-hero .ih-sub { color: rgba(255, 255, 255, .78); font-size: 14px; margin-bottom: 12px; }
.ih-lines { display: grid; grid-template-columns: repeat(4, auto); gap: 8px 22px; justify-content: start; }
.ih-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255, 255, 255, .82); }
.ih-line b { color: #FFC66B; font-size: 15px; font-variant-numeric: tabular-nums; }

.heat-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.heat-dow { font-size: 11px; font-weight: 800; text-align: center; color: var(--faint); padding-bottom: 2px; }
.heat-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--faint);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  position: relative;
}
.heat-cell.ghost { visibility: hidden; }
.heat-cell.lv0 { background: var(--surface-2); }
.heat-cell.lv1 { background: #D8EBE0; color: #1E5C40; border-color: transparent; }
.heat-cell.lv2 { background: #A9D8BF; color: #14473A; border-color: transparent; }
.heat-cell.lv3 { background: #5FAE8A; color: #fff; border-color: transparent; }
.heat-cell.lv4 { background: var(--primary); color: #fff; border-color: transparent; }
.heat-cell.miss { background: var(--danger-soft); color: var(--danger); border-color: #F0D3D0; }
.heat-cell.today-cell { outline: 3px solid rgba(238, 159, 46, .5); outline-offset: 1px; }

.day-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day-chip {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 10px 8px;
  display: grid;
  gap: 3px;
  justify-items: center;
  text-align: center;
}
.day-chip.future { opacity: .5; }
.day-chip.today { border-color: var(--amber); background: var(--amber-soft); }
.day-chip .dc-dow { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.day-chip .dc-num { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.day-chip .dc-sub { font-size: 11px; color: var(--muted); font-weight: 600; }

/* Moods */
.mood-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.mood-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.mood-btn:hover { border-color: var(--primary-line); background: var(--surface-2); }
.mood-btn .m-emoji { font-size: 17px; }
.mood-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.mood-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.mood-row:last-child { border-bottom: 0; }
.mood-emoji-lg { font-size: 22px; width: 40px; text-align: center; flex-shrink: 0; }
.mood-scale { flex: 1; height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.mood-scale i { display: block; height: 100%; border-radius: 999px; }

/* ============================================================
   CHILD DETAIL / CHILDREN
   ============================================================ */
.child-hero {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 22px;
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.child-hero-main { flex: 1; min-width: 240px; }
.child-hero-main h1 { margin-bottom: 3px; }
.rate-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 14px;
}
.area-mini { display: grid; gap: 8px; margin-top: 14px; max-width: 420px; }
.area-mini-item { display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: center; }
.area-mini-item.has-value { grid-template-columns: 170px 1fr 64px; }
.area-mini-label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.area-mini-bar { height: 7px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.area-mini-bar i { display: block; height: 100%; border-radius: 999px; background: var(--ac, var(--primary)); }

.kid-card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: transform .16s, box-shadow .16s, border-color .16s;
  position: relative;
}
.kid-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-line); }
.kid-card .k-main { flex: 1; min-width: 0; }
.kid-card .k-stats { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.kid-card .k-stat { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kid-card .k-stat b { color: var(--ink); font-size: 13.5px; }

/* ============================================================
   FEED / TIMELINE
   ============================================================ */
.feed { display: grid; gap: 0; position: relative; }
.feed-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 14px 0;
  position: relative;
}
.feed-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 58px;
  bottom: -2px;
  width: 2px;
  background: var(--line-2);
  border-radius: 2px;
}
.feed-ico {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  z-index: 1;
}
.feed-ico svg { width: 19px; height: 19px; }
.feed-ico.tone-ok { background: var(--ok-soft); border-color: #CBE5D6; color: var(--ok); }
.feed-ico.tone-amber { background: var(--amber-soft); border-color: #F3DDAE; color: var(--amber-2); }
.feed-ico.tone-info { background: var(--info-soft); border-color: #D3E2F0; color: var(--info); }
.feed-body b { font-size: 14.5px; }
.feed-body .f-meta { font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.feed-body .f-text { font-size: 13.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

/* ============================================================
   SKILLS BOARD
   ============================================================ */
.skill-area-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.skill-area-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--ac); }
.skill-row-card { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.skill-row-card:last-child { border-bottom: 0; }
.skill-row-card .s-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.skill-row-card .s-child { font-size: 11.5px; color: var(--faint); display: block; }

/* ============================================================
   CONTACTS / SETTINGS
   ============================================================ */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 16px;
  display: grid;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}
.contact-card .c-top { display: flex; align-items: center; gap: 10px; }
.contact-card .c-name { font-weight: 800; font-size: 15px; }
.contact-card .c-kind { margin-left: auto; }
.contact-card .c-phone { font-size: 15px; font-weight: 700; color: var(--primary); }
.contact-card .c-note { font-size: 13px; color: var(--muted); }

.settings-block { display: grid; gap: 14px; }
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
  flex-wrap: wrap;
}
.setting-row:last-child { border-bottom: 0; }
.setting-row .s-info { flex: 1; min-width: 220px; }
.setting-row .s-info b { display: block; font-size: 14.5px; }
.setting-row .s-info span { font-size: 13px; color: var(--muted); }
.setting-row .s-ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.code-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  padding: 10px 16px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--primary);
}
.danger-zone { border: 1px solid #F0D3D0; background: #FDF7F6; border-radius: var(--r-md); padding: 16px; }
.danger-zone h3 { color: var(--danger); margin-bottom: 6px; }
.danger-zone p { font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }

/* ============================================================
   SEARCH
   ============================================================ */
.search-result-group { margin-bottom: 8px; }
.search-hit { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.search-hit:last-child { border-bottom: 0; }
.search-hit:hover b { color: var(--primary); }
.search-hit .sh-where { margin-left: auto; font-size: 12px; color: var(--faint); white-space: nowrap; }

/* ============================================================
   MISC
   ============================================================ */
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.packing-list { font-size: 12px; color: var(--amber-2); font-weight: 600; margin-top: 2px; }
.note-body { font-size: 13.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.link-more { font-size: 13.5px; font-weight: 700; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; }
.link-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.qa-row { display: flex; gap: 10px; flex-wrap: wrap; }
.qa-row .btn { flex: 0 0 auto; }
.inline-form { display: inline; }
.w-full { width: 100%; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 56px; }
  .hero h1 { font-size: 38px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .cols-app { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-nav .nav-link { padding: 8px 9px; font-size: 13.5px; }
  .top-search { display: none; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .bottom-nav { display: grid; }
  .sheet-nav { display: block; }
  .main { padding-bottom: 120px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .week-grid { grid-template-columns: minmax(0, 1fr); }
  .week-col { min-height: 0; }
  .heat-grid, .day-strip { grid-template-columns: repeat(7, 1fr); gap: 4px; }
  .ih-lines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .index-hero { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .pos-band { grid-template-columns: minmax(0, 1fr); padding: 32px 28px; }
  .cta-band { padding: 32px 24px; }
  .hero h1 { font-size: 32px; }
  .cal-cell { min-height: 64px; padding: 5px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .idea-grid { grid-template-columns: 1fr; }
  .area-mini-item { grid-template-columns: 120px 1fr; }
  .ih-lines { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .container, .main, .hero-inner, .section { padding-left: 16px; padding-right: 16px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .stat-card { padding: 12px; gap: 10px; }
  .stat-ico { width: 38px; height: 38px; border-radius: 11px; }
  .stat-card .stat-n { font-size: 21px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 24px; }
  .card { padding: 16px; }
  .day-chip .dc-num { font-size: 14px; }
  .cal-grid { gap: 3px; }
  .cal-cell { border-radius: 8px; min-height: 52px; }
  .cal-ev { font-size: 9px; padding: 2px 4px; }
  .cal-num { font-size: 10.5px; }
  .alert-panel { width: min(320px, calc(100vw - 32px)); right: -60px; }
  .lba-row { grid-template-columns: 96px 1fr auto; }
  .hello-card { padding: 20px; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header, .bottom-nav, .site-footer, .flash-wrap, .page-actions, .actions-row, .no-print { display: none !important; }
  body { background: #fff; }
  .card, .child-hero, .index-hero { box-shadow: none; border: 1px solid #ddd; }
  .main { padding: 0; }
}

/* ============================================================
   v3: Семейная экономика
   ============================================================ */
.stat-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-grid-1 { grid-template-columns: minmax(0, 1fr); }

.eco-kid-card {
  background: #fff;
  border-radius: var(--r-lg, 18px);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  box-shadow: var(--shadow-sm, 0 2px 10px rgba(20,71,58,.06));
  border: 1px solid rgba(20,71,58,.06);
}
.ekc-main { flex: 1; min-width: 0; }
.ekc-main > b { font-size: 15px; }
.ekc-bal { font-size: 13px; color: var(--faint); font-weight: 600; margin-top: 2px; }
.ekc-n { font-size: 22px; font-weight: 800; color: var(--amber-2, #B87A14); }
.ekc-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--faint); }

.approve-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line, #E7E4D8);
}
.approve-row:last-child { border-bottom: 0; }
.reward-ico {
  width: 40px; height: 40px;
  border-radius: 13px;
  background: var(--amber-soft, #FBEFD8);
  display: grid;
  place-items: center;
  font-size: 21px;
  flex-shrink: 0;
}
.tx-amt {
  font-weight: 800;
  font-size: 14px;
  min-width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tx-amt.plus { color: #2F7D4F; }
.tx-amt.minus { color: var(--danger, #C24B40); }

.task-card {
  background: #fff;
  border-radius: var(--r-lg, 18px);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 10px;
  border: 1px solid rgba(20,71,58,.06);
  box-shadow: var(--shadow-sm, 0 2px 10px rgba(20,71,58,.06));
}
.task-card.is-off { opacity: .55; }
.task-ico {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--paper-soft, #F6F3E8);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.task-main { flex: 1; min-width: 0; }
.task-main b { font-size: 14.5px; }
.task-points {
  font-weight: 800;
  font-size: 15px;
  color: var(--amber-2, #B87A14);
  background: var(--amber-soft, #FBEFD8);
  border-radius: 12px;
  padding: 6px 12px;
  white-space: nowrap;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.store-card {
  background: #fff;
  border-radius: var(--r-lg, 18px);
  border: 1px solid rgba(20,71,58,.06);
  box-shadow: var(--shadow-sm, 0 2px 10px rgba(20,71,58,.06));
  padding: 18px 16px 14px;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}
.store-ico {
  width: 56px; height: 56px;
  border-radius: 18px;
  background: var(--amber-soft, #FBEFD8);
  display: grid;
  place-items: center;
  font-size: 28px;
}
.store-title { font-size: 14.5px; }
.store-kind { color: var(--faint); font-size: 12px; font-weight: 700; }
.store-desc { color: var(--faint); font-size: 12.5px; margin: 0; }
.store-cost { font-weight: 800; color: var(--amber-2, #B87A14); font-size: 16px; }

.goal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line, #E7E4D8);
}
.goal-row:last-child { border-bottom: 0; }
.goal-row-main { flex: 1; min-width: 0; }
.goal-bar {
  height: 9px;
  border-radius: 6px;
  background: var(--paper-soft, #F6F3E8);
  margin-top: 7px;
  overflow: hidden;
}
.goal-bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--amber, #EE9F2E), #E07A1F);
  transition: width .4s;
}
.goal-add-n { width: 72px; }

.how-list { margin: 0; padding-left: 18px; display: grid; gap: 7px; font-size: 13.5px; color: var(--ink-soft, #4A4A42); }
.how-list li::marker { color: var(--amber, #EE9F2E); font-weight: 800; }

.card.accent-amber { border-top: 3px solid var(--amber, #EE9F2E); }
.cnt-amber { background: var(--amber-soft, #FBEFD8); color: var(--amber-2, #B87A14); }

/* ============================================================
   v3: Школа
   ============================================================ */
.hw-dot { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.list-row.overdue { background: #FDF3F2; border-radius: 12px; }
.subject-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line, #E7E4D8);
}
.subject-row:last-of-type { border-bottom: 0; }
.slot-strip { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 0 12px 24px; }
.slot-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper-soft, #F6F3E8);
  border-radius: 10px;
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft, #4A4A42);
}
.slot-chip .inline { display: inline; }
.slot-chip form { margin: 0; }
.slot-chip button { border: 0; background: none; cursor: pointer; color: var(--faint); font-size: 13px; padding: 0; }
.slot-add-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.slot-add-form .mini { width: auto; }
input.mini, select.mini {
  padding: 6px 9px;
  border: 1px solid var(--line, #E7E4D8);
  border-radius: 9px;
  font: inherit;
  font-size: 12.5px;
  background: #fff;
}
.readiness-form select.mini { font-weight: 700; }

/* ============================================================
   v3: Безопасность
   ============================================================ */
.safety-device {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--paper-soft, #F6F3E8);
  border-radius: 15px;
  padding: 12px 14px;
  margin-bottom: 13px;
}
.sd-batt { display: flex; align-items: center; gap: 10px; }
.sd-icon { font-size: 26px; }
.sd-batt b { font-size: 16px; }
.sd-batt.sd-low b { color: var(--danger, #C24B40); }
.sd-batt.sd-ok b { color: #2F7D4F; }
.sd-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.zone-list { display: grid; }
.zone-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line, #E7E4D8);
}
.zone-row:last-of-type { border-bottom: 0; }
.zone-ico {
  width: 40px; height: 40px;
  border-radius: 13px;
  background: #E9F3EE;
  display: grid;
  place-items: center;
  font-size: 19px;
  flex-shrink: 0;
}
.cmd-details { border-top: 1px dashed var(--line, #E7E4D8); padding-top: 10px; margin-top: 10px; }
.cmd-details summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 13.5px;
  color: var(--faint);
}
.cmd-details summary:hover { color: var(--primary, #14473A); }
.token-box {
  background: #143328;
  color: #CFF2DF;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 13px;
  overflow-x: auto;
  margin-top: 10px;
}

/* ============================================================
   v3: Уведомления
   ============================================================ */
.notif-row.unread { background: #FDFBF3; border-radius: 12px; }
.notif-ico {
  width: 40px; height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--paper-soft, #F6F3E8);
}
.notif-ico.notif-task { background: #E3F5E9; }
.notif-ico.notif-reward { background: var(--amber-soft, #FBEFD8); }
.notif-ico.notif-zone { background: #E7F0FB; }
.notif-ico.notif-device { background: #FBE7E5; }
.notif-ico.notif-school { background: #EDEAFB; }
.notif-ico.notif-mood { background: #FFF3DC; }
.alert-dot-hot { background: var(--danger, #C24B40); color: #fff; }
.alert-all {
  display: block;
  text-align: center;
  font-weight: 800;
  font-size: 12.5px;
  color: var(--amber-2, #B87A14);
  border-top: 1px solid var(--line, #E7E4D8);
  margin-top: 6px;
  padding: 10px 0 4px;
  text-decoration: none;
}
.dd-badge {
  background: var(--danger, #C24B40);
  color: #fff;
  border-radius: 9px;
  font-size: 10.5px;
  padding: 1px 6px;
  margin-left: 4px;
}

/* Утилиты */
.w-full { width: 100%; }
.check-line { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; margin: 8px 0; }
.field-hint { color: var(--faint); font-size: 12.5px; margin: 5px 0 0; font-weight: 600; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .field-grid { grid-template-columns: 1fr; } }

/* ============================================================
   СЕМЕЙНОЕ ПРОСТРАНСТВО — v2.1
   Стена · Новости · Фото · Видео · Профиль
   Единая система: шаг 4/8/12/16/24, радиусы --r-*, тени --shadow-*
   ============================================================ */

/* ---------- Каркас страниц ---------- */
.social-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.social-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.social-aside { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 980px) {
  .social-layout { grid-template-columns: minmax(0, 1fr); }
  .social-aside { position: static; order: 2; }
}

.card-h { min-width: 0; }
.card-link {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.card-link:hover { text-decoration: underline; }

.mini-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
a.mini-chip:hover { background: var(--primary); color: #fff; }

/* ---------- Аватары (буквенные) ---------- */
.s-avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
  user-select: none;
}
.s-avatar-xs { width: 30px; height: 30px; font-size: 12px; }
.s-avatar-me { background: linear-gradient(135deg, var(--primary) 0%, #1D5C4B 100%); box-shadow: inset 0 0 0 2px rgba(255,255,255,.18); }
.tone-a { background: linear-gradient(135deg, #5B8DEF, #3E6FC4); }
.tone-b { background: linear-gradient(135deg, #E8734C, #C9503C); }
.tone-c { background: linear-gradient(135deg, #7C5CFC, #5F43C9); }
.tone-d { background: linear-gradient(135deg, #0E9F8A, #0B7A6A); }
.tone-e { background: linear-gradient(135deg, #EE9F2E, #D9821C); }

/* ---------- Композер ---------- */
.composer { padding: var(--card-pad); }
.composer-row { display: flex; gap: var(--sp-3); align-items: flex-start; }
.composer textarea {
  width: 100%;
  border: 0;
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  resize: none;
  min-height: 48px;
  transition: background .15s, box-shadow .15s;
}
.composer textarea:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 2px var(--primary-line);
}
.composer textarea::placeholder { color: var(--faint); }
.composer-extra { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); display: grid; gap: 12px; }
.composer-tags { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.composer-tags-label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  transition: all .15s;
}
.tag-chip input { position: absolute; opacity: 0; pointer-events: none; }
.tag-chip:has(input:checked) { background: var(--primary); border-color: var(--primary); color: #fff; }
.file-previews { display: flex; gap: 6px; flex-wrap: wrap; }
.file-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--amber-soft);
  color: var(--amber-2);
  font-size: 12px;
  font-weight: 700;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.composer-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.composer-submit { margin-left: auto; }
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.tool-btn:hover { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary); }
@media (max-width: 560px) {
  .tool-btn span { display: none; }
  .tool-btn { padding: 0 11px; }
}

/* ---------- Записи на стене ---------- */
.post { padding: var(--card-pad-lg); }
.post-head { display: flex; align-items: center; gap: var(--sp-3); }
.post-who { display: grid; gap: 1px; min-width: 0; }
.post-who b { font-size: 14.5px; font-weight: 800; }
.post-time { font-size: 12.5px; color: var(--faint); font-weight: 600; }
.pin-label { color: var(--amber-2); }
.post-kids { display: flex; gap: 5px; margin-left: 4px; flex-wrap: wrap; }
.post-tools { margin-left: auto; display: flex; gap: 2px; }
.post-tool {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 0;
  background: none;
  color: var(--faint);
  cursor: pointer;
  transition: all .15s;
}
.post-tool:hover { background: var(--surface-2); color: var(--ink); }
.post-text { margin-top: 12px; font-size: 15px; line-height: 1.6; overflow-wrap: break-word; }
.post-text p { margin: 0 0 8px; }
.post-text p:last-child { margin-bottom: 0; }

/* Медиа-сетка записи */
.pm-grid {
  margin-top: var(--sp-3);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-media);
  border-radius: var(--r-md);
  overflow: hidden;
}
.pm-grid.pm-1 { grid-template-columns: 1fr; }
.pm-grid.pm-2 { grid-template-columns: repeat(2, 1fr); }
.pm-grid.pm-3 { grid-template-columns: repeat(6, 1fr); }
.pm-grid.pm-3 .pm-item:not(.pm-wide) { grid-column: span 3; }
.pm-item {
  position: relative;
  padding: 0;
  border: 0;
  background: var(--surface-2);
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: block;
  width: 100%;
}
.pm-grid.pm-1 .pm-item { aspect-ratio: 16 / 10; }
.pm-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s;
}
.pm-item:hover img { transform: scale(1.04); }
.pm-grid.pm-3 .pm-item.pm-wide { grid-column: 1 / -1; aspect-ratio: 2 / 1; }

.post-video { margin-top: var(--sp-3); border-radius: var(--r-md); overflow: hidden; background: #0c1613; }
.post-video video { width: 100%; max-height: 460px; display: block; }

/* Действия */
.post-actions {
  display: flex;
  gap: var(--sp-1);
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line-2);
}
.post-actions form { margin: 0; }
.act-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border-radius: 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.act-btn:hover { background: var(--surface-2); color: var(--ink); }
.act-btn.liked { color: #D24D57; }
.act-btn.liked:hover { background: var(--danger-soft); }

/* Комментарии */
.post-comments { margin-top: 4px; display: grid; gap: 10px; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment-body { min-width: 0; background: var(--surface-2); border-radius: 4px 14px 14px 14px; padding: 8px 12px 10px; }
.comment-body b { font-size: 13px; font-weight: 800; }
.comment-body p { margin: 2px 0 3px; font-size: 14px; line-height: 1.5; overflow-wrap: break-word; }
.comment-time { font-size: 11.5px; color: var(--faint); font-weight: 600; }
.comment-form { display: flex; gap: 8px; margin-top: 2px; }
.comment-form input {
  flex: 1;
  height: 38px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  background: var(--surface-2);
  transition: border-color .15s, background .15s;
}
.comment-form input:focus { outline: none; border-color: var(--primary); background: #fff; }
.comment-send {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 0;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, transform .15s;
}
.comment-send:hover { background: var(--primary-2); transform: scale(1.05); }

/* ---------- Сайдбар ---------- */
.aside-card { padding: 16px; }
.aside-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  margin: 0 -6px;
  border-radius: var(--r-md);
  transition: background .15s;
}
.aside-nav:hover { background: var(--surface-2); }
.aside-nav b { display: block; font-size: 14px; font-weight: 800; }
.aside-nav span { display: block; font-size: 12.5px; color: var(--muted); }
.aside-ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  flex-shrink: 0;
}
.aside-ico svg { width: 18px; height: 18px; }
.aside-ico.tone-amber { background: var(--amber-soft); color: var(--amber-2); }
.aside-ico.tone-ok { background: var(--ok-soft); color: var(--ok); }
.aside-ico.tone-info { background: var(--info-soft); color: var(--info); }
.aside-ico.tone-violet { background: #EFEAFE; color: #7C5CFC; }

.aside-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.aside-list li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.aside-list .dot { width: 8px; height: 8px; background: var(--line); }
.aside-list .dot-amber { background: var(--amber); }
.aside-list .dot-ok { background: var(--ok); }
.aside-list .dot-info { background: var(--info); }

.aside-tip { background: linear-gradient(150deg, #FDF8EE 0%, var(--surface) 60%); border-color: var(--amber-soft); }
.aside-tip b { font-size: 14px; }
.aside-tip p { margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.55; }

/* ---------- Лайтбокс ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(12, 20, 17, .92);
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  grid-template-rows: 1fr;
  align-items: center;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: grid; place-items: center; height: 100%; }
.lightbox img { max-width: min(94vw, 1200px); max-height: 88vh; object-fit: contain; border-radius: 8px; box-shadow: 0 24px 80px rgba(0,0,0,.5); }
.lb-close, .lb-prev, .lb-next {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  transition: background .15s;
}
.lb-close, .lb-prev, .lb-next { font-family: sans-serif; line-height: 1; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.22); }
.lb-close { position: absolute; top: 16px; right: 16px; grid-column: unset; }
.lb-prev { font-size: 30px; }
.lb-next { font-size: 30px; }
@media (max-width: 700px) {
  .lightbox { grid-template-columns: 44px 1fr 44px; }
  .lb-prev, .lb-next { width: 38px; height: 38px; }
}

/* ---------- Новости ---------- */
.news-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.news-group { display: grid; gap: 10px; }
.news-group-h {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 2px;
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--faint);
}
.news-group-h i { flex: 1; height: 1px; background: var(--line); }
.news-card {
  display: flex;
  gap: 14px;
  padding: var(--card-pad) var(--card-pad-lg);
  align-items: flex-start;
}
.news-ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
}
.news-ico svg { width: 19px; height: 19px; }
.news-ico.tone-amber { background: var(--amber-soft); color: var(--amber-2); }
.news-ico.tone-ok { background: var(--ok-soft); color: var(--ok); }
.news-ico.tone-info { background: var(--info-soft); color: var(--info); }
.news-body { min-width: 0; flex: 1; }
.news-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.news-top b { font-size: 14.5px; font-weight: 800; }
.news-time { margin-left: auto; font-size: 12px; color: var(--faint); font-weight: 600; white-space: nowrap; }
.news-text { margin-top: 3px; font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.news-text p { margin: 0; }
.news-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
}
.news-link:hover { text-decoration: underline; }

/* ---------- Фото: masonry ---------- */
.masonry { columns: 4 240px; column-gap: var(--sp-3); }
.m-item {
  break-inside: avoid;
  margin: 0 0 var(--sp-3);
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.m-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.m-item img { width: 100%; display: block; }
.m-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 12px 10px;
  background: linear-gradient(transparent, rgba(12, 20, 17, .78));
  color: #fff;
  display: flex;
  gap: 8px;
  align-items: center;
  opacity: 0;
  transition: opacity .2s;
}
.m-item:hover figcaption { opacity: 1; }
.m-kid {
  font-size: 12px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.m-meta { font-size: 12px; font-weight: 600; opacity: .85; }

/* ---------- Видео-галерея ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: var(--sp-4); }
@media (max-width: 800px) { .video-grid { grid-template-columns: 1fr; } }
.video-card { padding: 12px; }
.video-frame { border-radius: var(--r-sm); overflow: hidden; background: #0c1613; }
.video-frame video { width: 100%; display: block; max-height: 320px; }
.video-body { padding: 10px 6px 4px; display: grid; gap: 8px; }
.video-text { margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.45; }
.video-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Профиль семьи ---------- */
.profile-hero {
  position: relative;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 160% at 85% -20%, rgba(238, 159, 46, .18) 0%, transparent 55%),
    linear-gradient(135deg, #12412F 0%, #14473A 55%, #0E3830 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 16px;
}
.profile-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-hero.has-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(10, 22, 18, .25) 0%, rgba(10, 22, 18, .72) 100%);
}
.profile-hero-in {
  position: relative;
  padding: 28px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  min-height: 150px;
}
.profile-id { display: flex; gap: 16px; align-items: center; flex: 1; min-width: 0; }
.profile-badge {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  flex-shrink: 0;
}
.profile-id-text { min-width: 0; }
.profile-id-text h1 { color: #fff; font-size: 26px; }
.profile-motto { margin-top: 3px; font-size: 14px; color: rgba(255,255,255,.82); font-weight: 600; font-style: italic; }
.profile-chips { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.profile-chips .badge { background: rgba(255,255,255,.14); color: #fff; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.profile-chips .badge-primary { background: rgba(244, 201, 95, .24); color: #F7DFA0; }
.profile-actions { flex-shrink: 0; }
.btn-on-cover { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.3); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.btn-on-cover:hover { background: rgba(255,255,255,.26); color: #fff; }
@media (max-width: 640px) {
  .profile-hero-in { flex-direction: column; align-items: flex-start; padding: 22px; }
  .profile-id { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Статистика семьи */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: var(--sp-3); }
@media (max-width: 640px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat-cell {
  display: grid;
  gap: 2px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
a.stat-cell:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-cell b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--primary); }
.stat-cell span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.stat-cell span svg { color: var(--faint); }

/* Дети в профиле */
.kids-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.kid-tile {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 18px 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  text-align: center;
  transition: all .18s;
}
.kid-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-line); background: #fff; }
.kid-tile-ava {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  margin-bottom: 4px;
}
.kid-ava-fallback {
  display: grid;
  place-items: center;
  background: var(--kc, var(--primary));
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}
.kid-tile-name { font-size: 14.5px; font-weight: 800; }
.kid-tile-age { font-size: 12px; color: var(--muted); font-weight: 700; }
.kid-tile-stats {
  display: flex;
  gap: 10px;
  margin-top: 7px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.kid-tile-stats span { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; color: var(--muted); }

/* Последние записи в профиле */
.mini-posts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.mini-post {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 6px;
  border-radius: 10px;
  transition: background .15s;
}
.mini-post:hover { background: var(--surface-2); }
.mini-post b { font-size: 13.5px; font-weight: 800; flex-shrink: 0; }
.mini-post span { flex: 1; min-width: 0; font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-post i { font-style: normal; font-size: 12px; color: var(--faint); font-weight: 700; flex-shrink: 0; }

/* Родители */
.parents-list { display: grid; gap: 10px; }
.parent-row { display: flex; gap: 11px; align-items: center; }
.parent-info b { display: block; font-size: 14px; font-weight: 800; }
.parent-info span { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* Полоса фото */
.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-media); }
.photo-strip-item { border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--surface-2); }
.photo-strip-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.photo-strip-item:hover img { transform: scale(1.08); }

/* ---------- Поиск: доп. элементы ---------- */
.hit-ico {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  flex-shrink: 0;
}
.search-form-card { padding: var(--card-pad); }
.search-form-row { margin-bottom: 0; }
.search-form-row input[type="search"] { flex: 1; min-width: 0; height: 44px; }

/* ---------- Навыки: пустые зоны ---------- */
.zone-empty-card { background: var(--surface-2); border-style: dashed; }
.zone-empty {
  margin: 2px 0 4px;
  padding: 10px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--faint);
  font-weight: 600;
  background: var(--surface);
}

/* ---------- Дашборд: лента семьи ---------- */
.dash-feed { display: grid; }
.dash-feed-item {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  padding: 10px 6px;
  border-radius: var(--r-sm);
  transition: background .15s;
}
.dash-feed-item:hover { background: var(--surface-2); }
.dash-feed-item + .dash-feed-item { border-top: 1px solid var(--line-2); }
.dash-feed-thumb {
  width: 46px;
  height: 46px;
  border-radius: var(--r-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
}
.dash-feed-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dash-feed-thumb-txt {
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}
.dash-feed-thumb-txt svg { width: 20px; height: 20px; }
.dash-feed-body { min-width: 0; display: grid; gap: 1px; }
.dash-feed-body b { font-size: 13.5px; font-weight: 800; }
.dash-feed-text {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-feed-body i {
  font-style: normal;
  font-size: 11.5px;
  color: var(--faint);
  font-weight: 700;
}
.dash-feed-links {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line-2);
}

/* ---------- Полировка мобильной версии соцпространства ---------- */
@media (max-width: 560px) {
  .composer textarea { min-height: 62px; }
  .composer-actions { flex-wrap: wrap; }
  .composer-submit { margin-left: auto; }
  .post { padding: 16px; }
  .post-head { flex-wrap: wrap; row-gap: 6px; }
  .post-kids { order: 4; width: 100%; margin-left: 54px; }
  .post-tools { margin-left: auto; }
  .pm-grid { gap: 4px; }
  .post-actions { gap: 2px; }
  .act-btn { padding: 0 10px; }
  .news-card { padding: 14px; gap: 11px; }
  .news-time { margin-left: 0; width: 100%; order: 5; }
  .profile-hero-in { padding: 20px; }
  .stat-cell { padding: 12px 14px; }
  .stat-cell b { font-size: 19px; }
}

/* ---------- Полировка шапки: меню пользователя + адаптив ---------- */
.user-chip { cursor: pointer; font-family: inherit; border: 0; }
.user-menu .nav-dropdown { min-width: 210px; }
.nav-dropdown-end { right: 0; left: auto; }
.user-menu-name {
  padding: 8px 12px 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-menu-exit { color: var(--danger); }
.search-ico-link {
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--ink-2);
  flex-shrink: 0;
}
.search-ico-link:hover { background: var(--surface-2); color: var(--primary); }

/* Компактная навигация на средних экранах */
@media (max-width: 1380px) {
  .main-nav .nav-link { padding: 8px 10px; font-size: 14px; }
  .top-search input { width: 150px; }
}
@media (max-width: 1240px) {
  .main-nav .nav-link { padding: 8px 8px; font-size: 13.5px; }
  .top-search { display: none; }
  .search-ico-link { display: grid; }
  .header-inner { gap: 12px; }
}
@media (max-width: 1120px) {
  .main-nav .nav-link { padding: 8px 7px; }
}
@media (min-width: 1241px) {
  .search-ico-link { display: none; }
}

/* ============================================================
   ПОДПИСКА + СПОРТ-ЧЕЛЛЕНДЖИ v3.4
   ============================================================ */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: var(--sp-4, 16px); margin: var(--sp-4, 16px) 0; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: var(--sp-2, 8px); padding: var(--card-pad, 20px); }
.plan-card.plan-current { border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber-soft); }
.plan-flag { position: absolute; top: -11px; right: var(--card-pad, 20px); background: var(--amber); color: #3A2604; font-size: 11.5px; font-weight: 800; padding: 3px 11px; border-radius: 999px; box-shadow: var(--shadow-1, 0 1px 3px rgba(20,30,40,.12)); }
.plan-name { font-size: 18px; font-weight: 800; }
.plan-tagline { font-size: 13px; color: var(--faint); }
.plan-price { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; margin: var(--sp-1, 4px) 0; }
.plan-price b { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.plan-price span { color: var(--faint); font-weight: 600; }
.plan-year { width: 100%; font-size: 12.5px; color: var(--green, #2E9E5B); font-weight: 600; }
.plan-feats { list-style: none; margin: var(--sp-2, 8px) 0 0; padding: 0; display: grid; gap: 7px; font-size: 14px; }
.plan-feats li { padding-left: 22px; position: relative; }
.plan-feats li::before { content: "✓"; position: absolute; left: 2px; color: var(--green, #2E9E5B); font-weight: 800; }
.plan-current-note { margin-top: auto; padding-top: var(--sp-3, 12px); font-size: 13px; font-weight: 700; color: var(--amber-2); }

.sub-usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: var(--sp-4, 16px); margin: var(--sp-3, 12px) 0; }
.usage-item { display: grid; gap: 5px; }
.usage-item b { font-size: 20px; font-weight: 800; }
.usage-item span { font-size: 13px; color: var(--faint); }
.usage-bar { height: 8px; border-radius: 999px; background: var(--line-2, #EEF1F4); overflow: hidden; }
.usage-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--amber), var(--amber-2)); transition: width .3s; }

.promo-form { display: flex; gap: var(--sp-2, 8px); flex-wrap: wrap; margin-top: var(--sp-2, 8px); }
.promo-form input { flex: 1 1 220px; min-width: 0; }
.manage-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3, 12px); flex-wrap: wrap; padding: var(--sp-2, 8px) 0; }
.manage-row .row-sub { font-size: 13px; color: var(--faint); }

/* Спорт-челленджи */
.ch-bar { margin-top: 7px; height: 7px; border-radius: 999px; background: var(--line-2, #EEF1F4); overflow: hidden; max-width: 320px; }
.ch-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #37B26C, #2E9E5B); transition: width .3s; }
.field-divider { height: 1px; background: var(--line-2, #EEF1F4); margin: var(--sp-4, 16px) 0; }
.warn-line { margin: var(--sp-2, 8px) 0 0; padding: 10px 14px; border-radius: var(--r-2, 12px); background: var(--amber-soft); color: var(--amber-2); font-size: 13.5px; font-weight: 600; }

/* Тарифные плитки лендинга */
.plan-tile { position: relative; }
.plan-tile-price { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; margin: 6px 0 2px; }
.plan-tile-price span { font-size: 13.5px; font-weight: 600; color: var(--faint); letter-spacing: 0; }
.plan-tile-flag { position: absolute; top: -11px; right: 20px; background: var(--amber); color: #3A2604; font-size: 11.5px; font-weight: 800; padding: 3px 11px; border-radius: 999px; }
.plans-note { text-align: center; color: var(--faint); font-size: 13.5px; margin-top: var(--sp-3, 12px); }
