/* The web app: base, components, pages. Phone first (390 px), reflows at 320 px and 200% text, grows to desktop.
   Calm, warm, a porch light at dusk: pictures are the hero, strong color only for what needs you. */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* WCAG 2.4.11: a focused control is never hidden under the sticky header or the tab bar */
html { scroll-padding-top: 76px; scroll-padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); }
body {
  margin: 0; font-family: var(--font); font-size: var(--fs-body); line-height: var(--lh); color: var(--text); background: var(--bg);
  min-height: 100vh; min-height: 100dvh; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* The porch light: a warm glow at the top of every page. */
body::before {
  content: ""; position: fixed; inset: -20vh -10vw auto -10vw; height: 70vh; pointer-events: none; z-index: -1;
  background: radial-gradient(60% 55% at 22% 18%, var(--glow), transparent 70%), radial-gradient(50% 45% at 80% 0%, var(--glow-soft), transparent 75%);
  opacity: var(--porch, 0.85); transition: opacity 400ms var(--ease);
}
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: var(--fs-title); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-headline); font-weight: 600; }
[hidden] { display: none !important; } /* components set display (flex, grid); hidden must still hide */
.card > h2 + .row, .card > h2 + div > .row, .card > h2 + p { margin-top: var(--s2); }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
.num, time, .tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.caption { font-size: var(--fs-caption); font-weight: 500; color: var(--muted); }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-wash); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); padding: 10px 14px; border-radius: var(--r-chip); box-shadow: var(--shadow-lift); }
.skip:focus { top: 12px; }

/* ---------- shell: header, main, tab bar ---------- */
.app-header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s2);
  padding: calc(env(safe-area-inset-top) + 10px) var(--s4) 10px; min-height: 56px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  transition: box-shadow var(--t-fast) var(--ease);
}
.app-header.scrolled { box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; min-height: 44px; }
.brand .mark { width: 30px; height: 30px; }
.app-header .spacer { flex: 1; }
.icon-btn {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: var(--r-pill);
  border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--text); font-weight: 600; font-size: 0.9375rem;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; }
.lang-btn { border-color: var(--line); padding: 0 14px; }
main { display: block; width: 100%; max-width: 720px; margin: 0 auto; padding: var(--s2) var(--s4) calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--s8)); }
main:focus { outline: none; }
.no-tabs main { padding-bottom: var(--s10); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: center;
  padding: 6px max(env(safe-area-inset-left), 8px) calc(env(safe-area-inset-bottom) + 6px) max(env(safe-area-inset-right), 8px);
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.5) blur(18px); -webkit-backdrop-filter: saturate(1.5) blur(18px);
  border-top: 1px solid var(--line);
}
.tabbar ul { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; max-width: 560px; margin: 0; padding: 0; list-style: none; }
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; border-radius: 14px;
  text-decoration: none; color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.01em;
}
.tabbar a svg { width: 24px; height: 24px; transition: transform var(--t-fast) var(--spring); }
.tabbar a[aria-current="page"] { color: var(--accent); }
.tabbar a[aria-current="page"] svg { transform: translateY(-1px) scale(1.06); }
.no-tabs .tabbar { display: none; }
footer.legal { max-width: 720px; margin: 0 auto; padding: 0 var(--s4) calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--s6)); font-size: var(--fs-caption); color: var(--muted); }
.no-tabs footer.legal { padding-bottom: var(--s6); }
footer.legal .legal-links { margin-top: var(--s2); }
footer.legal .legal-links a { display: inline-block; min-height: 24px; padding: 2px 0; }

/* ---------- page header (sub pages) ---------- */
.page-head { display: flex; align-items: center; gap: var(--s2); margin: var(--s1) 0 var(--s4); min-height: 44px; }
.page-head h1 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 10px 0 2px; margin-left: -6px; color: var(--accent); text-decoration: none; font-weight: 600; border-radius: var(--r-pill); }
.back svg { width: 22px; height: 22px; }
.section-label { display: flex; align-items: center; gap: var(--s2); margin: var(--s6) var(--s1) var(--s2); font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stack > * + * { margin-top: var(--s3); }

/* ---------- cards ---------- */
.card {
  position: relative; background: var(--surface); border-radius: var(--r-card); padding: var(--s4);
  box-shadow: var(--shadow), inset 0 1px 0 var(--edge);
}
.card + .card { margin-top: var(--s3); }
.card.flush { padding: 0; overflow: hidden; }
.appear { animation: appear var(--t-card) var(--spring) both; }
@keyframes appear { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }
.appear:nth-child(2) { animation-delay: 40ms; } .appear:nth-child(3) { animation-delay: 80ms; } .appear:nth-child(4) { animation-delay: 120ms; } .appear:nth-child(5) { animation-delay: 160ms; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 48px; padding: 0 var(--s5);
  border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 1rem; cursor: pointer; text-decoration: none; text-align: center; line-height: 1.2;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px -8px var(--accent); }
.btn.quiet { background: var(--surface-2); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); padding: 0 var(--s3); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); background: var(--surface); }
.btn.small { min-height: 44px; padding: 0 var(--s4); font-size: 0.9375rem; }
.btn.block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: default; transform: none; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.row.end { justify-content: flex-end; }
.row.split > * { flex: 1 1 170px; }

