/* mbirj.com public site — phone first; desktop layout from 960 px */
:root {
  --brand: #0a3aa8; --brand-2: #1556e0; --brand-ink: #fff; --brand-soft: #e9f0ff;
  --red: #e5322d; --gold: #f5b81c;
  --bg: #f2f5fb; --surface: #fff; --surface-2: #f7f9fd; --border: #e2e8f3;
  --text: #0f1b3d; --muted: #5d6b8a; --ok: #0d8a4f; --ok-soft: #e1f7ec; --warn: #a95c00; --warn-soft: #fff3dc; --bad: #c42b1c; --bad-soft: #fde8e6;
  --r: 14px; --shadow: 0 1px 2px rgba(15, 27, 61, .06), 0 4px 14px rgba(15, 27, 61, .06);
  --font: system-ui, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #3b74f0; --brand-2: #5b8cf5; --brand-soft: #16264a; --bg: #0b1020; --surface: #141a2c; --surface-2: #1a2136; --border: #263052;
    --text: #eef2fb; --muted: #97a3c0; --ok-soft: #0c3324; --warn-soft: #3d2a08; --bad-soft: #43150f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #3b74f0; --brand-2: #5b8cf5; --brand-soft: #16264a; --bg: #0b1020; --surface: #141a2c; --surface-2: #1a2136; --border: #263052;
  --text: #eef2fb; --muted: #97a3c0; --ok-soft: #0c3324; --warn-soft: #3d2a08; --bad-soft: #43150f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
a { color: var(--brand-2); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 19px; } h3 { font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.stack { display: grid; gap: 14px; }
[hidden] { display: none !important; }

.staging-bar { background: repeating-linear-gradient(45deg, #ffcf33, #ffcf33 12px, #ffe17a 12px, #ffe17a 24px); color: #3a2a00; text-align: center; font: 700 12px/1 var(--font); padding: 6px 8px; letter-spacing: .03em; }

/* ---------- header ---------- */
.w-top { display: none; background: var(--brand); color: #dce6ff; font-size: 13px; }
.w-top .wrap { display: flex; justify-content: space-between; align-items: center; height: 34px; gap: 16px; }
.w-top a { color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.w-top-r { display: flex; gap: 16px; align-items: center; }
.w-head { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.w-head .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.w-brand { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.w-logo { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #2f6dff, var(--brand)); color: #fff; display: grid; place-items: center; font: 800 14px/1 var(--font); flex: none; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .25); }
.w-brand-t { display: grid; line-height: 1.15; min-width: 0; }
.w-brand-t b { font-size: 17px; color: var(--brand); white-space: nowrap; }
.w-brand-t i { font-style: normal; background: var(--red); color: #fff; font-size: 11px; padding: 1px 5px; border-radius: 4px; vertical-align: 2px; }
.w-brand-t small { font-size: 12px; color: var(--muted); }
.w-aimag { position: relative; margin-left: auto; }
.w-aimag summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; padding: 7px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.w-aimag summary::-webkit-details-marker { display: none; }
.w-aimag-list { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 200px; max-height: 60vh; overflow: auto; z-index: 40; display: grid; }
.w-aimag-list a { padding: 8px 12px; border-radius: 8px; color: var(--text); }
.w-aimag-list a:hover, .w-aimag-list a[aria-current] { background: var(--brand-soft); color: var(--brand); }
.w-head .w-nav, .w-head .w-head-add { display: none; }

/* ---------- buttons, forms ---------- */
.w-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 14px/1 var(--font); cursor: pointer; white-space: nowrap; }
.w-btn:hover { border-color: var(--brand-2); }
.w-btn-primary { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.w-btn-primary:hover { background: var(--brand); }
.w-btn-call { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.w-btn-danger { color: var(--bad); }
.w-btn-sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.w-btn-lg { height: 48px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.w-btn[disabled] { opacity: .55; cursor: default; }
.w-field { display: grid; gap: 6px; }
.w-field > label, .w-label { font-weight: 600; font-size: 14px; }
.w-hint { font-size: 12.5px; color: var(--muted); }
input[type=text], input[type=search], input[type=tel], input[type=number], input[type=url], input[type=email], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 16px/1.4 var(--font);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand-2) 40%, transparent); border-color: var(--brand-2); }
.w-grid2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.w-check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.w-check input { width: 18px; height: 18px; }
.w-alert { padding: 12px 14px; border-radius: 10px; background: var(--brand-soft); color: var(--text); }
.w-alert.ok { background: var(--ok-soft); } .w-alert.warn { background: var(--warn-soft); } .w-alert.bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- blocks ---------- */
.w-main { padding-top: 14px; padding-bottom: 28px; display: grid; gap: 18px; }
.w-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); }
.w-card-b { padding: 16px; }
.w-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.w-sec-h h2 { display: flex; align-items: center; gap: 8px; color: var(--brand); }
.w-sec-h a { font-weight: 600; font-size: 14px; display: inline-flex; gap: 4px; align-items: center; }
.w-empty { padding: 28px 16px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--r); }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* hero */
.w-hero { position: relative; border-radius: 18px; overflow: hidden; color: #fff; padding: 22px 16px 18px;
  background: var(--brand); }
.w-hero h1 { font-size: 21px; font-weight: 800; margin-bottom: 12px; text-wrap: balance; }
.w-hero p { margin: 6px 0 14px; color: #dbe6ff; }
.w-lunar { display: inline-block; margin: -4px 0 14px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: 13.5px; color: #fff; }
.w-lunar.good b { color: #ffd666; }
.w-lunar.bad b { color: #ffc2b8; }
.w-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.w-hero > * { position: relative; z-index: 1; }
.w-search { display: grid; gap: 8px; background: var(--surface); border-radius: 14px; padding: 8px; box-shadow: 0 8px 30px rgba(5, 20, 70, .25); }
.w-search-q { display: flex; align-items: center; gap: 8px; padding: 0 6px; color: var(--muted); }
.w-search-q input { border: 0; min-height: 44px; padding: 0; outline: none !important; }
.w-search-f { display: none; }
.w-search .w-btn-primary { height: 44px; }
.w-search { grid-template-columns: minmax(0, 1fr) auto; }
.w-search.w-search-in { box-shadow: none; border: 1px solid var(--border); grid-template-columns: minmax(0, 1fr) auto; border-radius: 12px; padding: 6px 6px 6px 10px; }
.w-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; -webkit-overflow-scrolling: touch; }
.w-chips::-webkit-scrollbar { display: none; }
.w-chips a, .w-chips span.lbl { flex: none; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 500; }
.w-chips a[aria-current] { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.w-chips-sub a { font-size: 13px; padding: 5px 11px; }
.w-chips-sub a span { color: var(--muted); font-weight: 400; margin-left: 2px; }
.w-chips-sub a[aria-current] { background: var(--surface-2, #eef2f7); color: var(--text); border-color: var(--brand-2); }
.w-chips-sub a[aria-current] span { color: var(--text); }
.crumbs b { color: var(--text); font-weight: 600; }
.cat-steps { display: grid; gap: 8px; }
.w-hero .w-chips { margin-top: 12px; }
.w-hero .w-chips a { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); color: #fff; }
.w-hero .w-chips a .n { opacity: .75; font-weight: 400; margin-left: 5px; }
.w-chips a { min-height: 40px; display: inline-flex; align-items: center; }

.w-cols { display: grid; gap: 18px; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-tile { display: grid; justify-items: center; gap: 4px; padding: 12px 6px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-align: center; }
.cat-tile .ic { width: 30px; height: 30px; color: var(--brand-2); }
.cat-tile b { font-size: 13px; font-weight: 600; line-height: 1.2; }
.cat-tile span { font-size: 12px; color: var(--muted); }
.cat-tile:hover { border-color: var(--brand-2); }

/* listing cards */
.l-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.l-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.l-card-link { color: inherit; display: flex; flex-direction: column; height: 100%; }
.l-card-img { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
.l-card-img img { width: 100%; height: 100%; object-fit: cover; }
.l-card-ph { position: absolute; inset: 0; display: grid; place-items: center; color: color-mix(in srgb, var(--brand-2) 55%, var(--surface)); background: linear-gradient(135deg, var(--brand-soft), var(--surface-2)); }
.no-photo .l-card-img { aspect-ratio: auto; height: 34px; }
.no-photo .l-card-ph { display: none; }
.l-badge { position: absolute; left: 8px; top: 8px; background: var(--red); color: #fff; font: 700 11px/1 var(--font); padding: 4px 7px; border-radius: 6px; display: inline-flex; gap: 4px; align-items: center; }
.l-badge-tv { left: auto; right: 8px; background: rgba(10, 40, 120, .85); }
.no-photo .l-badge-tv { right: auto; left: 8px; }
.no-photo .l-badge:not(.l-badge-tv) { left: 56px; }
.l-card-b { padding: 9px 10px 11px; display: grid; gap: 3px; flex: 1; align-content: start; }
.l-card-b h3 { font-size: 14px; font-weight: 650; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.l-card-text { margin: 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.l-card-loc { font-size: 12px; color: var(--muted); display: flex; gap: 4px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-card-price { color: var(--brand-2); font-weight: 800; font-size: 16px; }
.l-card-at { font-size: 12px; color: var(--muted); }
.is-top { border-color: color-mix(in srgb, var(--gold) 60%, var(--border)); }
.l-fav { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #3b4a6b; display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.l-fav.on { color: var(--red); }
.l-fav.on .ic { fill: currentColor; }
.no-photo .l-fav { top: 4px; right: 4px; box-shadow: none; background: transparent; }

/* CTA */
.w-cta { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #0a3aa8, #1d64f2); }
.w-cta .ic-big { width: 46px; height: 46px; flex: none; color: var(--gold); }
.w-cta h2 { color: #fff; font-size: 19px; }
.w-cta p { margin: 2px 0 0; color: #dbe6ff; font-size: 13px; }
.w-cta .w-btn { margin-left: auto; background: #fff; color: var(--brand); border: 0; }

/* posts */
.p-card { display: grid; gap: 8px; color: inherit; }
.p-card-img { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.p-card-img img { width: 100%; height: 100%; object-fit: cover; }
.p-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .5)); }
.p-dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .7); color: #fff; font: 600 12px/1 var(--font); padding: 4px 6px; border-radius: 6px; }
.p-card-b h3 { font-size: 15px; font-weight: 650; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.p-card-b p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.p-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); margin-top: 4px; align-items: center; }
.p-meta span { display: inline-flex; gap: 4px; align-items: center; }
.p-card-big .p-card-img { aspect-ratio: 16 / 9; }
.p-card-big .p-card-b h3 { font-size: 19px; }
.p-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.p-feature { position: relative; border-radius: 14px; overflow: hidden; color: #fff; display: block; aspect-ratio: 16 / 9; background: #0b1b4a; }
.p-feature img { width: 100%; height: 100%; object-fit: cover; }
.p-feature::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0, 10, 40, .85)); }
.p-feature .p-feature-t { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; }
.p-feature h3 { font-size: 18px; font-weight: 750; }
.p-feature .p-meta { color: #d8e2ff; }
.w-tabs { display: flex; gap: 6px; }
.w-tabs a { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); }
.w-tabs a[aria-current] { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }

/* detail pages */
.d-grid { display: grid; gap: 16px; }
.gallery { display: grid; gap: 8px; }
.gallery-main { border-radius: 14px; overflow: hidden; background: #0b1020; aspect-ratio: 4 / 3; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 6px; overflow-x: auto; }
.gallery-thumbs button { flex: none; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; }
.gallery-thumbs button[aria-current] { border-color: var(--brand-2); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.d-price { font-size: 26px; font-weight: 800; color: var(--brand-2); }
.d-attrs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px; background: var(--border); border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.d-attrs div { background: var(--surface); padding: 9px 12px; }
.d-attrs dt { font-size: 12px; color: var(--muted); }
.d-attrs dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.d-text { white-space: pre-wrap; word-break: break-word; font-size: 16px; margin: 0; }
.d-text a.tel { font-weight: 700; }
.d-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.d-sticky { position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); z-index: 25; padding: 8px 12px; background: var(--surface); border-top: 1px solid var(--border); display: flex; gap: 8px; }
.d-sticky .w-btn { flex: 1; height: 46px; }
.body-sticky { padding-bottom: calc(132px + env(safe-area-inset-bottom)); }
.prose { font-size: 16px; line-height: 1.65; }
.prose h2 { margin: 1.2em 0 .5em; font-size: 19px; }
.prose p { margin: 0 0 1em; }
.prose img { border-radius: 10px; }
.video-box { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.video-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* search page */
.s-layout { display: grid; gap: 14px; }
.s-filter { display: none; }
.s-filter.open { display: block; }
.s-filter form { display: grid; gap: 12px; }
.s-bar { display: flex; gap: 8px; align-items: center; }
.s-bar form { flex: 1; display: flex; gap: 8px; }
.s-count { font-size: 14px; color: var(--muted); }

/* directory */
.o-list { display: grid; gap: 10px; }
.o-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.o-card-main { color: inherit; display: grid; gap: 3px; }
.o-card h3 { font-size: 16px; display: flex; align-items: center; gap: 6px; }
.o-ok { color: #fff; background: var(--brand-2); border-radius: 50%; width: 20px; height: 20px; display: inline-grid; place-items: center; vertical-align: middle; flex: none; }
.o-ok .ic { width: 13px; height: 13px; vertical-align: 0; }
.o-cat { font-size: 13px; color: var(--brand-2); font-weight: 600; }
.o-line { font-size: 13.5px; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.o-line .ic { margin-top: 3px; }
.o-phones { display: flex; gap: 8px; flex-wrap: wrap; }
.o-phones .w-btn { height: 38px; }
.dir-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.dir-cat { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 14px; line-height: 1.25; }
.dir-cat .ic { width: 26px; height: 26px; color: var(--brand-2); }
.dir-cat span { font-weight: 400; color: var(--muted); font-size: 12px; display: block; }
.dir-hero { background: var(--brand); }
.dir-card h2 { display: flex; gap: 8px; align-items: center; }
.dir-card p { margin: 0; color: var(--muted); font-size: 14px; }
.d-calls { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* account */
.acct-tabs { display: flex; gap: 6px; overflow-x: auto; }
.my-row { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px; border-bottom: 1px solid var(--border); align-items: start; }
.my-row:last-child { border-bottom: 0; }
.my-row img, .my-row .ph { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.my-row .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.tv { background: var(--brand-soft); color: var(--brand-2); } .badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.bad { background: var(--bad-soft); color: var(--bad); }

/* posting form */
.photo-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-pick .th { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.photo-pick .th img { width: 100%; height: 100%; object-fit: cover; }
.photo-pick .th button { position: absolute; right: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; font-size: 14px; line-height: 1; }
.photo-add { width: 84px; height: 84px; border-radius: 10px; border: 2px dashed var(--border); display: grid; place-items: center; color: var(--muted); cursor: pointer; text-align: center; font-size: 12px; }
.ai-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ai-note { font-size: 13px; color: var(--brand-2); }
.otp-code { font: 700 28px/1 ui-monospace, monospace; letter-spacing: .3em; text-align: center; }

/* programme */
.prog { display: grid; }
.prog div { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.prog b { font-variant-numeric: tabular-nums; color: var(--brand-2); }
.prog .now { background: var(--brand-soft); border-radius: 8px; padding-left: 8px; }

/* pager, footer, tab bar */
.w-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.w-foot { background: #0a2a7a; color: #cfdaff; padding: 26px 0 30px; margin-top: 10px; }
.w-foot .wrap { display: grid; gap: 18px; }
.w-foot a, .w-foot span { color: #e7eeff; display: inline-flex; gap: 8px; align-items: center; font-size: 14px; }
.w-foot .w-brand-t { display: grid; }
.w-foot .w-brand-t b { color: #fff; } .w-foot .w-brand-t small { color: #9fb3ea; }
.w-foot-col { display: grid; gap: 8px; align-content: start; }
.w-foot-small span { color: #9fb3ea; font-size: 13px; }
.w-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.w-tabbar a { display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 600; padding: 4px 0; }
.w-tabbar a .ic { width: 23px; height: 23px; }
.w-tabbar a[aria-current] { color: var(--brand-2); }
.w-tabbar .w-tab-add { justify-self: center; width: 52px; height: 52px; border-radius: 50%; background: var(--brand-2); color: #fff; display: grid; place-items: center; margin-top: -22px; box-shadow: 0 6px 16px rgba(21, 86, 224, .45); padding: 0; }
.w-tabbar .w-tab-add .ic { width: 26px; height: 26px; }

@media (min-width: 560px) {
  .l-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(6, 1fr); }
  .dir-cats { grid-template-columns: repeat(3, 1fr); }
  .p-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .body-sticky { padding-bottom: 0; }
  .w-top { display: block; }
  .w-tabbar, .d-sticky { display: none; }
  .w-head .wrap { height: 72px; gap: 22px; }
  .w-logo { width: 48px; height: 48px; font-size: 16px; }
  .w-brand-t b { font-size: 21px; }
  .w-aimag { margin-left: 0; }
  .w-head .w-nav { display: flex; gap: 2px; margin-left: auto; }
  .w-nav a { color: var(--text); font-weight: 600; font-size: 15px; padding: 24px 10px 21px; border-bottom: 3px solid transparent; }
  .w-nav a[aria-current] { color: var(--brand-2); border-bottom-color: var(--brand-2); }
  .w-nav a:hover { color: var(--brand-2); }
  .w-head .w-head-add { display: inline-flex; }
  .w-main { padding-top: 20px; gap: 22px; }
  h1 { font-size: 26px; }
  .w-hero { padding: 34px 32px 26px; border-radius: 20px; }
  .w-hero h1 { font-size: 36px; }
  .w-search { grid-template-columns: 1fr auto auto auto auto; align-items: center; padding: 8px 8px 8px 14px; border-radius: 999px; }
  .w-search-f { display: block; }
  .w-search-f select { border: 0; border-left: 1px solid var(--border); border-radius: 0; min-height: 34px; padding: 0 28px 0 14px; font-size: 14px; background-color: transparent; }
  .w-search .w-btn-primary { border-radius: 999px; padding: 0 28px; }
  .w-cols { grid-template-columns: 1fr 1fr; align-items: start; }
  .w-cols > .w-card { padding: 20px; }
  .l-grid.l-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .d-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
  .s-layout { grid-template-columns: 270px 1fr; align-items: start; }
  .s-filter { display: block; position: sticky; top: 90px; }
  .s-filter-btn { display: none; }
  .w-foot .wrap { grid-template-columns: 1.2fr 1fr 1fr 1fr; }
  .dir-cats { grid-template-columns: repeat(4, 1fr); }
  .o-card { grid-template-columns: 1fr auto; align-items: center; }
}
@media (min-width: 1200px) {
  .l-grid.l-grid-4 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* directory live suggestions */
.dir-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); z-index: 20; display: grid; overflow: hidden; }
.dir-suggest a { display: grid; padding: 9px 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.dir-suggest a:last-child { border-bottom: 0; }
.dir-suggest a:hover { background: var(--brand-soft); }
.dir-suggest span { font-size: 12.5px; color: var(--muted); }
.l-fav-btn.on { color: var(--red); border-color: var(--red); }
.l-fav-btn.on .ic { fill: currentColor; }

@media (max-width: 559px) {
  .w-brand-t b { font-size: 15px; }
  .w-cta { flex-wrap: wrap; }
  .w-cta .w-btn { margin-left: 0; width: 100%; }
  .w-aimag summary { padding: 6px 9px; }
}
@media (max-width: 370px) { .w-brand-t small { display: none; } }

/* Members cannot log in yet (no SMS gateway): saving ads needs login, so the heart hides. */
body[data-login="0"] .l-fav { display: none; }

/* Directory: map of the organisation (OpenStreetMap embed, no script) */
.d-map { display: grid; gap: 6px; }
.d-map iframe { width: 100%; height: 260px; border: 1px solid var(--line, #dfe5f0); border-radius: 12px; background: #eef2f8; }
.d-map-links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }

/* keyboard focus and reduced motion (mbirj-design checklist) */
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.w-hero :focus-visible, .w-foot :focus-visible, .dir-hero :focus-visible { outline-color: #fff; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
