:root {
  --paper:#f4f5f2; --white:#fff; --ink:#293b33; --muted:#7e887f; --line:#dfe4dd;
  --green:#53745f; --green-light:#e8eee7; --accent:#b77762; --accent-light:#f6e9e3;
  --radius:24px; --header-height:64px; --nav-height:76px;
  --shadow:0 16px 45px #26362c12;
}
* { box-sizing:border-box; }
html { min-height:100%; }
body { margin:0; background:var(--paper); color:var(--ink); font:14px/1.5 "Segoe UI",Arial,sans-serif; }
button,input,select,textarea { font:inherit; }
button,a,input,select,textarea { -webkit-tap-highlight-color:transparent; }
button,a { touch-action:manipulation; }
button { cursor:pointer; border:0; background:none; color:inherit; }
button:disabled { opacity:.4; cursor:default; }
a { color:inherit; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid #b7776277; outline-offset:3px;
}
svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; vertical-align:middle; }
[data-icon] { display:inline-flex; align-items:center; justify-content:center; }
[hidden] { display:none!important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.muted { color:var(--muted); font-size:12px; line-height:1.7; }
.topbar { position:sticky; top:0; z-index:20; height:var(--header-height); border-bottom:1px solid var(--line); background:#fbfcf9; }
.topbar-inner { max-width:1024px; height:100%; margin:auto; padding:0 24px; display:flex; align-items:center; gap:16px; }
.brand { text-decoration:none; display:flex; align-items:center; gap:8px; font-size:25px; font-weight:750; letter-spacing:-1px; line-height:1; }
.brand-icon { width:30px; height:30px; display:grid; place-items:center; background:var(--accent); color:#fff; border-radius:10px; }
.brand-icon svg { width:22px; height:22px; stroke-width:2.3; }
.brand-dot { color:var(--accent); margin-left:-8px; }
.role-switch { display:flex; flex-shrink:0; margin-left:auto; padding:3px; border:1px solid var(--line); border-radius:15px; background:var(--green-light); }
.role-switch button { min-height:44px; padding:0 12px; border-radius:11px; font-size:12px; font-weight:600; color:var(--muted); white-space:nowrap; }
.role-switch button:hover { color:var(--ink); }
.role-switch button[aria-pressed="true"] { background:var(--white); color:var(--green); box-shadow:0 2px 6px #26362c12; }
.city { display:flex; align-items:center; gap:5px; color:var(--muted); font-size:12px; }
.city svg { width:14px; height:14px; color:var(--green); }
.icon-button { width:38px; height:38px; display:inline-grid; place-items:center; border-radius:50%; color:#738272; flex-shrink:0; }
.icon-button:hover { background:var(--green-light); }
.filter-button { position:relative; border:1px solid var(--line); background:var(--white); }
.filter-button svg { width:18px; height:18px; }
#filter-count { position:absolute; right:-3px; top:-3px; min-width:17px; height:17px; border-radius:50%; background:var(--accent); color:#fff; font-size:10px; line-height:17px; text-align:center; }
.app-main { padding-bottom:calc(var(--nav-height) + env(safe-area-inset-bottom)); overflow-x:clip; }
.app-screen { max-width:1024px; margin:0 auto; padding:28px 24px 34px; }
.screen-header { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; }
.screen-header h1 { font-size:25px; font-weight:600; letter-spacing:-.7px; line-height:1.2; margin:0; }
.screen-header p { margin:7px 0 0; color:var(--muted); font-size:12px; }
.match-view { max-width:512px; padding:10px 16px 12px; }
.deck-meta { min-height:39px; margin:0 3px 8px; color:#8b9589; font-size:10px; text-align:center; letter-spacing:.15px; display:flex; flex-direction:column; gap:1px; justify-content:center; }
.deck-caption { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:24px; }
.deck-caption .text-button { font-size:10px; min-height:24px; padding:0 3px; color:var(--green); }
#deck-learning { color:#778b70; font-size:9px; line-height:1.6; }
.deck { position:relative; width:100%; height:min(720px,calc(100dvh - 209px)); min-height:250px; }
.swipe-card { width:100%; height:100%; position:relative; background:#e4e8df; border:1px solid #d7dfd3; border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; transform-origin:50% 80%; touch-action:pan-y; user-select:none; transition:transform .24s,opacity .24s; }
.swipe-card.dragging { transition:none; }
.hero-media { position:relative; height:100%; width:100%; overflow:hidden; background:#e3e7df; }
.hero-media>img,.hero-media>video { display:block; width:100%; height:100%; object-fit:cover; pointer-events:none; }
.hero-media>video { position:absolute; inset:0; z-index:4; object-fit:contain; pointer-events:auto; background:#18271e; }
.hero-media>img.plan { object-fit:contain; background:#eeefe9; }
.hero-media::after { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(#16231c55,transparent 26%,transparent 58%,#16231c66); }
.hero-top { position:absolute; top:18px; left:17px; right:17px; display:flex; align-items:center; justify-content:space-between; gap:10px; z-index:3; }
.media-type { display:inline-flex; align-items:center; gap:6px; max-width:85%; color:white; background:#23372d82; border:1px solid #ffffff20; border-radius:30px; backdrop-filter:blur(10px); padding:6px 11px; font-size:10px; font-weight:500; }
.media-type svg { width:13px; height:13px; }
.fullscreen-button { width:32px; height:32px; flex-shrink:0; display:grid; place-items:center; border-radius:50%; color:white; background:#23372d65; }
.fullscreen-button svg { width:16px; height:16px; }
.hero-bottom { position:absolute; bottom:99px; left:19px; right:19px; display:flex; justify-content:space-between; align-items:center; gap:12px; color:white; z-index:3; }
.media-dots { display:flex; gap:5px; max-width:85%; overflow:auto; scrollbar-width:none; padding:7px 0; }
.media-dots::-webkit-scrollbar { display:none; }
.media-dot { width:15px; min-width:15px; height:4px; padding:0; border-radius:10px; background:#ffffff65; transition:width .15s; }
.media-dot.active { width:26px; min-width:26px; background:white; }
.media-number { font-size:10px; white-space:nowrap; text-shadow:0 1px 4px #0006; }
.media-arrow { position:absolute; top:47%; transform:translateY(-50%); z-index:3; color:white; width:31px; height:39px; display:grid; place-items:center; border-radius:11px; background:#23372d55; border:1px solid #ffffff30; opacity:.85; }
.media-arrow:hover { opacity:1; background:#23372d85; }
.media-arrow svg { width:18px; height:18px; }
.media-arrow.prev { left:11px; }
.media-arrow.next { right:11px; }
.play-tour { position:absolute; inset:0; z-index:2; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:11px; background:#16281d20; color:white; }
.play-circle { width:64px; height:64px; border-radius:50%; background:#fffffff0; color:var(--ink); display:grid; place-items:center; box-shadow:0 6px 30px #0002; transition:transform .2s; }
.play-tour:hover .play-circle { transform:scale(1.07); }
.play-circle svg { width:24px; height:24px; margin-left:3px; fill:currentColor; stroke-width:0; }
.play-tour strong { font-size:13px; font-weight:600; text-shadow:0 1px 5px #0005; }
.play-tour small { font-size:10px; opacity:.9; }
.tour-frame { position:absolute; inset:0; width:100%; height:100%; border:0; z-index:4; background:#18271e; }
.tour-stop { position:absolute; right:12px; top:12px; z-index:7; border-radius:8px; background:#fffffff0; padding:8px 11px; font-size:11px; }
.tour-source { position:absolute; bottom:96px; left:12px; right:12px; text-align:center; z-index:7; background:#fffffff0; color:var(--ink); border-radius:8px; padding:8px 10px; font-size:10px; text-decoration:none; }
.choice-stamp { position:absolute; z-index:8; top:95px; border:3px solid currentColor; border-radius:8px; padding:4px 16px; font-size:31px; font-weight:750; letter-spacing:2px; opacity:0; pointer-events:none; transform:rotate(-14deg); }
.choice-stamp.like { left:25px; color:#effee8; }
.choice-stamp.pass { right:25px; color:#fff0e8; transform:rotate(14deg); }
.card-controls { position:absolute; bottom:17px; left:16px; right:16px; display:flex; align-items:center; justify-content:center; gap:15px; z-index:8; }
.action-circle { width:55px; height:55px; display:grid; place-items:center; border-radius:50%; background:#fffffff2; border:1px solid #ffffff70; box-shadow:0 3px 18px #14251b20; transition:transform .15s,background .15s; }
.action-circle:hover { transform:translateY(-3px); }
.action-circle.undo,.action-circle.info,.action-circle.chat { width:38px; height:38px; color:#6e8065; }
.action-circle.pass { color:var(--accent); background:#fff7f2; }
.action-circle.pass svg { width:25px; height:25px; }
.action-circle.like { color:white; background:var(--green); border-color:#678873; }
.action-circle.like svg { width:26px; height:26px; fill:currentColor; stroke-width:1.3; }
.action-circle.undo { margin-right:4px; }
.action-circle.info,.action-circle.chat { margin-left:4px; }
.no-photo { height:100%; display:grid; place-items:center; color:#7d8a76; font-size:13px; }
.property-details-slide { position:absolute; inset:0; z-index:2; padding:65px 25px 132px; overflow-y:auto; overscroll-behavior:contain; background:#fff; color:var(--ink); user-select:text; touch-action:pan-y; scrollbar-width:thin; scrollbar-color:#ccd5c9 transparent; }
.hero-media:has(.property-details-slide)::after { display:none; }
.hero-media:has(.property-details-slide) .media-type { color:var(--green); background:var(--green-light); border-color:#dce7d9; }
.hero-media:has(.property-details-slide) .fullscreen-button { color:var(--green); background:var(--green-light); }
.hero-media:has(.property-details-slide) .hero-bottom { background:#ffffffed; color:var(--muted); bottom:93px; left:0; right:0; padding:8px 22px 0; }
.hero-media:has(.property-details-slide) .media-dot { background:#dbe3d6; }
.hero-media:has(.property-details-slide) .media-dot.active { background:var(--green); }
.hero-media:has(.property-details-slide) .media-number { text-shadow:none; }
.hero-media:has(.property-details-slide) .media-arrow { color:var(--green); background:#e8eee7de; border-color:#dae2d7; }
.swipe-card:has(.property-details-slide) .card-controls { bottom:0; left:0; right:0; padding:13px 16px 17px; background:linear-gradient(#ffffffce,#fff 25%); border-top:1px solid var(--line); }
.swipe-card:has(.property-details-slide) .action-circle { border-color:var(--line); }
.swipe-card:has(.property-details-slide) .action-circle.like { border-color:var(--green); }
.details-header { margin-bottom:20px; }
.details-header h2 { font-size:22px; font-weight:600; line-height:1.25; letter-spacing:-.6px; margin:0 0 10px; }
.details-header p { color:#778373; font-size:12px; margin:4px 0; line-height:1.7; }
.details-price { font-size:29px; font-weight:650; letter-spacing:-1px; line-height:1.3; margin:10px 0; }
.details-header .property-type,.property-type { color:var(--accent); font-size:10px; text-transform:uppercase; letter-spacing:.6px; }
.detail-facts { display:grid; grid-template-columns:1fr 1fr; gap:17px 20px; margin:22px 0; padding:20px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.detail-facts dt { color:#8a9484; font-size:9px; letter-spacing:.6px; }
.detail-facts dd { font-size:14px; font-weight:500; margin:4px 0 0; }
.detail-description { color:#657360; white-space:pre-wrap; font-size:12px; line-height:1.8; }
.detail-section-title,.property-details-slide>h3 { font-size:17px; font-weight:600; margin:22px 0 9px; }
.property-details-slide details { border-top:1px solid var(--line); padding:15px 0; margin-top:18px; font-size:12px; }
.property-details-slide summary { cursor:pointer; font-weight:500; }
.detail-contact { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:15px; border-top:1px solid var(--line); padding-top:18px; margin-top:20px; }
.detail-contact .contact-button,.detail-contact .primary-button { flex:1; min-width:130px; }
.seller-person { display:flex; align-items:center; gap:10px; }
.seller-avatar { width:35px; height:35px; flex-shrink:0; display:grid; place-items:center; border-radius:50%; background:var(--green-light); color:var(--green); font-size:15px; }
.seller-person strong { display:block; font-size:12px; max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.seller-person small { display:block; color:#8b9584; font-size:10px; margin-top:2px; }
.source-conflict { padding:12px; border-radius:10px; background:var(--accent-light); color:#916e5d; font-size:11px; }
.primary-button,.contact-button { border:1px solid var(--green); color:white; background:var(--green); border-radius:11px; padding:11px 16px; display:inline-flex; align-items:center; justify-content:center; gap:8px; text-decoration:none; font-size:12px; font-weight:600; }
.primary-button:hover,.contact-button:hover { background:#456451; }
.primary-button svg,.contact-button svg { width:16px; height:16px; }
.secondary-button { border:1px solid var(--line); background:#fff; border-radius:11px; padding:10px 15px; display:inline-flex; align-items:center; justify-content:center; gap:7px; font-size:12px; }
.secondary-button:hover { background:var(--green-light); }
.secondary-button svg { width:16px; height:16px; }
.text-button { display:inline-flex; align-items:center; gap:6px; color:#77866c; font-size:11px; padding:8px 0 8px 8px; }
.text-button svg { width:15px; height:15px; }
.empty-deck { height:100%; min-height:280px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; border:1px dashed #cdd8c6; border-radius:var(--radius); background:#f9fbf6; text-align:center; padding:36px 25px; }
.empty-deck>svg,.empty-icon { width:45px; height:45px; color:#94a68b; }
.empty-icon svg { width:32px; height:32px; }
.empty-deck h2,.chat-empty h2 { font-size:21px; font-weight:500; letter-spacing:-.5px; margin:0; }
.empty-deck p,.chat-empty p { color:#8a9682; max-width:280px; font-size:12px; line-height:1.8; margin:0; }
.favorites-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:20px; }
.favorite-card { border:1px solid var(--line); border-radius:19px; overflow:hidden; background:white; box-shadow:0 5px 20px #26362c06; }
.favorite-image { position:relative; height:220px; background:#e4e8df; }
.favorite-image img { width:100%; height:100%; object-fit:cover; display:block; }
.favorite-image img.plan { object-fit:contain; }
.favorite-image .media-type { position:absolute; left:12px; top:12px; }
.remove-favorite { position:absolute; right:12px; top:12px; width:33px; height:33px; display:grid; place-items:center; background:#fffffff2; border-radius:50%; color:var(--accent); }
.remove-favorite svg { width:17px; height:17px; fill:currentColor; }
.favorite-body { padding:17px; }
.card-price { font-size:23px; font-weight:600; letter-spacing:-.7px; margin:0 0 5px; }
.card-address { color:#687561; font-size:12px; font-weight:500; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.card-location { display:flex; align-items:center; gap:5px; color:#8b9583; font-size:11px; margin-top:6px; }
.card-location svg { width:13px; height:13px; }
.card-facts { display:flex; align-items:center; justify-content:space-between; gap:9px; border-top:1px solid var(--line); padding:12px 0; margin:13px 0 0; color:#798771; font-size:11px; }
.card-facts>span { display:flex; align-items:center; gap:5px; }
.card-facts svg { width:14px; height:14px; }
.favorite-buttons { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.favorite-buttons button,.favorite-buttons a { text-align:center; text-decoration:none; font-size:11px; padding:9px; border-radius:9px; border:1px solid var(--line); }
.favorite-buttons a { color:var(--green); background:var(--green-light); border-color:#d9e5d5; }
.favorites-empty { grid-column:1/-1; height:auto; min-height:370px; }
.bottom-nav { position:fixed; bottom:0; left:0; right:0; z-index:40; min-height:var(--nav-height); padding:9px 16px calc(9px + env(safe-area-inset-bottom)); background:#fbfcf9f5; border-top:1px solid var(--line); backdrop-filter:blur(18px); }
.nav-items { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; max-width:480px; margin:auto; }
.nav-items>button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; border-radius:14px; min-height:56px; font-size:10px; color:#919b8b; font-weight:500; }
.nav-items>button:hover { background:#eef2ea; }
.nav-items>button.active { color:var(--green); }
.nav-icon { position:relative; width:42px; height:30px; display:grid; place-items:center; border-radius:10px; }
.nav-items>button.active .nav-icon { background:var(--green-light); }
.nav-icon svg { width:21px; height:21px; }
.favorite-count { position:absolute; top:-2px; right:0; min-width:15px; border-radius:12px; padding:1px 4px; background:#e3eadd; color:var(--green); font-size:8px; font-weight:700; line-height:13px; }
.favorite-count:empty { display:none; }
.chat-layout { display:grid; grid-template-columns:280px minmax(0,1fr); min-height:400px; height:min(680px,calc(100dvh - 235px)); background:white; border:1px solid var(--line); border-radius:20px; overflow:hidden; }
.chat-list-panel { min-height:0; overflow-y:auto; border-right:1px solid var(--line); }
.chat-list { padding:9px; }
.chat-thread,.thread-button,.chat-list>button { width:100%; display:flex; align-items:center; gap:11px; text-align:left; padding:13px 11px; border-radius:12px; }
.chat-thread:hover,.thread-button:hover,.chat-list>button:hover { background:#f5f7f1; }
.chat-thread.active,.thread-button.active,.chat-list>button.active { background:var(--green-light); }
.chat-thread img,.thread-avatar { width:42px; height:42px; border-radius:12px; object-fit:cover; flex-shrink:0; background:#e7eddf; display:grid; place-items:center; color:var(--green); }
.chat-thread strong,.thread-button strong,.chat-list>button strong { display:block; font-size:12px; font-weight:600; }
.chat-thread small,.thread-button small,.chat-list>button small { color:#97a08e; font-size:10px; display:block; margin-top:3px; }
.chat-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:35px; grid-column:2; text-align:center; }
.chat-conversation { min-width:0; min-height:0; display:flex; flex-direction:column; grid-column:2; grid-row:1; }
.chat-thread-header { display:flex; align-items:center; gap:10px; padding:17px 20px; border-bottom:1px solid var(--line); background:#fcfdf9; }
.chat-thread-header h2 { font-size:15px; font-weight:600; margin:0; }
#chat-status { color:#95a18d; font-size:10px; margin:3px 0 0; }
#chat-back { display:none; }
.chat-messages { flex:1; min-height:0; overflow-y:auto; padding:23px; display:flex; flex-direction:column; gap:13px; overscroll-behavior:contain; }
.message,.chat-message { max-width:84%; align-self:flex-start; padding:11px 14px; border-radius:15px 15px 15px 4px; background:#f1f4ee; color:#67755e; font-size:12px; line-height:1.75; white-space:pre-wrap; overflow-wrap:anywhere; }
.message.user,.message.sent,.message.outgoing,.chat-message.user,.chat-message.sent { align-self:flex-end; background:var(--green-light); color:#4d6954; border-radius:15px 15px 4px 15px; }
.message .message-time,.chat-message small { display:block; font-size:9px; opacity:.55; margin-top:5px; }
.chat-message p,.message p { margin:0; }
.message a,.chat-message a { color:var(--green); }
.message-empty,.chat-messages>.muted { color:#99a28f; margin:auto; font-size:12px; text-align:center; }
.chat-composer { display:flex; align-items:flex-end; gap:10px; padding:15px 18px; border-top:1px solid var(--line); background:#fcfdf9; }
.chat-composer textarea { width:100%; resize:none; min-height:43px; max-height:120px; border:1px solid var(--line); border-radius:13px; padding:11px 13px; background:white; font-size:12px; color:var(--ink); }
.send-button { width:43px; height:43px; display:grid; place-items:center; border-radius:12px; color:white; background:var(--green); flex-shrink:0; }
.send-button svg { width:19px; height:19px; }
.profile-grid { display:grid; grid-template-columns:260px minmax(0,1fr); gap:24px; align-items:start; }
.profile-panel,.listing-panel { background:white; border:1px solid var(--line); border-radius:19px; padding:23px; }
.profile-panel h2,.seller-workspace h2,.buyer-workspace h2 { font-size:18px; font-weight:500; letter-spacing:-.35px; margin:0; }
.profile-avatar { width:52px; height:52px; display:grid; place-items:center; border-radius:50%; color:#839574; background:var(--green-light); margin-bottom:17px; }
.profile-avatar svg { width:28px; height:28px; }
#profile-status { margin:10px 0 18px; }
#sign-in { width:100%; }
#profile-form .secondary-button { width:100%; }
.seller-workspace-head { display:flex; align-items:center; justify-content:space-between; gap:15px; margin:2px 0 20px; }
.seller-workspace-head p { margin:5px 0 0; }
.seller-workspace-head .primary-button { white-space:nowrap; }
.buyer-workspace { min-width:0; }
.buyer-workspace-head { margin:2px 0 20px; }
.buyer-workspace-head p { max-width:430px; margin:6px 0 0; }
.preferences-panel { background:white; border:1px solid var(--line); border-radius:19px; padding:23px; }
.price-hint { margin:-9px 0 -2px; }
.preference-actions { display:flex; justify-content:space-between; gap:12px; margin-top:24px; }
.preference-actions .primary-button { flex:1; max-width:220px; }
.learning-panel { display:flex; justify-content:space-between; align-items:center; gap:18px; padding:20px 4px; }
.learning-panel h3 { font-size:13px; font-weight:500; margin:0; }
.learning-panel p { margin:5px 0 0; max-width:360px; }
.learning-panel .text-button { white-space:nowrap; padding-left:0; }
#switch-role { font-size:11px; }
.panel-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:-3px -5px 20px 0; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; column-gap:16px; row-gap:16px; }
.field-wide { grid-column:1/-1; }
.field-label { display:block; color:#7a8872; font-size:11px; font-weight:500; margin:0; }
.field-label input,.field-label select,.field-label textarea { display:block; margin-top:7px; width:100%; color:var(--ink); background:#fff; border:1px solid #dce3d6; padding:11px 12px; border-radius:10px; font-size:13px; line-height:1.5; font-weight:400; min-width:0; }
.field-label textarea { resize:vertical; min-height:100px; }
input::placeholder,textarea::placeholder { color:#a0a89a; opacity:1; }
.field-label input[type=file] { background:#f8faf5; color:#8c9682; padding:10px; font-size:11px; }
input[type=file]::file-selector-button { color:var(--green); border:1px solid #dbe4d4; border-radius:7px; background:white; padding:7px 9px; margin-right:8px; font:inherit; cursor:pointer; }
.field-note { display:block; font-size:10px; color:#9da791; font-weight:400; line-height:1.8; margin:7px 0 0; }
.checkbox-label { display:flex; align-items:center; gap:9px; font-size:12px; color:#73816c; }
.checkbox-label input { width:17px; height:17px; accent-color:var(--green); }
.upload-fields { display:grid; gap:18px; margin:22px 0; }
.upload-previews { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.upload-preview,.media-preview { min-width:0; border:1px solid var(--line); border-radius:12px; overflow:hidden; background:#f8faf5; }
.upload-preview img,.media-preview img,.upload-previews>figure>img { width:100%; aspect-ratio:4/3; object-fit:cover; display:block; }
.upload-preview select,.media-preview select { display:block; max-width:calc(100% - 14px); margin:7px; border:1px solid var(--line); border-radius:6px; padding:6px; background:white; font-size:10px; }
.upload-preview p,.media-preview p { font-size:10px; color:#94a086; padding:0 7px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.form-status { color:#7b8c70; font-size:11px; line-height:1.8; min-height:0; margin:16px 0; }
.form-status:empty { margin:0; }
.form-status.error { color:#ad6c55; }
.form-actions { display:flex; justify-content:flex-end; margin-top:20px; }
.form-actions .primary-button { min-width:140px; }
.my-listings { display:grid; gap:13px; margin-top:20px; }
.my-listing,.my-listing-card { display:flex; align-items:center; gap:15px; padding:15px; border:1px solid var(--line); border-radius:15px; background:white; }
.my-listing img,.my-listing-card img { width:74px; height:74px; border-radius:10px; object-fit:cover; flex-shrink:0; }
.my-listing h3,.my-listing-card h3 { font-size:13px; font-weight:600; margin:0 0 4px; }
.my-listing p,.my-listing-card p { font-size:11px; color:#89957f; margin:3px 0; }
.listing-status,.status-pill { display:inline-flex; align-items:center; gap:5px; padding:3px 8px; color:var(--green); background:var(--green-light); border-radius:20px; font-size:9px; }
dialog { color:var(--ink); border:1px solid var(--line); border-radius:22px; padding:0; width:min(440px,calc(100vw - 28px)); max-height:calc(100dvh - 38px); box-shadow:0 30px 100px #23362a40; background:#fff; }
dialog::backdrop { background:#26382d65; backdrop-filter:blur(5px); }
.role-dialog { width:min(470px,calc(100vw - 30px)); padding:34px; border-radius:26px; background:#fbfcf9; }
.role-dialog::backdrop { background:#26382d88; backdrop-filter:blur(8px); }
.role-welcome { text-align:center; }
.welcome-wordmark { display:block; color:var(--ink); font-size:29px; font-weight:750; letter-spacing:-1.2px; line-height:1; }
.welcome-wordmark>span { color:var(--accent); }
.welcome-city { display:block; margin-top:9px; color:#8b9685; font-size:10px; letter-spacing:.5px; }
.role-welcome h1 { font-size:28px; font-weight:500; letter-spacing:-.9px; line-height:1.25; margin:28px 0 10px; }
.role-welcome p { color:#85917e; font-size:12px; line-height:1.8; margin:0 auto; max-width:290px; }
.role-choices { display:grid; gap:12px; margin-top:27px; }
.role-choice { display:flex; gap:14px; align-items:center; padding:19px 16px; text-align:left; background:#fff; border:1px solid var(--line); border-radius:17px; transition:border-color .15s,background .15s; }
.role-choice:hover { border-color:#aac0a2; background:#f4f8f0; }
.role-choice-icon { width:43px; height:43px; border-radius:13px; background:var(--green-light); color:var(--green); flex-shrink:0; }
.role-choice-icon svg { width:21px; height:21px; }
.role-choice-icon.seller-icon { color:var(--accent); background:var(--accent-light); }
.role-choice>span:nth-child(2) { flex:1; }
.role-choice strong { display:block; font-size:15px; font-weight:600; line-height:1.4; }
.role-choice small { display:block; color:#8a9681; font-size:10px; margin-top:5px; line-height:1.6; }
.role-choice-arrow { color:#a5b299; font-size:21px; }
.role-footnote { text-align:center; color:#98a18e; font-size:10px; margin:22px 0 0; }
.dialog-head { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:17px 22px; border-bottom:1px solid var(--line); background:#fcfdf9; position:sticky; top:0; z-index:3; }
.dialog-head h2 { font-size:21px; font-weight:500; letter-spacing:-.4px; margin:0; }
#filters-form { padding:22px; }
.dialog-actions { display:flex; gap:12px; margin-top:25px; }
.dialog-actions .primary-button { flex:1; }
#toast { position:fixed; bottom:calc(var(--nav-height) + 15px + env(safe-area-inset-bottom)); left:50%; max-width:calc(100vw - 30px); padding:11px 18px; color:#fff; background:#2c4337; border-radius:11px; font-size:12px; text-align:center; box-shadow:0 8px 28px #23362a22; opacity:0; transform:translate(-50%,10px); transition:opacity .2s,transform .2s; pointer-events:none; z-index:100; }
#toast.visible { opacity:1; transform:translate(-50%,0); }
@media (max-width:780px) {
  .profile-grid { grid-template-columns:220px minmax(0,1fr); gap:18px; }
  .profile-panel,.listing-panel,.preferences-panel { padding:20px; }
  .seller-workspace-head { align-items:flex-start; }
  .seller-workspace-head .primary-button { padding:10px 12px; font-size:11px; }
  .chat-layout { grid-template-columns:230px minmax(0,1fr); }
  .upload-previews { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:600px) {
  :root { --header-height:114px; --nav-height:74px; --radius:21px; }
  .topbar-inner { display:grid; grid-template-columns:auto 1fr auto; grid-template-rows:44px 50px; padding:6px 18px; gap:6px 13px; }
  .brand { grid-column:1; grid-row:1; }
  .city { grid-column:2; grid-row:1; justify-self:end; }
  .filter-button { grid-column:3; grid-row:1; }
  .role-switch { grid-column:1 / -1; grid-row:2; margin:0; padding:2px; }
  .role-switch button { flex:1; min-height:44px; }
  .brand { font-size:25px; }
  .brand-icon { width:28px; height:28px; border-radius:9px; }
  .city { font-size:11px; }
  .icon-button { width:35px; height:35px; }
  .app-screen { padding:22px 17px 28px; }
  .screen-header { margin-bottom:20px; }
  .screen-header h1 { font-size:23px; }
  .match-view { padding:8px 10px 10px; }
  .deck-meta { font-size:9px; min-height:39px; margin-bottom:6px; }
  #deck-learning { font-size:8px; }
  .deck { height:calc(100dvh - var(--header-height) - var(--nav-height) - 63px - env(safe-area-inset-bottom)); min-height:235px; max-height:740px; }
  .hero-top { top:15px; left:14px; right:14px; }
  .hero-bottom { left:17px; right:17px; bottom:96px; }
  .media-arrow { width:29px; height:36px; }
  .media-arrow.prev { left:8px; }
  .media-arrow.next { right:8px; }
  .card-controls { gap:14px; bottom:17px; }
  .action-circle { width:53px; height:53px; }
  .action-circle.undo,.action-circle.info,.action-circle.chat { width:37px; height:37px; }
  .property-details-slide { padding:60px 23px 128px; }
  .details-price { font-size:27px; }
  .details-header h2 { font-size:20px; }
  .bottom-nav { padding-left:10px; padding-right:10px; }
  .nav-items { gap:5px; }
  .nav-items>button { min-height:54px; }
  .favorites-grid { grid-template-columns:1fr; gap:17px; }
  .favorite-image { height:240px; }
  .favorite-body { padding:18px; }
  .favorites-empty { min-height:340px; }
  .chat-layout { display:block; height:calc(100dvh - var(--header-height) - var(--nav-height) - 85px - env(safe-area-inset-bottom)); min-height:310px; position:relative; }
  .chat-list-panel { height:100%; border:0; }
  .chat-layout:not(.thread-open) .chat-conversation { display:none; }
  .chat-layout.thread-open .chat-list-panel,.chat-layout.thread-open .chat-empty { display:none; }
  .chat-layout .chat-empty { display:none; }
  .chat-conversation { height:100%; }
  .chat-thread-header { padding:12px 13px; }
  #chat-back { display:grid; }
  .chat-messages { padding:18px; }
  .chat-composer { padding:12px; }
  .message,.chat-message { max-width:91%; }
  .profile-grid { display:block; }
  .profile-panel { margin-bottom:24px; }
  .profile-panel #sign-in { width:auto; min-width:135px; }
  #profile-form { display:flex; align-items:flex-end; gap:12px; }
  #profile-form .field-label { flex:1; }
  #profile-form .secondary-button { width:auto; flex-shrink:0; padding:12px; }
  .seller-workspace-head { align-items:center; }
  .seller-workspace-head h2 { font-size:18px; }
  .seller-workspace-head p { font-size:11px; }
  .listing-panel,.preferences-panel { padding:19px; }
  .buyer-workspace-head p { font-size:11px; }
  .preference-actions { gap:10px; }
  .preference-actions .primary-button { max-width:none; }
  .learning-panel { gap:16px; align-items:flex-start; }
  .learning-panel p { font-size:11px; }
  .role-dialog { padding:29px 22px; }
  .role-welcome h1 { font-size:25px; }
  .role-choice { padding:17px 13px; gap:12px; }
  .form-grid { gap:15px 12px; }
  .field-label input,.field-label select,.field-label textarea { font-size:16px; padding:10px; }
  .chat-composer textarea { font-size:16px; }
  .form-actions .primary-button { width:100%; }
  #filters-form { padding:20px; }
  .dialog-head { padding:16px 19px; }
  #toast { font-size:11px; }
}
@media (max-width:360px) {
  .topbar-inner { padding:0 13px; }
  .city svg { display:none; }
  .card-controls { gap:11px; }
  .action-circle { width:48px; height:48px; }
  .property-details-slide { padding-left:20px; padding-right:20px; }
  .seller-workspace-head { gap:8px; }
  .seller-workspace-head p { max-width:135px; }
}
@media (max-height:600px) and (min-width:601px) {
  .deck { height:calc(100dvh - 195px); }
  .match-view { padding-top:5px; padding-bottom:8px; }
  .deck-meta { margin-bottom:3px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { transition:none!important; animation:none!important; scroll-behavior:auto!important; }
}
.chat-layout.signed-out{grid-template-columns:1fr}.chat-layout.signed-out .chat-empty{grid-column:1;display:flex}.message.mine{align-self:flex-end;background:var(--green-light);color:#4d6954;border-radius:15px 15px 4px 15px}.message small{display:block;font-size:9px;opacity:.6;margin-top:5px}.message strong{font-size:9px;opacity:.75;display:block;margin-bottom:3px}.chat-thread>span:last-child{min-width:0}.chat-thread>span:last-child>span{display:block;font-size:11px;color:#839179;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:180px}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:15px;padding:30px}.empty-state>svg{width:32px;height:32px;color:#91a381}.empty-state h2{font-size:20px;margin:0}.empty-state p{font-size:12px;color:#87927d;line-height:1.7;margin:0}.slide-hint{font-size:9px;color:#88977b;min-width:32px}.detail-contact>button,.detail-contact>a{margin-top:10px}.detail-contact small{display:block;margin-top:10px;color:#8d967f;font-size:10px}.property-details-slide h3{font-size:15px;margin-top:24px}.property-details-slide details{font-size:12px}.details-mode .hero-top{pointer-events:none}.details-mode .hero-top .media-type,.details-mode .hero-top .media-number{background:white;color:#87917d}.details-mode .hero-bottom{background:#fff;padding:8px 0;bottom:85px}.details-mode .media-dot{background:#d5dfce}.details-mode .media-dot.active{background:#6d8660}.my-listing{display:flex;gap:15px;border:1px solid var(--line);border-radius:14px;background:white;padding:15px;margin-top:15px}.my-listing>div{width:100px;flex-shrink:0}.my-listing img{width:100%;height:95px;object-fit:cover;border-radius:9px}.my-listing section{flex:1;min-width:0}.my-listing h3{font-size:14px;margin:4px 0}.my-listing p{font-size:11px;color:#89967e;margin:4px 0}.my-listing small{text-transform:capitalize;font-size:9px;color:#81946f}.listing-actions{display:flex;gap:13px;margin-top:12px}.listing-actions button{font-size:10px;color:var(--green);padding:0}.source-link{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--green);text-decoration:none}.source-link svg{width:13px;height:13px}
.favorite-card{position:relative}.favorite-image{width:100%;display:block;padding:0}.favorite-body h2{font-size:22px;letter-spacing:-.6px;margin:0 0 8px}.favorite-body>p{font-size:12px;color:#7b8873;line-height:1.6;margin:0 0 15px}
.load-older{align-self:center;padding:8px;margin:4px 0;flex-shrink:0}.details-mode .media-arrow.prev{top:16px;left:auto;right:68px;transform:none;height:30px;width:30px}

/* Russian labels and accessible custom file controls. */
.seller-workspace-head { flex-wrap:wrap; }
.seller-workspace-head .primary-button { white-space:normal; }
.file-control { position:relative; display:flex; flex-wrap:wrap; align-items:center; gap:9px; min-height:44px; border:1px solid var(--line); border-radius:10px; background:var(--white); padding:8px 11px; cursor:pointer; }
.file-control .localized-file-input { position:absolute; inset:0; width:100%; height:100%; margin:0; padding:0; opacity:0; cursor:pointer; }
.file-control:focus-within { outline:3px solid #b7776277; outline-offset:3px; }
.file-pick-button { color:var(--green); font-size:12px; font-weight:600; }
.file-selection-status { color:var(--muted); font-size:11px; overflow-wrap:anywhere; }

.seller-screen { max-width:860px; }
.seller-profile-tools > button { margin-top:12px; width:100%; }
.seller-screen .my-listings { margin-top:0; }
.seller-screen .my-listing { margin-top:0; }
.seller-screen .empty-state { padding:50px 20px; }
.seller-screen .empty-state [data-icon] svg { width:32px; height:32px; color:var(--green); }
.listing-actions { flex-wrap:wrap; }
.preview-back { display:flex; align-items:center; gap:5px; padding:9px 12px; font-size:11px; }
.preview-back svg { width:16px; height:16px; }
@media (max-width:600px) {
  .seller-screen .seller-workspace-head h1 { font-size:23px; }
  .seller-screen .seller-workspace-head p { max-width:none; }
  .seller-screen .my-listing { gap:12px; padding:12px; }
  .seller-screen .my-listing > div { width:76px; }
  .seller-screen .my-listing img { height:82px; }
  .seller-screen .listing-actions button { min-height:32px; }
}
