/* BP CRM: Apple-style (iOS grouped list) design. No build step needed. */
:root {
  --bg: #f2f2f7;
  --card: #ffffff;
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.2);
  --label: #000000;
  --label-2: rgba(60, 60, 67, 0.62);
  --label-3: rgba(60, 60, 67, 0.32);
  --sep: rgba(60, 60, 67, 0.2);
  --accent: #38429a;
  --accent-soft: rgba(56, 66, 154, 0.1);
  --red: #d70015;
  --green: #248a3d;
  --bar: rgba(249, 249, 249, 0.86);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --fill: rgba(118, 118, 128, 0.24);
    --fill-2: rgba(118, 118, 128, 0.32);
    --label: #ffffff;
    --label-2: rgba(235, 235, 245, 0.6);
    --label-3: rgba(235, 235, 245, 0.3);
    --sep: rgba(84, 84, 88, 0.6);
    --accent: #7d8cff;
    --accent-soft: rgba(125, 140, 255, 0.16);
    --red: #ff453a;
    --green: #30d158;
    --bar: rgba(22, 22, 24, 0.86);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--label);
  font-family: var(--font); font-size: 17px; line-height: 1.35;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.page { max-width: 760px; margin: 0 auto; padding: calc(8px + env(safe-area-inset-top)) 16px calc(110px + env(safe-area-inset-bottom)); }
.page.no-tabs { padding-bottom: 40px; }
.muted { color: var(--label-2); }
.small { font-size: 13px; }
.center { text-align: center; }
.hidden { display: none !important; }
.stack > * + * { margin-top: 10px; }

