/* Hearth — Ember Design System stylesheet (Spec: HRT-015 §2–§9).
   One accent, warm canvas, sentences not labels, nothing bounces.
   GUI revamp (2026-08): palette + type adopted from the agreed sleek proposal
   (docs/hearth/proposal-today-sleek.html) — cooled paper, muted terracotta
   accent, Space Grotesk display + IBM Plex Mono counts. Everything themes
   through these tokens, so warm↔cool is a one-block switch. */

:root {
  /* Paper (light) — cooled palette from the sleek proposal */
  --hearth-bg: #F9F7F4;          /* warm paper */
  --hearth-bg-2: #F1EEE9;        /* section bars / recessed wash */
  --hearth-surface: #FCFCFA;     /* near-neutral white card */
  --hearth-ink: #2B2C2E;         /* cool graphite text */
  --hearth-ink-soft: #76777A;    /* cool gray */
  --hearth-ink-faint: #9C9D9F;   /* faintest label gray */
  --hearth-ember: #D9663E;       /* muted terracotta — the one accent */
  --hearth-ember-2: #E6825A;     /* lighter terracotta (hover/gradient) */
  --hearth-ember-deep: #C85A34;  /* pressed / deep accent */
  --hearth-ember-glow: rgba(217, 102, 62, 0.20);
  --hearth-peach: #F1E7DE;       /* icon-tile / banner wash */
  --hearth-peach-2: #F7F2EC;
  --hearth-calm: #789A6B;        /* sage — success / done / flow */
  --hearth-calm-soft: #E4EBDD;
  --hearth-amber: #DBA646;       /* snooze */
  --hearth-amber-2: #E5B95E;
  --hearth-hairline: #E5E4DF;
  --hearth-line-2: #D6D3CC;      /* darker hairline = accent-tick default */
  --hearth-danger: #B3372F;

  --r-card: 16px;
  --r-chip: 12px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  /* Type: Space Grotesk is the display+body face; IBM Plex Mono for counts/labels.
     --serif is retained as the "heading" token name to avoid touching every
     selector; it now points at the display face. */
  --serif: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --shadow-card: 0 1px 2px rgba(40, 42, 46, 0.04), 0 12px 30px -14px rgba(40, 42, 46, 0.16);
  --shadow-sm: 0 1px 2px rgba(40, 42, 46, 0.04), 0 6px 16px -10px rgba(40, 42, 46, 0.15);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

[data-theme="fireside"] {
  --hearth-bg: #1C1917;
  --hearth-bg-2: #221E1B;
  --hearth-surface: #26221F;
  --hearth-ink: #F2EBE3;
  --hearth-ink-soft: #A89E94;
  --hearth-ink-faint: #7C736B;
  --hearth-ember: #E6825A;
  --hearth-ember-2: #F0996F;
  --hearth-ember-deep: #D9663E;
  --hearth-ember-glow: rgba(230, 130, 90, 0.25);
  --hearth-peach: #32291F;
  --hearth-peach-2: #2C251D;
  --hearth-calm: #8FB57F;
  --hearth-calm-soft: #2C3626;
  --hearth-amber: #E5B95E;
  --hearth-amber-2: #EDC978;
  --hearth-hairline: #37312C;
  --hearth-line-2: #45403A;
  --hearth-danger: #E06C5F;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* Grandparent / accessibility large-type profile (HRT-015 §11): scale the
   reading sizes ~1.35× without breaking layout. */
.large-type .hello { font-size: 34px; line-height: 40px; }
.large-type .card-sentence, .large-type .confirm .sentence { font-size: 26px; line-height: 34px; }
.large-type .timing, .large-type .card-context, .large-type .sheet-row { font-size: 18px; }
.large-type .action-btn, .large-type .edit-save, .large-type .edit-cancel { font-size: 18px; }

/* First-capture onboarding card (brand-new user; not a permanent state) */
.onboard-card {
  border: 1.5px dashed var(--hearth-ember) !important;
  background: transparent !important;
  box-shadow: none !important;
}
/* The hidden attribute must always win over layout display rules below
   (a class like .overlay{display:flex} otherwise overrides [hidden]). */
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--hearth-bg);
  color: var(--hearth-ink);
  font-family: var(--sans);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + var(--s3)) var(--s5) var(--s2);
}
/* Brand (proposal-style tile + wordmark) */
.brand { display: flex; align-items: center; gap: 11px; }
.brand-tile {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(155deg, var(--hearth-ember-2), var(--hearth-ember) 70%);
  box-shadow: 0 6px 14px -6px rgba(217, 102, 62, 0.55); flex: none;
}
.brand-name {
  font-family: var(--sans); font-weight: 600; font-size: 16px; letter-spacing: 3px;
  line-height: 1;
}
.round-btn {
  width: 42px; height: 42px; border-radius: 50%; background: var(--hearth-surface);
  color: var(--hearth-ink-soft); display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow-sm); border: 1px solid var(--hearth-hairline); position: relative;
}
/* legacy avatar-btn kept for any JS that still references it */
.avatar-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--hearth-hairline); background: var(--hearth-surface);
  color: var(--hearth-ink); font-size: 18px; cursor: pointer;
}

