html, body { margin: 0; min-height: 100%; }

/* NeighborDibs web app. One phone-width column, tab bar fixed at the bottom. Tokens mirror the NeighborDibs design system. */
:root {
  --leaf: #16804F; --canopy: #0E4A30; --on-leaf: #FFFFFF; --sprout: #C5E86C; --on-sprout: #0E4A30;
  --shoot: #E4F3E8; --manila: #EBDDB9; --paper: #F4F8F4; --white: #FFFFFF; --mist: #DFE8E2;
  --ink: #14261C; --ink2: #4F6458; --line: #DDE6E0; --ctrl: #76877D; --err: #A33434; --err-bg: #F8E9E7;
  --display: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --text: "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --leaf: #4CC283; --canopy: #B8E6C6; --on-leaf: #06241A; --sprout: #B5DB5C; --on-sprout: #0E2A12;
  --shoot: #173226; --manila: #3B3424; --paper: #0F1612; --white: #17211B; --mist: #1C2A22;
  --ink: #E8F0EA; --ink2: #A3B5A9; --line: #26342C; --ctrl: #66786D; --err: #F08A80; --err-bg: #2E1A18; color-scheme: dark; } }
:root[data-theme="dark"] {
  --leaf: #4CC283; --canopy: #B8E6C6; --on-leaf: #06241A; --sprout: #B5DB5C; --on-sprout: #0E2A12;
  --shoot: #173226; --manila: #3B3424; --paper: #0F1612; --white: #17211B; --mist: #1C2A22;
  --ink: #E8F0EA; --ink2: #A3B5A9; --line: #26342C; --ctrl: #66786D; --err: #F08A80; --err-bg: #2E1A18; color-scheme: dark; }
html, body { background: var(--paper); }
body { color: var(--ink); font-family: var(--text); font-size: 16px; line-height: 24px; -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
#app { max-width: 480px; margin: 0 auto; padding-inline: 20px; padding-block: 12px calc(96px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 20px; min-height: 100%; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
h1 { font-size: 30px; line-height: 34px; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 20px; line-height: 26px; font-weight: 700; }
h3 { font-size: 17px; line-height: 22px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--ink2); }
.small { font-size: 14px; line-height: 20px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.wordmark { display: inline-flex; align-items: flex-start; gap: 3px; font-family: var(--display); font-weight: 800; color: var(--leaf); }
.wordmark .wm { display: flex; flex-direction: column; }
.wordmark small { font-size: 12px; line-height: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--canopy); font-weight: 800; }
.wordmark .big { font-size: 30px; line-height: 28px; letter-spacing: -0.04em; display: inline-flex; align-items: flex-start; gap: 3px; }
.wordmark i { width: 11px; height: 11px; border-radius: 99px; background: var(--sprout); box-shadow: 0 0 0 2px var(--canopy); margin-top: 1px; }
.btn { font-family: var(--display); font-size: 16px; line-height: 22px; font-weight: 700; min-height: 48px; padding: 0 20px; border-radius: 10px; border: 1.5px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--leaf); color: var(--on-leaf); }
.btn-primary:hover { background: var(--canopy); }
.btn-secondary { background: var(--white); color: var(--canopy); border-color: var(--ctrl); }
.btn-quiet { background: transparent; color: var(--leaf); padding: 0 4px; text-decoration: underline; text-underline-offset: 4px; min-height: 44px; }
.btn-full { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, label.file:focus-within { outline: 2px solid var(--leaf); outline-offset: 2px; }
.dot { width: 13px; height: 13px; border-radius: 99px; background: var(--sprout); box-shadow: 0 0 0 2px var(--on-leaf); flex: none; }
.btn-secondary .dot { box-shadow: 0 0 0 2px var(--canopy); }
.path { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 10px; background: var(--shoot); color: var(--ink); text-align: left; font: inherit; border: 1.5px solid transparent; cursor: pointer; width: 100%; }
.path:hover { border-color: var(--leaf); }
.path .ic { width: 48px; height: 48px; flex: none; border-radius: 99px; background: var(--white); color: var(--canopy); display: grid; place-items: center; }
.path .ey { font-size: 14px; line-height: 20px; font-weight: 700; color: var(--leaf); }
.path .tt { font-family: var(--display); font-size: 21px; line-height: 26px; font-weight: 800; color: var(--canopy); }
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.steps li { display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 19px; }
.steps b { width: 28px; height: 28px; border-radius: 99px; background: var(--leaf); color: var(--on-leaf); display: grid; place-items: center; font-family: var(--display); font-weight: 800; }
.steps li:last-child b { background: var(--sprout); color: var(--on-sprout); box-shadow: 0 0 0 2px var(--canopy); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { text-align: left; font: inherit; color: var(--ink); background: var(--shoot); border: 1.5px solid transparent; border-radius: 10px; padding: 16px; min-height: 140px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.tile:hover { border-color: var(--leaf); }
.tile svg { color: var(--canopy); }
.tile b { font-family: var(--display); font-size: 19px; line-height: 23px; font-weight: 800; color: var(--canopy); margin-top: 18px; }
.tile span { font-size: 14px; line-height: 20px; color: var(--ink2); }
.lbl { font-size: 14px; line-height: 20px; font-weight: 700; }
input[type="text"], input[type="number"], textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--ctrl); background: var(--white); color: var(--ink); font-family: var(--text); font-size: 16px; line-height: 22px; }
textarea { resize: vertical; min-height: 76px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--ctrl); background: var(--white); color: var(--ink); font-family: var(--text); font-size: 14px; font-weight: 700; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--leaf); border-color: var(--leaf); color: var(--on-leaf); }
.chip.soft { background: var(--shoot); border-color: transparent; color: var(--canopy); }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 10px; background: var(--mist); }
.seg button { min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--canopy); font-family: var(--text); font-size: 15px; font-weight: 700; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--leaf); color: var(--on-leaf); }
label.file { display: inline-flex; }
label.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.card { background: var(--white); border-radius: 10px; padding: 14px 16px; }
.note { border-radius: 10px; padding: 12px 14px; background: var(--shoot); color: var(--canopy); display: flex; gap: 12px; align-items: flex-start; }
.note p { color: var(--ink); font-size: 14px; line-height: 20px; }
.note b { font-family: var(--display); font-size: 16px; line-height: 22px; display: block; color: var(--canopy); }
.note.warn { background: var(--err-bg); color: var(--err); }
.note.warn b { color: var(--err); }
.note svg { flex: none; }
.free { font-family: var(--display); font-weight: 800; color: var(--leaf); white-space: nowrap; }
.tag { font-family: var(--display); font-weight: 800; color: var(--ink); background: var(--manila); border-radius: 6px; padding: 0 8px 0 6px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--ctrl); }
.match { display: flex; gap: 12px; padding: 12px; border-radius: 10px; background: var(--white); text-align: left; font: inherit; color: var(--ink); border: 0; cursor: pointer; width: 100%; }
.match img, .thumb { width: 84px; height: 105px; border-radius: 8px; object-fit: cover; flex: none; background: var(--mist); }
.match .why { font-size: 14px; line-height: 20px; font-weight: 700; color: var(--leaf); }
.feed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
.feed button { font: inherit; text-align: left; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.photo { position: relative; aspect-ratio: 4 / 5; width: 100%; border-radius: 10px; overflow: hidden; background: var(--mist); margin-bottom: 6px; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sticker { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 99px; background: var(--sprout); color: var(--on-sprout); box-shadow: 0 0 0 2px var(--canopy); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 13px; transform: rotate(-8deg); animation: stick 180ms ease-out; }
@keyframes stick { from { transform: rotate(-8deg) scale(1.2); } to { transform: rotate(-8deg) scale(1); } }
.big-photo { position: relative; width: 100%; aspect-ratio: 4 / 4; border-radius: 10px; overflow: hidden; background: var(--mist); }
.big-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pill { display: inline-flex; align-items: center; font-size: 14px; line-height: 20px; font-weight: 700; padding: 2px 12px; border-radius: 99px; background: var(--shoot); color: var(--canopy); white-space: nowrap; }
.pill.private { background: var(--white); color: var(--ink2); box-shadow: inset 0 0 0 1.5px var(--ctrl); }
.pill.matched { background: var(--leaf); color: var(--on-leaf); }
.pill.picked { background: var(--manila); color: var(--ink); }
.list-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); width: 100%; font: inherit; color: var(--ink); background: none; border-top: 0; border-left: 0; border-right: 0; text-align: left; cursor: pointer; }
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.tabs button { min-height: 48px; border: 0; background: none; font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--ink2); cursor: pointer; box-shadow: inset 0 -3px 0 transparent; }
.tabs button[aria-selected="true"] { color: var(--leaf); box-shadow: inset 0 -3px 0 var(--leaf); }
.bubble-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.bubble-row.me { align-items: flex-end; }
.bubble { max-width: 80%; padding: 8px 12px; border-radius: 10px 10px 10px 2px; background: var(--white); overflow-wrap: anywhere; }
.me .bubble { background: var(--leaf); color: var(--on-leaf); border-radius: 10px 10px 2px 10px; }
.sys { padding: 10px 14px; border-radius: 10px; background: var(--mist); font-size: 14px; line-height: 20px; }
.sys b { color: var(--canopy); }
.nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--white); box-shadow: 0 -1px 0 var(--line), 0 -6px 20px rgba(14, 74, 48, .07); padding-bottom: env(safe-area-inset-bottom, 0px); z-index: 5; }
.nav div { max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: 64px; }
.nav button { position: relative; border: 0; background: none; color: var(--ink2); font-family: var(--text); font-size: 13px; line-height: 16px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; }
.nav button[aria-current="page"] { color: var(--leaf); }
.nav .add span:first-child { width: 44px; height: 30px; border-radius: 99px; background: var(--leaf); color: var(--on-leaf); display: grid; place-items: center; }
.nav .badge { position: absolute; top: 8px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--leaf); color: var(--on-leaf); font-size: 12px; line-height: 18px; }
.toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: 440px; width: calc(100% - 40px); background: var(--canopy); color: var(--paper); padding: 12px 16px; border-radius: 10px; font-size: 15px; line-height: 21px; z-index: 6; }
.spinner { width: 22px; height: 22px; border-radius: 99px; border: 3px solid var(--mist); border-top-color: var(--leaf); animation: spin 900ms linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.who button { min-height: 64px; border-radius: 10px; border: 1.5px solid var(--ctrl); background: var(--white); color: var(--ink); font-family: var(--display); font-size: 18px; font-weight: 700; cursor: pointer; }
.who button[aria-pressed="true"] { border-color: var(--leaf); box-shadow: inset 0 0 0 1.5px var(--leaf); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .sticker, .spinner { animation: none; } }

.lang { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 8px; border-radius: 99px; border: 1.5px solid var(--ctrl); background: var(--white); color: var(--ink); }
.lang select { border: 0; background: transparent; color: var(--ink); font-family: var(--text); font-size: 14px; font-weight: 700; padding: 0; min-height: 36px; cursor: pointer; }
.lang:focus-within { outline: 2px solid var(--leaf); outline-offset: 2px; }

/* someone called dibs: the owner must answer */
.alert-card { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; font: inherit; color: var(--on-sprout); background: var(--sprout); border: 2px solid var(--canopy); border-radius: 12px; padding: 12px; cursor: pointer; }
.alert-card img { width: 56px; height: 70px; object-fit: cover; border-radius: 8px; flex: none; }
.alert-card b { font-family: var(--display); font-size: 18px; line-height: 22px; }
.alert-card .small { font-weight: 700; }
.alert-card .dot { box-shadow: none; background: var(--canopy); }
.kicker { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 800; font-size: 15px; line-height: 20px; color: var(--canopy); }
.alert-card .kicker { color: var(--on-sprout); }
.nav .badge.alert { background: var(--sprout); color: var(--on-sprout); box-shadow: 0 0 0 2px var(--canopy); }
.pill.alert { background: var(--sprout); color: var(--on-sprout); box-shadow: inset 0 0 0 2px var(--canopy); }

/* chat pickup plan */
.plan { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.plan li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink2); }
.plan li > b { width: 28px; height: 28px; flex: none; border-radius: 99px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; background: var(--mist); color: var(--ink2); }
.plan li strong { font-family: var(--display); font-size: 16px; line-height: 22px; }
.plan li.now { color: var(--ink); }
.plan li.now > b { background: var(--leaf); color: var(--on-leaf); }
.plan li.done > b { background: var(--shoot); color: var(--canopy); box-shadow: inset 0 0 0 2px var(--leaf); }
.plan li.done strong { color: var(--canopy); }
.plan .btn { align-self: flex-start; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--leaf); text-decoration: underline; cursor: pointer; }

