/* /market shell: header, bottom tab bar, footer. Uses var(--ay-*) tokens only.
   Part of r6/market-ux-upgrade. */

/* Mobile touch areas: retain icon size, expand the interactive box. */
@media (max-width: 600px) {
  body.pt .pt-top-actions .pt-top-btn,
  body.pt .pt-top-actions .pt-top-search,
  body.pt .pt-top-actions .ay-theme-switch {
    min-width: 44px !important;
    min-height: 44px !important;
    width: 44px !important;
    height: 44px !important;
  }
}
body.pt .pt-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px !important;
  box-sizing: border-box;
  padding-block: 10px;
}


html {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}
body.pt {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
  position: relative !important;
  margin: 0 !important;
}
@supports (overflow: clip) {
  html, body.pt {
    overflow-x: clip !important;
  }
}
main.pt-main,
.pt-main {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

body.pt { --msh-tabh: 64px; }
:root   { --tabh: 64px; }

/* ── header ─────────────────────────────────────────── */
.pt-top {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  min-height: 60px;
  background: var(--ay-surface);
  border-bottom: 1px solid var(--ay-border);
  box-shadow: var(--ay-shadow-sm);
  gap: 12px;
  transition: background var(--ay-tr-fast), border-color var(--ay-tr-fast);
}

body[data-page="home"] .pt-top-search {
  display: none !important;
}

@supports (backdrop-filter: blur(12px)) {
  .pt-top {
    background: color-mix(in srgb, var(--ay-surface) 90%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

.pt-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ay-text);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  text-decoration: none;
  min-width: 0;
}
.pt-brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--ay-r-sm);
  flex-shrink: 0;
  box-shadow: var(--ay-shadow-sm);
}
.pt-brand-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pt-brand-info b {
  color: var(--ay-text);
  font-size: 14.5px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.dark .pt-brand-info b {
  color: var(--ay-text);
}
.pt-brand-sub {
  font-size: 11px;
  color: var(--ay-text-muted);
  font-weight: 500;
  line-height: 1.2;
}

.pt-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pt-top-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--ay-border);
  border-radius: var(--ay-r-pill);
  padding: 0 14px;
  min-height: 38px;
  color: var(--ay-text-muted);
  background: var(--ay-surface-2);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color var(--ay-tr-fast), background var(--ay-tr-fast), color var(--ay-tr-fast);
}
.pt-top-search:hover {
  border-color: var(--ay-accent);
  color: var(--ay-text);
  background: var(--ay-surface);
}

