/* The renter site: header, cards, listing, building and area pages, gallery.
   Desktop and mobile matter equally (spec §2). Tokens come from tokens.css. */

body.site { min-height: 100vh; display: flex; flex-direction: column; }
body.site > main { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.page { width: 100%; display: flex; flex-direction: column; gap: 24px; padding-top: 24px; padding-bottom: 56px; }
.page h1 { margin: 0; font-size: 30px; line-height: 1.15; }
.page h2 { margin: 0 0 14px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.center { display: flex; justify-content: center; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.sec-head h1, .sec-head h2 { margin: 0; }
.sec-head a { font-size: 13px; font-weight: 700; }
.sec-head .mu { font-size: 13px; }
.m-only-flex { display: none !important; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; }
.hdr-left { display: flex; align-items: center; gap: 36px; min-width: 0; }
.hdr-left nav { display: flex; gap: 24px; font-size: 14px; font-weight: 500; }
.hdr-left nav a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.hdr-left nav a.on, .hdr-left nav a:hover { color: var(--ink); }
.hdr-left nav .count { font-size: 11px; padding: 1px 6px; border-radius: 9px; background: var(--ink); color: #ffffff; }
.hdr-right { display: flex; align-items: center; gap: 12px; }
.hdr-icon { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); border-radius: 20px; text-decoration: none; }
.hdr-person { border: 1px solid var(--line); }
.hdr-person.in { border-color: var(--ink); background: var(--ink); color: #ffffff; font-size: 14px; font-weight: 800; }

.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .here { color: var(--ink); }

/* ---------- price ---------- */
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price .amount { font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.price .per { font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price .other { color: var(--muted); }
.price.none .amount { color: var(--muted); font-weight: 700; }
.price.stacked { flex-direction: column; gap: 2px; align-items: flex-start; }
.price.stacked.none { flex-direction: row; align-items: baseline; gap: 8px; }

/* ---------- listing card ---------- */
.lc { position: relative; min-width: 0; }
.lc-link { text-decoration: none; color: var(--ink); }
.lc-grid .lc-link { height: 100%; }
.lc-grid .lc-photo { height: 210px; border-radius: 0; }
.lc-grid .fresh.pill { position: absolute; left: 12px; bottom: 12px; }
.lc-photo { position: relative; flex-shrink: 0; }
.lc-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; min-width: 0; }
.lc-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.lc-sub { font-size: 13px; line-height: 1.5; color: var(--muted); }
.lc-note { font-size: 13px; color: var(--ink); }
.lc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.lc .heart { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 18px; border: none; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); color: var(--ink); display: flex; align-items: center; justify-content: center; padding: 0; }
.heart[aria-pressed="true"] svg, [data-heart][aria-pressed="true"] svg { fill: var(--ink); }
.lc.gone .lc-photo, .lc.gone .lc-body { opacity: 0.55; }
.lc-row { display: flex; align-items: flex-start; gap: 8px; background: var(--ground); border: 1px solid var(--line-card); border-radius: 14px; padding: 12px; }
.lc-row .lc-link { display: flex; gap: 14px; flex-grow: 1; min-width: 0; }
.lc-row .lc-photo { width: 168px; height: 112px; border-radius: 8px; }
.lc-row .lc-body { padding: 0; gap: 5px; flex-grow: 1; }
.lc-row .lc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.lc-row .heart { position: static; box-shadow: none; border: 1px solid var(--line-card); flex-shrink: 0; }
.lc-compact { width: 260px; flex-shrink: 0; }
.lc-compact .lc-photo { height: 170px; }
.scroll-row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; scroll-snap-type: x proximity; }
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row > * { scroll-snap-align: start; }
.show-all { gap: 8px; }

/* ---------- photo grid ---------- */
.pgrid { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 186px 186px; gap: 10px; }
.pgrid .ptile { position: relative; display: block; border-radius: 16px; min-height: 0; overflow: hidden; }
.pgrid .ptile:first-child { grid-row: span 2; }
.pgrid.n1 { grid-template-columns: 1fr; }
.pgrid.n2 { grid-template-columns: 2fr 1fr; }
.pgrid.n2 .ptile:nth-child(2) { grid-row: span 2; }
.pgrid.n3 { grid-template-columns: 2fr 1fr; }
.pgrid.n4 .ptile:nth-child(2) { grid-column: span 2; }
.ptile .pill, .ptile .more, .ptile .play, .ptile .cap { position: absolute; }
.ptile .pill { right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 15px; background: var(--ink); color: #ffffff; font-size: 12px; font-weight: 700; }
.ptile .more { inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(20, 20, 20, 0.45); color: #ffffff; font-size: 14px; }
.ptile .more.solid { background: var(--ink); }
.ptile .play { inset: 0; display: flex; align-items: center; justify-content: center; color: #ffffff; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5)); }
.ptile .cap { left: 10px; top: 8px; font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase; color: #ffffff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.no-photos { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 240px; border: 1.5px dashed var(--muted-2); border-radius: 16px; text-align: center; padding: 0 24px; }
.no-photos b { font-size: 17px; }
.no-photos span { font-size: 14px; color: var(--muted); }

/* ---------- listing page ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.main-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.side-col { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; min-width: 0; }
.head { display: flex; flex-direction: column; gap: 6px; }
.head .where { font-size: 15px; }
.head .url { font-size: 12px; color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tiles .v { overflow-wrap: anywhere; line-height: 1.2; }
.tiles.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.noticed ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.bcard { flex-direction: row; align-items: center; gap: 16px; padding: 12px; text-decoration: none; }
.bcard .bphotos { display: flex; gap: 6px; flex-shrink: 0; }
.bcard .bphotos .photo { width: 84px; height: 64px; border-radius: 8px; }
.btext { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 13px; }
.btext b { font-size: 14px; font-weight: 700; }
.btext .more { font-weight: 700; }
.where-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: stretch; }
.where-row:has(.distances) { grid-template-columns: minmax(0, 1fr) 240px; }
.map { height: 200px; border-radius: 16px; align-items: center; justify-content: center; text-transform: none; font-size: 13px; overflow: hidden; padding: 0 16px; text-align: center; }
.map > span { display: inline-flex; align-items: center; gap: 6px; }
.map.live { padding: 0; background: var(--field); }
.distances { display: flex; flex-direction: column; justify-content: center; gap: 10px; font-size: 14px; padding: 16px; border: 1px solid var(--line-card); border-radius: 16px; }
.distances > div { display: flex; justify-content: space-between; gap: 12px; }
.distances b { font-weight: 700; white-space: nowrap; }
.dist-card { padding: 0; box-shadow: none; }
.dist-card .distances { border: none; }
.cta-card { gap: 14px; padding: 22px; overflow: visible; }
.cta-card .pri, .cta-card .sec { width: 100%; }
.cta-card .note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.facts-card { padding: 8px 18px; box-shadow: none; font-size: 13px; }
.facts-card .row { font-size: 13px; }
.facts-card b { font-weight: 700; }
button.link { border: none; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--muted); text-decoration: underline; text-align: left; min-height: 44px; }
.banner { padding: 14px 16px; border-radius: 12px; background: var(--field); font-size: 15px; font-weight: 700; }
.banner a { font-weight: 700; margin-left: 6px; }
.is-gone .pgrid, .is-gone .tiles, .is-gone .noticed, .is-gone .head, .is-gone .bcard, .is-gone .where-row { opacity: 0.55; }
.similar { border-top: 1px solid var(--line); padding-top: 24px; }
.desc { font-size: 15px; line-height: 1.6; max-width: 640px; }
.desc p { margin: 0 0 12px; }
.empty-box { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 20px; border: 1px dashed var(--line-card); border-radius: 16px; text-align: center; font-size: 15px; color: var(--muted); }
.empty-box.tall { padding: 72px 20px; }
.empty-box b { color: var(--ink); font-size: 18px; }
.empty-box.warn b { color: var(--warn); }

/* mobile page header: back · title · actions */
.m-head { align-items: center; justify-content: space-between; height: 56px; padding: 0 4px; background: var(--ground); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.m-head .ib { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--ink); border: none; background: none; padding: 0; text-decoration: none; }
.m-head .ttl { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-bar .sec.icon { flex-grow: 0; width: 44px; padding: 0; }

/* ---------- areas, buildings ---------- */
.group-label { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: -8px 0 -12px; }
.acard { position: relative; display: block; height: 150px; border-radius: 16px; overflow: hidden; text-decoration: none; color: #ffffff; padding: 0; }
.acard.big { height: 200px; }
.acard.ph { background: linear-gradient(160deg, #8f949b 0%, #b9bdc3 100%); }
.acard .shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 20, 20, 0.78) 0%, rgba(20, 20, 20, 0.15) 55%, rgba(20, 20, 20, 0) 100%); }
.acard .atext { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; flex-direction: column; gap: 4px; text-transform: none; letter-spacing: 0; }
.acard .top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.acard b { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.acard .mono { font-size: 12px; white-space: nowrap; }
.acard .sub { font-size: 12px; color: rgba(255, 255, 255, 0.85); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area-top { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 32px; align-items: start; }
.area-top .intro { margin: 10px 0 0; font-size: 15px; line-height: 1.6; max-width: 640px; }
.area-top .map { height: 150px; }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filters .chip.sel { position: relative; padding: 0; }
.filters .chip.sel select { appearance: none; border: none; background: none; font: inherit; color: inherit; height: 36px; padding: 0 34px 0 16px; border-radius: 19px; cursor: pointer; font-size: 13px !important; }
.filters .chip.sel svg { position: absolute; right: 12px; pointer-events: none; }
.filters .chip.check { cursor: pointer; }
.filters .chip.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filters .chip.check.on, .filters .chip.sel.on { border-color: var(--ink); }
.filters .chip.check:focus-within, .filters .chip.sel:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.filters .sort { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.bgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.bgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.btile { text-decoration: none; box-shadow: none; border-radius: 12px; }
.btile .photo, .btile .ph { height: 84px; border-radius: 0; }
.btile .btext { padding: 10px 12px 12px; gap: 2px; }
.btile .btext b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btile .mono { font-size: 11px; }
.proj-cols { display: grid; grid-template-columns: 560px minmax(0, 1fr); gap: 40px; align-items: start; }
.proj-search label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.combo { position: relative; }
.combo .ico { position: absolute; left: 16px; top: 15px; color: var(--muted); }
.combo input { width: 100%; height: 52px; border: 1.5px solid var(--ink); border-radius: 14px; padding: 0 16px 0 44px; font: inherit; font-size: 17px; outline: none; background: var(--ground); color: var(--ink); }
.combo input:focus { box-shadow: 0 0 0 2px var(--ink); }
.combo.open input { border-radius: 14px 14px 0 0; }
.sg-list { position: absolute; left: 0; right: 0; top: 51px; z-index: 10; background: var(--ground); border: 1.5px solid var(--ink); border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; box-shadow: 0 8px 24px rgba(20, 20, 20, 0.12); overflow: hidden; }
.sg-group { padding: 10px 16px 4px; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.sg { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 16px; text-decoration: none; color: var(--ink); font-size: 15px; }
.sg b { font-weight: 700; }
.sg .mu { font-size: 12px; }
.sg:hover, .sg.active { background: var(--field); }
.sg.ask { border-top: 1px solid var(--line); font-size: 13px; font-weight: 700; justify-content: flex-start; gap: 6px; }

/* ---------- home: the first turn ---------- */
juna-chat { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.home-first { gap: 28px; padding-top: 44px; }
.home-hero { display: flex; flex-direction: column; gap: 18px; max-width: 900px; }
.home-hero h1 { font-size: 44px; line-height: 1.08; font-weight: 700; }
.home-hero p { margin: 0; font-size: 17px; max-width: 720px; }
.ask { display: flex; align-items: flex-end; gap: 8px; max-width: 900px; background: var(--field); border-radius: 32px; padding: 8px 8px 8px 24px; box-shadow: 0 2px 8px rgba(17, 20, 24, 0.06); }
.ask:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.ask textarea { flex-grow: 1; min-width: 0; border: none; outline: none; resize: none; background: transparent; font: inherit; font-size: 18px; line-height: 24px; color: var(--ink); height: 48px; padding: 12px 0; }
.ask textarea::placeholder, .composer input::placeholder, .in::placeholder { color: var(--muted); opacity: 1; }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; max-width: 900px; }
.suggest .chip { cursor: pointer; }
.suggest .chip:hover { border-color: var(--ink); }
.fresh-row { padding-bottom: 0; }
.fresh-row .sec-head h2 { font-size: 16px; font-weight: 600; }

/* ---------- the search thread ---------- */
.thread { padding-top: 28px; padding-bottom: 140px; gap: 12px; }
.thread-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.turns { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.me { align-self: flex-end; max-width: 560px; background: var(--ink); color: #ffffff; border-radius: 18px 18px 4px 18px; padding: 12px 16px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; scroll-margin-top: 84px; }
.me.removed { background: var(--field); color: var(--muted); font-size: 13px; padding: 8px 14px; }
.turn { display: flex; align-items: flex-start; gap: 12px; }
.av { width: 32px; height: 32px; border-radius: 16px; background: var(--ink); color: #ffffff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.jb { position: relative; display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); border-radius: 18px; padding: 16px 18px; font-size: 15px; line-height: 1.5; flex-grow: 1; min-width: 0; }
.jb p { margin: 0; }
.jb p:empty { display: none; }
.jb .results { display: flex; flex-direction: column; gap: 10px; }
.jb .show-all { height: 44px; align-self: stretch; }
.jb .show-all[aria-expanded="true"] svg { transform: rotate(180deg); }
.jb .hide { position: absolute; top: 12px; right: 14px; }
.jb .hide, .earlier button { height: 28px; padding: 0 10px; border: none; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: underline; }
.jb .closest { font-size: 14px; font-weight: 600; }
.relax { display: flex; flex-direction: column; gap: 8px; }
.relax .sec { height: auto; min-height: 44px; padding: 8px 18px; justify-content: space-between; font-size: 14px; white-space: normal; text-align: left; background: transparent; }
.turn.failed .jb { background: var(--warn-bg); color: var(--warn); }
.warn-title { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sm44 { height: 44px; font-size: 14px; }
.turn.failed .sec { background: transparent; }
.sk-row { display: flex; gap: 14px; padding: 12px; border: 1px solid var(--line-row); border-radius: 14px; background: var(--ground); }
.sk-photo { width: 168px; height: 112px; flex-shrink: 0; }
.sk-lines { display: flex; flex-direction: column; gap: 10px; flex-grow: 1; padding-top: 4px; }
.earlier { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 8px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.earlier .thumbs { display: flex; gap: 4px; }
.earlier .thumb { width: 40px; height: 30px; border-radius: 4px; padding: 0; }
.earlier button { margin-left: auto; }
.thread aside { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 84px; }
.side-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.side-card .sec-head { margin: 0; }
.side-card h2 { font-size: 14px; font-weight: 600; margin: 0; }
.side-card b { font-weight: 600; }
.side-card .mono { font-size: 11px; }
.side-card .hint { font-size: 12px; line-height: 1.45; }
.side-card .hint13 { font-size: 13px; line-height: 1.45; }
.crits { display: flex; flex-wrap: wrap; gap: 6px; }
.crits:empty { display: none; }
.crit { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 6px 0 12px; border-radius: 16px; border: 1px solid var(--line-card); background: var(--ground); font-size: 13px; font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.crit.new { border-color: var(--ink); }
.crit .x { width: 22px; height: 22px; border-radius: 11px; border: none; background: var(--field); color: var(--muted); display: flex; align-items: center; justify-content: center; padding: 0; position: relative; }
/* a 44px touch target around the 22px button */
.crit .x::after { content: ""; position: absolute; inset: -11px; }
.new-search { font-size: 13px; text-decoration: underline; align-self: flex-start; min-height: 32px; display: flex; align-items: center; }
.composer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: flex; justify-content: center; padding: 16px 48px 24px; background: linear-gradient(to top, #ffffff 70%, rgba(255, 255, 255, 0)); pointer-events: none; }
.composer-in { pointer-events: auto; display: flex; align-items: center; gap: 8px; width: 832px; max-width: 100%; background: var(--ground); border-radius: 32px; padding: 8px 8px 8px 22px; box-shadow: 0 2px 8px rgba(17, 20, 24, 0.08), 0 0 0 1px var(--line-card); }
.composer-in:focus-within { box-shadow: 0 2px 8px rgba(17, 20, 24, 0.08), 0 0 0 1.5px var(--ink); }
.composer input { flex-grow: 1; min-width: 0; border: none; outline: none; font: inherit; font-size: 16px; color: var(--ink); background: transparent; height: 44px; }
.composer .send { width: 44px; height: 44px; padding: 0; border-radius: 22px; flex-shrink: 0; }
body.in-thread .site-footer { display: none; }

/* ---------- shortlist ---------- */
.shortlist { padding-top: 32px; }
.sl-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.sl-cols > section { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sl-cols aside { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 88px; }
.sl-head { margin: 0; }
.sl-head h1 { font-size: 32px; font-weight: 700; }
.sl-count { display: flex; align-items: center; gap: 12px; font-size: 13px; white-space: nowrap; }
.linkish { height: 44px; padding: 0 4px; border: none; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: underline; }
.sl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.sl-row { display: flex; gap: 14px; padding: 14px; background: var(--ground); border: 1px solid var(--line); border-radius: 12px; }
.sl-row.gone .sl-photo, .sl-row.gone .sl-body { opacity: 0.6; }
.sl-row.dragging { box-shadow: 0 8px 24px rgba(20, 20, 20, 0.16); border-color: var(--ink); position: relative; z-index: 2; }
.sl-check { position: relative; width: 24px; height: 24px; border-radius: 12px; border: 1.5px solid var(--ink); background: var(--ground); color: var(--ground); display: flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0; margin-top: 2px; }
.sl-check::after { content: ""; position: absolute; inset: -10px; }
.sl-check[aria-checked="true"] { background: var(--ink); color: #ffffff; }
.sl-check[disabled] { border-color: var(--line-card); cursor: default; }
.sl-photo { width: 200px; height: 130px; border-radius: 8px; flex-shrink: 0; padding: 0; }
.sl-body { display: flex; flex-direction: column; gap: 6px; flex-grow: 1; min-width: 0; }
.sl-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sl-title { font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; }
.sl-title:hover { text-decoration: underline; }
.sl-note { display: flex; align-items: center; gap: 8px; margin-top: 4px; min-height: 32px; padding: 0; border: none; background: none; font: inherit; font-size: 13px; color: var(--ink); text-align: left; }
.sl-note svg { flex-shrink: 0; color: var(--muted); }
.sl-note.empty span { color: var(--muted); }
.sl-note span { overflow-wrap: anywhere; }
.sl-note-in { height: 40px; font-size: 14px; margin-top: 2px; }
.sl-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.sl-actions .ib { width: 36px; height: 36px; border-radius: 18px; border: 1px solid var(--line); background: var(--ground); color: var(--ink); display: flex; align-items: center; justify-content: center; padding: 0; }
.sl-actions .ib[disabled] { opacity: 0.3; }
.sl-actions .grip { color: var(--muted); cursor: grab; touch-action: none; }
.tag-ink { background: var(--ink); color: #ffffff; }
.tag-ink-soft { background: var(--field); color: var(--ink); }
.side-card.book { gap: 14px; padding: 20px; border-radius: 14px; box-shadow: 0 1px 2px rgba(17, 20, 24, 0.06); }
.side-card.book .big { display: block; font-size: 16px; margin-bottom: 4px; }
.side-card.book .pri { width: 100%; }
.sl-foot { margin: 0; font-size: 12px; line-height: 1.5; padding: 0 4px; }
.sl-undo button { height: 28px; padding: 0 10px; border: none; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: underline; margin-left: auto; }
.empty-box span { font-size: 14px; }

/* ---------- viewing request ---------- */
.viewing { padding-top: 32px; }
.vr-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; max-width: 1100px; }
.vr-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.vr-head h1 { font-size: 32px; font-weight: 700; }
.vr-head p { margin: 6px 0 0; font-size: 15px; }
.vr-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; font-size: 13px; font-weight: 600; color: var(--muted); }
.vr-steps li { display: flex; align-items: center; gap: 8px; }
.vr-steps .mono { width: 22px; height: 22px; border-radius: 11px; background: var(--field); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.vr-steps .done { color: var(--ink); }
.vr-steps .done .mono { background: var(--ink); color: #ffffff; }
.vr-sec { display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; }
.vr-sec h2 { margin: 0; font-size: 16px; font-weight: 600; }
.vr-sec h2 .mu { font-weight: 500; font-size: 13px; margin-left: 6px; }
.vr-sec .sec-head { margin: 0; }
.vr-sec .note { margin: 0; font-size: 12px; line-height: 1.5; }
.vr-homes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.vr-homes li { display: flex; align-items: center; gap: 12px; }
.vr-homes .thumb { width: 64px; height: 48px; border-radius: 6px; padding: 0; flex-shrink: 0; }
.vr-homes .txt { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; font-size: 14px; }
.vr-homes .txt b { font-weight: 600; }
.vr-homes .txt .mu { font-size: 13px; }
.vr-homes .x, .vr-sec .x { width: 32px; height: 32px; border-radius: 16px; border: none; background: var(--field); color: var(--muted); display: flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0; position: relative; }
.vr-homes .x::after { content: ""; position: absolute; inset: -6px; }
.vr-days { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.vr-day { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vr-day .day { width: 96px; font-size: 14px; font-weight: 600; }
.vr-day .parts, .vr-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.viewing .chip { cursor: pointer; height: 40px; }
.viewing .chip.on { background: var(--ink); border-color: var(--ink); color: #ffffff; }
.vr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .lbl { font-size: 13px; font-weight: 700; }
.field select.in { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.tog.big { align-self: flex-start; border-radius: 24px; padding: 4px; }
.tog.big button { height: 40px; padding: 0 18px; border-radius: 20px; font-size: 14px; }
.vr-name { max-width: 320px; }
.vr-known { margin: 0; font-size: 14px; }
.vr-submit { align-self: flex-start; }
.next-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.banner.warn { background: var(--warn-bg); color: var(--warn); font-weight: 600; font-size: 14px; }
.vr-progress { height: 3px; background: var(--field); }
.vr-progress > div { height: 100%; background: var(--ink); transition: width 0.2s; }
.m-head .step-of { font-size: 12px; padding-right: 14px; }
.vd-head { display: flex; align-items: center; gap: 12px; }
.vd-head h1 { font-size: 32px; font-weight: 700; }
.vd-head .tick { width: 36px; height: 36px; border-radius: 18px; background: var(--ink); color: #ffffff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vd-sub { margin: 0; font-size: 16px; line-height: 1.55; max-width: 620px; }
.vd-facts { gap: 0; padding: 6px 18px; }
.vd-facts .row { align-items: flex-start; }
.vd-facts .row > span:last-child { text-align: right; }
.vd-homes { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.vd-cap { font-size: 12px; }
.vd-chat { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; background: var(--ground-chat); }
.vd-chat .bubble { align-self: flex-start; max-width: 92%; background: var(--ground); border-radius: 4px 14px 14px 14px; padding: 10px 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }

/* ---------- account, about, privacy ---------- */
.profile { padding-top: 32px; }
.profile h1 { font-size: 32px; font-weight: 700; }
.profile .vr-sec .row { border-bottom: none; padding: 4px 0; }
.pf-list { display: flex; flex-direction: column; }
.pf-list a { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line-row); text-decoration: none; color: var(--ink); font-size: 14px; }
.pf-list a:last-child { border-bottom: none; }
.pf-list .mu { font-size: 12px; }
.prose { max-width: 1280px; padding-top: 40px; gap: 14px; }
.prose > * { max-width: 680px; }
.prose h1 { font-size: 36px; font-weight: 700; }
.prose h2 { margin: 18px 0 0; font-size: 18px; font-weight: 700; }
.prose p, .prose-list { margin: 0; font-size: 16px; line-height: 1.6; }
.prose .lede { font-size: 18px; color: var(--ink); }
.prose-list { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.prose .btn-row { margin-top: 12px; }
.prose .note { font-size: 13px; }

/* ---------- gallery ---------- */
photo-gallery { display: none; }
photo-gallery[open] { display: flex; position: fixed; inset: 0; z-index: 50; flex-direction: column; background: rgba(20, 20, 20, 0.95); color: #ffffff; }
photo-gallery .pg-ib { width: 48px; height: 48px; border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(20, 20, 20, 0.6); color: #ffffff; display: flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0; }
photo-gallery .pg-ib[disabled] { opacity: 0.3; }
photo-gallery .pg-head { display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 0 32px; gap: 16px; }
photo-gallery .pg-title { display: flex; flex-direction: column; gap: 2px; flex-grow: 1; min-width: 0; }
photo-gallery .pg-title b { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
photo-gallery .pg-title span { font-size: 13px; color: #c9cdd2; }
photo-gallery .pg-main { flex-grow: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 32px; min-height: 0; }
photo-gallery .pg-track { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; width: 100%; max-width: min(75vw, 1800px); }
photo-gallery .pg-track::-webkit-scrollbar { display: none; }
photo-gallery .pg-track:focus { outline: none; }
photo-gallery .pg-slide { flex: 0 0 100%; scroll-snap-align: center; height: calc(100vh - 240px); min-height: 280px; border-radius: 12px; background: #2a2a2a; display: flex; align-items: center; justify-content: center; overflow: hidden; }
photo-gallery .pg-slide img, photo-gallery .pg-slide video { width: 100%; height: 100%; object-fit: contain; }
photo-gallery .pg-slide a { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #ffffff; text-decoration: none; background: rgba(20, 20, 20, 0.6); padding: 14px 18px; border-radius: 12px; font-size: 14px; font-weight: 700; }
photo-gallery .pg-foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 32px 24px; }
photo-gallery .pg-cap { max-width: 420px; font-size: 14px; color: #c9cdd2; line-height: 1.45; }
photo-gallery .pg-cap b { color: #ffffff; font-weight: 700; }
photo-gallery .pg-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
photo-gallery .pg-thumbs::-webkit-scrollbar { display: none; }
photo-gallery .pg-th { width: 96px; height: 64px; border-radius: 8px; flex-shrink: 0; border: 2px solid transparent; padding: 0; background: #2a2a2a center/cover; }
photo-gallery .pg-th.on { border-color: #ffffff; }
photo-gallery .pg-bar { display: none; align-items: center; justify-content: space-between; gap: 10px; }
photo-gallery .pg-bar .price .other, photo-gallery .pg-bar .price .per { color: #c9cdd2; }
photo-gallery .pg-bar .pri { background: #ffffff; color: var(--ink); height: 44px; }

dialog.sheet { border: none; border-radius: 16px; padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: 0 12px 48px rgba(20, 20, 20, 0.28); color: var(--ink); }
dialog.sheet::backdrop { background: rgba(20, 20, 20, 0.45); }
dialog.sheet form { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
dialog.sheet h2 { margin: 0; font-size: 18px; }
dialog.sheet label.opt { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
dialog.sheet label.opt input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
dialog.sheet .btns { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
#site-toast { position: fixed; left: 0; right: 0; bottom: 96px; z-index: 60; display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
#site-toast > div { padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #ffffff; font-size: 13px; font-weight: 700; box-shadow: 0 6px 24px rgba(20, 20, 20, 0.2); }

/* ---------- mobile ---------- */
@media (max-width: 1000px) {
  .thread-cols { grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; }
  .vr-cols { grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; }
  .sl-cols { grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
  .sl-photo { width: 150px; height: 110px; }
  .cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .side-col { position: static; }
  .area-top { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .proj-cols { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .bgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .m-only-flex { display: inline-flex !important; }
  .page { gap: 18px; padding-top: 16px; padding-bottom: 40px; }
  .page h1 { font-size: 22px; }
  .hdr-left nav, .d-lang, .hdr-person { display: none; }
  body.home .d-lang { display: inline-flex; }
  body.home .site-header .tog:first-child { display: none; }
  .hdr-right { gap: 4px; }
  .hdr-icon { width: 44px; height: 44px; }
  .hdr-person { display: inline-flex; border: none; }
  /* pages with their own mobile header replace the site header */
  body.has-mhead .site-header { display: none; }
  .tabs { gap: 20px; overflow-x: auto; scrollbar-width: none; }
  .lc-grid .lc-photo { height: 170px; }
  .lc-row { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; }
  .lc-row .lc-link { flex-direction: column; gap: 0; }
  .lc-row .lc-photo { width: 100%; height: 170px; border-radius: 0; }
  .lc-row .lc-body { padding: 14px 16px 16px; }
  .lc-row .heart { position: absolute; top: 10px; right: 10px; border: none; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
  .listing, .building { padding-top: 0; }
  .listing .pgrid, .building .pgrid { margin: 0 -16px; gap: 6px; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 250px 58px; }
  .pgrid .ptile { border-radius: 8px; }
  .pgrid .ptile:first-child { grid-column: span 4; grid-row: span 1; border-radius: 0; }
  .pgrid .ptile:nth-child(n+2) { margin: 0; }
  .listing .pgrid .ptile:nth-child(2) { margin-left: 16px; }
  .listing .pgrid .ptile:nth-child(5) { margin-right: 16px; }
  .pgrid.n1 { grid-template-rows: 250px; }
  .pgrid.n2 .ptile:nth-child(2), .pgrid.n4 .ptile:nth-child(2) { grid-row: auto; grid-column: auto; }
  .ptile .pill { right: 12px; bottom: 12px; height: 28px; border-radius: 8px; }
  /* building hero: a horizontal gallery */
  .building .pgrid.hero-scroll { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 6px; padding: 0 16px; }
  .building .pgrid.hero-scroll .ptile { flex: 0 0 86%; height: 230px; border-radius: 12px; scroll-snap-align: center; margin: 0; }
  .m-price { margin-bottom: -8px; }
  .head h1 { font-size: 20px !important; letter-spacing: -0.01em; }
  .head .where { font-size: 13px; }
  .tiles, .tiles.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile { padding: 10px 12px; }
  .noticed ul { font-size: 14px; }
  .where-row { grid-template-columns: minmax(0, 1fr); }
  .map { height: 180px; }
  .distances { border: none; padding: 0; }
  .bcard .bphotos .photo:nth-child(2) { display: none; }
  .acard, .acard.big { height: 150px; }
  .bgrid, .bgrid.three { display: flex; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
  .bgrid > * { flex: 0 0 150px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 12px 16px; }
  .filters::-webkit-scrollbar, .bgrid::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; }
  .filters > * { flex-shrink: 0; }
  .filters .sort { margin-left: 8px; }
  .filters .chip.sel select { height: 44px; font-size: 14px !important; }
  .filters .chip { height: 44px; border-radius: 22px; }
  .viewing { padding-top: 16px; }
  .vr-cols { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  /* on a phone the four parts are four steps */
  .viewing:not(.done) .vr-sec[data-off] { display: none; }
  .viewing:not(.done) .vr-sec { border: none; padding: 0; gap: 16px; }
  .vr-sec h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
  .vr-sec h2 .mu { display: block; margin: 4px 0 0; letter-spacing: 0; }
  .vr-sec .vr-sub { margin: -8px 0 0; font-size: 14px; }
  .vr-day { flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; }
  .vr-day .parts { width: 100%; }
  .vr-day .parts .chip { flex: 1; justify-content: center; padding: 0 8px; }
  .viewing .chip { height: 44px; border-radius: 22px; }
  .vr-opts .chip { white-space: normal; height: auto; min-height: 44px; text-align: left; padding: 8px 16px; }
  .vr-grid { grid-template-columns: minmax(0, 1fr); }
  .vr-name { max-width: none; }
  .vr-submit { align-self: stretch; }
  .vd-head h1 { font-size: 24px; }
  .vd-sub { font-size: 15px; }
  .shortlist { padding-top: 16px; }
  .sl-cols { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sl-cols > section { gap: 12px; }
  .sl-cols aside { position: static; }
  .sl-head h1 { font-size: 26px; }
  .sl-hint { font-size: 13px; margin-top: -6px; }
  .sl-list { gap: 12px; }
  .sl-row { gap: 10px; padding: 12px; }
  .sl-photo { width: 96px; height: 80px; border-radius: 6px; }
  .sl-body { gap: 4px; }
  .sl-body .price .amount { font-size: 17px !important; }
  .sl-body .price .per, .sl-body .price .other { font-size: 11px !important; }
  .sl-title { font-size: 14px; }
  .sl-body .lc-sub, .sl-top .fresh { font-size: 12px; }
  .sl-note { font-size: 12px; font-style: italic; min-height: 44px; margin-top: 0; }
  .sl-note-in { height: 44px; font-style: normal; }
  .sl-actions .ib { width: 44px; height: 44px; border-radius: 22px; border: none; }
  .sl-actions { gap: 0; margin: -6px -8px -6px -6px; }
  .home-first { gap: 16px; padding-top: 20px; }
  .home-hero h1 { font-size: 30px; }
  .home-hero p { font-size: 16px; }
  .ask { flex-direction: column; align-items: stretch; border-radius: 20px; padding: 14px; box-shadow: none; }
  .ask textarea { font-size: 16px; line-height: 1.4; min-height: 46px; height: auto; padding: 0; }
  .ask .pri { height: 46px; }
  .suggest { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .suggest::-webkit-scrollbar, .crit-row::-webkit-scrollbar { display: none; }
  .suggest .chip { flex-shrink: 0; height: 44px; border-radius: 22px; }
  .fresh-row .sec-head h2 { font-size: 15px; }
  .thread { padding-top: 0; padding-bottom: 120px; }
  .thread-cols { grid-template-columns: minmax(0, 1fr); }
  .crit-row { gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 10px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 56px; z-index: 10; background: var(--ground); }
  .crit { min-height: 36px; }
  .turns { gap: 12px; padding-top: 4px; }
  .me { max-width: 300px; font-size: 14px; scroll-margin-top: 120px; }
  /* on a phone the reply is a bubble, the cards stand on their own, the question is a second bubble */
  .jb { background: none; padding: 0; font-size: 14px; }
  .jb > p, .jb .closest, .turn.failed .jb { background: var(--surface-2); border-radius: 18px; padding: 12px 14px; }
  .jb .closest { padding-bottom: 0; border-radius: 18px 18px 0 0; margin-bottom: -12px; }
  .turn.failed .jb { background: var(--warn-bg); }
  .turn.failed .jb > p { background: none; padding: 0; }
  .jb .hide { position: static; align-self: flex-end; }
  .lc-row .lc-top .fresh { position: absolute; left: 12px; top: 130px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--ground); }
  .sk-row { flex-direction: column; padding: 0; overflow: hidden; }
  .sk-photo { width: 100%; height: 170px; border-radius: 0; }
  .sk-lines { padding: 14px 16px 16px; }
  .to-shortlist { height: 44px; font-size: 14px; }
  .composer { padding: 10px 12px calc(14px + env(safe-area-inset-bottom)); background: var(--ground); border-top: 1px solid var(--line); pointer-events: auto; }
  .composer-in { padding: 0; gap: 8px; box-shadow: none; border-radius: 0; }
  .composer-in:focus-within { box-shadow: none; }
  .composer input { height: 44px; border: 1px solid var(--line-card); border-radius: 22px; padding: 0 16px; }
  .composer input:focus { border-color: var(--ink); }
  .combo input { font-size: 16px; }
  .sec-head { flex-wrap: wrap; gap: 4px 16px; }
  photo-gallery[open] { background: var(--ink); }
  photo-gallery .pg-head { height: 56px; padding: 0 8px; }
  photo-gallery .pg-title span { display: none; }
  photo-gallery .pg-ib { width: 44px; height: 44px; border: none; }
  photo-gallery .pg-main { padding: 0; }
  photo-gallery .pg-nav { display: none; }
  photo-gallery .pg-track { max-width: none; padding: 0 24px; scroll-padding: 0 24px; }
  photo-gallery .pg-slide { flex-basis: calc(100% - 8px); height: min(60vh, 420px); }
  photo-gallery .pg-foot { flex-direction: column; align-items: stretch; gap: 12px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
  photo-gallery .pg-cap { max-width: none; min-height: 40px; }
  photo-gallery .pg-th { width: 64px; height: 44px; }
  photo-gallery .pg-bar { display: flex; }
}