/* Screens — horizontal snap */
.screens {
  flex: 1; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
}
.screens::-webkit-scrollbar { display: none; }
/* Pull-to-refresh pill — sits just under the top bar, slides in as you pull. */
.ptr-indicator {
  position: absolute; top: 0; left: 50%; z-index: 30;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; margin-top: 4px;
  background: var(--hearth-surface); color: var(--hearth-ink-soft);
  border: 1px solid var(--hearth-hairline); border-radius: var(--r-chip);
  font-size: 13px; font-weight: 600; box-shadow: 0 2px 10px rgba(0,0,0,.08);
  pointer-events: none; will-change: transform;
}
.ptr-indicator .ptr-spinner { display: inline-block; }
.ptr-indicator.armed { color: var(--hearth-ember); }
.ptr-indicator.spinning .ptr-spinner { animation: ptr-spin .8s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
.screen {
  min-width: 100vw; scroll-snap-align: start; height: 100%;
  overflow-y: auto; padding: var(--s4) var(--s5) 260px;
}
.hello {
  font-family: var(--serif); font-size: 30px; line-height: 36px;
  font-weight: 700; letter-spacing: -0.6px; margin: var(--s4) 0 var(--s5);
}

/* ---- Capture screen ---- */
.screen-cap {
  display: flex; flex-direction: column;
  padding-bottom: 120px;
}
.cap-top { padding: var(--s2) 0 var(--s3); }
.cap-greet {
  font-family: var(--sans); font-size: 22px; font-weight: 600;
  letter-spacing: -0.4px; color: var(--hearth-ink);
}
.greet-accent { color: var(--hearth-ember); }
.nudge {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.3px;
  color: var(--hearth-ink-soft); margin-top: 4px;
}

/* AI orb hero (frosted-glass sphere: pink/periwinkle/lavender) */
.capture-orb {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  margin: var(--s5) 0 var(--s4);
}
.orb-stage {
  position: relative; width: 176px; height: 176px;
  display: grid; place-items: center; cursor: pointer;
  background: none; border: none; padding: 0; border-radius: 50%;
}
.orb-sphere {
  width: 124px; height: 124px; border-radius: 50%; overflow: hidden;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  background:
    radial-gradient(62% 58% at 26% 28%, rgba(246,178,207,0.95) 0%, transparent 62%),
    radial-gradient(62% 58% at 78% 24%, rgba(168,194,255,0.95) 0%, transparent 62%),
    radial-gradient(80% 72% at 50% 94%, rgba(168,142,238,0.92) 0%, transparent 66%),
    radial-gradient(50% 46% at 42% 34%, rgba(255,255,255,0.40) 0%, transparent 58%),
    linear-gradient(160deg, #EAE1FB 0%, #DBCEF4 100%);
  box-shadow:
    /* white edge ring — the frosted glass rim */
    0 0 0 2.5px rgba(255,255,255,0.92),
    0 0 10px 2px rgba(255,255,255,0.5),
    inset 0 1px 2px rgba(255,255,255,0.6),
    /* 3-layer ambient glow (from baseline spec) */
    0 0 20px rgba(195,175,255,0.18),
    0 0 55px rgba(255,175,220,0.10),
    0 0 90px rgba(170,210,255,0.08),
    /* bottom depth shadow */
    0 18px 50px rgba(135,110,255,0.08);
  animation: orb-breathe 5s ease-in-out infinite;
  display: grid; place-items: center;
}
.orb-wave {
  position: relative; z-index: 2; transform-origin: center;
  filter: drop-shadow(0 1px 2px rgba(120,100,180,0.25));
  animation: wave-alive 2.6s ease-in-out infinite;
}
@keyframes orb-breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes wave-alive  { 0%,100% { transform: scaleY(.82); } 50% { transform: scaleY(1); } }
/* listening state: pulse the halo */
.orb-stage.listening .orb-sphere { animation: orb-listen 2.4s ease-in-out infinite; }
@keyframes orb-listen { 0%,100% { box-shadow: 0 0 0 2.5px rgba(255,255,255,.92), 0 0 30px 10px rgba(168,194,255,.35), 0 0 10px 2px rgba(255,255,255,.5); transform: scale(1); } 50% { box-shadow: 0 0 0 2.5px rgba(255,255,255,.92), 0 0 50px 20px rgba(246,178,207,.35), 0 0 10px 2px rgba(255,255,255,.5); transform: scale(1.06); } }
.orb-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--hearth-ink-faint);
}

