@media (min-width: 761px) {
  .mobile-step-nav,
  .mobile-bottom-bar { display: none !important; }
}

@media (max-width: 760px) {
  body { padding-bottom: 84px; }
  .sale-shell { padding: 10px; }
  .sale-header { gap: 10px; margin-bottom: 12px; }
  .sale-header h1 { font-size: 27px; line-height: 1.1; }
  .sale-header p { font-size: 14px; line-height: 1.35; max-width: 260px; }
  .header-actions { align-items: stretch; gap: 6px; }
  .store-identity { max-width: 112px; font-size: 13px; padding: 8px 9px; }
  #logoutBtn { padding: 8px 10px; }

  .workspace { display: block; }
  .mobile-step-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 10px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(244, 246, 248, .96);
    backdrop-filter: blur(12px);
  }
  .mobile-step {
    border: 0;
    border-radius: 10px;
    padding: 9px 5px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
  }
  .mobile-step span {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    margin-right: 3px;
    border-radius: 999px;
    background: #e9edf2;
    color: #667085;
    font-size: 11px;
  }
  .mobile-step.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(16,24,40,.08);
  }
  .mobile-step.active span { background: var(--primary); color: #fff; }

  [data-mobile-panel] { display: none !important; }
  .workspace[data-mobile-step="products"] [data-mobile-panel="products"],
  .workspace[data-mobile-step="prices"] [data-mobile-panel="prices"],
  .workspace[data-mobile-step="preview"] [data-mobile-panel="preview"] { display: block !important; }

  .catalog-panel,
  .editor-panel,
  .settings-panel { min-height: 0; padding: 14px; }
  .catalog-toolbar { grid-template-columns: minmax(0, 1fr) 128px; }
  .product-grid { display: grid; grid-template-columns: 1fr; gap: 8px; max-height: none; overflow: visible; padding-right: 0; }
  .product-card { grid-template-columns: 62px minmax(0, 1fr); min-height: 82px; padding: 8px; gap: 9px; }
  .product-thumb { width: 62px; height: 62px; }
  .product-name { font-size: 15px; line-height: 1.22; }
  .product-en { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .product-meta { margin-top: 4px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .selected-items { gap: 8px; }
  .selected-row { padding: 10px; }
  .price-grid { grid-template-columns: 1fr; }

  .settings-panel { margin-bottom: 10px; }
  .preview-section { overflow-x: auto; padding-bottom: 8px; }
  .preview-heading { align-items: flex-start; gap: 8px; }
  .print-area { min-width: max-content; }
  .print-page { transform: scale(.45); transform-origin: top left; margin-bottom: calc(-55% * 11in); }

  .mobile-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    padding: 10px max(10px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    background: rgba(255,255,255,.96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(14px);
  }
  .mobile-bottom-primary,
  .mobile-bottom-secondary {
    min-height: 48px;
    border-radius: 12px;
    font-weight: 850;
    font-size: 15px;
  }
  .mobile-bottom-primary { border: 0; background: var(--primary); color: #fff; padding: 0 16px; }
  .mobile-bottom-secondary { border: 1px solid var(--line); background: #fff; color: #344054; padding: 0 16px; }
  .workspace[data-mobile-step="products"] .mobile-bottom-bar { grid-template-columns: 1fr; }
}

@media print {
  body { padding-bottom: 0; }
  .mobile-step-nav,
  .mobile-bottom-bar { display: none !important; }
  [data-mobile-panel]:not(.no-print) { display: block !important; }
  .print-page { transform: none !important; margin-bottom: 0 !important; }
}
