/* Семейные задачи — оформление.
   Палитра взята из дома: горчичный (звёзды и награды), синий диван (действия), дерево, белый и графит.
   Шрифты: Unbounded — даты, заголовки, цифры; Golos Text — всё остальное. */
:root {
  --bg: #F4F5F2;
  --surface: #FFFFFF;
  --surface-2: #ECEDE7;
  --text: #22252A;
  --muted: #6A6E74;
  --border: #E2E3DD;
  --accent: #1F3B66;
  --accent-soft: #E3E9F2;
  --on-accent: #FFFFFF;
  --gold: #F2B705;
  --gold-soft: #FCF0C6;
  --gold-ink: #7A5800;
  --goal: #C99A06;
  --goal-track: #F7E6AE;
  --wood: #C8894A;
  --wood-soft: #F3E7D8;
  --warn: #8E5420;
  --warn-soft: var(--wood-soft);
  --ok: #2E7D4F;
  --ok-soft: #E1F0E6;
  --danger: #C8435A;
  --danger-soft: #F8E3E7;
  --radius: 16px;
  --font-display: "Unbounded", "Golos Text", system-ui, sans-serif;
  --font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(34, 37, 42, .06), 0 6px 20px rgba(34, 37, 42, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161A;
    --surface: #1D2025;
    --surface-2: #272A30;
    --text: #ECEDEE;
    --muted: #9DA2A9;
    --border: #31353B;
    --accent: #A3BCE6;
    --accent-soft: #22314A;
    --on-accent: #0F1A2C;
    --gold: #F5C430;
    --gold-soft: #3A3014;
    --gold-ink: #F5C430;
    --goal: #F5C430;
    --goal-track: #4A3D18;
    --wood: #D9A06A;
    --wood-soft: #33281C;
    --warn: #E2A86E;
    --ok: #7CCB98;
    --ok-soft: #1C3326;
    --danger: #EE8296;
    --danger-soft: #3A1E25;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 var(--font-body);
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.splash { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }
.ico { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.grow { flex: 1; min-width: 0; }
.hint { font-size: 14px; color: var(--muted); margin: 0 0 12px; }

/* ---------- каркас ---------- */
.shell { max-width: 720px; margin: 0 auto; padding: 0 16px calc(104px + env(safe-area-inset-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  max-width: 720px; margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  --me: var(--accent);
  background: color-mix(in srgb, var(--me) 14%, var(--bg));
  box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--me) 50%, var(--bg));
}
.topbar .me-btn span, .kid-top b { color: color-mix(in srgb, var(--me) 62%, #000); }
.topbar .me-btn.on { background: color-mix(in srgb, var(--me) 24%, var(--bg)); }
.topbar .star-chip, .kid-top .star-chip { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .topbar, :root:not([data-theme="light"]) .kid-top {
    background: color-mix(in srgb, var(--me) 16%, var(--bg)); box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--me) 45%, var(--bg)); }
  :root:not([data-theme="light"]) .topbar .me-btn span, :root:not([data-theme="light"]) .kid-top b { color: color-mix(in srgb, var(--me) 55%, #fff); }
  :root:not([data-theme="light"]) .topbar .star-chip, :root:not([data-theme="light"]) .kid-top .star-chip { background: var(--surface); }
}
.me-btn { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 4px 10px 4px 4px; border-radius: 999px; font-weight: 600; margin-right: auto; min-width: 0; }
.me-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-btn.on { background: var(--surface-2); }
.page-head { margin: 12px 0 16px; }
.page-head h1 { font-family: var(--font-display); font-weight: 500; font-size: 26px; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
.page-head p { color: var(--muted); margin: 6px 0 0; font-size: 15px; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; justify-content: center;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
}
.nav-inner { display: flex; width: 100%; max-width: 520px; }
.nav button {
  flex: 1; border: 0; background: none; padding: 8px 2px 6px; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 12px; color: var(--muted);
}
.nav button .ico { width: 24px; height: 24px; }
.nav button.active { color: var(--accent); font-weight: 600; }
.nav button.active::before { content: ""; position: absolute; top: -4px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.nav .badge { position: absolute; top: 2px; left: calc(50% + 6px); }

.fab {
  position: fixed; right: max(16px, calc(50% - 344px)); bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 7;
  width: 58px; height: 58px; border-radius: 20px; border: 0;
  background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(31, 59, 102, .3);
}
.fab .ico { width: 28px; height: 28px; stroke-width: 2.2; }

/* ---------- базовые элементы ---------- */
.avatar { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-weight: 600; font-size: 14px; }
.avatar.sm { width: 22px; height: 22px; font-size: 11px; }
.avatar.lg { width: 48px; height: 48px; font-size: 20px; }
.avatar.xl { width: 88px; height: 88px; font-size: 36px; }
img.avatar { object-fit: cover; border: 2px solid transparent; background: var(--surface-2); }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 10px 16px; border-radius: 12px; font-weight: 500; white-space: nowrap;
}
.btn .ico { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--danger); }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn.big { padding: 14px 18px; font-size: 16px; border-radius: 14px; }
.btn.block { width: 100%; margin-top: 12px; }
.btn:disabled { opacity: .5; }
.icon-btn { border: 0; background: none; padding: 6px; border-radius: 10px; line-height: 1; color: var(--muted); display: inline-grid; place-items: center; font-size: 20px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 14px; color: var(--muted); font-weight: 500; }
.input, select.input, textarea.input { width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); outline: none; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 72px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
@media (max-width: 440px) { .row.stack { flex-direction: column; gap: 0; } }
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px 6px; border-radius: 10px; font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button .ico { width: 18px; height: 18px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-weight: 600; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; flex: none; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 5px 12px 5px 6px; font-size: 14px; }
.chip.plain { padding-left: 12px; }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.banner { display: flex; gap: 10px; align-items: center; background: var(--accent-soft); color: var(--text); border-radius: 14px; padding: 10px 12px; margin-top: 8px; font-size: 14px; }

/* ---------- задачи: список строк ---------- */
.section-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; margin: 26px 2px 10px; }
.section-title span { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 0 8px; }
.section-title.danger { color: var(--danger); }
.section-title.warn { color: var(--warn); }
.list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; cursor: pointer; background: var(--surface); }
.list > .card + .card { border-top: 1px solid var(--border); }
.card.done { opacity: .6; }
.card.done .card-title { text-decoration: line-through; }
.card-body { flex: 1; min-width: 0; }
.card-title { font-weight: 500; overflow-wrap: anywhere; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.card-meta .overdue { color: var(--danger); font-weight: 600; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.check { flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--border); background: none; display: grid; place-items: center; font-size: 14px; color: #fff; }
.check.on { background: var(--ok); border-color: var(--ok); }
.task-icon { flex: none; font-size: 24px; line-height: 1; width: 40px; height: 40px; display: grid; place-items: center; background: var(--surface-2); border-radius: 12px; }
.task-icon.big { font-size: 34px; width: 56px; height: 56px; border-radius: 16px; }
.prio { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.prio.high { background: var(--danger); }
.prio.low { background: var(--muted); opacity: .5; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.todo { background: var(--surface-2); color: var(--muted); }
.pill.review { background: var(--wood-soft); color: var(--warn); }
.pill.done { background: var(--ok-soft); color: var(--ok); }
.tag { background: var(--surface-2); border-radius: 6px; padding: 0 6px; }
.star-count { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--gold-ink); }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty .big { font-size: 40px; display: block; margin-bottom: 8px; }
.person-head { display: flex; align-items: center; gap: 8px; margin: 16px 2px 8px; font-weight: 600; font-size: 15px; }
.person-head span { color: var(--muted); font-weight: 500; }
.others-title { color: var(--muted); }
.others .list { background: transparent; border-color: var(--border); }
.others .card { background: transparent; }

.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.board-col { background: var(--surface-2); border-radius: var(--radius); padding: 10px; scroll-snap-align: start; min-height: 120px; }
.board-col h3 { margin: 2px 4px 10px; font-size: 14px; display: flex; justify-content: space-between; }
.board-col .list { gap: 8px; background: none; border: 0; overflow: visible; }
.board-col .card { border-radius: 12px; border: 1px solid var(--border); }

/* ---------- «Сегодня» ---------- */
.today-date { margin: 14px 2px 16px; }
.today-date h1 { font-family: var(--font-display); font-weight: 700; font-size: 36px; line-height: 1.05; margin: 0; letter-spacing: -.02em; }
.today-date p { font-family: var(--font-display); font-weight: 500; font-size: 18px; color: var(--muted); margin: 6px 0 0; }
.review-strip { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: var(--accent-soft); color: var(--accent); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-weight: 600; text-align: left; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; aspect-ratio: 1 / 1; border-radius: 22px; padding: 14px; display: flex; flex-direction: column; text-align: left; overflow: hidden; border: 1px solid var(--border); background: var(--surface); color: var(--text); min-width: 0; }
.tile-label { font-weight: 600; font-size: 15px; }
.tile-label.on-photo { position: absolute; top: 12px; left: 14px; z-index: 2; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.tile-note { margin-top: auto; font-size: 13px; color: var(--muted); }
.tile-empty { background: var(--surface-2); border-style: dashed; }
.tile-routine .ring { position: relative; width: 58%; aspect-ratio: 1; margin: auto; display: grid; place-items: center; }
.tile-routine .ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile-routine .ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 8; }
.tile-routine .ring-fg { fill: none; stroke: var(--gold); stroke-width: 8; stroke-linecap: round; transition: stroke-dasharray .4s; }
.tile-routine .ring b { font-family: var(--font-display); font-weight: 700; font-size: 24px; }
.tile-routine .ring small { font-size: 15px; color: var(--muted); font-weight: 500; }
.tile-routine.complete { background: var(--gold-soft); border-color: transparent; }
.tile-routine.complete .ring-bg { stroke: color-mix(in srgb, var(--gold) 25%, transparent); }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 13px; min-height: 22px; }
.tile-left { font-size: 18px; letter-spacing: 2px; white-space: nowrap; overflow: hidden; }
.tile-done { color: var(--gold-ink); font-weight: 600; }
.tile-zone { padding: 0; border: 0; background: var(--wood-soft); display: grid; grid-template-rows: 1fr; }
.tile-zone.split { grid-template-rows: none; grid-auto-rows: 1fr; gap: 2px; }
.tile-zone.split .tile-label { display: none; } /* в половинках хватает названий зон */
.zone-part { position: relative; border: 0; padding: 0; background: var(--wood-soft); overflow: hidden; display: block; min-height: 0; text-align: left; }
.zone-part img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.zone-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 44px; }
.zone-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 35%, transparent 50%, rgba(0, 0, 0, .65)); }
.zone-name { position: absolute; left: 14px; right: 10px; bottom: 30px; color: #fff; font-weight: 700; font-size: 16px; line-height: 1.15; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.zone-state { position: absolute; left: 14px; bottom: 10px; font-size: 12px; font-weight: 600; color: #fff; }
.zone-state.ok { color: #B8F0C9; }
.zone-state.bad { color: #FFC2CC; }
.tile-zone.split .zone-name { bottom: 24px; font-size: 14px; }
.tile-zone.split .zone-state { bottom: 6px; }

/* шторка зоны */
.zone-photo { aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: var(--wood-soft); display: grid; place-items: center; font-size: 64px; margin-bottom: 14px; }
.zone-photo img { width: 100%; height: 100%; object-fit: cover; }
.zone-who { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin: 4px 0; }
.zone-status { font-weight: 600; margin: 8px 0 14px; }
.zone-status.ok { color: var(--ok); }
.zone-status.bad { color: var(--danger); }

/* ---------- меню за аватаром ---------- */
.profile-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 14px; }
.profile-card b { display: block; font-size: 17px; }
.profile-card span { font-size: 14px; color: var(--muted); }
.give-phone { margin-top: 12px; background: var(--gold-soft); border-radius: 20px; padding: 14px; }
.give-phone-head { display: flex; align-items: center; gap: 8px; color: var(--gold-ink); }
.give-phone-kids { display: flex; gap: 14px; margin-top: 12px; overflow-x: auto; }
.give-kid { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.menu-group { font-size: 14px; font-weight: 600; color: var(--muted); margin: 24px 4px 8px; }
.menu-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.menu-row { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 14px; text-align: left; font-size: 16px; }
.menu-row + .menu-row { border-top: 1px solid var(--border); }
.menu-row > .ico:first-child { color: var(--accent); width: 22px; height: 22px; }
.menu-row .chev { color: var(--muted); width: 18px; height: 18px; }
.menu-row .tag { background: none; color: var(--muted); font-size: 14px; }
.menu-row.danger, .menu-row.danger > .ico:first-child { color: var(--danger); }
.back-link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--accent); font-weight: 600; padding: 12px 0 0; }

/* ---------- панели и семья ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-top: 12px; }
.panel h2 { font-size: 17px; margin: 0 0 12px; }
.member { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.member:first-child { border-top: 0; padding-top: 0; }
.member:last-child { padding-bottom: 0; }
.member .info { flex: 1; min-width: 0; }
.member .stats { font-size: 13px; color: var(--muted); }
.member-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; }
.colors button.on { border-color: var(--text); }
.avatar-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.avatar-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.avatar-actions label { cursor: pointer; }
.goal-line { font-family: var(--font-display); font-size: 22px; margin: 0 0 6px; }

/* ---------- вход ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-logo { width: 72px; height: 72px; border-radius: 20px; display: block; margin: 0 auto 14px; }
.auth h1 { font-family: var(--font-display); font-weight: 500; text-align: center; margin: 0 0 6px; font-size: 26px; }
.auth p.lead { text-align: center; color: var(--muted); margin: 0 0 24px; }
.who { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-bottom: 18px; }
.who button { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 14px 6px; font-size: 14px; }
.who button.on { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }

/* ---------- шторки ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(15, 18, 24, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--bg); border-radius: 24px 24px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
@media (min-width: 700px) {
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 24px; max-height: 88vh; }
}
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 8px; position: sticky; top: -8px; background: var(--bg); padding: 10px 0; z-index: 1; }
.sheet-head h2 { flex: 1; margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 20px; }
body.no-scroll { overflow: hidden; }
.sheet-backdrop.full { align-items: stretch; }
.sheet.full { display: flex; flex-direction: column; height: 100%; max-height: none; border-radius: 0; padding-bottom: 0; overflow: hidden; }
@media (min-width: 700px) {
  .sheet-backdrop.full { align-items: center; }
  .sheet.full { height: 90vh; border-radius: 24px; }
}
.sheet.full .sheet-head { position: static; padding-top: calc(10px + env(safe-area-inset-top)); }
.detail-scroll { flex: 1; overflow-y: auto; padding-bottom: 12px; overscroll-behavior: contain; }
.detail-title { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; }
.detail-title h3 { margin: 0; font-size: 22px; overflow-wrap: anywhere; }
.detail-desc { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 14px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; margin-bottom: 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; display: flex; align-items: center; gap: 6px; }
.action-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }
.action-bar .btn { flex: 1; }
.comments { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 12px; }
.comment { display: flex; gap: 8px; }
.comment .bubble { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 7px 11px; flex: 0 1 auto; max-width: 85%; min-width: 0; }
.comment.mine { justify-content: flex-end; }
.comment.mine .bubble { background: var(--accent-soft); border-color: transparent; }
.comment .who-line { font-size: 12px; color: var(--muted); }
.comment .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.comment .photo { display: block; max-width: 100%; max-height: 260px; border-radius: 10px; margin: 4px 0; cursor: zoom-in; }
.log-line { text-align: center; font-size: 12.5px; color: var(--muted); padding: 2px 8px; }
.composer { border-top: 1px solid var(--border); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: var(--bg); }
.composer.report { border-top: 0; display: flex; flex-direction: column; gap: 10px; padding-top: 0; }
.composer-row { display: flex; gap: 8px; align-items: flex-end; }
.composer-row textarea { min-height: 44px; max-height: 140px; }
.composer-row .btn { flex: none; height: 44px; }
.composer .photo-pick { cursor: pointer; }
.composer-row .photo-pick { font-size: 24px; height: 44px; display: grid; place-items: center; }
.photo-preview { position: relative; display: inline-block; margin-bottom: 8px; }
.photo-preview img { max-height: 140px; max-width: 100%; border-radius: 12px; display: block; }
.photo-preview .icon-btn { position: absolute; top: 4px; right: 4px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 14px; border-radius: 50%; width: 28px; height: 28px; padding: 0; }
.report-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; font-size: 18px; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .9); display: grid; place-items: center; cursor: zoom-out; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }
.toast { position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 14px; font-size: 14px; max-width: calc(100% - 32px); box-shadow: var(--shadow); }

/* ---------- форма задачи ---------- */
.icons { display: flex; flex-wrap: wrap; gap: 6px; }
.icons button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 22px; padding: 0; }
.icons button.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); }
.quick-due { display: flex; gap: 8px; margin: -6px 0 14px; flex-wrap: wrap; }
.quick-due .chip { cursor: pointer; }
.check-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 15px; }
.check-row input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
details.more { margin-bottom: 8px; }
details.more summary { cursor: pointer; color: var(--accent); font-weight: 500; margin-bottom: 12px; }