/* Navigation bar */
.navbar { display: flex; align-items: center; justify-content: space-between; min-height: 52px; gap: 12px; }
.navbar .left, .navbar .right { display: flex; align-items: center; gap: 10px; }
.navbar .title { font-weight: 600; font-size: 17px; flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-link { font-size: 17px; display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; }
.nav-link svg { width: 22px; height: 22px; }
.circle-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--fill); display: inline-grid; place-items: center; color: var(--accent); border: 0; cursor: pointer; }
.circle-btn svg { width: 22px; height: 22px; }
.logo { width: 40px; height: 40px; border-radius: 10px; display: block; object-fit: cover; background: #38429a; }
.eyebrow { text-transform: uppercase; font-size: 15px; font-weight: 600; color: var(--label-2); margin: 10px 0 0; letter-spacing: .2px; }
.large-title { font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: .2px; margin: 4px 0 14px; }
.subtitle { color: var(--label-2); margin: -6px 0 16px; }

/* Grouped sections */
.section-title { text-transform: uppercase; font-size: 13px; color: var(--label-2); margin: 26px 16px 7px; letter-spacing: .2px; }
.section-foot { font-size: 13px; color: var(--label-2); margin: 7px 16px 0; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.card.pad { padding: 16px; }
.card + .card { margin-top: 14px; }
.list .row { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-height: 48px; color: var(--label); }
.list .row:not(:last-child)::after { content: ""; position: absolute; left: var(--inset, 16px); right: 0; bottom: 0; height: 1px; background: var(--sep); transform: scaleY(.5); transform-origin: bottom; }
.list .row.with-avatar { --inset: 82px; }
.list a.row:active, .list button.row:active { background: var(--fill); }
.row .grow { flex: 1; min-width: 0; }
.row .value { color: var(--label-2); text-align: right; }
.row .chev { color: var(--label-3); width: 18px; height: 18px; flex: none; }
.row .title { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta { font-size: 15px; color: var(--label-2); margin-top: 2px; }
.row button.row-action { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-size: 17px; }
.row-link { color: var(--accent); }
.icon-tile { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; }
.icon-tile svg { width: 19px; height: 19px; }

/* Avatars & badges */
.avatar { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 20px; background: linear-gradient(180deg, #a8a8ad, #85858b); }
.avatar.xl { width: 112px; height: 112px; font-size: 44px; margin: 6px auto 12px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; line-height: 1.5; }
.c-blue { background: #e4f0fd; color: #0b4a8f; }
.c-indigo { background: #e7e8fb; color: #38429a; }
.c-teal { background: #dcf3f3; color: #0b5e62; }
.c-green { background: #e1f4e5; color: #1d6b31; }
.c-orange { background: #fdeedd; color: #8f4a00; }
.c-red { background: #fbe4e4; color: #8f2626; }
.c-pink { background: #fbe4ee; color: #8f2655; }
.c-purple { background: #f0e5fa; color: #5d2a8f; }
.c-gray { background: #ececf0; color: #4a4a52; }
.c-tag { background: #e6effb; color: #284d7a; }
@media (prefers-color-scheme: dark) {
  .c-blue { background: #0b2f55; color: #8cc2ff; } .c-indigo { background: #232a5c; color: #aab4ff; }
  .c-teal { background: #0c3a3c; color: #7fe0e3; } .c-green { background: #123d1d; color: #8be39f; }
  .c-orange { background: #4a2a07; color: #ffbe7a; } .c-red { background: #4a1414; color: #ff9b9b; }
  .c-pink { background: #4a1430; color: #ff9bc9; } .c-purple { background: #34184d; color: #d3a6ff; }
  .c-gray { background: #2c2c2e; color: #c7c7cc; } .c-tag { background: #1d3150; color: #a9c8f2; }
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Chips & segmented controls */
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; background: var(--card); color: var(--accent); font-size: 16px; white-space: nowrap; border: 2px solid transparent; }
.chip .count { color: var(--label-3); }
.chip.active { border-color: var(--accent); }
.chip.c-red, .chip.c-pink, .chip.c-blue, .chip.c-indigo, .chip.c-teal, .chip.c-green, .chip.c-orange, .chip.c-purple, .chip.c-gray, .chip.c-tag { font-weight: 500; }
.chip.c-red .count, .chip.c-pink .count { color: inherit; opacity: .55; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-radio { position: relative; }
.pill-radio input { position: absolute; opacity: 0; pointer-events: none; }
.pill-radio span { display: inline-block; padding: 8px 16px; border-radius: 999px; background: var(--fill); font-size: 16px; cursor: pointer; }
.pill-radio input:checked + span { background: var(--accent); color: #fff; }
.pill-radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Colored chips keep their stage color */
.chip.c-blue { background: #e4f0fd; color: #0b4a8f; } .chip.c-indigo { background: #e7e8fb; color: #38429a; }
.chip.c-teal { background: #dcf3f3; color: #0b5e62; } .chip.c-green { background: #e1f4e5; color: #1d6b31; }
.chip.c-orange { background: #fdeedd; color: #8f4a00; } .chip.c-red { background: #fbe4e4; color: #8f2626; }
.chip.c-pink { background: #fbe4ee; color: #8f2655; } .chip.c-purple { background: #f0e5fa; color: #5d2a8f; }
.chip.c-gray { background: #ececf0; color: #4a4a52; } .chip.c-tag { background: #e6effb; color: #284d7a; }
.chip[class*="c-"] .count { color: inherit; opacity: .55; }
@media (prefers-color-scheme: dark) {
  .chip.c-blue { background: #0b2f55; color: #8cc2ff; } .chip.c-indigo { background: #232a5c; color: #aab4ff; }
  .chip.c-teal { background: #0c3a3c; color: #7fe0e3; } .chip.c-green { background: #123d1d; color: #8be39f; }
  .chip.c-orange { background: #4a2a07; color: #ffbe7a; } .chip.c-red { background: #4a1414; color: #ff9b9b; }
  .chip.c-pink { background: #4a1430; color: #ff9bc9; } .chip.c-purple { background: #34184d; color: #d3a6ff; }
  .chip.c-gray { background: #2c2c2e; color: #c7c7cc; } .chip.c-tag { background: #1d3150; color: #a9c8f2; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; padding: 12px 22px; font-size: 17px; font-weight: 600; cursor: pointer; text-align: center; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-gray { background: var(--fill); color: var(--accent); }
.btn-danger { background: var(--fill); color: var(--red); }
.btn-block { display: flex; width: 100%; border-radius: 14px; padding: 15px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }
.btn:disabled { opacity: .45; cursor: default; }
.link-danger { color: var(--red); background: none; border: 0; padding: 0; cursor: pointer; font-size: 17px; }
.action-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 4px; }
.action-tile { background: var(--card); border-radius: var(--radius); padding: 14px 6px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--accent); font-size: 15px; }
.action-tile svg { width: 30px; height: 30px; }
.action-tile.disabled { opacity: .4; pointer-events: none; color: var(--label-2); }

/* Forms */
.form-row { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 50px; position: relative; }
.form-row:not(:last-child)::after { content: ""; position: absolute; left: 16px; right: 0; bottom: 0; height: 1px; background: var(--sep); transform: scaleY(.5); }
.form-row label { width: 118px; flex: none; color: var(--label); }
.form-row input, .form-row select { flex: 1; min-width: 0; border: 0; background: transparent; padding: 13px 0; outline: none; text-align: right; color: var(--label); }
.form-row input::placeholder { color: var(--label-3); }
.form-row select { -webkit-appearance: none; appearance: none; color: var(--accent); direction: rtl; }
.form-row select option { direction: ltr; }
.form-row.stacked { flex-direction: column; align-items: stretch; gap: 0; padding-top: 10px; padding-bottom: 10px; }
.form-row.stacked label { width: auto; font-size: 13px; color: var(--label-2); }
.form-row.stacked input, .form-row.stacked select { text-align: left; direction: ltr; padding: 6px 0; }
textarea.field, input.field, select.field { width: 100%; border: 0; border-radius: 12px; background: var(--fill); padding: 13px 15px; outline: none; color: var(--label); }
textarea.field { min-height: 96px; resize: vertical; }
input.field:focus, textarea.field:focus, select.field:focus { box-shadow: 0 0 0 2px var(--accent); }
.field-label { display: block; font-size: 13px; color: var(--label-2); margin: 12px 2px 6px; }
.inline-select { border: 0; background: var(--fill); border-radius: 12px; padding: 10px 14px; color: var(--label); font-size: 17px; max-width: 100%; }
.error { color: var(--red); font-size: 15px; margin: 8px 16px 0; }
.errors { background: #fdecec; color: #8f1d1d; border-radius: 12px; padding: 12px 16px; margin: 10px 0; font-size: 15px; }
@media (prefers-color-scheme: dark) { .errors { background: #3b1414; color: #ffb4b4; } }
.code-input { font-size: 30px; letter-spacing: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.copy-box { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 14px; background: var(--fill); border-radius: 10px; padding: 12px; word-break: break-all; white-space: pre-wrap; user-select: all; }

/* Today */
.progress { height: 8px; background: var(--fill); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.ring-row { display: flex; align-items: center; gap: 18px; }
.ring { width: 84px; height: 84px; flex: none; position: relative; }
.ring svg { width: 84px; height: 84px; transform: rotate(-90deg); }
.ring .num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 700; }
.ring-title { font-size: 21px; font-weight: 700; }
.empty { text-align: center; padding: 44px 20px; }
.empty svg { width: 58px; height: 58px; color: var(--accent); }
.empty h3 { font-size: 24px; margin: 12px 0 4px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); }
.stats > div { text-align: center; padding: 18px 6px; position: relative; }
.stats > div + div::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 1px; background: var(--sep); }
.stats b { display: block; font-size: 32px; line-height: 1.1; }
.stats span { color: var(--label-2); font-size: 15px; }

/* Tasks */
.task { padding: 16px; position: relative; }
.task:not(:last-child)::after { content: ""; position: absolute; left: 16px; right: 0; bottom: 0; height: 1px; background: var(--sep); transform: scaleY(.5); }
.task h4 { margin: 0; font-size: 19px; }
.task .meta { color: var(--label-2); font-size: 15px; margin-top: 3px; }
.task .meta .overdue { color: var(--red); font-weight: 600; }
.task blockquote { margin: 10px 0 0; color: var(--label-2); white-space: pre-line; }
.task .btn-row { margin-top: 14px; }
.task .btn { padding: 11px 10px; }
.task .who { font-weight: 600; color: var(--label); }
details.snooze { position: relative; flex: 1; }
details.snooze > summary { list-style: none; }
details.snooze > summary::-webkit-details-marker { display: none; }
details.snooze .menu { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); background: var(--card); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); overflow: hidden; }
details.snooze .menu button { display: block; width: 100%; background: none; border: 0; padding: 13px 16px; text-align: left; color: var(--accent); cursor: pointer; font-size: 17px; }
details.snooze .menu button + button { border-top: .5px solid var(--sep); }
details.add-more > summary { list-style: none; cursor: pointer; color: var(--accent); padding: 14px 16px; }
details.add-more > summary::-webkit-details-marker { display: none; }
details.add-more[open] > summary { padding-bottom: 4px; }
details.add-more .inner { padding: 4px 16px 16px; }

/* Contact page */
.contact-head { text-align: center; margin-top: 4px; }
.contact-head h1 { font-size: 32px; margin: 0 0 8px; line-height: 1.15; }
.check-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; position: relative; color: var(--label); }
.check-row:not(:last-child)::after { content: ""; position: absolute; left: 60px; right: 0; bottom: 0; height: 1px; background: var(--sep); transform: scaleY(.5); }
.check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--label-3); flex: none; display: grid; place-items: center; margin-top: 1px; }
.check.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.check svg { width: 16px; height: 16px; }
.check-row .hint { display: block; color: var(--label-2); font-size: 15px; }
.timeline .item { display: flex; gap: 14px; padding: 13px 16px; position: relative; }
.timeline .item:not(:last-child)::after { content: ""; position: absolute; left: 44px; right: 0; bottom: 0; height: 1px; background: var(--sep); transform: scaleY(.5); }
.timeline .bullet { width: 14px; height: 14px; border-radius: 50%; background: var(--label-3); margin-top: 5px; flex: none; }
.timeline .bullet.touch { background: var(--accent); }
.timeline .bullet.note { background: #e0a100; }
.timeline .body { white-space: pre-line; }
.timeline .when { color: var(--label-2); font-size: 15px; margin-top: 2px; }
.remember-item { display: flex; gap: 10px; align-items: flex-start; }
.remember-item form { margin-left: auto; }
.remember-item button { background: none; border: 0; color: var(--label-3); cursor: pointer; font-size: 20px; line-height: 1; padding: 0 2px; }

/* Pipeline board */
.board { display: flex; gap: 14px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 20px; scroll-snap-type: x mandatory; align-items: flex-start; }
.column { flex: none; width: min(82vw, 300px); background: var(--fill); border-radius: 18px; padding: 12px; scroll-snap-align: start; }
.column.drag-over { box-shadow: inset 0 0 0 2px var(--accent); }
.column-head { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px 10px; font-weight: 700; font-size: 18px; }
.column-head .count { color: var(--label-2); font-weight: 400; font-size: 16px; }
.board-card { background: var(--card); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; cursor: grab; }
.board-card.dragging { opacity: .5; }
.board-card .name { font-weight: 600; font-size: 18px; color: var(--label); display: block; margin-bottom: 6px; }
.board-card select { border: 0; background: transparent; color: var(--label-2); font-size: 15px; padding: 4px 0; margin-top: 6px; }

/* Tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--bar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid var(--sep); padding-bottom: env(safe-area-inset-bottom); }
.tabbar .inner { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 6px; color: #8e8e93; font-size: 11px; font-weight: 500; }
.tabbar a svg { width: 27px; height: 27px; }
.tabbar a.active { color: var(--accent); }

/* Toast */
.toast { position: fixed; z-index: 30; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translateX(-50%); background: rgba(30, 30, 32, .92); color: #fff; padding: 12px 18px; border-radius: 16px; font-size: 15px; max-width: min(92vw, 560px); box-shadow: 0 10px 30px rgba(0,0,0,.2); transition: opacity .4s, transform .4s; }
.toast.hide { opacity: 0; transform: translate(-50%, -10px); pointer-events: none; }

/* Pagination */
.pager { display: flex; justify-content: space-between; align-items: center; margin: 16px 4px; color: var(--label-2); font-size: 15px; }

/* Sign-in screens */
.auth { max-width: 420px; margin: 0 auto; padding: calc(48px + env(safe-area-inset-top)) 20px 40px; }
.auth .logo { width: 76px; height: 76px; border-radius: 18px; margin: 0 auto 18px; box-shadow: 0 6px 18px rgba(56,66,154,.25); }
.auth h1 { text-align: center; font-size: 30px; margin: 0 0 6px; }
.auth p.lead { text-align: center; color: var(--label-2); margin: 0 0 24px; }
.qr { background: #fff; border-radius: 16px; padding: 14px; width: 248px; margin: 0 auto; }
.qr svg { display: block; width: 220px; height: 220px; }
.steps { padding-left: 22px; margin: 0; color: var(--label); }
.steps li { margin-bottom: 8px; }

@media (min-width: 900px) {
  .large-title { font-size: 40px; }
}

/* Phase 2 */
.temp-pill { border: 0; border-radius: 999px; padding: 7px 16px; font-size: 15px; font-weight: 600; background: var(--fill); color: var(--label-2); cursor: pointer; }
.temp-pill.on.t-hot { background: #ff3b30; color: #fff; }
.temp-pill.on.t-warm { background: #ff9500; color: #fff; }
.temp-pill.on.t-cold { background: #007aff; color: #fff; }
.bulk-bar { position: sticky; top: 8px; z-index: 15; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--card); border-radius: 16px; padding: 10px 12px; margin: 0 0 10px; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.bulk-bar [data-bulk-count] { font-weight: 600; margin-right: 4px; }
.pick { width: 24px; height: 24px; flex: none; accent-color: var(--accent); }
.selecting .row.picked { background: var(--accent-soft); }
.plan-tag { display: inline-block; font-size: 13px; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 7px; margin-left: 4px; font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border-radius: var(--radius); padding: 14px 16px; }
.kpi b { display: block; font-size: 26px; line-height: 1.2; }
.kpi span { color: var(--label-2); font-size: 14px; }
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); }
table.report { border-collapse: collapse; width: 100%; font-size: 15px; white-space: nowrap; }
table.report th, table.report td { padding: 10px 12px; text-align: right; border-bottom: .5px solid var(--sep); }
table.report th:first-child, table.report td:first-child { text-align: left; position: sticky; left: 0; background: var(--card); }
table.report th { color: var(--label-2); font-weight: 600; font-size: 13px; text-transform: uppercase; }
table.report tr:last-child td { border-bottom: 0; }
.step { display: flex; gap: 12px; padding: 14px 16px; position: relative; }
.step:not(:last-child)::after { content: ""; position: absolute; left: 16px; right: 0; bottom: 0; height: 1px; background: var(--sep); transform: scaleY(.5); }
.step .day { flex: none; width: 58px; text-align: center; background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 6px 0; font-weight: 700; font-size: 14px; line-height: 1.15; align-self: flex-start; }
.step .day small { display: block; font-weight: 500; font-size: 11px; }
.signin { max-width: 560px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) 20px 40px; }
.signin h1 { font-size: 30px; text-align: center; margin: 10px 0 4px; }
.print-sheet { max-width: 760px; margin: 0 auto; padding: 40px 24px; text-align: center; background: #fff; color: #000; }
.print-sheet .qr-big svg { width: 420px; height: 420px; max-width: 100%; }
@media print { body { background: #fff; } .no-print { display: none !important; } .tabbar { display: none; } }

/* Phase 3: message thread */
.thread { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding: 2px; }
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 18px; font-size: 16px; line-height: 1.35; }
.bubble.in { align-self: flex-start; background: var(--fill-2); color: var(--label); border-bottom-left-radius: 6px; }
.bubble.out { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.bubble .when { font-size: 11px; opacity: .7; margin-top: 3px; }
.thread-note { align-self: center; text-align: center; font-size: 14px; color: var(--label-2); background: var(--fill); border-radius: 12px; padding: 6px 12px; max-width: 92%; }

/* Phase 4: Your 5 cards */
.card.five { margin-bottom: 14px; }
.five-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 8px; color: var(--label); }
.five-name { display: block; font-weight: 700; font-size: 19px; }
.five-why { display: block; color: var(--label-2); font-size: 15px; margin-top: 1px; }
.five-body { padding: 4px 16px 6px; }
.five-draft { font-size: 17px; line-height: 1.4; min-height: 108px; }
.five-hint { font-size: 13px; color: var(--label-2); margin: 6px 2px 0; }
.five-hint.ai { color: #7a3fd1; }
.outcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.outcome-grid .btn { padding: 11px 8px; font-size: 16px; }
.five-skip { background: none; border: 0; color: var(--label-2); font-size: 15px; padding: 8px 14px; cursor: pointer; }
.quick-add textarea { font-size: 18px; min-height: 110px; }
details.more-details > summary { list-style: none; cursor: pointer; text-align: center; color: var(--accent); font-size: 17px; padding: 16px; margin-top: 18px; background: var(--card); border-radius: var(--radius); }
details.more-details > summary::-webkit-details-marker { display: none; }
details.more-details[open] > summary { margin-bottom: 4px; }
.media-buttons [hidden], .upload-progress[hidden] { display: none !important; }
.msg-check { margin: 6px 0 0; padding: 8px 12px; border-radius: 10px; background: #fff4e0; color: #7a4a00; font-size: 14px; line-height: 1.35; }

/* Talk-to-Note and Card Scan (v4.9) */
.talk-bar { display: flex; gap: 10px; }
.talk-bar > * { flex: 1; }
.talk-mic.on { background: var(--red); animation: talk-pulse 1.4s ease-in-out infinite; }
@keyframes talk-pulse { 50% { opacity: .75; } }
.talk-scan { position: relative; }
.talk [data-talk-input], .talk [data-talk-review] { margin-top: 12px; }
.talk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.talk-remember { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.talk-remember button { border: 0; background: none; font-size: 22px; color: var(--label-2); cursor: pointer; padding: 0 6px; }
.talk-toggle { display: flex; gap: 8px; align-items: center; margin: 16px 2px 0; font-weight: 600; }
.talk-person { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--sep, rgba(60,60,67,.18)); }
.talk-person:first-of-type { border-top: 0; }
.talk-check { padding-top: 18px; }
.talk-check input, .talk-toggle input { width: 20px; height: 20px; }

/* Listings (v4.12) */
.listing-card { display: block; overflow: hidden; padding: 0; margin-top: 14px; color: inherit; text-decoration: none; }
.listing-photo { position: relative; height: 190px; background: var(--fill) center/cover no-repeat; display: flex; align-items: center; justify-content: center; }
.listing-photo.tall { height: 260px; }
.listing-photo .badge { position: absolute; top: 12px; left: 12px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.photo-tile { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; background: var(--fill) center/cover no-repeat; overflow: hidden; }
.photo-tile .badge { position: absolute; left: 6px; top: 6px; font-size: 11px; }
.photo-actions { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 4px; }
.photo-actions button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 16px; cursor: pointer; }
.kit-graphics { display: flex; gap: 12px; margin-top: 10px; align-items: flex-start; }
.kit-graphics figure { margin: 0; flex: 1; min-width: 0; }
.kit-graphics figure:last-child { flex: .56; }
.kit-graphics canvas { width: 100%; height: auto; border-radius: 10px; display: block; background: var(--fill); }
.kit-graphics figcaption { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.kit-graphics figcaption .btn { padding: 8px 12px; font-size: 15px; }
.kit-text { white-space: pre-wrap; word-break: normal; user-select: text; font-family: inherit; font-size: 16px; }
.home-page { max-width: 760px; margin: 0 auto; padding-bottom: 30px; }
.home-top { display: flex; gap: 12px; align-items: center; margin: 6px 2px 14px; }
.home-gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 14px; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.home-gallery::-webkit-scrollbar { display: none; }
.home-gallery img { flex: none; width: 92%; max-width: 720px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; scroll-snap-align: center; background: var(--fill); }
.social-thumb { flex: none; width: 46px; height: 46px; border-radius: 8px; background: var(--fill) center/cover no-repeat; margin-right: 10px; }

/* Social posts: attachments, preview, upload progress (v4.14) */
.media-buttons [hidden], .upload-progress[hidden] { display: none !important; }
.badge-ok { background: rgba(52,199,89,.92); color: #fff; }
.badge-new { background: rgba(0,0,0,.6); color: #fff; }
.media-status { font-weight: 600; }
.media-status.ok { color: var(--green, #248a3d); }
.media-status.warn { color: var(--red, #d70015); }
.media-buttons { display: flex; gap: 10px; margin-top: 12px; }
.media-buttons .btn { flex: 1; cursor: pointer; text-align: center; }
.photo-tile .pill { position: absolute; left: 6px; bottom: 6px; font-size: 11px; color: #fff; background: rgba(0,0,0,.55); padding: 1px 7px; border-radius: 999px; }
.video-tile video { width: 100%; max-height: 420px; border-radius: 10px; background: #000; display: block; }
.video-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 10px; }
.video-note { font-size: 14px; color: var(--label-2); }
.post-preview { padding: 12px 0 0; overflow: hidden; }
.pp-head { display: flex; gap: 10px; align-items: center; padding: 0 14px; }
.pp-head strong { display: block; font-size: 16px; }
.pp-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex: none; }
.pp-sub { display: block; font-size: 13px; color: var(--label-2); }
.pp-text { padding: 10px 14px 12px; white-space: pre-wrap; word-break: break-word; font-size: 16px; }
.pp-text.empty { color: var(--label-2); font-style: italic; }
.pp-link { color: var(--accent); }
.pp-media { display: grid; gap: 2px; }
.pp-media:empty { display: none; }
.pp-media.n1 { grid-template-columns: 1fr; }
.pp-media.n2 { grid-template-columns: 1fr 1fr; }
.pp-media.n3, .pp-media.n4, .pp-media.nmany { grid-template-columns: 1fr 1fr; }
.pp-media.n3 > :first-child, .pp-media.nmany > :first-child { grid-column: 1 / -1; }
.pp-media .pp-img { aspect-ratio: 4 / 5; background: var(--fill) center/cover no-repeat; position: relative; }
.pp-media.n1 .pp-img { aspect-ratio: auto; min-height: 220px; max-height: 480px; height: 70vw; }
.pp-media .pp-more { position: absolute; inset: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 30px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pp-media video { width: 100%; max-height: 480px; background: #000; display: block; }
.upload-progress { margin-top: 16px; }
.upload-label { font-weight: 600; margin-bottom: 6px; }
.upload-bar { height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.upload-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.social-thumb { position: relative; }
.social-thumb-video { background: #1c1c1e; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.social-thumb-count { position: absolute; right: -4px; bottom: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg, #fff); }

/* Fun fact of the day (v4.15) */
.fun-fact-text { font-size: 17px; line-height: 1.45; }
.fun-fact-actions { display: flex; gap: 10px; margin-top: 12px; }
.fun-fact-actions .btn { flex: 1; padding: 8px 12px; font-size: 15px; }

/* Book a Shoot (v4.17) */
.policy-box { margin-bottom: 14px; font-size: 15px; line-height: 1.45; background: #fff8ec; }
.policy-box p { margin: 6px 0 0; }
.policy-title { font-weight: 700; font-size: 17px; }
@media (prefers-color-scheme: dark) { .policy-box { background: #2d2412; } }
.form-row[hidden] { display: none !important; }
.form-row.two input[type="date"] { text-align: left; }
.form-row input.readonly { color: var(--label-2); }
.seg { display: inline-flex; background: var(--fill); border-radius: 9px; padding: 2px; }
.seg-btn { border: 0; background: transparent; padding: 6px 18px; border-radius: 7px; font: inherit; color: var(--label); cursor: pointer; }
.seg-btn.active { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.15); font-weight: 600; }
.sig-pad-wrap { position: relative; margin-top: 10px; border: 1px dashed var(--sep); border-radius: 10px; background: #fff; }
.sig-pad { display: block; width: 100%; height: 130px; touch-action: none; border-radius: 10px; cursor: crosshair; }
.sig-line { position: absolute; left: 16px; right: 16px; bottom: 28px; height: 1px; background: #c7c7cc; pointer-events: none; }
.sig-clear { position: absolute; right: 8px; top: 6px; }
.link-btn { border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; padding: 4px 6px; }
.sig-img { max-width: 260px; width: 100%; background: #fff; border-radius: 8px; border: 1px solid var(--sep); }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.filter-row .field { flex: 1 1 180px; }
.quick-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-pick .chip { border: 0; cursor: pointer; font: inherit; font-size: 13px; }
.deliv-link { padding: 6px 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.photo-tile .tile-link { position: absolute; inset: 0; }
.dt-pair { display: flex; gap: 10px; margin-top: 4px; }
.dt-pair input { flex: 1 1 0; min-width: 0; text-align: left; direction: ltr; padding: 8px 10px !important; border-radius: 8px !important; background: var(--fill) !important; font: inherit; color: var(--label); }
.dt-pair input[type="time"] { flex: 0 0 44%; }

/* Buyer/Tenant Agreements (v4.18) */
.seg-wide { display: flex; width: 100%; }
.seg-wide .seg-btn { flex: 1; text-align: center; cursor: pointer; }
[data-agreement-form].is-short .long-only, [data-agreement-form].is-long .short-only { display: none; }
[data-agreement-form].is-short .long-only-inline, [data-agreement-form].is-long .short-only-inline { display: none; }
.action-stack { display: grid; gap: 10px; margin: 4px 0 8px; }
.action-stack form { margin: 0; }
.sign-head { text-align: center; padding: 18px 8px 10px; }
.sign-brand { font-weight: 800; color: var(--accent); letter-spacing: .02em; }
.note-ok { background: #e1f4e5; color: #1d6b31; border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; }
@media (prefers-color-scheme: dark) { .note-ok { background: #123d1d; color: #8be39f; } }
.sign-step { display: block; background: var(--card); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.sign-step.done { opacity: .75; }
.sign-step .step-title { font-weight: 700; font-size: 17px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.sign-step .step-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.sign-step.done .step-n { background: #34c759; }
.sign-step .note-ok { display: block; }
.sign-step .btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.sign-step .btn-row > .btn { flex: 1 1 140px; white-space: nowrap; font-size: 15px; padding-left: 10px; padding-right: 10px; }
.code-row { display: flex; gap: 10px; margin-top: 10px; align-items: stretch; }
.code-row .code-input { flex: 1 1 auto; min-width: 0; width: 100%; max-width: none; font-size: 24px; letter-spacing: .3em; text-align: center; padding: 12px 10px; -webkit-user-select: text; user-select: text; }
.code-row .btn { flex: none; padding-left: 22px; padding-right: 22px; border-radius: 12px; }
.sigbox { margin-top: 12px; }
.sigbox-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.sigbox-head .ini-text { max-width: 90px; text-transform: uppercase; text-align: center; margin: 0; padding: 6px 8px; }
.sig-pad-wrap.ini { max-width: 220px; }
.sig-pad-wrap.ini .sig-pad { height: 90px; }
.pos-wrap { overflow: auto; border: 1px solid var(--sep); border-radius: 8px; background: #fff; }
.pos-wrap canvas { display: block; width: 100%; cursor: crosshair; }
textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.4; }

/* In-app PDF viewer (4.18.1) */
.pdf-view { padding: 0 12px 24px; }
.pdf-view canvas { display: block; width: 100%; height: auto; background: #fff; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.15); margin: 0 auto 12px; }
.pdf-view .muted { text-align: center; padding: 30px 0; }

/* 4.19 Households */
.seg-radio input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.seg-radio .seg-btn:has(input:checked) { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.15); font-weight: 600; }
.to-picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; align-items: center; }
.to-picker .to-label { font-size: 13px; color: var(--label-2); margin-right: 2px; }
.to-chip { position: relative; display: inline-flex; align-items: center; border-radius: 999px; background: var(--fill); padding: 7px 14px; font-size: 15px; cursor: pointer; user-select: none; }
.to-chip input { position: absolute; opacity: 0; pointer-events: none; }
.to-chip:has(input:checked) { background: var(--accent); color: #fff; font-weight: 600; }
.to-chip.is-off { opacity: .45; cursor: not-allowed; }
.doc-pick { display: flex; align-items: center; gap: 10px; padding: 8px 2px; font-size: 15px; border-top: .5px solid var(--sep); }
.doc-pick:first-child { border-top: 0; }
.doc-pick input { width: 20px; height: 20px; flex: none; }
.attach-row { margin-top: 10px; }
.attach-row input[type=file] { font-size: 15px; max-width: 100%; }
