/* Mchils shared UI system — aligned with ONE Compound preferences */
:root{--ui-font:"Inter","Segoe UI",Arial,sans-serif;--ui-bg:#07111f;--ui-surface:#0d1b2a;--ui-surface-2:#11243a;--ui-text:#eef5ff;--ui-muted:#91a4bb;--ui-line:#203750;--ui-accent:#42e8bd;--ui-blue:#4ea4ff}
html{color-scheme:dark}html[data-ui-theme="light"]{color-scheme:light}
body,button,input,select,textarea{font-family:var(--ui-font)!important}
html[dir="rtl"] body,html[dir="rtl"] button,html[dir="rtl"] input,html[dir="rtl"] select,html[dir="rtl"] textarea{font-family:Tahoma,Arial,sans-serif!important}
html[data-ui-scale="small"]{--ui-text-scale:.92}html[data-ui-scale="normal"]{--ui-text-scale:1}html[data-ui-scale="large"]{--ui-text-scale:1.10}html[data-ui-scale="xl"]{--ui-text-scale:1.20}
body{font-size:calc(16px * var(--ui-text-scale,1))}
html[data-ui-scale="small"] :is(p,span,label,a,button,input,select,textarea,td,th,small){letter-spacing:-.005em}
html[data-ui-scale="large"] :is(p,span,label,a,button,input,select,textarea,td,th,small){font-size:calc(1em * 1.05)}
html[data-ui-scale="xl"] :is(p,span,label,a,button,input,select,textarea,td,th,small){font-size:calc(1em * 1.10)}
/* Shared dark canvas: eliminate stray light surfaces */
html[data-ui-theme="dark"] body{background:linear-gradient(180deg,#07111f 0,#091522 44%,#07111f 100%)!important;color:#eef5ff}
html[data-ui-theme="dark"] :is(.browse-hub,.property-tools,.public-hub,.metrics,.market-pulse-shell,.content){color:#eef5ff}
html[data-ui-theme="dark"] :is(.section-title h2,.property-tool-card,.browse-card,.project-public-card,.agent-public-card){color:#eef5ff!important}
html[data-ui-theme="dark"] :is(.section-title p,.property-tool-card small,.browse-card span,.project-public-card span,.agent-public-card span,.hub-empty){color:#91a4bb!important}
html[data-ui-theme="dark"] :is(.browse-card,.project-public-card,.agent-public-card,.hub-empty){background:#0d1b2a!important;border-color:#203750!important;box-shadow:none}
html[data-ui-theme="dark"] .property-tool-card>b{filter:saturate(.82) brightness(.82)}
html[data-ui-theme="dark"] :is(.property-tool-modal,.tool-modal-shell){background:#0a1827!important;color:#eef5ff!important}
html[data-ui-theme="dark"] :is(.tool-calc-grid input,.tool-calc-grid select,.guide-chips button){background:#091827!important;color:#eef5ff!important;border-color:#203750!important}
html[data-ui-theme="dark"] .tool-result{background:#0c2924!important;border-color:#1c5949!important}
html[data-ui-theme="dark"] .tool-result span{color:#a9b9c9!important}
html[data-ui-theme="dark"] .index-table :is(th,td){border-color:#203750!important}
html[data-ui-theme="dark"] .agent-avatar{background:#102238!important;border-color:#203750!important}
html[data-ui-theme="dark"] :is(.z-search,.filters){background:rgba(9,24,39,.96)!important;border-color:#203750!important}
html[data-ui-theme="dark"] .z-search-grid label{color:#9bacc0!important}
html[data-ui-theme="dark"] :is(.z-search-grid input,.z-search-grid select,.quick-search button,.market-country-select,.language-select){background:#091827!important;color:#eef5ff!important;border-color:#29445f!important}
html[data-ui-theme="dark"] :is(select option,.market-country-select option,.language-select option){background:#0b1b2b!important;color:#eef5ff!important}
html[data-ui-theme="dark"] .quick-search>span{color:#91a4bb!important}
html[data-ui-theme="dark"] .quick-search button:hover{border-color:#42e8bd!important;color:#42e8bd!important}
html[data-ui-theme="dark"] .cards .card{background:#0d1b2a!important;color:#eef5ff!important;border-color:#203750!important}
html[data-ui-theme="dark"] .cards .card :is(.price,.title){color:#eef5ff!important}
html[data-ui-theme="dark"] .cards .card :is(.location,.cardfoot){color:#91a4bb!important}
html[data-ui-theme="dark"] .cards .card .facts{color:#c3d1df!important}
html[data-ui-theme="dark"] .media{background:#13263a!important}
/* ONE-style light theme */
html[data-ui-theme="light"]{--bg:#f4f7fa;--panel:#fff;--panel2:#eef3f7;--text:#17212b;--muted:#687887;--line:#dbe3ea;--shadow:0 14px 42px rgba(18,38,58,.10)}
html[data-ui-theme="light"] body{background:#f4f7fa!important;color:#17212b!important}
html[data-ui-theme="light"] .topbar{background:rgba(255,255,255,.94)!important;border-color:#dbe3ea!important}
html[data-ui-theme="light"] .topbar :is(.brand strong,.navlink){color:#23313d}
html[data-ui-theme="light"] .navlink:hover,html[data-ui-theme="light"] .navlink.active{background:#edf4f7!important;color:#087c60!important}
html[data-ui-theme="light"] :is(.owner-panel-link,.filters,.metric,.card,.browse-card,.project-public-card,.agent-public-card,.hub-empty,.search-shell,.campaign-box,.proof,.workspace-card,.panel,.stat-card,.dashboard-card){background:#fff!important;color:#17212b!important;border-color:#dbe3ea!important}
html[data-ui-theme="light"] :is(input,select,textarea,.search-input,.view-toggle button,.purpose.active,.role-choice){background:#f7f9fb!important;color:#17212b!important;border-color:#dbe3ea!important}
html[data-ui-theme="light"] :is(select option,.market-country-select option,.language-select option){background:#fff!important;color:#17212b!important}
html[data-ui-theme="light"] :is(.section-title h2,.property-tool-card,.price,.title){color:#17212b!important}
html[data-ui-theme="light"] :is(.section-title p,.property-tool-card small,.location,.cardfoot,.role-choice span){color:#687887!important}
html[data-ui-theme="light"] dialog{background:#fff!important;color:#17212b!important;border-color:#dbe3ea!important}
/* Language/select polish */
.language-select,.market-country-select{min-height:38px;border-radius:10px!important;padding:0 32px 0 11px!important;font-weight:700!important;outline:none}.language-select:focus,.market-country-select:focus{box-shadow:0 0 0 3px rgba(66,232,189,.15);border-color:#42e8bd!important}
html[dir="rtl"] .language-select,html[dir="rtl"] .market-country-select{padding:0 11px 0 32px!important}
/* ONE-style preferences */
.ui-pref-trigger{position:fixed;right:18px;bottom:18px;z-index:9998;width:44px;height:44px;border-radius:14px;border:1px solid rgba(123,157,188,.28);background:#0b1b2b;color:#eaf4ff;box-shadow:0 12px 35px rgba(0,0,0,.28);font-weight:900}
.ui-pref-panel{position:fixed;right:18px;bottom:70px;z-index:9999;width:min(310px,calc(100vw - 28px));padding:14px;border-radius:16px;border:1px solid #203750;background:#0b1b2b;color:#eef5ff;box-shadow:0 24px 70px rgba(0,0,0,.42)}
.ui-pref-panel[hidden]{display:none}.ui-pref-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.ui-pref-head strong{font-size:13px}.ui-pref-close{border:0;background:transparent;color:#91a4bb;font-size:20px}.ui-pref-group{margin-top:10px}.ui-pref-group>span{display:block;font-size:9px;letter-spacing:.1em;text-transform:uppercase;color:#91a4bb;margin-bottom:6px}.ui-pref-options{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.ui-pref-options.fonts{grid-template-columns:repeat(4,1fr)}.ui-pref-options button{border:1px solid #203750;background:#102238;color:#dbe8f5;border-radius:9px;padding:9px 7px;font-size:10px;font-weight:800}.ui-pref-options button.active{border-color:#42e8bd;background:rgba(66,232,189,.11);color:#74f2d1}
html[data-ui-theme="light"] :is(.ui-pref-trigger,.ui-pref-panel){background:#fff;color:#17212b;border-color:#dbe3ea}.ui-pref-trigger:focus-visible,.ui-pref-options button:focus-visible{outline:3px solid rgba(78,164,255,.35);outline-offset:2px}
/* Mobile/PWA promotion and footer inspired by marketplace conventions */
.mp-app-banner{margin-top:36px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:linear-gradient(100deg,rgba(66,232,189,.10),rgba(78,164,255,.08));padding:28px max(18px,4.5vw);display:grid;grid-template-columns:1fr auto;gap:24px;align-items:center}.mp-app-banner h2{margin:0 0 6px;font-size:28px}.mp-app-banner p{margin:0;color:var(--muted);font-size:12px;max-width:620px}.mp-app-actions{display:flex;gap:10px;align-items:center}.mp-install-btn{border:0;border-radius:11px;background:var(--accent);color:#052018;padding:12px 16px;font-weight:900}.mp-install-btn[hidden]{display:none}.mp-qr{width:82px;height:82px;background:#fff;padding:5px;border-radius:9px}.mp-footer{background:#050c14;color:#dce8f4;padding:38px max(18px,4.5vw) 28px}.mp-footer-grid{display:grid;grid-template-columns:1.2fr repeat(3,1fr);gap:28px;max-width:1320px;margin:auto}.mp-footer h3{font-size:13px;margin:0 0 12px}.mp-footer p,.mp-footer a{display:block;color:#91a4bb;text-decoration:none;font-size:10px;line-height:1.9}.mp-footer a:hover{color:#42e8bd}.mp-footer-brand{font-size:17px!important;color:#eef5ff!important;font-weight:900}.mp-footer-bottom{max-width:1320px;margin:28px auto 0;padding-top:16px;border-top:1px solid rgba(255,255,255,.08);font-size:9px;color:#6f8295}
@media(max-width:760px){.ui-pref-trigger{right:12px;bottom:12px}.ui-pref-panel{right:12px;bottom:64px}.mp-app-banner{grid-template-columns:1fr}.mp-app-actions{justify-content:flex-start}.mp-footer-grid{grid-template-columns:1fr 1fr}.mp-app-banner h2{font-size:22px}}@media(max-width:460px){.mp-footer-grid{grid-template-columns:1fr}.mp-qr{display:none}}