/* ---------- chips and pills ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 2px 10px; border-radius: var(--r-chip);
  background: var(--surface-2); color: var(--text); font-size: 0.875rem; font-weight: 600; white-space: nowrap;
}
.chip svg { width: 16px; height: 16px; color: var(--muted); }
.chip .n { font-variant-numeric: tabular-nums; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px 4px 10px; border-radius: var(--r-pill);
  background: var(--surface-2); font-size: 0.875rem; font-weight: 600; color: var(--text); text-decoration: none; max-width: 100%;
  transition: background var(--t-fast) var(--ease);
}
.pill svg { width: 16px; height: 16px; flex: none; }
.pill .word { font-weight: 700; }
.pill .sep { color: var(--muted); font-weight: 500; }
.pill.ok { background: var(--ok-wash); } .pill.ok .word, .pill.ok svg { color: var(--ok); }
.pill.warn { background: var(--warn-wash); } .pill.warn .word, .pill.warn svg { color: var(--warn); }
.pill.bad { background: var(--bad-wash); } .pill.bad .word, .pill.bad svg { color: var(--bad); }
.pill.info .word, .pill.info svg { color: var(--accent); } .pill.info { background: var(--accent-wash); }
.pill.setup { background: transparent; border: 1px dashed var(--line); } .pill.setup .word { color: var(--accent); }
.pill.muted .word { color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.muted { background: var(--muted); }

/* status wash: a soft color wash across a card when its state changes */
.wash { animation: wash 900ms var(--ease); }
@keyframes wash { 0% { box-shadow: inset 0 0 0 999px var(--accent-wash), var(--shadow); } 100% { box-shadow: inset 0 0 0 999px transparent, var(--shadow); } }

/* ---------- the home status line ---------- */
.greeting { margin: var(--s3) var(--s1) var(--s4); }
.greeting h1 { font-size: 1.625rem; }
.status-line { display: inline-flex; align-items: center; gap: var(--s2); margin-top: var(--s2); font-weight: 600; color: var(--text); }
.status-line .dot { width: 11px; height: 11px; box-shadow: 0 0 0 4px var(--ok-wash); }
.status-line.warn .dot { box-shadow: 0 0 0 4px var(--warn-wash); }
.status-line .muted { font-weight: 500; }

/* ---------- needs-you card ---------- */
.needs { background: var(--warn-wash); box-shadow: none; border: 1px solid color-mix(in srgb, var(--warn) 22%, transparent); }
.needs .eyebrow { display: flex; align-items: center; gap: 6px; font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--warn); }
.needs .eyebrow svg { width: 16px; height: 16px; }
.needs h2 { margin-top: 6px; }
.needs .body { margin-top: 2px; }
.needs .meta { margin-top: 4px; }
.needs .row { margin-top: var(--s3); }
.needs .dismiss { position: absolute; top: 6px; right: 6px; }

/* ---------- camera card ---------- */
.cam-card { display: block; padding: 0; overflow: hidden; text-decoration: none; color: inherit; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.cam-card:hover { box-shadow: var(--shadow-lift), inset 0 1px 0 var(--edge); }
.cam-card:active { transform: scale(0.99); }
.cam-card.offline .picture img { filter: grayscale(1) brightness(0.8); }
.cam-card.removed { opacity: 0.6; }
.picture { position: relative; aspect-ratio: 16 / 9; background: var(--picture-bg); overflow: hidden; }
.picture img { width: 100%; height: 100%; object-fit: cover; transition: opacity 300ms var(--ease); }
.picture img.loading { opacity: 0; }
.picture .overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.picture .placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: var(--s4); color: var(--muted); gap: var(--s2); }
.picture .placeholder svg { width: 64px; height: 64px; margin: 0 auto; }
.picture .badge {
  position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill);
  background: rgba(10, 14, 24, 0.58); color: #fff; font-size: 0.8125rem; font-weight: 600; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #57C98F; box-shadow: 0 0 0 0 rgba(87, 201, 143, 0.6); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(87, 201, 143, 0.55); } 50% { box-shadow: 0 0 0 6px rgba(87, 201, 143, 0); } }
.cam-body { padding: var(--s3) var(--s4) var(--s4); }
.cam-title { display: flex; align-items: center; gap: var(--s3); }
.cam-title h2 { flex: 1; min-width: 0; font-size: 1.125rem; overflow-wrap: anywhere; }
.cam-title .state { font-size: var(--fs-caption); font-weight: 600; }
.cam-body .chips { margin-top: var(--s3); }
.cam-body .pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s3); }
.cam-card .note { display: flex; gap: 8px; align-items: flex-start; margin-top: var(--s3); font-size: 0.9375rem; color: var(--muted); }
.cam-card .note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }

/* ---------- health ring ---------- */
.ring { position: relative; flex: none; width: var(--size, 44px); height: var(--size, 44px); }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--surface-2); }
.ring .fill { stroke: var(--ok); stroke-linecap: round; transition: stroke-dashoffset 600ms var(--ease); }
.ring.fair .fill { stroke: var(--warn); } .ring.poor .fill { stroke: var(--bad); } .ring.unknown .fill { stroke: var(--muted); }
.ring .value { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.8125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ring.big { --size: 88px; } .ring.big .value { font-size: 1.375rem; }

/* ---------- hero (bins on pickup eve) ---------- */
.hero {
  overflow: hidden; padding: 0; color: var(--text);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--surface)) 0%, var(--surface) 62%);
}
.hero .hero-in { display: grid; grid-template-columns: 1fr auto; gap: var(--s4); padding: var(--s4); align-items: start; }
.hero .eyebrow { font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--f-spot); display: flex; gap: 6px; align-items: center; }
.hero .eyebrow svg { width: 16px; height: 16px; }
.hero h2 { margin-top: 4px; font-size: 1.375rem; font-weight: 700; }
.hero .thumb { width: 108px; aspect-ratio: 4 / 3; border-radius: 14px; background-color: var(--picture-bg); background-repeat: no-repeat; box-shadow: inset 0 0 0 1px var(--line); }
.hero .row { margin-top: var(--s3); }
.streak { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 600; color: var(--muted); margin-top: var(--s2); }
.streak svg { width: 16px; height: 16px; color: var(--accent); }

/* ---------- lists (More, settings) ---------- */
.list { margin: 0; padding: 0; list-style: none; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow), inset 0 1px 0 var(--edge); overflow: hidden; }
.list > li + li { border-top: 1px solid var(--line); }
.list a, .list .item { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: 10px var(--s4); color: var(--text); text-decoration: none; }
.list a:hover { background: var(--surface-2); }
.list .ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--c, var(--muted)); flex: none; }
.list .ico svg { width: 20px; height: 20px; }
.list .grow { flex: 1; min-width: 0; }
.list .grow small { display: block; color: var(--muted); font-size: 0.875rem; }
.list .chev { width: 18px; height: 18px; color: var(--muted); flex: none; }
.list .val { color: var(--muted); font-size: 0.9375rem; }

/* ---------- switch (a checkbox with role="switch") ---------- */
.switch { position: relative; display: inline-block; flex: none; width: 52px; height: 32px; }
.switch input { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: background var(--t-fast) var(--ease); }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform var(--t-fast) var(--spring); }
.switch input:checked ~ .track { background: var(--ok); box-shadow: none; }
.switch input:checked ~ .knob { transform: translateX(20px); }
.switch input:focus-visible ~ .track { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch input:disabled ~ .track, .switch input:disabled ~ .knob { opacity: 0.5; }
.switch .on-mark { position: absolute; left: 9px; top: 9px; width: 14px; height: 14px; color: #fff; opacity: 0; transition: opacity var(--t-fast); }
.switch input:checked ~ .on-mark { opacity: 1; }

/* ---------- segmented control (radio group) ---------- */
.seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: var(--r-pill); background: var(--surface-2); flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 var(--s4); border-radius: var(--r-pill); font-weight: 600; font-size: 0.9375rem; color: var(--muted); transition: background var(--t-fast), color var(--t-fast); }
@media (max-width: 420px) { .seg span { padding: 0 var(--s3); } } /* four choices (30-120 min) stay on one line at 390 */
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.choice-big { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.choice-big .btn { min-height: 56px; font-size: 1.0625rem; }
.choice-big .btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- forms ---------- */
label.field { display: block; margin-top: var(--s4); font-weight: 600; }
label.field > span { display: block; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="url"], input[type="number"], input[type="time"], input[type="date"], input:not([type]), select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
textarea { min-height: 88px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 56px; padding: 6px 0; }
.check-row + .check-row { border-top: 1px solid var(--line); }
.check-row .grow { flex: 1; min-width: 0; }
.check-row small { display: block; color: var(--muted); font-size: 0.875rem; }
.help { font-size: 0.9375rem; color: var(--muted); margin-top: 6px; }
.status { min-height: 1.45em; margin-top: var(--s2); font-weight: 600; }
.status.err { color: var(--bad); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-weight: 600; }
.code-input { letter-spacing: 0.4em; font-size: 1.375rem; text-align: center; font-variant-numeric: tabular-nums; }
.safety { display: flex; gap: var(--s2); align-items: flex-start; margin-top: var(--s4); padding: var(--s3); border-radius: 14px; background: var(--surface-2); color: var(--muted); font-size: 0.9375rem; }
.safety svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }

/* ---------- day scrubber ---------- */
.scrubber { margin-top: var(--s3); user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.scrubber .now-text { display: flex; align-items: center; gap: var(--s2); min-height: 28px; font-weight: 600; }
.scrubber .now-text svg { width: 18px; height: 18px; }
.scrubber .track {
  position: relative; height: 56px; margin-top: var(--s2); border-radius: 14px; background: var(--surface-2); cursor: pointer; outline: none;
  background-image: linear-gradient(to right, transparent calc(25% - 0.5px), var(--line) calc(25% - 0.5px), var(--line) calc(25% + 0.5px), transparent calc(25% + 0.5px), transparent calc(50% - 0.5px), var(--line) calc(50% - 0.5px), var(--line) calc(50% + 0.5px), transparent calc(50% + 0.5px), transparent calc(75% - 0.5px), var(--line) calc(75% - 0.5px), var(--line) calc(75% + 0.5px), transparent calc(75% + 0.5px));
}
.scrubber .track:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.scrubber .night { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--text) 5%, transparent); }
.scrubber .tick { position: absolute; bottom: 10px; width: 3px; height: 22px; margin-left: -1.5px; border-radius: 2px; background: var(--c, var(--muted)); opacity: 0.85; }
.scrubber .tick.tall { height: 32px; }
.scrubber .thumb {
  position: absolute; top: 4px; bottom: 4px; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
  transition: left 180ms var(--ease);
}
.scrubber .thumb::after { content: ""; position: absolute; top: -6px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--surface); }
.scrubber .nowline { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--muted); opacity: 0.4; }
.scrubber .hours { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.75rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.scrubber .legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: var(--s2); font-size: 0.8125rem; color: var(--muted); }
.scrubber .legend span { display: inline-flex; align-items: center; gap: 6px; }
.scrubber .legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

