/* Tenancy Pack — v7 "mockup UI". Warm cream background, deep-teal brand, white cards with soft borders.
   Type: Inter / system stack. Scale: 34 / 30 / 26 title · 17 card title · 15–16 body · 13 micro. */
:root {
  --bg: #FCF9F2;
  --surface: #FFFFFF;
  --ink: #111827;
  --text: #1F2933;
  --muted: #5F6672;
  --faint: #9AA0A8;
  --line: #EDE8DD;
  --line-strong: #DCD6CA;
  --title: #0B3F42;          /* page titles */
  --deep: #0B4F4C;           /* primary buttons, active nav */
  --deep-hover: #083F3D;
  --accent: #0F766E;         /* brand teal accents */
  --accent-2: #11635E;
  --mint: #E6F2EB;           /* chip / banner tint */
  --mint-line: #D2E8DC;
  --mint-tile: #E4F0EA;
  --ok: #3A9346;             /* green tick */
  --ok-teal: #4C8E7A;
  --amber-bg: #FDE5B3;
  --amber-line: #F4D08C;
  --amber-text: #B25F05;
  --amber-tile: #FDEDCD;
  --amber-icon: #D98306;
  --amber-badge: #DF8D12;
  --orange: #EF7D17;
  --orange-text: #C8601E;
  --red: #D32F2F;
  --danger: #B42318;
  --danger-soft: #FEECEB;
  --req: #A6262B;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(60, 50, 30, 0.04), 0 1px 1px rgba(60, 50, 30, 0.02);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 58px;
  --font: "Inter", "InterVariable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
  max-width: 100%;
}
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Fixed bottom nav (+ safe-area) never covers content/CTAs */
  padding-bottom: calc(var(--nav-h) + 28px + var(--safe-bottom));
}
body.no-nav { padding-bottom: calc(28px + var(--safe-bottom)); }
body.no-nav .nav { display: none; }
h1, h2, h3, p { margin: 0; }
strong { font-weight: 600; color: var(--ink); }
button { font: inherit; color: inherit; }

/* —— Icons —— */
.i {
  width: 24px; height: 24px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

main {
  padding: var(--safe-top) 14px 24px;
  padding-left: max(14px, env(safe-area-inset-left, 0px));
  padding-right: max(14px, env(safe-area-inset-right, 0px));
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}
main > section > * { max-width: 100%; }

/* —— Top bars —— */
.topbar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 52px;
  margin: 0 -6px 4px;
}
.topbar-spacer { width: 44px; height: 44px; }
.topbar-home .logo-mark { justify-self: center; }
.topbar-pack { grid-template-columns: 44px auto; justify-content: start; gap: 10px; }
.logo-mark { display: block; width: 30px; height: 34px; }
.logo-mark svg { width: 100%; height: 100%; display: block; }
.logo-mark.small { width: 25px; height: 28px; }
.lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--title); min-width: 0; }
.lockup.center { justify-self: center; }
.lockup b { font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.012em; color: var(--title); }
.lockup > span { display: flex; flex-direction: column; line-height: 1.15; }
.lockup small { font-size: 0.8125rem; color: var(--muted); font-weight: 400; margin-top: 1px; }
.lockup-icon { width: 32px; height: 32px; color: var(--accent-2); stroke-width: 1.6; }
.icon-btn {
  appearance: none; border: none; background: transparent; color: var(--ink);
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer; padding: 0; position: relative;
}
.icon-btn:hover { background: rgba(16, 24, 40, 0.04); }
.icon-btn:focus-visible, .text-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.bell-btn .i { width: 26px; height: 26px; stroke-width: 1.7; }
.bell-dot {
  position: absolute; top: 8px; right: 9px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px var(--bg);
}
.text-btn {
  appearance: none; border: none; background: transparent; cursor: pointer;
  color: var(--accent-2); font-weight: 600; font-size: 0.9375rem;
  height: 44px; padding: 0 4px; justify-self: end; border-radius: 10px;
}

