/* CoNabo prototype. Civic look: Public Sans, navy, cool grey, 8px radii. */
:root {
  --bg: #F4F5F7; --card: #FFFFFF; --line: #D6DBE1; --line2: #E3E7EC;
  --ink: #0E1A26; --ink2: #26323E; --muted: #4A5562; --faint: #8A96A3;
  --navy: #0F3A63; --navy-d: #0B2C4B; --tint: #E7EEF6;
  --green: #1D6B45; --green-t: #E5F1EA; --amber: #6B4E00; --amber-t: #FFF4D6; --turn: #C28E00;
  --red: #9B2C1F; --hl: #F2C230;
  --font: 'Public Sans', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: #E3E7EC; font-family: var(--font); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--hl); outline-offset: 2px; }
.eyebrow { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }

/* ---------- stage ---------- */
#stage { display: grid; grid-template-columns: 360px minmax(0, 1fr) 440px; height: 100vh; }
body[data-mode="mid"] #stage { grid-template-columns: minmax(0, 1fr) 440px; }
body[data-mode="mid"] #flowPanel { display: none; }
.panel { background: #FFFFFF; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
#flowPanel { border-right: 1px solid var(--line); }
#specPanel { border-left: 1px solid var(--line); }
.flow-head { padding: 18px 20px 8px; }
.flow-head h2 { margin: 4px 0 4px; font-size: 17px; }
.flow-head p { margin: 0; font-size: 12.5px; line-height: 18px; color: var(--muted); }
.flowbox { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 10px 24px; }
.flowbox.inpanel { overflow: visible; padding: 0; }

#center { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 16px; min-width: 0; overflow: hidden; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(560px, 100%); margin-bottom: 12px; font-size: 13px; }
.brandline b { font-size: 15px; margin-right: 4px; }
.brandline span { display: block; color: var(--muted); font-size: 12px; }
.tools { display: flex; gap: 6px; }
.pbtn { height: 34px; padding: 0 12px; border-radius: 6px; border: 1px solid #B9C1CB; background: #FFFFFF; font-size: 13px; font-weight: 600; }
.pbtn:hover { border-color: var(--navy); }
.pbtn[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }

#deviceWrap { position: relative; flex: none; }
#device { position: absolute; left: 0; top: 0; width: 418px; height: 872px; padding: 14px; border-radius: 60px; background: #10151B; transform-origin: top left;
  box-shadow: inset 0 0 0 2px #2B323B, inset 0 0 0 5px #10151B, inset 0 0 0 6px #3A424D, 0 30px 70px rgba(14, 26, 38, .28); }
#screen { position: relative; width: 390px; height: 844px; border-radius: 46px; overflow: hidden; background: var(--bg); --sat: 56px; --sab: 26px; isolation: isolate; }
.island { position: absolute; z-index: 70; top: 25px; left: 50%; width: 122px; height: 35px; border-radius: 18px; background: #000000; transform: translateX(-50%); }
.statusbar { position: absolute; z-index: 65; top: 0; left: 0; right: 0; height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 4px 30px 0 48px; font-size: 16px; font-weight: 600; pointer-events: none; color: var(--ink); }
.sb-r { display: flex; gap: 6px; align-items: center; fill: currentColor; color: currentColor; }
.homebar { position: absolute; z-index: 65; bottom: 8px; left: 50%; width: 136px; height: 5px; border-radius: 3px; background: var(--ink); transform: translateX(-50%); pointer-events: none; }
#screen.dark .statusbar { color: #FFFFFF; }
#screen.dark .homebar { background: #FFFFFF; }

/* ---------- app shell ---------- */
.app { position: absolute; inset: 0; font-size: 15px; line-height: 1.35; }
.home { position: absolute; inset: 0; display: flex; flex-direction: column; }
.home-scroll { flex: 1; overflow-y: auto; padding-bottom: 12px; }
.home-head { padding: var(--sat) 18px 8px; }
.home-head h1 { margin: 2px 0 2px; font-size: 21px; line-height: 27px; letter-spacing: -.2px; }
.home-head p { margin: 0; font-size: 13px; color: var(--muted); }
.demo-tag { font-size: 10px; font-weight: 700; letter-spacing: .8px; color: var(--muted); border: 1px solid #B9C1CB; border-radius: 4px; padding: 3px 5px; white-space: nowrap; }
.demo-tag.sm { font-size: 9px; padding: 1px 4px; vertical-align: 3px; margin-left: 4px; }

.today { padding: 4px 0 10px; }
.today h3 { margin: 0 18px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.today-row { display: flex; gap: 8px; overflow-x: auto; padding: 0 14px 2px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.today-row::-webkit-scrollbar { display: none; }
.tcard { flex: 0 0 262px; scroll-snap-align: start; text-align: left; background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.tcard.hot { background: var(--tint); border-color: var(--navy); }
.tcard .tk { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--navy); }
.tcard b { font-size: 15px; }
.tcard .ts { font-size: 12.5px; color: var(--muted); }
.today-empty { margin: 0 18px; font-size: 13px; color: var(--muted); }

.stairwell { margin: 0 12px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; position: relative; }
.stairwell::before { content: ''; display: block; height: 8px; background: var(--navy); }
.floor { display: grid; grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--line2); }
.floor.my-floor { background: #F3F7FB; }
.fl-no { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--faint); background: #F7F8FA; border-right: 1px solid var(--line2); }
.my-floor .fl-no { color: var(--navy); background: var(--tint); }
.flat { min-width: 0; min-height: 96px; padding: 7px 8px 9px; display: flex; flex-direction: column; gap: 6px; }
.flat + .flat { border-left: 1px dashed var(--line); }
.flat.me { background: #FFFFFF; box-shadow: inset 0 0 0 2px var(--navy); }
.flat.off, .flat.hidden-flat { background: repeating-linear-gradient(135deg, #FAFBFC 0 8px, #F3F5F7 8px 16px); }
.off-note { font-size: 11.5px; color: var(--faint); }
.who { display: flex; align-items: center; gap: 6px; min-height: 28px; padding: 0; border: none; background: none; text-align: left; font-size: 13px; min-width: 0; }
.who .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .fl { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
span.who { color: var(--faint); }
.mine-people .who .av { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 3.5px var(--navy); }
.av { flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #FFFFFF; font-weight: 700; }
.things { display: flex; flex-wrap: wrap; gap: 6px; }
.thumb { position: relative; width: 48px; height: 48px; padding: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #E3E7EC; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .tb { position: absolute; left: 2px; right: 2px; bottom: 2px; font-size: 9px; font-style: normal; font-weight: 700; line-height: 13px; text-align: center; color: #FFFFFF; background: rgba(14, 26, 38, .8); border-radius: 3px; }
.thumb .tb.away { background: var(--green); }
.thumb .tb.own { background: var(--navy); }
.thumb.dim img { opacity: .5; filter: grayscale(.5); }
.thumb.out { border: 1.5px dashed #9AA5B1; background: var(--bg); font-size: 10.5px; font-weight: 700; color: var(--muted); }
.thumb.arrived { animation: arrive 1.1s ease 1; }
@keyframes arrive { 0% { transform: translateY(-40px) scale(.6); opacity: 0; } 60% { transform: translateY(4px) scale(1.06); opacity: 1; } 100% { transform: none; } }
.none { font-size: 12px; color: var(--faint); }
.ground-floor { background: #EEF0F3; }
.gf-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 4px 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.gf-head span { width: 24px; text-align: center; font-weight: 700; color: var(--faint); }
.wanted { display: flex; align-items: center; gap: 10px; width: calc(100% - 20px); margin: 4px 10px 6px 24px; width: calc(100% - 34px); min-height: 60px; padding: 8px 10px; border: 1.5px dashed var(--navy); border-radius: 8px; background: #FFFFFF; text-align: left; }
.wanted .ph { flex: none; width: 44px; height: 44px; border-radius: 6px; overflow: hidden; }
.wanted b { font-size: 14px; }
.ground { display: block; width: 100%; padding: 8px 12px 10px 34px; border: none; background: none; text-align: left; font-size: 12px; color: var(--muted); }
.ph-q { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--tint); color: var(--navy); font-size: 22px; font-weight: 700; }
.row.want { background: #FBFCFE; }

.dock { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px var(--sab); background: rgba(244, 245, 247, .94); border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ask { flex: 1; height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-radius: 25px; border: 1.5px solid #9AA5B1; background: #FFFFFF; font-size: 16px; color: var(--muted); text-align: left; box-shadow: 0 1px 2px rgba(14, 26, 38, .06); }
.ask svg { color: var(--navy); }
.me-btn { padding: 0; border: none; background: none; border-radius: 50%; }

/* ---------- sheets and pages ---------- */
.scrim { position: absolute; inset: 0; background: rgba(14, 26, 38, .38); animation: fade .25s ease; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--sat) + 4px); display: flex; flex-direction: column; background: var(--bg); border-radius: 14px 14px 0 0; box-shadow: 0 -8px 30px rgba(14, 26, 38, .18); overflow: hidden; }
.sheet.enter { animation: up .32s cubic-bezier(.2, .8, .2, 1); }
.sheet.swap .sh-body, .page.swap { animation: fade .22s ease; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sh-head { position: relative; flex: none; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: 14px 6px 4px; }
.grab { position: absolute; top: 6px; left: 50%; width: 36px; height: 5px; border-radius: 3px; background: #C9D0D8; transform: translateX(-50%); }
.sh-head h2 { margin: 0; font-size: 16px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: none; background: none; color: var(--navy); border-radius: 22px; }
.nav-sp { width: 44px; }
.sh-body { flex: 1; overflow-y: auto; padding: 8px 18px 20px; }
.sh-foot { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 12px 18px var(--sab); background: #FFFFFF; border-top: 1px solid var(--line); }
.page { position: absolute; inset: 0; display: flex; flex-direction: column; overflow-y: auto; padding: var(--sat) 20px var(--sab); background: var(--bg); }

/* ---------- common ---------- */
.btn { width: 100%; height: 50px; display: flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; text-decoration: none; }
.btn.primary { background: var(--navy); color: #FFFFFF; }
.btn.primary:hover { background: var(--navy-d); }
.btn.primary:disabled { background: #C9D0D8; color: var(--muted); }
.btn.secondary { background: #FFFFFF; color: var(--navy); border: 1.5px solid var(--navy); }
.btn.ghost { background: transparent; color: var(--navy); height: 44px; }
.btn.ghost.light { color: #FFFFFF; border: 1.5px solid rgba(255, 255, 255, .6); height: 50px; }
.btn.link { background: none; color: var(--muted); height: 40px; font-size: 15px; font-weight: 500; text-decoration: underline; }
.btn.link.inline { display: inline; width: auto; height: auto; padding: 0; font-size: 13px; }
.btn.wide { margin: 10px 0 0; }
.btn-pair { display: flex; gap: 8px; }
.btn-pair .btn { flex: 1; }
.sec { margin: 18px 2px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); font-size: 13.5px; }
.pad { padding: 12px 14px; margin: 0; }
.fine { margin: 8px 2px 0; font-size: 12.5px; line-height: 17px; color: var(--muted); }
.hint { margin: 2px 2px 8px; font-size: 12.5px; color: var(--muted); }
.lead { margin: 0 0 14px; font-size: 15px; color: var(--muted); }
.lead-s { margin: 0 0 12px; font-size: 14px; line-height: 20px; color: var(--muted); }
.h1 { margin: 4px 0 6px; font-size: 26px; line-height: 32px; letter-spacing: -.3px; }
.h1.sm { font-size: 22px; line-height: 28px; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 4px; background: #EEF0F3; color: var(--muted); white-space: nowrap; }
.tag.green { background: var(--green-t); color: var(--green); }
.tag.amber { background: var(--amber-t); color: var(--amber); }
.tag.navy { background: var(--tint); color: var(--navy); }
.flag-off { margin: 10px 0; padding: 8px 10px; font-size: 12.5px; color: var(--amber); background: var(--amber-t); border-radius: 6px; }

.dl { margin: 0; padding: 0 14px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 8px; }
.dl-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.dl-row:last-child { border-bottom: none; }
.dl-row dt { flex: none; max-width: 45%; font-size: 13.5px; color: var(--muted); }
.dl-row dd { flex: 1; margin: 0; font-size: 14px; font-weight: 600; text-align: right; }
.chg { flex: none; min-height: 40px; padding: 0 0 0 6px; border: none; background: none; color: var(--navy); font-size: 14px; text-decoration: underline; }
.okc { display: inline-flex; align-items: center; gap: 4px; color: var(--green); }

.list { background: #FFFFFF; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 9px 12px; border: none; border-bottom: 1px solid var(--line2); background: none; text-align: left; font-size: 15px; color: var(--ink); }
.row:last-child { border-bottom: none; }
.row > svg { color: var(--faint); flex: none; }
.row .ph { flex: none; width: 46px; height: 46px; border-radius: 8px; overflow: hidden; background: #E3E7EC; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph.none img { filter: grayscale(1); opacity: .55; }
.rt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rt b { font-size: 15px; }
.rt span { font-size: 12.5px; line-height: 17px; color: var(--muted); }
.row.danger b { color: var(--red); }
.notice { margin: 12px 0; padding: 12px 14px; background: #FFFFFF; border: 1px solid var(--line); border-top: 3px solid var(--navy); border-radius: 8px; }
.notice b { font-size: 15px; }
.notice p { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--ink2); }
.notice .btn { margin-top: 10px; height: 44px; }
.reason { margin: 0; font-size: 13px; line-height: 18px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid #B9C1CB; background: #FFFFFF; font-size: 13px; font-weight: 600; }
.chip.static { display: inline-flex; align-items: center; height: 30px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.field span { font-size: 14px; font-weight: 600; }
.field input:not([type="range"]) { height: 48px; padding: 0 12px; border: 2px solid var(--ink); border-radius: 6px; background: #FFFFFF; font-size: 18px; font-weight: 600; letter-spacing: 1px; }
.field input[aria-invalid="true"] { border-color: var(--red); }
input[type="range"] { width: 100%; accent-color: var(--navy); height: 32px; }
.err { margin: 6px 0 0; color: var(--red); font-size: 13.5px; font-weight: 600; }
textarea { width: 100%; padding: 10px 12px; border: 1.5px solid #8A96A3; border-radius: 8px; background: #FFFFFF; font-size: 15px; line-height: 21px; resize: none; }

/* ---------- join ---------- */
.join { gap: 0; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { display: block; font-size: 18px; }
.brand small { display: block; font-size: 12px; color: var(--muted); }
.brand .demo-tag { margin-left: auto; }
.emblem { width: 40px; height: 40px; border-radius: 10px; background: var(--navy); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.note { margin-top: 22px; padding: 20px 18px; background: #FFFEFA; border: 1px solid #E2DED2; border-radius: 4px; transform: rotate(-.7deg); box-shadow: 0 2px 0 #ECE8DD, 0 12px 26px rgba(14, 26, 38, .09); }
.note h1 { margin: 6px 0 10px; font-size: 22px; line-height: 28px; }
.note p { margin: 0 0 10px; font-size: 15px; line-height: 22px; color: var(--ink2); }
.note .sig { color: var(--muted); font-size: 14px; }
.join-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.join-foot .fine { text-align: center; }
.link-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; height: 40px; margin-left: -6px; padding: 0; border: none; background: none; color: var(--navy); font-size: 15px; font-weight: 500; }
.pick { background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pick::before { content: ''; display: block; height: 8px; background: var(--navy); }
.pick-floor { display: grid; grid-template-columns: 26px 1fr 1fr; border-bottom: 1px solid var(--line2); }
.pick-flat { min-height: 54px; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 6px 10px; border: none; border-left: 1px dashed var(--line); background: none; text-align: left; }
.pick-flat b { font-size: 14px; }
.pick-flat span { font-size: 12px; color: var(--muted); }
.pick-flat.taken { color: var(--faint); background: #FAFBFC; }
.pick-flat.taken span { color: var(--faint); }
.pick-flat.free { background: var(--tint); color: var(--navy); }
.pick-flat.free.sel { background: #FFFFFF; box-shadow: inset 0 0 0 2.5px var(--navy); }
.pick-ground { padding: 9px 12px; background: #EEF0F3; font-size: 12px; color: var(--muted); }
.inv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.inv-tile { position: relative; padding: 0; overflow: hidden; border: 1.5px solid var(--line); border-radius: 10px; background: #FFFFFF; text-align: left; }
.inv-tile img { display: block; width: 100%; height: 104px; object-fit: cover; }
.inv-grid.sm .inv-tile img { height: 92px; }
.inv-tile span { display: block; padding: 8px 10px; font-size: 14px; font-weight: 600; }
.inv-tile i { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 13px; border: 1.5px solid #9AA5B1; background: rgba(255, 255, 255, .92); color: transparent; }
.inv-tile.on { border: 2.5px solid var(--navy); }
.inv-tile.on i { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }

/* ---------- ask and ladder ---------- */
.searchbox { display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 12px; border: 2px solid var(--ink); border-radius: 8px; background: #FFFFFF; color: var(--navy); }
.searchbox input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-size: 16px; color: var(--ink); }
.lad-head { display: flex; align-items: center; gap: 12px; margin: 2px 0 14px; }
.lad-head .ph { flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; }
.lad-head.sm .ph { width: 48px; height: 48px; }
.lad-head b { display: block; font-size: 18px; }
.lad-head span { font-size: 13px; color: var(--muted); }
.ladder { position: relative; display: flex; flex-direction: column; gap: 10px; }
.ladder::before { content: ''; position: absolute; left: 15px; top: 18px; bottom: 18px; width: 2px; background: #C9D0D8; }
.rung { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
.rn { position: relative; z-index: 1; width: 32px; height: 32px; margin-top: 10px; display: flex; align-items: center; justify-content: center; border-radius: 16px; border: 2px solid var(--navy); background: #FFFFFF; color: var(--navy); font-size: 14px; font-weight: 700; }
.rc { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; }
.rc p { margin: 0; font-size: 14px; line-height: 20px; }
.rh { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rh b { font-size: 16px; }
.rung.suggested .rc { border: 2px solid var(--navy); }
.rung.suggested .rn { background: var(--navy); color: #FFFFFF; }
.rung.off .rn { border-color: #C9D0D8; color: #9AA5B1; }
.rung.off .rc { background: #F8F9FA; }
.rung.off .rh b, .rung.off .rc > p:first-of-type { color: var(--muted); }
.rc .btn { height: 44px; margin-top: 4px; font-size: 15px; }
.nudge { display: flex; align-items: flex-start; gap: 6px; padding: 8px 10px; border-radius: 6px; background: var(--tint); color: var(--navy) !important; font-size: 13px !important; }
.nudge svg { flex: none; }
.link-row { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; margin-top: 14px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; font-size: 15px; font-weight: 600; color: var(--navy); }

/* ---------- passport ---------- */
.hero { position: relative; height: 196px; margin-bottom: 12px; border-radius: 10px; overflow: hidden; background: #DDE2E8; }
.hero.sm { height: 150px; }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.credit { position: absolute; right: 6px; bottom: 6px; padding: 2px 6px; border-radius: 3px; background: rgba(14, 26, 38, .72); color: #FFFFFF; font-size: 10.5px; }
.owner-row { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; text-align: left; }
.owner-row > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.owner-row b { font-size: 15px; }
.owner-row span span { font-size: 12.5px; color: var(--muted); }
.owner-row > svg { color: var(--faint); }
.ring { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; }
.ring > div { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.ring b { font-size: 14px; }
.ring i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; }
.stamps { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; }
.stamps li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line2); }
.stamps li:last-child { border-bottom: none; }
.stamps li > span:last-child { display: flex; flex-direction: column; }
.stamps b { font-size: 14px; }
.stamps li span span { font-size: 12px; color: var(--muted); }
.st-ph { flex: none; width: 40px; height: 40px; border-radius: 4px; overflow: hidden; border: 2px solid #FFFFFF; box-shadow: 0 0 0 1px var(--line), 0 2px 4px rgba(14, 26, 38, .1); transform: rotate(-4deg); }
.stamps li:nth-child(2n) .st-ph { transform: rotate(3deg); }
.st-ph img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- borrow, stake, confirm ---------- */
.dstrip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.dstrip::-webkit-scrollbar { display: none; }
.dchip { flex: 0 0 50px; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; font-size: 11.5px; color: var(--muted); }
.dchip b { font-size: 17px; color: var(--ink); }
.dchip.sel { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.dchip.sel b { color: #FFFFFF; }
.dchip.booked { opacity: .45; text-decoration: line-through; }
.wrow { display: flex; gap: 8px; }
.wchip { flex: 1; height: 44px; border: 1px solid #B9C1CB; border-radius: 8px; background: #FFFFFF; font-size: 15px; font-weight: 600; }
.wchip.sel { border: 2px solid var(--navy); background: var(--tint); color: var(--navy); }
.tpls { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.wait { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 12px; padding: 22px 16px; text-align: center; background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; }
.wait b { font-size: 16px; }
.wait p { margin: 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.wait.row-wait { flex-direction: row; justify-content: center; padding: 14px; margin: 0; font-size: 15px; font-weight: 600; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--tint); border-top-color: var(--navy); animation: spin .9s linear infinite; }
.row-wait .spin { width: 20px; height: 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
.ok-panel { display: grid; grid-template-columns: 30px 1fr; gap: 2px 10px; margin-bottom: 12px; padding: 14px 16px; border-radius: 10px; background: var(--green); color: #FFFFFF; }
.ok-panel svg { grid-row: span 2; width: 26px; height: 26px; }
.ok-panel b { font-size: 16px; }
.ok-panel p { margin: 0; font-size: 14px; line-height: 20px; }
.opt { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; padding: 12px 14px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.opt.sel { border: 2px solid var(--navy); }
.opt input[type="radio"] { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--navy); }
.opt > span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.opt b { font-size: 15px; }
.opt > span > span { font-size: 13px; color: var(--muted); }
.range-val { font-weight: 700; color: var(--navy) !important; font-size: 15px !important; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--navy); }
.receipt { padding: 14px; background: #FFFEFA; border: 1px dashed #A8B2BD; border-radius: 8px; }
.receipt .dl { margin-top: 8px; padding: 0; background: transparent; border: none; }

/* ---------- calendar ---------- */
.month { margin: 4px 0 8px; font-size: 16px; }
.cal-h, .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-h span { font-size: 11px; font-weight: 700; text-align: center; color: var(--muted); padding-bottom: 4px; }
.cd { height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #FFFFFF; font-size: 14px; }
.cd.blank { border: none; background: none; }
.cd.past { border-color: transparent; background: transparent; color: #B9C1CB; }
.cd.booked { border: none; background: #E3E7EC; color: var(--muted); text-decoration: line-through; }
.cd.sel { border: none; background: var(--navy); color: #FFFFFF; font-weight: 700; }
.cd.turn { border: 2px solid var(--turn); font-weight: 700; }
.cd.wl { box-shadow: inset 0 -3px 0 var(--turn); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0; font-size: 12px; color: var(--muted); }
.lg { display: inline-block; width: 12px; height: 12px; margin-right: 4px; border-radius: 3px; vertical-align: -2px; }
.lg.sel { background: var(--navy); }
.lg.booked { background: #E3E7EC; }
.lg.turn { border: 2px solid var(--turn); }
.odds { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 6px; padding: 8px 10px; border-radius: 6px; background: var(--tint); font-size: 13px; line-height: 18px; color: var(--navy); }
.odds svg { flex: none; }

/* ---------- handover ---------- */
.task-bar { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 4px; margin: -4px -10px 6px; }
.task-bar b { font-size: 16px; text-align: center; }
.task-bar span { font-size: 12px; color: var(--muted); padding-right: 6px; }
.task-bar.dark b, .task-bar.dark .nav-btn { color: #FFFFFF; }
.task-bar.dark span { color: #B9C1CB; }
.knock { padding: 16px 0 8px; text-align: center; }
.knock-door { width: 86px; height: 86px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; border-radius: 22px; background: var(--navy); color: #FFFFFF; }
.knock-door svg { width: 46px; height: 46px; }
.knock h1 { margin: 6px 0 4px; font-size: 32px; letter-spacing: -.4px; }
.knock p { margin: 0; font-size: 15px; color: var(--muted); }
.steps { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 12px 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; font-size: 15px; }
.steps li span { flex: none; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--tint); color: var(--navy); font-size: 13px; font-weight: 700; }
.task-foot { margin-top: auto; padding-top: 12px; }
.page.camera { background: #0B0F14; color: #FFFFFF; }
.viewfinder { position: relative; flex: 1; min-height: 300px; margin: 6px 0 0; border-radius: 14px; overflow: hidden; background: #222; }
.viewfinder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vf-c { position: absolute; width: 30px; height: 30px; border: 3px solid #FFFFFF; }
.vf-c.tl { top: 18px; left: 18px; border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
.vf-c.tr { top: 18px; right: 18px; border-left: none; border-bottom: none; border-radius: 0 8px 0 0; }
.vf-c.bl { bottom: 18px; left: 18px; border-right: none; border-top: none; border-radius: 0 0 0 8px; }
.vf-c.br { bottom: 18px; right: 18px; border-left: none; border-top: none; border-radius: 0 0 8px 0; }
.vf-hint, .vf-done { position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 16px; background: rgba(0, 0, 0, .6); font-size: 13px; white-space: nowrap; }
.vf-done { background: var(--green); }
.camera.taken .viewfinder img { filter: brightness(1.05); }
.cam-foot { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px 0 4px; }
.cam-foot .btn { flex: 1; }
.shutter { width: 74px; height: 74px; border-radius: 50%; border: 5px solid rgba(255, 255, 255, .45); background: #FFFFFF; background-clip: padding-box; }
.shutter:active { transform: scale(.94); }
.seg { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 12px; padding: 3px; border-radius: 9px; background: #E3E7EC; }
.seg button { height: 38px; border: none; border-radius: 7px; background: none; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg button[aria-selected="true"] { background: #FFFFFF; color: var(--ink); box-shadow: 0 1px 2px rgba(14, 26, 38, .1); }
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: #FFFFFF; }
.qr-card p { margin: 0; font-size: 14px; color: var(--ink2); text-align: center; }
.qr { display: grid; grid-template-columns: repeat(21, 1fr); width: 210px; height: 210px; }
.qr i { background: var(--ink); }
.qr b { background: #FFFFFF; }
.scanner { position: relative; height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #2A333D, #0B0F14); color: #FFFFFF; font-size: 14px; }
.scan-box { position: relative; width: 170px; height: 170px; border: 3px solid #FFFFFF; border-radius: 18px; overflow: hidden; }
.scan-box::after { content: ''; position: absolute; left: 8px; right: 8px; height: 2px; background: var(--hl); animation: scanline 1.6s ease-in-out infinite alternate; }
@keyframes scanline { from { top: 10px; } to { top: 154px; } }
.done { padding: 10px 0 6px; text-align: center; }
.done-ph { position: relative; width: 124px; height: 124px; margin: 0 auto 16px; }
.done-ph img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.done-ph span { position: absolute; right: -8px; bottom: -8px; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 21px; background: var(--green); color: #FFFFFF; border: 3px solid var(--bg); }
.done h1 { margin: 0 0 4px; font-size: 26px; }
.done p { margin: 0; font-size: 15px; color: var(--muted); }
.stamp { display: flex; align-items: center; gap: 12px; margin: 14px 0 12px; padding: 12px 14px; border: 1.5px dashed var(--navy); border-radius: 10px; background: #FFFFFF; transform: rotate(-1deg); }
.stamp div { display: flex; flex-direction: column; }
.stamp b { font-size: 15px; }
.stamp div span { font-size: 13px; color: var(--muted); }
.split { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; }
.split-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line2); font-size: 14px; }
.split-row:last-child { border-bottom: none; }
.split-row span:nth-child(2) { flex: 1; }

/* ---------- neighbour and you ---------- */
.nb-head { display: flex; align-items: center; gap: 14px; margin: 2px 0 6px; }
.nb-head > div { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.nb-head h1 { margin: 0; font-size: 24px; }
.nb-head > div > span { font-size: 13px; color: var(--muted); }
.nb-head .tag { color: var(--navy); }
.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini { padding: 0 0 6px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; font-size: 12px; font-weight: 600; text-align: center; }
.mini img { display: block; width: 100%; height: 74px; object-fit: cover; margin-bottom: 5px; }
.you-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; }
.you-stats div { display: flex; flex-direction: column; align-items: center; padding: 12px 6px; }
.you-stats div + div { border-left: 1px solid var(--line2); }
.you-stats b { font-size: 22px; color: var(--navy); }
.you-stats span { font-size: 12px; color: var(--muted); }
.bars { display: flex; gap: 2px; }
.bars i { width: 10px; height: 6px; border-radius: 2px; background: #C9D0D8; }
.bars i.on { background: var(--navy); }
.avrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.avrow button { padding: 0; border: none; background: none; border-radius: 50%; }
.avrow > span { font-size: 13px; color: var(--muted); }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg2 button { display: flex; flex-direction: column; gap: 2px; min-height: 66px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; text-align: left; }
.seg2 b { font-size: 14px; }
.seg2 span { font-size: 12px; color: var(--muted); }
.seg2 .sel { border: 2px solid var(--navy); background: var(--tint); }
.stepper { display: flex; align-items: center; gap: 12px; margin: 12px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; }
.stepper span { flex: 1; font-size: 14px; color: var(--muted); }
.stepper button { width: 40px; height: 40px; border: 1.5px solid var(--navy); border-radius: 20px; background: #FFFFFF; color: var(--navy); font-size: 20px; font-weight: 600; }
.stepper b { min-width: 20px; text-align: center; font-size: 18px; }

/* ---------- co-buy ---------- */
.answers { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.ans { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; font-size: 16px; font-weight: 600; text-align: left; }
.ans svg { color: var(--faint); }
.ans.write { border-style: dashed; color: var(--navy); }
.durable { margin-top: 14px; padding: 12px; border: 1.5px solid var(--navy); border-radius: 10px; background: #FFFFFF; }
.dur-in { display: flex; gap: 12px; margin: 10px 0 4px; }
.dur-in img { flex: none; width: 96px; height: 96px; border-radius: 8px; object-fit: cover; }
.dur-in div { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.dur-in b { color: var(--ink); font-size: 14px; }

/* ---------- phone overlays ---------- */
#notif { position: absolute; z-index: 80; top: 10px; left: 8px; right: 8px; transform: translateY(-150%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
#notif.show { transform: translateY(calc(var(--sat) - 12px)); }
.notif-in { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: none; border-radius: 18px; background: rgba(250, 250, 252, .97); box-shadow: 0 10px 30px rgba(14, 26, 38, .25); text-align: left; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.notif-in > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; font-size: 13.5px; line-height: 18px; }
.notif-in time { align-self: flex-start; font-size: 11px; color: var(--muted); }
#toast { position: absolute; z-index: 75; left: 50%; bottom: 108px; max-width: 320px; padding: 10px 16px; border-radius: 20px; background: var(--ink); color: #FFFFFF; font-size: 14px; font-weight: 600; text-align: center; opacity: 0; transform: translate(-50%, 16px); transition: opacity .25s, transform .25s; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.app.show-hot [data-act] { outline: 2px dashed #E0A400; outline-offset: -2px; }
.wi-hl { outline: 3px solid var(--hl) !important; outline-offset: -2px; box-shadow: 0 0 0 6px rgba(242, 194, 48, .3) !important; }

/* ---------- spec panel ---------- */
.sp-top { display: flex; align-items: center; border-bottom: 1px solid var(--line); padding: 0 6px 0 4px; }
#specTabs { flex: 1; }
.tabs { display: flex; }
.tabs button { height: 50px; padding: 0 12px; border: none; border-bottom: 2.5px solid transparent; background: none; font-size: 14px; font-weight: 600; color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--navy); }
#specClose { display: none; width: 40px; height: 40px; border: none; background: none; font-size: 18px; color: var(--muted); }
#specBody { flex: 1; overflow-y: auto; padding: 16px 18px 40px; }
.sc-head { display: flex; align-items: center; gap: 10px; }
.sc-head .dot { flex: none; width: 12px; height: 12px; border-radius: 6px; }
.sc-head h2 { margin: 2px 0 0; font-size: 19px; }
.sc-head code { margin-left: auto; padding: 3px 7px; border-radius: 4px; background: #EEF0F3; font-size: 12px; }
.lastev { display: flex; flex-direction: column; gap: 2px; margin: 12px 0 4px; padding: 10px 12px; border: 1px solid #F0DC9A; border-radius: 8px; background: #FFF8E1; }
.lastev b { font-size: 14px; }
.lastev > span:last-child { font-size: 13px; color: var(--ink2); }
.ph3 { margin: 18px 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.wi { margin-bottom: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; transition: border-color .15s, box-shadow .15s; }
.wi:hover { border-color: var(--hl); box-shadow: 0 0 0 3px rgba(242, 194, 48, .25); }
.wi header { display: flex; align-items: center; gap: 8px; }
.wi header b { flex: 1; font-size: 14.5px; }
.wid { flex: none; padding: 1px 5px; border: 1.5px solid; border-radius: 4px; font: 700 11.5px/16px ui-monospace, SFMono-Regular, Menlo, monospace; }
.wi-meta { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0 4px; }
.sz, .rel, .ep { padding: 2px 6px; border-radius: 4px; background: #EEF0F3; font-size: 11px; font-weight: 700; color: var(--muted); }
.rel { background: var(--tint); color: var(--navy); }
.wi p { margin: 6px 0; font-size: 13px; line-height: 19px; }
.wi .why { color: var(--ink2); }
.wi .why b { color: var(--navy); }
.wi details summary { font-size: 13px; font-weight: 600; color: var(--navy); cursor: pointer; }
.wi details ul { margin: 6px 0 0 18px; padding: 0; font-size: 13px; line-height: 19px; }
.switch { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: none; background: none; font: 600 11px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.switch i { position: relative; width: 30px; height: 18px; border-radius: 9px; background: #C9D0D8; transition: background .15s; }
.switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 7px; background: #FFFFFF; transition: transform .15s; }
.switch.on i { background: var(--green); }
.switch.on i::after { transform: translateX(12px); }
table.ix { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 17px; }
table.ix th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
table.ix td { padding: 7px 4px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.gest { padding: 1px 5px; border-radius: 4px; background: var(--tint); color: var(--navy); font-size: 11px; font-weight: 700; white-space: nowrap; }
.evlog { list-style: none; margin: 0; padding: 0; font-size: 12.5px; line-height: 17px; }
.evlog li { display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line2); }
.evlog time { flex: none; font: 11px/17px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--faint); }
.sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sum div { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; border-radius: 8px; background: var(--bg); text-align: center; }
.sum b { font-size: 18px; color: var(--navy); }
.sum span { font-size: 11px; color: var(--muted); }
.sizes { margin: 10px 0 0; font-size: 12.5px; color: var(--ink2); }
.sizes span { color: var(--muted); }
.exp { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.epic h3 { display: flex; align-items: center; gap: 8px; margin: 18px 0 4px; font-size: 14px; }
.epic .dot { width: 10px; height: 10px; border-radius: 5px; }
.cnt { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.wrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border-bottom: 1px solid var(--line2); }
.wrow-h { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0; border: none; background: none; text-align: left; font-size: 13.5px; }
.wt { flex: 1; min-width: 0; }
.wrow-b { flex-basis: 100%; padding: 2px 0 10px; }
.wrow-b .wi { margin-bottom: 6px; }
.scr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.sc-chip { padding: 3px 9px; border: 1px solid var(--line); border-radius: 12px; background: #FFFFFF; font-size: 12px; color: var(--navy); }
.sc-chip:hover { border-color: var(--navy); }

/* ---------- flow chart ---------- */
.flow { display: block; width: 100%; height: auto; margin: 0 auto; }
.flow .node { cursor: pointer; outline: none; }
.flow .node rect { fill: #FFFFFF; stroke: #C9D0D8; stroke-width: 1.2; transition: fill .2s, stroke .2s; }
.flow .node text { font: 600 11px var(--font); fill: var(--muted); pointer-events: none; }
.flow .node:hover rect, .flow .node:focus rect { stroke: var(--navy); stroke-width: 1.8; }
.flow .node.seen rect { fill: var(--tint); stroke: #8FB0D0; }
.flow .node.seen text { fill: var(--navy); }
.flow .node.cur rect { fill: var(--navy); stroke: var(--navy); }
.flow .node.cur text { fill: #FFFFFF; }
.flow .node.cur circle { stroke: #FFFFFF; stroke-width: 1.5; }
.flow .edge { fill: none; stroke: #C9D0D8; stroke-width: 1.3; }
.flow .edge.seen { stroke: var(--navy); stroke-width: 1.8; }
.flow .edge.last { stroke: #E0A400; stroke-width: 2.6; stroke-dasharray: 6 4; animation: dash .7s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -20; } }
.flow .band { font: 700 10px var(--font); letter-spacing: 1px; fill: #9AA5B1; }
.flow .band-line { stroke: #E3E7EC; stroke-dasharray: 3 3; }

/* ---------- phone-sized screens: the app fills the screen ---------- */
#specFab { display: none; }
body[data-mode="narrow"] { background: var(--bg); overflow: hidden; }
body[data-mode="narrow"] #stage { display: block; height: auto; }
body[data-mode="narrow"] #flowPanel, body[data-mode="narrow"] .toolbar { display: none; }
body[data-mode="narrow"] #center { display: block; padding: 0; }
body[data-mode="narrow"] #device { position: fixed; inset: 0; width: auto; height: auto; padding: 0; border-radius: 0; background: none; box-shadow: none; transform: none !important; }
body[data-mode="narrow"] #screen { width: 100%; height: 100%; border-radius: 0; --sat: calc(env(safe-area-inset-top, 0px) + 14px); --sab: calc(env(safe-area-inset-bottom, 0px) + 12px); }
body[data-mode="narrow"] .island, body[data-mode="narrow"] .statusbar, body[data-mode="narrow"] .homebar { display: none; }
body[data-mode="narrow"] #specPanel { position: fixed; z-index: 100; left: 0; right: 0; bottom: 0; height: 84dvh; border: none; border-radius: 16px 16px 0 0; box-shadow: 0 -10px 40px rgba(14, 26, 38, .3); transform: translateY(105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
body[data-mode="narrow"].spec-open #specPanel { transform: none; }
body[data-mode="narrow"] #specClose { display: block; }
body[data-mode="narrow"] .flowbox.inpanel .flow { max-width: 100%; height: auto; }
body[data-mode="narrow"] #specFab { position: fixed; z-index: 90; right: 0; top: 46%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 5px; border: none; border-radius: 8px 0 0 8px; background: var(--navy); color: #FFFFFF; writing-mode: vertical-rl; transform: rotate(180deg); box-shadow: 0 4px 14px rgba(14, 26, 38, .25); }
body[data-mode="narrow"] #specFab b { font-size: 12px; letter-spacing: .4px; }
body[data-mode="narrow"] #specFab span { font: 600 9.5px ui-monospace, SFMono-Regular, Menlo, monospace; opacity: .75; }
body[data-mode="narrow"].spec-open #specFab { display: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- v2: private home, map, rules, guides, why ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; padding: 4px 14px 4px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 0; border: none; background: none; text-align: left; min-width: 0; }
.tile-ph { display: block; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #E3E7EC; border: 1px solid var(--line); margin-bottom: 4px; }
.tile-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile b { font-size: 13px; line-height: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile > span:last-child { font-size: 11.5px; line-height: 15px; color: var(--muted); }
.tile.with .tile-ph { border: 2px solid var(--green); }
.tile.with > span:last-child { color: var(--green); font-weight: 700; }
.tile.yours .tile-ph { border: 2px dashed var(--navy); }
.mapcard { display: flex; align-items: center; gap: 12px; width: calc(100% - 28px); margin: 0 14px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; text-align: left; }
.mapcard > svg { color: var(--faint); flex: none; }
.mini-map { flex: none; display: grid; grid-template-columns: repeat(2, 12px); gap: 2px; padding: 3px; border-top: 4px solid var(--navy); background: #F3F5F7; border-radius: 3px; }
.mini-map i { width: 12px; height: 7px; border-radius: 1.5px; background: #D6DBE1; }
.mini-map i.known { background: var(--navy); }
.mini-map i.me { background: #FFFFFF; box-shadow: inset 0 0 0 1.5px var(--navy); }
.mini-map i.off { background: repeating-linear-gradient(135deg, #E3E7EC 0 2px, #F3F5F7 2px 4px); }
.sec.pad-x { margin: 18px 18px 8px; }
.home-scroll > .wanted { margin: 0 14px 16px; width: calc(100% - 28px); }
.met-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; }
.met-bar > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.met-bar b { font-size: 15px; }
.met-bar span { font-size: 12.5px; line-height: 17px; color: var(--muted); }
.met-meter { flex: none; width: 64px; height: 8px; border-radius: 4px; background: #E3E7EC; overflow: hidden; }
.met-meter i { display: block; height: 100%; background: var(--navy); }
.sh-body .stairwell { margin: 0; }
.flat.unmet { background: #FAFBFC; }
.flat.unmet .off-note { display: flex; align-items: center; gap: 4px; }
.flat.unmet .off-note svg { width: 13px; height: 13px; }
.av.anon { background: #C9D0D8; color: #FFFFFF; overflow: hidden; align-items: flex-end; }
.priv { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 10px; padding: 8px 10px; border-radius: 6px; background: var(--bg); border: 1px dashed #B9C1CB; font-size: 12.5px; line-height: 17px; color: var(--muted); }
.priv svg { flex: none; width: 16px; height: 16px; color: var(--navy); }
.pact { display: flex; flex-direction: column; gap: 10px; }
.pact-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; }
.pact-ic { flex: none; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 18px; background: var(--tint); color: var(--navy); }
.pact-row b { font-size: 15px; }
.pact-row p { margin: 2px 0 0; font-size: 13.5px; line-height: 19px; color: var(--ink2); }
.care { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.care li { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2) !important; }
.care svg { color: var(--green); width: 15px; height: 15px; flex: none; }
.say { margin: 0 0 10px; padding: 10px 12px; border-radius: 8px; background: #FFFFFF; border: 1px solid var(--line); font-size: 14px; color: var(--ink2); }
.check-row { min-height: 48px; cursor: pointer; }
.check-row input { width: 22px; height: 22px; margin: 0; accent-color: var(--navy); flex: none; }
.hints { display: flex; flex-direction: column; gap: 8px; }
.hint-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed #9AA5B1; border-radius: 8px; background: #FFFFFF; }
.hint-row .rt span { font-size: 12px; color: var(--muted); }
.hint-row .rt b { font-size: 14px; }
.hint-row .chip { flex: none; display: inline-flex; align-items: center; gap: 2px; color: var(--navy); border-color: var(--navy); }
.hint-row .chip svg { width: 16px; height: 16px; }
.ai-note { display: flex; gap: 6px; align-items: flex-start; margin: 10px 2px 0; font-size: 12px; line-height: 17px; color: var(--muted); }
.ai-note svg { flex: none; color: var(--navy); margin-top: 1px; }
.write { display: flex; gap: 8px; }
.write input { flex: 1; min-width: 0; height: 52px; padding: 0 12px; border: 2px solid var(--ink); border-radius: 8px; font-size: 16px; }
.write .btn { width: auto; padding: 0 16px; height: 52px; }
.row.rule { min-height: 48px; }
.row.rule .x { flex: none; width: 36px; height: 36px; border: none; background: none; color: var(--faint); border-radius: 18px; display: flex; align-items: center; justify-content: center; }
.habit .hn { flex: none; width: 26px; height: 26px; border-radius: 13px; background: var(--tint); color: var(--navy); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.msg { padding: 12px 14px; border-radius: 14px 14px 14px 4px; background: #FFFFFF; border: 1px solid var(--line); font-size: 14.5px; line-height: 20px; }
.guides { border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; }
.guides details { border-bottom: 1px solid var(--line2); }
.guides details:last-child { border-bottom: none; }
.guides summary { min-height: 48px; display: flex; align-items: center; padding: 0 14px; font-size: 14.5px; font-weight: 600; cursor: pointer; list-style: none; }
.guides summary::-webkit-details-marker { display: none; }
.guides summary::after { content: '+'; margin-left: auto; font-size: 18px; color: var(--navy); }
.guides details[open] summary::after { content: '−'; }
.guides p { margin: 0; padding: 0 14px 12px; font-size: 13.5px; line-height: 19px; color: var(--ink2); }
.why-h { margin: 4px 0 10px; font-size: 28px; line-height: 33px; letter-spacing: -.4px; }
.stats2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bigstat { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; }
.bigstat b { font-size: 22px; color: var(--navy); letter-spacing: -.3px; }
.bigstat span { font-size: 12.5px; line-height: 17px; }
.bigstat small { margin-top: auto; font-size: 10.5px; color: var(--faint); }
.stance { display: flex; flex-direction: column; gap: 4px; margin: 12px 0; padding: 14px; border-radius: 10px; background: var(--navy); color: #FFFFFF; }
.stance .eyebrow { color: #B8CCE0; }
.stance b { font-size: 17px; line-height: 23px; }
.stance > span:last-child { font-size: 12.5px; color: #D6E2EE; }
.drills { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.drills > div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; }
.drills .good { border: 2px solid var(--green); }
.drills b { font-size: 20px; }
.drills > div > span:last-child { font-size: 12px; color: var(--muted); }
.fine.center { text-align: center; }

.fine.pad-x2 { margin: -4px 18px 8px; }
.want-box { margin: 0 14px 10px; padding: 10px; border: 1.5px dashed var(--navy); border-radius: 8px; background: #FFFFFF; }
.want-top { display: flex; align-items: center; gap: 10px; }
.want-top .ph { flex: none; width: 44px; height: 44px; border-radius: 6px; overflow: hidden; }
.want-top b { font-size: 14px; }
.want-acts { display: flex; gap: 8px; margin-top: 10px; }
.want-acts .chip { flex: 1; height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.chip.on { background: var(--tint); border-color: var(--navy); color: var(--navy); }
.chip.strong { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.home-scroll > .wanted { margin: 0 14px 10px; }

.field textarea { font-size: 15px; line-height: 22px; min-height: 160px; }

.feat-list { list-style: none; margin: 14px 0 6px; padding: 0; border: 1px solid var(--line); border-radius: 8px; }
.feat-list li { padding: 11px 14px; font-size: 14.5px; border-bottom: 1px solid var(--line2); cursor: default; }
.feat-list li:last-child { border-bottom: none; }
.feat-list li:hover { background: #FFF8E1; }
.quiet { margin: 6px 2px 14px; font-size: 12.5px; color: var(--faint); }
.hide-dev { margin-top: 18px; }

.sh-body .grid { padding: 0; }
.flat.bare { min-height: 0; }
.flat.off { min-height: 0; }
.gives { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.gives .chip { height: auto; min-height: 36px; padding: 6px 12px; display: inline-flex; align-items: center; gap: 4px; text-align: left; }
.check-box { margin: 10px 0 4px; padding: 12px; border: 1.5px solid var(--navy); border-radius: 10px; background: #FFFFFF; }
.cb-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--navy); }
.cb-head b { flex: 1; color: var(--ink); font-size: 14.5px; }
.cb-row { display: flex; align-items: flex-start; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line2); }
.cb-row .tag { flex: none; margin-top: 1px; }
.cb-msg { flex: 1; display: flex; flex-direction: column; gap: 3px; font-size: 13px; line-height: 18px; }
.cb-msg b { font-size: 13px; color: var(--navy); }
.cb-row .chip { flex: none; height: 32px; }
.notes { margin: 6px 2px 4px; }
.note-line { display: flex; gap: 8px; margin: 0 0 5px; font-size: 13.5px; line-height: 19px; color: var(--ink2); }
.note-line > span { flex: none; width: 12px; text-align: center; font-weight: 700; color: var(--faint); }
.note-line.ok { color: var(--muted); }
.note-line.ok > span { color: var(--green); }
.note-line.warn > span { color: #B06A00; }
.note-line.miss > span { color: var(--navy); }
.shared { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; }
.shared summary { display: flex; align-items: center; min-height: 56px; padding: 8px 14px; cursor: pointer; list-style: none; }
.shared summary::-webkit-details-marker { display: none; }
.shared summary > span { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.shared summary b { font-size: 15px; }
.shared summary > span > span { font-size: 12.5px; color: var(--muted); }
.shared summary::after { content: '+'; font-size: 20px; color: var(--navy); }
.shared[open] summary::after { content: '−'; }
.shared > :not(summary) { margin-left: 14px; margin-right: 14px; }
.quote { margin-top: 0; margin-bottom: 10px; padding: 10px 12px; border-radius: 10px 10px 10px 3px; background: var(--bg); font-size: 14px; line-height: 20px; }
.quote span { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.asks { margin-top: 0; margin-bottom: 6px; padding-left: 18px; font-size: 14px; line-height: 20px; }
.asks li { margin-bottom: 4px; }
.shared > .fine:last-child { margin-bottom: 12px; }
.home-head { display: flex; align-items: flex-start; gap: 10px; }
.home-head > div:first-child { flex: 1; min-width: 0; }
.head-acts { flex: none; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.icon-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 20px; background: #FFFFFF; color: var(--navy); }
.home-end { height: calc(var(--sab) + 12px); }
.home-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 14px 12px; }
.act-card { display: flex; align-items: flex-start; gap: 8px; padding: 12px; border: 1.5px solid var(--navy); border-radius: 10px; background: #FFFFFF; text-align: left; color: var(--navy); }
.act-card svg { flex: none; margin-top: 1px; }
.act-card > span { display: flex; flex-direction: column; gap: 2px; }
.act-card b { font-size: 14px; color: var(--ink); line-height: 18px; }
.act-card > span > span { font-size: 12px; color: var(--muted); }
.sugg { border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; }
.sugg-row { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 6px 6px 14px; border-bottom: 1px solid var(--line2); font-size: 14px; line-height: 19px; }
.sugg-row:last-child { border-bottom: none; }
.sugg-row span { flex: 1; }
.add-link { flex: none; min-width: 52px; height: 36px; border: none; background: none; color: var(--navy); font-size: 14px; font-weight: 700; }
.demo-note { padding: 8px 10px; border-radius: 6px; background: #FFF8E1; color: #6B4E00; }
.flow.mods .node text { font-size: 12px; font-weight: 700; }
.flow.mods .node text.sub { font-size: 10px; font-weight: 500; fill: var(--faint); }
.flow.mods .node.cur text.sub { fill: #C9D6E4; }
.flow.mods .node.seen text.sub { fill: #5D7A99; }
.lendbox { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 2px solid var(--navy); border-radius: 10px; background: var(--tint); }
.lendbox b { font-size: 15px; }
.lendbox span { font-size: 13px; color: var(--muted); }

/* Fair, not free (FU-1..3) and co-buy savings (CB-6) */
.tile-ph { position: relative; }
.tile-tag { position: absolute; left: 5px; bottom: 5px; padding: 1px 6px; border-radius: 4px; background: var(--navy); color: #FFFFFF; font: 700 10.5px/16px inherit; font-style: normal; letter-spacing: .02em; }
.way { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; padding: 12px 14px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.way.on { border: 2px solid var(--navy); background: #FFFFFF; }
.way input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); }
.way > span { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.way b { font-size: 15px; }
.way > span > span { font-size: 13px; line-height: 18px; color: var(--muted); }
.way .dl { margin: 8px 0 0; }
.notice.fair { border-top-color: var(--green); }
.giveback { display: flex; align-items: center; gap: 10px; margin: 0 14px 12px; padding: 10px 12px; background: var(--tint); border-radius: 10px; }
.giveback .ph { flex: none; width: 44px; height: 44px; border-radius: 8px; overflow: hidden; }
.giveback .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.giveback .rt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.giveback b { font-size: 13.5px; line-height: 18px; }
.giveback .rt > span { font-size: 12px; color: var(--muted); }
.btn.sm { flex: none; width: auto; height: 36px; min-height: 36px; padding: 0 12px; font-size: 13px; }
.give-take { margin: 0 0 12px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; background: #FFFFFF; }
.give-take p { margin: 4px 0 0; font-size: 14px; line-height: 20px; }
.save { display: block; margin: -4px 0 12px; padding: 8px 12px; border-radius: 8px; background: #E6F0EA; color: var(--green); font-size: 14px; }
.save b { color: var(--green); }
.chip-sub { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.icon-btn { position: relative; }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: #B3261E; border: 2px solid #FFFFFF; }
.inbox .giveback { margin: 0 0 10px; }
.giveback-box { margin: 12px 0; padding: 12px 14px; background: var(--tint); border-radius: 10px; display: flex; flex-direction: column; gap: 2px; }
.giveback-box b { font-size: 15px; }
.giveback-box > span { font-size: 13px; color: var(--muted); }
.giveback-box ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; line-height: 21px; }
.tile > span:last-child:empty { display: none; }
.share-pitch { margin: 12px 0; padding: 14px 16px; background: #FFFFFF; border: 2px solid var(--navy); border-radius: 10px; display: flex; flex-direction: column; gap: 4px; }
.share-pitch.hot { border-color: var(--green); background: #F2F8F4; }
.share-pitch b { font-size: 17px; line-height: 22px; }
.share-pitch ul { list-style: none; margin: 4px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.share-pitch li { display: flex; align-items: center; gap: 6px; }
.share-pitch li svg { color: var(--green); flex: none; width: 16px; height: 16px; }
.sp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sp-foot > span { font-weight: 700; color: var(--navy); font-size: 14px; }
.cobuy-cta { display: flex; align-items: center; gap: 12px; width: calc(100% - 28px); margin: 0 14px 10px; padding: 14px; border: none; border-radius: 10px; background: var(--navy); color: #FFFFFF; text-align: left; }
.cobuy-cta .rt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cobuy-cta b { font-size: 15px; }
.cobuy-cta .rt > span { font-size: 12.5px; line-height: 17px; color: #D6E0EB; }
.cc-ic { flex: none; width: 36px; height: 36px; border-radius: 18px; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; }
.act-card.fill { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.act-card.fill b { color: #FFFFFF; }
.act-card.fill > span > span { color: #D6E0EB; }
.add-own { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 8px; padding: 14px; border: 1.5px dashed var(--navy); border-radius: 10px; background: #FFFFFF; color: var(--navy); text-align: left; opacity: .75; }
.add-own .cc-ic { background: var(--tint); }
.add-own .rt { display: flex; flex-direction: column; gap: 2px; }
.add-own b { font-size: 15px; color: var(--ink); }
.add-own .rt > span { font-size: 13px; color: var(--muted); }