/* ---------- timeline list ---------- */
.day-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.day-nav h2 { font-size: 1.0625rem; text-align: center; flex: 1; }
.events { list-style: none; margin: 0; padding: 0; }
.events li { display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: 6px 0; }
.events li + li { border-top: 1px solid var(--line); }
.events li.sel { background: var(--accent-wash); border-radius: 12px; margin: 0 calc(-1 * var(--s2)); padding-left: var(--s2); padding-right: var(--s2); }
.events .ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--c, var(--muted)); flex: none; }
.events .ico svg { width: 18px; height: 18px; }
.events .grow { flex: 1; min-width: 0; }
.events time { color: var(--muted); font-size: 0.9375rem; }
.hour-label { margin: var(--s4) 0 2px; font-size: var(--fs-caption); font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }

/* ---------- report story ---------- */
.story { position: relative; min-height: min(70vh, 560px); display: flex; flex-direction: column; padding: var(--s4); overflow: hidden; }
.story .bars { display: flex; gap: 4px; }
.story .bars span { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.story .bars span.done, .story .bars span.on { background: var(--accent); }
.story .bars span.on { opacity: 1; }
.story .slide { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: var(--s8) var(--s2); }
.story .slide .eyebrow { display: flex; align-items: center; gap: 8px; font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c, var(--muted)); }
.story .slide .eyebrow svg { width: 18px; height: 18px; }
.story .slide .big { font-size: 4rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin-top: var(--s4); font-variant-numeric: tabular-nums; }
.story .slide .of { font-size: 1.375rem; font-weight: 700; color: var(--muted); }
.story .slide h2 { font-size: 1.625rem; font-weight: 700; margin-top: var(--s3); }
.story .slide p { margin-top: var(--s2); font-size: 1.125rem; }
.story .slide p.muted { font-size: 1rem; }
.story .nav { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.story .hit { position: absolute; top: 40px; bottom: 72px; width: 38%; background: none; border: 0; cursor: pointer; }
.story .hit.prev { left: 0; } .story .hit.next { right: 0; }
.story .slide.enter { animation: slide-in 280ms var(--ease) both; }
@keyframes slide-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* ---------- skeletons, empty states, toasts ---------- */
.skel { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 12px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 55%, transparent), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel.line { height: 14px; margin-top: 10px; } .skel.line.w60 { width: 60%; } .skel.line.w40 { width: 40%; }
.skel.pic { aspect-ratio: 16 / 9; border-radius: 0; }
.empty { display: grid; justify-items: center; gap: var(--s3); padding: var(--s8) var(--s4); text-align: center; color: var(--muted); }
.empty svg { width: 120px; height: 90px; }
.empty p { color: var(--text); max-width: 32ch; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: var(--r-pill); background: var(--text); color: var(--bg); font-weight: 600; box-shadow: var(--shadow-lift); animation: appear var(--t-card) var(--spring) both; }
.no-tabs .toast { bottom: 24px; }

/* ---------- dialogs (confirm, the first-run tour) ---------- */
dialog { border: 0; padding: 0; border-radius: 24px; background: var(--surface); color: var(--text); width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow-lift); }
dialog::backdrop { background: var(--scrim); backdrop-filter: blur(2px); }
dialog .dlg { padding: var(--s6) var(--s5) var(--s5); }
dialog h2 { font-size: 1.25rem; }
dialog p { margin-top: var(--s2); }
dialog .row { margin-top: var(--s5); }
.tour .art { display: grid; place-items: center; height: 150px; border-radius: 18px; background: linear-gradient(160deg, var(--accent-wash), var(--surface-2)); color: var(--accent); }
.tour .art svg { width: 96px; height: 96px; }
.tour .dots { display: flex; gap: 6px; justify-content: center; margin-top: var(--s4); }
.tour .dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.tour .dots span.on { background: var(--accent); width: 20px; border-radius: 4px; }