/* —— Titles —— */
.home-hero { text-align: center; padding: 0 0 12px; margin-top: -6px; }
.home-title {
  font-size: 1.875rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.12;
  color: var(--title);
}
.home-address { margin-top: 3px; color: var(--muted); font-size: 0.9375rem; }
.title-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding-top: 10px; margin-bottom: 8px;
}
.page-title {
  font-size: 1.75rem; font-weight: 800; letter-spacing: -0.028em; line-height: 1.15;
  color: var(--title);
}
.page-title.xl { font-size: 1.875rem; }
.page-title.lg { font-size: 2rem; }
.page-title.md { font-size: 1.5625rem; }
.btn.text.small { min-height: 38px; margin-top: 4px !important; }
.topbar + .page-title { margin-top: 2px; }
.page-sub { margin-top: 4px; margin-bottom: 12px; color: var(--muted); font-size: 0.9375rem; line-height: 1.45; }
.title-row + .page-sub { margin-top: -2px; }
.card-title { font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.01em; color: var(--ink); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.section-label {
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); margin: 26px 2px 10px;
}
.muted { color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }
.small { font-size: 0.8125rem; }
.hint { color: var(--faint); font-weight: 400; font-size: 0.8125rem; margin-left: 4px; }
.center { text-align: center; }
.meta-line { margin-top: 12px; color: var(--muted); font-size: 0.875rem; }

/* —— Pill button (title rows) —— */
.pill-btn {
  appearance: none; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 16px 0 12px; border-radius: 999px;
  background: var(--deep); color: #fff; font-weight: 600; font-size: 0.9375rem;
  margin: 0; white-space: nowrap;
}
.pill-btn .i { width: 20px; height: 20px; stroke-width: 2.1; }
.pill-btn:hover { background: var(--deep-hover); }
.pill-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill-btn input { display: none; }

