/* =============================================================================
   Nestwell — warm, calm household UI
   ========================================================================== */

:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --surface-3: #f2efe8;
  --ink: #1f2a24;
  --ink-2: #4e5a53;
  --ink-3: #87908a;
  --line: #e8e4db;
  --line-2: #efece5;

  --accent: #4f7a65;
  --accent-soft: #e7f0ea;
  --accent-ink: #ffffff;
  --clay: #c97b5a;
  --clay-soft: #f8ebe4;
  --danger: #c2544f;
  --danger-soft: #fbeceb;
  --warn: #b7791f;
  --warn-soft: #fcf3e1;
  --info: #4c86b0;
  --info-soft: #e7f0f7;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(31, 42, 36, 0.05);
  --shadow: 0 1px 2px rgba(31, 42, 36, 0.04), 0 6px 20px rgba(31, 42, 36, 0.05);
  --shadow-lg: 0 20px 60px rgba(31, 42, 36, 0.18);
  --sidebar: 256px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Fraunces', Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14.5px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font: 600 30px/1.15 var(--serif); letter-spacing: -0.01em; }
h2 { font-size: 18px; }
h3 { font-size: 15px; font-weight: 600; }
h4 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; }
[hidden] { display: none !important; }

.ic { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -3px; }
svg.ic.xs { width: 14px; height: 14px; vertical-align: -2px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.xsmall { font-size: 11.5px; }
.text-danger { color: var(--danger) !important; }
.text-accent { color: var(--accent); }
.text-clay { color: var(--clay); }
.spacer { flex: 1; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--ink-3); }

/* --------------------------------- buttons -------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
  text-decoration: none !important;
}
.btn:hover { background: var(--surface-2); border-color: #dcd7cc; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(31, 42, 36, 0.05); }
.btn.ghost.light { color: #fff; }
.btn.ghost.light:hover { background: rgba(255,255,255,.15); }
.danger-text { color: var(--danger) !important; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; gap: 5px; }
.btn.sm .ic { width: 16px; height: 16px; }
.btn.icon { width: 38px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn.block { width: 100%; height: 44px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 10px 0 0 10px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 10px 10px 0; }
.btn-group .btn.sm:first-child { border-radius: 9px 0 0 9px; }
.btn-group .btn.sm:last-child { border-radius: 0 9px 9px 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.link { font-size: 13px; font-weight: 500; }

.seg { display: inline-flex; background: var(--surface-3); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; height: 32px; padding: 0 13px; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 13.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg-badge { background: var(--clay); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 6px; line-height: 17px; }

.chip-btn {
  --c: var(--accent);
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border-radius: 99px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.chip-btn .ic { color: var(--c); width: 16px; height: 16px; }
.chip-btn:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 7%, white); }
.chip-btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip-btn.strong { background: var(--c); border-color: var(--c); color: #fff; }
.chip-btn.strong .ic { color: #fff; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------------------------- badges -------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px;
  border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--ink-2);
}
.badge .ic { width: 13px; height: 13px; }
.badge.sm { height: 20px; font-size: 11px; padding: 0 7px; }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.clay { background: var(--clay-soft); color: var(--clay); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.muted { color: var(--ink-3); }

.alert {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px;
  margin-bottom: 16px; color: var(--ink); text-decoration: none !important; font-size: 14px;
}
.alert > span { flex: 1; }
.alert.warn { background: var(--warn-soft); }
.alert.warn > .ic:first-child { color: var(--warn); }
.alert.danger { background: var(--danger-soft); }
.alert.danger .ic { color: var(--danger); }
.alert.info { background: var(--info-soft); }
.alert.info .ic { color: var(--info); }
.alert.slim { padding: 9px 13px; font-size: 13px; margin: 12px 0 0; }
a.alert:hover { filter: brightness(.98); }

.avatar {
  --c: var(--accent);
  display: inline-grid; place-items: center; flex: none !important;
  width: 36px; height: 36px; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 18%, white); color: color-mix(in srgb, var(--c) 80%, black);
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; }
.avatar.xs { width: 22px; height: 22px; font-size: 9.5px; }

.empty { text-align: center; padding: 32px 16px; color: var(--ink-3); }
.empty .ic { width: 32px; height: 32px; margin-bottom: 8px; color: #c5c0b5; }
.empty-inline { color: var(--ink-3); padding: 10px 0 4px; font-size: 14px; }

/* ---------------------------------- shell --------------------------------- */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40;
  background: var(--surface-2); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 14px 14px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; }