/* ---------- onboarding ---------- */
.progress { display: flex; align-items: center; gap: var(--s3); margin: var(--s2) 0 var(--s4); }
.progress .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: var(--p, 0%); background: var(--accent); border-radius: 3px; transition: width 400ms var(--ease); }
.lead { font-size: 1.0625rem; color: var(--muted); margin-top: var(--s2); }
.pick { display: flex; align-items: center; gap: var(--s3); min-height: 64px; }
.pick + .pick { border-top: 1px solid var(--line); }
.pick .thumbnail { width: 72px; aspect-ratio: 16 / 9; border-radius: 10px; background: var(--picture-bg); display: grid; place-items: center; color: var(--muted); flex: none; overflow: hidden; }
.pick .thumbnail svg { width: 26px; height: 26px; }
.pick.dim { opacity: 0.55; }
.sees { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s2); }
.guide { counter-reset: g; list-style: none; padding: 0; margin: var(--s3) 0 0; display: grid; gap: var(--s2); }
.guide li { counter-increment: g; display: flex; gap: var(--s3); align-items: center; padding: var(--s3); border-radius: 14px; background: var(--surface-2); }
.guide li::before { content: counter(g); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; flex: none; }
.done-art { display: grid; place-items: center; height: 180px; color: var(--accent); }
.done-art svg { width: 140px; height: 140px; }

/* ---------- zone editor ---------- */
.zone-editor { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 16px; overflow: hidden; }
.zone-editor .box { position: absolute; border: 3px solid var(--accent); border-radius: 6px; background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: 0 0 0 9999px rgba(10, 14, 24, 0.32); cursor: move; }
.zone-editor .box:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.zone-editor .handle { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; display: grid; place-items: center; cursor: nwse-resize; }
.zone-editor .handle::after { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.zone-editor .handle.ne, .zone-editor .handle.sw { cursor: nesw-resize; }
.day-strip { margin: 12px 0 4px; align-self: stretch; }
.day-strip .bars7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 88px; align-items: end; }
.day-strip .col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.day-strip .col i { display: block; width: 100%; max-width: 28px; border-radius: 6px 6px 2px 2px; background: var(--c, var(--accent)); }
.day-strip .col b { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.story .more-link { margin-top: 12px; position: relative; z-index: 2; }
.week-line { text-align: center; margin: 20px 0 0; }
.week-line a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.week-line a svg { width: 16px; height: 16px; }
.urgent-email { margin-top: var(--s4); }
.urgent-email legend { margin-bottom: 2px; }
.subscribe-head { text-align: center; margin-bottom: var(--s4); }
.subscribe-head .done-art { height: 110px; margin: 8px auto 4px; }
.subscribe-head .done-art svg { width: 88px; height: 88px; }
.trial-card { border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-wash); box-shadow: none; }
.trial-card .eyebrow { display: flex; align-items: center; gap: 6px; font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.trial-card .eyebrow svg { width: 16px; height: 16px; }
.trial-card h2 { margin-top: 6px; }
.trial-card .body { margin-top: 2px; }
.trial-card .help { margin-top: var(--s3); }
.chips.recap .chip svg { width: 16px; height: 16px; }
.chips.recap .chip strong { font-variant-numeric: tabular-nums; }
.zone-tools { display: grid; grid-template-columns: repeat(6, minmax(36px, 52px)); gap: 6px; justify-content: center; padding: 10px 0 0; }
.cam-hero .zone-tools { padding: 10px var(--s4) 0; }
.zone-tools .btn { min-width: 36px; width: 100%; padding-left: 0; padding-right: 0; font-size: 1.125rem; }
@media (min-width: 640px) { .cam-hero .zone-tools { padding: 10px 0 0; } }
.zone-editor .label { position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 0.8125rem; font-weight: 700; white-space: nowrap; }
.zone-shape { fill: color-mix(in srgb, var(--accent) 18%, transparent); stroke: var(--accent); stroke-width: 3; vector-effect: non-scaling-stroke; }
.zone-shape.warn { stroke: #F2B655; fill: rgba(242, 182, 85, 0.22); }
.zone-shape.ok { stroke: #57C98F; fill: rgba(87, 201, 143, 0.16); }
.zone-tag { font: 700 13px var(--font); fill: #fff; paint-order: stroke; stroke: rgba(10, 14, 24, 0.75); stroke-width: 4px; }

/* ---------- camera page ---------- */
.cam-hero { margin: 0 calc(-1 * var(--s4)); }
.cam-hero .picture { border-radius: 0; }
@media (min-width: 640px) { .cam-hero { margin: 0; } .cam-hero .picture { border-radius: var(--r-card); } }
.health-row { display: flex; gap: var(--s4); align-items: center; }
.health-parts { display: grid; gap: 6px; flex: 1; }
.health-parts div { display: flex; align-items: center; gap: 8px; font-size: 0.9375rem; }
.health-parts svg { width: 18px; height: 18px; }
.health-parts .ok { color: var(--ok); } .health-parts .warn { color: var(--warn); } .health-parts .na { color: var(--muted); }

/* ---------- alert page ---------- */
.alert-card h1 { margin-top: var(--s3); }
.alert-card .body { margin-top: var(--s2); font-size: 1.0625rem; }
.question { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); }
.question .q { font-weight: 600; margin-bottom: var(--s2); }
.claimed { display: flex; gap: var(--s2); align-items: center; margin-top: var(--s4); padding: var(--s3); border-radius: 14px; background: var(--ok-wash); font-weight: 600; }
.claimed svg { width: 20px; height: 20px; color: var(--ok); }

/* ---------- tables (history) ---------- */
.log li { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--s3); align-items: start; }
.log .ico { grid-row: span 2; }
.log .when { color: var(--muted); font-size: 0.875rem; }

/* ---------- sign-in ---------- */
.signin { max-width: 440px; margin: 6vh auto 0; }
.signin .logo { width: 72px; height: 72px; margin: 0 auto var(--s4); filter: drop-shadow(0 10px 24px var(--glow)); }
.signin h1 { text-align: center; font-size: 1.625rem; }
.signin .lead { text-align: center; }
/* Oct 10: the agreement line, the demo button and the footer share the card's center line (they sat on a left edge) */
.signin .signin-legal { margin-top: var(--s4); text-align: center; }
.signin .signin-demo { margin-top: var(--s4); }
.no-tabs footer.legal { text-align: center; max-width: 472px; }

/* ---------- wider screens ---------- */
@media (min-width: 900px) {
  main { max-width: 1080px; }
  .home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); align-items: start; }
  .home-grid .card + .card { margin-top: 0; }
  /* the tabs are moved into the header's row here (app.js), so they take part in its layout */
  .app-header .tabbar { position: static; padding: 0; background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; width: auto; flex: none; }
  .tabbar ul { grid-template-columns: repeat(4, auto); gap: 4px; }
  .tabbar a { flex-direction: row; gap: 8px; min-height: 40px; padding: 0 14px; font-size: 0.9375rem; border-radius: var(--r-pill); }
  .tabbar a[aria-current="page"] { background: var(--accent-wash); }
  .tabbar a svg { width: 20px; height: 20px; }
  main { padding-bottom: var(--s10); }
  footer.legal { padding-bottom: var(--s6); }
  .toast { bottom: 24px; }
  .story { min-height: 520px; }
}