/* ---------- календарь ---------- */
.cal { padding: 12px; }
.cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.cal-head b { flex: 1; text-align: center; text-transform: capitalize; font-size: 16px; }
.cal-head .icon-btn { font-size: 26px; padding: 0 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 4px; }
.cal-cell { aspect-ratio: 1 / 1; min-height: 40px; border: 1px solid transparent; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 2px; }
.cal-cell.other { opacity: .4; }
.cal-cell .num { font-size: 14px; font-weight: 500; }
.cal-cell.today .num { background: var(--accent); color: var(--on-accent); border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; }
.cal-cell.sel { border-color: var(--accent); background: var(--accent-soft); }
.cal-cell.late .num { color: var(--danger); font-weight: 700; }
.cal-cell.today.late .num { color: var(--on-accent); }
.cal-cell .dots { display: flex; gap: 2px; height: 6px; align-items: center; }
.cal-cell .dots i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.cal-cell .dots b { font-size: 10px; line-height: 6px; color: var(--muted); }

/* ---------- режим дня (чек-лист в шторке и у малыша) ---------- */
.routine { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-top: 4px; }
.routine.complete { background: var(--gold-soft); border-color: transparent; }
.routine-head { display: flex; align-items: center; gap: 8px; }
.routine-progress { font-family: var(--font-display); font-weight: 700; color: var(--accent); }
.routine.complete .routine-progress { color: var(--gold-ink); }
.routine-reward { margin-left: auto; font-size: 13px; color: var(--muted); }
.streak { font-size: 13px; font-weight: 600; color: #B4520E; background: #FDE7D2; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .streak { background: #40220E; color: #F7B98A; } }
.routine-bar { height: 6px; border-radius: 3px; background: var(--surface-2); margin: 10px 0 4px; overflow: hidden; }
.routine-bar i { display: block; height: 100%; background: var(--gold); border-radius: 3px; transition: width .3s; }
.routine-part { margin-top: 12px; }
.routine-part-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.routine-items { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.rt { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--border); background: var(--surface); border-radius: 999px; padding: 8px 14px 8px 10px; font-size: 15px; }
.rt .rt-ico { font-size: 20px; line-height: 1; }
.rt.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.rt:disabled { opacity: .85; cursor: default; }
.routine.big .rt { font-size: 18px; padding: 12px 18px 12px 12px; }
.routine.big .rt .rt-ico { font-size: 28px; }
.routine.big .routine-head b { font-size: 20px; }

/* ---------- зоны: проверка и настройки ---------- */
.zone-banner { margin-top: 12px; border-radius: var(--radius); padding: 12px; background: var(--wood-soft); }
.zone-title { font-weight: 700; }
.zone-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.zone-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border-radius: 12px; padding: 6px 12px; font-weight: 600; }
.zone-chip-ico { font-size: 20px; }
.zone-chip.ok { background: var(--ok-soft); color: var(--ok); }
.zone-chip.bad { background: var(--danger-soft); color: var(--danger); }
.zone-hint { font-size: 13px; color: var(--muted); margin-top: 8px; }
.zone-check { padding: 6px 14px; }
.zone-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.zone-row:first-child { border-top: 0; }
.zone-row .info { flex: 1; min-width: 0; }
.zone-ico { font-size: 26px; width: 36px; text-align: center; }
.zbtn { width: 48px; height: 44px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); font-size: 20px; filter: grayscale(1); opacity: .5; }
.zbtn.on { filter: none; opacity: 1; }
.zbtn.ok.on { border-color: var(--ok); background: var(--ok-soft); }
.zbtn.bad.on { border-color: var(--danger); background: var(--danger-soft); }
.zone-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.zone-line:first-child { border-top: 0; padding-top: 0; }
.zone-line .grow { display: flex; flex-direction: column; gap: 4px; }
.zone-thumb { position: relative; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; background: var(--wood-soft); display: grid; place-items: center; font-size: 28px; cursor: pointer; flex: none; }
.zone-thumb img { width: 100%; height: 100%; object-fit: cover; }
.zone-thumb-cam { position: absolute; right: 4px; bottom: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; }
.zone-thumb-cam .ico { width: 14px; height: 14px; }
.sm-select { width: auto; max-width: 100%; padding: 6px 8px; font-size: 14px; }