/* type-instead link + inline type bar */
.type-toggle-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.type-instead {
  background: none; border: none; cursor: pointer; font-family: var(--mono);
  font-size: 11px; letter-spacing: 1px; color: var(--hearth-ink-faint); padding: 2px 0;
}

/* family status avatars with sage progress ring */
.fam-row-big { display: flex; justify-content: space-around; gap: 8px; margin: var(--s3) 0; }
.fam-big { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fav-big {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 20px; font-family: var(--mono);
  position: relative; box-shadow: 0 4px 16px -6px rgba(40,42,46,0.28);
}
.fav-big::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2.5px solid var(--hearth-calm);
  border-right-color: var(--hearth-hairline); border-bottom-color: var(--hearth-hairline);
  transform: rotate(-45deg);
}
.fav-big.zero::after { opacity: .28; }
.fav-big-name { font-weight: 600; font-size: 12.5px; color: var(--hearth-ink); }
.fav-big-ct { color: var(--hearth-ink-soft); font-size: 11px; }

/* ---- Today screen ---- */
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--hearth-ink-faint);
  display: flex; align-items: center; gap: 10px; margin: var(--s3) 2px var(--s2);
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--hearth-hairline); }
.hero {
  font-family: var(--sans); font-size: 40px; line-height: 1; font-weight: 700;
  letter-spacing: -1.4px; margin: 0 0 var(--s2);
}
.hero-sub {
  font-family: var(--mono); font-size: 12px; color: var(--hearth-ink-soft);
  margin: 0 0 var(--s4); letter-spacing: .2px;
}
.hero-sub b { color: var(--hearth-ember); font-weight: 600; }

/* Tabs: All / My Tasks */
.tabs { display: flex; gap: 8px; margin-bottom: var(--s4); }
.tab {
  font-size: 13.5px; font-weight: 500; color: var(--hearth-ink-soft);
  padding: 9px 15px; border-radius: 12px; cursor: pointer;
  border: none; background: none;
}
.tab.is-active {
  color: #fff;
  background: linear-gradient(150deg, var(--hearth-ember-2), var(--hearth-ember) 75%);
  box-shadow: 0 8px 16px -8px rgba(217, 102, 62, .5);
}

/* Section labels with count pill on Today screen */
.sect {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--hearth-ink-faint);
  display: flex; align-items: center; gap: 9px; margin: 20px 2px 11px;
}
.sect-count {
  color: var(--hearth-ember); border: 1px solid var(--hearth-line-2);
  border-radius: 5px; padding: 1px 7px; font-size: 10px;
}

