/* Illustrated navigation, quiet labels and a single locale preference control. */
.topbar {
  display:grid; grid-template-columns:auto minmax(0,1fr) auto auto;
  align-items:center; column-gap:18px; row-gap:0; min-height:88px;
  padding:8px var(--page-gutter); overflow:visible;
}
.topbar > .brand { grid-column:1; grid-row:1; }
.topbar .brand-caption { display:none; }
.topbar > .main-nav { grid-column:2; grid-row:1; display:flex; flex-wrap:nowrap; justify-content:center; gap:8px; min-width:0; margin:0; }
.topbar > .account { grid-column:3; grid-row:1; margin:0; gap:8px; }
.topbar .account .header-post-button { font-size:12px; font-weight:500; padding-inline:12px; }
.topbar .account-name { max-width:110px; font-size:12px; font-weight:500; background:transparent; }
.topbar > .header-preferences { grid-column:4; grid-row:1; justify-self:end; }
.topbar .mobile-top-controls { display:none !important; }
.topbar .main-nav > .nav-dropdown { min-width:0; }
.topbar .main-nav > .nav-dropdown > summary {
  display:flex; align-items:center; justify-content:center; gap:5px;
  height:70px; min-height:70px; padding:4px 2px; border-radius:0;
  border-bottom:2px solid transparent; background:transparent;
  font-size:12px; line-height:18px; font-weight:450; color:var(--muted);
}
.topbar .main-nav > .nav-dropdown > summary::before,
.topbar .main-nav > .nav-dropdown > summary::after { display:none; }
.topbar .main-nav .nav-illustration { display:block; width:44px; height:44px; flex:0 0 44px; object-fit:contain; transition:transform 180ms ease; }
.topbar .main-nav > .nav-dropdown > summary:hover,
.topbar .main-nav > .nav-dropdown[open] > summary { background:transparent; color:var(--ink); border-bottom-color:var(--accent); }
@media(hover:hover) { .topbar .main-nav > .nav-dropdown > summary:hover .nav-illustration { transform:translateY(-2px) scale(1.04); } }
.topbar .main-nav .nav-menu { border-radius:16px; padding:12px; box-shadow:0 8px 28px #18263814; }
.topbar .main-nav .nav-menu button { font-size:13px; font-weight:450; }
.header-preferences {
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  min-height:42px; padding:9px 12px; border:1px solid transparent; border-radius:999px;
  color:var(--ink); background:var(--soft); font-size:12px; line-height:20px; font-weight:550;
  white-space:nowrap; box-shadow:none;
}
.header-preferences:hover { background:#edf1f8; border-color:var(--line); }
.header-preferences > svg { flex:0 0 18px; width:18px; height:18px; }
/* Keep the semantic heading, without the removed promotional text block. */
body[data-view=home] .market-hero.market-hero-silent { min-height:0; height:0; padding:0; margin:0; }
body[data-view=home]:not(.map-fullscreen-active):not(.mobile-filters-open) .search-band { padding-top:22px; }

.preferences-dialog {
  width:min(620px,calc(100vw - 32px)); max-width:none; max-height:calc(100dvh - 40px);
  margin:auto; padding:0; border:1px solid var(--line); border-radius:22px;
  background:#fff; color:var(--ink); box-shadow:0 24px 80px #18263835; overflow:hidden;
}
.preferences-dialog::backdrop { background:rgb(24 38 56 / 35%); backdrop-filter:blur(3px); }
html.preferences-modal-open { overflow:hidden; overscroll-behavior:none; }
.preferences-dialog[open] { display:flex; flex-direction:column; }
.preferences-dialog-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 24px; border-bottom:1px solid var(--line); flex:none; }
.preferences-dialog-header h2 { font-size:19px; line-height:26px; font-weight:600; letter-spacing:-.35px; margin:0; }
.preferences-dialog-header button { display:grid; place-items:center; width:40px; height:40px; min-height:40px; padding:0; border:0; border-radius:50%; background:var(--soft); color:var(--ink); font-size:26px; font-weight:400; }
.preferences-dialog-body { padding:24px; min-height:0; overflow:auto; overscroll-behavior:contain; }
.preferences-dialog fieldset { padding:0; margin:0 0 24px; border:0; min-width:0; }
.preferences-dialog fieldset:last-of-type { margin-bottom:0; }
.preferences-dialog legend { font-size:14px; line-height:20px; font-weight:550; padding:0; margin:0 0 12px; }
.preference-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.preference-option { position:relative; display:block; margin:0; cursor:pointer; min-width:0; }
.preference-option > input { position:absolute; width:1px; height:1px; padding:0; border:0; margin:-1px; clip-path:inset(50%); overflow:hidden; }
.preference-option > span { display:flex; flex-direction:column; justify-content:center; gap:4px; min-height:76px; padding:14px; border:1px solid var(--line); border-radius:12px; background:white; }
.preference-option strong { font-size:14px; line-height:20px; font-weight:500; padding-right:16px; }
.preference-option small { font-size:12px; line-height:17px; color:var(--muted); font-weight:400; }
.preference-option:hover > span { background:var(--soft); border-color:#aab8cc; }
.preference-option > input:checked + span { background:var(--accent-soft); border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.preference-option > input:checked + span::after { content:'✓'; position:absolute; right:12px; top:12px; color:var(--accent); font-size:15px; }
.preference-option:focus-within > span { outline:2px solid var(--accent); outline-offset:3px; }
.preferences-note { margin:20px 0 0; color:var(--muted); font-size:12px; line-height:1.5; }
.preferences-status { margin:10px 0 0; color:#b42335; font-size:13px; line-height:1.4; }
.preferences-status:empty { display:none; }
.preferences-dialog-footer { display:flex; justify-content:flex-end; padding:16px 24px; border-top:1px solid var(--line); background:#fff; flex:none; }
.preferences-dialog-footer > button { min-width:120px; min-height:44px; padding:10px 24px; border-radius:999px; font-size:14px; font-weight:550; }
@media(min-width:761px) and (max-width:1259px) {
  .topbar { grid-template-columns:minmax(0,1fr) auto auto; row-gap:0; padding-top:10px; padding-bottom:0; }
  .topbar > .account { grid-column:2; }
  .topbar > .header-preferences { grid-column:3; }
  .topbar > .main-nav { grid-column:1/-1; grid-row:2; width:100%; gap:22px; }
  .topbar .main-nav > .nav-dropdown > summary { height:62px; min-height:62px; }
}
@media(max-width:760px) {
  .topbar { grid-template-columns:minmax(0,1fr) auto; grid-template-rows:44px auto; min-height:66px; padding:10px 16px 6px; column-gap:8px; row-gap:4px; }
  .topbar > .brand { grid-column:1; grid-row:1; }
  .topbar > .header-preferences { grid-column:2; grid-row:1; min-height:44px; padding:10px; font-size:11px; gap:6px; }
  .topbar > .account { display:none; }
  .topbar > .main-nav { display:grid; grid-column:1/-1; grid-row:2; grid-template-columns:.9fr .8fr 1.4fr .8fr 1.2fr; align-items:stretch; gap:2px; width:100%; }
  html[lang=uz] .topbar > .main-nav { grid-template-columns:1fr 1.2fr 1.4fr .9fr 1.1fr; }
  .topbar .main-nav > .nav-dropdown > summary { flex-direction:column; height:57px; min-height:57px; padding:2px 0 4px; gap:2px; font-size:10px; line-height:15px; font-weight:450; }
  .topbar .main-nav .nav-illustration { width:32px; height:32px; flex:0 0 32px; }
  .topbar .main-nav .nav-menu { position:fixed; inset:122px 12px auto !important; width:calc(100vw - 24px); min-width:0; max-height:calc(100dvh - 220px); overflow:auto; transform:none !important; }
  .topbar .main-nav .mega-menu { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body:not([data-view=home]) .topbar { grid-template-rows:44px; padding-bottom:10px; row-gap:0; }
  body:not([data-view=home]) .topbar > .main-nav { display:none; }
  body.map-fullscreen-active .topbar { display:none; }
  body[data-view=home]:not(.map-fullscreen-active):not(.mobile-filters-open) .search-band { padding-top:14px; }
  .preferences-dialog { width:calc(100vw - 28px); max-height:calc(100dvh - 28px); border-radius:20px; }
  .preferences-dialog-header { padding:14px 16px; }
  .preferences-dialog-header h2 { font-size:18px; }
  .preferences-dialog-body { padding:20px 16px; }
  .preference-options { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .preference-option > span { padding:12px; min-height:76px; }
  .preference-option strong { font-size:13px; }
  .preferences-dialog-footer { padding:14px 16px; }
  .preferences-dialog-footer > button { width:100%; }
}
@media(min-width:761px) and (max-width:1099px) and (max-height:500px) {
  body[data-view=home]:not(.map-fullscreen-active):not(.mobile-filters-open) .search-composer #searchForm.search-controls {
    grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.3fr) 80px 86px;
  }
}
@media(prefers-reduced-motion:reduce) { .topbar .main-nav .nav-illustration { transition:none; } }
