:root {
  color-scheme: light;
  --ink: #14213d;
  --ink-soft: #6b7280;
  --cream: #f7f4ed;
  --paper: #fffdf8;
  --line: #d9dce3;
  --mint: #3dd6b5;
  --mint-strong: #20a98e;
  --coral: #ff6b6b;
  --gold: #ffc857;
  --danger: #b93f50;
  font-family: "Noto Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

/* Календарь семьи: единое состояние даты, виды «День» и «Неделя». */
.parent-calendar-page { max-width: 1260px; }
.parent-calendar-header { margin: -18px 0 0; border-radius: 22px 22px 0 0; padding: 20px 22px 16px; color: var(--paper); background: var(--ink); }
.parent-calendar-header .eyebrow { margin-bottom: 5px; color: rgb(244 239 230 / 65%); letter-spacing: 0; text-transform: none; }
.parent-calendar-title-row { display: flex; gap: 18px; justify-content: space-between; align-items: center; }
.calendar-title-navigation { display: flex; gap: 4px; align-items: center; }
.calendar-title-navigation > button { display: grid; min-width: 32px; min-height: 32px; place-items: center; border: 0; border-radius: 999px; padding: 0 5px; color: var(--paper); background: transparent; font-size: 24px; }
.calendar-title-navigation > button:hover { background: rgb(255 255 255 / 9%); }
.calendar-title-navigation #current-week { padding: 0 6px; }
.calendar-title-navigation h1 { margin: 0; color: var(--paper); font-size: 24px; letter-spacing: -.035em; }
.calendar-view-switch { display: flex; border-radius: 999px; padding: 3px; background: rgb(0 0 0 / 20%); }
.calendar-view-switch button { min-height: 34px; border: 0; border-radius: 999px; padding: 0 16px; color: var(--paper); background: transparent; font-size: 12px; font-weight: 700; }
.calendar-view-switch button.active { color: var(--ink); background: var(--cream); }
.calendar-day-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin-top: 14px; }
.calendar-day-strip button { display: flex; min-width: 0; min-height: 62px; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-radius: 13px; padding: 5px 0 6px; color: var(--paper); background: transparent; }
.calendar-day-strip button.today:not(.selected) { background: rgb(255 255 255 / 10%); }
.calendar-day-strip button.selected { color: var(--ink); background: var(--cream); }
.calendar-day-strip span { font-size: 10.5px; opacity: .75; }
.calendar-day-strip strong { font-size: 16px; }
.calendar-day-strip em { display: flex; height: 5px; gap: 2px; align-items: center; }
.calendar-day-strip i { width: 5px; height: 5px; border-radius: 50%; background: var(--dot-color); }
.calendar-member-toolbar { overflow: hidden; padding: 10px 0 8px; }
.calendar-member-toolbar .child-filter-list { flex-wrap: nowrap; overflow-x: auto; padding: 0 2px; scrollbar-width: none; }
.calendar-member-toolbar .child-filter-list::-webkit-scrollbar { display: none; }
.calendar-member-toolbar .child-filter { width: auto; min-width: max-content; min-height: 34px; gap: 6px; border: 0; border-radius: 999px; padding: 3px 11px 3px 3px; color: #1c2b26; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--member-color); font-size: 12px; font-weight: 700; }
.calendar-member-toolbar .child-filter:not(.active) { opacity: .4; box-shadow: inset 0 0 0 1.5px #e3dccf; }
.calendar-member-toolbar .filter-avatar { width: 26px; height: 26px; }
.parent-calendar-board { overflow-x: auto; border-radius: 18px; background: var(--paper); }
.parent-calendar-board .week-calendar { display: block; width: 100%; overflow: visible; border: 0; border-radius: 0; background: transparent; }
.day-calendar-scroll { padding: 10px 8px 12px; }
.day-lane-header { display: grid; grid-template-columns: 42px repeat(var(--calendar-columns), minmax(0, 1fr)); gap: 3px; }
.day-lane-person { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 3px; padding-bottom: 6px; }
.day-lane-avatar { width: 32px; height: 32px; border: 1.5px solid var(--member-color); border-radius: 50%; }
.day-lane-person > span { max-width: 100%; overflow: hidden; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.day-lane-person small { min-height: 17px; border-radius: 999px; padding: 1px 6px; color: var(--ink-soft); font-size: 9.5px; }
.day-lane-person small.has-tasks { color: #1c2b26; background: #fbe9a8; }
.calendar-all-day { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 3px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 5px 0; }
.calendar-all-day > span { align-self: center; color: var(--ink-soft); font-size: 8px; line-height: 1.1; text-align: center; }
.calendar-all-day > div { display: flex; flex-wrap: wrap; gap: 4px; }
.compact-calendar-item { border-radius: 6px; padding: 4px 7px; color: var(--ink); background: #dfe9e4; font-size: 10px; font-weight: 700; text-decoration: none; }
.day-timeline { display: grid; grid-template-columns: 42px minmax(0, 1fr); margin-top: 5px; }
.day-hours { position: relative; height: calc(var(--calendar-hours, 13) * var(--calendar-hour-height, 36px)); }
.day-hours span { position: absolute; right: 6px; color: #8a958f; font-size: 9px; }
.day-lanes { position: relative; display: grid; grid-template-columns: repeat(var(--calendar-columns), minmax(0, 1fr)); height: calc(var(--calendar-hours, 13) * var(--calendar-hour-height, 36px)); gap: 3px; background-image: repeating-linear-gradient(#eee6d8 0 1px, transparent 1px var(--calendar-hour-height, 36px)); }
.day-lane { position: relative; min-width: 0; }
.timed-calendar-item { position: absolute; z-index: 2; top: var(--event-top); right: 0; left: 0; display: block; height: var(--event-height); overflow: hidden; border-left: 3px solid var(--member-color); border-radius: 6px; padding: 3px 4px; color: #1c2b26; background: var(--member-soft); text-decoration: none; }
.timed-calendar-item.family { z-index: 4; right: 0; left: 0; }
.timed-calendar-item.past { opacity: .5; }
.timed-calendar-item strong { display: -webkit-box; overflow: hidden; font-size: 10px; font-weight: 700; line-height: 1.15; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.timed-calendar-item small { display: block; margin-top: 2px; overflow: hidden; color: var(--ink-soft); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.reminder-reaction { display: block; width: fit-content; max-width: 100%; overflow: hidden; border-radius: 999px; padding: 1px 5px; font-size: 8px !important; font-weight: 700; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.reminder-reaction.acknowledged { color: #145d48 !important; background: #ccebdc; }
.reminder-reaction.snoozed { color: #775a18 !important; background: #f7e8b7; }
.calendar-now-line { position: absolute; z-index: 6; right: 0; left: -4px; height: 2px; background: var(--coral); box-shadow: 0 1px 0 rgb(255 255 255 / 72%); pointer-events: none; }
.calendar-now-line::before { content: ""; position: absolute; top: -3px; left: -2px; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.family-week-calendar { overflow-x: auto !important; padding: 8px; }
.family-week-table { width: 100%; }
.family-week-head, .family-week-row { display: grid; grid-template-columns: 74px repeat(7, minmax(0, 1fr)); gap: 3px; }
.family-week-head { padding-bottom: 4px; color: var(--ink-soft); font-size: 10px; text-align: center; }
.family-week-head span { padding: 3px; border-radius: 6px; font-weight: 700; }
.family-week-head span.selected { color: var(--ink); background: var(--mint); }
.family-week-row { align-items: stretch; border-top: 1px solid var(--line); padding: 3px 0; }
.family-week-person { display: flex; min-width: 0; gap: 5px; align-items: center; }
.family-week-avatar { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; }
.family-week-person span { overflow: hidden; font-size: 10.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.family-week-row > button { display: flex; min-height: 48px; min-width: 0; flex-direction: column; gap: 2px; border: 0; border-radius: 8px; padding: 3px 2px; background: #faf7f0; }
.family-week-row > button.selected { background: #eef4f1; }
.family-week-row > button > span { display: block; width: 100%; overflow: hidden; border-left: 2px solid var(--member-color); border-radius: 3px; padding: 1px 2px; color: #1c2b26; background: var(--member-soft); font-size: 8px; line-height: 1.2; text-align: left; white-space: nowrap; }
.family-week-hint { margin: 4px 2px 0; color: var(--ink-soft); font-size: 11px; }
.calendar-footer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 18px; }
.calendar-footer-actions a { display: grid; min-height: 48px; place-items: center; border-radius: 14px; padding: 0 12px; font-size: 13px; font-weight: 800; text-align: center; text-decoration: none; }
.calendar-primary-action { color: var(--paper); background: var(--ink); }
.calendar-templates-panel { scroll-margin-top: 20px; }

@media (max-width: 700px) {
  .parent-calendar-page { padding: 0 0 24px; }
  .parent-calendar-header { margin: 0; border-radius: 0; padding: 14px 12px 12px; }
  .parent-calendar-header .eyebrow { display: none; }
  .parent-calendar-title-row { gap: 8px; }
  .calendar-title-navigation { gap: 0; }
  .calendar-title-navigation > button { min-width: 26px; min-height: 30px; font-size: 21px; }
  .calendar-title-navigation #current-week { max-width: 185px; padding: 0 3px; }
  .calendar-title-navigation h1 { overflow: hidden; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
  .calendar-view-switch button { min-height: 32px; padding: 0 13px; }
  .calendar-day-strip { margin-top: 11px; }
  .calendar-day-strip button { min-height: 61px; }
  .calendar-member-toolbar { padding: 10px 12px 6px; }
  .parent-calendar-board { margin: 0 8px; }
  .calendar-footer-actions { margin: 10px 8px 16px; }
  .calendar-templates-panel { margin: 0 8px; }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--cream); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
[hidden] { display: none !important; }

:where(a, button, summary, [role="button"]) { touch-action: manipulation; }
:where(a, button, summary, [role="button"], [tabindex]):focus-visible {
  outline: 2px solid var(--mint-strong);
  outline-offset: 2px;
}

@media (hover: none) and (pointer: coarse) {
  :where(a, button:not(:disabled), summary, [role="button"]):active { opacity: .78; }
  .nav-item:active { opacity: 1; }
}

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 1.08fr) minmax(420px, .92fr); }
.login-story {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(32px, 6vw, 88px); color: #fdf9ef;
  background: radial-gradient(circle at 15% 90%, rgb(61 214 181 / 24%) 0 18%, transparent 18.5%), radial-gradient(circle at 86% 15%, rgb(255 200 87 / 22%) 0 14%, transparent 14.5%), linear-gradient(145deg, #14213d, #1d3158 68%, #254170);
}
.login-story::after { content: "★"; position: absolute; right: -4vw; bottom: -10vw; color: rgb(255 255 255 / 6%); font-size: clamp(260px, 34vw, 520px); line-height: 1; }
.brand { position: relative; z-index: 1; display: inline-flex; gap: 12px; align-items: center; color: var(--ink); font-size: 20px; text-decoration: none; letter-spacing: -.02em; }
.brand-light { color: #fffdf8; }
.brand-mark { color: var(--gold); font-size: 30px; }
.story-copy { position: relative; z-index: 1; max-width: 680px; }
.story-copy h1 { max-width: 640px; margin: 12px 0 22px; font-size: clamp(40px, 4.6vw, 68px); line-height: .98; letter-spacing: -.045em; }
.story-copy > p:last-child { max-width: 580px; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.6; color: rgb(255 253 248 / 78%); }
.privacy-note { position: relative; z-index: 1; margin: 0; color: rgb(255 253 248 / 62%); font-size: 14px; }
.eyebrow { margin: 0 0 8px; color: var(--mint); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow.ink { color: #568477; }
.muted { color: var(--ink-soft); line-height: 1.5; }
.login-panel { display: grid; place-items: center; padding: 40px; background: var(--paper); }
.auth-card { width: min(100%, 420px); }
.auth-card h2 { margin: 0; font-size: 40px; letter-spacing: -.04em; }
.auth-card label, .form-grid label, .compact-field { display: grid; gap: 8px; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.auth-card label { margin-top: 24px; }

input, select, textarea { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; color: var(--ink); background: #fff; outline: none; transition: border-color .2s, box-shadow .2s; }
textarea { resize: vertical; padding-top: 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--mint-strong); box-shadow: 0 0 0 4px rgb(127 190 160 / 16%); }
.button { min-height: 43px; border: 0; border-radius: 12px; padding: 0 18px; font-weight: 800; transition: transform .16s, filter .16s, opacity .16s; }
.button:hover { filter: brightness(.97); transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button-primary { color: #fff; background: var(--ink); }
.button-wide { width: 100%; margin-top: 28px; }
.button-quiet { border: 1px solid var(--line); color: var(--ink); background: transparent; }
.button-approve { color: var(--ink); background: var(--mint); }
.button-reject { color: var(--danger); background: #fae6df; }
.text-button { border: 0; padding: 0; color: var(--ink); background: transparent; font-weight: 800; text-decoration: none; }
.text-button.light { color: #fff; }
.auth-hint { margin: 20px 0 0; text-align: center; color: #78918c; font-size: 12px; }
.dev-login { margin-top: 22px; }
.dev-login h3 { margin: 0 0 4px; font-size: 20px; }
.dev-profile-list { display: grid; gap: 10px; margin-top: 18px; }
.dev-profile-button {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
  width: 100%; border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px;
  color: var(--ink); background: #fff; text-align: left; cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.dev-profile-button:hover { transform: translateY(-1px); border-color: #78a99b; box-shadow: 0 8px 22px rgb(23 59 53 / 9%); }
.dev-profile-button:disabled { cursor: wait; opacity: .66; }
.dev-profile-button > span:nth-child(2) { display: grid; gap: 3px; }
.dev-profile-button small { color: var(--ink-soft); }
.dev-profile-avatar { width: 52px; height: 52px; border-radius: 16px; }
.dev-profile-arrow { color: #568477; font-size: 22px; font-weight: 800; }
.dev-login-switch { display: block; margin: 18px auto 0; }
#login-form[hidden], #dev-login[hidden] { display: none; }
#login-form .button-primary { margin-top: 24px; }
.form-error { margin: 16px 0 0; color: var(--danger); font-size: 13px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 32px 24px; color: #fff; background: var(--ink); }
parent-navigation { display: block; }
.main-nav { display: grid; gap: 8px; margin-top: 56px; }
.nav-selection { display: none; }
.mobile-more { display: none; }
.nav-item { display: flex; gap: 13px; align-items: center; min-height: 46px; border: 0; border-radius: 12px; padding: 0 14px; color: rgb(255 255 255 / 65%); background: transparent; text-align: left; text-decoration: none; font-weight: 700; transition: color .16s ease, background-color .16s ease, opacity .16s ease; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgb(255 255 255 / 10%); }
.main-nav.nav-transitioning .nav-item:not(.nav-pending) { opacity: .78; }
.nav-item.nav-pending { color: #fff; background: rgb(255 255 255 / 16%); }
@media (prefers-reduced-motion: reduce) {
  .nav-item { transition: none; }
}
.sidebar-bottom { margin-top: auto; border-top: 1px solid rgb(255 255 255 / 15%); padding-top: 20px; }
.signed-user { margin: 0 0 8px; color: rgb(255 255 255 / 62%); font-size: 12px; overflow-wrap: anywhere; }
.workspace { min-width: 0; padding: 42px clamp(24px, 4vw, 64px) 64px; }
.topbar { display: flex; gap: 32px; justify-content: space-between; align-items: end; margin-bottom: 30px; }
.topbar h1 { margin: 0; font-size: clamp(34px, 4vw, 52px); letter-spacing: -.045em; }
.topbar-date { margin: 5px 0 0; color: var(--ink-soft); font-size: 14px; }
.topbar-tools { display: flex; gap: 14px; align-items: end; }
.notification-trigger { position: relative; display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 0; color: var(--ink); background: var(--paper); }
.notification-trigger svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-badge { position: absolute; top: -6px; right: -6px; display: grid; min-width: 21px; height: 21px; place-items: center; border: 2px solid var(--cream); border-radius: 999px; padding: 0 5px; color: #fff; background: var(--danger); font-size: 9px; font-weight: 900; }
.notification-backdrop { position: fixed; z-index: 100; inset: 0; border: 0; padding: 0; background: rgb(13 43 38 / 34%); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
.notification-backdrop.open { opacity: 1; pointer-events: auto; }
.notification-drawer { position: fixed; z-index: 110; top: 0; right: 0; bottom: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(460px, 100vw); min-height: 100vh; border-left: 1px solid var(--line); color: var(--ink); background-color: #fffdf8; box-shadow: -18px 0 60px rgb(23 59 53 / 20%); isolation: isolate; transform: translateX(104%); visibility: hidden; transition: transform .24s ease, visibility 0s linear .24s; }
.notification-drawer.open { transform: translateX(0); visibility: visible; transition-delay: 0s; }
.notification-drawer-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding: 24px; }
.notification-drawer-header h2 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.notification-close { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 0; color: var(--ink); background: #f7f6f1; font-size: 28px; font-weight: 300; line-height: 1; }
.notification-drawer-content { display: grid; align-content: start; gap: 24px; overflow-y: auto; padding: 22px 20px; }
.notification-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.notification-section-heading h3 { margin: 0; font-size: 19px; }
.notification-section-heading .eyebrow { margin-bottom: 3px; }
.notification-secondary { border-top: 1px solid var(--line); padding-top: 22px; }
.notification-list .attention-item { grid-template-columns: auto minmax(0, 1fr); }
.notification-list .attention-item .text-button { grid-column: 2; justify-self: start; }
.notification-drawer-footer { border-top: 1px solid var(--line); padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); }
.notification-drawer-footer .button { display: grid; width: 100%; place-items: center; text-decoration: none; }
.notification-center-open { overflow: hidden; }
.selectors { display: flex; gap: 12px; }
.family-chip { align-self: center; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; color: var(--ink-soft); background: var(--paper); font-size: 13px; font-weight: 800; }
.today-scope { display: grid; gap: 7px; justify-items: end; }
.today-scope > span { color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.today-scope-list { display: flex; gap: 7px; align-items: center; }
.today-scope-button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; padding: 3px; color: var(--ink); background: var(--paper); cursor: pointer; transition: border-color .16s, box-shadow .16s, transform .16s; }
.today-scope-button:hover { border-color: #7fa499; transform: translateY(-1px); }
.today-scope-button.active { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(23 59 53 / 11%); }
.today-scope-button.all { width: auto; border-radius: 999px; padding: 0 15px; font-size: 12px; font-weight: 800; }
.today-scope-button .family-avatar { width: 32px; height: 32px; }
.compact-field select { min-width: 170px; min-height: 42px; background: var(--paper); }
.notice { margin-bottom: 22px; border: 1px solid var(--mint-strong); border-radius: 12px; padding: 14px 16px; color: var(--ink); background: #e5f3eb; }
.notice.error { border-color: #dfa190; color: var(--danger); background: #fae6df; }
#global-message.action-toast {
  position: fixed; z-index: 260; bottom: 24px; left: calc(50% + 120px);
  display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center;
  width: max-content; max-width: min(420px, calc(100vw - 32px)); min-height: 52px;
  margin: 0; border: 1px solid rgb(255 255 255 / 18%); border-radius: 18px;
  padding: 8px 16px 8px 8px; color: #fffdf8; background: var(--ink);
  box-shadow: 0 14px 38px rgb(13 43 38 / 28%);
  opacity: 0; pointer-events: none; transform: translate(-50%, 12px) scale(.98);
  transition: opacity .18s ease, transform .22s cubic-bezier(.22, 1, .36, 1);
}
#global-message.action-toast.visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
#global-message.action-toast[hidden] { display: none; }
#global-message.action-toast .notice-icon {
  display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px;
  color: var(--ink); background: var(--mint); font-size: 19px; font-weight: 900; line-height: 1;
}
#global-message.action-toast .notice-copy { min-width: 0; font-size: 14px; font-weight: 850; line-height: 1.25; }
#global-message.action-toast[data-tone="reward"] .notice-icon { background: var(--gold); font-size: 21px; }
#global-message.action-toast[data-tone="pause"] .notice-icon { color: #fffdf8; background: var(--coral); }
#global-message.action-toast.error,
#global-message.action-toast[data-tone="error"] { border-color: rgb(255 255 255 / 20%); color: #fffdf8; background: #783d35; }
#global-message.action-toast[data-tone="error"] .notice-icon { color: #783d35; background: #ffd7cf; }

@media (max-width: 760px) {
  #global-message.action-toast { right: auto; bottom: calc(86px + env(safe-area-inset-bottom)); left: 50%; }
}
.attention-panel { margin-bottom: 18px; }
.attention-list { display: grid; gap: 9px; }
.attention-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 13px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; background: #f8f7f2; }
.attention-item.warning { border-color: #e9d7a7; background: #fcf8e9; }
.attention-item.info { border-color: #c9dce7; background: #f1f7fa; }
.attention-item.danger { border-color: #e4c9c1; background: #fff4f0; }
.attention-item.success { border-color: #c8e1d2; background: #f0f8f3; }
.attention-item > div { display: grid; gap: 4px; min-width: 0; }
.attention-item > div span { color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.attention-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: var(--ink); background: #fff; font-weight: 900; }
.attention-item.warning .attention-icon { color: #8a6d19; }
.attention-item.info .attention-icon { color: #376d89; }
.attention-item.danger .attention-icon { color: var(--danger); }
.attention-item.success .attention-icon { color: #347455; }
.attention-item > .attention-avatar { width: 36px; height: 36px; }
.panel-actions { display: flex; align-items: center; gap: 14px; }
.today-panel { margin-bottom: 18px; }
.today-panel .calendar-add-button { flex: 0 0 38px; }
.today-agenda { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.today-task-list { display: grid; }
.today-task-section-heading { margin: 10px 0 2px; color: var(--ink-soft); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.today-task-section-heading:first-child { margin-top: 0; }
.today-task-section-heading.review { color: #a65337; }
.today-review-list { margin-bottom: 4px; }
.today-group { min-width: 0; border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #f8f7f2; }
.today-group:first-child { background: #f1f7fa; }
.today-group:last-child { background: #f0f8f3; }
.today-group-heading { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 12px; }
.today-group-heading > div { display: grid; gap: 3px; }
.today-group-heading > .today-group-actions { display: flex; grid-template-columns: none; flex: 0 0 auto; gap: 7px; align-items: center; }
.today-group-heading h3 { margin: 0; font-size: 17px; font-weight: 700; }
.today-group-heading span:not(.status-pill) { color: var(--ink-soft); font-size: 11px; }
.today-list { display: grid; gap: 8px; }
.today-list .empty-state { min-height: 94px; background: rgb(255 255 255 / 44%); font-size: 12px; }
.today-item { display: grid; width: 100%; grid-template-columns: 74px minmax(0, 1fr) auto auto; gap: 11px; align-items: center; min-height: 62px; border: 1px solid rgb(23 59 53 / 10%); border-left: 3px solid #6799b8; border-radius: 12px; padding: 10px 11px; color: var(--ink); background: #fff; font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: border-color .16s, transform .16s, box-shadow .16s; }
.today-item.task { border-left-color: var(--mint-strong); }
.today-item:hover { border-color: var(--mint-strong); transform: translateY(-1px); box-shadow: 0 5px 14px rgb(23 59 53 / 7%); }
.today-item-time { color: var(--ink-soft); font-size: 11px; font-weight: 800; white-space: nowrap; }
.today-item-copy { display: grid; gap: 4px; min-width: 0; }
.today-item-copy strong { overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 650; white-space: nowrap; }
.today-item-copy small { overflow: hidden; text-overflow: ellipsis; color: var(--ink-soft); font-size: 10px; white-space: nowrap; }
.today-item-copy small:has(.star-amount) { display: flex; align-items: center; gap: 4px; }
.today-avatars { display: inline-flex; justify-content: flex-end; min-width: 24px; }
.today-avatars > .family-avatar { width: 28px; height: 28px; margin-left: -7px; border: 2px solid #fff; }
.today-avatars > span:first-child { margin-left: 0; }
.today-item-arrow { color: #78918c; font-size: 23px; font-weight: 300; }
.today-completed { margin-top: 9px; border-top: 1px solid rgb(23 59 53 / 10%); padding-top: 9px; }
.today-completed summary { color: var(--ink-soft); cursor: pointer; font-size: 11px; font-weight: 800; }
.today-completed .today-list { margin-top: 9px; opacity: .78; }
.notification-center { min-height: 520px; }
.browser-notification-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.browser-notification-copy { display: flex; align-items: center; gap: 16px; }
.browser-notification-copy h2 { margin: 2px 0 5px; font-size: 20px; }
.browser-notification-copy p:last-child { margin: 0; color: var(--ink-soft); }
.browser-notification-icon { display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: #376d89; background: #e7f2f8; font-size: 20px; }
.browser-notification-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.notification-toolbar { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; }
.filter-chip { border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; color: var(--ink-soft); background: var(--paper); cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; }
.filter-chip.active { border-color: var(--ink); color: #fff; background: var(--ink); }
.filter-chip span { margin-left: 5px; }
.notification-list { display: grid; gap: 11px; }
.notification-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 15px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 17px; background: var(--paper); }
.notification-card.warning { border-left: 4px solid #d2a936; }
.notification-card.info { border-left: 4px solid #5f97b5; }
.notification-card.critical { border-left: 4px solid var(--danger); }
.notification-card.resolved { border-left: 4px solid #6ca584; background: #f4f8f5; }
.notification-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #8a6d19; background: #fcf3d7; font-weight: 900; }
.notification-card.critical .notification-mark { color: var(--danger); background: #fae6df; }
.notification-card.info .notification-mark { color: #376d89; background: #e7f2f8; }
.notification-card.resolved .notification-mark { color: #347455; background: #e5f3eb; }
.notification-copy { display: grid; gap: 5px; min-width: 0; }
.notification-copy p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.notification-copy span { color: var(--ink-soft); font-size: 11px; opacity: .72; }
.notification-actions { display: flex; align-items: center; gap: 11px; }

.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.summary-card { display: flex; gap: 14px; align-items: center; min-height: 92px; border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px; background: var(--paper); box-shadow: 0 8px 28px rgb(23 59 53 / 5%); }
.accent-card { border-color: transparent; background: var(--mint); }
.summary-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px; color: var(--ink); background: rgb(255 255 255 / 52%); font-size: 22px; }
.summary-star-icon img { width: 48px; height: 48px; transform: rotate(-4deg); }
.summary-star-amount { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.04em; }
.summary-icon.coral { background: #fae1d9; }
.summary-icon.blue { background: #e1edf7; }
.summary-card p { margin: 0 0 4px; color: var(--ink-soft); font-size: 13px; }
.summary-card strong { font-size: 26px; letter-spacing: -.04em; }
.summary-card .summary-unit { color: var(--ink-soft); font-size: 13px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(310px, .8fr); gap: 18px; align-items: start; }
.compact-content-grid { grid-template-columns: 1fr; }
.compact-content-grid > .span-two, .compact-content-grid > .span-full { grid-column: 1; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 18px; padding: 24px; background: var(--paper); box-shadow: 0 8px 28px rgb(23 59 53 / 5%); }
.span-two { grid-column: 1; }
.span-full { grid-column: 1 / -1; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.panel-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.stack-list, .task-table, .policy-list { display: grid; gap: 10px; }
.empty-state { display: grid; place-items: center; min-height: 150px; border: 1px dashed var(--line); border-radius: 14px; color: #78918c; text-align: center; }
.approval-card { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; border-top: 1px solid var(--line); padding: 18px 0 8px; }
.approval-card:first-child { border-top: 0; padding-top: 0; }
.item-title { margin: 0 0 6px; font-size: 16px; }
.item-meta { margin: 0; color: #6d8781; font-size: 13px; }
.card-actions { display: flex; gap: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
.full-row { grid-column: 1 / -1; }
.check-row { display: flex !important; grid-template-columns: 20px 1fr; align-items: start; }
.check-row input { width: 18px; min-height: 18px; margin: 1px 0 0; accent-color: var(--ink); }
.input-suffix { position: relative; display: block; }
.input-suffix input { padding-right: 48px; }
.input-suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #68817c; font-size: 12px; }
.input-suffix .input-suffix-star { position: absolute; right: 11px; top: 50%; width: 28px; height: 28px; transform: translateY(-50%); }
.star-amount { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; vertical-align: middle; white-space: nowrap; }
.star-amount-image { display: block; width: 15px; height: 15px; flex: 0 0 auto; object-fit: contain; }
.star-amount-tiny .star-amount-image { width: 13px; height: 13px; }
.star-amount-medium .star-amount-image { width: 18px; height: 18px; }
.star-amount-large .star-amount-image { width: 22px; height: 22px; }
.star-amount-value { color: currentColor !important; font: inherit; font-weight: 800; }
.star-amount-sign { margin-right: -2px; color: currentColor !important; font: inherit; font-weight: 900; }
.star-unit-icon { width: 18px; height: 18px; }
.tasks-list-heading { margin-bottom: 4px; }
.tasks-count { display: grid; min-width: 30px; height: 30px; place-items: center; border-radius: 50%; color: var(--ink); background: var(--mint); font-size: 12px; font-weight: 900; }
.task-row { display: grid; grid-template-areas: "main side"; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; border-top: 1px solid var(--line); padding: 11px 0; }
.task-row:first-child { border-top: 0; }
.task-row-main { display: flex; grid-area: main; gap: 10px; align-items: center; min-width: 0; }
.task-row-preview { width: 100%; border: 0; padding: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.task-row-preview:hover .task-row-copy strong { color: var(--mint-strong); }
.task-row-main > .family-avatar { width: 34px; height: 34px; flex: 0 0 34px; }
.task-row-copy { display: grid; gap: 2px; min-width: 0; }
.task-row-copy strong { overflow: hidden; color: var(--ink); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.task-row-copy small { overflow: hidden; color: var(--ink-soft); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.task-row-side { display: flex; grid-area: side; gap: 8px; align-items: center; justify-content: flex-end; }
.task-row-reward { display: flex; align-items: center; color: var(--ink); font-size: 13px; }
.task-row-action { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 50%; padding: 0 0 2px; color: var(--ink); background: #e7eee9; font-size: 17px; font-weight: 800; line-height: 1; text-decoration: none; cursor: pointer; }
.task-row-action:hover { background: var(--mint); }
.task-row-action:disabled { cursor: default; opacity: .48; }
.task-row-complete { width: auto; min-width: 86px; padding: 0 12px; border-radius: 999px; font-size: 11px; }
.approval-reject-editor { display: grid; grid-column: 1 / -1; gap: 8px; width: 100%; border-top: 1px solid var(--line); padding-top: 10px; }
.approval-reject-editor[hidden] { display: none; }
.approval-reject-editor textarea { width: 100%; min-height: 64px; resize: vertical; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--ink); background: #fff; font: inherit; }
.approval-reject-actions { display: flex; gap: 8px; justify-content: flex-end; }
.task-archive { border-top: 1px solid var(--line); padding-top: 13px; }
.task-archive > summary { color: var(--ink-soft); cursor: pointer; font-size: 12px; font-weight: 800; }
.task-archive > .task-table { margin-top: 8px; }
.status-pill { justify-self: start; border-radius: 999px; padding: 6px 10px; color: var(--ink) !important; background: #e7eee9; font-size: 11px !important; font-weight: 800; white-space: nowrap; }
.status-pill.pending { background: #fae1d9; }
.status-pill.completed { background: #d9efe3; }
.policy-list { margin-top: 22px; }
.policy-card { border-top: 1px solid var(--line); padding-top: 14px; }
.policy-card p { margin: 0; }
.policy-card .item-meta { margin-top: 5px; }
.history-intro { margin: 4px 0 0; color: var(--ink-soft); font-size: 12px; }
.history-filter-bar { display: grid; gap: 9px; margin: -4px 0 13px; }
.history-filter-row { display: flex; min-width: 0; gap: 7px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.history-filter-row::-webkit-scrollbar { display: none; }
.history-filter-chip { display: inline-flex; min-width: max-content; min-height: 34px; flex: 0 0 auto; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; color: var(--ink-soft); background: #faf8f2; font-size: 11px; font-weight: 800; }
.history-filter-chip.active { border-color: var(--ink); color: var(--ink); background: var(--mint); box-shadow: 0 3px 10px rgb(23 59 53 / 8%); }
.history-child-filters .history-filter-chip { width: 40px; min-width: 40px; height: 40px; min-height: 40px; padding: 3px; }
.history-child-filters .history-all-children { width: auto; min-width: 56px; padding: 0 13px; }
.history-filter-avatar { width: 32px; height: 32px; border-radius: 50%; }
.subheading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.subheading h3 { margin: 0; font-size: 18px; }
.subheading span { color: #78918c; font-size: 12px; }
.history-list { display: grid; }
.history-ledger { border-top: 1px solid var(--line); }
.history-transaction { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; align-items: center; min-width: 0; border-bottom: 1px solid var(--line); padding: 11px 2px; }
.history-transaction:last-child { border-bottom: 0; }
.history-people { display: flex; align-items: center; min-width: 42px; }
.history-people .history-avatar, .history-system-avatar { width: 38px; height: 38px; flex: 0 0 38px; border: 2px solid var(--paper); border-radius: 50%; }
.history-people .history-avatar + .history-people-arrow, .history-system-avatar + .history-people-arrow { margin-right: -5px; margin-left: -7px; }
.history-people-arrow { z-index: 2; display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; border-radius: 50%; color: var(--ink-soft); background: var(--paper); font-size: 11px; font-weight: 900; }
.history-system-avatar { display: grid; place-items: center; color: var(--ink); background: #f5df91; font-size: 17px; }
.history-transaction-copy { display: grid; min-width: 0; gap: 2px; }
.history-transaction-copy > strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.history-transaction-copy > span { overflow: hidden; color: var(--ink-soft); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.history-transaction-copy > time { color: #81928e; font-size: 9.5px; }
.history-transaction-value { display: grid; min-width: 70px; justify-items: end; gap: 2px; }
.history-transaction-value > strong { color: var(--ink-soft); font-size: 14px; white-space: nowrap; }
.history-income .history-transaction-value > strong, .history-refund .history-transaction-value > strong { color: #347455; }
.history-spend .history-transaction-value > strong { color: var(--danger); }
.history-transaction-value > small { color: var(--ink-soft); font-size: 8.5px; white-space: nowrap; }
.calendar-card > small:has(.star-amount), .application-card small:has(.star-amount), .item-meta:has(.star-amount) { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.rules-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rules-table { display: grid; }
.rule-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); padding: 14px 0; }
.rule-row > div { display: grid; gap: 4px; min-width: 0; }
.rule-row > div span { overflow-wrap: anywhere; color: var(--ink-soft); font-size: 12px; }
.rule-inactive { opacity: .58; }
.protected-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin-top: 18px; }
.protected-app { display: flex; justify-content: space-between; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #f6faf7; }
.protected-app > div { display: grid; gap: 4px; min-width: 0; }
.protected-app > div span { overflow-wrap: anywhere; color: var(--ink-soft); font-size: 12px; }
.protected-pill { background: var(--mint); }
.rules-layout .panel > .button-wide { margin-top: 18px; text-align: center; }
.entity-section { margin-bottom: 18px; }
.compact-copy { margin: 0; font-size: 13px; }
.entity-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.entity-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 13px; align-items: center; min-height: 78px; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; color: var(--ink); background: #fff; text-align: left; }
.entity-card:hover { border-color: var(--mint-strong); }
.entity-card.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #f1f7f3; }
.entity-card:disabled { cursor: not-allowed; opacity: .48; }
.entity-card > span:nth-child(2) { display: grid; gap: 5px; min-width: 0; }
.entity-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entity-card small { color: var(--ink-soft); line-height: 1.35; }
.entity-avatar, .device-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--mint); font-size: 18px; font-weight: 900; }
.family-avatar.entity-avatar { border-radius: 13px; }
.device-icon { position: relative; flex: 0 0 auto; background: #e1edf7; }
.device-icon-phone::before { width: 15px; height: 24px; border: 2px solid #315d64; border-radius: 4px; content: ""; }
.device-icon-phone::after { position: absolute; bottom: 10px; width: 5px; height: 2px; border-radius: 99px; background: #315d64; content: ""; }
.device-icon-computer::before { width: 24px; height: 16px; border: 2px solid #315d64; border-radius: 3px; content: ""; }
.device-icon-computer::after { position: absolute; bottom: 9px; width: 18px; height: 2px; border-radius: 99px; background: #315d64; content: ""; }
.device-child-switcher { display: grid; gap: 9px; margin: 15px 0; }
.device-child-switcher > span { color: var(--ink-soft); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.compact-child-tabs .entity-card { min-height: 62px; padding: 9px 12px; }
.compact-child-tabs .entity-avatar { width: 38px; height: 38px; }
.device-list-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 4px 0 12px; }
.device-list-heading p { margin: 0; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #b8b8b8; }
.status-dot.active, .status-dot.online { background: #4b9a6d; box-shadow: 0 0 0 4px rgb(75 154 109 / 14%); }
.status-dot.recent { background: #d2a72c; box-shadow: 0 0 0 4px rgb(210 167 44 / 14%); }
.status-dot.offline, .status-dot.unknown { background: var(--danger); box-shadow: 0 0 0 4px rgb(180 82 62 / 12%); }
.device-card-shell { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.device-card-shell:hover { border-color: var(--mint-strong); }
.device-card-shell.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #f1f7f3; }
.device-card-shell.needs-attention { border-color: #e4c9c1; }
.device-card-select { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 13px; align-items: center; min-width: 0; min-height: 76px; border: 0; padding: 13px 10px 13px 14px; color: var(--ink); background: transparent; text-align: left; }
.device-card-select > span:nth-child(2) { display: grid; gap: 5px; min-width: 0; }
.device-card-select strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-card-select small { color: var(--ink-soft); line-height: 1.35; }
.device-card-health { overflow: hidden; color: var(--ink-soft); font-size: 10px; font-style: normal; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.device-card-health.warning { color: #945441; }
.device-card-health.success { color: #3e7c5a; }
.device-card-actions { display: grid; min-width: 104px; align-content: center; border-left: 1px solid var(--line); }
.device-card-settings, .device-card-disconnect { min-height: 34px; border: 0; padding: 7px 12px; background: transparent; cursor: pointer; font: inherit; font-size: 11px; font-weight: 850; }
.device-card-settings { color: var(--ink); }
.device-card-settings:hover { background: #edf5ef; }
.device-card-disconnect { color: var(--danger); }
.device-card-disconnect:hover { background: #fff3ef; }
.compact-empty { min-height: 78px; grid-column: 1 / -1; }
.health-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.health-summary-grid article { display: grid; gap: 5px; border-radius: 14px; padding: 15px; background: #f3f6f3; }
.health-summary-grid span { color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.health-summary-grid strong { font-size: 24px; }
.compact-device-summary { margin: 2px 0 13px; }
.device-action-panel { display: grid; gap: 20px; margin-top: 18px; border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: #f8f7f2; }
.device-action-panel[hidden] { display: none; }
.device-action-panel h3 { margin: 2px 0 0; font-size: 21px; }
.device-action-panel p { margin: 8px 0 0; }
.pairing-panel { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; background: #edf5ef; }
.pairing-code-box { display: grid; gap: 3px; justify-items: center; border: 1px dashed #88aa98; border-radius: 14px; padding: 14px 22px; background: #fff; }
.pairing-code-box[hidden] { display: none; }
.pairing-code-box strong { font-size: 26px; letter-spacing: .1em; }
.pairing-code-box span { color: var(--ink-soft); font-size: 11px; }
.device-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.device-detail-copy { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.connection-badge { border-radius: 999px; padding: 7px 11px; font-size: 11px; font-weight: 900; white-space: nowrap; }
.connection-badge.online { color: #276546; background: #d9efe3; }
.connection-badge.recent { color: #705f1e; background: #f6eabf; }
.connection-badge.offline, .connection-badge.unknown { color: #8a4938; background: #fae1d9; }
.device-metadata { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.device-metadata div { display: grid; gap: 4px; border-radius: 12px; padding: 12px; background: #fff; }
.device-metadata dt { color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.device-metadata dd { margin: 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 700; }
.inline-device-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 10px; align-items: end; max-width: 650px; }
.danger-zone { display: flex; justify-content: space-between; gap: 24px; align-items: center; border-top: 1px solid #e4c9c1; padding-top: 18px; }
.danger-zone > div { display: grid; gap: 4px; }
.danger-zone span { color: var(--ink-soft); font-size: 12px; }
.button-danger { color: #fff; background: var(--danger); }
.archived-devices { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.archived-devices summary { cursor: pointer; color: var(--ink-soft); font-size: 13px; font-weight: 800; }
.archive-list { display: grid; gap: 8px; margin-top: 12px; }
.archive-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; border-radius: 12px; padding: 10px 12px; background: #f8f7f2; opacity: .72; }
.archive-row > span:nth-child(2) { display: grid; gap: 3px; }
.archive-row small, .archive-row time { color: var(--ink-soft); font-size: 11px; }
.quota-usage { display: grid; gap: 12px; margin-top: 22px; }
.quota-track { height: 10px; overflow: hidden; border-radius: 999px; background: #e7eee9; }
.quota-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint-strong), var(--gold)); transition: width .25s; }
.quota-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; color: var(--ink-soft); font-size: 11px; }
.quota-metrics span { display: grid; gap: 3px; }
.quota-metrics strong { color: var(--ink); font-size: 13px; }
.application-heading { align-items: end; }
.application-search input { width: min(280px, 100%); min-height: 42px; padding-left: 16px; border-radius: 999px; }
.application-filters { display: flex; gap: 7px; margin: 16px 0 12px; padding: 2px 1px 5px; }
.application-filter { display: inline-flex; min-height: 38px; align-items: center; gap: 6px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; color: var(--ink-soft); background: #fff; cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; }
.application-filter > span:first-child { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: #fff; background: #8aa099; font-size: 12px; }
.application-filter b { min-width: 20px; border-radius: 999px; padding: 2px 6px; color: var(--ink); background: #edf1ee; font-size: 10px; text-align: center; }
.application-filter.active { border-color: var(--ink); color: #fff; background: var(--ink); box-shadow: 0 3px 9px rgb(23 59 53 / 14%); }
.application-filter.active b { background: #fff; }
.application-filter[data-filter="ALLOWED"] > span:first-child { background: #4c9374; }
.application-filter[data-filter="PAID"] > span:first-child { color: var(--ink); background: #f2c84b; }
.application-filter[data-filter="BLOCKED"] > span:first-child { background: #d86c59; }
.protected-details { margin-top: 16px; }
.protected-details summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink); font-size: 13px; font-weight: 900; }
.protected-details[open] summary { margin-bottom: 14px; }
.application-list { display: grid; gap: 8px; }
.unified-application-list { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.application-row { display: grid; grid-template-columns: 40px minmax(130px, 1fr) auto; gap: 11px; align-items: center; min-width: 0; padding: 9px 10px; border-bottom: 1px solid #e8ece9; border-left: 4px solid transparent; transition: opacity .15s, background .15s; }
.application-row:last-child { border-bottom: 0; }
.application-row:hover { background: #fafbf9; }
.application-row.current-allowed { border-left-color: #62a685; }
.application-row.current-paid { border-left-color: #e7b92d; }
.application-row.current-blocked { border-left-color: #db7662; }
.application-row.saving { opacity: .48; pointer-events: none; }
.application-icon { display: grid; width: 40px; height: 40px; place-items: center; flex: 0 0 auto; border-radius: 12px; color: #fff; background: linear-gradient(145deg, #6ba794, #3e7768); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 28%); font-size: 11px; font-weight: 900; letter-spacing: -.02em; }
.application-row-copy { display: grid; gap: 2px; min-width: 0; }
.application-row-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.application-row-copy small { display: flex; min-width: 0; align-items: center; color: var(--ink-soft); font-size: 10px; line-height: 1.3; }
.application-mode-chips { display: grid; grid-template-columns: repeat(4, minmax(68px, auto)); gap: 5px; }
.application-mode-chip { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; gap: 5px; border: 1px solid #dbe3df; border-radius: 10px; padding: 6px 9px; color: #687c76; background: #f8faf8; cursor: pointer; font: inherit; font-size: 10px; font-weight: 800; white-space: nowrap; }
.application-mode-chip > span:first-child { font-size: 14px; line-height: 1; }
.application-mode-chip:hover { border-color: #8ba99f; color: var(--ink); }
.application-mode-chip.active { border-color: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px rgb(23 59 53 / 8%); }
.application-mode-chip.mode-allowed.active { background: #dcefe4; }
.application-mode-chip.mode-paid.active { background: #f7e4a2; }
.application-mode-chip.mode-blocked.active { background: #f5d9d2; }
.application-mode-chip.mode-focus.active { background: #dfe4f6; }
.application-empty { margin: 0; border: 1px dashed var(--line); border-radius: 12px; padding: 18px 8px; color: #78918c; text-align: center; font-size: 12px; }
.advanced-settings summary { cursor: pointer; list-style: none; }
.advanced-settings summary::-webkit-details-marker { display: none; }
.advanced-settings summary > span { display: grid; gap: 5px; }
.advanced-settings summary strong { font-size: 20px; }
.advanced-settings summary small { color: var(--ink-soft); }
.advanced-settings summary::after { content: "+"; float: right; margin-top: -32px; font-size: 24px; }
.advanced-settings[open] summary::after { content: "−"; }
.advanced-form { max-width: 760px; margin-top: 24px; }
.policy-sheet-open { overflow: hidden; }
.policy-sheet { position: fixed; z-index: 210; inset: 0; }
.policy-sheet-backdrop { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: rgb(13 43 38 / 48%); opacity: 0; transition: opacity .22s ease; }
.policy-sheet-panel { position: absolute; right: 0; bottom: 0; left: 0; width: min(560px, calc(100% - 24px)); margin: 0 auto; overflow: hidden; border-radius: 26px 26px 0 0; color: var(--ink); background: var(--cream); box-shadow: 0 -18px 70px rgb(13 43 38 / 28%); transform: translateY(104%); transition: transform .24s cubic-bezier(.22, .8, .28, 1); }
.policy-sheet.open .policy-sheet-backdrop { opacity: 1; }
.policy-sheet.open .policy-sheet-panel { transform: translateY(0); }
.policy-sheet-handle { display: block; width: 42px; height: 5px; margin: 9px auto 4px; border-radius: 999px; background: #bdc8c3; }
.policy-sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 18px 13px; border-bottom: 1px solid var(--line); }
.policy-sheet-app { display: flex; min-width: 0; align-items: center; gap: 11px; }
.policy-sheet-app > div { min-width: 0; }
.policy-sheet-app h2 { overflow: hidden; margin: 2px 0 0; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; }
.policy-sheet-close { display: grid; width: 36px; height: 36px; place-items: center; flex: 0 0 auto; border: 0; border-radius: 50%; padding: 0 0 3px; color: var(--ink); background: #e5ebe7; cursor: pointer; font-size: 25px; }
.policy-sheet-form { display: grid; gap: 14px; padding: 16px 18px max(20px, env(safe-area-inset-bottom)); }
.policy-sheet-help { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.tariff-equation { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.tariff-equation label { display: grid; gap: 6px; color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.tariff-input { display: flex; min-height: 50px; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 13px; padding: 5px 11px; color: var(--ink); background: #fff; font-size: 14px; }
.tariff-input input { width: 100%; min-width: 0; min-height: 36px; border: 0; padding: 0; background: transparent; font-size: 22px; font-weight: 900; }
.tariff-input input:focus { outline: 0; }
.tariff-input:focus-within { border-color: var(--mint-strong); box-shadow: 0 0 0 3px rgb(95 183 154 / 16%); }
.tariff-input > span { flex: 0 0 auto; font-weight: 900; }
.tariff-equals { align-self: center; padding-top: 18px; color: #78918c; font-size: 22px; font-weight: 900; }
.tariff-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tariff-presets button { min-height: 34px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: #fff; cursor: pointer; font: inherit; font-size: 10px; font-weight: 800; }
.tariff-presets button.active { border-color: var(--ink); color: #fff; background: var(--ink); }
.policy-price-preview { display: flex; min-height: 45px; align-items: center; justify-content: center; gap: 5px; border-radius: 13px; color: var(--ink); background: #f7eac0; font-size: 13px; font-weight: 800; }
.policy-sheet-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.device-settings-panel { display: grid; min-height: 0; max-height: min(88dvh, 760px); grid-template-rows: auto minmax(0, 1fr); transform: translate3d(0, 104%, 0); }
.policy-sheet.open .device-settings-panel { transform: translate3d(0, 0, 0); visibility: visible; }
.device-settings-content { display: grid; min-height: 0; gap: 18px; overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px max(22px, env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.device-settings-content > .connection-badge { justify-self: start; }
.device-confirm-panel { width: min(480px, calc(100% - 24px)); }
.device-confirm-icon { display: grid; width: 42px; height: 42px; place-items: center; flex: 0 0 auto; border-radius: 15px; color: #8f3827; background: #f6d9d1; font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.device-confirm-copy { display: grid; gap: 9px; padding: 18px 18px max(20px, env(safe-area-inset-bottom)); }
.device-confirm-copy p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.45; }
.device-confirm-copy p:first-child { color: var(--ink); font-size: 16px; }
.device-confirm-copy strong { font-weight: 750; }
.family-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-list { display: grid; gap: 8px; }
.profile-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px; color: var(--ink); background: #fff; text-align: left; }
.profile-row > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.profile-row small { overflow: hidden; color: var(--ink-soft); text-overflow: ellipsis; white-space: nowrap; }
.profile-row > span:last-child { color: #568477; font-size: 11px; font-weight: 800; }
.family-avatar { display: grid; place-items: end center; width: 34px; height: 34px; overflow: hidden; flex: 0 0 auto; border-radius: 50%; background: var(--avatar-bg, #cfe8dc); }
.family-avatar img { display: block; width: 100%; height: 100%; object-fit: contain; }
.avatar-color-mint { --avatar-bg: #cfe8dc; --swatch: #cfe8dc; }
.avatar-color-sky { --avatar-bg: #d5e8f3; --swatch: #d5e8f3; }
.avatar-color-coral { --avatar-bg: #f4d2c8; --swatch: #f4d2c8; }
.avatar-color-gold { --avatar-bg: #f3e3b5; --swatch: #f3e3b5; }
.avatar-color-lilac { --avatar-bg: #dfd6ed; --swatch: #dfd6ed; }
.avatar-color-rose { --avatar-bg: #f1d5df; --swatch: #f1d5df; }
.avatar-color-sand { --avatar-bg: #eadfca; --swatch: #eadfca; }
.avatar-color-sage { --avatar-bg: #dce3cf; --swatch: #dce3cf; }
.profile-row > .family-avatar { width: 46px; height: 46px; border-radius: 15px; }
.family-avatar.large { width: 66px; height: 66px; border-radius: 20px; }
.inline-details { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.inline-details summary { cursor: pointer; color: #568477; font-weight: 800; }
.inline-details .form-grid { margin-top: 16px; }
.family-profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.family-profile-card { display: grid; justify-items: start; gap: 8px; border: 1px solid var(--line); border-radius: 16px; padding: 16px; color: var(--ink); background: #fff; text-align: left; }
.family-profile-card:hover, .family-profile-card.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #f1f7f3; }
.family-profile-card small { color: var(--ink-soft); }
.family-profile-card > span:last-child { color: #568477; font-size: 11px; font-weight: 800; }
.inline-create { max-width: 760px; margin-top: 20px; border-top: 1px solid var(--line); padding-top: 20px; }
.field-label { display: block; margin-bottom: 8px; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.avatar-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-option input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-option > .family-avatar { width: 58px; height: 58px; border: 2px solid transparent; border-radius: 17px; cursor: pointer; }
.avatar-option input:checked + .family-avatar { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(23 59 53 / 12%); }
.avatar-color-picker { display: flex; flex-wrap: wrap; gap: 9px; }
.avatar-color-option input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-color-option > span { display: block; width: 34px; height: 34px; border: 3px solid #fff; border-radius: 50%; background: var(--swatch); cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.avatar-color-option input:checked + span { box-shadow: 0 0 0 2px var(--ink); }
.profile-editor { max-width: 760px; }
.weekly-quota { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 24px; }
.weekly-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; }
.weekly-heading h3 { margin: 0; font-size: 20px; }
.weekly-heading p { margin: 6px 0 0; }
.quota-presets { display: flex; gap: 8px; align-items: end; }
.quota-presets label { display: grid; gap: 5px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.quota-presets input { width: 100px; min-height: 40px; }
.weekday-grid { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); gap: 8px; margin-top: 20px; }
.weekday-card { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #f8f7f2; }
.weekday-card > span:first-child { font-size: 16px; font-weight: 900; }
.quota-toggle { display: flex; gap: 6px; align-items: center; color: var(--ink-soft); font-size: 11px; }
.quota-toggle input { width: 16px; min-height: 16px; accent-color: var(--ink); }
.weekday-card input[type="number"] { min-height: 40px; padding-left: 9px; }
.quota-summary { display: flex; gap: 20px; align-items: center; margin-top: 18px; border-radius: 14px; padding: 14px; background: #edf5ef; }
.quota-summary span { display: grid; gap: 3px; color: var(--ink-soft); font-size: 11px; }
.quota-summary strong { color: var(--ink); font-size: 13px; }
.quota-summary .button { margin-left: auto; }
.star-economy { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 24px; }
.star-presets { flex-wrap: wrap; justify-content: flex-end; }
.star-day-card { background: #fbf7e9; }
.star-policy-options { display: grid; grid-template-columns: minmax(150px, .7fr) repeat(2, minmax(230px, 1fr)); gap: 12px; margin-top: 16px; }
.star-policy-options > label { display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 14px; padding: 12px; color: var(--ink-soft); font-size: 12px; font-weight: 800; background: #fff; }
.star-policy-options input[type="time"] { min-height: 42px; }
.star-policy-options .policy-toggle { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.policy-toggle > input[type="checkbox"] { width: 17px; min-height: 17px; accent-color: var(--ink); }
.policy-toggle .input-suffix { width: 105px; }
.star-policy-summary { background: #fbf3d7; }

.schedule-workspace { overflow: visible; }
.schedule-topbar { align-items: center; }
.week-navigation { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.week-navigation .button { min-width: 44px; padding: 0 13px; }
.schedule-toolbar { display: grid; grid-template-columns: minmax(180px, auto) minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 12px; padding: 14px 18px; }
.schedule-toolbar h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.schedule-toolbar .eyebrow { margin-bottom: 3px; font-size: 9px; }
.child-filter-list { display: flex; flex-wrap: wrap; gap: 8px; }
.child-filter { display: inline-flex; width: 38px; min-height: 38px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; padding: 3px; color: var(--ink-soft); background: #fff; }
.filter-avatar { width: 30px; height: 30px; }
.child-filter.active { border-color: var(--ink); color: #fff; background: var(--ink); }
.child-filter:not(.active) { opacity: .55; }
.child-filter.child-0::before { background: #df896f; }
.child-filter.child-1::before { background: #6799b8; }
.child-filter.child-2::before { background: #8b79b6; }
.child-filter.child-3::before { background: #c49a38; }
.schedule-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.schedule-summary article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 18px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 17px 19px; background: var(--paper); }
.schedule-summary article:nth-child(2) { background: #f1f7fa; }
.schedule-summary article:nth-child(3) { background: #fbf7e9; }
.schedule-summary span { color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.schedule-summary strong { grid-row: 1 / 3; grid-column: 2; font-size: 30px; }
.schedule-summary small { color: #78918c; }
.schedule-board-panel { overflow: hidden; margin-bottom: 18px; }
.calendar-add-button { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; background: var(--ink); font-size: 27px; font-weight: 300; line-height: 1; text-decoration: none; box-shadow: 0 6px 16px rgb(23 59 53 / 18%); }
.quick-create-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.quick-create-link { display: inline-flex; min-height: 34px; gap: 5px; align-items: center; border: 1px solid #b7d3c4; border-radius: 999px; padding: 0 12px; color: var(--ink); background: #edf6f0; font-size: 11px; font-weight: 800; line-height: 1; text-decoration: none; white-space: nowrap; }
.quick-create-link::before { content: "+"; font-size: 17px; font-weight: 500; line-height: 1; }
.quick-create-link.event { border-color: #c7d9e3; background: #edf5f9; }
.quick-create-link:hover { border-color: var(--ink); background: #fff; }
.week-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: #f7f4ec; }
.calendar-day { min-width: 0; border-right: 1px solid var(--line); background: rgb(255 255 255 / 42%); }
.calendar-day:last-child { border-right: 0; }
.calendar-day.today { background: #edf5ef; }
.calendar-day > header { display: flex; justify-content: space-between; align-items: center; min-height: 54px; border-bottom: 1px solid var(--line); padding: 10px 12px; }
.calendar-day > header span { color: var(--ink-soft); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.calendar-day > header strong { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: 17px; }
.calendar-day.today > header strong { color: #fff; background: var(--ink); }
.calendar-day-items { display: grid; align-content: start; gap: 6px; min-height: 350px; padding: 6px; }
.calendar-card { display: grid; gap: 3px; border: 1px solid rgb(23 59 53 / 10%); border-left: 3px solid #91a29e; border-radius: 9px; padding: 7px; background: #fff; box-shadow: 0 3px 9px rgb(23 59 53 / 4%); }
.calendar-card.child-0 { border-left-color: #df896f; }
.calendar-card.child-1 { border-left-color: #6799b8; }
.calendar-card.child-2 { border-left-color: #8b79b6; }
.calendar-card.child-3 { border-left-color: #c49a38; }
.calendar-card.family-event { border-left-color: var(--mint-strong); }
.calendar-card.quiet { background: #f0f6f9; }
.calendar-card.focus { background: #fbf4dd; }
.calendar-card.task-event { background: #f2f8f3; }
.calendar-card-top { display: flex; justify-content: space-between; align-items: center; gap: 5px; color: var(--ink-soft); font-size: 9px; font-weight: 500; }
.calendar-participants { display: inline-flex; justify-content: flex-end; min-width: 16px; }
.calendar-participants > .family-avatar { width: 20px; height: 20px; margin-left: -5px; border: 1px solid rgb(255 255 255 / 85%); }
.calendar-participants > span:first-child { margin-left: 0; }
.calendar-card-title { margin: 0; overflow-wrap: anywhere; font-size: 11px; font-weight: 500; line-height: 1.25; }
.calendar-card > small { color: var(--ink-soft); font-size: 9px; line-height: 1.25; }
.calendar-card-actions { display: flex; gap: 4px; margin-top: 1px; }
.calendar-card-action { display: grid; place-items: center; width: 21px; height: 19px; border: 1px solid rgb(23 59 53 / 10%); border-radius: 6px; padding: 0; color: #658078; background: rgb(255 255 255 / 58%); font-size: 12px; font-weight: 400; line-height: 1; text-decoration: none; }
.calendar-card-action:hover { border-color: #7fa499; color: var(--ink); background: #fff; }
.calendar-empty { margin: 18px 0; color: #9aaaa6; font-size: 11px; text-align: center; }
.schedule-lower-grid { grid-template-columns: minmax(360px, .85fr) minmax(0, 1.4fr); }
.schedule-lower-grid > .panel:last-child { grid-column: 1 / -1; }
#event-editor:not([hidden]) + .panel { grid-column: auto; }
.weekday-selector { min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 13px; padding: 12px; }
.weekday-selector legend { padding: 0 5px; color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.weekday-selector > div { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.weekday-choice input { position: absolute; opacity: 0; pointer-events: none; }
.weekday-choice span { display: grid; place-items: center; min-height: 36px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-soft); background: #fff; cursor: pointer; font-size: 11px; font-weight: 900; }
.weekday-choice input:checked + span { border-color: var(--ink); color: #fff; background: var(--ink); }
.edit-scope small { display: block; margin-top: 5px; color: var(--ink-soft); font-size: 10px; font-weight: 500; }
.schedule-help { margin: 20px 0 0; border-radius: 12px; padding: 13px; color: var(--ink-soft); background: #f3f6f3; font-size: 11px; line-height: 1.5; }
.calendar-template-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; min-height: 48px; margin: -8px; border-radius: 15px; padding: 8px 10px; list-style: none; cursor: pointer; }
.calendar-template-summary::-webkit-details-marker { display: none; }
.calendar-template-summary > span:first-child { display: grid; gap: 2px; min-width: 0; }
.calendar-template-summary strong { font-size: 16px; font-weight: 800; }
.calendar-template-summary small { color: var(--ink-soft); font-size: 10px; font-weight: 550; }
.calendar-template-summary > i { color: #789087; font-size: 20px; font-style: normal; transition: transform .18s ease; }
.calendar-templates-panel[open] .calendar-template-summary > i { transform: rotate(180deg); }
.calendar-template-content { padding-top: 17px; }
.template-filter-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 22px; margin: 0 0 13px; border-top: 1px solid #e6e8e1; border-bottom: 1px solid #e6e8e1; padding: 11px 0; }
.template-filter-bar > div { min-width: 0; }
.template-filter-label { display: block; margin: 0 0 6px; color: #788a84; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.template-filter-list { display: flex; gap: 7px; align-items: center; overflow-x: auto; padding: 1px; scrollbar-width: none; }
.template-filter-list::-webkit-scrollbar { display: none; }
.template-filter-chip { display: inline-flex; flex: 0 0 auto; gap: 6px; align-items: center; min-height: 32px; border: 1px solid #d9e1dc; border-radius: 999px; padding: 5px 10px; color: #5e746d; background: #f7f6f0; font: inherit; font-size: 11px; font-weight: 750; line-height: 1; cursor: pointer; transition: border-color .16s ease, color .16s ease, background .16s ease, transform .16s ease; }
.template-filter-chip:hover { border-color: #9fb7ad; color: var(--ink); }
.template-filter-chip:active { transform: scale(.97); }
.template-filter-chip.active { border-color: var(--ink); color: #fff; background: var(--ink); }
.template-filter-chip.person { padding: 2px 9px 2px 2px; }
.template-filter-avatar { width: 27px; height: 27px; border: 1px solid rgb(255 255 255 / 70%); border-radius: 50%; background: #e7efea; }
.template-filter-chip:not(.active) .template-filter-avatar { border-color: #dce4df; }
.template-filter-chip .active-dot { width: 7px; height: 7px; border-radius: 50%; background: #55a37d; }
.template-filter-chip.active .active-dot { background: #bce8d2; }
.template-filter-empty { grid-column: 1 / -1; }
.schedule-rule-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; }
.schedule-rule { display: grid; grid-template-rows: auto auto 1fr auto; gap: 8px; min-width: 0; border: 1px solid #dce5df; border-radius: 16px; padding: 12px; background: #fbfaf5; box-shadow: 0 7px 20px rgb(22 62 53 / 5%); transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease; }
.schedule-rule:hover { box-shadow: 0 10px 28px rgb(22 62 53 / 9%); transform: translateY(-1px); }
.schedule-rule.inactive { border-style: dashed; background: #f2f3ef; box-shadow: none; }
.schedule-rule.saving { opacity: .56; pointer-events: none; }
.schedule-rule-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.schedule-rule-category, .schedule-rule-status { border-radius: 999px; padding: 5px 8px; font-size: 10px; font-weight: 800; line-height: 1; }
.schedule-rule-category { color: #477a6d; background: #e4f1eb; }
.schedule-rule-category.quiet { color: #376d89; background: #e7f2f8; }
.schedule-rule-category.focus { color: #806619; background: #f8ebbd; }
.schedule-rule-status { color: #506861; background: #edf1ef; }
.schedule-rule-status.active::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #4e9c77; vertical-align: 1px; }
.schedule-rule-status.paused { color: #8a7061; background: #eee8e2; }
.schedule-rule-body { min-width: 0; }
.schedule-rule-body h3 { margin: 0 0 7px; overflow-wrap: anywhere; font-size: 16px; font-weight: 650; line-height: 1.2; }
.schedule-rule-summary { display: flex; gap: 8px 14px; align-items: center; justify-content: space-between; min-width: 0; }
.schedule-rule-timing { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; color: var(--ink-soft); font-size: 12px; }
.schedule-rule-timing strong { color: var(--ink); font-weight: 700; }
.schedule-rule-description { display: -webkit-box; margin: 8px 0 0; overflow: hidden; color: var(--ink-soft); font-size: 11px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.schedule-rule-participants { display: flex; flex: 0 1 auto; gap: 6px; align-items: center; min-width: 0; color: var(--ink-soft); font-size: 10px; }
.schedule-rule-participants > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-rule-avatars { display: inline-flex; flex: 0 0 auto; align-items: center; }
.schedule-rule-avatars .family-avatar { width: 24px; height: 24px; margin-left: -12px; border: 2px solid #fbfaf5; border-radius: 50%; background: #eef3ef; }
.schedule-rule-avatars .family-avatar:first-child { margin-left: 0; }
.schedule-rule.inactive .schedule-rule-avatars .family-avatar { border-color: #f2f3ef; filter: grayscale(.38); }
.schedule-rule-details { display: flex; flex-wrap: wrap; gap: 5px 12px; align-content: start; color: #73857f; font-size: 10px; }
.schedule-rule-details span::before { content: "•"; margin-right: 5px; color: #aab7b2; }
.schedule-rule-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; border-top: 1px solid #e3e9e5; padding-top: 8px; }
.schedule-rule-action { display: flex; gap: 5px; align-items: center; justify-content: center; min-width: 0; min-height: 34px; border: 0; border-radius: 10px; padding: 6px 5px; color: #436f63; background: #edf4f0; font: inherit; font-size: 10px; font-weight: 750; line-height: 1.1; text-align: center; text-decoration: none; cursor: pointer; }
.schedule-rule-action:hover { color: var(--ink); background: #dfece6; }
.schedule-rule-action[aria-disabled="true"] { pointer-events: none; }
.schedule-rule-action.remove { color: #96574d; background: #f8ece8; }
.schedule-rule-action.remove:hover { background: #f3ddd7; }
.schedule-rule-action-icon { font-size: 15px; font-weight: 500; line-height: 1; }
.rule-delete-sheet { position: fixed; z-index: 180; inset: 0; }
.rule-delete-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgb(13 43 38 / 38%); opacity: 0; transition: opacity .2s ease; }
.rule-delete-panel { position: absolute; right: 0; bottom: 0; left: 0; width: min(520px, calc(100% - 18px)); margin: 0 auto; border-radius: 25px 25px 0 0; padding: 10px 22px max(22px, env(safe-area-inset-bottom)); color: var(--ink); background: var(--paper); box-shadow: 0 -18px 60px rgb(13 43 38 / 25%); text-align: center; transform: translateY(105%); transition: transform .22s cubic-bezier(.22, .8, .28, 1); }
.rule-delete-sheet.open .rule-delete-backdrop { opacity: 1; }
.rule-delete-sheet.open .rule-delete-panel { transform: translateY(0); }
.rule-delete-handle { display: block; width: 42px; height: 4px; margin: 0 auto 17px; border-radius: 999px; background: #c9d3ce; }
.rule-delete-icon { display: grid; width: 45px; height: 45px; margin: 0 auto 10px; place-items: center; border-radius: 50%; color: #9a4f45; background: #f8e4df; font-size: 27px; font-weight: 400; }
.rule-delete-panel h2 { margin: 0; font-size: 21px; }
.rule-delete-panel p { max-width: 390px; margin: 8px auto 18px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.rule-delete-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.rule-delete-actions button { min-height: 45px; border-radius: 13px; font-weight: 800; }
.danger-button { border: 0; color: #fff; background: #a9574c; }
.danger-button:disabled { opacity: .55; }
.editor-workspace { max-width: 1180px; }
.editor-topbar { align-items: center; }
.back-link { display: inline-block; margin-bottom: 22px; color: #568477; font-size: 13px; font-weight: 800; text-decoration: none; }
.standalone-editor-panel { max-width: 820px; }
.simple-event-editor { max-width: 760px; }
.event-form-grid { grid-template-columns: minmax(180px, 1.25fr) repeat(2, minmax(140px, .75fr)); }
.event-form-grid > label:first-child { margin-bottom: 2px; }
.event-options-toggle { display: flex; justify-content: space-between; align-items: center; min-height: 64px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; color: var(--ink); background: #f8f7f2; text-align: left; }
.event-options-toggle > span:first-child { display: grid; gap: 4px; }
.event-options-toggle small { color: var(--ink-soft); font-size: 11px; font-weight: 500; }
.event-options-chevron { color: var(--ink-soft); font-size: 23px; transition: transform .18s; }
.event-options-toggle.open .event-options-chevron { transform: rotate(180deg); }
.event-options { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px; border-top: 1px solid var(--line); padding-top: 18px; }
.event-options[hidden], .recurrence-options[hidden] { display: none; }
.optional-label { margin-left: 4px; color: #8a9c98; font-size: 10px; font-weight: 500; }
.repeat-toggle { min-height: 54px; border-radius: 13px; padding: 12px 14px; background: #f3f6f3; }
.repeat-toggle > span { display: grid; gap: 3px; }
.repeat-toggle small { color: var(--ink-soft); font-size: 10px; font-weight: 500; }
#active-field[hidden] { display: none !important; }
.recurrence-options { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 12px; align-items: end; border-left: 3px solid var(--mint-strong); border-radius: 12px; padding: 14px; background: #f2f8f4; }
.recurrence-options .weekday-selector { border: 0; padding: 0; }
.participant-field { margin: 0; border: 0; padding: 0; }
.participant-field legend { color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.participant-field > p { margin: 6px 0 12px; color: var(--ink-soft); font-size: 11px; }
.compact-participant-field { transition: color .16s; }
.compact-participant-field legend span { color: var(--danger); }
.compact-participant-field.invalid legend { color: var(--danger); }
.participant-picker.compact-participant-picker { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.compact-participant-picker .participant-choice { display: inline-grid; grid-template-columns: auto; width: 46px; min-height: 46px; gap: 0; border-radius: 50%; padding: 3px; }
.compact-participant-picker .participant-avatar { width: 38px; height: 38px; }
.compact-participant-picker .participant-choice > span:nth-child(2) { display: none; }
.compact-participant-picker .participant-choice small, .compact-participant-picker .participant-check { display: none; }
.compact-participant-field.invalid .compact-participant-picker { border-radius: 12px; box-shadow: 0 0 0 3px rgb(172 77 55 / 12%); }
.participant-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.participant-choice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 9px 11px; color: var(--ink); background: #fff; text-align: left; }
.participant-choice.active { border-color: var(--mint-strong); background: #edf6f0; box-shadow: inset 0 0 0 1px var(--mint-strong); }
.participant-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; }
.participant-avatar > .family-avatar { width: 100%; height: 100%; }
.participant-choice > span:nth-child(2) { display: grid; gap: 2px; }
.participant-choice small { color: var(--ink-soft); font-size: 10px; }
.participant-check { color: transparent; font-weight: 900; }
.participant-choice.active .participant-check { color: #568477; }
.editor-actions { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; }
.editor-actions .button { display: inline-grid; place-items: center; min-width: 150px; text-decoration: none; }
.field-note { margin: 0; border-radius: 12px; padding: 12px 14px; color: var(--ink-soft); background: #f3f6f3; font-size: 11px; line-height: 1.5; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; margin: -1px !important; padding: 0 !important; border: 0 !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
.date-time-picker { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 46px; width: 100%; color: var(--ink); font-weight: 500; }
.date-time-picker .picker-native-input { display: none; }
.date-time-picker .picker-display-input { grid-row: 1; grid-column: 1 / -1; padding-right: 50px; font-variant-numeric: tabular-nums; }
.date-time-picker .picker-trigger { position: relative; z-index: 1; grid-row: 1; grid-column: 2; width: 46px; min-height: 48px; border: 0; border-left: 1px solid var(--line); border-radius: 0 12px 12px 0; color: #568477; background: transparent; cursor: pointer; font-size: 22px; line-height: 1; }
.date-time-picker.open .picker-display-input, .date-time-picker:focus-within .picker-display-input { border-color: #7fa499; box-shadow: 0 0 0 3px rgb(127 164 153 / 14%); }
.date-time-picker.disabled, .date-time-picker.readonly { opacity: .62; }
.picker-popover { position: absolute; z-index: 30; top: calc(100% + 7px); left: 0; width: min(350px, calc(100vw - 40px)); border: 1px solid var(--line); border-radius: 17px; padding: 14px; color: var(--ink); background: #fff; box-shadow: 0 18px 46px rgb(23 59 53 / 20%); font-size: 13px; font-weight: 500; }
.picker-heading, .picker-time-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.picker-heading { display: grid; grid-template-columns: 36px 1fr 36px; }
.picker-month-title { text-align: center; text-transform: capitalize; }
.picker-nav { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #f8f7f2; cursor: pointer; font-size: 24px; font-weight: 400; }
.picker-time-heading span { color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.picker-time-heading strong { font-size: 25px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.picker-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.picker-preset { min-height: 31px; border: 1px solid #dbe7e0; border-radius: 999px; padding: 0 10px; color: #426f64; background: #edf6f0; cursor: pointer; font-size: 10px; font-weight: 800; }
.picker-weekdays, .picker-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.picker-weekdays { margin-bottom: 3px; color: #83948f; text-align: center; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.picker-weekdays abbr { border: 0; text-decoration: none; }
.picker-day { display: grid; place-items: center; aspect-ratio: 1; min-width: 0; border: 1px solid transparent; border-radius: 9px; padding: 0; color: var(--ink); background: transparent; cursor: pointer; font-size: 12px; font-variant-numeric: tabular-nums; }
.picker-day:hover, .picker-day:focus-visible { border-color: #7fa499; background: #edf6f0; outline: none; }
.picker-day.outside { color: #aab5b2; }
.picker-day.today { border-color: #9dbdb4; font-weight: 900; }
.picker-day.selected { border-color: var(--ink); color: #fff; background: var(--ink); font-weight: 900; }
.picker-section-label { display: block; margin: 11px 0 6px; color: var(--ink-soft); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.picker-hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.picker-minutes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.picker-time-option { min-height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0; color: var(--ink); background: #fff; cursor: pointer; font-size: 11px; font-variant-numeric: tabular-nums; }
.picker-time-option:hover, .picker-time-option:focus-visible { border-color: #7fa499; background: #edf6f0; outline: none; }
.picker-time-option.selected { border-color: var(--ink); color: #fff; background: var(--ink); }
.picker-note { display: block; margin-top: 11px; color: #8b9b97; font-size: 9px; font-weight: 500; text-align: center; }

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-story { min-height: 42vh; padding: 32px; }
  .story-copy { margin: 64px 0; }
  .story-copy h1 { font-size: clamp(40px, 9vw, 68px); }
  .login-panel { padding: 52px 24px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; gap: 18px; padding: 18px 24px; }
  .sidebar parent-navigation { margin-left: auto; }
  .main-nav { display: flex; margin: 0 0 0 auto; }
  .sidebar-bottom { display: flex; gap: 12px; align-items: center; margin: 0; border: 0; padding: 0; }
  .signed-user { display: none; }
  .content-grid { grid-template-columns: 1fr; }
  .today-agenda { grid-template-columns: 1fr; }
  .span-two, .span-full { grid-column: auto; }
  .history-columns { grid-template-columns: 1fr; }
  .rules-layout { grid-template-columns: 1fr; }
  .family-layout { grid-template-columns: 1fr; }
  .application-board { grid-template-columns: 1fr; }
  .weekday-grid { grid-template-columns: repeat(4, 1fr); }
  .pairing-panel { grid-template-columns: 1fr; }
  .schedule-toolbar { grid-template-columns: 1fr auto; }
  .child-filter-list { grid-row: 2; grid-column: 1 / -1; }
  .schedule-lower-grid { grid-template-columns: 1fr; }
  #event-editor:not([hidden]) + .panel { grid-column: 1; }
}

@media (max-width: 700px) {
  .sidebar { flex-wrap: wrap; }
  .sidebar .brand { width: 100%; }
  .sidebar parent-navigation { order: 3; width: 100%; margin-left: 0; }
  .main-nav { width: 100%; justify-content: space-between; }
  .nav-item { flex: 1; justify-content: center; padding: 0 8px; }
  .sidebar-bottom { margin-left: auto; position: absolute; right: 24px; top: 26px; }
  .workspace { padding: 28px 16px 48px; }
  .topbar { align-items: stretch; flex-direction: column; }
  .today-scope { justify-items: start; }
  .today-scope-list { max-width: 100%; overflow-x: auto; padding: 3px; }
  .selectors { display: grid; grid-template-columns: 1fr 1fr; }
  .compact-field select { min-width: 0; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-card { min-height: 96px; }
  .panel { padding: 20px; }
  .approval-card { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; }
  .attention-item { grid-template-columns: auto minmax(0, 1fr); }
  .attention-item .text-button { grid-column: 2; justify-self: start; }
  .today-panel .panel-heading { align-items: flex-start; }
  .today-panel .panel-actions { gap: 9px; }
  .today-panel .panel-actions .text-button { display: none; }
  .today-group-heading { align-items: flex-start; }
  .today-group-heading > .today-group-actions { align-items: flex-end; flex-direction: column-reverse; }
  .today-item { grid-template-columns: 66px minmax(0, 1fr) auto; }
  .today-avatars { grid-column: 2; justify-content: flex-start; }
  .today-item-arrow { grid-row: 1 / 3; grid-column: 3; }
  .notification-card { grid-template-columns: auto minmax(0, 1fr); }
  .notification-actions { grid-column: 2; align-items: flex-start; flex-direction: column; }
  .card-actions { width: 100%; }
  .card-actions .button { flex: 1; }
  .task-row { grid-template-columns: 1fr auto; }
  .task-row > span:nth-child(2) { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .full-row { grid-column: auto; }
  .history-row { align-items: start; }
  .history-filter-bar { margin-top: -2px; }
  .history-transaction { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; padding: 10px 0; }
  .history-people .history-avatar, .history-system-avatar { width: 34px; height: 34px; flex-basis: 34px; }
  .history-people-arrow { width: 18px; height: 18px; flex-basis: 18px; }
  .history-transaction-value { min-width: 62px; }
  .rule-row { grid-template-columns: 1fr 1fr; }
  .protected-grid { grid-template-columns: 1fr; }
  .quota-metrics { grid-template-columns: 1fr; }
  .weekly-heading, .quota-summary { align-items: stretch; flex-direction: column; }
  .star-policy-options { grid-template-columns: 1fr; }
  .browser-notification-panel, .browser-notification-actions { align-items: stretch; flex-direction: column; }
  .quota-presets { display: grid; grid-template-columns: 1fr 1fr; }
  .quota-presets input { width: 100%; }
  .quota-presets .button { grid-column: 1 / -1; }
  .weekday-grid { grid-template-columns: repeat(2, 1fr); }
  .quota-summary .button { margin-left: 0; }
  .device-detail-copy, .danger-zone { align-items: stretch; flex-direction: column; }
  .device-list-heading { align-items: stretch; flex-direction: column; }
  .device-list-heading .button { width: 100%; }
  .device-card-shell { grid-template-columns: 1fr; }
  .device-card-actions { grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 0; }
  .device-card-actions > :first-child { border-right: 1px solid var(--line); }
  .device-metadata { grid-template-columns: 1fr; }
  .inline-device-form { grid-template-columns: 1fr; }
  .archive-row { grid-template-columns: auto minmax(0, 1fr); }
  .archive-row time { grid-column: 2; }
  .health-summary-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .health-summary-grid article { min-width: 0; padding: 10px 8px; }
  .health-summary-grid span { font-size: 9px; line-height: 1.25; }
  .health-summary-grid strong { font-size: 19px; }
  .application-heading { align-items: stretch; }
  .application-heading, .application-heading > div { width: 100%; }
  .application-search input { width: 100%; }
  .application-filters { display: grid; grid-template-columns: minmax(82px, 1.4fr) repeat(3, minmax(52px, .8fr)); gap: 5px; width: 100%; }
  .application-filter { justify-content: center; min-width: 0; padding-right: 6px; padding-left: 6px; }
  .application-filter b { min-width: 18px; padding-right: 4px; padding-left: 4px; }
  .application-filter > span:first-child { width: 18px; height: 18px; }
  .unified-application-list { margin-right: -12px; margin-left: -12px; border-radius: 14px; }
  .application-row { grid-template-columns: 36px minmax(0, 1fr); gap: 9px; padding: 9px 8px; }
  .application-row .application-icon { width: 36px; height: 36px; border-radius: 11px; }
  .application-mode-chips { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .application-mode-chip { min-width: 0; min-height: 32px; padding: 5px 4px; }
  .application-mode-chip > span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .policy-sheet-panel { width: 100%; border-radius: 23px 23px 0 0; }
  .device-settings-panel { position: fixed; top: auto; right: 0; bottom: 0; left: 0; width: 100%; max-height: calc(100dvh - max(8px, env(safe-area-inset-top))); }
  .policy-sheet-header { padding-right: 14px; padding-left: 14px; }
  .policy-sheet-form { padding-right: 14px; padding-left: 14px; }
  .tariff-equation { gap: 7px; }
  .tariff-input { padding-right: 8px; padding-left: 8px; }
  .tariff-presets { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .main-nav { overflow-x: auto; justify-content: start; }
  .nav-item { flex: 0 0 auto; }
  .schedule-topbar, .week-navigation { align-items: stretch; }
  .week-navigation .family-chip { width: 100%; text-align: center; }
  .schedule-toolbar { grid-template-columns: 1fr; }
  .child-filter-list { grid-row: auto; grid-column: auto; }
  .schedule-toolbar > .button { width: 100%; }
  .schedule-summary { grid-template-columns: 1fr; }
  .schedule-board-panel { padding-right: 0; padding-left: 0; }
  .schedule-board-panel > .panel-heading { padding: 0 20px; }
  .week-calendar { grid-template-columns: repeat(7, minmax(140px, 1fr)); border-right: 0; border-left: 0; border-radius: 0; }
  .template-filter-bar { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .template-filter-list { margin-right: -8px; padding-right: 8px; }
  .schedule-rule-list { grid-template-columns: minmax(0, 1fr); }
  .schedule-rule { grid-template-columns: minmax(0, 1fr); }
  .schedule-rule-summary { align-items: center; }
  .schedule-rule-actions { grid-column: auto; }
  .participant-picker { grid-template-columns: 1fr; }
  .event-form-grid, .event-options, .recurrence-options { grid-template-columns: 1fr; }
  .editor-actions { align-items: stretch; flex-direction: column-reverse; }
  .picker-popover { position: fixed; z-index: 90; top: auto; right: 12px; bottom: 12px; left: 12px; width: auto; max-height: calc(100vh - 24px); overflow-y: auto; border-radius: 20px; padding: 17px; }
  .picker-day { min-height: 40px; aspect-ratio: auto; }
  .picker-hours { grid-template-columns: repeat(6, 1fr); }
  .picker-time-option { min-height: 40px; }
}

@media (max-width: 700px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .app-shell { display: block; min-height: auto; }
  .sidebar {
    position: sticky; z-index: 60; top: 0; height: 58px; flex-wrap: nowrap;
    gap: 10px; padding: 9px 14px; box-shadow: 0 5px 20px rgb(13 43 38 / 14%);
  }
  .sidebar .brand { width: auto; flex: 0 0 auto; gap: 7px; font-size: 15px; }
  .sidebar .brand-mark { font-size: 21px; }
  .sidebar parent-navigation {
    position: fixed; z-index: 80; right: 0; bottom: 0; left: 0; width: auto;
    margin: 0; padding-bottom: env(safe-area-inset-bottom); color: var(--ink);
    background: rgb(255 253 248 / 97%); box-shadow: 0 -5px 22px rgb(23 59 53 / 12%);
    backdrop-filter: blur(14px);
  }
  .sidebar-bottom { position: static; right: auto; top: auto; gap: 10px; margin-left: auto; }
  .sidebar-bottom .text-button { font-size: 11px; white-space: nowrap; }
  .native-child-mode { color: var(--mint) !important; }
  .main-nav {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
    width: 100%; height: 72px; margin: 0; overflow: visible; padding: 6px 5px;
  }
  .nav-item {
    display: flex; min-width: 0; min-height: 60px; flex-direction: column;
    justify-content: center; gap: 2px; border-radius: 12px; padding: 4px 2px;
    color: #69807b; font-size: 10px; line-height: 1.1; text-align: center;
  }
  .nav-item > span { font-size: 19px; line-height: 1; }
  .nav-item.active { color: var(--ink); background: #eaf3ed; }
  .nav-secondary { display: none; }
  .mobile-more { position: relative; display: block; min-width: 0; }
  .mobile-more summary { list-style: none; cursor: pointer; }
  .mobile-more summary::-webkit-details-marker { display: none; }
  .mobile-more.active summary, .mobile-more[open] summary { color: var(--ink); background: #eaf3ed; }
  .mobile-more-menu {
    position: fixed; right: 12px; bottom: calc(78px + env(safe-area-inset-bottom));
    left: 12px; display: grid; gap: 6px; border: 1px solid var(--line);
    border-radius: 20px; padding: 10px; background: var(--paper);
    box-shadow: 0 18px 50px rgb(23 59 53 / 24%);
  }
  .mobile-more:not([open]) .mobile-more-menu { display: none; }
  .mobile-more-item {
    display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 11px;
    align-items: center; border-radius: 13px; padding: 10px 12px;
    color: var(--ink); text-decoration: none;
  }
  .mobile-more-item.active { background: #edf5ef; }
  .mobile-more-item > span:first-child {
    display: grid; width: 36px; height: 36px; place-items: center;
    border-radius: 11px; background: #e5efe9; font-size: 18px;
  }
  .mobile-more-item > span:last-child { display: grid; gap: 2px; }
  .mobile-more-item small { color: var(--ink-soft); font-size: 10px; }
  .mobile-settings { border-top: 1px solid var(--line); padding-top: 6px; }
  .mobile-settings > summary { list-style: none; cursor: pointer; }
  .mobile-settings > summary::-webkit-details-marker { display: none; }
  .mobile-settings[open] > summary { background: #edf5ef; }
  .mobile-settings-panel { padding: 4px 6px 6px 49px; }
  .mobile-settings-action {
    display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px;
    align-items: center; border-radius: 11px; padding: 9px 10px;
    color: var(--ink); background: #f3f6f3; text-decoration: none;
  }
  .mobile-settings-action > span:first-child {
    display: grid; width: 28px; height: 28px; place-items: center;
    border-radius: 9px; color: #426f64; background: #deede5; font-weight: 900;
  }
  .mobile-settings-action > span:last-child { display: grid; gap: 2px; }
  .mobile-settings-action small { color: var(--ink-soft); font-size: 9px; }
  .workspace { padding: 20px 14px 28px; }
  .topbar { position: relative; gap: 9px; margin-bottom: 13px; }
  .topbar-intro { padding-right: 48px; }
  .topbar-tools { display: block; }
  .notification-trigger { position: absolute; top: 0; right: 0; width: 38px; height: 38px; border-radius: 12px; }
  .notification-trigger svg { width: 20px; height: 20px; }
  .notification-drawer-header { padding: 18px 16px; }
  .notification-drawer-header h2 { font-size: 24px; }
  .notification-drawer-content { gap: 20px; padding: 18px 14px; }
  .topbar h1 { font-size: 28px; line-height: 1.05; }
  .topbar .eyebrow { margin-bottom: 2px; font-size: 10px; }
  .topbar-date { margin-top: 3px; font-size: 12px; }
  .today-scope > span { display: none; }
  .today-scope-list { gap: 5px; padding: 1px 1px 2px; }
  .today-scope-button { width: 35px; height: 35px; padding: 2px; }
  .today-scope-button.all { min-width: 80px; height: 35px; padding: 0 10px; font-size: 11px; }
  .today-scope-button .family-avatar { width: 29px; height: 29px; }
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 14px; }
  .summary-card {
    min-width: 0; min-height: 104px; flex-direction: column; align-items: flex-start;
    gap: 6px; border-radius: 15px; padding: 10px; box-shadow: 0 5px 18px rgb(23 59 53 / 5%);
  }
  .summary-icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; font-size: 16px; }
  .summary-card p { min-height: 24px; margin-bottom: 0; font-size: 10px; line-height: 1.2; }
  .summary-card strong { font-size: 23px; }
  .summary-card .summary-unit { font-size: 10px; }
  .panel { border-radius: 16px; padding: 16px; }
  .panel-heading { gap: 10px; margin-bottom: 14px; }
  .panel-heading h2 { font-size: 20px; }
  .attention-item { gap: 10px; padding: 11px; }
  .attention-icon { width: 32px; height: 32px; }
  .today-group { padding: 13px; }
  .today-item { min-height: 58px; padding: 9px; }
}

@media (max-width: 700px) and (hover: hover) {
  .nav-item:hover { color: var(--ink); background: #eaf3ed; }
  .mobile-more-item:hover { background: #edf5ef; }
}

/* Совместимые токены родительского интерфейса «ВремяДел». */
:root {
  --ink: #14213d;
  --ink-soft: #6b7280;
  --cream: #f7f4ed;
  --paper: #fffdf8;
  --line: #d9dce3;
  --mint: #3dd6b5;
  --mint-strong: #20a98e;
  --coral: #ff6b6b;
  --gold: #ffc857;
  --danger: #b93f50;
}

.parent-family-summary { margin-bottom: 18px; border: 1px solid var(--line); border-radius: 18px; padding: 4px 24px; background: var(--paper); }
.parent-family-summary-list { display: grid; }
.parent-child-summary { border-top: 1px solid var(--line); }
.parent-child-summary:first-child { border-top: 0; }
.parent-child-summary-toggle { display: grid; width: 100%; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; border: 0; padding: 16px 0; color: inherit; background: transparent; text-align: left; }
.parent-child-summary-toggle:hover .parent-child-summary-copy > strong { color: var(--mint-strong); }
.parent-child-summary-avatar { width: 44px; height: 44px; border-radius: 50%; }
.parent-child-summary-copy { display: grid; min-width: 0; gap: 3px; }
.parent-child-summary-copy > strong { font-size: 15px; font-weight: 700; }
.parent-child-summary-copy > span { overflow: hidden; color: var(--ink-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.parent-child-meta { display: flex; min-width: 0; flex-wrap: wrap; gap: 4px 9px; align-items: center; }
.parent-child-meta > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parent-child-task-status { color: var(--ink); font-size: 11px; font-weight: 700; }
.parent-child-device-status { color: var(--ink-soft); font-size: 11px; }
.parent-child-progress { position: relative; display: grid; grid-template-columns: minmax(60px, 1fr) auto; gap: 9px; align-items: center; margin-top: 5px; }
.parent-child-progress::before { content: ""; grid-row: 1; grid-column: 1; height: 4px; border-radius: 999px; background: var(--line); }
.parent-child-progress i { z-index: 1; grid-row: 1; grid-column: 1; height: 4px; max-width: 100%; border-radius: 999px; background: var(--mint-strong); }
.parent-child-progress.limit-close i { background: var(--gold); }
.parent-child-progress.limit-reached i { background: var(--coral); }
.parent-child-progress.no-limit::before { background: repeating-linear-gradient(90deg, var(--line) 0 7px, transparent 7px 11px); }
.parent-child-progress small { grid-row: 1; grid-column: 2; color: var(--ink); font-size: 11px; font-style: normal; font-weight: 800; white-space: nowrap; }
.parent-child-balance { border-radius: 999px; padding: 9px 13px; color: var(--ink); background: var(--gold); font-size: 14px; font-weight: 800; white-space: nowrap; }
.parent-child-chevron { color: var(--ink-soft); font-size: 22px; line-height: 1; transition: transform .24s ease; }
.parent-child-summary.expanded .parent-child-chevron { transform: rotate(180deg); }
.parent-child-activity { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .28s ease, opacity .2s ease; }
.parent-child-activity-content { min-height: 0; overflow: hidden; }
.parent-child-summary.expanded .parent-child-activity { grid-template-rows: 1fr; opacity: 1; }
.parent-child-activity.loading { opacity: .48; pointer-events: none; }
.parent-child-activity-navigation { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 7px; align-items: center; padding: 0 0 9px; }
.parent-child-activity-navigation strong { overflow: hidden; font-size: 12px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.parent-child-activity-navigation button { display: grid; width: 34px; height: 30px; place-items: center; border: 0; border-radius: 999px; color: var(--ink); background: var(--mint); font: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.parent-child-activity-navigation button:disabled { opacity: .25; cursor: default; }
.parent-child-activity-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 0 10px; }
.parent-child-activity-totals > span { display: grid; gap: 2px; border-radius: 12px; padding: 9px 11px; background: #f4f7f4; }
.parent-child-activity-totals small { color: var(--ink-soft); font-size: 10px; }
.parent-child-activity-totals strong { font-size: 13px; }
.parent-child-app-activity { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; border-top: 1px dashed var(--line); padding: 12px 0; }
.parent-child-usage-donut { position: relative; display: grid; width: 108px; height: 108px; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(24 63 54 / 6%); }
.parent-child-usage-donut::after { content: ""; position: absolute; inset: 17px; border-radius: 50%; background: var(--paper); box-shadow: 0 2px 9px rgb(24 63 54 / 10%); }
.parent-child-usage-donut > span { z-index: 1; display: grid; justify-items: center; gap: 1px; }
.parent-child-usage-donut strong { color: var(--ink); font-size: 16px; line-height: 1; }
.parent-child-usage-donut small { color: var(--ink-soft); font-size: 9px; }
.parent-child-app-ranking { min-width: 0; }
.parent-child-app-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; }
.parent-child-app-row + .parent-child-app-row { border-top: 1px solid #f2ede4; }
.parent-child-app-marker { width: 10px; height: 10px; border-radius: 50%; }
.parent-child-app-copy, .parent-child-app-usage { display: grid; min-width: 0; gap: 1px; }
.parent-child-app-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.parent-child-app-copy small { overflow: hidden; color: var(--ink-soft); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.parent-child-app-usage { justify-items: end; }
.parent-child-app-usage strong { font-size: 11px; white-space: nowrap; }
.parent-child-app-usage small { color: var(--ink-soft); font-size: 9px; }
.parent-child-activity-empty { margin: 8px 0 4px; color: var(--ink-soft); font-size: 11px; }
@media (prefers-reduced-motion: reduce) {
  .parent-child-activity, .parent-child-chevron { transition: none; }
}
.parent-today-section { margin-bottom: 14px; }
.parent-today-section .panel-heading { margin-bottom: 8px; }
.parent-today-section .panel-heading h2 { font-size: 21px; }
.parent-approval-list { display: grid; }
.parent-warning-list { display: grid; gap: 9px; margin-bottom: 14px; }
.parent-warning { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; border-radius: 14px; padding: 13px 15px; color: var(--ink); background: #fbf0cf; text-decoration: none; }
.parent-warning.critical { color: #8d321e; background: #fde8dc; }
.parent-warning > span:first-child { color: #c48d12; font-size: 13px; }
.parent-warning.critical > span:first-child { color: #c4512f; }
.parent-warning b { color: #c48d12; font-size: 21px; }
.parent-quick-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 14px 0 18px; transition: grid-template-columns .32s cubic-bezier(.2, .78, .3, 1); }
.parent-quick-actions.pause-active { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }
.parent-quick-actions.reward-only { grid-template-columns: 1fr; }
.parent-quick-actions a, .parent-quick-actions button { display: grid; min-height: 48px; place-items: center; border: 0; border-radius: 14px; color: var(--ink); background: var(--paper); font: inherit; font-size: 13px; font-weight: 800; text-align: center; text-decoration: none; cursor: pointer; }
.parent-quick-actions .reward { display: flex; min-width: 0; align-items: center; justify-content: center; gap: 5px; overflow: hidden; padding: 8px 10px; background: var(--gold); }
.reward-action-icon { flex: 0 0 auto; font-size: 14px; }
.reward-action-label { max-width: 150px; overflow: hidden; opacity: 1; text-overflow: ellipsis; white-space: nowrap; transition: max-width .28s ease, opacity .18s ease, transform .28s ease; }
.parent-quick-actions.pause-active .reward-action-label { max-width: 0; opacity: 0; transform: translateX(-6px); }
.parent-quick-actions .pause { position: relative; min-width: 0; grid-template-columns: auto minmax(0, 1fr); gap: 7px; padding: 8px 12px; overflow: hidden; background: #cfe7f7; text-align: left; transition: background-color .24s ease, color .24s ease, padding .24s ease; }
.parent-quick-actions .pause.active { color: #fff; background: var(--ink); }
.parent-quick-actions .pause.active { grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 5px; padding: 7px 9px; }
.pause-action-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--ink); background: rgb(255 255 255 / 65%); font-size: 13px; letter-spacing: -2px; }
.pause-action-label { min-width: 0; overflow: hidden; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.pause-action-timer { border-radius: 999px; padding: 4px 7px; color: var(--ink); background: var(--gold); font-size: 11px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pause-action-avatars { display: flex; min-width: 0; justify-self: end; align-items: center; padding-left: 5px; }
.pause-action-avatars:empty { display: none; }
.pause-action-avatar { width: 24px; height: 24px; margin-left: -8px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); }
.pause-action-avatar:first-child { margin-left: 0; }
@media (prefers-reduced-motion: reduce) {
  .parent-quick-actions, .reward-action-label, .parent-quick-actions .pause { transition: none; }
}
.reward-panel { width: min(520px, calc(100% - 32px)); }
.reward-form { display: grid; gap: 14px; }
.reward-child-field { min-width: 0; margin: 0; border: 0; padding: 0; }
.reward-child-field legend, .reward-amount-field { color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.reward-child-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-top: 7px; }
.reward-child-option { display: flex; min-width: 0; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; color: var(--ink); background: #faf8f2; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.reward-child-option.active { border-color: var(--ink); background: var(--mint); box-shadow: 0 0 0 2px rgb(24 63 54 / 8%); }
.reward-child-option .family-avatar { width: 38px; height: 38px; flex: 0 0 38px; }
.reward-amount-field { display: grid; gap: 6px; }
.reward-amount-field input { min-height: 48px; border-radius: 14px; font-size: 20px; font-weight: 900; text-align: center; }
.reward-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.reward-presets button { min-height: 38px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: #faf8f2; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.reward-presets button.active { border-color: var(--ink); color: var(--paper); background: var(--ink); }
.reward-actions { padding-top: 2px; }
.reward-actions .button-primary { display: flex; align-items: center; justify-content: center; gap: 5px; }
.reward-actions .star-amount { display: inline-flex; color: inherit; }
.pause-panel { width: min(540px, calc(100% - 32px)); }
.pause-form { display: grid; gap: 12px; }
.pause-current { margin: 0; border-radius: 12px; padding: 9px 12px; color: var(--ink); background: var(--gold); font-size: 12px; font-weight: 800; }
.pause-child-field { min-width: 0; margin: 0; border: 0; padding: 0; }
.pause-child-field legend, .pause-duration-field, .pause-message-field { color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.pause-child-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; margin-top: 7px; }
.pause-child-option { display: flex; min-width: 0; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 8px; color: var(--ink); background: #faf8f2; font: inherit; text-align: left; cursor: pointer; }
.pause-child-option.active { border-color: var(--ink); background: var(--mint); box-shadow: 0 0 0 2px rgb(24 63 54 / 8%); }
.pause-child-avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; }
.pause-child-copy { display: grid; min-width: 0; gap: 1px; }
.pause-child-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pause-child-copy small { color: var(--ink-soft); font-size: 9px; white-space: nowrap; }
.pause-duration-field { display: flex; align-items: baseline; justify-content: space-between; }
.pause-duration-field strong { color: var(--ink); font-size: 18px; }
.pause-duration { width: 100%; height: 28px; margin: -2px 0; accent-color: var(--ink); cursor: pointer; }
.pause-duration-scale { display: flex; justify-content: space-between; margin-top: -9px; color: var(--ink-soft); font-size: 9px; }
.pause-message-field { display: grid; gap: 6px; }
.pause-message-field textarea { min-height: 64px; resize: vertical; border-radius: 14px; padding: 11px 12px; font: inherit; font-size: 14px; }
.pause-hint { margin: -6px 0 0; color: var(--ink-soft); font-size: 10px; }
.pause-actions { grid-template-columns: minmax(0, 1fr); padding-top: 2px; }
.pause-actions .button {
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.pause-form.has-active-pause #pause-cancel-active {
  min-height: 48px;
  border-color: var(--ink);
  color: var(--paper);
  background: var(--ink);
}
.pause-form.has-active-pause #pause-submit {
  min-height: 40px;
  border: 1px solid #cbd8d2;
  color: var(--ink);
  background: #eef4f1;
  box-shadow: none;
}
.approval-avatar { width: 34px; height: 34px; border-radius: 50%; }
.today-parent-avatar { display: inline-grid; width: 34px; height: 34px; place-items: center; }
.today-parent-avatar-image { width: 34px; height: 34px; border: 2px solid rgb(255 255 255 / 76%); border-radius: 50%; }
.nav-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.mobile-logout { width: 100%; border: 0; color: var(--danger); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.tasks-create-action { min-height: 38px; border-radius: 999px; padding: 9px 15px; color: var(--ink); background: var(--gold); font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.family-child-card { grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; text-align: left; }
.family-child-card-avatar { width: 52px; height: 52px; border-radius: 50%; }
.family-child-card-copy { display: grid; min-width: 0; gap: 2px; }
.family-child-card-copy > strong { font-size: 16px; }
.family-child-card-copy > small { color: var(--ink-soft); font-size: 12px; }
.family-child-stars { border-radius: 999px; padding: 8px 11px; background: var(--gold); font-size: 13px; font-weight: 800; white-space: nowrap; }
.family-child-arrow { color: var(--ink-soft); font-size: 22px; }
.family-add-child { width: 100%; margin-top: 12px; border-style: dashed; }

@media (max-width: 700px) {
  .parent-dev-login { padding-bottom: 0; background: var(--ink); }
  .parent-dev-login .login-story { display: none; }
  .parent-dev-login .login-shell { display: block; min-height: 100vh; background: var(--ink); }
  .parent-dev-login .login-panel { position: relative; display: block; min-height: 100vh; padding: 112px 18px 32px; color: var(--paper); background: var(--ink); }
  .parent-dev-login .login-panel::before { content: "★ ВремяДел"; position: absolute; top: 34px; left: 18px; color: var(--gold); font-size: 17px; font-weight: 800; }
  .parent-dev-login .auth-card { width: 100%; }
  .parent-dev-login .auth-card > .eyebrow { display: none; }
  .parent-dev-login .auth-card h2 { color: var(--paper); font-size: 30px; }
  .parent-dev-login #login-subtitle { margin: 8px 0 0; color: rgb(244 239 230 / 68%); font-size: 14px; }
  .parent-dev-login .dev-login { margin-top: 26px; }
  .parent-dev-login .dev-login h3, .parent-dev-login .dev-login > p { display: none; }
  .parent-dev-login .dev-profile-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .parent-dev-login .dev-profile-button { display: flex; min-height: 156px; flex-direction: column; justify-content: center; gap: 8px; border: 0; border-radius: 20px; padding: 16px 10px; color: var(--paper); background: #21524a; text-align: center; }
  .parent-dev-login .dev-profile-avatar { width: 72px; height: 72px; border: 3px solid var(--paper); border-radius: 50%; }
  .parent-dev-login .dev-profile-button > span:nth-child(2) { justify-items: center; }
  .parent-dev-login .dev-profile-button strong { font-size: 16px; }
  .parent-dev-login .dev-profile-button small { color: rgb(244 239 230 / 65%); font-size: 12px; }
  .parent-dev-login .dev-profile-arrow { display: none; }
  .parent-dev-login .dev-login-switch { color: rgb(244 239 230 / 78%); }

  body { color: #1c2b26; background: var(--cream); }
  .sidebar { position: static; height: 0; overflow: visible; padding: 0; box-shadow: none; background: transparent; }
  .sidebar > .brand, .sidebar > .sidebar-bottom { display: none; }
  .workspace { padding: 0 14px 28px; }
  .topbar { margin: 0 -14px; padding: 12px 18px 48px; color: var(--paper); background: var(--ink); }
  .topbar-intro { display: flex; flex-direction: column; padding-right: 50px; }
  .topbar .eyebrow { display: none; }
  .topbar-date { order: -1; margin: 0 0 12px; color: rgb(244 239 230 / 70%); font-size: 13px; }
  .topbar h1 { color: var(--paper); font-size: 24px; letter-spacing: -.025em; }
  .topbar-tools { position: static; }
  .notification-trigger { top: 12px; right: 58px; border: 0; color: var(--paper); background: rgb(255 255 255 / 10%); }
  .today-parent-avatar { position: absolute; top: 14px; right: 18px; }
  .topbar-date { text-transform: capitalize; }
  .family-page-topbar { margin-bottom: 0; padding-bottom: 48px; }
  .family-page-topbar .eyebrow { display: block; margin-bottom: 5px; color: rgb(244 239 230 / 70%); letter-spacing: 0; text-transform: none; }
  .family-page-topbar .family-chip { display: none; }
  .family-layout { display: flex; flex-direction: column; gap: 10px; }
  .family-children-panel { position: relative; z-index: 1; order: 1; margin-top: -34px; }
  .family-adults-panel { order: 2; }
  .family-settings-panel { order: 3; }
  .family-layout > #child-editor-panel, .family-layout > #member-editor-panel { order: 4; }
  .family-profile-grid { grid-template-columns: 1fr; gap: 0; }
  .family-child-card { width: 100%; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0; background: transparent; box-shadow: none; }
  .family-child-card:first-child { border-top: 0; }
  .family-child-card.active { border-color: var(--line); background: transparent; box-shadow: none; }
  .family-child-card-copy { align-self: stretch; }
  .family-child-card-avatar { width: 52px; height: 52px; }
  .family-child-stars { align-self: start; }
  .family-adults-panel .profile-row > span:last-child { font-size: 0; }
  .family-adults-panel .profile-row > span:last-child::after { content: "›"; font-size: 22px; }
  .family-adults-panel .profile-row small { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .family-settings-panel .panel-heading { margin-bottom: 6px; }
  .tasks-mode .topbar { padding-bottom: 12px; }
  .tasks-mode .topbar-intro { padding-right: 0; }
  .tasks-mode .topbar h1 { font-size: 24px; }
  .tasks-mode .topbar-tools { display: flex; align-items: center; }
  .tasks-mode .notification-trigger, .tasks-mode .today-parent-avatar { display: none; }
  .tasks-mode .tasks-create-action { order: 2; }
  .tasks-mode .today-scope { display: block; width: 100%; order: 3; }
  .tasks-mode .today-scope-list { display: flex; max-width: calc(100vw - 28px); gap: 7px; overflow-x: auto; padding: 10px 0 0; scrollbar-width: none; }
  .tasks-mode .today-scope-list::-webkit-scrollbar { display: none; }
  .tasks-mode .today-scope-button { color: var(--paper); background: rgb(255 255 255 / 10%); }
  .tasks-mode .today-scope-button.active { color: var(--ink); background: var(--paper); }
  .tasks-mode .today-scope-button.all { min-width: 64px; }
  .tasks-mode #family-today-summary,
  .tasks-mode .legacy-summary,
  .tasks-mode #today-warning-panel,
  .tasks-mode #today-plan,
  .tasks-mode #today-tasks-panel,
  .tasks-mode .parent-quick-actions,
  .tasks-mode #rules,
  .tasks-mode #history { display: none !important; }
  .tasks-mode .content-grid { display: grid; gap: 10px; }
  .tasks-mode #tasks, .tasks-mode #tasks-work-panel { display: block; }
  .tasks-mode #tasks-work-panel { order: 2; }
  .tasks-mode #tasks { order: 1; }
  .tasks-mode #tasks { padding: 14px; }
  .tasks-mode #tasks .panel-heading { margin-bottom: 4px; }
  .tasks-mode #tasks .panel-heading .eyebrow { display: none; }
  .tasks-mode #tasks .panel-heading h2 { font-size: 19px; }
  .tasks-mode #tasks .approval-card { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; padding: 10px 0 0; }
  .tasks-mode #tasks .approval-card .card-actions { width: auto; gap: 5px; }
  .tasks-mode #tasks .approval-card .button { min-height: 36px; border-radius: 999px; padding: 0 10px; font-size: 11px; }
  .tasks-mode #tasks .approval-avatar { width: 32px; height: 32px; }
  .tasks-mode #tasks .item-title { margin-bottom: 2px; font-size: 14px; }
  .tasks-mode #tasks .item-meta { font-size: 10.5px; }
  .tasks-mode #tasks .approval-reject-editor { padding-top: 8px; }
  .tasks-mode #tasks-work-panel { padding: 14px; }
  .tasks-mode .tasks-list-heading .eyebrow { display: none; }
  .tasks-mode .tasks-list-heading h2 { font-size: 19px; }
  .tasks-mode .task-row { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 10px 0; background: transparent; }
  .tasks-mode .task-row:first-child { border-top: 0; }
  .tasks-mode .task-row-main > .family-avatar { width: 32px; height: 32px; flex-basis: 32px; }
  .tasks-mode .task-row-side { gap: 5px; }
  .tasks-mode .task-row-action { width: 30px; height: 30px; }
  .tasks-mode .task-row-complete { width: auto; min-width: 72px; padding: 0 10px; font-size: 10px; }
  .notification-badge { border-color: var(--ink); background: var(--coral); }
  .today-scope { display: none; }
  .parent-family-summary { position: relative; z-index: 1; margin-top: -34px; border: 0; border-radius: 18px; padding: 4px 14px; box-shadow: 0 6px 20px rgb(24 63 54 / 12%); }
  .parent-child-summary-toggle { gap: 8px; padding: 13px 0; }
  .parent-child-summary-avatar { width: 40px; height: 40px; }
  .parent-child-meta { gap: 4px 7px; }
  .parent-child-task-status { font-size: 10.5px; }
  .parent-child-device-status { font-size: 10.5px; }
  .parent-child-balance { padding: 8px 11px; }
  .parent-child-chevron { font-size: 19px; }
  .parent-child-app-activity { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 12px 0 13px; }
  .parent-child-usage-donut { width: 92px; height: 92px; }
  .parent-child-usage-donut::after { inset: 14px; }
  .parent-child-usage-donut strong { font-size: 14px; }
  .legacy-summary { display: none; }
  .panel { border: 0; border-radius: 18px; box-shadow: none; }
  .parent-today-section { padding: 14px; }
  .parent-today-section .approval-card { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 12px 0; }
  .parent-today-section .approval-card .card-actions { width: auto; }
  .parent-today-section .approval-card .button-reject { display: none; }
  .parent-today-section .approval-card .button { min-height: 38px; border-radius: 999px; padding: 0 13px; font-size: 12px; }
  .parent-today-section .approval-card .button-approve { color: var(--paper); background: var(--ink); }
  .today-panel { padding: 16px; }
  .today-panel .eyebrow, .today-panel .status-pill { display: none; }
  .today-panel .panel-actions .text-button { display: inline; color: var(--mint-strong); font-size: 12px; }
  .today-agenda { gap: 10px; }
  .parent-today-tasks .approval-card { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 11px 0; }
  .parent-today-tasks .approval-card .card-actions { width: auto; }
  .parent-today-tasks .approval-card .button { min-height: 36px; border-radius: 999px; padding: 0 12px; font-size: 11px; }
  .parent-today-tasks .approval-card .button-reject { display: none; }
  .parent-today-tasks .approval-card .button-approve { color: var(--paper); background: var(--ink); }
  .today-group { border: 0; border-radius: 14px; padding: 12px; background: #faf7f0 !important; }
  .parent-quick-actions { position: relative; z-index: 1; }
  .main-nav { border-top: 1px solid var(--line); padding: 8px 4px 10px; background: var(--paper); }
  .nav-item { min-height: 54px; gap: 4px; border-radius: 0; color: #9aa6a0; font-size: 10.5px; font-weight: 700; }
  .nav-item > span { display: grid; min-width: 44px; height: 22px; place-items: center; border-radius: 999px; font-size: 18px; }
  .nav-item.active { color: var(--ink); background: transparent; }
  .nav-item.active > span { background: var(--mint); }
  .nav-item.nav-pending { color: var(--ink); background: transparent; transform: none; }
  .nav-item.nav-pending > span { background: var(--mint); box-shadow: 0 4px 12px rgb(72 143 111 / 24%); }
  .mobile-more.active summary, .mobile-more[open] summary { background: transparent; }
  .mobile-more.active summary > span:first-child, .mobile-more[open] summary > span:first-child { background: var(--mint); }
}

/* Финальные уточнения календаря должны перекрывать прежнюю недельную сетку. */
.parent-calendar-page .parent-calendar-board { overflow-x: auto; overflow-y: visible; margin-bottom: 0; padding: 0; touch-action: pan-x pan-y; }
.parent-calendar-page .parent-calendar-board .week-calendar { display: block; grid-template-columns: none; overflow: visible; border: 0; border-radius: 0; background: transparent; }
.parent-calendar-page .calendar-member-toolbar .child-filter { width: auto; border-radius: 999px; }

@media (max-width: 700px) {
  .workspace.parent-calendar-page { padding: 0 0 24px; }
  .parent-calendar-page .parent-calendar-header { margin: 0; border-radius: 0; padding: 14px 12px 12px; }
  .parent-calendar-page .parent-calendar-board { margin: 0 8px; }
  .parent-calendar-page .parent-calendar-board.day-scroll-active { max-height: clamp(340px, calc(100dvh - 290px), 560px); overflow-x: auto; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; }
  .parent-calendar-page .day-scroll-active .day-lane-header { position: sticky; z-index: 8; top: 0; padding-top: 4px; background: var(--paper); }
  .parent-calendar-page .calendar-member-toolbar { padding: 10px 12px 6px; }
  .parent-calendar-page .calendar-footer-actions { margin: 10px 8px 16px; }
  .parent-calendar-page .calendar-templates-panel { margin: 0 8px; }
}

/* Самостоятельный экран «Ещё». */
.more-workspace { width: min(100%, 820px); }
.more-profile-header { display: flex; gap: 18px; align-items: center; border-radius: 22px 22px 0 0; padding: 28px 26px 58px; color: var(--paper); background: var(--ink); }
.more-profile-avatar { display: grid; width: 78px; height: 78px; flex: 0 0 78px; place-items: center; border-radius: 50%; background: #d7e6df; }
.more-profile-avatar .family-avatar { width: 78px; height: 78px; border: 3px solid rgb(244 239 230 / 74%); border-radius: 50%; }
.more-profile-header h1 { margin: 0 0 3px; font-size: 27px; letter-spacing: -.035em; }
.more-profile-header p { margin: 0; color: rgb(244 239 230 / 70%); font-size: 14px; }
.more-menu-card, .more-secondary-card { position: relative; z-index: 1; border-radius: 22px; padding: 0 24px; background: var(--paper); }
.more-menu-card { margin: -34px 16px 20px; box-shadow: 0 6px 20px rgb(24 63 54 / 12%); }
.more-secondary-card { margin: 0 16px; }
.more-menu-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; border-top: 1px solid var(--line); padding: 20px 0; color: #1c2b26; text-decoration: none; }
.more-menu-row:first-child { border-top: 0; }
.more-menu-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; color: var(--ink); background: #eef4f1; }
.more-menu-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.more-menu-row > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.more-menu-row strong { font-size: 17px; }
.more-menu-row small { color: var(--ink-soft); font-size: 13px; }
.more-menu-row > b, .more-settings-row summary > b { color: var(--ink-soft); font-size: 25px; font-weight: 400; }
.more-menu-row > em { display: grid; min-width: 30px; height: 30px; place-items: center; border-radius: 999px; padding: 0 8px; color: #fff; background: var(--coral); font-size: 13px; font-style: normal; font-weight: 800; }
.more-settings-row { border-top: 1px solid var(--line); }
.more-settings-row:first-child { border-top: 0; }
.more-settings-row summary { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 16px; list-style: none; color: #1c2b26; cursor: pointer; font-size: 16px; }
.more-settings-row summary::-webkit-details-marker { display: none; }
.more-settings-row[open] summary > b { transform: rotate(90deg); }
.more-settings-slot, .more-help-copy { display: grid; gap: 8px; padding: 0 0 16px; }
.more-settings-slot > a, .more-settings-slot .mobile-settings-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; border-radius: 13px; padding: 12px 14px; color: var(--ink); background: #eef4f1; text-decoration: none; }
.more-settings-slot > a > span, .more-settings-slot .mobile-settings-action strong { font-size: 13px; font-weight: 800; }
.more-settings-slot > a > small, .more-settings-slot .mobile-settings-action small { grid-column: 1; color: var(--ink-soft); font-size: 10px; }
.more-settings-slot .mobile-settings-action > span:first-child { display: none; }
.more-settings-slot .mobile-settings-action > span:last-child { display: contents; }
.more-help-copy p { margin: 0; border-radius: 13px; padding: 13px 14px; color: var(--ink-soft); background: #faf7f0; font-size: 12px; line-height: 1.5; }
.more-logout { width: 100%; min-height: 70px; border: 0; border-top: 1px solid var(--line); padding: 0; color: #b5482a; background: transparent; font-size: 16px; font-weight: 800; text-align: left; }

@media (max-width: 700px) {
  .workspace.more-workspace { width: 100%; padding: 0 0 24px; }
  .more-profile-header { border-radius: 0; padding: 28px 24px 60px; }
  .more-profile-avatar, .more-profile-avatar .family-avatar { width: 70px; height: 70px; flex-basis: 70px; }
  .more-profile-header h1 { font-size: 25px; }
  .more-menu-card { margin-right: 12px; margin-left: 12px; padding: 0 20px; }
  .more-secondary-card { margin-right: 12px; margin-left: 12px; padding: 0 20px; }
  .more-menu-row { grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: 12px; padding: 18px 0; }
  .more-menu-row strong { font-size: 16px; }
  .more-menu-row small { font-size: 12px; }
}

/* «Сегодня»: компактный список ближайших событий, остальные разделы отдельно. */
body:not(.tasks-mode):not(.history-mode) .compact-content-grid { display: none; }
.today-panel .panel-heading { margin-bottom: 8px; }
.today-panel .panel-heading h2 { font-size: 21px; }
.today-panel .panel-actions .text-button { color: var(--mint-strong); font-size: 12px; }
.today-agenda { display: grid; grid-template-columns: 1fr; gap: 0; }
.today-next-event { display: grid; width: 100%; grid-template-columns: 62px 3px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 70px; border: 0; border-top: 1px solid var(--line); padding: 10px 0; color: #1c2b26; background: transparent; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.today-next-event:first-child { border-top: 0; }
.today-next-event time { color: var(--ink); font-size: 15px; font-weight: 800; white-space: nowrap; }
.today-next-event > i { width: 3px; height: 48px; border-radius: 999px; background: var(--today-event-color); }
.today-next-event > span { display: grid; min-width: 0; gap: 2px; }
.today-next-event strong { overflow: hidden; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.today-next-event small { overflow: hidden; color: var(--ink-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.today-next-event > b { color: var(--mint-strong); font-size: 11px; font-weight: 800; }
.today-next-event.task > b { color: var(--ink); font-size: 13px; }
.today-next-empty { margin: 0; border-radius: 14px; padding: 18px; color: var(--ink-soft); background: #faf7f0; font-size: 13px; text-align: center; }
.today-detail-open { overflow: hidden; }
.today-detail-sheet { position: fixed; z-index: 180; inset: 0; }
.today-detail-backdrop { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: rgb(13 43 38 / 42%); opacity: 0; transition: opacity .22s ease; }
.today-detail-panel { position: absolute; right: 0; bottom: 0; left: 0; width: min(620px, calc(100% - 32px)); max-height: calc(100vh - 40px); margin: 0 auto; overflow-y: auto; border-radius: 26px 26px 0 0; padding: 0 22px calc(20px + env(safe-area-inset-bottom)); color: var(--ink); background: var(--paper); box-shadow: 0 -18px 70px rgb(13 43 38 / 24%); transform: translateY(104%); transition: transform .24s cubic-bezier(.22, .8, .28, 1); }
.today-detail-sheet.open .today-detail-backdrop { opacity: 1; }
.today-detail-sheet.open .today-detail-panel { transform: translateY(0); }
.today-detail-handle { display: block; width: 42px; height: 5px; margin: 9px auto 8px; border-radius: 999px; background: #bdc8c3; }
.today-detail-header { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding: 4px 0 16px; }
.today-detail-header h2 { margin: 2px 0 0; font-size: 25px; line-height: 1.15; letter-spacing: -.03em; }
.today-detail-close { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border: 0; border-radius: 50%; padding: 0 0 3px; color: var(--ink); background: #e6ece8; font-size: 25px; font-weight: 300; line-height: 1; cursor: pointer; }
.today-detail-content { display: grid; gap: 12px; }
.today-detail-rows { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #faf8f2; }
.today-detail-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; min-height: 50px; border-top: 1px solid var(--line); padding: 9px 13px; }
.today-detail-row:first-child { border-top: 0; }
.today-detail-row > span { color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.today-detail-row > strong { min-width: 0; font-size: 13px; font-weight: 650; }
.today-detail-people { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; color: var(--ink); font-size: 12px; font-weight: 650; }
.today-detail-people > span { display: inline-flex; gap: 6px; align-items: center; }
.today-detail-people .family-avatar { width: 30px; height: 30px; }
.today-detail-description { margin: 0; border-radius: 15px; padding: 13px 14px; color: var(--ink-soft); background: #f1f5f2; font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.today-detail-actions { display: grid; grid-template-columns: minmax(100px, .7fr) minmax(150px, 1.3fr); gap: 9px; padding-top: 16px; }
.today-detail-actions .button { display: grid; min-height: 44px; place-items: center; text-decoration: none; }
.history-mode #family-today-summary, .history-mode .legacy-summary, .history-mode #today-warning-panel, .history-mode #today-plan, .history-mode #today-tasks-panel, .history-mode .parent-quick-actions { display: none !important; }
.history-mode .compact-content-grid { display: grid; grid-template-columns: 1fr; }
.history-mode .compact-content-grid > section:not(#history) { display: none !important; }
.history-mode #history { display: block; }
.history-mode .topbar { padding-bottom: 12px; }
.history-mode .notification-trigger, .history-mode .today-parent-avatar, .history-mode .today-scope { display: none; }

@media (max-width: 700px) {
  .today-panel { padding: 14px 16px; }
  .today-next-event { grid-template-columns: 56px 3px minmax(0, 1fr) auto; gap: 10px; min-height: 66px; }
  .today-next-event time { font-size: 14px; }
  .today-next-event > i { height: 46px; }
  .today-next-event strong { font-size: 14px; }
  .today-next-event small { font-size: 11px; }
  .today-detail-sheet { height: 100%; }
  .today-detail-panel {
    width: 100%;
    min-height: min(360px, calc(100% - 24px));
    max-height: calc(100% - 24px);
    padding: 0 16px calc(16px + env(safe-area-inset-bottom));
    transform: translate3d(0, calc(100% + 8px), 0);
    will-change: transform;
  }
  .today-detail-sheet.open .today-detail-panel { transform: translate3d(0, 0, 0) !important; }
  .today-detail-header h2 { font-size: 22px; }
  .today-detail-row { grid-template-columns: 88px minmax(0, 1fr); gap: 10px; }
  .history-mode .topbar { margin-bottom: 10px; }
  .history-mode .topbar h1 { font-size: 24px; }
}

/* Календарь: единый ряд участников дня и вертикальная неделя. */
.day-lane-person { border: 0; padding: 0 2px 6px; color: #1c2b26; background: transparent; cursor: pointer; }
.day-lane-person:hover .day-lane-avatar, .day-lane-person:focus-visible .day-lane-avatar { box-shadow: 0 0 0 3px color-mix(in srgb, var(--member-color) 20%, transparent); }
.day-lane-person:focus-visible { border-radius: 10px; outline: 2px solid var(--member-color); outline-offset: 2px; }
.family-week-calendar { overflow: visible !important; padding: 8px !important; }
.family-week-days { display: grid; gap: 0; }
.family-week-day { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 8px; min-height: 58px; align-items: stretch; border-top: 1px solid var(--line); padding: 5px 0; }
.family-week-day:first-child { border-top: 0; }
.family-week-day.selected { border-radius: 10px; background: #eef4f1; }
.family-week-day-heading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 0; border-radius: 9px; padding: 4px; color: var(--ink); background: transparent; }
.family-week-day-heading span { color: var(--ink-soft); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.family-week-day-heading strong { font-size: 17px; }
.family-week-day.selected .family-week-day-heading { background: var(--mint); }
.family-week-day-events { display: grid; min-width: 0; align-content: center; gap: 3px; }
.family-week-event { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; min-width: 0; align-items: center; border-left: 3px solid var(--ink); border-radius: 7px; padding: 4px 7px; color: #1c2b26; background: #faf7f0; text-decoration: none; }
.family-week-event-avatars { display: inline-flex; min-width: 24px; }
.family-week-event-avatars .family-avatar { width: 24px; height: 24px; margin-left: -7px; border: 1.5px solid #faf7f0; border-radius: 50%; }
.family-week-event-avatars .family-avatar:first-child { margin-left: 0; }
.family-week-event > span:last-child { display: grid; min-width: 0; gap: 1px; }
.family-week-event strong, .family-week-event small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.family-week-event strong { font-size: 11px; }
.family-week-event small { color: var(--ink-soft); font-size: 9px; }
.family-week-event .reminder-reaction { margin-top: 2px; }
.family-week-day-empty { align-self: center; color: #9aa6a0; font-size: 11px; }
.family-week-more { justify-self: start; border: 0; padding: 2px 5px; color: var(--mint-strong); background: transparent; font-size: 10px; font-weight: 800; }

@media (max-width: 700px) {
  .day-lane-header { grid-template-columns: 36px repeat(var(--calendar-columns), minmax(0, 1fr)); }
  .day-lane-avatar { width: 30px; height: 30px; }
  .day-lane-person > span { font-size: 9px; }
  .day-lane-person small { font-size: 8.5px; }
  .day-timeline, .calendar-all-day { grid-template-columns: 36px minmax(0, 1fr); }
  .family-week-calendar { padding: 4px 8px 8px !important; }
  .family-week-day { grid-template-columns: 46px minmax(0, 1fr); gap: 6px; min-height: 54px; }
  .family-week-day-events { gap: 2px; }
  .family-week-event { min-height: 38px; padding: 3px 6px; }
}

/* Переиспользуемая нижняя форма для дел и событий. */
.composer-sheet-open { overflow: hidden; }
.composer-sheet { position: fixed; z-index: 200; inset: 0; }
.composer-sheet-backdrop { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: rgb(13 43 38 / 48%); opacity: 0; transition: opacity .22s ease; }
.composer-sheet-panel { position: absolute; top: 12%; right: 0; bottom: 0; left: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); width: min(780px, calc(100% - 32px)); height: auto; max-height: 900px; margin: 0 auto; overflow: hidden; border-radius: 28px 28px 0 0; color: var(--ink); background: var(--cream); box-shadow: 0 -18px 70px rgb(13 43 38 / 28%); transform: translateY(104%); transition: transform .24s cubic-bezier(.22, .8, .28, 1); }
.composer-sheet.open .composer-sheet-backdrop { opacity: 1; }
.composer-sheet.open .composer-sheet-panel { transform: translateY(0); }
.composer-sheet-handle { width: 44px; height: 5px; justify-self: center; margin: 9px 0 2px; border-radius: 999px; background: #bdc8c3; }
.composer-sheet-header { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 20px 10px; }
.composer-sheet-header h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.composer-sheet-close { display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 50%; padding: 0 0 3px; color: var(--ink); background: #e6ece8; font-size: 27px; font-weight: 300; line-height: 1; }
.composer-sheet-body { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--cream); }
.composer-sheet-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--cream); opacity: 0; transition: opacity .14s ease; }
.composer-sheet.ready .composer-sheet-frame { opacity: 1; }
.composer-sheet-loading { position: absolute; z-index: 2; inset: 0; display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: auto repeat(3, 13px); gap: 12px 10px; align-content: start; padding: 22px; color: var(--ink-soft); background: var(--cream); font-size: 12px; font-weight: 700; opacity: 1; transition: opacity .12s ease; }
.composer-sheet.ready .composer-sheet-loading { display: none; opacity: 0; pointer-events: none; }
.composer-sheet-loading-mark { display: grid; grid-row: 1 / span 2; width: 36px; height: 36px; place-items: center; border-radius: 12px; color: var(--ink); background: var(--mint); font-size: 18px; }
.composer-sheet-loading > span:nth-child(2) { align-self: center; }
.composer-sheet-loading i { grid-column: 1 / -1; overflow: hidden; border-radius: 999px; background: #e5e9e5; }
.composer-sheet-loading i::after { content: ""; display: block; width: 44%; height: 100%; background: linear-gradient(90deg, transparent, rgb(255 255 255 / 72%), transparent); animation: composer-loading 1s ease-in-out infinite; }
.composer-sheet-loading i:nth-of-type(2) { width: 74%; }
.composer-sheet-loading i:nth-of-type(3) { width: 88%; }
@keyframes composer-loading { from { transform: translateX(-120%); } to { transform: translateX(260%); } }

.calendar-footer-actions { grid-template-columns: 1fr 1fr; }
.calendar-task-action { color: var(--ink); background: var(--mint); }

body.embedded-editor { min-height: 0; padding: 0; background: var(--cream); }
.embedded-editor .login-shell { min-height: 100vh; grid-template-columns: 1fr; }
.embedded-editor .login-story { display: none; }
.embedded-editor .login-panel { padding: 24px; }
.embedded-editor .app-shell { display: block; min-height: 0; }
.embedded-editor .sidebar, .embedded-editor .editor-topbar { display: none; }
.embedded-editor .editor-workspace { max-width: none; min-height: 0; padding: 0 18px 24px; }
.embedded-editor .standalone-editor-panel { max-width: none; margin: 0; border: 0; border-radius: 20px; padding: 18px; background: var(--paper); box-shadow: none; }
.embedded-editor .form-grid { gap: 14px 12px; }
.embedded-editor .form-grid label, .embedded-editor .participant-field legend { color: var(--ink); font-size: 12px; }
.embedded-editor input, .embedded-editor select, .embedded-editor textarea { border-color: #e5ded0; background: #faf8f2; }
.embedded-editor .event-options-toggle { min-height: 56px; background: #f1f5f2; }
.embedded-editor .editor-actions { position: sticky; z-index: 12; bottom: -24px; margin: 4px -18px -24px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(rgb(255 253 248 / 88%), var(--paper) 24%); }
.embedded-editor .editor-actions .button-primary { min-width: 180px; }

/* Компактные редакторы дел и событий в нижней панели. */
.compact-editor-form { gap: 11px 10px; }
.compact-editor-form > label, .compact-editor-form .compact-pair label, .compact-editor-form .compact-event-time label { gap: 5px; color: var(--ink); font-size: 11px; }
.compact-editor-form input, .compact-editor-form select, .compact-editor-form textarea { min-height: 42px; border-radius: 14px; padding-right: 12px; padding-left: 12px; font-size: 14px; }
.compact-editor-form textarea { min-height: 76px; padding-top: 10px; line-height: 1.4; }
.compact-pair { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: 10px; }
.compact-event-time { display: grid; grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, .82fr)); gap: 10px; }
.compact-editor-form .date-time-picker { grid-template-columns: minmax(0, 1fr) 40px; }
.compact-editor-form .date-time-picker .picker-display-input { padding-right: 42px; }
.compact-editor-form .date-time-picker .picker-trigger { width: 40px; min-height: 42px; border-radius: 0 14px 14px 0; font-size: 18px; }
.compact-editor-form .input-suffix input { padding-right: 40px; font-size: 18px; font-weight: 900; }
.compact-star-mark { position: absolute; top: 50%; right: 13px; width: 18px; height: 18px; transform: translateY(-50%); }
.editor-disclosure { border: 1px solid #e5ded0; border-radius: 14px; background: #f5f7f4; }
.editor-disclosure summary { display: flex; min-height: 42px; align-items: center; gap: 7px; padding: 0 12px; list-style: none; color: var(--ink); cursor: pointer; font-size: 12px; font-weight: 800; }
.editor-disclosure summary::-webkit-details-marker { display: none; }
.editor-disclosure summary::after { content: "+"; margin-left: auto; color: #568477; font-size: 20px; font-weight: 500; }
.editor-disclosure[open] summary::after { content: "−"; }
.editor-disclosure summary small { color: var(--ink-soft); font-size: 10px; font-weight: 500; }
.editor-disclosure label { padding: 0 10px 10px; }
.compact-switch-row { min-height: 48px; align-items: center; gap: 10px; border-radius: 14px; padding: 8px 11px; background: #f1f5f2; }
.compact-switch-row > span { display: grid; gap: 1px; }
.compact-switch-row strong { font-size: 12px; }
.compact-switch-row small { color: var(--ink-soft); font-size: 10px; font-weight: 500; }
.compact-editor-form .compact-switch-row input { position: relative; width: 36px; min-width: 36px; height: 22px; min-height: 22px; margin: 0; appearance: none; border: 0; border-radius: 999px; padding: 0; background: #cdd8d3; box-shadow: none; transition: background .18s; }
.compact-editor-form .compact-switch-row input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgb(13 43 38 / 22%); transition: transform .18s; }
.compact-editor-form .compact-switch-row input:checked { background: var(--ink); }
.compact-editor-form .compact-switch-row input:checked::after { transform: translateX(14px); }
.compact-editor-form .participant-picker.compact-participant-picker { gap: 6px; margin-top: 5px; }
.compact-editor-form .compact-participant-picker .participant-choice { width: 42px; min-height: 42px; padding: 3px; }
.compact-editor-form .compact-participant-picker .participant-avatar { width: 34px; height: 34px; }
.compact-editor-form .event-options-toggle { min-height: 48px; border-radius: 14px; padding: 8px 12px; }
.compact-editor-form .event-options-toggle > span:first-child { gap: 1px; }
.compact-editor-form .event-options-toggle strong { font-size: 12px; }
.compact-editor-form .event-options { gap: 11px 10px; padding-top: 11px; }
.compact-editor-form .repeat-toggle { min-height: 48px; padding: 8px 11px; }
.compact-editor-form .editor-actions { gap: 8px; padding-top: 10px; }
.compact-editor-form .editor-actions .button { min-height: 42px; border-radius: 14px; }
.editing-task .task-create-only { display: none !important; }
.editing-task .task-schedule-fields { grid-template-columns: minmax(0, 180px); }
.editing-task .compact-reward-field { max-width: 180px; }
.edit-task-note { margin: 0; border-radius: 12px; padding: 9px 11px; color: var(--ink-soft); background: #f1f5f2; font-size: 10.5px; line-height: 1.4; }
.editing-task .participant-choice:disabled { opacity: .28; }
.editing-task .participant-choice.active:disabled { opacity: 1; }
.event-reminder-field { display: grid; gap: 8px; margin: 0; border: 1px solid #d8e2dd; border-radius: 16px; padding: 9px 11px 11px; background: #f7faf8; }
.event-reminder-field legend { padding: 0 5px; color: var(--ink-soft); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.event-reminder-field .reminder-toggle { min-height: 42px; border: 0; padding: 0; background: transparent; }
.reminder-options { display: grid; gap: 8px; padding-top: 3px; }
.reminder-lead { gap: 4px; color: var(--ink); font-size: 11px; }
.reminder-groups { display: grid; gap: 7px; }
.reminder-rule { display: grid; grid-template-columns: minmax(130px, .72fr) minmax(0, 1.45fr); gap: 10px; align-items: center; border: 1px solid #d8e2dd; border-radius: 13px; padding: 7px 8px; background: #fff; }
.reminder-rule-header { display: flex; align-items: center; gap: 6px; }
.reminder-rule-header select { min-width: 0; min-height: 36px; padding: 7px 28px 7px 9px; font-size: 12px; }
.reminder-remove { border: 0; padding: 4px; color: #a65343; background: transparent; font-size: 10px; font-weight: 800; cursor: pointer; }
.add-reminder { justify-self: start; border: 1px dashed #9fc9b9; border-radius: 999px; padding: 7px 11px; color: var(--ink); background: #eaf5ef; font-size: 11px; font-weight: 800; cursor: pointer; }
.field-caption { display: block; margin-bottom: 5px; color: var(--ink); font-size: 11px; font-weight: 700; }
.reminder-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.reminder-person { position: relative; display: grid; justify-items: center; gap: 2px; width: 48px; border: 1px solid transparent; border-radius: 13px; padding: 3px 2px 4px; color: var(--ink-soft); background: transparent; cursor: pointer; }
.reminder-person .participant-avatar { width: 34px; height: 34px; }
.reminder-person small { max-width: 44px; overflow: hidden; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.reminder-person .participant-check { position: absolute; top: 1px; right: 1px; display: none; width: 15px; height: 15px; border-radius: 50%; color: #fff; background: var(--ink); font-size: 10px; line-height: 15px; text-align: center; }
.reminder-person.active { border-color: #9fc9b9; color: var(--ink); background: #e3f2eb; }
.reminder-person.active .participant-check { display: block; }

@media (max-width: 700px) {
  .composer-sheet-panel { top: 12%; width: 100%; border-radius: 24px 24px 0 0; }
  .composer-sheet-header { min-height: 50px; padding: 3px 14px 7px; }
  .composer-sheet-header h2 { font-size: 18px; }
  .composer-sheet-close { width: 34px; height: 34px; font-size: 24px; }
  .calendar-footer-actions { grid-template-columns: 1fr 1fr; }
  .embedded-editor .editor-workspace { padding: 0 8px 14px; }
  .embedded-editor .standalone-editor-panel { padding: 12px; }
  .embedded-editor .form-grid, .embedded-editor .event-form-grid, .embedded-editor .event-options, .embedded-editor .recurrence-options { grid-template-columns: 1fr; gap: 10px; }
  .embedded-editor .compact-pair { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); }
  .embedded-editor .compact-event-time { grid-template-columns: 1fr 1fr; }
  .embedded-editor .compact-event-time > label:first-child { grid-column: 1 / -1; }
  .reminder-rule { grid-template-columns: 1fr; }
  .embedded-editor .editor-actions { bottom: -14px; flex-direction: row; margin: 2px -12px -14px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .embedded-editor .editor-actions .button { min-width: 0; flex: 1; }
  .embedded-editor .picker-popover { bottom: 10px; }
}
.more-feedback-link { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 16px; color: inherit; text-decoration: none; }
.more-feedback-link span { display: grid; gap: 3px; }
.more-feedback-link small { color: var(--muted, #678078); font-weight: 500; }
.more-feedback-link > b { color: var(--ink-soft); font-size: 25px; font-weight: 400; }
.feedback-workspace { width: min(900px, 100%); }
.feedback-header { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr) 54px; gap: 16px; align-items: center; margin-bottom: 22px; }
.feedback-header h1 { margin: 2px 0 4px; font-size: clamp(32px, 5vw, 48px); letter-spacing: -.04em; }
.feedback-header p { margin: 0; color: var(--ink-soft); }
.feedback-back { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); text-decoration: none; font-size: 34px; line-height: 1; box-shadow: 0 5px 14px rgb(23 63 56 / 8%); }
.feedback-header-mark { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 18px; background: #f7c957; color: #173f38; font-size: 27px; transform: rotate(-4deg); box-shadow: 0 5px 0 #d8a83b; }
.feedback-compose-card, .feedback-history, .feedback-auth-card { border: 1px solid var(--line); border-radius: 24px; background: var(--paper); box-shadow: 0 12px 34px rgb(23 63 56 / 7%); }
.feedback-compose-card { display: grid; gap: 20px; padding: 24px; }
.feedback-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.feedback-types legend { grid-column: 1 / -1; margin-bottom: 2px; font-size: 17px; font-weight: 800; }
.feedback-type { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) 24px; gap: 11px; align-items: center; min-height: 76px; padding: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fbf8f0; cursor: pointer; }
.feedback-type input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.feedback-type:has(input:checked) { border-color: #176352; background: #e8f3ed; box-shadow: inset 0 0 0 1px #176352; }
.feedback-type-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: #ffd9d0; color: #9d3a29; font-size: 21px; font-weight: 900; }
.feedback-type-icon-idea { background: #fff0bd; color: #7c5a00; }
.feedback-type > span:nth-of-type(2) { display: grid; gap: 3px; }
.feedback-type strong { color: var(--ink); font-size: 15px; }
.feedback-type small { color: var(--ink-soft); font-size: 12px; line-height: 1.25; }
.feedback-type > b { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: transparent; font-size: 13px; }
.feedback-type:has(input:checked) > b { border-color: #176352; background: #176352; color: white; }
.feedback-message-field { display: grid; gap: 8px; font-weight: 800; }
.feedback-message-field textarea { width: 100%; min-height: 138px; resize: vertical; border: 1px solid var(--line); outline: none; border-radius: 17px; background: #fbf8f0; padding: 15px 16px; color: var(--ink); font: inherit; line-height: 1.45; transition: border-color .15s, box-shadow .15s; }
.feedback-message-field textarea:focus { border-color: #176352; box-shadow: 0 0 0 3px rgb(23 99 82 / 12%); }
.feedback-message-field > small { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-weight: 500; }
.feedback-privacy { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 15px; background: #edf5f1; color: #486b62; font-size: 13px; }
.feedback-privacy > span { display: grid; flex: 0 0 auto; width: 21px; height: 21px; place-items: center; border: 1px solid #79a297; border-radius: 50%; font-weight: 900; }
.feedback-privacy p { margin: 0; line-height: 1.4; }
.feedback-submit { display: flex; min-height: 48px; align-items: center; justify-content: center; gap: 12px; justify-self: end; min-width: 235px; }
.feedback-submit b { font-size: 20px; }
.feedback-history { margin-top: 18px; padding: 22px 24px; }
.feedback-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.feedback-history-heading h2 { margin: 2px 0 0; font-size: 25px; }
.feedback-history-heading p { margin: 0; }
.feedback-history-heading > span { display: grid; min-width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #e8f3ed; color: #176352; font-weight: 900; }
.feedback-list { display: grid; gap: 10px; }
.feedback-list > .empty-state { min-height: 90px; margin: 0; display: grid; place-items: center; padding: 18px; border: 1px dashed #d6cdbd; border-radius: 16px; color: var(--ink-soft); text-align: center; }
.feedback-card { padding: 15px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fbf8f0; }
.feedback-card p { margin: 0 0 7px; white-space: pre-wrap; }
.feedback-card-meta { color: #176352; font-size: 12px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.feedback-reply { margin-top: 11px; padding: 12px 14px; border-radius: 13px; background: #e7f4ee; color: #174c43; font-weight: 700; }
.feedback-auth-card { display: grid; gap: 9px; justify-items: start; padding: 24px; }
.feedback-auth-card strong { font-size: 22px; }
.feedback-auth-card span { color: var(--ink-soft); }
@media (max-width: 680px) {
  .feedback-workspace { padding-top: 18px; }
  .feedback-header { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; margin-bottom: 16px; }
  .feedback-header-mark { display: none; }
  .feedback-back { width: 38px; height: 38px; font-size: 29px; }
  .feedback-header h1 { font-size: 31px; }
  .feedback-header .eyebrow { display: none; }
  .feedback-header p { font-size: 13px; line-height: 1.35; }
  .feedback-compose-card { gap: 16px; padding: 16px; border-radius: 20px; }
  .feedback-types { grid-template-columns: 1fr; }
  .feedback-type { min-height: 68px; }
  .feedback-message-field textarea { min-height: 124px; }
  .feedback-privacy { font-size: 12px; }
  .feedback-submit { width: 100%; min-width: 0; justify-self: stretch; }
  .feedback-history { padding: 18px 16px; border-radius: 20px; }
}

/* Семья: компактный обзор и единый сценарий редактирования в нижних панелях. */
.family-workspace { max-width: 1040px; }
.family-page-topbar { align-items: center; }
.family-header-actions { display: flex; gap: 9px; align-items: center; }
.family-icon-button { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--paper); font-size: 19px; }
.family-add-person { display: inline-flex; min-height: 44px; align-items: center; gap: 5px; color: var(--paper); background: var(--ink); }
.family-add-person > span { font-size: 20px; font-weight: 500; line-height: 1; }
.family-overview { padding: 0; overflow: hidden; }
.family-overview-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px 26px 18px; }
.family-overview-heading h2 { margin: 0; font-size: 28px; letter-spacing: -.03em; }
.family-count { display: grid; min-width: 34px; height: 34px; place-items: center; border-radius: 999px; padding: 0 10px; color: var(--ink); background: var(--mint); font-size: 13px; font-weight: 900; }
.family-group { padding: 0 26px 24px; }
.family-group + .family-group { border-top: 1px solid var(--line); padding-top: 21px; }
.family-group-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.family-group-heading h3 { margin: 0; font-size: 17px; }
.family-group-heading span { color: var(--ink-soft); font-size: 11px; }
.family-member-row { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 0; background: transparent; }
.family-member-row:first-child { border-top: 0; }
.family-member-row:hover { background: #f7f5ef; }
.family-member-row > .family-avatar { border-radius: 50%; }
.family-member-row > b { color: var(--ink-soft); font-size: 25px; font-weight: 400; }
.family-profile-grid { grid-template-columns: 1fr; gap: 0; }
.family-child-card { width: 100%; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0; background: transparent; box-shadow: none; }
.family-child-card:first-child { border-top: 0; }
.family-child-card:hover, .family-child-card.active { border-color: var(--line); background: #f7f5ef; box-shadow: none; }
.family-sheet-open { overflow: hidden; }
.family-sheet { position: fixed; z-index: 210; inset: 0; width: 100%; max-width: 100vw; height: 100%; overflow: hidden; }
.family-sheet-backdrop { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: rgb(13 43 38 / 44%); opacity: 0; transition: opacity .2s ease; }
.family-sheet-panel { position: absolute; top: auto !important; right: 0; bottom: 0 !important; left: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); width: min(620px, calc(100% - 32px)); min-width: 0; max-width: 100vw; max-height: min(88%, 820px); margin: 0 auto; overflow: hidden; border-radius: 26px 26px 0 0; color: var(--ink); background: var(--paper); box-shadow: 0 -18px 70px rgb(13 43 38 / 26%); opacity: 0; visibility: hidden; transform: translate3d(0, calc(100% + 12px), 0); transition: transform .24s cubic-bezier(.22, .8, .28, 1), opacity .12s ease; will-change: transform; }
.family-sheet.open .family-sheet-backdrop { opacity: 1; }
.family-sheet.open .family-sheet-panel { bottom: 0 !important; opacity: 1; visibility: visible; transform: translate3d(0, 0, 0) !important; }
.family-sheet-handle { width: 42px; height: 5px; justify-self: center; margin: 9px 0 2px; border-radius: 999px; background: #bdc8c3; }
.family-sheet-header { display: flex; min-width: 0; max-width: 100%; align-items: center; justify-content: space-between; gap: 16px; padding: 7px 20px 13px; border-bottom: 1px solid var(--line); }
.family-sheet-header > div { min-width: 0; }
.family-sheet-header .eyebrow { margin-bottom: 3px; }
.family-sheet-header h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.family-sheet-close { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border: 0; border-radius: 50%; padding: 0 0 3px; color: var(--ink); background: #e6ece8; font-size: 27px; font-weight: 300; line-height: 1; }
.family-sheet-content { min-width: 0; max-width: 100%; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px max(22px, env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.family-sheet-content .form-grid, .family-sheet-content .full-row, .family-sheet-content .profile-editor, .family-sheet-content .family-settings-section { min-width: 0; max-width: 100%; }
.family-form-hint { margin: 0 0 16px; color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.family-choice-panel { max-width: 520px; }
.family-choice-list { display: grid; gap: 9px; padding: 16px 20px max(24px, env(safe-area-inset-bottom)); }
.family-choice { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 13px; align-items: center; border: 1px solid var(--line); border-radius: 17px; padding: 12px; color: var(--ink); background: #faf8f2; text-align: left; }
.family-choice > span:nth-child(2) { display: grid; gap: 3px; }
.family-choice strong { font-size: 15px; }
.family-choice small { color: var(--ink-soft); font-size: 12px; }
.family-choice > b { color: var(--ink-soft); font-size: 25px; font-weight: 400; }
.family-choice-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; font-size: 23px; }
.family-choice-icon.child { background: var(--mint); }
.family-choice-icon.adult { background: #f3e3b5; }
.family-profile-sheet-panel { max-width: 680px; }
.family-settings-editor { width: min(860px, calc(100% - 32px)); max-height: min(94dvh, 940px); }
.family-settings-content { display: grid; align-content: start; gap: 10px; background: var(--cream); }
.family-settings-section { border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
.family-settings-section > summary { display: flex; min-height: 62px; align-items: center; padding: 10px 15px; list-style: none; cursor: pointer; }
.family-settings-section > summary::-webkit-details-marker { display: none; }
.family-settings-section > summary > span { display: grid; gap: 2px; }
.family-settings-section > summary strong { font-size: 14px; }
.family-settings-section > summary small { color: var(--ink-soft); font-size: 11px; }
.family-settings-section > summary::after { content: "+"; margin-left: auto; color: var(--mint-strong); font-size: 24px; font-weight: 500; }
.family-settings-section[open] > summary { position: sticky; z-index: 6; top: -10px; border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: 0 7px 14px rgb(23 59 53 / 7%); }
.family-settings-section[open] > summary::after { content: "Свернуть  ↑"; border-radius: 999px; padding: 5px 8px; color: var(--mint-strong); background: #e8f3ed; font-size: 9px; font-weight: 850; white-space: nowrap; }
.family-settings-section > form, .family-settings-section > .weekly-quota, .family-settings-section > .star-economy { margin: 0; border-top: 1px solid var(--line); padding: 16px; }
.family-settings-section .weekly-heading { align-items: start; }
.family-settings-section .weekly-heading h3 { font-size: 16px; }
.family-settings-section .weekly-heading p { font-size: 12px; }
.family-avatar-picker { min-width: 0; max-width: 100%; flex-wrap: nowrap; overflow-x: auto; margin: 0 -2px; padding: 2px 2px 8px; scrollbar-width: none; }
.family-sheet-content .avatar-color-picker { min-width: 0; max-width: 100%; }
.family-avatar-picker::-webkit-scrollbar { display: none; }
.family-settings-section > summary { gap: 11px; }
.family-settings-section > summary > .family-setting-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 12px; color: var(--ink); background: #e8f2ed; font-size: 19px; font-weight: 800; }
.family-settings-section.family-quiet-section > summary > .family-setting-icon { background: #e9eef6; }
.family-settings-section.family-stars-section > summary > .family-setting-icon { background: #f8e5a8; }
.family-settings-section > summary > span:nth-child(2) { min-width: 0; }
.family-settings-section > summary small { overflow: hidden; max-width: 520px; text-overflow: ellipsis; white-space: nowrap; }
.family-settings-section[open] > summary { background: #faf8f2; }
.family-setting-body { background: #fffdfa; }
.family-setting-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.family-setting-intro h3 { margin: 0; font-size: 17px; line-height: 1.2; }
.family-setting-intro p { max-width: 510px; margin: 5px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.family-setting-note, .availability-pill { display: inline-flex; min-height: 28px; flex: 0 0 auto; align-items: center; border-radius: 999px; padding: 0 10px; color: var(--mint-strong); background: #e8f3ed; font-size: 10px; font-weight: 850; white-space: nowrap; }
.availability-pill.blocked { color: #9b482f; background: #f8ddd4; }
.family-mobile-form { display: grid; gap: 14px; margin-top: 14px; }
.family-quick-preset { display: grid; grid-template-columns: auto minmax(100px, 1fr) minmax(100px, 1fr) auto; gap: 8px; align-items: end; border: 1px solid #eadfca; border-radius: 16px; margin-top: 14px; padding: 11px; background: #fbf7ed; }
.family-quick-preset > span { align-self: center; color: var(--ink); font-size: 12px; font-weight: 850; }
.family-quick-preset label { position: relative; display: grid; min-width: 0; gap: 4px; color: var(--ink-soft); font-size: 9px; font-weight: 800; }
.family-quick-preset input { width: 100%; min-width: 0; min-height: 38px; padding: 7px 34px 7px 10px; background: #fff; }
.family-quick-preset label small { position: absolute; right: 9px; bottom: 12px; color: var(--ink-soft); font-size: 9px; pointer-events: none; }
.family-quick-preset .button { min-height: 38px; padding: 0 12px; background: #fff; font-size: 11px; }
.family-day-list { margin-top: 0; }
.family-day-list .weekday-card { grid-template-columns: minmax(70px, 1fr) auto minmax(88px, .8fr); gap: 10px; align-items: center; padding: 9px 10px; background: #faf8f2; }
.family-day-name { font-size: 13px !important; font-weight: 850 !important; }
.family-day-toggle { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); font-size: 9px; font-weight: 750; }
.family-day-toggle input { width: 16px; min-height: 16px; accent-color: var(--mint-strong); }
.family-day-value { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.family-day-value input { width: 100%; min-width: 0; min-height: 34px !important; border: 0; padding: 6px 3px 6px 9px !important; background: transparent; }
.family-day-value > span { padding-right: 8px; color: var(--ink-soft); font-size: 9px; font-weight: 800; }
.family-day-value:has(input:disabled) { opacity: .42; background: #ece9e1; }
.family-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 0; background: transparent; }
.family-metrics > span { min-height: 72px; align-content: center; gap: 2px; border-radius: 13px; padding: 9px; background: #edf5ef; }
.family-metrics > span:nth-child(2) { background: #f1f4f7; }
.family-metrics > span:nth-child(3) { background: #fbf3d7; }
.family-metrics strong { font-size: 16px; }
.family-metrics small { color: var(--ink-soft); font-size: 8px; font-weight: 700; }
.family-save-button { width: 100%; min-height: 44px; }
.quiet-hours-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.quiet-hours-card { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 17px; padding: 13px; background: #f4f7fa; }
.quiet-hours-card.weekend { background: #fbf5e8; }
.quiet-hours-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.quiet-hours-card-head > span { display: grid; gap: 2px; }
.quiet-hours-card-head strong { font-size: 14px; }
.quiet-hours-card-head small { color: var(--ink-soft); font-size: 9px; }
.family-switch { position: relative; width: 38px !important; min-width: 38px; height: 22px; min-height: 22px !important; appearance: none; border: 0 !important; border-radius: 999px; padding: 0 !important; background: #c9d1cd; box-shadow: inset 0 0 0 1px rgb(23 59 53 / 8%); cursor: pointer; transition: background .18s ease; }
.family-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgb(13 43 38 / 22%); transition: transform .18s ease; }
.family-switch:checked { background: var(--mint-strong); }
.family-switch:checked::after { transform: translateX(16px); }
.quiet-time-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 7px; align-items: end; }
.quiet-time-range > span { display: grid; gap: 3px; }
.quiet-time-range small { color: var(--ink-soft); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.quiet-time-range input { width: 100%; min-width: 0; min-height: 39px; padding: 6px 8px; color: var(--ink); background: #fff; font-size: 13px; font-weight: 800; }
.quiet-time-range > b { padding-bottom: 10px; color: var(--ink-soft); font-size: 14px; }
.quiet-time-range:has(input:disabled) { opacity: .42; }
.family-star-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 0; background: transparent; }
.family-star-metrics > span { display: grid; min-height: 68px; align-content: center; gap: 3px; border-radius: 14px; padding: 10px 12px; background: #fbf3d7; }
.family-star-metrics > span:nth-child(2) { background: #f8ece5; }
.family-star-metrics > span:nth-child(3) { background: #edf5ef; }
.family-star-metrics > span:nth-child(4) { background: #eef2f7; }
.family-star-metrics small { color: var(--ink-soft); font-size: 9px; font-weight: 750; }
.family-star-metrics strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.family-choice-chips { display: grid; gap: 7px; }
.family-choice-chips > span, .family-subsection-heading > strong { color: var(--ink); font-size: 12px; font-weight: 850; }
.family-choice-chips > div { display: flex; gap: 6px; overflow-x: auto; padding: 1px 1px 5px; scrollbar-width: none; }
.family-choice-chips > div::-webkit-scrollbar { display: none; }
.family-choice-chips .button { min-height: 34px; flex: 0 0 auto; border-radius: 999px; padding: 0 12px; font-size: 10px; }
.family-subsection-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: -6px; }
.family-subsection-heading small { color: var(--ink-soft); font-size: 9px; }
.family-policy-list { display: grid; grid-template-columns: 1fr; gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; margin-top: 0; background: #fff; }
.family-policy-list > .family-policy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; min-height: 62px; align-items: center; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 10px 12px; color: var(--ink); background: #fff; }
.family-policy-list > .family-policy-row:first-child { border-top: 0; }
.family-policy-row:has(> .family-switch) { grid-template-columns: auto minmax(0, 1fr) auto; }
.family-policy-row > span:not(.input-suffix) { display: grid; gap: 2px; }
.family-policy-row strong { font-size: 12px; }
.family-policy-row small { color: var(--ink-soft); font-size: 9px; font-weight: 650; }
.family-policy-row > input[type="time"] { width: 108px; min-height: 38px; padding: 6px 9px; font-size: 13px; font-weight: 800; }
.family-policy-row .input-suffix { display: grid; grid-template-columns: 58px auto; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.family-policy-row .input-suffix input { width: 58px; min-height: 36px; border: 0; padding: 5px 4px 5px 8px; background: transparent; }
.family-policy-row .input-suffix > span { padding-right: 8px; color: var(--ink); font-size: 11px; }
.family-policy-row .input-suffix:has(input:disabled) { opacity: .42; background: #ece9e1; }

@media (max-width: 700px) {
  .sidebar parent-navigation,
  .sidebar parent-navigation.mobile-viewport-synced { position: fixed !important; top: auto !important; right: 0 !important; bottom: 0 !important; left: 0 !important; width: 100% !important; transform: translateZ(0); }
  .family-workspace { padding-bottom: 28px; }
  .family-page-topbar { min-height: 126px; flex-direction: row; align-items: flex-start; padding-bottom: 50px; }
  .family-page-topbar h1 { font-size: 28px; }
  .family-header-actions { margin-left: auto; }
  .family-icon-button { width: 38px; height: 38px; border: 0; color: var(--paper); background: rgb(255 255 255 / 12%); }
  .family-add-person { min-height: 38px; border-radius: 12px; padding: 0 12px; color: var(--ink); background: var(--gold); font-size: 12px; }
  .family-overview { position: relative; z-index: 1; margin-top: -34px; border-radius: 20px; }
  .family-overview-heading { padding: 18px 16px 12px; }
  .family-overview-heading .eyebrow { display: none; }
  .family-overview-heading h2 { font-size: 22px; }
  .family-group { padding: 0 16px 18px; }
  .family-group + .family-group { padding-top: 17px; }
  .family-group-heading { margin-bottom: 4px; }
  .family-group-heading span { display: none; }
  .family-member-row { padding: 11px 0; }
  .family-child-card { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; padding: 12px 0; }
  .family-child-card-avatar { width: 48px; height: 48px; }
  .family-child-card-copy > strong { font-size: 15px; }
  .family-child-card-copy > small { font-size: 10px; }
  .family-child-stars { padding: 6px 8px; font-size: 11px; }
  .family-sheet-panel, .family-settings-editor { right: 0; left: 0; width: 100%; min-width: 0; max-width: 100vw; max-height: calc(100% - 18px); margin-right: 0; margin-left: 0; border-radius: 24px 24px 0 0; }
  .family-sheet-header { padding: 5px 16px 11px; }
  .family-sheet-header h2 { font-size: 21px; }
  .family-sheet-content { padding: 14px 14px max(18px, env(safe-area-inset-bottom)); }
  .family-choice-list { padding: 12px 14px max(18px, env(safe-area-inset-bottom)); }
  .family-settings-content { padding: 10px 10px max(16px, env(safe-area-inset-bottom)); }
  .family-settings-section > form, .family-settings-section > .weekly-quota, .family-settings-section > .star-economy { padding: 13px; }
  .family-settings-section .weekly-heading, .family-settings-section .quota-summary { gap: 10px; }
  .family-settings-section .weekday-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .family-settings-section .weekday-card { padding: 9px; }
  .family-settings-section > summary { min-height: 64px; padding: 9px 12px; }
  .family-settings-section > summary > .family-setting-icon { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; }
  .family-settings-section > summary strong { font-size: 13px; }
  .family-setting-intro h3 { font-size: 15px; }
  .family-setting-intro p { font-size: 10px; }
  .family-quick-preset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .family-quick-preset > span { grid-column: 1 / -1; }
  .family-quick-preset .button { grid-column: 1 / -1; }
  .family-settings-section .family-day-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .family-settings-section .family-day-list .weekday-card { grid-template-columns: 27px 18px minmax(62px, 1fr); gap: 5px; min-height: 52px; padding: 7px; }
  .family-day-list .family-day-name { font-size: 12px !important; }
  .family-day-list .family-day-toggle { width: 18px; overflow: hidden; }
  .family-day-list .family-day-toggle span { display: none; }
  .family-day-list .family-day-toggle input { width: 17px; min-width: 17px; min-height: 17px; margin: 0; }
  .family-day-list .family-day-value { border-radius: 9px; }
  .family-day-list .family-day-value input { min-height: 34px !important; padding-right: 1px !important; padding-left: 7px !important; font-size: 12px; }
  .family-day-list .family-day-value > span { padding-right: 6px; font-size: 8px; }
  .quiet-hours-grid { grid-template-columns: 1fr; }
  .quiet-hours-card { padding: 12px; }
  .family-star-metrics > span { min-height: 62px; }
}

/* Телефон в альбомной ориентации остаётся мобильным интерфейсом. */
@media (max-height: 500px) and (max-width: 1000px) {
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .app-shell { display: block; min-height: auto; }
  .sidebar { position: static; height: 0; overflow: visible; padding: 0; background: transparent; box-shadow: none; }
  .sidebar > .brand, .sidebar > .sidebar-bottom { display: none; }
  .sidebar parent-navigation,
  .sidebar parent-navigation.mobile-viewport-synced { position: fixed !important; z-index: 80; top: auto !important; right: 0 !important; bottom: 0 !important; left: 0 !important; width: 100% !important; margin: 0; padding-bottom: env(safe-area-inset-bottom); color: var(--ink); background: rgb(255 253 248 / 97%); box-shadow: 0 -5px 22px rgb(23 59 53 / 12%); transform: translateZ(0); }
  .main-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; width: 100%; height: 60px; margin: 0; padding: 5px; }
  .nav-item { display: flex; min-width: 0; min-height: 50px; flex-direction: column; justify-content: center; gap: 2px; border-radius: 12px; padding: 3px 2px; color: #69807b; font-size: 9px; line-height: 1.1; text-align: center; }
  .nav-item > span { font-size: 18px; line-height: 1; }
  .nav-item.active { color: var(--ink); background: #eaf3ed; }
  .nav-secondary { display: none; }
  .workspace { padding: 0 14px 22px; }
  .family-page-topbar { min-height: 88px; margin: 0 -14px; flex-direction: row; align-items: flex-start; padding: 10px 18px 34px; color: var(--paper); background: var(--ink); }
  .family-page-topbar .eyebrow { display: block; margin-bottom: 2px; color: rgb(244 239 230 / 70%); font-size: 9px; letter-spacing: 0; text-transform: none; }
  .family-page-topbar h1 { color: var(--paper); font-size: 24px; }
  .family-page-topbar .family-header-actions { margin-left: auto; }
  .family-page-topbar .family-icon-button { width: 36px; height: 36px; border: 0; color: var(--paper); background: rgb(255 255 255 / 12%); }
  .family-page-topbar .family-add-person { min-height: 36px; color: var(--ink); background: var(--gold); font-size: 11px; }
  .family-overview { position: relative; z-index: 1; margin-top: -26px; }
  .family-sheet-panel, .family-settings-editor { width: min(760px, calc(100% - 24px)); max-height: calc(100% - 8px); }
}

/* Мобильная навигация: единый индикатор плавно переезжает между разделами. */
@media (max-width: 700px), (max-height: 500px) and (max-width: 1000px) {
  .main-nav { position: relative; isolation: isolate; }
  .nav-selection {
    position: absolute;
    z-index: 0;
    top: 8px;
    bottom: 10px;
    left: 0;
    display: block;
    width: var(--nav-selection-width, 0);
    border: 1px solid rgb(89 151 126 / 10%);
    border-radius: 15px;
    background: #eaf3ed;
    box-shadow: 0 5px 14px rgb(54 112 88 / 12%);
    opacity: 1;
    pointer-events: none;
    transform: translate3d(var(--nav-selection-x, 0), 0, 0);
    will-change: transform, width;
  }
  .main-nav.nav-selection-animated .nav-selection {
    transition: transform .24s cubic-bezier(.2, .78, .3, 1), width .24s cubic-bezier(.2, .78, .3, 1);
  }
  .nav-item,
  .nav-item:active,
  .nav-item.active,
  .nav-item.nav-pending {
    position: relative;
    z-index: 1;
    background: transparent !important;
    scale: 1 !important;
    transform: none !important;
    transition: color .2s ease, opacity .2s ease;
  }
  .nav-item > .nav-icon,
  .nav-item:active > .nav-icon,
  .nav-item.active > .nav-icon,
  .nav-item.nav-pending > .nav-icon {
    display: grid;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    flex: 0 0 24px;
    place-items: center;
    padding: 0;
    background: transparent !important;
    box-shadow: none !important;
    scale: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: color .2s ease;
  }
  .nav-item > .nav-icon > svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    min-height: 20px;
    scale: 1 !important;
    transform: none !important;
  }
  .nav-item.active, .nav-item.nav-pending { color: var(--ink); }
  .main-nav.nav-transitioning .nav-item:not(.nav-pending) { opacity: 1; }
}

@media (max-height: 500px) and (max-width: 1000px) {
  .nav-selection { top: 5px; bottom: 5px; border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .main-nav.nav-selection-animated .nav-selection { transition: none; }
}

/* В Android нижняя навигация принадлежит постоянной нативной оболочке. */
html.myclan-native-shell body { padding-bottom: 0 !important; }
html.myclan-native-shell .sidebar parent-navigation { display: none !important; }
html.myclan-native-shell .workspace { padding-bottom: 24px; }