/* Cards — compact proposal style */
.card-list, .family-list { display: flex; flex-direction: column; gap: var(--s2); }
.swipe { position: relative; border-radius: 18px; overflow: hidden; touch-action: pan-y; user-select: none; }
.swipe.exhale { height: 0 !important; opacity: 0; margin: 0 !important; overflow: hidden; transition: height .26s ease, opacity .26s ease; }
.swipe-actions {
  position: absolute; top: 0; right: 0; bottom: 0;
  display: flex; align-items: stretch; gap: 8px; padding-left: 8px;
}
.swipe-btn {
  width: 74px; border: none; cursor: pointer; color: #fff; border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; font-weight: 600; font-size: 12.5px; font-family: var(--sans);
}
.swipe-btn.snooze { background: var(--hearth-amber); }
.swipe-btn.done { background: var(--hearth-calm); }
.swipe-btn:active { filter: brightness(.93); }
.card {
  position: relative; z-index: 1; width: 100%;
  background: var(--hearth-surface); border-radius: 18px;
  padding: 11px 14px 11px 16px;
  border: 1px solid var(--hearth-hairline);
  border-left: 3px solid var(--hearth-line-2);
  box-shadow: var(--shadow-card);
  transition: transform .28s cubic-bezier(.22,.61,.36,1), opacity .28s ease;
  will-change: transform;
}
/* Accent tick terracotta for overdue/today cards */
.card.now { border-left-color: var(--hearth-ember); }
[data-theme="fireside"] .card { box-shadow: none; }
.card.exhale { opacity: 0; transform: scaleY(0.96); }
.card.exhale { opacity: 0; transform: scaleY(0.96); }
/* Swipe-left-to-complete: card arms with a calm green edge past threshold. */
.card { touch-action: pan-y; position: relative; }
.card.swipe-armed { box-shadow: inset 4px 0 0 var(--hearth-calm); }

