:root{
  --bg:#edf2f8;--surface:#fff;--ink:#1c2c43;--muted:#52657d;--line:#dce5ef;
  --soft:#f1f5fa;--blue:#1461d7;--onblue:#fff;--good:#22734c;--bad:#ae303a;
  color-scheme:light;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);background:var(--bg);
}
body.dark{
  --bg:#111923;--surface:#1b2634;--ink:#f1f5fa;--muted:#b3c2d4;--line:#35475b;
  --soft:#263547;--blue:#91baff;--onblue:#142c50;--good:#91d3ad;--bad:#f5b4b8;
  color-scheme:dark;
}
html{background:var(--bg)}
body{background:var(--bg);color:var(--ink)}
*{box-sizing:border-box}
/* Keep conditional controls hidden even when component rules set display. */
[hidden]{display:none!important}
body{margin:0;min-height:100vh;display:flex;flex-direction:column}
button,input,select{font:inherit}
button,a,input,select{-webkit-tap-highlight-color:transparent}
button,a{touch-action:manipulation}
button{cursor:pointer;color:inherit}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
a{color:var(--blue);text-underline-offset:3px}
svg.icon{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle;flex-shrink:0}
.app{flex:1;min-height:0;width:100%;max-width:560px;margin:0 auto}
.screen{padding:18px 16px 22px}

/* header */
.city-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}
.city-title{font-size:25px;font-weight:750;letter-spacing:-.025em;margin:0}
.city-title span{color:var(--muted);font-weight:450;font-size:15px}
.icon-btn{border:0;background:var(--soft);color:var(--ink);width:42px;height:42px;border-radius:12px;display:grid;place-items:center}
.subline{margin:7px 0 14px;font-size:12px;color:var(--muted);line-height:1.5}
.archive-note{background:var(--soft);padding:13px;border-radius:10px;font-size:12px;line-height:1.5;margin-bottom:16px;color:var(--muted)}