/* ---------- reduced motion, forced colors, print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 100ms !important; scroll-behavior: auto !important; }
  .live-dot { animation: none; }
  .skel::after { display: none; }
}
@media (forced-colors: active) {
  .card, .list, .chip, .pill, .btn, .switch .track, .scrubber .track { border: 1px solid CanvasText; }
  .scrubber .tick, .scrubber .thumb, .dot, .live-dot { background: Highlight; forced-color-adjust: none; }
  .ring .fill { stroke: Highlight; } .ring .track { stroke: GrayText; }
  .zone-editor .box { border-color: Highlight; }
}
.boot { padding: 24px; color: var(--muted); }
.status:empty { min-height: 0; margin: 0; }
.section-label svg { width: 16px; height: 16px; flex: none; }
a.chip { text-decoration: none; min-height: 36px; }
.events li.hour-label { border-top: 0; min-height: 0; padding: 0; }
.events li.hour-label + li { border-top: 0; }
.picture .overlay .zone-label { pointer-events: none; }
/* static pages (privacy, support) */
.prose { max-width: 720px; margin: 0 auto; padding: var(--s6) var(--s4) var(--s10); }
.prose h1 { font-size: 1.75rem; margin: var(--s4) 0 var(--s2); }
.prose h2 { margin: var(--s6) 0 var(--s2); font-size: 1.125rem; }
.prose p, .prose li { margin-top: var(--s2); }
.prose ul { padding-left: 1.2em; }
.prose .brand { margin-bottom: var(--s2); }
.prose .brand img { width: 30px; height: 30px; }
.home-grid { margin-top: var(--s3); }

/* The demo home (row 453.15): the label on every screen and the chip in the header (text on the washes ≥ 4.5:1). */
.demo-chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: var(--r-pill); border: 1px solid var(--accent); background: var(--accent-wash); color: var(--text); font-size: var(--fs-caption); font-weight: 700; }
.demo-chip[hidden] { display: none; }
.demo-banner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin: 0 0 var(--s4); padding: var(--s3) var(--s4); border: 1px solid var(--accent); border-radius: var(--r-card); background: var(--accent-wash); }
.demo-banner .grow { flex: 1 1 220px; min-width: 0; }
.demo-banner .demo-title { display: flex; align-items: center; gap: var(--s2); font-weight: 700; }
.demo-banner .demo-title svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.demo-banner .caption { margin-top: 2px; }