/* search */
.search { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--ctrl); border-radius: 99px; padding: 0 16px; background: var(--white); color: var(--ink2); }
.search:focus-within { border-color: var(--leaf); box-shadow: 0 0 0 3px var(--shoot); }
.search input { border: 0; outline: 0; background: transparent; min-height: 48px; padding: 0; flex: 1; font: inherit; color: var(--ink); box-shadow: none; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
#search-results:empty { display: none; }

/* reliability */
.bad { color: var(--err); }
.btn.bad { color: var(--err); }
.plan .row { gap: 8px; }
.plan .small svg { vertical-align: -3px; color: var(--leaf); }
.alert-card.soft { background: var(--shoot); color: var(--canopy); border-color: var(--leaf); }
.alert-card.soft .kicker { color: var(--canopy); }
.alert-card.urgent { background: var(--err-bg); color: var(--err); border-color: var(--err); }
.alert-card.urgent .kicker { color: var(--err); }

/* interest + success stories */
.interest { font-weight: 700; color: var(--canopy); }
.success { display: flex; flex-direction: column; gap: 4px; }
.feed .success .btn { flex-direction: row; align-items: center; gap: 6px; color: var(--leaf); font-weight: 700; }
.success .photo img { filter: saturate(.75); }
.sticker.home { width: auto; height: auto; padding: 4px 10px; border-radius: 99px; background: var(--manila); color: var(--ink); box-shadow: 0 0 0 2px var(--ink2); font-size: 12px; transform: rotate(-4deg); }
.big-photo.full img { object-fit: contain; }