.pt-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid var(--ay-border);
  border-radius: var(--ay-r-pill);
  padding: 0 12px;
  min-height: 38px;
  color: var(--ay-text);
  background: var(--ay-surface-2);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--ay-tr-fast);
}
.pt-top-btn:hover {
  border-color: var(--ay-accent);
  color: var(--ay-accent);
  background: var(--ay-surface);
  transform: translateY(-1px);
}
.pt-top-btn.pt-top-login {
  background: var(--ay-accent-soft);
  border-color: var(--ay-accent-line);
  color: var(--ay-accent);
}
.pt-top-btn.pt-top-login:hover {
  background: var(--ay-accent-fill);
  color: var(--ay-on-accent);
  border-color: var(--ay-accent-fill-hi);
  box-shadow: var(--ay-shadow-sm);
}
@media (max-width: 640px) {
  .pt-top {
    padding: 0 12px !important;
    gap: 8px !important;
    min-height: 54px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
  }
  .pt-brand {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
    gap: 8px !important;
  }
  .pt-brand img {
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
  }
  .pt-brand-info {
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .pt-brand-info b {
    font-size: 13px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .pt-brand-sub { display: none !important; }
  .pt-top-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }
  .pt-top-btn span,
  .pt-top-search span { display: none !important; }
  .pt-top-btn,
  .pt-top-search {
    padding: 0 !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
  }
  .pt-top-post { display: none !important; }
  .pt-top .ay-theme-switch {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 50% !important;
  }
}

/* ── bottom tabs ─────────────────────────────────────── */
.pt-tabs {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
  z-index: 40 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  background: var(--ay-surface);
  border-top: 1px solid var(--ay-border);
  padding-bottom: env(safe-area-inset-bottom);
  min-height: var(--tabh, 60px);
  box-shadow: 0 -2px 14px rgba(16, 29, 53, 0.07);
  transition: background var(--ay-tr-fast), border-color var(--ay-tr-fast);
  margin: 0 !important;
}

@media (min-width: 768px) {
  .pt-tabs {
    max-width: 560px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    border-inline: 1px solid var(--ay-border) !important;
    border-radius: 16px 16px 0 0 !important;
  }
}

.pt-tabs a {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: var(--tabh, 60px) !important;
  padding: 6px 1px 4px !important;
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.pt-tabs a span {
  font-size: 12px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}

.pt-tabs a:active {
  transform: scale(0.95);
}

.pt-tabs a[aria-current=page] {
  color: var(--ay-accent);
  font-weight: 700;
}

.pt-ti {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
}

.pt-ti svg {
  display: block;
  transition: transform var(--ay-tr-fast);
}

.pt-tabs a[aria-current=page] .pt-ti svg {
  transform: scale(1.1);
  stroke-width: 2.2;
}

/* center plus button */
.pt-tab-plus .pt-ti {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ay-accent-fill);
  color: var(--ay-on-accent);
  margin-top: -12px;
  box-shadow: 0 4px 14px rgba(198, 165, 99, 0.40);
  transition: transform var(--ay-tr-fast), box-shadow var(--ay-tr-fast);
}
.pt-tab-plus:hover .pt-ti,
.pt-tab-plus:active .pt-ti {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 6px 20px rgba(198, 165, 99, 0.55);
}
.pt-tab-plus .pt-ti svg {
  stroke: var(--ay-on-accent);
}

.pt-dot {
  position: absolute;
  top: -2px;
  inset-inline-end: -6px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: var(--ay-bad);
  color: #fff;
  font: 700 10px/16px sans-serif;
  text-align: center;
  padding: 0 3px;
  box-shadow: 0 0 0 2px var(--ay-surface);
}

/* Modal sheets take priority over the persistent mobile navigation.
   Keep the tabbar available whenever no sheet is open. */
body.pt:has(.pt-sheet:not([hidden])) #pt-tabs {
  visibility: hidden !important;
  pointer-events: none !important;
}

body.pt.pt-kb #pt-tabs { display: none !important; }
body.pt-kb { padding-bottom: 0; }
.pt-toast {
  bottom: calc(var(--tabh) + 16px + env(safe-area-inset-bottom));
}

/* ── footer ──────────────────────────────────────────── */
.pt-foot {
  font-size: 12.5px;
  color: var(--ay-text-muted);
  line-height: 1.8;
  padding: 24px 16px calc(var(--tabh) + 24px + env(safe-area-inset-bottom));
  text-align: center;
  border-top: 1px solid var(--ay-border);
  margin-top: 32px;
  background: var(--ay-surface);
}
/* the safety note: one calm card above the link columns */
.pt-foot-note {
  max-width: 640px;
  margin: 0 auto;
  padding: 10px 14px;
  border-radius: var(--ay-r-md);
  background: var(--ay-surface-2);
  border: 1px solid var(--ay-border);
  font-size: 12px;
  line-height: 2;
}


