/**
 * Shop2Kart B2B — Mobile App UI (Flipkart/Amazon style)
 * /assets/css/mobile-app.css
 */

@media (max-width: 767px) {

  /* ════════════════════════════════════════════════════
     ROOT & BODY
  ════════════════════════════════════════════════════ */
  :root {
    --safe-top:    env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --app-nav-h:   56px;
    --hdr-bg:      #1a3c5e;
    --brand:       #0faa8e;
    --orange:      #f97316;
    --page-bg:     #f1f3f6;
  }

  html { -webkit-text-size-adjust: 100%; }

  body {
    background: var(--page-bg) !important;
    padding-bottom: calc(var(--app-nav-h) + var(--safe-bottom) + 4px) !important;
  }

  /* ════════════════════════════════════════════════════
     HIDE DESKTOP-ONLY ELEMENTS
  ════════════════════════════════════════════════════ */
  .topbar,
  .snav,
  .burger,
  .hdr-acts .ha small,
  .promo-col,
  .margin-grid,
  .hiw,
  .brands-scroll,
  .footer-top {
    display: none !important;
  }

  /* ════════════════════════════════════════════════════
     TOP HEADER — 2-row layout: Row1=logo+icons, Row2=search
  ════════════════════════════════════════════════════ */
  .hdr {
    position: sticky !important;
    top: 0 !important;
    z-index: 900 !important;
    height: auto !important;
    padding-top: var(--safe-top) !important;
    background: var(--hdr-bg) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.18) !important;
  }

  /* Two-row flex container */
  .hdr-in {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    padding: 7px 12px 0 12px !important;
    gap: 0 6px !important;
    min-height: unset !important;
  }

  /* ── Row 1 items ── */
  .logo {
    order: 1;
    font-size: 16px !important;
    font-weight: 900 !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
    white-space: nowrap;
    flex: 1 1 auto !important;
  }
  .logo-mk { width: 26px !important; height: 26px !important; font-size: 14px !important; border-radius: 7px !important; }
  .b2b-tag { font-size: 7.5px !important; padding: 1px 4px !important; margin-left: 2px !important; }

  .hdr-acts {
    order: 2;
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    flex-shrink: 0 !important;
  }
  #auth-buttons {
    order: 3;
    display: flex !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
    align-items: center !important;
  }
  #user-menu {
    order: 3;
    flex-shrink: 0 !important;
    gap: 4px !important;
  }
  .burger { order: 4; flex-shrink: 0 !important; }

  /* Action icon buttons — icon only, no label */
  .ha       { padding: 5px 7px !important; border-radius: 6px !important; background: none !important; border: none !important; }
  .ha .ha-ico { font-size: 20px !important; }
  .ha small   { display: none !important; }

  /* Auth buttons compact */
  .login-btn {
    padding: 5px 10px !important;
    font-size: 11.5px !important;
    border-radius: 6px !important;
    background: rgba(255,255,255,.15) !important;
    border: 1px solid rgba(255,255,255,.3) !important;
    gap: 4px !important;
  }
  .reg-btn {
    padding: 5px 10px !important;
    font-size: 11.5px !important;
    border-radius: 6px !important;
    gap: 4px !important;
  }
  .reg-btn span { display: none !important; } /* hide "Register Free" text, show only icon */
  #user-menu { flex-shrink: 0; gap: 4px !important; }
  .user-menu-btn { padding: 5px 9px !important; font-size: 11.5px !important; border-radius: 6px !important; }
  .cbadge { width: 14px !important; height: 14px !important; font-size: 8px !important; top: 1px !important; right: 2px !important; }

  /* ── Row 2: Search bar — full width ── */
  .srch {
    order: 10 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 6px 0 8px 0 !important;
    position: relative !important;
  }
  .srch input {
    height: 38px !important;
    font-size: 13.5px !important;
    border-radius: 7px !important;
    padding: 0 80px 0 36px !important;
    background: #fff !important;
    width: 100% !important;
  }
  .srch-i {
    font-size: 14px !important;
    left: 11px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }
  .srch-btn {
    height: 30px !important;
    top: 4px !important;
    right: 4px !important;
    font-size: 12px !important;
    padding: 0 12px !important;
    border-radius: 5px !important;
    font-weight: 700 !important;
  }
  /* Dropdown full-width with safe z-index */
  .srch-drop {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 55vh !important;
    border-radius: 0 0 10px 10px !important;
    z-index: 1100 !important;
  }

  /* (Auth button styles moved to header section above) */

  /* ════════════════════════════════════════════════════
     PAGE WRAPPER — grey background, white card sections
  ════════════════════════════════════════════════════ */
  .page { padding: 0 0 24px !important; max-width: 100% !important; }

  /* ════════════════════════════════════════════════════
     HERO SLIDER — full bleed, no border-radius
  ════════════════════════════════════════════════════ */
  .hero-wrap {
    display: block !important;
    padding: 0 !important;
    margin-bottom: 8px !important;
    background: #fff !important;
  }

  .slider    { height: 190px !important; border-radius: 0 !important; margin: 0 !important; }
  .slide-ov  { padding: 16px !important; background: linear-gradient(90deg, rgba(8,24,50,.88) 0%, rgba(8,24,50,.30) 100%) !important; }
  .slide-tag { font-size: 9.5px !important; padding: 2px 9px !important; margin-bottom: 6px !important; border-radius: 3px !important; }
  .slide-ov h2 { font-size: 17px !important; line-height: 1.2 !important; margin-bottom: 5px !important; }
  .slide-ov p  { display: none !important; }
  .slide-btn   { height: 32px !important; padding: 0 14px !important; font-size: 12px !important; border-radius: 4px !important; font-weight: 700 !important; }
  .sl-arr      { width: 26px !important; height: 26px !important; font-size: 12px !important; }
  .sl-dots     { bottom: 10px !important; }
  .dot         { width: 6px !important; height: 6px !important; }
  .dot.on      { width: 16px !important; }

  /* ════════════════════════════════════════════════════
     USP STRIP — 2×2 GRID (not a scrollable bar)
  ════════════════════════════════════════════════════ */
  .usp {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
    padding: 0 !important;
    margin-bottom: 8px !important;
    overflow: hidden;
  }

  .usp-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px !important;
    border-right: 1px solid #f0f0f0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    min-width: unset !important;
    flex: unset !important;
    text-align: left !important;
  }

  .usp-item:nth-child(2n)      { border-right: none !important; }
  .usp-item:nth-last-child(-n+2){ border-bottom: none !important; }

  .usp-ico    { width: 34px !important; height: 34px !important; font-size: 16px !important; border-radius: 8px !important; flex-shrink: 0; margin: 0 !important; }
  .usp-txt h4 { font-size: 11.5px !important; font-weight: 700 !important; color: #1a2d3d !important; line-height: 1.2 !important; }
  .usp-txt p  { font-size: 10px !important; color: #8fa8bc !important; margin-top: 1px !important; }

  /* ════════════════════════════════════════════════════
     MOBILE CATEGORY GRID (injected) — 4-col icon circles
  ════════════════════════════════════════════════════ */
  #mobile-cat-grid {
    background: #fff;
    margin-bottom: 8px !important;
    padding: 14px 8px 8px !important;
  }

  #mobile-cat-grid .mob-sec-head {
    font-size: 13px; font-weight: 800; color: #1a2d3d;
    padding: 0 6px 10px; letter-spacing: -.2px;
  }

  #mobile-cat-grid .cat-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px !important;
  }

  #mobile-cat-grid .cat-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 10px 4px 8px; border-radius: 8px; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  #mobile-cat-grid .cat-item:active { background: #f1f3f6; }

  #mobile-cat-grid .cat-ico {
    width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; background: #f1f8ff; border: 1.5px solid #e8f0fe;
  }

  #mobile-cat-grid .cat-lbl {
    font-size: 10.5px; font-weight: 600; color: #1a2d3d;
    text-align: center; line-height: 1.25;
  }

  /* ════════════════════════════════════════════════════
     DEAL BANNERS (injected) — 2-col coloured cards
  ════════════════════════════════════════════════════ */
  #mobile-deals {
    background: #fff;
    margin-bottom: 8px !important;
    padding: 14px 12px 12px !important;
  }

  #mobile-deals .mob-sec-head {
    font-size: 13px; font-weight: 800; color: #1a2d3d;
    margin-bottom: 10px;
    display: flex; align-items: center; justify-content: space-between;
  }
  #mobile-deals .mob-sec-head a { font-size: 11.5px; color: #0faa8e; font-weight: 700; }

  #mobile-deals .deals-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

  #mobile-deals .deal-card {
    border-radius: 10px; overflow: hidden; position: relative;
    height: 112px; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .15s;
  }
  #mobile-deals .deal-card:active { transform: scale(.97); }

  #mobile-deals .deal-card .dc-ov {
    position: absolute; inset: 0; padding: 10px;
    display: flex; flex-direction: column; justify-content: flex-end;
  }

  #mobile-deals .deal-card .dc-badge {
    font-size: 9px; font-weight: 900; border-radius: 3px;
    padding: 2px 6px; width: fit-content; margin-bottom: 4px;
    text-transform: uppercase; letter-spacing: .4px;
  }

  #mobile-deals .deal-card h5 {
    font-size: 12px; font-weight: 800; color: #fff;
    line-height: 1.2; margin-bottom: 4px;
  }

  #mobile-deals .deal-card .dc-cta {
    font-size: 10.5px; font-weight: 700;
    color: rgba(255,255,255,.85);
    display: flex; align-items: center; gap: 3px;
  }

  /* ════════════════════════════════════════════════════
     SECTION HEADERS inside page
  ════════════════════════════════════════════════════ */
  .sec-row {
    padding: 14px 12px 10px !important;
    margin-bottom: 0 !important;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
  }
  .sec-row h2  { font-size: 14px !important; font-weight: 800 !important; letter-spacing: -.2px !important; }
  .sec-row .all{ font-size: 11.5px !important; font-weight: 700 !important; color: #0faa8e !important; background: #e5f9f5 !important; border-radius: 4px !important; padding: 4px 10px !important; }

  /* Category chips hidden — replaced by grid */
  .chips { display: none !important; }

  /* ════════════════════════════════════════════════════
     PRODUCT GRID — Flipkart 2-col card layout
  ════════════════════════════════════════════════════ */
  .pgrid,
  .loading-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1px !important;
    margin-bottom: 0 !important;
    background: #e8ecf0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }

  .pcard {
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
    transition: none !important;
  }
  .pcard:hover  { transform: none !important; box-shadow: none !important; }
  .pcard:active { background: #fafafa !important; }

  .pimg {
    height: 140px !important;
    background: #f7f9fb !important;
  }
  .pimg img {
    object-fit: contain !important;
    padding: 8px !important;
    transition: none !important;
  }
  .pcard:hover .pimg img { transform: none !important; }

  .pdchip  { font-size: 9px !important; padding: 2px 5px !important; border-radius: 3px !important; font-weight: 800 !important; }
  .ptr-badge{ font-size: 8.5px !important; padding: 2px 5px !important; border-radius: 3px !important; }

  .pbody   { padding: 8px 10px 10px !important; }
  .pbrand  { font-size: 9.5px !important; color: #0faa8e !important; font-weight: 700 !important; margin-bottom: 2px !important; text-transform: uppercase !important; letter-spacing: .3px !important; }

  .pbody h4 {
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    margin-bottom: 5px !important;
    color: #1a2d3d !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .prow    { gap: 4px !important; flex-wrap: wrap !important; margin-bottom: 6px !important; align-items: baseline !important; }
  .pprice  { font-size: 14px !important; font-weight: 800 !important; color: #1a2d3d !important; }
  .pmrp    { font-size: 10.5px !important; color: #94a3b8 !important; }
  .pmargin { font-size: 9.5px !important; padding: 1px 5px !important; border-radius: 3px !important; font-weight: 800 !important; color: #0faa8e !important; background: #e5f9f5 !important; }
  .pfree   { font-size: 9.5px !important; padding: 1px 5px !important; border-radius: 3px !important; font-weight: 700 !important; }

  .abtn {
    width: 100% !important; padding: 8px 0 !important;
    font-size: 12px !important; border-radius: 4px !important; font-weight: 700 !important;
    border: 1.5px solid #0faa8e !important;
    background: #fff !important; color: #0faa8e !important;
  }
  .abtn:hover, .abtn.incart { background: #0faa8e !important; color: #fff !important; }

  .skeleton { height: 230px !important; border-radius: 0 !important; }

  /* ════════════════════════════════════════════════════
     TRUST / STATS
  ════════════════════════════════════════════════════ */
  .trust {
    grid-template-columns: repeat(2, 1fr) !important;
    padding: 16px !important; gap: 12px !important;
    border-radius: 0 !important; margin-bottom: 8px !important;
  }
  .trust-num { font-size: 20px !important; }
  .trust-lbl { font-size: 10.5px !important; }

  /* ════════════════════════════════════════════════════
     FOOTER — minimal
  ════════════════════════════════════════════════════ */
  .footer-top { display: none !important; }
  .footer-bot {
    flex-direction: column !important; gap: 6px !important;
    text-align: center !important; padding: 16px !important;
    font-size: 11px !important;
  }
  .footer-bot-links { flex-wrap: wrap !important; gap: 12px !important; justify-content: center !important; }

  /* ════════════════════════════════════════════════════
     MODALS — bottom sheet with fixed scroll
  ════════════════════════════════════════════════════ */
  .modal-overlay { align-items: flex-end !important; padding: 0 !important; }

  .modal-box {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
    max-height: 88vh !important;
    transform: translateY(100%) !important;
    /* flex column: header pinned, body scrolls */
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  .modal-box::before {
    content: ''; display: block; flex-shrink: 0;
    width: 36px; height: 4px;
    background: #dde6ef; border-radius: 2px;
    margin: 10px auto 0;
  }
  .modal-overlay.open .modal-box { transform: translateY(0) !important; }

  .modal-head {
    border-radius: 0 !important;
    padding: 10px 16px 10px !important;
    flex-shrink: 0 !important;
  }
  .modal-head h2 { font-size: 15px !important; }
  .modal-head p  { font-size: 11px !important; margin-top: 1px !important; }

  /* Scrollable body — no phantom space */
  .modal-body {
    padding: 12px 16px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    flex: 1 1 auto !important;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Compact form fields */
  .login-tabs   { margin-bottom: 12px !important; }
  .login-tab    { font-size: 13px !important; padding: 8px !important; }
  .login-field  { margin-bottom: 9px !important; }
  .login-field label { font-size: 11px !important; margin-bottom: 3px !important; }
  .login-field input, .login-field select { height: 42px !important; font-size: 14px !important; border-radius: 7px !important; }
  .login-main-btn  { height: 44px !important; font-size: 14px !important; border-radius: 7px !important; margin-top: 2px !important; }
  .login-or        { margin: 10px 0 !important; }
  .login-otp-btn   { height: 42px !important; font-size: 13px !important; }
  .forgot-link     { font-size: 11.5px !important; margin-bottom: 6px !important; }
  .reg-grid        { grid-template-columns: 1fr !important; gap: 0 !important; }

  /* Cart items */
  .ci-img           { width: 44px !important; height: 44px !important; border-radius: 6px !important; }
  .ci-info h5       { font-size: 12.5px !important; }
  .cart-checkout    { height: 48px !important; border-radius: 6px !important; font-size: 15px !important; font-weight: 800 !important; }
  .cart-total strong{ font-size: 17px !important; }

  /* ════════════════════════════════════════════════════
     BOTTOM NAVIGATION BAR
  ════════════════════════════════════════════════════ */
  .mnav {
    display: block !important;
    position: fixed !important;
    bottom: 0; left: 0; right: 0;
    height: calc(var(--app-nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: #fff !important;
    border-top: 1px solid #e8ecf0 !important;
    box-shadow: 0 -2px 12px rgba(0,0,0,.08) !important;
    z-index: 900 !important;
  }

  .mnav-in {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    height: var(--app-nav-h) !important;
    padding: 0 !important;
    align-items: stretch;
  }

  .mi {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    font-family: 'Hind', sans-serif !important;
    color: #94a3b8 !important;
    cursor: pointer;
    padding: 6px 0 5px !important;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    border-radius: 0 !important;
    transition: color .12s;
  }

  .mi i {
    font-size: 20px !important;
    line-height: 1 !important;
    display: block;
    transition: transform .15s cubic-bezier(.34,1.56,.64,1);
  }

  .mi span.mi-lbl {
    font-size: 9.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
  }

  .mi.on       { color: #1a3c5e !important; }
  .mi.on i     { transform: scale(1.1) translateY(-1px); }

  .mi.on::after {
    content: ''; position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 28px; height: 3px;
    background: #1a3c5e; border-radius: 0 0 3px 3px;
  }

  .mibadge {
    position: absolute !important;
    top: 4px !important; right: calc(50% - 18px) !important;
    min-width: 15px !important; height: 15px !important;
    border-radius: 8px !important; font-size: 8.5px !important;
    font-weight: 900 !important; padding: 0 3px !important;
    background: #f97316 !important; color: #fff !important;
    display: none !important;
    align-items: center !important; justify-content: center !important;
    border: 1.5px solid #fff !important; z-index: 2; line-height: 1 !important;
  }
  .mibadge.has-items { display: flex !important; }

  .mi:active { opacity: .65; }

  /* ════════════════════════════════════════════════════
     TOAST
  ════════════════════════════════════════════════════ */
  .toast-wrap {
    bottom: calc(var(--app-nav-h) + var(--safe-bottom) + 10px) !important;
    right: 10px !important; left: 10px !important;
  }
  .toast { min-width: unset !important; font-size: 12.5px !important; padding: 10px 14px !important; border-radius: 8px !important; }

  /* ════════════════════════════════════════════════════
     CALCULATOR
  ════════════════════════════════════════════════════ */
  .mcalc-row  { grid-template-columns: 1fr !important; }
  .mcalc-result{ grid-template-columns: repeat(3,1fr) !important; }
  .mcalc-r-item .val { font-size: 18px !important; }
  .calc-val   { font-size: 28px !important; }
  .ck         { height: 48px !important; font-size: 16px !important; }

  /* ════════════════════════════════════════════════════
     PWA INSTALL BANNER
  ════════════════════════════════════════════════════ */
  #pwa-install-banner {
    display: none;
    position: fixed;
    bottom: calc(var(--app-nav-h) + var(--safe-bottom) + 8px);
    left: 10px; right: 10px;
    background: #0f2842; color: #fff;
    border-radius: 12px; padding: 12px 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,.22);
    z-index: 1200;
    animation: s2kSlideUp .3s cubic-bezier(.4,0,.2,1) both;
  }
  #pwa-install-banner.show { display: flex !important; align-items: center; gap: 10px; }

  @keyframes s2kSlideUp {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
  }

  #pwa-install-banner .pwa-icon {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, #0faa8e, #056b58);
    border-radius: 10px; display: flex; align-items: center;
    justify-content: center; font-size: 22px; flex-shrink: 0;
  }
  #pwa-install-banner .pwa-text       { flex: 1; min-width: 0; }
  #pwa-install-banner .pwa-text strong{ display: block; font-size: 13.5px; font-weight: 800; }
  #pwa-install-banner .pwa-text span  { font-size: 11px; color: rgba(255,255,255,.6); }
  #pwa-install-banner .pwa-btn {
    background: #0faa8e; color: #fff; border: none;
    border-radius: 7px; padding: 8px 12px;
    font-size: 12.5px; font-weight: 800; cursor: pointer;
    white-space: nowrap; flex-shrink: 0; font-family: 'Hind', sans-serif;
  }
  #pwa-install-banner .pwa-close {
    background: none; border: none;
    color: rgba(255,255,255,.4); font-size: 17px; cursor: pointer; padding: 4px; flex-shrink: 0;
  }

  /* iOS guide */
  #ios-install-guide {
    display: none;
    position: fixed;
    bottom: calc(var(--app-nav-h) + var(--safe-bottom) + 8px);
    left: 10px; right: 10px;
    background: #0f2842; color: #fff;
    border-radius: 12px; padding: 14px 14px 16px;
    box-shadow: 0 6px 24px rgba(0,0,0,.22); z-index: 1200;
    animation: s2kSlideUp .3s cubic-bezier(.4,0,.2,1) both;
  }
  #ios-install-guide.show { display: block !important; }
  #ios-install-guide .ios-arrow {
    position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%);
    border: 10px solid transparent; border-top-color: #0f2842; height: 0; width: 0;
  }
  #ios-install-guide h4    { font-size: 14px; font-weight: 800; margin-bottom: 10px; }
  #ios-install-guide .ios-steps { display: flex; flex-direction: column; gap: 8px; }
  #ios-install-guide .ios-step  { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: rgba(255,255,255,.8); }
  #ios-install-guide .ios-step .step-num {
    width: 20px; height: 20px; border-radius: 50%; background: #0faa8e;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 900; flex-shrink: 0;
  }
  #ios-install-guide .ios-close {
    position: absolute; top: 10px; right: 10px;
    background: none; border: none; color: rgba(255,255,255,.35); font-size: 17px; cursor: pointer;
  }

  /* Network status */
  #network-status {
    display: none;
    position: fixed; top: calc(var(--safe-top) + 6px);
    left: 50%; transform: translateX(-50%);
    background: #ef4444; color: #fff; border-radius: 20px; padding: 5px 14px;
    font-size: 12px; font-weight: 700; z-index: 2000;
    box-shadow: 0 3px 12px rgba(0,0,0,.18); white-space: nowrap;
    animation: s2kFadeDown .3s ease both;
  }
  #network-status.show   { display: block; }
  #network-status.online { background: #0faa8e; }

  @keyframes s2kFadeDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
  }

  /* Pull to refresh */
  #ptr-indicator {
    position: fixed; top: calc(var(--safe-top) + 60px);
    left: 50%; transform: translateX(-50%) translateY(-50px);
    background: #fff; border: 1px solid #dde6ef; border-radius: 20px;
    padding: 6px 14px; font-size: 12px; font-weight: 700; color: #1a3c5e;
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
    display: flex; align-items: center; gap: 7px;
    z-index: 999; white-space: nowrap; pointer-events: none;
    transition: transform .22s cubic-bezier(.4,0,.2,1);
  }
  #ptr-indicator.visible { transform: translateX(-50%) translateY(0); }

} /* end @media(max-width:767px) */
