    html {
      -webkit-text-size-adjust: 100%;
      text-size-adjust: 100%;
    }
    html.mobile-app,
    html.capacitor-native {
      font-size: 16px;
    }
    :root {
      --mr-ink: #18181b;
      --mr-muted: #71717a;
      --mr-faint: #a1a1aa;
      /* Solid brand — matches glossy emerald logo mark */
      --mr-accent: #059669;
      --mr-accent-deep: #047857;
      --mr-accent-bright: #10b981;
      --mr-accent-mint: #34d399;
      --mr-accent-soft: #ecfdf5;
      --mr-accent-glow: rgba(16, 185, 129, 0.28);
      --mr-solid-grad: linear-gradient(145deg, #34d399 0%, #10b981 42%, #047857 100%);
      --mr-solid-grad-soft: linear-gradient(165deg, #ecfdf5 0%, #d1fae5 45%, #a7f3d0 100%);
      --mr-solid-shadow: 0 2px 8px rgba(4, 120, 87, 0.22), 0 1px 0 rgba(255,255,255,0.25) inset;
      --mr-solid-shadow-sm: 0 1px 4px rgba(4, 120, 87, 0.16), 0 1px 0 rgba(255,255,255,0.3) inset;
      --mr-line: rgba(15, 23, 42, 0.08);
      --mr-line-soft: rgba(15, 23, 42, 0.05);
      --mr-surface: #ffffff;
      --mr-surface-muted: #fafafa;
      --mr-radius-sm: 0.75rem;
      --mr-radius: 1rem;
      --mr-radius-lg: 1.25rem;
      --mr-radius-xl: 1.5rem;
      --mr-radius-pill: 999px;
      --mr-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
      --mr-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
      --mr-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
      --mr-eyebrow: 0.625rem;
      --mr-caption: 0.6875rem;
      --mr-body: 0.875rem;
    }
    body {
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      overflow-x: clip;
      background: #f4f4f5;
      min-height: 100vh;
      color: var(--mr-ink);
      -webkit-font-smoothing: antialiased;
    }
    .card {
      background: var(--mr-surface);
      border: 1px solid var(--mr-line-soft);
      box-shadow: var(--mr-shadow);
      border-radius: var(--mr-radius-lg);
    }
    .app-header {
      background: rgba(255, 255, 255, 0.94);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(15, 23, 42, 0.06);
      padding-top: env(safe-area-inset-top, 0px);
    }
    #app-main-column { overflow: visible; }
    .header-icon-btn {
      min-width: 36px;
      min-height: 36px;
      padding: 0.35rem 0.5rem;
      border-radius: 999px;
      border: 1px solid rgba(15, 23, 42, 0.1);
      background: #fff;
      font-size: 1rem;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .header-icon-btn:active { background: #f4f4f5; }
    .header-icon-btn.hidden,
    #btn-logout-top.hidden { display: none !important; }

    /* Sign out — clear outlined pill (not a cryptic arrow icon) */
    #btn-logout-top.header-signout-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.35rem;
      min-height: 36px;
      padding: 0.35rem 0.7rem 0.35rem 0.55rem;
      border-radius: 999px;
      border: 1px solid #fecaca;
      background: #fff;
      color: #b91c1c;
      font-size: 0.6875rem;
      font-weight: 700;
      letter-spacing: 0.01em;
      line-height: 1;
      white-space: nowrap;
      flex-shrink: 0;
      box-shadow: 0 1px 2px rgba(185, 28, 28, 0.06);
      transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, opacity 0.15s ease;
    }
    #btn-logout-top.header-signout-btn:hover {
      background: #fef2f2;
      border-color: #fca5a5;
    }
    #btn-logout-top.header-signout-btn:active:not(:disabled) {
      transform: scale(0.96);
      background: #fee2e2;
    }
    #btn-logout-top.header-signout-btn:disabled,
    #btn-logout-top.header-signout-btn.is-signing-out {
      opacity: 0.7;
      cursor: wait;
    }
    #btn-logout-top .header-signout-icon {
      width: 0.95rem;
      height: 0.95rem;
      flex-shrink: 0;
    }
    #btn-logout-top .header-signout-label {
      display: inline;
    }
    @media (max-width: 639px) {
      #btn-logout-top.header-signout-btn {
        min-width: 0;
        min-height: 36px;
        padding: 0.35rem 0.6rem;
        font-size: 0.625rem;
      }
      #btn-logout-top .header-signout-icon {
        width: 0.9rem;
        height: 0.9rem;
      }
    }
    @media (min-width: 640px) {
      #btn-logout-top.header-signout-btn {
        padding: 0.4rem 0.85rem 0.4rem 0.65rem;
        font-size: 0.75rem;
      }
    }
    .header-tools-panel {
      display: flex;
      align-items: center;
      gap: 0.25rem;
    }
    @media (max-width: 639px) {
      .header-tools-panel {
        display: none;
        position: absolute;
        right: 0;
        top: calc(100% + 6px);
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        min-width: 11rem;
        padding: 0.5rem;
        background: #fff;
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 1rem;
        box-shadow: 0 12px 40px rgba(15, 23, 42, 0.14);
        z-index: 60;
      }
      .header-tools-panel.open { display: flex; }
      .header-tools-panel .header-tool-item {
        width: 100%;
        justify-content: flex-start;
        min-height: 40px;
        padding: 0.5rem 0.75rem;
        border-radius: 0.75rem;
        font-size: 0.8125rem;
        gap: 0.5rem;
      }
      #btn-header-menu[aria-expanded="true"] { background: #ecfdf5; border-color: #6ee7b7; }
    }
    @media (min-width: 640px) {
      #btn-header-menu { display: none !important; }
      .header-tools-panel {
        position: static;
        flex-direction: row;
        align-items: center;
        min-width: 0;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
      }
      .header-tools-panel .header-tool-item { width: auto; }
    }
    html.dark .header-icon-btn { background: #1e293b; border-color: rgba(255,255,255,0.12); color: #e4e4e7; }
    html.dark .header-tools-panel { background: #1e293b; border-color: rgba(255,255,255,0.1); }
    /* v429: sticky store dock no longer hosts Refresh/Clear (Books + table keep them) */
    #btn-force-refresh {
      flex-shrink: 0;
      white-space: nowrap;
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.35rem;
      border-radius: 9999px;
      font-weight: 600;
      letter-spacing: 0.01em;
      border: 1px solid transparent;
      transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    }
    #btn-force-refresh:active:not(:disabled) { transform: scale(0.96); }
    #btn-force-refresh:disabled { opacity: 0.7; cursor: wait; }
    #btn-force-refresh .btn-upd-icon {
      display: inline-flex;
      width: 1rem;
      height: 1rem;
      flex-shrink: 0;
    }
    #btn-force-refresh .btn-upd-icon svg { width: 100%; height: 100%; }
    #btn-force-refresh.update-needed {
      padding: 0.4rem 0.7rem;
      font-size: 11px;
      color: #fff;
      background: linear-gradient(135deg, #047857 0%, #10b981 55%, #34d399 100%);
      box-shadow: 0 2px 10px rgba(16, 185, 129, 0.38), inset 0 1px 0 rgba(255,255,255,0.22);
    }
    #btn-force-refresh.update-needed:hover {
      box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45), inset 0 1px 0 rgba(255,255,255,0.28);
    }
    #btn-force-refresh.update-needed .btn-upd-icon { animation: update-spin-hint 2.4s ease-in-out infinite; }
    #btn-force-refresh.update-needed .btn-upd-dot {
      position: absolute;
      top: 2px;
      right: 2px;
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #fde047;
      border: 1.5px solid #fff;
      box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.4);
      animation: update-dot-pulse 1.6s ease-in-out infinite;
    }
    #btn-force-refresh.update-current {
      padding: 0.4rem 0.65rem;
      font-size: 11px;
      color: #52525b;
      background: rgba(0, 0, 0, 0.05);
      border-color: rgba(0, 0, 0, 0.1);
      opacity: 1;
    }
    #btn-force-refresh.update-current .btn-upd-label { display: inline; }
    #btn-force-refresh.update-current:hover {
      color: #18181b;
      background: rgba(0, 0, 0, 0.08);
    }
    @media (max-width: 640px) {
      #btn-force-refresh.update-current { padding: 0.42rem 0.55rem; }
      #btn-force-refresh.update-current .btn-upd-label { font-size: 10px; }
    }
    html.dark #btn-force-refresh.update-current {
      color: #a1a1aa;
      background: rgba(255, 255, 255, 0.06);
      border-color: rgba(255, 255, 255, 0.1);
    }
    @keyframes update-spin-hint {
      0%, 88%, 100% { transform: rotate(0deg); }
      94% { transform: rotate(-200deg); }
    }
    @keyframes update-dot-pulse {
      0%, 100% { transform: scale(1); opacity: 1; }
      50% { transform: scale(1.15); opacity: 0.85; }
    }
    #photo-memory-viewer-stage { touch-action: pan-y pinch-zoom; user-select: none; }
    #invoice-ocr-modal.invoice-ocr-from-receive { z-index: 109; }
    .txn-row { transition: background 0.12s ease; }
    .txn-row:hover { background: rgba(236, 253, 245, 0.55); }
    .ledger-txn-mobile { display: none; }
    @media (max-width: 639px) {
      .ledger-txn-desktop { display: none !important; }
      .ledger-txn-mobile { display: block; }
    }
    .txn-cell-viz { width: 4.5rem; text-align: center; }
    .txn-date-label { font-size: 9px; font-weight: 800; color: #52525b; margin-top: 0.25rem; line-height: 1.1; }
    .txn-date-iso { font-size: 8px; color: #a1a1aa; tabular-nums; }
    .txn-type-title { font-size: 11px; font-weight: 800; letter-spacing: 0.02em; line-height: 1.2; }
    .txn-type-daily_sale { color: #047857; }
    .txn-type-purchase { color: #c2410c; }
    .txn-type-expense { color: #dc2626; }
    .txn-type-withdrawal { color: #7e22ce; }
    .txn-type-cash_drop { color: #0f766e; }
    .txn-type-additional_income { color: #1d4ed8; }
    .txn-type-lottery_payout { color: #7c3aed; }
    .txn-desc { font-size: 12px; font-weight: 600; color: #18181b; margin-top: 0.15rem; line-height: 1.25; }
    .txn-notes-preview {
      font-size: 10px; color: #71717a; margin-top: 0.2rem; line-height: 1.3;
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .txn-pay-row { margin-top: 0.35rem; }
    .txn-pay-chip {
      display: inline-flex; align-items: center; gap: 0.2rem;
      font-size: 9px; font-weight: 700; color: #52525b;
      background: #f4f4f5; border: 1px solid #e4e4e7; border-radius: 999px; padding: 0.1rem 0.45rem;
    }
    .txn-pay-icon { font-size: 10px; line-height: 1; }
    .txn-amt-wrap { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 0.1rem; }
    .txn-flow-arrow { font-size: 11px; font-weight: 900; line-height: 1; }
    .txn-amt-value { font-size: 14px; font-weight: 800; tabular-nums; letter-spacing: -0.02em; }
    .txn-amt-in .txn-flow-arrow, .txn-amt-in .txn-amt-value { color: #047857; }
    .txn-amt-out .txn-flow-arrow, .txn-amt-out .txn-amt-value { color: #b45309; }
    .txn-row-cash_drop .txn-amt-in .txn-amt-value { color: #047857; }
    .txn-row-expense .txn-amt-out .txn-amt-value,
    .txn-row-lottery_payout .txn-amt-out .txn-amt-value { color: #dc2626; }
    .txn-viz {
      width: 2.75rem; height: 2.75rem; margin: 0 auto;
      border-radius: 0.85rem; position: relative; overflow: hidden;
      border: 1px solid rgba(0,0,0,0.06);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
    }
    .txn-viz-sale { background: linear-gradient(145deg, #ecfdf5, #a7f3d0); }
    .txn-viz-sale-register {
      position: absolute; bottom: 18%; left: 22%; right: 22%; height: 42%;
      background: linear-gradient(180deg, #6ee7b7, #059669);
      border-radius: 4px 4px 2px 2px;
    }
    .txn-viz-sale-coin {
      position: absolute; top: 18%; right: 20%; width: 11px; height: 11px;
      border-radius: 999px; background: radial-gradient(circle at 30% 30%, #fde68a, #f59e0b);
      border: 1px solid #d97706;
      animation: txn-coin-pop 2.4s ease-in-out infinite;
    }
    .txn-viz-today.txn-viz-sale { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35); }
    .txn-viz-purchase { background: linear-gradient(145deg, #fff7ed, #fed7aa); }
    .txn-viz-box {
      position: absolute; bottom: 20%; left: 24%; right: 24%; height: 46%;
      background: linear-gradient(180deg, #fdba74, #ea580c);
      border-radius: 3px;
      border: 1px solid rgba(154, 52, 18, 0.25);
    }
    .txn-viz-box-arrow {
      position: absolute; top: 22%; left: 50%; transform: translateX(-50%);
      width: 0; height: 0;
      border-left: 5px solid transparent; border-right: 5px solid transparent;
      border-bottom: 8px solid #ea580c;
    }
    .txn-viz-expense { background: linear-gradient(145deg, #fef2f2, #fecaca); }
    .txn-viz-receipt {
      position: absolute; top: 14%; left: 28%; right: 28%; bottom: 18%;
      background: #fff; border: 1px solid #fca5a5; border-radius: 2px;
    }
    .txn-viz-receipt-fold {
      position: absolute; top: 24%; left: 34%; right: 34%; height: 2px; background: #fecaca;
      box-shadow: 0 5px 0 #fecaca, 0 10px 0 #fecaca;
    }
    .txn-viz-withdraw { background: linear-gradient(145deg, #faf5ff, #e9d5ff); }
    .txn-viz-wallet {
      position: absolute; bottom: 18%; left: 20%; right: 20%; height: 48%;
      background: linear-gradient(180deg, #c4b5fd, #7c3aed);
      border-radius: 5px 5px 8px 8px;
    }
    .txn-viz-wallet-bill {
      position: absolute; top: 20%; left: 50%; width: 14px; height: 9px;
      transform: translateX(-50%) rotate(-8deg);
      background: #fef08a; border: 1px solid #eab308; border-radius: 2px;
      animation: txn-bill-pull 2.5s ease-in-out infinite;
    }
    .txn-viz-drop { background: linear-gradient(145deg, #f0fdfa, #99f6e4); }
    .txn-viz-safe {
      position: absolute; bottom: 16%; left: 24%; right: 24%; height: 52%;
      background: linear-gradient(180deg, #5eead4, #0f766e);
      border-radius: 4px;
    }
    .txn-viz-safe-slot {
      position: absolute; top: 22%; left: 50%; transform: translateX(-50%);
      width: 16px; height: 4px; background: #134e4a; border-radius: 2px;
    }
    .txn-viz-drop::after {
      content: ''; position: absolute; top: 10%; left: 46%; width: 8px; height: 12px;
      background: #fef08a; border: 1px solid #ca8a04; border-radius: 2px;
      animation: txn-bill-drop 2.2s ease-in-out infinite;
    }
    .txn-viz-lottery { background: linear-gradient(145deg, #f5f3ff, #ddd6fe); }
    .txn-viz-ticket {
      position: absolute; top: 16%; left: 22%; right: 22%; bottom: 16%;
      background: #fff; border: 1px dashed #a78bfa; border-radius: 3px;
    }
    .txn-viz-ticket-star {
      position: absolute; top: 28%; left: 50%; transform: translateX(-50%);
      font-size: 12px; color: #7c3aed; line-height: 1;
    }
    .txn-viz-income { background: linear-gradient(145deg, #eff6ff, #bfdbfe); }
    .txn-viz-income-ring {
      position: absolute; inset: 18%; border-radius: 999px;
      border: 3px solid #3b82f6; opacity: 0.55;
    }
    .txn-viz-income-plus {
      position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
      font-size: 18px; font-weight: 900; color: #1d4ed8; line-height: 1;
    }
    .txn-viz-generic { background: #f4f4f5; }
    .txn-viz-generic-dot {
      position: absolute; inset: 30%; border-radius: 999px; background: #a1a1aa;
    }
    .txn-card {
      padding: 0.75rem 0.85rem; background: #fff;
      transition: background 0.12s ease;
    }
    .txn-card:active { background: #fafafa; }
    .txn-card-head { display: flex; align-items: flex-start; gap: 0.65rem; }
    .txn-card-copy { flex: 1; min-width: 0; }
    .txn-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-top: 0.25rem; }
    .txn-card-notes { margin-top: 0.45rem; padding-left: 3.4rem; }
    .txn-card-actions { display: flex; justify-content: flex-end; margin-top: 0.45rem; }
    .txn-row-daily_sale { border-left: 3px solid #34d399; }
    .txn-row-purchase { border-left: 3px solid #fb923c; }
    .txn-row-expense { border-left: 3px solid #f87171; }
    .txn-row-withdrawal { border-left: 3px solid #a78bfa; }
    .txn-row-cash_drop { border-left: 3px solid #2dd4bf; }
    .txn-row-lottery_payout { border-left: 3px solid #c084fc; }
    .txn-card.txn-row-daily_sale,
    .txn-card.txn-row-purchase,
    .txn-card.txn-row-expense,
    .txn-card.txn-row-withdrawal,
    .txn-card.txn-row-cash_drop,
    .txn-card.txn-row-lottery_payout { border-left: none; }
    .txn-card.txn-row-daily_sale { box-shadow: inset 3px 0 0 #34d399; }
    .txn-card.txn-row-purchase { box-shadow: inset 3px 0 0 #fb923c; }
    .txn-card.txn-row-expense { box-shadow: inset 3px 0 0 #f87171; }
    .txn-card.txn-row-withdrawal { box-shadow: inset 3px 0 0 #a78bfa; }
    .txn-card.txn-row-cash_drop { box-shadow: inset 3px 0 0 #2dd4bf; }
    .txn-card.txn-row-lottery_payout { box-shadow: inset 3px 0 0 #c084fc; }
    @keyframes txn-coin-pop {
      0%, 100% { transform: translateY(0); opacity: 1; }
      50% { transform: translateY(-3px); opacity: 0.85; }
    }
    @keyframes txn-bill-pull {
      0%, 100% { transform: translateX(-50%) translateY(0) rotate(-8deg); }
      50% { transform: translateX(-70%) translateY(-2px) rotate(-14deg); }
    }
    @keyframes txn-bill-drop {
      0%, 100% { transform: translateY(0); opacity: 0.35; }
      50% { transform: translateY(8px); opacity: 1; }
    }
    @media (prefers-reduced-motion: reduce) {
      .txn-viz-sale-coin, .txn-viz-wallet-bill, .txn-viz-drop::after { animation: none !important; }
    }
    .txn-actions {
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 0.35rem;
    }
    .txn-action-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 2rem;
      height: 2rem;
      border-radius: 0.65rem;
      border: 1px solid transparent;
      background: #fff;
      cursor: pointer;
      transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
      box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    }
    .txn-action-btn svg { width: 0.95rem; height: 0.95rem; pointer-events: none; }
    .txn-action-btn:active:not(:disabled) { transform: scale(0.94); }
    .txn-action-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
    .txn-action-edit {
      color: #047857;
      border-color: #a7f3d0;
      background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
    }
    .txn-action-edit:hover:not(:disabled) {
      background: #d1fae5;
      border-color: #6ee7b7;
      box-shadow: 0 2px 8px rgba(16, 185, 129, 0.18);
    }
    .txn-action-del {
      color: #dc2626;
      border-color: #fecaca;
      background: linear-gradient(180deg, #fff5f5 0%, #fef2f2 100%);
    }
    .txn-action-del:hover:not(:disabled) {
      background: #fee2e2;
      border-color: #fca5a5;
      box-shadow: 0 2px 8px rgba(239, 68, 68, 0.16);
    }
    .ledger-form-highlight,
    .store-edit-highlight {
      box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35);
      transition: box-shadow 0.3s ease;
    }

    /* Screen routes (v273) — body.dataset.mrstoreRoute / .mr-route-* */
    body.mr-route-money #feature-browser-tab,
    body.mr-route-lottery #feature-browser-tab,
    body.mr-route-stock #feature-browser-tab {
      opacity: 0.35;
      pointer-events: none;
    }

    /* ── Strict Today (v274): shift screen only ── */
    /* Store Brain (#home-dashboard-status) stays pinned — do NOT hide it here */
    body.mr-strict-today.mr-today-surface #tools-hub,
    body.mr-strict-today.mr-today-surface #section-ledger-metrics,
    body.mr-strict-today.mr-today-surface #section-ledger-table,
    body.mr-strict-today.mr-today-surface #home-trust-bar,
    body.mr-strict-today.mr-today-surface #home-more-insights-bar,
    body.mr-strict-today.mr-today-surface #home-quick-actions,
    body.mr-strict-today.mr-today-surface .app-footer-hint {
      display: none !important;
    }
    /* Page ledger NEVER on Today — books open only in #ledger-modal */
    body.mr-strict-today.mr-route-reports #section-ledger-metrics,
    body.mr-strict-today.mr-route-reports #section-ledger-table {
      display: none !important;
    }
    body.mr-strict-today.mr-route-reports #tools-hub {
      display: none !important;
    }

    /* Never force page table on Today (that put txn cards BEHIND shift UI) */
    body.mr-force-ledger #section-ledger-metrics,
    body.mr-force-ledger #section-ledger-table,
    body.mr-force-ledger.mr-today-surface #section-ledger-metrics,
    body.mr-force-ledger.mr-today-surface #section-ledger-table,
    body.mr-strict-today #section-ledger-metrics,
    body.mr-strict-today #section-ledger-table,
    body.mr-today-surface #section-ledger-metrics,
    body.mr-today-surface #section-ledger-table {
      display: none !important;
      visibility: hidden !important;
      pointer-events: none !important;
    }

    /* Tap & go strip */
    .tap-go-head {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 0.5rem;
      padding: 0.15rem 0.35rem 0.45rem;
    }
    .tap-go-title {
      font-size: 0.6875rem;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #52525b;
    }
    .tap-go-sub {
      font-size: 0.625rem;
      color: #a1a1aa;
      font-weight: 500;
    }
    .sell-actions-tapgo {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 0.4rem;
    }
    .sell-actions-tapgo.sell-actions-5 {
      grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    @media (max-width: 380px) {
      .sell-actions-tapgo.sell-actions-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }
    .home-strict-urgent {
      margin-top: 0.5rem;
    }
    .strict-urgent-btn {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.65rem 0.85rem;
      border-radius: 0.9rem;
      border: 1px solid #fdba74;
      background: linear-gradient(135deg, #fff7ed 0%, #fff 70%);
      font-size: 0.75rem;
      font-weight: 700;
      color: #9a3412;
      text-align: left;
    }
    .strict-urgent-ico { font-size: 1rem; }
    .strict-urgent-txt { flex: 1; min-width: 0; }
    .strict-urgent-go { color: #ea580c; font-weight: 800; }
    .home-plan-cta-inline {
      background: none;
      border: none;
      padding: 0;
      font: inherit;
      font-weight: 800;
      color: #059669;
      text-decoration: underline;
      cursor: pointer;
    }
    .sell-act-more {
      border: 1px dashed rgba(16, 185, 129, 0.45) !important;
      background: linear-gradient(180deg, #ecfdf5, #fff) !important;
    }

    /* More hub — door to smart insights + tools */
    #more-hub-modal {
      position: fixed !important;
      inset: 0 !important;
      z-index: 530 !important;
      align-items: flex-end;
      justify-content: center;
      padding: 0;
    }
    @media (min-width: 640px) {
      #more-hub-modal { align-items: center; padding: 1rem !important; }
    }
    #more-hub-modal:not(.hidden) { display: flex !important; }

    /*
     * Tools opened FROM More / Insights must sit ABOVE the hub (530).
     * Vendor hub was z-106 → opened “behind” More.
     */
    body.mr-more-open [id$="-modal"]:not(#more-hub-modal):not(.hidden),
    body.mr-more-open #feature-browser-tab:not(.hidden),
    body.mr-more-open #feature-browser-modal:not(.hidden),
    body.mr-more-open #money-panel:not(.hidden),
    body.mr-more-open #money-drawer:not(.hidden),
    body.mr-more-open #command-palette-modal:not(.hidden),
    body.mr-more-open #photo-memory-viewer:not(.hidden),
    body.mr-more-open #catalog-modal:not(.hidden),
    body.mr-more-open #vendor-hub-modal:not(.hidden),
    body.mr-more-open #vendor-order-modal:not(.hidden),
    body.mr-more-open #lottery-hub-modal:not(.hidden),
    body.mr-more-open #hr-hub-modal:not(.hidden),
    body.mr-more-open #reports-modal:not(.hidden),
    body.mr-more-open #manage-stores-modal:not(.hidden) {
      z-index: 560 !important;
    }
    .more-hub-sheet {
      max-width: min(36rem, 100vw) !important;
      width: 100% !important;
      box-sizing: border-box;
    }
    #more-hub-body {
      overflow-x: hidden !important;
      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch;
      padding: 0.75rem 0.85rem 1rem !important;
    }
    body.mr-more-open { overflow: hidden !important; }
    .more-hub-search-btn {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.55rem 0.75rem;
      border-radius: 0.75rem;
      border: 1px solid #e4e4e7;
      background: #fafafa;
      font-size: 0.75rem;
      font-weight: 700;
      color: #3f3f46;
    }
    .more-hub-sec-title {
      font-size: 0.5625rem;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: #71717a;
      margin-bottom: 0.4rem;
    }
    .more-hub-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.35rem;
    }
    .more-hub-tile {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      text-align: left;
      padding: 0.5rem 0.55rem;
      border-radius: 0.75rem;
      border: 1px solid rgba(24, 24, 27, 0.08);
      background: #fff;
      box-shadow: 0 1px 2px rgba(0,0,0,0.03);
      min-width: 0;
      max-width: 100%;
      overflow: hidden;
    }
    .more-hub-tile:active { transform: scale(0.98); }
    .more-hub-tile-ico { font-size: 0.95rem; flex-shrink: 0; line-height: 1; }
    .more-hub-tile-copy {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 0.05rem;
      overflow: hidden;
    }
    .more-hub-tile-title {
      font-size: 0.6875rem;
      font-weight: 800;
      color: #18181b;
      letter-spacing: -0.02em;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .more-hub-tile-desc {
      font-size: 0.5625rem;
      color: #71717a;
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .more-hub-tile-go { color: #a1a1aa; font-weight: 800; font-size: 0.75rem; flex-shrink: 0; }
    .more-hub-foot {
      font-size: 0.5625rem;
      color: #a1a1aa;
      line-height: 1.45;
      text-align: center;
      padding: 0.45rem 0.25rem 0.35rem;
    }
    .more-hub-insight-mount {
      overflow-x: hidden;
      max-width: 100%;
    }
    .more-hub-insight-mount .card {
      margin: 0;
      max-width: 100%;
      overflow: hidden;
      box-sizing: border-box;
    }
    /* Shrink insight card type inside More so tiles don't blow out */
    #more-hub-insight-mount .insight-stat-val,
    #more-hub-insight-mount .text-lg,
    #more-hub-insight-mount .text-xl {
      font-size: 0.95rem !important;
      line-height: 1.15 !important;
    }
    #more-hub-insight-mount .insight-tile,
    #more-hub-insight-mount [class*="insight-tile"] {
      min-width: 0 !important;
      padding: 0.45rem 0.5rem !important;
    }
    #more-hub-insight-mount .grid {
      gap: 0.35rem !important;
    }
    #more-hub-insight-mount .font-bold.text-base,
    #more-hub-insight-mount .text-base {
      font-size: 0.8125rem !important;
    }
    #more-hub-insight-mount .text-sm {
      font-size: 0.75rem !important;
    }
    #more-hub-insight-mount .p-4 {
      padding: 0.65rem !important;
    }
    .more-hub-sec-note {
      font-size: 0.5625rem;
      color: #71717a;
      margin: 0 0 0.45rem;
      line-height: 1.35;
    }
    .more-panel[hidden],
    .more-panel:not(.is-open) {
      display: none !important;
    }
    .more-panel.is-open {
      display: block !important;
    }

    /* Strict Today layout — kill empty gaps, logical order */
    body.mr-strict-today #home-insights.mr-strict-insights {
      display: flex;
      flex-direction: column;
      gap: 0.65rem;
    }
    /* v884: ONLY the real .hidden class — never [class*="hidden"]
       which also matched overflow-hidden and wiped Brain/Pulse/Chat after paint. */
    body.mr-strict-today #home-insights.mr-strict-insights > .hidden {
      display: none !important;
      margin: 0 !important;
      padding: 0 !important;
      min-height: 0 !important;
      border: none !important;
    }
    /* v879: Store insights FIRST (alerts/data), then activity (chat/staff/tasks)
       Default flex order is 0 — unlisted cards were jumping above brain/pulse. */
    body.mr-strict-today #home-insights > #home-dashboard-status { order: 1 !important; } /* Store Brain / PRO chips */
    body.mr-strict-today #home-insights > #home-store-pulse { order: 2 !important; } /* Smart Quick Insights */
    body.mr-strict-today #home-insights > #home-live-strip { order: 3 !important; }
    body.mr-strict-today #home-insights > #home-smart-insights { display: none !important; } /* merged legacy host */
    body.mr-strict-today #home-insights > #home-combined-insights { display: none !important; }
    body.mr-strict-today #home-insights > #home-tonight-strip { order: 4 !important; } /* Opens / Z */
    body.mr-strict-today #home-insights > #home-stock-road { order: 5 !important; }   /* What's Out */
    body.mr-strict-today #home-insights > #home-sell-actions { order: 6 !important; }
    body.mr-strict-today #home-insights > #home-strict-urgent { order: 7 !important; }
    /* Activity blocks AFTER store data */
    body.mr-strict-today #home-insights > #home-team-chat-owner { order: 20 !important; }
    body.mr-strict-today #home-insights > #home-team-chat { order: 20 !important; }
    body.mr-strict-today #home-insights > #home-staff-adoption { order: 21 !important; }
    body.mr-strict-today #home-insights > #home-shift-note { order: 22 !important; }
    body.mr-strict-today #home-insights > #home-shift-tasks { order: 23 !important; }
    body.mr-strict-today #home-insights > #home-connections { order: 24 !important; }
    body.mr-strict-today #home-insights > #home-pos-parallel { order: 25 !important; }
    body.mr-strict-today #home-insights > #section-quick-add { order: 30 !important; }
    body.mr-strict-today #home-insights > *:not([id]) { order: 99 !important; }
    /* v883: no display:block force — cards keep natural layout once .hidden is removed */
    body.mr-strict-today #home-store-pulse.qi-live-card {
      padding: 0.85rem 0.9rem;
    }
    body.mr-strict-today #home-store-pulse .qi-kpi-val {
      font-size: 0.9rem;
    }
    body.mr-strict-today #home-store-pulse .qi-hero-amount {
      font-size: 1.35rem;
    }
    body.mr-strict-today #home-store-pulse .sqi-head {
      align-items: flex-start;
    }
    body.mr-strict-today #home-store-pulse .sqi-head-actions,
    body.mr-strict-today #home-store-pulse .sqi-head-btns {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      flex-shrink: 0;
      gap: 0.3rem;
    }
    body.mr-strict-today #home-store-pulse .mm-tiles {
      margin-top: 0 !important;
    }

    /* Advanced Money mood card */
    .mm-card { padding: 0 !important; overflow: hidden; }
    .mm-inner { padding: 0.8rem 0.85rem 0.75rem; }
    .mm-head {
      display: flex; align-items: flex-start; justify-content: space-between;
      gap: 0.5rem; margin-bottom: 0.55rem;
    }
    .mm-kicker {
      font-size: 0.8125rem; font-weight: 800; color: #4c1d95;
      letter-spacing: -0.02em;
    }
    .mm-sub {
      font-size: 0.625rem; color: #71717a; margin-top: 0.15rem;
      line-height: 1.35; font-weight: 600;
    }
    .mm-head-actions { display: flex; gap: 0.3rem; flex-shrink: 0; }
    .mm-chip-btn {
      font-size: 0.625rem; font-weight: 800; padding: 0.35rem 0.55rem;
      border-radius: 999px; border: 1px solid #e9d5ff; background: #faf5ff; color: #6d28d9;
    }
    .mm-chip-primary {
      background: #6d28d9; color: #fff; border-color: #6d28d9;
    }
    .mm-hero {
      display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.65rem 1rem;
      margin-bottom: 0.55rem;
    }
    .mm-hero-stat { min-width: 5.5rem; }
    .mm-hero-l {
      display: block; font-size: 0.5rem; font-weight: 800;
      text-transform: uppercase; letter-spacing: 0.07em; color: #a1a1aa;
    }
    .mm-hero-v {
      display: block; font-size: 1.15rem; font-weight: 800;
      letter-spacing: -0.03em; margin-top: 0.1rem;
    }
    .mm-hero-meta { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-left: auto; }
    .mm-pill {
      font-size: 0.5625rem; font-weight: 800; padding: 0.2rem 0.45rem;
      border-radius: 999px; background: #f4f4f5; color: #52525b;
    }
    .mm-pace-row { margin-bottom: 0.55rem; }
    .mm-pace-labels {
      display: flex; justify-content: space-between; gap: 0.5rem;
      font-size: 0.5625rem; font-weight: 700; color: #71717a; margin-bottom: 0.25rem;
    }
    .mm-pace-bar { height: 0.35rem; border-radius: 999px; background: #e4e4e7; overflow: hidden; }
    .mm-pace-bar .health-bar-fill { height: 100%; border-radius: 999px; }
    .mm-tiles {
      display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem;
    }
    @media (min-width: 640px) {
      .mm-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    }
    .mm-tile {
      text-align: left; min-width: 0; padding: 0.55rem 0.6rem;
      border-radius: 0.8rem; border: 1px solid rgba(24,24,27,0.07);
      background: linear-gradient(165deg, #fafafa, #fff);
    }
    .mm-tile-l {
      display: block; font-size: 0.5rem; font-weight: 800;
      text-transform: uppercase; letter-spacing: 0.06em; color: #a1a1aa;
    }
    .mm-tile-v {
      display: block; font-size: 0.95rem; font-weight: 800;
      letter-spacing: -0.02em; margin-top: 0.15rem; color: #18181b;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .mm-tile-h {
      display: block; font-size: 0.5rem; color: #71717a; font-weight: 600;
      margin-top: 0.1rem; line-height: 1.25;
    }
    .mm-up { color: #059669 !important; }
    .mm-down { color: #dc2626 !important; }
    .mm-muted { color: #a1a1aa !important; }
    .mm-indigo { color: #4f46e5 !important; }
    .mm-orange { color: #ea580c !important; }

    /* Combined insights — rich tiles */
    #home-combined-insights,
    .home-combined-insights {
      padding: 0;
      overflow: hidden;
      border-color: rgba(139, 92, 246, 0.22) !important;
      box-shadow: 0 4px 18px rgba(91, 33, 182, 0.07);
    }
    .ci-card-inner { padding: 0.85rem 0.9rem 0.75rem; }
    .ci-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 0.6rem;
      margin-bottom: 0.65rem;
    }
    .ci-kicker {
      font-size: 0.8125rem;
      font-weight: 800;
      color: #1e1b4b;
      letter-spacing: -0.02em;
    }
    .ci-next {
      font-size: 0.6875rem;
      color: #71717a;
      margin-top: 0.2rem;
      font-weight: 600;
    }
    .ci-all-btn {
      flex-shrink: 0;
      font-size: 0.6875rem;
      font-weight: 800;
      color: #6d28d9;
      background: #f5f3ff;
      border: 1px solid #ddd6fe;
      border-radius: 999px;
      padding: 0.4rem 0.7rem;
    }
    .ci-tiles {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.45rem;
    }
    @media (min-width: 640px) {
      .ci-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    }
    .ci-tile {
      text-align: left;
      padding: 0.65rem 0.7rem;
      border-radius: 0.85rem;
      border: 1px solid rgba(24, 24, 27, 0.07);
      background: linear-gradient(165deg, #fafafa 0%, #fff 100%);
      min-height: 4.5rem;
    }
    .ci-tile:active { transform: scale(0.98); }
    .ci-tile-l {
      display: block;
      font-size: 0.5625rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: #a1a1aa;
    }
    .ci-tile-v {
      display: block;
      font-size: 1.05rem;
      font-weight: 800;
      letter-spacing: -0.03em;
      margin-top: 0.2rem;
      color: #18181b;
    }
    .ci-tile-h {
      display: block;
      font-size: 0.5625rem;
      color: #71717a;
      margin-top: 0.15rem;
      font-weight: 600;
      line-height: 1.25;
    }
    .ci-up { color: #059669 !important; }
    .ci-down { color: #dc2626 !important; }
    .ci-warn { color: #d97706 !important; }
    .ci-muted { color: #a1a1aa !important; }
    .ci-foot {
      margin-top: 0.55rem;
      font-size: 0.625rem;
      color: #71717a;
      font-weight: 600;
    }

    /* More hub tabs — reliable click targets */
    .more-tabs {
      display: flex;
      gap: 0.3rem;
      padding: 0.2rem;
      background: #f4f4f5;
      border-radius: 0.85rem;
      margin-bottom: 0.65rem;
      position: sticky;
      top: 0;
      z-index: 5;
      flex-shrink: 0;
    }
    .more-tab {
      flex: 1;
      min-height: 2.35rem;
      padding: 0.45rem 0.35rem;
      border: 1px solid transparent;
      border-radius: 0.65rem;
      font-size: 0.6875rem;
      font-weight: 800;
      color: #71717a;
      background: transparent;
      cursor: pointer;
      pointer-events: auto;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }
    .more-tab.is-active {
      background: #fff;
      color: #059669;
      border-color: rgba(16, 185, 129, 0.25);
      box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }
    .more-tab:focus-visible {
      outline: 2px solid #10b981;
      outline-offset: 1px;
    }
    .more-hub-grid-compact { margin-bottom: 0.55rem; }

    /* Manage Stores — pro modal (flex column + body scrolls) */
    #manage-stores-modal .manage-stores-panel {
      background: linear-gradient(165deg, #fafafa 0%, #ffffff 12rem);
      border-color: rgba(24, 24, 27, 0.08);
      box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      max-height: min(94vh, 100dvh);
    }
    .manage-stores-header {
      background: rgba(255, 255, 255, 0.97);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border-bottom-color: rgba(24, 24, 27, 0.06) !important;
      z-index: 4;
      flex-shrink: 0;
    }
    .manage-stores-body {
      flex: 1 1 auto;
      min-height: 0;
      overflow-x: hidden;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      touch-action: pan-y;
      padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
    }
    .manage-stores-title {
      font-size: 1.0625rem;
      font-weight: 700;
      letter-spacing: -0.02em;
      color: #18181b;
      line-height: 1.2;
    }
    .manage-stores-subtitle {
      font-size: 0.625rem;
      color: #71717a;
      margin-top: 0.15rem;
      letter-spacing: 0.01em;
    }
    .manage-stores-close {
      font-size: 0.6875rem;
      font-weight: 600;
      color: #52525b;
      border-color: rgba(24, 24, 27, 0.1);
      background: #fff;
      transition: background 0.15s ease, border-color 0.15s ease;
    }
    .manage-stores-close:hover { background: #f4f4f5; border-color: rgba(24, 24, 27, 0.16); }
    .manage-stores-add {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      font-weight: 600;
      letter-spacing: -0.01em;
      box-shadow: 0 2px 8px rgba(5, 150, 105, 0.22);
      transition: transform 0.12s ease, box-shadow 0.15s ease;
    }
    .manage-stores-add:active { transform: scale(0.98); }
    .manage-store-card {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.75rem 0.85rem;
      border-radius: 1rem;
      border: 1px solid rgba(24, 24, 27, 0.08);
      background: #fff;
      transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
    }
    .manage-store-card:hover {
      border-color: rgba(16, 185, 129, 0.28);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    }
    .manage-store-card-active {
      border-color: rgba(16, 185, 129, 0.45);
      background: linear-gradient(135deg, #ecfdf5 0%, #fff 55%);
      box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.12);
    }
    .manage-store-card-icon {
      width: 2.5rem;
      height: 2.5rem;
      border-radius: 0.75rem;
      background: linear-gradient(145deg, #f4f4f5, #fff);
      border: 1px solid rgba(24, 24, 27, 0.06);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.1rem;
      flex-shrink: 0;
    }
    .manage-store-card-active .manage-store-card-icon {
      background: linear-gradient(145deg, #d1fae5, #ecfdf5);
      border-color: rgba(16, 185, 129, 0.2);
    }
    .manage-store-card-name {
      font-size: 0.875rem;
      font-weight: 700;
      color: #18181b;
      letter-spacing: -0.02em;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .manage-store-card-meta {
      font-size: 0.625rem;
      color: #71717a;
      margin-top: 0.1rem;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .manage-store-card-chip {
      display: inline-block;
      margin-top: 0.35rem;
      font-size: 0.5625rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: #6d28d9;
      background: rgba(139, 92, 246, 0.08);
      border: 1px solid rgba(139, 92, 246, 0.14);
      padding: 0.15rem 0.45rem;
      border-radius: 9999px;
    }
    .manage-store-btn {
      font-size: 0.6875rem;
      font-weight: 700;
      padding: 0.35rem 0.7rem;
      border-radius: 0.625rem;
      border: 1px solid transparent;
      transition: background 0.12s ease, border-color 0.12s ease;
    }
    .manage-store-btn-edit {
      color: #047857;
      background: #ecfdf5;
      border-color: rgba(16, 185, 129, 0.25);
    }
    .manage-store-btn-edit:hover { background: #d1fae5; }
    .manage-store-btn-publish {
      color: #fbbf24;
      background: #0f172a;
      border-color: #1e293b;
      font-weight: 800;
    }
    .manage-store-btn-publish:hover {
      background: #1e293b;
      color: #fde68a;
    }
    .manage-store-btn-del {
      color: #b91c1c;
      background: transparent;
      border-color: transparent;
    }
    .manage-store-btn-del:hover { background: #fef2f2; }
    /* Legacy floating publish FAB — hide forever (lives on Manage Stores cards) */
    #mrstore-publish-free-site-btn {
      display: none !important;
      visibility: hidden !important;
      pointer-events: none !important;
    }
    .ms-section {
      border-radius: 1rem;
      border: 1px solid rgba(24, 24, 27, 0.07);
      background: #fff;
      padding: 0.85rem 0.9rem;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    }
    .ms-section-violet { border-color: rgba(139, 92, 246, 0.14); background: linear-gradient(180deg, #faf5ff 0%, #fff 4rem); }
    .ms-section-indigo { border-color: rgba(99, 102, 241, 0.14); background: linear-gradient(180deg, #eef2ff 0%, #fff 3rem); }
    .ms-section-emerald { border-color: rgba(16, 185, 129, 0.14); background: linear-gradient(180deg, #ecfdf5 0%, #fff 3rem); }
    .ms-section-head {
      display: flex;
      align-items: flex-start;
      gap: 0.55rem;
      margin-bottom: 0.65rem;
    }
    .ms-section-icon {
      font-size: 1.1rem;
      line-height: 1;
      flex-shrink: 0;
      margin-top: 0.05rem;
    }
    .ms-section-title {
      font-size: 0.75rem;
      font-weight: 700;
      color: #18181b;
      letter-spacing: -0.01em;
    }
    .ms-section-sub {
      font-size: 0.625rem;
      color: #71717a;
      margin-top: 0.12rem;
      line-height: 1.4;
    }
    .ms-field-label {
      display: block;
      font-size: 0.625rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: #71717a;
      margin-bottom: 0.3rem;
    }
    .ms-field {
      width: 100%;
      border: 1px solid rgba(24, 24, 27, 0.1);
      border-radius: 0.75rem;
      padding: 0.5rem 0.75rem;
      font-size: 0.875rem;
      background: #fff;
      transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }
    .ms-field:focus {
      outline: none;
      border-color: rgba(16, 185, 129, 0.45);
      box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
    }
    .ms-field::placeholder { color: #a1a1aa; }
    .store-edit-banner-pro {
      border-radius: 0.875rem;
      border: 1px solid rgba(16, 185, 129, 0.22);
      background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
      padding: 0.65rem 0.8rem;
    }
    .store-edit-banner-pro strong {
      font-size: 0.75rem;
      font-weight: 800;
      color: #065f46;
      letter-spacing: -0.01em;
    }
    .store-edit-banner-pro span { font-size: 0.625rem; color: #047857; }
    .store-hours-grid-pro {
      border-radius: 0.75rem;
      border: 1px solid rgba(139, 92, 246, 0.12);
      background: rgba(255, 255, 255, 0.75);
      overflow: hidden;
    }
    .store-hours-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem;
      padding: 0.45rem 0.65rem;
      border-bottom: 1px solid rgba(24, 24, 27, 0.04);
      transition: background 0.12s ease;
    }
    .store-hours-row:last-child { border-bottom: none; }
    .store-hours-row:nth-child(even) { background: rgba(250, 245, 255, 0.35); }
    .store-hours-row--closed { opacity: 0.72; }
    .store-hours-row--closed .store-hours-day { color: #a1a1aa; }
    .store-hours-day {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      width: 5.75rem;
      flex-shrink: 0;
      cursor: pointer;
    }
    .store-hours-day input[type="checkbox"] {
      width: 1rem;
      height: 1rem;
      accent-color: #7c3aed;
      border-radius: 0.25rem;
    }
    .store-hours-day-name {
      font-size: 0.75rem;
      font-weight: 600;
      color: #3f3f46;
      letter-spacing: -0.01em;
    }
    .store-hours-time {
      flex: 1;
      min-width: 6.25rem;
      border: 1px solid rgba(139, 92, 246, 0.18);
      border-radius: 0.5rem;
      padding: 0.35rem 0.5rem;
      font-size: 0.8125rem;
      background: #fff;
    }
    .store-hours-time:disabled {
      opacity: 0.4;
      background: #f4f4f5;
    }
    .store-hours-sep { color: #d4d4d8; font-size: 0.75rem; flex-shrink: 0; }
    .store-hours-closed-badge {
      font-size: 0.625rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: #a1a1aa;
      padding: 0.2rem 0.5rem;
      border-radius: 9999px;
      background: #f4f4f5;
    }
    .store-hours-copy-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      font-size: 0.625rem;
      font-weight: 700;
      color: #6d28d9;
      padding: 0.35rem 0.55rem;
      border-radius: 0.5rem;
      border: 1px solid rgba(139, 92, 246, 0.2);
      background: rgba(255, 255, 255, 0.8);
      transition: background 0.12s ease;
    }
    .store-hours-copy-btn:hover { background: #faf5ff; }
    .store-ops-preview-pro {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
      gap: 0.45rem;
      margin-top: 0.65rem;
    }
    .store-ops-preview-stat {
      border-radius: 0.625rem;
      border: 1px solid rgba(139, 92, 246, 0.12);
      background: #fff;
      padding: 0.45rem 0.55rem;
      text-align: center;
    }
    .store-ops-preview-stat-l {
      font-size: 0.5rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.07em;
      color: #7c3aed;
    }
    .store-ops-preview-stat-v {
      font-size: 0.8125rem;
      font-weight: 800;
      color: #18181b;
      margin-top: 0.15rem;
      font-variant-numeric: tabular-nums;
      letter-spacing: -0.02em;
    }
    .store-ops-preview-empty {
      font-size: 0.625rem;
      color: #71717a;
      line-height: 1.45;
      padding: 0.5rem 0.55rem;
      border-radius: 0.625rem;
      background: rgba(255, 255, 255, 0.8);
      border: 1px dashed rgba(139, 92, 246, 0.2);
    }
    .shop-cat-label-pro {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      border-radius: 0.75rem;
      border: 1px solid rgba(24, 24, 27, 0.08);
      padding: 0.65rem 0.8rem;
      cursor: pointer;
      background: #fff;
      transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
    }
    .shop-cat-label-pro:hover {
      border-color: rgba(16, 185, 129, 0.3);
      background: #f0fdf4;
    }
    .shop-cat-label-pro:has(input:checked) {
      border-color: rgba(16, 185, 129, 0.4);
      background: linear-gradient(135deg, #ecfdf5, #fff);
      box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.1);
    }
    .shop-cat-label-pro input { accent-color: #059669; width: 1rem; height: 1rem; }
    .shop-cat-label-pro .shop-cat-icon { font-size: 1.15rem; }
    .shop-cat-label-pro .shop-cat-text { font-size: 0.8125rem; font-weight: 600; color: #27272a; }
    .ms-save-bar {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      padding-top: 0.85rem;
      margin-top: 0.85rem;
      border-top: 1px solid rgba(24, 24, 27, 0.06);
      position: sticky;
      bottom: 0;
      z-index: 3;
      background: rgba(255, 255, 255, 0.97);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
      margin-left: -0.15rem;
      margin-right: -0.15rem;
      padding-left: 0.15rem;
      padding-right: 0.15rem;
    }
    .ms-save-primary {
      flex: 1;
      min-width: 8rem;
      font-weight: 700;
      letter-spacing: -0.01em;
      box-shadow: 0 3px 10px rgba(5, 150, 105, 0.25);
    }
    .ms-save-ghost {
      font-weight: 600;
      color: #52525b;
      border-color: rgba(24, 24, 27, 0.12);
      background: #fff;
    }
    .ms-save-danger {
      font-weight: 600;
      color: #b91c1c;
      border-color: rgba(239, 68, 68, 0.25);
      background: #fff;
    }
    .manage-stores-team {
      border-top-color: rgba(16, 185, 129, 0.12) !important;
    }

    .photo-viewer-nav {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 2.5rem;
      height: 2.5rem;
      border-radius: 9999px;
      background: rgba(255,255,255,0.14);
      color: #fff;
      font-size: 1.35rem;
      line-height: 1;
      border: 1px solid rgba(255,255,255,0.2);
      transition: background 0.15s ease, opacity 0.15s ease;
    }
    .photo-viewer-nav:hover:not(:disabled) { background: rgba(255,255,255,0.24); }
    .photo-viewer-nav:disabled { cursor: default; }
    .photo-viewer-nav-side {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      z-index: 2;
      width: 2.75rem;
      height: 2.75rem;
      font-size: 1.5rem;
      background: rgba(0,0,0,0.45);
      border-color: rgba(255,255,255,0.15);
    }
    #btn-photo-viewer-prev-side { left: 0.5rem; }
    #btn-photo-viewer-next-side { right: 0.5rem; }
    .store-hero { background: transparent; border: none; box-shadow: none; }
    .store-dock-sentinel { height: 0; width: 100%; pointer-events: none; }
    .store-dock {
      position: relative;
      z-index: 40;
      align-self: stretch;
      width: 100%;
      padding: 0.2rem 0;
    }
    .store-dock-curve-shell {
      display: flex;
      align-items: center;
      gap: 0.15rem;
      padding: 0.28rem 0.35rem 0.28rem 0.25rem;
      background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 55%, #f0fdf4 100%);
      border: 1px solid rgba(16, 185, 129, 0.22);
      border-radius: 9999px;
      box-shadow: 0 4px 18px rgba(16, 185, 129, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
      transition: border-radius 0.2s ease, box-shadow 0.2s ease, padding 0.2s ease;
    }
    .store-dock.is-pinned {
      position: fixed;
      left: 0;
      right: 0;
      z-index: 45;
      max-width: 64rem;
      margin-left: auto;
      margin-right: auto;
      padding: 0 0.65rem 0.35rem;
      box-sizing: border-box;
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }
    .store-dock.is-pinned .store-dock-curve-shell {
      border-radius: 0 0 1.65rem 1.65rem;
      border-top-color: rgba(16, 185, 129, 0.08);
      box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.85);
      padding-bottom: 0.45rem;
    }
    .store-dock.is-pinned::before {
      content: '';
      position: absolute;
      left: 0.75rem;
      right: 0.75rem;
      bottom: 0;
      height: 0.5rem;
      background: radial-gradient(ellipse 85% 100% at 50% 0%, rgba(16, 185, 129, 0.12) 0%, transparent 72%);
      pointer-events: none;
    }
    .store-slide-viewport {
      flex: 1;
      min-width: 0;
      overflow-x: auto;
      overflow-y: hidden;
      scroll-snap-type: x mandatory;
      scroll-behavior: smooth;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
    }
    .store-slide-viewport::-webkit-scrollbar { display: none; }
    .store-slide-track {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      padding: 0.1rem 0.35rem;
      min-height: 2.15rem;
    }
    .store-slide-chip {
      flex: 0 0 auto;
      scroll-snap-align: center;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      padding: 0.32rem 0.7rem 0.32rem 0.32rem;
      border-radius: 9999px;
      border: 1.5px solid rgba(16, 185, 129, 0.15);
      background: rgba(255, 255, 255, 0.82);
      color: #3f3f46;
      font-size: 0.75rem;
      font-weight: 700;
      line-height: 1.1;
      white-space: nowrap;
      max-width: 11rem;
      cursor: pointer;
      touch-action: manipulation;
      transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
      -webkit-tap-highlight-color: transparent;
    }
    .store-slide-chip:active { transform: scale(0.97); }
    .store-slide-chip:hover:not(.active) {
      border-color: rgba(16, 185, 129, 0.35);
      background: #f0fdf4;
    }
    .store-slide-chip.active {
      background: linear-gradient(135deg, #10b981 0%, #059669 100%);
      border-color: #047857;
      color: #fff;
      box-shadow: 0 3px 12px rgba(16, 185, 129, 0.38);
      transform: scale(1.03);
    }
    .store-slide-chip.active .store-picker-avatar {
      box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
    }
    .store-slide-chip.store-slide-chip-all:not(.active) {
      border-color: rgba(99, 102, 241, 0.25);
      background: rgba(238, 242, 255, 0.9);
    }
    .store-slide-chip-empty {
      border-style: dashed;
      color: #047857;
      padding-left: 0.65rem;
    }
    .store-slide-label {
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 8.5rem;
    }
    .store-slide-chip .store-picker-avatar {
      width: 1.5rem;
      height: 1.5rem;
      border-radius: 0.45rem;
      font-size: 0.6875rem;
      box-shadow: none;
    }
    .store-slide-nav,
    .store-slide-manage {
      flex-shrink: 0;
      width: 1.65rem;
      height: 1.65rem;
      border-radius: 9999px;
      border: 1px solid rgba(16, 185, 129, 0.2);
      background: rgba(255, 255, 255, 0.9);
      color: #047857;
      font-size: 1rem;
      font-weight: 700;
      line-height: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      touch-action: manipulation;
      transition: background 0.12s ease, transform 0.12s ease;
      -webkit-tap-highlight-color: transparent;
    }
    .store-slide-nav:hover,
    .store-slide-manage:hover { background: #ecfdf5; }
    .store-slide-nav:active,
    .store-slide-manage:active { transform: scale(0.94); }
    .store-slide-nav.hidden { display: none; }
    .store-slide-manage { font-size: 0.8rem; }
    .store-slide-pulse {
      animation: storeSlidePulse 0.85s ease 2;
    }
    @keyframes storeSlidePulse {
      0%, 100% { box-shadow: 0 3px 12px rgba(16, 185, 129, 0.38); }
      50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.35), 0 3px 12px rgba(16, 185, 129, 0.38); }
    }
    @media (max-width: 639px) {
      .quick-store-title { display: none; }
      .store-slide-nav { width: 1.5rem; height: 1.5rem; font-size: 0.9rem; }
      .store-slide-chip { font-size: 0.6875rem; max-width: 9.5rem; }
    }
    .store-picker-wrap,
    .store-picker { position: relative; }
    .store-picker-trigger {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      width: 100%;
      padding: 0.875rem 1rem;
      background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
      border: 1.5px solid rgba(16, 185, 129, 0.28);
      border-radius: 1.25rem;
      box-shadow: 0 2px 14px rgba(16, 185, 129, 0.1);
      transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
      text-align: left;
      outline: none;
      -webkit-tap-highlight-color: transparent;
    }
    .store-picker-trigger:hover { border-color: rgba(16, 185, 129, 0.5); }
    .store-picker-trigger:active { transform: scale(0.99); }
    .store-picker-trigger:focus-visible {
      outline: 2px solid #10b981;
      outline-offset: 2px;
    }
    .store-picker-trigger.open {
      border-color: #10b981;
      border-bottom-left-radius: 0.5rem;
      border-bottom-right-radius: 0.5rem;
      box-shadow: none;
    }
    .store-picker-avatar {
      width: 2.75rem;
      height: 2.75rem;
      border-radius: 1rem;
      background: linear-gradient(135deg, #10b981 0%, #047857 100%);
      color: #fff;
      font-weight: 800;
      font-size: 1.125rem;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      overflow: hidden;
      box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
    }
    .store-picker-avatar img { width: 100%; height: 100%; object-fit: cover; }
    .store-picker-avatar-sm {
      width: 2.25rem;
      height: 2.25rem;
      border-radius: 0.75rem;
      font-size: 0.9375rem;
      box-shadow: none;
    }
    .store-picker-avatar-all { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); }
    .store-picker-name {
      font-size: 1.125rem;
      font-weight: 700;
      color: #18181b;
      line-height: 1.2;
    }
    @media (min-width: 640px) {
      .store-picker-name { font-size: 1.375rem; }
    }
    .store-picker-chevron {
      color: #10b981;
      font-size: 1.125rem;
      flex-shrink: 0;
      transition: transform 0.2s ease;
      margin-left: 0.25rem;
    }
    .store-picker-trigger.open .store-picker-chevron { transform: rotate(180deg); }
    .store-picker-menu {
      position: absolute;
      left: 0;
      right: 0;
      top: 100%;
      margin-top: -1px;
      z-index: 70;
      background: #fff;
      border: 1.5px solid #10b981;
      border-top: 1px solid rgba(16, 185, 129, 0.2);
      border-radius: 0 0 1.25rem 1.25rem;
      box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
      padding: 0.5rem;
      max-height: min(16rem, 45vh);
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }
    .store-picker-menu.hidden { display: none !important; }
    .store-hero.picker-open { z-index: 2; }
    .po-vendor-wrap { position: relative; }
    .po-vendor-suggest {
      position: absolute;
      left: 0;
      right: 0;
      top: 100%;
      margin-top: 2px;
      z-index: 30;
      background: #fff;
      border: 1.5px solid #fb923c;
      border-radius: 0.75rem;
      box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
      max-height: min(14rem, 40vh);
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }
    .po-vendor-suggest.hidden { display: none !important; }
    .po-vendor-suggest-hint {
      padding: 0.45rem 0.75rem;
      font-size: 0.65rem;
      color: #a1a1aa;
      border-bottom: 1px solid #f4f4f5;
    }
    .po-vendor-suggest-item {
      display: block;
      width: 100%;
      text-align: left;
      padding: 0.55rem 0.75rem;
      font-size: 0.8125rem;
      border: none;
      background: transparent;
      cursor: pointer;
      color: #18181b;
      border-bottom: 1px solid #f4f4f5;
      touch-action: manipulation;
    }
    .po-vendor-suggest-item:last-child { border-bottom: none; }
    .po-vendor-suggest-item:active,
    .po-vendor-suggest-item:hover { background: #fff7ed; }
    .po-vendor-suggest-match {
      font-size: 0.6rem;
      color: #ea580c;
      margin-top: 0.1rem;
      line-height: 1.3;
    }
    .store-picker-option-title {
      display: block;
      font-weight: 600;
      font-size: 0.875rem;
      color: #18181b;
      line-height: 1.25;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .store-picker-option-sub {
      display: block;
      font-size: 10px;
      color: #71717a;
      margin-top: 2px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .store-hero { overflow: visible; }
    body.store-picker-open #app-main-column > *:not(#store-hero) {
      opacity: 0.45;
      pointer-events: none;
      transition: opacity 0.15s ease;
    }
    .store-picker-option {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      width: 100%;
      padding: 0.7rem 0.75rem;
      border-radius: 1rem;
      border: 1px solid transparent;
      background: transparent;
      cursor: pointer;
      text-align: left;
      transition: background 0.12s ease, border-color 0.12s ease;
    }
    .store-picker-option:hover { background: #f0fdf4; }
    .store-picker-option.active {
      background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
      border-color: rgba(16, 185, 129, 0.22);
    }
    .store-picker-check {
      width: 1.25rem;
      color: #10b981;
      font-weight: 700;
      font-size: 0.875rem;
      flex-shrink: 0;
      text-align: center;
    }
    .store-picker-footer {
      margin-top: 0.35rem;
      padding-top: 0.35rem;
      border-top: 1px solid rgba(15, 23, 42, 0.06);
    }
    html.dark .store-picker-trigger {
      background: linear-gradient(135deg, #1e293b 0%, #134e4a 100%);
      border-color: rgba(52, 211, 153, 0.25);
    }
    html.dark .store-picker-name { color: #f4f4f5; }
    html.dark .store-picker-menu { background: #1e293b; border-color: rgba(255,255,255,0.08); }
    html.dark .store-picker-option:hover { background: rgba(16, 185, 129, 0.12); }
    html.dark .store-picker-option.active { background: rgba(16, 185, 129, 0.18); border-color: rgba(52, 211, 153, 0.3); }
    html.dark .store-picker-option-title { color: #f4f4f5; }
    html.dark .store-picker-option-sub { color: #a1a1aa; }
    .nav-tool {
      transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
    }
    .nav-tool:hover { transform: translateY(-1px); }
    .nav-tool-primary { box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
    .quick-btn {
      transition: transform 0.15s ease, box-shadow 0.15s ease;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    }
    .quick-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18); }
    .quick-btn-icon { font-size: 1.35rem; line-height: 1; margin-bottom: 0.2rem; }
    .metrics-card { background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%); }
    .ledger-preset { transition: all 0.15s ease; }
    .ledger-kpi { transition: transform 0.12s ease, box-shadow 0.15s ease; }
    .ledger-kpi:hover { transform: translateY(-1px); }
    .ledger-kpi-active { ring: 2px; box-shadow: 0 0 0 2px currentColor; }
    .kpi-accent { width: 4px; border-radius: 4px; flex-shrink: 0; align-self: stretch; }
    .net-hero { background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%); }
    .net-hero-positive { border-color: #6ee7b7; background: linear-gradient(135deg, #a7f3d0 0%, #d1fae5 35%, #ecfdf5 100%); }
    .net-hero-negative { border-color: #fca5a5; background: linear-gradient(135deg, #fecaca 0%, #fee2e2 40%, #fef2f2 100%); }
    .ledger-kpi-tile-sales { background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 55%, #ffffff 100%) !important; border-color: #6ee7b7 !important; }
    .ledger-kpi-tile-purchase { background: linear-gradient(135deg, #fed7aa 0%, #ffedd5 55%, #ffffff 100%) !important; border-color: #fdba74 !important; }
    .ledger-kpi-tile-expense { background: linear-gradient(135deg, #fecaca 0%, #fee2e2 55%, #ffffff 100%) !important; border-color: #fca5a5 !important; }
    .ledger-secondary-pill { font-size: 0.75rem; font-weight: 600; }
    .ledger-secondary-pill-draw { background: linear-gradient(135deg, #ede9fe, #f5f3ff); border: 1px solid #c4b5fd; color: #5b21b6; }
    .ledger-secondary-pill-drop { background: linear-gradient(135deg, #ccfbf1, #f0fdfa); border: 1px solid #5eead4; color: #0f766e; }
    .ledger-secondary-pill-other { background: linear-gradient(135deg, #dbeafe, #eff6ff); border: 1px solid #93c5fd; color: #1d4ed8; }
    .health-bar { height: 8px; border-radius: 999px; background: #e4e4e7; overflow: hidden; }
    .health-bar-fill { height: 100%; border-radius: 999px; transition: width 0.5s ease; }
    .stat-chip { font-size: 10px; padding: 0.25rem 0.625rem; border-radius: 999px; font-weight: 600; }
    .page-enter { animation: fadeUp 0.45s ease both; }
    .page-enter-delay-1 { animation-delay: 0.06s; }
    .page-enter-delay-2 { animation-delay: 0.12s; }
    .page-enter-delay-3 { animation-delay: 0.18s; }
    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .txn-row:nth-child(even) { background: rgba(248, 250, 252, 0.7); }
    @media (max-width: 640px) {
      .quick-btn { min-height: 72px; font-size: 12px; }
      .quick-btn > div:last-child { font-size: 9px; }
      .quick-btn-icon { font-size: 1.2rem; }
      table th, table td { padding-left: 8px; padding-right: 8px; padding-top: 6px; padding-bottom: 6px; }
      .max-w-5xl { max-width: 100%; }
    }
    /* Mobile forms: full-width stack, no cramped side-by-side fields */
    @media (max-width: 767px) {
      #form-fields,
      #reports-detail-form-fields,
      #auth-form-fields,
      .mobile-stack-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
      }
      #form-fields > div,
      #reports-detail-form-fields > div,
      .mobile-stack-grid > div {
        width: 100% !important;
        min-width: 0 !important;
        flex: 0 0 auto !important;
      }
      #add-form input,
      #add-form select,
      #add-form textarea,
      #reports-detail-form input,
      #reports-detail-form select,
      #reports-detail-form textarea,
      #auth-modal input,
      #auth-modal select,
      #store-form-panel input,
      #store-form-panel select,
      #team-invite-panel input,
      #vendor-order-modal input:not([type="checkbox"]):not([type="radio"]),
      #vendor-order-modal select,
      #vendor-hub-modal input:not([type="checkbox"]):not([type="radio"]),
      #query-modal input,
      #query-modal select,
      #history-modal input,
      #history-modal select,
      #search-input,
      #history-search {
        font-size: 16px !important;
        min-height: 44px;
        width: 100%;
        max-width: 100%;
      }
      #add-form label,
      #reports-detail-form label {
        display: block;
        margin-bottom: 0.2rem;
      }
      #vendor-order-modal input[type="checkbox"],
      #vendor-order-modal input[type="radio"] {
        width: 1rem !important;
        height: 1rem !important;
        min-height: 0 !important;
        min-width: 0 !important;
        max-width: none !important;
        flex-shrink: 0;
        margin: 0;
      }
      .po-strict-toggle {
        padding: 0.5rem 0.65rem !important;
        font-size: 10px !important;
        line-height: 1.35;
        align-items: center !important;
        gap: 0.5rem !important;
      }
      .po-preview-strict {
        font-size: 9px !important;
        padding: 0.35rem 0.5rem !important;
        margin: 0.35rem 0.5rem 0 !important;
        line-height: 1.3 !important;
      }
      .page-enter { animation: none; }
      .app-header,
      #bottom-nav {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
      }
    }
    @media (min-width: 768px) and (max-width: 1023px) {
      #form-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      #reports-detail-form-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    .touch-target { min-height: 44px; min-width: 44px; }
    #reports-bars .bg-emerald-500, #reports-bars .bg-orange-500, #reports-bars .bg-red-500 {
      transition: height 0.3s ease;
    }
    .mini-bar { transition: height 0.35s ease; min-height: 4px; }
    .today-card-ok { background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 70%); border-color: rgba(16, 185, 129, 0.2); }
    .today-card-miss { background: linear-gradient(135deg, #fffbeb 0%, #ffffff 70%); border-color: rgba(245, 158, 11, 0.35); }
    .vendor-alert-pill { border-left: 3px solid #f97316; }
    #bottom-nav {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 250 !important;
      background: rgba(255, 255, 255, 0.97);
      /* Blur is expensive on phones — skip on lite */
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      border-top: 1px solid rgba(15, 23, 42, 0.08);
      padding-bottom: env(safe-area-inset-bottom, 0px);
      pointer-events: auto !important;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
      isolation: isolate;
    }
    body.mr-mobile-lite #bottom-nav {
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
      background: #fff !important;
    }
    /* While scripts enqueue, keep UI tappable (don't freeze interactions) */
    html.mr-script-loading #bottom-nav,
    html.mr-script-loading .bnav-btn,
    html.mr-script-loading .store-slide-chip {
      pointer-events: auto !important;
    }
    #bottom-nav .bnav-btn {
      transition: transform 0.1s ease, background 0.1s ease, color 0.1s ease;
      border-radius: 14px;
      pointer-events: auto !important;
      cursor: pointer;
      -webkit-user-select: none;
      user-select: none;
      min-height: 48px;
    }
    .bnav-btn { transition: transform 0.12s ease, background 0.15s ease; border-radius: 14px; }
    .bnav-btn:active { transform: scale(0.96); }
    .bnav-btn-active { color: #059669; background: rgba(16, 185, 129, 0.12); }
    .goal-bar { height: 10px; border-radius: 999px; background: #e4e4e7; overflow: hidden; }
    .goal-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #10b981, #059669); transition: width 0.5s ease; }
    .bill-learn-badge {
      font-size: 0.5625rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
      color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0;
      border-radius: 0.65rem; padding: 0.35rem 0.55rem; margin-bottom: 0.45rem; line-height: 1.35;
    }
    .stock-low { border-left: 3px solid #ef4444; }
    .stock-warn { border-left: 3px solid #f59e0b; }
    .low-stock-visual {
      flex-shrink: 0;
      display: flex;
      align-items: flex-end;
      justify-content: center;
      gap: 0.35rem;
    }
    .low-stock-visual .catalog-stock-viz { line-height: 0; }
    .low-stock-visual .cat-thumb-wrap { flex-shrink: 0; }
    .stock-low .low-stock-body,
    .stock-warn .low-stock-body { min-width: 0; flex: 1; }
    .check-ok { color: #059669; }
    .check-miss { color: #d97706; }
    .sale-shortcut { transition: transform 0.12s ease; }
    .sale-shortcut:active { transform: scale(0.97); }
    #pwa-install-banner { padding-bottom: env(safe-area-inset-bottom, 0px); }
    body.has-pwa-banner { padding-bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px)); }
    html.capacitor-native #pwa-install-banner,
    html.mobile-app #pwa-install-banner { display: none !important; }
    html.capacitor-native body.has-pwa-banner,
    html.mobile-app body.has-pwa-banner { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
    html.capacitor-native .app-header,
    html.mobile-app .app-header { padding-top: max(env(safe-area-inset-top, 0px), 0.25rem); }
    html.mobile-app .guest-landing-mobile,
    html.capacitor-native .guest-landing-mobile {
      padding-bottom: 1rem;
    }
    html.mobile-app .guest-landing-mobile .gl-hero-mobile,
    html.capacitor-native .guest-landing-mobile .gl-hero-mobile {
      min-height: auto;
      padding-bottom: 0.5rem;
    }
    html.mobile-app .guest-landing-mobile .gl-hero-cta-stack,
    html.capacitor-native .guest-landing-mobile .gl-hero-cta-stack {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      width: 100%;
    }
    html.mobile-app .guest-landing-mobile .gl-hero-cta-stack .gl-btn,
    html.capacitor-native .guest-landing-mobile .gl-hero-cta-stack .gl-btn {
      width: 100%;
      justify-content: center;
    }
    html.mobile-app .guest-landing-mobile .gl-demo-dash-compact,
    html.capacitor-native .guest-landing-mobile .gl-demo-dash-compact {
      margin-top: 1rem;
    }
    html.mobile-app .guest-landing .gl-reveal,
    html.capacitor-native .guest-landing .gl-reveal {
      opacity: 1 !important;
      transform: none !important;
    }
    html.mobile-app .guest-landing .gl-hero-badge-dot,
    html.capacitor-native .guest-landing .gl-hero-badge-dot {
      animation: none !important;
    }
    @media (prefers-reduced-motion: no-preference) {
      html.mobile-app .guest-landing *,
      html.capacitor-native .guest-landing * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
    }
    .insight-tile { background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%); }
    .insight-mood-banner {
      position: relative;
      border-radius: 1rem;
      padding: 0.65rem 0.75rem;
      overflow: hidden;
      border: 1px solid transparent;
    }
    .insight-mood-banner-glow {
      position: absolute;
      inset: 0;
      opacity: 0.55;
      pointer-events: none;
    }
    .insight-mood-banner-title { font-size: 0.72rem; font-weight: 800; line-height: 1.25; }
    .insight-mood-banner-body { font-size: 0.62rem; margin-top: 0.2rem; line-height: 1.4; opacity: 1; }
    .insight-mood-fresh .insight-mood-banner { background: linear-gradient(135deg, #ede9fe 0%, #f5f3ff 100%); border-color: #a78bfa; color: #5b21b6; }
    .insight-mood-push .insight-mood-banner { background: linear-gradient(135deg, #fde68a 0%, #fffbeb 100%); border-color: #fbbf24; color: #92400e; }
    .insight-mood-steady .insight-mood-banner { background: linear-gradient(135deg, #e4e4e7 0%, #f4f4f5 100%); border-color: #a1a1aa; color: #27272a; }
    .insight-mood-win .insight-mood-banner { background: linear-gradient(135deg, #6ee7b7 0%, #d1fae5 100%); border-color: #10b981; color: #064e3b; }
    .insight-mood-rich .insight-mood-banner { background: linear-gradient(135deg, #fcd34d 0%, #fde68a 50%, #fef3c7 100%); border-color: #f59e0b; color: #78350f; }
    .insight-mood-rich .insight-mood-banner-glow {
      background: radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.35), transparent 55%),
                  radial-gradient(circle at 80% 60%, rgba(16, 185, 129, 0.2), transparent 50%);
      animation: insight-rich-glow 3.5s ease-in-out infinite;
    }
    .insight-mood-card.insight-mood-rich { border-color: rgba(251, 191, 36, 0.45); box-shadow: 0 8px 28px rgba(251, 191, 36, 0.12); }
    .insight-mood-card.insight-mood-win { border-color: rgba(16, 185, 129, 0.28); }
    .insight-mood-card.insight-mood-push { border-color: rgba(245, 158, 11, 0.28); }
    .insight-tile-mood-rich, .insight-tile-mood-win { border-color: rgba(251, 191, 36, 0.35) !important; background: linear-gradient(135deg, #fffbeb 0%, #ffffff 80%) !important; }
    .insight-tile-mood-push { border-color: rgba(253, 230, 138, 0.8) !important; background: linear-gradient(135deg, #fffbeb 0%, #ffffff 85%) !important; }
    .insight-val-pop { text-shadow: 0 0 20px rgba(251, 191, 36, 0.35); }
    .insight-mood-week-rich { color: #b45309 !important; font-size: 0.68rem; }
    .qi-kpi-rich { border-color: #fbbf24; background: linear-gradient(180deg, #fde68a, #fffbeb); }
    .qi-kpi-win { border-color: #34d399; background: linear-gradient(180deg, #a7f3d0, #ecfdf5); }
    .qi-kpi-push { border-color: #fbbf24; background: linear-gradient(180deg, #fde68a, #fffbeb); }
    .qi-kpi-sales { background: linear-gradient(180deg, #bbf7d0, #ecfdf5); border-color: #34d399; }
    .qi-kpi-stock { background: linear-gradient(180deg, #fed7aa, #fff7ed); border-color: #fb923c; }
    .qi-kpi-op { background: linear-gradient(180deg, #c7d2fe, #eef2ff); border-color: #6366f1; }
    .qi-kpi-net { background: linear-gradient(180deg, #a7f3d0, #ecfdf5); border-color: #10b981; }
    .qi-kpi-net-glow .qi-kpi-val { animation: insight-net-pulse 2.8s ease-in-out infinite; }
    .today-card-mood-rich.today-card-ok { background: linear-gradient(135deg, #fef3c7 0%, #ecfdf5 45%, #ffffff 80%); border-color: rgba(251, 191, 36, 0.45); }
    .today-card-mood-win.today-card-ok { background: linear-gradient(135deg, #d1fae5 0%, #ffffff 75%); }
    .today-card-mood-push.today-card-miss { background: linear-gradient(135deg, #fffbeb 0%, #ffffff 75%); border-color: rgba(251, 191, 36, 0.3); }
    .net-hero-mood-rich { border-color: #fbbf24 !important; background: linear-gradient(135deg, #fde68a 0%, #d1fae5 45%, #ecfdf5 100%) !important; }
    .net-hero-mood-rich .net-hero-amount { animation: insight-net-pulse 3s ease-in-out infinite; }
    .net-hero-mood-win { border-color: #34d399 !important; background: linear-gradient(135deg, #6ee7b7 0%, #d1fae5 50%, #ecfdf5 100%) !important; }
    .net-hero-mood-push { border-color: #fbbf24 !important; background: linear-gradient(135deg, #fde68a 0%, #fef3c7 50%, #fffbeb 100%) !important; }
    .ledger-health-banner { border-width: 1px; }
    .ledger-health-mood-win { background: linear-gradient(135deg, #bbf7d0 0%, #ecfdf5 100%) !important; border-color: #34d399 !important; }
    .ledger-health-mood-rich { background: linear-gradient(135deg, #fde68a 0%, #ecfdf5 100%) !important; border-color: #fbbf24 !important; }
    .ledger-health-mood-rich { box-shadow: 0 4px 18px rgba(251, 191, 36, 0.15); }
    .money-hero-mood-rich {
      background: linear-gradient(168deg, #fffbeb 0%, #fef3c7 38%, #f5f3ff 100%) !important;
      border-color: #fde68a !important;
    }
    .money-hero-mood-win {
      background: linear-gradient(168deg, #ecfdf5 0%, #f5f3ff 52%, #ffffff 100%) !important;
      border-color: #a7f3d0 !important;
    }
    .money-rich-badge {
      text-align: center;
      font-size: 0.62rem;
      font-weight: 800;
      color: #92400e;
      background: #fffbeb;
      border: 1px solid #fde68a;
      border-radius: 0.75rem;
      padding: 0.35rem 0.6rem;
      margin-bottom: 0.35rem;
      animation: insight-rich-badge 2.5s ease-in-out infinite;
    }
    .money-hero-mood-rich .money-total-amount { animation: insight-net-pulse 2.8s ease-in-out infinite; }
    @keyframes insight-rich-glow {
      0%, 100% { opacity: 0.45; transform: scale(1); }
      50% { opacity: 0.75; transform: scale(1.02); }
    }
    @keyframes insight-net-pulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.03); }
    }
    @keyframes insight-rich-badge {
      0%, 100% { opacity: 0.9; }
      50% { opacity: 1; transform: translateY(-1px); }
    }
    @media (prefers-reduced-motion: reduce) {
      .insight-mood-rich .insight-mood-banner-glow,
      .qi-kpi-net-glow .qi-kpi-val,
      .net-hero-mood-rich .net-hero-amount,
      .money-hero-mood-rich .money-total-amount,
      .money-rich-badge,
      .qi-suggestion-pulse,
      .qi-pos-pulse { animation: none !important; }
    }
    .qi-kpi {
      border-radius: 0.75rem;
      padding: 0.55rem 0.5rem;
      text-align: center;
      border: 1px solid #d4d4d8;
      background: #fafafa;
    }
    .qi-kpi-label { font-size: 0.58rem; color: #3f3f46; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
    .qi-kpi-val { font-size: 0.82rem; font-weight: 800; tabular-nums; margin-top: 0.1rem; }
    .qi-kpi-sub { font-size: 0.55rem; color: #52525b; margin-top: 0.1rem; font-weight: 600; }
    .qi-suggestion-stack { display: flex; flex-direction: column; gap: 0.32rem; }
    .qi-suggestion-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.15rem; }
    .qi-suggestion-head-sub { font-size: 0.5625rem; font-weight: 700; color: #a1a1aa; text-transform: uppercase; letter-spacing: 0.04em; }
    /* Compact task rows — white, quiet, left rail only */
    .qi-suggestion {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      border-radius: 0.75rem;
      border: 1px solid #ececef;
      background: #fff;
      padding: 0.45rem 0.5rem 0.45rem 0.6rem;
      box-shadow: none;
      transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
      position: relative;
      overflow: hidden;
      min-height: 2.85rem;
    }
    .qi-suggestion::before {
      content: '';
      position: absolute;
      left: 0; top: 0; bottom: 0;
      width: 3px;
      background: #d4d4d8;
      border-radius: 3px 0 0 3px;
    }
    .qi-suggestion:active { transform: scale(0.99); }
    .qi-suggestion-pulse {
      animation: none;
      border-color: #f0d0d0;
      box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.12);
    }
    .qi-suggestion-urgent { border-color: #f0e4e4; background: #fff; }
    .qi-suggestion-urgent::before { background: #ef4444; }
    .qi-suggestion-warn { border-color: #f0ebe0; background: #fff; }
    .qi-suggestion-warn::before { background: #f59e0b; }
    .qi-suggestion-tip { border-color: #e4eaf0; background: #fff; }
    .qi-suggestion-tip::before { background: #0ea5e9; }
    .qi-suggestion-good { border-color: #e2eee8; background: #fff; }
    .qi-suggestion-good::before { background: #10b981; }
    .qi-suggestion-partner { border-color: #e6e8f5; background: #fff; }
    .qi-suggestion-partner::before { background: #6366f1; }
    @keyframes qi-suggest-pulse {
      0%, 100% { box-shadow: none; }
      50% { box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.12); }
    }
    .qi-partner-banner {
      border-radius: 0.85rem;
      border: 1px solid #c7d2fe;
      background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
      padding: 0.65rem 0.75rem;
      margin-top: 0.75rem;
    }
    .qi-partner-banner-title { font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #4338ca; }
    .qi-partner-banner-body { font-size: 0.72rem; color: #312e81; margin-top: 0.35rem; line-height: 1.45; }
    .qi-partner-banner-body strong { color: #1e1b4b; }
    .qi-suggestion-icon {
      width: 2.05rem;
      height: 2.05rem;
      border-radius: 0.55rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      font-size: 0.85rem;
      flex-shrink: 0;
      background: #fafafa;
      border: 1px solid rgba(0,0,0,0.05);
      box-shadow: none;
      margin-left: 0;
    }
    .qi-suggestion-icon-viz { padding: 0; overflow: hidden; background: #fafafa; }
    .qi-suggestion-icon-viz .shelf-viz { width: 100%; height: 100%; border: none; border-radius: 0.65rem; }
    .qi-suggestion-icon-sale { background: linear-gradient(145deg, #ecfdf5, #d1fae5); color: #047857; }
    .qi-sale-register { font-size: 0.72rem; font-weight: 900; line-height: 1; }
    .qi-sale-amt { font-size: 0.45rem; font-weight: 800; margin-top: 1px; opacity: 0.85; }
    .qi-suggestion-icon-order { background: linear-gradient(145deg, #fff7ed, #ffedd5); }
    .qi-vendor-badge {
      font-size: 0.55rem; font-weight: 900; color: #9a3412; line-height: 1;
      background: #fff; border-radius: 4px; padding: 1px 3px; border: 1px solid #fdba74;
    }
    .qi-order-glyph { font-size: 0.65rem; line-height: 1; margin-top: 1px; }
    .qi-suggestion-icon-po { background: linear-gradient(145deg, #fef2f2, #fee2e2); color: #b91c1c; }
    .qi-po-count { font-size: 0.85rem; font-weight: 900; line-height: 1; }
    .qi-po-label { font-size: 0.42rem; font-weight: 800; letter-spacing: 0.06em; }
    .qi-suggestion-icon-cash { background: linear-gradient(145deg, #fef3c7, #fde68a); color: #92400e; }
    .qi-cash-stack { font-size: 0.9rem; font-weight: 900; line-height: 1; }
    .qi-cash-amt { font-size: 0.45rem; font-weight: 800; }
    .qi-suggestion-icon-pos { background: #eef2ff; color: #4338ca; font-size: 0.5rem; font-weight: 800; gap: 2px; }
    .qi-pos-pulse { width: 5px; height: 5px; border-radius: 999px; background: #6366f1; animation: qi-pos-blink 1.4s ease-in-out infinite; }
    .qi-suggestion-icon-trend { background: #fafafa; position: relative; }
    .qi-trend-up::after {
      content: ''; position: absolute; inset: 22% 18% 28% 18%;
      background: linear-gradient(135deg, transparent 45%, #10b981 45%, #10b981 55%, transparent 55%),
                  linear-gradient(45deg, #10b981 40%, #34d399 60%);
      clip-path: polygon(0% 80%, 35% 45%, 55% 60%, 100% 15%, 100% 35%, 55% 75%, 35% 60%);
    }
    .qi-trend-down::after {
      content: ''; position: absolute; inset: 22% 18% 28% 18%;
      background: linear-gradient(135deg, #ef4444, #f87171);
      clip-path: polygon(0% 25%, 40% 55%, 60% 40%, 100% 75%, 100% 55%, 60% 25%, 40% 40%);
    }
    .qi-suggestion-icon-good { background: #ecfdf5; color: #059669; font-weight: 900; font-size: 1.1rem; }
    @keyframes qi-pos-blink { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
    .qi-suggestion-tags { display: inline-flex; flex-wrap: wrap; gap: 0.2rem; margin-top: 0; }
    .qi-suggestion-tag {
      font-size: 0.5rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
      padding: 0.08rem 0.35rem; border-radius: 999px;
      background: #f4f4f5; border: 1px solid #e4e4e7; color: #52525b;
      display: inline-flex; align-items: center; line-height: 1.2;
    }
    .qi-suggestion-urgent .qi-suggestion-tag { border-color: #fecaca; color: #b91c1c; background: #fef2f2; }
    .qi-suggestion-body { flex: 1; min-width: 0; min-height: 0; }
    .qi-suggestion-title { font-size: 0.76rem; font-weight: 700; color: #18181b; line-height: 1.25; letter-spacing: -0.01em; }
    .qi-suggestion-detail {
      font-size: 0.6rem; color: #8b8b93; margin-top: 0.08rem; line-height: 1.3;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
    }
    .qi-narrative-stack { display: flex; flex-direction: column; gap: 0.35rem; }
    .qi-narrative {
      display: flex; align-items: flex-start; gap: 0.45rem;
      font-size: 0.68rem; line-height: 1.4;
      padding: 0.45rem 0.55rem; border-radius: 0.75rem; border: 1px solid transparent;
    }
    .qi-narrative-ico, .qi-narrative-vendor {
      flex-shrink: 0; width: 1.35rem; height: 1.35rem; border-radius: 0.45rem;
      display: flex; align-items: center; justify-content: center;
      font-size: 0.62rem; font-weight: 900;
    }
    .qi-narrative-vendor { background: #fff; border: 1px solid #e4e4e7; color: #52525b; font-size: 0.5rem; }
    .qi-narrative-warn { background: linear-gradient(135deg, #fffbeb, #fff); border-color: #fde68a; color: #92400e; }
    .qi-narrative-warn .qi-narrative-ico { background: #fef3c7; color: #b45309; }
    .qi-narrative-good { background: linear-gradient(135deg, #bbf7d0, #ecfdf5); border-color: #34d399; color: #064e3b; }
    .qi-narrative-good .qi-narrative-ico { background: #6ee7b7; color: #047857; }
    .qi-narrative-info { background: linear-gradient(135deg, #e4e4e7, #f4f4f5); border-color: #a1a1aa; color: #27272a; }
    .qi-narrative-tip { background: linear-gradient(135deg, #bae6fd, #e0f2fe); border-color: #38bdf8; color: #0c4a6e; }
    .qi-narrative-tip .qi-narrative-ico { background: #e0f2fe; color: #0369a1; }
    .qi-kpi-grid .qi-kpi { position: relative; overflow: hidden; }
    .qi-kpi-glyph {
      position: absolute; top: 0.2rem; right: 0.25rem;
      font-size: 0.55rem; opacity: 0.35; line-height: 1;
    }
    .qi-kpi-spark {
      height: 3px; border-radius: 999px; margin: 0.2rem 0.15rem 0;
      background: #e4e4e7; overflow: hidden;
    }
    .qi-kpi-spark::after {
      content: ''; display: block; height: 100%; border-radius: inherit;
      width: var(--qi-spark, 65%);
    }
    .qi-kpi-spark-up::after { width: 78%; background: linear-gradient(90deg, #34d399, #059669); }
    .qi-kpi-spark-down::after { width: 42%; background: linear-gradient(90deg, #fbbf24, #ef4444); }
    .qi-kpi-spark-stock::after { width: 55%; background: linear-gradient(90deg, #fb923c, #ea580c); }
    .qi-kpi-spark-op::after { width: 68%; background: linear-gradient(90deg, #818cf8, #4f46e5); }
    .qi-suggestion-btn {
      flex-shrink: 0;
      font-size: 0.65rem;
      font-weight: 700;
      padding: 0.35rem 0.7rem;
      min-width: 3.4rem;
      text-align: center;
      border-radius: 999px;
      border: 1px solid #e4e4e7;
      background: #fff;
      color: #18181b;
      touch-action: manipulation;
      line-height: 1.2;
    }
    .qi-suggestion-urgent .qi-suggestion-btn { background: #dc2626; border-color: #dc2626; color: #fff; }
    .qi-suggestion-warn .qi-suggestion-btn { background: #d97706; border-color: #d97706; color: #fff; }
    /* Owner digital self — mirror card */
    .owner-mirror-card {
      position: relative;
      overflow: hidden;
      background: linear-gradient(145deg, #ffffff 0%, #f8fafc 55%, #eef2ff 100%);
      border-color: #e0e7ff;
      box-shadow: 0 10px 28px rgba(99, 102, 241, 0.08);
    }
    .owner-mirror-card::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(circle at 12% 18%, rgba(99, 102, 241, 0.08), transparent 42%),
                  radial-gradient(circle at 88% 72%, rgba(16, 185, 129, 0.06), transparent 40%);
      pointer-events: none;
    }
    .owner-mirror-rich { border-color: #fcd34d; background: linear-gradient(145deg, #fffbeb, #fff, #fef3c7); box-shadow: 0 12px 32px rgba(251, 191, 36, 0.14); }
    .owner-mirror-win { border-color: #6ee7b7; background: linear-gradient(145deg, #ecfdf5, #fff, #f0fdf4); }
    .owner-mirror-push { border-color: #fdba74; background: linear-gradient(145deg, #fff7ed, #fff, #fffbeb); }
    .owner-mirror-head {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      position: relative;
      z-index: 1;
    }
    .owner-mirror-avatar {
      position: relative;
      width: 3.5rem;
      height: 3.5rem;
      border-radius: 1.1rem;
      border: none;
      padding: 0;
      flex-shrink: 0;
      cursor: pointer;
      background: linear-gradient(145deg, #eef2ff, #e0e7ff);
      overflow: visible;
      touch-action: manipulation;
    }
    .owner-mirror-avatar:active { transform: scale(0.97); }
    .owner-mirror-photo,
    .owner-mirror-initials {
      width: 100%;
      height: 100%;
      border-radius: 1rem;
      display: flex;
      align-items: center;
      justify-content: center;
      object-fit: cover;
      font-size: 1rem;
      font-weight: 900;
      color: #4338ca;
      background: linear-gradient(145deg, #eef2ff, #ddd6fe);
    }
    .owner-mirror-ring {
      position: absolute;
      inset: -3px;
      border-radius: 1.15rem;
      border: 2px solid #818cf8;
      pointer-events: none;
      animation: owner-mirror-ring 3s ease-in-out infinite;
    }
    .owner-mirror-avatar-rich .owner-mirror-ring { border-color: #fbbf24; }
    .owner-mirror-avatar-win .owner-mirror-ring { border-color: #34d399; }
    .owner-mirror-avatar-push .owner-mirror-ring { border-color: #fb923c; }
    .owner-mirror-avatar-steady .owner-mirror-ring { border-color: #a1a1aa; }
    .owner-mirror-avatar-fresh .owner-mirror-ring { border-color: #86efac; }
    @keyframes owner-mirror-ring {
      0%, 100% { opacity: 0.65; transform: scale(1); }
      50% { opacity: 1; transform: scale(1.03); }
    }
    .owner-mirror-copy { min-width: 0; flex: 1; }
    .owner-mirror-eyebrow {
      font-size: 0.5625rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.07em;
      color: #a1a1aa;
    }
    .owner-mirror-name {
      font-size: 1rem;
      font-weight: 900;
      color: #18181b;
      line-height: 1.2;
      margin-top: 0.1rem;
    }
    .owner-mirror-role {
      font-size: 0.62rem;
      font-weight: 600;
      color: #71717a;
      margin-top: 0.12rem;
    }
    .owner-mirror-mood {
      flex-shrink: 0;
      text-align: center;
      padding: 0.35rem 0.45rem;
      border-radius: 0.85rem;
      background: rgba(255,255,255,0.85);
      border: 1px solid #e4e4e7;
    }
    .owner-mirror-mood-emoji { display: block; font-size: 1.1rem; line-height: 1; }
    .owner-mirror-mood-label {
      display: block;
      font-size: 0.5rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: #71717a;
      margin-top: 0.15rem;
    }
    .owner-mirror-quote {
      position: relative;
      z-index: 1;
      margin-top: 0.7rem;
      padding: 0.55rem 0.65rem;
      border-radius: 0.85rem;
      background: rgba(255,255,255,0.82);
      border: 1px solid #e4e4e7;
      font-size: 0.72rem;
      font-weight: 600;
      color: #3f3f46;
      line-height: 1.45;
    }
    .owner-mirror-traits {
      position: relative;
      z-index: 1;
      display: flex;
      flex-wrap: wrap;
      gap: 0.3rem;
      margin-top: 0.55rem;
    }
    .owner-mirror-trait {
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
      font-size: 0.5625rem;
      font-weight: 800;
      padding: 0.18rem 0.45rem;
      border-radius: 999px;
      background: #fff;
      border: 1px solid #e4e4e7;
      color: #52525b;
    }
    .owner-mirror-trait-ico { font-size: 0.62rem; line-height: 1; }
    .owner-mirror-foot {
      position: relative;
      z-index: 1;
      margin-top: 0.5rem;
      font-size: 0.5rem;
      font-weight: 600;
      color: #a1a1aa;
      line-height: 1.35;
    }
    .owner-mirror-photo-illustrated { image-rendering: auto; }
    .owner-mirror-stores {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      margin-top: 0.55rem;
    }
    .owner-mirror-store-chip {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      width: 100%;
      text-align: left;
      padding: 0.45rem 0.55rem;
      border-radius: 0.8rem;
      border: 1px solid #e4e4e7;
      background: rgba(255,255,255,0.9);
      touch-action: manipulation;
    }
    .owner-mirror-store-chip:active { transform: scale(0.99); }
    .owner-mirror-store-rich { border-color: #fde68a; background: linear-gradient(90deg, #fffbeb, #fff); }
    .owner-mirror-store-win { border-color: #a7f3d0; background: linear-gradient(90deg, #ecfdf5, #fff); }
    .owner-mirror-store-push { border-color: #fed7aa; background: linear-gradient(90deg, #fff7ed, #fff); }
    .owner-mirror-store-emoji { font-size: 1rem; flex-shrink: 0; }
    .owner-mirror-store-name {
      font-size: 0.68rem;
      font-weight: 800;
      color: #18181b;
      flex: 1;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .owner-mirror-store-stat {
      font-size: 0.55rem;
      font-weight: 700;
      color: #71717a;
      flex-shrink: 0;
    }
    .owner-mirror-actions {
      position: relative;
      z-index: 1;
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
      margin-top: 0.6rem;
    }
    .owner-mirror-btn {
      font-size: 0.62rem;
      font-weight: 800;
      padding: 0.42rem 0.7rem;
      border-radius: 0.7rem;
      border: 1px solid #e4e4e7;
      background: #fff;
      color: #3f3f46;
      touch-action: manipulation;
    }
    .owner-mirror-btn-primary {
      background: linear-gradient(135deg, #eef2ff, #e0e7ff);
      border-color: #c7d2fe;
      color: #4338ca;
    }
    .owner-mirror-btn:active { transform: scale(0.97); }
    @media (prefers-reduced-motion: reduce) {
      .owner-mirror-ring { animation: none !important; }
    }
    /* v244 — Quick Insights live card polish */
    .qi-live-card {
      position: relative;
      overflow: hidden;
      background: linear-gradient(165deg, #ffffff 0%, #f0fdf4 45%, #ecfdf5 100%);
      box-shadow: 0 10px 32px rgba(16, 185, 129, 0.12), 0 1px 0 rgba(255,255,255,0.9) inset;
      border-width: 1px;
    }
    .qi-live-card::after {
      content: '';
      position: absolute;
      top: -40%; right: -15%;
      width: 55%; height: 70%;
      background: radial-gradient(circle, rgba(99, 102, 241, 0.07), transparent 68%);
      pointer-events: none;
    }
    .insight-mood-card.qi-live-card.insight-mood-rich {
      background: linear-gradient(165deg, #fde68a 0%, #fef3c7 35%, #ecfdf5 100%);
      border-color: #f59e0b !important;
      box-shadow: 0 12px 36px rgba(251, 191, 36, 0.22);
    }
    .insight-mood-card.qi-live-card.insight-mood-win {
      background: linear-gradient(165deg, #a7f3d0 0%, #d1fae5 40%, #ecfdf5 100%);
      border-color: #10b981 !important;
      box-shadow: 0 12px 36px rgba(16, 185, 129, 0.18);
    }
    .qi-hero-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 0.75rem;
      margin-top: 0.15rem;
      position: relative;
      z-index: 1;
    }
    .qi-hero-copy { min-width: 0; flex: 1; }
    .qi-hero-eyebrow {
      font-size: 0.5625rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.07em;
      color: #047857;
    }
    .qi-hero-headline {
      font-size: 0.95rem;
      font-weight: 800;
      color: #18181b;
      line-height: 1.3;
      margin-top: 0.15rem;
    }
    .qi-hero-stat-line { display: block; }
    .qi-hero-amount { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
    .qi-hero-meta {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 0.3rem;
      flex-shrink: 0;
    }
    .qi-meta-pill {
      font-size: 0.5625rem;
      font-weight: 800;
      padding: 0.22rem 0.5rem;
      border-radius: 999px;
      border: 1px solid #e4e4e7;
      background: rgba(255,255,255,0.92);
      color: #52525b;
      white-space: nowrap;
      box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    }
    .qi-meta-week { border-color: transparent; background: #f4f4f5; }
    .qi-panel {
      position: relative;
      z-index: 1;
      margin-top: 0.75rem;
      border-radius: 1rem;
      border: 1px solid #d4d4d8;
      background: #ffffff;
      padding: 0.65rem 0.7rem;
      box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    }
    .qi-panel-kpis {
      padding: 0.55rem 0.5rem 0.6rem;
      background: linear-gradient(180deg, #f0fdf4, #ffffff);
      border-color: #a7f3d0;
    }
    .qi-panel-narratives {
      padding: 0.55rem 0.65rem;
      background: linear-gradient(180deg, #ecfdf5, #ffffff);
      border-color: #6ee7b7;
    }
    .qi-panel-narratives .qi-narrative-stack { margin-top: 0; gap: 0.4rem; }
    .qi-panel-actions {
      padding: 0.55rem 0.5rem 0.45rem;
      background: #fafafa;
      border: 1px solid #f0f0f2;
      border-radius: 1rem;
    }
    .qi-panel-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      margin-bottom: 0.4rem;
      padding: 0 0.1rem;
    }
    .qi-panel-eyebrow {
      font-size: 0.7rem;
      font-weight: 800;
      color: #18181b;
      letter-spacing: -0.01em;
    }
    .qi-panel-sub {
      display: none; /* quieter home — store name / ranked text is noise */
    }
    .qi-panel-count {
      flex-shrink: 0;
      min-width: 1.25rem;
      height: 1.25rem;
      padding: 0 0.32rem;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 0.58rem;
      font-weight: 900;
      color: #52525b;
      background: #f4f4f5;
      border: 1px solid #e4e4e7;
    }
    .qi-more-steps {
      display: block;
      width: 100%;
      margin-top: 0.35rem;
      padding: 0.4rem 0.5rem;
      border: none;
      background: transparent;
      color: #6366f1;
      font-size: 0.65rem;
      font-weight: 700;
      text-align: center;
      border-radius: 0.55rem;
    }
    .qi-more-steps:active { background: #eef2ff; }
    .qi-empty-steps {
      font-size: 0.7rem;
      color: #a1a1aa;
      text-align: center;
      padding: 0.65rem 0.75rem;
      border: 1px dashed #e4e4e7;
      border-radius: 0.85rem;
      background: #fafafa;
    }
    /* Pay strip — slim, same family as next steps */
    .qi-pay-strip {
      margin-top: 0.5rem;
      padding: 0.4rem 0.55rem;
      border-radius: 0.7rem;
      border: 1px solid #e8eaf5;
      background: #f8f8fc;
      font-size: 0.65rem;
      line-height: 1.35;
      color: #3730a3;
    }
    .qi-pay-strip-warn {
      border-color: #fde68a;
      background: #fffbeb;
      color: #92400e;
    }
    .qi-pay-strip-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
    }
    .qi-pay-strip-text {
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      font-weight: 600;
    }
    .qi-pay-strip-k { font-weight: 800; }
    .qi-pay-strip-link {
      flex-shrink: 0;
      font-size: 0.6rem;
      font-weight: 800;
      color: #4f46e5;
      text-decoration: underline;
      background: none;
      border: none;
      padding: 0.15rem 0.1rem;
    }
    .qi-pay-strip-warn .qi-pay-strip-link { color: #b45309; }
    .qi-pay-strip-sub {
      margin-top: 0.15rem;
      font-size: 0.58rem;
      opacity: 0.9;
    }
    .qi-suggestion-visual {
      flex-shrink: 0;
      width: 2.15rem;
      height: 2.15rem;
      border-radius: 0.55rem;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #fafafa;
      border: 1px solid rgba(0,0,0,0.05);
      box-shadow: none;
      overflow: hidden;
    }
    .qi-suggestion-visual .qi-suggestion-icon {
      width: 100%;
      height: 100%;
      margin: 0;
      border: none;
      border-radius: 0.55rem;
      box-shadow: none;
    }
    .qi-suggestion-visual .qi-suggestion-icon-viz {
      position: relative;
      background: #f8fafc;
    }
    .qi-suggestion-visual .qi-suggestion-icon-viz .shelf-viz,
    .qi-suggestion-visual .qi-suggestion-icon-viz .shelf-viz-sm {
      width: 100%;
      height: 100%;
      min-width: 2.15rem;
      min-height: 2.15rem;
      max-width: 2.15rem;
      max-height: 2.15rem;
      border: none;
      background: transparent;
      overflow: hidden;
    }
    .qi-suggestion-visual .shelf-pouch-empty,
    .qi-suggestion-visual .shelf-cig-gap {
      position: relative;
      inset: auto;
      width: 2rem;
      height: 2.35rem;
      margin: 0 auto;
      border: 1.5px solid #cbd5e1;
      border-radius: 0.45rem;
      background: linear-gradient(180deg, #f8fafc, #e2e8f0);
      opacity: 1;
      transform: none;
      border-style: solid;
    }
    .qi-viz-out-badge {
      position: absolute;
      top: 3px;
      right: 3px;
      z-index: 4;
      font-size: 0.42rem;
      font-weight: 900;
      letter-spacing: 0.04em;
      color: #fff;
      background: #dc2626;
      border-radius: 4px;
      padding: 1px 4px;
      line-height: 1.2;
    }
    .qi-suggestion-top {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.25rem 0.3rem;
      margin-bottom: 0.08rem;
    }
    .qi-suggestion-top .qi-suggestion-tags {
      margin-top: 0;
      gap: 0.2rem;
    }
    .qi-suggestion-label {
      font-size: 0.5rem;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      padding: 0.08rem 0.35rem;
      border-radius: 999px;
      line-height: 1.2;
    }
    .qi-label-urgent { color: #b91c1c; background: #fee2e2; border: 1px solid #fecaca; }
    .qi-label-warn { color: #b45309; background: #fef3c7; border: 1px solid #fde68a; }
    .qi-label-tip { color: #0369a1; background: #e0f2fe; border: 1px solid #bae6fd; }
    .qi-label-good { color: #047857; background: #d1fae5; border: 1px solid #a7f3d0; }
    .qi-suggestion-product {
      font-size: 0.76rem;
      font-weight: 700;
      color: #18181b;
      line-height: 1.25;
      margin-top: 0;
      letter-spacing: -0.01em;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .qi-tag-out {
      color: #b91c1c !important;
      background: #fef2f2 !important;
      border-color: #fecaca !important;
      box-shadow: none;
    }
    .qi-sale-sub {
      font-size: 0.38rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      opacity: 0.75;
      margin-top: 1px;
      line-height: 1;
    }
    .qi-suggestion-icon-sale {
      gap: 0;
      padding: 0.15rem 0;
    }
    .qi-sale-register { font-size: 0.85rem; }
    .qi-sale-amt { font-size: 0.5rem; font-weight: 900; }
    .qi-btn-urgent { background: #dc2626; border-color: #dc2626; color: #fff; box-shadow: none; }
    .qi-btn-warn { background: #d97706; border-color: #d97706; color: #fff; box-shadow: none; }
    .qi-btn-tip { background: #0284c7; border-color: #0284c7; color: #fff; box-shadow: none; }
    .qi-btn-good { background: #059669; border-color: #059669; color: #fff; }
    .qi-suggestion-btn:active { transform: scale(0.97); }
    .qi-suggestion-kind-product { align-items: center; }
    .qi-suggestion-kind-product .qi-suggestion-detail { font-size: 0.6rem; }

    /* Narratives — quieter companion lines */
    .qi-panel-narratives {
      padding: 0.4rem 0.45rem !important;
      background: #fafafa !important;
      border-color: #f0f0f2 !important;
    }
    .qi-narrative {
      padding: 0.35rem 0.45rem !important;
      font-size: 0.65rem !important;
      border-radius: 0.55rem !important;
    }
    .qi-icon-tone-urgent { background: linear-gradient(145deg, #fef2f2, #fee2e2); }
    .qi-icon-tone-warn { background: linear-gradient(145deg, #fffbeb, #fef3c7); }
    .qi-icon-tone-tip { background: linear-gradient(145deg, #f0f9ff, #e0f2fe); }
    .qi-icon-tone-good { background: linear-gradient(145deg, #ecfdf5, #d1fae5); }
    .qi-kpi-grid .qi-kpi {
      box-shadow: 0 1px 4px rgba(0,0,0,0.04);
      transition: transform 0.12s ease, box-shadow 0.12s ease;
    }
    .qi-panel-kpis .qi-kpi:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
    @media (max-width: 639px) {
      .qi-hero-headline {
        font-size: 1rem;
        line-height: 1.3;
        overflow-wrap: anywhere;
        word-break: break-word;
      }
      .qi-hero-meta { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; }
      .qi-meta-pill { font-size: 0.6rem; padding: 0.22rem 0.45rem; }
      .qi-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; }
      .qi-kpi-val { font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .qi-kpi-label { font-size: 0.58rem; }
      .qi-kpi-sub { font-size: 0.55rem; }
      .qi-kpi-glyph { display: block; }
      .qi-panel-kpis { padding: 0.55rem 0.5rem; }
      .insight-stat-val { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .insight-stat-hint { font-size: 0.55rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .qi-suggestion-product { font-size: 0.72rem; overflow-wrap: anywhere; }
      .qi-suggestion { gap: 0.45rem; padding: 0.5rem 0.55rem; }
      .qi-suggestion-visual { width: 2.35rem; height: 2.35rem; }
      #home-store-pulse.card { padding: 0.8rem 0.85rem; }
      /* Keep Store Brain with Smart Quick Insights — no flash-hide on phone */
      #home-dashboard-status.dashboard-has-pulse:not(.brain-strip-pinned):not(.brain-strip-compact) {
        display: none !important;
      }
    }
    @media (max-width: 380px) {
      .qi-hero-head { flex-direction: column; }
      .qi-suggestion { flex-wrap: wrap; }
      .qi-suggestion-btn { width: 100%; margin-top: 0.15rem; }
    }
    .insight-stat-icon { font-size: 1.1rem; line-height: 1; }
    .insight-stat-val { font-size: 1.05rem; font-weight: 800; tabular-nums; line-height: 1.2; }
    .insight-stat-hint { font-size: 0.58rem; color: #a1a1aa; margin-top: 0.2rem; line-height: 1.3; }
    .vendor-spend-bar { height: 6px; border-radius: 999px; background: #fed7aa; overflow: hidden; }
    .pulse-line { border-left: 3px solid #e4e4e7; padding-left: 0.75rem; }
    .pulse-line-good { border-left-color: #10b981; }
    .pulse-line-warn { border-left-color: #f59e0b; }
    .pulse-line-info { border-left-color: #6366f1; }
    .pulse-line-tip { border-left-color: #0ea5e9; }
    .vendor-spend-fill { height: 100%; background: linear-gradient(90deg, #fb923c, #ea580c); border-radius: 999px; }
    .cat-dot { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }
    .wizard-step-active { background: #ecfdf5; border-color: #10b981; }
    .wizard-step-done { color: #059669; }
    #offline-badge { animation: pulseSoft 2s ease infinite; }
    @keyframes pulseSoft { 0%, 100% { opacity: 1; } 50% { opacity: 0.65; } }
    .heat-cell { border-radius: 8px; min-height: 28px; transition: transform 0.12s ease; }
    .heat-cell:hover { transform: scale(1.06); }
    .heat-empty { background: #f4f4f5; }
    .heat-low { background: #bbf7d0; }
    .heat-mid { background: #34d399; }
    .heat-high { background: #059669; }
    .heat-today { box-shadow: 0 0 0 2px #8b5cf6; }
    .cashflow-in { color: #059669; }
    .cashflow-out { color: #ea580c; }
    #pin-lock-overlay {
      z-index: 300;
      pointer-events: auto;
      -webkit-backdrop-filter: blur(6px);
      backdrop-filter: blur(6px);
    }
    #pin-lock-overlay .bg-white { pointer-events: auto; }
    /* Phones: blur is expensive and freezes under the PIN keyboard */
    body.mr-mobile-lite #pin-lock-overlay {
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
      background: rgba(0, 0, 0, 0.55);
    }
    html.dark .heat-empty { background: #334155; }
    .compare-bar { height: 8px; border-radius: 999px; background: #e4e4e7; overflow: hidden; }
    .compare-bar-fill { height: 100%; border-radius: 999px; }
    .deposit-ok { border-left: 3px solid #14b8a6; }
    .deposit-warn { border-left: 3px solid #f59e0b; }
    .regulated-tobacco { border-color: rgba(239, 68, 68, 0.25); }
    .regulated-lottery { border-color: rgba(168, 85, 247, 0.25); }
    .margin-good { color: #059669; }
    .margin-warn { color: #d97706; }
    .margin-low { color: #dc2626; }
    .budget-bar { height: 6px; border-radius: 999px; background: #e4e4e7; overflow: hidden; }
    .budget-bar-fill { height: 100%; border-radius: 999px; transition: width 0.3s; }
    .bank-match-ok { background: #ecfdf5; border-color: #a7f3d0; }
    .bank-match-miss { background: #fffbeb; border-color: #fde68a; }
    .power-hero {
      background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 45%, #eef2ff 100%);
      border: 1px solid rgba(16, 185, 129, 0.2);
    }
    html.dark .power-hero { background: linear-gradient(135deg, #064e3b 0%, #1e293b 50%, #312e81 100%); }
    .admin-stat { transition: transform 0.12s ease; }
    .admin-stat:hover { transform: translateY(-1px); }
    html.dark .admin-stat { background: linear-gradient(180deg, #312e81 0%, #1e293b 100%); border-color: rgba(129, 140, 248, 0.25); }
    .auth-tab { flex: 1; padding: 0.5rem 0.75rem; border-radius: 1rem; font-size: 0.75rem; font-weight: 600; border: 1px solid #e4e4e7; color: #71717a; background: #fafafa; }
    .auth-tab-active { background: #059669; color: #fff; border-color: #059669; }
    .auth-tab-employee.auth-tab-active { background: #2563eb; border-color: #2563eb; }
    #auth-employee-hint { font-size: 11px; line-height: 1.45; }
    /* Free plan: faded same-hue previews — no per-button badges */
    .free-plan-legend {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem 0.75rem;
      padding: 0.45rem 0.65rem;
      border-radius: 1rem;
      background: linear-gradient(135deg, rgba(255, 251, 235, 0.9), rgba(255, 255, 255, 0.95));
      border: 1px solid rgba(251, 191, 36, 0.22);
      font-size: 10px;
      color: #71717a;
    }
    .free-legend-chip {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      font-weight: 600;
      white-space: nowrap;
    }
    .free-legend-included::before {
      content: '';
      width: 0.55rem;
      height: 0.55rem;
      border-radius: 0.2rem;
      background: linear-gradient(135deg, #34d399, #059669);
      box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
    }
    .free-legend-locked::before {
      content: '';
      width: 0.55rem;
      height: 0.55rem;
      border-radius: 0.2rem;
      background: #f8fafc;
      border: 1px solid #e4e4e7;
      opacity: 0.95;
    }
    .feature-locked {
      cursor: not-allowed !important;
      filter: none !important;
      opacity: 0.78 !important;
      position: relative;
      overflow: hidden;
      isolation: isolate;
      background-image: none !important;
      font-weight: 500 !important;
      box-shadow: none !important;
      transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    }
    /* Pro pill (not lock emoji) on gated tools */
    .feature-pro-badge,
    .feature-lock-badge.feature-pro-badge {
      position: absolute;
      top: 0.28rem;
      right: 0.28rem;
      z-index: 2;
      font-size: 0.5625rem !important;
      font-weight: 800 !important;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: #b45309 !important;
      background: #fffbeb !important;
      border: 1px solid #fde68a !important;
      border-radius: 999px !important;
      padding: 0.08rem 0.38rem !important;
      line-height: 1.2;
      pointer-events: none;
      box-shadow: none !important;
    }
    /* Next steps "Order" on free → Pro label / upgrade */
    .qi-suggestion-btn.qi-btn-pro-gated,
    .qi-btn-pro-gated {
      background: #fffbeb !important;
      color: #b45309 !important;
      border: 1px solid #fde68a !important;
      font-weight: 800 !important;
    }
    .fb-item-pro-locked {
      opacity: 0.72 !important;
      cursor: not-allowed !important;
      background: #fafafa !important;
    }
    .fb-item-pro-locked .fb-item-label { color: #71717a !important; }
    .fb-item-pro-locked .fb-item-desc { color: #a1a1aa !important; }
    .bnav-btn.feature-locked {
      opacity: 0.65 !important;
      cursor: not-allowed !important;
    }
    .feature-locked.nav-tool::before,
    .feature-locked.quick-btn::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: inherit;
      background: linear-gradient(165deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.28) 50%, rgba(255, 255, 255, 0.1) 100%);
      pointer-events: none;
      z-index: 0;
    }
    .feature-locked[data-lock-tone="neutral"] { background: #fafafa !important; color: #b4b4bd !important; border-color: #e8e8ec !important; }
    .feature-locked[data-lock-tone="blue"] { background: #f5f8fc !important; color: #9eb5d4 !important; border-color: #dde7f3 !important; }
    .feature-locked[data-lock-tone="orange"] { background: #fdf9f5 !important; color: #c9a88a !important; border-color: #f0e2d6 !important; }
    .feature-locked[data-lock-tone="emerald"] { background: #f3faf7 !important; color: #8eb8a8 !important; border-color: #d9ebe3 !important; }
    .feature-locked[data-lock-tone="violet"] { background: #f7f5fb !important; color: #b0a0c8 !important; border-color: #e6dff0 !important; }
    .feature-locked[data-lock-tone="sky"] { background: #f4f9fc !important; color: #8eb4cc !important; border-color: #dceaf2 !important; }
    .feature-locked[data-lock-tone="purple"] { background: #f8f5fc !important; color: #b09cc8 !important; border-color: #e8dff0 !important; }
    .feature-locked[data-lock-tone="teal"] { background: #f2faf9 !important; color: #86b8b0 !important; border-color: #d6ebe8 !important; }
    .feature-locked[data-lock-tone="amber"] { background: #fdfaf4 !important; color: #c9b08a !important; border-color: #f0e6d6 !important; }
    .feature-locked[data-lock-tone="pink"] { background: #fdf6f8 !important; color: #c89aaa !important; border-color: #f0e0e6 !important; }
    .feature-locked[data-lock-tone="indigo"] { background: #f5f4fb !important; color: #9a94c4 !important; border-color: #e0dff0 !important; }
    .feature-locked[data-lock-tone="red"] { background: #fdf6f6 !important; color: #c89898 !important; border-color: #f0dede !important; }
    .feature-locked.nav-tool:hover,
    .feature-locked.quick-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 2px 10px rgba(245, 158, 11, 0.14) !important;
    }
    .feature-locked.bnav-btn {
      border-radius: 14px;
      opacity: 0.72;
    }
    .feature-locked.bnav-btn[data-bnav="products"] { color: #9eb5d4 !important; background: #f5f8fc !important; }
    .feature-locked.bnav-btn[data-bnav="order"] { color: #c9a88a !important; background: #fdf9f5 !important; }
    .feature-locked.bnav-btn[data-bnav="reports"] { color: #8eb8a8 !important; background: #f3faf7 !important; }

    html.dark .feature-locked[data-lock-tone="neutral"] { background: rgba(39, 39, 42, 0.55) !important; color: #a1a1aa !important; border-color: rgba(113, 113, 122, 0.35) !important; }
    html.dark .feature-locked[data-lock-tone="blue"] { background: rgba(30, 58, 95, 0.28) !important; color: #8fafcf !important; border-color: rgba(96, 165, 250, 0.22) !important; }
    html.dark .feature-locked[data-lock-tone="orange"] { background: rgba(124, 45, 18, 0.22) !important; color: #d4a882 !important; border-color: rgba(251, 146, 60, 0.2) !important; }
    html.dark .feature-locked[data-lock-tone="emerald"] { background: rgba(6, 78, 59, 0.22) !important; color: #7cb8a8 !important; border-color: rgba(52, 211, 153, 0.2) !important; }
    html.dark .feature-locked[data-lock-tone="violet"] { background: rgba(76, 29, 149, 0.22) !important; color: #b0a0c8 !important; border-color: rgba(167, 139, 250, 0.2) !important; }
    html.dark .feature-locked[data-lock-tone="sky"] { background: rgba(12, 74, 110, 0.22) !important; color: #7eb0cc !important; border-color: rgba(56, 189, 248, 0.2) !important; }
    html.dark .feature-locked[data-lock-tone="purple"] { background: rgba(88, 28, 135, 0.22) !important; color: #b09cc8 !important; border-color: rgba(192, 132, 252, 0.2) !important; }
    html.dark .feature-locked[data-lock-tone="teal"] { background: rgba(19, 78, 74, 0.22) !important; color: #7cb8b0 !important; border-color: rgba(45, 212, 191, 0.2) !important; }
    html.dark .feature-locked[data-lock-tone="amber"] { background: rgba(120, 53, 15, 0.22) !important; color: #c9b08a !important; border-color: rgba(251, 191, 36, 0.2) !important; }
    html.dark .feature-locked[data-lock-tone="pink"] { background: rgba(131, 24, 67, 0.22) !important; color: #c89aaa !important; border-color: rgba(244, 114, 182, 0.2) !important; }
    html.dark .feature-locked[data-lock-tone="indigo"] { background: rgba(49, 46, 129, 0.22) !important; color: #9a94c4 !important; border-color: rgba(129, 140, 248, 0.2) !important; }
    html.dark .feature-locked[data-lock-tone="red"] { background: rgba(127, 29, 29, 0.22) !important; color: #c89898 !important; border-color: rgba(248, 113, 113, 0.2) !important; }
    .employee-locked { opacity: 0.65; cursor: not-allowed !important; }
    .employee-lock-badge {
      position: absolute; top: -4px; right: -4px; font-size: 9px; line-height: 1;
      background: #fff; border-radius: 999px; padding: 2px 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.12);
      pointer-events: none;
    }
    #employee-role-badge {
      font-size: 10px; font-weight: 700; padding: 0.2rem 0.5rem;
      border-radius: 999px; background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd;
    }
    #home-insights {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }
    /* v879 owner home: insights/alerts first, team activity later (mobile + desktop) */
    #home-insights > #guest-auth-shell { order: 0; }
    #home-insights > #app-loading-shell { order: 0; }
    #home-insights > #home-dashboard-status { order: 1; }   /* Store Brain */
    #home-insights > #home-live-strip { order: 2; }
    #home-insights > #home-store-pulse { order: 3; }       /* Smart Quick Insights */
    #home-insights > #home-tonight-strip { order: 4; }     /* Open / Z */
    #home-insights > #home-stock-road { order: 5; }        /* What's Out */
    #home-insights > #home-sell-actions { order: 6; }
    #home-insights > #home-strict-urgent { order: 7; }
    #home-insights > #home-quick-actions { order: 8; }
    #home-insights > #home-plan-line { order: 9; }
    #home-insights > #home-owner-moat { order: 9; }
    #home-insights > #home-vendor-connect { order: 9; }
    #home-insights > #home-smart-insights { display: none !important; }
    #home-insights > #home-pos-parallel { order: 10; }
    #home-insights > #home-retailer-command { order: 11; }
    #home-insights > #home-today-card { order: 12; }
    #home-insights > #home-shelf-overview { order: 13; }
    #home-insights > #home-shelf-pulse { order: 14; }
    #home-insights > #home-migration-hint { order: 15; }
    #home-insights > #home-todays-moves { order: 16; }
    #home-insights > #home-team-pulse { order: 17; }
    #home-insights > #home-employee-entries { order: 18; }
    /* Team / staff activity AFTER store data */
    #home-insights > #home-team-chat-owner { order: 30; }
    #home-insights > #home-team-chat { order: 30; }
    #home-insights > #home-staff-adoption { order: 31; }
    #home-insights > #home-shift-note { order: 32; }
    #home-insights > #home-shift-tasks { order: 33; }
    #home-insights > #home-connections { order: 34; }
    #home-insights > #home-pos-connect { order: 35; }
    #home-insights > #section-quick-add { order: 40; }

    /* Clover POS connect — solid colors (Tailwind utilities may be missing in dynamic HTML) */
    #home-pos-connect .pos-clover-panel { display: flex; flex-direction: column; gap: 0.65rem; }
    #home-pos-connect .pos-clover-steps {
      display: flex; flex-direction: column; gap: 0.35rem;
      padding: 0.65rem 0.75rem; border-radius: 0.85rem;
      background: #ecfdf5; border: 1px solid #a7f3d0;
      font-size: 0.75rem; color: #14532d; line-height: 1.35;
    }
    #home-pos-connect .pos-clover-step { display: flex; align-items: flex-start; gap: 0.5rem; }
    #home-pos-connect .pos-clover-step span {
      flex-shrink: 0; width: 1.25rem; height: 1.25rem; border-radius: 999px;
      background: #15803d; color: #fff; font-size: 0.65rem; font-weight: 800;
      display: inline-flex; align-items: center; justify-content: center;
    }
    #home-pos-connect .pos-clover-note {
      margin: 0; font-size: 0.72rem; color: #3f3f46; line-height: 1.4;
      padding: 0.5rem 0.65rem; border-radius: 0.75rem;
      background: #fffbeb; border: 1px solid #fde68a;
    }
    #home-pos-connect .pos-clover-login-btn {
      display: flex; align-items: center; justify-content: center; gap: 0.4rem;
      width: 100%; min-height: 3.15rem; padding: 0.85rem 1rem;
      border: none; border-radius: 0.9rem; cursor: pointer;
      background: #15803d !important; color: #ffffff !important;
      font-size: 0.95rem; font-weight: 800; letter-spacing: -0.01em;
      box-shadow: 0 8px 20px -6px rgba(21, 128, 61, 0.55);
    }
    #home-pos-connect .pos-clover-login-btn:hover { background: #166534 !important; color: #fff !important; }
    #home-pos-connect .pos-clover-login-btn:disabled { opacity: 0.75; cursor: wait; }
    #home-pos-connect .pos-clover-login-btn-sm {
      width: auto; min-height: 2.5rem; padding: 0.55rem 1rem; font-size: 0.8rem;
    }
    #home-pos-connect .pos-clover-hint {
      margin: 0; text-align: center; font-size: 0.68rem; color: #71717a;
    }
    #home-pos-connect .pos-clover-csv-btn {
      width: 100%; min-height: 2.5rem; padding: 0.55rem 0.85rem;
      border-radius: 0.75rem; cursor: pointer;
      background: #fff; color: #14532d; font-size: 0.75rem; font-weight: 700;
      border: 1.5px solid #86efac;
    }
    #home-pos-connect .pos-clover-csv-btn:hover { background: #f0fdf4; }
    #home-pos-connect .pos-clover-advanced {
      border: 1px solid #e4e4e7; border-radius: 0.75rem; background: #fafafa;
      padding: 0.45rem 0.65rem; font-size: 0.68rem; color: #71717a;
    }
    #home-pos-connect .pos-clover-advanced summary {
      cursor: pointer; font-weight: 600; color: #52525b; list-style: none;
    }
    #home-pos-connect .pos-clover-advanced-body {
      display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.5rem;
    }
    #home-pos-connect .pos-clover-advanced-body input {
      width: 100%; border: 1px solid #d4d4d8; border-radius: 0.65rem;
      padding: 0.5rem 0.65rem; font-size: 0.75rem; background: #fff;
    }
    #home-pos-connect .pos-clover-key-btn {
      width: 100%; min-height: 2.35rem; border: none; border-radius: 0.65rem;
      background: #27272a; color: #fff; font-weight: 700; font-size: 0.75rem; cursor: pointer;
    }
    #home-pos-connect .pos-clover-siteurl {
      border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: 0.85rem;
      padding: 0.65rem 0.75rem; display: flex; flex-direction: column; gap: 0.35rem;
    }
    #home-pos-connect .pos-clover-siteurl-label {
      font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #166534;
    }
    #home-pos-connect .pos-clover-siteurl code {
      font-size: 0.72rem; color: #14532d; word-break: break-all; font-weight: 600;
    }
    #home-pos-connect .pos-clover-copy-btn {
      align-self: flex-start; margin-top: 0.15rem;
      border: 1px solid #86efac; background: #fff; color: #166534;
      border-radius: 0.55rem; padding: 0.3rem 0.65rem; font-size: 0.68rem; font-weight: 700; cursor: pointer;
    }
    #home-insights > #home-more-insights-bar { order: 28; }
    #home-insights > #workspace-boot-overlay { order: 50; }
    #home-insights > #home-guest-welcome { order: 200; }
    #home-insights > .grid,
    #home-insights > #home-low-stock,
    #home-insights > #home-price-alerts,
    #home-insights > #home-mini-chart-card,
    #home-insights > #home-reorder-hub,
    #home-insights > #home-heatmap-card,
    #home-insights > #home-closing-card,
    #home-insights > #home-anomaly-banner,
    #home-insights > #home-dead-stock,
    #home-insights > #home-smart-po-drafts,
    #home-insights > #home-bank-connect,
    #home-insights > #home-3day-checklist,
    #home-insights > #home-digest-prompt,
    #home-insights > #home-margin-alerts,
    #home-insights > #home-accountant-portal,
    #home-insights > #home-referral-strip,
    #home-insights > #home-power-hero,
    #home-insights > #home-smart-actions,
    #home-insights > #home-ops-hub,
    #home-insights > #home-store-compare,
    #home-insights > #home-recurring-expenses { order: 29; }
    #home-insights > #home-shift-tasks { order: 13; }
    #home-insights.workspace-booting > *:not(#workspace-boot-overlay):not(#home-dashboard-status):not(#home-live-strip):not(#home-tonight-strip):not(#home-sell-actions):not(#home-store-pulse):not(#home-stock-road) {
      display: none !important;
    }
    /* Never flash secondary / legacy money host during boot */
    #home-insights.workspace-booting > #home-smart-insights,
    #home-insights.workspace-booting > #home-combined-insights,
    #home-insights.workspace-booting > #home-vendor-spend,
    #home-insights.workspace-booting > #home-retailer-command,
    #home-insights.workspace-booting > #home-owner-moat,
    #home-insights.workspace-booting > #home-pos-parallel,
    #home-insights.workspace-booting > #home-plan-line,
    #home-insights.workspace-booting > #home-quick-actions {
      display: none !important;
    }
    /* v883: pulse keeps natural display — no block force */
    #home-smart-insights {
      display: none !important;
    }
    #home-insights > .grid.hidden,
    #home-insights .card[id^="home-"].hidden {
      display: none !important;
    }
    #home-insights > .grid:not(:has(.card:not(.hidden))) {
      display: none !important;
    }
    .home-dashboard-hub {
      background: linear-gradient(135deg, #ecfdf5 0%, #fff 55%, #f0f9ff 100%);
      border-color: #a7f3d0;
    }
    .home-dashboard-hub-rich { background: linear-gradient(135deg, #fef3c7 0%, #fff 50%, #ecfdf5 100%); border-color: #fcd34d; }
    .home-dashboard-hub-win { background: linear-gradient(135deg, #ecfdf5 0%, #fff 45%, #d1fae5 100%); border-color: #6ee7b7; }
    .home-dashboard-hub-push { background: linear-gradient(135deg, #fff7ed 0%, #fff 50%, #fef3c7 100%); border-color: #fdba74; }
    .home-dashboard-hub-body { display: flex; align-items: flex-start; gap: 0.65rem; }
    .home-dashboard-hub-emoji { font-size: 1.35rem; line-height: 1; flex-shrink: 0; }
    .home-dashboard-hub-title { font-size: 0.8125rem; font-weight: 700; color: #18181b; line-height: 1.35; }
    .home-dashboard-hub-sub { font-size: 0.6875rem; color: #52525b; margin-top: 0.15rem; line-height: 1.45; }
    .home-dashboard-hub-badge {
      display: inline-flex; align-items: center; padding: 0.1rem 0.45rem; border-radius: 999px;
      font-size: 0.5625rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
      background: #d1fae5; color: #047857; margin-left: 0.35rem; vertical-align: middle;
    }
    .home-shelf-card-head {
      display: flex; align-items: flex-start; justify-content: space-between; gap: 0.65rem; margin-bottom: 0.75rem;
    }
    .home-shelf-card-title {
      font-size: 0.625rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #3f3f46;
    }
    .home-shelf-card-sub { font-size: 0.6875rem; color: #71717a; margin-top: 0.15rem; line-height: 1.35; }
    .home-shelf-card-cta {
      flex-shrink: 0; font-size: 0.625rem; font-weight: 800; padding: 0.4rem 0.75rem;
      border-radius: 0.75rem; border: none; background: #ea580c; color: #fff;
      box-shadow: 0 2px 8px rgba(234,88,12,0.22);
    }
    .home-shelf-overview-strip,
    .shelf-pulse-strip {
      display: flex; gap: 0.6rem; overflow-x: auto; padding: 0.15rem 0.1rem 0.35rem;
      -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
    }
    .home-shelf-overview-tile,
    .shelf-pulse-tile {
      flex: 0 0 auto; scroll-snap-align: start;
      display: flex; flex-direction: column; align-items: stretch; gap: 0.2rem;
      width: 6.1rem; padding: 0.5rem 0.42rem 0.58rem;
      border-radius: 0.9rem; border: 1px solid #e4e4e7; background: #fff;
      touch-action: manipulation; cursor: pointer;
      box-shadow: 0 2px 8px rgba(15,23,42,0.05);
      transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .home-shelf-overview-tile:active,
    .shelf-pulse-tile:active { transform: scale(0.98); }
    .home-shelf-tile-cooler { border-color: #bae6fd; background: linear-gradient(180deg, #fff, #f0f9ff); }
    .home-shelf-tile-tobacco { border-color: #fde68a; background: linear-gradient(180deg, #fff, #fffbeb); }
    .home-shelf-tile-status-empty { border-color: #fca5a5; }
    .home-shelf-tile-status-low { border-color: #fdba74; }
    .home-shelf-tile-status-warn { border-color: #fde047; }
    .home-shelf-tile-status-ok,
    .home-shelf-tile-status-full { border-color: #e4e4e7; }
    .home-shelf-tile-visual {
      display: flex; align-items: flex-end; justify-content: center;
      min-height: 3.35rem; margin-bottom: 0.1rem;
    }
    .home-shelf-mini-wrap {
      position: relative;
      display: flex;
      align-items: flex-end;
      justify-content: center;
    }
    .home-shelf-mini-viz { line-height: 0; }
    .home-shelf-mini-viz .shelf-viz-tag { display: none !important; }
    .home-shelf-mini-viz .shelf-viz-sm { width: 2.85rem; height: 3.15rem; }
    .home-shelf-mini-viz .shelf-viz-sm.shelf-cooler-lite,
    .home-shelf-mini-viz .shelf-viz-sm.shelf-cig-wall-lite,
    .home-shelf-mini-viz .shelf-viz-sm.shelf-pouch { width: 2.85rem; height: 3.15rem; }
    .home-shelf-mini-viz .shelf-pouch-empty,
    .home-shelf-mini-viz .shelf-cooler-empty,
    .home-shelf-mini-viz .shelf-cig-gap {
      position: relative;
      inset: auto;
      width: 2rem; height: 2.35rem; margin: 0 auto;
      border: 1.5px solid #cbd5e1; border-radius: 0.45rem;
      background: linear-gradient(180deg, #f8fafc, #e2e8f0);
      opacity: 1; transform: none;
      border-style: solid;
    }
    .home-shelf-mini-viz .shelf-pouch.shelf-empty,
    .home-shelf-mini-viz .shelf-cooler-lite.shelf-empty,
    .home-shelf-mini-viz .shelf-cig-wall.shelf-empty { filter: none; opacity: 1; }
    .home-shelf-overview-name,
    .shelf-pulse-name { color: #0f172a !important; }
    .home-shelf-mini-photo {
      width: 2.85rem; height: 3.15rem; border-radius: 0.55rem; overflow: hidden;
      border: 1px solid #e4e4e7; background: #fafafa; margin: 0 auto;
      box-shadow: 0 2px 6px rgba(15,23,42,0.08);
    }
    .home-shelf-mini-photo-img { width: 100%; height: 100%; object-fit: contain; display: block; }
    .home-shelf-overview-name,
    .shelf-pulse-name {
      font-size: 0.5625rem; font-weight: 800; color: #18181b; text-align: center;
      line-height: 1.25; width: 100%;
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .home-shelf-status {
      width: 100%; margin-top: 0.1rem;
      display: flex; flex-direction: column; align-items: stretch; gap: 0.18rem;
    }
    .home-shelf-stock-bar {
      height: 3px; border-radius: 999px; background: #e4e4e7; overflow: hidden;
    }
    .home-shelf-stock-fill { height: 100%; border-radius: 999px; transition: width 0.25s ease; }
    .home-shelf-stock-ok,
    .home-shelf-stock-full { background: #34d399; }
    .home-shelf-stock-warn { background: #fbbf24; }
    .home-shelf-stock-low { background: #f97316; }
    .home-shelf-stock-empty { background: #ef4444; min-width: 4px; }
    .home-shelf-status-pill-row {
      display: flex; justify-content: center; align-items: center;
      min-height: 0.85rem; margin: 0;
    }
    .home-shelf-status-pill {
      display: inline-block;
      font-size: 0.44rem; font-weight: 900; letter-spacing: 0.1em;
      color: #fff; border-radius: 5px; padding: 0.16rem 0.55rem; line-height: 1;
      white-space: nowrap;
    }
    .home-shelf-pill-empty { background: #dc2626; }
    .home-shelf-pill-low { background: #ea580c; }
    .home-shelf-pill-warn { background: #ca8a04; }
    .home-shelf-qty-row {
      display: flex; align-items: baseline; justify-content: center;
      width: 100%; margin: 0;
      font-size: 0.5rem; font-weight: 800; font-variant-numeric: tabular-nums;
      line-height: 1.25; text-align: center; white-space: nowrap;
    }
    .home-shelf-days-row {
      display: flex; justify-content: center; width: 100%; margin: 0;
    }
    .home-shelf-qty-num { color: #18181b; }
    .home-shelf-qty-sep { color: #a1a1aa; font-weight: 700; padding: 0 0.06rem; }
    .home-shelf-qty-par { color: #52525b; }
    .home-shelf-status-empty .home-shelf-qty-num { color: #b91c1c; }
    .home-shelf-status-low .home-shelf-qty-num { color: #c2410c; }
    .home-shelf-status-warn .home-shelf-qty-num { color: #a16207; }
    .home-shelf-days-hint {
      font-size: 0.4rem; font-weight: 800; color: #b91c1c;
      background: #fef2f2; border: 1px solid #fecaca; border-radius: 4px;
      padding: 0.06rem 0.3rem; white-space: nowrap;
    }
    /* Modal open — full-viewport opaque scrim; no shelf / shift chrome at edges */
    html:has(body.mr-catalog-open),
    html:has(body.mr-dshelf-open),
    html:has(#catalog-modal:not(.hidden)),
    html:has(#digital-shelf-modal:not(.hidden)),
    html:has(#vendor-order-modal:not(.hidden)),
    html:has(#vendor-hub-modal:not(.hidden)) {
      background: #52525b !important;
    }
    body.mr-catalog-open,
    body.mr-dshelf-open,
    body:has(#catalog-modal:not(.hidden)),
    body:has(#digital-shelf-modal:not(.hidden)),
    body:has(#vendor-order-modal:not(.hidden)),
    body:has(#vendor-hub-modal:not(.hidden)) {
      overflow: hidden;
      animation: none !important;
      background: #52525b !important;
      background-size: auto !important;
    }
    body.mr-catalog-open #feature-browser-tab,
    body.mr-dshelf-open #feature-browser-tab,
    body:has(#catalog-modal:not(.hidden)) #feature-browser-tab,
    body:has(#digital-shelf-modal:not(.hidden)) #feature-browser-tab,
    body:has(#vendor-order-modal:not(.hidden)) #feature-browser-tab,
    body:has(#vendor-hub-modal:not(.hidden)) #feature-browser-tab,
    body.mr-catalog-open #bottom-nav,
    body:has(#catalog-modal:not(.hidden)) #bottom-nav,
    body:has(#digital-shelf-modal:not(.hidden)) #bottom-nav {
      display: none !important;
    }
    body.mr-catalog-open #digital-shelf-modal,
    body:has(#catalog-modal:not(.hidden)) #digital-shelf-modal,
    #catalog-modal:not(.hidden) ~ #digital-shelf-modal {
      display: none !important;
      visibility: hidden !important;
      pointer-events: none !important;
    }
    body.mr-catalog-open #home-shelf-overview,
    body.mr-catalog-open #home-shelf-pulse,
    body.mr-dshelf-open #home-shelf-overview,
    body.mr-dshelf-open #home-shelf-pulse,
    body:has(#catalog-modal:not(.hidden)) #home-shelf-overview,
    body:has(#catalog-modal:not(.hidden)) #home-shelf-pulse {
      visibility: hidden !important;
    }
    #catalog-modal:not(.hidden),
    #digital-shelf-modal:not(.hidden),
    #vendor-order-modal:not(.hidden),
    #vendor-hub-modal:not(.hidden) {
      position: fixed !important;
      inset: 0 !important;
      left: 0 !important;
      top: 0 !important;
      right: 0 !important;
      bottom: 0 !important;
      width: 100vw !important;
      height: 100dvh !important;
      max-width: none !important;
      margin: 0 !important;
      box-sizing: border-box;
      background: #52525b !important;
      isolation: isolate;
    }
    /* Digital shelving — tactile planogram */
    .dshelf-shell { background: #fff; }
    .dshelf-body {
      background:
        radial-gradient(ellipse 120% 80% at 50% 0%, rgba(251, 191, 36, 0.08), transparent 55%),
        linear-gradient(180deg, #fafaf9, #f4f4f5);
      perspective: 900px;
    }
    .dshelf-aisle { margin-bottom: 1.1rem; }
    .dshelf-aisle-head {
      display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem;
      margin-bottom: 0.45rem; padding: 0 0.15rem;
    }
    .dshelf-aisle-label {
      font-size: 0.72rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; color: #9a3412;
    }
    .dshelf-aisle-count { font-size: 0.55rem; font-weight: 700; color: #a1a1aa; }
    .dshelf-aisle-sub {
      font-size: 0.5625rem;
      font-weight: 600;
      color: #a16207;
      margin: -0.2rem 0 0.45rem 0.15rem;
      line-height: 1.35;
    }
    .dshelf-aisle-movers .dshelf-aisle-head { margin-bottom: 0.15rem; }
    .dshelf-aisle-movers .dshelf-aisle-label { color: #c2410c; }
    .dshelf-rack-movers {
      background:
        linear-gradient(180deg, #f59e0b 0%, #f59e0b 5px, transparent 5px),
        linear-gradient(180deg, #fde68a 5px, #fef3c7 8px, #fffbeb 100%) !important;
      border-color: #fbbf24 !important;
      box-shadow: inset 0 -6px 12px rgba(251,191,36,0.12), 0 8px 22px rgba(245,158,11,0.14) !important;
    }
    .dshelf-slot-rank {
      display: flex;
      align-items: center;
      gap: 0.3rem;
      flex-wrap: wrap;
      min-height: 1.35rem;
      margin: 0 0 0.2rem;
      padding: 0 0.1rem;
    }
    .dshelf-slot-rank-price {
      margin-left: auto;
      font-size: 0.5rem;
      font-weight: 900;
      color: #166534;
      background: #ecfdf5;
      border: 1px solid #86efac;
      border-radius: 0.35rem;
      padding: 0.1rem 0.35rem;
      line-height: 1.2;
      white-space: nowrap;
    }
    .dshelf-velocity-badge {
      position: static;
      flex: 0 0 auto;
      font-size: 0.5rem;
      font-weight: 900;
      line-height: 1.2;
      padding: 0.14rem 0.38rem;
      border-radius: 999px;
      letter-spacing: 0.04em;
      box-shadow: none;
    }
    .dshelf-tier-a { background: linear-gradient(145deg, #fef3c7, #fde68a); color: #92400e; border: 1px solid #fbbf24; }
    .dshelf-tier-b { background: linear-gradient(145deg, #ecfdf5, #d1fae5); color: #047857; border: 1px solid #6ee7b7; }
    .dshelf-tier-c { background: #f4f4f5; color: #52525b; border: 1px solid #e4e4e7; }
    .dshelf-weekly-hint {
      position: static;
      flex: 0 0 auto;
      font-size: 0.5rem;
      font-weight: 800;
      color: #78350f;
      background: #fffbeb;
      border: 1px solid #fde68a;
      border-radius: 999px;
      padding: 0.12rem 0.38rem;
      line-height: 1.2;
      white-space: nowrap;
    }
    .dshelf-slot-tier-a { box-shadow: 0 0 0 1px rgba(251,191,36,0.35), 0 2px 8px rgba(245,158,11,0.1); }
    .dshelf-detail-tier {
      display: inline-block;
      font-size: 0.55rem;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      padding: 0.1rem 0.35rem;
      border-radius: 4px;
      vertical-align: middle;
    }
    .dshelf-detail-tier.dshelf-tier-a { background: #fef3c7; color: #92400e; }
    .dshelf-detail-tier.dshelf-tier-b { background: #d1fae5; color: #047857; }
    .dshelf-detail-tier.dshelf-tier-c { background: #f4f4f5; color: #52525b; }
    .dshelf-subaisle-head {
      display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem;
      margin: 0.5rem 0 0.35rem; padding: 0 0.2rem;
      font-size: 0.625rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: #57534e;
    }
    .dshelf-subaisle-count { font-size: 0.55rem; font-weight: 600; color: #a8a29e; }
    .dshelf-rack {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
      gap: 0.65rem;
      padding: 0.85rem 0.65rem 0.7rem;
      border-radius: 1rem;
      border: 2px solid #d6d3d1;
      background:
        linear-gradient(180deg, #57534e 0%, #57534e 5px, transparent 5px),
        linear-gradient(180deg, #a8a29e 5px, #d6d3d1 7px, #f5f5f4 7px, #fafaf9 100%);
      box-shadow:
        inset 0 3px 0 rgba(255,255,255,0.35),
        inset 0 -8px 16px rgba(0,0,0,0.04),
        0 8px 24px rgba(28, 25, 23, 0.1);
      transform-style: preserve-3d;
    }
    .dshelf-rack::before {
      content: '';
      display: block;
      height: 4px;
      margin: -0.55rem -0.45rem 0.45rem;
      border-radius: 2px 2px 0 0;
      background: linear-gradient(90deg, #78716c, #a8a29e 40%, #78716c);
      box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    }
    .dshelf-slot {
      position: relative;
      display: flex; flex-direction: column; align-items: stretch;
      border-radius: 0.9rem;
      border: 1px solid #e7e5e4;
      background: linear-gradient(180deg, #fff 0%, #fafaf9 100%);
      overflow: visible;
      box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07), 0 1px 0 rgba(255,255,255,0.9) inset;
      transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.28s ease, border-color 0.2s ease;
      transform-style: preserve-3d;
    }
    .dshelf-slot:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12); }
    .dshelf-slot-picking { animation: dshelf-pick-spring 0.42s cubic-bezier(0.34, 1.5, 0.64, 1); }
    .dshelf-slot-active,
    .dshelf-slot-picked {
      transform: translateY(-10px) scale(1.06) rotateX(4deg);
      box-shadow: 0 0 0 2px #f97316, 0 18px 36px rgba(249, 115, 22, 0.22), 0 4px 0 #fdba74;
      border-color: #fdba74;
      z-index: 4;
    }
    .dshelf-slot-active .dshelf-pick-hint,
    .dshelf-slot-picked .dshelf-pick-hint { opacity: 0; }
    .dshelf-slot-empty, .dshelf-slot-low {
      border-color: #fecaca;
      background: linear-gradient(180deg, #fff5f5, #fff);
      animation: dshelf-low-pulse 2.8s ease-in-out infinite;
    }
    .dshelf-slot-warn { border-color: #fde68a; background: linear-gradient(180deg, #fffbeb, #fff); }
    .dshelf-slot-tap {
      position: relative;
      flex: 1; border: none; background: transparent; padding: 0.55rem 0.35rem 0.4rem;
      cursor: pointer; text-align: center; touch-action: manipulation;
      overflow: visible;
    }
    .dshelf-slot-tap:active { background: transparent; }
    .dshelf-slot-tap:active .combo-viz-float { transform: scale(0.94) translateY(2px); }
    .dshelf-pick-hint {
      display: block;
      font-size: 0.42rem;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: #ea580c;
      opacity: 0.65;
      margin-bottom: 0.2rem;
      transition: opacity 0.2s ease;
    }
    .dshelf-sub-chip {
      display: inline-block;
      font-size: 0.4rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: #9a3412;
      background: #ffedd5;
      border: 1px solid #fdba74;
      border-radius: 999px;
      padding: 0.06rem 0.35rem;
      margin-bottom: 0.15rem;
    }
    .dshelf-price-tag {
      position: absolute;
      top: -0.35rem;
      right: 0.35rem;
      z-index: 3;
      font-size: 0.5rem;
      font-weight: 900;
      color: #166534;
      background: #ecfdf5;
      border: 1px solid #86efac;
      border-radius: 0.35rem;
      padding: 0.12rem 0.35rem;
      box-shadow: 0 2px 6px rgba(0,0,0,0.08);
      transform: rotate(6deg);
      transform-origin: top right;
    }
    .dshelf-price-tag::before {
      content: '';
      position: absolute;
      top: -0.28rem;
      left: 50%;
      width: 1px;
      height: 0.35rem;
      background: #a8a29e;
    }
    .dshelf-slot-visual {
      display: flex; align-items: flex-end; justify-content: center;
      min-height: 4.25rem; margin-bottom: 0.3rem; padding: 0 0.15rem;
      overflow: visible;
    }
    .dshelf-slot-has-photo .dshelf-slot-visual { min-height: 4.75rem; }
    .product-shelf-combo-dshelf .combo-photo-dshelf {
      width: 3.35rem; height: 3.35rem;
      border-radius: 0.65rem;
      box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18), 0 2px 0 rgba(255,255,255,0.8) inset;
    }
    .product-shelf-combo-dshelf .combo-viz .shelf-viz-lg { width: 3.35rem; height: 3.35rem; }
    .combo-viz-float { transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1); }
    .dshelf-slot:not(.dshelf-slot-active):not(.dshelf-slot-picked) .combo-viz-float {
      animation: dshelf-product-float 3.2s ease-in-out infinite;
    }
    .dshelf-product-pedestal {
      position: absolute;
      left: 50%;
      bottom: 0.15rem;
      transform: translateX(-50%);
      width: 70%;
      height: 0.35rem;
      border-radius: 999px;
      background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.18), transparent 70%);
      pointer-events: none;
    }
    @keyframes dshelf-product-float {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-3px); }
    }
    @keyframes dshelf-pick-spring {
      0% { transform: translateY(0) scale(1); }
      40% { transform: translateY(-14px) scale(1.08) rotateX(6deg); }
      100% { transform: translateY(-10px) scale(1.06) rotateX(4deg); }
    }
    @keyframes dshelf-low-pulse {
      0%, 100% { box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07); }
      50% { box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2); }
    }
    /* Product photo + shelf level side-by-side (not stacked) */
    .product-shelf-combo {
      position: relative;
      width: auto;
      max-width: 100%;
      flex-shrink: 0;
    }
    .dshelf-slot-visual .product-shelf-combo,
    .dshelf-detail-visual .product-shelf-combo {
      width: 100%;
      max-width: 100%;
    }
    .combo-row-inner {
      display: flex;
      flex-direction: row;
      align-items: flex-end;
      justify-content: center;
      gap: 0.3rem;
    }
    .combo-cell {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.12rem;
      flex-shrink: 0;
    }
    .combo-photo {
      width: 2.5rem; height: 2.5rem; border-radius: 0.5rem; overflow: hidden;
      border: 1px solid #e4e4e7; background: #fff;
      box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }
    .combo-photo-img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fafafa; }
    .combo-viz { line-height: 0; }
    .combo-lbl {
      font-size: 0.42rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
      color: #a1a1aa; line-height: 1;
    }
    .product-shelf-combo-no-photo .combo-row-inner { justify-content: center; }
    .product-shelf-combo-no-photo .combo-viz .shelf-viz-lg,
    .product-shelf-combo-no-photo .combo-viz .shelf-viz-sm { width: 3rem; height: 3rem; }
    .product-shelf-combo-has-photo .combo-viz .shelf-viz-lg { width: 2.5rem; height: 2.5rem; }
    .product-shelf-combo-has-photo .combo-viz .shelf-viz-sm { width: 2.15rem; height: 2.15rem; }
    .product-shelf-combo-has-photo .combo-viz .shelf-viz-xs { width: 1.85rem; height: 1.85rem; }
    .dshelf-detail-visual .product-shelf-combo-has-photo .combo-photo { width: 3.25rem; height: 3.25rem; }
    .dshelf-detail-visual .product-shelf-combo-has-photo .combo-viz .shelf-viz-lg { width: 3.25rem; height: 3.25rem; }
    .combo-vendor-logo {
      position: absolute; top: -2px; right: -2px; z-index: 2;
      background: #fff; border-radius: 999px; padding: 1px;
      border: 1px solid #e4e4e7; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }
    .catalog-mobile-visual {
      display: flex; flex-direction: row; align-items: center; gap: 0.55rem; flex-shrink: 0;
    }
    .catalog-mobile-photo,
    .catalog-mobile-level {
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .catalog-mobile-level .catalog-stock-viz { line-height: 0; }
    .dshelf-detail-photo-row {
      display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.55rem;
    }
    .dshelf-detail-btn-remove {
      background: #fef2f2; border-color: #fecaca; color: #b91c1c;
    }
    .catalog-mobile-visual .catalog-stock-viz { line-height: 0; }
    /* Vendor logos */
    .vendor-logo {
      display: block; object-fit: contain; border-radius: 0.45rem;
      background: #fff; border: 1px solid #e4e4e7;
    }
    .vendor-logo-xs { width: 1.1rem; height: 1.1rem; border-radius: 999px; }
    .vendor-logo-sm { width: 2rem; height: 2rem; }
    .vendor-logo-md { width: 2.5rem; height: 2.5rem; }
    .vendor-logo-lg { width: 3.25rem; height: 3.25rem; }
    .vendor-logo-fallback {
      display: inline-flex; align-items: center; justify-content: center;
      font-weight: 900; color: #c2410c; background: linear-gradient(145deg, #fff7ed, #ffedd5);
      border: 1px solid #fdba74; border-radius: 0.45rem;
    }
    .vendor-logo-fallback.vendor-logo-xs { font-size: 0.45rem; border-radius: 999px; }
    .vendor-logo-fallback.vendor-logo-sm { font-size: 0.62rem; }
    .vendor-logo-fallback.vendor-logo-md { font-size: 0.72rem; }
    .vendor-logo-fallback.vendor-logo-lg { font-size: 0.85rem; }
    .vendor-logo-upload-btn {
      position: relative; border: none; background: transparent; padding: 0; cursor: pointer;
      display: flex; flex-direction: column; align-items: center; gap: 0.15rem; flex-shrink: 0;
    }
    .vendor-logo-upload-hint {
      font-size: 0.45rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
      color: #c2410c;
    }
    .vendor-hub-pick-inner { display: flex; align-items: center; gap: 0.45rem; text-align: left; }
    .vendor-hub-card-lead { flex-shrink: 0; }
    .po-vendor-brand-name { font-size: 0.85rem; font-weight: 800; color: #9a3412; }
    .dshelf-vendor-banner {
      display: flex; align-items: center; gap: 0.65rem;
      padding: 0.65rem 0.75rem; margin-bottom: 0.75rem;
      border-radius: 1rem; border: 1px solid #fdba74;
      background: linear-gradient(135deg, #fff7ed, #fff);
    }
    .dshelf-vendor-banner-name { font-size: 0.82rem; font-weight: 900; color: #9a3412; }
    .dshelf-vendor-banner-sub { font-size: 0.58rem; color: #a16207; margin-top: 0.1rem; }
    .dshelf-detail-vendor-badge {
      display: inline-flex; align-items: center; gap: 0.25rem; vertical-align: middle;
    }
    .dshelf-slot-name {
      font-size: 0.5625rem; font-weight: 800; line-height: 1.2; color: #18181b;
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .dshelf-slot-meta { font-size: 0.5rem; font-weight: 700; color: #71717a; margin-top: 0.12rem; }
    .dshelf-slot-qty { color: #ea580c; }
    .dshelf-slot-status {
      display: inline-block; margin-top: 0.15rem;
      font-size: 0.45rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em;
      padding: 0.08rem 0.35rem; border-radius: 999px;
    }
    .dshelf-status-ok { background: #d1fae5; color: #047857; }
    .dshelf-status-warn { background: #fef3c7; color: #b45309; }
    .dshelf-status-out { background: #fee2e2; color: #b91c1c; }
    .dshelf-slot-actions {
      display: flex; border-top: 1px solid #f4f4f5;
    }
    .dshelf-act {
      flex: 1; border: none; background: #fafafa; padding: 0.35rem 0;
      font-size: 0.85rem; font-weight: 900; color: #52525b; touch-action: manipulation;
    }
    .dshelf-act:first-child { border-right: 1px solid #f4f4f5; }
    .dshelf-act:active { background: #f4f4f5; }
    .dshelf-empty {
      text-align: center; padding: 2.5rem 1rem; border: 2px dashed #d6d3d1; border-radius: 1.25rem; background: #fff;
    }
    .dshelf-empty-ico { font-size: 2rem; }
    .dshelf-empty-title { font-size: 0.9rem; font-weight: 800; margin-top: 0.5rem; }
    .dshelf-empty-sub { font-size: 0.68rem; color: #71717a; margin-top: 0.35rem; line-height: 1.4; }
    .dshelf-empty-btn {
      margin-top: 0.85rem; padding: 0.5rem 1rem; border-radius: 0.75rem;
      background: #ea580c; color: #fff; font-size: 0.72rem; font-weight: 800; border: none;
    }
    .dshelf-detail {
      transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.25s ease;
    }
    .dshelf-detail-open { animation: dshelf-tray-rise 0.38s cubic-bezier(0.34, 1.3, 0.64, 1); }
    @keyframes dshelf-tray-rise {
      from { transform: translateY(24px); opacity: 0.6; }
      to { transform: translateY(0); opacity: 1; }
    }
    .dshelf-hand-hero {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 7.5rem;
      margin: -0.25rem 0 0.65rem;
      padding: 0.5rem 0 1rem;
    }
    .dshelf-hand-palm {
      position: absolute;
      bottom: 0;
      width: 5.5rem;
      height: 2.25rem;
      border-radius: 50% 50% 45% 45%;
      background: radial-gradient(ellipse at 50% 30%, rgba(251, 191, 36, 0.25), rgba(234, 88, 12, 0.08) 60%, transparent 75%);
      filter: blur(2px);
    }
    .dshelf-hand-glow {
      position: absolute;
      width: 6rem;
      height: 6rem;
      border-radius: 999px;
      background: radial-gradient(circle, rgba(251, 146, 60, 0.2), transparent 68%);
      animation: dshelf-hand-glow 2.5s ease-in-out infinite;
      pointer-events: none;
    }
    @keyframes dshelf-hand-glow {
      0%, 100% { transform: scale(1); opacity: 0.7; }
      50% { transform: scale(1.08); opacity: 1; }
    }
    .dshelf-hand-product {
      position: relative;
      z-index: 2;
      filter: drop-shadow(0 14px 22px rgba(15, 23, 42, 0.22));
    }
    .dshelf-hand-lift { animation: dshelf-hand-lift 0.45s cubic-bezier(0.34, 1.4, 0.64, 1); }
    @keyframes dshelf-hand-lift {
      from { transform: translateY(28px) scale(0.88); opacity: 0.5; }
      to { transform: translateY(0) scale(1); opacity: 1; }
    }
    .dshelf-hand-photo {
      width: 5.5rem;
      height: 5.5rem;
      border-radius: 1rem;
      overflow: hidden;
      border: 2px solid #fff;
      box-shadow: 0 16px 32px rgba(15, 23, 42, 0.2);
      background: #fff;
    }
    .dshelf-hand-photo-img { width: 100%; height: 100%; object-fit: contain; display: block; }
    .dshelf-hand-viz .shelf-viz-lg { width: 4.5rem; height: 4.5rem; }
    .dshelf-hand-price-tag {
      position: absolute;
      top: 0.5rem;
      right: calc(50% - 4.5rem);
      z-index: 3;
      font-size: 0.72rem;
      font-weight: 900;
      color: #14532d;
      background: #fff;
      border: 2px solid #86efac;
      border-radius: 0.5rem;
      padding: 0.2rem 0.5rem;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      transform: rotate(8deg);
    }
    .dshelf-detail-head { display: flex; gap: 0.65rem; align-items: flex-start; }
    .dshelf-detail-visual { flex-shrink: 0; }
    .dshelf-detail-copy { flex: 1; min-width: 0; }
    .dshelf-detail-name { font-size: 0.9rem; font-weight: 900; line-height: 1.25; }
    .dshelf-detail-sub { font-size: 0.62rem; color: #71717a; margin-top: 0.1rem; }
    .dshelf-detail-stock { font-size: 0.68rem; color: #3f3f46; margin-top: 0.25rem; }
    .dshelf-detail-close {
      border: none; background: #f4f4f5; width: 1.75rem; height: 1.75rem; border-radius: 999px;
      font-size: 1.1rem; line-height: 1; color: #71717a; flex-shrink: 0;
    }
    .dshelf-detail-grid {
      display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.45rem; margin-top: 0.65rem;
    }
    @media (max-width: 480px) { .dshelf-detail-grid { grid-template-columns: repeat(2, 1fr); } }
    .dshelf-lbl { font-size: 0.5rem; font-weight: 800; text-transform: uppercase; color: #a1a1aa; display: block; margin-bottom: 0.12rem; }
    .dshelf-inp { width: 100%; border: 1px solid #e4e4e7; border-radius: 0.6rem; padding: 0.35rem 0.45rem; font-size: 0.78rem; }
    .dshelf-detail-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.65rem; }
    .dshelf-detail-btn {
      font-size: 0.62rem; font-weight: 800; padding: 0.42rem 0.7rem; border-radius: 0.65rem;
      border: 1px solid #e4e4e7; background: #fff; color: #3f3f46;
    }
    .dshelf-detail-btn-order { background: #fff7ed; border-color: #fdba74; color: #c2410c; }
    #home-more-insights-bar .home-more-insights-btn {
      display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
      width: 100%; padding: 0.65rem 0.75rem;
      border-radius: 1rem; border: 1px dashed #d4d4d8;
      background: linear-gradient(180deg, #fafafa, #f4f4f5);
    }
    .home-more-insights-previews {
      display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem;
    }
    .home-more-insights-previews span {
      font-size: 0.5625rem; font-weight: 700; color: #71717a;
      background: #fff; border: 1px solid #e4e4e7; border-radius: 999px; padding: 0.15rem 0.45rem;
    }
    body.guest-mode #home-money-section,
    body.auth-booting #home-money-section { display: none !important; }
    body:not(.guest-mode):not(.auth-booting) #home-money-section:not(.money-panel-open) { display: none !important; }
    body:not(.guest-mode):not(.auth-booting) #home-money-section.money-panel-open { display: block !important; }
    #home-money-section { scroll-margin-top: 3.75rem; }
    #home-money-pipeline { scroll-margin-top: 3.75rem; }
    #home-till-estimate { min-height: 4rem; }
    #home-till-estimate.money-highlight { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35); transition: box-shadow 0.3s ease; }

    /* ── Money panel structure (v463 polish) ── */
    .money-panel-root {
      display: flex;
      flex-direction: column;
      min-height: 0;
      background: #fff;
    }
    .money-panel-scroll {
      flex: 1 1 auto;
      min-height: 0;
      overflow-x: hidden;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
    }
    .money-panel-footer {
      flex: 0 0 auto;
      display: flex;
      gap: 0.45rem;
      padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
      background: #fff;
      border-top: 1px solid #e4e4e7;
      box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
    }
    .money-foot-btn {
      flex: 1 1 0;
      min-height: 2.65rem;
      border: none;
      border-radius: 0.85rem;
      font-size: 0.75rem;
      font-weight: 800;
      color: #fff;
      cursor: pointer;
    }
    .money-foot-card { background: #0284c7; }
    .money-foot-bank { background: #7c3aed; }
    .money-foot-sale { background: #059669; }
    .money-mobile-bar {
      display: none;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      padding: 0.7rem 0.85rem;
      padding-top: max(0.7rem, env(safe-area-inset-top, 0px));
      background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 55%, #6d28d9 100%);
      color: #fff;
      flex-shrink: 0;
      z-index: 5;
    }
    .money-mobile-bar-title { font-size: 0.9375rem; font-weight: 800; letter-spacing: 0.01em; }
    .money-mobile-close {
      flex-shrink: 0;
      padding: 0.45rem 0.85rem;
      border-radius: 9999px;
      background: rgba(255,255,255,0.22);
      border: 1px solid rgba(255,255,255,0.4);
      color: #fff;
      font-size: 0.75rem;
      font-weight: 800;
      min-height: 2.25rem;
    }
    .money-mobile-close:active { transform: scale(0.96); background: rgba(255,255,255,0.32); }

    /* Hero layout — consistent alignment */
    .money-hero-block {
      padding: 0.85rem 0.85rem 0.9rem;
      overflow: hidden;
    }
    .money-hero-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.65rem;
      margin-bottom: 0.65rem;
    }
    .money-hero-title-row {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      min-width: 0;
    }
    .money-hero-emoji { font-size: 1.25rem; line-height: 1; flex-shrink: 0; }
    .money-hero-label {
      font-size: 0.6875rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: #a16207;
      line-height: 1.2;
    }
    .money-hero-sub { display: none; }
    .money-trust-badge {
      text-align: right;
      flex-shrink: 0;
      border-radius: 0.65rem;
      padding: 0.3rem 0.5rem;
      background: rgba(255,255,255,0.65);
      border: 1px solid rgba(228, 228, 231, 0.9);
    }
    .money-trust-lbl {
      font-size: 0.5625rem;
      font-weight: 700;
      text-transform: uppercase;
      color: #71717a;
      letter-spacing: 0.04em;
    }
    .money-trust-val { font-size: 0.8125rem; font-weight: 900; line-height: 1.15; }
    .money-hero-total-wrap { text-align: center; padding: 0.35rem 0 0.75rem; }
    .money-hero-total-lbl {
      font-size: 0.625rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: #71717a;
    }
    .money-total-amount {
      font-size: 1.85rem;
      font-weight: 900;
      letter-spacing: -0.03em;
      color: #18181b;
      margin-top: 0.15rem;
      font-variant-numeric: tabular-nums;
      line-height: 1.1;
    }
    .money-hero-hint { font-size: 0.6875rem; margin-top: 0.3rem; color: #71717a; }
    .money-pool-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.55rem;
      margin-bottom: 0.65rem;
    }
    .money-pool-card {
      text-align: center;
      border-radius: 0.9rem;
      padding: 0.65rem 0.45rem;
      border: 1px dashed #d4d4d8;
      background: rgba(255,255,255,0.72);
      min-width: 0;
    }
    .money-pool-ico { font-size: 1.1rem; line-height: 1; margin-bottom: 0.2rem; }
    .money-pool-lbl {
      font-size: 0.5625rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: #71717a;
    }
    .money-pool-amt {
      font-size: 1rem;
      font-weight: 900;
      font-variant-numeric: tabular-nums;
      margin-top: 0.15rem;
      line-height: 1.15;
      word-break: break-word;
    }
    .money-pool-meta {
      font-size: 0.5625rem;
      color: #a1a1aa;
      margin-top: 0.25rem;
      line-height: 1.3;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .money-hero-verdict-box {
      border-radius: 0.75rem;
      padding: 0.55rem 0.7rem;
      font-size: 0.6875rem;
      line-height: 1.4;
      color: #52525b;
      background: #fafafa;
      border: 1px solid #e4e4e7;
    }
    .money-hero-actions {
      display: flex;
      gap: 0.5rem;
      margin-top: 0.65rem;
    }
    .money-hero-actions .money-btn-cash,
    .money-hero-actions .money-btn-bank {
      flex: 1 1 0;
      min-height: 2.75rem;
      font-size: 0.75rem;
      font-weight: 800;
      border-radius: 0.85rem;
      padding: 0.55rem 0.4rem;
    }
    .money-bank-feed-host,
    .money-cash-off-host { margin-top: 0.55rem; }
    .money-bank-link-btn {
      display: block;
      width: 100%;
      margin-top: 0.15rem;
      padding: 0.65rem 0.75rem;
      border-radius: 0.85rem;
      border: 1px solid #c4b5fd;
      background: #f5f3ff;
      color: #5b21b6;
      font-size: 0.6875rem;
      font-weight: 800;
      text-align: center;
      cursor: pointer;
      min-height: 2.5rem;
    }
    .money-bank-link-btn:active { background: #ede9fe; }
    .money-math-details {
      border-top: 1px solid #e4e4e7;
      background: #fafafa;
    }
    .money-math-details summary {
      padding: 0.65rem 0.85rem;
      font-size: 0.6875rem;
      font-weight: 700;
      color: #52525b;
      cursor: pointer;
    }
    .money-math-body {
      padding: 0 0.85rem 0.85rem;
      font-size: 0.6875rem;
      background: #fff;
    }
    .money-math-h {
      font-size: 0.625rem;
      font-weight: 800;
      text-transform: uppercase;
      color: #6d28d9;
      padding-top: 0.35rem;
      margin-bottom: 0.25rem;
    }
    .money-math-h2 { color: #0f766e; border-top: 1px solid #f4f4f5; margin-top: 0.45rem; padding-top: 0.45rem; }
    .money-math-row {
      display: flex;
      justify-content: space-between;
      gap: 0.5rem;
      padding: 0.15rem 0;
      color: #3f3f46;
    }
    .money-math-indent { padding-left: 0.5rem; color: #71717a; }
    .money-math-strong { font-weight: 700; }
    .money-math-ok { color: #047857; padding: 0.2rem 0; }
    .money-math-range { color: #a1a1aa; padding-top: 0.35rem; }

    @media (min-width: 640px) {
      .money-mobile-bar { display: none !important; }
      .money-hero-sub { display: block; font-size: 0.625rem; color: #71717a; margin-top: 0.1rem; }
      .money-total-amount { font-size: 2.25rem; }
      .money-hero-block { padding: 1rem 1.1rem 1.1rem; border-radius: 1.25rem 1.25rem 0 0; }
    }

    @media (max-width: 768px) {
      .money-mobile-bar { display: flex; }
      .money-panel-compact .money-map-wrap { padding: 0.55rem 0.75rem !important; }
      .money-panel-compact .money-map-feed-list { max-height: min(36dvh, 12rem); }
      .money-panel-compact .money-map-title { font-size: 11px; }

      /* TRUE full-screen Money — covers bottom menu, no gaps/borders */
      body.money-panel-open,
      html:has(body.money-panel-open) {
        overflow: hidden !important;
        height: 100% !important;
        overscroll-behavior: none !important;
      }
      body.money-panel-open.has-bottom-nav,
      body.money-panel-open.has-pwa-banner {
        padding-bottom: 0 !important;
      }
      body.money-panel-open #bottom-nav,
      body.money-panel-open #feature-browser-tab,
      body.money-panel-open .app-header,
      body.money-panel-open .store-hero,
      body.money-panel-open #pwa-install-banner {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
        height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        opacity: 0 !important;
      }
      body.money-panel-open #home-money-section.money-panel-open {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        width: 100vw !important;
        height: 100% !important;
        height: 100dvh !important;
        min-height: 100dvh !important;
        max-height: 100dvh !important;
        z-index: 640 !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: stretch !important;
        align-items: stretch !important;
        background: #fff !important;
        overflow: hidden !important;
        gap: 0 !important;
        max-width: none !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
      }
      body.money-panel-open #home-money-section.money-panel-open #home-till-estimate,
      body.money-panel-open #home-money-section.money-panel-open #home-till-estimate.card {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 auto !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        overflow: hidden !important;
        box-shadow: none !important;
        background: #fff !important;
        display: flex !important;
        flex-direction: column !important;
      }
      body.money-panel-open .money-panel-root {
        flex: 1 1 auto !important;
        height: 100% !important;
        min-height: 0 !important;
        border-radius: 0 !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
      }
      body.money-panel-open .money-mobile-bar {
        border-radius: 0 !important;
        flex-shrink: 0 !important;
      }
      body.money-panel-open .money-panel-scroll {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
      }
      body.money-panel-open .money-panel-footer {
        flex-shrink: 0 !important;
        border-radius: 0 !important;
        padding-bottom: max(0.65rem, env(safe-area-inset-bottom, 0px)) !important;
      }
      body.money-panel-open .money-hero-block {
        border-radius: 0 !important;
      }
      body.money-panel-open #home-money-section.money-panel-open #home-money-placeholder,
      body.money-panel-open #home-money-section.money-panel-open #home-cashflow {
        display: none !important;
      }
      body.money-panel-open .money-panel-compact .money-fix-list,
      body.money-panel-open .money-panel-compact [class*="space-y"] {
        gap: 0.45rem;
      }
    }

    /*
     * Mobile full-screen tool sheets (v462)
     * Same lottery-hub experience for Money-adjacent tools, catalogs, reports, AI OS, etc.
     */
    @media (max-width: 768px) {
      #lottery-hub-modal,
      #lottery-import-modal,
      #lottery-shift-modal,
      #reports-modal,
      #reports-detail-modal,
      #history-modal,
      #fuel-hub-modal,
      #hr-hub-modal,
      #catalog-modal,
      #digital-shelf-modal,
      #vendor-hub-modal,
      #vendor-order-modal,
      #query-modal,
      #import-modal,
      #manage-stores-modal,
      #closing-wizard-modal,
      #bank-csv-modal,
      #bank-feed-modal,
      #register-csv-modal,
      #invoice-ocr-modal,
      #receive-delivery-modal,
      #photo-memory-modal,
      #pl-modal,
      #ap-modal,
      #till-count-modal,
      #cash-variance-modal,
      #reconcile-wizard-modal,
      #compare-stores-modal,
      #upgrade-modal,
      #trust-modal,
      #admin-dashboard-modal,
      #command-palette-modal,
      #connections-hub-modal {
        z-index: 360 !important;
        align-items: flex-end !important;
        justify-content: flex-end !important;
        padding: 0 !important;
        margin: 0 !important;
        background: rgba(15, 23, 42, 0.48) !important;
        inset: 0 !important;
      }
      #lottery-hub-modal > div,
      #lottery-import-modal > div,
      #lottery-shift-modal > div,
      #reports-modal > div,
      #reports-detail-modal > div,
      #history-modal > div,
      #fuel-hub-modal > div,
      #hr-hub-modal > div,
      #catalog-modal > div,
      #digital-shelf-modal > div,
      #vendor-hub-modal > div,
      #vendor-order-modal > div,
      #query-modal > div,
      #import-modal > div,
      #manage-stores-modal > div,
      #closing-wizard-modal > div,
      #bank-csv-modal > div,
      #bank-feed-modal > div,
      #register-csv-modal > div,
      #invoice-ocr-modal > div,
      #receive-delivery-modal > div,
      #photo-memory-modal > div,
      #pl-modal > div,
      #ap-modal > div,
      #till-count-modal > div,
      #cash-variance-modal > div,
      #reconcile-wizard-modal > div,
      #compare-stores-modal > div,
      #upgrade-modal > div,
      #trust-modal > div,
      #admin-dashboard-modal > div,
      #command-palette-modal > div,
      #connections-hub-modal > div {
        width: 100% !important;
        max-width: 100% !important;
        height: min(96dvh, 100%) !important;
        max-height: min(96dvh, 100%) !important;
        min-height: min(88dvh, 100%) !important;
        border-radius: 1.15rem 1.15rem 0 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.28) !important;
      }
      /* Sticky header + scroll body inside every sheet */
      #lottery-hub-modal > div > .border-b,
      #lottery-hub-modal > div > [class*="border-b"],
      #reports-modal > div > .border-b,
      #reports-modal > div > [class*="border-b"],
      #history-modal > div > .border-b,
      #catalog-modal > div > .border-b,
      #vendor-hub-modal > div > .border-b,
      #vendor-order-modal > div > .border-b,
      #hr-hub-modal > div > .border-b,
      #fuel-hub-modal > div > .border-b,
      #closing-wizard-modal > div > .border-b,
      #bank-csv-modal > div > .border-b,
      #bank-feed-modal > div > .border-b,
      #register-csv-modal > div > .border-b,
      #invoice-ocr-modal > div > .border-b,
      #connections-hub-modal > div > .border-b,
      #manage-stores-modal > div > .border-b,
      #digital-shelf-modal > div > .border-b {
        position: sticky !important;
        top: 0 !important;
        z-index: 3 !important;
        flex-shrink: 0 !important;
      }
      #lottery-hub-body,
      #vendor-hub-body,
      #digital-shelf-body,
      #hr-hub-body,
      #fuel-hub-body,
      #connections-hub-modal #conn-hub-body,
      #catalog-modal .overflow-auto,
      #reports-modal .overflow-auto,
      #history-modal .overflow-auto,
      #manage-stores-modal .manage-stores-body {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
      }
      /* Manage Stores: header fixed, body scrolls, fields usable on phone */
      #manage-stores-modal .manage-stores-header {
        position: relative !important;
        flex-shrink: 0 !important;
        z-index: 5 !important;
      }
      #manage-stores-modal .manage-stores-panel {
        height: min(96dvh, 100%) !important;
        max-height: min(96dvh, 100%) !important;
        min-height: min(72dvh, 100%) !important;
        padding-bottom: 0 !important;
      }
      #manage-stores-modal .ms-field,
      #manage-stores-modal input.ms-field,
      #manage-stores-modal select.ms-field,
      #manage-stores-modal textarea.ms-field,
      #manage-stores-modal .store-hours-time,
      #manage-stores-modal #team-invite-email,
      #manage-stores-modal #team-invite-name {
        font-size: 16px !important; /* stop iOS focus-zoom that breaks scroll */
        min-height: 2.75rem;
      }
      #manage-stores-modal .store-hours-row {
        flex-wrap: wrap;
        gap: 0.4rem 0.5rem;
        padding: 0.55rem 0.6rem;
      }
      #manage-stores-modal .store-hours-day {
        width: auto;
        min-width: 5.5rem;
        flex: 1 1 auto;
      }
      #manage-stores-modal .store-hours-time {
        flex: 1 1 calc(50% - 1rem);
        min-width: 6.5rem;
        max-width: 100%;
      }
      #manage-stores-modal .ms-save-bar {
        position: sticky !important;
        bottom: 0 !important;
        z-index: 4 !important;
      }
      #manage-stores-modal .ms-section {
        padding: 0.75rem 0.7rem;
      }
      /* Big easy Close targets on phone */
      #btn-close-lottery-hub,
      #btn-close-reports,
      #btn-close-reports-detail,
      #btn-close-history,
      #btn-close-hr-hub,
      #btn-close-vendor-hub,
      #btn-close-vendor-order,
      #btn-close-catalog,
      #btn-close-digital-shelf,
      #btn-close-invoice-ocr,
      #btn-bank-csv-close,
      #btn-bank-feed-close,
      #btn-close-register,
      #btn-conn-hub-close,
      #btn-close-closing-wizard,
      #btn-close-manage-stores,
      #btn-close-manage {
        min-height: 2.35rem !important;
        min-width: 3.5rem !important;
        font-weight: 800 !important;
        background: #fff !important;
        border: 1px solid #e4e4e7 !important;
        border-radius: 0.75rem !important;
        padding: 0.45rem 0.85rem !important;
      }
      /* Hide chrome under full-screen sheets */
      body:has(#lottery-hub-modal:not(.hidden)) #bottom-nav,
      body:has(#catalog-modal:not(.hidden)) #bottom-nav,
      body:has(#vendor-order-modal:not(.hidden)) #bottom-nav,
      body:has(#vendor-hub-modal:not(.hidden)) #bottom-nav,
      body:has(#reports-modal:not(.hidden)) #bottom-nav,
      body:has(#history-modal:not(.hidden)) #bottom-nav,
      body:has(#closing-wizard-modal:not(.hidden)) #bottom-nav,
      body:has(#connections-hub-modal:not(.hidden)) #bottom-nav,
      body:has(#hr-hub-modal:not(.hidden)) #bottom-nav,
      body:has(#fuel-hub-modal:not(.hidden)) #bottom-nav,
      body:has(#bank-csv-modal:not(.hidden)) #bottom-nav,
      body:has(#bank-feed-modal:not(.hidden)) #bottom-nav,
      body:has(#register-csv-modal:not(.hidden)) #bottom-nav,
      body:has(#invoice-ocr-modal:not(.hidden)) #bottom-nav,
      body:has(#digital-shelf-modal:not(.hidden)) #bottom-nav,
      body:has(#manage-stores-modal:not(.hidden)) #bottom-nav,
      body:has(#stock-road-buy-modal:not(.hidden)) #bottom-nav,
      body:has(#stock-road-empty-modal:not(.hidden)) #bottom-nav,
      body:has(#stock-road-desk-modal:not(.hidden)) #bottom-nav,
      body.sr-buy-open #bottom-nav,
      body.sr-out-open #bottom-nav {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
        height: 0 !important;
        opacity: 0 !important;
      }
    }
    #btn-header-money {
      align-items: center;
      gap: 0.35rem;
      background: #fffbeb;
      color: #92400e;
      border: 1px solid #fde68a;
      font-weight: 700;
      box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
      letter-spacing: 0.01em;
    }
    #btn-header-money .money-nav-coin {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 1.35rem;
      height: 1.35rem;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.55);
      font-size: 0.85rem;
      line-height: 1;
    }
    #btn-header-money.money-btn-active {
      background: #fef3c7;
      color: #92400e;
      border-color: #fcd34d;
      box-shadow: 0 1px 4px rgba(180, 83, 9, 0.1);
    }
    #btn-header-money:active { transform: scale(0.94); }
    /* Phone: Money lives on bottom nav (globe in header would duplicate).
       Desktop/tablet: always show globe when not .hidden */
    @media (max-width: 639px) {
      #btn-header-money,
      #btn-header-money:not(.hidden) { display: none !important; }
      .header-actions .header-btn-label { display: none !important; }
      /* Keep Sign out label visible — do not collapse to icon-only */
      #btn-logout-top .header-signout-label { display: inline !important; }
    }
    @media (min-width: 640px) {
      #btn-header-money:not(.hidden) {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
      }
      #btn-header-money .money-globe-ico,
      #btn-header-money .header-ico {
        display: block !important;
        width: 1.15rem !important;
        height: 1.15rem !important;
      }
    }
    .bnav-money-btn .bnav-money-icon {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 2.35rem;
      height: 2.35rem;
      border-radius: 999px;
      background: #fffbeb;
      border: 1px solid #fde68a;
      box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
      font-size: 1.15rem;
      margin-bottom: 0.15rem;
      transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .bnav-money-btn.bnav-btn-active .bnav-money-icon {
      background: #fef3c7;
      border-color: #fcd34d;
      box-shadow: 0 1px 4px rgba(180, 83, 9, 0.1);
      transform: scale(1.03);
    }
    .bnav-money-btn.bnav-btn-active { color: #92400e; background: rgba(251, 191, 36, 0.12); }
    .money-hero-total {
      background: linear-gradient(168deg, #ffffff 0%, #fafafa 42%, #fffbeb 100%);
      color: #27272a;
      border: 1px solid #e4e4e7;
      box-shadow: 0 8px 28px -14px rgba(15, 23, 42, 0.1);
    }
    .money-hero-label { color: #a16207; }
    .money-hero-muted { color: #71717a; }
    .money-hero-meta { color: #a1a1aa; }
    .money-hero-verdict { color: #52525b; }
    .money-trust-badge { background: #f4f4f5; border: 1px solid #e4e4e7; }
    .money-trust-high { color: #047857; }
    .money-trust-mid { color: #b45309; }
    .money-trust-low { color: #b91c1c; }
    .money-amt-cash { color: #18181b; }
    .money-amt-bank { color: #0f766e; }
    .money-amt-muted { color: #a1a1aa; }
    .money-amt-warn { color: #b91c1c; }
    .money-pool-surface { background: #fff; border: 1px solid #e4e4e7; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04); }
    .money-hero-verdict-box { background: #fafafa; border: 1px solid #e4e4e7; }
    .money-btn-cash {
      background: #fffbeb;
      color: #92400e;
      border: 1px solid #fde68a;
      font-weight: 700;
      box-shadow: none;
    }
    .money-btn-cash:active { background: #fef3c7; }
    .money-btn-bank {
      background: #f0fdfa;
      color: #0f766e;
      border: 1px solid #99f6e4;
      font-weight: 700;
      box-shadow: none;
    }
    .money-btn-bank:active { background: #ccfbf1; }
    .money-cash-off-strip { border: 1px solid #e4e4e7; background: #fafafa; }
    .money-cash-off-muted { color: #71717a; }
    .money-cash-off-good { color: #047857; }
    .money-cash-off-bad { color: #b91c1c; }
    .money-cash-off-warn { color: #b45309; }
    .money-pool-card { transition: transform 0.12s ease; }
    .money-pool-card:active { transform: scale(0.98); }
    .money-pool-card-user { border-color: #d4d4d8 !important; background: #fff !important; box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05); }
    .money-pool-card-est { border-style: dashed !important; border-color: #d4d4d8 !important; background: #fafafa !important; }
    .money-pool-card-empty { border-style: dashed !important; border-color: #e4e4e7 !important; background: #fafafa !important; opacity: 1; }
    .money-pool-est-amt { opacity: 0.95; }
    .money-map-wrap {
      background: linear-gradient(180deg, #fafafa 0%, #fff 52%);
      border-top: 1px solid #e4e4e7;
      padding: 0.85rem 0.75rem 1rem;
    }
    .money-map-head {
      display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem;
      margin-bottom: 0.75rem;
    }
    .money-map-title {
      font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #3f3f46;
    }
    .money-map-sub { font-size: 0.5625rem; color: #71717a; margin-top: 0.15rem; line-height: 1.35; }
    .money-map-live-pill {
      display: inline-flex; align-items: center; gap: 0.35rem;
      font-size: 0.5625rem; font-weight: 700; color: #047857;
      background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 999px; padding: 0.2rem 0.5rem; white-space: nowrap;
    }
    .money-map-live-dot {
      width: 0.4rem; height: 0.4rem; border-radius: 50%; background: #10b981;
      box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
      animation: money-map-pulse 2s ease-in-out infinite;
    }
    @keyframes money-map-pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.55; transform: scale(0.85); }
    }
    .money-map-flow { display: flex; flex-direction: column; gap: 0.5rem; }
    .money-map-zone {
      border-radius: 1rem; border: 1px solid #e4e4e7; background: #fff; padding: 0.65rem 0.75rem;
    }
    .money-map-zone-in { border-color: #a7f3d0; background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%); }
    .money-map-zone-out { border-color: #fed7aa; background: linear-gradient(180deg, #fff7ed 0%, #fff 100%); }
    .money-map-zone-label {
      font-size: 0.5rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #71717a;
    }
    .money-map-zone-total { font-size: 1.125rem; font-weight: 900; margin: 0.15rem 0 0.4rem; }
    .money-map-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
    .money-map-chip {
      font-size: 0.5625rem; font-weight: 600; padding: 0.25rem 0.45rem; border-radius: 999px; line-height: 1.3;
    }
    .money-map-chip strong { font-weight: 800; }
    .money-map-chip-in { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
    .money-map-chip-out { background: #ffedd5; color: #9a3412; border: 1px solid #fdba74; }
    .money-map-chip-move { background: #ccfbf1; color: #115e59; border: 1px solid #99f6e4; }
    .money-map-chip-empty { font-size: 0.5625rem; color: #a1a1aa; font-style: italic; }
    .money-map-arrows {
      display: flex; flex-direction: column; align-items: center; gap: 0.1rem; color: #a1a1aa; font-weight: 800; line-height: 1;
    }
    .money-map-arrow { font-size: 1rem; }
    .money-map-arrow-label { font-size: 0.5rem; letter-spacing: 0.14em; text-transform: uppercase; color: #71717a; }
    .money-map-pools {
      display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem;
    }
    .money-map-pool {
      border-radius: 0.85rem; border: 1px solid #e4e4e7; background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
      padding: 0.45rem 0.35rem; text-align: center; min-height: 4.5rem;
    }
    .money-map-pool-drawer { border-color: #fcd34d; background: linear-gradient(180deg, #fffbeb 0%, #fff 100%); }
    .money-map-pool-bank { border-color: #5eead4; background: linear-gradient(180deg, #f0fdfa 0%, #fff 100%); }
    .money-map-pool-safe { border-color: #fcd34d; background: linear-gradient(180deg, #fffbeb 0%, #fff 100%); }
    .money-map-pool-card { border-color: #7dd3fc; background: linear-gradient(180deg, #f0f9ff 0%, #fff 100%); }
    .money-map-pool-icon { font-size: 1rem; line-height: 1; }
    .money-map-pool-label {
      font-size: 0.4375rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #6b7280; margin-top: 0.15rem;
    }
    .money-map-pool-amt { font-size: 0.75rem; font-weight: 900; color: #18181b; margin-top: 0.1rem; }
    .money-map-pool-badge {
      display: inline-block; margin-top: 0.2rem; font-size: 0.4375rem; font-weight: 700; padding: 0.1rem 0.3rem; border-radius: 999px;
    }
    .money-map-pool-badge-user { background: #d1fae5; color: #047857; }
    .money-map-pool-badge-est { background: #f4f4f5; color: #52525b; }
    .money-map-pool-badge-empty { background: #f4f4f5; color: #71717a; }
    .money-map-pool-badge-warn { background: #fef3c7; color: #b45309; }
    .money-map-moves {
      display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem;
      padding: 0.45rem 0.55rem; border-radius: 0.85rem; border: 1px dashed #99f6e4; background: #f0fdfa;
    }
    .money-map-moves-label { font-size: 0.5rem; font-weight: 800; text-transform: uppercase; color: #0f766e; }
    .money-map-status {
      margin-top: 0.65rem; border-radius: 0.85rem; border: 1px solid; padding: 0.5rem 0.65rem;
      font-size: 0.625rem; font-weight: 700; line-height: 1.35;
    }
    .money-map-status-ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
    .money-map-status-gap { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
    .money-map-feed {
      margin-top: 0.65rem; border-radius: 0.85rem; border: 1px solid #e4e4e7; background: #fafafa; overflow: hidden;
    }
    .money-map-feed-head {
      display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
      padding: 0.45rem 0.6rem; background: #f4f4f5; border-bottom: 1px solid #e4e4e7;
      font-size: 0.5625rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #52525b;
    }
    .money-map-feed-btn {
      font-size: 0.5625rem; font-weight: 700; color: #3f3f46; background: #fff; border: 1px solid #e4e4e7;
      border-radius: 0.5rem; padding: 0.2rem 0.45rem;
    }
    .money-map-feed-list { max-height: 9rem; overflow-y: auto; padding: 0.35rem 0.5rem; }
    .money-map-feed-row {
      display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.3rem 0.15rem;
      border-bottom: 1px solid #f4f4f5; font-size: 0.5625rem;
    }
    .money-map-feed-row:last-child { border-bottom: 0; }
    .money-map-feed-meta { color: #71717a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
    .money-map-feed-amt { font-weight: 800; flex-shrink: 0; }
    .money-map-feed-in .money-map-feed-amt { color: #047857; }
    .money-map-feed-out .money-map-feed-amt { color: #c2410c; }
    .money-map-feed-move .money-map-feed-amt { color: #0f766e; }
    .money-map-feed-empty { font-size: 0.5625rem; color: #a1a1aa; padding: 0.5rem; text-align: center; font-style: italic; }
    @media (max-width: 380px) {
      .money-map-pools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    .store-bar { border-color: rgba(16, 185, 129, 0.15); }
    #tools-hub { border-color: rgba(15, 23, 42, 0.06); }
    .brain-strip { padding: 0.75rem 0.85rem !important; }
    .brain-strip-head { display: flex; align-items: flex-start; gap: 0.55rem; margin-bottom: 0.65rem; }
    .brain-strip-emoji { font-size: 1.35rem; line-height: 1; flex-shrink: 0; }
    .brain-strip-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; font-size: 0.8125rem; color: #18181b; }

    /* Compact Store Brain — chips under Luckymart PRO (no auto full wall) */
    .brain-strip-collapsed .brain-strip-head { margin-bottom: 0.45rem; }
    .brain-expand-btn {
      flex-shrink: 0;
      width: 1.75rem;
      height: 1.75rem;
      border-radius: 999px;
      border: 1px solid #e4e4e7;
      background: #fff;
      color: #52525b;
      font-size: 0.7rem;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .brain-expand-btn:active { background: #f4f4f5; }
    .brain-compact-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem;
    }
    .brain-chip {
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      min-height: 2rem;
      padding: 0.3rem 0.55rem;
      border-radius: 999px;
      border: 1px solid #e4e4e7;
      background: #fff;
      font-size: 0.65rem;
      font-weight: 700;
      color: #18181b;
      touch-action: manipulation;
      line-height: 1.1;
    }
    .brain-chip:active { transform: scale(0.97); }
    .brain-chip-ico { font-size: 0.75rem; line-height: 1; }
    .brain-chip-txt { white-space: nowrap; }
    .brain-chip-ok { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
    .brain-chip-warn { border-color: #fde68a; background: #fffbeb; color: #b45309; }
    .brain-chip-bad { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
    .brain-chip-idle { border-color: #e4e4e7; background: #fafafa; color: #3f3f46; }
    body.mr-strict-today .brain-strip-collapsed {
      padding: 0.65rem 0.75rem !important;
    }
    /* Settings open: keep manage modal on top; calm background scroll */
    body.mr-settings-open #manage-stores-modal:not(.hidden) {
      z-index: 120 !important;
    }
    body.mr-settings-open:has(#manage-stores-modal:not(.hidden)) {
      overflow: hidden;
    }
    .brain-os-badge {
      font-size: 0.5625rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
      padding: 0.12rem 0.4rem; border-radius: 999px; background: rgba(99, 102, 241, 0.12); color: #4338ca;
    }
    .brain-strip-sub { font-size: 0.625rem; color: #71717a; margin-top: 0.15rem; line-height: 1.35; }
    .brain-pillar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
    .brain-pillar {
      display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem;
      padding: 0.5rem 0.45rem; border-radius: 0.85rem; border: 1px solid #e4e4e7; background: #fff;
      text-align: left; cursor: pointer; touch-action: manipulation; transition: transform 0.12s ease, border-color 0.12s;
    }
    .brain-pillar:active { transform: scale(0.98); }
    .brain-pillar-icon { font-size: 0.95rem; line-height: 1; }
    .brain-pillar-label { font-size: 0.5rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #a1a1aa; }
    .brain-pillar-head { font-size: 0.6875rem; font-weight: 800; color: #18181b; line-height: 1.2; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .brain-pillar-detail { font-size: 0.5625rem; color: #71717a; line-height: 1.25; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .brain-pillar-ok { border-color: #a7f3d0; background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%); }
    .brain-pillar-ok .brain-pillar-head { color: #047857; }
    .brain-pillar-warn { border-color: #fde68a; background: linear-gradient(180deg, #fffbeb 0%, #fff 100%); }
    .brain-pillar-warn .brain-pillar-head { color: #b45309; }
    .brain-pillar-bad { border-color: #fecaca; background: linear-gradient(180deg, #fef2f2 0%, #fff 100%); }
    .brain-pillar-bad .brain-pillar-head { color: #b91c1c; }
    .brain-pillar-idle { border-color: #e4e4e7; background: #fafafa; }
    .brain-lottery-chip {
      width: 100%; margin-top: 0.45rem; padding: 0.4rem 0.55rem; border-radius: 0.75rem;
      border: 1px solid #e9d5ff; background: #faf5ff; font-size: 0.625rem; font-weight: 600; color: #6b21a8;
      text-align: left; cursor: pointer; touch-action: manipulation;
    }
    .brain-lottery-chip.brain-pillar-ok { border-color: #c4b5fd; background: #f5f3ff; color: #5b21b6; }
    .brain-next-step {
      width: 100%; margin-top: 0.45rem; padding: 0.45rem 0.55rem; border-radius: 0.75rem;
      border: 1px dashed #c7d2fe; background: #eef2ff; font-size: 0.625rem; font-weight: 700; color: #4338ca;
      text-align: left; cursor: pointer; touch-action: manipulation;
    }
    .brain-strip-all { border-color: rgba(99, 102, 241, 0.2); }
    #home-insights > #home-all-stores-analytics { order: 2; }
    .brain-store-bar-fill { transition: width 0.2s ease; }
    .brain-store-switch:active { transform: scale(0.98); }
    .tools-hub-section.brain-hub-secondary .tools-hub-head { background: #f4f4f5; }
    .tools-hub-section.brain-hub-secondary .tools-hub-head-title { color: #52525b; }
    .tools-hub-section { border: 1px solid #e4e4e7; border-radius: 1rem; overflow: hidden; margin-bottom: 0.5rem; }
    .tools-hub-section:last-child { margin-bottom: 0; }
    .tools-hub-head {
      width: 100%; display: flex; align-items: center; gap: 0.65rem;
      padding: 0.75rem 0.85rem; background: #fafafa; border: none; cursor: pointer;
      text-align: left; touch-action: manipulation;
    }
    .tools-hub-head:hover { background: #f4f4f5; }
    .tools-hub-head-icon { font-size: 1.1rem; line-height: 1; flex-shrink: 0; }
    .tools-hub-head-copy { flex: 1; min-width: 0; }
    .tools-hub-head-title { display: block; font-size: 0.8125rem; font-weight: 800; color: #18181b; }
    .tools-hub-head-desc { display: block; font-size: 0.625rem; color: #71717a; margin-top: 0.1rem; }
    .tools-hub-chevron { font-size: 0.625rem; color: #a1a1aa; flex-shrink: 0; transition: transform 0.15s; }
    .tools-hub-section.is-open .tools-hub-chevron { transform: rotate(180deg); }
    .tools-hub-body { display: none; padding: 0.65rem 0.75rem 0.75rem; background: #fff; border-top: 1px solid #f4f4f5; }
    .tools-hub-section.is-open .tools-hub-body { display: block; }
    .tools-hub-body .nav-tool { font-size: 0.6875rem; }
    /* Cash off report — compact readable density */
    #cash-variance-modal { font-size: 11px; line-height: 1.35; }
    #cash-variance-modal .cash-off-root { font-size: 11px; }
    #cash-variance-modal .cash-off-kpi { padding: 0.4rem 0.35rem; }
    #cash-variance-modal .cash-off-kpi-val { font-size: 0.6875rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
    #cash-variance-modal .cash-off-amt { font-size: 0.6875rem !important; font-weight: 600 !important; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; line-height: 1.2; }
    #cash-variance-modal .cash-off-amt-neg { color: inherit; }
    #cash-variance-modal .cash-off-kpi-lbl { font-size: 0.5625rem; letter-spacing: 0.04em; }
    #cash-variance-modal .cash-off-list-card { padding: 0.5rem 0.55rem; }
    #cash-variance-modal .cash-off-list-title { font-size: 0.5625rem; }
    #cash-variance-modal .cash-off-list-sub { font-size: 0.5625rem; line-height: 1.3; }
    #cash-variance-modal .cash-off-row { font-size: 0.625rem; padding: 0.35rem 0.45rem; }
    #cash-variance-modal .cash-off-row-amt { font-size: 0.6875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
    #cash-variance-modal .cash-off-table { font-size: 0.625rem; }
    #cash-variance-modal .cash-off-table th,
    #cash-variance-modal .cash-off-table td { padding: 0.25rem 0.35rem; }
    #cash-variance-modal .cash-off-section-title { font-size: 0.5625rem; }
    #cash-variance-modal .cash-off-foot { font-size: 0.5625rem; line-height: 1.35; }
    .quick-primary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    @media (min-width: 480px) { .quick-primary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
    @media (min-width: 640px) { .quick-primary-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
    .quick-btn-reports { background: linear-gradient(180deg, #6366f1 0%, #4338ca 100%) !important; }
    #btn-quick-more-toggle { font-size: 0.6875rem; font-weight: 700; color: #52525b; }
    /* v990: do not strip books buttons when form open */
    /* #section-quick-add.employee-form-only > *:not(#add-form) disabled */
    #section-quick-add.employee-form-only { padding-top: 1rem; padding-bottom: 1rem; }
    #section-quick-add.employee-form-only #add-form { margin-top: 0; padding-top: 0; border-top: 0; }
    body.guest-mode #tools-hub { display: none !important; }
    .store-hero-expand-hint { display: none; }
    body.records-syncing #ledger-kpis .tabular-nums,
    body.records-syncing .qi-kpi-val,
    body.records-syncing .qi-hero-amount { opacity: 0.5; }
    body:not(.records-syncing) .qi-kpi-sales .qi-kpi-val { color: #047857 !important; }
    body:not(.records-syncing) .qi-kpi-stock .qi-kpi-val { color: #c2410c !important; }
    body:not(.records-syncing) .qi-kpi-op .qi-kpi-val { color: #4338ca !important; }
    body:not(.records-syncing) .qi-kpi-net .qi-kpi-val { color: #047857 !important; }
    body:not(.records-syncing) .qi-hero-amount { color: #18181b !important; }
    body:not(.records-syncing) .net-hero-amount { opacity: 1 !important; }
    #workspace-boot-overlay .boot-spinner {
      width: 2rem; height: 2rem; margin: 0 auto 0.75rem;
      border: 2px solid #bfdbfe; border-top-color: #2563eb;
      border-radius: 999px; animation: boot-spin 0.7s linear infinite;
    }
    @keyframes boot-spin { to { transform: rotate(360deg); } }
    body.app-workspace-booting #home-upgrade-banner { display: none !important; }
    /* v1383: never blank store-hero when home already ready */
    body.app-boot-pending:not(.app-home-ready):not(.app-ready) #store-hero,
    body.app-boot-pending:not(.app-home-ready):not(.app-ready) #tools-hub,
    body.app-boot-pending:not(.app-home-ready):not(.app-ready) #section-quick-add,
    body.app-boot-pending:not(.app-home-ready):not(.app-ready) #section-ledger-metrics,
    body.app-boot-pending:not(.app-home-ready):not(.app-ready) #section-ledger-table,
    body.app-boot-pending:not(.app-home-ready):not(.app-ready) #home-dashboard-status,
    body.app-workspace-booting:not(.app-session-boot):not(.app-home-ready):not(.app-ready) #store-hero,
    body.app-workspace-booting:not(.app-session-boot):not(.app-home-ready):not(.app-ready) #tools-hub,
    body.app-workspace-booting:not(.app-session-boot):not(.app-home-ready):not(.app-ready) #section-quick-add,
    body.app-workspace-booting:not(.app-session-boot):not(.app-home-ready):not(.app-ready) #section-ledger-metrics,
    body.app-workspace-booting:not(.app-session-boot):not(.app-home-ready):not(.app-ready) #section-ledger-table,
    body.app-workspace-booting:not(.app-session-boot):not(.app-home-ready):not(.app-ready) #home-dashboard-status,
    body.app-boot-pending #feature-browser-tab,
    body.app-workspace-booting #feature-browser-tab { display: none !important; }
    body.app-workspace-booting:not(.app-ready):not(.app-home-ready) #app-loading-shell:not(.hidden) { display: block !important; }
    body.app-ready #app-loading-shell.hidden,
    body.app-home-ready #app-loading-shell.hidden { display: none !important; }
    #app-loading-shell:not(.hidden) {
      border: 1px solid rgba(16, 185, 129, 0.18);
      background: linear-gradient(165deg, #ecfdf5 0%, #fff 45%, #f8fafc 100%);
      box-shadow: 0 12px 32px -16px rgba(6, 78, 59, 0.18);
    }
    html.dark #app-loading-shell:not(.hidden) {
      border-color: rgba(52, 211, 153, 0.22);
      background: linear-gradient(165deg, #134e4a 0%, #1e293b 45%, #0f172a 100%);
      box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.45);
    }
    body.auth-booting:not(.guest-mode):not(.app-home-ready):not(.app-ready) .store-hero,
    body.auth-booting:not(.guest-mode):not(.app-home-ready):not(.app-ready) #section-quick-add,
    body.auth-booting:not(.guest-mode):not(.app-home-ready):not(.app-ready) #section-ledger-metrics,
    body.auth-booting:not(.guest-mode):not(.app-home-ready):not(.app-ready) #section-ledger-table,
    body.auth-booting:not(.guest-mode):not(.app-home-ready):not(.app-ready) #bottom-nav,
    body.auth-booting:not(.guest-mode):not(.app-home-ready):not(.app-ready) #home-dashboard-status,
    body.auth-booting:not(.guest-mode):not(.app-home-ready):not(.app-ready) #workspace-boot-overlay,
    body.auth-booting:not(.guest-mode):not(.app-home-ready):not(.app-ready) #home-guest-welcome,
    body.auth-booting:not(.guest-mode):not(.app-home-ready):not(.app-ready) .app-footer-hint { display: none !important; }
    #guest-auth-shell.hidden { display: none !important; }
    body.auth-booting:not(.guest-mode) #guest-auth-shell:not(.hidden) { display: block !important; }
    body.auth-booting:not(.guest-mode):not(.app-home-ready):not(.app-ready) #home-insights > *:not(#guest-auth-shell) { display: none !important; }
    body.auth-booting:not(.guest-mode):not(.app-home-ready) { padding-bottom: 0 !important; }
    /* v886: ready home beats stuck auth-booting wipe of entire #home-insights */
    html body.app-home-ready.app-owner-session #home-insights > #home-dashboard-status:not(.hidden),
    html body.app-home-ready.app-owner-session #home-insights > #home-store-pulse:not(.hidden),
    html body.app-home-ready.app-owner-session #home-insights > #home-tonight-strip:not(.hidden),
    html body.app-home-ready.app-owner-session #home-insights > #home-stock-road:not(.hidden),
    html body.app-home-ready.app-owner-session #home-insights > #home-sell-actions:not(.hidden),
    html body.app-home-ready.app-owner-session #home-insights > #home-live-strip:not(.hidden),
    html body.app-home-ready.app-owner-session #home-insights > #home-team-chat-owner:not(.hidden),
    html body.app-home-ready.app-owner-session #home-insights > #home-staff-adoption:not(.hidden),
    html body.app-home-ready.app-owner-session #home-insights > #home-shift-note:not(.hidden),
    html body.app-home-ready.auth-booting #home-insights > #home-dashboard-status:not(.hidden),
    html body.app-home-ready.auth-booting #home-insights > #home-store-pulse:not(.hidden),
    html body.app-home-ready.auth-booting #home-insights > #home-tonight-strip:not(.hidden),
    html body.app-home-ready.auth-booting #home-insights > #home-stock-road:not(.hidden),
    html body.app-home-ready.auth-booting #home-insights > #home-team-chat-owner:not(.hidden),
    html body.app-home-ready.auth-booting #home-insights > #home-staff-adoption:not(.hidden),
    html body.app-home-ready.auth-booting #home-insights > #home-shift-note:not(.hidden),
    html body.app-home-ready.auth-booting #home-insights > #home-live-strip:not(.hidden),
    html body.app-home-ready.auth-booting #home-insights > #home-sell-actions:not(.hidden) {
      display: revert !important;
      visibility: visible !important;
      opacity: 1 !important;
      pointer-events: auto !important;
      max-height: none !important;
    }
    body.guest-mode .store-hero,
    body.guest-mode #section-quick-add,
    body.guest-mode #section-ledger-metrics,
    body.guest-mode #section-ledger-table,
    body.guest-mode #bottom-nav,
    body.guest-mode #home-dashboard-status,
    body.guest-mode #workspace-boot-overlay,
    body.guest-mode #guest-auth-shell,
    body.guest-mode #employee-role-badge,
    body.guest-mode #btn-employee-login-top,
    body.guest-mode #btn-upgrade-pro,
    body.guest-mode #btn-power-search,
    body.guest-mode #feature-browser-tab,
    body.guest-mode #feature-browser-drawer,
    body.guest-mode #feature-browser-backdrop,
    body.guest-mode #btn-app-lock,
    body.guest-mode #btn-founder-admin,
    body.guest-mode #offline-badge,
    body.guest-mode #pwa-install-banner,
    body.guest-mode #btn-header-money,
    body.guest-mode #btn-logout-top,
    #btn-dark-mode { display: none !important; }

    /* All Stores = portfolio only (no single-store day tools / books) */
    body.all-stores-mode #section-quick-add,
    body.all-stores-mode #section-quick-add.mr-books-panel,
    body.all-stores-mode #section-quick-add.card,
    body.all-stores-mode #tools-hub,
    body.all-stores-mode #section-ledger-metrics,
    body.all-stores-mode #section-ledger-table,
    body.all-stores-mode #home-plan-line,
    body.all-stores-mode #home-dashboard-status,
    body.all-stores-mode #home-trust-bar,
    body.all-stores-mode #home-money-section,
    body.all-stores-mode #bottom-nav,
    body.all-stores-mode #feature-browser-tab,
    body.all-stores-mode #pwa-install-banner,
    body.all-stores-mode .app-footer-hint,
    body.all-stores-mode #home-more-insights-bar,
    body.all-stores-mode #home-quick-actions,
    body.all-stores-mode #home-sell-actions,
    body.all-stores-mode #home-strict-urgent,
    body.all-stores-mode #home-stock-road,
    body.all-stores-mode #owner-desk-tabs,
    body.all-stores-mode .owner-desk,
    body.all-stores-mode #owner-os-rail,
    body.all-stores-mode .owner-os-rail {
      display: none !important;
      visibility: hidden !important;
      height: 0 !important;
      max-height: 0 !important;
      overflow: hidden !important;
      margin: 0 !important;
      padding: 0 !important;
      border: 0 !important;
    }
    body.all-stores-mode #home-insights > *:not(#home-all-stores-analytics):not(#guest-auth-shell):not(#app-loading-shell):not(#workspace-boot-overlay) {
      display: none !important;
    }
    body.all-stores-mode #home-all-stores-analytics,
    body.all-stores-mode #home-all-stores-analytics:not(.hidden) {
      display: block !important;
      visibility: visible !important;
      opacity: 1 !important;
      min-height: 22rem !important;
      height: auto !important;
      max-height: none !important;
      overflow: visible !important;
      content-visibility: visible !important;
      contain: none !important;
    }
    /* content-visibility:auto on .card was clipping portfolio to ~120px (hero only) */
    body.all-stores-mode #home-insights > #home-all-stores-analytics,
    body.all-stores-mode #home-all-stores-analytics.card,
    body.mr-mobile-lite #home-all-stores-analytics {
      content-visibility: visible !important;
      contain: none !important;
      contain-intrinsic-size: none !important;
    }
    body.all-stores-mode #home-all-stores-analytics .pf-shell {
      display: block !important;
      visibility: visible !important;
      height: auto !important;
      max-height: none !important;
      overflow: visible !important;
    }
    body.all-stores-mode #home-all-stores-analytics .pf-body {
      display: flex !important;
      flex-direction: column !important;
      visibility: visible !important;
      opacity: 1 !important;
      min-height: 12rem !important;
      height: auto !important;
      max-height: none !important;
      overflow: visible !important;
      padding: 1rem !important;
    }
    body.all-stores-mode #home-all-stores-analytics .pf-filter-bar,
    body.all-stores-mode #home-all-stores-analytics .pf-tabs {
      display: block !important;
      visibility: visible !important;
    }
    body.all-stores-mode #home-all-stores-analytics .pf-kpi-grid {
      display: grid !important;
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      gap: 0.55rem !important;
      visibility: visible !important;
      min-height: 5rem !important;
    }
    @media (min-width: 720px) {
      body.all-stores-mode #home-all-stores-analytics .pf-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
      }
    }
    /* Books must never sit under All Stores (beat other !important rules) */
    html body.all-stores-mode #section-quick-add,
    html body.all-stores-mode #section-quick-add.card,
    html body.all-stores-mode #section-quick-add.mr-books-panel,
    html body.all-stores-mode #section-quick-add.mr-pro-quick-add {
      display: none !important;
      visibility: hidden !important;
      pointer-events: none !important;
      height: 0 !important;
      max-height: 0 !important;
      overflow: hidden !important;
      margin: 0 !important;
      padding: 0 !important;
      border: 0 !important;
    }
    body.all-stores-mode {
      padding-bottom: 1rem !important;
    }

    /* Phone lite mode — less paint thrash, smoother open */
    body.mr-mobile-lite .app-loading-shell {
      transition: opacity 0.15s ease;
    }
    body.mr-mobile-lite #home-insights > .card {
      content-visibility: auto;
      contain-intrinsic-size: auto 120px;
    }
    /* Portfolio chart needs full layout paint — content-visibility blanked bars on iOS */
    body.mr-mobile-lite #home-all-stores-analytics,
    body.mr-mobile-lite #home-all-stores-analytics .card,
    #home-all-stores-analytics {
      content-visibility: visible !important;
      contain: none !important;
    }
    body.mr-mobile-lite #section-ledger-table {
      content-visibility: auto;
      contain-intrinsic-size: auto 280px;
    }
    @media (max-width: 768px) {
      body.app-session-boot #app-loading-shell:not(.hidden) {
        max-height: 9rem;
        overflow: hidden;
        padding: 1rem 1rem 0.85rem !important;
      }
      body.app-session-boot #app-loading-shell .app-loading-skeleton {
        display: none;
      }
    }
    body.guest-mode #btn-dark-mode,
    body.guest-mode #btn-header-menu,
    body.guest-mode #header-tools { display: none !important; }
    body.guest-mode #btn-login-top { display: inline-flex !important; }
    body.guest-mode #home-dashboard-status { display: none !important; }
    body.guest-mode #home-insights { margin-top: 0; }
    body.guest-mode .app-footer-hint { display: none; }
    body.guest-mode #home-guest-welcome:not(.hidden) { display: block !important; }
    body.guest-mode,
    body.guest-mode.has-bottom-nav,
    body.auth-booting:not(.guest-mode),
    body.auth-booting:not(.guest-mode).has-bottom-nav { padding-bottom: 0 !important; }
    /* Guest / sign-in — soft mint canvas (hero card stays dark) */
    body.guest-mode {
      background: linear-gradient(165deg, #f8fafc 0%, #ecfdf5 40%, #fafafa 100%) !important;
      color: #18181b;
      min-height: 100dvh;
    }
    body.guest-mode .app-header {
      background: rgba(255, 255, 255, 0.94) !important;
      border-bottom-color: rgba(15, 23, 42, 0.06) !important;
    }
    body.guest-mode #app-header-title { color: #18181b; }
    body.guest-mode #app-header-subtitle { color: #71717a !important; }
    body.guest-mode #btn-login-top {
      color: #059669 !important;
      border-color: #059669 !important;
      background: transparent !important;
    }
    body.guest-mode #btn-login-top:hover {
      background: #ecfdf5 !important;
      color: #047857 !important;
    }
    /* Auth focus = single clean shell (no second home behind modal) */
    body.auth-focus {
      background: linear-gradient(165deg, #f8fafc 0%, #ecfdf5 40%, #fafafa 100%) !important;
      color: #18181b !important;
    }
    body.auth-focus #home-guest-welcome,
    body.auth-focus #guest-auth-shell,
    body.auth-focus #store-hero,
    body.auth-focus #tools-hub,
    body.auth-focus #section-quick-add,
    body.auth-focus #section-ledger-metrics,
    body.auth-focus #section-ledger-table,
    body.auth-focus #bottom-nav,
    body.auth-focus #app-loading-shell,
    body.auth-focus #workspace-boot-overlay { display: none !important; }
    body.auth-focus #login-modal {
      background: rgba(248, 250, 252, 0.75) !important;
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }
    body.guest-mode #login-modal:not(.hidden),
    body.auth-focus #login-modal:not(.hidden) { display: flex !important; }
    #btn-do-login {
      color: #fff !important;
      background: #059669 !important;
      border: none !important;
    }
    #btn-do-login:hover { background: #047857 !important; color: #fff !important; }
    #btn-do-login:disabled,
    #btn-do-login.auth-btn-busy { opacity: 0.88; color: #fff !important; }
    .auth-tab-active { color: #fff !important; }
    .gl-hero .gl-btn-ghost,
    .guest-landing .gl-btn-ghost { color: #fff !important; }
    .gl-hero .gl-btn-emerald,
    .guest-landing .gl-btn-emerald { color: #fff !important; }
    #login-error { color: #dc2626 !important; }
    body.guest-mode #login-modal {
      background: rgba(15, 23, 42, 0.22) !important;
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
    }
    #guest-auth-shell { display: none; }
    #home-guest-welcome.guest-landing {
      border: none;
      background: transparent;
      padding: 0;
      border-radius: 0;
      box-shadow: none;
    }
    .guest-landing {
      color: #18181b;
      --gl-accent: #10b981;
      --gl-accent-dk: #059669;
      --gl-pro: #f59e0b;
      --gl-ink: #09090b;
      --gl-muted: #71717a;
      --gl-surface: #ffffff;
      --gl-line: rgba(15, 23, 42, 0.08);
    }
    .guest-landing .gl-section { margin-bottom: 0.85rem; }
    @media (min-width: 640px) {
      .guest-landing .gl-section { margin-bottom: 1.35rem; }
    }
    @media (max-width: 639px) {
      .guest-landing .gl-btn { min-height: 2.75rem; padding: 0.95rem 1.25rem; }
      .guest-landing .gl-hero { padding: 1.35rem 1rem 1.25rem; border-radius: 1.35rem; }
      .guest-landing .gl-hero-title { font-size: 1.65rem; }
      .guest-landing .gl-panel { padding: 1rem; }
      .guest-landing .gl-cred-card { padding: 0.75rem 0.4rem; }
      .guest-landing .gl-feat { padding: 0.75rem; }
    }
    .gl-hero {
      position: relative;
      overflow: hidden;
      border-radius: 1.75rem;
      padding: 1.75rem 1.25rem 1.5rem;
      background:
        radial-gradient(ellipse 80% 60% at 100% 0%, rgba(16, 185, 129, 0.22), transparent 55%),
        radial-gradient(ellipse 60% 50% at 0% 100%, rgba(99, 102, 241, 0.14), transparent 50%),
        linear-gradient(155deg, #0f172a 0%, #134e4a 42%, #064e3b 100%);
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 24px 48px -12px rgba(6, 78, 59, 0.35);
    }
    @media (min-width: 768px) {
      .gl-hero { padding: 2.5rem 2.25rem; }
    }
    .gl-hero-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 1.5rem;
      align-items: center;
    }
    @media (min-width: 768px) {
      .gl-hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 2rem; }
    }
    .gl-hero-copy { position: relative; z-index: 1; text-align: left; }
    .gl-hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      font-size: 0.625rem;
      font-weight: 700;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: #6ee7b7;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(110, 231, 183, 0.35);
      border-radius: 999px;
      padding: 0.35rem 0.8rem;
      margin-bottom: 0.85rem;
      backdrop-filter: blur(8px);
    }
    .gl-hero-badge-dot {
      width: 0.4rem; height: 0.4rem; border-radius: 999px;
      background: #34d399;
      box-shadow: 0 0 8px #34d399;
    }
    .gl-hero-title {
      font-size: 1.85rem;
      line-height: 1.08;
      font-weight: 800;
      letter-spacing: -0.04em;
      color: #fff;
    }
    .gl-hero-title span {
      background: linear-gradient(90deg, #6ee7b7, #fde68a);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }
    @media (min-width: 640px) {
      .gl-hero-title { font-size: 2.35rem; }
    }
    .gl-hero-sub {
      font-size: 0.875rem;
      line-height: 1.6;
      color: rgba(255, 255, 255, 0.78);
      max-width: 30rem;
      margin: 0.85rem 0 0;
    }
    .gl-hero-cta {
      display: flex;
      flex-direction: column;
      gap: 0.625rem;
      margin-top: 1.35rem;
    }
    @media (min-width: 420px) {
      .gl-hero-cta { flex-direction: row; flex-wrap: wrap; }
    }
    .gl-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.35rem;
      padding: 0.9rem 1.35rem;
      border-radius: 0.9rem;
      font-size: 0.8125rem;
      font-weight: 700;
      border: none;
      cursor: pointer;
      touch-action: manipulation;
      transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
      white-space: nowrap;
    }
    .gl-btn:active { transform: scale(0.98); }
    .gl-btn-emerald {
      background: linear-gradient(135deg, #34d399, #059669);
      color: #fff;
      box-shadow: 0 8px 24px -6px rgba(16, 185, 129, 0.55);
    }
    .gl-btn-emerald:hover { box-shadow: 0 12px 28px -6px rgba(16, 185, 129, 0.65); }
    .gl-btn-amber {
      background: linear-gradient(135deg, #fbbf24, #d97706);
      color: #1c1917;
      box-shadow: 0 8px 24px -6px rgba(245, 158, 11, 0.45);
    }
    .gl-btn-amber:hover { box-shadow: 0 12px 28px -6px rgba(245, 158, 11, 0.55); }
    .gl-btn-ghost {
      background: rgba(255, 255, 255, 0.1);
      color: #fff;
      border: 1px solid rgba(255, 255, 255, 0.22);
      backdrop-filter: blur(6px);
    }
    .gl-btn-ghost:hover { background: rgba(255, 255, 255, 0.16); }
    .gl-btn-outline {
      background: #fff;
      color: #047857;
      border: 1.5px solid #a7f3d0;
    }
    .gl-btn-outline:hover { background: #ecfdf5; }
    .w-full { width: 100%; }
    .gl-trust {
      display: flex;
      flex-wrap: wrap;
      gap: 0.45rem;
      margin-top: 1.1rem;
    }
    .gl-trust span {
      font-size: 0.625rem;
      font-weight: 600;
      color: rgba(255, 255, 255, 0.85);
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 999px;
      padding: 0.3rem 0.65rem;
      white-space: nowrap;
    }
    .gl-hero-mock {
      position: relative;
      border-radius: 1.25rem;
      background: rgba(255, 255, 255, 0.07);
      border: 1px solid rgba(255, 255, 255, 0.14);
      padding: 0.85rem;
      backdrop-filter: blur(12px);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
    }
    .gl-hero-shelf-mock .gl-shelf-aisle { margin-bottom: 0.55rem; }
    .gl-shelf-aisle {
      display: flex;
      gap: 0.55rem;
      overflow-x: auto;
      padding-bottom: 0.35rem;
      -webkit-overflow-scrolling: touch;
      scroll-snap-type: x proximity;
    }
    .gl-shelf-aisle-wide {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 0.55rem;
      overflow: visible;
      padding-bottom: 0;
    }
    @media (min-width: 640px) {
      .gl-shelf-aisle-wide { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    }
    .gl-shelf-aisle-hero { scroll-snap-type: x proximity; }
    .gl-shelf-item {
      flex: 0 0 auto;
      scroll-snap-align: start;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.3rem;
      min-width: 4.75rem;
      max-width: 5.5rem;
      padding: 0.45rem 0.35rem 0.5rem;
      border-radius: 1rem;
      border: 1px solid var(--gl-line);
      background: #fff;
      transition: transform 0.12s ease, box-shadow 0.12s ease;
    }
    .gl-hero-shelf-mock .gl-shelf-item {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.14);
    }
    .gl-shelf-item:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -10px rgba(15, 23, 42, 0.2); }
    .gl-shelf-urgent {
      border-color: #fca5a5 !important;
      background: #fff1f2 !important;
      animation: shelf-pulse-nudge 2.5s ease-in-out infinite;
    }
    .gl-hero-shelf-mock .gl-shelf-urgent {
      background: rgba(254, 226, 226, 0.15) !important;
      border-color: rgba(252, 165, 165, 0.55) !important;
    }
    .gl-shelf-name {
      font-size: 0.5625rem;
      font-weight: 800;
      text-align: center;
      line-height: 1.2;
      color: var(--gl-ink);
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      width: 100%;
    }
    .gl-hero-shelf-mock .gl-shelf-name { color: rgba(255, 255, 255, 0.92); }
    .gl-shelf-meta, .gl-shelf-status {
      font-size: 0.5rem;
      font-weight: 700;
      text-align: center;
      line-height: 1.2;
    }
    .gl-shelf-status.gl-shelf-ok { color: #059669; }
    .gl-shelf-status.gl-shelf-warn { color: #d97706; }
    .gl-shelf-status.gl-shelf-out { color: #dc2626; }
    .gl-shelf-aisle-wide .shelf-viz-lg { width: 3.25rem; height: 3.25rem; }
    .shelf-soda {
      background: linear-gradient(165deg, #eff6ff, #dbeafe);
    }
    .shelf-soda-cap {
      position: absolute;
      top: 6%;
      left: 50%;
      transform: translateX(-50%);
      width: 30%;
      height: 9%;
      background: #dc2626;
      border-radius: 2px 2px 0 0;
      z-index: 2;
    }
    .shelf-soda-body {
      position: absolute;
      bottom: 10%;
      left: 30%;
      right: 30%;
      height: 72%;
      border: 2px solid rgba(37, 99, 235, 0.35);
      border-radius: 4px 4px 12px 12px;
      overflow: hidden;
      background: rgba(255, 255, 255, 0.35);
    }
    .shelf-soda-fill {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: calc(var(--fill-pct, 50) * 1%);
      background: linear-gradient(180deg, #38bdf8 0%, #0284c7 55%, #1e40af 100%);
      transition: height 0.35s ease;
    }
    .shelf-soda.shelf-low .shelf-soda-fill { animation: shelf-wine-pulse 2s ease-in-out infinite; }
    .shelf-soda.shelf-empty .shelf-soda-fill { height: 0 !important; }
    .shelf-chips {
      background: linear-gradient(165deg, #fef9c3, #fde68a);
    }
    .shelf-chips-crinkle {
      position: absolute;
      top: 6%;
      left: 22%;
      right: 22%;
      height: 10%;
      background: #fef08a;
      border-radius: 4px 4px 0 0;
      border-top: 2px dashed rgba(180, 83, 9, 0.3);
      z-index: 2;
    }
    .shelf-chips-bag {
      position: absolute;
      bottom: 8%;
      left: 16%;
      right: 16%;
      height: 70%;
      border: 2px solid rgba(180, 83, 9, 0.35);
      border-radius: 10px 10px 16px 16px;
      overflow: hidden;
      background: linear-gradient(180deg, #fde047, #fbbf24);
      clip-path: polygon(6% 0%, 94% 0%, 100% 100%, 0% 100%);
    }
    .shelf-chips-fill {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: calc(var(--fill-pct, 50) * 1%);
      background: linear-gradient(180deg, #f59e0b, #d97706);
      transition: height 0.35s ease;
    }
    .shelf-chips.shelf-low .shelf-chips-fill { animation: shelf-beer-slosh 2.4s ease-in-out infinite; }
    .shelf-chips.shelf-empty .shelf-chips-fill { height: 0 !important; }
    .shelf-chips.shelf-empty .shelf-chips-bag { filter: grayscale(0.7); opacity: 0.7; }
    .shelf-cigar {
      background: linear-gradient(165deg, #fff7ed, #ffedd5);
    }
    .shelf-cigar-stick {
      position: absolute;
      bottom: 16%;
      left: 50%;
      transform: translateX(-50%) rotate(-10deg);
      width: 16%;
      height: 58%;
      background: linear-gradient(180deg, #fef3c7 0%, #d97706 38%, #78350f 100%);
      border-radius: 4px 4px 10px 10px;
      border: 1px solid rgba(120, 53, 15, 0.4);
    }
    .shelf-cigar-band {
      position: absolute;
      bottom: 46%;
      left: 50%;
      transform: translateX(-50%) rotate(-10deg);
      width: 18%;
      height: 7%;
      background: #dc2626;
      border-radius: 1px;
      z-index: 2;
    }
    .gl-cigar-ember { top: 22% !important; }
    .gl-cigar-dim { filter: grayscale(0.85); opacity: 0.55; }
    .shelf-cigar.shelf-empty .shelf-cigar-stick { filter: grayscale(0.85); opacity: 0.6; }
    .shelf-vape {
      background: linear-gradient(165deg, #f5f3ff, #ede9fe);
    }
    .shelf-vape-body {
      position: absolute;
      bottom: 10%;
      left: 28%;
      right: 28%;
      height: 74%;
      border-radius: 0.65rem 0.65rem 1rem 1rem;
      border: 2px solid rgba(109, 40, 217, 0.35);
      background: linear-gradient(180deg, #faf5ff, #e9d5ff);
      overflow: hidden;
      box-shadow: inset 0 -4px 8px rgba(109, 40, 217, 0.12);
    }
    .shelf-vape-mouth {
      position: absolute;
      top: 4%;
      left: 50%;
      transform: translateX(-50%);
      width: 42%;
      height: 8%;
      background: #71717a;
      border-radius: 999px;
    }
    .shelf-vape-screen {
      position: absolute;
      top: 18%;
      left: 22%;
      right: 22%;
      height: 14%;
      border-radius: 3px;
      background: #18181b;
      transition: box-shadow 0.3s ease;
    }
    .shelf-vape-screen-on { box-shadow: 0 0 8px rgba(167, 139, 250, 0.9); background: linear-gradient(90deg, #4c1d95, #7c3aed); }
    .shelf-vape-screen-dim { box-shadow: 0 0 4px rgba(167, 139, 250, 0.45); opacity: 0.7; }
    .shelf-vape-screen-off { background: #3f3f46; box-shadow: none; }
    .shelf-vape-fill {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: calc(var(--fill-pct, 50) * 0.72%);
      background: linear-gradient(180deg, #c4b5fd, #7c3aed);
      transition: height 0.35s ease;
    }
    .shelf-vape.shelf-low .shelf-vape-screen-on { animation: shelf-wine-pulse 2s ease-in-out infinite; }
    .shelf-vape.shelf-empty .shelf-vape-fill { height: 0 !important; }
    @media (prefers-reduced-motion: reduce) {
      .dshelf-slot:not(.dshelf-slot-active) .combo-viz-float,
      .dshelf-slot-empty.dshelf-slot-low,
      .dshelf-hand-glow,
      .dshelf-hand-lift,
      .dshelf-detail-open,
      .dshelf-slot-picking { animation: none !important; }
      .dshelf-slot:hover,
      .dshelf-slot-active,
      .dshelf-slot-picked { transform: none; }
    }
    .gl-mock-bar {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 0.65rem; padding-bottom: 0.55rem;
      border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .gl-mock-bar span { font-size: 0.625rem; font-weight: 700; color: rgba(255,255,255,0.9); letter-spacing: 0.04em; }
    .gl-mock-live {
      font-size: 0.5625rem; font-weight: 700; color: #6ee7b7;
      background: rgba(16,185,129,0.15); border-radius: 999px; padding: 0.15rem 0.45rem;
    }
    .gl-founder-strip { margin-top: 0; }
    .gl-founder-card {
      display: flex; align-items: flex-start; gap: 0.85rem;
      padding: 1rem 1.05rem; border-radius: 1.1rem;
      border: 1px solid #bfdbfe; background: linear-gradient(135deg, #eff6ff 0%, #fff 55%, #f0fdf4 100%);
      box-shadow: 0 8px 24px -14px rgba(30, 64, 175, 0.35);
    }
    .gl-founder-logo {
      width: 3rem; height: 3rem; border-radius: 0.85rem;
      object-fit: cover; flex-shrink: 0; border: 1px solid rgba(15, 23, 42, 0.08);
    }
    .gl-founder-eyebrow {
      font-size: 0.5625rem; font-weight: 800; letter-spacing: 0.12em;
      text-transform: uppercase; color: #1d4ed8; margin-bottom: 0.25rem;
    }
    .gl-founder-lead {
      font-size: 0.8125rem; line-height: 1.5; color: #0f172a; margin: 0 0 0.35rem;
    }
    .gl-founder-meta {
      font-size: 0.6875rem; line-height: 1.45; color: #475569; margin: 0;
    }
    .gl-founder-meta a { color: #047857; font-weight: 700; text-decoration: none; }
    .gl-founder-meta a:hover { text-decoration: underline; }
    .gl-mock-kpis {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem;
      margin-bottom: 0.55rem;
    }
    .gl-mock-kpi {
      border-radius: 0.75rem; padding: 0.5rem 0.4rem;
      background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
    }
    .gl-mock-kpi-lbl { font-size: 0.5rem; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.06em; }
    .gl-mock-kpi-val { font-size: 0.8rem; font-weight: 800; color: #fff; margin-top: 0.15rem; }
    .gl-mock-kpi-val.up { color: #6ee7b7; }
    .gl-mock-rows { display: flex; flex-direction: column; gap: 0.35rem; }
    .gl-mock-row {
      display: flex; align-items: center; justify-content: space-between;
      font-size: 0.625rem; color: rgba(255,255,255,0.75);
      padding: 0.4rem 0.5rem; border-radius: 0.55rem;
      background: rgba(255,255,255,0.04);
    }
    .gl-mock-row strong { color: #fff; font-weight: 700; }
    .gl-stats {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55rem;
    }
    .gl-stat {
      text-align: center; padding: 0.85rem 0.5rem;
      border-radius: 1rem;
      background: var(--gl-surface);
      border: 1px solid var(--gl-line);
      box-shadow: 0 4px 16px -8px rgba(15, 23, 42, 0.12);
    }
    .gl-stat-val {
      font-size: 1.125rem; font-weight: 800; letter-spacing: -0.03em;
      background: linear-gradient(135deg, #059669, #0d9488);
      -webkit-background-clip: text; background-clip: text; color: transparent;
    }
    .gl-stat-lbl { font-size: 0.5625rem; color: var(--gl-muted); margin-top: 0.15rem; line-height: 1.35; font-weight: 600; }
    .gl-panel {
      border-radius: 1.35rem;
      border: 1px solid var(--gl-line);
      background: var(--gl-surface);
      padding: 1.25rem;
      box-shadow: 0 8px 30px -16px rgba(15, 23, 42, 0.12);
    }
    @media (min-width: 640px) { .gl-panel { padding: 1.5rem 1.65rem; } }
    .gl-panel-head { margin-bottom: 1rem; }
    .gl-panel-eyebrow {
      font-size: 0.5625rem; font-weight: 800; letter-spacing: 0.14em;
      text-transform: uppercase; color: var(--gl-accent-dk); margin-bottom: 0.3rem;
    }
    .gl-panel-title {
      font-size: 1.0625rem; font-weight: 800; color: var(--gl-ink);
      letter-spacing: -0.02em; margin: 0;
    }
    .gl-panel-sub {
      font-size: 0.75rem; color: var(--gl-muted); margin: 0.35rem 0 0; line-height: 1.5;
    }
    .gl-steps {
      display: grid; grid-template-columns: 1fr; gap: 0.65rem;
    }
    @media (min-width: 640px) {
      .gl-steps { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
    }
    .gl-step {
      position: relative;
      border-radius: 1.1rem;
      border: 1px solid var(--gl-line);
      background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
      padding: 1rem 1rem 1rem 1.1rem;
    }
    .gl-step-idx {
      width: 1.65rem; height: 1.65rem; border-radius: 0.55rem;
      display: flex; align-items: center; justify-content: center;
      font-size: 0.6875rem; font-weight: 800; color: #fff;
      background: linear-gradient(135deg, #10b981, #059669);
      margin-bottom: 0.55rem;
    }
    .gl-step h3 {
      font-size: 0.8125rem; font-weight: 800; margin: 0 0 0.3rem; color: var(--gl-ink);
    }
    .gl-step p {
      font-size: 0.6875rem; line-height: 1.5; color: var(--gl-muted); margin: 0;
    }
    .gl-bento {
      display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem;
    }
    @media (min-width: 640px) {
      .gl-bento { grid-template-columns: repeat(4, 1fr); gap: 0.65rem; }
    }
    .gl-feat {
      border-radius: 1.1rem;
      border: 1px solid var(--gl-line);
      background: #fff;
      padding: 0.9rem;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .gl-feat:hover {
      border-color: rgba(16, 185, 129, 0.25);
      box-shadow: 0 8px 24px -12px rgba(16, 185, 129, 0.2);
    }
    .gl-feat-wide { grid-column: span 2; }
    @media (min-width: 640px) {
      .gl-feat-wide { grid-column: span 2; }
    }
    .gl-feat-icon {
      width: 2rem; height: 2rem; border-radius: 0.65rem;
      display: flex; align-items: center; justify-content: center;
      font-size: 1rem; margin-bottom: 0.45rem;
    }
    .gl-feat-icon.emerald { background: #ecfdf5; }
    .gl-feat-icon.blue { background: #eff6ff; }
    .gl-feat-icon.amber { background: #fffbeb; }
    .gl-feat-icon.violet { background: #f5f3ff; }
    .gl-feat-icon.teal { background: #f0fdfa; }
    .gl-feat-icon.purple { background: #faf5ff; }
    .gl-feat h3 {
      font-size: 0.75rem; font-weight: 800; margin: 0 0 0.2rem; color: var(--gl-ink);
    }
    .gl-feat p {
      font-size: 0.625rem; line-height: 1.45; color: var(--gl-muted); margin: 0;
    }
    .gl-compare-wrap {
      overflow-x: auto; -webkit-overflow-scrolling: touch;
      border-radius: 1rem; border: 1px solid var(--gl-line);
    }
    .gl-compare {
      width: 100%; min-width: 300px;
      border-collapse: collapse; font-size: 0.6875rem;
    }
    .gl-compare th, .gl-compare td {
      padding: 0.55rem 0.7rem; border-bottom: 1px solid #f4f4f5;
      text-align: left; vertical-align: middle;
    }
    .gl-compare thead th { background: #f8fafc; position: sticky; top: 0; }
    .gl-compare th {
      font-size: 0.5625rem; font-weight: 800; text-transform: uppercase;
      letter-spacing: 0.08em; color: var(--gl-muted);
    }
    .gl-compare th.gl-col-free { color: #047857; }
    .gl-compare th.gl-col-pro { color: #b45309; }
    .gl-compare td.gl-col-free, .gl-compare td.gl-col-pro { text-align: center; width: 4.25rem; }
    .gl-yes {
      display: inline-flex; width: 1.25rem; height: 1.25rem; border-radius: 999px;
      align-items: center; justify-content: center;
      background: #ecfdf5; color: #059669; font-weight: 800; font-size: 0.625rem;
    }
    .gl-no { color: #d4d4d8; }
    .gl-plans {
      display: grid; grid-template-columns: 1fr; gap: 0.85rem;
    }
    @media (min-width: 640px) { .gl-plans { grid-template-columns: 1fr 1fr; gap: 1rem; } }
    .gl-plan {
      position: relative;
      border-radius: 1.35rem;
      padding: 1.35rem;
      display: flex; flex-direction: column;
    }
    .gl-plan-free {
      border: 1px solid #a7f3d0;
      background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
    }
    .gl-plan-pro {
      border: 1px solid #fcd34d;
      background: linear-gradient(180deg, #fffbeb 0%, #fff 55%, #fff7ed 100%);
      box-shadow: 0 16px 40px -16px rgba(245, 158, 11, 0.35);
    }
    .gl-plan-rec {
      position: absolute; top: -0.55rem; right: 1rem;
      font-size: 0.5625rem; font-weight: 800; letter-spacing: 0.06em;
      text-transform: uppercase; color: #1c1917;
      background: linear-gradient(135deg, #fbbf24, #f59e0b);
      border-radius: 999px; padding: 0.25rem 0.6rem;
      box-shadow: 0 4px 12px -4px rgba(245, 158, 11, 0.5);
    }
    .gl-plan-tag {
      font-size: 0.5625rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
    }
    .gl-plan-free .gl-plan-tag { color: #047857; }
    .gl-plan-pro .gl-plan-tag { color: #b45309; }
    .gl-plan-name {
      font-size: 1.2rem; font-weight: 800; margin: 0.35rem 0 0.15rem;
      color: var(--gl-ink); letter-spacing: -0.02em;
    }
    .gl-plan-price {
      font-size: 0.8125rem; color: var(--gl-muted); margin-bottom: 0.85rem;
    }
    .gl-plan-price strong { color: var(--gl-ink); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
    .gl-plan ul { list-style: none; padding: 0; margin: 0 0 1.1rem; flex: 1; }
    .gl-plan li {
      font-size: 0.6875rem; line-height: 1.5; color: #3f3f46;
      padding: 0.28rem 0 0.28rem 1.1rem; position: relative;
    }
    .gl-plan li::before {
      content: '✓'; position: absolute; left: 0; color: #10b981; font-weight: 800; font-size: 0.625rem;
    }
    .gl-plan-pro li::before { color: #f59e0b; }
    .gl-pos-band {
      border-radius: 1.35rem;
      padding: 1.35rem;
      display: flex; flex-direction: column; gap: 0.85rem;
      background:
        radial-gradient(ellipse 70% 80% at 100% 0%, rgba(99, 102, 241, 0.2), transparent),
        linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e3a5f 100%);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: #fff;
    }
    @media (min-width: 640px) {
      .gl-pos-band { flex-direction: row; align-items: center; }
      .gl-pos-band .gl-btn { flex-shrink: 0; }
    }
    .gl-pos-band h3 {
      font-size: 1rem; font-weight: 800; margin: 0 0 0.35rem; letter-spacing: -0.02em;
    }
    .gl-pos-band p {
      font-size: 0.6875rem; line-height: 1.55; color: rgba(255,255,255,0.75); margin: 0;
    }
    .gl-pos-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.55rem; }
    .gl-pos-tags span {
      font-size: 0.5625rem; font-weight: 700; padding: 0.2rem 0.5rem;
      border-radius: 999px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
    }
    .gl-footer-cta {
      border-radius: 1.35rem;
      padding: 1.65rem 1.35rem;
      text-align: center;
      background:
        radial-gradient(ellipse 60% 80% at 50% 120%, rgba(16, 185, 129, 0.35), transparent),
        linear-gradient(160deg, #022c22 0%, #064e3b 55%, #065f46 100%);
      color: #fff;
      border: 1px solid rgba(110, 231, 183, 0.2);
    }
    .gl-footer-cta h3 {
      font-size: 1.15rem; font-weight: 800; margin: 0 0 0.4rem; letter-spacing: -0.02em;
    }
    .gl-footer-cta p {
      font-size: 0.75rem; color: rgba(255,255,255,0.78); margin: 0 0 1.1rem; line-height: 1.5;
    }
    .gl-footer-links {
      text-align: center; font-size: 0.6875rem; color: var(--gl-muted);
      padding: 0.75rem 0 1.25rem; line-height: 1.7;
    }
    .gl-footer-links button {
      color: #047857; font-weight: 700; text-decoration: none;
      background: none; border: none; cursor: pointer; font-size: inherit; padding: 0;
    }
    .gl-footer-links button:hover { text-decoration: underline; text-underline-offset: 2px; }
    .gl-close-steps {
      display: grid;
      grid-template-columns: 1fr;
      gap: 0.55rem;
    }
    @media (min-width: 640px) { .gl-close-steps { grid-template-columns: repeat(3, 1fr); } }
    .gl-close-step {
      border-radius: 1.1rem;
      border: 1px solid var(--gl-line);
      background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
      padding: 0.95rem;
      text-align: center;
    }
    .gl-close-step-num {
      width: 1.75rem; height: 1.75rem; border-radius: 999px;
      display: inline-flex; align-items: center; justify-content: center;
      font-size: 0.75rem; font-weight: 800; color: #fff;
      background: linear-gradient(135deg, #10b981, #059669);
      margin-bottom: 0.45rem;
    }
    .gl-close-step h3 { font-size: 0.75rem; font-weight: 800; margin: 0 0 0.25rem; color: var(--gl-ink); }
    .gl-close-step p { font-size: 0.625rem; line-height: 1.45; color: var(--gl-muted); margin: 0; }
    .gl-trust-panel {
      border-radius: 1.35rem;
      border: 1px solid #dbeafe;
      background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
      padding: 1.25rem;
    }
    .gl-trust-panel h3 { font-size: 0.9rem; font-weight: 800; margin: 0 0 0.35rem; color: #1e3a8a; }
    .gl-trust-panel p { font-size: 0.6875rem; line-height: 1.5; color: #475569; margin: 0 0 0.65rem; }
    .gl-trust-bullets {
      display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 0.65rem;
      font-size: 0.625rem; color: #334155; margin-bottom: 0.75rem;
    }
    .gl-trust-bullets span::before { content: '✓ '; color: #059669; font-weight: 800; }
    .gl-legal-links {
      display: flex; flex-wrap: wrap; gap: 0.35rem 0.65rem;
      justify-content: center;
      padding: 0.85rem 0 0.25rem;
      border-top: 1px solid var(--gl-line);
      margin-top: 0.5rem;
    }
    .gl-legal-links button {
      font-size: 0.625rem; font-weight: 700; color: #047857;
      background: none; border: none; cursor: pointer; padding: 0.2rem 0;
    }
    .gl-legal-links button:hover { text-decoration: underline; }
    .gl-brand-note {
      text-align: center; font-size: 0.5625rem; color: var(--gl-muted);
      line-height: 1.5; padding: 0.5rem 0.75rem 1rem;
    }
    .gl-legal-links a {
      font-size: 0.625rem; font-weight: 700; color: #047857;
      text-decoration: none; padding: 0.2rem 0;
    }
    .gl-legal-links a:hover { text-decoration: underline; }
    #trust-modal-body h4 { font-size: 0.8125rem; font-weight: 800; color: #18181b; margin: 0.85rem 0 0.35rem; }
    #trust-modal-body h4:first-child { margin-top: 0; }
    #trust-modal-body p { font-size: 0.8125rem; line-height: 1.55; color: #52525b; margin: 0 0 0.5rem; }
    #trust-modal-body ul { font-size: 0.8125rem; line-height: 1.5; color: #52525b; margin: 0 0 0.65rem; padding-left: 1.15rem; }
    #trust-modal-body li { margin-bottom: 0.25rem; }
    #trust-modal-body a { color: #047857; font-weight: 600; }
    @keyframes gl-float {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-5px); }
    }
    @keyframes gl-blink {
      0%, 100% { opacity: 1; }
      50% { opacity: 0; }
    }
    @keyframes gl-bar-grow {
      from { transform: scaleY(0); }
      to { transform: scaleY(1); }
    }
    @keyframes gl-pulse-ring {
      0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
      70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
      100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
    }
    .gl-hero-mock.gl-ai-mock {
      animation: gl-float 7s ease-in-out infinite;
    }
    .gl-hero-badge-dot { animation: gl-pulse-ring 2.4s ease infinite; }
    .gl-reveal {
      opacity: 0;
      transform: translateY(14px);
      transition: opacity 0.55s ease, transform 0.55s ease;
    }
    .gl-reveal.is-visible {
      opacity: 1;
      transform: translateY(0);
    }
    .gl-ai-mock .gl-ai-chat {
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
      min-height: 7.5rem;
      margin-bottom: 0.55rem;
    }
    .gl-ai-msg {
      font-size: 0.625rem;
      line-height: 1.5;
      padding: 0.45rem 0.55rem;
      border-radius: 0.65rem;
      max-width: 92%;
    }
    .gl-ai-msg--user {
      align-self: flex-end;
      color: rgba(255,255,255,0.9);
      background: rgba(99, 102, 241, 0.35);
      border: 1px solid rgba(129, 140, 248, 0.35);
    }
    .gl-ai-msg--ai {
      align-self: flex-start;
      color: #ecfdf5;
      background: rgba(6, 78, 59, 0.55);
      border: 1px solid rgba(110, 231, 183, 0.25);
      min-height: 2.6rem;
    }
    .gl-ai-cursor {
      display: inline-block;
      width: 1.5px;
      height: 0.85em;
      margin-left: 1px;
      vertical-align: text-bottom;
      background: #6ee7b7;
      animation: gl-blink 0.75s step-end infinite;
    }
    .gl-ai-mini-chart {
      display: flex;
      align-items: flex-end;
      gap: 0.3rem;
      height: 2.75rem;
      padding: 0.35rem 0.4rem 0;
      border-radius: 0.65rem;
      background: rgba(0,0,0,0.15);
      border: 1px solid rgba(255,255,255,0.08);
    }
    .gl-ai-bar {
      flex: 1;
      border-radius: 0.25rem 0.25rem 0 0;
      background: linear-gradient(180deg, #6ee7b7, #059669);
      transform-origin: bottom;
      transform: scaleY(0);
      opacity: 0.85;
    }
    .gl-ai-bar.is-animated { animation: gl-bar-grow 0.9s ease forwards; }
    .gl-ai-bar:nth-child(2) { animation-delay: 0.08s; background: linear-gradient(180deg, #93c5fd, #2563eb); }
    .gl-ai-bar:nth-child(3) { animation-delay: 0.16s; }
    .gl-ai-bar:nth-child(4) { animation-delay: 0.24s; background: linear-gradient(180deg, #fde68a, #d97706); }
    .gl-ai-bar:nth-child(5) { animation-delay: 0.32s; }
    .gl-ai-bar:nth-child(6) { animation-delay: 0.4s; background: linear-gradient(180deg, #c4b5fd, #7c3aed); }
    .gl-ai-bar:nth-child(7) { animation-delay: 0.48s; }
    .gl-cred {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 0.55rem;
    }
    @media (min-width: 640px) { .gl-cred { grid-template-columns: repeat(4, 1fr); } }
    .gl-cred-card {
      text-align: center;
      padding: 0.9rem 0.5rem;
      border-radius: 1rem;
      background: var(--gl-surface);
      border: 1px solid var(--gl-line);
      box-shadow: 0 4px 16px -8px rgba(15, 23, 42, 0.1);
      transition: transform 0.2s, box-shadow 0.2s;
    }
    .gl-cred-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 10px 24px -10px rgba(16, 185, 129, 0.25);
    }
    .gl-cred-val {
      font-size: 1.25rem;
      font-weight: 800;
      letter-spacing: -0.03em;
      color: var(--gl-ink);
    }
    .gl-cred-val span { color: #059669; }
    .gl-cred-lbl {
      font-size: 0.5625rem;
      color: var(--gl-muted);
      margin-top: 0.2rem;
      line-height: 1.35;
      font-weight: 600;
    }
    .gl-pain-grid, .gl-fix-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 0.55rem;
    }
    @media (min-width: 640px) {
      .gl-pain-grid, .gl-fix-grid { grid-template-columns: repeat(3, 1fr); gap: 0.65rem; }
    }
    .gl-pain-card, .gl-fix-card {
      border-radius: 1.1rem;
      padding: 0.95rem;
      border: 1px solid var(--gl-line);
      transition: transform 0.2s, border-color 0.2s;
    }
    .gl-pain-card {
      background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
      border-color: #fecaca;
    }
    .gl-fix-card {
      background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
      border-color: #a7f3d0;
    }
    .gl-pain-card:hover, .gl-fix-card:hover { transform: translateY(-2px); }
    .gl-pain-icon, .gl-fix-icon {
      font-size: 1.25rem;
      margin-bottom: 0.35rem;
    }
    .gl-pain-card h3, .gl-fix-card h3 {
      font-size: 0.75rem;
      font-weight: 800;
      margin: 0 0 0.25rem;
      color: var(--gl-ink);
    }
    .gl-pain-card p, .gl-fix-card p {
      font-size: 0.625rem;
      line-height: 1.45;
      color: var(--gl-muted);
      margin: 0;
    }
    .gl-demo-dash {
      border-radius: 1.1rem;
      border: 1px solid var(--gl-line);
      background: linear-gradient(180deg, #0f172a 0%, #134e4a 100%);
      padding: 0.85rem;
      color: #fff;
      overflow: hidden;
    }
    .gl-demo-dash-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 0.65rem;
      font-size: 0.625rem;
      font-weight: 700;
      letter-spacing: 0.04em;
    }
    .gl-demo-kpis {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 0.4rem;
      margin-bottom: 0.65rem;
    }
    .gl-demo-kpi {
      border-radius: 0.65rem;
      padding: 0.45rem;
      background: rgba(255,255,255,0.07);
      border: 1px solid rgba(255,255,255,0.1);
    }
    .gl-demo-kpi-lbl { font-size: 0.5rem; color: rgba(255,255,255,0.55); text-transform: uppercase; }
    .gl-demo-kpi-val { font-size: 0.85rem; font-weight: 800; margin-top: 0.1rem; }
    .gl-demo-kpi-val.up { color: #6ee7b7; }
    .gl-demo-chart {
      display: flex;
      align-items: flex-end;
      gap: 0.35rem;
      height: 3.5rem;
      padding-top: 0.25rem;
    }
    .gl-demo-chart-bar {
      flex: 1;
      border-radius: 0.3rem 0.3rem 0 0;
      background: linear-gradient(180deg, #6ee7b7, #047857);
      transform-origin: bottom;
      transform: scaleY(0);
    }
    .gl-demo-chart-bar.is-animated { animation: gl-bar-grow 1s ease forwards; }
    .gl-demo-chart-bar.alt { background: linear-gradient(180deg, #fbbf24, #b45309); }
    .gl-testimonials {
      display: grid;
      grid-template-columns: 1fr;
      gap: 0.65rem;
    }
    @media (min-width: 640px) { .gl-testimonials { grid-template-columns: repeat(3, 1fr); } }
    .gl-quote {
      border-radius: 1.1rem;
      padding: 1rem;
      border: 1px solid var(--gl-line);
      background: #fff;
      transition: box-shadow 0.2s;
    }
    .gl-quote:hover { box-shadow: 0 10px 28px -14px rgba(15, 23, 42, 0.18); }
    .gl-quote p {
      font-size: 0.6875rem;
      line-height: 1.55;
      color: #3f3f46;
      margin: 0 0 0.65rem;
      font-style: italic;
    }
    .gl-quote cite {
      font-size: 0.5625rem;
      font-style: normal;
      font-weight: 700;
      color: var(--gl-muted);
    }
    .gl-faq { display: flex; flex-direction: column; gap: 0.45rem; }
    .gl-faq details {
      border-radius: 0.85rem;
      border: 1px solid var(--gl-line);
      background: #fafafa;
      overflow: hidden;
    }
    .gl-faq summary {
      padding: 0.75rem 0.9rem;
      font-size: 0.75rem;
      font-weight: 700;
      color: var(--gl-ink);
      cursor: pointer;
      list-style: none;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
    }
    .gl-faq summary::-webkit-details-marker { display: none; }
    .gl-faq summary::after { content: '+'; font-weight: 800; color: #059669; }
    .gl-faq details[open] summary::after { content: '−'; }
    .gl-faq details p {
      margin: 0;
      padding: 0 0.9rem 0.75rem;
      font-size: 0.6875rem;
      line-height: 1.5;
      color: var(--gl-muted);
    }
    .gl-spotlight-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 0.65rem;
    }
    @media (min-width: 768px) {
      .gl-spotlight-grid { grid-template-columns: 1fr 1fr; align-items: stretch; }
    }
    .gl-spotlight-demo {
      border-radius: 1.1rem;
      padding: 0.85rem;
      background: #0f172a;
      border: 1px solid rgba(255,255,255,0.1);
      color: #fff;
      font-size: 0.625rem;
      line-height: 1.55;
    }
    .gl-spotlight-line { margin-bottom: 0.35rem; color: rgba(255,255,255,0.85); }
    .gl-spotlight-line strong { color: #6ee7b7; font-weight: 700; }
    .gl-spotlight-scan {
      margin-top: 0.55rem;
      padding: 0.5rem;
      border-radius: 0.55rem;
      background: rgba(255,255,255,0.06);
      border: 1px dashed rgba(110, 231, 183, 0.35);
      font-size: 0.5625rem;
      color: rgba(255,255,255,0.7);
    }
    @media (max-width: 639px) {
      .po-picker-table-wrap {
        display: none !important;
      }
    }
    .po-picker-card {
      border: 1px solid #e4e4e7;
      border-radius: 1rem;
      padding: 0.75rem;
      background: #fff;
      touch-action: manipulation;
    }
    .po-picker-card-active {
      border-color: #fdba74;
      background: #fff7ed;
    }
    .po-picker-card-name {
      font-size: 0.9rem;
      font-weight: 700;
      color: #18181b;
      line-height: 1.3;
      word-break: break-word;
    }
    .po-preview-shell {
      border: 1px solid #e4e4e7;
      border-radius: 1rem;
      background: #fafafa;
      overflow: hidden;
      max-height: 14rem;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }
    .po-preview-doc {
      background: #fff;
      font-size: 11px;
      line-height: 1.45;
      color: #27272a;
    }
    .po-preview-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 0.75rem;
      padding: 0.85rem 1rem;
      background: linear-gradient(135deg, #fff7ed 0%, #fff 55%);
      border-bottom: 2px solid #fdba74;
    }
    .po-preview-title {
      font-size: 0.62rem;
      font-weight: 800;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: #9a3412;
    }
    .po-preview-store {
      font-size: 1rem;
      font-weight: 800;
      color: #18181b;
      letter-spacing: -0.02em;
      margin-top: 0.1rem;
    }
    .po-preview-po-no {
      font-size: 0.65rem;
      font-weight: 700;
      color: #71717a;
      margin-top: 0.2rem;
    }
    .po-preview-meta {
      text-align: right;
      font-size: 0.65rem;
      color: #52525b;
      line-height: 1.5;
    }
    .po-preview-meta strong { color: #18181b; font-weight: 700; }
    .po-preview-strict {
      margin: 0.5rem 0.75rem 0;
      padding: 0.45rem 0.65rem;
      border-radius: 0.65rem;
      background: #fffbeb;
      border: 1px solid #fcd34d;
      color: #92400e;
      font-size: 0.62rem;
      font-weight: 600;
      line-height: 1.35;
    }
    .po-preview-table-wrap { padding: 0.5rem 0.75rem 0.75rem; }
    .po-preview-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.68rem;
    }
    .po-preview-table th {
      text-align: left;
      font-size: 0.58rem;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #71717a;
      padding: 0.35rem 0.4rem;
      border-bottom: 2px solid #e4e4e7;
    }
    .po-preview-table th.po-col-qty,
    .po-preview-table td.po-col-qty { text-align: center; width: 3rem; }
    .po-preview-table th.po-col-unit,
    .po-preview-table td.po-col-unit { text-align: center; width: 3.25rem; }
    .po-preview-table th.po-col-num,
    .po-preview-table td.po-col-num { width: 1.5rem; color: #a1a1aa; font-weight: 700; }
    .po-preview-table td {
      padding: 0.45rem 0.4rem;
      border-bottom: 1px solid #f4f4f5;
      vertical-align: top;
    }
    .po-preview-table tr:last-child td { border-bottom: none; }
    .po-preview-table .po-item-name { font-weight: 700; color: #18181b; }
    .po-preview-table .po-item-note { font-size: 0.58rem; color: #a1a1aa; margin-top: 0.1rem; }
    .po-preview-foot {
      padding: 0.55rem 1rem 0.75rem;
      border-top: 1px solid #e4e4e7;
      background: #fafafa;
      font-size: 0.62rem;
      color: #52525b;
    }
    .po-preview-foot-total {
      font-weight: 800;
      color: #9a3412;
      font-size: 0.68rem;
      margin-bottom: 0.25rem;
    }
    /* Vendor hub — fast shell + compact list */
    .vhub-header {
      background: linear-gradient(135deg, #fff7ed 0%, #fff 70%);
      border-color: #ffedd5 !important;
    }
    .vhub-close {
      font-size: 0.7rem; font-weight: 800; padding: 0.4rem 0.75rem;
      border-radius: 999px; border: 1px solid #e4e4e7; background: #fff; color: #3f3f46;
    }
    .vhub-search {
      border: 1px solid #e4e4e7; border-radius: 0.85rem; padding: 0.55rem 0.75rem;
      font-size: 0.8125rem; background: #fafafa; width: 100%;
    }
    .vhub-search:focus {
      outline: none; border-color: #fdba74; background: #fff;
      box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.15);
    }
    .vhub-summary {
      display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem;
      margin-bottom: 0.65rem;
    }
    .vhub-summary-stat {
      border: 1px solid #ffedd5; background: linear-gradient(180deg, #fff7ed, #fff);
      border-radius: 0.75rem; padding: 0.45rem 0.5rem; text-align: center;
    }
    .vhub-summary-l {
      display: block; font-size: 0.5rem; font-weight: 800; text-transform: uppercase;
      letter-spacing: 0.05em; color: #a1a1aa;
    }
    .vhub-summary-v {
      display: block; font-size: 0.85rem; font-weight: 800; margin-top: 0.1rem;
      letter-spacing: -0.02em; color: #18181b;
    }
    .vhub-card-meta {
      display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.35rem;
      font-size: 0.6rem; color: #71717a; margin-top: 0.2rem; font-weight: 600;
    }
    .vhub-chevron { color: #d4d4d8; font-size: 1.15rem; font-weight: 300; flex-shrink: 0; line-height: 1; }
    .vhub-empty { text-align: center; padding: 2rem 1rem; }
    .vhub-empty-ico { font-size: 1.75rem; margin-bottom: 0.5rem; }
    .vhub-loading { padding: 1.25rem 0.5rem; }
    .vhub-loading-bar {
      height: 0.35rem; border-radius: 999px; background: #ffedd5; overflow: hidden;
      position: relative;
    }
    .vhub-loading-bar::after {
      content: ''; position: absolute; inset: 0; width: 40%;
      background: linear-gradient(90deg, #fb923c, #f97316);
      animation: vhub-load 0.9s ease-in-out infinite;
    }
    @keyframes vhub-load {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(280%); }
    }
    .vendor-hub-tabs { display: flex; gap: 0.35rem; padding: 0.35rem; background: #f4f4f5; border-radius: 0.85rem; }
    .vendor-hub-tab {
      flex: 1; padding: 0.45rem 0.5rem; border-radius: 0.65rem; font-size: 10px; font-weight: 700;
      text-align: center; color: #71717a; background: transparent; border: none; cursor: pointer;
    }
    .vendor-hub-tab.is-active { background: #fff; color: #c2410c; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
    .hr-hub-tabs { display: flex; gap: 0.35rem; padding: 0.35rem; background: #f4f4f5; border-radius: 0.85rem; }
    .hr-hub-tab {
      flex: 1; padding: 0.45rem 0.5rem; border-radius: 0.65rem; font-size: 10px; font-weight: 700;
      text-align: center; color: #71717a; background: transparent; border: none; cursor: pointer;
    }
    .hr-hub-tab.is-active { background: #fff; color: #6d28d9; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
    .vendor-hub-card {
      border: 1px solid #ececef; border-radius: 0.85rem; padding: 0.6rem 0.7rem;
      background: #fff; cursor: pointer; touch-action: manipulation;
      box-shadow: 0 1px 2px rgba(0,0,0,0.03); width: 100%; text-align: left;
    }
    .vendor-hub-card:active { background: #fff7ed; border-color: #fdba74; }
    .vendor-hub-stat { font-size: 10px; color: #71717a; }
    .vendor-hub-stat strong { color: #18181b; font-weight: 800; }
    .vendor-hub-chip {
      display: inline-flex; align-items: center; gap: 0.25rem;
      padding: 0.35rem 0.6rem; border-radius: 999px; font-size: 10px; font-weight: 700;
      border: 1px solid #fed7aa; background: #fff7ed; color: #9a3412;
    }
    .vendor-hub-compare-row {
      border: 1px solid #fecaca; border-radius: 0.85rem; padding: 0.65rem;
      background: linear-gradient(135deg, #fff1f2 0%, #fff 70%);
    }
    .vendor-hub-compare-row.is-mild { border-color: #fde68a; background: linear-gradient(135deg, #fffbeb 0%, #fff 70%); }
    .vhub-compare-order { display: inline-block; }
    .vhub-badge {
      display: inline-block; font-size: 0.45rem; font-weight: 800; text-transform: uppercase;
      letter-spacing: 0.04em; padding: 0.08rem 0.35rem; border-radius: 999px;
    }
    .vhub-badge-await { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }
    .vhub-badge-overdue { background: #ffedd5; color: #c2410c; border: 1px solid #fdba74; }
    .vhub-badge-hike { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
    .vhub-intel-banner {
      font-size: 0.58rem; font-weight: 700; border-radius: 0.65rem; padding: 0.35rem 0.5rem;
    }
    .vhub-intel-overdue { background: #fff7ed; border: 1px solid #fdba74; color: #9a3412; }
    .vhub-intel-await { background: #eff6ff; border: 1px solid #93c5fd; color: #1e40af; }
    .vhub-intel-hike { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
    .vhub-order-await { color: #1d4ed8; }
    .vhub-order-received { color: #047857; }
    .vhub-order-partial { color: #b45309; }
    .retailer-command-head {
      display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem;
      margin-bottom: 0.85rem;
    }
    .retailer-command-eyebrow {
      font-size: 0.55rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: #c2410c;
    }
    .retailer-command-title { font-size: 1.05rem; font-weight: 900; color: #18181b; line-height: 1.2; margin-top: 0.15rem; }
    .retailer-command-sub { font-size: 0.68rem; color: #57534e; line-height: 1.45; margin-top: 0.25rem; max-width: 36rem; }
    .retailer-command-cta {
      font-size: 0.62rem; font-weight: 800; padding: 0.45rem 0.75rem; border-radius: 0.75rem;
      border: 1px solid #fdba74; background: #fff7ed; color: #c2410c;
    }
    .retailer-command-stats {
      display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.45rem; margin-bottom: 0.75rem;
    }
    @media (max-width: 480px) { .retailer-command-stats { grid-template-columns: repeat(2, 1fr); } }
    .retailer-stat {
      text-align: center; padding: 0.5rem 0.35rem; border-radius: 0.85rem;
      border: 1px solid #e7e5e4; background: #fff;
    }
    .retailer-stat-val { font-size: 1.15rem; font-weight: 900; color: #18181b; line-height: 1; }
    .retailer-stat-lbl { font-size: 0.48rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: #78716c; margin-top: 0.2rem; }
    .retailer-stat-warn { border-color: #fdba74; background: #fff7ed; }
    .retailer-stat-warn .retailer-stat-val { color: #c2410c; }
    .retailer-stat-hot { border-color: #93c5fd; background: #eff6ff; }
    .retailer-stat-hot .retailer-stat-val { color: #1d4ed8; }
    .retailer-stat-alert { border-color: #fecaca; background: #fef2f2; }
    .retailer-stat-alert .retailer-stat-val { color: #b91c1c; }
    .retailer-stat-win { border-color: #86efac; background: #ecfdf5; }
    .retailer-stat-win .retailer-stat-val { color: #047857; }
    .retailer-command-shelf-val { font-size: 0.62rem; color: #57534e; margin-bottom: 0.65rem; }
    .retailer-command-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.65rem; }
    .retailer-action-btn {
      font-size: 0.58rem; font-weight: 800; padding: 0.42rem 0.65rem; border-radius: 0.65rem;
      border: 1px solid #d6d3d1; background: #fff; color: #44403c; touch-action: manipulation;
    }
    .retailer-action-primary { background: #ea580c; border-color: #ea580c; color: #fff; }
    .retailer-leverage-tip {
      font-size: 0.58rem; line-height: 1.45; color: #57534e; padding: 0.45rem 0.55rem;
      border-radius: 0.65rem; background: #fafaf9; border: 1px solid #e7e5e4; margin-top: 0.35rem;
    }
    .retailer-leverage-overdue { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
    /* Advanced ops strip (v351) */
    .retailer-adv-ops {
      margin: 0.35rem 0 0.75rem;
      padding: 0.7rem 0.75rem 0.8rem;
      border-radius: 1rem;
      border: 1px solid #fed7aa;
      background: linear-gradient(165deg, #fff7ed 0%, #ffffff 55%, #fafafa 100%);
    }
    .retailer-adv-ops-head { margin-bottom: 0.4rem; }
    .retailer-adv-ops-title {
      font-size: 0.72rem; font-weight: 900; letter-spacing: 0.04em;
      text-transform: uppercase; color: #9a3412;
    }
    .retailer-adv-ops-sub { font-size: 0.58rem; color: #78716c; margin-top: 0.1rem; }
    .retailer-adv-ops-stats {
      display: flex; flex-wrap: wrap; gap: 0.35rem 0.65rem;
      font-size: 0.58rem; color: #57534e; margin-bottom: 0.55rem;
    }
    .retailer-adv-ops-stats strong { color: #1c1917; font-weight: 800; }
    .retailer-adv-ops-actions { margin-bottom: 0.35rem; }
    .retailer-action-burn {
      background: #fffbeb; border-color: #fcd34d; color: #92400e; font-weight: 800;
    }
    .retailer-adv-ops-result {
      margin-top: 0.45rem; font-size: 0.65rem; line-height: 1.45;
      padding: 0.5rem 0.6rem; border-radius: 0.75rem;
      background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46;
    }
    .retailer-adv-ops-result.is-error {
      background: #fef2f2; border-color: #fecaca; color: #991b1b;
    }
    .retailer-adv-burn-list {
      margin: 0.25rem 0 0; padding-left: 1rem; color: #3f3f46;
    }
    .retailer-adv-burn-list li { margin: 0.1rem 0; }

    /* ── v352 Tonight strip + plan line + dialogs + type polish ── */
    .tonight-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.65rem; margin-bottom: 0.65rem; }
    .tonight-eyebrow { font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #047857; }
    .tonight-title { font-size: 1.125rem; font-weight: 900; color: #18181b; line-height: 1.2; margin-top: 0.1rem; }
    .tonight-sub { font-size: 0.75rem; color: #52525b; line-height: 1.4; margin-top: 0.2rem; }
    .tonight-badge { font-size: 0.6875rem; font-weight: 800; padding: 0.25rem 0.55rem; border-radius: 999px; white-space: nowrap; }
    .tonight-badge-warn { background: #fff7ed; border: 1px solid #fdba74; color: #c2410c; }
    .tonight-steps { display: grid; grid-template-columns: 1fr; gap: 0.4rem; margin-bottom: 0.65rem; }
    @media (min-width: 480px) { .tonight-steps { grid-template-columns: repeat(3, 1fr); } }
    .tonight-step {
      display: flex; align-items: center; gap: 0.5rem; text-align: left;
      padding: 0.55rem 0.6rem; border-radius: 0.85rem;
      border: 1px solid #e4e4e7; background: #fff; min-height: 3rem;
    }
    .tonight-step.is-done { border-color: #a7f3d0; background: #ecfdf5; }
    .tonight-step.is-active { border-color: #6ee7b7; box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15); }
    .tonight-step-num {
      width: 1.6rem; height: 1.6rem; border-radius: 999px; display: inline-flex;
      align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 900;
      background: #f4f4f5; color: #3f3f46; flex-shrink: 0;
    }
    .tonight-step.is-done .tonight-step-num { background: #10b981; color: #fff; }
    .tonight-step.is-active .tonight-step-num { background: #059669; color: #fff; }
    .tonight-step-copy { display: flex; flex-direction: column; min-width: 0; }
    .tonight-step-label { font-size: 0.8125rem; font-weight: 800; color: #18181b; }
    .tonight-step-meta { font-size: 0.6875rem; color: #71717a; line-height: 1.3; }
    .tonight-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
    .tonight-btn {
      font-size: 0.8125rem; font-weight: 700; padding: 0.5rem 0.85rem; border-radius: 0.85rem;
      border: 1px solid #d4d4d8; background: #fff; color: #3f3f46;
    }
    .tonight-btn-primary { background: #059669; border-color: #059669; color: #fff; }
    .home-plan-line {
      display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.55rem;
      padding: 0.45rem 0.75rem; border-radius: 0.85rem;
      border: 1px solid #e4e4e7; background: #fafafa; font-size: 0.75rem; color: #52525b;
    }
    .home-plan-pill {
      font-size: 0.625rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase;
      padding: 0.15rem 0.45rem; border-radius: 999px;
    }
    .home-plan-pill-free { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
    .home-plan-pill-pro { background: #d1fae5; color: #047857; border: 1px solid #a7f3d0; }
    .home-plan-text { flex: 1 1 12rem; min-width: 0; line-height: 1.35; }
    .home-plan-cta {
      font-size: 0.75rem; font-weight: 800; padding: 0.35rem 0.7rem; border-radius: 0.65rem;
      background: linear-gradient(90deg, #f59e0b, #ea580c); color: #fff; border: none;
    }
    /* In-app dialogs */
    .mrstore-dialog-scrim {
      position: fixed; inset: 0; z-index: 980;
      background: rgba(24, 24, 27, 0.45);
      display: flex; align-items: center; justify-content: center;
      padding: 1rem; padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
    #mrstore-dialog-host {
      position: relative;
      z-index: 980;
    }
    .mrstore-dialog-card {
      width: 100%; max-width: 22rem; background: #fff; border-radius: 1.15rem;
      border: 1px solid #e4e4e7; box-shadow: 0 20px 50px -20px rgba(0,0,0,0.35);
      padding: 1rem 1.05rem 0.95rem;
    }
    .mrstore-dialog-title { font-size: 1rem; font-weight: 900; color: #18181b; margin-bottom: 0.4rem; }
    .mrstore-dialog-body {
      font-size: 0.875rem; color: #3f3f46; line-height: 1.45; white-space: pre-wrap; margin-bottom: 0.85rem;
    }
    .mrstore-dialog-actions { display: flex; justify-content: flex-end; gap: 0.45rem; flex-wrap: wrap; }
    .mrstore-dialog-btn {
      font-size: 0.875rem; font-weight: 700; padding: 0.55rem 0.95rem; border-radius: 0.75rem;
      border: 1px solid #d4d4d8; background: #fff; color: #3f3f46; min-height: 2.5rem;
    }
    .mrstore-dialog-ok { background: #059669; border-color: #059669; color: #fff; }
    .mrstore-dialog-cancel { background: #fafafa; }
    .app-flash-action { color: inherit; }
    /* Readable type on phone chrome (do not shrink critical numbers) */
    #bottom-nav .bnav-btn { font-size: 0.75rem !important; }
    #bottom-nav .bnav-btn .text-xl { font-size: 1.25rem !important; }
    .retailer-stat-val { font-size: 1.25rem !important; }
    .retailer-stat-lbl { font-size: 0.625rem !important; }
    .money-map-title { font-size: 0.75rem !important; }
    .money-map-pool-amt { font-size: 0.8125rem !important; }

    /* v354 Owner moat + Vendor connect */
    .tonight-head-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; }
    .tonight-badge-streak { background: #fff7ed; border: 1px solid #fdba74; color: #c2410c; }
    .moat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.65rem; margin-bottom: 0.65rem; }
    .moat-eyebrow { font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #52525b; }
    .moat-title { font-size: 1.05rem; font-weight: 900; color: #18181b; line-height: 1.25; margin-top: 0.1rem; }
    .moat-sub { font-size: 0.75rem; color: #71717a; line-height: 1.4; margin-top: 0.2rem; }
    .moat-streak-pill {
      font-size: 0.75rem; font-weight: 800; padding: 0.3rem 0.55rem; border-radius: 999px;
      background: #fff7ed; border: 1px solid #fdba74; color: #c2410c; white-space: nowrap;
    }
    .moat-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; margin-bottom: 0.55rem; }
    @media (max-width: 420px) { .moat-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
    .moat-stat {
      text-align: center; padding: 0.45rem 0.3rem; border-radius: 0.75rem;
      background: #fafafa; border: 1px solid #e4e4e7;
    }
    .moat-stat-val { font-size: 1.15rem; font-weight: 900; color: #18181b; line-height: 1; }
    .moat-stat-lbl { font-size: 0.625rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #71717a; margin-top: 0.2rem; }
    .moat-lines { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.6rem; }
    .moat-line { font-size: 0.75rem; color: #3f3f46; line-height: 1.4; }
    .moat-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
    .moat-btn {
      font-size: 0.8125rem; font-weight: 700; padding: 0.5rem 0.85rem; border-radius: 0.85rem;
      border: 1px solid #d4d4d8; background: #fff; color: #3f3f46;
    }
    .moat-btn-primary { background: #18181b; border-color: #18181b; color: #fff; }
    .vconn-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.65rem; margin-bottom: 0.65rem; }
    .vconn-eyebrow { font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #c2410c; }
    .vconn-title { font-size: 1.05rem; font-weight: 900; color: #18181b; line-height: 1.25; margin-top: 0.1rem; }
    .vconn-sub { font-size: 0.75rem; color: #57534e; line-height: 1.4; margin-top: 0.2rem; }
    .vconn-learn {
      font-size: 0.75rem; font-weight: 800; padding: 0.35rem 0.65rem; border-radius: 999px;
      background: #fff; border: 1px solid #fdba74; color: #c2410c; white-space: nowrap; text-decoration: none;
    }
    .vconn-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.65rem; }
    .vconn-row {
      display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
      padding: 0.55rem 0.65rem; border-radius: 0.85rem; border: 1px solid #e7e5e4; background: #fff;
    }
    .vconn-row.is-due { border-color: #fdba74; background: #fff7ed; }
    .vconn-name { font-size: 0.875rem; font-weight: 800; color: #18181b; }
    .vconn-meta { font-size: 0.6875rem; color: #78716c; margin-top: 0.1rem; line-height: 1.35; }
    .vconn-row-actions { display: flex; gap: 0.3rem; flex-shrink: 0; }
    .vconn-mini {
      font-size: 0.75rem; font-weight: 800; padding: 0.4rem 0.55rem; border-radius: 0.65rem;
      border: 1px solid #e7e5e4; background: #fafaf9; color: #44403c; min-height: 2.25rem;
    }
    .vconn-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
    .vconn-btn {
      font-size: 0.8125rem; font-weight: 700; padding: 0.5rem 0.85rem; border-radius: 0.85rem;
      border: 1px solid #e7e5e4; background: #fff; color: #44403c; text-decoration: none;
      display: inline-flex; align-items: center;
    }
    .vconn-btn-primary { background: #ea580c; border-color: #ea580c; color: #fff; }
    .po-preview-foot-brand { font-size: 0.65rem; color: #78716c; margin-top: 0.35rem; }
    .po-preview-foot-brand a { color: #c2410c; font-weight: 700; }

    /* ── v357/v358 Store switch animation ──
       IMPORTANT: never force #store-hero { position: relative } alone —
       it overrides .store-dock.is-pinned { position: fixed } (sticky while scroll). */
    #store-hero.store-dock:not(.is-pinned) { position: relative; }
    #store-hero.store-dock.is-pinned { position: fixed; }
    .store-switch-pill {
      position: absolute;
      left: 50%;
      top: calc(100% + 0.35rem);
      transform: translateX(-50%) translateY(-4px);
      z-index: 46;
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      padding: 0.4rem 0.85rem;
      border-radius: 999px;
      background: #18181b;
      color: #fff;
      font-size: 0.75rem;
      font-weight: 800;
      letter-spacing: 0.01em;
      box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
      white-space: nowrap;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.18s ease, transform 0.22s ease;
    }
    .store-switch-pill:not(.hidden) {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
    .store-switch-pill.is-done {
      background: #059669;
    }
    .store-switch-pill-spin {
      width: 0.85rem;
      height: 0.85rem;
      border-radius: 50%;
      border: 2px solid rgba(255,255,255,0.25);
      border-top-color: #6ee7b7;
      animation: store-switch-spin 0.7s linear infinite;
      flex-shrink: 0;
    }
    .store-switch-pill.is-done .store-switch-pill-spin {
      animation: none;
      border-color: #fff;
      background: #fff;
      position: relative;
    }
    .store-switch-pill.is-done .store-switch-pill-spin::after {
      content: '✓';
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.55rem;
      font-weight: 900;
      color: #059669;
      line-height: 1;
    }
    @keyframes store-switch-spin {
      to { transform: rotate(360deg); }
    }
    /* v878: solid cards during switch — only thin top bar animates (no whole-app dim flash) */
    body.store-switching #home-insights,
    body.mr-soft-refresh #home-insights {
      position: relative;
    }
    body.store-switching #home-insights > .card:not(#workspace-boot-overlay):not(#app-loading-shell),
    body.mr-soft-refresh #home-insights > .card:not(#workspace-boot-overlay):not(#app-loading-shell) {
      opacity: 1 !important;
      filter: none !important;
      transition: none !important;
      pointer-events: auto !important;
      animation: none !important;
      transform: none !important;
    }
    body.store-switching #home-insights::after,
    body.mr-soft-refresh #home-insights::after {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      height: 3px;
      border-radius: 999px;
      background: linear-gradient(90deg, transparent, #34d399, #10b981, #34d399, transparent);
      background-size: 200% 100%;
      animation: store-switch-bar 1.1s ease-in-out infinite;
      z-index: 40;
      pointer-events: none;
    }
    @keyframes store-switch-bar {
      0% { background-position: 100% 0; opacity: 0.55; }
      50% { opacity: 1; }
      100% { background-position: -100% 0; opacity: 0.55; }
    }
    body.store-switching .store-slide-chip.active {
      box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.45), 0 4px 14px rgba(16, 185, 129, 0.2);
    }
    body.store-switching #section-ledger-table,
    body.store-switching #section-ledger-metrics,
    body.store-switching #section-quick-add {
      opacity: 1 !important;
      transition: none !important;
      pointer-events: auto !important;
    }
    body.store-switch-enter #home-insights > .card:not(#workspace-boot-overlay) {
      animation: none !important;
      opacity: 1 !important;
      transform: none !important;
    }
    @media (prefers-reduced-motion: reduce) {
      .store-switch-pill-spin,
      body.store-switching #home-insights::after,
      body.mr-soft-refresh #home-insights::after {
        animation: none !important;
      }
    }

    .vendor-hub-pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
    @media (min-width: 640px) { .vendor-hub-pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
    .vendor-hub-pick-btn {
      text-align: left; padding: 0.65rem 0.75rem; border-radius: 0.85rem;
      border: 1px solid #e4e4e7; background: #fff; font-size: 11px; font-weight: 700;
      color: #18181b; touch-action: manipulation;
    }
    .vendor-hub-pick-btn:active { border-color: #fdba74; background: #fff7ed; }
    .vendor-hub-row { display: flex; gap: 0.35rem; align-items: stretch; }
    .vendor-hub-row .vendor-hub-card { flex: 1; min-width: 0; }
    .vendor-hub-remove-btn {
      flex-shrink: 0; width: 2.25rem; border-radius: 0.85rem;
      border: 1px solid #fecaca; background: #fff1f2; color: #b91c1c;
      font-size: 14px; font-weight: 700; cursor: pointer; touch-action: manipulation;
    }
    .vendor-hub-remove-btn:active { background: #fee2e2; }
    .vendor-hub-nonvendor-badge {
      display: inline-block; font-size: 9px; font-weight: 700; color: #b45309;
      background: #fffbeb; border: 1px solid #fde68a; border-radius: 999px;
      padding: 0.1rem 0.4rem; margin-top: 0.25rem;
    }
    .po-preview-empty {
      padding: 1.25rem 1rem;
      text-align: center;
      color: #a1a1aa;
      font-size: 0.72rem;
    }
    .catalog-mobile-card {
      border: 1px solid #e4e4e7;
      border-radius: 0.85rem;
      padding: 0;
      background: #fff;
      overflow: hidden;
    }
    .catalog-mobile-card.is-expanded,
    .catalog-mobile-card:focus-within {
      border-color: #93c5fd;
      box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
    }
    .catalog-row-selected {
      background: #eff6ff !important;
    }
    .catalog-table-wrap tr.catalog-row-selected {
      box-shadow: inset 3px 0 0 #3b82f6;
    }
    .catalog-mobile-card.catalog-row-selected {
      border-color: #93c5fd;
      box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
    }
    .catalog-mobile-select {
      flex-shrink: 0;
      display: flex;
      align-items: center;
      padding: 0.1rem;
      min-width: 1.15rem;
      min-height: auto;
    }
    /* Compact selection boxes — touch-target 44px was huge and laggy */
    .catalog-row-select,
    #catalog-select-all {
      width: 0.95rem !important;
      height: 0.95rem !important;
      min-width: 0.95rem !important;
      min-height: 0.95rem !important;
      margin: 0 !important;
      cursor: pointer;
      accent-color: #2563eb;
      flex-shrink: 0;
    }
    .catalog-select-all-label {
      min-height: auto !important;
      min-width: auto !important;
      gap: 0.4rem;
      font-size: 11px;
      padding: 0.15rem 0;
      user-select: none;
    }
    .catalog-mobile-select .catalog-row-select {
      width: 0.9rem !important;
      height: 0.9rem !important;
    }
    .catalog-mobile-head {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      width: 100%;
      text-align: left;
      padding: 0.5rem 0.55rem;
      background: #fff;
      border: none;
      cursor: pointer;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }
    .catalog-mobile-card.is-expanded .catalog-mobile-head {
      background: #f8fafc;
      border-bottom: 1px solid #f4f4f5;
    }
    .catalog-mobile-head:active { background: #f4f4f5; }
    .catalog-mobile-summary { flex: 1; min-width: 0; }
    .catalog-mobile-card-name {
      font-size: 0.8125rem;
      font-weight: 700;
      color: #18181b;
      line-height: 1.25;
      word-break: break-word;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .catalog-mobile-meta {
      font-size: 0.625rem;
      color: #71717a;
      margin-top: 0.15rem;
      line-height: 1.35;
    }
    .catalog-mobile-meta-low { color: #b91c1c; font-weight: 700; }
    .catalog-mobile-chevron {
      font-size: 0.625rem;
      color: #a1a1aa;
      flex-shrink: 0;
      transition: transform 0.15s ease;
      padding: 0.25rem;
    }
    .catalog-mobile-card.is-expanded .catalog-mobile-chevron { transform: rotate(180deg); }
    .catalog-mobile-del {
      flex-shrink: 0;
      color: #dc2626;
      font-size: 1.125rem;
      line-height: 1;
      padding: 0.2rem 0.35rem;
      border: none;
      background: transparent;
    }
    .catalog-mobile-body {
      display: none !important;
      padding: 0.6rem 0.65rem 0.7rem;
    }
    .catalog-mobile-card.is-expanded .catalog-mobile-body { display: block !important; }
    .catalog-mobile-body .grid { gap: 0.5rem; }
    @media (max-width: 767px) {
      .catalog-mobile-body .grid { grid-template-columns: 1fr !important; }
    }
    .catalog-field-label {
      display: block;
      font-size: 9px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: #71717a;
      margin-bottom: 0.2rem;
    }
    #catalog-edit-context {
      position: sticky;
      bottom: 0;
      z-index: 5;
      margin-top: 0.5rem;
      padding: 0.55rem 0.75rem;
      border-radius: 0.85rem;
      background: linear-gradient(135deg, #eff6ff, #f0fdf4);
      border: 1px solid #bfdbfe;
      font-size: 11px;
      color: #1e3a8a;
      font-weight: 600;
    }
    .catalog-table-wrap th.cat-sticky-name,
    .catalog-table-wrap td.cat-sticky-name {
      position: sticky;
      left: 0;
      z-index: 2;
      background: #fff;
      box-shadow: 2px 0 4px rgba(0, 0, 0, 0.04);
    }
    .catalog-table-wrap thead th.cat-sticky-name { background: #f4f4f5; z-index: 3; }
    .cat-thumb-wrap { position: relative; display: inline-block; }
    .cat-thumb-btn {
      border-radius: 0.75rem;
      overflow: hidden;
      border: 1px solid #e4e4e7;
      background: linear-gradient(135deg, #f4f4f5, #fafafa);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 0;
      touch-action: manipulation;
    }
    .cat-thumb-sm { width: 2.75rem; height: 2.75rem; }
    .cat-thumb-lg { width: 4.5rem; height: 4.5rem; flex-shrink: 0; }
    .cat-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .cat-thumb-empty { color: #71717a; gap: 0.1rem; }
    .cat-thumb-empty.product-visual-tobacco,
    .cat-thumb-empty.product-visual-beer,
    .cat-thumb-empty.product-visual-wine,
    .cat-thumb-empty.product-visual-grocery,
    .cat-thumb-empty.product-visual-other { color: inherit; }
    .cat-thumb-icon { font-size: 1.1rem; line-height: 1; }
    .cat-thumb-add-label { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
    .catalog-shelf-cell {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.2rem;
      min-width: 2.75rem;
    }
    .catalog-shelf-cell-readonly {
      flex-direction: row;
      gap: 0.35rem;
      justify-content: center;
    }
    .catalog-stock-viz {
      flex-shrink: 0;
      line-height: 0;
      position: relative;
      overflow: hidden;
      contain: layout paint;
      isolation: isolate;
    }
    /* Product list — clip mini planogram so tobacco/cooler art cannot bleed as a side bar */
    .catalog-mobile-level,
    .catalog-level-cell,
    .catalog-shelf-cell .catalog-stock-viz {
      position: relative;
      overflow: hidden;
      contain: layout paint;
      isolation: isolate;
    }
    .catalog-stock-viz .shelf-viz,
    .catalog-mobile-level .shelf-viz,
    .catalog-level-cell .shelf-viz {
      overflow: hidden !important;
    }
    .catalog-stock-viz .shelf-viz.shelf-cig-wall,
    .catalog-stock-viz .shelf-viz.shelf-cooler,
    .catalog-stock-viz .shelf-viz.shelf-pouch,
    .catalog-stock-viz .shelf-viz.shelf-cigarette,
    .catalog-stock-viz .shelf-viz.shelf-cigar,
    .catalog-mobile-level .shelf-viz.shelf-cig-wall,
    .catalog-mobile-level .shelf-viz.shelf-cooler,
    .catalog-level-cell .shelf-viz.shelf-cig-wall,
    .catalog-level-cell .shelf-viz.shelf-cooler {
      overflow: hidden !important;
      border-radius: 0.45rem;
    }
    .catalog-stock-viz .shelf-viz-xs,
    .catalog-mobile-level .shelf-viz-xs,
    .catalog-level-cell .shelf-viz-xs {
      width: 2rem !important;
      height: 2rem !important;
      min-width: 2rem;
      min-height: 2rem;
      max-width: 2rem;
      max-height: 2rem;
    }
    .catalog-stock-viz .shelf-cig-wall-frame,
    .catalog-stock-viz .shelf-cooler-frame-lite,
    .catalog-stock-viz .shelf-pouch-stage,
    .catalog-stock-viz .shelf-cigarette,
    .catalog-stock-viz .shelf-cigar {
      width: 100%;
      height: 100%;
      overflow: hidden;
    }
    .catalog-stock-viz .shelf-viz-tag,
    .catalog-mobile-level .shelf-viz-tag {
      display: none !important;
    }
    #catalog-cards {
      position: relative;
      overflow: visible;
    }
    /* When cards are the active layout, force visible (beats leftover Tailwind sm:hidden) */
    #catalog-cards:not(.hidden) {
      display: block !important;
    }
    #catalog-table-wrap:not(.hidden),
    .catalog-table-wrap:not(.hidden) {
      display: block !important;
    }
    /* Allow horizontal scroll for desktop table; vertical scroll for product list */
    #catalog-modal .overflow-auto {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    #catalog-modal .catalog-table-wrap {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      max-width: 100%;
    }
    /* iPad / tablet Products sheet */
    @media (min-width: 768px) and (max-width: 1200px) {
      #catalog-modal:not(.hidden) {
        z-index: 500 !important;
        align-items: center !important;
        padding: 0.75rem !important;
      }
      #catalog-modal:not(.hidden) > div {
        max-height: 94vh !important;
        width: 100% !important;
        max-width: 56rem !important;
      }
      #catalog-cards:not(.hidden) {
        padding-bottom: 1.5rem;
      }
    }
    /* Barcode dock always visible under Products header (Stock tab) */
    /* Products modal always above sticky store bar / refresh bar */
    #catalog-modal:not(.hidden) {
      z-index: 500 !important;
      background: rgba(0, 0, 0, 0.5) !important;
    }
    body.mr-catalog-open #store-hero,
    body:has(#catalog-modal:not(.hidden)) #store-hero {
      z-index: 1 !important;
      pointer-events: none !important;
    }

    /* Connections hub — above sticky store dock (z-45) + morning-rush bar; works on PC + phone */
    #connections-hub-modal {
      position: fixed !important;
      inset: 0 !important;
      z-index: 520 !important;
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      margin: 0;
      padding: 1rem;
      box-sizing: border-box;
      pointer-events: auto;
    }
    @media (max-width: 639px) {
      #connections-hub-modal {
        align-items: flex-end;
        justify-content: flex-end;
        padding: 0 !important;
      }
    }
    #connections-hub-modal:not(.hidden) {
      display: flex !important;
    }
    #connections-hub-modal > .absolute.inset-0,
    #connections-hub-modal [data-conn-close] {
      z-index: 0;
      pointer-events: auto;
    }
    #connections-hub-modal > .relative,
    #connections-hub-modal .conn-hub-sheet {
      position: relative !important;
      z-index: 1 !important;
      width: 100% !important;
      max-width: 32rem !important;
      max-height: min(92dvh, 900px) !important;
      min-height: min(52dvh, 420px) !important;
      display: flex !important;
      flex-direction: column !important;
      overflow: hidden !important;
      margin: 0 auto !important;
      background: #fff !important;
      box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22) !important;
    }
    @media (max-width: 639px) {
      #connections-hub-modal > .relative,
      #connections-hub-modal .conn-hub-sheet {
        max-width: 100% !important;
        max-height: min(96dvh, 100%) !important;
        min-height: min(72dvh, 100%) !important;
        border-radius: 1.15rem 1.15rem 0 0 !important;
        margin: 0 !important;
      }
    }
    #connections-hub-modal #conn-hub-body {
      flex: 1 1 auto !important;
      min-height: 0 !important;
      overflow-x: hidden !important;
      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch;
    }
    body.mr-connections-open {
      overflow: hidden !important;
    }
    body.mr-connections-open #store-hero,
    body.mr-connections-open .store-dock,
    body.mr-connections-open .store-dock.is-pinned,
    body.mr-connections-open #home-plan-line,
    body.mr-connections-open .plan-line,
    body:has(#connections-hub-modal:not(.hidden)) #store-hero,
    body:has(#connections-hub-modal:not(.hidden)) .store-dock,
    body:has(#connections-hub-modal:not(.hidden)) .store-dock.is-pinned {
      z-index: 1 !important;
      pointer-events: none !important;
      visibility: hidden !important;
    }
    body.mr-connections-open #bottom-nav,
    body.mr-connections-open #feature-browser-tab,
    body.mr-connections-open #btn-cstore-os-fab {
      z-index: 1 !important;
      pointer-events: none !important;
    }
    #barcode-scan-bar.catalog-barcode-dock,
    #catalog-modal:not(.hidden) #barcode-scan-bar {
      display: block !important;
      flex-shrink: 0 !important;
      position: relative;
      z-index: 5;
      visibility: visible !important;
      opacity: 1 !important;
      max-height: none !important;
      overflow: visible !important;
      background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%) !important;
      border-bottom: 2px solid #93c5fd !important;
    }
    #catalog-modal:not(.hidden) #barcode-scan-bar > * {
      visibility: visible !important;
    }
    #barcode-camera-panel:not(.hidden) {
      display: block !important;
      min-height: 220px !important;
      background: #000 !important;
      position: relative;
      z-index: 6;
      overflow: hidden;
    }
    #barcode-camera-video {
      display: block !important;
      width: 100% !important;
      min-height: 200px !important;
      max-height: 320px;
      object-fit: cover;
      background: #111;
      position: relative;
      z-index: 1;
      /* GPU layer helps iOS/Android paint camera frames */
      transform: translateZ(0);
      -webkit-transform: translateZ(0);
    }
    #btn-barcode-camera {
      min-height: 2.5rem;
      min-width: 5.5rem;
      font-weight: 800;
    }
    @media (max-width: 768px) {
      #barcode-scan-bar.catalog-barcode-dock {
        padding: 0.65rem 0.75rem !important;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
      }
      #barcode-scan-input {
        font-size: 16px !important; /* prevent iOS zoom */
        min-height: 2.75rem;
      }
      #btn-barcode-camera {
        flex: 1 1 auto;
        padding: 0.55rem 0.85rem !important;
        font-size: 13px !important;
      }
      #barcode-camera-panel:not(.hidden) {
        min-height: 240px !important;
      }
    }
    .catalog-shelf-level-only,
    .catalog-shelf-cell .catalog-stock-viz {
      overflow: hidden;
    }
    .catalog-shelf-num { font-weight: 700; font-size: 0.75rem; color: #18181b; }
    .catalog-shelf-cell input { width: 100%; max-width: 3.5rem; }
    /* Product list — photo and level in separate columns */
    .catalog-photo-td,
    .catalog-level-td {
      overflow: visible;
      vertical-align: middle;
    }
    .catalog-photo-td { min-width: 3.25rem; width: 3.25rem; }
    .catalog-level-td { min-width: 2.75rem; width: 2.75rem; overflow: hidden; }
    .catalog-photo-cell,
    .catalog-level-cell {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0.15rem 0;
      overflow: hidden;
    }
    .catalog-level-cell .catalog-stock-viz { line-height: 0; }
    .catalog-shelf-count-cell {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.15rem;
    }
    .catalog-shelf-count-lbl {
      font-size: 0.5rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: #a1a1aa;
      line-height: 1;
    }
    .catalog-shelf-count-cell input { width: 100%; max-width: 3.5rem; }
    .catalog-shelf-row-cell {
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
    }
    .catalog-shelf-level-only { display: flex; justify-content: flex-start; }
    .catalog-shelf-level-only .catalog-stock-viz { line-height: 0; }
    .catalog-shelf-row-input {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
    }
    .catalog-table-wrap td.catalog-photo-td { overflow: visible; }
    .cat-thumb-wrap { overflow: visible; }
    .cat-thumb-remove {
      position: absolute; top: -5px; right: -5px;
      width: 1.15rem; height: 1.15rem; min-width: 1.15rem; min-height: 1.15rem;
      border-radius: 999px; padding: 0;
      display: inline-flex; align-items: center; justify-content: center;
      background: #fff; border: 1px solid #fecaca; color: #dc2626;
      font-size: 11px; line-height: 1; font-weight: 800;
      box-shadow: 0 1px 3px rgba(0,0,0,0.14);
      cursor: pointer; z-index: 4;
      pointer-events: auto;
      touch-action: manipulation;
    }
    .cat-thumb-remove:hover { background: #fef2f2; }
    @media (max-width: 767px) {
      .catalog-mobile-card .cat-thumb-remove {
        width: 1.25rem; height: 1.25rem; font-size: 11px;
      }
    }
    .product-visual {
      flex-shrink: 0;
      border-radius: 0.65rem;
      border: 1px solid #e4e4e7;
      overflow: hidden;
      object-fit: cover;
    }
    .product-visual-sm { width: 2.75rem; height: 2.75rem; }
    .product-visual-md { width: 3rem; height: 3rem; }
    .product-visual-letter {
      display: flex; align-items: center; justify-content: center;
      font-weight: 800; font-size: 0.95rem;
    }
    .product-visual-tobacco { background: linear-gradient(135deg, #ffedd5, #fed7aa); color: #9a3412; }
    .product-visual-beer { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }
    .product-visual-wine { background: linear-gradient(135deg, #fae8ff, #e9d5ff); color: #7e22ce; }
    .product-visual-grocery { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1d4ed8; }
    .product-visual-other { background: linear-gradient(135deg, #f4f4f5, #e4e4e7); color: #52525b; }
    .product-visual-wrap { position: relative; display: inline-block; flex-shrink: 0; }

    .shelf-viz {
      --fill-pct: 50;
      --bottle-fill: 50;
      position: relative;
      display: flex; align-items: flex-end; justify-content: center;
      border-radius: 0.65rem;
      border: 1px solid #e4e4e7;
      background: linear-gradient(165deg, #fafafa 0%, #f4f4f5 100%);
      overflow: hidden;
      flex-shrink: 0;
    }
    .shelf-viz.shelf-cooler,
    .shelf-viz.shelf-cig-wall {
      border: none;
      background: transparent;
      overflow: visible;
    }
    .shelf-viz-xs { width: 2rem; height: 2rem; }
    .shelf-viz-sm { width: 2.75rem; height: 2.75rem; }
    .shelf-viz-md { width: 3rem; height: 3rem; }
    .shelf-viz-lg { width: 3.75rem; height: 3.75rem; }
    .shelf-viz-tag {
      position: absolute; top: 2px; right: 2px;
      font-size: 7px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
      background: rgba(239, 68, 68, 0.92); color: #fff; border-radius: 4px; padding: 1px 3px; z-index: 2;
    }
    .shelf-beer-mug {
      width: 58%; height: 78%; margin-bottom: 8%;
      border: 2px solid rgba(146, 64, 14, 0.45);
      border-radius: 0 0 10px 10px;
      position: relative; overflow: hidden;
      background: rgba(255, 255, 255, 0.35);
    }
    .shelf-beer-foam {
      position: absolute; top: 0; left: 0; right: 0; height: 18%;
      background: linear-gradient(180deg, #fffbeb, #fef3c7);
      z-index: 2;
    }
    .shelf-beer-liquid {
      position: absolute; left: 0; right: 0; bottom: 0;
      height: calc(var(--fill-pct, 50) * 1%);
      background: linear-gradient(180deg, #fbbf24 0%, #d97706 55%, #b45309 100%);
      transition: height 0.35s ease;
      z-index: 1;
    }
    .shelf-beer-drip {
      position: absolute; right: 18%; bottom: -2px; width: 3px; height: 8px;
      background: #d97706; border-radius: 0 0 3px 3px;
      animation: shelf-beer-drip 1.6s ease-in-out infinite;
    }
    .shelf-beer.shelf-low .shelf-beer-liquid { animation: shelf-beer-slosh 2.2s ease-in-out infinite; }
    .shelf-beer.shelf-empty .shelf-beer-liquid { height: 0 !important; }
    .shelf-beer.shelf-empty .shelf-beer-foam { opacity: 0.35; }
    .shelf-cigarette { background: linear-gradient(165deg, #fff7ed, #ffedd5); }
    .shelf-cig-pack {
      position: absolute; bottom: 10%; left: 14%; right: 14%; height: 34%;
      background: linear-gradient(180deg, #fdba74, #ea580c);
      border-radius: 3px 3px 5px 5px;
      border: 1px solid rgba(154, 52, 18, 0.35);
    }
    .shelf-cig-row {
      position: absolute; bottom: 38%; left: 18%; right: 18%;
      display: flex; justify-content: center; gap: 2px; height: 42%;
      align-items: flex-end;
    }
    .shelf-cig-stick {
      width: 3px; height: 0; background: linear-gradient(180deg, #fefce8, #fef08a 40%, #fff 85%);
      border-radius: 2px 2px 0 0; border: 1px solid rgba(161, 98, 7, 0.25);
      transition: height 0.25s ease;
    }
    .shelf-cig-stick.up { height: 88%; }
    .shelf-cig-ember {
      position: absolute; top: 16%; left: 50%; transform: translateX(-50%);
      width: 6px; height: 6px; border-radius: 999px;
    }
    .shelf-cig-ember-lit {
      background: #fb923c;
      box-shadow: 0 0 6px 2px rgba(251, 146, 60, 0.85), 0 0 12px 4px rgba(234, 88, 12, 0.45);
      animation: shelf-ember-glow 1.8s ease-in-out infinite;
    }
    .shelf-cig-ember-flicker {
      background: #f97316;
      box-shadow: 0 0 4px 1px rgba(249, 115, 22, 0.55);
      animation: shelf-ember-die 1.2s ease-in-out infinite;
    }
    .shelf-cig-ember-out { display: none; }
    .shelf-cigarette.shelf-empty .shelf-cig-pack { filter: grayscale(0.85); opacity: 0.65; }

    /* Realistic cooler & tobacco wall visuals — lit reach-in case */
    .shelf-cooler-frame {
      position: relative;
      width: 100%;
      height: 100%;
      background: linear-gradient(180deg, #e2e8f0 0%, #f8fafc 12%, #f0f9ff 55%, #e0f2fe 100%);
      border: 2px solid #cbd5e1;
      border-radius: 0.55rem;
      overflow: hidden;
      box-shadow: inset 0 0 14px rgba(186,230,253,0.45), 0 2px 6px rgba(15,23,42,0.08);
    }
    .shelf-cooler-glass {
      position: absolute;
      inset: 5% 6% 14% 6%;
      background: linear-gradient(125deg, rgba(255,255,255,0.55) 0%, rgba(186,230,253,0.2) 40%, rgba(255,255,255,0.15) 100%);
      border: 1px solid rgba(255,255,255,0.65);
      border-radius: 0.35rem;
      z-index: 6;
      pointer-events: none;
    }
    .shelf-cooler-glass::after {
      content: '';
      position: absolute;
      top: 8%; left: 12%; width: 28%; height: 45%;
      background: linear-gradient(135deg, rgba(255,255,255,0.45), transparent);
      border-radius: 40%;
      filter: blur(1px);
    }
    .shelf-cooler-led {
      position: absolute;
      top: 4%;
      left: 10%;
      right: 10%;
      height: 2px;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95) 20%, rgba(255,255,255,0.95) 80%, transparent);
      border-radius: 2px;
      z-index: 7;
      box-shadow: 0 0 10px rgba(255,255,255,0.55);
    }
    .shelf-cooler-rail {
      position: absolute;
      left: 8%;
      right: 8%;
      bottom: 22%;
      height: 3px;
      background: linear-gradient(180deg, #94a3b8, #64748b);
      border-radius: 1px;
      z-index: 2;
      box-shadow: 0 2px 4px rgba(0,0,0,0.35);
    }
    .shelf-cooler-floor {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: 18%;
      background: linear-gradient(180deg, #f8fafc, #e2e8f0);
      border-top: 1px solid #cbd5e1;
      z-index: 1;
    }
    .shelf-cooler-handle {
      position: absolute;
      right: 3%;
      top: 22%;
      width: 5px;
      height: 38%;
      background: linear-gradient(90deg, #cbd5e1, #94a3b8);
      border-radius: 3px;
      z-index: 8;
      box-shadow: -1px 0 3px rgba(0,0,0,0.3);
    }
    .shelf-cooler-condense {
      position: absolute;
      bottom: 20%;
      left: 12%;
      width: 4px;
      height: 8px;
      border-radius: 50%;
      background: rgba(186,230,253,0.35);
      z-index: 7;
      box-shadow: 18px 4px 0 rgba(186,230,253,0.2), 42px -2px 0 rgba(186,230,253,0.15);
    }
    .shelf-cooler-empty {
      width: 60%;
      height: 40%;
      margin: 0 auto;
      border: 1px dashed rgba(148,163,184,0.45);
      border-radius: 0.25rem;
    }
    .shelf-bottle-row {
      position: absolute;
      left: 8%;
      right: 14%;
      bottom: 20%;
      height: 62%;
      transform-style: preserve-3d;
      perspective: 140px;
      z-index: 3;
    }
    .shelf-bottle {
      position: absolute;
      bottom: 0;
      width: 26%;
      height: 92%;
      transform-origin: bottom center;
    }
    .shelf-bottle-d1 { left: 50%; transform: translateX(-58%) translateZ(16px) scale(1); z-index: 5; }
    .shelf-bottle-d2 { left: 28%; transform: translateX(-50%) translateZ(6px) scale(0.9); z-index: 4; opacity: 0.94; }
    .shelf-bottle-d3 { left: 72%; transform: translateX(-50%) translateZ(0px) scale(0.84); z-index: 3; opacity: 0.88; }
    .shelf-bottle-d4 { left: 50%; transform: translateX(-42%) translateZ(-10px) scale(0.76); z-index: 2; opacity: 0.75; }
    .shelf-bottle-neck {
      position: absolute;
      top: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 28%;
      height: 22%;
      background: linear-gradient(180deg, #78350f 0%, #92400e 100%);
      border-radius: 2px 2px 0 0;
      z-index: 2;
    }
    .shelf-bottle-can .shelf-bottle-neck {
      width: 42%;
      height: 10%;
      background: linear-gradient(180deg, #e2e8f0, #94a3b8);
      border-radius: 2px;
    }
    .shelf-bottle-wine .shelf-bottle-neck {
      width: 22%;
      height: 28%;
      background: linear-gradient(180deg, #3b0764, #581c87);
    }
    .shelf-bottle-body {
      position: absolute;
      top: 18%;
      left: 8%;
      right: 8%;
      bottom: 0;
      border-radius: 3px 3px 8px 8px;
      overflow: hidden;
      background: rgba(255,255,255,0.35);
      border: 1px solid rgba(148,163,184,0.35);
      box-shadow: inset -2px 0 4px rgba(0,0,0,0.08);
    }
    .shelf-bottle-beer .shelf-bottle-body {
      background: linear-gradient(90deg, #3f6212 0%, #4d7c0f 38%, #65a30d 52%, #3f6212 100%);
      border-color: rgba(63,98,18,0.55);
    }
    .shelf-bottle-can .shelf-bottle-body {
      top: 8%;
      border-radius: 4px 4px 6px 6px;
      background: linear-gradient(90deg, #cbd5e1 0%, #f8fafc 35%, #94a3b8 100%);
      border-color: rgba(148,163,184,0.6);
    }
    .shelf-bottle-wine .shelf-bottle-body {
      top: 24%;
      border-radius: 2px 2px 10px 10px;
    }
    .shelf-bottle-liquid {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: calc(var(--bottle-fill, 50) * 1%);
      transition: height 0.35s ease;
      z-index: 1;
    }
    .shelf-bottle-beer .shelf-bottle-liquid {
      background: linear-gradient(180deg, #fde68a 0%, #fbbf24 45%, #d97706 100%);
      opacity: 0.92;
    }
    .shelf-bottle-can .shelf-bottle-liquid {
      background: linear-gradient(180deg, #38bdf8, #0284c7 60%, #1e40af);
      opacity: 0.85;
    }
    .shelf-bottle-wine .shelf-bottle-liquid {
      background: linear-gradient(180deg, #c084fc, #7e22ce 55%, #581c87);
    }
    .shelf-bottle-label {
      position: absolute;
      top: 38%;
      left: 12%;
      right: 12%;
      height: 22%;
      background: linear-gradient(180deg, #fef3c7, #fde68a);
      border-radius: 2px;
      z-index: 2;
      opacity: 0.9;
    }
    .shelf-bottle-can .shelf-bottle-label {
      top: 30%;
      height: 35%;
      background: linear-gradient(180deg, #ef4444, #b91c1c);
      border-radius: 2px;
    }
    .shelf-bottle-wine .shelf-bottle-label {
      background: linear-gradient(180deg, #faf5ff, #e9d5ff);
      height: 18%;
    }
    .shelf-bottle-shine {
      position: absolute;
      top: 8%;
      left: 15%;
      width: 22%;
      height: 55%;
      background: linear-gradient(180deg, rgba(255,255,255,0.35), transparent);
      border-radius: 40%;
      z-index: 3;
      pointer-events: none;
    }
    .shelf-cooler-beer .shelf-beer-drip {
      position: absolute;
      right: 20%;
      bottom: 0;
      width: 2px;
      height: 10%;
      background: #d97706;
      z-index: 4;
    }
    .shelf-cig-wall-frame {
      position: relative;
      width: 100%;
      height: 100%;
      background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
      border-radius: 0.5rem;
      border: 1px solid rgba(180, 83, 9, 0.2);
      overflow: hidden;
    }
    .shelf-cig-wall-shelf {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 18%;
      height: 4px;
      background: linear-gradient(180deg, #d6d3d1, #a8a29e);
      box-shadow: 0 2px 4px rgba(0,0,0,0.12);
      z-index: 2;
    }
    .shelf-cig-stack {
      position: absolute;
      left: 10%;
      right: 10%;
      bottom: 20%;
      height: 68%;
      transform-style: preserve-3d;
      perspective: 120px;
    }
    .shelf-cig-carton {
      position: absolute;
      left: 8%;
      right: 8%;
      bottom: 0;
      height: 88%;
      transform-origin: bottom center;
    }
    .shelf-cig-carton-d1 { transform: translateZ(18px) scale(1); z-index: 5; }
    .shelf-cig-carton-d2 { transform: translateZ(8px) translateY(-3px) scale(0.94); z-index: 4; opacity: 0.92; }
    .shelf-cig-carton-d3 { transform: translateZ(0px) translateY(-6px) scale(0.88); z-index: 3; opacity: 0.86; }
    .shelf-cig-carton-d4 { transform: translateZ(-8px) translateY(-9px) scale(0.82); z-index: 2; opacity: 0.78; }
    .shelf-cig-carton-flap {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 14%;
      background: linear-gradient(180deg, #fdba74, #f97316);
      border-radius: 3px 3px 0 0;
      border: 1px solid rgba(154, 52, 18, 0.3);
      z-index: 2;
    }
    .shelf-cig-carton-side {
      position: absolute;
      top: 12%;
      right: -4%;
      width: 8%;
      height: 78%;
      background: linear-gradient(90deg, #ea580c, #c2410c);
      transform: skewY(-2deg);
      border-radius: 0 2px 2px 0;
      z-index: 0;
      opacity: 0.7;
    }
    .shelf-cig-carton-face {
      position: absolute;
      top: 12%;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(180deg, #fed7aa 0%, #fdba74 40%, #ea580c 100%);
      border: 1px solid rgba(154, 52, 18, 0.35);
      border-radius: 0 0 6px 6px;
      overflow: hidden;
      box-shadow: inset 0 -4px 8px rgba(0,0,0,0.08);
    }
    .shelf-cig-carton-brand {
      position: absolute;
      top: 35%;
      left: 15%;
      right: 15%;
      height: 28%;
      background: linear-gradient(180deg, #fff7ed, #ffedd5);
      border: 1px solid rgba(180, 83, 9, 0.25);
      border-radius: 2px;
    }
    .shelf-cig-wall .shelf-cig-row {
      position: absolute;
      bottom: 28%;
      left: 20%;
      right: 20%;
      display: flex;
      justify-content: center;
      gap: 2px;
      height: 38%;
      align-items: flex-end;
      z-index: 3;
    }
    .shelf-cig-wall .shelf-cig-stick.up { height: 90%; }
    .shelf-cig-gap {
      position: absolute;
      inset: 20% 15%;
      border: 1px dashed rgba(180, 83, 9, 0.35);
      border-radius: 4px;
    }
    .shelf-cigarette.shelf-empty .shelf-cig-carton { filter: grayscale(0.7); opacity: 0.55; }
    .shelf-viz-lg.shelf-cooler,
    .shelf-viz-lg.shelf-cig-wall { width: 3.85rem; height: 4.35rem; }
    .shelf-viz-sm.shelf-cooler,
    .shelf-viz-sm.shelf-cig-wall { width: 2.85rem; height: 3.25rem; }
    .dshelf-rack-cooler {
      background:
        linear-gradient(180deg, #94a3b8 0%, #94a3b8 5px, transparent 5px),
        linear-gradient(180deg, #cbd5e1 5px, #e2e8f0 8px, #f0f9ff 8px, #f8fafc 100%) !important;
      border-color: #bae6fd !important;
      box-shadow: inset 0 0 18px rgba(186,230,253,0.35), 0 6px 16px rgba(148,163,184,0.14) !important;
    }
    .dshelf-rack-cooler::before {
      background: linear-gradient(90deg, #64748b, #e2e8f0 40%, #64748b) !important;
    }
    .dshelf-rack-cooler .dshelf-slot:not(.dshelf-slot-tobacco) {
      background: linear-gradient(180deg, #fff 0%, #f8fafc 100%) !important;
      border-color: #bae6fd !important;
      box-shadow: 0 2px 8px rgba(14,165,233,0.08), inset 0 0 0 1px rgba(255,255,255,0.9) !important;
    }
    .dshelf-rack-cooler .dshelf-slot:not(.dshelf-slot-tobacco) .dshelf-slot-name { color: #0f172a; }
    .dshelf-rack-cooler .dshelf-slot:not(.dshelf-slot-tobacco) .dshelf-slot-meta { color: #64748b; }
    .dshelf-rack-cooler .product-shelf-combo-dshelf .combo-viz .shelf-viz-lg {
      width: 3.85rem;
      height: 4.35rem;
    }
    .dshelf-rack-tobacco {
      background:
        linear-gradient(180deg, #78350f 0%, #78350f 5px, transparent 5px),
        linear-gradient(180deg, #92400e 5px, #b45309 8px, #fffbeb 8px, #fef3c7 100%) !important;
      border-color: #d97706 !important;
    }
    .dshelf-rack-tobacco .dshelf-slot {
      background: linear-gradient(180deg, #fffbeb, #fff) !important;
      border-color: #fde68a !important;
    }
    .dshelf-slot.dshelf-slot-cooler {
      background: linear-gradient(180deg, #fff 0%, #f0f9ff 100%) !important;
      border-color: #7dd3fc !important;
      box-shadow: 0 2px 8px rgba(14,165,233,0.1), inset 0 0 0 1px rgba(255,255,255,0.95) !important;
    }
    .dshelf-slot.dshelf-slot-cooler .dshelf-slot-name { color: #0f172a; }
    .dshelf-slot.dshelf-slot-cooler .dshelf-slot-meta { color: #64748b; }
    .dshelf-slot.dshelf-slot-cooler .dshelf-stock-qty { color: #0369a1; }
    .dshelf-slot.dshelf-slot-cooler .dshelf-pick-hint { color: #ea580c; }
    .dshelf-slot.dshelf-slot-tobacco {
      background: linear-gradient(180deg, #fffbeb, #fff) !important;
      border-color: #fde68a !important;
    }
    .dshelf-slot.dshelf-slot-tobacco .dshelf-slot-name { color: #1c1917; }
    .dshelf-slot.dshelf-slot-tobacco .dshelf-stock-qty { color: #57534e; }
    .dshelf-rack-cooler .dshelf-slot.dshelf-slot-tobacco .dshelf-stock-bar,
    .dshelf-rack-tobacco .dshelf-slot.dshelf-slot-tobacco .dshelf-stock-bar { background: #e7e5e4; }
    .shelf-cig-carton .shelf-cig-carton-face { background: linear-gradient(145deg, #fef3c7, #fde68a); }
    .shelf-cig-carton .shelf-cig-carton-brand { background: linear-gradient(90deg, #92400e, #b45309); }

    /* Nicotine pouches — round ZYN / Velo tins */
    .shelf-pouch {
      border: none;
      background: transparent;
      overflow: visible;
    }
    .shelf-pouch-stage {
      position: relative;
      width: 100%;
      height: 100%;
      display: flex;
      align-items: flex-end;
      justify-content: center;
      transform-style: preserve-3d;
      perspective: 140px;
    }
    .shelf-pouch-tin {
      position: absolute;
      bottom: 6%;
      width: 52%;
      height: 78%;
      transform: translateZ(var(--tin-z, 0)) scale(var(--tin-scale, 1));
      transform-origin: bottom center;
    }
    .shelf-pouch-tin-d1 { left: 50%; transform: translateX(-52%) translateZ(var(--tin-z, 8px)) scale(var(--tin-scale, 1)); z-index: 3; }
    .shelf-pouch-tin-d2 { left: 28%; transform: translateX(-50%) translateZ(var(--tin-z, 0)) scale(var(--tin-scale, 0.88)); z-index: 2; }
    .shelf-pouch-tin-d3 { left: 72%; transform: translateX(-50%) translateZ(var(--tin-z, -4px)) scale(0.82); z-index: 1; opacity: 0.82; }
    .shelf-pouch-lite .shelf-pouch-tin-d3 { display: none; }
    .shelf-pouch-lid {
      position: absolute;
      top: 0;
      left: 8%;
      right: 8%;
      height: 18%;
      border-radius: 50%;
      background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 55%, #cbd5e1 100%);
      border: 1px solid rgba(100, 116, 139, 0.45);
      box-shadow: 0 2px 4px rgba(0,0,0,0.12);
      z-index: 4;
    }
    .shelf-pouch-lid-ring {
      position: absolute;
      inset: 22%;
      border-radius: 50%;
      border: 1.5px solid rgba(148, 163, 184, 0.55);
    }
    .shelf-pouch-can {
      position: absolute;
      top: 14%;
      left: 4%;
      right: 4%;
      bottom: 0;
      border-radius: 42% 42% 38% 38% / 18% 18% 72% 72%;
      overflow: hidden;
      background: linear-gradient(90deg, #dbeafe 0%, #f8fafc 28%, #eff6ff 55%, #bfdbfe 100%);
      border: 1.5px solid rgba(37, 99, 235, 0.35);
      box-shadow: inset -3px 0 6px rgba(0,0,0,0.06), 0 4px 10px rgba(15,23,42,0.14);
    }
    .shelf-pouch-band {
      position: absolute;
      top: 28%;
      left: 0;
      right: 0;
      height: 34%;
      background: linear-gradient(180deg, #1d4ed8, #1e3a8a);
      z-index: 2;
    }
    .shelf-pouch-band::after {
      content: '';
      position: absolute;
      top: 30%;
      left: 18%;
      right: 18%;
      height: 28%;
      border-radius: 2px;
      background: rgba(255,255,255,0.85);
    }
    .shelf-pouch-pouches {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: calc(var(--tin-fill, 50) * 0.38%);
      min-height: 8%;
      background: linear-gradient(180deg, #fef9c3, #fde68a);
      z-index: 1;
      transition: height 0.3s ease;
    }
    .shelf-pouch-empty {
      width: 46%;
      height: 70%;
      border: 1.5px dashed rgba(37, 99, 235, 0.35);
      border-radius: 40%;
      margin-bottom: 8%;
    }
    .shelf-pouch.shelf-empty .shelf-pouch-can { filter: grayscale(0.65); opacity: 0.6; }
    .shelf-pouch.shelf-low .shelf-pouch-pouches { background: linear-gradient(180deg, #fef3c7, #fbbf24); }
    .shelf-viz-lg.shelf-pouch { width: 3.5rem; height: 3.9rem; }
    .shelf-viz-sm.shelf-pouch { width: 2.75rem; height: 3.1rem; }

    /* Planogram lite — fast grid, still realistic */
    .shelf-cooler-frame-lite {
      position: relative;
      width: 100%;
      height: 100%;
      border-radius: 0.5rem;
      overflow: hidden;
      border: 1.5px solid #cbd5e1;
      background:
        linear-gradient(125deg, rgba(255,255,255,0.75) 0%, rgba(186,230,253,0.35) 45%, rgba(255,255,255,0.25) 100%),
        linear-gradient(180deg, #f1f5f9 0%, #f8fafc 40%, #e0f2fe 100%);
      box-shadow: inset 0 0 10px rgba(186,230,253,0.4), 0 2px 5px rgba(15,23,42,0.06);
    }
    .shelf-cooler-frame-lite::before {
      content: '';
      position: absolute;
      top: 5%;
      left: 8%;
      right: 8%;
      height: 2px;
      background: linear-gradient(90deg, transparent, #fff 25%, #fff 75%, transparent);
      border-radius: 2px;
      z-index: 4;
      box-shadow: 0 0 6px rgba(255,255,255,0.8);
    }
    .shelf-cooler-frame-lite::after {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: 16%;
      background: linear-gradient(180deg, transparent, #e2e8f0);
      z-index: 1;
      pointer-events: none;
    }
    .shelf-bottle-row-lite {
      position: absolute;
      left: 10%;
      right: 12%;
      bottom: 14%;
      height: 72%;
      transform-style: preserve-3d;
      perspective: 120px;
      z-index: 2;
    }
    .shelf-bottle-lite-d1 { left: 54%; transform: translateX(-58%) translateZ(10px) scale(1); z-index: 3; }
    .shelf-bottle-lite-d2 { left: 30%; transform: translateX(-50%) translateZ(2px) scale(0.9); z-index: 2; opacity: 0.9; }
    .shelf-cig-wall-lite .shelf-cig-carton-d3,
    .shelf-cig-wall-lite .shelf-cig-carton-d4 { display: none; }
    .shelf-viz-lg.shelf-cooler-lite,
    .shelf-viz-lg.shelf-cig-wall-lite { width: 3.5rem; height: 3.9rem; }

    /* Modern digital shelving — light, walk-the-aisle */
    .dshelf-modern .dshelf-shell { background: #fafafa; }
    .dshelf-modern .dshelf-header {
      background: rgba(255,255,255,0.92);
      backdrop-filter: blur(10px);
      border-color: #e4e4e7;
    }
    .dshelf-modern .dshelf-toolbar {
      display: grid;
      grid-template-columns: 1fr;
      gap: 0.55rem;
      align-items: stretch;
      background: #fff;
      border-color: #f4f4f5;
    }
    @media (min-width: 40rem) {
      .dshelf-modern .dshelf-toolbar {
        grid-template-columns: minmax(12rem, 1fr) auto;
        align-items: center;
        gap: 0.75rem;
      }
    }
    .dshelf-toolbar-filters {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem 0.65rem;
    }
    .dshelf-filter-vendor {
      flex: 1 1 9.5rem;
      min-width: 9.5rem;
      max-width: 100%;
    }
    .dshelf-low-toggle {
      min-height: 2.5rem;
      padding: 0.35rem 0.5rem;
      border-radius: 0.75rem;
      background: #fafafa;
      border: 1px solid #e4e4e7;
    }
    .dshelf-search { box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
    .dshelf-search:focus { outline: none; border-color: #fdba74; box-shadow: 0 0 0 3px rgba(251,146,60,0.15); }
    .dshelf-aisle-nav {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      row-gap: 0.45rem;
      background: #fff;
    }
    .dshelf-aisle-chip {
      flex: 0 0 auto;
      border: 1px solid #e4e4e7;
      background: #fafafa;
      color: #52525b;
      font-size: 0.7rem;
      font-weight: 800;
      padding: 0.5rem 0.95rem;
      min-height: 2.25rem;
      border-radius: 999px;
      touch-action: manipulation;
      transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    }
    .dshelf-aisle-chip-movers {
      border-color: #fdba74;
      background: linear-gradient(145deg, #fff7ed, #ffedd5);
      color: #c2410c;
    }
    .dshelf-aisle-chip-movers.dshelf-aisle-chip-on {
      border-color: #f97316;
      background: linear-gradient(145deg, #ffedd5, #fed7aa);
      color: #9a3412;
    }
    .dshelf-chip-count {
      font-size: 0.58rem;
      font-weight: 900;
      margin-left: 0.2rem;
      opacity: 0.9;
    }
    .dshelf-aisle-chip-on {
      background: #fff7ed;
      border-color: #fdba74;
      color: #c2410c;
      box-shadow: 0 1px 4px rgba(249,115,22,0.12);
    }
    .dshelf-modern .dshelf-body {
      background:
        linear-gradient(180deg, #f4f4f5 0%, #fafafa 8%, #f4f4f5 100%);
      perspective: none;
    }
    .dshelf-modern .dshelf-body::before {
      content: '';
      display: block;
      height: 3px;
      margin: -0.75rem -1rem 0.85rem;
      background: repeating-linear-gradient(90deg, #d4d4d8 0, #d4d4d8 12px, #fafafa 12px, #fafafa 24px);
      opacity: 0.55;
    }
    .dshelf-modern .dshelf-aisle { margin-bottom: 1.35rem; }
    .dshelf-modern .dshelf-aisle-label {
      font-size: 0.68rem;
      color: #3f3f46;
      letter-spacing: 0.08em;
    }
    .dshelf-modern .dshelf-rack {
      grid-template-columns: repeat(auto-fill, minmax(7.75rem, 1fr));
      gap: 0.6rem;
      padding: 0.85rem 0.65rem 0.7rem;
      border-radius: 1.1rem;
      box-shadow: inset 0 -6px 12px rgba(0,0,0,0.03), 0 6px 18px rgba(15,23,42,0.08);
    }
    .dshelf-modern .dshelf-slot {
      border-radius: 0.85rem;
      box-shadow: 0 2px 8px rgba(15,23,42,0.06);
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .dshelf-modern .dshelf-slot:hover { transform: translateY(-2px); }
    .dshelf-modern .dshelf-slot-active,
    .dshelf-modern .dshelf-slot-picked {
      transform: translateY(-6px) scale(1.03);
      box-shadow: 0 0 0 2px #f97316, 0 12px 24px rgba(249,115,22,0.18);
      rotate: none;
    }
    .dshelf-modern .dshelf-slot-needs.dshelf-slot-empty,
    .dshelf-modern .dshelf-slot-needs.dshelf-slot-low {
      animation: none;
      box-shadow: 0 0 0 1px #fecaca, 0 2px 8px rgba(239,68,68,0.1);
    }
    .dshelf-modern .dshelf-pick-hint,
    .dshelf-modern .dshelf-sub-chip,
    .dshelf-modern .dshelf-slot-status,
    .dshelf-modern .dshelf-slot-meta { display: none; }
    .dshelf-modern .dshelf-slot:not(.dshelf-slot-active):not(.dshelf-slot-picked) .combo-viz-float {
      animation: none;
    }
    .dshelf-modern .dshelf-slot-tap { padding: 0.45rem 0.3rem 0.35rem; }
    .dshelf-modern .dshelf-slot-visual { min-height: 3.85rem; margin-bottom: 0.2rem; }
    .dshelf-modern .product-shelf-combo-dshelf .combo-viz .shelf-viz-lg {
      width: 3.5rem;
      height: 3.9rem;
    }
    .dshelf-stock-wrap {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      margin-top: 0.15rem;
      padding: 0 0.15rem;
    }
    .dshelf-stock-bar {
      flex: 1;
      height: 4px;
      border-radius: 999px;
      background: #e4e4e7;
      overflow: hidden;
    }
    .dshelf-stock-fill {
      height: 100%;
      border-radius: 999px;
      transition: width 0.3s ease;
    }
    .dshelf-stock-ok { background: linear-gradient(90deg, #34d399, #10b981); }
    .dshelf-stock-warn { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
    .dshelf-stock-low { background: linear-gradient(90deg, #fb7185, #ef4444); }
    .dshelf-stock-empty { background: #fca5a5; width: 8% !important; }
    .dshelf-stock-qty {
      font-size: 0.45rem;
      font-weight: 800;
      color: #71717a;
      white-space: nowrap;
    }
    .dshelf-modern .dshelf-slot-actions {
      border-top-color: rgba(0,0,0,0.06);
    }
    .dshelf-modern .dshelf-act {
      background: transparent;
      font-size: 1rem;
      color: #52525b;
      padding: 0.45rem 0;
      min-height: 2.35rem;
    }
    .dshelf-modern .dshelf-rack-cooler .dshelf-slot:not(.dshelf-slot-tobacco) .dshelf-stock-bar,
    .dshelf-modern .dshelf-slot-cooler .dshelf-stock-bar { background: #e2e8f0; }
    .dshelf-spotlight {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      margin: -0.15rem 0 0.75rem;
      padding-bottom: 0.35rem;
    }
    .dshelf-spotlight-stage {
      position: relative;
      z-index: 2;
      filter: drop-shadow(0 10px 18px rgba(15,23,42,0.15));
      animation: dshelf-spotlight-in 0.32s cubic-bezier(0.34, 1.2, 0.64, 1);
    }
    @keyframes dshelf-spotlight-in {
      from { transform: translateY(12px) scale(0.94); opacity: 0.5; }
      to { transform: translateY(0) scale(1); opacity: 1; }
    }
    .dshelf-spotlight-lip {
      width: 72%;
      height: 6px;
      margin-top: -2px;
      border-radius: 0 0 8px 8px;
      background: linear-gradient(180deg, #d6d3d1, #a8a29e);
      box-shadow: 0 3px 8px rgba(0,0,0,0.12);
    }
    .dshelf-spotlight-photo {
      width: 5rem;
      height: 5rem;
      border-radius: 1rem;
      overflow: hidden;
      border: 2px solid #fff;
      background: #fff;
    }
    .dshelf-spotlight-photo-img { width: 100%; height: 100%; object-fit: contain; display: block; }
    .dshelf-spotlight-viz .shelf-viz-lg { width: 4.25rem; height: 4.75rem; }
    .dshelf-spotlight-price {
      position: absolute;
      top: -0.25rem;
      right: -0.5rem;
      font-size: 0.65rem;
      font-weight: 900;
      color: #14532d;
      background: #fff;
      border: 1.5px solid #86efac;
      border-radius: 0.45rem;
      padding: 0.15rem 0.45rem;
      transform: rotate(6deg);
      box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    }
    .dshelf-modern .dshelf-detail {
      border-top-color: #e4e4e7;
      background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
    }
    @media (prefers-reduced-motion: reduce) {
      .dshelf-modern .dshelf-slot-picking,
      .dshelf-spotlight-stage,
      .dshelf-detail-open { animation: none !important; }
      .dshelf-modern .dshelf-slot:hover,
      .dshelf-modern .dshelf-slot-active { transform: none; }
    }

    .shelf-wine { background: linear-gradient(165deg, #faf5ff, #f3e8ff); }
    .shelf-wine-neck {
      position: absolute; top: 8%; left: 50%; transform: translateX(-50%);
      width: 16%; height: 22%; background: #581c87; border-radius: 3px 3px 0 0; opacity: 0.85;
    }
    .shelf-wine-body {
      position: absolute; bottom: 12%; left: 26%; right: 26%; height: 58%;
      border: 2px solid rgba(88, 28, 135, 0.45); border-radius: 4px 4px 10px 10px;
      overflow: hidden; background: rgba(255,255,255,0.25);
    }
    .shelf-wine-fill {
      position: absolute; left: 0; right: 0; bottom: 0;
      height: calc(var(--fill-pct, 50) * 1%);
      background: linear-gradient(180deg, #a855f7, #6b21a8);
      transition: height 0.35s ease;
    }
    .shelf-wine.shelf-low .shelf-wine-fill { animation: shelf-wine-pulse 2s ease-in-out infinite; }
    .shelf-jar { background: linear-gradient(165deg, #eff6ff, #dbeafe); }
    .shelf-jar-lid {
      position: absolute; top: 14%; left: 28%; right: 28%; height: 10%;
      background: #64748b; border-radius: 3px;
    }
    .shelf-jar-body {
      position: absolute; bottom: 14%; left: 24%; right: 24%; height: 56%;
      border: 2px solid rgba(37, 99, 235, 0.35); border-radius: 6px 6px 10px 10px;
      overflow: hidden; background: rgba(255,255,255,0.45);
    }
    .shelf-jar-fill {
      position: absolute; left: 0; right: 0; bottom: 0;
      height: calc(var(--fill-pct, 50) * 1%);
      background: linear-gradient(180deg, #60a5fa, #2563eb);
      transition: height 0.35s ease;
    }
    .shelf-gauge { flex-direction: column; gap: 3px; padding: 4px; }
    .shelf-gauge-track {
      width: 70%; height: 62%; border-radius: 6px; background: #e4e4e7;
      overflow: hidden; display: flex; align-items: flex-end;
    }
    .shelf-gauge-fill {
      width: 100%;
      height: calc(var(--fill-pct, 50) * 1%);
      background: linear-gradient(180deg, #34d399, #059669);
      transition: height 0.35s ease;
    }
    .shelf-gauge.shelf-low .shelf-gauge-fill,
    .shelf-gauge.shelf-empty .shelf-gauge-fill { background: linear-gradient(180deg, #fbbf24, #ef4444); }
    .shelf-gauge-num { font-size: 9px; font-weight: 800; color: #52525b; line-height: 1; }
    .shelf-pulse-urgent { border-color: #fca5a5 !important; background: linear-gradient(180deg, #fff1f2, #fff) !important; }
    @keyframes shelf-beer-slosh {
      0%, 100% { transform: skewX(0deg); }
      50% { transform: skewX(-3deg); }
    }
    @keyframes shelf-beer-drip {
      0%, 100% { opacity: 0.3; transform: translateY(0); }
      50% { opacity: 1; transform: translateY(2px); }
    }
    @keyframes shelf-ember-glow {
      0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
      50% { opacity: 0.75; transform: translateX(-50%) scale(0.85); }
    }
    @keyframes shelf-ember-die {
      0%, 100% { opacity: 0.85; }
      40% { opacity: 0.25; }
      60% { opacity: 0.7; }
    }
    @keyframes shelf-wine-pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.72; }
    }
    @keyframes shelf-pulse-nudge {
      0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
      50% { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18); }
    }
    @media (prefers-reduced-motion: reduce) {
      .shelf-beer.shelf-low .shelf-beer-liquid,
      .shelf-cig-ember-lit, .shelf-cig-ember-flicker,
      .shelf-wine.shelf-low .shelf-wine-fill,
      .shelf-pulse-urgent, .shelf-beer-drip { animation: none !important; }
    }
    .photo-tag-pick-active, .photo-tag-filter-active { border-color: #ec4899 !important; background: #fce7f3 !important; color: #9d174d !important; box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.25); }
    .photo-memory-tile { transition: transform 0.12s ease, box-shadow 0.12s ease; }
    .photo-memory-tile:active { transform: scale(0.98); }
    .photo-memory-tile-new { animation: photo-pop 0.45s ease; }
    @keyframes photo-pop {
      0% { transform: scale(0.92); opacity: 0.5; }
      100% { transform: scale(1); opacity: 1; }
    }
    #onboarding-modal .ob-progress { height: 4px; background: #e4e4e7; border-radius: 999px; overflow: hidden; }
    #onboarding-modal .ob-progress-fill { height: 100%; background: linear-gradient(90deg, #059669, #34d399); transition: width 0.25s; }
    #command-palette-modal input:focus { outline: 2px solid #059669; }
    #feature-browser-tab {
      position: fixed;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
      z-index: 360;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.15rem;
      padding: 0.65rem 0.4rem 0.65rem 0.55rem;
      border: 1px solid #047857;
      border-right: 0;
      border-radius: 14px 0 0 14px;
      background: linear-gradient(155deg, #34d399 0%, #10b981 45%, #047857 100%);
      color: #fff;
      font-size: 0.625rem;
      font-weight: 800;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      box-shadow: -4px 0 16px rgba(4, 120, 87, 0.28);
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
      transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    #feature-browser-tab:active { transform: translateY(-50%) scale(0.96); }
    #feature-browser-tab .fbt-icon { font-size: 1.125rem; line-height: 1; }
    body.feature-browser-open #feature-browser-tab { opacity: 0; pointer-events: none; }
    body.guest-mode #feature-browser-tab,
    body.auth-booting:not(.guest-mode) #feature-browser-tab { display: none !important; }
    #feature-browser-backdrop {
      position: fixed;
      inset: 0;
      z-index: 370;
      background: rgba(15, 23, 42, 0.45);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
    }
    #feature-browser-backdrop.is-open { opacity: 1; pointer-events: auto; }
    #feature-browser-drawer {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      width: min(22.5rem, 94vw);
      z-index: 380;
      background: #fff;
      border-left: 1px solid rgba(15, 23, 42, 0.08);
      box-shadow: -12px 0 40px rgba(15, 23, 42, 0.14);
      display: flex;
      flex-direction: column;
      transform: translateX(100%);
      transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1);
      padding-top: env(safe-area-inset-top, 0px);
      padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    #feature-browser-drawer.is-open { transform: translateX(0); }
    .fb-drawer-head {
      flex-shrink: 0;
      padding: 0.85rem 1rem 0.65rem;
      border-bottom: 1px solid #f4f4f5;
      background: linear-gradient(180deg, #ecfdf5, #fff 70%);
    }
    .fb-drawer-title { font-size: 1rem; font-weight: 800; color: #18181b; letter-spacing: -0.02em; }
    .fb-drawer-sub { font-size: 0.6875rem; color: #71717a; margin-top: 0.15rem; }
    .fb-search {
      width: 100%;
      margin-top: 0.65rem;
      padding: 0.6rem 0.75rem;
      border: 1px solid #e4e4e7;
      border-radius: 0.85rem;
      font-size: 16px; /* iOS: <16px focus zooms page and can stick */
      background: #fff;
    }
    .fb-search:focus { outline: 2px solid #059669; border-color: #6ee7b7; }

/* ── Phone: prevent iOS search-focus zoom trap ── */
@media (max-width: 768px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]),
  select,
  textarea {
    font-size: 16px !important;
  }
  /* Allow pinch recovery if zoom ever happens */
  html, body {
    touch-action: pan-x pan-y pinch-zoom;
  }
}
    .fb-drawer-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 0.5rem 0.75rem 1rem; }
    .fb-section { margin-bottom: 0.75rem; }
    .fb-section-title {
      font-size: 0.625rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: #a1a1aa;
      padding: 0.35rem 0.35rem 0.25rem;
    }
    .fb-item {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      width: 100%;
      text-align: left;
      padding: 0.6rem 0.65rem;
      border: 1px solid #f4f4f5;
      border-radius: 0.85rem;
      background: #fff;
      margin-bottom: 0.35rem;
      touch-action: manipulation;
      transition: background 0.12s ease, border-color 0.12s ease;
    }
    .fb-item:active { background: #ecfdf5; border-color: #a7f3d0; }
    .fb-item-icon { font-size: 1.25rem; line-height: 1; flex-shrink: 0; width: 1.75rem; text-align: center; }
    .fb-item-copy { flex: 1; min-width: 0; }
    .fb-item-label { font-size: 0.8125rem; font-weight: 700; color: #18181b; }
    .fb-item-desc { font-size: 0.625rem; color: #71717a; margin-top: 0.1rem; line-height: 1.35; }
    .fb-item-lock { font-size: 0.5625rem; font-weight: 700; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 999px; padding: 0.1rem 0.4rem; flex-shrink: 0; }
    .fb-empty { padding: 2rem 1rem; text-align: center; font-size: 0.8125rem; color: #71717a; }
    html.dark #feature-browser-drawer { background: #0f172a; border-color: rgba(255,255,255,0.08); }
    html.dark .fb-drawer-head { background: linear-gradient(180deg, #064e3b, #0f172a 70%); border-color: rgba(255,255,255,0.08); }
    html.dark .fb-drawer-title { color: #f4f4f5; }
    html.dark .fb-item { background: #1e293b; border-color: rgba(255,255,255,0.08); }
    html.dark .fb-item-label { color: #f4f4f5; }
    html.dark #feature-browser-tab { background: linear-gradient(180deg, #064e3b, #1e293b); color: #6ee7b7; border-color: rgba(110,231,183,0.3); }
    html.dark .insight-tile { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); }
    body.has-bottom-nav { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
    /*
     * v1379: REAL edge TOOLS (#shift-dock-launch) on phone + desktop.
     * Legacy #feature-browser-tab stays hidden (duplicate).
     */
    @media (max-width: 640px) {
      body.has-bottom-nav #feature-browser-tab,
      html body #feature-browser-tab {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
      }
    }
    /* Desktop + phone: force real Shift Dock pill visible when signed in */
    @media (min-width: 641px) {
      html body.app-home-ready:not(.guest-mode):not(.money-panel-open):not(.feature-browser-open) #shift-dock-launch,
      html body.has-shift-dock:not(.guest-mode):not(.money-panel-open):not(.feature-browser-open) #shift-dock-launch,
      html body:not(.guest-mode):not(.auth-booting):not(.auth-focus):not(.money-panel-open):not(.feature-browser-open) .shift-dock-launch {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: fixed !important;
        right: 0 !important;
        left: auto !important;
        top: 50% !important;
        bottom: auto !important;
        transform: translateY(-50%) !important;
        z-index: 360 !important;
        flex-direction: column !important;
        width: 2.75rem !important;
        min-height: 4.5rem !important;
        border-radius: 1rem 0 0 1rem !important;
      }
      body.has-bottom-nav #feature-browser-tab {
        display: none !important;
      }
    }
    .home-quick-chip {
      display: inline-flex; align-items: center; gap: 0.25rem;
      padding: 0.45rem 0.7rem; border-radius: 999px; font-size: 0.6875rem; font-weight: 700;
      border: 1px solid #d4d4d8; background: #fff; color: #3f3f46;
      touch-action: manipulation; cursor: pointer;
    }
    .home-quick-chip:active { transform: scale(0.97); background: #f4f4f5; }
    .home-quick-chip-emerald { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
    .home-quick-chip-violet { border-color: #ddd6fe; background: #f5f3ff; color: #6d28d9; }
    .home-quick-chip-sky { border-color: #bae6fd; background: #f0f9ff; color: #0369a1; }

    /* ── MR Pro UI system (v330) ── */
    .mr-eyebrow {
      font-size: var(--mr-eyebrow);
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--mr-accent);
    }
    .mr-section-title {
      font-size: 0.9375rem;
      font-weight: 700;
      letter-spacing: -0.02em;
      color: var(--mr-ink);
      line-height: 1.25;
    }
    .mr-section-sub {
      font-size: var(--mr-caption);
      color: var(--mr-muted);
      line-height: 1.45;
      margin-top: 0.2rem;
    }
    .mr-field,
    .ms-field,
    #form-fields input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    #form-fields select,
    #form-fields textarea,
    #auth-form-fields input:not([type="checkbox"]):not([type="hidden"]),
    #auth-form-fields select,
    .form-fields-grid input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    .form-fields-grid select,
    .form-fields-grid textarea {
      width: 100%;
      border: 1px solid var(--mr-line);
      border-radius: var(--mr-radius);
      padding: 0.55rem 0.75rem;
      font-size: var(--mr-body);
      background: var(--mr-surface);
      color: var(--mr-ink);
      transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }
    @media (max-width: 768px) {
      .mr-field,
      .ms-field,
      #form-fields input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
      #form-fields select,
      #form-fields textarea,
      #auth-form-fields input:not([type="checkbox"]):not([type="hidden"]),
      #auth-form-fields select,
      .form-fields-grid input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
      .form-fields-grid select,
      .form-fields-grid textarea {
        font-size: 16px !important; /* iOS focus zoom trap */
      }
    }
    .mr-field:focus,
    .ms-field:focus,
    #form-fields input:focus,
    #form-fields select:focus,
    #form-fields textarea:focus,
    .form-fields-grid input:focus,
    .form-fields-grid select:focus,
    .form-fields-grid textarea:focus {
      outline: none;
      border-color: rgba(5, 150, 105, 0.45);
      box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
    }

    #home-insights.mr-pro-insights > .card:not(#guest-auth-shell):not(#workspace-boot-overlay):not(#app-loading-shell),
    #home-insights.mr-pro-insights > .grid .card {
      background: var(--mr-surface) !important;
      border-color: var(--mr-line-soft) !important;
      border-radius: var(--mr-radius-lg) !important;
      box-shadow: var(--mr-shadow) !important;
    }
    #home-trust-bar.mr-pro-trust {
      background: linear-gradient(135deg, #f0f9ff 0%, #fff 70%) !important;
      border-color: rgba(14, 165, 233, 0.14) !important;
      border-radius: var(--mr-radius) !important;
    }
    #home-dashboard-status.brain-strip,
    #home-dashboard-status.home-dashboard-hub {
      border-radius: var(--mr-radius-lg) !important;
      box-shadow: var(--mr-shadow), 0 0 0 1px rgba(16, 185, 129, 0.06) !important;
    }
    .qi-live-card {
      border-radius: var(--mr-radius-xl) !important;
      border-color: var(--mr-line-soft) !important;
      background: var(--mr-surface) !important;
      box-shadow: var(--mr-shadow-lg) !important;
    }
    .insight-mood-banner {
      border-radius: var(--mr-radius) !important;
    }
    .qi-panel {
      border-radius: var(--mr-radius) !important;
      border-color: var(--mr-line-soft) !important;
      background: var(--mr-surface-muted) !important;
    }
    .qi-kpi {
      border-radius: var(--mr-radius) !important;
      background: var(--mr-surface) !important;
      border-color: var(--mr-line-soft) !important;
    }

    #section-quick-add.mr-pro-quick-add {
      border-radius: var(--mr-radius-xl);
      padding: 1.15rem 1.25rem !important;
      box-shadow: var(--mr-shadow-lg);
    }
    #section-quick-add.mr-pro-quick-add .quick-date-pill {
      background: var(--mr-surface);
      border: 1px solid var(--mr-line);
      border-radius: var(--mr-radius);
      padding: 0.4rem 0.75rem;
    }
    #section-quick-add.mr-pro-quick-add .quick-btn {
      border-radius: var(--mr-radius-lg) !important;
      font-weight: 700 !important;
      letter-spacing: -0.01em;
      box-shadow: var(--mr-shadow-sm) !important;
      border: 1px solid var(--mr-line-soft) !important;
      background: var(--mr-surface) !important;
      color: var(--mr-ink) !important;
    }
    #section-quick-add.mr-pro-quick-add .quick-btn .quick-btn-icon {
      filter: none;
      font-size: 1.5rem;
    }
    #section-quick-add.mr-pro-quick-add .quick-btn > div:last-child {
      color: var(--mr-muted) !important;
      font-weight: 500 !important;
      opacity: 1 !important;
    }
    #section-quick-add.mr-pro-quick-add .quick-btn[data-type="daily_sale"] {
      background: linear-gradient(165deg, #10b981 0%, #047857 100%) !important;
      color: #fff !important;
      border: none !important;
      box-shadow: 0 6px 18px rgba(5, 150, 105, 0.28) !important;
    }
    #section-quick-add.mr-pro-quick-add .quick-btn[data-type="daily_sale"] > div:last-child { color: rgba(255,255,255,0.85) !important; }
    #section-quick-add.mr-pro-quick-add .quick-btn[data-type="purchase"] { border-color: rgba(234, 88, 12, 0.18) !important; }
    #section-quick-add.mr-pro-quick-add .quick-btn[data-type="expense"] { border-color: rgba(239, 68, 68, 0.18) !important; }
    #section-quick-add.mr-pro-quick-add .quick-btn[data-type="cash_drop"] { border-color: rgba(20, 184, 166, 0.2) !important; }
    #section-quick-add.mr-pro-quick-add .quick-btn.quick-btn-reports {
      background: linear-gradient(165deg, #6366f1 0%, #4f46e5 100%) !important;
      color: #fff !important;
      border: none !important;
      box-shadow: 0 6px 18px rgba(79, 70, 229, 0.22) !important;
    }
    #section-quick-add.mr-pro-quick-add .quick-btn.quick-btn-reports > div:last-child { color: rgba(255,255,255,0.85) !important; }
    #section-quick-add.mr-pro-quick-add #btn-quick-more-toggle {
      font-size: var(--mr-caption);
      font-weight: 700;
      color: var(--mr-muted);
      border-color: var(--mr-line);
      border-radius: var(--mr-radius);
      background: var(--mr-surface-muted);
    }
    #section-quick-add.mr-pro-quick-add #add-form {
      border-top-color: var(--mr-line-soft) !important;
    }
    #section-quick-add.mr-pro-quick-add #btn-save-entry {
      border-radius: var(--mr-radius);
      font-weight: 700;
      box-shadow: 0 4px 12px rgba(5, 150, 105, 0.22);
    }
    #section-quick-add.mr-pro-quick-add #btn-cancel-form {
      border-radius: var(--mr-radius);
      font-weight: 600;
      color: var(--mr-muted);
    }

    #tools-hub.mr-pro-tools {
      border-radius: var(--mr-radius-xl);
      box-shadow: var(--mr-shadow);
    }
    #tools-hub.mr-pro-tools .tools-hub-head {
      border-radius: var(--mr-radius);
      border: 1px solid var(--mr-line-soft);
      background: var(--mr-surface);
      transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }
    #tools-hub.mr-pro-tools .tools-hub-head.is-open {
      border-color: rgba(99, 102, 241, 0.2);
      box-shadow: var(--mr-shadow-sm);
    }
    #tools-hub.mr-pro-tools .tools-hub-body .nav-tool {
      background: var(--mr-surface) !important;
      border: 1px solid var(--mr-line) !important;
      color: var(--mr-ink) !important;
      border-radius: var(--mr-radius) !important;
      font-weight: 600 !important;
      font-size: var(--mr-caption) !important;
      box-shadow: none !important;
    }
    #tools-hub.mr-pro-tools .tools-hub-body .nav-tool:hover {
      border-color: rgba(5, 150, 105, 0.28) !important;
      background: var(--mr-accent-soft) !important;
      color: #047857 !important;
      transform: translateY(-1px);
    }
    #tools-hub.mr-pro-tools .tools-hub-body .nav-tool-primary,
    #tools-hub.mr-pro-tools #btn-power-pl,
    #tools-hub.mr-pro-tools #btn-power-reconcile {
      background: linear-gradient(165deg, #059669, #047857) !important;
      border-color: transparent !important;
      color: #fff !important;
      box-shadow: 0 3px 10px rgba(5, 150, 105, 0.22) !important;
    }
    #tools-hub.mr-pro-tools #btn-power-reconcile {
      background: linear-gradient(165deg, #7c3aed, #6d28d9) !important;
      box-shadow: 0 3px 10px rgba(109, 40, 217, 0.2) !important;
    }

    #section-ledger-metrics.mr-pro-ledger {
      border-radius: var(--mr-radius-xl);
    }
    #section-ledger-metrics .ledger-kpi {
      border-radius: var(--mr-radius) !important;
      border: 1px solid var(--mr-line-soft) !important;
      background: var(--mr-surface) !important;
    }
    #section-ledger-table.mr-pro-ledger {
      border-radius: var(--mr-radius-xl);
      overflow: hidden;
      box-shadow: var(--mr-shadow);
    }
    #section-ledger-table.mr-pro-ledger .ledger-preset {
      border-radius: 9999px;
      font-weight: 700;
      font-size: var(--mr-caption);
    }
    #section-ledger-table.mr-pro-ledger #search-input {
      border-radius: var(--mr-radius);
      border-color: var(--mr-line);
    }
    #section-ledger-table .txn-row {
      transition: background 0.1s ease;
    }
    #section-ledger-table .txn-row:hover {
      background: var(--mr-accent-soft);
    }

    [id$="-modal"] {
      backdrop-filter: blur(3px);
      -webkit-backdrop-filter: blur(3px);
    }
    [id$="-modal"] > .bg-white.rounded-3xl,
    [id$="-modal"] > .bg-white.rounded-2xl,
    [id$="-modal"] > div.rounded-3xl.bg-white,
    .manage-stores-panel {
      border: 1px solid var(--mr-line-soft) !important;
      box-shadow: var(--mr-shadow-lg) !important;
    }

    #bottom-nav {
      background: rgba(255, 255, 255, 0.97) !important;
      border-top-color: var(--mr-line-soft) !important;
      box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.06);
      z-index: 250 !important;
      pointer-events: auto !important;
    }
    body.mr-mobile-lite #bottom-nav {
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
      background: #ffffff !important;
    }
    .bnav-btn {
      font-weight: 600;
      font-size: 0.625rem;
      letter-spacing: 0.01em;
    }
    .bnav-btn-active {
      font-weight: 800;
      box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.12);
    }

    .home-quick-chip {
      font-size: var(--mr-caption);
      padding: 0.5rem 0.85rem;
      border-color: var(--mr-line);
      box-shadow: var(--mr-shadow-sm);
      transition: transform 0.12s ease, box-shadow 0.12s ease;
    }
    .home-quick-chip:hover { box-shadow: var(--mr-shadow); }
    .home-more-insights-btn {
      border: 1px solid var(--mr-line);
      border-radius: 9999px;
      padding: 0.45rem 1rem;
      background: var(--mr-surface);
      box-shadow: var(--mr-shadow-sm);
    }

    .app-header {
      box-shadow: 0 1px 0 var(--mr-line-soft);
    }
    .store-dock-curve-shell {
      box-shadow: var(--mr-shadow);
      border-color: rgba(16, 185, 129, 0.18) !important;
    }
    .store-slide-chip {
      font-weight: 600;
      letter-spacing: -0.01em;
    }
    .store-slide-chip.active {
      box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
    }

    html.dark body {
      background: linear-gradient(165deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
      color: #e4e4e7;
    }
    html.dark .card, html.dark .metrics-card {
      background: #1e293b;
      border-color: rgba(255, 255, 255, 0.08);
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 30px rgba(0, 0, 0, 0.25);
    }
    html.dark .app-header {
      background: rgba(15, 23, 42, 0.92);
      border-bottom-color: rgba(255, 255, 255, 0.08);
    }
    html.dark .store-hero { background: transparent; border: none; }
    html.dark .store-dock-curve-shell {
      background: linear-gradient(135deg, #1e293b 0%, #134e4a 100%);
      border-color: rgba(52, 211, 153, 0.25);
      box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
    }
    html.dark .store-slide-chip {
      background: rgba(30, 41, 59, 0.85);
      border-color: rgba(255, 255, 255, 0.1);
      color: #e4e4e7;
    }
    html.dark .store-slide-chip.active {
      background: linear-gradient(135deg, #059669 0%, #047857 100%);
      color: #fff;
    }
    html.dark .store-slide-nav,
    html.dark .store-slide-manage {
      background: rgba(30, 41, 59, 0.9);
      border-color: rgba(52, 211, 153, 0.25);
      color: #6ee7b7;
    }

    html.dark .net-hero-positive { background: linear-gradient(135deg, #064e3b 0%, #1e293b 60%); }
    html.dark .net-hero-negative { background: linear-gradient(135deg, #7f1d1d 0%, #1e293b 60%); }
    html.dark .txn-row:nth-child(even) { background: rgba(30, 41, 59, 0.5); }
    html.dark #bottom-nav {
      background: rgba(15, 23, 42, 0.94);
      border-top-color: rgba(255, 255, 255, 0.08);
    }
    html.dark .bnav-btn { color: #a1a1aa; }
    html.dark .bnav-btn-active { color: #34d399; }
    html.dark .today-card-ok { background: linear-gradient(135deg, #064e3b 0%, #1e293b 70%); }
    html.dark .today-card-miss { background: linear-gradient(135deg, #78350f 0%, #1e293b 70%); }
    html.dark .health-bar { background: #334155; }
    html.dark .nav-tool { background: #1e293b; border-color: rgba(255,255,255,0.1); color: #e4e4e7; }
    html.dark .ledger-preset:not(.bg-white) { color: #a1a1aa; }
    html.dark .bg-zinc-50, html.dark .bg-zinc-100 { background-color: #334155 !important; }
    html.dark .border-zinc-200, html.dark .border-zinc-300 { border-color: rgba(255,255,255,0.12) !important; }
    html.dark .text-zinc-900 { color: #f4f4f5 !important; }
    html.dark .text-zinc-800 { color: #e4e4e7 !important; }
    html.dark .text-zinc-600, html.dark .text-zinc-500 { color: #a1a1aa !important; }
    html.dark input, html.dark select, html.dark textarea {
      background: #0f172a;
      border-color: rgba(255,255,255,0.15);
      color: #f4f4f5;
    }
    html.dark table thead { background: #1e293b !important; }
    html.dark .bg-white { background-color: #1e293b !important; }

/* ── CSTORE AI OS — v4 chat + scroll perfect ── */
body.cstore-os-open {
  overflow: hidden !important;
}
body.cstore-os-open .app-header,
body.cstore-os-open .store-hero,
body.cstore-os-open #bottom-nav,
body.cstore-os-open #feature-browser-tab,
body.cstore-os-open #btn-cstore-os-fab {
  visibility: hidden !important;
  pointer-events: none !important;
}

#cstore-os-modal.cstore-os-modal,
#cstore-os-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 500 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.75rem !important;
  margin: 0;
  box-sizing: border-box;
}
#cstore-os-modal:not(.hidden) {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
@media (min-width: 640px) {
  #cstore-os-modal:not(.hidden) {
    padding: 1.25rem !important;
  }
}

.cstore-os-scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Sheet: desktop card · mobile full-screen sheet (same family as lottery hub) */
.cstore-os-sheet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 36rem);
  max-width: min(96vw, 36rem);
  margin: auto;
  height: min(92dvh, 900px);
  max-height: min(92dvh, 900px);
  min-height: min(88dvh, 620px);
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid #e0e7ff;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  overflow: hidden;
}
@media (min-width: 900px) {
  .cstore-os-sheet {
    width: min(100%, 42rem);
    max-width: 42rem;
    height: min(90vh, 920px);
    max-height: min(90vh, 920px);
    min-height: 40rem;
  }
}
@media (max-width: 768px) {
  #cstore-os-modal:not(.hidden) {
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 !important;
  }
  .cstore-os-sheet {
    width: 100% !important;
    max-width: 100% !important;
    height: min(96dvh, 100%) !important;
    max-height: min(96dvh, 100%) !important;
    min-height: min(92dvh, 100%) !important;
    border-radius: 1.15rem 1.15rem 0 0 !important;
    margin: 0 !important;
    border-left: none;
    border-right: none;
    border-bottom: none;
    box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.28);
  }
  .cstore-os-grab { display: block !important; }
}

.cstore-os-grab {
  display: none;
  flex-shrink: 0;
  width: 2.5rem;
  height: 0.28rem;
  margin: 0.4rem auto 0;
  border-radius: 999px;
  background: #d4d4d8;
}
@media (max-width: 639px) {
  .cstore-os-grab { display: block; }
}

/* Header never grows */
.cstore-os-head {
  flex: 0 0 auto;
  padding: 0.55rem 0.9rem 0.5rem;
  background: linear-gradient(180deg, #eef2ff 0%, #fff 92%);
  border-bottom: 1px solid #e0e7ff;
  min-height: 0;
}
.cstore-os-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}
.cstore-os-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #1e1b4b;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.cstore-os-sub {
  font-size: 0.65rem;
  color: #4f46e5;
  margin-top: 0.1rem;
  opacity: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 14rem;
}
.cstore-os-head-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.cstore-os-icon-btn,
.cstore-os-close-btn {
  border: 1px solid #e4e4e7;
  background: #fff;
  border-radius: 0.7rem;
  font-weight: 700;
  color: #3f3f46;
  min-height: 2.1rem;
  cursor: pointer;
}
.cstore-os-icon-btn { width: 2.1rem; font-size: 0.85rem; }
.cstore-os-close-btn { padding: 0 0.7rem; font-size: 0.72rem; }

.cstore-os-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.cstore-os-kpi {
  border-radius: 0.75rem;
  border: 1px solid #e4e4e7;
  background: #fff;
  padding: 0.4rem 0.3rem;
  text-align: center;
  min-width: 0;
  min-height: 2.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.cstore-os-kpi-l {
  font-size: 0.55rem;
  font-weight: 800;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cstore-os-kpi-v {
  font-size: 0.78rem;
  font-weight: 800;
  color: #18181b;
  margin-top: 0.1rem;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cstore-os-kpi-ok { border-color: #86efac; background: #f0fdf4; }
.cstore-os-kpi-ok .cstore-os-kpi-v { color: #047857; }
.cstore-os-kpi-warn { border-color: #fcd34d; background: #fffbeb; }
.cstore-os-kpi-warn .cstore-os-kpi-v { color: #b45309; }
.cstore-os-kpi-bad { border-color: #fca5a5; background: #fef2f2; }
.cstore-os-kpi-bad .cstore-os-kpi-v { color: #b91c1c; }
.cstore-os-kpi-idle { border-color: #e4e4e7; background: #fafafa; }

.cstore-os-pillars {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  margin-top: 0.5rem;
  padding-bottom: 0.1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cstore-os-pillars::-webkit-scrollbar { display: none; }
.cstore-os-pillar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
  background: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  color: #3730a3;
  white-space: nowrap;
  cursor: pointer;
}
.cstore-os-pillar:hover { background: #e0e7ff; }

.cstore-os-status {
  margin-top: 0.45rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.65rem;
  line-height: 1.3;
  color: #52525b;
  background: #f4f4f5;
  border-radius: 0.55rem;
}

/* ── Store brain layout (v12 clean) ── */
.cstore-os-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}

/* Priority actions: 2 compact rows, scroll if more */
.cstore-os-actions-wrap {
  flex: 0 0 auto;
  max-height: 5.75rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.3rem 0.75rem 0.35rem;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}
.cstore-os-section-label,
.cstore-os-chat-label {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a1a1aa;
  margin-bottom: 0.3rem;
}
.cstore-os-actions,
.cstore-os-actions-more {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.cstore-os-action {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  text-align: left;
  padding: 0.3rem 0.5rem;
  border-radius: 0.6rem;
  border: 1px solid #e4e4e7;
  background: #fafafa;
  font-size: 0.7rem;
  font-weight: 650;
  color: #18181b;
  min-height: 1.9rem;
  cursor: pointer;
}
.cstore-os-action-ico { flex-shrink: 0; font-size: 0.9rem; }
.cstore-os-action-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cstore-os-action-warn { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.cstore-os-action-ok { border-color: #bbf7d0; background: #ecfdf5; color: #065f46; }
.cstore-os-action-neutral { border-color: #e4e4e7; background: #fff; }
.cstore-os-empty-actions {
  font-size: 0.72rem;
  color: #71717a;
  padding: 0.2rem 0;
}
.cstore-os-more-btn {
  width: 100%;
  margin-top: 0.2rem;
  padding: 0.25rem;
  border: none;
  background: transparent;
  color: #4f46e5;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}
.cstore-os-actions-more.hidden { display: none !important; }

.cstore-os-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem 0.15rem;
  flex: 0 0 auto;
  background: #f8fafc;
}
.cstore-os-chat-label {
  padding: 0 !important;
  margin: 0 !important;
}
.cstore-os-chat-clear {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

/* Chat scroll pane — simple block, no flex children sizing games */
.cstore-os-chat {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0.5rem 0.85rem 1.25rem;
  display: block;
  background: #f8fafc;
}
.cstore-os-chat > .cstore-os-row {
  margin-bottom: 0.7rem;
  clear: both;
}
.cstore-os-chat > .cstore-os-row:last-child {
  margin-bottom: 0.35rem;
}

/* Message rows */
.cstore-os-row {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  width: 100%;
  box-sizing: border-box;
  animation: cstoreMsgIn 0.2s ease-out;
}
@keyframes cstoreMsgIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.cstore-os-row-user {
  flex-direction: row;
  justify-content: flex-end;
}
.cstore-os-row-bot {
  flex-direction: row;
  justify-content: flex-start;
}

/* Column = bubble stack. NO width:fit-content (that made "low stock" a tall stick) */
.cstore-os-col {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  max-width: 78%;
}
.cstore-os-row-user .cstore-os-col {
  align-items: flex-end;
  max-width: 72%;
}
.cstore-os-row-bot .cstore-os-col {
  align-items: flex-start;
  max-width: 88%;
}

.cstore-os-avatar {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  background: linear-gradient(145deg, #4f46e5, #2563eb);
  color: #fff;
}
.cstore-os-avatar-user {
  background: linear-gradient(145deg, #64748b, #334155);
}
.cstore-os-meta {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0 0.15rem;
}
.cstore-os-meta-name {
  font-size: 0.6rem;
  font-weight: 800;
  color: #475569;
}
.cstore-os-meta-time {
  font-size: 0.55rem;
  font-weight: 600;
  color: #94a3b8;
}

/*
 * Bubbles: inline-block + max-width only.
 * Never width:fit-content / min-content — that breaks multi-word user text into a column.
 */
.cstore-os-bubble {
  display: inline-block;
  box-sizing: border-box;
  max-width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 1rem;
  line-height: 1.4;
  font-size: 0.8125rem;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.cstore-os-bubble,
.cstore-os-msg-body,
.cstore-os-bot-html {
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.4;
}
.cstore-os-bot {
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 0.3rem;
}
.cstore-os-user {
  background: linear-gradient(145deg, #4f46e5, #4338ca);
  color: #fff;
  border: 1px solid #3730a3;
  border-bottom-right-radius: 0.3rem;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.22);
}
.cstore-os-user .cstore-msg-p {
  color: #fff;
  margin: 0;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}
.cstore-os-user .cstore-msg-money,
.cstore-os-user .cstore-msg-pct {
  color: #e0e7ff;
  background: rgba(255, 255, 255, 0.12);
}

/* Structured bot content */
.cstore-msg-body { min-width: 0; }
.cstore-msg-p {
  margin: 0 0 0.4rem;
  color: #1e293b;
  font-size: 0.8rem;
  line-height: 1.45;
}
.cstore-msg-p:last-child { margin-bottom: 0; }
.cstore-msg-section {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4f46e5;
  margin: 0.15rem 0 0.4rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #e0e7ff;
}
.cstore-msg-list {
  list-style: none;
  margin: 0.15rem 0 0.35rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.cstore-msg-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.4;
}
.cstore-msg-bullet {
  flex-shrink: 0;
  width: 0.4rem;
  height: 0.4rem;
  margin-top: 0.4rem;
  border-radius: 999px;
  background: linear-gradient(145deg, #6366f1, #22c55e);
}
.cstore-msg-money {
  display: inline-block;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 0.35rem;
  padding: 0 0.28rem;
  font-size: 0.78rem;
}
.cstore-msg-pct {
  font-weight: 800;
  color: #4338ca;
  font-variant-numeric: tabular-nums;
}
.cstore-msg-strong { font-weight: 800; color: #0f172a; }
.cstore-msg-ok { color: #047857; font-weight: 700; }
.cstore-msg-warn { color: #c2410c; font-weight: 700; }

/* Soft action chips under bot reply */
.cstore-msg-softs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
}
.cstore-msg-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.68rem;
  font-weight: 750;
  cursor: pointer;
  line-height: 1.2;
}
.cstore-msg-soft:active { background: #c7d2fe; transform: scale(0.98); }

/* Typing indicator */
.cstore-os-typing {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 3.2rem;
  padding: 0.7rem 0.95rem !important;
}
.cstore-dot {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: #818cf8;
  animation: cstoreDot 1.1s ease-in-out infinite;
}
.cstore-dot:nth-child(2) { animation-delay: 0.15s; }
.cstore-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes cstoreDot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* Welcome brain board (empty chat) */
.cstore-brain-welcome {
  border-radius: 1.1rem;
  border: 1px solid #c7d2fe;
  background: linear-gradient(160deg, #eef2ff 0%, #fff 42%, #ecfdf5 100%);
  padding: 0.85rem 0.9rem 0.95rem;
  box-shadow: 0 10px 32px rgba(79, 70, 229, 0.08);
}
.cstore-brain-welcome-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}
.cstore-brain-avatar {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(145deg, #4f46e5, #0ea5e9);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  flex-shrink: 0;
}
.cstore-brain-welcome-title {
  font-size: 0.92rem;
  font-weight: 850;
  color: #1e1b4b;
  letter-spacing: -0.02em;
}
.cstore-brain-welcome-sub {
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 0.1rem;
  line-height: 1.3;
}
.cstore-brain-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}
@media (min-width: 400px) {
  .cstore-brain-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.cstore-brain-tile {
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.45rem 0.5rem;
  min-width: 0;
}
.cstore-brain-tile-ok { border-color: #a7f3d0; background: #f0fdf4; }
.cstore-brain-tile-warn { border-color: #fde68a; background: #fffbeb; }
.cstore-brain-tile-bad { border-color: #fecaca; background: #fef2f2; }
.cstore-brain-tile-idle { border-color: #e4e4e7; background: #fafafa; }
.cstore-brain-tile-ico { font-size: 0.85rem; line-height: 1; margin-bottom: 0.15rem; }
.cstore-brain-tile-lab {
  font-size: 0.58rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}
.cstore-brain-tile-val {
  font-size: 0.78rem;
  font-weight: 850;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  margin-top: 0.08rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cstore-brain-digest {
  border-radius: 0.75rem;
  border: 1px solid #e0e7ff;
  background: rgba(255, 255, 255, 0.85);
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.5rem;
}
.cstore-brain-digest-label {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6366f1;
  margin-bottom: 0.35rem;
}
.cstore-brain-hint {
  font-size: 0.62rem;
  color: #94a3b8;
  line-height: 1.35;
}

.cstore-os-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}
.cstore-os-send-ico {
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
}
@media (max-width: 380px) {
  .cstore-os-send-txt { display: none; }
  .cstore-os-send { min-width: 2.75rem; padding: 0 0.65rem; }
}

/* Footer always pinned */
.cstore-os-foot {
  flex: 0 0 auto;
  padding: 0.5rem 0.85rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e4e4e7;
  background: #fff;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.04);
}
.cstore-os-chips {
  display: flex;
  gap: 0.3rem;
  overflow-x: auto;
  margin-bottom: 0.45rem;
  scrollbar-width: none;
}
.cstore-os-chips::-webkit-scrollbar { display: none; }
.cstore-os-chip {
  flex: 0 0 auto;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  font-size: 0.65rem;
  font-weight: 700;
  color: #3730a3;
  white-space: nowrap;
  cursor: pointer;
}
.cstore-os-chip:active { background: #c7d2fe; }
.cstore-os-form {
  display: flex;
  gap: 0.45rem;
  align-items: stretch;
}
.cstore-os-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 2px solid #c7d2fe;
  border-radius: 0.85rem;
  padding: 0.6rem 0.75rem;
  outline: none;
  color: #18181b;
  background: #fff;
}
.cstore-os-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.cstore-os-send {
  flex: 0 0 auto;
  min-width: 4.5rem;
  padding: 0 1rem;
  border: none;
  border-radius: 0.85rem;
  background: #4f46e5;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.cstore-os-send:active { background: #4338ca; }

/* AI OS float — right edge, directly BELOW Tools tab on phone */
#btn-cstore-os-fab {
  position: fixed !important;
  left: auto !important;
  right: 0 !important;
  /* Tools sits at ~10.5rem; AI sits just under it (~6.5rem from bottom nav top) */
  bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 95;
  min-height: 2.6rem;
  min-width: 2.6rem;
  padding: 0.5rem 0.55rem 0.5rem 0.65rem;
  border-radius: 12px 0 0 12px;
  border: 1px solid #a5b4fc;
  border-right: none;
  background: linear-gradient(180deg, #4f46e5, #2563eb);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: -4px 0 18px rgba(79, 70, 229, 0.22);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  line-height: 1.1;
}
/* Free tier: AI FAB stays sticky right (under Tools) with Pro pill — never hide / never reflow */
#btn-cstore-os-fab.feature-locked,
#btn-cstore-os-fab[aria-disabled="true"] {
  display: inline-flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
  opacity: 0.95 !important;
  position: fixed !important;
  left: auto !important;
  right: 0 !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  cursor: pointer !important;
  filter: none !important;
}
#btn-cstore-os-fab .cstore-fab-pro,
#btn-cstore-os-fab .feature-pro-badge {
  position: absolute !important;
  top: -0.35rem !important;
  left: -0.15rem !important;
  right: auto !important;
  font-size: 0.5rem !important;
  padding: 0.08rem 0.32rem !important;
  z-index: 2;
}
body.app-hydrated:not(.guest-mode):not(.app-boot-pending) #btn-cstore-os-fab {
  display: inline-flex;
}
/* Only hide if explicitly marked hidden (legacy) */
#btn-cstore-os-fab.mr-pro-fab-hidden {
  display: none !important;
}
/* Match Tools tab shape on phone with bottom nav */
body.has-bottom-nav #btn-cstore-os-fab {
  right: 0;
  bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
  border-radius: 12px 0 0 12px;
  border-right: none;
  padding: 0.5rem 0.45rem 0.5rem 0.55rem;
}
/* Desktop: AI below Tools mid-stack on right */
@media (min-width: 640px) {
  #btn-cstore-os-fab,
  body.has-bottom-nav #btn-cstore-os-fab {
    right: 0;
    top: calc(50% + 3.25rem);
    bottom: auto;
    transform: none;
    border-radius: 14px 0 0 14px;
    padding: 0.55rem 0.4rem 0.55rem 0.55rem;
    min-height: auto;
  }
}
body.feature-browser-open #btn-cstore-os-fab { opacity: 0; pointer-events: none; }
body.has-bottom-nav .mrstore-sale-remind-banner {
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
}

/* Daily sale reminder banner (employees + owner) */
.mrstore-sale-remind-banner {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  z-index: 450;
  display: none;
  pointer-events: none;
}
.mrstore-sale-remind-banner.is-open {
  display: block;
  pointer-events: auto;
  animation: saleRemindIn 0.28s ease-out;
}
@media (min-width: 640px) {
  .mrstore-sale-remind-banner {
    left: auto;
    right: 1.25rem;
    bottom: 1.25rem;
    max-width: 22rem;
  }
}
@keyframes saleRemindIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.mrstore-sale-remind-inner {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px solid #c7d2fe;
  background: linear-gradient(135deg, #eef2ff, #fff);
  box-shadow: 0 12px 40px rgba(79, 70, 229, 0.2);
}
.mrstore-sale-remind-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.75rem;
  color: #312e81;
  line-height: 1.35;
}
.mrstore-sale-remind-copy strong {
  font-size: 0.85rem;
  color: #1e1b4b;
}
.mrstore-sale-remind-actions {
  display: flex;
  gap: 0.4rem;
}
.mrstore-sale-remind-actions #sale-remind-log-btn {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 0.75rem;
  background: #4f46e5;
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
}
.mrstore-sale-remind-actions #sale-remind-dismiss-btn {
  padding: 0.55rem 0.75rem;
  border: 1px solid #e4e4e7;
  border-radius: 0.75rem;
  background: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  color: #52525b;
}
body.cstore-os-open .mrstore-sale-remind-banner { display: none !important; }

/* ── Clean home (v428) — less wall of insights ── */
body.home-clean #home-insights {
  gap: 0.55rem;
}
/* Compact close-out card */
.tonight-head-compact {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.tonight-head-compact .tonight-eyebrow {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #059669;
}
.tonight-head-compact .tonight-title {
  font-size: 1rem;
  font-weight: 800;
  color: #14532d;
  letter-spacing: -0.02em;
  margin-top: 0.1rem;
}
.tonight-head-compact .tonight-sub { display: none !important; }
.tonight-steps-compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}
.tonight-steps-compact .tonight-step {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.45rem 0.25rem;
  gap: 0.25rem;
}
.tonight-steps-compact .tonight-step-meta { display: none; }
.tonight-steps-compact .tonight-step-label {
  font-size: 0.7rem;
  font-weight: 700;
}
.tonight-actions-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.tonight-actions-compact .tonight-btn {
  flex: 1 1 auto;
  min-width: 5.5rem;
  justify-content: center;
  padding: 0.5rem 0.65rem;
  font-size: 0.75rem;
}
/* Quieter trust strip when clean */
body.home-clean #home-trust-bar.home-trust-compact {
  padding: 0.45rem 0.75rem;
}
body.home-clean #home-trust-bar.home-trust-compact .flex.flex-col,
body.home-clean #home-trust-bar.home-trust-compact .sm\:flex-row {
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem;
}
body.home-clean #home-trust-bar.home-trust-compact #btn-home-trust-export {
  display: none;
}
body.home-clean #home-trust-bar.home-trust-compact .flex.flex-wrap {
  font-size: 0.65rem;
  opacity: 0.85;
}
/* Hide long brain essay strips under clean mode if status is huge */
body.home-clean #home-dashboard-status .brain-strip-sub {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.home-clean #home-dashboard-status .brain-pillar-detail {
  display: none;
}
/* More insights control — calm, not another big card */
#home-more-insights-bar .home-more-insights-btn {
  border-style: solid !important;
  border-color: #e4e4e7 !important;
  background: #fafafa !important;
  color: #52525b;
  padding: 0.55rem 0.75rem !important;
}
body.home-clean #home-more-insights-bar .home-more-insights-previews span {
  background: #fff;
  color: #a1a1aa;
  border-color: #f4f4f5;
}
/* Phone: keep breathing room (no !important padding wars) */
@media (max-width: 640px) {
  body.home-clean #home-insights { gap: 0.55rem; }
  body.home-clean #home-tonight-strip { padding: 0.8rem 0.85rem; }
  body.home-clean #home-pos-parallel { padding: 0.8rem 0.85rem; }
  body.home-clean #home-store-pulse:not(.hidden) { padding: 0.8rem 0.85rem; }
}

/* Strict Today / clean home: never flash secondary insight cards before JS parks them */
/* v868: expanded Today allowlist — team desk features must stay visible */
body.mr-strict-today.home-clean #home-insights > [id^="home-"]:not(#home-live-strip):not(#home-dashboard-status):not(#home-store-pulse):not(#home-tonight-strip):not(#home-stock-road):not(#home-sell-actions):not(#home-strict-urgent):not(#home-all-stores-analytics):not(#home-team-chat):not(#home-team-chat-owner):not(#home-shift-note):not(#home-shift-tasks):not(#home-staff-adoption):not(#home-employee-panel):not(#home-employee-entries):not(#home-connections):not(#home-pos-parallel):not(#workspace-boot-overlay):not(#app-loading-shell):not(#guest-auth-shell):not(#home-guest-welcome) {
  display: none !important;
}
/* v883: do NOT force display:block on home cards — that flattens flex layouts.
   JS allowlist removes .hidden; cards keep their natural display (block/flex).
   Only restore visibility/pointer if a prior overlay left them muted. */
html body.app-home-ready.app-owner-session.mr-strict-today.home-clean #home-insights > #home-store-pulse:not(.hidden),
html body.app-home-ready.app-owner-session.mr-strict-today.home-clean #home-insights > #home-stock-road:not(.hidden),
html body.app-home-ready.app-owner-session.mr-strict-today.home-clean #home-insights > #home-team-chat-owner:not(.hidden),
html body.app-home-ready.app-owner-session.mr-strict-today.home-clean #home-insights > #home-team-chat:not(.hidden),
html body.app-home-ready.app-owner-session.mr-strict-today.home-clean #home-insights > #home-shift-note:not(.hidden),
html body.app-home-ready.app-owner-session.mr-strict-today.home-clean #home-insights > #home-shift-tasks:not(.hidden),
html body.app-home-ready.app-owner-session.mr-strict-today.home-clean #home-insights > #home-staff-adoption:not(.hidden),
html body.app-home-ready.app-owner-session.mr-strict-today.home-clean #home-insights > #home-live-strip:not(.hidden),
html body.app-home-ready.app-owner-session.mr-strict-today.home-clean #home-insights > #home-tonight-strip:not(.hidden),
html body.app-home-ready.app-owner-session.mr-strict-today.home-clean #home-insights > #home-sell-actions:not(.hidden),
html body.app-home-ready.app-owner-session.mr-strict-today.home-clean #home-insights > #home-dashboard-status:not(.hidden) {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
/* v1398: Owner desk rail is not id^=home- but must never be blanked */
html body.app-home-ready:not(.guest-mode) #owner-os-rail,
html body.app-home-ready.floor-os-owner #owner-os-rail,
html body.app-home-ready.home-clean #owner-os-rail,
html body.app-owner-session #home-insights > #owner-os-rail {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  height: auto !important;
  max-height: none !important;
  margin: 0.1rem 0 0.2rem !important;
  order: -100 !important;
  flex: 0 0 auto !important;
  position: relative !important;
  top: auto !important;
  transform: none !important;
}

/* v1402: Owner desk kicker + Today/Money always visible */
html body.app-home-ready:not(.guest-mode) #owner-os-rail .owner-os-kicker,
html body.app-owner-session #owner-os-rail .owner-os-kicker {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 0 0.4rem !important;
}
html body.app-home-ready:not(.guest-mode) #owner-os-rail {
  overflow: visible !important;
  margin: 0.2rem 0 0.3rem !important;
}
/* v1398: force core Today panels visible when painted (remove mute) */
html body.app-home-ready:not(.guest-mode) #home-insights {
  display: flex !important;
  flex-direction: column !important;
  visibility: visible !important;
  opacity: 1 !important;
}
html body.app-home-ready:not(.guest-mode) #home-insights > #home-store-pulse:not(.hidden),
html body.app-home-ready:not(.guest-mode) #home-insights > #home-dashboard-status:not(.hidden),
html body.app-home-ready:not(.guest-mode) #home-insights > #home-live-strip:not(.hidden),
html body.app-home-ready:not(.guest-mode) #home-insights > #home-tonight-strip:not(.hidden),
html body.app-home-ready:not(.guest-mode) #home-insights > #home-stock-road:not(.hidden) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  pointer-events: auto !important;
}
html body.app-home-ready.app-employee-session.mr-strict-today.home-clean #home-insights > #home-employee-panel:not(.hidden),
html body.app-home-ready.app-employee-session.mr-strict-today.home-clean #home-insights > #home-team-chat:not(.hidden),
html body.app-home-ready.app-employee-session.mr-strict-today.home-clean #home-insights > #home-stock-road:not(.hidden),
html body.app-home-ready.app-employee-session.mr-strict-today.home-clean #home-insights > #home-shift-tasks:not(.hidden) {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* ── v430 Close Day + POS parallel + store health ── */
.tonight-pos-line {
  margin-top: 0.28rem;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.3;
  color: #64748b;
}
.tonight-pos-line.is-ok { color: #047857; }
.tonight-pos-line.is-warn { color: #b45309; }
.tonight-pos-line.is-miss { color: #c2410c; }
.tonight-pos-line.is-idle { color: #94a3b8; }
.tonight-badge-ok {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

#home-pos-parallel .pos-par-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}
#home-pos-parallel .pos-par-eyebrow {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4338ca;
}
#home-pos-parallel .pos-par-title {
  font-size: 1rem;
  font-weight: 800;
  color: #1e1b4b;
  letter-spacing: -0.02em;
  margin-top: 0.1rem;
}
#home-pos-parallel .pos-par-sub {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.2rem;
  line-height: 1.35;
}
.pos-par-stage {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
  white-space: nowrap;
}
.pos-par-stage-manual { background: #f4f4f5; border-color: #e4e4e7; color: #52525b; }
.pos-par-stage-parallel { background: #e0e7ff; border-color: #a5b4fc; color: #3730a3; }
.pos-par-stage-dependent { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }
.pos-par-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}
.pos-par-rail-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.4rem 0.2rem;
  border-radius: 0.75rem;
  border: 1px solid #e4e4e7;
  background: #fafafa;
  opacity: 0.55;
}
.pos-par-rail-step.is-on { opacity: 1; border-color: #c7d2fe; background: #f8fafc; }
.pos-par-rail-step.is-now { border-color: #818cf8; background: #eef2ff; box-shadow: 0 0 0 1px rgba(99,102,241,0.15); }
.pos-par-rail-dot {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  background: #e4e4e7;
  color: #3f3f46;
}
.pos-par-rail-step.is-on .pos-par-rail-dot { background: #4f46e5; color: #fff; }
.pos-par-rail-lbl {
  font-size: 0.58rem;
  font-weight: 700;
  text-align: center;
  color: #52525b;
  line-height: 1.2;
}
.pos-par-match {
  border-radius: 0.85rem;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.55rem;
  border: 1px solid #e4e4e7;
  background: #fff;
}
.pos-par-match-unlinked { border-color: #e4e4e7; background: #fafafa; }
.pos-par-match-missing { border-color: #fdba74; background: #fff7ed; }
.pos-par-match-manual { border-color: #bae6fd; background: #f0f9ff; }
.pos-par-match-pos { border-color: #6ee7b7; background: #ecfdf5; }
.pos-par-match-label { font-size: 0.78rem; font-weight: 800; color: #18181b; }
.pos-par-match-detail { font-size: 0.68rem; color: #64748b; margin-top: 0.15rem; line-height: 1.35; }
.pos-par-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pos-par-btn {
  flex: 1 1 auto;
  min-width: 5.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.85rem;
  border: 1px solid #e4e4e7;
  background: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  color: #3f3f46;
  text-align: center;
}
.pos-par-btn-primary {
  background: #4f46e5;
  border-color: #4338ca;
  color: #fff;
}
.pos-par-btn:active { transform: scale(0.98); }
.pos-par-foot {
  margin-top: 0.55rem;
  font-size: 0.62rem;
  color: #94a3b8;
  line-height: 1.35;
}

/* Portfolio store health chips */
.store-health-strip {
  border-radius: 1rem;
  border: 1px solid #c7d2fe;
  background: linear-gradient(135deg, #eef2ff 0%, #fff 55%, #ecfdf5 100%);
  padding: 0.75rem 0.85rem;
}
.store-health-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.store-health-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #e4e4e7;
  background: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  color: #27272a;
}
.store-health-chip.health-green { border-color: #6ee7b7; background: #ecfdf5; }
.store-health-chip.health-yellow { border-color: #fcd34d; background: #fffbeb; }
.store-health-chip.health-red { border-color: #fca5a5; background: #fef2f2; }
.store-health-dot,
.store-health-dot-inline {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #a1a1aa;
  flex-shrink: 0;
}
.store-health-chip.health-green .store-health-dot,
.store-health-dot-inline.health-green { background: #10b981; }
.store-health-chip.health-yellow .store-health-dot,
.store-health-dot-inline.health-yellow { background: #f59e0b; }
.store-health-chip.health-red .store-health-dot,
.store-health-dot-inline.health-red { background: #ef4444; }
.store-health-name { max-width: 5.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-health-pos { font-size: 0.7rem; line-height: 1; }

/* ── Live strip v454 — local-only “alive” (no heavy API) ── */
#home-live-strip {
  padding: 0.95rem 1.15rem 1rem !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 18px rgba(15, 23, 42, 0.04) !important;
  border: 1px solid #e4e4e7 !important;
  border-radius: 1.15rem !important;
  box-sizing: border-box !important;
  background: #fff !important;
}
#home-live-strip.live-urgent {
  border-color: #fdba74 !important;
  box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.25);
}
#home-live-strip.live-just-updated {
  animation: live-flash 1.8s ease-out;
}
@keyframes live-flash {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  40% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.12); }
  100% { box-shadow: 0 1px 0 rgba(16, 185, 129, 0.08); }
}
.live-strip-inner { padding: 0; box-sizing: border-box; }
.live-strip-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  flex-shrink: 0;
}
.live-badge-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: live-dot-pulse 1.6s ease-in-out infinite;
}
@keyframes live-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); opacity: 1; }
  50% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); opacity: 0.85; }
}
.live-strip-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  line-height: 1.15;
}
.live-store-name {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #18181b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-asof {
  font-size: 0.625rem;
  color: #71717a;
  font-weight: 600;
}
.live-close-chip {
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.3rem 0.55rem;
  border: 1px solid #d4d4d8;
  background: #fafafa;
  color: #3f3f46;
  max-width: 12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.live-close-ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}
.live-close-warn {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
  animation: live-chip-glow 2s ease-in-out infinite;
}
.live-close-hot {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
  animation: live-chip-glow 1.2s ease-in-out infinite;
}
@keyframes live-chip-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.06); }
}
.live-led-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}
.live-led {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.625rem;
  font-weight: 700;
  color: #52525b;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  border-radius: 999px;
  padding: 0.2rem 0.45rem 0.2rem 0.35rem;
  max-width: 100%;
}
.live-led-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: #a1a1aa;
  flex-shrink: 0;
}
.live-led-on {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.live-led-on .live-led-dot {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}
.live-led-soft {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}
.live-led-soft .live-led-dot {
  background: #3b82f6;
}
.live-led-idle {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.live-led-idle .live-led-dot {
  background: #f59e0b;
}
.live-led-off .live-led-dot {
  background: #d4d4d8;
}
.live-led-lbl {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 7.5rem;
}
.live-activity-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding-top: 0.35rem;
  border-top: 1px dashed #e4e4e7;
}
.live-activity-pulse {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: #34d399;
  flex-shrink: 0;
  animation: live-dot-pulse 2s ease-in-out infinite;
}
.live-activity-text {
  flex: 1;
  min-width: 0;
  font-size: 0.6875rem;
  color: #52525b;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-act-btn {
  font-size: 0.625rem;
  font-weight: 800;
  padding: 0.28rem 0.5rem;
  border-radius: 0.65rem;
  border: 1px solid #e4e4e7;
  background: #fff;
  color: #3f3f46;
  flex-shrink: 0;
}
.live-act-primary {
  background: #059669;
  border-color: #059669;
  color: #fff;
}
body.home-clean #home-live-strip .live-strip-inner {
  padding: 0.55rem 0.7rem 0.45rem;
}
@media (max-width: 380px) {
  .live-led-lbl { max-width: 5.5rem; }
  .live-close-chip { max-width: 9rem; }
}

/* ── Tonight Sell Mode v455 — one path owners can buy ── */
.tonight-sell-card .tonight-sell-pitch {
  margin-top: 0.4rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #047857;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.tonight-sell-card .tonight-btn-hero {
  flex: 1 1 100%;
  min-height: 2.75rem;
  font-size: 0.9375rem !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em;
  border-radius: 0.9rem !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
}
.tonight-sell-actions {
  margin-top: 0.55rem !important;
}
.tonight-sell-card.tonight-urgent {
  border-color: #fb923c !important;
  box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.2);
}
#home-sell-actions {
  padding: 0.95rem 1.15rem 1rem !important;
  border: 1px solid #e4e4e7 !important;
  border-radius: 1.15rem !important;
  box-sizing: border-box !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 18px rgba(15, 23, 42, 0.04) !important;
}
#home-tonight-strip {
  padding: 0.95rem 1.15rem 1rem !important;
  border: 1px solid #e4e4e7 !important;
  border-radius: 1.15rem !important;
  box-sizing: border-box !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 18px rgba(15, 23, 42, 0.04) !important;
}
#home-strict-urgent {
  padding: 0.75rem 1.1rem !important;
  box-sizing: border-box !important;
}
#section-quick-add.mr-books-panel,
#section-quick-add.card {
  padding: 0.95rem 1.15rem 1rem !important;
  box-sizing: border-box !important;
}
.sell-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}
.sell-actions-grid.sell-actions-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sell-actions-grid.sell-actions-3 {
  grid-template-columns: repeat(3, 1fr);
}
.tonight-steps-status .tonight-step {
  cursor: default;
  pointer-events: none;
}

/* ── v1344 rest card + tight close chips (no hollow desktop boxes) ── */
.tonight-rest-card {
  border-color: #d1fae5 !important;
  box-shadow: 0 1px 0 rgba(16, 185, 129, 0.06);
}
.tonight-rest-card .tonight-eyebrow {
  color: #0f766e !important;
}
.tonight-rest-card .tonight-title {
  font-size: 1.2rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  letter-spacing: -0.03em;
}
.tonight-rest-card .tonight-pos-line {
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  color: #3f3f46;
  line-height: 1.35;
}
.tonight-rest-actions {
  margin-top: 0.65rem !important;
}
.tonight-badge-idle {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  color: #0f766e;
}
.tonight-steps-chips {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem !important;
  margin-bottom: 0.55rem;
}
.tonight-steps-chips .tonight-step {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  min-height: 0 !important;
  padding: 0.4rem 0.5rem !important;
  gap: 0.4rem !important;
}
.tonight-steps-chips .tonight-step-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.05rem;
}
.tonight-steps-chips .tonight-step-label {
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  line-height: 1.15;
}
.tonight-steps-chips .tonight-step-meta {
  display: block !important;
  font-size: 0.625rem !important;
  font-weight: 600;
  color: #71717a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tonight-steps-chips .tonight-step-num {
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.6875rem;
}
@media (max-width: 420px) {
  .tonight-steps-chips .tonight-step-meta { display: none !important; }
  .tonight-steps-chips .tonight-step {
    flex-direction: column !important;
    text-align: center !important;
    padding: 0.4rem 0.2rem !important;
  }
}
.sell-act {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 3.1rem;
  padding: 0.4rem 0.2rem;
  border-radius: 0.85rem;
  border: 1px solid #e4e4e7;
  background: #fafafa;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.sell-act:active {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.sell-act-ico {
  font-size: 0.95rem;
  line-height: 1;
  font-weight: 800;
  color: #18181b;
}
.sell-act-lbl {
  font-size: 0.625rem;
  font-weight: 800;
  color: #3f3f46;
  letter-spacing: 0.01em;
}
.sell-actions-foot {
  margin-top: 0.4rem;
  text-align: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #71717a;
  letter-spacing: 0.01em;
}
body.home-clean #home-sell-actions {
  border-color: #e4e4e7;
}
body.home-clean .tonight-sell-card .tonight-title {
  font-size: 1.15rem;
  font-weight: 900;
}
@media (max-width: 360px) {
  .sell-act-lbl { font-size: 0.55rem; }
  .tonight-sell-card .tonight-btn-hero { font-size: 0.875rem !important; }
}

/* ── Lottery hub forms — mobile-safe date + amount rows (v461) ── */
#lottery-hub-body .lot-hub-field-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.35rem;
  margin-bottom: 0.15rem;
}
#lottery-hub-body .lot-hub-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  width: 100%;
}
#lottery-hub-body .lot-hub-field-full {
  margin-top: 0.55rem;
}
#lottery-hub-body .lot-hub-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #52525b;
  line-height: 1.25;
}
#lottery-hub-body .lot-hub-input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #d4d4d8;
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  font-size: 16px; /* iOS: avoid zoom + cramped native date */
  line-height: 1.3;
  background: #fff;
  color: #18181b;
  -webkit-appearance: none;
  appearance: none;
}
#lottery-hub-body input.lot-hub-input[type="date"] {
  min-height: 2.75rem;
  /* Prevent date picker from overflowing/stacking into amount */
  max-width: 100%;
}
#lottery-hub-body input.lot-hub-input[type="number"] {
  min-height: 2.75rem;
}
#lottery-hub-body select.lot-hub-input {
  min-height: 2.75rem;
  background-image: linear-gradient(45deg, transparent 50%, #71717a 50%),
    linear-gradient(135deg, #71717a 50%, transparent 50%);
  background-position: calc(100% - 1rem) calc(50% - 0.2rem), calc(100% - 0.7rem) calc(50% - 0.2rem);
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-right: 1.75rem;
}
#lottery-hub-body .lot-hub-btn {
  display: block;
  width: 100%;
  margin-top: 0.65rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 800;
  cursor: pointer;
  min-height: 2.75rem;
}
#lottery-hub-body .lot-hub-btn-primary {
  background: #7c3aed;
  color: #fff;
}
#lottery-hub-body .lot-hub-btn-amber {
  background: #d97706;
  color: #fff;
}
/* Side-by-side only when there is real room (not narrow phones) */
@media (min-width: 420px) {
  #lottery-hub-body .lot-hub-field-row {
    flex-direction: row;
    align-items: flex-end;
    gap: 0.75rem;
  }
  #lottery-hub-body .lot-hub-field-row .lot-hub-field {
    flex: 1 1 0;
    min-width: 0;
  }
}
@media (max-width: 419px) {
  #lottery-hub-body .lot-hub-field-row {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }
  #lottery-hub-body .lot-hub-input {
    font-size: 16px;
  }
}

/* ============================================================
   SOLID BRAND SYSTEM — glossy emerald UI matching MRSTORE logo
   Soft rounded squares, solid gradients, subtle inner light
   ============================================================ */

/* Shared solid surfaces */
.mr-solid-btn,
button.bg-emerald-600,
button.bg-emerald-700,
a.bg-emerald-600,
.btn-primary,
.qi-suggestion-urgent .qi-suggestion-btn,
.qi-btn-urgent {
  background: var(--mr-solid-grad) !important;
  border: 1px solid rgba(4, 120, 87, 0.35) !important;
  color: #fff !important;
  border-radius: var(--mr-radius-pill) !important;
  box-shadow: var(--mr-solid-shadow) !important;
  font-weight: 700 !important;
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease !important;
}
button.bg-emerald-600:hover,
button.bg-emerald-700:hover,
.mr-solid-btn:hover {
  filter: brightness(1.05);
  box-shadow: 0 4px 14px rgba(4, 120, 87, 0.32), 0 1px 0 rgba(255,255,255,0.28) inset !important;
}
button.bg-emerald-600:active,
button.bg-emerald-700:active,
.mr-solid-btn:active {
  transform: scale(0.97);
}

/* Soft solid (secondary emerald) */
button.bg-emerald-50,
button.border-emerald-200,
.mm-chip-btn {
  border-radius: var(--mr-radius-pill) !important;
  border: 1px solid rgba(16, 185, 129, 0.28) !important;
  background: var(--mr-solid-grad-soft) !important;
  color: #047857 !important;
  font-weight: 700 !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
}
.mm-chip-primary {
  background: var(--mr-solid-grad) !important;
  color: #fff !important;
  border-color: rgba(4, 120, 87, 0.4) !important;
  box-shadow: var(--mr-solid-shadow) !important;
}

/* Orange solid (vendor / order CTAs) */
button.bg-orange-600,
.qi-suggestion-warn .qi-suggestion-btn,
.qi-btn-warn {
  background: linear-gradient(145deg, #fb923c 0%, #ea580c 55%, #c2410c 100%) !important;
  border: 1px solid rgba(194, 65, 12, 0.35) !important;
  color: #fff !important;
  border-radius: var(--mr-radius-pill) !important;
  box-shadow: 0 2px 8px rgba(194, 65, 12, 0.22), 0 1px 0 rgba(255,255,255,0.2) inset !important;
  font-weight: 700 !important;
}

/* Blue / indigo solid tips */
button.bg-blue-600,
button.bg-indigo-600,
.qi-btn-tip,
.qi-suggestion-tip .qi-suggestion-btn {
  background: linear-gradient(145deg, #60a5fa 0%, #2563eb 50%, #1d4ed8 100%) !important;
  border: 1px solid rgba(29, 78, 216, 0.35) !important;
  color: #fff !important;
  border-radius: var(--mr-radius-pill) !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.22), 0 1px 0 rgba(255,255,255,0.2) inset !important;
  font-weight: 700 !important;
}

/* Header — solid glossy pills matching logo tile */
.header-icon-btn,
#btn-header-menu {
  min-width: 38px !important;
  min-height: 38px !important;
  border-radius: 0.85rem !important;
  border: 1px solid rgba(16, 185, 129, 0.22) !important;
  background: linear-gradient(165deg, #ffffff 0%, #ecfdf5 100%) !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
  color: #047857 !important;
}
.header-icon-btn:active,
#btn-header-menu:active {
  background: var(--mr-solid-grad-soft) !important;
  transform: scale(0.96);
}

/* Money header button — solid gold-green blend still branded */
#btn-header-money {
  border-radius: 0.85rem !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 40%, #fef3c7 100%) !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
  color: #065f46 !important;
  font-weight: 800 !important;
}
#btn-header-money.money-btn-active {
  background: var(--mr-solid-grad) !important;
  color: #fff !important;
  border-color: rgba(4, 120, 87, 0.4) !important;
  box-shadow: var(--mr-solid-shadow) !important;
}

/* Update button — solid brand */
#btn-force-refresh,
#btn-force-refresh.update-current {
  border-radius: 0.85rem !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  background: var(--mr-solid-grad) !important;
  color: #fff !important;
  box-shadow: var(--mr-solid-shadow) !important;
  font-weight: 700 !important;
  padding: 0.4rem 0.75rem !important;
}
#btn-force-refresh.update-current:hover {
  filter: brightness(1.06);
  background: var(--mr-solid-grad) !important;
  color: #fff !important;
}
#btn-force-refresh.update-needed {
  background: linear-gradient(145deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%) !important;
  border-color: rgba(217, 119, 6, 0.4) !important;
  color: #fff !important;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.28) !important;
}
#btn-force-refresh .btn-upd-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 0.4rem;
  background: rgba(255,255,255,0.18);
}

/* Sign out — solid soft red tile */
#btn-logout-top.header-signout-btn {
  border-radius: 0.85rem !important;
  border: 1px solid rgba(220, 38, 38, 0.22) !important;
  background: linear-gradient(165deg, #fff 0%, #fef2f2 100%) !important;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.1), 0 1px 0 rgba(255,255,255,0.5) inset !important;
  color: #b91c1c !important;
}
#btn-logout-top.header-signout-btn:hover {
  background: linear-gradient(165deg, #fef2f2 0%, #fee2e2 100%) !important;
}

/* Login / Pro chips */
#btn-login-top {
  border-radius: 0.85rem !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  background: linear-gradient(165deg, #fff 0%, #ecfdf5 100%) !important;
  color: #047857 !important;
  font-weight: 700 !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
}
#btn-upgrade-pro {
  border-radius: 0.85rem !important;
  background: linear-gradient(145deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%) !important;
  border: 1px solid rgba(180, 83, 9, 0.35) !important;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25) !important;
  font-weight: 800 !important;
}

/* App brand badge — glossy tile like logo */
#app-store-badge {
  border-radius: 0.9rem !important;
  box-shadow: var(--mr-solid-shadow) !important;
  ring: none;
  background: var(--mr-solid-grad) !important;
}
#app-store-badge img {
  border-radius: 0.9rem;
}

/* Store dock chips — soft idle tiles (active state defined in SOFT BRAND below) */
.store-slide-chip,
#store-slide-track button.store-slide-chip,
.store-dock .store-chip {
  border-radius: 9999px !important;
}
/* Do not force idle/active fills here — soft brand owns active .active look */
.store-slide-nav,
.store-slide-manage {
  border-radius: 0.85rem !important;
  border: 1px solid rgba(16, 185, 129, 0.2) !important;
  background: linear-gradient(165deg, #fff 0%, #ecfdf5 100%) !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
  color: #047857 !important;
}

/* Bottom nav — solid active pills */
#bottom-nav {
  background: rgba(255, 255, 255, 0.96) !important;
  border-top: 1px solid rgba(16, 185, 129, 0.12) !important;
  backdrop-filter: blur(14px);
}
#bottom-nav .bnav-btn {
  border-radius: 0.9rem !important;
  font-weight: 700 !important;
}
#bottom-nav .bnav-btn.bnav-btn-active,
.bnav-btn-active {
  color: #047857 !important;
  background: var(--mr-solid-grad-soft) !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
  border: 1px solid rgba(16, 185, 129, 0.22) !important;
}
.bnav-money-btn .bnav-money-icon {
  border-radius: 0.85rem !important;
  background: var(--mr-solid-grad-soft) !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
}
.bnav-money-btn.bnav-btn-active .bnav-money-icon {
  background: var(--mr-solid-grad) !important;
  border-color: rgba(4, 120, 87, 0.4) !important;
  color: #fff !important;
  box-shadow: var(--mr-solid-shadow) !important;
}

/* More hub tiles — solid soft cards */
.more-hub-tile {
  border-radius: 1rem !important;
  border: 1px solid rgba(16, 185, 129, 0.14) !important;
  background: linear-gradient(165deg, #ffffff 0%, #f0fdf4 100%) !important;
  box-shadow: 0 1px 4px rgba(4, 120, 87, 0.07) !important;
}
.more-hub-tile:active {
  background: var(--mr-solid-grad-soft) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}
.more-tab.is-active {
  background: var(--mr-solid-grad) !important;
  color: #fff !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
  border-radius: 0.75rem !important;
}
.more-tabs {
  background: #f0fdf4 !important;
  border-radius: 0.95rem !important;
  border: 1px solid rgba(16, 185, 129, 0.12) !important;
}

/* Brain compact chips */
.brain-chip {
  border-radius: 0.85rem !important;
  border: 1px solid rgba(16, 185, 129, 0.2) !important;
  background: linear-gradient(165deg, #fff 0%, #ecfdf5 100%) !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
  font-weight: 700 !important;
}
.brain-chip-ok {
  background: var(--mr-solid-grad-soft) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  color: #047857 !important;
}
.brain-chip-warn {
  background: linear-gradient(165deg, #fffbeb 0%, #fef3c7 100%) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}
.brain-chip-bad,
.brain-chip-urgent {
  background: linear-gradient(165deg, #fef2f2 0%, #fee2e2 100%) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}
.brain-expand-btn {
  border-radius: 0.75rem !important;
  border: 1px solid rgba(16, 185, 129, 0.22) !important;
  background: linear-gradient(165deg, #fff 0%, #ecfdf5 100%) !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
  color: #047857 !important;
}

/* Suggestion / next-step CTAs already covered; refine row icons */
.qi-suggestion-visual,
.qi-suggestion-icon {
  border-radius: 0.75rem !important;
  border: 1px solid rgba(16, 185, 129, 0.12) !important;
  background: linear-gradient(165deg, #fff 0%, #f0fdf4 100%) !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
}
.qi-suggestion-btn {
  border-radius: var(--mr-radius-pill) !important;
  font-weight: 800 !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
}

/* Cards — slightly glossier */
.card {
  border-radius: var(--mr-radius-lg) !important;
  border: 1px solid rgba(16, 185, 129, 0.08) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 8px 28px rgba(4, 120, 87, 0.05) !important;
}

/* Modal primary actions — exclude login Cancel (must stay a quiet text link) */
#vendor-hub-modal .vhub-close,
.manage-stores-close,
button[id^="btn-close-"]:not(#btn-close-login) {
  border-radius: 0.85rem !important;
  border: 1px solid rgba(16, 185, 129, 0.18) !important;
  background: linear-gradient(165deg, #fff 0%, #f0fdf4 100%) !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
  font-weight: 700 !important;
}
/* Login Cancel — plain text, no double-weight chip look */
#btn-close-login {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-weight: 500 !important;
  color: #71717a !important;
  padding: 0.35rem 0.75rem !important;
  text-shadow: none !important;
  -webkit-font-smoothing: antialiased;
}
#btn-close-login:hover { color: #3f3f46 !important; background: transparent !important; }

/* Floating side tools (TOOLS / AI OS) */
#feature-browser-tab,
button#btn-tools-fab,
.tools-fab {
  border-radius: 1rem !important;
  box-shadow: var(--mr-solid-shadow) !important;
}

/* Live strip open badge — solid soft */
#home-live-strip {
  border-radius: 1rem !important;
  border: 1px solid rgba(251, 146, 60, 0.25) !important;
  background: linear-gradient(165deg, #fff7ed 0%, #fff 70%) !important;
  box-shadow: 0 1px 4px rgba(234, 88, 12, 0.08) !important;
}

/* Sell / log actions */
#home-sell-actions button,
.sell-action-btn,
#home-tonight-strip .tonight-btn {
  border-radius: 0.85rem !important;
  font-weight: 700 !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
}

/* Catalog / form primary saves */
#btn-save-store,
button.ms-save-bar button,
.ms-save-bar .bg-emerald-600 {
  background: var(--mr-solid-grad) !important;
  border-radius: 0.95rem !important;
  box-shadow: var(--mr-solid-shadow) !important;
}

/* Brand badge + store avatars — solid glossy squares like logo */
.mr-brand-badge,
#app-store-badge.mr-brand-badge {
  border-radius: 0.95rem !important;
  background: var(--mr-solid-grad) !important;
  box-shadow: var(--mr-solid-shadow) !important;
  border: 1px solid rgba(4, 120, 87, 0.35) !important;
  overflow: hidden !important;
}
.mr-brand-badge img,
#app-store-badge img {
  border-radius: inherit;
  display: block;
}
.store-picker-avatar,
.store-slide-chip .store-picker-avatar,
#store-slide-track .store-picker-avatar {
  border-radius: 0.75rem !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
  border: 1px solid rgba(16, 185, 129, 0.2) !important;
  background: var(--mr-solid-grad-soft) !important;
  overflow: hidden;
  font-weight: 800;
  color: #047857;
}
.store-picker-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.store-picker-avatar-all {
  background: var(--mr-solid-grad) !important;
  color: #fff !important;
  border-color: rgba(4, 120, 87, 0.4) !important;
}

/* ============================================================
   SOFT BRAND — calm white ledger + emerald accents only on primary
   (replaces over-solid “full solid” candy pass)
   ============================================================ */

:root {
  --mr-solid-grad: linear-gradient(145deg, #34d399 0%, #10b981 45%, #047857 100%);
  --mr-solid-fill: #10b981;
  --mr-solid-fill-deep: #047857;
  --mr-solid-shadow: 0 2px 8px rgba(4, 120, 87, 0.18), inset 0 1px 0 rgba(255,255,255,0.2);
  --mr-solid-shadow-sm: 0 1px 3px rgba(4, 120, 87, 0.1), inset 0 1px 0 rgba(255,255,255,0.35);
}

/* Page — clean near-white (not mint candy wash) */
body {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 40%, #ffffff 100%) !important;
}

/* Primary CTAs only — solid emerald */
button.bg-emerald-600,
button.bg-emerald-700,
a.bg-emerald-600,
.mr-solid-btn,
.qi-btn-urgent,
.qi-suggestion-urgent .qi-suggestion-btn,
.mm-chip-primary,
#btn-save-store,
.more-tab.is-active {
  background: var(--mr-solid-grad) !important;
  background-color: var(--mr-solid-fill) !important;
  color: #fff !important;
  border: 1px solid #047857 !important;
  box-shadow: var(--mr-solid-shadow) !important;
  text-shadow: none !important;
}

/* Soft secondary chrome — white + light border (NOT solid mint) */
.mm-chip-btn,
.header-icon-btn,
#btn-header-menu,
#btn-login-top,
.store-slide-nav,
.store-slide-manage,
.vhub-close,
.manage-stores-close,
button[id^="btn-close-"]:not(#btn-close-login) {
  background: #fff !important;
  border: 1px solid #e4e4e7 !important;
  color: #3f3f46 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  font-weight: 700 !important;
}
.header-icon-btn,
#btn-header-menu {
  color: #047857 !important;
  border-color: rgba(16, 185, 129, 0.22) !important;
  background: #fff !important;
}
.header-icon-btn:active,
#btn-header-menu:active {
  background: #ecfdf5 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  color: #047857 !important;
}

/* More hub tiles — white cards, soft hover */
.more-hub-tile {
  background: #fff !important;
  border: 1px solid #e4e4e7 !important;
  color: #18181b !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  font-weight: 700 !important;
}
.more-hub-tile:active {
  background: #f0fdf4 !important;
  border-color: #a7f3d0 !important;
  color: #065f46 !important;
}

/* Header Money — soft mint idle; solid only when open/active */
#btn-header-money {
  background: linear-gradient(165deg, #fff 0%, #ecfdf5 100%) !important;
  border: 1px solid rgba(16, 185, 129, 0.28) !important;
  color: #065f46 !important;
  box-shadow: 0 1px 3px rgba(4, 120, 87, 0.08) !important;
  font-weight: 800 !important;
}
#btn-header-money.money-btn-active {
  background: var(--mr-solid-grad) !important;
  color: #fff !important;
  border-color: #047857 !important;
  box-shadow: var(--mr-solid-shadow) !important;
}

/* Update — soft outline when current; amber only when needed */
#btn-force-refresh,
#btn-force-refresh.update-current {
  background: #fff !important;
  border: 1px solid #e4e4e7 !important;
  color: #52525b !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  text-shadow: none !important;
  font-weight: 700 !important;
}
#btn-force-refresh.update-current:hover {
  background: #fafafa !important;
  color: #3f3f46 !important;
  filter: none;
}
#btn-force-refresh.update-needed {
  background: linear-gradient(145deg, #fbbf24 0%, #f59e0b 55%, #d97706 100%) !important;
  border-color: #b45309 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25) !important;
}

/* Sign out — soft rose outline, not solid brick */
#btn-logout-top.header-signout-btn {
  background: #fff !important;
  border: 1px solid #fecaca !important;
  color: #b91c1c !important;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.06) !important;
  text-shadow: none !important;
}
#btn-logout-top.header-signout-btn:hover {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
  color: #991b1b !important;
  filter: none;
}
#btn-logout-top .header-signout-icon {
  color: #b91c1c !important;
  stroke: #b91c1c !important;
}

/* Pro upgrade — keep amber solid (true CTA) */
#btn-upgrade-pro {
  background: linear-gradient(145deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%) !important;
  border: 1px solid #b45309 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.22) !important;
}

/* Order / warn CTAs — solid only on real actions */
button.bg-orange-600,
.qi-btn-warn,
.qi-suggestion-warn .qi-suggestion-btn {
  background: linear-gradient(145deg, #fb923c 0%, #ea580c 55%, #c2410c 100%) !important;
  border: 1px solid #9a3412 !important;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(194, 65, 12, 0.2) !important;
}

button.bg-blue-600,
button.bg-indigo-600,
.qi-btn-tip,
.qi-suggestion-tip .qi-suggestion-btn {
  background: linear-gradient(145deg, #60a5fa 0%, #2563eb 55%, #1d4ed8 100%) !important;
  border: 1px solid #1e40af !important;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.18) !important;
}

/* Store chips — white idle; ACTIVE = solid emerald (JS uses class "active") */
#store-slide-track .store-slide-chip,
#store-slide-track button.store-slide-chip,
.store-slide-chip {
  background: #fff !important;
  border: 1.5px solid #e4e4e7 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  color: #3f3f46 !important;
  font-weight: 700 !important;
}
/* Must beat #store-slide-track button — use .active (not only is-active) */
#store-slide-track .store-slide-chip.active,
#store-slide-track button.store-slide-chip.active,
#store-slide-track .store-slide-chip[aria-selected="true"],
#store-slide-track button.store-slide-chip[aria-selected="true"],
.store-slide-chip.active,
.store-slide-chip.is-active,
.store-slide-chip[aria-selected="true"] {
  background: linear-gradient(135deg, #10b981 0%, #059669 55%, #047857 100%) !important;
  border-color: #047857 !important;
  color: #fff !important;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.38), 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
  transform: scale(1.03);
}
#store-slide-track .store-slide-chip.active .store-picker-avatar,
#store-slide-track .store-slide-chip[aria-selected="true"] .store-picker-avatar,
.store-slide-chip.active .store-picker-avatar {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #047857 !important;
}
#store-slide-track .store-slide-chip.active .store-slide-label,
#store-slide-track .store-slide-chip[aria-selected="true"] .store-slide-label,
.store-slide-chip.active .store-slide-label {
  color: #fff !important;
}
/* All Stores idle stays soft indigo; active still solid emerald above */
#store-slide-track .store-slide-chip-all:not(.active):not([aria-selected="true"]) {
  border-color: rgba(99, 102, 241, 0.28) !important;
  background: #eef2ff !important;
  color: #4338ca !important;
}

/* Bottom nav — white bar, soft active (not solid green pills) */
#bottom-nav {
  background: rgba(255, 255, 255, 0.97) !important;
  border-top: 1px solid #e4e4e7 !important;
  box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.04) !important;
}
#bottom-nav .bnav-btn.bnav-btn-active,
.bnav-btn-active {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
  box-shadow: none !important;
}
#bottom-nav .bnav-btn.bnav-btn-active .text-xl,
.bnav-btn-active span {
  color: #047857 !important;
}
.bnav-money-btn .bnav-money-icon {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #047857 !important;
  box-shadow: none !important;
}
.bnav-money-btn.bnav-btn-active {
  background: #ecfdf5 !important;
  color: #047857 !important;
}
.bnav-money-btn.bnav-btn-active .bnav-money-icon {
  background: var(--mr-solid-grad) !important;
  border-color: #047857 !important;
  color: #fff !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
}

/* More tabs — soft track */
.more-tabs {
  background: #f4f4f5 !important;
  border: 1px solid #e4e4e7 !important;
  box-shadow: none !important;
  padding: 0.3rem !important;
}
.more-tab {
  border-radius: 0.75rem !important;
  font-weight: 700 !important;
  color: #52525b !important;
}

/* Cards — pure white ledger (no mint wash) */
.card,
#home-store-pulse,
#home-dashboard-status.brain-strip,
.qi-live-card {
  background: #fff !important;
  border: 1px solid #e4e4e7 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 6px 20px rgba(15, 23, 42, 0.03) !important;
}

/* Suggestion rows — white + quiet borders */
.qi-suggestion {
  background: #fff !important;
  border: 1px solid #e4e4e7 !important;
  box-shadow: none !important;
}
.qi-suggestion-urgent {
  background: linear-gradient(90deg, #fef2f2 0%, #fff 45%) !important;
  border-color: #fecaca !important;
}
.qi-suggestion-tip {
  background: linear-gradient(90deg, #eff6ff 0%, #fff 45%) !important;
  border-color: #bfdbfe !important;
}
.qi-suggestion-btn {
  border-radius: 999px !important;
  font-weight: 800 !important;
  min-width: 3.5rem;
}

/* Brain chips — soft status pills (not solid paint) */
.brain-chip {
  background: #fff !important;
  border: 1px solid #e4e4e7 !important;
  color: #3f3f46 !important;
  box-shadow: none !important;
  font-weight: 700 !important;
}
.brain-chip:active {
  background: #f4f4f5 !important;
  color: #18181b !important;
  border-color: #d4d4d8 !important;
}
.brain-chip-ok {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #047857 !important;
}
.brain-chip-warn {
  background: #fffbeb !important;
  border-color: #fde68a !important;
  color: #b45309 !important;
}
.brain-chip-bad {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #b91c1c !important;
}
.brain-chip-idle {
  background: #fafafa !important;
  border-color: #e4e4e7 !important;
  color: #3f3f46 !important;
}
.brain-expand-btn {
  background: #fff !important;
  border: 1px solid #e4e4e7 !important;
  color: #71717a !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}
.brain-expand-btn:active {
  background: #f4f4f5 !important;
  color: #52525b !important;
}

/* Pay strip — soft indigo, not heavy */
.qi-pay-strip {
  background: #eef2ff !important;
  border: 1px solid #c7d2fe !important;
  box-shadow: none !important;
  color: #3730a3 !important;
  font-weight: 700 !important;
}

/* Live open strip — soft amber wash */
#home-live-strip {
  background: linear-gradient(165deg, #fff7ed 0%, #fff 75%) !important;
  border: 1px solid rgba(251, 146, 60, 0.28) !important;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.06) !important;
}

/* Brand badge — keep solid (logo tile) */
.mr-brand-badge,
#app-store-badge {
  background: var(--mr-solid-grad) !important;
  border: 1px solid #047857 !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
  border-radius: 0.95rem !important;
}

/* Vendor hub — soft, not mint wall */
.vhub-header {
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%) !important;
  border-bottom: 1px solid #e4e4e7 !important;
}
.vhub-summary-stat {
  background: #fff !important;
  border: 1px solid #e4e4e7 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}
.vendor-hub-card {
  background: #fff !important;
  border: 1px solid #e4e4e7 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}
.vendor-hub-tabs {
  background: #f4f4f5 !important;
  border: 1px solid #e4e4e7 !important;
}
.vendor-hub-tab.is-active {
  background: var(--mr-solid-grad) !important;
  color: #fff !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
}

/* Modal panels — quiet zinc frame */
.vhub-panel,
.manage-stores-panel,
#more-hub-modal .more-hub-sheet {
  border: 1px solid #e4e4e7 !important;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12) !important;
}

/* Floating Tools / AI OS — different solid colors, flush right edge */
#feature-browser-tab:not(.hidden),
#feature-browser-tab {
  background: linear-gradient(155deg, #34d399 0%, #10b981 45%, #047857 100%) !important;
  color: #fff !important;
  border: 1px solid #047857 !important;
  border-right: 0 !important;
  border-radius: 14px 0 0 14px !important;
  box-shadow: -4px 0 16px rgba(4, 120, 87, 0.28) !important;
  font-weight: 800 !important;
  right: 0 !important;
}
/* AI OS = solid indigo (distinct from Tools emerald) */
#btn-cstore-os-fab {
  background: linear-gradient(155deg, #818cf8 0%, #4f46e5 45%, #3730a3 100%) !important;
  color: #fff !important;
  border: 1px solid #3730a3 !important;
  border-right: 0 !important;
  border-radius: 14px 0 0 14px !important;
  box-shadow: -4px 0 16px rgba(79, 70, 229, 0.3) !important;
  font-weight: 800 !important;
  right: 0 !important;
}
body.has-bottom-nav #feature-browser-tab,
body.has-bottom-nav #btn-cstore-os-fab {
  right: 0 !important;
  border-right: 0 !important;
  border-radius: 12px 0 0 12px !important;
}

/* Tailwind emerald utility fills — primary only */
.bg-emerald-600,
.bg-emerald-500,
.bg-emerald-700 {
  background-image: var(--mr-solid-grad) !important;
  background-color: var(--mr-solid-fill) !important;
}

/* Rounded consistency */
button.rounded-xl,
button.rounded-2xl,
button.rounded-full,
a.rounded-xl,
a.rounded-2xl {
  border-radius: 0.9rem !important;
}
button.rounded-full {
  border-radius: 999px !important;
}

/* Store Brain strip — always pinned (Today + every route; never flash-hide) */
body.mr-strict-today #home-dashboard-status.brain-strip-pinned,
body.mr-strict-today #home-dashboard-status.brain-strip-compact,
body.mr-strict-today.mr-today-surface #home-dashboard-status.brain-strip-pinned,
body.mr-strict-today.mr-today-surface #home-dashboard-status.brain-strip-compact,
body.mr-strict-today.mr-today-surface #home-dashboard-status:not(.hidden),
body.mr-strict-today #home-dashboard-status:not(.hidden) {
  display: block !important;
  visibility: visible !important;
  order: 1 !important;
}
/* Never re-hide via legacy pulse pairing on phone */
body.mr-strict-today #home-dashboard-status.dashboard-has-pulse,
body.mr-strict-today #home-dashboard-status.brain-strip-pinned.dashboard-has-pulse {
  display: block !important;
}
body.mr-strict-today #home-dashboard-status.brain-strip-pinned .brain-compact-row {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}
/* No expand dropdown on Store Brain — chips only (hide any legacy detail) */
body.mr-strict-today #home-dashboard-status.brain-strip-pinned .brain-expand-btn,
body.mr-strict-today #home-dashboard-status.brain-strip-compact .brain-expand-btn,
body.mr-strict-today #home-dashboard-status .brain-pillar-grid,
body.mr-strict-today #home-dashboard-status .brain-next-step,
body.mr-strict-today #home-dashboard-status .brain-lottery-chip {
  display: none !important;
}
/* Product count pill on Smart Quick Insights */
.qi-meta-pill.qi-meta-shelf {
  cursor: pointer;
  border-color: #a7f3d0 !important;
  background: #ecfdf5 !important;
  color: #047857 !important;
  font-weight: 800 !important;
}
.qi-kpi-stock[data-sqi-act] {
  cursor: pointer;
}

/* Ledger modal — always on top; force-show beats killGhost leftover styles */
#ledger-modal {
  z-index: 720 !important;
  position: fixed !important;
  inset: 0 !important;
}
#ledger-modal.hidden {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}
#ledger-modal:not(.hidden),
body.ledger-modal-open #ledger-modal:not(.hidden) {
  display: flex !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 720 !important;
  position: fixed !important;
  inset: 0 !important;
  align-items: flex-end !important;
  justify-content: center !important;
  background: rgba(15, 23, 42, 0.45) !important;
}
@media (min-width: 640px) {
  #ledger-modal:not(.hidden),
  body.ledger-modal-open #ledger-modal:not(.hidden) {
    align-items: center !important;
    padding: 1rem !important;
  }
}
#ledger-modal:not(.hidden) .ledger-modal-sheet,
body.ledger-modal-open #ledger-modal:not(.hidden) .ledger-modal-sheet {
  display: flex !important;
  flex-direction: column !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  background: #fff !important;
  width: 100% !important;
  max-height: min(94dvh, 100%) !important;
  z-index: 2 !important;
  position: relative !important;
}
#ledger-modal:not(.hidden) #ledger-modal-body,
body.ledger-modal-open #ledger-modal:not(.hidden) #ledger-modal-body {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: auto !important;
  flex: 1 1 auto !important;
  min-height: 12rem !important;
  pointer-events: auto !important;
  -webkit-overflow-scrolling: touch;
}
#btn-close-ledger-modal,
#btn-ledger-modal-close-foot,
#btn-ledger-modal-refresh {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 5;
  position: relative;
}
#ledger-modal .ledger-modal-sheet {
  position: relative;
  z-index: 2;
  max-height: min(94dvh, 100%);
}
body.ledger-modal-open { overflow: hidden !important; }
body.ledger-modal-open #bottom-nav,
body.ledger-modal-open #btn-cstore-os-fab,
body.ledger-modal-open #feature-browser-tab,
body.ledger-modal-open #pwa-install-banner,
body.ledger-modal-open #section-ledger-metrics,
body.ledger-modal-open #section-ledger-table {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
#ledger-modal .txn-card { box-shadow: 0 1px 3px rgba(0,0,0,.06); }
#tools-hub.tools-hub-compact { border-color: rgba(99,102,241,.2); }

/* ═══════════════════════════════════════════════════════════════════════════
   MRSTORE Pro Theme v568 — mobile · tablet · PC (all breakpoints)
   Palette: brand emerald + neutrals + rare semantic (warn/danger only).
   No rainbow tiles, no purple/indigo carnival on Today.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --mr-ink: #18181b;
  --mr-muted: #71717a;
  --mr-faint: #a1a1aa;
  --mr-accent: #059669;
  --mr-accent-deep: #047857;
  --mr-accent-bright: #10b981;
  --mr-accent-mint: #34d399;
  --mr-accent-soft: #ecfdf5;
  --mr-accent-glow: rgba(5, 150, 105, 0.14);
  --mr-solid-grad: linear-gradient(165deg, #10b981 0%, #059669 55%, #047857 100%);
  --mr-solid-grad-soft: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
  --mr-solid-fill: #059669;
  --mr-solid-shadow: 0 2px 8px rgba(4, 120, 87, 0.18);
  --mr-solid-shadow-sm: 0 1px 3px rgba(4, 120, 87, 0.12);
  --mr-line: rgba(24, 24, 27, 0.1);
  --mr-line-soft: rgba(24, 24, 27, 0.06);
  --mr-surface: #ffffff;
  --mr-surface-muted: #fafafa;
  --mr-canvas: #f4f4f5;
  --mr-warn: #d97706;
  --mr-warn-soft: #fffbeb;
  --mr-warn-border: #fde68a;
  --mr-danger: #dc2626;
  --mr-danger-soft: #fef2f2;
  --mr-danger-border: #fecaca;
  --mr-radius-sm: 0.65rem;
  --mr-radius: 0.9rem;
  --mr-radius-lg: 1.1rem;
  --mr-radius-xl: 1.35rem;
  --mr-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --mr-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 20px rgba(15, 23, 42, 0.05);
  --mr-shadow-lg: 0 10px 32px rgba(15, 23, 42, 0.08);
}

/* Calm canvas — all viewports */
html body {
  background: var(--mr-canvas) !important;
  color: var(--mr-ink);
}
html body.guest-mode,
html body.auth-focus {
  background: linear-gradient(180deg, #f8fafc 0%, #f4f4f5 50%, #fafafa 100%) !important;
}

.app-header {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid var(--mr-line-soft) !important;
  box-shadow: none !important;
}

.card {
  background: var(--mr-surface);
  border: 1px solid var(--mr-line-soft);
  box-shadow: var(--mr-shadow-sm);
  border-radius: var(--mr-radius-lg);
}

/* ── Today surface cards (mobile / tab / PC) ── */
body.mr-strict-today #home-insights.mr-strict-insights,
body.mr-today-surface #home-insights.mr-pro-insights {
  gap: 0.75rem;
}
#home-insights.mr-pro-insights > .card:not(#guest-auth-shell):not(#workspace-boot-overlay):not(#app-loading-shell),
#home-insights.mr-pro-insights > .grid .card,
body.mr-strict-today #home-store-pulse,
body.mr-strict-today #home-live-strip,
body.mr-strict-today #home-tonight-strip,
body.mr-strict-today #home-stock-road,
body.mr-strict-today #home-sell-actions,
body.mr-strict-today #home-dashboard-status {
  background: var(--mr-surface) !important;
  border: 1px solid var(--mr-line-soft) !important;
  border-radius: var(--mr-radius-lg) !important;
  box-shadow: var(--mr-shadow-sm) !important;
}

/* Store Brain — chips only, brand PRO badge */
#home-dashboard-status.brain-strip,
#home-dashboard-status.home-dashboard-hub {
  background: var(--mr-surface) !important;
  border-color: var(--mr-line-soft) !important;
  box-shadow: var(--mr-shadow-sm) !important;
}
.brain-os-badge {
  background: var(--mr-accent-soft) !important;
  color: var(--mr-accent-deep) !important;
  border: 1px solid rgba(5, 150, 105, 0.22);
}
.brain-chip {
  border-color: var(--mr-line) !important;
  background: var(--mr-surface) !important;
  color: var(--mr-ink) !important;
  font-weight: 700;
}
.brain-chip-ok {
  border-color: #a7f3d0 !important;
  background: var(--mr-accent-soft) !important;
  color: #047857 !important;
}
.brain-chip-warn {
  border-color: var(--mr-warn-border) !important;
  background: var(--mr-warn-soft) !important;
  color: #b45309 !important;
}
.brain-chip-bad {
  border-color: var(--mr-danger-border) !important;
  background: var(--mr-danger-soft) !important;
  color: #b91c1c !important;
}
.brain-chip-idle {
  border-color: var(--mr-line) !important;
  background: var(--mr-surface-muted) !important;
  color: #3f3f46 !important;
}
.brain-strip-all { border-color: rgba(5, 150, 105, 0.18) !important; }
.brain-lottery-chip,
.brain-next-step {
  border-color: var(--mr-line) !important;
  background: var(--mr-surface-muted) !important;
  color: var(--mr-muted) !important;
}

/* Smart Quick Insights — flat white, not rainbow */
.qi-live-card {
  background: var(--mr-surface) !important;
  border: 1px solid var(--mr-line-soft) !important;
  box-shadow: var(--mr-shadow) !important;
  border-radius: var(--mr-radius-xl) !important;
}
.qi-live-card::after { display: none !important; }
.insight-mood-card.qi-live-card.insight-mood-rich,
.insight-mood-card.qi-live-card.insight-mood-win,
.insight-mood-card.qi-live-card.insight-mood-push {
  background: var(--mr-surface) !important;
  border-color: var(--mr-line-soft) !important;
  box-shadow: var(--mr-shadow) !important;
}
.insight-mood-card.qi-live-card.insight-mood-rich {
  border-color: rgba(217, 119, 6, 0.28) !important;
}
.insight-mood-card.qi-live-card.insight-mood-win {
  border-color: rgba(5, 150, 105, 0.28) !important;
}

/* KPI tiles — neutral base; semantic left rail via border only */
.qi-kpi,
.qi-kpi-grid .qi-kpi,
#home-store-pulse .qi-kpi {
  background: var(--mr-surface-muted) !important;
  border: 1px solid var(--mr-line-soft) !important;
  border-radius: var(--mr-radius) !important;
  box-shadow: none !important;
}
.qi-kpi-rich,
.qi-kpi-push {
  background: var(--mr-warn-soft) !important;
  border-color: var(--mr-warn-border) !important;
}
.qi-kpi-win,
.qi-kpi-sales,
.qi-kpi-net {
  background: var(--mr-accent-soft) !important;
  border-color: #a7f3d0 !important;
}
.qi-kpi-stock {
  background: var(--mr-surface-muted) !important;
  border-color: var(--mr-line) !important;
}
.qi-kpi-op {
  background: var(--mr-surface-muted) !important;
  border-color: var(--mr-line) !important;
}
.qi-kpi-net-glow .qi-kpi-val { animation: none !important; }
.qi-kpi-label { color: var(--mr-muted) !important; font-weight: 700; }
.qi-kpi-val { color: var(--mr-ink) !important; }
.qi-kpi-spark-up::after { background: var(--mr-accent) !important; }
.qi-kpi-spark-down::after { background: var(--mr-danger) !important; }
.qi-kpi-spark-stock::after { background: var(--mr-warn) !important; }
.qi-kpi-spark-op::after { background: var(--mr-muted) !important; }

/* Mood banners — restrained */
.insight-mood-fresh .insight-mood-banner,
.insight-mood-push .insight-mood-banner,
.insight-mood-steady .insight-mood-banner,
.insight-mood-win .insight-mood-banner,
.insight-mood-rich .insight-mood-banner {
  background: var(--mr-surface-muted) !important;
  border-color: var(--mr-line) !important;
  color: var(--mr-ink) !important;
}
.insight-mood-win .insight-mood-banner {
  background: var(--mr-accent-soft) !important;
  border-color: #a7f3d0 !important;
  color: #065f46 !important;
}
.insight-mood-push .insight-mood-banner,
.insight-mood-rich .insight-mood-banner {
  background: var(--mr-warn-soft) !important;
  border-color: var(--mr-warn-border) !important;
  color: #92400e !important;
}
.insight-mood-rich .insight-mood-banner-glow { display: none !important; }

/* Money mood card — kill violet */
.mm-kicker { color: var(--mr-accent-deep) !important; }
.mm-chip-btn {
  border-color: #a7f3d0 !important;
  background: var(--mr-accent-soft) !important;
  color: #047857 !important;
}
.mm-chip-primary {
  background: var(--mr-accent) !important;
  color: #fff !important;
  border-color: var(--mr-accent) !important;
}
.mm-indigo { color: var(--mr-accent) !important; }
.mm-orange { color: var(--mr-warn) !important; }
.mm-tile {
  background: var(--mr-surface-muted) !important;
  border-color: var(--mr-line-soft) !important;
}

/* Combined insights — no purple */
#home-combined-insights,
.home-combined-insights {
  border-color: var(--mr-line-soft) !important;
  box-shadow: var(--mr-shadow-sm) !important;
}
.ci-kicker { color: var(--mr-ink) !important; }
.ci-all-btn {
  color: var(--mr-accent-deep) !important;
  background: var(--mr-accent-soft) !important;
  border-color: #a7f3d0 !important;
}
.ci-tile {
  background: var(--mr-surface-muted) !important;
  border-color: var(--mr-line-soft) !important;
}

/* Suggestions / narratives — semantic only */
.qi-suggestion-icon-sale { background: var(--mr-accent-soft) !important; color: #047857 !important; }
.qi-suggestion-icon-order { background: var(--mr-warn-soft) !important; }
.qi-suggestion-icon-po { background: var(--mr-danger-soft) !important; color: #b91c1c !important; }
.qi-suggestion-icon-cash { background: var(--mr-warn-soft) !important; color: #92400e !important; }
.qi-suggestion-icon-pos { background: var(--mr-surface-muted) !important; color: #3f3f46 !important; }
.qi-pos-pulse { background: var(--mr-accent) !important; }
.qi-partner-banner {
  border-color: var(--mr-line) !important;
  background: var(--mr-surface-muted) !important;
}
.qi-partner-banner-title { color: var(--mr-muted) !important; }
.qi-partner-banner-body { color: var(--mr-ink) !important; }
.qi-partner-banner-body strong { color: var(--mr-ink) !important; }
.qi-narrative-tip {
  background: var(--mr-surface-muted) !important;
  border-color: var(--mr-line) !important;
  color: var(--mr-ink) !important;
}
.qi-narrative-tip .qi-narrative-ico {
  background: var(--mr-accent-soft) !important;
  color: #047857 !important;
}
.qi-narrative-good {
  background: var(--mr-accent-soft) !important;
  border-color: #a7f3d0 !important;
  color: #064e3b !important;
}
.qi-narrative-good .qi-narrative-ico {
  background: #a7f3d0 !important;
  color: #047857 !important;
}
.qi-suggestion-partner::before { background: var(--mr-accent) !important; }
.qi-suggestion-partner { border-color: var(--mr-line-soft) !important; }

/* Live strip */
#home-live-strip {
  background: var(--mr-surface) !important;
  border-color: var(--mr-line-soft) !important;
}
.live-led-soft {
  background: var(--mr-surface-muted) !important;
  border-color: var(--mr-line) !important;
  color: #3f3f46 !important;
}
.live-led-soft .live-led-dot { background: var(--mr-warn) !important; }
.live-act-primary {
  background: var(--mr-accent) !important;
  border-color: var(--mr-accent) !important;
}

/* Tonight / Open strip */
#home-tonight-strip {
  background: var(--mr-surface) !important;
  border-color: var(--mr-line-soft) !important;
  background-image: none !important;
}
.tonight-eyebrow { color: var(--mr-accent-deep) !important; }
.tonight-btn-primary {
  background: var(--mr-accent) !important;
  border-color: var(--mr-accent) !important;
}

/* Header chips */
.home-quick-chip-violet {
  border-color: #a7f3d0 !important;
  background: var(--mr-accent-soft) !important;
  color: #047857 !important;
}
.home-quick-chip-sky {
  border-color: var(--mr-line) !important;
  background: var(--mr-surface-muted) !important;
  color: #3f3f46 !important;
}
.home-quick-chip-emerald {
  border-color: #a7f3d0 !important;
  background: var(--mr-accent-soft) !important;
  color: #047857 !important;
}

/* Trust bar — no sky blue carnival */
#home-trust-bar.mr-pro-trust {
  background: var(--mr-surface) !important;
  border-color: var(--mr-line-soft) !important;
}

/* Owner mirror — brand green ring */
.owner-mirror-card {
  background: var(--mr-surface) !important;
  border-color: var(--mr-line-soft) !important;
  box-shadow: var(--mr-shadow) !important;
}
.owner-mirror-card::before { display: none !important; }
.owner-mirror-avatar {
  background: var(--mr-accent-soft) !important;
}
.owner-mirror-photo,
.owner-mirror-initials {
  color: #047857 !important;
  background: var(--mr-accent-soft) !important;
}
.owner-mirror-ring { border-color: var(--mr-accent) !important; }

/* Quick add — primary sale green; reports not purple */
#section-quick-add.mr-pro-quick-add .quick-btn.quick-btn-reports {
  background: var(--mr-surface) !important;
  color: var(--mr-ink) !important;
  border: 1px solid var(--mr-line) !important;
  box-shadow: var(--mr-shadow-sm) !important;
}
#section-quick-add.mr-pro-quick-add .quick-btn.quick-btn-reports > div:last-child {
  color: var(--mr-muted) !important;
}
#section-quick-add.mr-pro-quick-add .quick-btn[data-type="daily_sale"] {
  background: var(--mr-solid-grad) !important;
  box-shadow: var(--mr-solid-shadow) !important;
}
#section-quick-add.mr-pro-quick-add .quick-btn[data-type="purchase"],
#section-quick-add.mr-pro-quick-add .quick-btn[data-type="expense"],
#section-quick-add.mr-pro-quick-add .quick-btn[data-type="cash_drop"] {
  border-color: var(--mr-line) !important;
}

/* Tools hub */
#tools-hub.mr-pro-tools .tools-hub-head.is-open {
  border-color: rgba(5, 150, 105, 0.25) !important;
}
#tools-hub.mr-pro-tools #btn-power-reconcile {
  background: var(--mr-solid-grad) !important;
  box-shadow: var(--mr-solid-shadow-sm) !important;
}
#tools-hub.tools-hub-compact {
  border-color: var(--mr-line-soft) !important;
}

/* Ledger KPI tiles — calm */
.ledger-kpi-tile-sales {
  background: var(--mr-accent-soft) !important;
  border-color: #a7f3d0 !important;
}
.ledger-kpi-tile-purchase {
  background: var(--mr-surface-muted) !important;
  border-color: var(--mr-line) !important;
}
.ledger-kpi-tile-expense {
  background: var(--mr-danger-soft) !important;
  border-color: var(--mr-danger-border) !important;
}
.ledger-secondary-pill-draw,
.ledger-secondary-pill-drop,
.ledger-secondary-pill-other {
  background: var(--mr-surface-muted) !important;
  border: 1px solid var(--mr-line) !important;
  color: var(--mr-ink) !important;
}
.net-hero-positive {
  border-color: #a7f3d0 !important;
  background: var(--mr-accent-soft) !important;
}
.net-hero-negative {
  border-color: var(--mr-danger-border) !important;
  background: var(--mr-danger-soft) !important;
}
.net-hero-mood-rich,
.net-hero-mood-win,
.net-hero-mood-push,
.money-hero-mood-rich,
.money-hero-mood-win,
.ledger-health-mood-win,
.ledger-health-mood-rich {
  background: var(--mr-surface) !important;
  border-color: var(--mr-line-soft) !important;
}
.net-hero-mood-win,
.ledger-health-mood-win {
  border-color: #a7f3d0 !important;
  background: var(--mr-accent-soft) !important;
}
.net-hero-mood-push,
.net-hero-mood-rich,
.ledger-health-mood-rich {
  border-color: var(--mr-warn-border) !important;
  background: var(--mr-warn-soft) !important;
}

/* FABs — Tools emerald solid; AI OS charcoal (not loud indigo) */
#feature-browser-tab:not(.hidden),
#feature-browser-tab {
  background: var(--mr-accent) !important;
  background-image: none !important;
  color: #fff !important;
  border: 1px solid var(--mr-accent-deep) !important;
  border-right: 0 !important;
  box-shadow: -3px 0 12px rgba(4, 120, 87, 0.2) !important;
}
#btn-cstore-os-fab {
  background: #27272a !important;
  background-image: none !important;
  color: #fff !important;
  border: 1px solid #18181b !important;
  border-right: 0 !important;
  box-shadow: -3px 0 12px rgba(24, 24, 27, 0.22) !important;
}
.fb-drawer-head {
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 72%) !important;
}
.cstore-os-send:active { background: var(--mr-accent-deep) !important; }

/* Bottom nav */
#bottom-nav {
  background: rgba(255, 255, 255, 0.98) !important;
  border-top: 1px solid var(--mr-line-soft) !important;
  box-shadow: 0 -2px 16px rgba(15, 23, 42, 0.05) !important;
}
.bnav-btn-active {
  color: var(--mr-accent) !important;
  background: var(--mr-accent-soft) !important;
  box-shadow: none !important;
}

/* Sell actions / strict urgent */
.strict-urgent-btn {
  border-color: var(--mr-warn-border) !important;
  background: var(--mr-warn-soft) !important;
  color: #92400e !important;
}
.strict-urgent-go { color: var(--mr-warn) !important; }
.sell-act-more {
  border-color: rgba(5, 150, 105, 0.35) !important;
  background: var(--mr-accent-soft) !important;
}

/* Manage-stores section rainbow → neutral */
.ms-section-violet,
.ms-section-indigo {
  border-color: var(--mr-line-soft) !important;
  background: var(--mr-surface) !important;
}
.ms-section-emerald {
  border-color: rgba(5, 150, 105, 0.16) !important;
  background: var(--mr-surface) !important;
}

/* Store picker “all” avatar — brand not indigo */
.store-picker-avatar-all {
  background: var(--mr-solid-grad) !important;
}

/* ── Tablet (md) ── */
@media (min-width: 768px) and (max-width: 1023px) {
  body.mr-strict-today #home-insights.mr-strict-insights {
    gap: 0.85rem;
  }
  body.mr-strict-today #home-store-pulse .qi-kpi-val {
    font-size: 1rem !important;
  }
  body.mr-strict-today #home-store-pulse .qi-hero-amount {
    font-size: 1.2rem !important;
  }
  .mm-tiles,
  .qi-kpi-grid {
    gap: 0.5rem;
  }
  #home-live-strip .live-strip-inner {
    padding: 0.75rem 0.9rem 0.65rem;
  }
}

/* ── PC / desktop (lg+) ── */
@media (min-width: 1024px) {
  /* Wider, airier Today column */
  #app-main-column,
  main#app-main,
  .app-main-inner {
    max-width: 72rem;
  }
  body.mr-strict-today #home-insights.mr-strict-insights {
    gap: 1rem;
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  body.mr-strict-today #home-store-pulse.qi-live-card {
    padding: 1.1rem 1.25rem !important;
  }
  body.mr-strict-today #home-store-pulse .qi-kpi-val {
    font-size: 1.05rem !important;
  }
  body.mr-strict-today #home-store-pulse .qi-hero-amount {
    font-size: 1.35rem !important;
  }
  .mm-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .qi-kpi-grid {
    gap: 0.55rem;
  }
  #home-dashboard-status.brain-strip {
    padding: 0.85rem 1rem !important;
  }
  .brain-chip {
    min-height: 2.15rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.7rem;
  }
  #home-live-strip .live-strip-inner {
    padding: 0.85rem 1rem 0.7rem;
  }
  .live-store-name { font-size: 0.9rem; }
  .live-led { font-size: 0.6875rem; padding: 0.25rem 0.55rem; }
  #home-tonight-strip {
    padding: 1rem 1.15rem !important;
  }
  .tonight-title { font-size: 1.25rem !important; }
  .tonight-steps {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  /* Desktop FABs — mid-right, solid not gradient noise */
  body.has-bottom-nav #feature-browser-tab {
    box-shadow: -4px 0 18px rgba(4, 120, 87, 0.18) !important;
  }
  body.has-bottom-nav #btn-cstore-os-fab {
    box-shadow: -4px 0 18px rgba(24, 24, 27, 0.18) !important;
  }
  #section-quick-add.mr-pro-quick-add,
  #tools-hub.mr-pro-tools {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  #bottom-nav {
    /* Desktop: phone bottom nav is hidden (see v633 min-width 640 rule) */
    display: none !important;
  }
  .app-header {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .card:hover {
    border-color: rgba(5, 150, 105, 0.14);
  }
}

/* ── Large PC ── */
@media (min-width: 1280px) {
  body.mr-strict-today #home-insights.mr-strict-insights {
    max-width: none;
    width: 100%;
  }
  body.mr-strict-today #home-store-pulse .qi-hero-amount {
    font-size: 1.45rem !important;
  }
  .mm-tiles {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

/* Reduce motion — no pulse carnival */
@media (prefers-reduced-motion: reduce) {
  .live-badge-dot,
  .live-activity-pulse,
  .live-close-warn,
  .live-close-hot,
  .qi-pos-pulse,
  .owner-mirror-ring {
    animation: none !important;
  }
}

/* More hub tiles — flat */
.more-hub-tile {
  background: var(--mr-surface) !important;
  border-color: var(--mr-line-soft) !important;
  box-shadow: none !important;
}
.more-hub-tile:hover {
  border-color: rgba(5, 150, 105, 0.28) !important;
  background: var(--mr-accent-soft) !important;
}

/* Primary buttons system */
.bg-emerald-600,
.bg-emerald-500,
.bg-emerald-700 {
  background-image: none !important;
  background-color: var(--mr-accent) !important;
}
.bg-emerald-600:hover,
.bg-emerald-500:hover,
.bg-emerald-700:hover {
  background-color: var(--mr-accent-deep) !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   Store switcher v570 — card toolbar (not pills)
   One rounded card · segmented store tabs · flat status strip
   Mobile · tablet · PC
   ═══════════════════════════════════════════════════════════════════════════ */

/* Outer dock = one card surface */
#store-hero.store-dock,
#store-hero.store-hero {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Unified card wraps switcher row + status */
#store-hero.store-dock {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff !important;
  border: 1px solid rgba(24, 24, 27, 0.1) !important;
  border-radius: 0.9rem !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.04) !important;
  overflow: hidden;
}

/* Switcher row — no second pill shell */
.store-dock-curve-shell,
#store-hero .store-dock-curve-shell {
  display: flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  padding: 0.45rem 0.5rem !important;
  background: #fff !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.store-dock.is-pinned {
  border-radius: 0 0 0.9rem 0.9rem !important;
  max-width: 64rem;
  padding: 0 0.65rem 0.35rem !important;
  background: transparent !important;
  box-shadow: none !important;
}
.store-dock.is-pinned #store-hero,
body .store-dock.is-pinned {
  /* when #store-hero itself is pinned */
}
#store-hero.store-dock.is-pinned {
  border-radius: 0 0 0.9rem 0.9rem !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1) !important;
}
.store-dock.is-pinned .store-dock-curve-shell {
  border-radius: 0 !important;
  box-shadow: none !important;
}
.store-dock.is-pinned::before { display: none !important; }

/* Viewport = soft zinc track (segmented control rail) */
.store-slide-viewport {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: #f4f4f5 !important;
  border: 1px solid #e4e4e7 !important;
  border-radius: 0.55rem !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
  padding: 0.15rem !important;
}
.store-slide-viewport::-webkit-scrollbar { display: none; }

.store-slide-track {
  display: flex;
  align-items: center;
  gap: 0.15rem !important;
  padding: 0 !important;
  min-height: 2.05rem;
}

/* Segment tabs — soft rect, not capsules */
#store-slide-track .store-slide-chip,
#store-slide-track button.store-slide-chip,
.store-slide-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  padding: 0.4rem 0.7rem 0.4rem 0.35rem !important;
  border-radius: 0.45rem !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #52525b !important;
  font-size: 0.75rem !important;
  font-weight: 650 !important;
  letter-spacing: -0.01em;
  line-height: 1.15 !important;
  white-space: nowrap;
  max-width: 12rem;
  box-shadow: none !important;
  transform: none !important;
  cursor: pointer;
}
#store-slide-track .store-slide-chip:hover:not(.active):not([aria-selected="true"]),
.store-slide-chip:hover:not(.active) {
  background: rgba(255, 255, 255, 0.75) !important;
  color: #18181b !important;
  border-color: transparent !important;
}
#store-slide-track .store-slide-chip.active,
#store-slide-track button.store-slide-chip.active,
#store-slide-track .store-slide-chip[aria-selected="true"],
#store-slide-track button.store-slide-chip[aria-selected="true"],
.store-slide-chip.active,
.store-slide-chip.is-active,
.store-slide-chip[aria-selected="true"] {
  background: #fff !important;
  background-image: none !important;
  border-color: transparent !important;
  color: #047857 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(5, 150, 105, 0.18) !important;
  transform: none !important;
  font-weight: 750 !important;
}
#store-slide-track .store-slide-chip.active .store-slide-label,
#store-slide-track .store-slide-chip[aria-selected="true"] .store-slide-label,
.store-slide-chip.active .store-slide-label {
  color: #047857 !important;
}
#store-slide-track .store-slide-chip.active .store-picker-avatar,
#store-slide-track .store-slide-chip[aria-selected="true"] .store-picker-avatar,
.store-slide-chip.active .store-picker-avatar {
  box-shadow: none !important;
  border: 1px solid rgba(5, 150, 105, 0.25) !important;
}

/* All Stores idle — same rail, muted */
#store-slide-track .store-slide-chip-all:not(.active):not([aria-selected="true"]),
.store-slide-chip.store-slide-chip-all:not(.active) {
  background: transparent !important;
  border-color: transparent !important;
  color: #71717a !important;
}
.store-picker-avatar-all {
  background: #71717a !important;
  background-image: none !important;
}

.store-slide-chip .store-picker-avatar {
  width: 1.4rem !important;
  height: 1.4rem !important;
  border-radius: 0.35rem !important;
  font-size: 0.65rem !important;
}

.store-slide-label {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Square-ish icon buttons */
.store-slide-nav,
.store-slide-manage {
  flex-shrink: 0;
  width: 2rem !important;
  height: 2rem !important;
  border-radius: 0.45rem !important;
  border: 1px solid #e4e4e7 !important;
  background: #fff !important;
  color: #52525b !important;
  font-size: 1rem !important;
  font-weight: 700;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
}
.store-slide-nav:hover,
.store-slide-manage:hover {
  background: #f4f4f5 !important;
  border-color: #d4d4d8 !important;
  color: #18181b !important;
}
.store-slide-manage { font-size: 0.85rem !important; }

/* Status strip — flat row under divider (not a second pill) — NEVER flash */
.shift-greeting-bar,
#shift-greeting-bar {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  margin: 0 !important;
  padding: 0.65rem 1.1rem !important;
  border-radius: 0 !important;
  border: none !important;
  border-top: 1px solid #f0f0f1 !important;
  background: #fafafa !important;
  background-image: none !important;
  box-shadow: none !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #52525b !important;
  line-height: 1.35 !important;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  transform: none !important;
}
/* Left accent tick */
.shift-greeting-bar::before,
#shift-greeting-bar::before {
  content: '';
  width: 0.2rem;
  align-self: stretch;
  min-height: 1.1rem;
  border-radius: 999px;
  background: #10b981;
  flex-shrink: 0;
}
.shift-greeting-bar.hidden,
#shift-greeting-bar.hidden {
  display: none !important;
}
.shift-greeting-emoji {
  font-size: 0.85rem;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.9;
}
.shift-greeting-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.shift-greeting-text strong {
  color: #18181b !important;
  font-weight: 750 !important;
}

/* Status semantics via accent bar + text only */
.shift-greeting-bar.shift-vibe-morning::before,
.shift-greeting-bar.shift-vibe-midday::before,
.shift-greeting-bar.shift-vibe-afternoon::before,
#shift-greeting-bar.shift-vibe-morning::before,
#shift-greeting-bar.shift-vibe-midday::before,
#shift-greeting-bar.shift-vibe-afternoon::before {
  background: #f59e0b;
}
.shift-greeting-bar.shift-vibe-midday .shift-greeting-text strong,
.shift-greeting-bar.shift-vibe-afternoon .shift-greeting-text strong,
#shift-greeting-bar.shift-vibe-midday .shift-greeting-text strong,
#shift-greeting-bar.shift-vibe-afternoon .shift-greeting-text strong {
  color: #b45309 !important;
}
.shift-greeting-bar.shift-vibe-close,
#shift-greeting-bar.shift-vibe-close {
  background: #fffbeb !important;
  border-top-color: #fde68a !important;
}
.shift-greeting-bar.shift-vibe-close::before,
#shift-greeting-bar.shift-vibe-close::before {
  background: #d97706;
}
.shift-greeting-bar.shift-vibe-close .shift-greeting-text strong,
#shift-greeting-bar.shift-vibe-close .shift-greeting-text strong {
  color: #b45309 !important;
}
.shift-greeting-bar.shift-vibe-night,
#shift-greeting-bar.shift-vibe-night {
  background: #f4f4f5 !important;
}
.shift-greeting-bar.shift-vibe-night::before,
#shift-greeting-bar.shift-vibe-night::before {
  background: #a1a1aa;
}
.shift-greeting-bar.shift-vibe-night .shift-greeting-text strong,
#shift-greeting-bar.shift-vibe-night .shift-greeting-text strong {
  color: #3f3f46 !important;
}

/* Keep page canvas calm */
body.shift-vibe-morning,
body.shift-vibe-midday,
body.shift-vibe-afternoon,
body.shift-vibe-close,
body.shift-vibe-night,
body.app-shift-mode {
  background: #f4f4f5 !important;
}

/* Switching progress — rect toast, not pill */
.store-switch-pill {
  border-radius: 0.55rem !important;
}

/* Tablet */
@media (min-width: 768px) {
  #store-hero.store-dock {
    border-radius: 1rem !important;
  }
  .store-slide-chip {
    font-size: 0.8125rem !important;
    max-width: 13rem;
  }
  .shift-greeting-bar,
  #shift-greeting-bar {
    font-size: 0.8125rem !important;
    padding: 0.6rem 0.9rem !important;
  }
}

/* PC — align with Today column, roomier segments */
@media (min-width: 1024px) {
  #store-hero.store-dock {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    border-radius: 1rem !important;
  }
  .store-dock-curve-shell,
  #store-hero .store-dock-curve-shell {
    padding: 0.55rem 0.65rem !important;
    gap: 0.45rem !important;
  }
  .store-slide-viewport {
    border-radius: 0.6rem !important;
    padding: 0.2rem !important;
  }
  .store-slide-chip {
    font-size: 0.8125rem !important;
    padding: 0.45rem 0.85rem 0.45rem 0.4rem !important;
    max-width: 15rem;
    border-radius: 0.5rem !important;
  }
  .store-slide-nav,
  .store-slide-manage {
    width: 2.15rem !important;
    height: 2.15rem !important;
    border-radius: 0.5rem !important;
  }
  .shift-greeting-bar,
  #shift-greeting-bar {
    font-size: 0.8125rem !important;
    padding: 0.65rem 1rem !important;
  }
}

@media (min-width: 1280px) {
  #store-hero.store-dock {
    max-width: none;
    width: 100%;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   Header icon-only controls v571 — update · money · logout
   Round icons; update green when new / gray when current; no bulky yellow.
   ═══════════════════════════════════════════════════════════════════════════ */

.header-actions {
  gap: 0.35rem !important;
}

.header-icon-only,
#btn-force-refresh.header-icon-only,
#btn-header-money.header-icon-only,
#btn-logout-top.header-icon-only,
#btn-logout-top.header-signout-btn {
  width: 2.2rem !important;
  height: 2.2rem !important;
  min-width: 2.2rem !important;
  min-height: 2.2rem !important;
  padding: 0 !important;
  gap: 0 !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  font-size: 0 !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  background-image: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease, opacity 0.15s ease;
}

/* Money — soft emerald globe */
#btn-header-money,
#btn-header-money.header-money-desktop,
#btn-header-money.header-icon-only {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #059669 !important;
  font-weight: 600 !important;
}
#btn-header-money:hover {
  background: #d1fae5 !important;
  color: #047857 !important;
}
#btn-header-money.money-btn-active {
  background: #059669 !important;
  border-color: #047857 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25) !important;
}
#btn-header-money .money-nav-coin,
#btn-header-money .header-btn-label {
  display: none !important;
}
#btn-header-money .header-ico,
#btn-header-money .money-globe-ico {
  width: 1.15rem !important;
  height: 1.15rem !important;
  display: block !important;
  line-height: 0;
}
#btn-header-money .header-ico svg,
#btn-header-money .money-globe-ico svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Update — gray = current; green = new update ready (never yellow bulk) */
#btn-force-refresh,
#btn-force-refresh.update-current,
#btn-force-refresh.header-icon-only {
  background: #f4f4f5 !important;
  border: 1px solid #e4e4e7 !important;
  color: #a1a1aa !important;
  box-shadow: none !important;
  padding: 0 !important;
  font-weight: 600 !important;
}
#btn-force-refresh.update-current:hover {
  background: #e4e4e7 !important;
  color: #71717a !important;
  filter: none !important;
}
#btn-force-refresh.update-needed {
  background: #ecfdf5 !important;
  border: 1px solid #6ee7b7 !important;
  color: #059669 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12) !important;
  padding: 0 !important;
}
#btn-force-refresh.update-needed:hover {
  background: #d1fae5 !important;
  color: #047857 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.18) !important;
}
#btn-force-refresh .btn-upd-label {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
}
#btn-force-refresh .btn-upd-icon {
  width: 1.1rem !important;
  height: 1.1rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
#btn-force-refresh .btn-upd-icon svg {
  width: 100% !important;
  height: 100% !important;
}
#btn-force-refresh.update-needed .btn-upd-icon {
  animation: update-spin-hint 2.4s ease-in-out infinite;
}
#btn-force-refresh .btn-upd-dot {
  position: absolute !important;
  top: 3px !important;
  right: 3px !important;
  width: 7px !important;
  height: 7px !important;
  border-radius: 999px !important;
  background: #10b981 !important;
  border: 1.5px solid #fff !important;
  box-shadow: 0 0 0 1px rgba(5, 150, 105, 0.25) !important;
  animation: update-dot-pulse 1.6s ease-in-out infinite;
}

/* Logout — round icon only, soft zinc → red on hover */
#btn-logout-top,
#btn-logout-top.header-signout-btn,
#btn-logout-top.header-icon-only {
  background: #fff !important;
  border: 1px solid #e4e4e7 !important;
  color: #71717a !important;
  box-shadow: none !important;
  padding: 0 !important;
  min-width: 2.2rem !important;
  font-size: 0 !important;
}
#btn-logout-top:hover,
#btn-logout-top.header-signout-btn:hover {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #b91c1c !important;
}
#btn-logout-top:active:not(:disabled),
#btn-logout-top.header-signout-btn:active:not(:disabled) {
  transform: scale(0.95);
  background: #fee2e2 !important;
}
#btn-logout-top .header-signout-icon {
  width: 1.1rem !important;
  height: 1.1rem !important;
  display: block !important;
  flex-shrink: 0;
}
#btn-logout-top .header-signout-icon svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
#btn-logout-top .header-signout-label,
#btn-logout-top .header-btn-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 639px) {
  /* Show money icon on phone too when not guest — parent JS may unhide */
  #btn-header-money:not(.hidden) {
    display: inline-flex !important;
  }
  #btn-logout-top .header-signout-label {
    /* keep screen-reader only — never show bulky text */
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
  }
  .header-icon-only,
  #btn-force-refresh,
  #btn-header-money,
  #btn-logout-top {
    width: 2.05rem !important;
    height: 2.05rem !important;
    min-width: 2.05rem !important;
    min-height: 2.05rem !important;
  }
}

@media (min-width: 1024px) {
  .header-icon-only,
  #btn-force-refresh,
  #btn-header-money,
  #btn-logout-top {
    width: 2.35rem !important;
    height: 2.35rem !important;
    min-width: 2.35rem !important;
    min-height: 2.35rem !important;
  }
  #btn-force-refresh .btn-upd-icon,
  #btn-logout-top .header-signout-icon,
  #btn-header-money .money-globe-ico {
    width: 1.2rem !important;
    height: 1.2rem !important;
  }
}

html.dark #btn-force-refresh.update-current {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #a1a1aa !important;
}
html.dark #btn-force-refresh.update-needed {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
  color: #6ee7b7 !important;
}
html.dark #btn-header-money {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(52, 211, 153, 0.3) !important;
  color: #6ee7b7 !important;
}
html.dark #btn-logout-top {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #a1a1aa !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   Modal scroll lock + orphan import kill v572
   Background never scrolls under open sheets (phone + tablet + PC).
   Hidden import modal cannot leak Insert Sales/Purchases/Expenses buttons.
   ═══════════════════════════════════════════════════════════════════════════ */

/* v576: overflow-only scroll lock — NEVER position:fixed (site stuck fix) */
html.mr-scroll-lock,
html.mr-scroll-lock body,
body.mr-scroll-lock {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}
/* Explicitly kill any leftover pin from older builds */
html.mr-scroll-lock body,
body.mr-scroll-lock {
  position: static !important;
  top: auto !important;
  width: auto !important;
  left: auto !important;
  right: auto !important;
  touch-action: auto !important;
}
html.mr-scroll-lock [id$="-modal"]:not(.hidden) .overflow-y-auto,
html.mr-scroll-lock [id$="-modal"]:not(.hidden) .overflow-auto,
html.mr-scroll-lock #ledger-modal-body,
html.mr-scroll-lock #cstore-os-modal:not(.hidden),
html.mr-scroll-lock #cstore-os-modal:not(.hidden) * {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

/* Hard-hide any modal with .hidden — including all descendants */
[id$="-modal"].hidden,
[id$="-modal"].hidden * {
  pointer-events: none !important;
}
#import-modal.hidden,
#import-modal.hidden * {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* Never show bulk Insert actions outside a visible import modal */
body:not(:has(#import-modal:not(.hidden))) #btn-bulk-import-sales-modal,
body:not(:has(#import-modal:not(.hidden))) #btn-bulk-import-purch-modal,
body:not(:has(#import-modal:not(.hidden))) #btn-bulk-import-exp-modal,
body:not(:has(#import-modal:not(.hidden))) #btn-close-import,
#import-modal.hidden #btn-bulk-import-sales-modal,
#import-modal.hidden #btn-bulk-import-purch-modal,
#import-modal.hidden #btn-bulk-import-exp-modal,
#import-modal.hidden #btn-close-import,
#import-modal.hidden #btn-do-import {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Ledger open: kill chrome + stray bars completely */
body.ledger-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}
body.ledger-modal-open #bottom-nav,
body.ledger-modal-open #btn-cstore-os-fab,
body.ledger-modal-open #feature-browser-tab,
body.ledger-modal-open #pwa-install-banner,
body.ledger-modal-open #import-modal,
body.ledger-modal-open #history-modal,
body.ledger-modal-open #reports-modal,
body.ledger-modal-open #reports-detail-modal,
body.ledger-modal-open #query-modal,
body.ledger-modal-open #manage-stores-modal,
body.ledger-modal-open #section-ledger-metrics,
body.ledger-modal-open #section-ledger-table,
body.ledger-modal-open #btn-bulk-import-sales-modal,
body.ledger-modal-open #btn-bulk-import-purch-modal,
body.ledger-modal-open #btn-bulk-import-exp-modal,
body.ledger-modal-open #btn-close-import {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}


/* v1410: never paint Today home over ledger */
body.ledger-modal-open #app-main-column,
body.ledger-modal-open #home-insights,
body.ledger-modal-open #owner-os-rail,
body.ledger-modal-open .app-header,
body.ledger-modal-open #store-hero,
body.ledger-modal-open #shift-dock-launch {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}
/* Ensure open ledger sheet still scrolls inside */
body.ledger-modal-open #ledger-modal:not(.hidden) {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  z-index: 700 !important;
}
body.ledger-modal-open #ledger-modal:not(.hidden) * {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
}
body.ledger-modal-open #ledger-modal:not(.hidden) .hidden,
body.ledger-modal-open #ledger-modal:not(.hidden) .hidden * {
  display: none !important;
}


/* ── Vendor order / hub above AI OS chat (v573) ──
 * HTML default z-[105] sat under #cstore-os-modal (z-500).
 * Tools from OS chat must stack above the brain sheet.
 */
#vendor-order-modal:not(.hidden),
#vendor-hub-modal:not(.hidden),
body.vendor-order-open #vendor-order-modal,
body.cstore-os-open #vendor-order-modal:not(.hidden),
body.cstore-os-open #vendor-hub-modal:not(.hidden),
body.cstore-os-open #catalog-modal:not(.hidden),
body.cstore-os-open #digital-shelf-modal:not(.hidden),
body.cstore-os-open #lottery-hub-modal:not(.hidden),
body.cstore-os-open #reports-modal:not(.hidden),
body.cstore-os-open #ledger-modal:not(.hidden) {
  z-index: 620 !important;
  position: fixed !important;
}
body.vendor-order-open #btn-cstore-os-fab,
body.vendor-order-open #feature-browser-tab {
  visibility: hidden !important;
  pointer-events: none !important;
}
body.vendor-order-open #cstore-os-modal,
body.vendor-hub-open #cstore-os-modal {
  z-index: 500 !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   Money panel overlay fix v574
   - Full-screen / sheet on phone AND PC (not broken inline + scroll-lock)
   - Never combine body.mr-scroll-lock pin with money-panel-open mid-page freeze
   ═══════════════════════════════════════════════════════════════════════════ */

/* Money open: own scroll control — never body position:fixed from scroll-lock */
body.money-panel-open.mr-scroll-lock,
html.mr-scroll-lock body.money-panel-open {
  position: static !important;
  top: auto !important;
  touch-action: auto !important;
}
body.money-panel-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

/* Hide chrome while Money is open (all sizes) */
body.money-panel-open #bottom-nav,
body.money-panel-open #feature-browser-tab,
body.money-panel-open #btn-cstore-os-fab,
body.money-panel-open #pwa-install-banner {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Full overlay sheet — phone + tablet + PC */
body.money-panel-open #home-money-section.money-panel-open {
  position: fixed !important;
  inset: 0 !important;
  z-index: 520 !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  background: rgba(15, 23, 42, 0.45) !important;
  overflow: hidden !important;
  gap: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Hide rest of Today under money overlay (don't freeze them with position fixed body) */
body.money-panel-open #app-main-column > *:not(#home-money-section),
body.money-panel-open .app-header,
body.money-panel-open .store-hero,
body.money-panel-open #store-hero {
  visibility: hidden !important;
  pointer-events: none !important;
}

body.money-panel-open #home-money-section.money-panel-open #home-till-estimate,
body.money-panel-open #home-money-section.money-panel-open #home-till-estimate.card {
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: 42rem !important;
  margin: 0 auto !important;
  height: 100% !important;
  min-height: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #fff !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  padding: 0 !important;
}

body.money-panel-open .money-panel-root {
  flex: 1 1 auto !important;
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: #fff !important;
  border-radius: 0 !important;
}

/* Always show mobile-style top bar with Close on all sizes when open */
body.money-panel-open .money-mobile-bar {
  display: flex !important;
  flex-shrink: 0 !important;
  border-radius: 0 !important;
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: 100% !important;
  z-index: 2 !important;
}
body.money-panel-open .money-mobile-close {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  margin: 0 !important;
  float: none !important;
}

body.money-panel-open .money-panel-scroll {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y !important;
}
body.money-panel-open .money-panel-footer {
  flex-shrink: 0 !important;
  touch-action: auto !important;
}

body.money-panel-open #home-money-section.money-panel-open #home-money-placeholder,
body.money-panel-open #home-money-section.money-panel-open #home-cashflow {
  display: none !important;
}

/* PC: centered card sheet feel */
@media (min-width: 769px) {
  body.money-panel-open #home-money-section.money-panel-open {
    align-items: center !important;
    justify-content: center !important;
    padding: 1.25rem !important;
    background: rgba(15, 23, 42, 0.5) !important;
  }
  body.money-panel-open #home-money-section.money-panel-open #home-till-estimate,
  body.money-panel-open #home-money-section.money-panel-open #home-till-estimate.card {
    max-width: min(36rem, 100%) !important;
    max-height: min(92dvh, 52rem) !important;
    height: auto !important;
    min-height: min(70dvh, 36rem) !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28) !important;
    overflow: hidden !important;
  }
  body.money-panel-open .money-panel-root {
    border-radius: 1.25rem !important;
    max-height: min(92dvh, 52rem) !important;
  }
  body.money-panel-open .money-mobile-bar {
    border-radius: 1.25rem 1.25rem 0 0 !important;
  }
  body.money-panel-open .app-header {
    visibility: visible !important;
    pointer-events: auto !important;
    /* keep header usable? no — hide under dim */
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* Scroll-lock must not pin body when money is the only "open" UI */
html.mr-scroll-lock:has(body.money-panel-open) body,
body.money-panel-open.mr-scroll-lock {
  position: static !important;
  top: auto !important;
  width: 100% !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   Money panel PC hard-hide chrome v575
   Store dock was still painting over Money (pinned z-fixed). Kill it completely.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Beat .store-dock.is-pinned { position:fixed; z-index:45 } and all visibility hacks */
body.money-panel-open #store-hero,
body.money-panel-open #store-hero.store-dock,
body.money-panel-open #store-hero.store-dock.is-pinned,
body.money-panel-open .store-hero,
body.money-panel-open .store-dock,
body.money-panel-open .store-dock.is-pinned,
body.money-panel-open .store-dock-curve-shell,
body.money-panel-open #shift-greeting-bar,
body.money-panel-open .shift-greeting-bar,
body.money-panel-open #store-switch-pill,
body.money-panel-open .app-header,
body.money-panel-open #bottom-nav,
body.money-panel-open #feature-browser-tab,
body.money-panel-open #btn-cstore-os-fab,
body.money-panel-open #pwa-install-banner,
body.money-panel-open #tools-hub,
body.money-panel-open #section-quick-add,
body.money-panel-open #home-insights,
body.money-panel-open #app-loading-shell {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  z-index: -1 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  position: fixed !important;
  left: -9999px !important;
  width: 0 !important;
  height: 0 !important;
}

/* Money sheet always on top of app chrome (below ledger 700) */
body.money-panel-open #home-money-section.money-panel-open {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 640 !important;
  width: 100% !important;
  height: 100% !important;
  height: 100dvh !important;
  max-height: none !important;
  left: 0 !important;
  top: 0 !important;
  background: rgba(15, 23, 42, 0.52) !important;
}

/* Force money chrome visible (beat @media min-width 640 hide of .money-mobile-bar) */
body.money-panel-open .money-mobile-bar,
html body.money-panel-open .money-panel-root > .money-mobile-bar {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  z-index: 5 !important;
  flex-shrink: 0 !important;
}
body.money-panel-open .money-mobile-close {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: relative !important;
  left: auto !important;
  top: auto !important;
}

body.money-panel-open #home-money-section.money-panel-open #home-till-estimate,
body.money-panel-open #home-money-section.money-panel-open #home-till-estimate * {
  visibility: visible;
}
body.money-panel-open #home-money-section.money-panel-open #home-till-estimate {
  pointer-events: auto !important;
  opacity: 1 !important;
  position: relative !important;
  left: auto !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  z-index: 1 !important;
}

@media (min-width: 769px) {
  body.money-panel-open #home-money-section.money-panel-open {
    align-items: center !important;
    justify-content: center !important;
    padding: 1.5rem !important;
  }
  body.money-panel-open #home-money-section.money-panel-open #home-till-estimate {
    max-width: min(36rem, 100%) !important;
    max-height: min(90dvh, 48rem) !important;
    border-radius: 1.25rem !important;
    overflow: hidden !important;
    box-shadow: 0 24px 64px rgba(0,0,0,0.3) !important;
    background: #fff !important;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   Scroll shake fix v577
   - Disable scroll-lock body effects entirely
   - Store dock pin: no transitions that amplify oscillation
   ═══════════════════════════════════════════════════════════════════════════ */
html.mr-scroll-lock,
html.mr-scroll-lock body,
body.mr-scroll-lock {
  overflow: visible !important;
  overscroll-behavior: auto !important;
  position: static !important;
  top: auto !important;
  width: auto !important;
  left: auto !important;
  right: auto !important;
  touch-action: auto !important;
}
/* Dock pin: instant, no transition (transition + pin toggle = vibration) */
#store-hero.store-dock,
#store-hero.store-dock.is-pinned,
.store-dock-curve-shell,
.store-dock-sentinel {
  transition: none !important;
}
body.feature-browser-open {
  /* drawer handles itself — do not lock page scroll under it on desktop */
  overflow: auto !important;
}
@media (max-width: 768px) {
  body.feature-browser-open {
    overflow: hidden !important; /* phone: backdrop only, no body pin */
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   PC layout final v579 — full-width content, compact edge FABs
   ═══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1024px) {
  /* Main column uses more of the screen (was max-w-5xl ~64rem + nested 56rem shrink) */
  #app-main-column.max-w-5xl,
  #app-main-column.max-w-6xl,
  #app-main-column {
    max-width: min(80rem, 96vw) !important;
    width: 100% !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
  .app-header .max-w-5xl,
  .app-header .max-w-6xl,
  .app-header > div {
    max-width: min(80rem, 96vw) !important;
  }

  /* Today cards fill the column — no nested 56rem cage */
  body.mr-strict-today #home-insights.mr-strict-insights,
  body.mr-strict-today #home-insights,
  #home-insights.mr-pro-insights,
  #section-quick-add,
  #section-quick-add.mr-pro-quick-add,
  #tools-hub,
  #tools-hub.mr-pro-tools,
  #store-hero.store-dock,
  #store-hero {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Compact edge FABs — icon + tiny label, not huge tabs */
  #feature-browser-tab,
  #feature-browser-tab:not(.hidden),
  body.has-bottom-nav #feature-browser-tab {
    top: 42% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    padding: 0.4rem 0.28rem 0.4rem 0.38rem !important;
    min-width: 0 !important;
    min-height: 0 !important;
    gap: 0.1rem !important;
    border-radius: 10px 0 0 10px !important;
    font-size: 0.5rem !important;
    letter-spacing: 0.02em !important;
    box-shadow: -2px 0 10px rgba(4, 120, 87, 0.18) !important;
  }
  #feature-browser-tab .fbt-icon {
    font-size: 0.95rem !important;
    line-height: 1 !important;
  }
  #feature-browser-tab .fbt-label {
    display: block !important;
    font-size: 0.5rem !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
  }
  #feature-browser-tab:active {
    transform: translateY(-50%) scale(0.96) !important;
  }

  #btn-cstore-os-fab,
  body.has-bottom-nav #btn-cstore-os-fab {
    top: calc(42% + 3.1rem) !important;
    bottom: auto !important;
    transform: none !important;
    padding: 0.38rem 0.28rem 0.38rem 0.35rem !important;
    min-width: 0 !important;
    min-height: 0 !important;
    gap: 0.05rem !important;
    border-radius: 10px 0 0 10px !important;
    font-size: 0.5rem !important;
    letter-spacing: 0.02em !important;
    background: #27272a !important;
    background-image: none !important;
    border: 1px solid #18181b !important;
    border-right: 0 !important;
    box-shadow: -2px 0 10px rgba(24, 24, 27, 0.2) !important;
    line-height: 1.1 !important;
  }
  #btn-cstore-os-fab .cstore-fab-ico {
    font-size: 0.9rem !important;
    line-height: 1 !important;
  }
  #btn-cstore-os-fab .cstore-fab-label {
    font-size: 0.5rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
  }
}

@media (min-width: 1280px) {
  #app-main-column,
  #app-main-column.max-w-6xl,
  .app-header > div {
    max-width: min(84rem, 94vw) !important;
  }
}

/* Phone: keep FABs compact too (less giant black slab) */
@media (max-width: 639px) {
  #btn-cstore-os-fab,
  body.has-bottom-nav #btn-cstore-os-fab {
    padding: 0.4rem 0.32rem 0.4rem 0.4rem !important;
    min-width: 2.35rem !important;
    min-height: 2.35rem !important;
    font-size: 0.5rem !important;
    border-radius: 10px 0 0 10px !important;
    background: #27272a !important;
    background-image: none !important;
  }
  #btn-cstore-os-fab .cstore-fab-ico { font-size: 0.95rem !important; }
  body.has-bottom-nav #feature-browser-tab {
    padding: 0.4rem 0.32rem 0.4rem 0.4rem !important;
    min-width: 2.35rem !important;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   v586 — structural hide (no per-button ghost hacks)
   Money Close destroyed in JS when closed. Modals use forceHideOverlay.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Whole modal off — parent only (do NOT force-hide every child with visibility:
   that left blank AI OS / Stock when reopen cleared display but not visibility) */
[id$="-modal"].hidden {
  display: none !important;
  pointer-events: none !important;
}
#cstore-os-modal:not(.hidden),
#catalog-modal:not(.hidden) {
  visibility: visible !important;
  pointer-events: auto !important;
  opacity: 1 !important;
}
#cstore-os-modal:not(.hidden) .cstore-os-sheet,
#catalog-modal:not(.hidden) > div {
  visibility: visible !important;
  opacity: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Money section off when closed (panel DOM rebuilt only while open) */
body:not(.money-panel-open) #home-money-section,
#home-money-section.hidden,
#home-money-section:not(.money-panel-open) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
/* Ghost Close kill — only Close chips (section already hidden when Money closed) */
body:not(.money-panel-open) #btn-close-money-panel,
body:not(.money-panel-open) #btn-close-money-foot,
body:not(.money-panel-open) .money-foot-close,
body:not(.money-panel-open) .money-mobile-close,
body:not(.money-panel-open) [aria-label="Close money"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Import bulk actions only inside open import modal */
#import-modal.hidden #btn-close-import,
#import-modal.hidden #btn-bulk-import-sales-modal,
#import-modal.hidden #btn-bulk-import-purch-modal,
#import-modal.hidden #btn-bulk-import-exp-modal {
  display: none !important;
  pointer-events: none !important;
}

/* Mid-page tools teaser removed — wire-host never visible */
#tools-hub,
#tools-hub.tools-hub-wire-host,
#tools-hub.hidden {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  pointer-events: none !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   Pro bottom nav v583 — clean icons, soft emerald active
   ═══════════════════════════════════════════════════════════════════════════ */
#bottom-nav {
  background: rgba(255, 255, 255, 0.97) !important;
  border-top: 1px solid rgba(24, 24, 27, 0.08) !important;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.06) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 250 !important;
}
#bottom-nav > div {
  max-width: 32rem;
  margin: 0 auto;
  gap: 0.15rem;
  padding: 0.35rem 0.4rem 0.4rem !important;
}
#bottom-nav .bnav-btn {
  min-height: 3.15rem !important;
  border-radius: 0.85rem !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #71717a !important;
  font-size: 0.5625rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  gap: 0.2rem !important;
  padding: 0.35rem 0.15rem !important;
  box-shadow: none !important;
}
#bottom-nav .bnav-btn > span:first-child,
#bottom-nav .bnav-btn .bnav-ico {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2rem !important;
  height: 2rem !important;
  border-radius: 0.65rem !important;
  font-size: 1.05rem !important;
  line-height: 1 !important;
  background: #f4f4f5 !important;
  margin-bottom: 0 !important;
}
#bottom-nav .bnav-btn.bnav-btn-active {
  color: #047857 !important;
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  box-shadow: none !important;
}
#bottom-nav .bnav-btn.bnav-btn-active > span:first-child,
#bottom-nav .bnav-btn.bnav-btn-active .bnav-ico,
#bottom-nav .bnav-btn.bnav-btn-active .bnav-money-icon {
  background: #059669 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.28) !important;
}
#bottom-nav .bnav-money-btn {
  color: #71717a !important;
  font-weight: 700 !important;
}
#bottom-nav .bnav-money-btn .bnav-money-icon {
  width: 2rem !important;
  height: 2rem !important;
  border-radius: 0.65rem !important;
  background: #f4f4f5 !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 1.05rem !important;
  margin-bottom: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
#bottom-nav .bnav-money-btn.bnav-btn-active {
  color: #047857 !important;
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
}
#bottom-nav .bnav-money-btn.bnav-btn-active .bnav-money-icon {
  background: #059669 !important;
  color: #fff !important;
  border: none !important;
}
#bottom-nav .bnav-btn:active {
  transform: scale(0.96);
}


/* ═══════════════════════════════════════════════════════════════════════════
   Money panel layout when open (v586) — Close is real DOM only while open
   ═══════════════════════════════════════════════════════════════════════════ */
body.money-panel-open .money-mobile-bar {
  display: flex !important;
  flex-shrink: 0 !important;
}
body.money-panel-open .money-panel-footer {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
  padding: 0.7rem 0.8rem calc(0.75rem + env(safe-area-inset-bottom, 0px)) !important;
  background: #fff !important;
  border-top: 1px solid #e4e4e7 !important;
  flex-shrink: 0 !important;
  width: 100% !important;
}
body.money-panel-open .money-foot-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.4rem !important;
  width: 100% !important;
}
body.money-panel-open .money-foot-btn {
  width: 100% !important;
  min-height: 2.6rem !important;
}
body.money-panel-open #btn-close-money-foot,
body.money-panel-open .money-foot-close {
  display: flex !important;
  width: 100% !important;
  min-height: 2.9rem !important;
  border-radius: 0.9rem !important;
  border: 1px solid #d4d4d8 !important;
  background: #f4f4f5 !important;
  color: #18181b !important;
  font-size: 0.875rem !important;
  font-weight: 800 !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}
body.money-panel-open #btn-close-money-foot:active,
body.money-panel-open .money-foot-close:active {
  background: #e4e4e7 !important;
}
@media (min-width: 640px) {
  body.money-panel-open .money-mobile-bar {
    display: flex !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   v627 — Ledger phone scroll: pin background, only #ledger-modal-body scrolls
   ═══════════════════════════════════════════════════════════════════════════ */
html.ledger-modal-open,
body.ledger-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
  height: 100% !important;
  height: 100dvh !important;
}
body.ledger-modal-open {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}
body.ledger-modal-open #ledger-modal:not(.hidden) {
  display: flex !important;
  align-items: flex-end !important;
  touch-action: none !important;
  overflow: hidden !important;
}
@media (min-width: 640px) {
  body.ledger-modal-open #ledger-modal:not(.hidden) {
    align-items: center !important;
  }
}
body.ledger-modal-open #ledger-modal .ledger-modal-sheet {
  display: flex !important;
  flex-direction: column !important;
  max-height: min(94dvh, 100%) !important;
  height: auto !important;
  overflow: hidden !important;
  touch-action: pan-y !important;
  width: 100% !important;
}
body.ledger-modal-open #ledger-modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  overscroll-behavior-y: contain !important;
  touch-action: pan-y !important;
}
body.ledger-modal-open #main-content,
body.ledger-modal-open #app-main-column,
body.ledger-modal-open #home-insights,
body.ledger-modal-open .store-dock {
  overscroll-behavior: none !important;
  touch-action: none !important;
  pointer-events: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   v628 — Smart Quick Insights compact (kill whitespace + readable phone type)
   ═══════════════════════════════════════════════════════════════════════════ */
#home-store-pulse.sqi-compact,
#home-store-pulse.qi-live-card.sqi-compact {
  padding: 0.7rem 0.75rem !important;
  border-radius: 1rem !important;
}
#home-store-pulse .insight-mood-banner {
  margin: 0 0 0.45rem !important;
  padding: 0.5rem 0.6rem !important;
  border-radius: 0.75rem !important;
}
#home-store-pulse .insight-mood-emoji {
  font-size: 1.15rem !important;
  line-height: 1.1 !important;
}
#home-store-pulse .insight-mood-banner-title {
  font-size: 0.78rem !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}
#home-store-pulse .insight-mood-banner-body {
  font-size: 0.68rem !important;
  line-height: 1.3 !important;
  margin-top: 0.12rem !important;
  opacity: 0.92;
}

/* Hero: amounts left, All/Reports right — no tall pill column */
#home-store-pulse .qi-hero-head.sqi-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 0.5rem !important;
  margin: 0 0 0.35rem !important;
}
#home-store-pulse .qi-hero-eyebrow {
  font-size: 0.58rem !important;
  letter-spacing: 0.05em !important;
  margin: 0 0 0.2rem !important;
  line-height: 1.2 !important;
}
#home-store-pulse .qi-hero-headline {
  font-size: 1.05rem !important;
  line-height: 1.25 !important;
  margin: 0 !important;
  font-weight: 800 !important;
}
#home-store-pulse .qi-hero-amount {
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.15 !important;
}
#home-store-pulse .qi-hero-unit {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #52525b !important;
}
#home-store-pulse .qi-hero-stat-line {
  display: block !important;
  margin: 0.05rem 0 !important;
}
#home-store-pulse .sqi-head-btns {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.3rem !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
}
#home-store-pulse .sqi-head-btns .mm-chip-btn {
  min-height: 2rem !important;
  padding: 0.3rem 0.55rem !important;
  font-size: 0.68rem !important;
  white-space: nowrap !important;
}

/* Meta pills under amounts — horizontal wrap, no side void */
#home-store-pulse .sqi-meta-row,
#home-store-pulse .qi-hero-meta.sqi-meta-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.3rem !important;
  margin: 0 0 0.5rem !important;
}
#home-store-pulse .qi-meta-pill {
  font-size: 0.62rem !important;
  padding: 0.22rem 0.48rem !important;
  line-height: 1.2 !important;
}

/* Pace row tight */
#home-store-pulse .mm-pace-row {
  margin: 0 0 0.5rem !important;
}
#home-store-pulse .mm-pace-labels {
  display: flex !important;
  justify-content: space-between !important;
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  color: #52525b !important;
  margin-bottom: 0.2rem !important;
}
#home-store-pulse .mm-pace-bar,
#home-store-pulse .health-bar.mm-pace-bar {
  height: 0.4rem !important;
  border-radius: 999px !important;
}

/* KPI grid — readable, not micro-type */
#home-store-pulse .qi-panel {
  margin-top: 0 !important;
  margin-bottom: 0.5rem !important;
  padding: 0.45rem !important;
  border-radius: 0.85rem !important;
}
#home-store-pulse .qi-panel-kpis {
  padding: 0.4rem !important;
}
#home-store-pulse .qi-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0.35rem !important;
}
#home-store-pulse .qi-kpi {
  padding: 0.4rem 0.3rem !important;
  border-radius: 0.65rem !important;
  min-width: 0 !important;
}
#home-store-pulse .qi-kpi-glyph {
  font-size: 0.85rem !important;
  line-height: 1 !important;
  margin-bottom: 0.1rem !important;
}
#home-store-pulse .qi-kpi-label {
  font-size: 0.55rem !important;
  line-height: 1.15 !important;
  letter-spacing: 0.02em !important;
}
#home-store-pulse .qi-kpi-val {
  font-size: 0.88rem !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  margin-top: 0.08rem !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
#home-store-pulse .qi-kpi-sub {
  font-size: 0.52rem !important;
  line-height: 1.15 !important;
  margin-top: 0.08rem !important;
}
#home-store-pulse .qi-kpi-spark {
  margin-top: 0.2rem !important;
  height: 3px !important;
}

/* Week / forecast tiles */
#home-store-pulse .mm-tiles {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0.35rem !important;
  margin: 0 0 0.5rem !important;
}
#home-store-pulse .mm-tile {
  padding: 0.4rem 0.35rem !important;
  border-radius: 0.7rem !important;
  min-height: 0 !important;
  text-align: left !important;
}
#home-store-pulse .mm-tile-l {
  font-size: 0.52rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  color: #71717a !important;
  display: block !important;
}
#home-store-pulse .mm-tile-v {
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  display: block !important;
  margin-top: 0.1rem !important;
}
#home-store-pulse .mm-tile-h {
  font-size: 0.5rem !important;
  color: #a1a1aa !important;
  display: block !important;
  margin-top: 0.08rem !important;
  line-height: 1.2 !important;
}

#home-store-pulse .qi-panel-actions,
#home-store-pulse .qi-panel-narratives,
#home-store-pulse .qi-empty-steps,
#home-store-pulse .qi-pay-strip,
#home-store-pulse .qi-partner-banner {
  margin-top: 0.45rem !important;
  margin-bottom: 0 !important;
}
#home-store-pulse .qi-empty-steps {
  font-size: 0.72rem !important;
  padding: 0.45rem 0.5rem !important;
  color: #71717a !important;
}

@media (max-width: 639px) {
  #home-store-pulse.sqi-compact {
    padding: 0.65rem 0.7rem !important;
  }
  #home-store-pulse .qi-hero-amount {
    font-size: 1.28rem !important;
  }
  #home-store-pulse .qi-hero-headline {
    font-size: 1rem !important;
  }
  #home-store-pulse .qi-hero-unit {
    font-size: 0.72rem !important;
  }
  /* 2x2 KPI grid on phone — larger type */
  #home-store-pulse .qi-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.4rem !important;
  }
  #home-store-pulse .qi-kpi-val {
    font-size: 0.95rem !important;
  }
  #home-store-pulse .qi-kpi-label {
    font-size: 0.58rem !important;
  }
  #home-store-pulse .qi-kpi-sub {
    font-size: 0.55rem !important;
  }
  #home-store-pulse .qi-kpi-glyph {
    display: block !important;
  }
  #home-store-pulse .mm-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.4rem !important;
  }
  #home-store-pulse .mm-tile-v {
    font-size: 0.9rem !important;
  }
  #home-store-pulse .mm-tile-l {
    font-size: 0.55rem !important;
  }
  #home-store-pulse .mm-tile-h {
    font-size: 0.52rem !important;
  }
  #home-store-pulse .sqi-head-btns {
    flex-direction: row !important;
  }
  #home-store-pulse .qi-meta-pill {
    font-size: 0.6rem !important;
  }
}
@media (max-width: 380px) {
  #home-store-pulse .qi-hero-amount {
    font-size: 1.15rem !important;
  }
  #home-store-pulse .qi-kpi-val {
    font-size: 0.88rem !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   v631 — Product month insights card + synced shelf labels
   ═══════════════════════════════════════════════════════════════════════════ */
#home-product-movers {
  padding: 0.85rem 0.9rem !important;
}
#home-product-movers .pm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}
#home-product-movers .pm-kicker {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0369a1;
}
#home-product-movers .pm-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 0.1rem;
  letter-spacing: -0.02em;
}
#home-product-movers .pm-sub {
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 0.2rem;
  line-height: 1.35;
}
#home-product-movers .pm-open-out {
  flex-shrink: 0;
  border: 1px solid #bae6fd;
  background: #e0f2fe;
  color: #0c4a6e;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.4rem 0.65rem;
  border-radius: 0.75rem;
  cursor: pointer;
}
#home-product-movers .pm-search-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}
#home-product-movers .pm-search {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.85rem;
  background: #fff;
}
#home-product-movers .pm-search-btn {
  flex-shrink: 0;
  border: none;
  background: #0284c7;
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.75rem;
  cursor: pointer;
}
#home-product-movers .pm-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: min(52dvh, 22rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#home-product-movers .pm-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 0.85rem;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
}
#home-product-movers .pm-row:active { background: #f8fafc; }
#home-product-movers .pm-row-main { flex: 1 1 auto; min-width: 0; }
#home-product-movers .pm-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}
#home-product-movers .pm-meta {
  font-size: 0.62rem;
  color: #64748b;
  margin-top: 0.12rem;
  line-height: 1.3;
}
#home-product-movers .pm-stats {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}
#home-product-movers .pm-stat {
  text-align: center;
  min-width: 2.6rem;
  padding: 0.2rem 0.25rem;
  border-radius: 0.5rem;
  background: #f1f5f9;
}
#home-product-movers .pm-stat-v {
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
#home-product-movers .pm-stat-l {
  display: block;
  font-size: 0.48rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 0.05rem;
}
#home-product-movers .pm-lane {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 900;
  padding: 0.1rem 0.3rem;
  border-radius: 0.3rem;
  margin-left: 0.25rem;
  vertical-align: middle;
}
#home-product-movers .pm-out { background: #fee2e2; color: #b91c1c; }
#home-product-movers .pm-low { background: #fef3c7; color: #b45309; }
#home-product-movers .pm-empty {
  font-size: 0.78rem;
  color: #64748b;
  padding: 0.85rem 0.5rem;
  text-align: center;
  line-height: 1.4;
}
#home-product-movers .pm-foot {
  margin-top: 0.5rem;
  font-size: 0.62rem;
  color: #94a3b8;
  line-height: 1.35;
}
@media (max-width: 420px) {
  #home-product-movers .pm-stats { gap: 0.25rem; }
  #home-product-movers .pm-stat { min-width: 2.35rem; }
  #home-product-movers .pm-stat-v { font-size: 0.72rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   v633 — Desktop: never show phone bottom nav · restore modal Closes
   ═══════════════════════════════════════════════════════════════════════════ */

/* Phone bottom nav is PHONE ONLY (beats any !important display:block from old CSS) */
@media (min-width: 640px) {
  #bottom-nav {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
  }
  body.has-bottom-nav {
    padding-bottom: 0 !important;
  }
  body.app-employee-session #bottom-nav,
  body.app-employee-session #bottom-nav [data-bnav] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* Employee: hide Money chrome only (never hide catalog/lottery/reports Close) */
body.app-employee-session #btn-close-money-panel,
body.app-employee-session #btn-close-money-foot,
body.app-employee-session .money-foot-close,
body.app-employee-session .money-mobile-close,
body.app-employee-session .money-panel-footer,
body.app-employee-session .money-mobile-bar,
body.app-employee-session [aria-label="Close money"],
body.app-employee-session #home-money-section {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   v661 — No bidirectional home flash (employee ↔ owner Pro insights)
   CSS hard-gates paint so JS race cannot show the wrong desk.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Employee: never paint owner Pro / Smart Quick Insights / sell wall */
body.app-employee-session #home-store-pulse,
body.app-employee-session #home-combined-insights,
body.app-employee-session #home-smart-insights,
body.app-employee-session #home-sell-actions,
body.app-employee-session #home-plan-line,
body.app-employee-session #home-owner-moat,
body.app-employee-session #home-upgrade-banner,
body.app-employee-session #home-staff-adoption,
body.app-employee-session #home-all-stores-analytics,
body.app-employee-session #home-retailer-command,
body.app-employee-session #home-today-card,
body.app-employee-session #home-shelf-overview,
body.app-employee-session #home-shelf-pulse,
body.app-employee-session #home-pos-connect,
body.app-employee-session #home-pos-parallel,
body.app-employee-session #home-deposit-match,
body.app-employee-session #home-strict-urgent,
body.app-employee-session #home-more-insights-bar,
body.app-employee-session #free-plan-tools-legend,
/* Owner Pro shell tools — NOT the daily log form when employee opens it */
body.app-employee-session #tools-hub,
body.app-employee-session #btn-upgrade-pro,
body.app-employee-session #home-empty-workspace {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  max-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* v990 Employee books: SAME panel as owner (Daily Sale · Purchase · Expense · Deposit).
   Form opens in place under the buttons — no empty shell, no heal-script wars. */
body.app-employee-session #section-quick-add,
body.app-employee-session #section-quick-add.employee-books-open,
body.app-employee-session #section-quick-add.employee-form-only {
  display: block !important;
  visibility: visible !important;
  pointer-events: auto !important;
  max-height: none !important;
  overflow: visible !important;
  opacity: 1 !important;
  height: auto !important;
  margin: 0.75rem 0 1rem 0 !important;
  padding: 1rem 1.15rem !important;
  border: 1px solid rgba(16, 185, 129, 0.28) !important;
  border-radius: 1.25rem !important;
  background: #fff !important;
  position: relative !important;
  z-index: 40 !important;
}
body.app-employee-session #section-quick-add .quick-primary-grid {
  display: grid !important;
}
body.app-employee-session #section-quick-add .quick-btn[data-type="daily_sale"],
body.app-employee-session #section-quick-add .quick-btn[data-type="purchase"],
body.app-employee-session #section-quick-add .quick-btn[data-type="expense"],
body.app-employee-session #section-quick-add .quick-btn[data-type="cash_drop"] {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
body.app-employee-session #section-quick-add #btn-quick-reports,
body.app-employee-session #section-quick-add #btn-quick-more-toggle,
body.app-employee-session #section-quick-add #quick-more-row {
  display: none !important;
}
body.app-employee-session #section-quick-add #add-form.hidden {
  display: none !important;
}
body.app-employee-session #section-quick-add #add-form:not(.hidden) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  max-height: none !important;
  overflow: visible !important;
  pointer-events: auto !important;
  height: auto !important;
  position: relative !important;
}
/* Owner + employee: never clip books form inside .card height:100% */
#section-quick-add.card,
#section-quick-add.mr-pro-quick-add {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  min-height: 0 !important;
}

/* Owner: employee desk must never appear */
body.app-owner-session:not(.app-employee-session) #home-employee-panel,
body:not(.app-employee-session) #home-employee-panel {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  max-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
}
/* Employee session: show desk with real spacing (no padding:unset) */
body.app-employee-session #home-employee-panel,
body.app-home-ready.app-employee-session #home-employee-panel,
html body.app-home-ready.app-employee-session #home-insights > #home-employee-panel {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  max-height: none !important;
  overflow: visible !important;
  height: auto !important;
  margin: 0.65rem 0 0.85rem !important;
  padding: 1rem 1.1rem 1.15rem !important;
  border: 1px solid #dbeafe !important;
  border-radius: 1.25rem !important;
  background: linear-gradient(165deg, #eff6ff 0%, #fff 55%) !important;
}
body.app-employee-session #home-employee-panel.emp-ws-panel {
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.07);
}
/* Staff hosts: no display:block force (v883 layout-safe) */
body.app-home-ready.app-employee-session #home-stock-road:not(.hidden),
body.app-home-ready.app-employee-session #home-team-chat:not(.hidden),
body.app-home-ready.app-employee-session #home-shift-tasks:not(.hidden),
body.app-home-ready.app-employee-session #home-dashboard-status:not(.hidden) {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Role pending (stores not loaded): hide BOTH flash surfaces */
body.app-role-pending #home-employee-panel,
body.app-role-pending #home-store-pulse,
body.app-role-pending #home-combined-insights,
body.app-role-pending #home-smart-insights,
body.app-role-pending #home-sell-actions,
body.app-role-pending #home-plan-line,
body.app-role-pending #home-staff-adoption,
body.app-role-pending #home-upgrade-banner {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* Employee phone nav: Home · Stock · Lottery only (mobile) */
@media (max-width: 639px) {
  body.app-employee-session #bottom-nav [data-bnav="home"],
  body.app-employee-session #bottom-nav [data-bnav="inventory"],
  body.app-employee-session #bottom-nav [data-bnav="lottery"] {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    opacity: 1 !important;
  }
  body.app-employee-session #bottom-nav [data-bnav="money"],
  body.app-employee-session #bottom-nav [data-bnav="reports"] {
    display: none !important;
    pointer-events: none !important;
  }
}

/* Strip Pro lock badges on employee surfaces — keep buttons tappable */
body.app-employee-session #home-employee-panel .feature-lock-badge,
body.app-employee-session #bottom-nav .feature-lock-badge {
  display: none !important;
}
body.app-employee-session #home-employee-panel .feature-locked,
body.app-employee-session #bottom-nav .feature-locked {
  opacity: 1 !important;
  filter: none !important;
  pointer-events: auto !important;
}

/* Modal Close buttons always work when their modal is open */
[id$="-modal"]:not(.hidden) button[id^="btn-close-"],
[id$="-modal"]:not(.hidden) button[id$="-close"],
.sr-modal:not(.hidden) button[id^="btn-close-"],
[role="dialog"]:not(.hidden) button[id^="btn-close-"] {
  display: inline-flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
  opacity: 1 !important;
}

/* Employee home panel always tappable */
#home-employee-panel .emp-home-btn {
  pointer-events: auto !important;
  cursor: pointer !important;
  opacity: 1 !important;
  position: relative;
  z-index: 2;
}
#home-employee-panel .emp-home-btn.feature-locked,
#home-employee-panel .emp-home-btn.feature-included {
  opacity: 1 !important;
  filter: none !important;
  pointer-events: auto !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   v636 — Employee workspace full width + side rail (no dead white space)
   ═══════════════════════════════════════════════════════════════════════════ */
#home-employee-panel.emp-ws-panel,
#home-employee-panel {
  max-width: none !important;
  width: 100% !important;
}

.emp-ws-head { margin-bottom: 0.75rem; }

/* Hero: points card + companion rail side by side on PC */
.emp-ws-hero {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0.85rem !important;
  margin: 0.5rem 0 1.1rem !important;
  align-items: stretch !important;
}
@media (min-width: 900px) {
  .emp-ws-hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) !important;
    gap: 1rem !important;
  }
}
@media (min-width: 1200px) {
  .emp-ws-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) !important;
  }
}

#home-employee-points,
.emp-points-host {
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  min-width: 0 !important;
}
body.app-employee-session #home-employee-points {
  display: block !important;
  visibility: visible !important;
}

/* Companion side rail */
.emp-side {
  min-width: 0 !important;
  height: 100% !important;
}
.emp-side-card {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.65rem !important;
  padding: 0.95rem 1rem !important;
  border-radius: 1.35rem !important;
  border: 1px solid rgba(59, 130, 246, 0.18) !important;
  background:
    linear-gradient(165deg, #eff6ff 0%, #fff 38%, #f0fdf4 100%) !important;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 28px rgba(37, 99, 235, 0.07) !important;
}
.emp-side-kicker {
  font-size: 0.6rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: #1d4ed8 !important;
}
.emp-side-title {
  font-size: 1rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em !important;
  margin-top: -0.25rem !important;
}
.emp-side-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.45rem !important;
}
@media (min-width: 1100px) {
  .emp-side-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
.emp-side-act {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 0.15rem !important;
  padding: 0.65rem 0.7rem !important;
  border-radius: 0.9rem !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
  cursor: pointer !important;
  text-align: left !important;
  transition: transform 0.1s ease, box-shadow 0.1s ease !important;
  min-height: 4.1rem !important;
}
.emp-side-act:hover {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12) !important;
  border-color: rgba(37, 99, 235, 0.25) !important;
}
.emp-side-act:active { transform: scale(0.98) !important; }
.emp-side-ico { font-size: 1.15rem !important; line-height: 1 !important; }
.emp-side-lab {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
}
.emp-side-pts {
  font-size: 0.65rem !important;
  font-weight: 900 !important;
  color: #047857 !important;
}
.emp-side-why {
  padding: 0.65rem 0.75rem !important;
  border-radius: 0.9rem !important;
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid rgba(16, 185, 129, 0.2) !important;
  font-size: 0.7rem !important;
  line-height: 1.4 !important;
  color: #334155 !important;
}
.emp-side-why strong {
  display: block !important;
  font-size: 0.6rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #047857 !important;
  margin-bottom: 0.2rem !important;
}

/* Raise ladder mini */
.emp-side-ladder {
  margin-top: 0.15rem !important;
}
.emp-ladder-head,
.emp-recent-head {
  font-size: 0.6rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #64748b !important;
  margin-bottom: 0.35rem !important;
}
.emp-ladder-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.28rem !important;
}
.emp-ladder-row {
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  padding: 0.4rem 0.55rem !important;
  border-radius: 0.7rem !important;
  background: rgba(255, 255, 255, 0.75) !important;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: #64748b !important;
}
.emp-ladder-row.is-hit {
  background: #ecfdf5 !important;
  border-color: rgba(16, 185, 129, 0.28) !important;
  color: #047857 !important;
}
.emp-ladder-row.is-next {
  background: #fffbeb !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #b45309 !important;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.12) !important;
}
.emp-ladder-badge { flex-shrink: 0; }
.emp-ladder-name { flex: 1; min-width: 0; }
.emp-ladder-pts {
  font-variant-numeric: tabular-nums;
  font-weight: 900 !important;
  font-size: 0.65rem !important;
}

.emp-side-recent { margin-top: 0.15rem !important; }
.emp-recent-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.2rem !important;
}
.emp-recent-row {
  display: flex !important;
  justify-content: space-between !important;
  gap: 0.5rem !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  color: #475569 !important;
  padding: 0.25rem 0 !important;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.06) !important;
}
.emp-recent-pts {
  font-weight: 900 !important;
  color: #047857 !important;
  flex-shrink: 0 !important;
}
.emp-recent-empty {
  font-size: 0.68rem !important;
  color: #94a3b8 !important;
  line-height: 1.35 !important;
}

.emp-ws-tools {
  margin-top: 0.25rem !important;
  padding-top: 0.35rem !important;
  border-top: 1px solid rgba(15, 23, 42, 0.06) !important;
}

/* Card shell */
.ep-card {
  border-radius: 1.35rem !important;
  overflow: hidden !important;
  border: 1px solid rgba(5, 150, 105, 0.18) !important;
  background: #fff !important;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 28px rgba(4, 120, 87, 0.08) !important;
}

/* Emerald → amber head */
.ep-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
  padding: 0.95rem 1rem 0.9rem !important;
  background:
    linear-gradient(135deg, #047857 0%, #059669 42%, #d97706 100%) !important;
  color: #fff !important;
}
.ep-head-text { min-width: 0; flex: 1; }
.ep-kicker {
  font-size: 0.6rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: rgba(255, 255, 255, 0.78) !important;
  margin-bottom: 0.2rem !important;
}
.ep-title {
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
  color: #fff !important;
}
.ep-sub {
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.82) !important;
  margin-top: 0.2rem !important;
  line-height: 1.3 !important;
}

/* Big score pill */
.ep-score {
  flex-shrink: 0 !important;
  min-width: 4.1rem !important;
  text-align: center !important;
  padding: 0.45rem 0.55rem 0.4rem !important;
  border-radius: 1rem !important;
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
}
.ep-score-n {
  font-size: 1.65rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  color: #fff !important;
  letter-spacing: -0.03em !important;
  font-variant-numeric: tabular-nums;
}
.ep-score-l {
  font-size: 0.58rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.14em !important;
  color: rgba(255, 255, 255, 0.85) !important;
  margin-top: 0.15rem !important;
}

/* Body */
.ep-body {
  padding: 0.85rem 0.95rem 0.95rem !important;
  background: linear-gradient(180deg, #f8fffc 0%, #fff 40%) !important;
}

.ep-bar-meta {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 0.35rem !important;
}
.ep-bar-label {
  font-size: 0.62rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #64748b !important;
}
.ep-bar-nums {
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  color: #047857 !important;
  font-variant-numeric: tabular-nums;
}

/* Fat progress track — always visible */
.ep-bar {
  height: 0.7rem !important;
  border-radius: 999px !important;
  background: #e2e8f0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}
.ep-bar-fill,
.ep-bar > i {
  display: block !important;
  height: 100% !important;
  min-width: 0.5rem !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #f59e0b 0%, #10b981 55%, #047857 100%) !important;
  box-shadow: 0 0 0 1px rgba(4, 120, 87, 0.15), 0 2px 6px rgba(16, 185, 129, 0.35) !important;
  transition: width 0.35s ease !important;
}

.ep-next {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.35rem !important;
  margin: 0.45rem 0 0.7rem !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: #334155 !important;
}
.ep-next-main { min-width: 0; }
.ep-next-streak {
  flex-shrink: 0 !important;
  padding: 0.15rem 0.5rem !important;
  border-radius: 999px !important;
  background: #fff7ed !important;
  border: 1px solid #fed7aa !important;
  color: #c2410c !important;
  font-size: 0.65rem !important;
  font-weight: 800 !important;
}

/* Stat chips */
.ep-stats {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 0.45rem !important;
  margin-bottom: 0.7rem !important;
}
.ep-stat {
  text-align: center !important;
  padding: 0.55rem 0.25rem 0.5rem !important;
  border-radius: 0.9rem !important;
  border: 1px solid transparent !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
}
.ep-stat b {
  display: block !important;
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em !important;
}
.ep-stat span {
  display: block !important;
  margin-top: 0.15rem !important;
  font-size: 0.58rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  opacity: 0.85;
}
.ep-stat-today {
  background: linear-gradient(165deg, #ecfdf5 0%, #d1fae5 100%) !important;
  border-color: rgba(16, 185, 129, 0.28) !important;
  color: #047857 !important;
}
.ep-stat-week {
  background: linear-gradient(165deg, #eff6ff 0%, #dbeafe 100%) !important;
  border-color: rgba(59, 130, 246, 0.28) !important;
  color: #1d4ed8 !important;
}
.ep-stat-streak {
  background: linear-gradient(165deg, #fff7ed 0%, #ffedd5 100%) !important;
  border-color: rgba(249, 115, 22, 0.3) !important;
  color: #c2410c !important;
}

/* Raise callout */
.ep-raise {
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.55rem !important;
  padding: 0.65rem 0.75rem !important;
  border-radius: 0.95rem !important;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
  border: 1px solid #fcd34d !important;
  margin-bottom: 0.5rem !important;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.12) !important;
}
.ep-raise-ico {
  font-size: 1.1rem !important;
  line-height: 1.2 !important;
  flex-shrink: 0 !important;
}
.ep-raise-text {
  min-width: 0 !important;
  font-size: 0.72rem !important;
  line-height: 1.35 !important;
  color: #78350f !important;
}
.ep-raise-text strong {
  display: block !important;
  font-size: 0.62rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #b45309 !important;
  margin-bottom: 0.12rem !important;
}
.ep-raise-text span {
  font-weight: 600 !important;
  color: #92400e !important;
}

.ep-earn-hint {
  font-size: 0.62rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
  line-height: 1.35 !important;
  margin-bottom: 0.65rem !important;
  text-align: center !important;
}

/* Solid CTA — matches In / Tasks weight */
.ep-cta {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  width: 100% !important;
  min-height: 2.75rem !important;
  padding: 0.7rem 1rem !important;
  border: none !important;
  border-radius: 0.95rem !important;
  background: linear-gradient(165deg, #10b981 0%, #047857 100%) !important;
  color: #fff !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 4px 14px rgba(4, 120, 87, 0.35) !important;
  cursor: pointer !important;
  transition: transform 0.12s ease, box-shadow 0.12s ease !important;
}
.ep-cta:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 6px 18px rgba(4, 120, 87, 0.42) !important;
}
.ep-cta:active {
  transform: scale(0.98) !important;
}
.ep-cta-arrow {
  font-size: 1rem !important;
  font-weight: 900 !important;
  opacity: 0.9;
}

/* Modal */
#emp-points-modal {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
#emp-points-modal.hidden { display: none !important; }
@media (min-width: 640px) {
  #emp-points-modal { align-items: center; }
}

/* Employee home: use full insights width on PC */
body.app-employee-session #home-insights,
body.app-employee-session #home-employee-panel {
  max-width: none !important;
  width: 100% !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   v664/v666 — Kill EMPTY white full-screen Close-only overlay (not real tools)
   Screenshot bug: full white page with only "Close" centered.
   Real Money requires .money-panel-root with content. Real tools keep their Close.
   ═══════════════════════════════════════════════════════════════════════════ */
body:not(.money-panel-open) #home-money-section,
body:not(.money-panel-open) #home-money-section.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}
/* Money class stuck but NO real panel content → never paint white Close shell */
body.money-panel-open:not(:has(#home-money-section .money-panel-root)) #home-money-section,
#home-money-section.money-panel-open:not(:has(.money-panel-root)) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  position: static !important;
  inset: auto !important;
  z-index: -1 !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}
body.money-panel-open:not(:has(#home-money-section .money-panel-root)) {
  /* don't leave page locked under empty money */
}
body:not(.money-panel-open) #btn-close-money-panel,
body:not(.money-panel-open) #btn-close-money-foot,
body:not(.money-panel-open) .money-foot-close,
body:not(.money-panel-open) .money-mobile-close,
body:not(.money-panel-open) .money-panel-footer,
body:not(.money-panel-open) .money-mobile-bar,
body:not(.money-panel-open) .money-panel-root,
body.money-panel-open:not(:has(#home-money-section .money-panel-root)) #btn-close-money-panel,
body.money-panel-open:not(:has(#home-money-section .money-panel-root)) #btn-close-money-foot,
body.money-panel-open:not(:has(#home-money-section .money-panel-root)) .money-foot-close,
body.money-panel-open:not(:has(#home-money-section .money-panel-root)) .money-mobile-close {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
/* Closed modals: whole shell off — do NOT permanently style Close children
   (that broke reopen: Close stayed display:none after force-show). */
[id$="-modal"].hidden {
  pointer-events: none !important;
}
/* OPEN modals: Close is always visible + tappable */
[id$="-modal"]:not(.hidden) button[id^="btn-close-"],
[id$="-modal"]:not(.hidden) button[id$="-close"],
[id$="-modal"]:not(.hidden) .manage-stores-close,
body.ledger-modal-open #btn-close-ledger-modal,
body.ledger-modal-open #btn-ledger-modal-close-foot {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 5 !important;
  position: relative !important;
  cursor: pointer !important;
}
/* When any major tool is open, money shell cannot sit on top */
body:has(#catalog-modal:not(.hidden)) #home-money-section,
body:has(#reports-modal:not(.hidden)) #home-money-section,
body:has(#lottery-hub-modal:not(.hidden)) #home-money-section,
body:has(#ledger-modal:not(.hidden)) #home-money-section,
body:has(#manage-stores-modal:not(.hidden)) #home-money-section,
body:has(#admin-dashboard-modal:not(.hidden)) #home-money-section,
body:has(#more-hub-modal:not(.hidden)) #home-money-section,
body.feature-browser-open #home-money-section {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  z-index: -1 !important;
}
#admin-dashboard-modal:not(.hidden) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 720 !important;
  position: fixed !important;
  inset: 0 !important;
}
#feature-browser-drawer.is-open {
  z-index: 640 !important;
  transform: translateX(0) !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
#feature-browser-backdrop.is-open {
  z-index: 630 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   v662 — Employee main container padding (Team desk / workspace breathing room)
   ═══════════════════════════════════════════════════════════════════════════ */
body.app-employee-session #app-main-column {
  padding-left: 1.15rem !important;
  padding-right: 1.15rem !important;
  padding-top: 0 !important; /* v1389 pure flow */
  padding-bottom: 1.75rem !important;
  gap: 0.35rem !important;
  box-sizing: border-box !important;
}
@media (min-width: 640px) {
  body.app-employee-session #app-main-column {
    padding-left: 1.75rem !important;
    padding-right: 1.75rem !important;
    padding-top: 0 !important; /* v1389 pure flow */
    padding-bottom: 2rem !important;
    gap: 0.45rem !important;
  }
}
@media (min-width: 1024px) {
  body.app-employee-session #app-main-column {
    padding-left: 2.25rem !important;
    padding-right: 2.25rem !important;
    max-width: min(72rem, 94vw) !important;
  }
}
body.app-employee-session #home-insights {
  gap: 0.9rem !important;
  padding-left: 0.15rem !important;
  padding-right: 0.15rem !important;
  box-sizing: border-box !important;
}
body.app-employee-session #store-hero,
body.app-employee-session #home-tonight-strip {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.app-employee-session #home-employee-panel.emp-ws-panel,
body.app-employee-session #home-employee-panel,
body.app-employee-session #home-team-chat {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  box-sizing: border-box !important;
}
@media (min-width: 640px) {
  body.app-employee-session #home-employee-panel.emp-ws-panel,
  body.app-employee-session #home-employee-panel,
  body.app-employee-session #home-team-chat {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    padding-top: 1.15rem !important;
    padding-bottom: 1.15rem !important;
  }
}

/* Owner team board polish */
#store-team-engage-board {
  margin-bottom: 0.75rem;
  border-radius: 1.1rem !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  background: linear-gradient(165deg, #fffbeb 0%, #fff 70%) !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.08) !important;
}
#store-team-engage-board #btn-owner-emp-points-full {
  background: linear-gradient(165deg, #f59e0b 0%, #d97706 100%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 0.75rem !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3) !important;
}

@media (max-width: 380px) {
  .ep-title { font-size: 0.95rem !important; }
  .ep-score-n { font-size: 1.4rem !important; }
  .ep-stat b { font-size: 1.05rem !important; }
  .ep-cta { font-size: 0.75rem !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   v637 — Must-use shift duties + owner staff adoption (store in your hand)
   ═══════════════════════════════════════════════════════════════════════════ */
.emp-duties-host {
  margin: 0.65rem 0 0.85rem !important;
  width: 100% !important;
}
.emp-duty-card {
  border-radius: 1.35rem !important;
  border: 1px solid rgba(124, 58, 237, 0.22) !important;
  background: linear-gradient(165deg, #f5f3ff 0%, #fff 45%, #ecfdf5 100%) !important;
  padding: 0.95rem 1rem !important;
  box-shadow: 0 8px 28px rgba(91, 33, 182, 0.08) !important;
}
.emp-duty-card.is-mandate {
  border-color: rgba(220, 38, 38, 0.28) !important;
  box-shadow: 0 8px 28px rgba(220, 38, 38, 0.1) !important;
}
.emp-duty-card.is-complete {
  border-color: rgba(16, 185, 129, 0.35) !important;
  background: linear-gradient(165deg, #ecfdf5 0%, #fff 50%) !important;
}
.emp-duty-top {
  display: flex !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
  align-items: flex-start !important;
  margin-bottom: 0.55rem !important;
}
.emp-duty-kicker {
  font-size: 0.58rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: #6d28d9 !important;
}
.emp-duty-card.is-mandate .emp-duty-kicker { color: #b91c1c !important; }
.emp-duty-title {
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em !important;
  margin-top: 0.15rem !important;
  line-height: 1.25 !important;
}
.emp-duty-sub {
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
  margin-top: 0.2rem !important;
  line-height: 1.35 !important;
}
.emp-duty-score {
  flex-shrink: 0 !important;
  text-align: center !important;
  min-width: 3.6rem !important;
  padding: 0.4rem 0.5rem !important;
  border-radius: 0.9rem !important;
  background: #fff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
}
.emp-duty-score b {
  display: block !important;
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  color: #5b21b6 !important;
  line-height: 1 !important;
}
.emp-duty-score span {
  font-size: 0.58rem !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
}
.emp-duty-bar {
  height: 0.55rem !important;
  border-radius: 999px !important;
  background: #e2e8f0 !important;
  overflow: hidden !important;
  margin-bottom: 0.65rem !important;
}
.emp-duty-bar > i {
  display: block !important;
  height: 100% !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #8b5cf6 0%, #10b981 100%) !important;
  transition: width 0.3s ease !important;
}
.emp-duty-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.4rem !important;
  margin-bottom: 0.65rem !important;
}
@media (min-width: 640px) {
  .emp-duty-grid { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
}
.emp-duty-chip {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0.15rem !important;
  padding: 0.55rem 0.35rem !important;
  border-radius: 0.85rem !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: #fff !important;
  cursor: pointer !important;
  min-height: 4.2rem !important;
  transition: transform 0.1s ease !important;
}
.emp-duty-chip:active { transform: scale(0.97) !important; }
.emp-duty-chip.is-done {
  background: #ecfdf5 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}
.emp-duty-check { font-size: 1rem !important; line-height: 1 !important; }
.emp-duty-chip.is-done .emp-duty-check {
  color: #047857 !important;
  font-weight: 900 !important;
}
.emp-duty-lab {
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  text-align: center !important;
}
.emp-duty-pts {
  font-size: 0.58rem !important;
  font-weight: 800 !important;
  color: #64748b !important;
}
.emp-duty-chip.is-done .emp-duty-pts { color: #047857 !important; }
.emp-duty-hooks {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0.4rem !important;
  margin-bottom: 0.45rem !important;
}
@media (min-width: 720px) {
  .emp-duty-hooks { grid-template-columns: 1fr 1fr !important; }
}
.emp-hook {
  padding: 0.55rem 0.65rem !important;
  border-radius: 0.8rem !important;
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(139, 92, 246, 0.18) !important;
  font-size: 0.68rem !important;
  line-height: 1.35 !important;
  color: #334155 !important;
}
.emp-hook strong {
  display: block !important;
  font-size: 0.58rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #6d28d9 !important;
  margin-bottom: 0.15rem !important;
}
.emp-hook-owner {
  border-color: rgba(16, 185, 129, 0.22) !important;
}
.emp-hook-owner strong { color: #047857 !important; }
.emp-duty-bonus {
  text-align: center !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #047857 !important;
  padding: 0.4rem !important;
  border-radius: 0.7rem !important;
  background: #d1fae5 !important;
}
.emp-duty-todo {
  text-align: center !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: #6d28d9 !important;
}

/* Owner staff adoption card */
/* v880 compact staff card + clean handoff */
#home-staff-adoption {
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid #d1fae5 !important;
  box-shadow: 0 4px 14px rgba(4, 120, 87, 0.05) !important;
  border-radius: 1rem !important;
  background: #fff !important;
}
.osa-card { padding: 0.75rem 0.85rem 0.8rem !important; }
.osa-card-compact { padding: 0.7rem 0.8rem 0.75rem !important; }
.osa-row1 {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.65rem !important;
  margin-bottom: 0.55rem !important;
}
.osa-row1-text { min-width: 0 !important; flex: 1 !important; }
.osa-kicker {
  font-size: 0.55rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #059669 !important;
}
.osa-title {
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.015em !important;
  margin-top: 0.1rem !important;
  line-height: 1.25 !important;
}
.osa-mandate {
  flex-shrink: 0 !important;
  padding: 0.4rem 0.65rem !important;
  border-radius: 999px !important;
  border: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  color: #334155 !important;
  cursor: pointer !important;
}
.osa-mandate.is-on {
  background: #059669 !important;
  color: #fff !important;
  border-color: #059669 !important;
}
.osa-pulse {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 0.35rem !important;
  margin-bottom: 0.5rem !important;
}
.osa-pulse-item {
  text-align: center !important;
  padding: 0.4rem 0.25rem !important;
  border-radius: 0.7rem !important;
  background: #f0fdf4 !important;
  border: 1px solid #d1fae5 !important;
}
.osa-pulse-item b {
  display: block !important;
  font-size: 1rem !important;
  font-weight: 900 !important;
  color: #047857 !important;
  line-height: 1.1 !important;
}
.osa-pulse-item span {
  font-size: 0.52rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  color: #64748b !important;
}
.osa-mini-board {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.25rem !important;
  margin-bottom: 0.5rem !important;
}
.osa-mini-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  color: #334155 !important;
  padding: 0.28rem 0.4rem !important;
  border-radius: 0.5rem !important;
  background: #f8fafc !important;
}
.osa-mini-row strong { color: #047857 !important; font-weight: 900 !important; }
.osa-empty-lite {
  font-size: 0.68rem !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
  margin-bottom: 0.45rem !important;
  line-height: 1.35 !important;
}
.osa-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.35rem !important;
  margin-top: 0.15rem !important;
}
.osa-btn {
  border: 1px solid #e2e8f0 !important;
  background: #fff !important;
  border-radius: 0.65rem !important;
  padding: 0.4rem 0.65rem !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  color: #334155 !important;
  cursor: pointer !important;
}
.osa-btn-primary {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #fff !important;
}
.osa-btn-ghost {
  background: transparent !important;
  border-color: transparent !important;
  color: #64748b !important;
}
.osa-more {
  margin-top: 0.55rem !important;
  padding-top: 0.55rem !important;
  border-top: 1px solid #f1f5f9 !important;
}
.osa-more.hidden { display: none !important; }

/* Shift handoff — compact, not sparse sky box */
#home-shift-note.shift-handoff-card,
.shift-handoff-card {
  padding: 0 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 1rem !important;
  background: #fff !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
  overflow: hidden !important;
}
.sh-card { padding: 0.65rem 0.75rem 0.7rem !important; }
.sh-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.5rem !important;
  margin-bottom: 0.45rem !important;
}
.sh-title-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  min-width: 0 !important;
}
.sh-ico { font-size: 1rem !important; line-height: 1 !important; }
.sh-kicker {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.01em !important;
}
.sh-hint {
  font-size: 0.58rem !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
  margin-top: 0.05rem !important;
}
.sh-actions {
  display: flex !important;
  align-items: center !important;
  gap: 0.3rem !important;
  flex-shrink: 0 !important;
}
.sh-btn {
  border: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  border-radius: 0.6rem !important;
  padding: 0.35rem 0.6rem !important;
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  color: #334155 !important;
  cursor: pointer !important;
}
.sh-btn-primary {
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: #fff !important;
}
.sh-btn-ghost { background: #fff !important; }
.sh-input {
  width: 100% !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.7rem !important;
  padding: 0.5rem 0.65rem !important;
  font-size: 0.78rem !important;
  line-height: 1.35 !important;
  resize: none !important;
  background: #f8fafc !important;
  color: #0f172a !important;
  min-height: 2.6rem !important;
  box-sizing: border-box !important;
}
.sh-input:focus {
  outline: none !important;
  border-color: #94a3b8 !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.06) !important;
}
.osa-reasons {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0.45rem !important;
  margin-bottom: 0.75rem !important;
}
@media (min-width: 800px) {
  .osa-reasons { grid-template-columns: 1fr 1fr !important; }
}
.osa-reason {
  display: flex !important;
  gap: 0.55rem !important;
  padding: 0.65rem 0.7rem !important;
  border-radius: 0.9rem !important;
  background: #f8fafc !important;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
}
.osa-reason-ico { font-size: 1.15rem !important; flex-shrink: 0 !important; }
.osa-reason strong {
  display: block !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
}
.osa-reason p {
  margin: 0.15rem 0 0 !important;
  font-size: 0.68rem !important;
  line-height: 1.35 !important;
  color: #64748b !important;
  font-weight: 600 !important;
}
.osa-script {
  padding: 0.7rem 0.8rem !important;
  border-radius: 0.9rem !important;
  background: #fffbeb !important;
  border: 1px solid #fcd34d !important;
  margin-bottom: 0.75rem !important;
}
.osa-script-h {
  font-size: 0.58rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #b45309 !important;
  margin-bottom: 0.3rem !important;
}
.osa-script p {
  margin: 0 !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #78350f !important;
  line-height: 1.4 !important;
}
.osa-board {
  margin-bottom: 0.75rem !important;
}
.osa-board-h {
  font-size: 0.6rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #64748b !important;
  margin-bottom: 0.4rem !important;
}
.osa-row {
  display: grid !important;
  grid-template-columns: 1fr auto auto !important;
  gap: 0.5rem !important;
  align-items: center !important;
  padding: 0.4rem 0 !important;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.06) !important;
  font-size: 0.75rem !important;
}
.osa-name { font-weight: 800 !important; color: #0f172a !important; }
.osa-meta { font-size: 0.65rem !important; color: #64748b !important; font-weight: 600 !important; }
.osa-pts { font-weight: 900 !important; color: #047857 !important; }
.osa-empty {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  line-height: 1.4 !important;
}
/* Compact action row wins over old heavy buttons */
.osa-card-compact .osa-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.35rem !important;
  margin-top: 0.15rem !important;
}
.osa-card-compact .osa-btn {
  padding: 0.4rem 0.65rem !important;
  border-radius: 0.65rem !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  border: 1px solid #e2e8f0 !important;
  background: #fff !important;
  color: #334155 !important;
  cursor: pointer !important;
  box-shadow: none !important;
}
.osa-card-compact .osa-btn-primary {
  background: #059669 !important;
  color: #fff !important;
  border-color: #059669 !important;
  box-shadow: none !important;
}
.osa-card-compact .osa-btn-ghost {
  background: transparent !important;
  border-color: transparent !important;
  color: #64748b !important;
}
body.app-employee-session #home-staff-adoption {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   v638 — WhatsApp-style store chat + cloud-synced team notes
   ═══════════════════════════════════════════════════════════════════════════ */
.wa-chat-host,
#home-team-chat,
#home-team-chat-owner {
  margin: 0.65rem 0 0.9rem !important;
  width: 100% !important;
  max-width: none !important;
}
.wa-chat {
  border-radius: 1.15rem !important;
  overflow: hidden !important;
  border: 1px solid rgba(18, 140, 126, 0.28) !important;
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.04),
    0 12px 32px rgba(7, 94, 84, 0.12) !important;
  background: #e5ddd5 !important;
  background-image:
    linear-gradient(rgba(229, 221, 213, 0.92), rgba(229, 221, 213, 0.92)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23cbbfad' fill-opacity='0.35'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") !important;
}
.wa-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.5rem !important;
  padding: 0.7rem 0.85rem !important;
  background: linear-gradient(180deg, #075e54 0%, #128c7e 100%) !important;
  color: #fff !important;
}
.wa-head-left {
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  min-width: 0 !important;
}
.wa-avatar {
  width: 2.5rem !important;
  height: 2.5rem !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.18) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.15rem !important;
  flex-shrink: 0 !important;
}
.wa-head-title {
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.2 !important;
}
.wa-head-sub {
  font-size: 0.65rem !important;
  font-weight: 600 !important;
  opacity: 0.88 !important;
  margin-top: 0.1rem !important;
}
.wa-refresh {
  width: 2.25rem !important;
  height: 2.25rem !important;
  border-radius: 999px !important;
  border: none !important;
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}
.wa-pin {
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.4rem !important;
  padding: 0.45rem 0.75rem !important;
  background: #fef9c3 !important;
  border-bottom: 1px solid rgba(202, 138, 4, 0.25) !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  color: #713f12 !important;
  line-height: 1.35 !important;
}
.wa-pin-emp {
  background: #dcf8c6 !important;
  border-bottom-color: rgba(7, 94, 84, 0.15) !important;
  color: #14532d !important;
}
.wa-pin-dot {
  width: 0.45rem !important;
  height: 0.45rem !important;
  border-radius: 999px !important;
  background: #16a34a !important;
  margin-top: 0.35rem !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2) !important;
}
.wa-thread {
  height: 14.5rem !important;
  max-height: 40vh !important;
  overflow-y: auto !important;
  padding: 0.75rem 0.7rem 0.5rem !important;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 900px) {
  .wa-thread { height: 16.5rem !important; }
  .wa-chat-owner-host .wa-thread { height: 18rem !important; }
}
.wa-row {
  display: flex !important;
  margin-bottom: 0.4rem !important;
}
.wa-mine { justify-content: flex-end !important; }
.wa-theirs { justify-content: flex-start !important; }
.wa-bubble {
  max-width: min(88%, 26rem) !important;
  padding: 0.4rem 0.55rem 0.3rem !important;
  border-radius: 0.55rem !important;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.08) !important;
  position: relative !important;
}
.wa-bubble-out {
  background: #dcf8c6 !important;
  border-top-right-radius: 0.15rem !important;
}
.wa-bubble-in {
  background: #fff !important;
  border-top-left-radius: 0.15rem !important;
}
.wa-who {
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  color: #075e54 !important;
  margin-bottom: 0.12rem !important;
}
.wa-text {
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  color: #111b21 !important;
  line-height: 1.35 !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
}
.wa-meta {
  text-align: right !important;
  font-size: 0.6rem !important;
  font-weight: 600 !important;
  color: #667781 !important;
  margin-top: 0.15rem !important;
}
.wa-empty {
  text-align: center !important;
  padding: 1.5rem 1rem !important;
  color: #54656f !important;
}
.wa-empty-ico { font-size: 1.75rem !important; margin-bottom: 0.35rem !important; }
.wa-empty-t {
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  color: #111b21 !important;
}
.wa-empty-s {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  margin-top: 0.35rem !important;
  line-height: 1.4 !important;
  max-width: 22rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.wa-compose {
  display: flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  padding: 0.5rem 0.55rem 0.55rem !important;
  background: #f0f2f5 !important;
  border-top: 1px solid rgba(15, 23, 42, 0.06) !important;
}
.wa-input {
  flex: 1 !important;
  min-width: 0 !important;
  border: none !important;
  border-radius: 1.5rem !important;
  padding: 0.65rem 1rem !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  background: #fff !important;
  color: #111b21 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
  outline: none !important;
}
.wa-input:focus {
  box-shadow: 0 0 0 2px rgba(18, 140, 126, 0.35) !important;
}
.wa-send {
  width: 2.75rem !important;
  height: 2.75rem !important;
  border-radius: 999px !important;
  border: none !important;
  background: linear-gradient(165deg, #25d366 0%, #128c7e 100%) !important;
  color: #fff !important;
  font-size: 1.1rem !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  box-shadow: 0 3px 10px rgba(18, 140, 126, 0.4) !important;
}
.wa-send:active { transform: scale(0.96); }

/* Owner chat: slightly stronger presence on desktop */
@media (min-width: 900px) {
  .wa-chat-owner-host {
    max-width: 42rem !important;
  }
}
body.app-employee-session #home-team-chat-owner {
  display: none !important;
}
body:not(.app-employee-session) #home-team-chat {
  /* employee host only inside employee panel */
}

/* ═══════════════════════════════════════════════════════════════════════════
   v640 — MRSTORE Team Desk (pro UI) + store pin address editor
   ═══════════════════════════════════════════════════════════════════════════ */
.mr-desk-host,
#home-team-chat,
#home-team-chat-owner,
#home-team-chat-manage {
  margin: 0.65rem 0 0.9rem !important;
  width: 100% !important;
  max-width: none !important;
}
.mr-desk {
  border-radius: 1.25rem !important;
  border: 1px solid rgba(5, 150, 105, 0.2) !important;
  background: #fff !important;
  box-shadow: 0 8px 28px rgba(4, 120, 87, 0.08) !important;
  overflow: hidden !important;
}
.mr-desk-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.65rem !important;
  padding: 0.85rem 1rem !important;
  background: linear-gradient(135deg, #ecfdf5 0%, #fff 55%, #f0f9ff 100%) !important;
  border-bottom: 1px solid rgba(5, 150, 105, 0.12) !important;
}
.mr-desk-head-main {
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  min-width: 0 !important;
}
.mr-desk-badge {
  flex-shrink: 0 !important;
  padding: 0.35rem 0.55rem !important;
  border-radius: 0.65rem !important;
  background: #047857 !important;
  color: #fff !important;
  font-size: 0.62rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}
.mr-desk-title {
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
}
.mr-desk-sub {
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
  margin-top: 0.12rem !important;
}
.mr-desk-ico-btn {
  width: 2.25rem !important;
  height: 2.25rem !important;
  border-radius: 0.75rem !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  background: #fff !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}
.mr-desk-strip {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0 !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
  background: #f8fafc !important;
}
.mr-desk-strip-emp {
  grid-template-columns: 1fr !important;
  padding: 0.55rem 0.9rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.15rem !important;
}
.mr-desk-strip-item {
  padding: 0.55rem 0.85rem !important;
  border-right: 1px solid rgba(15, 23, 42, 0.06) !important;
  min-width: 0 !important;
}
.mr-desk-strip-item:last-child { border-right: none !important; }
.mr-desk-strip-k {
  display: block !important;
  font-size: 0.58rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #94a3b8 !important;
}
.mr-desk-strip-v {
  display: block !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin-top: 0.15rem !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.mr-desk-thread {
  height: 13.5rem !important;
  max-height: 36vh !important;
  overflow-y: auto !important;
  padding: 0.75rem 0.85rem !important;
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%) !important;
}
@media (min-width: 900px) {
  .mr-desk-owner-host .mr-desk-thread { height: 15.5rem !important; }
  .mr-desk-owner-host { max-width: 40rem !important; }
}
.mr-desk-row {
  display: flex !important;
  margin-bottom: 0.45rem !important;
}
.mr-desk-row.is-mine { justify-content: flex-end !important; }
.mr-desk-row.is-theirs { justify-content: flex-start !important; }
.mr-desk-bubble {
  max-width: min(90%, 24rem) !important;
  padding: 0.5rem 0.7rem 0.4rem !important;
  border-radius: 0.9rem !important;
  border: 1px solid transparent !important;
}
.mr-desk-bubble.is-out {
  background: linear-gradient(165deg, #10b981 0%, #047857 100%) !important;
  color: #fff !important;
  border-bottom-right-radius: 0.25rem !important;
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.22) !important;
}
.mr-desk-bubble.is-in {
  background: #fff !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
  border-bottom-left-radius: 0.25rem !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05) !important;
}
.mr-desk-who {
  font-size: 0.62rem !important;
  font-weight: 800 !important;
  color: #047857 !important;
  margin-bottom: 0.15rem !important;
}
.mr-desk-text {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
}
.mr-desk-meta {
  text-align: right !important;
  font-size: 0.58rem !important;
  font-weight: 700 !important;
  opacity: 0.8 !important;
  margin-top: 0.2rem !important;
}
.mr-desk-bubble.is-out .mr-desk-meta { color: rgba(255,255,255,0.85) !important; }
.mr-desk-bubble.is-in .mr-desk-meta { color: #94a3b8 !important; }
.mr-desk-empty {
  text-align: center !important;
  padding: 1.75rem 1rem !important;
}
.mr-desk-empty-t {
  font-size: 0.9rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
}
.mr-desk-empty-s {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
  margin-top: 0.35rem !important;
  line-height: 1.4 !important;
  max-width: 22rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.mr-desk-compose {
  display: flex !important;
  gap: 0.45rem !important;
  padding: 0.65rem 0.75rem !important;
  border-top: 1px solid rgba(15, 23, 42, 0.06) !important;
  background: #fff !important;
}
.mr-desk-input {
  flex: 1 !important;
  min-width: 0 !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  border-radius: 0.85rem !important;
  padding: 0.7rem 0.9rem !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  outline: none !important;
  background: #f8fafc !important;
}
.mr-desk-input:focus {
  border-color: rgba(5, 150, 105, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
  background: #fff !important;
}
.mr-desk-send {
  flex-shrink: 0 !important;
  padding: 0 1.1rem !important;
  border: none !important;
  border-radius: 0.85rem !important;
  background: linear-gradient(165deg, #10b981 0%, #047857 100%) !important;
  color: #fff !important;
  font-size: 0.8rem !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.28) !important;
}
.mr-desk-send:active { transform: scale(0.98); }

body.app-employee-session #home-team-chat-owner,
body.app-employee-session #home-team-chat-manage {
  display: none !important;
}

/* Store pin editor — bottom sheet; NEVER display:block (caused blank white + lone Close) */
#store-geo-modal.hidden,
#store-geo-modal.store-geo-modal-root.hidden {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}
#store-geo-modal:not(.hidden),
#store-geo-modal.store-geo-modal-root:not(.hidden) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 940 !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  box-sizing: border-box !important;
}
@media (min-width: 640px) {
  #store-geo-modal:not(.hidden),
  #store-geo-modal.store-geo-modal-root:not(.hidden) {
    align-items: center !important;
    padding: 1rem !important;
  }
}
/* Dark scrim — solid CSS so Tailwind-less still works */
#store-geo-modal [data-geo-dismiss],
#store-geo-modal .store-geo-scrim {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.55) !important;
  z-index: 0 !important;
  cursor: pointer !important;
}
/* White sheet — always visible content (no blank full-screen Close) */
#store-geo-modal .store-geo-sheet {
  position: relative !important;
  z-index: 2 !important;
  width: 100% !important;
  max-width: 28rem !important;
  max-height: min(92vh, 40rem) !important;
  min-height: 12rem !important;
  pointer-events: auto !important;
  background: #ffffff !important;
  color: #18181b !important;
  border-radius: 1.25rem 1.25rem 0 0 !important;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.28) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  margin: 0 !important;
}
@media (min-width: 640px) {
  #store-geo-modal .store-geo-sheet {
    border-radius: 1.25rem !important;
    max-height: min(88vh, 40rem) !important;
  }
}
#store-geo-modal .store-geo-sheet-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
  flex-shrink: 0 !important;
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid #d1fae5 !important;
  background: #ecfdf5 !important;
}
#store-geo-modal #btn-geo-close {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  padding: 0.4rem 0.85rem !important;
  border: 1px solid #d4d4d8 !important;
  border-radius: 0.75rem !important;
  background: #fff !important;
  color: #18181b !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  min-height: 2.25rem !important;
  cursor: pointer !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
#store-geo-modal .store-geo-sheet-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 1rem !important;
  background: #fff !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   v642/v648 — Stack tools ABOVE Manage Stores (z 700) — HR Time&map, store pin
   ═══════════════════════════════════════════════════════════════════════════ */
body.manage-stores-open #hr-hub-modal:not(.hidden),
body.mr-settings-open #hr-hub-modal:not(.hidden),
body:has(#manage-stores-modal:not(.hidden)) #hr-hub-modal:not(.hidden),
#hr-hub-modal.mr-above-manage:not(.hidden) {
  z-index: 920 !important;
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
body.manage-stores-open #store-geo-modal:not(.hidden),
body.mr-settings-open #store-geo-modal:not(.hidden),
body:has(#manage-stores-modal:not(.hidden)) #store-geo-modal:not(.hidden) {
  z-index: 940 !important;
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
}
body.manage-stores-open #emp-points-modal:not(.hidden),
body:has(#manage-stores-modal:not(.hidden)) #emp-points-modal:not(.hidden) {
  z-index: 930 !important;
  position: fixed !important;
  inset: 0 !important;
}
/* Generic: any tool modal opened while manage is up */
body.manage-stores-open [id$="-modal"]:not(#manage-stores-modal):not(.hidden),
body.mr-settings-open [id$="-modal"]:not(#manage-stores-modal):not(.hidden) {
  /* only raise known low-z hubs that open from team */
}

/* Store pin — simple live search hits */
#store-geo-modal .geo-hit-on,
#store-geo-modal .geo-hit.geo-hit-on {
  border-color: #10b981 !important;
  background: #ecfdf5 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25) !important;
}
#store-geo-modal .geo-hit:active {
  transform: scale(0.99);
}

/* Multi-store pin chips */
.btn-ms-pin:active, .geo-store-chip:active { transform: scale(0.98); }
#geo-store-pick:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
  outline: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   v650 — Intelligent store heat (subtle fire · cool blue · no shake)
   ═══════════════════════════════════════════════════════════════════════════ */

#home-store-pulse.mood-atmos,
#home-store-pulse.qi-live-card.mood-atmos {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate;
  /* never shake / scale the whole card */
  transform: none !important;
  animation: none !important;
}

/* Soft shell tints — light, intelligent, not painted walls */
#home-store-pulse.mood-fire-spark:not(.mood-cold-blue),
#home-store-pulse.qi-live-card.mood-fire-spark:not(.mood-cold-blue) {
  background: #ffffff !important;
  border-color: #e4e4e7 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 6px 20px rgba(15, 23, 42, 0.03) !important;
}
#home-store-pulse.mood-fire-idle:not(.mood-cold-blue),
#home-store-pulse.qi-live-card.mood-fire-idle:not(.mood-cold-blue),
#home-store-pulse.mood-neutral:not(.mood-cold-blue) {
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%) !important;
  border-color: #e4e4e7 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 6px 20px rgba(15, 23, 42, 0.03) !important;
}
#home-store-pulse.mood-fire-warm:not(.mood-cold-blue),
#home-store-pulse.qi-live-card.mood-fire-warm:not(.mood-cold-blue),
#home-store-pulse.mood-positive.mood-fire-warm:not(.mood-cold-blue) {
  background: linear-gradient(165deg, #ffffff 0%, #f0fdf4 100%) !important;
  border-color: #a7f3d0 !important;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.08) !important;
}
#home-store-pulse.mood-fire-high:not(.mood-cold-blue),
#home-store-pulse.qi-live-card.mood-fire-high:not(.mood-cold-blue) {
  background: linear-gradient(165deg, #ffffff 0%, #ecfdf5 55%, #fffbeb 100%) !important;
  border-color: #6ee7b7 !important;
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.1) !important;
}
#home-store-pulse.mood-fire-cool:not(.mood-cold-blue),
#home-store-pulse.qi-live-card.mood-fire-cool:not(.mood-cold-blue) {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%) !important;
  border-color: #e2e8f0 !important;
}

/* Cool blue — soft, not navy paint */
#home-store-pulse.mood-cold-blue,
#home-store-pulse.qi-live-card.mood-cold-blue {
  background: linear-gradient(165deg, #f0f9ff 0%, #e0f2fe 40%, #ffffff 100%) !important;
  border-color: #7dd3fc !important;
  box-shadow: 0 4px 18px rgba(14, 165, 233, 0.1) !important;
  color: inherit !important;
  transform: none !important;
  animation: none !important;
}

/* Banner — refined chips, not carnival */
#home-store-pulse .mood-banner-live {
  position: relative !important;
  overflow: hidden !important;
  min-height: 3.25rem;
  padding: 0.65rem 0.75rem !important;
  z-index: 1;
}
#home-store-pulse.insight-mood-win .insight-mood-banner.mood-banner-live {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
  border-color: #6ee7b7 !important;
  color: #065f46 !important;
  box-shadow: none !important;
}
#home-store-pulse.insight-mood-rich .insight-mood-banner.mood-banner-live {
  background: linear-gradient(135deg, #ecfdf5 0%, #fef9c3 100%) !important;
  border-color: #a7f3d0 !important;
  color: #065f46 !important;
  box-shadow: none !important;
  animation: none !important;
  background-size: auto !important;
}
#home-store-pulse.insight-mood-steady .insight-mood-banner.mood-banner-live,
#home-store-pulse.insight-mood-fresh .insight-mood-banner.mood-banner-live {
  background: linear-gradient(135deg, #fafafa 0%, #f4f4f5 100%) !important;
  border-color: #e4e4e7 !important;
  color: #27272a !important;
}
#home-store-pulse.insight-mood-push .insight-mood-banner.mood-banner-live {
  background: linear-gradient(135deg, #fffbeb 0%, #fefce8 100%) !important;
  border-color: #fde68a !important;
  color: #78350f !important;
}
#home-store-pulse.mood-cold-blue .insight-mood-banner,
#home-store-pulse.mood-cold-blue .insight-mood-banner.insight-mood-cold {
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%) !important;
  border-color: #7dd3fc !important;
  color: #0c4a6e !important;
  box-shadow: none !important;
}

#home-store-pulse .mood-banner-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}
#home-store-pulse .mood-banner-copy { min-width: 0; flex: 1; }
#home-store-pulse .insight-mood-emoji {
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.75;
  animation: none !important;
  transform: none !important;
  filter: none !important;
}

/* Heat pill — status, not emoji carnival */
#home-store-pulse .mood-fire-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  z-index: 3;
  animation: none !important;
  box-shadow: none !important;
}
#home-store-pulse .mood-fire-pill-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #a1a1aa;
  box-shadow: 0 0 0 2px rgba(161, 161, 170, 0.2);
}
#home-store-pulse.mood-fire-warm .mood-fire-pill-dot {
  background: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25);
}
#home-store-pulse.mood-fire-high .mood-fire-pill-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.28);
  /* soft pulse on the dot only — never the card */
  animation: mood-dot-breathe 2.4s ease-in-out infinite;
}
#home-store-pulse.mood-fire-cool .mood-fire-pill-dot,
#home-store-pulse.mood-cold-blue .mood-fire-pill-dot {
  background: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.28);
}
#home-store-pulse.mood-fire-spark .mood-fire-pill-dot {
  background: #c4b5fd;
  box-shadow: 0 0 0 2px rgba(196, 181, 253, 0.3);
}
#home-store-pulse .mood-fire-pill-lbl {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #52525b;
}
#home-store-pulse.mood-cold-blue .mood-fire-pill-lbl { color: #0369a1; }
#home-store-pulse.mood-fire-warm .mood-fire-pill-lbl,
#home-store-pulse.mood-fire-high .mood-fire-pill-lbl { color: #047857; }

/* Signal chips — quiet data, not hurray stickers */
#home-store-pulse .mood-signal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.35rem;
}
#home-store-pulse .mood-signal-chip {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.14rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #3f3f46;
  animation: none !important;
  transform: none !important;
}
#home-store-pulse.mood-cold-blue .mood-signal-chip {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(14, 165, 233, 0.25);
  color: #0c4a6e;
}

/* Live fire — small corner meter, subtle flicker only on flames */
#home-store-pulse .mood-fire-stage {
  position: absolute !important;
  right: 0.4rem;
  bottom: 0.15rem;
  width: 2.6rem;
  height: 2.4rem;
  z-index: 1;
  pointer-events: none !important;
  opacity: 0.85;
}
#home-store-pulse .insight-mood-banner .mood-fire-stage {
  right: 0.2rem;
  bottom: 0.1rem;
  width: 2.85rem;
  height: 2.55rem;
}
#home-store-pulse .mood-fire-glow {
  position: absolute;
  left: 50%;
  bottom: 0.1rem;
  width: 1.6rem;
  height: 1.1rem;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(251, 146, 60, 0.28) 0%, transparent 70%);
  filter: blur(3px);
  animation: mood-glow-soft 2.2s ease-in-out infinite;
}
#home-store-pulse .mood-fire-base {
  position: absolute;
  left: 50%;
  bottom: 0.12rem;
  width: 0.85rem;
  height: 0.22rem;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(120, 53, 15, 0.45) 0%, transparent 100%);
}
#home-store-pulse .mood-flame {
  position: absolute;
  left: 50%;
  bottom: 0.22rem;
  width: 0.42rem;
  height: 1.05rem;
  transform: translateX(-50%);
  border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%;
  background: linear-gradient(to top, rgba(239, 68, 68, 0.75) 0%, rgba(249, 115, 22, 0.7) 40%, rgba(253, 224, 71, 0.85) 100%);
  transform-origin: center bottom;
  animation: mood-flame-soft 1.1s ease-in-out infinite alternate;
  box-shadow: 0 0 6px rgba(249, 115, 22, 0.25);
  opacity: 0.8;
}
#home-store-pulse .mood-flame-a { z-index: 3; height: 1.15rem; width: 0.48rem; }
#home-store-pulse .mood-flame-b {
  left: calc(50% - 0.28rem);
  height: 0.9rem;
  width: 0.34rem;
  opacity: 0.65;
  animation-duration: 1.25s;
  animation-delay: 0.1s;
  z-index: 2;
}
#home-store-pulse .mood-flame-c {
  left: calc(50% + 0.28rem);
  height: 0.85rem;
  width: 0.32rem;
  opacity: 0.6;
  animation-duration: 1.35s;
  animation-delay: 0.18s;
  z-index: 2;
}
#home-store-pulse .mood-ember {
  position: absolute;
  bottom: 0.9rem;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.7);
  animation: mood-ember-soft 2.6s ease-out infinite;
  opacity: 0;
}
#home-store-pulse .mood-ember.e1 { left: 40%; }
#home-store-pulse .mood-ember.e2 { left: 50%; animation-delay: 0.7s; }
#home-store-pulse .mood-ember.e3 { left: 58%; animation-delay: 1.3s; }

/* Intensity */
#home-store-pulse.mood-fire-spark .mood-flame { height: 0.55rem !important; opacity: 0.4; filter: saturate(0.6); }
#home-store-pulse.mood-fire-spark .mood-ember { display: none; }
#home-store-pulse.mood-fire-idle .mood-flame-a { height: 0.85rem; }
#home-store-pulse.mood-fire-idle .mood-flame-b,
#home-store-pulse.mood-fire-idle .mood-flame-c { height: 0.65rem; opacity: 0.5; }
#home-store-pulse.mood-fire-warm .mood-flame-a { height: 1.25rem; }
#home-store-pulse.mood-fire-high .mood-flame-a { height: 1.45rem; width: 0.52rem; }
#home-store-pulse.mood-fire-high .mood-fire-glow {
  width: 2rem; height: 1.35rem;
  background: radial-gradient(ellipse at center, rgba(251, 191, 36, 0.35) 0%, transparent 72%);
}
#home-store-pulse.mood-fire-cool .mood-flame,
#home-store-pulse.mood-cold-blue .mood-flame {
  background: linear-gradient(to top, rgba(3, 105, 161, 0.55) 0%, rgba(56, 189, 248, 0.65) 55%, rgba(224, 242, 254, 0.9) 100%) !important;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.3) !important;
  height: 0.75rem !important;
  opacity: 0.7;
}
#home-store-pulse.mood-fire-cool .mood-fire-glow,
#home-store-pulse.mood-cold-blue .mood-fire-glow {
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.3) 0%, transparent 70%) !important;
}
#home-store-pulse.mood-cold-blue .mood-ember {
  background: rgba(125, 211, 252, 0.8);
}

/* KPI cold — light sky */
#home-store-pulse .qi-kpi-cold {
  border-color: #bae6fd !important;
  background: linear-gradient(180deg, #f0f9ff, #ffffff) !important;
}
#home-store-pulse .qi-kpi-net-cold {
  box-shadow: none;
}

#home-store-pulse.mood-atmos .qi-hero-head,
#home-store-pulse.mood-atmos .qi-hero-meta,
#home-store-pulse.mood-atmos .qi-panel,
#home-store-pulse.mood-atmos .mm-tiles,
#home-store-pulse.mood-atmos .mm-pace-row {
  position: relative;
  z-index: 2;
}

/* Soft motion only — flames / glow / dot. NEVER card transform. */
@keyframes mood-flame-soft {
  0% { transform: translateX(-50%) scaleY(1) scaleX(1); }
  100% { transform: translateX(-50%) scaleY(1.06) scaleX(0.96); }
}
@keyframes mood-glow-soft {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.85; }
}
@keyframes mood-ember-soft {
  0% { opacity: 0; transform: translateY(0); }
  20% { opacity: 0.7; }
  100% { opacity: 0; transform: translateY(-1.1rem); }
}
@keyframes mood-dot-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

@media (prefers-reduced-motion: reduce) {
  #home-store-pulse .mood-flame,
  #home-store-pulse .mood-ember,
  #home-store-pulse .mood-fire-glow,
  #home-store-pulse .mood-fire-pill-dot {
    animation: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   v651 — Kill ghost full-screen Close / grey Money shell on mobile nav
   ═══════════════════════════════════════════════════════════════════════════ */

/* Money closed: section NEVER covers the screen (even if stuck on body) */
body:not(.money-panel-open) #home-money-section,
body:not(.money-panel-open) #home-money-section.money-panel-open,
html:not(.money-panel-open) body:not(.money-panel-open) #home-money-section {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
}

/* Close chips never float when Money is closed */
body:not(.money-panel-open) #btn-close-money-panel,
body:not(.money-panel-open) #btn-close-money-foot,
body:not(.money-panel-open) .money-foot-close,
body:not(.money-panel-open) .money-mobile-close,
body:not(.money-panel-open) .money-panel-footer,
body:not(.money-panel-open) .money-mobile-bar,
body:not(.money-panel-open) [aria-label="Close money"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  position: static !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
}

/* Money open: section must contain real panel — hide empty ghost shells */
body.money-panel-open #home-money-section.money-panel-open:not(:has(.money-panel-root)) {
  display: none !important;
  pointer-events: none !important;
}

/* Store pin closed */
#store-geo-modal.hidden,
#store-geo-modal:not(:has(.store-geo-sheet)) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* More hub closed */
#more-hub-modal.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   v652 — Bank deposit matcher + stuck Close shells (match bank path)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Bank CSV always paints a real white sheet (not blank full-screen Close) */
#bank-csv-modal:not(.hidden) {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 620 !important;
  background: rgba(15, 23, 42, 0.48) !important;
  padding: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
@media (min-width: 640px) {
  #bank-csv-modal:not(.hidden) {
    align-items: center !important;
    padding: 1rem !important;
  }
}
#bank-csv-modal.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}
#bank-csv-modal:not(.hidden) > div {
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  color: #18181b !important;
  width: 100% !important;
  max-width: 32rem !important;
  max-height: min(92dvh, 40rem) !important;
  min-height: 16rem !important;
  border-radius: 1.15rem 1.15rem 0 0 !important;
  overflow: hidden !important;
  position: relative !important;
  z-index: 2 !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.28) !important;
}
@media (min-width: 640px) {
  #bank-csv-modal:not(.hidden) > div {
    border-radius: 1.25rem !important;
    max-height: min(88vh, 36rem) !important;
  }
}
#bank-csv-modal:not(.hidden) #btn-bank-csv-close {
  display: inline-flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  z-index: 5 !important;
  background: #fff !important;
  border: 1px solid #d4d4d8 !important;
  border-radius: 0.75rem !important;
  padding: 0.4rem 0.85rem !important;
  font-weight: 800 !important;
  font-size: 0.75rem !important;
  min-height: 2.25rem !important;
  cursor: pointer !important;
}
#bank-csv-modal.hidden #btn-bank-csv-close {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* When Money is closed, never let a grey full-screen section survive */
body:not(.money-panel-open) #home-money-section {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   v653 — NO leaked Close buttons. Hidden modals are fully gone.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Any closed modal: invisible, non-interactive, no Close leak */
[id$="-modal"].hidden,
[id$="-modal"][hidden],
#store-geo-modal.hidden,
#more-hub-modal.hidden,
#home-money-section.hidden,
#home-money-section:not(.money-panel-open),
body:not(.money-panel-open) #home-money-section {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  z-index: -1 !important;
}

/* Children of closed modals never paint (kills forced-visible Close chips) */
[id$="-modal"].hidden *,
[id$="-modal"][hidden] *,
#store-geo-modal.hidden *,
#more-hub-modal.hidden *,
#home-money-section.hidden *,
#home-money-section:not(.money-panel-open) *,
body:not(.money-panel-open) #home-money-section * {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Money Close chips only when Money is truly open */
body:not(.money-panel-open) #btn-close-money-panel,
body:not(.money-panel-open) #btn-close-money-foot,
body:not(.money-panel-open) .money-foot-close,
body:not(.money-panel-open) .money-mobile-close,
body:not(.money-panel-open) [aria-label="Close money"],
body:not(.money-panel-open) .money-panel-footer,
body:not(.money-panel-open) .money-mobile-bar {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Bank / feed / upgrade closes only when that modal is open */
#bank-csv-modal.hidden #btn-bank-csv-close,
#bank-feed-modal.hidden #btn-bank-feed-close,
#upgrade-modal.hidden #btn-close-upgrade,
#upgrade-modal.hidden #btn-upgrade-later,
#more-hub-modal.hidden #btn-more-hub-close {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   v654 — DELETE empty Money Close overlay (does not touch real tools)
   Only kills full-screen grey when there is NO .money-panel-root.
   Real Money open still works (has .money-panel-root).
   ═══════════════════════════════════════════════════════════════════════════ */

/* Empty money shell: never cover the app */
body.money-panel-open #home-money-section.money-panel-open:not(:has(.money-panel-root)),
#home-money-section.money-panel-open:not(:has(.money-panel-root)) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  z-index: -1 !important;
  position: static !important;
  inset: auto !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

/* If Money class stuck without real panel: restore the rest of the app */
body.money-panel-open:not(:has(#home-money-section .money-panel-root)) #bottom-nav,
body.money-panel-open:not(:has(#home-money-section .money-panel-root)) #feature-browser-tab,
body.money-panel-open:not(:has(#home-money-section .money-panel-root)) #btn-cstore-os-fab,
body.money-panel-open:not(:has(#home-money-section .money-panel-root)) #pwa-install-banner,
body.money-panel-open:not(:has(#home-money-section .money-panel-root)) .app-header,
body.money-panel-open:not(:has(#home-money-section .money-panel-root)) #store-hero,
body.money-panel-open:not(:has(#home-money-section .money-panel-root)) .store-hero {
  display: revert !important;
  visibility: visible !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
body.money-panel-open:not(:has(#home-money-section .money-panel-root)) #app-main-column > * {
  visibility: visible !important;
  pointer-events: auto !important;
}
body.money-panel-open:not(:has(#home-money-section .money-panel-root)) {
  overflow: auto !important;
}

/* Money Close chips: never outside a real open panel */
body:not(:has(#home-money-section.money-panel-open .money-panel-root)) #btn-close-money-panel,
body:not(:has(#home-money-section.money-panel-open .money-panel-root)) #btn-close-money-foot,
body:not(:has(#home-money-section.money-panel-open .money-panel-root)) .money-foot-close,
body:not(:has(#home-money-section.money-panel-open .money-panel-root)) .money-mobile-close,
body:not(:has(#home-money-section.money-panel-open .money-panel-root)) [aria-label="Close money"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

/* Closed modals stay closed (no Close litter) */
[id$="-modal"].hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   v655 — Landing media banner (guest landing + marketing index)
   ═══════════════════════════════════════════════════════════════════════════ */
.gl-media-banner { overflow: hidden; }
.gl-media-banner .gl-panel-head { margin-bottom: 0.75rem; }
.gl-media-layout {
  display: grid;
  gap: 1rem;
  margin-top: 0.25rem;
  padding: 0 0.15rem 0.35rem;
}
@media (min-width: 820px) {
  .gl-media-layout {
    /* Phone-width player + side rail — reels are 9:16, not 16:10 */
    grid-template-columns: minmax(16rem, 22rem) 1fr;
    gap: 1.25rem;
    align-items: start;
  }
}
.gl-media-main {
  min-width: 0;
  display: flex;
  justify-content: center;
}
.gl-media-frame {
  position: relative;
  border-radius: 1.15rem;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 12px 32px -16px rgba(15, 23, 42, 0.35);
  /* Portrait reel frame — full 9:16 content, no landscape zoom-crop */
  aspect-ratio: 9 / 16;
  width: 100%;
  max-width: 22rem;
  min-height: 0;
  max-height: min(70vh, 36rem);
  margin-inline: auto;
}
.gl-media-video, .gl-media-img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  background: #000;
}
.gl-media-video { object-fit: contain !important; background: #000; }
.gl-media-live-pill {
  position: absolute; top: 0.65rem; left: 0.65rem;
  font-size: 0.625rem; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem; border-radius: 999px;
  background: rgba(16, 185, 129, 0.92); color: #fff;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
  z-index: 2;
}
.gl-media-side { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.gl-media-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: 0.45rem;
}
.gl-media-thumb {
  position: relative;
  border: 2px solid transparent;
  border-radius: 0.7rem;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: #e2e8f0;
  aspect-ratio: 1;
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}
.gl-media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gl-media-thumb.is-active {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}
.gl-media-thumb:active { transform: scale(0.97); }
.gl-media-thumb-badge {
  position: absolute; bottom: 0.2rem; right: 0.2rem;
  font-size: 0.55rem; font-weight: 800;
  background: rgba(15, 23, 42, 0.72); color: #fff;
  padding: 0.1rem 0.3rem; border-radius: 0.3rem;
}
.gl-media-caption {
  font-size: 0.8125rem; font-weight: 600; color: #334155;
  margin: 0; line-height: 1.4;
}
.gl-media-actions {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: auto;
}
.gl-media-actions .gl-btn,
.gl-media-actions a.gl-btn {
  text-decoration: none;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gl-media-dash {
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  background: #fff !important;
}
.gl-media-skeleton {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(110deg, #e2e8f0 25%, #f1f5f9 40%, #e2e8f0 55%);
  background-size: 200% 100%;
  animation: gl-media-shimmer 1.2s ease-in-out infinite;
  min-height: 12rem;
}
@keyframes gl-media-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   v656 — Guest landing MUST show full page (was blank under empty insight cards)
   ═══════════════════════════════════════════════════════════════════════════ */

/* On guest mode: hide every insights sibling; only show the landing */
body.guest-mode #home-insights > *:not(#home-guest-welcome) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: none !important;
  opacity: 0 !important;
}

body.guest-mode #home-guest-welcome:not(.hidden),
body.guest-mode #home-guest-welcome.guest-landing:not(.hidden) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  order: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  pointer-events: auto !important;
  margin: 0 !important;
  padding: 0 0 2rem !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Landing sections always paint */
body.guest-mode #home-guest-welcome .gl-section,
body.guest-mode #home-guest-welcome .gl-panel,
body.guest-mode #home-guest-welcome .gl-hero,
body.guest-mode #home-guest-welcome .gl-founder-strip,
body.guest-mode #home-guest-welcome .gl-media-banner,
body.guest-mode #home-guest-welcome .gl-bento,
body.guest-mode #home-guest-welcome .gl-plans,
body.guest-mode #home-guest-welcome .gl-stats,
body.guest-mode #home-guest-welcome .gl-pos-band {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  pointer-events: auto !important;
}
body.guest-mode #home-guest-welcome .gl-bento,
body.guest-mode #home-guest-welcome .gl-media-layout,
body.guest-mode #home-guest-welcome .gl-hero-grid,
body.guest-mode #home-guest-welcome .gl-shelf-aisle,
body.guest-mode #home-guest-welcome .gl-steps,
body.guest-mode #home-guest-welcome .gl-plans {
  display: grid !important;
}
body.guest-mode #home-guest-welcome .gl-media-layout {
  display: grid !important;
}

/* Light-panel buttons: not white-on-white */
body.guest-mode .guest-landing .gl-panel .gl-btn-ghost,
body.guest-mode .guest-landing .gl-media-actions .gl-btn-ghost,
body.guest-mode .guest-landing .gl-media-dash {
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
}
body.guest-mode .guest-landing .gl-panel .gl-btn-emerald,
body.guest-mode .guest-landing .gl-media-actions .gl-btn-emerald {
  color: #ffffff !important;
  background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%) !important;
  border: none !important;
}
body.guest-mode .guest-landing .gl-hero .gl-btn-ghost {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}
body.guest-mode .guest-landing .gl-hero .gl-btn-emerald {
  color: #fff !important;
}

/* Don't let strict-today hide guest page */
body.guest-mode.mr-strict-today #home-guest-welcome:not(.hidden),
body.guest-mode.home-clean #home-guest-welcome:not(.hidden) {
  display: block !important;
  visibility: visible !important;
}

/* Main column scrolls normally for long landing */
body.guest-mode #app-main-column,
body.guest-mode #home-insights {
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
}

/* ── Modern autoplay video (no native controls, sound on) ── */
.gl-media-frame-video {
  cursor: pointer;
  background: #000;
  isolation: isolate;
  aspect-ratio: 9 / 16;
  max-width: 22rem;
  max-height: min(70vh, 36rem);
  margin-inline: auto;
  width: 100%;
}
.gl-media-frame-video .gl-media-video {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center;
  background: #000;
  display: block;
  border: 0;
  outline: none;
  /* Hide any leftover native UI */
  pointer-events: none;
}
.gl-media-frame-video video::-webkit-media-controls,
.gl-media-frame-video video::-webkit-media-controls-enclosure,
.gl-media-frame-video video::-webkit-media-controls-panel {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0 !important;
}
.gl-media-chrome {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.75rem;
}
.gl-media-frame-video .gl-media-live-pill {
  position: static;
  background: rgba(16, 185, 129, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4);
  letter-spacing: 0.06em;
}
.gl-media-tap-hint {
  display: none;
  margin-left: auto;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.gl-media-frame-video.needs-tap .gl-media-tap-hint {
  display: inline-flex;
  align-items: center;
  animation: gl-media-pulse 1.6s ease-in-out infinite;
}
.gl-media-frame-video.needs-tap {
  cursor: pointer;
}
.gl-media-frame-video.needs-tap .gl-media-video {
  pointer-events: none;
}
.gl-media-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.28) 0%, transparent 28%, transparent 72%, rgba(0,0,0,0.35) 100%),
    radial-gradient(ellipse 80% 70% at 50% 50%, transparent 50%, rgba(0,0,0,0.18) 100%);
  opacity: 0.9;
}
.gl-media-frame-video.is-playing .gl-media-vignette {
  opacity: 0.55;
}
@keyframes gl-media-pulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.03); opacity: 1; }
}

/* ── Light transport: pause + mute (no native controls) ── */
.gl-media-frame-video {
  cursor: pointer;
  background: #000;
  isolation: isolate;
  aspect-ratio: 9 / 16;
  max-width: 22rem;
  max-height: min(70vh, 36rem);
  margin-inline: auto;
  width: 100%;
}
.gl-media-frame-video .gl-media-video {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center;
  background: #000;
  display: block;
  border: 0;
  outline: none;
  pointer-events: none;
}
.gl-media-frame-video video::-webkit-media-controls,
.gl-media-frame-video video::-webkit-media-controls-enclosure,
.gl-media-frame-video video::-webkit-media-controls-panel {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0 !important;
}
.gl-media-chrome {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.75rem;
}
.gl-media-frame-video .gl-media-live-pill {
  position: static;
  pointer-events: none;
  background: rgba(16, 185, 129, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}
.gl-media-transport {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  padding: 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}
.gl-media-btn {
  appearance: none;
  border: 0;
  margin: 0;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.gl-media-btn:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}
.gl-media-btn:active { transform: scale(0.94); }
.gl-media-btn:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}
.gl-media-frame-video.is-muted .gl-media-btn[data-media-mute] {
  color: #b45309;
  background: #fff7ed;
}
.gl-media-frame-video.is-paused .gl-media-btn[data-media-play] {
  color: #047857;
  background: #ecfdf5;
}
.gl-media-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 32%, transparent 70%, rgba(0,0,0,0.28) 100%);
  opacity: 0.85;
}
.gl-media-frame-video.is-playing .gl-media-vignette { opacity: 0.5; }
.gl-media-frame-video.needs-tap .gl-media-transport {
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.45), 0 8px 24px rgba(0,0,0,0.22);
}


/* ═══════════════════════════════════════════════════════════════════════════
   v660 — Login / sign-in modal MUST open from landing (same killGhost trap)
   Root cause: killGhost left visibility:hidden + opacity:0 !important on
   #login-modal; showLoginModal only removed .hidden → invisible form.
   Also z-50 sat under #bottom-nav (z 250).
   ═══════════════════════════════════════════════════════════════════════════ */
#login-modal:not(.hidden),
body.login-modal-open #login-modal:not(.hidden),
body.auth-focus #login-modal:not(.hidden),
body.guest-mode #login-modal:not(.hidden) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 980 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.75rem !important;
}
#login-modal:not(.hidden) > div,
body.login-modal-open #login-modal:not(.hidden) > div,
body.auth-focus #login-modal:not(.hidden) > div {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  background: #ffffff !important;
  position: relative !important;
  z-index: 2 !important;
  max-height: min(92dvh, 100%) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}
#login-modal:not(.hidden) #btn-do-login,
#login-modal:not(.hidden) #auth-form-fields,
#login-modal:not(.hidden) #auth-mode-tabs,
#login-modal:not(.hidden) input,
#login-modal:not(.hidden) button {
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}
#login-modal:not(.hidden) #btn-do-login {
  display: block !important;
  width: 100% !important;
  color: #fff !important;
  background: #059669 !important;
}
body.login-modal-open #bottom-nav,
body.auth-focus #bottom-nav,
body.login-modal-open #feature-browser-tab,
body.auth-focus #feature-browser-tab,
body.login-modal-open #btn-cstore-os-fab,
body.auth-focus #btn-cstore-os-fab {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
#login-modal.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}
/* Header Sign in must always be tappable on guest landing */
body.guest-mode #btn-login-top {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 60 !important;
  position: relative !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   v659 — Lottery hub MUST open (beats killGhost leftover opacity/visibility)
   Root cause: killGhost left visibility:hidden + opacity:0 !important; old
   open only set display='' so hub was "open" but invisible.
   ═══════════════════════════════════════════════════════════════════════════ */
#lottery-hub-modal:not(.hidden),
body.lottery-hub-open #lottery-hub-modal:not(.hidden) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 620 !important;
  align-items: flex-end !important;
  justify-content: center !important;
  background: rgba(15, 23, 42, 0.48) !important;
  padding: 0 !important;
  margin: 0 !important;
}
@media (min-width: 640px) {
  #lottery-hub-modal:not(.hidden),
  body.lottery-hub-open #lottery-hub-modal:not(.hidden) {
    align-items: center !important;
    padding: 1rem !important;
  }
}
/* Beat mobile sheet rule z-index:360 — lottery must sit above Money/More ghosts */
@media (max-width: 768px) {
  #lottery-hub-modal:not(.hidden),
  body.lottery-hub-open #lottery-hub-modal:not(.hidden) {
    z-index: 620 !important;
    align-items: flex-end !important;
  }
}
#lottery-hub-modal:not(.hidden) > div,
body.lottery-hub-open #lottery-hub-modal:not(.hidden) > div {
  display: flex !important;
  flex-direction: column !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  background: #ffffff !important;
  width: 100% !important;
  max-width: 36rem !important;
  max-height: min(94dvh, 100%) !important;
  min-height: min(70dvh, 100%) !important;
  border-radius: 1.15rem 1.15rem 0 0 !important;
  overflow: hidden !important;
  position: relative !important;
  z-index: 2 !important;
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.28) !important;
}
@media (min-width: 640px) {
  #lottery-hub-modal:not(.hidden) > div,
  body.lottery-hub-open #lottery-hub-modal:not(.hidden) > div {
    border-radius: 1.25rem !important;
    max-height: min(88vh, 40rem) !important;
    min-height: 24rem !important;
  }
}
#lottery-hub-modal:not(.hidden) #lottery-hub-body,
body.lottery-hub-open #lottery-hub-modal:not(.hidden) #lottery-hub-body {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  flex: 1 1 auto !important;
  min-height: 12rem !important;
  -webkit-overflow-scrolling: touch;
  background: #fff !important;
  pointer-events: auto !important;
}
#lottery-hub-modal:not(.hidden) #btn-close-lottery-hub,
body.lottery-hub-open #lottery-hub-modal:not(.hidden) #btn-close-lottery-hub {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 5 !important;
}
#lottery-hub-modal.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}
/* Hide bottom nav under open lottery so taps hit the sheet */
body.lottery-hub-open #bottom-nav {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   v661 — Landing video contain hard override (merged from video-contain-fix)
   Portrait 9:16 reels · object-fit contain · no landscape zoom-crop
   ═══════════════════════════════════════════════════════════════════════════ */
.gl-media-frame,
.gl-media-frame-video {
  aspect-ratio: 9 / 16 !important;
  width: 100% !important;
  max-width: 22rem !important;
  max-height: min(70vh, 36rem) !important;
  min-height: 0 !important;
  margin-inline: auto !important;
  background: #000 !important;
}
.gl-media-main { display: flex !important; justify-content: center !important; }
@media (min-width: 820px) {
  .gl-media-layout {
    grid-template-columns: minmax(16rem, 22rem) 1fr !important;
    align-items: start !important;
  }
}
.gl-media-video,
.gl-media-frame-video .gl-media-video,
.gl-media-img {
  object-fit: contain !important;
  object-position: center center !important;
  background: #000 !important;
}

/* ============================================================
   v711 FLOATING QUICK NAV
   Fixed right dock — zero layout shift, no header padding fight
   Signed-in only · hidden on landing/guest
   ============================================================ */
.mr-float-nav {
  position: fixed;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 300;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  pointer-events: none;
}
body.has-float-nav:not(.guest-mode):not(.auth-booting):not(.auth-focus) .mr-float-nav {
  display: flex;
  pointer-events: none;
}
.mr-float-nav .mr-fn-toggle,
.mr-float-nav .mr-fn-btn {
  pointer-events: auto;
}
.mr-fn-toggle {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.mr-fn-toggle:hover { border-color: #a7f3d0; color: #047857; background: #ecfdf5; }
.mr-fn-stack {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.4rem;
  border-radius: 1.1rem;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.mr-fn-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0.25rem 0.45rem 0.25rem 0.25rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.mr-fn-btn:hover { background: #f8fafc; color: #0f172a; }
.mr-fn-btn.is-active {
  background: #ecfdf5;
  color: #047857;
  box-shadow: inset 0 0 0 1px #a7f3d0;
}
.mr-fn-ico {
  width: 1.85rem;
  height: 1.85rem;
  flex-shrink: 0;
  border-radius: 0.55rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  display: grid;
  place-items: center;
  color: inherit;
}
.mr-fn-ico svg { width: 0.95rem; height: 0.95rem; display: block; }
.mr-fn-btn.is-active .mr-fn-ico {
  border-color: #a7f3d0;
  background: #d1fae5;
}
.mr-fn-lbl { padding-right: 0.25rem; max-width: 4.5rem; overflow: hidden; text-overflow: ellipsis; }
/* Collapsed = icons only */
body.mr-fn-collapsed .mr-fn-lbl { display: none; }
body.mr-fn-collapsed .mr-fn-btn { padding-right: 0.25rem; justify-content: center; }
body.mr-fn-collapsed .mr-fn-toggle svg { transform: rotate(180deg); }
/* Never on guest landing */
body.guest-mode .mr-float-nav,
body.auth-booting .mr-float-nav,
body.auth-focus .mr-float-nav {
  display: none !important;
}
/* Avoid clash with money / full-screen modals */
body.money-panel-open .mr-float-nav,
body.ledger-modal-open .mr-float-nav,
body.feature-browser-open .mr-float-nav,
body.upgrade-modal-open .mr-float-nav {
  opacity: 0;
  pointer-events: none;
}
/* Phone: sit above bottom nav, compact */
@media (max-width: 639px) {
  .mr-float-nav {
    right: 0.5rem;
    top: auto;
    bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
    transform: none;
  }
  body.mr-fn-collapsed .mr-fn-stack { padding: 0.3rem; }
  .mr-fn-lbl { display: none; } /* always icon-only on phone to save space */
  .mr-fn-btn { padding-right: 0.25rem; justify-content: center; }
}
/* Hide old edge Tools tab when float nav is on (signed-in) — one tools entry */
body.has-float-nav:not(.guest-mode) #feature-browser-tab {
  display: none !important;
}

/* ============================================================
   SHIFT DOCK v712 — design system name: "Shift Dock"
   One launcher · one panel · quick routes + all tools + AI
   Same emerald icon chips · no edge FAB stack · no header fight
   ============================================================ */

/* Launcher — floating, signed-in only */
.shift-dock-launch {
  position: fixed;
  right: 0.85rem;
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 310;
  display: none;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.85rem 0.4rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(4, 120, 87, 0.18);
  cursor: pointer;
  touch-action: manipulation;
}
body.has-shift-dock:not(.guest-mode):not(.auth-booting):not(.auth-focus) .shift-dock-launch {
  display: inline-flex;
}
.shift-dock-launch .sdl-ico {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #a7f3d0;
  display: grid;
  place-items: center;
}
.shift-dock-launch .sdl-ico svg { width: 1rem; height: 1rem; display: block; }
.shift-dock-launch:hover { background: #d1fae5; }
.shift-dock-launch:active { transform: scale(0.97); }
@media (min-width: 640px) {
  .shift-dock-launch {
    right: 1rem;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
    padding: 0.55rem 0.5rem;
    border-radius: 1rem;
    min-height: auto;
  }
  .shift-dock-launch:active { transform: translateY(-50%) scale(0.97); }
  .shift-dock-launch .sdl-lbl {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
}
body.guest-mode .shift-dock-launch,
body.auth-booting .shift-dock-launch,
body.auth-focus .shift-dock-launch,
body.money-panel-open .shift-dock-launch,
body.feature-browser-open .shift-dock-launch {
  display: none !important;
}

/* Kill edge stack / float leftovers */
#btn-cstore-os-fab.shift-dock-ai-hidden,
#feature-browser-tab.shift-dock-legacy-tab,
body.has-shift-dock #btn-cstore-os-fab,
body.has-shift-dock #feature-browser-tab,
#mr-float-nav {
  display: none !important;
}

/* Panel = existing drawer, unified look */
#feature-browser-drawer.shift-dock-panel {
  width: min(24rem, 96vw);
  background: #f8fafc;
  border-left: 1px solid #e2e8f0;
  box-shadow: -16px 0 48px rgba(15, 23, 42, 0.14);
}
.shift-dock-panel .fb-drawer-head {
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 85%);
  border-bottom: 1px solid #e2e8f0;
  padding: 0.9rem 1rem 0.85rem;
}
.fb-drawer-kicker {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #059669;
  margin-bottom: 0.15rem;
}
.shift-dock-panel .fb-drawer-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.shift-dock-panel .fb-drawer-sub {
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 0.15rem;
}

/* Quick routes — same chip language */
.sd-quick {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 0.75rem;
}
.sd-qbtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.45rem 0.2rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 0.6rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.sd-qbtn:hover { background: #f8fafc; border-color: #cbd5e1; }
.sd-qbtn.is-active {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
  box-shadow: inset 0 0 0 1px #a7f3d0;
}
.sd-qico {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  display: grid;
  place-items: center;
  color: inherit;
}
.sd-qico svg { width: 0.9rem; height: 0.9rem; display: block; }
.sd-qbtn.is-active .sd-qico {
  border-color: #a7f3d0;
  background: #d1fae5;
}

/* AI OS row inside dock (not edge FAB) */
.sd-ai-row {
  margin-top: 0.65rem;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.9rem;
  border: 1px solid #c7d2fe;
  background: linear-gradient(135deg, #eef2ff 0%, #fff 70%);
  color: #3730a3;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(67, 56, 202, 0.08);
}
.sd-ai-row:hover { border-color: #a5b4fc; background: #eef2ff; }
.sd-ai-ico {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  background: #4f46e5;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.sd-ai-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.sd-ai-copy b { font-size: 0.8rem; font-weight: 800; color: #312e81; }
.sd-ai-copy small { font-size: 0.62rem; font-weight: 600; color: #6366f1; }
.sd-ai-go { font-size: 0.7rem; font-weight: 800; color: #4f46e5; flex-shrink: 0; }

.shift-dock-panel .fb-search {
  margin-top: 0.65rem;
  border-color: #e2e8f0;
  border-radius: 0.85rem;
  background: #fff;
}
.shift-dock-panel .fb-drawer-body {
  background: #f8fafc;
  padding: 0.55rem 0.75rem 1.25rem;
}
/* Tool rows match quick chips */
.shift-dock-panel .fb-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  margin-bottom: 0.4rem;
  padding: 0.65rem 0.7rem;
}
.shift-dock-panel .fb-item:active,
.shift-dock-panel .fb-item:hover {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.shift-dock-panel .fb-item-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.shift-dock-panel .fb-section-title {
  color: #94a3b8;
  letter-spacing: 0.08em;
}
.shift-dock-panel .fb-item-label { color: #0f172a; font-weight: 700; }
.shift-dock-panel .fb-item-desc { color: #64748b; }

/* Hide old float nav CSS effects if leftover */
body.has-float-nav #feature-browser-tab { display: none !important; }

/* ============================================================
   v713 PLAIN BORDER ICONS — everywhere chrome
   Outline SVG inside 1px border chip (no emoji nav)
   ============================================================ */
.mr-border-ico,
#bottom-nav .bnav-ico,
.sd-qico,
.shift-dock-panel .fb-item-icon,
.shift-dock-launch .sdl-ico {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  flex-shrink: 0;
  border-radius: 0.55rem;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  color: #475569;
  box-shadow: none;
  font-size: 0 !important; /* kill emoji text if any slips in */
  line-height: 0;
}
.mr-border-ico .mr-line-ico,
#bottom-nav .bnav-ico svg,
.sd-qico svg,
.shift-dock-panel .fb-item-icon .mr-line-ico,
.shift-dock-panel .fb-item-icon svg,
.shift-dock-launch .sdl-ico svg {
  width: 0.95rem !important;
  height: 0.95rem !important;
  display: block !important;
  stroke: currentColor;
  fill: none;
}
#bottom-nav .bnav-btn {
  gap: 0.22rem;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 700;
}
#bottom-nav .bnav-lbl { line-height: 1.1; }
#bottom-nav .bnav-btn-active {
  color: #047857 !important;
  background: #ecfdf5 !important;
  box-shadow: inset 0 0 0 1px #a7f3d0;
}
#bottom-nav .bnav-btn-active .bnav-ico {
  border-color: #10b981;
  background: #ecfdf5;
  color: #047857;
}
.sd-qbtn.is-active .sd-qico,
.fb-item:active .fb-item-icon,
.shift-dock-panel .fb-item:hover .fb-item-icon {
  border-color: #10b981;
  background: #ecfdf5;
  color: #047857;
}
/* Feature browser icons always outline chips */
.fb-item-icon {
  width: 2rem !important;
  height: 2rem !important;
  border-radius: 0.55rem !important;
  border: 1.5px solid #cbd5e1 !important;
  background: #fff !important;
  font-size: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   v714 MOBILE SIDE TOOL = Shift Dock (plain border icons)
   Kill legacy Tools edge tab + AI edge FAB for good
   ============================================================ */

/* Always hide legacy edge stack (any specificity war) */
#feature-browser-tab,
#feature-browser-tab:not(.hidden),
body.has-bottom-nav #feature-browser-tab,
body.has-bottom-nav #feature-browser-tab:not(.hidden),
#btn-cstore-os-fab,
#btn-cstore-os-fab:not(.hidden),
body.has-bottom-nav #btn-cstore-os-fab,
body.has-shift-dock #feature-browser-tab,
body.has-shift-dock #btn-cstore-os-fab {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* Mobile: original emerald Shift Dock edge pill */
@media (max-width: 639px) {
  body.has-shift-dock:not(.guest-mode):not(.auth-booting):not(.auth-focus) .shift-dock-launch,
  body:not(.guest-mode):not(.auth-booting):not(.auth-focus) .shift-dock-launch {
    display: flex !important;
    position: fixed !important;
    right: 0 !important;
    left: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.2rem !important;
    min-width: 2.6rem !important;
    min-height: 4rem !important;
    padding: 0.5rem 0.35rem !important;
    border-radius: 1rem 0 0 1rem !important;
    border: 1px solid #a7f3d0 !important;
    border-right: 0 !important;
    background: #ecfdf5 !important;
    color: #047857 !important;
    box-shadow: -4px 0 16px rgba(4, 120, 87, 0.18) !important;
    z-index: 360 !important;
  }
  body:not(.guest-mode) .shift-dock-launch .sdl-ico {
    width: 1.85rem !important;
    height: 1.85rem !important;
    border-radius: 999px !important;
    border: 1px solid #a7f3d0 !important;
    background: #fff !important;
    color: #047857 !important;
    display: grid !important;
    place-items: center !important;
  }
  body:not(.guest-mode) .shift-dock-launch .sdl-ico svg {
    width: 1rem !important;
    height: 1rem !important;
    stroke: currentColor !important;
    fill: none !important;
  }
  body:not(.guest-mode) .shift-dock-launch .sdl-lbl {
    display: block !important;
    writing-mode: horizontal-tb !important;
    transform: none !important;
    font-size: 0.55rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: #047857 !important;
  }
  body:not(.guest-mode) .shift-dock-launch:active {
    transform: translateY(-50%) scale(0.96) !important;
    background: #d1fae5 !important;
    border-color: #6ee7b7 !important;
    color: #047857 !important;
  }
  body.feature-browser-open .shift-dock-launch {
    opacity: 0 !important;
    pointer-events: none !important;
  }
  /* Drawer full height on phone, same border-icon list */
  #feature-browser-drawer.shift-dock-panel {
    width: min(22rem, 94vw) !important;
  }
  .sd-quick {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 0.3rem !important;
  }
  .sd-qbtn {
    padding: 0.4rem 0.15rem !important;
    font-size: 0.55rem !important;
  }
  .sd-qico {
    width: 1.7rem !important;
    height: 1.7rem !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 0.5rem !important;
    background: #fff !important;
  }
}

/* Guest: never show dock launcher */
body.guest-mode .shift-dock-launch,
body.auth-booting .shift-dock-launch,
body.auth-focus .shift-dock-launch {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   Advanced All-Stores Portfolio OS (v855)
   Multi-chart dashboard · year-close · breakdowns
   ═══════════════════════════════════════════════════════════════ */
body.all-stores-mode.money-panel-open #home-money-section,
body.all-stores-mode #home-money-section.money-panel-open {
  display: block !important;
  position: relative;
  z-index: 50;
}
body.all-stores-mode #btn-header-money:not(.hidden) {
  display: inline-flex !important;
}
body.all-stores-mode #home-all-stores-analytics:not(.hidden) {
  display: block !important;
  width: 100%;
  max-width: 100%;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.pf-dashboard { background: transparent !important; }
.pf-shell {
  border-radius: 1.35rem;
  border: 1px solid #c7d2fe;
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(99,102,241,0.12), transparent 55%),
    radial-gradient(900px 320px at 100% 0%, rgba(16,185,129,0.10), transparent 50%),
    linear-gradient(180deg, #fafaff 0%, #ffffff 40%, #f8fafc 100%);
  overflow: hidden;
}
.pf-hero {
  padding: 1rem 1rem 0.65rem;
  border-bottom: 1px solid rgba(199,210,254,0.55);
}
.pf-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.pf-eyebrow {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4338ca;
}
.pf-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0.15rem 0 0.2rem;
  line-height: 1.25;
}
.pf-sub {
  font-size: 0.72rem;
  color: #64748b;
  margin: 0;
}
.pf-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  flex-shrink: 0;
}
.pf-health { margin-bottom: 0.75rem; }
.pf-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.pf-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.pf-preset, .pf-tab, .pf-btn {
  appearance: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-weight: 700;
  font-size: 0.7rem;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  line-height: 1.2;
}
.pf-preset.is-on, .pf-tab.is-on {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
  box-shadow: 0 4px 12px rgba(79,70,229,0.25);
}
.pf-btn-primary {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}
.pf-btn-ghost {
  background: rgba(255,255,255,0.85);
}
.pf-btn-sm { padding: 0.3rem 0.55rem; font-size: 0.65rem; }
.pf-btn:active, .pf-preset:active, .pf-tab:active { transform: scale(0.97); }
.pf-dates {
  display: none;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.85rem;
  background: rgba(255,255,255,0.75);
  border: 1px solid #e2e8f0;
}
.pf-dates.is-open { display: flex; }
.pf-dates label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.62rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pf-dates input[type="date"] {
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  padding: 0.35rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f172a;
  background: #fff;
}
.pf-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-bottom: 0.15rem;
}
.pf-body {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.pf-foot {
  padding: 0.55rem 1rem 0.75rem;
  font-size: 0.62rem;
  color: #94a3b8;
  line-height: 1.4;
  border-top: 1px solid #f1f5f9;
}

.pf-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}
@media (min-width: 720px) {
  .pf-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.pf-kpi {
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.7rem 0.75rem;
  box-shadow: 0 1px 0 rgba(15,23,42,0.03);
}
.pf-kpi-sales { border-color: #a7f3d0; background: linear-gradient(160deg,#ecfdf5,#fff); }
.pf-kpi-cogs { border-color: #fed7aa; background: linear-gradient(160deg,#fff7ed,#fff); }
.pf-kpi-exp { border-color: #fecaca; background: linear-gradient(160deg,#fef2f2,#fff); }
.pf-kpi-net.is-good { border-color: #a7f3d0; background: linear-gradient(160deg,#ecfdf5,#fff); }
.pf-kpi-net.is-bad { border-color: #fecaca; background: linear-gradient(160deg,#fef2f2,#fff); }
.pf-kpi-label {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}
.pf-kpi-val {
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  margin-top: 0.15rem;
}
.pf-kpi-sub {
  font-size: 0.62rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

.pf-chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}
@media (min-width: 700px) {
  .pf-chart-grid { grid-template-columns: 1fr 1fr; }
  .pf-chart-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.pf-panel {
  border-radius: 1.05rem;
  border: 1px solid #e2e8f0;
  background: rgba(255,255,255,0.92);
  padding: 0.75rem 0.8rem;
  box-shadow: 0 8px 24px rgba(15,23,42,0.03);
}
.pf-panel-center { text-align: center; }
.pf-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.pf-panel-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.01em;
}
.pf-panel-sub {
  font-size: 0.62rem;
  color: #94a3b8;
  margin-top: 0.1rem;
}
.pf-mini-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.6rem;
  color: #64748b;
  font-weight: 700;
}
.pf-mini-legend i {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  margin-right: 0.2rem;
  vertical-align: middle;
}
.pf-donut-wrap { margin: 0.35rem auto; max-width: 140px; }
.pf-legend {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  text-align: left;
}
.pf-legend li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.65rem;
  padding: 0.18rem 0;
  color: #334155;
}
.pf-swatch {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  flex-shrink: 0;
}
.pf-leg-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.pf-leg-val {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}
.pf-hbars { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.4rem; }
.pf-hbar-row { min-width: 0; }
.pf-hbar-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.68rem;
  margin-bottom: 0.18rem;
}
.pf-hbar-label {
  font-weight: 700;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pf-hbar-val {
  font-weight: 800;
  color: #475569;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.pf-hbar-track {
  height: 0.4rem;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}
.pf-hbar-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 4px;
}
.pf-empty {
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: center;
  padding: 1rem 0.5rem;
}
.pf-snap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.5rem;
}
@media (min-width: 640px) {
  .pf-snap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.pf-snap {
  border-radius: 0.8rem;
  border: 1px solid #f1f5f9;
  background: #f8fafc;
  padding: 0.55rem 0.6rem;
}
.pf-snap-label {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}
.pf-snap-val {
  font-size: 0.95rem;
  font-weight: 900;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  margin-top: 0.1rem;
}
.pf-snap-sub { font-size: 0.6rem; color: #94a3b8; margin-top: 0.1rem; }
.pf-inline-donut {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px dashed #e2e8f0;
}

/* Year close */
.pf-yc-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}
.pf-yc-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pf-pl-card {
  border-radius: 1.05rem;
  border: 1px solid #c7d2fe;
  background: linear-gradient(165deg, #eef2ff 0%, #fff 55%);
  padding: 0.85rem;
}
.pf-pl-rows { margin-top: 0.55rem; display: flex; flex-direction: column; gap: 0.28rem; }
.pf-pl-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: #334155;
  padding: 0.2rem 0;
}
.pf-pl-row strong {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: #0f172a;
}
.pf-pl-row em {
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
  margin-left: 0.35rem;
}
.pf-pl-total {
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.4rem 0 !important;
  font-weight: 700;
}
.pf-pl-em { color: #0f766e; }
.pf-pl-net { font-size: 0.9rem !important; font-weight: 800; padding-top: 0.4rem !important; }
.pf-pl-net.is-good strong { color: #047857; }
.pf-pl-net.is-bad strong { color: #b91c1c; }
.pf-pl-muted { color: #94a3b8; font-size: 0.72rem !important; }
.pf-pl-row .text-orange { color: #c2410c; }
.pf-pl-row .text-red { color: #b91c1c; }

.pf-check-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
@media (min-width: 640px) {
  .pf-check-grid { grid-template-columns: 1fr 1fr; }
}
.pf-check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  border-radius: 0.8rem;
  border: 1px solid #e2e8f0;
  padding: 0.55rem 0.6rem;
  background: #fff;
}
.pf-check.is-ok { border-color: #a7f3d0; background: #ecfdf5; }
.pf-check.is-miss { border-color: #fde68a; background: #fffbeb; }
.pf-check-ico {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid currentColor;
}
.pf-check.is-ok .pf-check-ico { color: #059669; }
.pf-check.is-miss .pf-check-ico { color: #d97706; }
.pf-check-label { font-size: 0.72rem; font-weight: 800; color: #0f172a; }
.pf-check-detail { font-size: 0.62rem; color: #64748b; margin-top: 0.1rem; line-height: 1.35; }
.pf-disclaimer {
  font-size: 0.62rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0.65rem 0 0;
}

.pf-table-wrap {
  overflow-x: auto;
  margin-top: 0.45rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
}
.pf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
  min-width: 520px;
}
.pf-table th {
  text-align: left;
  background: #f8fafc;
  color: #64748b;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.58rem;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}
.pf-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  font-weight: 600;
}
.pf-table tfoot td {
  background: #f8fafc;
  font-weight: 900;
  border-top: 1px solid #e2e8f0;
}
.pf-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pf-table .pos { color: #047857; }
.pf-table .neg { color: #b91c1c; }

.pf-store-list { display: flex; flex-direction: column; gap: 0.55rem; }
.pf-store-card {
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.75rem 0.8rem;
}
.pf-store-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.pf-store-name {
  font-weight: 800;
  font-size: 0.88rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.pf-store-pct {
  font-size: 0.62rem;
  font-weight: 800;
  color: #4f46e5;
  background: #eef2ff;
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
}
.pf-store-meta { font-size: 0.65rem; color: #94a3b8; margin-top: 0.15rem; }
.pf-store-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.25rem;
  text-align: center;
  margin-bottom: 0.4rem;
}
.pf-store-metrics span {
  display: block;
  font-size: 0.58rem;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
}
.pf-store-metrics b {
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  margin-top: 0.1rem;
}
.pf-store-metrics b.pos { color: #047857; }
.pf-store-metrics b.neg { color: #b91c1c; }
.pf-store-tender {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  font-size: 0.62rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.4rem;
}

/* Ensure charts paint on mobile lite */
#home-all-stores-analytics,
#home-all-stores-analytics .pf-dashboard,
#home-all-stores-analytics svg {
  content-visibility: visible !important;
  contain: none !important;
}


/* ═══════════════════════════════════════════════════════════════
   All Stores smooth load · never blank (v856) · force-visible (v857-force)
   ═══════════════════════════════════════════════════════════════ */
body.all-stores-mode #home-all-stores-analytics,
body.all-stores-mode #home-all-stores-analytics:not(.hidden),
body.store-switching.all-stores-mode #home-all-stores-analytics,
body.store-switching #home-all-stores-analytics {
  display: block !important;
  opacity: 1 !important;
  filter: none !important;
  pointer-events: auto !important;
  visibility: visible !important;
  content-visibility: visible !important;
  contain: none !important;
  min-height: 12rem;
}

/* Keep portfolio bright during store-switch dim of other cards */
body.store-switching.all-stores-mode #home-insights > #home-all-stores-analytics {
  opacity: 1 !important;
  filter: none !important;
  pointer-events: auto !important;
}

body.all-stores-mode #home-insights {
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* Enter animation — NEVER leave parent at opacity:0 (blank white bug v857) */
#home-all-stores-analytics.pf-dashboard,
#home-all-stores-analytics.pf-enter,
#home-all-stores-analytics.pf-enter-active,
#home-all-stores-analytics.pf-loading {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}
#home-all-stores-analytics .pf-shell {
  opacity: 1;
  transform: none;
}
#home-all-stores-analytics .pf-shell.pf-ready,
#home-all-stores-analytics.pf-enter-active .pf-shell {
  animation: pf-shell-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* Override Tailwind .hidden when All Stores is active */
body.all-stores-mode #home-all-stores-analytics.hidden,
body.all-stores-mode #home-all-stores-analytics {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  min-height: 14rem;
}

/* Skeleton shimmer */
.pf-skeleton-shell {
  animation: pf-shell-in 0.35s ease both;
}
@keyframes pf-shell-in {
  from { opacity: 0.55; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.pf-skel-hero { padding-bottom: 0.75rem; }
.pf-skel-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}
.pf-skel-title {
  width: 55%;
  height: 1.35rem;
  border-radius: 0.55rem;
}
.pf-skel-pills { display: flex; gap: 0.35rem; }
.pf-skel-pill {
  width: 3.2rem;
  height: 1.5rem;
  border-radius: 999px;
}
.pf-skel-sub {
  width: 70%;
  height: 0.7rem;
  border-radius: 0.4rem;
  margin-top: 0.55rem;
}
.pf-skel-health {
  height: 4.2rem;
  border-radius: 1rem;
  margin-top: 0.75rem;
}
.pf-skel-tabs {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.pf-skel-tab {
  width: 5.5rem;
  height: 1.7rem;
  border-radius: 999px;
}
.pf-skel-loading-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4338ca;
  margin-bottom: 0.35rem;
}
.pf-skel-spin {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 2px solid #c7d2fe;
  border-top-color: #4f46e5;
  animation: pf-spin 0.75s linear infinite;
  flex-shrink: 0;
}
@keyframes pf-spin { to { transform: rotate(360deg); } }
.pf-skel-card,
.pf-skel-panel,
.pf-skel-block,
.pf-skel-pill,
.pf-skel-title,
.pf-skel-sub,
.pf-skel-health,
.pf-skel-tab {
  background: linear-gradient(90deg, #eef2ff 0%, #f8fafc 40%, #e0e7ff 80%, #eef2ff 100%);
  background-size: 200% 100%;
  animation: pf-shimmer 1.35s ease-in-out infinite;
}
.pf-skel-card {
  height: 5.2rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
}
.pf-skel-panel {
  height: 9.5rem;
  border-radius: 1.05rem;
  border: 1px solid #e2e8f0;
}
.pf-skel-round {
  height: 11rem;
  border-radius: 1.25rem;
}
@keyframes pf-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Smoother store-switch pill for All Stores */
body.all-stores-mode.store-switching #store-switch-pill:not(.hidden) {
  box-shadow: 0 8px 28px rgba(79, 70, 229, 0.28);
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  #home-all-stores-analytics.pf-enter,
  #home-all-stores-analytics.pf-enter-active,
  #home-all-stores-analytics .pf-shell.pf-ready,
  .pf-skeleton-shell,
  .pf-skel-card,
  .pf-skel-panel,
  .pf-skel-block,
  .pf-skel-pill,
  .pf-skel-title,
  .pf-skel-sub,
  .pf-skel-health,
  .pf-skel-tab,
  .pf-skel-spin {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   All Stores stable filters + no-flicker (v858)
   ═══════════════════════════════════════════════════════════════ */
.pf-filter-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 0 0.65rem;
  padding: 0.7rem 0.75rem 0.75rem;
  border-radius: 1rem;
  border: 1px solid #c7d2fe;
  background: linear-gradient(180deg, #eef2ff 0%, #ffffff 70%);
  box-shadow: 0 8px 24px rgba(67, 56, 202, 0.08);
}
.pf-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.pf-filter-title {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3730a3;
}
.pf-range-chip {
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #312e81;
  background: #e0e7ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}
.pf-filter-bar .pf-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}
.pf-filter-bar .pf-preset {
  font-size: 0.72rem;
  padding: 0.42rem 0.75rem;
  border-width: 1.5px;
}
.pf-filter-bar .pf-dates,
.pf-dates.is-open {
  display: flex !important;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.5rem 0.55rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e2e8f0;
}
.pf-field {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  font-size: 0.62rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pf-field input[type="date"],
.pf-select,
.pf-field select {
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  padding: 0.42rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  background: #fff;
  min-width: 8.5rem;
  max-width: 100%;
}
.pf-select {
  min-width: 9.5rem;
  cursor: pointer;
}
#btn-pf-apply-dates {
  align-self: flex-end;
  min-height: 2.15rem;
}
/* Reduce shell re-animation flicker */
#home-all-stores-analytics .pf-shell.pf-ready {
  animation: none !important;
}
body.all-stores-mode #home-all-stores-analytics {
  transition: none !important;
}


/* v859 — Portfolio must not stick under single-store home */
body:not(.all-stores-mode) #home-all-stores-analytics,
body:not(.all-stores-mode) #home-all-stores-analytics.pf-dashboard,
body:not(.all-stores-mode) #home-all-stores-analytics.pf-enter-active {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  min-height: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  pointer-events: none !important;
}


/* v860 — role boot: never show employee desk while owner session pending/loading */
body.app-owner-session #home-employee-panel,
body.app-role-pending #home-employee-panel,
body:not(.app-employee-session) #home-employee-panel {
  display: none !important;
}
body.app-role-pending.app-owner-session #home-employee-panel {
  display: none !important;
}
/* Employee session must not leave portfolio ghost */
body.app-employee-session #home-all-stores-analytics {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   v861 — No UI flash: keep cards solid during switch/boot
   Only intentional page load / hard refresh may animate.
   ═══════════════════════════════════════════════════════════════ */
body.store-switching #home-insights > .card:not(#workspace-boot-overlay),
body.store-switching #home-insights > .card:not(#workspace-boot-overlay) {
  opacity: 1 !important;
  filter: none !important;
  pointer-events: auto !important;
  transition: none !important;
  transform: none !important;
  animation: none !important;
}
body.store-switching #section-ledger-table,
body.store-switching #section-ledger-metrics,
body.store-switching #section-quick-add {
  opacity: 1 !important;
  pointer-events: auto !important;
  transition: none !important;
}
/* Kill re-fade of every card after switch (was the main flash) */
body.store-switch-enter #home-insights > .card:not(#workspace-boot-overlay) {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}
/* Thin top progress only — no full-page dim */
body.store-switching #home-insights::after {
  height: 2px;
  opacity: 0.9;
}
/* Portfolio: no enter opacity dance */
#home-all-stores-analytics,
#home-all-stores-analytics.pf-enter,
#home-all-stores-analytics.pf-enter-active,
#home-all-stores-analytics .pf-shell,
#home-all-stores-analytics .pf-shell.pf-ready {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  transform: none !important;
}
/* Boot: don't fade cards when workspace unlocks */
body.app-ready #home-insights > .card {
  animation: none !important;
}
body.app-ready.store-switching #home-insights > .card {
  opacity: 1 !important;
}
/* Soft page paint once only on hard navigation (optional subtle) */
@supports (view-transition-name: none) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.01ms;
  }
}

/* ═══════════════════════════════════════════════════════════════
/* ═══════════════════════════════════════════════════════════════
/* ═══════════════════════════════════════════════════════════════
/* ═══════════════════════════════════════════════════════════════
   v865 — Restore employee workspace (do not hide staff desk)
   ═══════════════════════════════════════════════════════════════ */
html body.app-home-ready.app-employee-session #home-employee-panel,
html body.app-employee-session #home-employee-panel.emp-ws-panel {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  max-height: none !important;
  overflow: visible !important;
  pointer-events: auto !important;
}
/* Natural desk spacing — real padding lives with .emp-ws-panel rules above */
/* Owner only — never use :not(.app-employee-session) alone mid-boot to wipe staff */
html body.app-owner-session:not(.app-employee-session) #home-employee-panel {
  display: none !important;
}
/* Employee: show bottom nav home tools after ready */
html body.app-home-ready.app-employee-session #bottom-nav {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  max-height: none !important;
  pointer-events: auto !important;
}


/* v887 — ONLY show hosts that are not .hidden (empty shells stay collapsed) */
html body.app-home-ready.app-owner-session #home-store-pulse:not(.hidden),
html body.app-home-ready.app-owner-session #home-stock-road:not(.hidden),
html body.app-home-ready.app-owner-session #home-dashboard-status:not(.hidden),
html body.app-home-ready.app-owner-session #home-tonight-strip:not(.hidden),
html body.app-home-ready.app-owner-session #home-live-strip:not(.hidden),
html body.app-home-ready.app-owner-session #home-sell-actions:not(.hidden),
html body.app-home-ready.app-owner-session #section-quick-add:not(.hidden),
html body.app-home-ready.app-owner-session #home-team-chat-owner:not(.hidden),
html body.app-home-ready.app-owner-session #home-shift-note:not(.hidden),
html body.app-home-ready.app-owner-session #home-shift-tasks:not(.hidden),
html body.app-home-ready.app-owner-session #home-staff-adoption:not(.hidden),
html body.app-home-ready.app-employee-session #home-team-chat:not(.hidden),
html body.app-home-ready.app-employee-session #home-employee-panel:not(.hidden),
html body.app-home-ready.app-employee-session #home-stock-road:not(.hidden),
html body.app-home-ready.app-employee-session #home-shift-tasks:not(.hidden) {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  max-height: none;
  overflow: visible;
}
/* Legacy smart-insights host stays off */
html body.app-home-ready #home-smart-insights {
  display: none !important;
}
/* Empty hosts (no content) must not reserve white space */
html body.app-home-ready #home-insights > .card.hidden,
html body.app-home-ready #home-insights > .hidden {
  display: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  overflow: hidden !important;
}
/* Manage Stores shift handoff section when editing a store */
#store-shift-handoff-section:not(.hidden) {
  display: block !important;
}
#manage-shift-handoff-body {
  min-height: 4rem;
}



/* ═══════════════════════════════════════════════════════════════
   v871 — Clean CSS recovery (no padding:revert / layout stomp)
   Show-hide only where boot still needs it. Spacing uses normal rules.
   ═══════════════════════════════════════════════════════════════ */

/* Boot cover: simple centered card shell */
body.app-home-pending:not(.guest-mode):not(.app-home-ready) #app-loading-shell:not(.hidden) {
  display: block;
  position: relative;
  z-index: 30;
  margin: 0.75rem auto;
  max-width: 28rem;
  width: calc(100% - 1.5rem);
  min-height: auto;
  height: auto;
  inset: auto;
  padding: 1.25rem 1rem;
  border-radius: 1.25rem;
  border: 1px solid #d1fae5;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}
body.app-home-ready #app-loading-shell,
body.app-home-ready #workspace-boot-overlay,
html body.app-employee-session.app-home-ready #app-loading-shell {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
/* Never leave boot shell as a full card under What's Out */
#app-loading-shell.hidden {
  display: none !important;
}

/* Ready home: only unlock desk/primary hosts (not every .card — secondary stay parked) */
body.app-home-ready #home-insights > #home-store-pulse:not(.hidden),
body.app-home-ready #home-insights > #home-stock-road:not(.hidden),
body.app-home-ready #home-insights > #home-dashboard-status:not(.hidden),
body.app-home-ready #home-insights > #home-team-chat-owner:not(.hidden),
body.app-home-ready #home-insights > #home-team-chat:not(.hidden),
body.app-home-ready #home-insights > #home-shift-note:not(.hidden),
body.app-home-ready #home-insights > #home-shift-tasks:not(.hidden),
body.app-home-ready #home-insights > #home-staff-adoption:not(.hidden),
body.app-home-ready #home-insights > #home-tonight-strip:not(.hidden),
body.app-home-ready #home-insights > #home-live-strip:not(.hidden),
body.app-home-ready #home-insights > #home-sell-actions:not(.hidden),
body.app-home-ready #home-insights > #home-employee-panel:not(.hidden),
body.app-home-ready #section-quick-add:not(.hidden) {
  max-height: none;
  overflow: visible;
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

/* v883: owner cards stay visible via JS removing .hidden — no display model override */

/* Natural interior space for main home cards (cascade, not force-unhide) */
#home-insights > #home-store-pulse.card,
#home-insights > #home-tonight-strip.card,
#home-insights > #home-stock-road.card,
#home-insights > #home-sell-actions.card,
#home-insights > #home-live-strip.card,
#home-insights > #home-team-chat-owner.card,
#home-insights > #home-team-chat.card,
#home-insights > #home-shift-note.card,
#home-insights > #home-shift-tasks.card,
#home-insights > #home-staff-adoption.card {
  padding: 0.85rem 0.9rem;
}
#home-insights > #home-dashboard-status.brain-strip,
#home-insights > #home-dashboard-status.card {
  padding: 0.75rem 0.85rem;
}
body.mr-strict-today #home-store-pulse.qi-live-card {
  padding: 0.85rem 0.9rem;
}
#home-store-pulse .qi-kpi {
  padding: 0.55rem 0.5rem;
}
#home-store-pulse .qi-panel {
  padding: 0.7rem 0.75rem;
}
#home-store-pulse .qi-panel-kpis {
  padding: 0.6rem 0.55rem;
}
@media (max-width: 640px) {
  #home-insights > #home-store-pulse.card,
  body.mr-strict-today #home-store-pulse.qi-live-card {
    padding: 0.8rem 0.85rem;
  }
  #home-store-pulse .qi-kpi {
    padding: 0.55rem 0.45rem;
  }
}

/* Pending boot: hide chrome without collapsing layout */
body:not(.app-home-ready):not(.guest-mode) #section-quick-add,
body:not(.app-home-ready):not(.guest-mode) #home-employee-panel,
body:not(.app-home-ready):not(.guest-mode) #bottom-nav,
body:not(.app-home-ready):not(.guest-mode) #tools-hub,
body:not(.app-home-ready):not(.guest-mode) #feature-browser-tab {
  visibility: hidden;
  pointer-events: none;
}

/* ── Compact team chat (unique classes — normal cascade) ── */
.mr-desk-compact { margin: 0.5rem 0 0.75rem; }
.mr-desk-head-compact {
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.mr-desk-compact .mr-desk-title { font-size: 0.85rem; font-weight: 800; }
.mr-desk-peek {
  font-size: 0.68rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(16rem, 55vw);
}
.mr-desk-head-actions { display: flex; align-items: center; gap: 0.35rem; }
.mr-desk-count {
  min-width: 1.3rem; height: 1.3rem; border-radius: 999px;
  background: #ecfdf5; color: #047857; font-size: 0.65rem; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 0.3rem;
}
.mr-desk-chev { color: #94a3b8; font-size: 0.75rem; transition: transform 0.15s ease; }
.mr-desk.is-collapsed .mr-desk-chev { transform: rotate(-90deg); }
.mr-desk.is-collapsed .mr-desk-body { display: none; }
.mr-desk-compact .mr-desk-thread {
  max-height: 10rem;
  min-height: 4rem;
  overflow-y: auto;
  padding: 0.5rem 0.65rem;
}
.mr-desk-compact .mr-desk-compose { padding: 0.45rem 0.55rem; }
.mr-desk-compact .mr-desk-input { font-size: 0.8rem; padding: 0.45rem 0.6rem; }
.mr-desk-compact .mr-desk-send { font-size: 0.75rem; padding: 0.45rem 0.7rem; }
.mr-desk-compact .mr-desk-bubble { font-size: 0.78rem; padding: 0.4rem 0.55rem; max-width: 92%; }
.mr-desk-dot { font-size: 1.05rem; }

/* ── Clean score card ── */
.ep-card-clean {
  border-radius: 1.1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  overflow: hidden;
}
.ep-clean-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem 0.5rem;
  background: linear-gradient(135deg, #f0fdf4, #fff 60%);
}
.ep-clean-badge {
  width: 2.5rem; height: 2.5rem; border-radius: 0.8rem; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; background: #fff; border: 1px solid #e2e8f0;
}
.ep-clean-mid { flex: 1; min-width: 0; }
.ep-card-clean .ep-kicker {
  font-size: 0.58rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: #059669;
}
.ep-card-clean .ep-title { font-size: 0.95rem; font-weight: 900; color: #0f172a; }
.ep-card-clean .ep-sub { font-size: 0.68rem; color: #64748b; }
.ep-card-clean .ep-score {
  background: #0f172a; color: #fff; border-radius: 0.8rem;
  padding: 0.4rem 0.55rem; text-align: center; min-width: 3.2rem;
}
.ep-card-clean .ep-score-n { font-size: 1.15rem; font-weight: 900; line-height: 1; }
.ep-card-clean .ep-score-l { font-size: 0.55rem; opacity: 0.8; text-transform: uppercase; }
.ep-card-clean .ep-body { padding: 0.5rem 0.85rem 0.75rem; }
.ep-next-line { font-size: 0.72rem; color: #475569; font-weight: 600; margin: 0.3rem 0 0.45rem; }
.ep-stats-3 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; margin-bottom: 0.5rem;
}
.ep-stats-3 .ep-stat {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 0.65rem;
  padding: 0.45rem 0.4rem; text-align: center;
}
.ep-stats-3 .ep-stat b { display: block; font-size: 0.95rem; font-weight: 900; color: #0f172a; }
.ep-stats-3 .ep-stat span { font-size: 0.58rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; }
.ep-earn-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; margin-bottom: 0.45rem;
}
.ep-earn-chip {
  display: flex; flex-direction: column; align-items: center; gap: 0.08rem;
  background: #f1f5f9; border-radius: 0.6rem; padding: 0.4rem 0.25rem; text-align: center;
}
.ep-earn-chip b { font-size: 0.62rem; font-weight: 800; color: #334155; }
.ep-earn-chip em { font-style: normal; font-size: 0.6rem; font-weight: 900; color: #059669; }
.ep-raise-mini { font-size: 0.7rem; color: #475569; margin-bottom: 0.4rem; }
.ep-card-clean .ep-cta {
  width: 100%; border: 0; border-radius: 0.7rem; padding: 0.5rem;
  background: #ecfdf5; color: #047857; font-weight: 800; font-size: 0.75rem;
}

/* ── Fast daily What's Out + logs ── */
.sr-fast-daily,
#home-stock-road.sr-fast-daily,
#home-stock-road {
  border: 1px solid #e4e4e7 !important;
  background: #fff !important;
  padding: 1.15rem 1.4rem 1.2rem !important;
  border-radius: 1.15rem !important;
  box-sizing: border-box !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 18px rgba(15, 23, 42, 0.05) !important;
}
.sr-fast-head { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.55rem; box-sizing: border-box; width: 100%; }
.sr-fast-kicker { font-size: 0.58rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #0ea5e9; }
.sr-fast-title { font-size: 1.05rem; font-weight: 900; color: #0f172a; letter-spacing: -0.02em; }
.sr-fast-sub { font-size: 0.7rem; color: #64748b; margin-top: 0.12rem; }
.sr-fast-grade { font-size: 1.45rem; font-weight: 900; line-height: 1; flex-shrink: 0; padding-left: 0.35rem; }
.sr-fast-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; margin-bottom: 0.55rem; width: 100%; box-sizing: border-box; }
.sr-fast-stat { border: 0; border-radius: 0.85rem; padding: 0.65rem 0.45rem; text-align: center; cursor: pointer; background: #f8fafc; box-sizing: border-box; min-width: 0; }
.sr-fast-stat b { display: block; font-size: 1.15rem; font-weight: 900; }
.sr-fast-stat span { font-size: 0.58rem; font-weight: 800; text-transform: uppercase; color: #94a3b8; }
.sr-fast-stat.is-out { background: #fef2f2; } .sr-fast-stat.is-out b { color: #dc2626; }
.sr-fast-stat.is-low { background: #fffbeb; } .sr-fast-stat.is-low b { color: #d97706; }
.sr-fast-stat.is-ok { background: #ecfdf5; } .sr-fast-stat.is-ok b { color: #059669; }
.sr-fast-label { font-size: 0.58rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: #94a3b8; margin: 0.4rem 0 0.35rem; }
.sr-fast-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; margin-bottom: 0.45rem; width: 100%; box-sizing: border-box; }
.sr-fast-logs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; width: 100%; box-sizing: border-box; }
.sr-fast-row .sr-hub-btn { min-width: 0; box-sizing: border-box; padding: 0.85rem 0.65rem !important; }
.sr-log-btn {
  border: 1px solid #e2e8f0; border-radius: 0.85rem; background: #fff; cursor: pointer;
  padding: 0.6rem 0.3rem; display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  font-size: 1rem; transition: transform 0.12s ease; box-sizing: border-box; min-width: 0;
}
.sr-log-btn span { font-size: 0.58rem; font-weight: 800; color: #475569; }
.sr-log-btn:active { transform: scale(0.96); }
.sr-log-btn.is-sale { background: #ecfdf5; border-color: #a7f3d0; }
.sr-log-btn.is-purch { background: #fff7ed; border-color: #fed7aa; }
.sr-log-btn.is-exp { background: #fef2f2; border-color: #fecaca; }
.sr-log-btn.is-drop { background: #f0fdfa; border-color: #99f6e4; }

/* ── Thumb attendance ── */
.emp-attend-card {
  margin: 0.65rem 0 0.85rem;
  padding: 0.85rem 0.9rem 1rem;
  border-radius: 1.25rem;
  border: 1px solid #e0e7ff;
  background: linear-gradient(160deg, #eef2ff 0%, #fff 52%, #ecfeff 100%);
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.07);
}
.emp-attend-head { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.7rem; }
.emp-attend-kicker { font-size: 0.58rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #4f46e5; }
.emp-attend-title { font-size: 1.05rem; font-weight: 900; color: #0f172a; }
.emp-attend-sub { font-size: 0.68rem; color: #64748b; margin-top: 0.1rem; }
.emp-attend-hr {
  border: 1px solid #c7d2fe; background: #fff; color: #4338ca;
  font-size: 0.68rem; font-weight: 800; padding: 0.35rem 0.55rem;
  border-radius: 999px;
}
.emp-attend-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.emp-thumb {
  border: 0; background: transparent; padding: 0.2rem; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem; position: relative;
}
.emp-thumb-pad {
  width: 4rem; height: 4rem; border-radius: 999px; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid #e2e8f0;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1);
}
.emp-thumb-print { font-size: 1.5rem; z-index: 1; position: relative; }
.emp-thumb-ring {
  position: absolute; inset: -3px; border-radius: 999px; border: 2px solid transparent;
  opacity: 0; transform: scale(0.85);
}
.emp-thumb-in .emp-thumb-pad { border-color: #86efac; background: linear-gradient(160deg, #ecfdf5, #fff); }
.emp-thumb-out .emp-thumb-pad { border-color: #fda4af; background: linear-gradient(160deg, #fff1f2, #fff); }
.emp-thumb-tasks .emp-thumb-pad { border-color: #c4b5fd; background: linear-gradient(160deg, #f5f3ff, #fff); }
.emp-thumb-lab { font-size: 0.72rem; font-weight: 900; color: #334155; }
.emp-thumb:active .emp-thumb-pad { transform: scale(0.88); }
.emp-thumb:active .emp-thumb-ring { animation: emp-thumb-pulse 0.45s ease-out; }
.emp-thumb-in:active .emp-thumb-ring { border-color: #22c55e; }
.emp-thumb-out:active .emp-thumb-ring { border-color: #f43f5e; }
.emp-thumb-tasks:active .emp-thumb-ring { border-color: #8b5cf6; }
@keyframes emp-thumb-pulse {
  0% { opacity: 0.85; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.35); }
}
.emp-thumb-badge {
  position: absolute; top: 0.1rem; right: 0.55rem; z-index: 2;
  min-width: 1.1rem; height: 1.1rem; border-radius: 999px;
  background: #fbbf24; color: #0f172a; font-size: 0.6rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center; padding: 0 0.25rem;
}

/* Store slide rail when home ready */
body.app-home-ready #store-slide-track,
body.app-home-ready .store-slide-rail,
body.app-home-ready #store-hero {
  visibility: visible !important;
  opacity: 1 !important;
  max-height: none !important;
  pointer-events: auto !important;
}

/* ═══════════════════════════════════════════════════════════════
   v874 — Employee Floor OS (task-first shell)
   ═══════════════════════════════════════════════════════════════ */
body.emp-os-active {
  --emp-dock-h: 4.25rem;
}
body.emp-os-active.has-emp-dock {
  padding-bottom: calc(var(--emp-dock-h) + env(safe-area-inset-bottom, 0px) + 0.5rem);
}
/* Hide legacy owner bottom nav on staff floor */
body.emp-os-active #bottom-nav {
  display: none !important;
}
body.emp-os-active #tools-hub {
  display: none !important;
}

.emp-os {
  margin: 0.5rem 0 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.emp-os-main {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.emp-os-head {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.15rem;
  padding: 0.75rem 0.9rem 0.65rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}
.emp-os-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.emp-os-kicker {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2563eb;
}
.emp-os-store-name {
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.emp-os-score {
  background: #0f172a;
  color: #fff;
  border-radius: 0.85rem;
  padding: 0.4rem 0.55rem;
  text-align: center;
  min-width: 3.2rem;
}
.emp-os-score-n { display: block; font-size: 1.15rem; font-weight: 900; line-height: 1; }
.emp-os-score-l { font-size: 0.55rem; opacity: 0.75; text-transform: uppercase; font-weight: 700; }
.emp-os-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}
.emp-chip {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.emp-chip.is-done { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.emp-chip.is-now { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; }

/* Next step strip */
.emp-next {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #eff6ff, #fff 60%);
  border-radius: 1rem;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}
.emp-next:active { transform: scale(0.99); }
.emp-next-step {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 0.55rem;
  padding: 0.35rem 0.45rem;
}
.emp-next-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}
.emp-next-body strong {
  font-size: 0.9rem;
  font-weight: 900;
  color: #0f172a;
}
.emp-next-body span {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
}
.emp-next-go {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  color: #2563eb;
}

/* Now card */
.emp-now {
  border-radius: 1.2rem;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}
.emp-now-arrive {
  background: linear-gradient(165deg, #ecfdf5 0%, #fff 55%);
  border-color: #a7f3d0;
}
.emp-now-read {
  background: linear-gradient(165deg, #eef2ff 0%, #fff 55%);
  border-color: #c7d2fe;
}
.emp-now-close {
  background: linear-gradient(165deg, #fff7ed 0%, #fff 55%);
  border-color: #fed7aa;
}
.emp-now-kicker {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.25rem;
}
.emp-now-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.emp-now-sub {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  margin-top: 0.25rem;
}
.emp-now-note {
  margin-top: 0.55rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #1e293b;
  background: rgba(255,255,255,0.75);
  border-radius: 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e0e7ff;
  white-space: pre-wrap;
}
.emp-now-task-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: #334155;
  font-weight: 600;
}
.emp-now-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.emp-now-cta {
  border: 0;
  border-radius: 0.85rem;
  padding: 0.7rem 1rem;
  font-weight: 900;
  font-size: 0.88rem;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  min-height: 2.75rem;
}
.emp-now-cta-in { background: #059669; width: 100%; margin-top: 0.75rem; font-size: 1rem; }
.emp-now-sec {
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  padding: 0.65rem 0.85rem;
  font-weight: 800;
  font-size: 0.78rem;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  min-height: 2.75rem;
}
.emp-now-out { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.emp-now-cta:active, .emp-now-sec:active { transform: scale(0.98); }

/* Do grid */
.emp-do, .emp-more {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.15rem;
  padding: 0.7rem 0.75rem 0.8rem;
}
.emp-do-label {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.45rem;
}
.emp-do-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}
.emp-do-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.95rem;
  padding: 0.7rem 0.35rem 0.55rem;
  background: #f8fafc;
  cursor: pointer;
  min-height: 4.5rem;
  touch-action: manipulation;
}
.emp-do-tile:active { transform: scale(0.97); }
.emp-do-ico { font-size: 1.35rem; line-height: 1; }
.emp-do-lab { font-size: 0.72rem; font-weight: 900; color: #0f172a; }
.emp-do-pts { font-size: 0.58rem; font-weight: 800; color: #059669; }
.emp-do-sale { background: linear-gradient(180deg, #ecfdf5, #fff); border-color: #a7f3d0; }
.emp-do-out { background: linear-gradient(180deg, #fef2f2, #fff); border-color: #fecaca; }
.emp-do-recv { background: linear-gradient(180deg, #eff6ff, #fff); border-color: #bfdbfe; }
.emp-do-buy { background: linear-gradient(180deg, #fff7ed, #fff); border-color: #fed7aa; }
.emp-do-exp { background: linear-gradient(180deg, #faf5ff, #fff); border-color: #e9d5ff; }
.emp-do-drop { background: linear-gradient(180deg, #f0fdfa, #fff); border-color: #99f6e4; }

.emp-more-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}
.emp-more-btn {
  border: 1px solid #e2e8f0;
  background: #fafafa;
  border-radius: 0.75rem;
  padding: 0.55rem 0.2rem;
  font-size: 0.65rem;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
  min-height: 2.6rem;
}

.emp-os-slot { margin-top: 0.15rem; }
.emp-os-slot > .card,
.emp-os-slot > #home-stock-road,
.emp-os-slot > #home-team-chat {
  margin-top: 0.35rem;
}

/* Compact brain under staff */
body.emp-os-active #home-dashboard-status.emp-os-brain {
  margin: 0.35rem 0 0.15rem;
  padding: 0.55rem 0.75rem !important;
  order: -1;
}
body.emp-os-active #home-insights {
  display: flex;
  flex-direction: column;
}
body.emp-os-active #emp-os-root { order: 1; }
body.emp-os-active #home-dashboard-status { order: 0; }

/* Dock */
.emp-dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(0.45rem + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  width: min(28rem, calc(100vw - 1rem));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.2rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 0.35rem 0.4rem 0.4rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}
.emp-dock-btn {
  border: 0;
  background: transparent;
  border-radius: 0.9rem;
  padding: 0.35rem 0.15rem 0.3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08rem;
  cursor: pointer;
  color: #64748b;
  min-height: 3.1rem;
}
.emp-dock-btn.is-active {
  background: #eff6ff;
  color: #1d4ed8;
}
.emp-dock-primary {
  background: #0f172a !important;
  color: #fff !important;
  border-radius: 999px !important;
  margin-top: -0.55rem;
  min-height: 3.4rem !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
}
.emp-dock-primary .emp-dock-lab { color: #fff; }
.emp-dock-ico { font-size: 1.15rem; line-height: 1; }
.emp-dock-lab { font-size: 0.58rem; font-weight: 800; }

/* Log sheet */
.emp-log-sheet {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.emp-log-sheet.hidden { display: none !important; }
.emp-log-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
}
.emp-log-panel {
  position: relative;
  width: min(28rem, 100%);
  background: #fff;
  border-radius: 1.35rem 1.35rem 0 0;
  padding: 0.5rem 0.9rem calc(1rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
  animation: emp-sheet-up 0.22s ease-out;
}
@keyframes emp-sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.emp-log-handle {
  width: 2.5rem;
  height: 0.28rem;
  border-radius: 999px;
  background: #e2e8f0;
  margin: 0.25rem auto 0.55rem;
}
.emp-log-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.emp-log-kicker {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
}
.emp-log-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
}
.emp-log-x {
  border: 0;
  background: #f1f5f9;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  color: #64748b;
}
.emp-log-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.emp-log-tile {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #f8fafc;
  padding: 0.85rem 0.65rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 5rem;
}
.emp-log-tile:active { transform: scale(0.98); }
.emp-log-tile-ico { font-size: 1.35rem; }
.emp-log-tile-lab { font-size: 0.9rem; font-weight: 900; color: #0f172a; }
.emp-log-tile-hint { font-size: 0.68rem; color: #94a3b8; font-weight: 600; }

body.emp-log-open { overflow: hidden; }

/* Hide legacy employee wall when Floor OS active */
body.emp-os-active #home-employee-panel,
body.emp-os-active #home-employee-panel[data-emp-os-legacy] {
  display: none !important;
}

@media (min-width: 640px) {
  .emp-do-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .emp-dock { bottom: 1rem; }
}


/* ═══════════════════════════════════════════════════════════════
   v875 — Floor OS stability: phone dock only, PC bar, chat always
   ═══════════════════════════════════════════════════════════════ */
body.emp-os-active #bottom-nav,
body.emp-os-active #tools-hub {
  display: none !important;
}

/* Phone dock only */
.emp-dock { display: none !important; }
body.has-emp-dock .emp-dock { display: none !important; }
@media (max-width: 639px) {
  body.emp-os-active.has-emp-dock {
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px) + 0.5rem) !important;
  }
  body.emp-os-active.has-emp-dock .emp-dock,
  body.has-emp-dock .emp-dock,
  #emp-os-dock.emp-dock {
    display: grid !important;
  }
}
@media (min-width: 640px) {
  body.emp-os-active.has-emp-dock,
  body.has-emp-dock {
    padding-bottom: 0 !important;
  }
  #emp-os-dock,
  .emp-dock {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* PC / tablet top action bar inside Floor OS header */
.emp-pc-bar {
  display: none;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}
@media (min-width: 640px) {
  .emp-pc-bar { display: flex; }
}
.emp-pc-btn {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
  min-height: 2.4rem;
}
.emp-pc-btn.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.emp-pc-log {
  background: #0f172a !important;
  color: #fff !important;
  border-color: #0f172a !important;
}

/* Chat slot always has room */
#emp-os-slot-chat {
  min-height: 0;
  margin-top: 0.35rem;
}
#emp-os-slot-chat #home-team-chat,
#home-team-chat.emp-os-chat-card,
body.emp-os-active #home-team-chat {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0.35rem 0 0.5rem !important;
  padding: 0 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 1.1rem !important;
  background: #fff !important;
  min-height: 4rem;
}
body.emp-os-active #home-team-chat .mr-desk,
body.emp-os-active #home-team-chat .mr-desk-compact {
  display: block !important;
  margin: 0 !important;
}

/* Stable order */
body.emp-os-active #home-insights {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.55rem;
}
body.emp-os-active #home-dashboard-status { order: 0; }
body.emp-os-active #emp-os-root { order: 1; }
body.emp-os-active #home-employee-entries { order: 5; }
body.emp-os-active #home-live-strip,
body.emp-os-active #home-tonight-strip { order: 6; }

/* Kill empty white ghost cards under staff */
body.emp-os-active #home-insights > .card[data-emp-empty-hide="1"],
body.emp-os-active #home-store-pulse,
body.emp-os-active #home-smart-insights,
body.emp-os-active #home-sell-actions {
  display: none !important;
}

/* Floor OS main always solid */
#emp-os-root.emp-os {
  display: flex !important;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.35rem 0 0.75rem;
  min-height: 8rem;
}
#emp-os-root .emp-os-main {
  display: flex !important;
  flex-direction: column;
  gap: 0.65rem;
}


/* v875b — chat always visible under Floor OS */
body.emp-os-active #emp-os-slot-chat {
  display: block !important;
  order: 2;
  margin: 0.5rem 0 0.75rem;
  min-height: 5rem;
}
body.emp-os-active #home-team-chat,
body.emp-os-active #emp-os-slot-chat #home-team-chat {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  max-height: none !important;
  min-height: 5.5rem !important;
  height: auto !important;
  overflow: visible !important;
  pointer-events: auto !important;
  margin: 0.25rem 0 0 !important;
  padding: 0 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 1.1rem !important;
  background: #fff !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05) !important;
}
body.emp-os-active #home-team-chat .mr-desk {
  display: block !important;
  margin: 0 !important;
}
body.emp-os-active #home-team-chat .mr-desk.is-collapsed .mr-desk-body {
  display: block !important; /* staff: keep open so chat is obvious */
}
body.emp-os-active #home-team-chat .mr-desk-head {
  display: flex !important;
  padding: 0.65rem 0.85rem !important;
}
body.emp-os-active #home-team-chat .mr-desk-compose {
  display: flex !important;
  gap: 0.4rem;
  padding: 0.5rem 0.65rem 0.65rem !important;
}
body.emp-os-active #home-team-chat .mr-desk-input {
  flex: 1;
  min-height: 2.4rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.7rem;
  padding: 0.45rem 0.65rem;
}
body.emp-os-active #home-team-chat .mr-desk-send {
  border: 0;
  border-radius: 0.7rem;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}
body.emp-os-active #home-team-chat .mr-desk-thread {
  max-height: 12rem;
  overflow-y: auto;
  padding: 0.5rem 0.65rem;
  min-height: 3rem;
}

/* ═══════════════════════════════════════════════════════════════
   v878 — No flash at top of insights + soft tile skeletons
   ═══════════════════════════════════════════════════════════════ */

/* Loading shell must never sit as a flashing card once home is ready */
body.app-home-ready #app-loading-shell,
body.app-home-ready #workspace-boot-overlay,
body.mr-soft-refresh #app-loading-shell,
html body.app-ready.app-home-ready #app-loading-shell {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  max-height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* Kill enter/fade animations on home cards (flash source) */
#home-insights > .card,
#home-insights > .card.pf-enter,
#home-insights > .card.pf-enter-active,
body.app-home-ready #home-insights > .card,
body.app-ready #home-insights > .card {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* Soft refresh: content stays, thin bar only */
body.mr-soft-refresh #home-insights {
  position: relative;
}

/* Skeleton tiles (shimmer) — strengthen loading without blank flash */
.mr-skel-card {
  padding: 0.85rem 0.9rem;
  border-radius: 1.1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  min-height: 4.5rem;
}
.mr-skel-line {
  height: 0.65rem;
  border-radius: 999px;
  margin: 0.4rem 0;
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 40%, #f1f5f9 80%);
  background-size: 200% 100%;
  animation: mr-skel-shimmer 1.15s ease-in-out infinite;
}
.mr-skel-w30 { width: 30%; }
.mr-skel-w40 { width: 40%; }
.mr-skel-w50 { width: 50%; }
.mr-skel-w60 { width: 60%; }
.mr-skel-w70 { width: 70%; }
.mr-skel-w80 { width: 80%; }
.mr-skel-chips {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.mr-skel-chips span {
  display: block;
  height: 1.5rem;
  width: 4.2rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 40%, #f1f5f9 80%);
  background-size: 200% 100%;
  animation: mr-skel-shimmer 1.15s ease-in-out infinite;
}
.mr-skel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-top: 0.55rem;
}
.mr-skel-tile {
  height: 3.4rem;
  border-radius: 0.85rem;
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 40%, #f1f5f9 80%);
  background-size: 200% 100%;
  animation: mr-skel-shimmer 1.15s ease-in-out infinite;
}
@keyframes mr-skel-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mr-skel-line, .mr-skel-chips span, .mr-skel-tile {
    animation: none !important;
    background: #f1f5f9 !important;
  }
}

/* Store slide chips: solid during load */
body.app-home-pending .store-slide-chip,
body.store-switching .store-slide-chip {
  opacity: 1 !important;
}

/* v1681 — soft store switch: chip + scoreboard ease (no dim overlay thrash) */
#store-slide-track .store-slide-chip,
#store-slide-track button.store-slide-chip,
.store-slide-chip {
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    border-color 0.15s ease, color 0.15s ease, opacity 0.12s ease !important;
  will-change: transform, background;
}
body.store-switch-soft #home-store-pulse,
body.store-switch-soft #mr-hs-score,
body.store-switch-soft #home-tonight-strip,
body.store-switch-soft #home-live-strip {
  transition: opacity 0.14s ease !important;
}
/* Never dim chips while switching soft — keep them snappy */
body.store-switch-soft .store-slide-chip {
  opacity: 1 !important;
  pointer-events: auto !important;
}
/* Suppress heavy store-switching dim when soft path is used */
body.store-switch-soft:not(.store-switching) #home-insights::after {
  display: none !important;
  content: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   v879 — Owner mobile: store insights first, activity after
   ═══════════════════════════════════════════════════════════════ */
body.app-owner-session #home-insights,
body:not(.app-employee-session) #home-insights {
  display: flex !important;
  flex-direction: column !important;
}
/* Insights / alerts — clients see store data first */
body.app-owner-session #home-insights > #home-dashboard-status,
body:not(.app-employee-session) #home-insights > #home-dashboard-status { order: 1 !important; }
body.app-owner-session #home-insights > #home-store-pulse,
body:not(.app-employee-session) #home-insights > #home-store-pulse { order: 2 !important; }
body.app-owner-session #home-insights > #home-live-strip,
body:not(.app-employee-session) #home-insights > #home-live-strip { order: 3 !important; }
body.app-owner-session #home-insights > #home-tonight-strip,
body:not(.app-employee-session) #home-insights > #home-tonight-strip { order: 4 !important; }
body.app-owner-session #home-insights > #home-stock-road,
body:not(.app-employee-session) #home-insights > #home-stock-road { order: 5 !important; }
body.app-owner-session #home-insights > #home-sell-actions,
body:not(.app-employee-session) #home-insights > #home-sell-actions { order: 6 !important; }
body.app-owner-session #home-insights > #home-strict-urgent,
body:not(.app-employee-session) #home-insights > #home-strict-urgent { order: 7 !important; }
/* Team chat + staff mandate — nice sections, AFTER store data */
body.app-owner-session #home-insights > #home-team-chat-owner,
body.app-owner-session #home-insights > #home-team-chat,
body:not(.app-employee-session) #home-insights > #home-team-chat-owner,
body:not(.app-employee-session) #home-insights > #home-team-chat { order: 30 !important; }
body.app-owner-session #home-insights > #home-staff-adoption,
body:not(.app-employee-session) #home-insights > #home-staff-adoption { order: 31 !important; }
body.app-owner-session #home-insights > #home-shift-note,
body:not(.app-employee-session) #home-insights > #home-shift-note { order: 32 !important; }
body.app-owner-session #home-insights > #home-shift-tasks,
body:not(.app-employee-session) #home-insights > #home-shift-tasks { order: 33 !important; }

/* v881 — Money close must not leave grey full-screen void */
body:not(.money-panel-open) #home-money-section {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  background: transparent !important;
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
}
body:not(.money-panel-open) #app-main-column > *,
body:not(.money-panel-open) .app-header,
body:not(.money-panel-open) .store-hero {
  visibility: visible !important;
  pointer-events: auto !important;
  opacity: 1 !important;
}
/* If money section open flag stuck but no root, hide the grey shell */
#home-money-section.money-panel-open:not(:has(.money-panel-root)) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  background: transparent !important;
}

/* v887 — Assigned tasks: tight margins (no huge empty gap) */
#home-shift-note #home-shift-tasks-owner {
  margin: 0.45rem 0 0 !important;
  padding: 0.45rem 0 0 !important;
  border-top: 1px solid #e0e7ff !important;
}
#home-shift-note #home-shift-tasks-owner > div {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: none !important;
}
#home-shift-note #home-shift-tasks-owner .text-\[10px\] {
  margin-bottom: 0.35rem !important;
}
#home-shift-tasks:empty,
#home-shift-tasks.hidden,
#home-staff-adoption:empty,
#home-staff-adoption.hidden,
#home-dashboard-status:empty,
#home-store-pulse:empty {
  display: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}
/* Task rows denser */
#home-shift-tasks-owner .rounded-xl {
  margin: 0 !important;
}
#home-shift-tasks-owner .space-y-1\.5 > * + * {
  margin-top: 0.35rem !important;
}
#home-shift-note.shift-handoff-card {
  margin-bottom: 0.55rem !important;
}

/* v887 assigned tasks panel (owner handoff) */
#home-shift-note .st-assigned-panel {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e0e7ff;
}
#home-shift-note .st-assigned-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5b21b6;
  margin: 0 0 0.4rem 0;
  line-height: 1.2;
}
#home-shift-note .st-assigned-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
#home-shift-note .st-assigned-list > .rounded-xl {
  padding: 0.55rem 0.65rem !important;
}

/* v888 — hard collapse empty home shells (white voids) */
html body.app-home-ready #home-insights > .card.hidden,
html body.app-home-ready #home-insights > .hidden,
html body.app-home-ready #home-insights > #home-shift-tasks.hidden,
html body.app-home-ready #home-insights > #home-staff-adoption.hidden,
html body.app-home-ready #home-insights > #home-store-pulse.hidden,
html body.app-home-ready #home-insights > #home-dashboard-status.hidden,
html body.app-home-ready #home-insights > #home-stock-road.hidden,
html body.app-home-ready #home-insights > #home-tonight-strip.hidden,
html body.app-home-ready #home-insights > #home-live-strip.hidden,
html body.app-home-ready #home-insights > #home-sell-actions.hidden,
html body.app-home-ready #home-insights > #home-connections.hidden,
html body.app-home-ready #home-insights > #home-pos-parallel.hidden {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
/* Card with no element children and no text */
html body.app-home-ready #home-insights > .card:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  min-height: 0 !important;
}


/* v921 flash above modals (Find vendor / stock road) */
#app-flash.app-flash,
.app-flash {
  z-index: 560 !important;
  position: fixed !important;
  pointer-events: auto !important;
}

/* EXACT BOOKS FORM — open state must paint (beats .hidden only when class removed) */
#section-quick-add.card,
#section-quick-add.mr-pro-quick-add {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
#section-quick-add #add-form:not(.hidden) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  pointer-events: auto !important;
  position: relative !important;
}
#section-quick-add #add-form:not(.hidden) #form-fields {
  display: grid !important;
  visibility: visible !important;
}

/* v1002 books form — always show when not .hidden */
#section-quick-add.card { height:auto!important; max-height:none!important; overflow:visible!important; }
#section-quick-add #add-form:not(.hidden) {
  display:block!important; visibility:visible!important; opacity:1!important;
  height:auto!important; max-height:none!important; overflow:visible!important;
  pointer-events:auto!important; position:relative!important; z-index:30!important;
  background:#fff!important; margin-top:12px!important;
}
#section-quick-add #add-form:not(.hidden) #form-fields {
  display:grid!important; visibility:visible!important; opacity:1!important;
}

/* CORE BOOKS LOG FORM */
#section-quick-add.card,
#section-quick-add.mr-pro-quick-add {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
#section-quick-add #add-form:not(.hidden) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 20 !important;
  background: #fff !important;
  margin-top: 14px !important;
  padding-top: 14px !important;
}
#section-quick-add #add-form:not(.hidden) #form-fields {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 60px !important;
}

/* books entry modal (same idea as reports-modal) */
#books-entry-modal:not(.hidden) {
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 560 !important;
}
#books-entry-modal #add-form:not(.hidden),
#books-entry-modal #add-form {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
#books-entry-modal #form-fields {
  display: grid !important;
  visibility: visible !important;
}

/* books-entry-modal — never treat as empty ghost */
#books-entry-modal {
  z-index: 980 !important;
}
#books-entry-modal:not(.hidden) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: fixed !important;
  inset: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0,0,0,0.4) !important;
}
#books-entry-modal #add-form,
#books-entry-modal #add-form.hidden {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
}
#books-entry-modal #form-fields {
  display: grid !important;
  visibility: visible !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   v1067 — Store dashboard ALIVE (mobile-first, no overflow, both devices)
   ═══════════════════════════════════════════════════════════════════════════ */
#home-store-pulse.sd-board.sd-alive {
  position: relative !important;
  padding: 1.05rem 1.25rem 1.15rem !important;
  border-radius: 1.15rem !important;
  overflow: hidden !important;
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05) !important;
  border: 1px solid #e4e4e7 !important;
  border-color: #e4e4e7 !important;
  box-sizing: border-box !important;
}

#home-store-pulse.sd-alive .sd-mood {
  margin: 0 0 0.5rem !important;
  overflow: hidden !important;
}
#home-store-pulse.sd-alive .insight-mood-banner-title {
  font-size: 0.8rem !important;
  line-height: 1.2 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
#home-store-pulse.sd-alive .insight-mood-banner-body {
  font-size: 0.7rem !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
#home-store-pulse.sd-alive .mood-signal-chips {
  flex-wrap: wrap !important;
  gap: 0.25rem !important;
  max-width: 100% !important;
}
#home-store-pulse.sd-alive .mood-signal-chip {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* —— Scoreboard —— */
#home-store-pulse .sd-scoreboard {
  position: relative !important;
  margin: 0 0 0.55rem !important;
  padding: 0.6rem 0.7rem 0.65rem !important;
  border-radius: 1rem !important;
  overflow: hidden !important;
  background: linear-gradient(145deg, #d1fae5 0%, #ecfdf5 40%, #ffffff 100%) !important;
  border: 1px solid #6ee7b7 !important;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.12) !important;
}
#home-store-pulse .sd-score-glow {
  position: absolute !important;
  right: -20% !important;
  top: -40% !important;
  width: 55% !important;
  height: 120% !important;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.35), transparent 70%) !important;
  pointer-events: none !important;
}
#home-store-pulse .sd-score-top {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.4rem !important;
  margin-bottom: 0.35rem !important;
  min-width: 0 !important;
}
#home-store-pulse .sd-score-kicker {
  min-width: 0 !important;
  flex: 1 !important;
  font-size: 0.58rem !important;
  font-weight: 850 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #047857 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
#home-store-pulse .sd-score-actions {
  display: flex !important;
  gap: 0.28rem !important;
  flex-shrink: 0 !important;
}
#home-store-pulse .sd-score-actions .mm-chip-btn {
  min-height: 1.75rem !important;
  padding: 0.22rem 0.48rem !important;
  font-size: 0.62rem !important;
  border-radius: 999px !important;
}
#home-store-pulse .sd-score-main {
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) !important;
  align-items: end !important;
  gap: 0.5rem !important;
  min-width: 0 !important;
}
#home-store-pulse .sd-score-primary,
#home-store-pulse .sd-score-secondary {
  min-width: 0 !important;
  overflow: hidden !important;
}
#home-store-pulse .sd-score-amount {
  font-size: clamp(1.35rem, 7.2vw, 1.85rem) !important;
  font-weight: 900 !important;
  letter-spacing: -0.04em !important;
  line-height: 1.05 !important;
  color: #064e3b !important;
  font-variant-numeric: tabular-nums !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  max-width: 100% !important;
}
#home-store-pulse .sd-score-label {
  margin-top: 0.12rem !important;
  font-size: 0.68rem !important;
  font-weight: 750 !important;
  color: #059669 !important;
}
#home-store-pulse .sd-score-secondary {
  text-align: right !important;
}
#home-store-pulse .sd-score-net {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 0.02rem !important;
  min-width: 0 !important;
  max-width: 100% !important;
}
#home-store-pulse .sd-score-net-amt {
  font-size: clamp(0.95rem, 4.8vw, 1.2rem) !important;
  font-weight: 900 !important;
  letter-spacing: -0.025em !important;
  font-variant-numeric: tabular-nums !important;
  line-height: 1.1 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
#home-store-pulse .sd-net-up .sd-score-net-amt { color: #047857 !important; }
#home-store-pulse .sd-net-down .sd-score-net-amt { color: #0369a1 !important; }
#home-store-pulse .sd-score-net-lbl {
  font-size: 0.58rem !important;
  font-weight: 800 !important;
  color: #71717a !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}
#home-store-pulse .sd-score-margin {
  margin-top: 0.15rem !important;
  font-size: 0.65rem !important;
  font-weight: 750 !important;
  color: #3f3f46 !important;
  white-space: nowrap !important;
}

/* —— Pace —— */
#home-store-pulse .sd-pace {
  margin: 0 0 0.55rem !important;
  padding: 0.55rem 0.65rem 0.55rem !important;
  border-radius: 1rem !important;
  overflow: hidden !important;
  background:
    linear-gradient(135deg, rgba(99,102,241,0.12) 0%, rgba(255,255,255,0.95) 48%, #fff 100%) !important;
  border: 1px solid #a5b4fc !important;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.08) !important;
  cursor: pointer !important;
  text-align: left !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
#home-store-pulse .sd-pace-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.4rem !important;
  margin-bottom: 0.28rem !important;
}
#home-store-pulse .sd-section-label {
  font-size: 0.58rem !important;
  font-weight: 850 !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
  color: #4338ca !important;
  margin: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
#home-store-pulse .sd-pace-badge {
  flex-shrink: 0 !important;
  font-size: 0.55rem !important;
  font-weight: 850 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: #4338ca !important;
  background: rgba(99, 102, 241, 0.12) !important;
  border: 1px solid rgba(99, 102, 241, 0.25) !important;
  padding: 0.12rem 0.4rem !important;
  border-radius: 999px !important;
}
#home-store-pulse .sd-pace-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) !important;
  align-items: end !important;
  gap: 0.4rem !important;
  margin-bottom: 0.32rem !important;
  min-width: 0 !important;
}
#home-store-pulse .sd-pace-amt {
  display: block !important;
  font-size: clamp(1.05rem, 5.5vw, 1.3rem) !important;
  font-weight: 900 !important;
  letter-spacing: -0.03em !important;
  color: #312e81 !important;
  font-variant-numeric: tabular-nums !important;
  line-height: 1.1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  max-width: 100% !important;
}
#home-store-pulse .sd-pace-sub {
  display: block !important;
  margin-top: 0.08rem !important;
  font-size: 0.62rem !important;
  font-weight: 750 !important;
  color: #6366f1 !important;
}
#home-store-pulse .sd-pace-gap {
  font-size: 0.68rem !important;
  font-weight: 750 !important;
  color: #3f3f46 !important;
  text-align: right !important;
  line-height: 1.25 !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  min-width: 0 !important;
}
#home-store-pulse .sd-pace-bar {
  height: 0.45rem !important;
  border-radius: 999px !important;
  background: #e0e7ff !important;
  overflow: hidden !important;
  margin-bottom: 0.32rem !important;
}
#home-store-pulse .sd-pace-bar .health-bar-fill {
  height: 100% !important;
  border-radius: 999px !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.45) !important;
}
#home-store-pulse .sd-pace-meta {
  display: flex !important;
  justify-content: space-between !important;
  gap: 0.4rem !important;
  font-size: 0.62rem !important;
  font-weight: 750 !important;
  color: #52525b !important;
  min-width: 0 !important;
}
#home-store-pulse .sd-pace-meta-l,
#home-store-pulse .sd-pace-meta-r {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
#home-store-pulse .sd-pace-meta-r { text-align: right !important; flex-shrink: 0 !important; max-width: 48% !important; }

/* —— Tiles —— */
#home-store-pulse .sd-tiles {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.4rem !important;
  margin: 0 0 0.5rem !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
#home-store-pulse .sd-tile {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 0.08rem !important;
  padding: 0.48rem 0.5rem 0.5rem !important;
  border-radius: 0.85rem !important;
  border: 1px solid #e4e4e7 !important;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%) !important;
  min-height: 0 !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  text-align: left !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}
#home-store-pulse .sd-tile:active {
  transform: scale(0.98) !important;
  background: #f4f4f5 !important;
}
#home-store-pulse .sd-tile-ico {
  font-size: 0.78rem !important;
  line-height: 1 !important;
  margin-bottom: 0.05rem !important;
  opacity: 0.9 !important;
}
#home-store-pulse .sd-tile-l {
  font-size: 0.55rem !important;
  font-weight: 850 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: #71717a !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
#home-store-pulse .sd-tile-v {
  font-size: clamp(0.82rem, 3.8vw, 0.98rem) !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
  color: #18181b !important;
  font-variant-numeric: tabular-nums !important;
  line-height: 1.15 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
#home-store-pulse .sd-tile-h {
  font-size: 0.58rem !important;
  font-weight: 650 !important;
  color: #71717a !important;
  line-height: 1.25 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
#home-store-pulse .sd-tile-up { color: #047857 !important; }
#home-store-pulse .sd-tile-down { color: #dc2626 !important; }
#home-store-pulse .sd-tile-warn { color: #d97706 !important; }
#home-store-pulse .sd-tile-muted { color: #71717a !important; }
#home-store-pulse .sd-tile-indigo { color: #4338ca !important; }

/* Narrative + pay — clamp overflow */
#home-store-pulse .sd-narrative {
  margin: 0 0 0.4rem !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
#home-store-pulse .sd-narrative,
#home-store-pulse .sd-narrative * {
  max-width: 100% !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}
#home-store-pulse .sd-narrative .qi-narrative,
#home-store-pulse .sd-narrative .narrative-insight,
#home-store-pulse .sd-narrative [class*="narrative"] {
  font-size: 0.72rem !important;
  line-height: 1.35 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
#home-store-pulse .qi-pay-strip {
  margin-top: 0.3rem !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
#home-store-pulse .qi-pay-strip-row {
  display: flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  min-width: 0 !important;
}
#home-store-pulse .qi-pay-strip-text {
  flex: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 0.72rem !important;
}
#home-store-pulse .qi-pay-strip-link {
  flex-shrink: 0 !important;
}
#home-store-pulse .qi-pay-strip-sub {
  font-size: 0.62rem !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
#home-store-pulse .sd-next {
  margin-top: 0.2rem !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
#home-store-pulse .sd-next .sd-section-label {
  color: #3f3f46 !important;
  margin-bottom: 0.28rem !important;
  display: block !important;
}
#home-store-pulse .sd-next-empty {
  font-size: 0.7rem !important;
  font-weight: 650 !important;
  color: #71717a !important;
  padding: 0.25rem 0.1rem !important;
}
#home-store-pulse .qi-suggestion-stack {
  max-width: 100% !important;
  overflow: hidden !important;
}

/* Hide legacy stacked chrome */
#home-store-pulse.sd-board .qi-hero-head,
#home-store-pulse.sd-board .qi-kpi-grid,
#home-store-pulse.sd-board .mm-tiles,
#home-store-pulse.sd-board .mm-pace-row {
  display: none !important;
}

/* Tablet / desktop — 4-up tiles, roomier type */
@media (min-width: 480px) {
  #home-store-pulse.sd-board.sd-alive {
    padding: 0.85rem 0.95rem !important;
  }
  #home-store-pulse .sd-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
  }
  #home-store-pulse .sd-score-amount {
    font-size: 1.9rem !important;
  }
  #home-store-pulse .sd-pace-amt {
    font-size: 1.35rem !important;
  }
  #home-store-pulse .sd-tile {
    padding: 0.55rem 0.6rem !important;
  }
  #home-store-pulse .sd-tile-v {
    font-size: 1.02rem !important;
  }
}

/* Very narrow phones */
@media (max-width: 360px) {
  #home-store-pulse .sd-score-actions .mm-chip-btn {
    padding: 0.2rem 0.38rem !important;
    font-size: 0.58rem !important;
  }
  #home-store-pulse .sd-score-amount {
    font-size: 1.25rem !important;
  }
  #home-store-pulse .sd-score-net-amt {
    font-size: 0.9rem !important;
  }
}

/* Alive pulse on warm/rich moods */
#home-store-pulse.sd-alive.insight-mood-win .sd-scoreboard,
#home-store-pulse.sd-alive.insight-mood-rich .sd-scoreboard {
  animation: sdAliveGlow 3.2s ease-in-out infinite alternate !important;
}
@keyframes sdAliveGlow {
  from { box-shadow: 0 6px 18px rgba(16, 185, 129, 0.12); }
  to { box-shadow: 0 8px 26px rgba(16, 185, 129, 0.22); }
}
@media (prefers-reduced-motion: reduce) {
  #home-store-pulse.sd-alive.insight-mood-win .sd-scoreboard,
  #home-store-pulse.sd-alive.insight-mood-rich .sd-scoreboard {
    animation: none !important;
  }
}

/* —— Scoreboard month browser (v1087) —— */
#home-store-pulse .sd-month-nav {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  margin: 0 0 0.4rem !important;
  min-width: 0 !important;
}
#home-store-pulse .sd-month-btn {
  flex-shrink: 0 !important;
  width: 2rem !important;
  height: 2rem !important;
  min-width: 2rem !important;
  min-height: 2rem !important;
  border-radius: 999px !important;
  border: 1px solid #a7f3d0 !important;
  background: #ffffff !important;
  color: #047857 !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.12) !important;
  cursor: pointer !important;
  padding: 0 !important;
}
#home-store-pulse .sd-month-btn:active:not(:disabled) {
  transform: scale(0.96) !important;
  background: #ecfdf5 !important;
}
#home-store-pulse .sd-month-btn:disabled {
  opacity: 0.35 !important;
  cursor: default !important;
  box-shadow: none !important;
}
#home-store-pulse .sd-month-label {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 12rem !important;
  min-height: 2rem !important;
  padding: 0.28rem 0.65rem !important;
  border-radius: 999px !important;
  border: 1px solid #6ee7b7 !important;
  background: linear-gradient(180deg, #ffffff 0%, #ecfdf5 100%) !important;
  color: #065f46 !important;
  font-size: 0.72rem !important;
  font-weight: 850 !important;
  letter-spacing: 0.02em !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  cursor: pointer !important;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.1) !important;
}
#home-store-pulse .sd-month-label:active {
  background: #d1fae5 !important;
}
#home-store-pulse .sd-month-hint {
  position: relative !important;
  z-index: 1 !important;
  margin: 0 0 0.4rem !important;
  padding: 0.28rem 0.45rem !important;
  border-radius: 0.55rem !important;
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px dashed #a7f3d0 !important;
  color: #047857 !important;
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  text-align: center !important;
  line-height: 1.3 !important;
}
#home-store-pulse .sd-scoreboard-hist {
  background: linear-gradient(145deg, #e0e7ff 0%, #eef2ff 40%, #ffffff 100%) !important;
  border-color: #a5b4fc !important;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.1) !important;
}
#home-store-pulse .sd-scoreboard-hist .sd-score-kicker {
  color: #4338ca !important;
}
#home-store-pulse .sd-scoreboard-hist .sd-month-btn {
  border-color: #c7d2fe !important;
  color: #4338ca !important;
}
#home-store-pulse .sd-scoreboard-hist .sd-month-label {
  border-color: #a5b4fc !important;
  background: linear-gradient(180deg, #ffffff 0%, #eef2ff 100%) !important;
  color: #3730a3 !important;
}
#home-store-pulse .sd-scoreboard-hist .sd-month-hint {
  border-color: #c7d2fe !important;
  color: #4338ca !important;
}
#home-store-pulse .sd-scoreboard-hist .sd-score-amount {
  color: #312e81 !important;
}
#home-store-pulse .sd-scoreboard-hist .sd-score-label {
  color: #4f46e5 !important;
}


/* v1380: desktop emerald Shift Dock edge pill */
@media (min-width: 640px) {
  html body.has-shift-dock:not(.guest-mode):not(.money-panel-open):not(.feature-browser-open) .shift-dock-launch,
  html body.app-home-ready:not(.guest-mode):not(.money-panel-open):not(.feature-browser-open) #shift-dock-launch {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: fixed !important;
    right: 0 !important;
    left: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    z-index: 360 !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.2rem !important;
    width: auto !important;
    min-width: 2.75rem !important;
    min-height: 4.5rem !important;
    padding: 0.55rem 0.45rem !important;
    border-radius: 1rem 0 0 1rem !important;
    border: 1px solid #a7f3d0 !important;
    border-right: 0 !important;
    background: #ecfdf5 !important;
    color: #047857 !important;
    box-shadow: -4px 0 18px rgba(4, 120, 87, 0.2) !important;
  }
  html body:not(.guest-mode) .shift-dock-launch .sdl-lbl {
    display: block !important;
    writing-mode: vertical-rl !important;
    text-orientation: mixed !important;
    transform: rotate(180deg) !important;
    font-size: 0.65rem !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: #047857 !important;
  }
  html body:not(.guest-mode) .shift-dock-launch .sdl-ico {
    width: 1.85rem !important;
    height: 1.85rem !important;
    border-radius: 999px !important;
    border: 1px solid #a7f3d0 !important;
    background: #fff !important;
  }
}

/* ── v1642 calm home — no flash borders / no glow animation ── */
#home-store-pulse.sd-board.sd-alive,
#home-store-pulse.qi-live-card.sd-alive,
#home-store-pulse.mood-fire-high,
#home-store-pulse.mood-fire-warm,
#home-store-pulse.mood-fire-idle,
#home-store-pulse.mood-cold-blue,
#home-store-pulse.insight-mood-rich,
#home-store-pulse.insight-mood-win {
  background: #fff !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  animation: none !important;
}
/* v1645 — nice calm card: soft border + roomy pad */
#home-store-pulse.sd-board.sd-alive,
#home-store-pulse.qi-live-card.sd-alive,
#home-store-pulse.card.sd-board {
  background: #fff !important;
  border: 1px solid #e4e4e7 !important;
  border-radius: 1.15rem !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05) !important;
  padding: 1rem 1.15rem 1.1rem !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
#home-store-pulse .sd-scoreboard,
#home-store-pulse.sd-alive.insight-mood-win .sd-scoreboard,
#home-store-pulse.sd-alive.insight-mood-rich .sd-scoreboard {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  animation: none !important;
  padding: 0.15rem 0 0.55rem !important;
  box-sizing: border-box !important;
}
#home-store-pulse .sd-score-main {
  gap: 1rem !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
#home-store-pulse .sd-score-primary {
  padding-right: 0.25rem !important;
  min-width: 0 !important;
}
#home-store-pulse .sd-score-secondary {
  padding-left: 0.25rem !important;
  min-width: 0 !important;
}
#home-store-pulse .sd-pace {
  background: #f8fafc !important;
  border: 1px solid #eef0f3 !important;
  border-radius: 1rem !important;
  box-shadow: none !important;
  padding: 0.7rem 0.9rem !important;
  box-sizing: border-box !important;
}
#home-store-pulse .sd-tile {
  background: #f8fafc !important;
  border: 1px solid #eef0f3 !important;
  border-radius: 0.9rem !important;
  box-shadow: none !important;
  padding: 0.6rem 0.65rem !important;
  box-sizing: border-box !important;
}
#home-store-pulse .sd-tiles {
  gap: 0.5rem !important;
}
#home-store-pulse .insight-mood-banner.mood-banner-live,
#home-store-pulse .sd-mood {
  border: 1px solid #eef0f3 !important;
  border-radius: 0.95rem !important;
  padding: 0.65rem 0.8rem !important;
  box-sizing: border-box !important;
}
#home-store-pulse .mood-fire-stage,
#home-store-pulse .mood-fire-glow,
#home-store-pulse .mood-flame,
#home-store-pulse .mood-ember,
#home-store-pulse .insight-mood-banner-glow,
#home-store-pulse .sd-score-glow {
  display: none !important;
  animation: none !important;
}
#home-store-pulse .insight-mood-banner.mood-banner-live,
#home-store-pulse .sd-mood {
  background: #f8fafc !important;
  border: 0 !important;
  box-shadow: none !important;
  animation: none !important;
}
#home-store-pulse .mood-fire-pill-dot {
  animation: none !important;
  box-shadow: none !important;
  background: #94a3b8 !important;
}
@keyframes sdAliveGlow {
  from { box-shadow: none; }
  to { box-shadow: none; }
}

/* ── v1646 FIX: pulse card MUST keep L/R pad (was zeroed by data-hs-rich + inline) ── */
html body.mr-hs-on #mr-home-surface #home-store-pulse,
html body.mr-hs-on #mr-home-surface #home-store-pulse[data-hs-rich="1"],
html body.mr-hs-on:not(.money-panel-open) #mr-home-surface #home-store-pulse[data-hs-rich="1"],
#home-store-pulse.sd-board.sd-alive,
#home-store-pulse.qi-live-card.sd-alive,
#home-store-pulse.card.sd-board {
  padding: 1.05rem 1.25rem 1.15rem !important;
  border: 1px solid #e4e4e7 !important;
  border-radius: 1.15rem !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05) !important;
  box-sizing: border-box !important;
}
#home-store-pulse .sd-score-main {
  gap: 1.25rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
#home-store-pulse .sd-score-primary {
  padding-right: 0.5rem !important;
}
#home-store-pulse .sd-score-secondary {
  padding-left: 0.5rem !important;
}

/* ── v1647 suite cards: Tap&Go / Live / Z / Books — pad + border ── */
html body.mr-hs-on #mr-home-surface #home-sell-actions,
html body.mr-hs-on #mr-home-surface #home-live-strip,
html body.mr-hs-on #mr-home-surface #home-tonight-strip,
html body.mr-hs-on #mr-home-surface #home-strict-urgent,
html body.mr-hs-on #mr-home-surface #section-quick-add,
#home-sell-actions:not(.hidden),
#home-live-strip:not(.hidden),
#home-tonight-strip:not(.hidden) {
  padding: 0.95rem 1.15rem 1rem !important;
  border: 1px solid #e4e4e7 !important;
  border-radius: 1.15rem !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 18px rgba(15, 23, 42, 0.04) !important;
  box-sizing: border-box !important;
}
#home-live-strip .live-strip-inner {
  padding: 0 !important;
}
#home-sell-actions .tap-go-head {
  padding: 0 0 0.4rem !important;
}
#home-sell-actions .sell-actions-grid {
  gap: 0.4rem !important;
}

/* ── v1648/v1653: hard suite inner pad (inline JS + CSS belt) ── */
#home-sell-actions:not(.hidden),
#home-live-strip:not(.hidden),
#home-tonight-strip:not(.hidden),
#home-stock-road:not(.hidden),
html body.mr-hs-on #mr-home-surface #home-sell-actions,
html body.mr-hs-on #mr-home-surface #home-live-strip,
html body.mr-hs-on #mr-home-surface #home-tonight-strip,
html body.mr-hs-on #mr-home-surface #home-stock-road {
  padding: 1.15rem 1.4rem 1.2rem !important;
  border: 1px solid #e4e4e7 !important;
  border-radius: 1.15rem !important;
  background: #fff !important;
  box-sizing: border-box !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 18px rgba(15, 23, 42, 0.05) !important;
}
#home-stock-road .sr-fast-stats,
#home-stock-road .sr-fast-row,
#home-stock-road .sr-fast-logs,
#home-stock-road .sr-fast-head {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
#home-live-strip .live-strip-inner { padding: 0 !important; margin: 0 !important; }
#home-sell-actions .tap-go-head {
  padding: 0 0 0.5rem !important;
  margin: 0 !important;
}
#home-sell-actions .sell-actions-grid {
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
#home-tonight-strip .tonight-head,
#home-tonight-strip .tonight-steps,
#home-tonight-strip .tonight-actions {
  box-sizing: border-box !important;
  max-width: 100% !important;
}
.strict-urgent-btn {
  padding: 0.85rem 1.15rem !important;
  box-sizing: border-box !important;
}

/* ── v1649: kill shift greeting flash completely ── */
.shift-greeting-bar,
#shift-greeting-bar,
.shift-greeting-bar.shift-vibe-close,
#shift-greeting-bar.shift-vibe-close,
.shift-greeting-bar.shift-vibe-morning,
.shift-greeting-bar.shift-vibe-midday,
.shift-greeting-bar.shift-vibe-afternoon,
.shift-greeting-bar.shift-vibe-night,
.shift-greeting-bar *,
#shift-greeting-bar * {
  animation: none !important;
  transition: none !important;
}
.shift-greeting-bar.shift-vibe-close,
#shift-greeting-bar.shift-vibe-close {
  background: #fffbeb !important;
  border-top-color: #fde68a !important;
  opacity: 1 !important;
}
#mr-hs-open,
html body.mr-hs-on #mr-hs-open {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
}

/* ── v1650: More = bottom hub; Money clean; Reports glass KPIs ── */

/* Prefer bottom More hub over side Shift Dock when both fight */
body.mr-more-open #feature-browser-drawer,
body.mr-more-open .shift-dock-panel,
body.mr-more-open #feature-browser-backdrop {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* Money — clean glass, not loud purple paint */
.money-mobile-bar {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%) !important;
  color: #0f172a !important;
  border-bottom: 1px solid #e4e4e7 !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.money-mobile-bar-title {
  color: #0f172a !important;
  font-weight: 800 !important;
}
.money-mobile-close {
  background: #fff !important;
  color: #0f172a !important;
  border: 1px solid #e4e4e7 !important;
}
.money-panel-root {
  background: #fff !important;
  border: 1px solid #e4e4e7 !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12) !important;
}
.money-hero-block {
  background: linear-gradient(165deg, rgba(248, 250, 252, 0.9) 0%, rgba(255, 255, 255, 0.98) 55%) !important;
  border-radius: 1rem !important;
  border: 1px solid #eef0f3 !important;
  margin: 0.25rem 0 0.75rem !important;
  padding: 1rem 1.1rem 1.05rem !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.money-total-amount {
  font-size: 2rem !important;
  font-weight: 900 !important;
  letter-spacing: -0.03em !important;
  font-variant-numeric: tabular-nums !important;
  color: #0f172a !important;
}
.money-pool-card {
  border: 1px solid #e4e4e7 !important;
  border-style: solid !important;
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  padding: 0.85rem 0.65rem !important;
}
.money-pool-amt {
  font-size: 1.15rem !important;
  font-variant-numeric: tabular-nums !important;
}

/* Reports — clean glass KPI tiles */
#reports-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.75rem !important;
}
@media (min-width: 640px) {
  #reports-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
#reports-kpis .kpi-card-click,
#reports-kpis .rpt-glass {
  border: 1px solid rgba(228, 228, 231, 0.95) !important;
  border-radius: 1.1rem !important;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.88) 100%) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem 1.05rem 0.95rem !important;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease !important;
}
#reports-kpis .kpi-card-click:hover,
#reports-kpis .rpt-glass:hover {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 12px 28px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  border-color: #d4d4d8 !important;
  transform: translateY(-1px);
}
.rpt-glass-lbl {
  font-size: 0.625rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  opacity: 0.9;
}
.rpt-glass-period {
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  opacity: 0.7;
  font-size: 0.58rem !important;
}
.rpt-glass-amt {
  margin-top: 0.35rem !important;
  font-size: 1.65rem !important;
  font-weight: 900 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.1 !important;
  font-variant-numeric: tabular-nums !important;
}
.rpt-glass-sub {
  margin-top: 0.4rem !important;
  font-size: 0.65rem !important;
  font-weight: 600 !important;
  color: #71717a !important;
}

/* ── v1651: remove Live Pipes / Connections cards from Today ── */
#home-connections,
#home-pos-parallel,
#home-pos-connect,
#home-bank-connect,
#home-vendor-connect,
#home-owner-moat,
html body.mr-hs-on #mr-home-surface #home-connections,
html body.mr-hs-on #mr-home-surface #home-pos-parallel,
html body.mr-hs-on #mr-home-surface #home-pos-connect,
html body.mr-hs-on #mr-home-surface #home-bank-connect,
html body.mr-hs-on #mr-home-surface #home-vendor-connect,
html body.mr-hs-on #mr-home-surface #home-owner-moat {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ── v1666: All Stores portfolio — visible + page scroll works ── */
html body.all-stores-mode,
html body.all-stores-mode.mr-hs-on,
html.mr-hs-lock body.all-stores-mode {
  overflow: auto !important;
  overflow-y: auto !important;
  height: auto !important;
  max-height: none !important;
  position: static !important;
  touch-action: auto !important;
  -webkit-overflow-scrolling: touch !important;
}
html:has(body.all-stores-mode) {
  overflow: auto !important;
  height: auto !important;
  max-height: none !important;
}
html body.all-stores-mode #mr-home-surface {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
html body.all-stores-mode #app-main-column {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  padding-top: 0.5rem !important;
  padding-bottom: 5rem !important;
  padding-left: 0.85rem !important;
  padding-right: 0.85rem !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  background: #f4f4f5 !important;
  width: 100% !important;
  position: relative !important;
}
html body.all-stores-mode #home-insights {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  width: 100% !important;
  max-width: 56rem !important;
  margin: 0 auto !important;
  padding: 0 !important;
}
html body.all-stores-mode #home-all-stores-analytics,
html body.all-stores-mode #home-all-stores-analytics:not(.hidden),
html body.all-stores-mode #home-all-stores-analytics.hidden {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 12rem !important;
  height: auto !important;
  width: 100% !important;
  max-width: 56rem !important;
  margin: 0 auto 0.75rem !important;
  padding: 0 !important;
  overflow: visible !important;
  pointer-events: auto !important;
  position: relative !important;
}
html body.all-stores-mode #home-all-stores-analytics .pf-shell {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: #fff !important;
  border: 1px solid #c7d2fe !important;
  border-radius: 1.15rem !important;
  min-height: 10rem !important;
  overflow: visible !important;
  margin: 0 !important;
  transform: none !important;
  animation: none !important;
}
html body.all-stores-mode #home-all-stores-analytics .pf-hero {
  padding: 0.85rem 1rem 0.7rem !important;
}
html body.all-stores-mode #home-all-stores-analytics .pf-body {
  display: flex !important;
  flex-direction: column !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 0 !important;
  padding: 0.85rem 1rem 1rem !important;
  overflow: visible !important;
}
html body.all-stores-mode #home-all-stores-analytics .pf-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.55rem !important;
}
html body.all-stores-mode #home-insights > *:not(#home-all-stores-analytics) {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
html body.all-stores-mode #store-dock-sentinel,
html body.all-stores-mode .store-dock-sentinel {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ── v1656: employee desk must stay visible (home controller no longer forces owner) ── */
html body.app-employee-session:not(.app-owner-session) #mr-home-surface,
html body.app-employee-session:not(.app-owner-session) #owner-os-rail,
html body.app-employee-session:not(.app-owner-session) #mr-hs-score,
html body.app-employee-session:not(.app-owner-session) #mr-hs-open,
html body.app-employee-session:not(.app-owner-session) #section-quick-add {
  display: none !important;
}
html body.app-employee-session:not(.app-owner-session) #app-main-column,
html body.app-employee-session:not(.app-owner-session) #home-insights {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 40vh !important;
  overflow: visible !important;
  max-height: none !important;
}
html body.app-employee-session:not(.app-owner-session) #home-employee-panel,
html body.app-employee-session:not(.app-owner-session) #home-employee-entries,
html body.app-employee-session:not(.app-owner-session) #home-team-chat,
html body.app-employee-session:not(.app-owner-session) #home-stock-road,
html body.app-employee-session:not(.app-owner-session) #home-shift-tasks,
html body.app-employee-session:not(.app-owner-session) .employee-home,
html body.app-employee-session:not(.app-owner-session) #employee-workspace,
html body.app-employee-session:not(.app-owner-session) [data-emp-os] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  pointer-events: auto !important;
}

/* ── v1659: employee OS wins over owner surface ── */
html body.app-employee-session:not(.app-owner-session) #mr-home-surface,
html body.app-employee-session:not(.app-owner-session) #owner-os-rail,
html body.app-employee-session:not(.app-owner-session) #mr-hs-score,
html body.app-employee-session:not(.app-owner-session) #mr-hs-open,
html body.app-employee-session:not(.app-owner-session) #section-quick-add,
html body.app-employee-session:not(.app-owner-session) #home-store-pulse,
html body.app-employee-session:not(.app-owner-session) #home-all-stores-analytics,
html body.app-employee-session:not(.app-owner-session) #home-sell-actions,
html body.app-employee-session:not(.app-owner-session) #home-live-strip,
html body.app-employee-session:not(.app-owner-session) #home-tonight-strip {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
html body.app-employee-session:not(.app-owner-session) #app-main-column,
html body.app-employee-session:not(.app-owner-session) #home-insights {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 50vh !important;
  max-height: none !important;
  overflow: visible !important;
  padding-top: 108px !important;
}
html body.app-employee-session:not(.app-owner-session) #home-employee-panel,
html body.app-employee-session:not(.app-owner-session) #home-employee-entries,
html body.app-employee-session:not(.app-owner-session) #employee-workspace,
html body.app-employee-session:not(.app-owner-session) #emp-os-root,
html body.app-employee-session:not(.app-owner-session) .employee-home,
html body.app-employee-session:not(.app-owner-session) .emp-os-shell,
html body.app-employee-session:not(.app-owner-session) [data-emp-os],
html body.app-employee-session:not(.app-owner-session) #home-team-chat,
html body.app-employee-session:not(.app-owner-session) #home-stock-road,
html body.app-employee-session:not(.app-owner-session) #home-shift-tasks {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  pointer-events: auto !important;
}

/* v1683 — Employee side restored: hide owner Pro shells that cover Emp OS */
html body.app-employee-session:not(.app-owner-session) #mr-home-surface,
html body.app-employee-session:not(.app-owner-session) #owner-os-rail,
html body.app-employee-session:not(.app-owner-session) #home-all-stores-analytics,
html body.app-employee-session:not(.app-owner-session) #home-store-pulse,
html body.app-employee-session:not(.app-owner-session) #home-sell-actions,
html body.app-employee-session:not(.app-owner-session) #home-tonight-strip,
html body.app-employee-session:not(.app-owner-session) #home-live-strip,
html body.app-employee-session:not(.app-owner-session) #section-quick-add,
html body.app-employee-session:not(.app-owner-session) #btn-header-money,
html body.app-employee-session:not(.app-owner-session) #feature-browser-tab,
html body.app-employee-session:not(.app-owner-session) #shift-dock-launch {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
}
html body.app-employee-session:not(.app-owner-session) #home-insights {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  height: auto !important;
  min-height: 40vh !important;
  overflow: visible !important;
  padding: 0.5rem 0.75rem 5rem !important;
  background: #f4f4f5 !important;
}
html body.app-employee-session:not(.app-owner-session) #app-main-column {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 50vh !important;
  overflow: visible !important;
  padding-top: 108px !important;
}

/* ── v1667: Money centered, scrollable body, closable (no flash) ── */
html body.money-panel-open #home-money-section.money-panel-open {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 640 !important;
  width: 100% !important;
  max-width: none !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: max(0.6rem, env(safe-area-inset-top, 0px)) 0.75rem max(0.6rem, env(safe-area-inset-bottom, 0px)) !important;
  background: rgba(15, 23, 42, 0.42) !important;
  overflow: hidden !important; /* stage does not steal scroll — card body scrolls */
  box-sizing: border-box !important;
  border: none !important;
  border-radius: 0 !important;
  gap: 0 !important;
  animation: none !important;
}
html body.money-panel-open #home-money-section.money-panel-open #home-till-estimate,
html body.money-panel-open #home-money-section.money-panel-open #home-till-estimate.card {
  width: min(28rem, calc(100vw - 1.25rem)) !important;
  max-width: min(28rem, calc(100vw - 1.25rem)) !important;
  margin: 0 auto !important;
  height: min(90dvh, 52rem) !important;
  min-height: min(90dvh, 52rem) !important;
  max-height: min(90dvh, 52rem) !important;
  flex: 0 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  overflow: hidden !important;
  visibility: visible !important;
  opacity: 1 !important;
  animation: none !important;
}
html body.money-panel-open .money-panel-root,
html body.money-panel-open #home-money-section .money-panel-root {
  width: 100% !important;
  max-width: min(28rem, calc(100vw - 1.25rem)) !important;
  margin: 0 auto !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  flex: 1 1 auto !important;
  border-radius: 1.25rem !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18) !important;
  overflow: hidden !important;
  background: #fff !important;
  color: #0f172a !important;
  display: flex !important;
  flex-direction: column !important;
  visibility: visible !important;
  opacity: 1 !important;
  animation: none !important;
  transform: none !important;
}
html body.money-panel-open .money-panel-scroll,
html body.money-panel-open #home-money-section .money-panel-scroll {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex: 1 1 auto !important;
  min-height: 0 !important; /* required for flex child scroll */
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  background: #fff !important;
  color: #0f172a !important;
  pointer-events: auto !important;
  touch-action: pan-y !important;
}
html body.money-panel-open .money-mobile-bar {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  border-radius: 1.25rem 1.25rem 0 0 !important;
  flex-shrink: 0 !important;
  background: #fff !important;
  pointer-events: auto !important;
  z-index: 2 !important;
  position: relative !important;
}
html body.money-panel-open .money-mobile-close,
html body.money-panel-open .money-foot-close,
html body.money-panel-open #btn-close-money-panel,
html body.money-panel-open #btn-close-money-foot {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  position: relative !important;
  z-index: 6 !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
}
html body.money-panel-open .money-panel-footer {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  border-radius: 0 0 1.25rem 1.25rem !important;
  flex-shrink: 0 !important;
  background: #fff !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 2 !important;
}
/* Kill money flash animations */
html body.money-panel-open .money-highlight,
html body.money-panel-open #home-till-estimate.money-highlight,
html body.money-panel-open .money-panel-root,
html body.money-panel-open .money-panel-root * {
  animation: none !important;
  transition: none !important;
}
@media (max-width: 639px) {
  html body.money-panel-open #home-money-section.money-panel-open {
    justify-content: flex-end !important;
    padding: 0 !important;
  }
  html body.money-panel-open #home-money-section.money-panel-open #home-till-estimate,
  html body.money-panel-open #home-money-section.money-panel-open #home-till-estimate.card {
    width: 100% !important;
    max-width: 100% !important;
    height: min(94dvh, 100%) !important;
    min-height: min(94dvh, 100%) !important;
    max-height: min(94dvh, 100%) !important;
  }
  html body.money-panel-open .money-panel-root {
    border-radius: 1.25rem 1.25rem 0 0 !important;
  }
}

/* ── v1668: Money closable + in-card scroll (beats height:auto earlier rules) ── */
html body.money-panel-open #home-money-section.money-panel-open {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  width: 100% !important;
  max-width: none !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  padding: max(0.55rem, env(safe-area-inset-top, 0px)) 0.75rem max(0.55rem, env(safe-area-inset-bottom, 0px)) !important;
  background: rgba(15, 23, 42, 0.45) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  animation: none !important;
  transition: none !important;
}
html body.money-panel-open #home-money-section.money-panel-open #home-till-estimate,
html body.money-panel-open #home-money-section.money-panel-open #home-till-estimate.card {
  width: min(28rem, calc(100vw - 1.25rem)) !important;
  max-width: min(28rem, calc(100vw - 1.25rem)) !important;
  height: min(90dvh, 52rem) !important;
  min-height: min(90dvh, 52rem) !important;
  max-height: min(90dvh, 52rem) !important;
  margin: 0 auto !important;
  flex: 0 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  animation: none !important;
  transition: none !important;
}
html body.money-panel-open .money-panel-root,
html body.money-panel-open #home-money-section .money-panel-root {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border-radius: 1.25rem !important;
  background: #fff !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2) !important;
  animation: none !important;
  transition: none !important;
}
html body.money-panel-open .money-panel-scroll,
html body.money-panel-open #home-money-section .money-panel-scroll {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  pointer-events: auto !important;
  touch-action: pan-y !important;
}
html body.money-panel-open .money-mobile-close,
html body.money-panel-open .money-foot-close,
html body.money-panel-open #btn-close-money-panel,
html body.money-panel-open #btn-close-money-foot {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 8 !important;
  position: relative !important;
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}
html body.money-panel-open .money-highlight,
html body.money-panel-open #home-till-estimate.money-highlight,
html body.money-panel-open .money-panel-root,
html body.money-panel-open .money-panel-root * {
  animation: none !important;
}
@media (max-width: 639px) {
  html body.money-panel-open #home-money-section.money-panel-open {
    justify-content: flex-end !important;
    padding: 0 !important;
  }
  html body.money-panel-open #home-money-section.money-panel-open #home-till-estimate,
  html body.money-panel-open #home-money-section.money-panel-open #home-till-estimate.card {
    width: 100% !important;
    max-width: 100% !important;
    height: min(94dvh, 100%) !important;
    min-height: min(94dvh, 100%) !important;
    max-height: min(94dvh, 100%) !important;
  }
}

/* ── v1671: Money is an IN-PAGE TAB — kill every modal/overlay rule ── */
html body.money-panel-open {
  overflow: auto !important;
  overflow-x: hidden !important;
  position: static !important;
  top: auto !important;
  touch-action: auto !important;
}
html body.money-panel-open.mr-scroll-lock,
html.mr-scroll-lock body.money-panel-open {
  position: static !important;
  top: auto !important;
}
html body.money-panel-open #home-money-section.money-panel-open,
html body.money-panel-open #home-money-section {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 1 !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 0 1rem !important;
  padding: 0 !important;
  background: transparent !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  animation: none !important;
  flex: none !important;
  gap: 0 !important;
}
html body.money-panel-open #home-money-section #home-till-estimate,
html body.money-panel-open #home-money-section #home-till-estimate.card {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  flex: none !important;
}
html body.money-panel-open .money-panel-root,
html body.money-panel-open #home-money-section .money-panel-root {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: visible !important;
  border-radius: 1.15rem !important;
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06) !important;
  animation: none !important;
  margin: 0 auto !important;
}
html body.money-panel-open .money-panel-scroll,
html body.money-panel-open #home-money-section .money-panel-scroll {
  flex: none !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  display: block !important;
  background: #fff !important;
  color: #0f172a !important;
  pointer-events: auto !important;
}
/* Today stack off while Money tab open */
html body.money-panel-open #home-insights,
html body.money-panel-open #mr-home-surface,
html body.money-panel-open #section-quick-add,
html body.money-panel-open #hc-visible-stack,
html body.money-panel-open #owner-os-rail {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* KEEP nav + header on Money tab */
html body.money-panel-open #bottom-nav {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  z-index: 90 !important;
}
html body.money-panel-open .app-header {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: sticky !important;
  left: auto !important;
  top: 0 !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  z-index: 40 !important;
}
html body.money-panel-open #store-hero,
html body.money-panel-open #store-hero.store-dock,
html body.money-panel-open #shift-greeting-bar {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: relative !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
  z-index: auto !important;
}
html body.money-panel-open #feature-browser-tab,
html body.money-panel-open #btn-cstore-os-fab,
html body.money-panel-open #pwa-install-banner {
  /* still hide secondary FABs on money tab */
  display: none !important;
}

/* ── v1673: All Stores — kill white void, portfolio flush under chips ── */
html body.all-stores-mode,
html body.all-stores-mode.mr-hs-on,
html body.all-stores-mode.money-panel-open {
  overflow: auto !important;
  overflow-y: auto !important;
  height: auto !important;
  max-height: none !important;
  position: static !important;
  top: auto !important;
  background: #f4f4f5 !important;
}
/* Money tab must not hide portfolio on All Stores */
html body.all-stores-mode.money-panel-open #home-insights,
html body.all-stores-mode #home-insights {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 auto !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 56rem !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 2 !important;
}
html body.all-stores-mode #mr-home-surface,
html body.all-stores-mode #section-quick-add,
html body.all-stores-mode #home-money-section,
html body.all-stores-mode #owner-os-rail,
html body.all-stores-mode #hc-visible-stack,
html body.all-stores-mode #home-store-pulse,
html body.all-stores-mode #home-live-strip,
html body.all-stores-mode #home-tonight-strip,
html body.all-stores-mode #home-stock-road,
html body.all-stores-mode #home-sell-actions {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  pointer-events: none !important;
}
html body.all-stores-mode #app-main-column {
  display: block !important;
  padding: 0.5rem 0.85rem 5rem !important;
  margin: 0 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  background: #f4f4f5 !important;
  gap: 0 !important;
}
html body.all-stores-mode #store-hero,
html body.all-stores-mode #store-hero.store-dock,
html body.all-stores-mode #store-hero.store-dock.is-pinned {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding-bottom: 0.25rem !important;
  z-index: 20 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
html body.all-stores-mode .store-dock-sentinel,
html body.all-stores-mode #store-dock-sentinel {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body.all-stores-mode #home-all-stores-analytics,
html body.all-stores-mode #home-all-stores-analytics.hidden,
html body.all-stores-mode #home-all-stores-analytics.pf-dashboard {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 14rem !important;
  max-height: none !important;
  width: 100% !important;
  max-width: 56rem !important;
  margin: 0 auto 0.75rem !important;
  padding: 0 !important;
  overflow: visible !important;
  position: relative !important;
  left: auto !important;
  top: auto !important;
  z-index: 3 !important;
  pointer-events: auto !important;
  transform: none !important;
  content-visibility: visible !important;
}
html body.all-stores-mode #home-all-stores-analytics .pf-shell,
html body.all-stores-mode #home-all-stores-analytics .pf-body,
html body.all-stores-mode #home-all-stores-analytics .pf-kpi-grid {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  transform: none !important;
  animation: none !important;
}
html body.all-stores-mode #home-all-stores-analytics .pf-kpi-grid {
  display: grid !important;
}
html body.all-stores-mode #home-insights > *:not(#home-all-stores-analytics) {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}

/* ── v1674: All Stores — show store chips again + kill gap under them ── */
html body.all-stores-mode #store-hero,
html body.all-stores-mode #store-hero.store-dock,
html body.all-stores-mode #store-hero.store-dock.is-pinned,
html body.all-stores-mode.has-bottom-nav #store-hero,
html body.all-stores-mode.app-home-ready #store-hero {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: fixed !important;
  top: 52px !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 52px !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0.25rem 0.75rem !important;
  z-index: 9990 !important;
  background: #fff !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-sizing: border-box !important;
  transform: none !important;
  overflow: visible !important;
}
html body.all-stores-mode #store-hero .store-dock-curve-shell {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  align-items: center !important;
  gap: 0.25rem !important;
  width: 100% !important;
  min-height: 2.5rem !important;
  height: auto !important;
  pointer-events: auto !important;
  background: transparent !important;
}
html body.all-stores-mode #store-slide-viewport,
html body.all-stores-mode #store-slide-track {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  align-items: center !important;
}
html body.all-stores-mode #store-slide-track {
  gap: 0.35rem !important;
  overflow-x: auto !important;
}
html body.all-stores-mode #store-slide-track .store-slide-chip,
html body.all-stores-mode .store-slide-chip {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  height: auto !important;
  max-height: none !important;
}
html body.all-stores-mode #store-slide-prev,
html body.all-stores-mode #store-slide-next,
html body.all-stores-mode #store-slide-manage {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
/* Fixed surface must NEVER cover All Stores (was white void over chips) */
html body.all-stores-mode #mr-home-surface,
html body.all-stores-mode.mr-hs-on #mr-home-surface {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: static !important;
  inset: auto !important;
  height: 0 !important;
  width: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  z-index: -1 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}
/* Main: only pad for fixed header(52)+chips(~56) = ~108 — portfolio flush under chips */
html body.all-stores-mode #app-main-column,
html body.all-stores-mode.has-bottom-nav #app-main-column,
html body.all-stores-mode.app-home-ready #app-main-column {
  display: flex !important;
  flex-direction: column !important;
  padding-top: 108px !important;
  padding-left: 0.85rem !important;
  padding-right: 0.85rem !important;
  padding-bottom: 5rem !important;
  margin: 0 auto !important;
  gap: 0.35rem !important;
  min-height: 0 !important;
  height: auto !important;
  background: #f4f4f5 !important;
  overflow: visible !important;
}
/* Portfolio tight under pad — no extra top margin */
html body.all-stores-mode #home-insights {
  display: block !important;
  margin: 0 auto !important;
  padding: 0 !important;
  max-width: 56rem !important;
  width: 100% !important;
  order: 2 !important;
}
html body.all-stores-mode #home-all-stores-analytics {
  display: block !important;
  margin: 0 auto 0.75rem !important;
  order: 1 !important;
}
/* Hide in-flow store-hero clone space if any (hero is fixed) — keep fixed bar only */
html body.all-stores-mode #app-main-column > #store-hero {
  /* fixed taken out of flow visually via fixed positioning; avoid double gap */
  margin: 0 !important;
}

/* ── v1675: Money in-page tab ALWAYS visible (kill blank #/money) ── */
html body.money-panel-open #home-money-section,
html body.money-panel-open #home-money-section.money-panel-open,
html body.money-panel-open #home-money-section.hidden,
html body.money-panel-open #home-money-section:not(.money-panel-open),
html body.money-panel-open:not(:has(#home-money-section .money-panel-root)) #home-money-section,
html body #home-money-section.money-panel-open:not(:has(.money-panel-root)) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 5 !important;
  width: 100% !important;
  max-width: 40rem !important;
  margin: 0 auto !important;
  height: auto !important;
  min-height: 14rem !important;
  max-height: none !important;
  padding: 0 0 5rem !important;
  background: transparent !important;
  overflow: visible !important;
  border: 0 !important;
  box-shadow: none !important;
  flex: none !important;
  animation: none !important;
}
html body.money-panel-open #home-money-section #home-till-estimate,
html body.money-panel-open #home-money-section #home-till-estimate.card {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 12rem !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  position: relative !important;
  flex: none !important;
}
html body.money-panel-open #home-money-section .money-panel-root {
  display: flex !important;
  flex-direction: column !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 12rem !important;
  max-height: none !important;
  overflow: visible !important;
  background: #fff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 1.15rem !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08) !important;
  animation: none !important;
}
html body.money-panel-open #home-money-section .money-panel-scroll {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  min-height: 8rem !important;
  overflow: visible !important;
  flex: none !important;
  padding: 1rem !important;
  background: #fff !important;
  color: #0f172a !important;
  pointer-events: auto !important;
}
html body.money-panel-open #home-money-section .money-mobile-bar,
html body.money-panel-open #home-money-section .money-panel-footer {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex-shrink: 0 !important;
  background: #fff !important;
  pointer-events: auto !important;
}
/* Don't hide entire main column on Money tab — only hide Today stacks */
html body.money-panel-open #app-main-column > *:not(#home-money-section):not(#store-hero) {
  /* leave store chips; hide other day chrome */
}
html body.money-panel-open #home-insights,
html body.money-panel-open #mr-home-surface,
html body.money-panel-open #section-quick-add,
html body.money-panel-open #owner-os-rail {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* Override old "hide store-hero / header" modal rules */
html body.money-panel-open #store-hero,
html body.money-panel-open .app-header,
html body.money-panel-open #bottom-nav {
  visibility: visible !important;
  pointer-events: auto !important;
  opacity: 1 !important;
}
html body.money-panel-open #store-hero {
  display: block !important;
  position: fixed !important;
  top: 52px !important;
  z-index: 9990 !important;
}
html body.money-panel-open #app-main-column {
  display: flex !important;
  flex-direction: column !important;
  padding-top: 108px !important;
  padding-left: 0.85rem !important;
  padding-right: 0.85rem !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
  background: #f4f4f5 !important;
}
html body.money-panel-open {
  overflow: auto !important;
  position: static !important;
  top: auto !important;
  background: #f4f4f5 !important;
}
/* All-stores must not hide money when on money route */
html body.all-stores-mode.money-panel-open #home-money-section,
html body.money-panel-open.all-stores-mode #home-money-section {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  opacity: 1 !important;
}

/* ── v1679: All Stores — NO white scroll slab ── */
html body.all-stores-mode,
html body.all-stores-mode.app-home-ready,
html body.all-stores-mode.has-bottom-nav {
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: #f4f4f5 !important;
}
html body.all-stores-mode #app-main-column,
html body.all-stores-mode.has-bottom-nav #app-main-column,
html body.all-stores-mode.app-home-ready #app-main-column {
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  padding-top: 108px !important;
  padding-bottom: 2rem !important;
  gap: 0.35rem !important;
  background: #f4f4f5 !important;
  overflow: visible !important;
}
/* Collapse anything that is not portfolio / chips */
html body.all-stores-mode #app-main-column > *:not(#store-hero):not(#home-insights):not(#home-all-stores-analytics) {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
html body.all-stores-mode #home-insights {
  display: block !important;
  margin: 0 auto !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  max-width: 56rem !important;
  width: 100% !important;
  order: 1 !important;
}
html body.all-stores-mode #home-insights > *:not(#home-all-stores-analytics) {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
html body.all-stores-mode #home-all-stores-analytics,
html body.all-stores-mode #home-all-stores-analytics.hidden {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin: 0 auto 0.5rem !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  width: 100% !important;
  max-width: 56rem !important;
  padding: 0 !important;
  order: 1 !important;
  transform: none !important;
  content-visibility: visible !important;
}
html body.all-stores-mode #home-all-stores-analytics .pf-shell {
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  transform: none !important;
  animation: none !important;
}
/* Fixed chips — no flow spacer */
html body.all-stores-mode #store-hero {
  position: fixed !important;
  top: 52px !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9990 !important;
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  min-height: 52px !important;
  margin: 0 !important;
  background: #fff !important;
}
html body.all-stores-mode #mr-home-surface {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  position: static !important;
  z-index: -1 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ── v1680: mobile full width (no shrunk gutters) + calm ── */
@media (max-width: 767px) {
  html body.mr-hs-on:not(.money-panel-open) #mr-home-surface,
  html body.app-home-ready:not(.guest-mode):not(.money-panel-open) #mr-home-surface {
    padding-left: max(0.65rem, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(0.65rem, env(safe-area-inset-right, 0px)) !important;
    align-items: stretch !important;
  }
  html body.mr-hs-on:not(.money-panel-open) #mr-home-surface > *,
  html body.app-home-ready:not(.guest-mode):not(.money-panel-open) #mr-home-surface > * {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  html body:not(.guest-mode) #app-main-column,
  html body.has-bottom-nav #app-main-column,
  html body.app-home-ready #app-main-column {
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
    max-width: 100% !important;
  }
  #app-main-column.max-w-6xl {
    max-width: 100% !important;
  }
  html body.mr-hs-on #mr-home-surface #home-store-pulse,
  html body.mr-hs-on #mr-home-surface #section-quick-add,
  html body.mr-hs-on #mr-home-surface #home-sell-actions,
  html body.mr-hs-on #mr-home-surface #home-live-strip,
  html body.mr-hs-on #mr-home-surface #home-tonight-strip,
  html body.mr-hs-on #mr-home-surface #home-stock-road,
  html body.mr-hs-on #mr-home-surface #home-dashboard-status {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }
  /* Scoreboard tiles use full width */
  html body.mr-hs-on #home-store-pulse .sd-tiles,
  html body.mr-hs-on #home-store-pulse .qi-kpi-grid,
  html body.mr-hs-on #home-store-pulse [class*="kpi-grid"] {
    width: 100% !important;
    max-width: 100% !important;
  }
  html body.money-panel-open #home-money-section,
  html body.money-panel-open #home-money-section.money-panel-open {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  html body.all-stores-mode #home-all-stores-analytics,
  html body.all-stores-mode #home-insights {
    max-width: 100% !important;
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
  }
}
/* Reduce animation thrash on low-end phones */
@media (max-width: 767px) {
  html body.mr-hs-on * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.08s !important;
  }
  html body.mr-hs-on .money-panel-root,
  html body.mr-hs-on .sd-board,
  html body.mr-hs-on .pf-shell {
    animation: none !important;
    transition: none !important;
  }
}