/* ── leaderboard: آشیان‌یاران برتر و دفاتر برتر املاک ────────── */
.mh-leaderboard{margin:14px 0 20px;padding:16px 14px;background:var(--mh-surface);border:1px solid var(--mh-border);border-radius:var(--mh-r-lg);box-shadow:var(--mh-shadow-sm);max-width:100%;box-sizing:border-box;overflow:hidden;}.mh-top-header{display:flex;flex-direction:column;gap:10px;margin-bottom:12px;}
@media (min-width:640px){.mh-top-header{flex-direction:row;align-items:flex-end;justify-content:space-between;}
}.mh-top-kicker{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:var(--mh-accent);margin-bottom:2px;}.mh-leaderboard h2{font-size:19px;font-weight:800;margin:2px 0 4px;color:var(--mh-text);}.mh-top-tabs{display:flex;width:100%;max-width:320px;background:var(--mh-surface-2);border:1px solid var(--mh-border);border-radius:var(--mh-r-pill);padding:3px;gap:4px;box-sizing:border-box;}.mh-top-tab{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 10px;border:none;background:transparent;border-radius:var(--mh-r-pill);font:inherit;font-size:12.5px;font-weight:700;color:var(--mh-muted);cursor:pointer;white-space:nowrap;transition:all var(--mh-tr-fast);}.mh-top-tab.on{background:var(--mh-surface);color:var(--mh-text);box-shadow:var(--mh-shadow-sm);border:1px solid var(--mh-border);}.mh-top-city-filter{display:flex;align-items:center;gap:8px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:4px 0 10px;margin-bottom:4px;max-width:100%;box-sizing:border-box;}.mh-top-city-filter::-webkit-scrollbar{display:none}.mh-top-filter-label{font-size:12px;font-weight:700;color:var(--mh-muted);flex-shrink:0;}.mh-top-city-filter .pt-chip{flex-shrink:0;height:32px;font-size:12px;padding:0 12px;}.mh-top-city-filter .pt-chip.on{background:var(--mh-fill);border-color:color-mix(in srgb,var(--mh-accent) 40%,transparent);color:var(--mh-on);font-weight:700;}.mh-top-more-city{color:var(--mh-accent);border-color:color-mix(in srgb,var(--mh-accent) 40%,transparent);}.mh-advisors-grid,.mh-offices-grid{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;padding:4px 2px 14px;-webkit-overflow-scrolling:touch;scrollbar-width:none;max-width:100%;box-sizing:border-box;}
.mh-advisors-grid::-webkit-scrollbar,.mh-offices-grid::-webkit-scrollbar{display:none}
.mh-advisor-card,.mh-office-card{flex:0 0 250px;max-width:270px;scroll-snap-align:start;display:flex;flex-direction:column;justify-content:space-between;padding:14px;margin:0;background:var(--mh-surface-2);border:1px solid var(--mh-border);border-radius:var(--mh-r-md);box-shadow:var(--mh-shadow-sm);transition:transform var(--mh-tr-fast),box-shadow var(--mh-tr-fast),border-color var(--mh-tr-fast);}
@media (min-width:768px){.mh-advisors-grid,.mh-offices-grid{display:grid;grid-template-columns:repeat(3,1fr);overflow-x:visible;}.mh-advisor-card,.mh-office-card{flex:auto;max-width:none;}}
.mh-advisor-card:hover,.mh-office-card:hover{transform:translateY(-2px);box-shadow:var(--mh-shadow-md);border-color:var(--mh-accent);}.mh-advisor-card.mh-legendary{border-color:color-mix(in srgb,var(--mh-accent) 60%,transparent);box-shadow:var(--mh-shadow-glow);}.mh-adv-head,.mh-off-head{display:flex;align-items:center;gap:10px;margin-bottom:10px;text-decoration:none;color:inherit;}.mh-adv-avatar-wrap{position:relative;width:48px;height:48px;flex-shrink:0;}.mh-adv-avatar{width:48px;height:48px;border-radius:50%;object-fit:cover;border:2px solid var(--mh-border);background:var(--mh-surface);}.mh-adv-avatar-initial{display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:800;color:var(--mh-accent);background:var(--mh-accent-soft);}.mh-adv-rank{position:absolute;bottom:-3px;right:-3px;width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;line-height:1;border:2px solid var(--mh-surface);}.mh-rank-1{background:var(--mh-fill);color:var(--mh-on);box-shadow:0 0 8px color-mix(in srgb,var(--mh-accent) 50%,transparent);}.mh-rank-2{background:var(--mh-surface-3);color:var(--mh-text);border:1px solid var(--mh-border-strong);}.mh-rank-3{background:color-mix(in srgb,var(--mh-accent) 30%,var(--mh-surface-2));color:var(--mh-accent);border:1px solid color-mix(in srgb,var(--mh-accent) 45%,transparent);}.mh-rank-4,.mh-rank-5,.mh-rank-6{background:var(--mh-surface-2);color:var(--mh-muted);border:1px solid var(--mh-border);}.mh-adv-info,.mh-off-info{flex:1;min-width:0;}.mh-adv-name-row,.mh-off-name-row{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-bottom:2px;}.mh-adv-name,.mh-off-name{font-size:14px;font-weight:800;color:var(--mh-text);margin:0;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.mh-badge-legend{display:inline-flex;align-items:center;gap:3px;font-size:11px;font-weight:700;padding:2px 7px;border-radius:var(--mh-r-pill);background:color-mix(in srgb,var(--mh-accent) 18%,transparent);color:var(--mh-accent);border:1px solid color-mix(in srgb,var(--mh-accent) 35%,transparent);}.mh-badge-ver{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:700;color:var(--mh-ok);background:color-mix(in srgb,var(--mh-ok) 12%,transparent);padding:2px 8px;border-radius:var(--mh-r-pill);}.mh-adv-sub,.mh-off-sub{font-size:11.5px;color:var(--mh-muted);display:flex;align-items:center;gap:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.mh-adv-dot{opacity:0.6}.mh-adv-stats,.mh-off-stats{margin-bottom:10px;}.mh-adv-deal-count{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:600;color:var(--mh-ok);background:color-mix(in srgb,var(--mh-ok) 10%,transparent);padding:3px 8px;border-radius:var(--mh-r-pill);}.mh-adv-deal-count.verified{color:var(--mh-accent);background:var(--mh-accent-soft);}.mh-adv-actions{display:flex;gap:6px;align-items:center;}.mh-adv-card-btn{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:7px 10px;font-size:12px;font-weight:700;border-radius:var(--mh-r-pill);background:var(--mh-fill);color:var(--mh-on);text-decoration:none;box-shadow:var(--mh-shadow-sm);transition:all var(--mh-tr-fast);}.mh-adv-card-btn:hover{transform:translateY(-1px);box-shadow:var(--mh-shadow-md);}.mh-adv-card-btn.disabled{background:var(--mh-surface);color:var(--mh-muted);border:1px solid var(--mh-border);box-shadow:none;}.mh-city-modal-body{max-width:500px;max-height:85vh;max-height:85dvh;border-radius:var(--mh-r-lg);display:flex;flex-direction:column;}.mh-city-head-title{display:flex;align-items:center;gap:8px;}.mh-city-back-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;color:var(--mh-text);cursor:pointer;border-radius:50%;padding:0;}.mh-city-back-btn:hover{background:var(--mh-surface-2)}.mh-city-search-box{display:flex;align-items:center;gap:8px;padding:8px 14px;margin:4px 16px 10px;background:var(--mh-surface-2);border:1px solid var(--mh-border);border-radius:var(--mh-r-pill);}.mh-city-search-box input{flex:1;border:none;background:transparent;font:inherit;font-size:14px;color:var(--mh-text);outline:none;}.mh-city-scroll{overflow-y:auto;flex:1;padding:0 16px 16px;}.mh-city-all-btn{width:100%;display:flex;align-items:center;justify-content:space-between;padding:12px 14px;margin-bottom:12px;background:var(--mh-accent-soft);border:1px solid color-mix(in srgb,var(--mh-accent) 25%,transparent);border-radius:var(--mh-r-md);color:var(--mh-accent);cursor:pointer;font:inherit;}.mh-city-row-main{display:inline-flex;align-items:center;gap:8px;}.mh-city-pop-sec{margin-bottom:14px;}.mh-city-sec-label{font-size:12px;font-weight:700;color:var(--mh-muted);margin-bottom:8px;}.mh-city-pop-chips{display:flex;flex-wrap:wrap;gap:8px;}.mh-city-list{display:flex;flex-direction:column;gap:2px;}.mh-city-row{width:100%;display:flex;align-items:center;justify-content:space-between;padding:11px 12px;background:transparent;border:none;border-bottom:1px solid color-mix(in srgb,var(--mh-border) 60%,transparent);color:var(--mh-text);font:inherit;font-size:14px;cursor:pointer;border-radius:var(--mh-r-sm);text-align:right;transition:background var(--mh-tr-fast);}.mh-city-row:hover{background:var(--mh-surface-2)}.mh-city-arrow{color:var(--mh-muted);font-size:16px}.mh-city-empty,.mh-city-loading{padding:20px;text-align:center;}.mh-hoods{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0;}.mh-hoods .pt-chip{display:inline-flex;align-items:center;gap:4px;background:var(--mh-surface);border:1px solid var(--mh-border);color:var(--mh-text);font-weight:400;font-size:13px;text-decoration:none;}.mh-hoods .pt-chip:hover{border-color:var(--mh-accent);color:var(--mh-accent);}

/* ── Advisor Call Button ── */
.mh-adv-call-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: var(--mh-r-pill);
  background: var(--mh-surface);
  border: 1px solid var(--mh-border);
  color: var(--mh-text);
  text-decoration: none;
  transition: all var(--mh-tr-fast);
}
.mh-adv-call-btn:hover {
  background: var(--mh-accent-soft);
  color: var(--mh-accent);
  border-color: var(--mh-accent);
}