/* —— Home: split Bond / Day —— */
.stat-split {
  display: flex; align-items: center;
  background: var(--mint); border: 1px solid var(--mint-line); border-radius: var(--radius);
  padding: 8px 4px; margin-bottom: 8px;
}
.stat-half { flex: 1; display: flex; align-items: center; gap: 12px; padding: 0 12px; min-width: 0; color: var(--title); }
.stat-half .i { width: 26px; height: 26px; stroke-width: 1.7; color: var(--accent-2); }
.stat-half > span { display: flex; flex-direction: column; line-height: 1.2; }
.stat-half small { font-size: 0.8125rem; color: var(--text); }
.stat-half strong { font-size: 1.125rem; font-weight: 750; color: var(--title); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stat-divider { width: 1px; align-self: stretch; margin: 4px 0; background: var(--mint-line); }

/* —— Home: amber repair alert —— */
.alert-banner {
  width: 100%; text-align: left;
  display: flex; align-items: center; gap: 10px;
  background: var(--amber-bg); border: 1px solid var(--amber-line); border-radius: 12px;
  padding: 8px 10px 8px 12px; margin-bottom: 8px; color: var(--ink); font-size: 0.8125rem; line-height: 1.35;
}
.alert-banner > .i:first-child { width: 22px; height: 22px; color: var(--amber-text); }
.alert-banner > span { flex: 1; min-width: 0; }
.alert-banner b { color: var(--amber-text); font-weight: 600; }
@media (max-width: 479px) { .alert-banner b { display: block; } .alert-banner .sep { display: none; } }
.alert-banner .sep { margin: 0 6px; color: var(--ink); }
.alert-banner .chev { width: 18px; height: 18px; color: var(--amber-text); stroke-width: 2; }
.alert-banner a.banner-ext { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(0,0,0,0.3); }
.banner-link { appearance: none; border: none; background: transparent; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; display: inline; }
@media (max-width: 479px) { .alert-banner .banner-link { display: block; } }
.chev-btn { width: 32px; height: 32px; min-height: 0; padding: 0; flex-shrink: 0; display: grid; place-items: center; background: transparent; border: none; cursor: pointer; }
.inline-link { appearance: none; border: none; background: transparent; padding: 0; font: inherit; color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* —— Home dashboard cards —— */
.dash-list { display: flex; flex-direction: column; gap: 6px; }
.dash-card {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px 8px 8px 9px; min-height: 58px;
  cursor: pointer; appearance: none; font: inherit; color: inherit;
}
.dash-card:active { background: #FCFBF8; }
.dash-hit { position: absolute; inset: 0; border: none; background: transparent; border-radius: inherit; cursor: pointer; }
.dash-card .dash-meta .btn { position: relative; z-index: 1; }
.dash-tile {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--mint-tile); color: var(--accent-2);
}
.dash-tile .i { width: 24px; height: 24px; }
.dash-tile.amber { background: var(--amber-tile); color: var(--amber-icon); }
.dash-body { flex: 1; min-width: 0; }
.dash-body strong { display: block; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.dash-body > span { display: block; font-size: 0.8125rem; color: var(--muted); margin-top: 1px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-body > span.amber-num.has { color: var(--amber-icon); font-weight: 700; font-size: 0.9375rem; line-height: 1.2; }
.dash-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.dash-check {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--ok-teal); color: #fff; display: grid; place-items: center;
}
.dash-check .i { width: 15px; height: 15px; stroke-width: 2.6; }
.dash-count {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
  background: var(--amber-badge); color: #fff; font-size: 0.8125rem; font-weight: 700;
  display: inline-grid; place-items: center; font-variant-numeric: tabular-nums;
}
.dash-chevron { color: #4B5260; width: 20px; height: 20px; stroke-width: 1.9; }

/* —— Footnotes / disclaimers —— */
.footnote {
  appearance: none; border: none; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin: 14px 0 2px; padding: 8px 0; color: var(--muted); font-size: 0.8125rem;
}
.footnote .i { width: 22px; height: 22px; color: var(--accent-2); }
.footnote:hover { color: var(--ink); }
.disclaimer { font-size: 0.75rem; color: var(--muted); line-height: 1.5; margin: 6px auto 8px; max-width: 34em; }
.includes { text-align: center; font-size: 0.75rem; color: var(--muted); margin-top: 12px; line-height: 1.45; }
.includes.muted-2 { margin-top: 2px; color: var(--faint); }
.includes.demo-note { margin-top: 10px; color: var(--title); font-weight: 600; }
.includes.demo-note + .includes { margin-top: 2px; }
.about-card p + p { margin-top: 6px; font-size: 0.8125rem; }

/* —— Cards —— */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px;
}
.row { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.row .col { flex: 1 1 130px; min-width: 0; }
.row .col.wide { flex: 2 1 160px; }

/* —— Info / deadline banners —— */
.info-banner, .deadline-banner {
  display: flex; align-items: center; gap: 12px;
  background: var(--mint); border: 1px solid var(--mint-line); border-radius: 12px;
  padding: 10px 12px; margin: 10px 0 4px; color: var(--text); font-size: 0.875rem; line-height: 1.35;
}
.info-banner .i, .deadline-banner .i { width: 24px; height: 24px; color: var(--accent-2); stroke-width: 1.7; }
.deadline-banner { margin: 0 0 10px; }
.deadline-banner b { display: block; color: var(--title); font-weight: 600; font-size: 0.9063rem; }
.deadline-banner small:empty { display: none; }
.deadline-banner small { display: block; color: var(--muted); font-size: 0.8125rem; margin-top: 1px; }
.deadline-banner > span { flex: 1; min-width: 0; }
.deadline-banner.urgent { background: var(--amber-bg); border-color: var(--amber-line); }
.deadline-banner.urgent .i, .deadline-banner.urgent b { color: var(--amber-text); }
.deadline-banner.prompt { width: 100%; text-align: left; background: var(--surface); border: 1px dashed var(--line-strong); }
.deadline-banner small a, .field-hint a, .page-sub a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
.deadline-banner .chev { width: 18px; height: 18px; color: #4B5260; }

/* —— Dispute Pack checklist (compact single-line rows) —— */
.check-list { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.check-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow);
  padding: 8px 8px 8px 11px; min-height: 44px; cursor: pointer; appearance: none; font: inherit; color: inherit;
}
.check-item:active { background: #FCFBF8; }
.check-mark { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--ok); color: #fff; }
.check-mark .i { width: 13px; height: 13px; stroke-width: 2.8; }
.check-mark.todo { background: transparent; border: 1.5px solid #C9C6C0; }
.check-body { flex: 1; min-width: 0; font-size: 0.8438rem; line-height: 1.3; color: var(--muted); }
.check-body strong { font-size: 0.875rem; }
.check-body, .dash-body, .repair-update, .includes { text-wrap: pretty; }
.check-body strong { font-weight: 650; color: var(--ink); }
.check-item.todo .check-body strong { font-weight: 500; color: var(--muted); }

/* —— Buttons —— */
.btn {
  appearance: none; border: 1px solid transparent; border-radius: var(--radius-sm);
  min-height: 46px; padding: 10px 18px; margin: 0;
  font-size: 1rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.005em;
  cursor: pointer; background: var(--accent); color: #fff; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--accent-2); }
.btn:active { transform: scale(0.985); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn .i { width: 21px; height: 21px; stroke-width: 2; }
.btn.block { width: 100%; }
.btn + .btn.block, .btn.block + .btn { margin-top: 8px; }
.btn.deep { background: var(--deep); font-size: 1rem; min-height: 46px; }
.btn.deep:hover { background: var(--deep-hover); }
.btn.outline { background: transparent; color: var(--deep); border: 1.5px solid var(--deep); font-size: 1rem; min-height: 44px; }
.btn.outline:hover { background: rgba(11, 79, 76, 0.05); }
.btn.tiny { min-height: 32px; padding: 5px 13px; font-size: 0.875rem; border-radius: 9px; background: var(--deep); }
.btn.small { min-height: 40px; padding: 8px 14px; font-size: 0.9375rem; }
.btn.small .i { width: 18px; height: 18px; }
.btn.text, .btn.ghost { background: transparent; color: var(--muted); font-weight: 500; }
.btn.text:hover, .btn.ghost:hover { background: rgba(16, 24, 40, 0.04); color: var(--ink); }
.btn.warn { background: transparent; color: var(--danger); font-weight: 500; }
.btn.warn:hover { background: var(--danger-soft); }
.btn.orange-outline {
  background: #FFFDF9; color: var(--orange-text); border: 1.5px solid #F2B47E; font-size: 0.9375rem;
  min-height: 40px; padding: 7px 13px; border-radius: 9px;
}
.btn.orange-outline .i { color: var(--orange-text); }
.btn.orange-outline:hover { background: #FFF6EC; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.btn-row > .btn { flex: 1 1 120px; white-space: nowrap; }
.card .btn.block, .form .btn.block, .sheet-body .btn.block { margin-top: 16px; }
.card .btn.block + .btn.block, .sheet-body .btn.block + .btn.block { margin-top: 8px; }

/* —— Forms —— */
label, .field-label {
  display: block; font-size: 0.875rem; font-weight: 500; color: var(--ink);
  margin: 11px 0 5px; line-height: 1.3;
}
label.first, .card-title + label, .sheet-body > label:first-child { margin-top: 0; }
.card-title + label { margin-top: 14px; }
.req { color: var(--req); font-weight: 600; margin-left: 1px; }
input, select, textarea {
  width: 100%; min-height: 44px;
  border: 1px solid var(--line-strong); border-radius: 9px;
  padding: 9px 12px; background: #fff; color: var(--ink);
  font: inherit; font-size: 1rem; line-height: 1.35;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus, .date-field:focus-within {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}
textarea { min-height: 84px; resize: vertical; }
.field-hint { margin: -2px 0 8px; font-size: 0.8125rem; color: var(--muted); line-height: 1.35; }
.field-label + .field-hint { margin-top: -4px; }
.textarea-wrap { position: relative; }
.textarea-wrap textarea { padding-bottom: 24px; min-height: 64px; resize: none; }
.char-count { position: absolute; right: 12px; bottom: 8px; font-size: 0.8125rem; color: var(--faint); font-variant-numeric: tabular-nums; pointer-events: none; }

/* Date field: formatted text + calendar icon, native picker underneath */
.date-field {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: #fff; color: var(--ink); font-size: 0.9688rem; cursor: pointer;
}
.date-field .date-text.empty { color: var(--faint); }
.date-field .i { width: 22px; height: 22px; color: var(--accent-2); }
.date-field input[type="date"] {
  position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; opacity: 0;
  border: none; padding: 0; margin: 0; cursor: pointer; box-shadow: none;
}
.date-field input[type="date"]::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.secure-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font-size: 0.875rem; color: var(--muted); }
.secure-note .i { width: 18px; height: 18px; color: var(--accent-2); }

/* Photo slots (cleaner / new repair): 5 per row */
.photo-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.slot-add {
  aspect-ratio: 0.94; margin: 0; border: 1.5px dashed #8DBFB2; border-radius: 9px; background: #F1F8F5;
  color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 0.6875rem; font-weight: 500; cursor: pointer; text-align: center; padding: 2px; white-space: nowrap;
}
.slot-add .i { color: var(--accent-2); width: 24px; height: 24px; }
.slot-add:hover, .slot-add:focus-within { border-color: var(--accent); }
.slot-add input { display: none; }
.photo-slots .photo-card { aspect-ratio: 0.94; border-radius: 9px; }
.photo-slots .photo-card .del { width: 20px; height: 20px; top: 3px; right: 3px; background: rgba(16, 24, 40, 0.38); }
.photo-slots .photo-card .pending-tag { display: none; }
.photo-slots .photo-card .del .i { width: 12px; height: 12px; }
.photo-slots .photo-card .meta { display: none; }

/* —— Repairs —— */
.segmented {
  display: grid; grid-template-columns: 1fr 1fr; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 0; overflow: hidden; margin-bottom: 12px;
}
.seg {
  appearance: none; border: none; background: transparent; cursor: pointer;
  min-height: 40px; font-size: 0.9375rem; font-weight: 500; color: var(--ink); border-radius: 11px;
}
.seg.active { background: var(--deep); color: #fff; font-weight: 600; }
.seg:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.segmented.small { margin-bottom: 8px; }
.segmented.small .seg { min-height: 40px; font-size: 0.9375rem; }
.repair-list { display: flex; flex-direction: column; gap: 8px; }
.repair-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 11px 12px 12px;
}
.repair-top { display: flex; align-items: center; gap: 10px; }
.repair-top h3 { flex: 1; min-width: 0; font-size: 1rem; font-weight: 650; color: var(--ink); letter-spacing: -0.01em; line-height: 1.3; }
.repair-top .icon-btn { width: 36px; height: 32px; margin: -6px -8px -6px 0; color: var(--faint); }
.repair-top .icon-btn .i { width: 20px; height: 20px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; color: #fff; line-height: 1.45; flex-shrink: 0; }
.badge.routine { background: var(--orange); }
.badge.emergency { background: var(--red); }
.badge.fixed { background: var(--ok); }
.repair-meta { margin-top: 4px; font-size: 0.8125rem; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); display: inline-block; }
.dot.red { background: var(--red); }
.dot.green { background: var(--ok); }
.progress { position: relative; height: 6px; border-radius: 999px; background: #EFEAE3; margin: 10px 0 2px; overflow: visible; }
.progress > span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--orange); }
.progress > i { display: none; position: absolute; top: -3px; bottom: -3px; width: 2px; background: #C9BFB2; border-radius: 1px; }
.repair-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 10px; }
.repair-thumbs img { width: 100%; aspect-ratio: 1.45; object-fit: cover; border-radius: 6px; display: block; background: #EEE9E2; }
.repair-thumbs .more { display: grid; place-items: center; border-radius: 8px; background: #F2EEE8; color: var(--muted); font-size: 0.875rem; font-weight: 600; aspect-ratio: 1.4; }
.repair-update { margin-top: 8px; font-size: 0.8125rem; color: var(--text); line-height: 1.4; }
.repair-note { margin-top: 3px; font-size: 0.8125rem; color: var(--text); }
.repair-info { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 10px; }
.repair-card .repair-info .btn.orange-outline { margin-top: 0; text-decoration: none; }
.help-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-2); text-decoration: none; padding: 4px 0; }
.help-link .i { width: 15px; height: 15px; }
.repair-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.repair-actions .btn { flex: 1 1 auto; min-height: 38px; padding: 6px 10px; font-size: 0.875rem; }
.repair-actions label.btn input { display: none; }
.log-cta {
  appearance: none; width: 100%; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 12px; margin-top: 8px;
  background: #FDF8EE; border: 1px solid #F0E6D2; border-radius: var(--radius); padding: 10px 12px;
}
.log-cta-icon { width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--title); display: grid; place-items: center; color: var(--title); flex-shrink: 0; }
.log-cta-body strong { display: block; font-size: 0.9375rem; color: var(--title); font-weight: 650; }
.log-cta-body > span { display: block; font-size: 0.8125rem; color: var(--muted); margin-top: 1px; }

/* —— Photos screen —— */
.room-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.room-chip {
  appearance: none; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; box-shadow: var(--shadow);
  padding: 10px 12px; text-align: left; cursor: pointer; color: inherit; min-width: 0;
  display: flex; align-items: center; gap: 10px;
}
.room-chip .room-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--mint-tile); color: var(--accent-2); display: grid; place-items: center; flex-shrink: 0; }
.room-chip .room-ico .i { width: 19px; height: 19px; }
.room-chip.done .room-ico { background: var(--ok-teal); color: #fff; }
.room-chip > span:last-child { min-width: 0; }
.room-chip strong { display: block; font-size: 0.9063rem; font-weight: 600; line-height: 1.25; }
.room-chip small { display: block; color: var(--muted); font-size: 0.8125rem; line-height: 1.3; }
.room-chip.active { border-color: var(--deep); box-shadow: inset 0 0 0 1px var(--deep); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.photo-card { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #EEE9E2; }
.photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-card .meta {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px;
  font-size: 0.625rem; line-height: 1.25; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
}
.photo-card .del {
  position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; padding: 0; border: none; border-radius: 999px;
  background: rgba(16, 24, 40, 0.55); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.photo-card .del .i { width: 15px; height: 15px; stroke-width: 2.25; }
.photo-card .pending-tag { position: absolute; top: 4px; left: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--amber-badge); box-shadow: 0 0 0 2px #fff; font-size: 0; }
.photo-grid.compact { margin-top: 10px; grid-template-columns: repeat(4, 1fr); }
.note {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 11px 12px; border-radius: 10px;
  background: var(--mint); color: var(--title); font-size: 0.8438rem; line-height: 1.45;
}
.note .i { width: 20px; height: 20px; margin-top: 1px; color: var(--accent-2); }
.note.warn { background: #FFF6E3; color: #7A4A0A; border: 1px solid var(--amber-line); margin: 0 0 12px; }
.note.warn .i { color: var(--amber-text); }
.note.warn strong { color: inherit; }

/* —— Lists (settings) —— */
.list-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 12px; }
.list-row {
  appearance: none; border: none; background: transparent; font: inherit; color: var(--text);
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 56px; text-align: left; cursor: pointer;
}
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row > span:not(.row-tile) { flex: 1; font-weight: 500; color: var(--ink); }
.list-row small { color: var(--muted); font-size: 0.8125rem; }
.row-tile { width: 36px; height: 36px; border-radius: 9px; background: var(--mint-tile); color: var(--accent-2); display: grid; place-items: center; flex-shrink: 0; }
.row-tile .i { width: 20px; height: 20px; }
.list-row:hover { background: #FCFBF8; }

/* Generic record items */
.list-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 8px; }
.list-item .row { align-items: center; justify-content: space-between; }
.list-item .btn-row { margin-top: 8px; }
.list-item p { margin-top: 4px; }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--mint); color: var(--title); }
.tag.amber { background: var(--amber-tile); color: var(--amber-text); }

/* Timeline */
.timeline { border-left: 2px solid var(--line); margin: 4px 0 0 6px; padding-left: 20px; }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -26px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--surface); }
.tl-item time { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-item strong { display: block; margin: 2px 0; font-weight: 600; }

.callout { border-radius: 10px; padding: 12px 14px; font-size: 0.9375rem; line-height: 1.5; background: var(--mint); color: var(--title); margin-bottom: 10px; }
.empty { text-align: center; padding: 22px 12px; color: var(--muted); font-size: 0.9375rem; line-height: 1.5; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 12px; }
.card .empty { border: none; padding: 16px 8px; }

/* —— Bottom nav —— */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 5px max(6px, env(safe-area-inset-right, 0px)) calc(4px + var(--safe-bottom)) max(6px, env(safe-area-inset-left, 0px));
  min-height: calc(var(--nav-h) + var(--safe-bottom));
  background: rgba(251, 251, 249, 0.96); border-top: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.nav button {
  appearance: none; border: none; background: transparent; color: #3F4650; cursor: pointer;
  font-size: 0.7188rem; font-weight: 500; padding: 3px 0 6px; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.nav button .i { width: 24px; height: 24px; stroke-width: 1.6; }
.nav button .i.on { display: none; }
.nav button.active { color: var(--deep); font-weight: 700; }
.nav button.active .i.on { display: block; }
.nav button.active .i.off { display: none; }
.nav button.active::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 28px; height: 2.5px; margin-left: -14px; border-radius: 2px; background: var(--deep); }
.nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 10px; }

.screen { display: none; }
.screen.active { display: block; animation: fade 0.18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* —— Dialog sheets —— */
dialog.sheet {
  border: none; padding: 0; margin: auto auto 0; width: 100%; max-width: 600px;
  max-height: calc(100dvh - 40px - var(--safe-top)); border-radius: 20px 20px 0 0;
  background: var(--bg); color: var(--text); box-shadow: 0 -10px 40px rgba(16, 24, 40, 0.2);
  overflow: auto; overscroll-behavior: contain;
}
dialog.sheet::backdrop { background: rgba(16, 24, 40, 0.42); }
.sheet-head {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 10px 8px 18px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.sheet-head h2 { font-size: 1.1875rem; font-weight: 700; color: var(--title); }
.sheet-body { padding: 14px 18px calc(22px + var(--safe-bottom)); }
.prose h3 { font-size: 0.9375rem; font-weight: 650; color: var(--ink); margin: 16px 0 4px; }
.prose p { font-size: 0.875rem; color: var(--text); line-height: 1.55; }
.prose .lead { font-size: 0.9375rem; background: var(--mint); border-radius: 10px; padding: 12px; color: var(--title); }
.reminder { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.reminder:last-child { border-bottom: none; }
.reminder .i { width: 22px; height: 22px; color: var(--amber-text); margin-top: 1px; }
.reminder .i.teal { color: var(--accent-2); }
.reminder p { font-size: 0.9375rem; }
.reminder .btn { margin-top: 8px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 24px + var(--safe-bottom));
  transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff;
  padding: 11px 18px; border-radius: 999px; font-size: 0.9375rem; font-weight: 500;
  opacity: 0; pointer-events: none; transition: 0.2s ease; z-index: 60; max-width: 90vw;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.18);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
body.no-nav .toast { bottom: calc(24px + var(--safe-bottom)); }

.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .screen.active { animation: none; }
  * { transition: none !important; }
}
@media (min-width: 640px) {
  .room-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
  .photo-slots { grid-template-columns: repeat(6, 1fr); }
  dialog.sheet { margin: auto; border-radius: 20px; }
}

/* ---------- v9: install / demo / persist / pack options ---------- */
.ios-prompt {
  position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: flex-end; justify-content: center; padding: 16px;
}
.ios-prompt.hidden { display: none !important; }
.ios-prompt-card {
  background: var(--bg); border-radius: 20px 20px 12px 12px; padding: 22px 20px 18px;
  max-width: 440px; width: 100%; box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
  max-height: 90vh; overflow: auto;
}
.ios-prompt-card h2 { font-size: 1.25rem; font-weight: 700; color: var(--title); margin: 0 0 8px; }
.ios-prompt-card p { font-size: 0.9375rem; color: var(--text); line-height: 1.5; margin: 0 0 12px; }
.ios-steps { margin: 0 0 14px; padding-left: 1.25rem; color: var(--text); font-size: 0.9375rem; line-height: 1.55; }
.ios-steps li { margin-bottom: 6px; }

.demo-banner, .persist-banner {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 14px; font-size: 0.8125rem; font-weight: 500; line-height: 1.35;
}
.demo-banner { background: #0F766E; color: #fff; }
.demo-banner .btn { background: #fff; color: #0F766E; border: none; }
.persist-banner { background: #FEF3C7; color: #78350F; border-bottom: 1px solid #F59E0B; }
.persist-banner .btn { background: #78350F; color: #FEF3C7; border: none; }
.demo-banner.hidden, .persist-banner.hidden { display: none !important; }

.pack-options { margin: 12px 0; }
.check-row {
  display: flex; gap: 10px; align-items: flex-start; font-size: 0.875rem; color: var(--text);
  line-height: 1.4; margin: 10px 0; cursor: pointer;
}
.check-row input { margin-top: 3px; flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--accent); }

#restore-label { cursor: pointer; text-align: center; }
#storage-status-card strong.ok { color: #0F766E; }
#storage-status-card strong.warn { color: #B45309; }
#storage-status-card strong.bad { color: #B91C1C; }

.edit-inline { margin-top: 6px; }
.list-row .row-actions { display: flex; gap: 6px; }
.btn.tiny.ghost { background: transparent; color: var(--accent-2); border: 1px solid var(--line); }

/* —— v12: compare, guided, voice, search —— */
.btn-row.wrap { flex-wrap: wrap; }
.compare-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.compare-col h3 { margin: 0 0 6px; font-size: 14px; }
.photo-grid.tight { grid-template-columns: repeat(2, 1fr); gap: 6px; }
.photo-card.pick { border: 2px solid transparent; padding: 0; background: var(--surface); cursor: pointer; }
.photo-card.pick.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--mint); }
.photo-card .voice-mini { position: absolute; left: 6px; bottom: 22px; background: rgba(11,63,66,.85); color: #fff; border: 0; border-radius: 999px; width: 28px; height: 28px; font-size: 12px; }
.photo-card { position: relative; }
.pair-card img { width: 100%; border-radius: 8px; aspect-ratio: 1; object-fit: cover; }
.guided-card .guided-prompt { font-size: 22px; font-weight: 650; color: var(--title); margin: 8px 0 16px; }
.voice-slot { margin: 0 0 10px; }
.voice-bar { display: flex; flex-direction: column; gap: 8px; }
.voice-item { display: flex; flex-direction: column; gap: 4px; padding: 8px; background: var(--mint); border-radius: 10px; }
.voice-item audio { width: 100%; }
.search-results { margin-top: 12px; }
.search-results .list-row { width: 100%; text-align: left; }
#search-input { width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; font-size: 16px; background: var(--surface); }