/* The setup check (row 453.16): a checklist per camera, each line an icon + word pill, what it found, the fix. */
.ready-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); }
.checklist { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.checklist > li { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.checklist > li:first-child { border-top: 0; }
.checklist .pill { flex: none; min-width: 6.5rem; justify-content: center; }
.checklist .grow { flex: 1; min-width: 0; }
.checklist .grow > strong { display: block; overflow-wrap: anywhere; }
.checklist .help { margin-top: var(--s1); }
.checklist .fix { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s2); }
.ready-test { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.ready-test h3 { font-size: var(--fs-headline); }
.test-results:empty { display: none; }
@media (max-width: 360px) { .checklist > li { flex-direction: column; gap: var(--s2); } }
/* Home: alerts held by the daily limit or quiet hours (one quiet line under the greeting). */
.held-line { text-align: left; margin: var(--s1) 0 0; }
.held-line a { gap: 6px; }

/* The setup guide, always reachable until finished (Oct 10, 2026): the header chip, Home's card, the sticky
   "Back to setup" bar on pages opened from the guide, and the location steps. */
.setup-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--accent); background: var(--accent-wash); color: var(--text); font-weight: 700; font-size: var(--fs-caption); text-decoration: none; }
.setup-chip[hidden] { display: none; }
.setup-chip svg { width: 16px; height: 16px; color: var(--accent); }
.setup-chip .n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--on-accent); }
@media (max-width: 380px) { .setup-chip > .word { display: none; } }
/* tabs and chip share the header row from 900px: the chip drops its word until there's room for it */
@media (min-width: 900px) and (max-width: 1099px) { .setup-chip > .word { display: none; } }
.setup-card { border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-wash); box-shadow: none; }
.setup-card .eyebrow { display: flex; align-items: center; gap: 6px; font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.setup-card .eyebrow svg { width: 16px; height: 16px; color: var(--accent); }
.setup-card h2 { margin-top: 6px; }
.setup-card .bar { display: block; margin-top: var(--s3); height: 6px; border-radius: 3px; background: var(--surface); overflow: hidden; }
.setup-card .bar i { display: block; height: 100%; width: var(--p, 0%); background: var(--accent); border-radius: 3px; }
.setup-back { position: sticky; top: calc(env(safe-area-inset-top) + 64px); z-index: 15; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3);
  margin: 0 0 var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r-card); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: var(--surface); box-shadow: var(--shadow); }
.setup-back.nudge { background: var(--accent-wash); border-color: var(--accent); }
.setup-back .caption { overflow-wrap: anywhere; }
.place-wait { border: 1px dashed var(--line); background: var(--surface-2); box-shadow: none; }
.place-wait h2 { display: flex; align-items: center; gap: 8px; }
.place-wait h2 svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.place-cam { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s3); margin-top: var(--s3); }
.place-cam .field { margin-top: 0; flex: 1; min-width: 12rem; }
.place-card.saved { outline: 2px solid color-mix(in srgb, var(--ok) 55%, transparent); }

/* Look now result line under the picture (camera page) */
.look-says { margin: 8px 2px 0; min-height: 1.2em; }
.look-says:empty { display: none; }