/* ==========================================================================
   Signature «شب آشیان» & NavyGold Theme for /market
   Synced with CRM Dashboard (navygold.css & ashiyan-night.css)
   ========================================================================== */

/* ── Light Mode (Luxury Cream & Warm Champagne Gold with Royal Navy Ink) ── */
html:not(.dark) body.pt {
  --bg: #F6F7FA;
  --card: linear-gradient(145deg, #ffffff 0%, #faf7f0 100%);
  --tx: #10223d;
  --mut: #64748b;
  --bd: #e1d5bf;
  --ac: #9d762e;
  --acbg: #faf3e3;
  --mh-bg: #F6F7FA;
  --mh-surface: #ffffff;
  --mh-surface-2: #faf7f0;
  --mh-surface-3: #f3ede0;
  --mh-border: #e1d5bf;
  --mh-border-strong: #c8b79b;
  --mh-text: #10223d;
  --mh-muted: #64748b;
  --mh-accent: #9d762e;
  --mh-accent-soft: #faf3e3;
  --mh-fill: linear-gradient(125deg, #fff0c3 0%, #e6c17a 50%, #be9046 100%);
  --mh-on: #142943;
}

/* Cards: signature luxury warm card with champagne hairline border */
html:not(.dark) body.pt :is(.mh-card, .mh-advisor-card, .mh-office-card, .mh-act-card, .mh-act-tile, .pt-card) {
  background: linear-gradient(145deg, #ffffff 0%, #faf7f0 100%) !important;
  border: 1px solid #e1d5bf !important;
  box-shadow: 0 9px 24px -13px rgba(16, 34, 61, 0.20), 0 3px 7px -5px rgba(157, 118, 46, 0.12), inset 0 1px rgba(255, 255, 255, 0.95) !important;
}

html:not(.dark) body.pt :is(.mh-card, .mh-advisor-card, .mh-office-card, .mh-act-card, .mh-act-tile, .pt-card):hover {
  border-color: rgba(219, 182, 106, 0.7) !important;
  box-shadow: 0 16px 32px -14px rgba(16, 34, 61, 0.28), 0 4px 12px -6px rgba(157, 118, 46, 0.25) !important;
}

/* Primary buttons: 3D Champagne Gold control with royal navy text */
html:not(.dark) body.pt :is(.pt-btn.primary, .mh-adv-card-btn:not(.disabled)) {
  background: linear-gradient(125deg, #fff0c3 0%, #e6c17a 50%, #be9046 100%) !important;
  color: #142943 !important;
  font-weight: 800 !important;
  border: 1px solid rgba(125, 84, 32, 0.25) !important;
  box-shadow: 0 8px 17px -9px rgba(159, 105, 31, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.72), inset 0 -2px 0 rgba(104, 68, 26, 0.15) !important;
}

html:not(.dark) body.pt :is(.pt-btn.primary, .mh-adv-card-btn:not(.disabled)):hover {
  box-shadow: 0 12px 22px -8px rgba(159, 105, 31, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
  transform: translateY(-1px);
}

/* Prices: deep royal navy */
html:not(.dark) body.pt :is(.mh-price, .pt-price) {
  color: #10223d !important;
  font-weight: 900 !important;
}

/* Hero Section: Signature Navy Gold */
html:not(.dark) body.pt .mh-eyebrow {
  background: #faf3e3 !important;
  color: #8E713A !important;
  border: 1px solid rgba(198, 165, 99, 0.4) !important;
}

html:not(.dark) body.pt .mh-gold {
  background: linear-gradient(135deg, #be9046 0%, #9d762e 50%, #7a581a 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

html:not(.dark) body.pt .mh-emblem {
  color: #be9046 !important;
  filter: drop-shadow(0 4px 12px rgba(198, 165, 99, 0.35)) !important;
}

html:not(.dark) body.pt .mh-act-owner {
  background: linear-gradient(135deg, #ffffff 0%, #faf3e3 100%) !important;
  border-color: rgba(219, 182, 106, 0.6) !important;
}

html:not(.dark) body.pt .mh-act-owner .mh-act-ic {
  background: linear-gradient(125deg, #fff0c3 0%, #e6c17a 50%, #be9046 100%) !important;
  color: #142943 !important;
}

html:not(.dark) body.pt .mh-deal {
  background: linear-gradient(125deg, #fff0c3 0%, #e6c17a 50%, #be9046 100%) !important;
  color: #142943 !important;
  box-shadow: 0 2px 8px rgba(159, 105, 31, 0.3) !important;
}

html:not(.dark) body.pt .mh-feat {
  border-color: #be9046 !important;
  color: #8E713A !important;
  background: #ffffff !important;
}

/* Active Chips & Leaderboard Tabs: Sleek Royal Navy */
html:not(.dark) body.pt :is(.pt-chip[aria-pressed="true"], .mh-top-city-filter .pt-chip.on, .mh-top-tab.on) {
  background: #10223d !important;
  color: #fff8e8 !important;
  border-color: #10223d !important;
  font-weight: 700 !important;
  box-shadow: 0 3px 8px rgba(16, 34, 61, 0.22) !important;
}

html:not(.dark) body.pt :is(.pt-chip, .mh-top-tab) {
  background: #ffffff;
  color: #10223d;
  border: 1px solid #e1d5bf;
}

html:not(.dark) body.pt .pt-chip:hover {
  background: #faf7f0;
  border-color: rgba(219, 182, 106, 0.6);
}

/* Advisor Rank & Deal Count in Light Mode */
html:not(.dark) body.pt .mh-rank-1 {
  background: linear-gradient(125deg, #fff0c3 0%, #e6c17a 50%, #be9046 100%) !important;
  color: #142943 !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 2px 8px rgba(159, 105, 31, 0.35) !important;
}

html:not(.dark) body.pt .mh-adv-deal-count.verified {
  background: #faf3e3 !important;
  color: #8E713A !important;
  border: 1px solid rgba(219, 182, 106, 0.4) !important;
}

/* Search Bar in Light Mode */
html:not(.dark) body.pt .mh-bar {
  background: #ffffff !important;
  border: 1.5px solid #e1d5bf !important;
  box-shadow: 0 4px 14px rgba(16, 34, 61, 0.06) !important;
}

html:not(.dark) body.pt .mh-bar:focus-within {
  border-color: #be9046 !important;
  outline-color: #be9046 !important;
}

/* Search alert button: Champagne gold pill */
html:not(.dark) body.pt .mh-alert-btn {
  background: #faf3e3 !important;
  color: #8E713A !important;
  border: 1px solid rgba(219, 182, 106, 0.6) !important;
  font-weight: 700 !important;
}

html:not(.dark) body.pt .mh-alert-btn:hover {
  background: linear-gradient(125deg, #fff0c3 0%, #e6c17a 50%, #be9046 100%) !important;
  color: #142943 !important;
}

/* Bottom navigation bar in light mode */
html:not(.dark) body.pt .pt-tabs {
  background: rgba(255, 253, 249, 0.96) !important;
  border-top: 1px solid #e1d5bf !important;
  box-shadow: 0 -4px 16px rgba(16, 34, 61, 0.06) !important;
}

html:not(.dark) body.pt .pt-tabs a {
  color: #64748B !important;
}

html:not(.dark) body.pt .pt-tabs a[aria-current="page"] {
  color: #9d762e !important;
  font-weight: 800 !important;
}

html:not(.dark) body.pt .pt-tabs a[aria-current="page"] .pt-ti svg {
  stroke: #9d762e !important;
}

html:not(.dark) body.pt .pt-tab-plus .pt-ti {
  background: linear-gradient(125deg, #fff0c3 0%, #e6c17a 50%, #be9046 100%) !important;
  color: #142943 !important;
  box-shadow: 0 4px 16px rgba(157, 118, 46, 0.45) !important;
}

html:not(.dark) body.pt .pt-tab-plus .pt-ti svg {
  stroke: #142943 !important;
}

/* ── Dark Mode: Ashiyan Night 3D (Royal Navy & Metallic Gold) ── */
html.dark body.pt {
  --bg: #080F20;
  --card: #101D35;
  --tx: #F5F4F0;
  --mut: #A8B5C7;
  --bd: rgba(198, 165, 99, 0.22);
  --ac: #C6A563;
  --acbg: rgba(198, 165, 99, 0.14);
  --mh-bg: #080F20;
  --mh-surface: #101D35;
  --mh-surface-2: #182B45;
  --mh-surface-3: #213753;
  --mh-border: rgba(198, 165, 99, 0.22);
  --mh-border-strong: rgba(198, 165, 99, 0.45);
  --mh-text: #F5F4F0;
  --mh-muted: #A8B5C7;
  --mh-accent: #C6A563;
  --mh-accent-soft: rgba(198, 165, 99, 0.14);
  --mh-fill: linear-gradient(135deg, #F3DFB0 0%, #EAD39C 22%, #C6A563 52%, #8E713A 100%);
  --mh-on: #0B1426;
}

html.dark body.pt :is(.mh-card, .mh-advisor-card, .mh-office-card, .mh-act-card, .mh-act-tile, .pt-card) {
  background: linear-gradient(165deg, rgba(33,55,83,.62) 0%, rgba(24,43,69,.70) 45%, rgba(16,29,53,.82) 100%) !important;
  border: 1px solid rgba(198, 165, 99, 0.22) !important;
  box-shadow: 0 13px 27px -12px rgba(0,0,0,.5), 0 2px 9px -4px rgba(219,182,106,.15) !important;
}

html.dark body.pt :is(.mh-card, .mh-advisor-card, .mh-office-card, .mh-act-card, .mh-act-tile, .pt-card):hover {
  border-color: rgba(234, 211, 156, 0.6) !important;
  box-shadow: 0 20px 40px -14px rgba(0,0,0,.75), 0 4px 14px -4px rgba(198,165,99,.35) !important;
}

html.dark body.pt :is(.pt-btn.primary, .mh-adv-card-btn:not(.disabled)) {
  background: linear-gradient(135deg, #F3DFB0 0%, #EAD39C 22%, #C6A563 52%, #8E713A 100%) !important;
  color: #0B1426 !important;
  font-weight: 800 !important;
  border: 1px solid rgba(243, 223, 176, 0.6) !important;
  box-shadow: 0 12px 28px -12px rgba(198, 165, 99, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
}

html.dark body.pt .mh-gold {
  background: linear-gradient(180deg, #FFF6DD 0%, #EAD39C 45%, #C6A563 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

html.dark body.pt .mh-price {
  color: #EAD39C !important;
  font-weight: 900 !important;
}

html.dark body.pt .pt-tabs {
  background: rgba(8, 15, 32, 0.94) !important;
  border-top: 1px solid rgba(198, 165, 99, 0.22) !important;
}

html.dark body.pt .pt-tabs a[aria-current="page"] {
  color: #EAD39C !important;
}

html.dark body.pt .pt-tabs a[aria-current="page"] .pt-ti svg {
  stroke: #EAD39C !important;
}

html.dark body.pt .pt-tab-plus .pt-ti {
  background: linear-gradient(135deg, #F3DFB0 0%, #EAD39C 22%, #C6A563 52%, #8E713A 100%) !important;
  color: #0B1426 !important;
  box-shadow: 0 4px 18px rgba(198, 165, 99, 0.45) !important;
}

html.dark body.pt .pt-tab-plus .pt-ti svg {
  stroke: #0B1426 !important;
}

/* responsive audit: every header control is a 44px tap target on tablets and landscape phones too */
body.pt .pt-top-actions :is(.pt-top-btn, .pt-top-search, .pt-top-post, .ay-theme-switch) { min-height: 44px; box-sizing: border-box; }
body.pt .pt-top-actions :is(.pt-top-btn, .pt-top-search, .pt-top-post) { display: inline-flex; align-items: center; }

/* iOS Safari zooms the page when a focused field is under 16px: keep every public-market field at 16px on touch widths (filter sheet fields included) */
@media (max-width: 900px) {
  body.pt :is(input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=hidden]), select, textarea) { font-size: 16px !important; }
}
.pt-check { align-items: center; min-height: 44px; }
.pt-check input { margin-top: 0; }
body.pt { min-height: 100vh; min-height: 100dvh; }

/* landscape phones (about 320-430px tall): a sticky header plus a fixed tab bar would eat half of the screen, so the header scrolls away, the bar gets
   shorter and shows icons only (labels stay available to screen readers) */
@media (orientation: landscape) and (max-height: 480px) {
  body.pt .pt-top { position: static !important; }
  body.pt { --msh-tabh: 52px; --tabh: 52px; }
  :root { --tabh: 52px; }
  body.pt .pt-tabs a { position: relative !important; }
  body.pt .pt-tabs a > span:not(.pt-ti) { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
}

/* 12px tab labels do not fit five columns under 375px: the longest label would be cut with an ellipsis */
@media (max-width: 374.98px) { .pt-tabs a span { font-size: 11px !important; } }

/* a paragraph that only holds a link (back links, policy links) is a stand-alone tap target */
.pt-main p > a:only-child { display: inline-flex; align-items: center; min-height: 44px; }

/* iPhone: iOS may draw the page under the status bar / Dynamic Island (viewport-fit=cover), so the sticky header starts below it and,
   in landscape, keeps clear of the notch sides. env() is 0 on every other device: nothing moves there. */
body.pt .pt-top { padding-top: env(safe-area-inset-top, 0px) !important; min-height: calc(60px + env(safe-area-inset-top, 0px)); }
@media (max-width: 640px) {
  body.pt .pt-top {
    min-height: calc(54px + env(safe-area-inset-top, 0px)) !important;
    padding-left: max(12px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(12px, env(safe-area-inset-right, 0px)) !important;
  }
}
@media (min-width: 641px) and (max-width: 1023.98px) {
  body.pt .pt-top { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}

/* the raised «ثبت آگهی» circle pokes above the bar: its own tab must not clip it (the label under it keeps its ellipsis) */
body.pt .pt-tabs a.pt-tab-plus { overflow: visible !important; }