/* Compact card content */
.c-title {
  font-weight: 600; font-size: 15px; letter-spacing: -0.2px;
  color: var(--hearth-ink); line-height: 1.35;
}
.fact { cursor: pointer; }
.c-tags {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px;
}
.pill {
  font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 8px;
  font-family: var(--sans);
}
.pill.type { background: var(--hearth-peach); color: var(--hearth-ember-deep); }
.pill.person { background: var(--hearth-calm-soft); color: var(--hearth-calm); }
.row-editor {
  background: var(--hearth-surface); border: 1px solid var(--hearth-ember);
  border-radius: var(--r-card); padding: 14px; margin: -8px 0 var(--s5);
  display: flex; flex-direction: column; gap: var(--s3); animation: rise .18s ease-out;
}
.edit-input {
  width: 100%; border: 1px solid var(--hearth-hairline); border-radius: var(--r-chip);
  background: var(--hearth-bg); color: var(--hearth-ink);
  font-family: var(--serif); font-size: 17px; padding: 12px var(--s4);
}
.edit-input:focus { outline: 2px solid var(--hearth-ember); }
.edit-check { font-size: 14px; color: var(--hearth-ink-soft); display: flex; align-items: center; gap: 8px; }
.edit-actions { display: flex; justify-content: flex-end; gap: var(--s3); }
.edit-cancel, .edit-save {
  border: 1px solid var(--hearth-hairline); background: transparent; color: var(--hearth-ink);
  font-weight: 600; font-size: 15px; padding: 9px 16px; border-radius: var(--r-chip); cursor: pointer;
}
.edit-save { background: var(--hearth-ember); border-color: var(--hearth-ember); color: #fff; }
.assign-choices { display: flex; flex-wrap: wrap; gap: var(--s2); }
.assign-choice {
  border: 1px solid var(--hearth-hairline); background: transparent; color: var(--hearth-ink);
  font-size: 15px; padding: 9px 14px; border-radius: var(--r-chip); cursor: pointer;
}
.assign-choice.is-current { border-color: var(--hearth-ember); color: var(--hearth-ember); }
.card-context { cursor: pointer; }

.card-context {
  display: flex; align-items: center; gap: var(--s2);
  font-size: 13px; color: var(--hearth-ink-soft); margin-bottom: var(--s2);
  text-transform: none;
}
.face {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
  color: #fff; background: var(--hearth-ink-soft);
}
.card-sentence {
  font-family: var(--serif); font-size: 20px; line-height: 28px; margin: 0 0 var(--s3);
}
.fact { font-weight: 600; text-decoration: underline dotted 1.5px; text-underline-offset: 3px;
  cursor: pointer; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.timing {
  font-family: var(--mono); font-size: 11px; letter-spacing: .2px;
  color: var(--hearth-ink-soft);
  border: 1px solid var(--hearth-line-2); border-radius: 8px; padding: 3px 9px;
  white-space: nowrap;
}
.timing.overdue { color: var(--hearth-ember); border-color: var(--hearth-ember); font-weight: 600; }
/* Legacy card-sentence (large title) — hidden in new compact card design */
.card-sentence { display: none; }
/* Legacy card-foot/actions — keep DOM compatible but visually gone */
.card-foot, .card-actions { display: none; }
.card-context { display: none; }
.action-btn {
  border: 1px solid var(--hearth-hairline); background: transparent;
  color: var(--hearth-ink); font-weight: 600; font-size: 15px;
  padding: 8px 14px; border-radius: var(--r-chip); cursor: pointer;
}
.card-actions { display: flex; align-items: center; gap: var(--s2); }
.action-btn.ghost { color: var(--hearth-ink-soft); font-weight: 500; }
.step-hint { font-size: 13px; color: var(--hearth-ink-soft); margin-top: var(--s2); }
.recurrence-chip {
  font-size: 13px; font-weight: 600; color: var(--hearth-ember);
  margin-top: var(--s2); padding: 3px 8px;
  background: color-mix(in srgb, var(--hearth-ember) 12%, transparent);
  border-radius: var(--r-chip); display: inline-block;
}

/* Step list: tickable runway steps under a card (A5). */
.step-list {
  list-style: none; padding: 0; margin: var(--s3) 0 0;
  border-top: 1px solid var(--hearth-hairline); padding-top: var(--s3);
  display: flex; flex-direction: column; gap: 6px;
}
.step-item {
  display: flex; align-items: flex-start; gap: var(--s2);
  font-size: 14px; color: var(--hearth-ink-soft);
}
.step-done .step-label { text-decoration: line-through; opacity: .55; }
.step-tick {
  background: none; border: 1.5px solid var(--hearth-line-2); border-radius: 50%;
  width: 20px; height: 20px; min-width: 20px; cursor: pointer; padding: 0;
  font-size: 11px; color: var(--hearth-ink-faint); line-height: 18px; text-align: center;
}
.step-done .step-tick {
  background: var(--hearth-calm-soft); border-color: var(--hearth-calm);
  color: var(--hearth-calm);
}
.step-label { flex: 1; padding-top: 2px; line-height: 1.4; }
.step-map-link {
  margin-left: 6px; color: var(--hearth-ember); text-decoration: none;
  font-size: 11px; vertical-align: middle;
}

.release-line {
  text-align: center; color: var(--hearth-ink-soft); font-style: italic;
  margin-top: var(--s6); font-size: 15px;
}
.release-line .more { display: block; margin-top: var(--s2); color: var(--hearth-ember); cursor: pointer; font-style: normal; }
.empty { text-align: center; color: var(--hearth-ink-soft); font-style: italic; font-family: var(--serif);
  font-size: 20px; margin-top: 25vh; }

/* FAB — globally fixed, opens Capture sheet from any primary screen */
.fab {
  position: fixed; right: 20px; bottom: calc(90px + var(--safe-b)); z-index: 7;
  width: 56px; height: 56px; border-radius: 50%; border: none;
  color: #fff; cursor: pointer;
  background: radial-gradient(circle at 36% 30%, var(--hearth-ember-2), var(--hearth-ember) 70%);
  box-shadow: 0 12px 26px -8px rgba(217,102,62,.55);
}
@media not all and (display-mode: standalone) {
  .fab { bottom: calc(130px + var(--safe-b)); }
}

/* Camera/import button on Capture screen */
.cap-actions { display: flex; justify-content: center; margin-top: var(--s5); }
.cap-action-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--hearth-hairline);
  color: var(--hearth-ink-soft); font-size: 13px; font-family: var(--sans);
  padding: 9px 16px; border-radius: var(--r-chip); cursor: pointer;
}
.cap-action-btn:hover { border-color: var(--hearth-ember); color: var(--hearth-ink); }
.sec-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--hearth-ink-faint); font-weight: 500;
}