/* feed cards */
.feed-card+.feed-card{margin-top:28px;padding-top:26px;border-top:1px solid var(--line)}
.photo-wrap{position:relative;border-radius:14px;overflow:hidden;aspect-ratio:1.46;background:var(--soft)}
.photo-wrap.no-photo{display:grid;place-items:center;color:var(--muted);font-size:12px}
.fresh{display:inline-flex;gap:5px;align-items:center;color:var(--good);font-size:11px;margin:12px 0 5px}
.fresh i{width:5px;height:5px;background:currentColor;border-radius:50%}
.archived{color:var(--muted)}
.price{font-size:27px;font-weight:750;letter-spacing:-.025em;margin:3px 0;overflow-wrap:anywhere}
.price small{font-size:13px;font-weight:500;letter-spacing:0;white-space:nowrap}
.offer-term{color:var(--muted);font-size:12px;line-height:1.5;margin:5px 0 12px}
.listing-title{font-size:17px;font-weight:650;margin:0 0 6px;letter-spacing:-.01em}
.location{font-size:12px;color:var(--muted);margin:0;line-height:1.5}
.fact-line{display:flex;flex-wrap:wrap;gap:14px;margin:14px 0;font-size:12px}
.fact-line span{display:flex;gap:5px;align-items:center}
.fact-line svg{width:16px;height:16px}
.bookmark{position:absolute;right:11px;top:11px;background:#fff;color:#1c2c43;width:38px;height:38px;border:0;border-radius:50%;display:grid;place-items:center;z-index:2}
.bookmark[aria-pressed=true]{background:#1461d7;color:#fff}
.bookmark[aria-pressed=true] svg{fill:currentColor}

/* buttons */
.primary{width:100%;border:0;border-radius:10px;background:var(--blue);color:var(--onblue);font-weight:650;min-height:44px;padding:11px 14px;font-size:14px}
.primary:disabled{opacity:.55;cursor:default}
.secondary{width:100%;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-weight:600;min-height:42px;padding:10px 12px;font-size:13px;color:var(--ink)}
.secondary+.secondary{margin-top:8px}
.row-actions{display:flex;gap:8px;margin-top:13px}
.row-actions .primary,.row-actions .secondary{flex:1}
.link-btn{border:0;background:none;color:var(--blue);padding:7px 0;font-weight:650;font-size:13px}
.link-btn+.link-btn{margin-left:14px}

/* gallery (D91) */
.gallery-wrap{position:relative;background:var(--soft);isolation:isolate}
.photo-gallery{display:flex;width:100%;height:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;touch-action:pan-x pan-y}
.photo-gallery::-webkit-scrollbar{display:none}
.gallery-slide{flex:0 0 100%;width:100%;height:100%;scroll-snap-align:start;scroll-snap-stop:always}
.gallery-slide img{display:block;width:100%;height:100%;object-fit:cover;user-select:none;-webkit-user-drag:none}
.photo-counter{position:absolute;bottom:12px;right:12px;padding:7px 10px;border-radius:7px;font-size:12px;line-height:20px;font-variant-numeric:tabular-nums;background:#1c2c43;color:#fff;pointer-events:none}
.gallery-arrows{position:absolute;bottom:8px;left:8px;display:flex;gap:6px}
.gallery-arrows button{display:grid;place-items:center;width:40px;height:40px;border:0;border-radius:50%;background:#fff;color:#1c2c43}
.gallery-arrows button:last-child svg{transform:rotate(180deg)}
.gallery-arrows button:disabled{opacity:.4;cursor:default}
.photo-gallery:focus-visible{outline:3px solid var(--blue);outline-offset:-3px}
@keyframes swipe-peek{0%,15%,100%{transform:translateX(0)}50%,65%{transform:translateX(-30px)}}
@media(max-width:800px),(pointer:coarse){.swipe-hint .gallery-slide{animation:swipe-peek 1.3s cubic-bezier(.16,1,.3,1) .35s 1}.gallery-arrows button{width:44px;height:44px}}
@media(prefers-reduced-motion:reduce){.swipe-hint .gallery-slide{animation:none}.photo-gallery{scroll-behavior:auto}}

/* detail */
.detail-gallery{margin:0 -16px 15px;aspect-ratio:1.2;overflow:hidden}
.section-title{font-size:17px;margin:20px 0 12px}
.facts{display:grid;grid-template-columns:1fr 1fr;gap:16px 12px;margin:18px 0}
.facts div{font-size:14px;font-weight:600;overflow-wrap:anywhere}
.facts small{display:block;font-size:11px;color:var(--muted);font-weight:450;margin-bottom:5px}
.description{font-size:14px;line-height:1.55;color:var(--ink);white-space:pre-wrap;overflow-wrap:anywhere}
.map-link{display:inline-flex;align-items:center;gap:7px;min-height:44px;font-size:13px;margin:5px 0 9px;text-decoration:none}
.map-link:hover{text-decoration:underline}
.contact-line{display:block;background:var(--soft);padding:15px;border-radius:9px;font-size:15px;margin:10px 0;text-decoration:none;color:var(--ink);overflow-wrap:anywhere}
.contact-line small{display:block;color:var(--muted);font-size:11px;margin-bottom:4px}
.sticky-action{position:sticky;bottom:0;background:var(--surface);padding:12px 0 0}

/* filters & forms */
.filter-field{margin:20px 0}
.filter-field>label,.filter-field>strong{display:block;font-size:14px;font-weight:650;margin-bottom:10px}
.choices{display:flex;flex-wrap:wrap;gap:7px}
.choice{border:1px solid var(--line);background:var(--surface);border-radius:8px;min-height:39px;padding:8px 12px;font-size:12px;color:var(--ink)}
.choice[aria-pressed=true]{background:var(--soft);color:var(--blue);border-color:var(--blue)}
.filter-field select{width:100%;font-size:14px}
.filter-field .advanced-select{display:block;width:100%;min-width:0;box-sizing:border-box;background:var(--soft);border:1px solid var(--line);border-radius:8px;padding:10px;font:inherit;color:var(--ink)}
.advanced-select option{padding:6px}
.advanced-criteria .link-btn{margin-top:6px}
.inputs{display:flex;gap:8px;margin-top:10px}
.inputs input,.inputs select{flex:1;min-width:0;background:var(--soft);border:1px solid var(--line);border-radius:8px;padding:12px;font-size:14px;color:var(--ink)}
.checkline{display:flex;align-items:flex-start;gap:9px;font-size:12px;line-height:1.5}
.checkline input{width:18px;height:18px;accent-color:var(--blue);flex-shrink:0}
.filter-help{font-size:11px;line-height:1.5;color:var(--muted);margin-top:8px}
.form-error{color:var(--bad);font-size:12px;line-height:1.5;margin:10px 0}

/* favorites */
.locked-favorite{padding:20px 0;border-bottom:1px solid var(--line)}
.locked-favorite h4{margin:0;font-size:15px}
.locked-favorite p{font-size:13px;color:var(--muted);line-height:1.5}
.locked-favorite .secondary{margin-top:8px}
.fav-row{display:grid;grid-template-columns:96px 1fr;gap:12px;padding:17px 0;border-bottom:1px solid var(--line)}
.fav-row img{width:96px;height:116px;object-fit:cover;border-radius:10px;background:var(--soft)}
.fav-row .price{font-size:20px;margin:4px 0}
.fav-row h3{font-size:13px;margin:0 0 6px;line-height:1.4}

/* lists / orders */
.list-row{padding:16px 0;border-bottom:1px solid var(--line)}
.list-row h4{margin:0 0 5px;font-size:14px}
.list-row p{margin:0;font-size:12px;color:var(--muted);line-height:1.55}
.state-chip{display:inline-block;font-size:11px;padding:3px 8px;border-radius:6px;background:var(--soft);color:var(--muted);margin-top:6px}
.state-chip.good{color:var(--good)}
.state-chip.bad{color:var(--bad)}

/* profile / fx */
.fx-table{border-collapse:collapse;width:100%;font-size:14px;font-variant-numeric:tabular-nums}
.fx-table th,.fx-table td{padding:14px 0;border-bottom:1px solid var(--line);text-align:left}
.fx-table thead{font-size:12px;color:var(--muted)}
.fx-table td,.fx-table th:last-child{text-align:right}
.fx-table tbody th{font-weight:500}
.fx-source{font-size:12px;color:var(--muted);line-height:1.6;display:block;padding:8px 0}

/* states */
.empty{text-align:center;padding:65px 8px}
.empty img{width:110px;height:110px;border-radius:22px}
.empty h3{font-size:21px;margin:19px 0 9px}
.empty p{font-size:14px;color:var(--muted);line-height:1.6;margin-bottom:25px}
.skeleton{border-radius:14px;background:linear-gradient(100deg,var(--soft) 40%,var(--line) 50%,var(--soft) 60%);background-size:200% 100%;animation:shimmer 1.4s infinite linear}
.skeleton.photo{aspect-ratio:1.46;margin-bottom:14px}
.skeleton.line{height:16px;margin:8px 0}
.skeleton.line.short{width:55%}
@keyframes shimmer{to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){.skeleton{animation:none}}

/* navigation */
.bottom-nav{display:flex;justify-content:space-around;border-top:1px solid var(--line);padding:9px 6px calc(12px + env(safe-area-inset-bottom));background:var(--surface);flex-shrink:0;position:sticky;bottom:0;max-width:560px;margin:0 auto;width:100%}
.bottom-nav[hidden]{display:none}
.bottom-nav button{display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;min-height:40px;width:25%;border:0;background:none;color:var(--muted);font-size:10px}
.bottom-nav button.active{color:var(--blue)}

.toast{position:fixed;left:16px;right:16px;bottom:83px;padding:12px;background:var(--ink);color:var(--surface);font-size:12px;border-radius:9px;z-index:30;box-shadow:0 4px 18px #0002;max-width:528px;margin:0 auto}
.page-top{display:flex;align-items:center;gap:8px;margin-bottom:15px}
.page-top .back{border:0;background:transparent;padding:5px;width:31px;height:34px;color:var(--blue)}
.page-top h3{font-size:23px;margin:0;flex:1}
/* Identity and country-access controls follow the existing quiet search surface. */
.language-picker{display:flex;align-items:center;gap:12px;margin:16px 0;color:var(--muted);font-size:14px}
.language-picker select,.email-auth input{min-height:44px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);padding:10px 12px;font:inherit;max-width:100%}
.email-auth{display:grid;gap:12px;max-width:420px;margin:28px 0}
.email-auth label{font-weight:600}.email-auth .filter-help{margin:0}.email-auth button{margin:0}
.auth-options{max-width:460px}.auth-options>a{display:inline-flex;margin:12px 0}.identity-settings{padding:8px 0 24px;border-bottom:1px solid var(--line)}
.country-prices{display:flex;flex-direction:column}.country-price{display:grid;grid-template-columns:80px 1fr auto;align-items:center;gap:16px;padding:16px 0;border-bottom:1px solid var(--line)}
.country-price strong,.country-price span{font-variant-numeric:tabular-nums}.country-price .secondary{margin:0}.country-access{margin:24px 0}
@media(max-width:480px){.country-price{grid-template-columns:70px 1fr;gap:10px}.country-price a{grid-column:1/-1;justify-self:start}}