.brand strong { display: block; font: 600 19px/1.1 var(--serif); }
.brand small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 30%, transparent); }
.brand-mark.lg { width: 56px; height: 56px; border-radius: 16px; }
.brand-mark.lg .ic { width: 28px; height: 28px; }
.nav-close { display: none; margin-left: auto; }
.nav { flex: 1; overflow-y: auto; }
.nav-group { margin-bottom: 14px; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 0 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 10px;
  color: var(--ink-2); font-weight: 500; text-decoration: none !important; margin-bottom: 1px;
}
.nav-item:hover { background: rgba(31, 42, 36, 0.045); color: var(--ink); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item span { flex: 1; }
.nav-badge { background: var(--clay); color: #fff; font-size: 11px; min-width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center; padding: 0 6px; }
.nav-item.active .nav-badge { background: var(--accent); }
.me-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.me-text { flex: 1; min-width: 0; }
.me-text strong { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { color: var(--ink-3); font-size: 12px; }
.scrim { display: none; }

.main-wrap { margin-left: var(--sidebar); min-height: 100vh; }
.topbar { display: none; }
.view { max-width: 1240px; margin: 0 auto; padding: 32px 36px 64px; }
.tabbar { display: none; }

/* -------------------------------- page layout ------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head > div:first-child { min-width: 0; }
.page-head p.muted { margin-top: 6px; max-width: 620px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.section-title { display: flex; align-items: center; gap: 9px; font: 600 20px var(--serif); margin: 30px 0 14px; }
.section-title .ic { color: var(--accent); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.highlight { border-color: #efd9a8; box-shadow: 0 0 0 3px var(--warn-soft), var(--shadow); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; min-height: 32px; }
.card-head h3, .card-head h4 { flex: 1; display: flex; align-items: center; gap: 8px; }
.card-head h3 .ic { color: var(--accent); }
.card-head.flat { margin: 18px 0 8px; }

.col { display: flex; flex-direction: column; min-width: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; align-items: start; }
.two-col.wide-left { grid-template-columns: 1.6fr 1fr; }
.today-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; align-items: start; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  text-align: left; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
button.stat { cursor: pointer; }
button.stat:hover { border-color: #d8d2c6; }
.stat .ic { grid-row: span 2; width: 40px; height: 40px; padding: 10px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.stat strong { font-size: 21px; line-height: 1.1; }
.stat span { font-size: 12.5px; color: var(--ink-3); }
.stat.warn .ic { background: var(--warn-soft); color: var(--warn); }
.stat.danger .ic { background: var(--danger-soft); color: var(--danger); }

/* progress */
.progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.progress.thin { height: 5px; margin: -4px 0 8px; }
.progress-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.progress-block { display: flex; align-items: center; gap: 12px; flex: 1; max-width: 360px; }
.progress-block .progress { flex: 1; }

/* ---------------------------------- today ---------------------------------- */
.shift-card { background: linear-gradient(135deg, var(--surface) 55%, var(--accent-soft)); }
.shift-card.late { background: linear-gradient(135deg, var(--surface) 55%, var(--clay-soft)); }
.shift-big { font: 600 26px/1.2 var(--serif); margin-bottom: 4px; }
.shift-card .progress { margin-top: 14px; }

.event-list { display: flex; flex-direction: column; gap: 8px; }
.event-row {
  --c: var(--accent);
  display: flex; gap: 14px; padding: 11px 14px; border-radius: 12px; cursor: pointer;
  background: color-mix(in srgb, var(--c) 6%, white); border-left: 4px solid var(--c);
  transition: background .15s;
}
.event-row:hover { background: color-mix(in srgb, var(--c) 11%, white); }
.event-time { width: 58px; flex: none; font-weight: 600; font-size: 13px; color: var(--c); padding-top: 1px; }
.event-time small { display: block; font-weight: 500; color: var(--ink-3); }
.event-main { flex: 1; min-width: 0; }
.event-title { font-weight: 600; }
.event-meta { font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }
.event-who { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.who-dot { --c: var(--accent); display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px 1px 6px; }
.who-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

.todo-list { display: flex; flex-direction: column; }
.todo { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.todo:last-child { border-bottom: 0; }
.check {
  width: 24px; height: 24px; border-radius: 8px; border: 2px solid #cfc9bd; background: var(--surface);
  display: grid; place-items: center; flex: none; cursor: pointer; margin-top: 1px; color: transparent; transition: all .15s;
}
.check .ic { width: 15px; height: 15px; stroke-width: 3; }
.check:hover:not(:disabled) { border-color: var(--accent); color: color-mix(in srgb, var(--accent) 40%, transparent); }
.check.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.check:disabled { cursor: default; }
.todo-main { flex: 1; min-width: 0; }
.todo-title { font-weight: 500; }
.todo.done .todo-title { color: var(--ink-3); text-decoration: line-through; text-decoration-color: #c9c3b7; }
.todo-meta { font-size: 12.5px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 0 5px; }

.simple-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.simple-list li span { flex: 1; }

.upcoming li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.upcoming li:last-child { border-bottom: 0; }
.upcoming li > div { flex: 1; min-width: 0; }
.upcoming strong { display: block; font-weight: 600; font-size: 14px; }
.upcoming small { color: var(--ink-3); font-size: 12.5px; }
.up-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex: none; }
.upcoming .accent .up-icon { background: var(--accent-soft); color: var(--accent); }
.upcoming .clay .up-icon { background: var(--clay-soft); color: var(--clay); }
.upcoming .warn .up-icon { background: var(--warn-soft); color: var(--warn); }
.upcoming .info .up-icon, .up-icon.info { background: var(--info-soft); color: var(--info); }
.up-date { font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }

.kid-glance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kid-glance { --c: var(--accent); border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 7%, white), var(--surface) 60%); }
.kid-glance-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.kid-glance-head > div { flex: 1; }
.kid-glance-head strong { display: block; font: 600 18px var(--serif); }
.kid-glance-head small { color: var(--ink-3); }
.kid-avatar { width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--c, var(--accent)); color: #fff; font: 600 18px var(--serif); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--accent)) 20%, white); }
.kid-avatar.sm { width: 24px; height: 24px; font-size: 12px; box-shadow: none; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; background: var(--surface-3); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.status-pill.sleep { background: #eceefb; color: #5563b8; }
.status-pill.awake { background: var(--warn-soft); color: var(--warn); }
.kid-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.kid-facts div { background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; }
.kid-facts small { display: block; font-size: 11.5px; color: var(--ink-3); }
.kid-facts strong { font-size: 15px; }
.mini-log { margin-bottom: 12px; }
.mini-log li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; color: var(--ink-2); cursor: pointer; }
.mini-log li:hover { color: var(--ink); }
.mini-log .t { font-weight: 600; width: 46px; flex: none; color: var(--ink); }
.mini-log span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-log { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-log.wide { padding: 4px 0 16px; border-bottom: 1px solid var(--line-2); margin-bottom: 16px; }

/* -------------------------------- calendar ---------------------------------- */
.legend { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; font-size: 13px; color: var(--ink-2); padding: 6px 9px; border-radius: 8px; cursor: pointer; }
.legend-item:hover { background: var(--surface-3); }
.legend-item.dim { opacity: .4; text-decoration: line-through; }
.sw { width: 14px; height: 14px; border-radius: 4px; }
.sw.shift { background: var(--accent-soft); border: 1.5px solid var(--accent); }
.sw.off { background: var(--clay-soft); border: 1.5px solid var(--clay); }
.sw.evt { background: var(--info); }
.cat-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); margin-top: -4px; }
.cat-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cat-legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }

.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-dow span { padding: 10px 12px; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell {
  position: relative; min-height: 124px; padding: 8px 8px 6px; text-align: left; border: 0;
  border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: var(--surface);
  display: flex; flex-direction: column; gap: 4px; cursor: pointer; min-width: 0; transition: background .12s;
}
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.other { background: #fcfbf8; }
.cal-cell.other > * { opacity: .45; }
.cal-num { font-weight: 600; font-size: 13px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; margin: -2px 0 0 -2px; }
.cal-cell.today .cal-num { background: var(--accent); color: #fff; }
.cal-shift { font-size: 11.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 6px; align-self: flex-start; white-space: nowrap; }
.cal-shift.changed { color: var(--clay); background: var(--clay-soft); }
.cal-shift.changed::after { content: ' ★'; }
.cal-off { font-size: 11.5px; font-weight: 600; color: var(--clay); background: var(--clay-soft); border-radius: 6px; padding: 2px 6px; align-self: stretch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-off.holiday { color: var(--accent); background: var(--accent-soft); }
.cal-pending { font-size: 11px; font-weight: 600; color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 1px 6px; align-self: flex-start; }
.cal-events { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-evt { --c: var(--accent); display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-evt i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
.cal-evt b { font-weight: 600; color: var(--ink); }
.cal-more { font-size: 11px; color: var(--ink-3); padding-left: 11px; }
.cal-dots { display: none; gap: 3px; }
.cal-shift .short, .cal-off .short { display: none; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }

.wk-summary { display: flex; gap: 28px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.wk-summary small { display: block; font-size: 12px; color: var(--ink-3); }
.wk-summary strong { font: 600 20px var(--serif); }
.wk-summary-note { margin-left: auto; }
.wk-scroll { overflow-x: auto; }
.wk { min-width: 760px; }
.wk-head { display: grid; grid-template-columns: 54px repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.wk-day { border: 0; background: none; padding: 10px 4px; text-align: center; cursor: pointer; border-left: 1px solid var(--line-2); }
.wk-day:hover { background: var(--surface-2); }
.wk-day small { display: block; font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.wk-day strong { display: block; font-size: 20px; line-height: 1.3; }
.wk-day em { font-style: normal; font-size: 11.5px; color: var(--accent); font-weight: 600; }
.wk-day.today strong { color: var(--accent); }
.wk-body { position: relative; display: grid; grid-template-columns: 54px repeat(7, 1fr); }
.wk-hours { position: relative; }
.wk-hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--ink-3); }
.wk-hours span:first-child { transform: none; }
.wk-lines { position: absolute; inset: 0 0 0 54px; pointer-events: none; }
.wk-lines i { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-2); }
.wk-col { position: relative; border-left: 1px solid var(--line-2); cursor: pointer; }
.wk-col.today { background: color-mix(in srgb, var(--accent) 3%, white); }
.wk-col.is-off { background: repeating-linear-gradient(135deg, transparent 0 8px, var(--clay-soft) 8px 10px); }
.wk-shift { position: absolute; left: 3px; right: 3px; background: color-mix(in srgb, var(--accent) 9%, transparent); border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 8px; }
.wk-shift span { position: absolute; bottom: 4px; left: 6px; right: 4px; font-size: 10.5px; font-weight: 600; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-shift.changed { background: color-mix(in srgb, var(--clay) 9%, transparent); border-color: color-mix(in srgb, var(--clay) 50%, transparent); }
.wk-shift.changed span { color: var(--clay); }
.wk-off { position: absolute; top: 8px; left: 6px; right: 6px; font-size: 11.5px; font-weight: 600; color: var(--clay); background: var(--surface); border-radius: 8px; padding: 6px 8px; box-shadow: var(--shadow-sm); }
.wk-evt {
  --c: var(--accent); position: absolute; z-index: 2; text-align: left; border: 0; cursor: pointer;
  background: color-mix(in srgb, var(--c) 16%, white); border-left: 3px solid var(--c); border-radius: 6px;
  padding: 3px 6px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.wk-evt:hover { background: color-mix(in srgb, var(--c) 24%, white); }
.wk-evt strong { display: block; font-size: 11.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-evt small { font-size: 10.5px; color: var(--ink-2); }
.wk-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 3; }
.wk-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

.day-shift { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); }
.day-shift.off { background: var(--clay-soft); }
.day-shift > div { flex: 1; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.day-shift small { color: var(--ink-3); font-size: 12px; }
.day-shift strong { font: 600 20px var(--serif); }
.detail-list { display: flex; flex-direction: column; gap: 10px; }
.detail-list p { display: flex; gap: 8px; align-items: center; }
.note-box { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; font-size: 13.5px; color: var(--ink-2); margin-top: 8px; }

/* ---------------------------------- to-dos --------------------------------- */
.manage-list li { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-bottom: 1px solid var(--line-2); cursor: pointer; border-radius: 8px; }
.manage-list li:hover { background: var(--surface-2); }
.manage-list li:last-child { border-bottom: 0; }
.manage-list li > div { flex: 1; min-width: 0; }
.manage-list strong { display: block; font-weight: 500; }
.manage-list small { color: var(--ink-3); font-size: 12.5px; }
.manage-list.done strong { color: var(--ink-3); text-decoration: line-through; }

/* --------------------------------- playbook -------------------------------- */
.kid-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.kid-tab { --c: var(--accent); display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none !important; }
.kid-tab small { font-weight: 500; color: var(--ink-3); }
.kid-tab.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 14%, transparent); }
.kid-tab .kid-avatar { background: var(--c); }
.playbook-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 0 18px; align-items: start; }
.day-stats { --c: var(--accent); display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.day-stats div { background: color-mix(in srgb, var(--c) 7%, white); border-radius: 12px; padding: 12px; display: grid; }
.day-stats .ic { color: var(--c); margin-bottom: 4px; }
.day-stats strong { font: 600 19px var(--serif); }
.day-stats small { color: var(--ink-3); font-size: 12px; }
.timeline { position: relative; }
.timeline::before { content: ''; position: absolute; left: 86px; top: 8px; bottom: 8px; width: 2px; background: var(--line-2); }
.timeline li { --c: var(--accent); position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 8px 6px; border-radius: 10px; }
.timeline li.clickable { cursor: pointer; }
.timeline li.clickable:hover { background: var(--surface-2); }
.tl-time { width: 64px; flex: none; text-align: right; font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding-top: 6px; }
.tl-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, white); color: var(--c); flex: none; z-index: 1; box-shadow: 0 0 0 3px var(--surface); }
.tl-dot .ic { width: 16px; height: 16px; }
.tl-body { flex: 1; min-width: 0; padding-top: 2px; }
.tl-body strong { font-size: 14px; }
.tl-body p { color: var(--ink-2); font-size: 13.5px; }
.tl-body small { font-size: 11.5px; }
.routine li { display: flex; align-items: flex-start; gap: 12px; padding: 7px 10px; border-radius: 10px; position: relative; }
.routine li span { width: 72px; flex: none; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.routine li p { flex: 1; font-size: 13.5px; }
.routine li.past { opacity: .5; }
.routine li.now { background: var(--accent-soft); }
.routine li.now span { color: var(--accent); }
.routine li em { font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 99px; padding: 1px 8px; }
.care-notes { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.care-notes dt { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; display: flex; gap: 6px; align-items: center; }
.care-notes dd { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.milestones li { display: flex; gap: 14px; padding: 10px 6px; border-bottom: 1px solid var(--line-2); border-radius: 8px; }
.milestones li.clickable { cursor: pointer; }
.milestones li.clickable:hover { background: var(--surface-2); }
.milestones li:last-child { border-bottom: 0; }
.ms-date { width: 56px; flex: none; font-size: 12px; font-weight: 700; color: var(--clay); padding-top: 2px; }
.milestones strong { font-weight: 600; }
.milestones p { font-size: 13.5px; color: var(--ink-2); }

/* --------------------------------- errands --------------------------------- */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.board-col { background: var(--surface-3); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.board-col > h3 { display: flex; align-items: center; gap: 8px; padding: 4px 6px 2px; font-size: 14px; }
.board-col > h3 .ic { color: var(--ink-3); }
.board-col .count { margin-left: auto; font-size: 12px; background: var(--surface); border-radius: 99px; padding: 1px 9px; color: var(--ink-2); }
.board-col .empty-inline { padding: 12px 6px; }
.errand { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 7px; }
.errand[data-prio='urgent']:not(.done) { border-left: 3px solid var(--danger); }
.errand header { display: flex; align-items: center; gap: 7px; }
.errand header small { flex: 1; font-size: 12px; }
.errand h4 { font-size: 15px; }
.errand > p { font-size: 13.5px; color: var(--ink-2); }
.errand-meta { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--ink-2); }
.errand-meta span { display: flex; gap: 6px; align-items: center; }
.errand footer { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.errand.done { opacity: .82; }
.errand.done h4 { text-decoration: line-through; text-decoration-color: #c9c3b7; color: var(--ink-2); }
.done-line { font-size: 12.5px; color: var(--accent); font-weight: 500; }
.errand .note-box { margin-top: 0; font-size: 12.5px; }

/* -------------------------------- inventory -------------------------------- */
.inv-row { display: grid; grid-template-columns: 1fr auto 110px 84px auto; gap: 16px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.inv-row:last-child { border-bottom: 0; }
.inv-main { min-width: 0; }
.inv-main strong { display: block; font-weight: 600; }
.inv-main small { font-size: 12.5px; }
.inv-stock { display: flex; align-items: center; gap: 6px; }
.inv-count { text-align: center; min-width: 46px; line-height: 1.1; }
.inv-count strong { display: block; font-size: 18px; }
.inv-count small { font-size: 11px; color: var(--ink-3); }
.inv-level small { font-size: 11px; }
.inv-row .badge { justify-self: start; }
.inv-actions { display: flex; gap: 4px; justify-content: flex-end; min-width: 150px; }
.meter { position: relative; height: 7px; background: var(--surface-3); border-radius: 99px; overflow: hidden; display: flex; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.meter i { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--surface); }
.meter.low span { background: var(--warn); }
.meter.out span { background: var(--danger); }
.meter.ordered span { background: var(--info); }
.meter.big { height: 10px; margin: 10px 0 6px; }
.meter .pend { background: repeating-linear-gradient(135deg, #e6c98f 0 4px, #f1dcb2 4px 8px); border-radius: 0; }
.store-group { margin-bottom: 14px; }
.store-group h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 4px; display: flex; gap: 10px; align-items: center; }
.shop-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.shop-list li:last-child { border-bottom: 0; }
.shop-list li > div { flex: 1; min-width: 0; }
.shop-list strong { display: block; font-weight: 600; font-size: 14px; }
.shop-list small { font-size: 12.5px; }

/* -------------------------------- time off --------------------------------- */
.balance-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.balance-big { font-size: 15px; color: var(--ink-2); }
.balance-big strong { font: 600 28px var(--serif); color: var(--ink); margin-right: 4px; }
.pto-row { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.pto-row:last-child { border-bottom: 0; }
.pto-date { width: 50px; height: 54px; flex: none; border-radius: 12px; background: var(--clay-soft); color: var(--clay); display: grid; place-content: center; text-align: center; line-height: 1.05; }
.pto-date strong { font: 600 21px var(--serif); }
.pto-date small { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.pto-row.pending .pto-date { background: var(--warn-soft); color: var(--warn); }
.pto-row.declined .pto-date { background: var(--surface-3); color: var(--ink-3); }
.pto-row.declined .pto-main > strong { text-decoration: line-through; color: var(--ink-3); }
.pto-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pto-main small { font-size: 12.5px; }
.pto-note { font-size: 13.5px; color: var(--ink-2); font-style: italic; }
.pto-note.reply { font-style: normal; color: var(--accent); }
.pto-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.pto-list.compact .pto-date { height: 44px; width: 44px; }
.holiday-list li { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--line-2); border-radius: 6px; }
.holiday-list li[data-act] { cursor: pointer; }
.holiday-list li[data-act]:hover { background: var(--surface-2); }
.holiday-list li:last-child { border-bottom: 0; }
.holiday-list li span { width: 52px; font-weight: 700; font-size: 12.5px; color: var(--accent); }
.holiday-list li strong { flex: 1; font-weight: 500; }
.holiday-list li.past { opacity: .45; }

/* -------------------------------- emergency -------------------------------- */
.sos { background: linear-gradient(135deg, #b8453f, #d0605a); color: #fff; border-radius: 20px; padding: 20px 22px; box-shadow: 0 10px 30px rgba(194, 84, 79, .25); }
.sos-main { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sos-main > div { flex: 1; min-width: 220px; }
.sos-main small { display: block; opacity: .85; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.sos-main strong { display: block; font: 600 21px/1.3 var(--serif); }
.sos-main span { opacity: .9; font-size: 13.5px; }
.sos-call { display: inline-flex; align-items: center; gap: 10px; background: #fff; color: #b8453f; font-weight: 800; font-size: 20px; padding: 14px 22px; border-radius: 14px; text-decoration: none !important; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.sos-call .ic { width: 22px; height: 22px; }
.sos-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.25); }
.sos-links a { display: inline-flex; align-items: center; gap: 7px; color: #fff; background: rgba(255,255,255,.14); padding: 7px 12px; border-radius: 10px; font-size: 13px; text-decoration: none !important; }
.sos-links a:hover { background: rgba(255,255,255,.24); }
.sos-links b { font-weight: 700; }
.kid-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kid-info { --c: var(--accent); border-top: 4px solid var(--c); margin-bottom: 0; }
.kid-id { flex: 1; display: flex; align-items: center; gap: 12px; }
.kid-id h3 { font: 600 19px var(--serif); }
.allergy { display: flex; gap: 10px; align-items: flex-start; background: var(--danger-soft); border-radius: 12px; padding: 11px 13px; margin-bottom: 12px; }
.allergy .ic { color: var(--danger); margin-top: 2px; }
.allergy small { font-size: 11.5px; font-weight: 700; color: var(--danger); text-transform: uppercase; letter-spacing: .06em; }
.allergy p { font-size: 13.5px; }
.allergy.none { background: var(--surface-2); }
.allergy.none .ic, .allergy.none small { color: var(--ink-3); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 0; }
.facts .full { grid-column: 1 / -1; }
.facts dt { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.facts dd { margin: 1px 0 0; font-size: 14px; }
.contact-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: start; }
.contact-list li { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.contact-list li:last-child { border-bottom: 0; }
.contact-main { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 1px; }
.contact-main small { font-size: 12.5px; }
.contact-actions { display: flex; gap: 4px; align-items: center; }
.ins-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ins-card { border-radius: 18px; padding: 18px 20px; color: #fff; background: linear-gradient(140deg, #2e5a7c, #4c86b0); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; position: relative; overflow: hidden; }
.ins-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.08); }
.ins-card.dental { background: linear-gradient(140deg, #3d6b56, #5c9278); }
.ins-card.vision { background: linear-gradient(140deg, #6c55a6, #8f78c9); }
.ins-top { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; opacity: .9; min-height: 32px; position: relative; z-index: 1; }
.ins-provider { font: 600 18px var(--serif); }
.ins-card > small { opacity: .85; }
.ins-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 14px 0 10px; }
.ins-card dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.ins-card dd { margin: 0; font-family: ui-monospace, Menlo, monospace; font-size: 13px; display: flex; align-items: center; gap: 4px; }
.copy-btn { border: 0; background: rgba(255,255,255,.15); color: #fff; border-radius: 6px; width: 22px; height: 22px; display: inline-grid; place-items: center; cursor: pointer; }
.ins-phone { color: #fff; font-weight: 600; font-size: 13px; }
.ins-notes { font-size: 12.5px; opacity: .85; margin-top: 6px; }

/* ---------------------------------- logins --------------------------------- */
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); min-width: 240px; }
.search .ic { color: var(--ink-3); }
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; }
.login-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.login-card-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.login-card-item header { display: flex; align-items: center; gap: 11px; }
.login-card-item header > div { flex: 1; min-width: 0; }
.login-card-item header strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-card-item header small { font-size: 12px; }
.app-icon { --c: var(--accent); width: 40px; height: 40px; border-radius: 11px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px; flex: none; }
.cred { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 2px 4px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px 6px 6px 12px; }
.cred small { grid-column: 1 / -1; font-size: 11px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.cred code { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; grid-column: 1; }
.cred code.masked { letter-spacing: 2px; }
.cred .btn.sm { height: 28px; width: 28px; }

/* -------------------------------- documents -------------------------------- */
.doc-hero { display: flex; gap: 18px; align-items: center; padding: 20px 22px; margin-bottom: 18px; border-radius: 18px; background: linear-gradient(135deg, var(--surface) 40%, var(--clay-soft)); border: 1px solid var(--line); box-shadow: var(--shadow); flex-wrap: wrap; }
.doc-hero-icon { width: 58px; height: 72px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--clay); box-shadow: 4px 4px 0 var(--clay-soft); flex: none; }
.doc-hero-icon .ic { width: 28px; height: 28px; }
.doc-hero-main { flex: 1; min-width: 220px; }
.doc-hero-main h3 { font: 600 21px var(--serif); margin: 6px 0 2px; }
.doc-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.doc-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--info-soft); color: var(--info); display: grid; place-items: center; flex: none; }
.doc-name { flex: 1; text-align: left; border: 0; background: none; cursor: pointer; padding: 0; min-width: 0; }
.doc-name strong { display: block; }
.doc-name small { font-size: 12.5px; }
.doc-name:hover strong { color: var(--accent); }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 16px; padding: 26px; border: 2px dashed var(--line); border-radius: 14px; cursor: pointer; text-align: center; transition: all .15s; }
.dropzone .ic { width: 26px; height: 26px; color: var(--accent); }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.doc-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 10px; background: #525659; }
.doc-image { max-width: 100%; border-radius: 10px; display: block; margin: 0 auto; }

/* --------------------------------- settings -------------------------------- */
.sched-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.sched-row strong { width: 100px; font-weight: 500; }
.sched-row input[type='time'] { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: var(--surface); }
.sched-row input:disabled { opacity: .35; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #d6d1c6; border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::before { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(16px); }
.form-actions { display: flex; justify-content: flex-end; padding-top: 14px; }
.people li { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line-2); cursor: pointer; border-radius: 8px; }
.people li:hover { background: var(--surface-2); }
.people li > div { flex: 1; min-width: 0; }
.people strong { display: block; font-weight: 600; }
.people small { font-size: 12.5px; }
.role-blurbs { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.table-wrap { overflow-x: auto; }
.access { width: 100%; border-collapse: collapse; font-size: 13px; }
.access th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.access td { padding: 7px 8px; border-bottom: 1px solid var(--line-2); }
.access td:first-child { font-weight: 500; }
.access td.no { color: #c6c0b4; }

/* ----------------------------------- login ---------------------------------- */
.login { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.login-art { background: radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--accent) 70%, white) 0, transparent 50%), linear-gradient(160deg, var(--accent), color-mix(in srgb, var(--accent) 65%, black)); color: #fff; display: grid; place-items: center; padding: 48px; position: relative; overflow: hidden; }
.login-art::after { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255,255,255,.06); right: -140px; bottom: -140px; }
.login-art-inner { max-width: 420px; position: relative; z-index: 1; }
.login-art .brand-mark { background: rgba(255,255,255,.18); box-shadow: none; margin-bottom: 22px; }
.login-art h1 { font-size: 46px; color: #fff; }
.login-art p { font-size: 18px; opacity: .9; margin-top: 6px; }
.login-points { margin-top: 34px; display: flex; flex-direction: column; gap: 14px; }
.login-points li { display: flex; gap: 12px; align-items: center; font-size: 15px; opacity: .95; }
.login-points .ic { width: 34px; height: 34px; padding: 8px; background: rgba(255,255,255,.14); border-radius: 10px; }
.login-panel { display: grid; place-items: center; padding: 32px 20px; }
.login-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; }
.login-card h2 { font: 600 30px var(--serif); }
.login-card .eyebrow { margin: 0; }
.demo-accounts { margin-top: 12px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.demo-account { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; transition: all .15s; }
.demo-account:hover { border-color: var(--accent); background: var(--accent-soft); }
.demo-account span { flex: 1; }
.demo-account strong { display: block; font-size: 14px; }
.demo-account small { color: var(--ink-3); font-size: 12.5px; }
.demo-account > .ic { color: var(--ink-3); }

/* ---------------------------------- forms ---------------------------------- */
.field { display: flex; flex-direction: column; gap: 5px; grid-column: span 6; min-width: 0; }
.field.half { grid-column: span 3; }
.field.third { grid-column: span 2; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.req { color: var(--danger); margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.field input[type='color'] { padding: 4px; width: 64px; cursor: pointer; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.field small { font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px 12px; }
.form-section { grid-column: 1 / -1; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-top: 6px; }
.check-field { grid-column: span 6; display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; flex-wrap: wrap; }
.check-field.half { grid-column: span 3; }
.check-field input { width: 18px; height: 18px; accent-color: var(--accent); }
.chip-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-opt { --c: var(--accent); cursor: pointer; }
.chip-opt input { position: absolute; opacity: 0; pointer-events: none; }
.chip-opt span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; transition: all .12s; }
.chip-opt input:checked + span { background: var(--c); border-color: var(--c); color: #fff; }
.chip-opt input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.form-error { color: var(--danger); background: var(--danger-soft); padding: 9px 12px; border-radius: 9px; font-size: 13.5px; margin-top: 14px; }
.form-intro { margin-bottom: 14px; }
.quick-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------------------------- modals --------------------------------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; background: rgba(28, 34, 30, .38); display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .18s; backdrop-filter: blur(2px); }
.modal-wrap.show { opacity: 1; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); transform: translateY(10px) scale(.98); transition: transform .2s; }
.modal-wrap.show .modal { transform: none; }
.modal.sm { max-width: 420px; }
.modal.xl { max-width: 980px; }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 8px; }
.modal-head > div { flex: 1; }
.modal-head h2 { font: 600 21px var(--serif); }
.modal-head p { margin-top: 3px; font-size: 13.5px; }
.modal-body { padding: 10px 22px 20px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 20px 20px; flex-wrap: wrap; }
.modal-foot .btn.ghost.danger-text { margin-right: auto; }

/* ---------------------------------- toasts --------------------------------- */
#toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; opacity: 0; transform: translateY(10px); transition: all .25s; max-width: 90vw; }
.toast.show { opacity: 1; transform: none; }
.toast.success .ic { color: #8fd3ad; }
.toast.error { background: var(--danger); }


/* -------------------------------- assistant -------------------------------- */
.ask-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 60; display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 18px 0 16px; border: 0; border-radius: 99px; cursor: pointer;
  background: var(--ink); color: #fff; font-weight: 600; box-shadow: 0 10px 30px rgba(31,42,36,.25); transition: transform .15s;
}
.ask-fab:hover { transform: translateY(-2px); }
.ask-fab .ic { color: #f3c98b; }
.ask-fab.hide { display: none; }
.ask-panel {
  position: fixed; right: 24px; bottom: 24px; z-index: 70; width: 400px; height: min(640px, calc(100vh - 48px));
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transform: translateY(12px) scale(.98); transition: all .2s;
}
.ask-panel.open { opacity: 1; pointer-events: auto; transform: none; }
.ask-panel header { display: flex; align-items: center; gap: 10px; padding: 14px 12px 12px 16px; border-bottom: 1px solid var(--line-2); }
.ask-panel header > div { flex: 1; min-width: 0; }
.ask-panel header strong { display: block; font: 600 16px var(--serif); }
.ask-panel header small { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.ask-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--ink); color: #f3c98b; display: grid; place-items: center; flex: none; }
.ask-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.ask-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ask-empty .chip-btn { height: auto; min-height: 34px; padding: 7px 12px; white-space: normal; text-align: left; }
.ask-empty p:first-child { font-weight: 600; }
.ask-empty p.muted { margin-top: 8px; }
.msg { max-width: 85%; padding: 9px 13px; border-radius: 18px; font-size: 14px; line-height: 1.45; }
.msg p { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg small { display: block; font-size: 10.5px; opacity: .6; margin-top: 3px; }
.msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.error { align-self: stretch; max-width: none; background: var(--danger-soft); color: var(--danger); font-size: 13px; border-radius: 12px; }
.msg.typing { display: flex; gap: 4px; padding: 13px 15px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: blink 1.2s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .2s; }
.msg.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.ask-fab { position: fixed; }
.fab-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; border-radius: 99px; background: var(--clay); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 5px; box-shadow: 0 0 0 2px var(--bg); }
.msg.update { background: #fff8ec; border-color: #f0dcb4; }
.msg-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--warn); margin-bottom: 2px; }
.pref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; margin-top: 6px; }
.pref-grid label { display: flex; gap: 7px; align-items: center; font-size: 12.5px; cursor: pointer; }
.pref-grid input { accent-color: var(--accent); }
.recap-preview { white-space: pre-wrap; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; color: var(--ink-2); margin: 8px 0; }
.ask-input { display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--line-2); }
.ask-input textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 14px; padding: 10px 13px; min-height: 42px; outline: none; line-height: 1.4; }
.ask-input textarea:focus { border-color: var(--accent); }
.ask-input .btn { border-radius: 50%; width: 42px; height: 42px; }

.bridge-status { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); margin: 4px 0 12px; font-size: 13.5px; }
.bridge-status > span:nth-child(2) { flex: 1; }
.bridge-status.on { background: var(--accent-soft); }
.bridge-status.bad { background: var(--danger-soft); color: var(--danger); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex: none; }
.bridge-status.on .dot { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.bridge-status.bad .dot { background: var(--danger); }
.handles li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.handles li > div { flex: 1; min-width: 0; }
.handles li.pref-row { padding: 0 0 10px 40px; }
.checklist { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 12px 0; background: var(--surface-2); }
.checklist.all-done { background: var(--accent-soft); border-color: transparent; }
.checklist-title { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.checklist ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 16px; }
.checklist li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.checklist li .ic { width: 17px; height: 17px; color: var(--ink-3); margin-top: 1px; }
.checklist li.done .ic { color: var(--accent); }
.checklist li.done strong { color: var(--ink-2); font-weight: 500; }
.checklist li small { display: block; color: var(--ink-3); font-size: 12px; line-height: 1.35; }
.numbers li > div small { display: block; }
.numbers li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.numbers li > div { flex: 1; min-width: 0; }
.numbers strong { display: block; font-variant-numeric: tabular-nums; }
.numbers small { font-size: 12.5px; }
.num-icon { width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.empty.slim { padding: 18px 12px; border: 1px dashed var(--line); border-radius: 12px; }
.empty.slim .ic { width: 24px; height: 24px; }
.handles small { display: block; font-size: 12.5px; }
.bridge-log { margin-top: 10px; max-height: 220px; overflow-y: auto; }
.bridge-log li { display: flex; gap: 8px; font-size: 12.5px; padding: 5px 0; border-bottom: 1px solid var(--line-2); }
.bridge-log li b { width: 64px; flex: none; color: var(--ink-3); font-weight: 600; }
.bridge-log li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bridge-log li.error span { color: var(--danger); }
.setup-steps { margin: 10px 0 0 18px; padding: 0; list-style: decimal; font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }


/* ------------------------------ round-2 features ------------------------------ */
.center { text-align: center; }
.who-person { --c: var(--accent); display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: color-mix(in srgb, var(--c) 10%, white); border-radius: 99px; padding: 1px 8px 1px 2px; }
.who-person .avatar.xs { width: 18px; height: 18px; font-size: 8.5px; }
.who-person.anyone { padding: 1px 8px; background: var(--surface-3); color: var(--ink-3); }
.errand header .who-person { margin-left: auto; }
.errand header .who-person + .badge, .errand header .who-person ~ .btn { margin-left: 0; }
.todo-tags { display: flex; gap: 5px; flex-wrap: wrap; margin: 3px 0 1px; }
.cat-tag { font-size: 11px; font-weight: 600; color: var(--ink-3); background: var(--surface-3); border-radius: 6px; padding: 1px 7px; }
.cat-columns { columns: 2 420px; column-gap: 18px; }
.cat-columns .card { break-inside: avoid; display: inline-block; width: 100%; }

.seg.full { display: flex; margin-bottom: 10px; }
.seg.full button { flex: 1; justify-content: center; }
.ahead-group { margin-bottom: 8px; }
.ahead-group.overdue { background: var(--warn-soft); border-radius: 12px; padding: 4px 10px 2px; }
.ahead-day { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 8px 0 2px; display: flex; gap: 5px; align-items: center; }
.ahead-group.overdue .ahead-day { color: var(--warn); }
.ahead-item { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-radius: 10px; }
.ahead-item[data-act] { cursor: pointer; }
.ahead-item[data-act]:hover { background: var(--surface-2); }
.ahead-item > div { flex: 1; min-width: 0; }
.ahead-item strong { display: block; font-size: 13.5px; font-weight: 600; }
.ahead-item small { color: var(--ink-3); font-size: 12px; }
.ahead-who { display: flex; gap: 2px; }
.ahead-item .up-icon { width: 30px; height: 30px; border-radius: 9px; }
.ahead-item.teal .up-icon { background: #e1f3f2; color: #0e8c8c; }
.ahead-item.danger .up-icon { background: var(--danger-soft); color: var(--danger); }
.ahead-item.pink .up-icon { background: #fbe9f0; color: #c2557c; }
.ahead-item.clay .up-icon { background: var(--clay-soft); color: var(--clay); }
.ahead-item.accent .up-icon { background: var(--accent-soft); color: var(--accent); }
.ahead-item.info .up-icon { background: var(--info-soft); color: var(--info); }
.ahead-item.brown .up-icon { background: #f4ece3; color: #946b45; }

.status-pill.nursing { border: 0; cursor: pointer; background: #fbe9f0; color: #c2557c; font: inherit; font-size: 13px; font-weight: 600; }
.nurse-banner { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; cursor: pointer; background: #fbe9f0; color: #c2557c; font-weight: 600; padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; }
.nurse-hint { background: var(--surface-2); border-radius: 10px; padding: 9px 12px; font-size: 13.5px; margin-bottom: 14px; }
.nurse-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nurse-side { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 10px; border-radius: 22px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; transition: all .15s; }
.nurse-side.suggest { border-style: dashed; border-color: #e3a3b9; }
.nurse-side.on { background: #c2557c; border-color: #c2557c; color: #fff; box-shadow: 0 10px 30px rgba(194,85,124,.3); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
.nurse-letter { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 700 20px var(--serif); background: #fbe9f0; color: #c2557c; }
.nurse-side.on .nurse-letter { background: rgba(255,255,255,.2); color: #fff; }
.nurse-side strong { font: 600 34px/1.1 var(--font); font-variant-numeric: tabular-nums; }
.nurse-side small { font-size: 12.5px; opacity: .8; }
.nurse-total { text-align: center; margin: 14px 0 6px; font-size: 15px; }
.nurse-total b { font-variant-numeric: tabular-nums; }

.local-searching { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.local-list li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.local-list li:last-child { border-bottom: 0; }
.local-list li.added { opacity: .7; }
.local-date { width: 46px; flex: none; text-align: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); padding: 5px 0; line-height: 1.1; }
.local-date b { display: block; font: 600 19px var(--serif); }
.local-date small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; }
.local-main { flex: 1; min-width: 0; }
.local-main strong { display: block; }
.local-main small { display: block; font-size: 12.5px; }
.local-main p { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.local-actions { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
#local-card > p.xsmall { margin-top: 8px; }

.cal-bday { font-size: 11px; font-weight: 600; color: #c2557c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-allday { --c: #c2557c; display: block; margin-top: 3px; font-size: 10.5px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); border-radius: 5px; padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.wk-allday.bday { --c: #c2557c; }
.bday-banner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; background: #fbe9f0; border-radius: 12px; padding: 10px 14px; margin-top: 10px; cursor: pointer; }
.bday-banner small { flex-basis: 100%; color: var(--ink-2); }
.bday-list li { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--line-2); cursor: pointer; border-radius: 8px; }
.bday-list li:hover { background: var(--surface-2); }
.bday-list li > div { flex: 1; min-width: 0; }
.bday-list strong { display: block; }
.bday-list small { font-size: 12.5px; }
.bday-icon { font-size: 20px; width: 30px; text-align: center; }
.person-filter { height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--surface); font-size: 13.5px; }
.sync-steps h4 { display: flex; gap: 8px; align-items: center; margin: 14px 0 4px; }
.sync-steps h4:first-child { margin-top: 0; }
.sync-steps > p { font-size: 13.5px; color: var(--ink-2); margin-bottom: 8px; }
.copy-row { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px 6px 6px 12px; margin-bottom: 10px; }
.copy-row code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }

.instacart-btn { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; cursor: pointer; background: #e9f6e4; color: #1f5d14; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.instacart-btn:hover { background: #ddf0d6; }
.instacart-btn span { flex: 1; }
.instacart-btn strong { display: block; }
.instacart-btn small { font-size: 12.5px; opacity: .8; }
.ic-list li { display: flex; gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.ic-list li > div { flex: 1; min-width: 0; }
.ic-list strong { display: block; font-size: 14px; }
.ic-list li.done { opacity: .5; }

.pet-hero { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.pet-hero h2 { font: 600 24px var(--serif); }
.pet-avatar { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 34px; background: color-mix(in srgb, var(--c) 18%, white); flex: none; }
.pet-emoji { font-size: 18px; }
.pet-vets { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.pet-due { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.pet-due > div { display: flex; gap: 8px; align-items: center; background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }
.pet-due > div.overdue { background: var(--danger-soft); color: var(--danger); }
.pet-due span { color: var(--ink); }
.pet-records li { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line-2); border-radius: 8px; flex-wrap: wrap; }
.pet-records li.clickable { cursor: pointer; }
.pet-records li.clickable:hover { background: var(--surface-2); }
.pet-records li > div { flex: 1; min-width: 160px; }
.pet-records strong { display: block; }
.pet-records small { display: block; font-size: 12.5px; }
.rec-type { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--info-soft); color: var(--info); flex: none; }
.rec-type.vet-visit { background: var(--danger-soft); color: var(--danger); }
.rec-type.grooming { background: #fbe9f0; color: #c2557c; }
.rec-type.medication { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 640px) {
  .local-list li { flex-wrap: wrap; }
  .local-actions { width: 100%; justify-content: flex-start; padding-left: 60px; }
  .nurse-side strong { font-size: 28px; }
  .person-filter { width: 100%; }
}


/* ============================== round-3 features ============================== */

/* Settings layout & controls */
.settings-layout { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
.settings-tabs { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow-sm); }
.settings-tabs button { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left; font-weight: 500; color: var(--ink-2); }
.settings-tabs button:hover { background: var(--surface-2); color: var(--ink); }
.settings-tabs button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.settings-pane { min-width: 0; }
.pane-head { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; }
.pane-head h2 { font: 600 24px var(--serif); }
.pane-head p { margin-top: 4px; max-width: 640px; }
.toggle-row { display: flex; align-items: center; gap: 14px; padding: 12px 2px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row > span:first-child { flex: 1; min-width: 0; }
.toggle-row strong { display: block; font-weight: 500; font-size: 14px; }
.toggle-row small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 1px; }
.toggle-row.disabled { opacity: .5; cursor: default; }
.switch { width: 46px; height: 28px; }
.switch span::before { width: 22px; height: 22px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.switch span { transition: background .2s ease; }
.switch span::before { transition: transform .22s cubic-bezier(.3,1.4,.6,1); }
.inline-form { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 200px; height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--surface); outline: none; }
.inline-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

.wizard { display: flex; flex-direction: column; gap: 4px; counter-reset: wiz; }
.wiz-step { display: flex; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--line-2); }
.wiz-step:last-child { border-bottom: 0; }
.wiz-step > div { flex: 1; min-width: 0; }
.wiz-step strong { display: block; margin-bottom: 2px; }
.wiz-step p { font-size: 13.5px; color: var(--ink-2); margin-bottom: 6px; }
.wiz-dot { counter-increment: wiz; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; font-weight: 700; font-size: 13px; color: var(--ink-3); }
.wiz-dot:empty::before { content: counter(wiz); }
.wiz-step.done .wiz-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.wiz-step.done .wiz-dot .ic { width: 15px; height: 15px; stroke-width: 3; }
.wiz-step.done strong { color: var(--ink-2); }
.handle-share { display: flex; gap: 14px; align-items: center; background: var(--surface-2); border-radius: 12px; padding: 10px; margin-top: 6px; }
.handle-share img { border-radius: 8px; background: #fff; }

.people-cards { display: flex; flex-direction: column; }
.person-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.person-head > div { flex: 1; min-width: 160px; }
.person-head strong { display: block; }
.person-head small { font-size: 12.5px; }
.person-note { margin-top: 10px; display: flex; gap: 6px; align-items: center; }
.perm-grid { margin-top: 14px; border-top: 1px solid var(--line-2); }
.perm-row { display: grid; grid-template-columns: 1fr auto 34px; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.perm-row:last-child { border-bottom: 0; }
.perm-label { display: flex; gap: 9px; align-items: center; font-weight: 500; font-size: 14px; }
.perm-label .ic { color: var(--ink-3); }
.perm-row.locked { opacity: .65; }
.perm-seg { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; }
.perm-seg button { border: 0; background: none; min-width: 64px; height: 30px; padding: 0 10px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--ink-3); transition: all .15s; }
.perm-seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.perm-seg button.on.none { color: var(--ink-2); }
.perm-seg button.on.view { color: var(--info); }
.perm-seg button.on.edit { color: var(--accent); }
.perm-default { font-size: 11px; color: var(--ink-3); text-align: center; }
.pref-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px 24px; }
.pref-person-head { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; border-bottom: 2px solid var(--line-2); }
.pref-person-head small { margin-left: auto; font-size: 11.5px; }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 18px; }
.conn-card.connected { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.conn-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.conn-head > div { flex: 1; }
.conn-head strong { display: block; }
.conn-head small { display: block; font-size: 12.5px; }
.conn-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.device-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.device-list li:last-child { border-bottom: 0; }
.device-list li > div { flex: 1; min-width: 160px; }
.device-list strong { display: block; font-weight: 500; }
.tips { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--ink-2); padding-left: 2px; }
.tips li { padding-left: 16px; position: relative; }
.tips li::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.pair-box { text-align: center; }
.pair-box img { margin: 0 auto 12px; display: block; border-radius: 12px; border: 1px solid var(--line); }
.sec-checks li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.sec-checks li:last-child { border-bottom: 0; }
.sec-checks .ic { color: var(--accent); margin-top: 2px; }
.sec-checks li.todo .ic { color: var(--warn); }
.sec-checks strong { display: block; }
.sec-checks small { color: var(--ink-2); font-size: 13px; }

/* Our Health */
.health-folder { --c: var(--accent); border-top: 4px solid var(--c); }
.h-upcoming { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.h-upcoming > div { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; background: var(--warn-soft); color: var(--ink); border-radius: 99px; padding: 4px 10px; }
.h-upcoming > div.overdue { background: var(--danger-soft); }
.hrec { display: flex; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line-2); cursor: pointer; border-radius: 10px; }
.hrec:hover { background: var(--surface-2); }
.hrec:last-child { border-bottom: 0; }
.hrec-icon { width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, white); color: var(--c); display: grid; place-items: center; flex: none; }
.hrec-main { flex: 1; min-width: 0; }
.hrec-main strong { display: block; }
.hrec-main small { display: block; font-size: 12.5px; }
.hrec-main p { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; white-space: pre-wrap; }
.hrec-list.compact .hrec-main p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hrec-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.hrec-tags a.badge { text-decoration: none; }
.audit-list li { display: flex; gap: 8px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.audit-list li span { flex: 1; }

/* Guest lists */
.send-grid { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start; }
.send-qr { text-align: center; }
.send-qr img { border-radius: 12px; border: 1px solid var(--line); display: block; margin: 0 auto 6px; }
.send-actions { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.send-btn { display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.send-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.send-btn .ic { color: var(--accent); }
.send-btn strong { display: block; font-size: 14px; }
.send-btn small { color: var(--ink-3); font-size: 12px; }
.guest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 18px; }
.guest-card.off { opacity: .6; }
.guest-card .progress { margin: 8px 0 10px; }
.guest-items li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; padding: 3px 0; }
.guest-items li.done { color: var(--ink-3); text-decoration: line-through; }
.guest-items li .ic { margin-top: 3px; }
.guest-items li.done .ic { color: var(--accent); }
.guest-items small { display: block; text-decoration: none; color: var(--info); font-style: italic; }
.guest-card .btn-row { margin-top: 10px; }

/* Public guest page */
body.guest-page { background: var(--bg); }
.guest-wrap { max-width: 560px; margin: 0 auto; padding: 28px 18px 60px; }
.guest-head h1 { font: 600 30px var(--serif); margin-top: 2px; }
.guest-head p { margin-top: 6px; }
.guest-info { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 0; }
.guest-info a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--ink); text-decoration: none; font-weight: 500; }
.guest-notes { background: var(--warn-soft); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.guest-notes p { white-space: pre-wrap; margin-top: 2px; }
.guest-progress { display: flex; align-items: center; gap: 12px; margin: 20px 0 8px; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.guest-progress .progress { flex: 1; }
.guest-list li { display: flex; gap: 14px; padding: 16px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.guest-list li.done { background: var(--surface-2); }
.guest-list li.done strong { text-decoration: line-through; color: var(--ink-3); }
.guest-list .check { width: 32px; height: 32px; border-radius: 10px; color: transparent; }
.guest-list .check.on { color: #fff; }
.gi-main { flex: 1; min-width: 0; }
.gi-main strong { display: block; font-size: 16px; }
.gi-main small { display: block; font-size: 13px; margin-top: 2px; }
.gi-main details { margin-top: 8px; font-size: 13px; }
.gi-main summary { color: var(--accent); cursor: pointer; font-weight: 600; }
.gi-main textarea { width: 100%; margin: 8px 0 6px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; }
.guest-done { text-align: center; font-size: 18px; font-weight: 600; background: var(--accent-soft); color: var(--accent); border-radius: 16px; padding: 18px; margin: 14px 0; }
.guest-error { text-align: center; padding: 80px 20px; }
.guest-error h1 { font: 600 34px var(--serif); margin-bottom: 8px; }

@media (max-width: 900px) {
  .settings-layout { grid-template-columns: 1fr; gap: 12px; }
  .settings-tabs { position: static; flex-direction: row; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  .settings-tabs button { flex: none; height: 38px; }
  .settings-tabs button span { white-space: nowrap; }
}
@media (max-width: 640px) {
  .perm-row { grid-template-columns: 1fr; gap: 6px; }
  .perm-default { display: none; }
  .perm-seg { width: 100%; }
  .perm-seg button { flex: 1; }
  .send-grid { grid-template-columns: 1fr; }
}


/* ------------------------------ calm Today page ------------------------------ */
/* One column, lots of air, one thing in focus; everything else folded. */
.calm { max-width: 760px; margin: 0 auto; }
.calm-head { padding: 8px 0 22px; }
.calm-date { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.calm-head h1 { font-size: 34px; margin: 4px 0 10px; }
.calm-sentence { font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 620px; }
.calm-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.calm-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.calm-needs { margin-bottom: 22px; }
.need { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; background: var(--warn-soft); color: var(--ink); text-decoration: none !important; font-weight: 500; margin-bottom: 6px; }
.need > .ic:first-child { color: var(--warn); }
.need span { flex: 1; }
.need > .ic:last-child { color: var(--ink-3); }
.calm-next { margin-bottom: 26px; }
.next-main { display: flex; align-items: center; gap: 18px; padding: 22px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer; }
.next-main.empty { cursor: default; }
.next-when { min-width: 74px; font: 600 20px var(--serif); color: var(--accent); }
.next-when .check { width: 30px; height: 30px; }
.next-main strong { display: block; font-size: 19px; font-weight: 600; line-height: 1.3; }
.next-main small { display: block; color: var(--ink-3); font-size: 14px; margin-top: 2px; }
.next-then { padding: 10px 22px 0; color: var(--ink-3); font-size: 14.5px; cursor: pointer; }
.next-then span { font-weight: 600; color: var(--ink-2); margin-right: 4px; }
.calm-sections { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.calm-section { border-bottom: 1px solid var(--line); }
.calm-section summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 17px 4px; cursor: pointer; }
.calm-section summary::-webkit-details-marker { display: none; }
.calm-section summary > .ic:first-child { color: var(--ink-3); }
.cs-title { font-weight: 600; font-size: 16px; }
.cs-sum { flex: 1; text-align: right; color: var(--ink-3); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cs-chev { color: var(--ink-3); transition: transform .2s; flex: none; }
.calm-section[open] .cs-chev { transform: rotate(180deg); }
.calm-section summary:hover .cs-title { color: var(--accent); }
.cs-body { padding: 2px 4px 22px 34px; }
.cs-body > .card, .cs-body .card { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; }
.cs-body #ahead-card > .card-head h3, .cs-body #local-card > .card-head h3, .cs-body .shift-card .card-head h3 { visibility: hidden; }
.cs-body .shift-card { background: none !important; }
.cs-body .link { display: inline-block; margin-top: 10px; }
.cs-body .kid-glance { background: var(--surface); }
.calm-expand { display: block; margin: 18px auto 0; border: 0; background: none; cursor: pointer; color: var(--ink-3); }
.calm-expand:hover { color: var(--accent); }
.add-menu { display: flex; flex-direction: column; gap: 8px; }
.add-menu button { display: flex; align-items: center; gap: 14px; text-align: left; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; }
.add-menu button:hover { border-color: var(--accent); background: var(--accent-soft); }
.add-menu .ic { color: var(--accent); }
.add-menu strong { display: block; }
.add-menu small { color: var(--ink-3); font-size: 12.5px; }
@media (max-width: 640px) {
  .calm-head h1 { font-size: 28px; }
  .calm-sentence { font-size: 15.5px; }
  .cs-sum { display: none; }
  .cs-body { padding-left: 4px; }
  .next-main { padding: 18px; gap: 14px; }
}

/* -------------------------------- responsive ------------------------------- */
@media (max-width: 1100px) {
  .ins-grid { grid-template-columns: 1fr 1fr; }
  .inv-row { grid-template-columns: 1fr auto 84px auto; }
  .inv-level { display: none; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(28,34,30,.35); z-index: 35; }
  .nav-close { display: inline-flex; }
  .main-wrap { margin-left: 0; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .topbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 30; height: 56px; padding: 0 10px; background: rgba(246, 244, 239, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .topbar-title { flex: 1; font: 600 17px var(--serif); }
  .topbar-right { display: flex; gap: 8px; align-items: center; }
  .view { padding: 20px 16px 40px; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--ink-3); text-decoration: none !important; border: 0; background: none; padding: 4px 0; cursor: pointer; }
  .tab .ic { width: 22px; height: 22px; }
  .tab.active { color: var(--accent); }
  .two-col, .two-col.wide-left, .today-grid, .playbook-grid, .contact-groups, .kid-info-grid { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr; }
  .balance-row { grid-template-columns: 1fr; gap: 0; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 26px; }
  .legend { margin-left: 0; }
  #toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .ask-fab { bottom: calc(80px + env(safe-area-inset-bottom)); right: 16px; height: 44px; padding: 0 14px; }
  .ask-fab span { display: none; }
  .ask-fab { width: 48px; height: 48px; padding: 0; justify-content: center; }
  .ask-panel { inset: 0; width: auto; height: auto; border-radius: 0; z-index: 90; }
  .ask-input { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}

@media (max-width: 640px) {
  .kid-glance-grid { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; }
  .head-actions { width: 100%; }
  .head-actions .seg { flex: 1; }
  .head-actions .seg button { flex: 1; justify-content: center; }
  .ins-grid { grid-template-columns: 1fr; }
  .cal-cell { min-height: 64px; padding: 5px 3px; align-items: center; }
  .cal-events, .cal-pending { display: none; }
  .cal-dots { display: flex; }
  .cal-shift, .cal-off { font-size: 9.5px; padding: 1px 3px; align-self: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .cal-shift .full, .cal-off .full { display: none; }
  .cal-shift .short, .cal-off .short { display: inline; }
  .cal-shift.changed::after { content: ''; }
  .cal-dow span { padding: 8px 0; text-align: center; font-size: 10.5px; }
  .day-stats { grid-template-columns: 1fr 1fr; }
  .inv-row { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .inv-row .badge { grid-row: 1; grid-column: 2; justify-self: end; }
  .inv-stock { grid-column: 1; }
  .inv-actions { grid-column: 2; min-width: 0; }
  .field.half, .field.third, .check-field.half { grid-column: span 6; }
  .modal-wrap { padding: 0; place-items: end stretch; }
  .modal { max-width: none !important; border-radius: 20px 20px 0 0; max-height: 92vh; }
  .modal-foot { border-radius: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .timeline::before { left: 70px; }
  .tl-time { width: 48px; font-size: 11.5px; }
  .pto-row { flex-wrap: wrap; }
  .pto-side { flex-direction: row; width: 100%; justify-content: space-between; align-items: center; padding-left: 64px; }
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 36px 24px 30px; }
  .login-art h1 { font-size: 34px; }
  .login-points { display: none; }
  .search { min-width: 0; width: 100%; }
  .wk-summary { gap: 18px; }
  .wk-summary-note { display: none; }
  .contact-actions { width: 100%; }
  .stat { padding: 12px; }
  .stat .ic { width: 36px; height: 36px; padding: 9px; }
}

/* ---------------------------------- print ---------------------------------- */
@media print {
  body { background: #fff; font-size: 12px; }
  .sidebar, .topbar, .tabbar, .head-actions, .btn, .copy-btn, #toasts, #assistant-root { display: none !important; }
  .main-wrap { margin: 0; padding: 0; }
  .view { padding: 0; max-width: none; }
  .card, .ins-card, .sos { box-shadow: none !important; break-inside: avoid; }
  .sos { background: #fff !important; color: #000; border: 3px solid #c2544f; }
  .sos-call { border: 2px solid #c2544f; }
  .sos-links a { color: #000; background: #f4f4f4; }
  .ins-card { color: #000; background: #fff !important; border: 1px solid #ccc; }
  .ins-card::after { display: none; }
  .contact-groups, .kid-info-grid { grid-template-columns: 1fr 1fr; }
}
.cat-columns .cat-tag { display: none; }

/* Quieter sidebar counts — only things waiting on you get color. */
.nav-badge { background: var(--surface-3); color: var(--ink-2); font-weight: 600; }
.nav-badge.urgent { background: var(--clay); color: #fff; }
.nav-item.active .nav-badge { background: color-mix(in srgb, var(--accent) 15%, white); color: var(--accent); }
/* Kid cards wrap instead of pushing the page sideways (long log lines can't force width). */
.kid-glance-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.kid-glance, .kid-glance > * { min-width: 0; }
.calm-section .cs-body { min-width: 0; overflow: hidden; }

/* Signed in on the wall iPad */
.kiosk-bar { display: flex; align-items: center; gap: 10px; padding: 10px 20px; background: var(--accent-soft); border-bottom: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line)); font-size: 14px; flex-wrap: wrap; position: sticky; top: 0; z-index: 25; }
.kiosk-bar > .ic { color: var(--accent); }
.kiosk-bar span { flex: 1; min-width: 200px; }
@media (max-width: 900px) { .kiosk-bar { top: 56px; } }

/* Phone screen after scanning the iPad's sign-in QR */
.handoff { min-height: 60vh; display: grid; place-items: center; padding: 20px 0; }
.handoff-card { max-width: 420px; width: 100%; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 30px 24px; box-shadow: var(--shadow); }
.handoff-card > .ic { width: 44px; height: 44px; color: var(--accent); margin-bottom: 10px; }
.handoff-card h1 { font-size: 26px; margin-bottom: 8px; }
.handoff-card p { color: var(--ink-2); margin-bottom: 18px; }
.handoff-card.done > .ic { color: var(--accent); }
.handoff-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.clock-line { margin-top: 8px; font-size: 13.5px; color: var(--accent); font-weight: 500; display: flex; gap: 6px; align-items: center; }

/* ------------------------------- first-run setup ------------------------------ */

.setup-card { max-width: 460px; gap: 16px; }
.setup-card h2 { font: 600 30px var(--serif); }
.setup-card .muted { margin-top: -8px; }

.setup-progress { display: flex; align-items: center; gap: 6px; }
.setup-progress span { width: 26px; height: 4px; border-radius: 2px; background: var(--line); transition: background .2s; }
.setup-progress span.on { background: var(--accent); }
.setup-progress span.done { background: color-mix(in srgb, var(--accent) 45%, white); }
.setup-progress small { margin-left: auto; color: var(--ink-2); font-size: 12px; font-weight: 600; }

.setup-divider { display: flex; align-items: center; gap: 10px; margin: 2px 0 -4px; }
.setup-divider::before, .setup-divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.setup-divider span { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }

.setup-sub { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 12px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.setup-sub-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.setup-sub-head strong { font-size: 14px; }

.setup-add { display: flex; align-items: center; gap: 8px; width: 100%; padding: 11px 14px; border: 1px dashed var(--line); border-radius: var(--radius); background: none; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.setup-add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.setup-add .ic { width: 16px; height: 16px; }

.setup-note { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.setup-note .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; }

.field .opt { font-weight: 500; color: var(--ink-3, var(--ink-2)); font-size: 12px; margin-left: 6px; opacity: .8; }
.field .hint { font-size: 12px; color: var(--ink-2); }

.setup-label { font-size: 13px; font-weight: 600; color: var(--ink-2); display: block; margin-bottom: 7px; }
.setup-days { display: block; }

.setup-day-row { display: flex; align-items: center; gap: 8px; }
.setup-day-row > span:first-child { width: 36px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.setup-day-row .to { font-size: 12px; color: var(--ink-2); }
.setup-day-row input[type='time'] { flex: 1; min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: var(--surface); font: inherit; font-size: 13px; }

.setup-actions { display: flex; align-items: center; gap: 8px; }
.setup-actions .btn.primary { margin-left: auto; }

.setup-choices { display: flex; flex-direction: column; gap: 10px; }
.setup-choice { display: flex; align-items: center; gap: 13px; text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font: inherit; cursor: pointer; color: inherit; }
.setup-choice:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.setup-choice.primary { border-color: var(--accent); background: var(--accent-soft); }
.setup-choice > div:nth-child(2) { flex: 1; min-width: 0; }
.setup-choice strong { display: block; font-size: 15px; }
.setup-choice small { color: var(--ink-2); font-size: 13px; }
.setup-choice-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.setup-choice.primary .setup-choice-ic { background: var(--surface); }
.setup-choice > .ic:last-child { color: var(--ink-2); width: 18px; height: 18px; }

.setup-done-mark { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink, #fff); display: grid; place-items: center; }
.setup-done-mark .ic { width: 28px; height: 28px; stroke-width: 2.4; }

.setup-creds { display: flex; flex-direction: column; gap: 8px; }
.setup-cred { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.setup-cred > div { flex: 1; min-width: 0; }
.setup-cred strong { display: block; font-size: 14px; }
.setup-cred small { color: var(--ink-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; display: block; }
.setup-cred code { font-size: 13px; font-weight: 600; background: var(--accent-soft); color: var(--accent); padding: 4px 8px; border-radius: 7px; white-space: nowrap; }

@media (max-width: 900px) {
  .setup .login-art { display: none; }
  .setup-card { max-width: 100%; }
}