/* Task 522 rows 1-3: the Ring connection guard banner (cg-), the Snapshot Capture coach (sc-), picture freshness (pf-) */
.cg-banner { margin: 0 0 var(--s4); padding: var(--s3) var(--s4); border: 1px solid var(--bad); border-left-width: 4px; border-radius: var(--r-card); background: var(--bad-wash); }
.cg-banner .cg-title { display: flex; align-items: center; gap: var(--s2); font-size: 1.0625rem; margin-bottom: var(--s2); }
.cg-banner .cg-title svg { width: 20px; height: 20px; flex: none; color: var(--bad); }
.cg-banner p + p, .cg-banner ol + p { margin-top: var(--s2); }
.cg-banner .cg-label { font-weight: 700; }
.cg-banner .cg-steps { margin: var(--s1) 0 0; padding-left: 1.4em; }
.cg-banner .cg-steps li + li { margin-top: 2px; }
.sc-coach { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }
/* In the setup check the coach sits inside a checklist line: no second divider there. */
.checklist .sc-coach { margin-top: var(--s2); padding-top: 0; border-top: 0; }
.sc-coach .sc-line { display: flex; align-items: flex-start; gap: var(--s2); }
.sc-coach .sc-line svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.sc-coach .sc-line.ok svg { color: var(--ok); } .sc-coach .sc-line.warn svg { color: var(--warn); } .sc-coach .sc-line.bad svg { color: var(--bad); } .sc-coach .sc-line.muted svg { color: var(--muted); }
.sc-coach .sc-how { margin-top: var(--s2); }
.sc-coach .sc-how summary { cursor: pointer; font-weight: 600; min-height: 24px; }
.sc-coach .sc-steps { margin: var(--s2) 0 0; padding-left: 1.4em; }
.pf-line { display: inline-flex; align-items: center; gap: 6px; }
p.pf-line { display: flex; margin: 8px 2px 0; }
.pf-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.pf-dot.pf-fresh { background: #57C98F; }
.pf-dot.pf-stale { background: #F0B44C; }
.pf-dot.pf-none { background: #9AA3B2; }
.pf-cam .pf-dot.pf-fresh { background: var(--ok); } .pf-cam .pf-dot.pf-stale { background: var(--warn); } .pf-cam .pf-dot.pf-none { background: var(--muted); }
@media (forced-colors: active) {
  .pf-dot { background: Highlight; forced-color-adjust: none; }
  .pf-dot.pf-none { background: GrayText; }
  .cg-banner { border: 2px solid CanvasText; }
}
.picture .placeholder.pf-ph p { color: var(--text); }

/* More → Alerts: per-person alert schedules, the test notification (task 522.6-7). Prefixed ap-. */
.ap-own { border: 0; padding: 0; margin: var(--s3) 0 0; min-width: 0; }
.ap-own + .card { margin-top: var(--s3); } /* the cards inside the fieldset aren't .card siblings of the ones around it */
.ap-own:disabled .card { opacity: 0.62; }
.ap-feature + .ap-feature { border-top: 1px solid var(--line); }
.ap-kinds { border: 0; padding: 0 0 var(--s3) var(--s4); margin: 0; min-width: 0; }
.ap-kind { display: flex; gap: var(--s3); align-items: center; min-height: 44px; cursor: pointer; }
.ap-kind input { width: 22px; height: 22px; flex: none; accent-color: var(--accent); }
.ap-test { margin-top: var(--s3); }
.ap-following { display: flex; gap: var(--s2); align-items: center; margin: var(--s3) 0; }
.ap-following svg { width: 18px; height: 18px; flex: none; }

/* Add to Home Screen card on Home (public/lib/install.js, task 522.7). Prefixed ins-. */
.ins-card { margin-bottom: var(--s3); }
.ins-head { display: flex; gap: var(--s3); align-items: flex-start; }
.ins-head h2 { font-size: 1.0625rem; font-weight: 700; }
.ins-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-wash); color: var(--accent); flex: none; }
.ins-ico svg { width: 24px; height: 24px; }
.ins-card > .row { margin-top: var(--s3); }


/* Task 524.1: the setup guide's "Turn On Snapshot Capture" step (ss-), Home's warning card (so-). */
.req-badge { display: inline-block; vertical-align: middle; margin-left: 4px; padding: 2px 10px; border-radius: 999px; background: var(--bad-wash); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.02em; }
.ss-needs { color: var(--text); }
.ss-warn { margin-top: var(--s4); padding: var(--s3) var(--s4); border: 1px solid var(--bad); border-left-width: 4px; border-radius: var(--r-card); background: var(--bad-wash); }
.ss-warn.wait { border-color: var(--warn); background: var(--warn-wash); }
.ss-warn h2 { display: flex; align-items: center; gap: var(--s2); font-size: 1.0625rem; margin-bottom: var(--s2); }
.ss-warn h2 svg { width: 20px; height: 20px; flex: none; color: var(--bad); }
.ss-warn.wait h2 svg { color: var(--warn); }
.ss-warn p + p { margin-top: var(--s2); }
.ss-ok { color: var(--text); }
.ss-ok svg { color: var(--ok); }
.so-card { margin-bottom: var(--s3); border: 1px solid var(--bad); border-left-width: 4px; background: var(--bad-wash); box-shadow: none; }
.so-card .eyebrow { display: flex; align-items: center; gap: 6px; font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.so-card .eyebrow svg { width: 16px; height: 16px; color: var(--bad); }
.so-card h2 { margin-top: 6px; }
.so-card .so-path { margin-top: var(--s2); font-weight: 600; }
.so-card .row { margin-top: var(--s3); flex-wrap: wrap; }
.cam-card .note.so-note { color: var(--text); }
.cam-card .note.so-note svg { color: var(--bad); }
@media (forced-colors: active) { .ss-warn, .so-card, .req-badge { border: 2px solid CanvasText; } }
/* Task 527.1: homes (mh-): the header's home switcher and More → Homes. */
.mh-switch { display: inline-flex; align-items: center; min-width: 0; }
.mh-switch[hidden] { display: none; }
.mh-switch select { width: auto; max-width: 11rem; min-height: 44px; padding: 6px 30px 6px 12px; border-radius: var(--r-pill); font-weight: 600; font-size: var(--fs-caption); text-overflow: ellipsis; }
@media (max-width: 420px) { .mh-switch select { max-width: 10rem; } .app-header.mh-on .brand-name { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } } /* still the link's name */
.mh-note { margin-top: var(--s3); }
.mh-home .mh-head { display: flex; align-items: center; gap: var(--s3); }
.mh-home .mh-head h2 { overflow-wrap: anywhere; }
.mh-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.mh-pair .field { min-width: 0; }
@media (max-width: 480px) { .mh-pair { grid-template-columns: 1fr; } }
.mh-sub { margin-top: var(--s5, 20px); font-size: 1rem; }
.mh-cams li { align-items: center; }
.mh-cams .mh-move { width: auto; max-width: 10rem; min-height: 44px; }
.mh-member { padding-top: var(--s2); }
.mh-member + .mh-member { border-top: 1px solid var(--line); margin-top: var(--s2); }
.mh-picks { border: 0; margin: 0; padding: 0 0 var(--s2); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.mh-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; }
.mh-check input { width: 22px; height: 22px; accent-color: var(--accent); }