/* Week */
.week-list { display: flex; flex-direction: column; gap: var(--s5); }
.week-day-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--hearth-ink-faint);
  margin: var(--s5) 0 var(--s2); font-weight: 500;
}

/* Family */
.member-row {
  display: flex; align-items: center; gap: var(--s3);
  background: var(--hearth-surface); border-radius: var(--r-card); padding: var(--s4) 20px;
  border: 1px solid var(--hearth-hairline); box-shadow: var(--shadow-sm);
}
.member-row .face { width: 44px; height: 44px; font-size: 17px; }
.member-info { flex: 1; }
.member-name { font-family: var(--serif); font-size: 18px; }
.load-bar { height: 6px; border-radius: 3px; background: var(--hearth-hairline); margin-top: 6px; overflow: hidden; }
.load-fill { height: 100%; background: var(--hearth-calm); }
.load-count { font-size: 13px; color: var(--hearth-ink-soft); }
.member-next { font-size: 13px; color: var(--hearth-ink-soft); margin-top: 3px; }
.member-clear { color: var(--hearth-ink-faint); font-style: italic; }
.handoff-chip {
  font-size: 12px; color: var(--hearth-ember); margin-top: 5px;
  font-family: var(--mono); cursor: pointer; letter-spacing: 0.3px;
}
/* Offline indicator */
.offline-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9997;
  background: #3d3d3d; color: #fff;
  font-size: 12px; padding: 8px 14px; text-align: center;
  font-family: var(--mono); letter-spacing: 0.3px;
}

/* Add-member inline form */
.add-member-form {
  display: flex; gap: var(--s2); margin-top: var(--s3); align-items: center; flex-wrap: wrap;
}

/* Routines section */
.routines-list { margin-top: var(--s2); }

.text-action {
  margin-top: var(--s5); background: none; border: none; color: var(--hearth-ember);
  font-size: 16px; font-weight: 600; cursor: pointer;
}

/* Bottom nav (replaces dots + dock) */
.nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 6;
  display: flex; justify-content: space-around; align-items: center;
  padding: 10px 8px calc(14px + var(--safe-b));
  background: linear-gradient(to top, var(--hearth-bg) 68%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--hearth-ink-faint); font-size: 10.5px; font-weight: 500;
  cursor: pointer; background: none; border: none; padding: 0 10px;
  font-family: var(--sans);
}
.nav-item.is-active { color: var(--hearth-ember); }
.np {
  width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center;
}
.nav-item.is-active .np { background: var(--hearth-peach); }

/* Browser non-standalone offset */
@media not all and (display-mode: standalone) {
  .nav { bottom: calc(46px + var(--safe-b)); }
  .screen { padding-bottom: 240px; }
  .capture-form { bottom: calc(56px + var(--safe-b)); }
  .confirm { bottom: calc(160px + var(--safe-b)); }
}

/* Capture form */
.capture-form {
  position: fixed; bottom: calc(var(--s6) + var(--safe-b)); left: var(--s5); right: var(--s5);
  display: flex; gap: var(--s2); z-index: 7;
}
.capture-input {
  flex: 1; border: 1px solid var(--hearth-hairline); border-radius: var(--r-chip);
  background: var(--hearth-surface); color: var(--hearth-ink);
  font-family: var(--serif); font-size: 17px; padding: 14px var(--s4);
}
.capture-input:focus { outline: 2px solid var(--hearth-ember); }
.capture-send {
  border: none; background: var(--hearth-ember); color: #fff; font-weight: 600;
  padding: 0 var(--s4); border-radius: var(--r-chip); cursor: pointer;
}