/* ---------- настройки режима дня ---------- */
.rt-person { padding: 12px 0; border-top: 1px solid var(--border); }
.rt-person:first-child { border-top: 0; padding-top: 0; }
.rt-person-head { display: flex; align-items: center; gap: 8px; }
.rt-person-head .btn { margin-left: auto; }
.rt-line { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 15px; }
.rt-line small { display: block; font-size: 13px; color: var(--muted); }
.rt-line-ico { font-size: 22px; width: 28px; text-align: center; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.day { display: inline-flex; }
.day input { position: absolute; opacity: 0; pointer-events: none; }
.day span { display: inline-block; min-width: 42px; text-align: center; padding: 8px 0; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; }
.day input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.day input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- неделя: кольца и медали ---------- */
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 4px; text-align: center; }
.week-nav .icon-btn { font-size: 28px; padding: 0 12px; }
.week-nav .icon-btn:disabled { opacity: .25; }
.week-title h1 { font-family: var(--font-display); font-weight: 500; font-size: 24px; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
.week-title p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.week-now { display: block; margin: 6px auto 0; border: 0; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 5px 14px; font-size: 14px; font-weight: 600; }

.pring { position: relative; display: inline-grid; place-items: center; flex: none; }
.pring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pring-track { fill: none; stroke: var(--surface-2); }
.pring-val { fill: none; stroke-linecap: round; transition: stroke-dasharray .5s; }
.pring-tick { stroke: var(--text); stroke-width: 3; stroke-linecap: round; }
.pring-in { position: relative; display: grid; place-items: center; text-align: center; line-height: 1; }
.pring-in b small, .wp-pct small { font-size: .55em; }

.goal { display: flex; align-items: center; gap: 18px; background: var(--gold-soft); border-color: transparent; }
.goal .pring-track, .res-stage .pring-track { stroke: var(--goal-track); }
.goal .pring-in b, .res-stage .pring-in b { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.res-stage .pring-in b { font-size: 28px; }
.goal .pring-in span, .res-stage .pring-in span { font-size: 12px; color: var(--gold-ink); margin-top: 4px; }
.goal-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.goal-label { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--gold-ink); font-weight: 600; }
.goal-label .icon-btn { margin-left: auto; font-size: 15px; padding: 2px; }
.goal-reward { font-family: var(--font-display); font-weight: 500; font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.goal-left { font-weight: 700; }
.goal-stars { font-size: 13px; color: var(--gold-ink); }
.goal.reached .goal-left { color: var(--ok); }

.rank-rings { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 12px 6px; }
.rank-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; border: 0; background: none; padding: 4px 0; border-radius: var(--radius); min-width: 0; }
.rank-cell:active { background: var(--surface-2); }
.rank-ring { position: relative; margin-bottom: 4px; }
.rank-medal { position: absolute; right: -6px; top: -6px; font-size: 20px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .2)); }
.rank-cell b { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.rank-cell > span:last-child { font-size: 13px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-cell.me > span:last-child { color: var(--accent); font-weight: 600; }
.rank-cell.idle .avatar { opacity: .45; }
.rank-cell.idle b { color: var(--muted); }

/* медаль: цветной круг, объёмная иконка, аватарки победителей на краю */
.coin { --cs: 84px; position: relative; display: inline-grid; place-items: center; width: var(--cs); height: var(--cs); border-radius: 50%; flex: none;
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--mc) 30%, #fff) 0%, var(--mc) 55%, color-mix(in srgb, var(--mc) 70%, #000) 100%);
  box-shadow: inset 0 0 0 calc(var(--cs) * .06) color-mix(in srgb, var(--mc) 50%, #fff), inset 0 -4px 8px rgba(0, 0, 0, .18), 0 4px 12px color-mix(in srgb, var(--mc) 40%, transparent); }
.coin::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%) 120% 0 / 250% 100% no-repeat; }
.coin-face { font-size: calc(var(--cs) * .46); line-height: 1; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25)); }
.coin.locked { --mc: #a9adb3; filter: grayscale(1); opacity: .5; box-shadow: inset 0 0 0 calc(var(--cs) * .06) rgba(255, 255, 255, .45); }
.coin.locked .coin-face { font-size: calc(var(--cs) * .32); }
.coin-who { position: absolute; right: -8px; bottom: -4px; display: flex; flex-direction: row-reverse; }
.coin-who .avatar { width: 30px; height: 30px; font-size: 13px; border: 2px solid var(--surface); margin-left: -10px; }
.coin.xs { --cs: 26px; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--mc) 50%, #fff); }
.coin.sm { --cs: 46px; }
.coin.xl { --cs: 168px; }

.medals.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: 40%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 6px 16px 4px; scroll-padding: 0 16px; }
.medals.carousel::-webkit-scrollbar { display: none; }
.medal-card { scroll-snap-align: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 10px 14px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.medal-card.pop .coin { animation: medal-pop .7s var(--d, 0ms) cubic-bezier(.3, 1.7, .5, 1) both; }
@keyframes medal-pop { 0% { transform: scale(.3) translateY(24px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.medal-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; margin-top: 12px; }
.medal-note { font-size: 12px; color: var(--muted); line-height: 1.3; }
.medal-names { font-size: 13px; font-weight: 600; margin-top: 2px; }

/* шторка человека */
.wp-head { display: flex; align-items: center; gap: 18px; margin: 4px 0 8px; }
.wp-head .avatar.xl { width: 84px; height: 84px; }
.wp-facts { display: flex; flex-direction: column; gap: 3px; font-size: 15px; }
.wp-pct { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1.1; }
.wp-medals { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.wp-medal { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border-radius: 14px; padding: 8px 12px; }
.wp-medal b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.wp-medal span { font-size: 13px; color: var(--muted); }
.wk-sub { font-size: 14px; color: var(--muted); font-weight: 600; margin: 18px 0 6px; }
.wk-task { display: flex; gap: 8px; align-items: center; padding: 3px 0; font-size: 14px; }
.wk-task span:nth-child(2) { flex: 1; min-width: 0; }
.wk-task.miss span:nth-child(2) { color: var(--danger); }
.wk-stars { font-size: 11px; }
.matrix-wrap { overflow-x: auto; }
.dots-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.dots-table th { font-weight: 600; color: var(--muted); font-size: 12px; padding: 2px 2px 6px; }
.dots-table th.now { color: var(--accent); }
.dots-table td { text-align: center; padding: 4px 2px; }
.dots-table td.mt { text-align: left; white-space: nowrap; padding-right: 8px; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
.dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; vertical-align: middle; }
.dot.ok { background: var(--ok); }
.dot.miss { border: 2px solid var(--danger); }
.dot.today { border: 2px solid var(--muted); }
.dot.future { width: 5px; height: 5px; background: var(--muted); opacity: .5; }
.dot.none { border: 2px dashed var(--border); }
.dot.off { background: repeating-linear-gradient(45deg, var(--muted) 0 2px, transparent 2px 5px); opacity: .6; }

/* коллекция медалей */
.collection { background: var(--surface-2); border-radius: var(--radius); padding: 12px 14px; margin: 18px 0 16px; }
.coll-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.coll-head b { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.coll-total { margin-left: auto; font-family: var(--font-display); font-weight: 700; font-size: 15px; background: var(--gold-soft); color: var(--gold-ink); border-radius: 999px; padding: 2px 10px; }
.coll-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.coll-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; padding: 6px 2px; border-radius: 12px; font-size: 12px; }
.coll-item:disabled { cursor: default; color: var(--muted); }
.coll-item.on { background: var(--surface); }
.coll-item b { position: absolute; top: 0; right: 6%; background: var(--text); color: var(--bg); font-size: 11px; border-radius: 999px; padding: 0 6px; line-height: 18px; }
.coll-weeks { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.coll-weeks div { display: flex; justify-content: space-between; gap: 8px; background: var(--surface); border-radius: 10px; padding: 6px 10px; }
.coll-weeks span:last-child { color: var(--muted); text-align: right; }
.collection .hint { margin: 8px 0 0; }

/* итоги недели */
.results { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; overflow-y: auto;
  padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--gold) 28%, var(--bg)), var(--bg) 72%); animation: fade-in .3s ease-out; }
.results-x { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.res-screen { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.res-kicker { font-size: 13px; font-weight: 600; color: var(--gold-ink); text-transform: uppercase; letter-spacing: .06em; animation: rise .4s both; }
.res-title { font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.2; margin: 0; animation: rise .5s .1s both; }
.res-stage { position: relative; display: grid; place-items: center; min-height: 190px; perspective: 700px; margin: 6px 0; }
.res-medal-name { font-family: var(--font-display); font-weight: 700; font-size: 26px; animation: rise .5s 1.15s both; }
.res-note { color: var(--muted); font-size: 16px; animation: rise .5s .25s both; }
.res-screen.medal .res-note { animation-delay: 1.3s; }
.res-next { margin-top: 14px; min-width: 180px; animation: rise .5s .4s both; }
.res-screen.medal .res-next { animation-delay: 1.5s; }
.res-screen.medal .coin { animation: medal-drop 1.1s cubic-bezier(.25, .9, .35, 1) both, medal-pulse 1.8s 1.4s ease-in-out infinite alternate; }
.res-screen.medal .coin::after { animation: coin-shine 1.1s 1s ease-out both; }
.res-screen.party .pring { animation: medal-pulse 1.4s .6s ease-in-out infinite alternate; }
@keyframes medal-drop { 0% { transform: translateY(-80vh) rotateY(0); opacity: 0; } 15% { opacity: 1; } 75% { transform: translateY(0) rotateY(900deg); } 88% { transform: translateY(-14px) rotateY(1040deg); } 100% { transform: translateY(0) rotateY(1080deg); } }
@keyframes medal-pulse { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes coin-shine { from { background-position: 120% 0; } to { background-position: -40% 0; } }
.res-spark { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; pointer-events: none; animation: spark 1s ease-out both; }
.res-list { width: 100%; display: flex; flex-direction: column; gap: 8px; animation: rise .5s .2s both; }
.res-row { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 14px; padding: 8px 12px; text-align: left; }
.res-row b { flex: 1; }
.res-row > span { display: flex; gap: 4px; }
.res-count { font-family: var(--font-display); font-weight: 700; font-size: 64px; line-height: 1; color: var(--gold-ink); }
.res-count.tick { animation: bump .45s cubic-bezier(.3, 1.8, .5, 1); }
.res-screen .collection { width: 100%; background: var(--surface); margin: 4px 0 0; animation: rise .5s .3s both; }
@media (prefers-reduced-motion: reduce) {
  .results, .results *, .results *::after, .medal-card.pop .coin { animation: none !important; }
}

/* ---------- звёзды: счётчик, полёт, празднование ---------- */
.star-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--gold-soft); color: var(--gold-ink); border-radius: 999px; padding: 6px 12px; font-family: var(--font-display); font-weight: 700; font-size: 15px; border: 0; cursor: pointer; }
.star-chip small { font-family: var(--font-body); font-size: 12px; font-weight: 600; opacity: .8; margin-left: 4px; }
.star-chip.bump { animation: bump .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); box-shadow: 0 0 0 6px rgba(242, 183, 5, .35); } 100% { transform: scale(1); } }
.fly-star { position: fixed; z-index: 60; pointer-events: none; font-size: 26px; line-height: 1; filter: drop-shadow(0 0 8px rgba(242, 183, 5, .9)); }
.burst { position: fixed; z-index: 59; width: 9px; height: 9px; border-radius: 50%; pointer-events: none; }
.mini-star { position: fixed; z-index: 40; pointer-events: none; font-size: 28px; animation: mini .9s ease-out forwards; }
.kid-return { background: var(--gold-soft); color: var(--gold-ink); border-color: transparent; font-weight: 600; }
.kid-return-bar { display: flex; justify-content: flex-end; }
.celebrate { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: radial-gradient(circle, rgba(242, 183, 5, .2), rgba(15, 18, 24, .6) 70%); animation: fade-in .25s ease-out; cursor: pointer; }
.celebrate.out { animation: fade-out .35s ease-in forwards; }
.celebrate .stage { position: relative; width: 260px; height: 260px; display: grid; place-items: center; }
.celebrate .star { width: 160px; height: 160px; filter: drop-shadow(0 0 24px rgba(242, 183, 5, .9)); animation: star-pop 1s cubic-bezier(.2, 1.6, .4, 1) both, star-glow 1.6s ease-in-out .9s infinite alternate; }
.celebrate .ring { position: absolute; inset: 40px; border-radius: 50%; border: 4px solid var(--gold); animation: ring 1s ease-out .15s both; }
.celebrate .spark { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: var(--c, #F2B705); animation: spark .9s ease-out var(--d, .1s) both; }
.celebrate .caption { position: absolute; left: 0; right: 0; bottom: 18%; text-align: center; color: #fff; font-family: var(--font-display); font-size: 22px; font-weight: 700; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); padding: 0 16px; animation: rise .5s ease-out .45s both; }
.celebrate .caption small { display: block; font-family: var(--font-body); font-size: 15px; font-weight: 500; opacity: .9; margin-top: 6px; }
@keyframes star-pop { 0% { transform: scale(0) rotate(-180deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@keyframes star-glow { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes ring { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
@keyframes spark { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(var(--x), var(--y)) scale(.2); opacity: 0; } }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes mini { 0% { transform: translateY(0) scale(.6); opacity: 1; } 100% { transform: translateY(-70px) scale(1.4) rotate(40deg); opacity: 0; } }

/* ---------- простой режим (малыш) ---------- */
.kid { max-width: 560px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 16px 32px; display: flex; flex-direction: column; gap: 14px; }
.kid-top { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 22px;
  background: color-mix(in srgb, var(--me) 14%, var(--bg)); box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--me) 50%, var(--bg)); border-radius: var(--radius); padding: 10px 12px; }
.kid-top b { flex: 1; font-weight: 700; }
.kid-stars { font-size: 22px; padding: 8px 16px; }
.kid-card { background: var(--surface); border: 2px solid var(--border); border-radius: 26px; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.kid-card.wait { border-color: var(--wood); background: var(--wood-soft); }
.kid-card.done { opacity: .7; }
.kid-icon { font-size: 64px; line-height: 1; }
.kid-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.kid-btn { font-family: var(--font-display); font-size: 22px; padding: 16px 40px; border-radius: 20px; }
.kid-state { font-size: 18px; font-weight: 600; }
.kid-exit { align-self: center; margin-top: 24px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .celebrate .star, .celebrate .ring, .celebrate .spark, .mini-star, .star-chip.bump, .sheet { animation-duration: .01s; animation-iteration-count: 1; }
}
#routine-check-body .routine-head b { display: none; } /* в шторке заголовок уже есть */
#routine-check-body .routine { margin-top: 0; }

/* ---------- экран задачи (вариант A) ---------- */
.sheet.full .sheet-head h2:empty { display: none; }
.sheet.full .sheet-head { justify-content: space-between; }
.more-wrap { position: relative; margin-left: auto; }
.more-menu { position: absolute; right: 0; top: 100%; z-index: 5; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; }
.more-menu button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 10px; border-radius: 10px; text-align: left; font-size: 15px; }
.more-menu button:hover { background: var(--surface-2); }
.more-menu button.danger { color: var(--danger); }
.task-hero { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; }
.task-hero h3 { font-family: var(--font-display); font-weight: 500; font-size: 24px; line-height: 1.15; margin: 0 0 6px; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.fact { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fact-label { font-size: 13px; color: var(--muted); }
.fact-main { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.fact-main .ico { width: 22px; height: 22px; }
.fact-sub { font-size: 13px; color: var(--muted); }
.fact.gold { background: var(--gold-soft); border-color: transparent; }
.fact.gold .fact-label, .fact.gold .fact-sub { color: var(--gold-ink); }
.fact.danger { background: var(--danger-soft); border-color: transparent; }
.fact.danger .fact-main, .fact.danger .fact-label, .fact.danger .fact-sub { color: var(--danger); }
.detail-desc { font-size: 16px; }
.task-info { font-size: 14px; color: var(--muted); margin: 4px 2px 14px; }
.task-info summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.task-info summary::-webkit-details-marker { display: none; }
.task-info[open] summary .ico { transform: rotate(180deg); }
.task-info .kv { margin: 10px 0 0; color: var(--text); }
.task-actions { margin-bottom: 8px; }
.task-actions .btn.block { margin-top: 0; }
.task-cta-2 { margin-top: 8px !important; background: transparent; }
.task-state { display: flex; align-items: center; gap: 10px; background: var(--wood-soft); color: var(--warn); border-radius: 14px; padding: 14px; font-weight: 600; }
.task-state.ok { background: var(--ok-soft); color: var(--ok); }
.chat-title { margin-top: 22px; }
.history-toggle { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; color: var(--muted); font-size: 14px; padding: 10px 2px; justify-content: center; }
.history-toggle .flip { transform: rotate(180deg); }
.history { display: flex; flex-direction: column; gap: 4px; padding: 0 4px 8px; }
.history .log-line { text-align: left; display: flex; gap: 6px; font-size: 13px; }
.history .log-line span { margin-left: auto; white-space: nowrap; }

/* ---------- экран «Проверка» (вариант A) ---------- */
.rv-progress { margin-bottom: 4px; }
.rv-progress b { font-family: var(--font-display); font-weight: 500; font-size: 18px; }
.rv-progress span { color: var(--muted); }
.rv-bar { height: 10px; border-radius: 5px; background: var(--surface-2); margin-top: 10px; overflow: hidden; }
.rv-bar i { display: block; height: 100%; background: var(--gold); border-radius: 5px; transition: width .4s; }
.rv-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.rv-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.rv-row + .rv-row { border-top: 1px solid var(--border); }
.rv-thumb { width: 52px; height: 52px; flex: none; border: 0; padding: 0; border-radius: 12px; overflow: hidden; background: var(--wood-soft); display: grid; place-items: center; font-size: 26px; cursor: pointer; }
.rv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rv-row.report .rv-thumb { background: var(--accent-soft); }
.rv-info { flex: 1; min-width: 0; cursor: pointer; }
.rv-info b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-info span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.rv-btn { width: 46px; height: 46px; flex: none; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); color: var(--muted); display: grid; place-items: center; }
.rv-btn .ico { width: 22px; height: 22px; stroke-width: 2.2; }
.rv-btn.ok:hover, .rv-btn.ok.on { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.rv-btn.bad:hover, .rv-btn.bad.on { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.rv-btn.back:hover { border-color: var(--wood); background: var(--wood-soft); color: var(--warn); }
.rv-row.is-ok .rv-btn.bad:not(.on), .rv-row.is-bad .rv-btn.ok:not(.on) { opacity: .45; }
.rv-state { display: flex; align-items: center; gap: 4px; color: var(--ok); font-size: 13px; font-weight: 600; }
.rv-all-done { display: flex; align-items: center; gap: 10px; background: var(--ok-soft); color: var(--ok); border-radius: var(--radius); padding: 16px; font-weight: 600; margin-top: 16px; }
.rv-all-done .ico { width: 24px; height: 24px; }
.rv-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin: 16px 2px; }
.rv-done { margin-top: 8px; }
.rv-done summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; margin: 14px 2px 10px; }
.rv-done summary::-webkit-details-marker { display: none; }
.rv-done summary span { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 0 8px; }
.rv-done[open] summary .ico { transform: rotate(180deg); }

/* ---------- нижнее меню: текущая вкладка в горчичной капсуле ---------- */
.nav button.active::before { display: none; }
.nav-ico { display: grid; place-items: center; width: 56px; height: 30px; border-radius: 999px; transition: background .2s; }
.nav button.active .nav-ico { background: var(--gold); color: #1F3B66; }
.nav button.active .nav-ico .ico { stroke-width: 2.4; width: 26px; height: 26px; }
.nav button.active > span:not(.nav-ico):not(.badge) { color: var(--accent); font-weight: 700; }

/* ---------- плитка режима: значки дел по кругу ---------- */
.tile-routine .orbit { position: absolute; left: 50%; top: 59%; width: 76%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.tile-routine .orbit .ring { position: absolute; left: 50%; top: 50%; width: 54%; transform: translate(-50%, -50%); margin: 0; }
.tile-routine .ring b { font-size: 20px; }
.tile-routine .ring small { font-size: 13px; }
.orb { position: absolute; transform: translate(-50%, -50%); font-size: 17px; line-height: 1; filter: grayscale(1); opacity: .35; transition: opacity .3s, filter .3s, transform .3s; }
.orb.lit { filter: none; opacity: 1; }
.orb.just { animation: orb-pop .7s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes orb-pop { 0% { transform: translate(-50%, -50%) scale(.6); } 50% { transform: translate(-50%, -50%) scale(1.9); filter: drop-shadow(0 0 6px var(--gold)); } 100% { transform: translate(-50%, -50%) scale(1); } }
.tile-corner { position: absolute; right: 10px; bottom: 8px; font-size: 12px; }
.tile-corner.done { color: var(--gold-ink); font-weight: 700; }

/* ---------- «Можно поиграть» ---------- */
.tile-game { padding: 0; border: 0; background: #2a2340; }
.tile-game .game-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.55); transition: filter .6s; }
.tile-game.open .game-bg { filter: none; }
.tile-game .game-ring { position: absolute; left: 50%; top: 56%; width: 62%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(0, 0, 0, .45) 45%, transparent 70%); }
.tile-game .ring { position: absolute; inset: 0; display: grid; place-items: center; }
.tile-game .ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile-game .ring-bg { fill: none; stroke: rgba(255, 255, 255, .35); stroke-width: 8; }
.tile-game .ring-fg { fill: none; stroke: var(--gold); stroke-width: 8; stroke-linecap: round; transition: stroke-dasharray .4s; }
.tile-game .ring b { position: relative; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 22px; text-align: center; line-height: 1.05; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.tile-game .ring small { font-size: 14px; color: rgba(255, 255, 255, .8); }
.tile-game.open .ring b { font-size: 15px; }
.tiles.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 24px) / 2.2); grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; scroll-padding: 0 16px; }
.tiles.carousel::-webkit-scrollbar { display: none; }
.tiles.carousel > .tile { scroll-snap-align: start; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--border); transition: background .2s, width .2s; }
.dots i.on { background: var(--accent); width: 18px; border-radius: 4px; }
.game-banner { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; text-align: left; background: var(--surface); border-radius: var(--radius); padding: 10px; margin-bottom: 4px; border: 1px solid var(--border); }
.game-banner img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; filter: grayscale(1) brightness(.7); }
.game-banner.open { background: var(--gold-soft); border-color: transparent; }
.game-banner.open img { filter: none; }
.game-banner b { display: block; font-size: 16px; }
.game-banner small { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.game-bar { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.game-bar i { display: block; height: 100%; background: var(--gold); border-radius: 4px; }
.game-line { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: var(--gold-soft); color: var(--text); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; text-align: left; }
.game-line-ico { font-size: 22px; }
.game-line .grow { display: flex; flex-direction: column; gap: 4px; }
.gl-kid { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.gl-kid.open { color: var(--ok); font-weight: 600; }
.game-head { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; font-weight: 600; margin-bottom: 10px; }
.game-head.open { background: var(--gold-soft); color: var(--gold-ink); }
.game-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.game-item { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 12px 14px; text-align: left; font-size: 16px; }
.game-item + .game-item { border-top: 1px solid var(--border); }
.game-item small { display: block; font-size: 13px; color: var(--warn); }
.game-item.done .grow { color: var(--muted); text-decoration: line-through; }
.gi-ico { font-size: 22px; width: 28px; text-align: center; }
.game-kid { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 14px 2px 8px; }
.kid-game .tile { width: 100%; max-width: 420px; margin: 0 auto; border-radius: 26px; }
.kid-game .tile-game .ring b { font-size: 34px; }
.kid-game .tile-game.open .ring b { font-size: 26px; }
.rt-game { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 3px 7px; font-size: 16px; filter: grayscale(1); opacity: .4; }
.rt-game.on { filter: none; opacity: 1; border-color: var(--gold); background: var(--gold-soft); }

/* ---------- дополнительные дела ---------- */
.bonus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.bonus-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; border: 1px solid var(--border); background: var(--surface); border-radius: 18px; padding: 16px 10px 12px; font-size: 15px; }
.bonus-card b { font-weight: 600; line-height: 1.2; }
.bonus-ico { font-size: 40px; line-height: 1; }
.bonus-stars { font-size: 14px; }
.bonus-card small { font-size: 12px; color: var(--muted); }
.bonus-card.mine { background: var(--ok-soft); border-color: transparent; }
.bonus-card.mine small { color: var(--ok); font-weight: 600; }
.bonus-card.taken { opacity: .5; }
.quick-bonus { padding-bottom: 4px; }
.kid-help { font-family: var(--font-display); font-size: 20px; padding: 16px; border-radius: 20px; background: var(--gold-soft); border-color: transparent; color: var(--gold-ink); }

/* ---------- плитки из настроек: объявление, счётчик, награда без фото ---------- */
.tile-game .game-icon { display: grid; place-items: center; font-size: 72px; background: var(--accent-soft); filter: grayscale(1); opacity: .55; }
.tile-game.open .game-icon { filter: none; opacity: 1; background: var(--gold-soft); }
.tile-notice { background: var(--accent-soft); border-color: transparent; padding: 14px; }
.notice-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-notice:has(.notice-bg)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 40%, rgba(0, 0, 0, .65)); }
.notice-ico { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); font-size: 52px; }
.tile-notice .tile-label { position: relative; z-index: 2; font-size: 13px; color: var(--accent); }
.notice-title { position: absolute; z-index: 2; left: 14px; right: 12px; bottom: 12px; font-family: var(--font-display); font-weight: 500; font-size: 16px; line-height: 1.15; color: var(--accent); }
.tile-notice .on-photo { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
.notice-big { font-size: 80px; text-align: center; padding: 16px 0; }
.notice-text { font-size: 17px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tile-counter { cursor: pointer; }
.tile-counter .ring { position: absolute; left: 50%; top: 56%; width: 56%; aspect-ratio: 1; transform: translate(-50%, -50%); display: grid; place-items: center; margin: 0; }
.tile-counter .ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile-counter .ring-bg, .cnt-big .ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 8; }
.tile-counter .ring-fg, .cnt-big .ring-fg { fill: none; stroke: var(--gold); stroke-width: 8; stroke-linecap: round; transition: stroke-dasharray .4s; }
.tile-counter .ring b { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.tile-counter .ring small { font-size: 12px; color: var(--muted); }
.tile-counter.complete { background: var(--gold-soft); border-color: transparent; }
.tile-counter .tile-corner { left: 14px; right: auto; color: var(--muted); }
.count-plus { position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.count-plus .ico { width: 20px; height: 20px; stroke-width: 2.4; }
.cnt-big { text-align: center; margin: 4px 0 16px; }
.cnt-big .ring { position: relative; width: 160px; aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.cnt-big .ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cnt-big .ring b { font-family: var(--font-display); font-weight: 700; font-size: 34px; }
.cnt-big .ring small { font-size: 18px; color: var(--muted); }
.cnt-big .hint { margin-top: 10px; }
.cnt-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.cnt-own { margin-bottom: 14px; }
.cnt-own .btn { flex: none; }
.cnt-who { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.cnt-who + .cnt-who { border-top: 1px solid var(--border); }
.game-banner-ico { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; font-size: 34px; background: var(--surface-2); flex: none; }
.gl-title { font-size: 14px; }

/* ---------- меню → «Плитки» ---------- */
.tiles-list { padding: 4px 10px; }
.tile-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.tile-row + .tile-row { border-top: 1px solid var(--border); }
.tile-row.off .tile-thumb, .tile-row.off .grow { opacity: .55; }
.tile-row .grow { cursor: pointer; }
.tile-row b { display: block; }
.tile-row small { display: block; font-size: 13px; color: var(--muted); }
.tile-move { display: flex; flex-direction: column; }
.tile-move .icon-btn { font-size: 11px; padding: 2px 4px; }
.tile-thumb { width: 46px; height: 46px; flex: none; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font-size: 24px; cursor: pointer; }
.tile-thumb img { width: 100%; height: 100%; object-fit: cover; }
.switch { width: 46px; height: 28px; flex: none; border-radius: 14px; border: 0; background: var(--border); position: relative; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: left .2s; }
.switch.on { background: var(--ok); }
.switch.on::after { left: 21px; }
.add-tile { display: flex; flex-wrap: wrap; gap: 8px; }
.tile-pic { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tile-pic img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }
.tile-pic label { cursor: pointer; }
.tile .tile-label { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-counter .ring { top: 58%; width: 50%; }
.notice-ico { left: auto; right: 12px; top: 38px; transform: none; font-size: 38px; }
.notice-title { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.notice-ico { top: 8px; right: 10px; font-size: 30px; }
.day span { padding: 8px 12px; }
.fab.fab-help { width: auto; height: 54px; padding: 0 20px; border-radius: 27px; background: var(--gold); color: #1F3B66; font-family: var(--font-display); font-weight: 700; font-size: 16px; box-shadow: 0 8px 24px rgba(242, 183, 5, .4); }

/* Фото к заданию */
.task-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 14px; }
.task-gallery button { padding: 0; border: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 1; background: var(--surface-2); cursor: zoom-in; }
.task-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.task-gallery.n1 { grid-template-columns: 1fr; }
.task-gallery.n1 button { aspect-ratio: 4 / 3; }
.task-gallery.n3 button:first-child { grid-column: span 2; aspect-ratio: 2 / 1; }
.lightbox.strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0; scrollbar-width: none; }
.lb-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; display: grid; place-items: center; padding: 16px; min-width: 0; }
.lb-slide img { max-width: 100%; max-height: 100%; border-radius: 10px; }
.task-pics { display: flex; flex-wrap: wrap; gap: 8px; }
.task-pic { position: relative; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.task-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.task-pic .icon-btn { position: absolute; top: 3px; right: 3px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; border-radius: 50%; width: 24px; height: 24px; padding: 0; }
.task-pic-add { width: 76px; height: 76px; border-radius: 12px; border: 2px dashed var(--border); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; cursor: pointer; }

/* без связи и болезнь/отъезд */
.net-bar { display: flex; gap: 10px; align-items: center; background: var(--goal-track); color: var(--text); border-radius: 14px; padding: 10px 12px; margin: 8px 0; font-size: 14px; }
.kid .net-bar { margin: 8px 12px; }
.routine-off { background: var(--accent-soft); border-radius: 10px; padding: 8px 10px; margin-top: 8px; font-size: 14px; }

/* окно «+» и форма задачи */
.who-slider { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.who-slider::-webkit-scrollbar { display: none; }
.whom { flex: none; width: 60px; display: flex; flex-direction: column; align-items: center; gap: 5px; border: 0; background: none; padding: 0; font-size: 12px; color: var(--muted); }
.whom .avatar, .who-pool { width: 52px; height: 52px; box-shadow: 0 0 0 3px transparent; transition: box-shadow .15s; }
.who-pool { display: grid; place-items: center; border-radius: 50%; border: 2px dashed var(--border); font-size: 24px; background: var(--surface); }
.whom.on { color: var(--text); font-weight: 600; }
.whom.on .avatar, .whom.on .who-pool { box-shadow: 0 0 0 3px var(--accent); }
.whom span:last-child { max-width: 64px; text-align: center; line-height: 1.2; }
.when-chips { flex-wrap: wrap; padding-bottom: 4px; }
.date-panel { margin-top: 8px; }
.date-panel .seg { margin-bottom: 10px; }
.title-row { display: flex; gap: 10px; margin-bottom: 8px; }
.title-row .input { flex: 1; min-width: 0; font-size: 17px; }
.icon-square { flex: none; width: 58px; height: 58px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; }
.icon-square .isq { font-size: 28px; line-height: 1; }
.icon-square.empty .isq { font-size: 22px; color: var(--muted); }
.icon-square small { font-size: 10px; color: var(--muted); }
.icon-pop { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px; margin-bottom: 14px; }
.quick-head { display: flex; justify-content: space-between; align-items: center; }
.link-btn { border: 0; background: none; color: var(--accent); font-size: 14px; font-weight: 500; padding: 0; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.qp-wrap { position: relative; }
.qp { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); font-size: 13px; line-height: 1.25; text-align: center; }
.qp:active { transform: scale(.97); }
.qp.pinned { border-color: var(--accent-soft); }
.qp-ico { font-size: 26px; }
.qp-title { font-weight: 500; }
.qp small { font-size: 11px; color: var(--muted); }
.qp-x { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); font-size: 12px; padding: 0; box-shadow: var(--shadow); }
.qp-x.pin { right: 22px; }
.quick-own { display: flex; gap: 8px; margin: 4px 0 12px; }
.quick-own .input { flex: 1; min-width: 0; }
.quick-own .btn { flex: none; width: 48px; font-size: 20px; padding: 0; }
.toast { display: flex; align-items: center; gap: 12px; }
.toast-undo { border: 0; background: none; color: var(--accent-soft); font-weight: 600; font-size: 14px; padding: 0; text-decoration: underline; flex: none; }
/* дела для желающих */
.pool { margin-bottom: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.pool-item + .pool-item { border-top: 1.5px solid var(--border); }
.pool-item.off .pool-line { opacity: .55; }
.pool-item.open { background: var(--surface-2); }
.pool-line { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; }
.pool-text { flex: 1; min-width: 0; border: 0; background: none; padding: 0; text-align: left; color: var(--text); display: flex; flex-direction: column; gap: 1px; }
.pool-text b { font-weight: 600; font-size: 15px; line-height: 1.25; }
.pool-text small { font-size: 12px; color: var(--muted); }
.pool-who { display: flex; }
.pool-who .avatar + .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.pool-btn { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; padding: 0; color: var(--muted); }
.pool-btn.plus { border-style: dashed; color: var(--accent); }
.pool-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; border-style: solid; }
.pool-btn svg { width: 18px; height: 18px; }
.pool-panel { padding: 2px 12px 12px 52px; }
.pool-panel-head { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.pool-taker { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.pool-menu { display: flex; flex-direction: column; margin-top: 4px; }
.pool-menu button { display: flex; align-items: center; gap: 10px; border: 0; border-top: 1px solid var(--border); background: none; padding: 10px 0; font-size: 14px; color: var(--text); text-align: left; }
.pool-menu button:first-child { border-top: 0; }
.pool-menu svg { width: 18px; height: 18px; color: var(--muted); }
.tile-pool { cursor: pointer; }
.pool-big { margin: auto 0 0; font-family: var(--font-display); font-weight: 700; font-size: 44px; line-height: 1; color: var(--accent); }
.pool-big.done { color: var(--ok); }
.pool-big.empty { color: var(--muted); font-weight: 500; }
.tile-pool .tile-note { margin-top: 4px; }
.pool-avs { display: flex; align-items: center; gap: 2px; margin-top: 8px; }
.pool-avs small { margin-left: 4px; font-size: 12px; color: var(--muted); }
.pool-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.pool-row.off { opacity: .55; }
.pool-ico { font-size: 24px; width: 32px; text-align: center; }
.pool-state { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; font-size: 13px; }
.pool-take { display: inline-flex; align-items: center; gap: 4px; }
.pool-take.done { color: var(--ok); }
.pool-free { color: var(--muted); }
.pool-sub { font-size: 13px; color: var(--muted); font-weight: 600; margin: 8px 0 0; }
.bonus-card { position: relative; }
.bonus-left { position: absolute; top: 6px; right: 8px; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 7px; }
/* зона в детском режиме */
.kid-zone { margin-top: 12px; }
.kid-zone .tile { width: 100%; height: 210px; aspect-ratio: auto; }
.quick-note { text-align: center; margin: 6px 0 0; font-size: 13px; }
.toast:has(.toast-undo) { width: calc(100% - 32px); max-width: 440px; justify-content: space-between; }
.whom-pool { width: 78px; }
.whom-pool span:last-child { max-width: 78px; white-space: nowrap; }
.who-slider { align-items: flex-start; }
.kid-zone .zone-name { font-size: 24px; bottom: 34px; }
.kid-zone .zone-state { font-size: 15px; }
.kid-zone .tile-label { font-size: 15px; }
.banner.today-off { margin: 0 0 12px; }
