/* ══════════════════════════════════════════════════════════════════════════
   SHIVAA v120 — category tile never-blank face (Bug B hardening).
   Additive: only strengthens the existing tile; no live rule is overridden.
   ══════════════════════════════════════════════════════════════════════════ */

/* A branded monogram sits UNDER every category tile photo. If the photo (and
   its logo fallback) both fail on a phone, the tile still shows the house ✦
   on maroon — it can never degrade to bare alt-text again. The <img> rides
   above (z-index 1) and the gold ring stays on top (z-index 2). */
.cb-img { background: radial-gradient(circle at 50% 32%, #5a1626 0%, #2b080f 78%); }
.cb-img::after {
  content: '✦'; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  color: #d4af5a; font-size: 30px; line-height: 1; opacity: .9; pointer-events: none;
}
.cb-img img { position: relative; z-index: 1; }
.cb-img .cb-ring { z-index: 2; }

/* ══════════════════════════════════════════════════════════════════════════
   SHIVAA v120 — best-app mobile pack (paint-level only: no layout model,
   engine, timing or binding changes; every rule is mobile-scoped).
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 820px) {
  /* 1 · notch + gesture-bar clearance for floating chrome */
  .toast-wrap { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  #shvInstallChip { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .boost-chat { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  /* 2 · iOS Safari must never auto-zoom a field on focus (16px floor) */
  input, select, textarea { font-size: 16px; }
  /* 3 · app-feel taps: no grey flash, no 300ms delay, buttons don't select */
  * { -webkit-tap-highlight-color: transparent; }
  button, a, .c-dot { touch-action: manipulation; }
  button { -webkit-user-select: none; user-select: none; }
  input, textarea { -webkit-user-select: text; user-select: text; }
  /* 4 · drawers and sheets never chain-scroll the page behind them */
  #searchDrawer, .mc-drawer, .modal, .mega-panel, #mainNav, .filters,
  #pdfViewer { overscroll-behavior: contain; }
  /* 5 · thumb-nav active tab glows */
  .mnav a.on { text-shadow: 0 0 16px rgba(185, 138, 47, .55); }
}
/* 6 · dynamic viewport units where the URL bar used to break 100vh math
   (guarded: older WebViews keep the vh rules above untouched). */
@supports (height: 100dvh) {
  @media (max-width: 820px) {
    .hero { min-height: calc(100dvh - 124px); }
    .mega-panel { max-height: calc(100dvh - 140px); }
    .boost-chat { height: min(560px, calc(100dvh - 120px)); }
    .filters { max-height: calc(100dvh - 120px); }
    .inv-page { min-height: 100dvh; }
  }
}