/* Confirmation card */
.confirm {
  position: fixed; left: var(--s5); right: var(--s5);
  bottom: calc(130px + var(--safe-b)); z-index: 8;
  background: var(--hearth-surface); border-radius: var(--r-card); padding: 20px;
  box-shadow: 0 8px 30px rgba(42, 36, 32, 0.14);
  animation: rise .24s ease-out;
}
[data-theme="fireside"] .confirm { border: 1px solid var(--hearth-hairline); }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.confirm .lead { color: var(--hearth-calm); font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.confirm .sentence { font-family: var(--serif); font-size: 20px; line-height: 28px; }
.confirm .hint { font-size: 13px; color: var(--hearth-ink-soft); margin-top: var(--s3); }
.confirm .undo-btn {
  margin-top: var(--s4); padding: 8px 18px; border: 1px solid var(--hearth-ember);
  border-radius: 999px; background: transparent; color: var(--hearth-ember);
  font-size: 15px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.confirm .undo-btn:active { background: var(--hearth-ember); color: #fff; }
/* Deep-link focus pulse when a notification opens a specific reminder. */
@keyframes focusFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217,102,62,0); }
  30%      { box-shadow: 0 0 0 3px rgba(217,102,62,0.55); }
}
.focus-flash { animation: focusFlash 1.2s ease-in-out 2; border-radius: 16px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .12s !important; transition-duration: .12s !important; }
  .orb.listening .orb-glow { animation: none; opacity: 1; }
}

/* Settings sheet */
.overlay {
  position: fixed; inset: 0; z-index: 20; background: rgba(28, 25, 23, 0.45);
  display: flex; align-items: flex-end; animation: fade .2s ease-out;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; background: var(--hearth-surface); color: var(--hearth-ink);
  border-radius: 24px 24px 0 0; padding: var(--s5) var(--s5) calc(var(--s6) + var(--safe-b));
  animation: rise .24s ease-out;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s4); }
.sheet-head h2 { font-family: var(--serif); font-size: 22px; margin: 0; }
.sheet-close { background: none; border: none; font-size: 20px; color: var(--hearth-ink-soft); cursor: pointer; }
.sheet-row {
  display: block; width: 100%; text-align: left; background: none; border: none;
  border-top: 1px solid var(--hearth-hairline); padding: var(--s4) 0;
  font-size: 17px; color: var(--hearth-ink); cursor: pointer;
}
.sheet-row.danger { color: var(--hearth-danger); }
.sheet-foot { font-size: 13px; color: var(--hearth-ink-soft); margin-top: var(--s4); }
.whisper-note { font-size: 14px; color: var(--hearth-ink-soft); font-style: italic; margin: 0 0 var(--s4); }
#answerArea { display: flex; flex-direction: column; gap: var(--s4); }

/* Memory screen ask form */
.ask-form {
  display: flex; gap: var(--s2); margin-bottom: var(--s4);
}
.ask-input {
  flex: 1; border: 1px solid var(--hearth-hairline); border-radius: var(--r-chip);
  background: var(--hearth-bg-2); color: var(--hearth-ink);
  font-family: var(--sans); font-size: 16px; padding: 12px 16px;
}
.ask-input:focus { outline: none; border-color: var(--hearth-calm); box-shadow: 0 0 0 3px var(--hearth-calm-soft); }
.ask-send {
  background: var(--hearth-surface); border: 1px solid var(--hearth-hairline);
  color: var(--hearth-ink); font-family: var(--sans); font-size: 15px;
  font-weight: 600; padding: 0 20px; border-radius: var(--r-chip); cursor: pointer;
}
.ask-send:active { background: var(--hearth-calm-soft); }
.mem-source { color: var(--hearth-calm); font-style: normal; margin-top: 4px; }

/* Capture sheet: centre the orb inside the sheet */
.capture-sheet { text-align: center; }
.capture-sheet .cap-top { padding: var(--s1) 0 var(--s2); }
.capture-sheet .cap-actions { justify-content: center; margin-top: var(--s4); }

