:root {
  --bg: #fbf9f3;
  --surface: #fffefb;
  --ink: #263f34;
  --muted: #646e62;
  --line: #e4e5d9;
  --line-strong: #cfd5c6;
  --accent: #245849;
  --accent-ink: #ffffff;
  --accent-soft: #e9eedf;
  --yes: #2f7a4e;
  --maybe: #a2761c;
  --no: #a5483a;
  --yes-soft: #e4efdc;
  --maybe-soft: #f6efd8;
  --no-soft: #f8e6e0;
  --sage: #e9eedf;
  --peach: #f6e7db;
  --butter: #f6efd8;
  --lavender: #eeebf3;
  --notice: #f8efdf;
  --notice-line: #c59361;
  --bubble: #ffffff;
  --bubble-mine: #e3ecd9;
  --radius: 16px;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, h2, h3, p, ul, dl, dd { margin: 0; }
h1 { font-family: var(--serif); font-size: 2.3rem; line-height: 1.15; font-weight: 400; letter-spacing: -.02em; }
h1 em { color: var(--accent); }
h2 { font-size: 1.125rem; font-weight: 650; }
h3 { font-size: .95rem; font-weight: 650; margin-top: 14px; }
a { color: var(--accent); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 30; border-radius: 6px; }
.skip-link:focus { top: 8px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }

/* Layout */
.wrap { max-width: 1040px; margin: 0 auto; padding: 24px 20px; }
main.wrap { min-height: calc(100vh - 170px); }
.narrow { max-width: 560px; margin: 0 auto; }
.narrow > h1 { margin-bottom: 8px; }
.narrow > .lead { margin-bottom: 20px; }
.back { display: inline-block; margin-bottom: 12px; text-decoration: none; font-size: .9rem; }

/* Header */
.top { background: rgb(251 249 243 / .96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-inner { max-width: 1040px; margin: 0 auto; padding: 14px 20px 4px; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem; line-height: 1.25; }
.brand small { display: block; font-size: .72rem; font-weight: 500; color: var(--muted); letter-spacing: .04em; }
.brand-mark { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--accent); color: #f4e6ba; transform: rotate(-4deg); flex-shrink: 0; }
.brand-mark .icon { width: 22px; height: 22px; }
.brand-mark::after { content: ""; position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: #dd9274; border: 2px solid var(--bg); }
.account { position: relative; }
.account summary, .more summary { list-style: none; cursor: pointer; }
.account summary::-webkit-details-marker, .more summary::-webkit-details-marker { display: none; }
.avatar { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 6px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .9rem; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgb(0 0 0 / .12); min-width: 220px; padding: 6px; z-index: 20; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 10px; border: 0; background: none; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.menu a:hover, .menu button:hover { background: var(--accent-soft); }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-head strong, .menu-head span { display: block; }
.menu-head span { font-size: .85rem; color: var(--muted); }
.tabs-inner { max-width: 1040px; margin: 0 auto; padding: 0 12px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs a { display: flex; align-items: center; gap: 7px; padding: 12px 10px 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { color: var(--accent); border-color: var(--accent); }
.tabs .icon { width: 18px; height: 18px; }
.count { background: var(--no); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 9px; min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; }

/* Footer */
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 28px; }
.foot a { color: var(--muted); }
.foot .flower { color: #c88760; }

/* Generic */
.page-head { margin: 4px 0 20px; }
.page-head.row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.lead { color: var(--muted); margin-top: 6px; max-width: 62ch; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: .9rem; color: var(--muted); }
.facts strong { color: var(--ink); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card.sage { background: var(--sage); border-color: #dce3d1; }
.card.peach { background: var(--peach); border-color: #ecd9ca; }
.card.lavender { background: var(--lavender); border-color: #e0dbe9; }
.card.butter { background: var(--butter); border-color: #ece2c3; }
.card-head h2 { display: flex; align-items: center; gap: 10px; }
.tile { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgb(255 255 255 / .7); color: var(--accent); }
.tile .icon { width: 19px; height: 19px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.card-head a { font-size: .9rem; }
.card > p + p, .card > p + .btn, .card > .btn { margin-top: 10px; }
.big { font-size: 1.25rem; font-weight: 700; }
.hint { font-size: .85rem; color: var(--muted); margin: 12px 0; }
.tag { display: inline-block; font-size: .75rem; font-weight: 650; padding: 1px 7px; border-radius: 99px; background: var(--line); color: var(--muted); vertical-align: 1px; }
.tag.good { background: var(--yes-soft); color: var(--yes); }
.empty { text-align: center; padding: 36px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.empty .tile { margin: 0 auto 12px; width: 52px; height: 52px; border-radius: 15px; background: var(--sage); }
.empty .tile .icon { width: 26px; height: 26px; }
.empty p + p { margin-top: 6px; }
ul.plain { list-style: none; padding: 0; }
ul.plain li { padding: 5px 0; border-bottom: 1px solid var(--line); }
ul.plain li:last-child { border: 0; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; font-size: .95rem; line-height: 1.2; }
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: transparent; color: var(--accent); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--accent-soft); filter: none; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn.full { width: 100%; }
.btn .icon { width: 18px; height: 18px; }
.link-btn { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 4px 0; color: var(--accent); font-weight: 600; font-size: .9rem; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }
.link-btn .icon { width: 17px; height: 17px; }
.link-btn.danger { color: var(--no); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: .9rem; }
.field input:not([type=checkbox]), .field select, .field textarea {
  width: 100%; min-height: 42px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink);
}
.field textarea { resize: vertical; }
.field small { color: var(--muted); font-size: .82rem; }
.field.check { flex-direction: row; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.field.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.field.check label { flex: 1; font-weight: 500; }
.field-error { color: var(--no); font-size: .85rem; flex-basis: 100%; }
.form-errors { color: var(--no); background: var(--no-soft); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: .9rem; }
.form-errors ul { margin: 0; padding-left: 18px; }
.flashes { margin-bottom: 16px; display: grid; gap: 8px; }
.flash { padding: 10px 14px; border-radius: 8px; background: var(--yes-soft); font-size: .95rem; }
.flash.error { background: var(--no-soft); color: var(--no); }

/* Access */
.access { margin-top: 12px; }
.access .neighborhood-art { max-width: 420px; margin: 0 auto 8px; }
.access h1 { text-align: center; }
.access > .lead { text-align: center; margin-left: auto; margin-right: auto; }
.access .card { margin-top: 20px; position: relative; }
.sticker { position: absolute; top: -20px; right: 20px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #f2dabe; color: #8c5036; border: 4px solid var(--bg); font-size: 24px; transform: rotate(10deg); }
.access #access-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .03em; text-transform: uppercase; }
.access .hint { margin-bottom: 0; }

/* Home */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; background: #f0f2e8; border-radius: 22px; padding: 30px 32px; margin-bottom: 18px; }
.hero h1 { margin-bottom: 10px; }
.hero .lead { margin-top: 0; }
.hero .facts { margin-top: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: #dde7d5; color: var(--ink); font-size: .85rem; font-weight: 600; }
.pill.light { background: rgb(255 255 255 / .7); border: 1px solid var(--line); font-weight: 500; }
.pill .icon { width: 16px; height: 16px; }
.neighborhood-art { display: block; width: 100%; height: auto; }
.notice { background: var(--notice); border-left: 3px solid var(--notice-line); border-radius: 0 12px 12px 0; padding: 14px 18px; margin-bottom: 12px; }
.notice-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 4px; }
.notice time { font-size: .85rem; color: var(--muted); }
.notice .row-actions { margin-top: 6px; }
.nudge { font-size: .95rem; padding: 10px 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius); margin-bottom: 16px; }
.dash { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mini-msg { font-size: .95rem; padding: 4px 0; overflow-wrap: anywhere; }
.mini-msg + .mini-msg { border-top: 1px solid var(--line); }
.feed { list-style: none; padding: 0; font-size: .92rem; }
.feed li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border: 0; }
.feed a { color: var(--ink); text-decoration: none; }
.feed a:hover { text-decoration: underline; }
.feed time { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.org-bar { margin-top: 16px; }
.org-bar a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .95rem; }

/* Date poll */
.decided { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; background: var(--yes-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.decided .row-actions { margin: 0; }
.label { font-size: .8rem; font-weight: 700; color: var(--yes); text-transform: uppercase; letter-spacing: .04em; }
.poll { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.poll-row { display: grid; grid-template-columns: minmax(170px, 1fr) auto minmax(180px, 1fr) auto; grid-template-areas: "date answer tally org"; gap: 8px 20px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); scroll-margin-top: 120px; }
.poll-row:last-child { border-bottom: 0; }
.poll-row.past { opacity: .6; }
.poll-row.chosen { background: var(--yes-soft); }
.poll-date { grid-area: date; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.poll-date .muted { flex-basis: 100%; font-size: .88rem; }
.answer { grid-area: answer; display: flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.answer button { border: 0; background: var(--surface); padding: 8px 12px; min-height: 40px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.answer button + button { border-left: 1px solid var(--line-strong); }
.answer button:hover { color: var(--ink); background: var(--bg); }
.answer .yes[aria-pressed=true] { background: var(--yes); color: #fff; }
.answer .maybe[aria-pressed=true] { background: var(--maybe); color: #fff; }
.answer .no[aria-pressed=true] { background: var(--no); color: #fff; }
.tally { grid-area: tally; min-width: 0; }
.bar { display: block; width: 100%; height: 6px; border-radius: 3px; overflow: hidden; }
.bar .track { fill: var(--line); }
.bar .yes { fill: var(--yes); }
.bar .maybe { fill: var(--maybe); }
.bar .no { fill: var(--no); }
.bar .mine { fill: var(--accent); }
.tally details { margin-top: 4px; }
.tally summary { font-size: .85rem; color: var(--muted); cursor: pointer; }
.tally .muted { display: block; margin-top: 4px; }
.voters { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: .88rem; margin-top: 6px; }
.voters dt { font-weight: 600; }
.org-actions { grid-area: org; display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
.add-date { margin-top: 20px; scroll-margin-top: 120px; }
.add-date h2 { margin-bottom: 12px; }
.inline-form { display: grid; grid-template-columns: 170px 130px 1fr auto; gap: 10px; align-items: end; }
.inline-form .field { margin: 0; }
.inline-form .form-errors { grid-column: 1 / -1; margin: 0; }

/* Polls */
.poll-section { margin-bottom: 30px; scroll-margin-top: 120px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.section-head h2 { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 400; font-size: 1.45rem; }
.section-head .tile { background: var(--sage); }
.option-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(160px, 1fr) auto; gap: 8px 20px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.option-row:last-child { border-bottom: 0; }
.option-row.chosen { background: var(--yes-soft); }
.choice { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 12px; font-weight: 600; color: var(--ink); }
.choice:hover { background: var(--sage); }
.choice.static { border-color: transparent; padding-left: 0; }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); flex-shrink: 0; }
.choice[aria-pressed=true] { border-color: var(--accent); background: var(--accent-soft); }
.choice[aria-pressed=true] .dot { border: 5px solid var(--accent); }
.opt-org { justify-self: end; }
.option-img { grid-column: 1 / -1; display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.option-img img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: cover; }
.img-edit { grid-column: 1 / -1; font-size: .88rem; }
.img-edit summary { cursor: pointer; color: var(--muted); }
.img-edit form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.poll-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); background: none; border: 0; gap: 14px; }
.poll-cards .option-row { grid-template-columns: 1fr auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); align-content: start; }
.poll-cards .option-row > form:first-of-type, .poll-cards .option-row > .choice { grid-column: 1 / -1; }
.poll-cards .option-row.chosen { background: var(--yes-soft); }
.street-map { margin: 0 0 18px; }
.street-map img { display: block; width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.option-row .tally { grid-area: auto; }
.ink { color: var(--ink); }

/* Schedule */
.timeline { list-style: none; padding: 0; margin: 18px 0 24px; position: relative; }
.timeline li { display: grid; grid-template-columns: 58px 1fr auto; gap: 14px; padding: 0 0 18px; position: relative; align-items: baseline; }
.timeline li::before { content: ""; position: absolute; left: 70px; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: #dd9274; border: 2px solid var(--bg); box-shadow: 0 0 0 1px #dd9274; }
.timeline li::after { content: ""; position: absolute; left: 76px; top: 20px; bottom: 0; width: 1px; background: var(--line-strong); }
.timeline li:last-child::after { display: none; }
.timeline li > div { padding-left: 22px; }
.timeline time { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); text-align: right; }
.timeline li.editing { background: var(--accent-soft); border-radius: 8px; }
.timeline.compact { margin: 4px 0 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.timeline.compact li { display: block; padding: 10px 9px; background: var(--butter); border-radius: 12px; }
.timeline.compact li::before, .timeline.compact li::after { display: none; }
.timeline.compact li > div { padding: 0; }
.timeline.compact time { display: block; text-align: left; font-size: .9rem; }
.timeline.compact strong { font-weight: 600; font-size: .9rem; hyphens: auto; }
.schedule-card { margin-top: 14px; }
.schedule-form .field input[type=time] { max-width: 160px; }

/* Tasks */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--surface); }
.segmented a { padding: 8px 12px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; }
.segmented a + a { border-left: 1px solid var(--line-strong); }
.segmented a span { font-weight: 500; opacity: .75; margin-left: 2px; }
.segmented a[aria-current] { background: var(--accent-soft); color: var(--accent); }
.task-group { margin-bottom: 22px; }
.group-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tasks { list-style: none; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.task { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; padding: 11px 14px; border-bottom: 1px solid var(--line); scroll-margin-top: 120px; }
.task:last-child { border-bottom: 0; }
.task:target { background: var(--accent-soft); }
.task-main { min-width: 0; flex: 1; }
.task-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.task.done .task-title strong { text-decoration: line-through; color: var(--muted); }
.task .muted.small { margin-top: 1px; }
.helpers { display: flex; flex-wrap: wrap; gap: 4px; flex-basis: 100%; }
.progress { display: flex; align-items: center; gap: 10px; font-size: .88rem; flex-basis: 100%; }
.progress .bar { width: 120px; height: 8px; border-radius: 4px; flex-shrink: 0; }
.progress .missing { color: var(--maybe); font-weight: 600; }
.progress.complete { color: var(--yes); }
.join { display: flex; align-items: center; gap: 6px; }
.join .amount input { width: 56px; min-height: 36px; }
.amount { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.amount input { width: 64px; min-height: 34px; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.chip { font-size: .82rem; padding: 1px 8px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); overflow-wrap: anywhere; }
.chip.me { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.task-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.note-form { display: flex; align-items: center; gap: 8px; flex-basis: 100%; max-width: 440px; }
.note-form input { flex: 1; min-width: 0; min-height: 34px; padding: 5px 9px; font-size: .9rem; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.more { position: relative; }
.more summary { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; color: var(--muted); }
.more summary:hover { background: var(--bg); color: var(--ink); }
.more .icon { stroke-width: 3.2; }
.danger-zone { margin-top: 18px; text-align: right; }

/* Chat */
.chat-top { display: flex; align-items: baseline; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.chat-top .btn { margin-left: auto; }
.chat { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: calc(100dvh - 230px); min-height: 380px; }
.chat-history { display: flex; justify-content: space-between; padding: 6px 12px; font-size: .88rem; border-bottom: 1px solid var(--line); }
.chat-log { flex: 1; overflow-y: auto; padding: 10px 12px 6px; background: #f4f3ec; display: flex; flex-direction: column; overscroll-behavior: contain; }
.chat-empty { margin: auto; color: var(--muted); }
.day { text-align: center; margin: 10px 0 6px; }
.day span { font-size: .78rem; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 1px 10px; }
.msg { position: relative; align-self: flex-start; max-width: min(78%, 620px); background: var(--bubble); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; padding: 5px 10px 5px; margin-top: 6px; }
.msg.cont { margin-top: 2px; border-radius: 12px; }
.msg.mine { align-self: flex-end; background: var(--bubble-mine); border-color: transparent; border-radius: 12px 4px 12px 12px; }
.msg.mine.cont { border-radius: 12px; }
.msg-head { font-size: .82rem; line-height: 1.3; margin-bottom: 1px; }
.msg-head strong { color: var(--accent); }
.msg-head span { color: var(--muted); }
.msg p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .97rem; line-height: 1.4; }
.msg time { float: right; font-size: .72rem; color: var(--muted); margin: 6px 0 -4px 10px; line-height: 1; white-space: nowrap; }
.msg-del { position: absolute; top: 2px; right: -30px; opacity: 0; transition: opacity .1s; }
.msg.mine .msg-del { right: auto; left: -30px; }
.msg-del button { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); }
.msg-del button:hover { color: var(--no); background: var(--no-soft); }
.msg-del .icon { width: 15px; height: 15px; }
.msg:hover .msg-del, .msg:focus-within .msg-del, .msg.open .msg-del { opacity: 1; }
.compose { border-top: 1px solid var(--line); padding: 8px 10px; background: var(--surface); }
.compose .form-errors { margin-bottom: 6px; }
.compose-row { display: flex; align-items: flex-end; gap: 8px; }
.compose textarea { flex: 1; resize: none; min-height: 42px; max-height: 160px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 21px; background: var(--bg); line-height: 1.4; }
.send { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 21px; border: 0; background: var(--accent); color: var(--accent-ink); flex-shrink: 0; }
.send .icon { width: 19px; height: 19px; }
.compose-name { font-size: .82rem; color: var(--muted); margin: 5px 4px 0; }
.compose-name summary { cursor: pointer; list-style: none; }
.compose-name summary::-webkit-details-marker { display: none; }
.compose-name .u { text-decoration: underline; }
.name-field { display: grid; gap: 4px; margin-top: 6px; max-width: 320px; }
.name-field input { min-height: 38px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }

/* Neighbors */
.streets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.card.flat h2 { margin-bottom: 6px; }
.neighbor-list { list-style: none; padding: 0; }
.neighbor-list li { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.neighbor-list li:last-child { border: 0; }
.num { font-weight: 700; font-variant-numeric: tabular-nums; }
.state { font-size: .85rem; }

/* Manage */
.manage { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.manage .card > h2 { margin-bottom: 12px; }
.household-list { list-style: none; padding: 0; }
.household-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.household-list li:last-child { border: 0; }
.household-list .small { display: block; }

/* Prose */
.prose h2 { margin: 20px 0 6px; }
.prose p { color: var(--muted); }
.prose h1 + h2 { margin-top: 14px; }
.narrow .card h1 { font-size: 1.4rem; margin-bottom: 8px; }
.narrow .card .lead { margin-bottom: 16px; }

@media (max-width: 760px) {
  .wrap { padding: 16px; }
  h1 { font-size: 1.9rem; }
  .hero { grid-template-columns: 1fr; padding: 22px; gap: 4px; }
  .hero .neighborhood-art { max-height: 120px; order: -1; }
  .brand { font-size: .95rem; }
  .brand small { font-size: .68rem; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-mark .icon { width: 19px; height: 19px; }
  .top-inner { padding: 8px 16px 0; min-height: 46px; }
  .tabs-inner { padding: 0 6px; justify-content: space-between; }
  .tabs a { flex-direction: column; gap: 2px; padding: 8px 6px 6px; font-size: .78rem; flex: 1; position: relative; }
  .tabs .count { position: absolute; top: 2px; left: calc(50% + 6px); }
  .dash, .streets, .manage { grid-template-columns: 1fr; }
  .poll-row { grid-template-columns: 1fr; grid-template-areas: "date" "answer" "tally" "org"; }
  .option-row { grid-template-columns: 1fr auto; }
  .option-row > form:first-child, .option-row > .choice { grid-column: 1 / -1; }
  .note-form { flex-wrap: wrap; }
  .note-form input[name=note] { flex: 1 1 160px; }
  .progress .bar { width: 90px; }
  .answer { width: 100%; }
  .answer button { flex: 1; padding: 8px 4px; }
  .org-actions { flex-direction: row; gap: 16px; }
  .inline-form { grid-template-columns: 1fr 1fr; }
  .inline-form .field:nth-of-type(3), .inline-form .btn { grid-column: 1 / -1; }
  .task { align-items: center; }
  .task-main { flex: 1 1 100%; }
  .timeline.compact { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task .progress { flex: 1 1 0; order: 2; min-width: 0; flex-wrap: wrap; gap: 4px 8px; }
  .task-actions { order: 3; gap: 4px; }
  .task .helpers { order: 4; }
  .task .note-form { order: 5; }
  .more summary { width: 32px; }
  .segmented { width: 100%; }
  .segmented a { flex: 1; text-align: center; padding: 8px 6px; }
  .toolbar .btn { margin-left: auto; }
  .page-chat main.wrap { padding: 8px 8px 0; }
  .page-chat .foot { display: none; }
  .chat-top { padding: 0 6px; margin-bottom: 8px; }
  .chat-top h1 { font-size: 1.25rem; }
  .chat { height: calc(100dvh - 160px); border-radius: var(--radius) var(--radius) 0 0; }
  .msg { max-width: 86%; }
  .msg-del { top: -6px; right: -6px; }
  .msg.mine .msg-del { left: -6px; }
  .msg-del button { background: var(--surface); border: 1px solid var(--line); }
}
@media (hover: none) {
  .msg-del { display: none; }
  .msg.open .msg-del { display: block; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.spaced { margin: 22px 0 8px; }
.card > h2 { margin-bottom: 10px; }