/* Import overlay */
.import-textarea {
  width: 100%; border: 1px solid var(--hearth-hairline); border-radius: var(--r-chip);
  background: var(--hearth-surface); color: var(--hearth-ink);
  font-family: var(--sans); font-size: 16px; padding: 14px;
  resize: none; display: block; margin-bottom: var(--s4);
}
.import-textarea:focus { outline: 2px solid var(--hearth-ember); }
.import-tag-label { display: block; font-size: 14px; color: var(--hearth-ink-soft); margin-bottom: var(--s2); }
.import-tag-input {
  width: 100%; border: 1px solid var(--hearth-hairline); border-radius: var(--r-chip);
  background: var(--hearth-surface); color: var(--hearth-ink);
  font-family: var(--sans); font-size: 16px; padding: 12px 14px;
  display: block; margin-bottom: var(--s4);
}
.import-tag-input:focus { outline: 2px solid var(--hearth-ember); }
.import-submit {
  width: 100%; border: none; background: var(--hearth-ember); color: #fff;
  font-size: 17px; font-weight: 600; padding: 16px; border-radius: var(--r-chip);
  cursor: pointer; display: block;
}
/* Past-due import review rows */
.past-due-row {
  padding: var(--s3) 0; border-bottom: 1px solid var(--hearth-hairline);
  transition: opacity .2s;
}
.past-due-label { display: block; font-size: 15px; color: var(--hearth-ink); font-weight: 500; }
.past-due-date { display: block; font-size: 13px; color: var(--hearth-ink-soft); margin: 2px 0 var(--s2); }
.past-due-actions { display: flex; gap: var(--s2); }

/* Assist chip — Maps link on OUTING/APPOINTMENT cards */
.assist-chip {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: var(--s2); padding: 8px 14px;
  border: 1.5px solid var(--hearth-ember); border-radius: var(--r-chip);
  font-size: 14px; font-weight: 600; color: var(--hearth-ember);
  text-decoration: none; background: none;
}
.assist-chip:hover { background: var(--hearth-ember); color: #fff; }

/* Bug report overlay */
.bug-attach-label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border: 1.5px dashed var(--hearth-hairline);
  border-radius: var(--r-chip); font-size: 15px;
  color: var(--hearth-ink-soft); cursor: pointer; margin-bottom: var(--s4);
}
.bug-attach-label:hover { border-color: var(--hearth-ember); color: var(--hearth-ink); }
.bug-attach-preview { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); }
.bug-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--hearth-hairline); border-radius: 8px;
  padding: 4px 8px 4px 10px; font-size: 13px; color: var(--hearth-ink-soft);
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bug-chip button { border: none; background: none; cursor: pointer; font-size: 14px; line-height: 1; color: var(--hearth-ink-soft); }
.bug-report-list { margin-top: var(--s4); }
.bug-report-item {
  border-top: 1px solid var(--hearth-hairline); padding: var(--s4) 0;
}
.bug-report-meta {
  display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s2);
  flex-wrap: wrap;
}
.bug-report-num { font-weight: 700; font-size: 14px; }
.bug-report-when { font-size: 12px; color: var(--hearth-ink-soft); flex: 1; }
.bug-report-text { font-size: 15px; white-space: pre-wrap; color: var(--hearth-ink); }
.bug-resolve-btn {
  border: 1.5px solid var(--hearth-calm); background: none;
  border-radius: var(--r-chip); padding: 4px 12px;
  font-size: 13px; font-weight: 600; color: var(--hearth-calm); cursor: pointer;
}
.bug-resolve-btn:hover { background: var(--hearth-calm); color: #fff; }
.bug-resolve-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.bug-file-link {
  display: inline-flex; align-items: center; gap: 4px; font-size: 13px;
  color: var(--hearth-ink-soft); text-decoration: none;
  border: 1px solid var(--hearth-hairline); border-radius: 8px;
  padding: 4px 10px; background: var(--hearth-bg);
}
.bug-file-link:hover { color: var(--hearth-ink); }
.bug-thumbs { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.bug-thumb {
  width: 60px; height: 60px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--hearth-hairline);
}

