@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700&display=swap");

:root {
  --font-ui: "Noto Sans JP", "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
  --font-code: "Cascadia Mono", Consolas, "Courier New", monospace;
  --navy: #062f4f;
  --navy-2: #174d73;
  --blue: #0ea5d8;
  --blue-soft: #e8f6ff;
  --blue-card: #f4fbff;
  --sky: #e6f4fb;
  --gold: #bf9842;
  --ink: #0f1f2d;
  --muted: #5b7186;
  --line: #cbddea;
  --bg: #eef8fe;
  --card: #ffffff;
  --danger: #c83b3b;
  --green: #18805b;
  --shadow: 0 18px 44px rgba(6, 47, 79, .13);
}

/* Stock v50: readable disabled actions on the dark purchase workspace. */
body.purchase-mode button:disabled,
body.purchase-mode .purchase-row-actions .purchase-product-link-disabled {
  border-color: #60758a !important;
  background: #26394b !important;
  color: #c9d5df !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  filter: none !important;
}

body.purchase-mode button:disabled:hover,
body.purchase-mode .purchase-row-actions .purchase-product-link-disabled:hover {
  border-color: #60758a !important;
  background: #26394b !important;
  color: #c9d5df !important;
  transform: none !important;
}

/* Step 0 AI recognition compact layout */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist {
  display: grid !important;
  grid-template-columns: 58px 176px minmax(320px, 1fr) auto !important;
  grid-template-areas:
    "icon title result links"
    "icon actions preview note"
    ". hint preview note" !important;
  align-items: start !important;
  gap: 8px 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .start-icon {
  grid-area: icon;
  align-self: start;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-intro-copy {
  grid-area: title;
  min-width: 0;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-intro-copy h4 {
  margin: 0 0 3px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-intro-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  line-height: 1.35;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-cost-links {
  grid-area: links;
  align-self: start;
  justify-content: flex-end;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-action-row {
  grid-area: actions;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  width: 100%;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-action-row .file-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-action-row button {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 14px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-paste-hint {
  grid-area: hint;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.35;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist #aiResultAssist {
  grid-area: result;
  min-height: 50px;
  align-self: stretch;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist #aiPreviewAssist {
  grid-area: preview;
  min-height: 68px;
  align-self: stretch;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist #aiResultAssist span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist #aiPreviewAssist span {
  white-space: normal;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-demo-note {
  grid-area: note;
  align-self: end;
  max-width: 260px;
  margin: 0;
  color: #42637f;
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

@media (max-width: 900px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist {
    grid-template-columns: 52px 136px minmax(0, 1fr) !important;
    grid-template-areas:
      "icon title links"
      "actions result result"
      "actions preview preview"
      "hint note note" !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-cost-links {
    justify-content: flex-start;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-demo-note {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 560px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist {
    grid-template-columns: 112px minmax(0, 1fr) !important;
    grid-template-areas:
      "icon title"
      "actions result"
      "actions preview"
      "links links"
      "hint hint"
      "note note" !important;
  }
}

/* v33: ledger/editor density and category-specific visibility fixes */
body:not(.home-mode):not(.purchase-mode) .sales-reference-panel,
body:not(.home-mode):not(.purchase-mode) #salesReferencePanel {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-panel {
  max-width: 100% !important;
  overflow: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-scroll {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head {
  display: grid !important;
  grid-template-columns: minmax(150px, .56fr) minmax(0, 1.44fr) !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 8px 10px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
  display: grid !important;
  grid-template-columns: minmax(180px, 1fr) auto auto auto !important;
  gap: 6px !important;
  justify-content: end !important;
  align-items: center !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head-actions p {
  min-width: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-search-input,
body:not(.home-mode):not(.purchase-mode) .ledger-new-btn,
body:not(.home-mode):not(.purchase-mode) .ledger-head-actions a,
body:not(.home-mode):not(.purchase-mode) .ledger-toggle {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-search-input {
  width: 100% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-status-filters,
body:not(.home-mode):not(.purchase-mode) .filters {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  padding: 5px 10px !important;
  border-top: 1px solid var(--border) !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-status-filters .filter-chip,
body:not(.home-mode):not(.purchase-mode) .filters .filter-chip {
  min-height: 26px !important;
  padding: 3px 10px !important;
  font-size: 11px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 4px 5px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  vertical-align: middle !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 150px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 76px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
  width: auto !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 88px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 92px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 58px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 58px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 82px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(64px, .9fr) minmax(54px, .7fr) !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit-input,
body:not(.home-mode):not(.purchase-mode) .ledger-order-input {
  min-height: 26px !important;
  height: 26px !important;
  padding: 2px 6px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12.5px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 3px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 25px !important;
  padding: 2px 5px !important;
  border-radius: 999px !important;
  font-size: 10.5px !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  color: #9b2c24 !important;
  background: #fff7f5 !important;
  border-color: #f3c2ba !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 1800 !important;
  min-height: 34px !important;
  padding: 4px 8px !important;
  background: #eaf6ff !important;
  border-bottom: 1px solid var(--border) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header h2 {
  margin: 0 !important;
  font-size: 16px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header button {
  min-height: 28px !important;
  padding: 3px 10px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky !important;
  top: 34px !important;
  z-index: 1790 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  min-height: 34px !important;
  padding: 5px 6px !important;
  background: #f4fbff !important;
  border-bottom: 1px solid var(--border) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 26px !important;
  padding: 3px 8px !important;
  font-size: 11px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 16px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  position: sticky !important;
  top: 74px !important;
  z-index: 1780 !important;
  margin: 0 !important;
  padding: 5px 8px !important;
  background: #fff8dc !important;
  border: 1px solid #eedc8a !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  margin-bottom: 2px !important;
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  display: grid !important;
  grid-template-columns: 150px 88px minmax(220px, 1fr) 90px 96px 72px 70px !important;
  gap: 5px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-height: 28px !important;
  padding: 3px 6px !important;
  font-size: 11px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: 126px !important;
  z-index: 1770 !important;
  min-height: 42px !important;
  padding: 0 8px !important;
  background: #073753 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step {
  min-width: 54px !important;
  padding: 3px 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-badge {
  width: 22px !important;
  height: 22px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step span:not(.step-badge) {
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: 168px !important;
  z-index: 1760 !important;
  min-height: 42px !important;
  padding: 5px 8px !important;
  background: #f7fbff !important;
  border-bottom: 1px solid var(--border) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
  display: flex !important;
  gap: 5px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
  min-height: 30px !important;
  padding: 3px 8px !important;
  font-size: 12px !important;
  border-radius: 999px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, .42fr) !important;
  gap: 10px !important;
  align-items: start !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-panel {
  padding: 10px 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .input-card {
  padding: 8px !important;
  border-radius: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) select,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .rating-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .quick-button-grid {
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .rating-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .quick-button-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .pill {
  min-height: 32px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) h2 {
  margin: 8px 0 !important;
  font-size: 22px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) h3 {
  margin: 6px 0 !important;
  font-size: 17px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .purchase-card {
  grid-column: span 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .purchase-card .form-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card {
  padding: 8px !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label {
  min-height: 28px !important;
  height: 28px !important;
  padding: 3px 6px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-recognize-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #recognizeSelectedBtn {
  color: #fff !important;
  background: #d7352a !important;
  border-color: #d7352a !important;
  font-weight: 800 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) button.accessory {
  min-height: 30px !important;
  padding: 3px 5px !important;
  overflow: visible !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  text-overflow: clip !important;
  font-size: 10.5px !important;
  line-height: 1.08 !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-entry {
  padding: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-row {
  display: grid !important;
  grid-template-columns: 34px 1fr auto !important;
  gap: 6px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-folder-btn {
  min-height: 32px !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  position: sticky !important;
  top: 218px !important;
  padding: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  gap: 8px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions button {
  min-width: 110px !important;
  min-height: 30px !important;
  height: 30px !important;
  padding: 3px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel textarea,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveConditionDescriptionOutput,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlOutput,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-details {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  min-height: 680px !important;
  margin-top: 6px !important;
  padding: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
  min-height: 640px !important;
  height: calc(100vh - 245px) !important;
}

body:not(.listing-item-film-camera):not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body:not(.listing-item-film-camera):not(.home-mode):not(.purchase-mode) .service-seal-fieldset,
body:not(.listing-item-camera-body):not(.home-mode):not(.purchase-mode) [data-body-only-field],
body:not(.listing-item-camera-body):not(.home-mode):not(.purchase-mode) #shutterCountFieldset,
body:not(.listing-item-camera-body):not(.home-mode):not(.purchase-mode) .shutter-count-fieldset,
body:not(.listing-item-digital-body):not(.home-mode):not(.purchase-mode) [data-body-check-field],
body:not(.listing-item-digital-body):not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) #shutterCountFieldset,
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) .service-seal-fieldset,
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) #shutterCountFieldset,
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) .service-seal-fieldset {
  display: none !important;
  visibility: hidden !important;
}

body:not(.listing-item-lens-only):not(.listing-item-camera-with-lens):not(.home-mode):not(.purchase-mode) [data-lens-function-field] {
  display: none !important;
  visibility: hidden !important;
}

@media (max-width: 700px) {
  body:not(.home-mode):not(.purchase-mode) .app-shell {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head {
    grid-template-columns: 1fr !important;
    padding: 10px 12px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions p {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-search-input {
    grid-column: 1 / -1 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-status-filters,
  body:not(.home-mode):not(.purchase-mode) .filters {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table thead {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tbody {
    display: grid !important;
    gap: 8px !important;
    padding: 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tr {
    display: block !important;
    padding: 8px !important;
    background: #fff !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    display: block !important;
    padding: 0 !important;
    border: 0 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td:not(.ledger-title):not(.ledger-actions) {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
    margin-bottom: 5px !important;
    white-space: normal !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(58px, .95fr) minmax(52px, .85fr) 34px minmax(52px, .85fr) 34px !important;
    gap: 3px !important;
    align-items: center !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta > * {
    min-height: 22px !important;
    padding: 2px 3px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 9.5px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-actions {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
    min-height: 32px !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 32px !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 3px !important;
    padding: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
    padding: 2px 4px !important;
    font-size: 9px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
    font-size: 14px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 70px !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: minmax(0, 1fr) 72px 60px !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-purchase,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(2),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(5),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(6) {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-title-cell {
    grid-column: 1 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
    min-height: 24px !important;
    padding: 2px 4px !important;
    font-size: 9px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong {
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 114px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 156px !important;
    padding: 5px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-layout {
    display: block !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-grid {
    grid-template-columns: 1fr !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .purchase-card .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label {
    font-size: 10.5px !important;
    padding: 2px 3px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) button.accessory {
    min-height: 28px !important;
    font-size: 9px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
    position: static !important;
    margin-top: 8px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    justify-content: stretch !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions button {
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
    min-height: 480px !important;
    height: 480px !important;
  }
}

/* v32: Listing ledger/editor compact polish and strict category visibility */
body:not(.home-mode):not(.purchase-mode) .sales-reference-panel,
body:not(.home-mode):not(.purchase-mode) #salesReferencePanel {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-panel,
body:not(.home-mode):not(.purchase-mode) .ledger-scroll {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head {
  display: grid !important;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 10px 14px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
  display: grid !important;
  grid-template-columns: minmax(180px, 1fr) auto auto auto !important;
  gap: 6px !important;
  align-items: center !important;
  justify-content: end !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head-actions p {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  margin: 0 !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-search-input {
  min-height: 30px !important;
  height: 30px !important;
  font-size: 12px !important;
  padding: 4px 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-new-btn,
body:not(.home-mode):not(.purchase-mode) .ledger-head-actions a,
body:not(.home-mode):not(.purchase-mode) .ledger-toggle {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-status-filters {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  padding: 6px 14px !important;
  border-top: 1px solid var(--border) !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-status-filters .filter-chip,
body:not(.home-mode):not(.purchase-mode) .filters .filter-chip {
  min-height: 26px !important;
  padding: 3px 10px !important;
  font-size: 11px !important;
  border-radius: 999px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 4px 5px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  vertical-align: middle !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 160px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 86px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
  width: auto !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 92px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 96px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 66px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 62px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 76px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(68px, 1fr) minmax(58px, 0.82fr) !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit-input,
body:not(.home-mode):not(.purchase-mode) .ledger-order-input {
  min-height: 26px !important;
  height: 26px !important;
  padding: 2px 6px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12.5px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 3px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions .ledger-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-actions .ledger-delete {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 32px !important;
  min-height: 26px !important;
  padding: 2px 4px !important;
  font-size: 10.5px !important;
  border-radius: 999px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  color: #9b2c24 !important;
  background: #fff7f5 !important;
  border-color: #f3c2ba !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 1700 !important;
  min-height: 34px !important;
  padding: 4px 8px !important;
  background: #eaf6ff !important;
  border-bottom: 1px solid var(--border) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header h2 {
  font-size: 16px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header .primary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header .secondary-btn {
  min-height: 28px !important;
  padding: 3px 10px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky !important;
  top: 34px !important;
  z-index: 1690 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(100px, 1fr)) !important;
  gap: 6px !important;
  min-height: 34px !important;
  padding: 5px 6px !important;
  background: #eef8ff !important;
  border-bottom: 1px solid var(--border) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 28px !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip span {
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 16px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  position: sticky !important;
  top: 74px !important;
  z-index: 1680 !important;
  margin: 0 !important;
  padding: 5px 8px !important;
  background: #fff8dc !important;
  border: 1px solid #efd36a !important;
  border-radius: 0 !important;
  box-shadow: 0 1px 5px rgba(8, 49, 74, 0.08) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  font-size: 10px !important;
  margin-bottom: 3px !important;
  color: #506a7d !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  display: grid !important;
  grid-template-columns: 150px 88px minmax(210px, 1fr) 90px 96px 72px 68px !important;
  gap: 4px !important;
  align-items: stretch !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-height: 30px !important;
  padding: 4px 6px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.82) !important;
  border: 1px solid #d7e7f2 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span {
  display: block !important;
  margin-bottom: 1px !important;
  font-size: 9.5px !important;
  line-height: 1.1 !important;
  color: #5b7285 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell small {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  line-height: 1.12 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-title-cell strong {
  font-size: 14px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  padding: 5px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-note,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-url-details {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  justify-content: flex-end !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-actions button {
  min-height: 26px !important;
  padding: 3px 7px !important;
  font-size: 11px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: 126px !important;
  z-index: 1670 !important;
  min-height: 44px !important;
  padding: 4px 6px !important;
  background: #073753 !important;
  box-shadow: 0 2px 5px rgba(8, 49, 74, 0.12) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step {
  gap: 2px !important;
  font-size: 11px !important;
  line-height: 1.05 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step span {
  width: 24px !important;
  height: 24px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: 170px !important;
  z-index: 1660 !important;
  min-height: 42px !important;
  padding: 5px 8px !important;
  background: #f6fbff !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 2px 5px rgba(8, 49, 74, 0.08) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global > div:first-child strong {
  font-size: 18px !important;
  line-height: 1.05 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
  min-height: 30px !important;
  padding: 3px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-nav {
  gap: 6px !important;
  padding: 6px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-current {
  min-height: 44px !important;
  padding: 4px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-current span {
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-current strong {
  font-size: 15px !important;
  white-space: normal !important;
  line-height: 1.08 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .item-form-main {
  gap: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-panel {
  padding: 12px 14px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .input-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-card {
  padding: 9px !important;
  border-radius: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) select,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 13px !important;
  border-radius: 9px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
  min-height: 76px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .inspection-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-row,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .toggle-group {
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .inspection-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-row button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .toggle-group button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .radio-card {
  min-height: 32px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card {
  padding: 8px !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-paste-hint,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .hint {
  margin: 0 !important;
  font-size: 11.5px !important;
  line-height: 1.28 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links {
  display: flex !important;
  gap: 4px !important;
  justify-content: flex-end !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links a {
  min-height: 24px !important;
  padding: 2px 7px !important;
  font-size: 10.5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .file-button {
  min-width: 0 !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 2px 6px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-recognize-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-queue-analyze {
  background: #d92d20 !important;
  border-color: #b42318 !important;
  color: #fff !important;
  font-weight: 900 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result {
  min-height: 44px !important;
  padding: 6px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)) !important;
  gap: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  min-height: 28px !important;
  padding: 3px 5px !important;
  font-size: 10.5px !important;
  line-height: 1.08 !important;
  white-space: normal !important;
  overflow: hidden !important;
  overflow-wrap: anywhere !important;
  text-overflow: clip !important;
  border-radius: 8px !important;
}

@media (min-width: 920px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(8, minmax(70px, 1fr)) !important;
  }
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-card {
  padding: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  justify-content: flex-end !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .secondary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .primary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions label {
  min-height: 28px !important;
  padding: 3px 8px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .photo-folder-btn {
  background: #12a8d3 !important;
  color: #fff !important;
  border-color: #12a8d3 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-row {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  gap: 6px !important;
  padding: 4px 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-row small {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  padding: 8px !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .aside-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 6px !important;
  align-items: center !important;
  margin-bottom: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .aside-head h3 {
  font-size: 18px !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 130px)) !important;
  justify-content: end !important;
  gap: 6px !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions button {
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel textarea,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-output-area,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-textarea,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-html-output {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  margin-top: 4px !important;
  padding: 6px !important;
  min-height: 560px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card h4 {
  margin: 0 0 5px !important;
  font-size: 15px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
  width: 100% !important;
  height: calc(100vh - 210px) !important;
  min-height: 520px !important;
}

body:not(.listing-item-film-camera) [data-film-camera-field],
body:not(.listing-item-film-camera) .service-seal-fieldset,
body.listing-item-lens-only [data-film-camera-field],
body.listing-item-lens-only .service-seal-fieldset,
body.listing-item-accessory [data-film-camera-field],
body.listing-item-accessory .service-seal-fieldset {
  display: none !important;
}

body:not(.listing-item-camera-body) [data-body-only-field],
body:not(.listing-item-camera-body) #shutterCountFieldset,
body:not(.listing-item-camera-body) .shutter-count-fieldset,
body.listing-item-lens-only [data-body-only-field],
body.listing-item-lens-only #shutterCountFieldset,
body.listing-item-lens-only .shutter-count-fieldset,
body.listing-item-accessory [data-body-only-field],
body.listing-item-accessory #shutterCountFieldset,
body.listing-item-accessory .shutter-count-fieldset {
  display: none !important;
}

body:not(.listing-item-digital-body) [data-body-check-field],
body:not(.listing-item-digital-body) [data-body-function-field],
body.listing-item-lens-only [data-body-check-field],
body.listing-item-lens-only [data-body-function-field],
body.listing-item-accessory [data-body-check-field],
body.listing-item-accessory [data-body-function-field] {
  display: none !important;
}

body.listing-item-camera-body:not(.listing-item-camera-with-lens) [data-lens-function-field],
body.listing-item-accessory [data-lens-function-field] {
  display: none !important;
}

@media (max-width: 700px) {
  body:not(.home-mode):not(.purchase-mode) .ledger-head {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    padding: 10px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
    grid-template-columns: 1fr auto !important;
    gap: 5px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions p {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions a,
  body:not(.home-mode):not(.purchase-mode) .ledger-toggle {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-new-btn {
    min-width: 86px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-status-filters {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding: 6px 10px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-status-filters .filter-chip {
    min-height: 26px !important;
    padding: 2px 4px !important;
    font-size: 10px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tbody,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    display: block !important;
    width: 100% !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table thead {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tr {
    position: relative !important;
    display: block !important;
    padding: 7px !important;
    margin: 0 0 8px !important;
    border: 1px solid #cfe3f1 !important;
    border-radius: 10px !important;
    background: #fff !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td:not(.ledger-title):not(.ledger-actions) {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td.ledger-title {
    padding: 0 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td.ledger-actions {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
    margin: 0 0 5px !important;
    font-size: 13px !important;
    line-height: 1.22 !important;
    white-space: normal !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(58px, 1fr) minmax(48px, 0.75fr) 34px 48px 32px !important;
    gap: 3px !important;
    align-items: center !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta > * {
    min-height: 22px !important;
    padding: 2px 3px !important;
    font-size: 9.5px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    border-radius: 999px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-status {
    text-align: center !important;
    background: #f7f1df !important;
    font-weight: 900 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #cfe3f1 !important;
    background: #fff !important;
    color: #06324f !important;
    font-weight: 800 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    color: #9b2c24 !important;
    border-color: #f3c2ba !important;
    background: #fff7f5 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
    min-height: 32px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 32px !important;
    grid-template-columns: repeat(5, minmax(74px, 1fr)) !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 70px !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: minmax(0, 1fr) 72px 58px !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(1),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(2),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(5),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(6) {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-title-cell strong {
    font-size: 12.5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 120px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 164px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
    font-size: 10px !important;
    padding: 2px 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
    min-height: 390px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
    height: 55vh !important;
    min-height: 360px !important;
  }
}

/* v28: compact listing ledger/editor polish */
body:not(.home-mode):not(.purchase-mode) .ledger-wrap,
body:not(.home-mode):not(.purchase-mode) .ledger-scroll {
  overflow-x: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 5px 7px !important;
  vertical-align: middle !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 205px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 100px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
  width: auto !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 112px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 104px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 78px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 72px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 86px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: 1fr .82fr !important;
  gap: 4px !important;
  max-width: 198px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit-input,
body:not(.home-mode):not(.purchase-mode) .ledger-order-input,
body:not(.home-mode):not(.purchase-mode) .ledger-sku-input,
body:not(.home-mode):not(.purchase-mode) .ledger-price-input {
  min-height: 30px !important;
  height: 30px !important;
  padding: 3px 7px !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  gap: 4px !important;
  align-items: center !important;
  justify-content: flex-end !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-delete {
  display: inline-flex !important;
  min-width: 40px !important;
  min-height: 28px !important;
  padding: 3px 6px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  color: #b42318 !important;
  border-color: #f3b5ad !important;
  background: #fff7f5 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
  top: 0 !important;
  min-height: 38px !important;
  padding: 5px 8px !important;
  z-index: 90 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header h2 {
  font-size: 18px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header .primary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header .secondary-btn {
  min-height: 30px !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: 38px !important;
  min-height: 36px !important;
  padding: 4px 6px !important;
  gap: 6px !important;
  z-index: 89 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 28px !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 12px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  top: 74px !important;
  padding: 5px 7px !important;
  z-index: 88 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  font-size: 11px !important;
  margin-bottom: 2px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  grid-template-columns: 150px 96px minmax(210px, 1fr) 100px 100px 78px 78px !important;
  gap: 4px !important;
  align-items: stretch !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-height: 30px !important;
  padding: 3px 6px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell small {
  font-size: 10px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong {
  font-size: 13px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  top: 126px !important;
  min-height: 44px !important;
  padding: 4px 6px !important;
  z-index: 87 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step {
  min-height: 36px !important;
  padding: 2px 4px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step span {
  width: 24px !important;
  height: 24px !important;
  margin-bottom: 2px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: 170px !important;
  min-height: 44px !important;
  padding: 5px 8px !important;
  z-index: 86 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global > div:first-child strong {
  font-size: 18px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-nav {
  padding: 6px 8px !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-current,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-btn {
  min-height: 34px !important;
  padding: 4px 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-current strong {
  font-size: 15px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section {
  padding-top: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-heading,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) h3,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) h4 {
  margin-top: 4px !important;
  margin-bottom: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) label.field {
  gap: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field select,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field textarea {
  min-height: 34px !important;
  padding: 5px 8px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-options button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) fieldset button {
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-options {
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-recognition-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone {
  padding: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone {
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  gap: 7px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-icon {
  width: 38px !important;
  height: 38px !important;
  font-size: 16px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone h4,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-recognition-card h4 {
  margin: 0 0 2px !important;
  font-size: 14px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-recognition-card p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-paste-hint {
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
  grid-column: 1 / -1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .file-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 2px 5px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-recognize-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtnAssist {
  color: #ffffff !important;
  background: #d92d20 !important;
  border-color: #b42318 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result {
  min-height: 28px !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-button {
  min-height: 30px !important;
  height: auto !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
  line-height: 1.12 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: keep-all !important;
  text-overflow: clip !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  padding: 8px !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  gap: 8px !important;
  align-items: center !important;
  margin-bottom: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head h3 {
  font-size: 17px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .live-copy-actions,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 0 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions button {
  width: auto !important;
  min-width: 108px !important;
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel textarea,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveConditionDescriptionOutput,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlOutput,
.copy-output-details,
.sales-reference-panel {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  min-height: 680px !important;
  padding: 8px !important;
  margin-top: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
  min-height: 640px !important;
  height: calc(100vh - 245px) !important;
}

body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) .service-seal-fieldset,
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) #shutterCountFieldset,
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) .service-seal-fieldset,
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) #shutterCountFieldset,
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body:not(.listing-item-film-camera):not(.home-mode):not(.purchase-mode) .service-seal-fieldset,
body:not(.listing-item-film-camera):not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body:not(.listing-item-camera-body):not(.home-mode):not(.purchase-mode) #shutterCountFieldset,
body:not(.listing-item-camera-body):not(.home-mode):not(.purchase-mode) [data-body-only-field],
body:not(.listing-item-digital-body):not(.home-mode):not(.purchase-mode) [data-body-check-field],
body:not(.listing-item-digital-body):not(.home-mode):not(.purchase-mode) [data-body-function-field],
body:not(.listing-item-lens-only):not(.home-mode):not(.purchase-mode) [data-lens-function-field] {
  display: none !important;
  visibility: hidden !important;
}

@media (max-width: 700px) {
  body:not(.home-mode):not(.purchase-mode) .ledger-card {
    padding: 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-card-title {
    font-size: 15px !important;
    line-height: 1.2 !important;
    margin-bottom: 6px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(72px, 1fr) minmax(58px, .82fr) minmax(52px, .75fr) 38px 38px !important;
    gap: 3px !important;
    align-items: center !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta > * {
    min-width: 0 !important;
    min-height: 23px !important;
    padding: 2px 4px !important;
    font-size: 10px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    padding: 1px 4px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
    min-height: 36px !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 36px !important;
    grid-template-columns: repeat(5, minmax(76px, 1fr)) !important;
    overflow-x: auto !important;
    min-height: 34px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 70px !important;
    padding: 5px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(1),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(2),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(5),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(6) {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 124px !important;
    min-height: 42px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 166px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
    font-size: 10px !important;
    padding: 2px 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone {
    display: grid !important;
    grid-template-columns: 34px 1fr !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links {
    grid-column: 1 / -1 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-button {
    min-height: 30px !important;
    font-size: 9.5px !important;
    padding: 3px 3px !important;
    line-height: 1.08 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .live-copy-actions {
    justify-content: stretch !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions button {
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }
}

/* 2026-07-23 v15: passive app update and nine-column ledger. */

html body:not(.home-mode):not(.purchase-mode) .ledger-table .ledger-purchase-place {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}

@media (min-width: 701px) {
  html body:not(.home-mode):not(.purchase-mode) .ledger-table th,
  html body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    padding: 5px 6px !important;
  }

  html body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
  html body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
    width: 118px !important;
  }

  html body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
  html body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
    width: 82px !important;
  }

  html body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
  html body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
    width: 100px !important;
  }

  html body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
  html body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
    width: auto !important;
  }

  html body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
  html body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
    width: 112px !important;
  }

  html body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
  html body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
    width: 132px !important;
  }

  html body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
  html body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
    width: 82px !important;
  }

  html body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
  html body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
    width: 72px !important;
  }

  html body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(9),
  html body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(9) {
    width: 94px !important;
  }

  html body:not(.home-mode):not(.purchase-mode) .ledger-actions {
    justify-content: flex-start !important;
    padding-left: 2px !important;
  }
}

/* Compact Step 1 camera category buttons without changing saved values. */
.basic-type-card .choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 8px;
  align-content: start;
}

.basic-type-card .choice {
  min-height: 42px;
  padding: 6px 10px;
  font-size: clamp(13px, 0.82vw, 15px);
  line-height: 1.08;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-align: left;
}

.basic-type-card .choice[data-value="Film Camera with Lens"],
.basic-type-card .choice[data-value="Digital Camera with Lens"] {
  font-size: clamp(12px, 0.76vw, 14px);
}

@media (max-width: 720px) {
  .basic-type-card .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .basic-type-card .choice {
    min-height: 40px;
    padding: 6px 9px;
    font-size: 13px;
  }
}

/* Stock v128: three classifications, inventory filters, and safe list deletion. */
.purchase-sticky-modebar .purchase-workflow-controls {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.purchase-mode .purchase-list-panel .purchase-search-field input {
  color: #082438 !important;
  -webkit-text-fill-color: #082438 !important;
  caret-color: #082438;
}

body.purchase-mode .purchase-list-panel .purchase-search-field input::placeholder {
  color: #496579;
  -webkit-text-fill-color: #496579;
  opacity: 1;
}

body.purchase-mode .purchase-list-panel #purchaseStockAggregationStatus {
  color: #f2f8fc;
  font-weight: 900;
}

.purchase-stock-filter-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.purchase-stock-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(120, 177, 215, .3);
  border-radius: 7px;
  background: rgba(8, 31, 46, .72);
  white-space: nowrap;
}

.purchase-stock-filter-group strong {
  padding: 0 4px;
  color: #d8eaf5;
  font-size: 9px;
}

.purchase-stock-filter-group button {
  min-height: 22px;
  padding: 2px 5px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #bad3e2;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.purchase-stock-filter-group button.active {
  border-color: #37bce9;
  background: #0a6f99;
  color: #fff;
}

.purchase-inventory-unknown-notice {
  min-height: 25px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 181, 71, .58);
  border-radius: 7px;
  background: rgba(101, 65, 9, .8);
  color: #fff1c2;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.purchase-inventory-unknown-notice.active {
  border-color: #ffd27a;
  box-shadow: 0 0 0 2px rgba(255, 181, 71, .18);
}

.purchase-workflow-classification-badge.test {
  border-color: rgba(245, 190, 72, .58);
  background: #614b0d;
  color: #fff1bd;
}

.purchase-workflow-classification-badge.review {
  border-color: rgba(255, 135, 135, .58);
  background: #68242a;
  color: #ffe1e1;
}

.purchase-other-reason-badges {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  overflow: visible;
}

button.purchase-other-reason-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 23px;
  padding: 3px 7px;
  border-color: rgba(224, 49, 49, .52);
  background: rgba(105, 28, 33, .88);
  color: #ffdada;
  text-align: left;
  cursor: pointer;
}

button.purchase-other-reason-badge span {
  min-width: 0;
  overflow: hidden;
  color: #ffecec;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-other-reason-strategy_price_low,
.purchase-other-reason-strategy_price_high,
.purchase-other-reason-strategy_type {
  border-color: rgba(245, 190, 72, .55) !important;
  background: rgba(91, 66, 11, .9) !important;
  color: #fff0b8 !important;
}

.purchase-overview-inventory-unknown-badge {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 2px 7px;
  border: 1px solid rgba(255, 181, 71, .58);
  border-radius: 999px;
  background: rgba(112, 74, 13, .85);
  color: #fff0bd;
  font-size: 9px;
  font-weight: 900;
}

.purchase-list-target-select {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  min-height: 0 !important;
  margin: 0 2px 0 0;
  accent-color: #22aeda;
  cursor: pointer;
}

.purchase-overview-card-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
  padding-top: 4px;
  border-top: 1px solid rgba(132, 166, 186, .18);
}

.purchase-overview-card-actions .purchase-list-target-delete {
  min-height: 25px;
  padding: 3px 7px;
  font-size: 9px;
}

.purchase-list-selection-bar {
  position: sticky;
  top: 52px;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 7px;
  padding: 7px 10px;
  border: 1px solid rgba(224, 49, 49, .5);
  border-radius: 9px;
  background: rgba(51, 19, 24, .96);
  color: #ffe5e5;
  font-size: 11px;
  font-weight: 900;
}

.purchase-list-selection-bar[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .purchase-sticky-modebar .purchase-workflow-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-stock-filter-controls {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .purchase-sticky-modebar .purchase-workflow-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .purchase-stock-filter-group strong {
    min-width: 58px;
  }
}

/* Stock workflow v55: task modes, shop status, points and high-visibility outbound links. */
.purchase-workflow-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.purchase-workflow-mode {
  min-height: 44px;
  border: 1px solid rgba(127, 191, 235, .36);
  border-radius: 11px;
  background: #10283a;
  color: #dff2ff;
  font-weight: 900;
  cursor: pointer;
}

.purchase-workflow-mode:hover {
  border-color: #45b8f0;
  background: #153b56;
}

.purchase-workflow-mode.active {
  border-color: #36c3ff;
  background: linear-gradient(135deg, #087dad, #0aa9d7);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(54, 195, 255, .16);
}

.purchase-workflow-summary,
.purchase-point-settings p,
.purchase-strategy-settings p {
  margin: 0;
  color: #a9cce4;
  font-size: 12px;
  line-height: 1.5;
}

.purchase-back-to-products {
  margin-top: 7px;
  border-color: #4aaee7 !important;
  background: #123b57 !important;
  color: #e5f6ff !important;
  font-weight: 900;
}

.purchase-advanced-filter-panel,
.purchase-point-settings,
.purchase-strategy-settings {
  border: 1px solid rgba(124, 182, 222, .26);
  border-radius: 10px;
  background: rgba(15, 38, 56, .92);
  color: #dff2ff;
}

.purchase-advanced-filter-panel > summary,
.purchase-point-settings > summary,
.purchase-strategy-settings > summary {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.purchase-advanced-filter-panel .purchase-filter-group {
  border: 0;
  border-top: 1px solid rgba(124, 182, 222, .2);
  border-radius: 0 0 10px 10px;
}

.purchase-point-rate-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(118px, 1fr));
  gap: 7px;
  padding: 8px 10px;
  border-top: 1px solid rgba(124, 182, 222, .2);
}

.purchase-point-rate-grid label {
  display: grid;
  grid-template-columns: 1fr 64px auto;
  gap: 5px;
  align-items: center;
  color: #dff2ff;
  font-size: 12px;
  font-weight: 800;
}

.purchase-point-rate-grid input {
  width: 100%;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid rgba(127, 191, 235, .4);
  border-radius: 8px;
  background: #0b2234;
  color: #fff;
}

.purchase-point-settings p {
  padding: 0 10px 9px;
}

.purchase-strategy-setting-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(145px, 1fr));
  gap: 7px;
  padding: 8px 10px;
  border-top: 1px solid rgba(124, 182, 222, .2);
}

.purchase-strategy-setting-grid label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px auto;
  gap: 5px;
  align-items: center;
  color: #dff2ff;
  font-size: 11px;
  font-weight: 800;
}

.purchase-strategy-setting-grid input {
  width: 100%;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid rgba(127, 191, 235, .4);
  border-radius: 8px;
  background: #0b2234;
  color: #fff;
}

.purchase-strategy-types {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin: 0 10px;
  padding: 7px 9px;
  border: 1px solid rgba(124, 182, 222, .22);
  border-radius: 8px;
}

.purchase-strategy-types legend {
  padding: 0 5px;
  color: #a9cce4;
  font-size: 10px;
  font-weight: 900;
}

.purchase-strategy-types label,
.purchase-strategy-unlocks label {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  color: #e4f4ff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.purchase-strategy-unlocks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 7px 10px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(76, 84, 94, .3);
}

.purchase-strategy-settings p {
  padding: 0 10px 9px;
}

@media (max-width: 900px) {
  .purchase-strategy-setting-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 560px) {
  .purchase-strategy-setting-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.purchase-shop-fetch-status {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.purchase-shop-fetch-chip {
  padding: 4px 7px;
  border: 1px solid rgba(127, 191, 235, .3);
  border-radius: 999px;
  background: #173247;
  color: #c5dbea;
  font-size: 11px;
  font-weight: 800;
}

.purchase-shop-fetch-chip.success {
  border-color: #299b68;
  background: #123f30;
  color: #9ff0c6;
}

.purchase-shop-fetch-chip.error {
  border-color: #c94a4a;
  background: #4b2025;
  color: #ffb9b9;
}

.purchase-shop-fetch-chip.stale {
  border-color: #c88a2a;
  background: #4a3518;
  color: #ffe0a3;
}

.purchase-shop-fetch-chip.unset,
.purchase-shop-fetch-chip.pending {
  border-color: #9c7a27;
  background: #473b1d;
  color: #ffe39a;
}

.purchase-shop-fetch-chip.unsupported {
  background: #263541;
  color: #9eafbc;
}

.purchase-monitor-overview {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 10px;
}

.purchase-monitor-overview-item {
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid rgba(127, 191, 235, .3);
  border-radius: 9px;
  background: #132b3d;
  color: #d8eaf7;
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.purchase-monitor-overview-item strong {
  margin-right: 4px;
  color: #fff;
}

.purchase-monitor-overview-item.success {
  border-color: #299b68;
  background: #123f30;
  color: #b7f4d2;
}

.purchase-monitor-overview-item.stale,
.purchase-monitor-overview-item.pending {
  border-color: #c88a2a;
  background: #4a3518;
  color: #ffe0a3;
}

.purchase-monitor-overview-item.error {
  border-color: #c94a4a;
  background: #4b2025;
  color: #ffb9b9;
}

@media (max-width: 820px) {
  .purchase-monitor-overview {
    grid-template-columns: 1fr;
  }
}

body.purchase-mode .purchase-row-actions a.purchase-direct-link {
  border-color: #ff6b6b !important;
  background: #e03131 !important;
  color: #fff !important;
  box-shadow: 0 2px 7px rgba(224, 49, 49, .28) !important;
}

body.purchase-mode .purchase-row-actions a.purchase-direct-link:hover {
  border-color: #ff8787 !important;
  background: #f03e3e !important;
  color: #fff !important;
}

body.purchase-mode .purchase-product-link-disabled,
body.purchase-mode .purchase-product-link-disabled:hover {
  border-color: #566979 !important;
  background: #273744 !important;
  color: #aebdca !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.purchase-search-panel.research-catalog-mode .purchase-workflow-controls,
.purchase-search-panel.research-catalog-mode .purchase-workflow-summary,
.purchase-search-panel.research-catalog-mode .purchase-advanced-filter-panel,
.purchase-search-panel.research-catalog-mode .purchase-point-settings {
  display: none;
}

@media (max-width: 900px) {
  .purchase-point-rate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .purchase-workflow-controls,
  .purchase-point-rate-grid {
    grid-template-columns: 1fr;
  }
}

/* Listing save lock and local data integrity controls. */
.current-save-progress {
  min-width: 10rem;
  max-width: min(34rem, 50vw);
  color: #315875;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}

.current-save-progress[data-tone="working"] {
  color: #9a6200;
}

.current-save-progress[data-tone="error"] {
  color: #b42318;
}

.listing-editor-toolbar button[aria-busy="true"],
[data-status-change][aria-busy="true"] {
  cursor: wait;
  opacity: 0.72;
}

#ledgerPanel .item-integrity-panel {
  margin: 0 12px 12px;
  border: 1px solid #bdd7e8;
  border-radius: 12px;
  background: #f8fcff;
}

#ledgerPanel .item-integrity-panel > summary {
  cursor: pointer;
  padding: 10px 14px;
  color: #123f5d;
  font-weight: 800;
}

#ledgerPanel .item-integrity-controls {
  padding: 0 14px 14px;
}

#ledgerPanel .item-integrity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

#ledgerPanel #itemIntegrityResults {
  max-height: 20rem;
  margin-top: 10px;
  padding: 10px;
  overflow: auto;
  border: 1px solid #d6e5ef;
  border-radius: 10px;
  background: #fff;
}

#ledgerPanel #itemIntegrityResults h4 {
  margin: 8px 0 4px;
}

#ledgerPanel #itemIntegrityResults article,
#ledgerPanel #itemIntegrityResults li {
  overflow-wrap: anywhere;
}

#ledgerPanel #itemIntegrityBackupStatus {
  color: #8a4f00;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .current-save-progress {
    order: 10;
    width: 100%;
    max-width: none;
    text-align: left;
  }
}

/* Stock v113: immediate save feedback and unsaved-change visibility. */
.purchase-form-panel .purchase-form-actions:has(.purchase-quick-save-feedback:not([hidden])) .purchase-quick-update-reason {
  display: none;
}

.purchase-quick-save-feedback {
  display: flex;
  flex: 1 1 420px;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 10px;
  min-width: 0;
  min-height: 29px;
  padding: 4px 8px;
  border: 1px solid rgba(109, 177, 218, .42);
  border-radius: 8px;
  background: rgba(20, 62, 87, .66);
  color: #e5f7ff;
  font-size: 10px;
  line-height: 1.25;
}

.purchase-quick-save-feedback[hidden] {
  display: none;
}

.purchase-quick-save-feedback strong {
  color: inherit;
  font-size: 11px;
}

.purchase-quick-save-feedback span {
  white-space: nowrap;
}

.purchase-quick-save-feedback.is-warning {
  border-color: rgba(245, 190, 72, .62);
  background: rgba(94, 66, 10, .82);
  color: #ffe8a8;
}

.purchase-quick-save-feedback.is-success {
  border-color: rgba(92, 214, 155, .58);
  background: rgba(20, 83, 58, .76);
  color: #dcffef;
}

.purchase-quick-save-feedback.is-error {
  border-color: rgba(235, 91, 91, .62);
  background: rgba(106, 29, 35, .8);
  color: #ffd8d8;
}

.purchase-form-panel .purchase-form-actions button[aria-busy="true"] {
  cursor: wait;
  filter: saturate(.72);
}

.purchase-product-row.is-just-saved {
  outline: 3px solid #55e6a5;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(85, 230, 165, .2), 0 0 24px rgba(85, 230, 165, .5);
  animation: purchase-target-saved-pulse 1s ease-in-out 3;
}

@keyframes purchase-target-saved-pulse {
  50% {
    outline-color: #fff1a8;
    box-shadow: 0 0 0 7px rgba(255, 241, 168, .26), 0 0 30px rgba(85, 230, 165, .62);
  }
}

/* Listing ledger: aging inventory and cash-conversion controls */
.ledger-aging-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 12px;
  padding: 10px 12px;
  border: 1px solid #f0c36b;
  border-radius: 12px;
  background: #fff9e9;
}

.ledger-aging-toolbar > strong {
  flex: 1 1 auto;
  min-width: 0;
  color: #713f12;
  line-height: 1.45;
  white-space: nowrap;
}

.ledger-aging-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.ledger-aging-actions .filter-chip.active {
  color: #fff;
  border-color: #9a3412;
  background: #9a3412;
}

.ledger-tracking-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 12px 10px;
  padding: 8px 12px;
  border: 1px solid #b9d8e8;
  border-radius: 10px;
  background: #f3faff;
}

.ledger-tracking-toolbar > strong {
  flex: 0 0 auto;
  color: #174866;
  font-size: 13px;
}

.ledger-tracking-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.ledger-tracking-actions .filter-chip {
  min-height: 30px;
  padding: 4px 8px;
}

.ledger-tracking-actions .filter-chip.active {
  border-color: #12618a;
  background: #12618a;
  color: #fff;
}

#ledgerPanel #listingLedger td.ledger-title.has-tracking {
  position: relative !important;
}

#ledgerPanel td.ledger-title.has-tracking > strong {
  box-sizing: border-box;
  padding-right: 108px;
}

#ledgerPanel #listingLedger td.ledger-title > .ledger-tracking-link {
  display: block !important;
  position: absolute;
  top: 50%;
  right: 6px;
  max-width: 98px;
  padding: 2px 5px;
  overflow: hidden;
  transform: translateY(-50%);
  border: 1px solid #8ebfd8;
  border-radius: 999px;
  background: #eef9ff;
  color: #075985;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#ledgerPanel .ledger-tracking-link.is-disabled {
  border-color: #c7d2da;
  background: #f5f7f8;
  color: #60717d;
}

.ledger-age-sort-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
}

.ledger-age-sort-label select {
  min-height: 34px;
  border: 1px solid #bfd1dc;
  border-radius: 8px;
  background: #fff;
}

#ledgerPanel .ledger-table {
  min-width: 1420px;
}

#ledgerPanel td.ledger-title > strong {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body #ledgerPanel .ledger-table td.ledger-age-cell {
  width: 84px !important;
  min-width: 84px !important;
  padding: 8px 7px !important;
  border-radius: 7px;
  text-align: center;
  white-space: nowrap;
  font-weight: 800;
}

body #ledgerPanel .ledger-table td.ledger-age-cell.is-caution {
  color: #713f12;
  background: #fef3c7;
}

body #ledgerPanel .ledger-table td.ledger-age-cell.is-warning {
  color: #9a3412;
  background: #ffedd5;
}

body #ledgerPanel .ledger-table td.ledger-age-cell.is-danger {
  color: #991b1b;
  background: #fee2e2;
}

body #ledgerPanel .ledger-table td.ledger-status-cell {
  display: table-cell !important;
  width: 220px !important;
  min-width: 220px !important;
  padding: 7px !important;
  vertical-align: middle;
  white-space: nowrap;
}

body #ledgerPanel .ledger-table td.ledger-actions {
  display: flex !important;
  align-items: center;
  gap: 5px;
  width: 96px !important;
  min-width: 96px !important;
  padding: 7px !important;
  white-space: nowrap;
}

#ledgerPanel td.ledger-actions button {
  margin: 0 !important;
}

@media (min-width: 901px) {
  html body #ledgerPanel .ledger-table th:nth-child(9),
  html body #ledgerPanel .ledger-table td:nth-child(9) {
    width: 220px !important;
    min-width: 220px !important;
  }

  html body #ledgerPanel .ledger-table th:nth-child(10),
  html body #ledgerPanel .ledger-table td:nth-child(10) {
    width: 96px !important;
    min-width: 96px !important;
  }
}

@media (max-width: 900px) {
  .ledger-aging-toolbar {
    align-items: center;
    flex-direction: row;
    overflow-x: auto;
  }

  .ledger-aging-actions {
    width: auto;
  }

  .ledger-tracking-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .ledger-tracking-actions {
    justify-content: flex-start;
    width: 100%;
  }

}

@media (max-width: 380px) {
  .basic-type-card .choice {
    font-size: 12px;
    padding-inline: 7px;
  }
}

/* Step 0 AI recognition final layout override */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist {
  display: grid !important;
  grid-template-columns: 58px 176px minmax(320px, 1fr) auto !important;
  grid-template-areas:
    "icon title result links"
    "icon actions preview note"
    ". hint preview note" !important;
  align-items: start !important;
  gap: 8px 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .start-icon {
  grid-area: icon !important;
  align-self: start !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-intro-copy {
  grid-area: title !important;
  min-width: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-intro-copy h4 {
  margin: 0 0 3px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-intro-copy p {
  display: -webkit-box !important;
  margin: 0 !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-cost-links {
  grid-area: links !important;
  align-self: start !important;
  justify-content: flex-end !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-action-row {
  grid-area: actions !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  width: 100% !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-action-row .file-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-action-row button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  padding: 7px 10px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-paste-hint {
  grid-area: hint !important;
  margin: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist #aiResultAssist {
  grid-area: result !important;
  min-height: 50px !important;
  align-self: stretch !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist #aiPreviewAssist {
  grid-area: preview !important;
  min-height: 68px !important;
  align-self: stretch !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist #aiResultAssist span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist #aiPreviewAssist span {
  white-space: normal !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-demo-note {
  grid-area: note !important;
  align-self: end !important;
  max-width: 260px !important;
  margin: 0 !important;
  color: #42637f !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  text-align: right !important;
}

@media (max-width: 900px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist {
    grid-template-columns: 46px 154px minmax(220px, 1fr) !important;
    grid-template-areas:
      "icon title links"
      "icon actions result"
      ". hint preview"
      ". note note" !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-demo-note {
    max-width: none !important;
    text-align: left !important;
  }
}

@media (max-width: 560px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist {
    grid-template-columns: 44px 1fr !important;
    grid-template-areas:
      "icon title"
      "actions actions"
      "result result"
      "preview preview"
      "hint hint"
      "links links"
      "note note" !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-action-row .upload-box,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-action-row .file-button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiDropZoneAssist .ai-action-row button {
    min-height: 38px !important;
    padding: 6px 5px !important;
    font-size: 12px !important;
  }
}

/* 20260719 ui-polish v39: compact ledger/editor guard */
body:not(.home-mode):not(.purchase-mode) .ledger-panel,
body:not(.home-mode):not(.purchase-mode) .ledger-scroll {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 4px 5px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  vertical-align: middle !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 208px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 92px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
  width: auto !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 112px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 116px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 72px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 66px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 104px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit-input,
body:not(.home-mode):not(.purchase-mode) .ledger-order-input {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 3px 6px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 3px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions .ledger-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-actions .ledger-delete {
  display: inline-flex !important;
  min-width: 0 !important;
  min-height: 28px !important;
  padding: 3px 7px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  box-shadow: 0 1px 0 rgba(12, 55, 82, .08) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
  top: 0 !important;
  z-index: 2600 !important;
  min-height: 42px !important;
  padding: 5px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: 42px !important;
  z-index: 2590 !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  min-height: 36px !important;
  padding: 5px 8px !important;
  background: #f3fbff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-status-card {
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  top: 78px !important;
  z-index: 2580 !important;
  margin: 0 !important;
  padding: 5px 8px !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  font-size: 11px !important;
  margin-bottom: 3px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  display: grid !important;
  grid-template-columns: minmax(116px, .72fr) 82px minmax(180px, 2fr) 92px 96px 72px 68px !important;
  gap: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-height: 32px !important;
  padding: 4px 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span {
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong {
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  top: 128px !important;
  z-index: 2570 !important;
  min-height: 48px !important;
  padding: 5px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: 176px !important;
  z-index: 2560 !important;
  min-height: 48px !important;
  padding: 5px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
  min-height: 32px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-title,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-heading {
  margin-top: 10px !important;
  margin-bottom: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-section {
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .compact-choice-grid {
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .compact-choice-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .check-option,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-button {
  min-height: 34px !important;
  padding: 5px 8px !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone {
  padding: 8px !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  gap: 6px !important;
  align-items: start !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head p {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links a,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links button {
  min-height: 26px !important;
  padding: 3px 8px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .primary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .secondary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label {
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-recognize-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtnAssist {
  background: #c62828 !important;
  border-color: #c62828 !important;
  color: #fff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result {
  min-height: 38px !important;
  padding: 6px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)) !important;
  gap: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-button {
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 3px 5px !important;
  font-size: 11px !important;
  line-height: 1.08 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 4px 0 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions button {
  flex: 1 1 0 !important;
  min-height: 32px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveConditionDescriptionOutput,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlOutput,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-details {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-preview-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-preview-shell {
  min-height: 620px !important;
}

body.listing-editor-mode.listing-item-lens-only:not(.home-mode):not(.purchase-mode) .service-seal-fieldset,
body.listing-editor-mode.listing-item-lens-only:not(.home-mode):not(.purchase-mode) #shutterCountFieldset,
body.listing-editor-mode.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-editor-mode.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-editor-mode.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-editor-mode.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body.listing-editor-mode.listing-item-accessory:not(.home-mode):not(.purchase-mode) .service-seal-fieldset,
body.listing-editor-mode.listing-item-accessory:not(.home-mode):not(.purchase-mode) #shutterCountFieldset,
body.listing-editor-mode.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-editor-mode.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-editor-mode.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-editor-mode.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body.listing-editor-mode.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-lens-function-field],
body.listing-editor-mode:not(.listing-item-film-camera):not(.home-mode):not(.purchase-mode) .service-seal-fieldset,
body.listing-editor-mode:not(.listing-item-film-camera):not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body.listing-editor-mode:not(.listing-item-camera-body):not(.home-mode):not(.purchase-mode) #shutterCountFieldset,
body.listing-editor-mode:not(.listing-item-camera-body):not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-editor-mode:not(.listing-item-digital-body):not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-editor-mode:not(.listing-item-digital-body):not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-editor-mode:not(.listing-item-lens-only):not(.listing-item-camera-with-lens):not(.home-mode):not(.purchase-mode) [data-lens-function-field] {
  display: none !important;
  visibility: hidden !important;
}

body.listing-editor-mode.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-lens-function-field],
body.listing-editor-mode.listing-item-camera-with-lens:not(.home-mode):not(.purchase-mode) [data-lens-function-field] {
  display: block !important;
  visibility: visible !important;
}

@media (min-width: 980px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(7, minmax(78px, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  body:not(.home-mode):not(.purchase-mode) .ledger-card {
    padding: 7px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-card-title {
    font-size: 15px !important;
    margin-bottom: 5px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    grid-template-columns: 66px 62px 36px minmax(48px, 1fr) 36px !important;
    gap: 3px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta > * {
    min-height: 22px !important;
    padding: 2px 3px !important;
    font-size: 10px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-status {
    order: 4 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit {
    order: 3 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    display: inline-flex !important;
    order: 5 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
    min-height: 32px !important;
    padding: 3px 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 32px !important;
    min-height: 32px !important;
    padding: 4px 5px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 64px !important;
    padding: 4px 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
    min-height: 28px !important;
    padding: 3px 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 112px !important;
    min-height: 38px !important;
    padding: 4px 5px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 150px !important;
    min-height: 42px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .primary-btn,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .secondary-btn,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label {
    min-height: 28px !important;
    padding: 3px 4px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-button {
    min-height: 28px !important;
    font-size: 9.5px !important;
    padding: 3px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-grid button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .compact-choice-grid button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .check-option,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-button {
    min-height: 30px !important;
    padding: 4px 6px !important;
    font-size: 11px !important;
  }
}

/* 20260719 ui-polish v38: final cascade guard */
body:not(.home-mode):not(.purchase-mode) .sales-reference-panel,
body:not(.home-mode):not(.purchase-mode) .copy-output-details,
body:not(.home-mode):not(.purchase-mode) .html-code-details {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body:not(.home-mode):not(.purchase-mode) [data-lens-function-field] {
  display: none !important;
}

body.listing-item-film-camera:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body.listing-item-camera-body:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-camera-body:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-digital-body:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-lens-function-field],
body.listing-item-camera-with-lens:not(.home-mode):not(.purchase-mode) [data-lens-function-field] {
  display: block !important;
}

body.listing-item-film-camera:not(.home-mode):not(.purchase-mode) button[data-film-camera-field],
body.listing-item-camera-body:not(.home-mode):not(.purchase-mode) button[data-body-check-field],
body.listing-item-camera-body:not(.home-mode):not(.purchase-mode) button[data-body-only-field],
body.listing-item-digital-body:not(.home-mode):not(.purchase-mode) button[data-body-function-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) button[data-lens-function-field],
body.listing-item-camera-with-lens:not(.home-mode):not(.purchase-mode) button[data-lens-function-field] {
  display: inline-flex !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 5px 7px !important;
  overflow: hidden !important;
  vertical-align: middle !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 20% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 10% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
  width: 31% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 11% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 10% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 7% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 7% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 86px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 4px !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions button,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  min-height: 26px !important;
  height: 26px !important;
  padding: 0 7px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #f0b9b2 !important;
  background: #fff5f3 !important;
  color: #b24a3e !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  background: #eef8ff !important;
  z-index: 920 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  top: 0 !important;
  min-height: 42px !important;
  padding: 6px 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: 42px !important;
  padding: 4px 8px !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-card {
  min-height: 34px !important;
  padding: 5px 9px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-card strong {
  font-size: 18px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  top: 86px !important;
  padding: 6px 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .section-label {
  font-size: 12px !important;
  margin: 0 0 2px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  display: grid !important;
  grid-template-columns: 158px 86px minmax(220px, 1fr) 108px 122px 86px 86px !important;
  gap: 5px !important;
  align-items: stretch !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-height: 34px !important;
  padding: 5px 7px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-title-cell strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  top: 136px !important;
  min-height: 62px !important;
  padding: 6px 8px !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step {
  gap: 3px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-index {
  width: 28px !important;
  height: 28px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-label {
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: 198px !important;
  padding: 6px 10px !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global h2 {
  font-size: 22px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-options {
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
  min-height: 34px !important;
  padding: 5px 10px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .wizard-form,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .wizard-panels,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .wizard-step {
  scroll-margin-top: 262px !important;
}

body:not(.home-mode):not(.purchase-mode) .form-section,
body:not(.home-mode):not(.purchase-mode) .form-card,
body:not(.home-mode):not(.purchase-mode) fieldset {
  padding: 10px 12px !important;
  border-radius: 10px !important;
}

body:not(.home-mode):not(.purchase-mode) .choice,
body:not(.home-mode):not(.purchase-mode) .condition-button,
body:not(.home-mode):not(.purchase-mode) .option-button,
body:not(.home-mode):not(.purchase-mode) .selection-grid button,
body:not(.home-mode):not(.purchase-mode) .choice-grid button,
body:not(.home-mode):not(.purchase-mode) .grade-grid button,
body:not(.home-mode):not(.purchase-mode) .function-options button,
body:not(.home-mode):not(.purchase-mode) .optical-options button {
  min-height: 34px !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  line-height: 1.16 !important;
}

body:not(.home-mode):not(.purchase-mode) .form-grid input,
body:not(.home-mode):not(.purchase-mode) .form-grid select,
body:not(.home-mode):not(.purchase-mode) .form-grid textarea,
body:not(.home-mode):not(.purchase-mode) input,
body:not(.home-mode):not(.purchase-mode) select {
  min-height: 36px !important;
  padding: 6px 9px !important;
}

body:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone,
body:not(.home-mode):not(.purchase-mode) .ai-inline-card {
  padding: 10px 12px !important;
  gap: 6px !important;
}

body:not(.home-mode):not(.purchase-mode) .ai-card-head p,
body:not(.home-mode):not(.purchase-mode) .ai-card-subtitle {
  max-height: 1.3em !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

body:not(.home-mode):not(.purchase-mode) .ai-action-row button,
body:not(.home-mode):not(.purchase-mode) .ai-action-row .file-button {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ai-recognize-btn,
body:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtn {
  background: #d71920 !important;
  border-color: #d71920 !important;
  color: #fff !important;
  font-weight: 800 !important;
}

body:not(.home-mode):not(.purchase-mode) .ai-preview,
body:not(.home-mode):not(.purchase-mode) .ai-result {
  min-height: 34px !important;
  padding: 7px 9px !important;
}

body:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)) !important;
  gap: 5px !important;
}

body:not(.home-mode):not(.purchase-mode) .accessory-grid button,
body:not(.home-mode):not(.purchase-mode) .accessory-button {
  min-height: 30px !important;
  height: 30px !important;
  padding: 2px 5px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  line-height: 1.05 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (min-width: 960px) {
  body:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  }
}

body:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  padding: 10px 12px !important;
  gap: 8px !important;
}

body:not(.home-mode):not(.purchase-mode) .live-preview-panel .live-copy-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: 0 0 8px !important;
}

body:not(.home-mode):not(.purchase-mode) .live-copy-actions button {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

body:not(.home-mode):not(.purchase-mode) .live-preview-panel .section-title,
body:not(.home-mode):not(.purchase-mode) .live-preview-panel h2,
body:not(.home-mode):not(.purchase-mode) .live-preview-panel h3 {
  margin: 0 0 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .live-preview-frame-card,
body:not(.home-mode):not(.purchase-mode) .html-preview-card {
  min-height: 520px !important;
}

body:not(.home-mode):not(.purchase-mode) .live-preview-shell iframe,
body:not(.home-mode):not(.purchase-mode) .html-preview-frame {
  min-height: 500px !important;
}

@media (max-width: 700px) {
  body:not(.home-mode):not(.purchase-mode) .app-shell {
    padding-inline: 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .hero-card {
    padding: 14px 16px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .hero-card h1 {
    font-size: 38px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    top: 0 !important;
    min-height: 38px !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 38px !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-card {
    min-height: 30px !important;
    padding: 3px 6px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-card strong {
    font-size: 15px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 74px !important;
    padding: 5px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: minmax(0, 1fr) auto auto auto !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
    min-height: 28px !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(1),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(2),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(5) {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 116px !important;
    min-height: 52px !important;
    padding: 5px 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-index {
    width: 24px !important;
    height: 24px !important;
    font-size: 12px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-label {
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 168px !important;
    grid-template-columns: 88px 1fr !important;
    padding: 5px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global h2 {
    font-size: 18px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-options {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
    min-height: 30px !important;
    padding: 4px 6px !important;
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .wizard-form,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .wizard-panels,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .wizard-step {
    scroll-margin-top: 230px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tbody,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    display: block !important;
    width: 100% !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table thead {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tr {
    padding: 8px 10px !important;
    border-radius: 12px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td:not(.ledger-title):not(.ledger-actions):not(.ledger-mobile-cell) {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
    display: block !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    margin-bottom: 6px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 4px !important;
    overflow-x: auto !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta > *,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    flex: 0 0 auto !important;
    min-height: 26px !important;
    height: 26px !important;
    padding: 0 7px !important;
    font-size: 11px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-sku { order: 1 !important; }
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-date { order: 2 !important; }
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit { order: 3 !important; }
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-status { order: 4 !important; }
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete { order: 5 !important; }

  body:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body:not(.home-mode):not(.purchase-mode) .accessory-grid button,
  body:not(.home-mode):not(.purchase-mode) .accessory-button {
    font-size: 10px !important;
    min-height: 28px !important;
    height: 28px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .live-preview-frame-card,
  body:not(.home-mode):not(.purchase-mode) .html-preview-card {
    min-height: 360px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .live-preview-shell iframe,
  body:not(.home-mode):not(.purchase-mode) .html-preview-frame {
    min-height: 340px !important;
  }
}

/* 20260719 v37: consolidated Listing UI cleanup.
   This block intentionally sits at EOF so compact layout fixes win over older scattered rules. */

/* Item-type visibility guard */
body.listing-item-accessory [data-lens-function-field],
body.listing-item-accessory [data-body-function-field],
body.listing-item-accessory [data-body-check-field],
body.listing-item-accessory [data-body-only-field],
body.listing-item-accessory [data-film-camera-field],
body:not(.listing-item-lens-only):not(.listing-item-camera-with-lens) [data-lens-function-field],
body:not(.listing-item-camera-body) [data-body-only-field],
body:not(.listing-item-digital-body) [data-body-function-field],
body:not(.listing-item-digital-body) [data-body-check-field],
body:not(.listing-item-film-camera) [data-film-camera-field] {
  display: none !important;
}

/* Ledger: fit the visible columns inside the PC viewport and keep edit/delete usable. */
.ledger-panel {
  max-width: 100% !important;
  overflow: hidden !important;
}

.ledger-head {
  grid-template-columns: minmax(170px, auto) minmax(260px, 1fr) minmax(260px, auto) !important;
  gap: 10px !important;
  padding: 12px 14px !important;
}

.ledger-toolbar {
  gap: 8px !important;
  justify-content: flex-end !important;
}

.ledger-search {
  width: min(520px, 100%) !important;
}

.ledger-scroll {
  overflow-x: hidden !important;
}

.ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

.ledger-table th,
.ledger-table td {
  padding: 6px 6px !important;
  font-size: 12px !important;
  vertical-align: middle !important;
}

.ledger-table th:nth-child(1),
.ledger-table td:nth-child(1) {
  width: 220px !important;
}

.ledger-table th:nth-child(2),
.ledger-table td:nth-child(2) {
  width: 126px !important;
}

.ledger-table th:nth-child(3),
.ledger-table td:nth-child(3) {
  width: auto !important;
  min-width: 0 !important;
}

.ledger-table th:nth-child(4),
.ledger-table td:nth-child(4) {
  width: 122px !important;
}

.ledger-table th:nth-child(5),
.ledger-table td:nth-child(5) {
  width: 112px !important;
}

.ledger-table th:nth-child(6),
.ledger-table td:nth-child(6) {
  width: 90px !important;
}

.ledger-table th:nth-child(7),
.ledger-table td:nth-child(7) {
  width: 86px !important;
}

.ledger-table th:nth-child(8),
.ledger-table td:nth-child(8) {
  width: 112px !important;
}

.ledger-purchase-fields {
  grid-template-columns: minmax(84px, 1fr) minmax(80px, 0.95fr) !important;
  gap: 4px !important;
}

.ledger-title strong {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.ledger-actions {
  display: flex !important;
  gap: 4px !important;
  align-items: center !important;
  justify-content: flex-end !important;
}

.ledger-edit,
.ledger-delete,
.ledger-mobile-edit,
.ledger-mobile-delete {
  min-width: 44px !important;
  min-height: 28px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
}

.ledger-delete,
.ledger-mobile-delete {
  color: #a43131 !important;
  border-color: #f0c6c6 !important;
  background: #fff7f5 !important;
}

/* Editor sticky stack: selected ledger row and current step stay visible while editing. */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-shell {
  overflow: visible !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 90 !important;
  min-height: 42px !important;
  padding: 6px 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky !important;
  top: 42px !important;
  z-index: 89 !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 6px 8px !important;
  background: #f4fbff !important;
}

.editor-count-chip {
  min-height: 32px !important;
  padding: 5px 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  position: sticky !important;
  top: 84px !important;
  z-index: 88 !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 6px 8px !important;
  background: #fff8dc !important;
  border-bottom: 1px solid #ead68a !important;
}

.editor-ledger-row-label {
  font-size: 11px !important;
  line-height: 1.1 !important;
}

.editor-ledger-row {
  display: grid !important;
  grid-template-columns: 132px 104px minmax(220px, 1fr) 112px 96px 86px !important;
  gap: 5px !important;
  align-items: center !important;
}

.editor-ledger-cell {
  min-height: 32px !important;
  padding: 4px 7px !important;
  font-size: 11px !important;
}

.editor-ledger-title strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 15px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: 138px !important;
  z-index: 87 !important;
  min-height: 54px !important;
  padding: 6px 8px !important;
  background: #073453 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: 192px !important;
  z-index: 86 !important;
  padding: 6px 8px !important;
}

/* Compact editor controls */
.form-section,
.step-section {
  padding: 12px !important;
}

.section-heading {
  margin-bottom: 8px !important;
}

body.listing-editor-mode .basic-fast-grid--setup {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) minmax(0, 0.95fr) !important;
  gap: 10px !important;
}

.basic-purchase-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.basic-purchase-grid label {
  font-size: 12px !important;
}

.field input,
.field select,
.field textarea,
input,
select,
textarea {
  min-height: 34px !important;
}

.choice-grid,
.grade-row,
.option-grid,
.condition-grid {
  gap: 6px !important;
}

.choice,
.grade,
.option-button,
.choice-button,
.condition-choice,
.listing-status-btn {
  min-height: 34px !important;
  padding: 6px 9px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  border-radius: 8px !important;
}

/* AI recognition: four actions in one compact row. */
.ai-inline-card,
.start-card.ai-drop-zone {
  padding: 10px !important;
  gap: 7px !important;
}

.ai-card-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: start !important;
}

.ai-card-head p,
.start-card p,
.ai-paste-hint {
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  align-items: center !important;
}

.ai-action-row .primary-btn,
.ai-action-row .secondary-btn,
.ai-action-row .file-button,
.ai-action-row .upload-box {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
}

.ai-action-row .ai-recognize-btn {
  background: #d7352a !important;
  border-color: #b92218 !important;
  color: #fff !important;
  font-weight: 900 !important;
}

.ai-preview.compact,
.ai-preview,
.ai-result {
  min-height: 36px !important;
  padding: 6px !important;
  font-size: 12px !important;
}

/* Accessories: keep labels readable without clipping. */
.accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)) !important;
  gap: 6px !important;
}

.accessory-grid button,
.accessory-button {
  min-height: 30px !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* Photo URL / folder import area */
.photo-url-card,
.photo-url-row {
  padding: 8px !important;
}

.photo-url-head {
  display: flex !important;
  gap: 8px !important;
  align-items: flex-start !important;
}

.photo-url-actions {
  display: flex !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

.photo-folder-btn,
.photo-file-btn {
  min-height: 30px !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
}

/* Live preview: copy buttons only, side-by-side, preview gets the room. */
.sales-reference-panel,
#salesReferencePanel {
  display: none !important;
}

.live-preview-panel {
  padding: 10px !important;
}

.live-copy-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 4px 0 8px !important;
}

.live-copy-actions .compact-copy,
.live-copy-actions button {
  width: 100% !important;
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
}

.live-hidden-source,
.copy-output-textarea,
.html-output,
.live-html-output {
  display: none !important;
}

.live-preview-frame-card {
  min-height: 620px !important;
  padding: 8px !important;
}

.live-preview-frame,
#liveHtmlPreviewFrame {
  min-height: 560px !important;
}

@media (max-width: 720px) {
  body {
    font-size: 14px !important;
  }

  .hero {
    min-height: 0 !important;
    padding: 14px !important;
  }

  .hero h1 {
    font-size: 34px !important;
  }

  .hero p {
    display: none !important;
  }

  .hero-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .hero-actions .nav-btn {
    min-height: 38px !important;
    padding: 6px !important;
    font-size: 12px !important;
  }

  .status-grid {
    grid-template-columns: repeat(5, minmax(112px, 1fr)) !important;
    gap: 6px !important;
    overflow-x: auto !important;
  }

  .status-card-action {
    min-height: 56px !important;
    padding: 8px !important;
  }

  .ledger-panel {
    margin: 8px 0 !important;
    border-radius: 14px !important;
  }

  .ledger-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 12px !important;
  }

  .ledger-toolbar {
    justify-content: stretch !important;
  }

  .ledger-toolbar .primary-btn,
  .ledger-toolbar .secondary-btn,
  .ledger-search {
    width: 100% !important;
  }

  .ledger-status-filters {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    overflow: visible !important;
    padding: 0 12px 8px !important;
  }

  .filter-chip {
    min-height: 30px !important;
    padding: 4px 6px !important;
    font-size: 11px !important;
  }

  .ledger-scroll {
    max-height: none !important;
    overflow: visible !important;
  }

  .ledger-table,
  .ledger-table tbody,
  .ledger-table tr,
  .ledger-table td {
    display: block !important;
    width: 100% !important;
  }

  .ledger-table thead {
    display: none !important;
  }

  .ledger-table tr {
    margin: 8px !important;
    padding: 8px !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    background: #fff !important;
  }

  .ledger-table tr td:not(.ledger-title) {
    display: none !important;
  }

  .ledger-title strong {
    margin-bottom: 6px !important;
    font-size: 15px !important;
    line-height: 1.22 !important;
    white-space: normal !important;
  }

  .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(70px, 1fr) minmax(62px, 0.85fr) 46px 60px 46px !important;
    gap: 4px !important;
    align-items: center !important;
  }

  .ledger-mobile-chip,
  .ledger-mobile-status,
  .ledger-mobile-edit,
  .ledger-mobile-delete {
    min-height: 28px !important;
    padding: 4px 5px !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    text-align: center !important;
    border-radius: 999px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
    top: 0 !important;
    min-height: 36px !important;
    padding: 5px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 36px !important;
    grid-template-columns: repeat(5, minmax(82px, 1fr)) !important;
    overflow-x: auto !important;
    padding: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 74px !important;
    grid-template-columns: 1fr !important;
    gap: 4px !important;
    padding: 5px 6px !important;
  }

  .editor-ledger-row {
    grid-template-columns: minmax(0, 1fr) 64px 58px !important;
  }

  .editor-ledger-row .editor-ledger-cell:nth-child(1),
  .editor-ledger-row .editor-ledger-cell:nth-child(2),
  .editor-ledger-row .editor-ledger-cell:nth-child(5) {
    display: none !important;
  }

  .editor-ledger-title strong {
    font-size: 14px !important;
    white-space: nowrap !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 122px !important;
    min-height: 44px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 166px !important;
    padding: 6px !important;
  }

  .listing-status-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  .listing-status-btn {
    min-height: 32px !important;
    padding: 4px !important;
    font-size: 11px !important;
  }

  .form-section {
    padding: 10px 8px !important;
  }

  .basic-fast-grid--setup {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .basic-purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .basic-purchase-grid label {
    font-size: 11px !important;
  }

  .choice-grid,
  .grade-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .choice,
  .grade {
    min-height: 34px !important;
    padding: 5px 7px !important;
    font-size: 11px !important;
  }

  .ai-card-head {
    grid-template-columns: 1fr !important;
  }

  .ai-cost-links {
    display: none !important;
  }

  .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .ai-action-row .primary-btn,
  .ai-action-row .secondary-btn,
  .ai-action-row .file-button,
  .ai-action-row .upload-box {
    padding: 0 4px !important;
    font-size: 11px !important;
  }

  .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  .accessory-grid button,
  .accessory-button {
    min-height: 28px !important;
    padding: 3px !important;
    font-size: 9.6px !important;
  }

  .live-copy-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .live-preview-frame-card {
    min-height: 420px !important;
  }

  .live-preview-frame,
  #liveHtmlPreviewFrame {
    min-height: 360px !important;
  }
}

/* v35 compact ledger/editor guardrails. Keep data untouched; only layout/visibility. */
:root {
  --editor-toolbar-h: 46px;
  --editor-count-h: 44px;
  --editor-selected-h: 58px;
  --editor-stepper-h: 58px;
  --editor-status-h: 58px;
}

body:not(.home-mode):not(.purchase-mode) .ledger-panel {
  max-width: min(100%, 1760px) !important;
  margin-inline: auto !important;
  overflow: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head {
  display: grid !important;
  grid-template-columns: minmax(170px, 280px) minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 8px 10px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head h3,
body:not(.home-mode):not(.purchase-mode) .ledger-head p {
  margin-block: 0 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 360px) auto auto auto !important;
  gap: 6px !important;
  align-items: center !important;
  justify-items: end !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head-actions p {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  justify-self: start !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-search-input,
body:not(.home-mode):not(.purchase-mode) .ledger-search {
  min-width: 220px !important;
  max-width: 360px !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 4px 6px !important;
  font-size: 12px !important;
  vertical-align: middle !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 284px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 120px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 128px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 112px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 88px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 78px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 96px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(90px, 1fr) minmax(86px, 1fr) !important;
  gap: 4px !important;
  max-width: 272px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit-input,
body:not(.home-mode):not(.purchase-mode) .ledger-order-input {
  min-height: 28px !important;
  height: 28px !important;
  padding: 3px 7px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  gap: 4px !important;
  justify-content: flex-end !important;
  align-items: center !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 26px !important;
  padding: 3px 7px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  color: #b42318 !important;
  border: 1px solid #f3b4ac !important;
  background: #fff7f5 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 90 !important;
  min-height: var(--editor-toolbar-h) !important;
  padding: 5px 8px !important;
  background: #eaf7ff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky !important;
  top: var(--editor-toolbar-h) !important;
  z-index: 89 !important;
  min-height: var(--editor-count-h) !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 5px 8px !important;
  background: #f6fbff !important;
  border-bottom: 1px solid #cfe3f2 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 30px !important;
  padding: 4px 7px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip span {
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 18px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  position: sticky !important;
  top: calc(var(--editor-toolbar-h) + var(--editor-count-h)) !important;
  z-index: 88 !important;
  min-height: var(--editor-selected-h) !important;
  padding: 5px 8px !important;
  background: #fff8d9 !important;
  border: 1px solid #eadb9a !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: calc(var(--editor-toolbar-h) + var(--editor-count-h) + var(--editor-selected-h)) !important;
  z-index: 87 !important;
  min-height: var(--editor-stepper-h) !important;
  background: #073856 !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: calc(var(--editor-toolbar-h) + var(--editor-count-h) + var(--editor-selected-h) + var(--editor-stepper-h)) !important;
  z-index: 86 !important;
  min-height: var(--editor-status-h) !important;
  background: #f6fbff !important;
  border-bottom: 1px solid #cfe3f2 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  margin: 0 0 3px !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  color: #506b82 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  display: grid !important;
  grid-template-columns: minmax(150px, 220px) minmax(90px, 115px) minmax(230px, 1fr) minmax(96px, 120px) minmax(92px, 112px) minmax(78px, 92px) minmax(76px, 88px) !important;
  gap: 5px !important;
  align-items: stretch !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-width: 0 !important;
  min-height: 32px !important;
  padding: 4px 7px !important;
  border: 1px solid #d7e8f5 !important;
  border-radius: 8px !important;
  background: #fff !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span {
  display: block !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
  color: #667f95 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell small {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-title-cell strong {
  font-size: 16px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-body {
  padding-block: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  border-radius: 10px !important;
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .pill,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-button {
  min-height: 32px !important;
  padding: 4px 7px !important;
  font-size: 11.5px !important;
  line-height: 1.12 !important;
  border-radius: 7px !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .pill-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid {
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-button {
  min-height: 32px !important;
  font-size: 11px !important;
  padding: 3px 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) !important;
  gap: 6px !important;
  padding: 9px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone p {
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview-area {
  grid-column: 1 / -1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .file-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  min-height: 30px !important;
  height: 30px !important;
  padding: 3px 5px !important;
  font-size: 11px !important;
  border-radius: 7px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtnAssist {
  background: #d92d20 !important;
  border-color: #d92d20 !important;
  color: #fff !important;
  font-weight: 900 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview-area {
  min-height: 38px !important;
  padding: 6px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-head {
  display: grid !important;
  grid-template-columns: minmax(180px, 1fr) auto !important;
  gap: 8px !important;
  align-items: start !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(56px, auto)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .secondary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .primary-btn {
  min-height: 30px !important;
  padding: 3px 7px !important;
  font-size: 11px !important;
  border-radius: 7px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-row {
  padding: 5px !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-row small {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  align-items: center !important;
  gap: 6px !important;
  margin-bottom: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head h3 {
  font-size: 18px !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: 0 0 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions button {
  min-height: 32px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveConditionDescriptionOutput,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlOutput,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-textarea,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-hidden-source {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  min-height: 620px !important;
  padding: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
  height: calc(100vh - 220px) !important;
  min-height: 560px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sales-reference-panel {
  display: none !important;
}

body.listing-item-lens-only .service-seal-fieldset,
body.listing-item-lens-only [data-film-camera-field],
body.listing-item-lens-only [data-body-only-field],
body.listing-item-lens-only [data-body-function-field],
body.listing-item-lens-only [data-body-check-field],
body.listing-item-accessory .service-seal-fieldset,
body.listing-item-accessory [data-film-camera-field],
body.listing-item-accessory [data-body-only-field],
body.listing-item-accessory [data-body-function-field],
body.listing-item-accessory [data-body-check-field],
body:not(.listing-item-camera-body) [data-body-only-field],
body:not(.listing-item-digital-body) [data-body-function-field],
body:not(.listing-item-digital-body) [data-body-check-field],
body:not(.listing-item-film-camera) [data-film-camera-field],
body:not(.listing-item-film-camera) .service-seal-fieldset {
  display: none !important;
}

body.listing-item-lens-only [data-lens-function-field],
body.listing-item-camera-with-lens [data-lens-function-field],
body.listing-item-camera-body [data-body-only-field],
body.listing-item-digital-body [data-body-function-field],
body.listing-item-digital-body [data-body-check-field],
body.listing-item-film-camera [data-film-camera-field] {
  display: block !important;
}

@media (max-width: 760px) {
  :root {
    --editor-toolbar-h: 40px;
    --editor-count-h: 36px;
    --editor-selected-h: 78px;
    --editor-stepper-h: 46px;
    --editor-status-h: 92px;
  }

  body:not(.home-mode):not(.purchase-mode) .hero {
    padding: 14px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .hero h1 {
    font-size: 38px !important;
    line-height: 1 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .summary-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .summary-card {
    min-height: 58px !important;
    padding: 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .summary-card strong {
    font-size: 22px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head {
    display: block !important;
    padding: 10px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    justify-items: stretch !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions p {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-status-filters {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
    margin-top: 6px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-status-filters button {
    min-height: 28px !important;
    padding: 3px 4px !important;
    font-size: 10.5px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table thead {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tbody,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    display: block !important;
    width: 100% !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tr {
    margin: 7px 8px !important;
    padding: 7px !important;
    border: 1px solid #cfe3f2 !important;
    border-radius: 10px !important;
    background: #fff !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    border: 0 !important;
    padding: 0 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td:not(.ledger-title) {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
    display: block !important;
    margin-bottom: 5px !important;
    font-size: 13.5px !important;
    line-height: 1.25 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(72px, 1fr) 66px 40px 58px 38px !important;
    gap: 3px !important;
    align-items: center !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta > * {
    min-width: 0 !important;
    min-height: 24px !important;
    height: 24px !important;
    padding: 2px 4px !important;
    font-size: 10.5px !important;
    line-height: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    min-height: var(--editor-toolbar-h) !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    grid-template-columns: repeat(5, minmax(68px, 1fr)) !important;
    gap: 4px !important;
    padding: 4px 6px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
    min-height: 28px !important;
    padding: 3px 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    padding: 5px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: minmax(0, 1fr) 66px 58px 52px !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(1),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(2),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(5) {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-title-cell {
    grid-column: 1 / -1 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-title-cell strong {
    font-size: 14px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    min-height: var(--editor-stepper-h) !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step {
    min-width: 58px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
    min-height: 30px !important;
    padding: 3px 4px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .two-column,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-split {
    grid-template-columns: 1fr !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone {
    grid-template-columns: 28px minmax(0, 1fr) !important;
    padding: 7px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .file-button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    min-height: 28px !important;
    font-size: 10px !important;
    padding: 2px 3px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-button {
    min-height: 30px !important;
    font-size: 10px !important;
    padding: 2px 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-head {
    grid-template-columns: 1fr !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
    min-height: 420px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
    height: 420px !important;
    min-height: 420px !important;
  }
}

/* eBay File Exchange: official category-template preview and export. */
.file-exchange-dialog {
  width: min(1380px, 96vw);
  max-width: none;
  height: min(980px, 97vh);
  padding: 0;
  border: 0;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(4, 31, 49, .36);
}

.file-exchange-dialog::backdrop {
  background: rgba(8, 28, 43, .72);
  backdrop-filter: blur(3px);
}

.file-exchange-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
  background: #f4f9fc;
  color: #15364c;
}

.file-exchange-head,
.file-exchange-footer,
.file-exchange-batch-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border-bottom: 1px solid #c9dfea;
  background: #fff;
}

/* Recognition candidates: keep the product title readable and subordinate source metadata. */
#recognitionCandidateDialog .recognition-candidate-group {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 10px;
  border: 1px solid #cbdfe9;
  border-radius: 12px;
  background: #f8fcfe;
}

#recognitionCandidateDialog .recognition-candidate-group > h3,
#recognitionCandidateDialog .recognition-candidate-group > p {
  margin: 0;
}

#recognitionCandidateDialog .recognition-candidate-group > p {
  color: #526d7f;
  font-size: 12px;
}

#recognitionCandidateDialog .recognition-candidate-group-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

#recognitionCandidateDialog details.recognition-candidate-group > summary {
  cursor: pointer;
  color: #5b5963;
  font-weight: 850;
}

#recognitionCandidateDialog details.recognition-candidate-group[open] > summary {
  margin-bottom: 7px;
}

#recognitionCandidateDialog .recognition-candidate-card {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

#recognitionCandidateDialog .recognition-candidate-main,
#recognitionCandidateDialog .recognition-candidate-summary {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

#recognitionCandidateDialog .recognition-candidate-title {
  display: block;
  margin: 0;
  overflow: visible !important;
  color: #102f43;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.45 !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

#recognitionCandidateDialog .recognition-candidate-source {
  display: block;
  margin: 4px 0 0 !important;
  color: #667d8c !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}

#recognitionCandidateDialog .recognition-candidate-unavailable-reason {
  color: #9b351f !important;
  font-weight: 800;
}

.file-exchange-head {
  justify-content: space-between;
  padding-block: 4px;
}

/* 2026-08-08 v109: keep product choices visible and move diagnostics behind a compact disclosure. */
#recognitionCandidateDialog .recognition-candidate-shell {
  grid-template-rows: auto auto minmax(160px, 1fr) auto auto !important;
}

#recognitionCandidateDialog .recognition-candidate-note {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#recognitionCandidateDialog .recognition-candidate-audit-slot {
  min-width: 0;
  padding: 8px 16px 10px;
  border-top: 1px solid #d4e5ef;
  background: #f7fbfe;
}

#recognitionCandidateDialog .recognition-candidate-audit-slot:empty {
  display: none;
}

#recognitionCandidateDialog .recognition-api-audit-details {
  display: block;
  min-width: 0;
  border: 1px solid #9dc9df;
  border-radius: 10px;
  background: #eef9ff;
  color: #163e57;
}

#recognitionCandidateDialog .recognition-api-audit-details.is-success {
  border-color: #58b88a;
  background: #effbf5;
}

#recognitionCandidateDialog .recognition-api-audit-details.is-error {
  border-color: #d69b58;
  background: #fff8eb;
}

#recognitionCandidateDialog .recognition-api-audit-details > summary {
  overflow: hidden;
  padding: 8px 11px;
  color: #28526a;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

#recognitionCandidateDialog .recognition-api-audit-details > .recognition-api-audit {
  max-height: min(230px, 28dvh);
  margin: 0 8px 8px;
  overflow: auto;
  padding: 10px 12px;
  font-size: 12px;
}

#recognitionCandidateDialog .recognition-pair-product-title {
  display: block;
  color: #102f43;
  font-size: 15px;
  line-height: 1.35;
}

#recognitionCandidateDialog .recognition-pair-product-brand {
  color: #385b70;
  font-weight: 800;
}

#recognitionCandidateDialog .recognition-candidate-unavailable-reason {
  color: #a25d00;
  font-weight: 900;
}

@media (max-width: 620px) {
  #recognitionCandidateDialog .recognition-candidate-audit-slot {
    padding: 7px 10px 9px;
  }

  #recognitionCandidateDialog .recognition-api-audit-details > summary {
    padding: 7px 9px;
  }
}

.file-exchange-head h2 {
  font-size: 19px;
  line-height: 1.1;
}

.file-exchange-head span,
.file-exchange-head p {
  font-size: 11px;
  line-height: 1.1;
}

.file-exchange-head h2,
.file-exchange-head p,
.file-exchange-guide-details p {
  margin: 1px 0;
}

.file-exchange-batch-bar {
  justify-content: space-between;
}

.file-exchange-controls {
  max-height: 29vh;
  overflow: auto;
  border-bottom: 1px solid #c9dfea;
  background: #f7fbfd;
}

.file-exchange-utility-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 4px 8px;
  border-bottom: 1px solid #d8e7ee;
}

.file-exchange-utility-row > details {
  min-width: 0;
}

.file-exchange-utility-row > details[open] {
  flex: 1 0 100%;
  order: 2;
}

.file-exchange-utility-row summary {
  cursor: pointer;
  font-weight: 800;
}

.file-exchange-guide-details,
.file-exchange-settings,
.file-exchange-result-tools,
.file-exchange-category-audit {
  padding: 5px 8px;
  border: 1px solid #c9dfea;
  border-radius: 8px;
  background: #fff;
}

.file-exchange-guide-details p {
  margin: 8px 0 2px;
  line-height: 1.45;
}

.file-exchange-revise-switch {
  margin-left: auto;
  white-space: nowrap;
}

.file-exchange-settings {
  background: #eaf6fc;
}

.file-exchange-settings summary {
  cursor: pointer;
  font-weight: 800;
}

.file-exchange-settings > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(145px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}

.file-exchange-settings label,
.file-exchange-batch-bar label,
.file-exchange-offer-controls label {
  display: grid;
  gap: 4px;
  font-weight: 700;
}

.file-exchange-settings input,
.file-exchange-settings select,
.file-exchange-settings textarea,
.file-exchange-batch-bar input,
.file-exchange-offer-controls input[type="number"] {
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid #b7cfdd;
  border-radius: 9px;
  background: #fff;
}

.file-exchange-settings textarea {
  resize: vertical;
  min-height: 96px;
}

.file-exchange-settings-wide {
  grid-column: span 2;
}

.file-exchange-result-tools {
  background: #f7fbfd;
}

.file-exchange-result-tools-body {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
}

.file-exchange-result-tools-body > div,
.file-exchange-result-tools-body output {
  display: grid;
  gap: 3px;
}

.file-exchange-result-tools-body small,
.file-exchange-result-tools-body output {
  grid-column: 1 / -1;
  color: #526e7f;
}

.file-exchange-result-tools-body output:not(:empty) {
  padding: 9px 11px;
  border: 1px solid #b9d5e3;
  border-radius: 9px;
  background: #fff;
  color: #15364c;
}

.required-marker {
  color: #c32727;
  font-weight: 900;
}

.file-exchange-settings small {
  color: #587487;
  font-weight: 600;
  line-height: 1.35;
}

.category-id-warning {
  display: block;
  margin-top: 5px;
  padding: 5px 7px;
  border: 1px solid #e6a0a0;
  border-radius: 7px;
  background: #fff0f0;
  color: #9b1c1c;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.category-id-warning[hidden] {
  display: none;
}

.category-id-warning.is-info {
  border-color: #94bfd6;
  background: #edf8fd;
  color: #24566f;
}

.file-exchange-category-audit {
  background: #f7fbfd;
  color: #173b50;
}

.file-exchange-category-audit.has-items {
  border-color: #e0ad63;
  background: #fff7e8;
}

.file-exchange-category-audit[hidden] {
  display: none;
}

.file-exchange-category-audit summary {
  cursor: pointer;
  font-weight: 900;
}

.file-exchange-category-audit > p,
.file-exchange-category-audit output {
  margin: 8px 0;
  color: #526e7f;
}

.file-exchange-category-audit-list {
  display: grid;
  gap: 7px;
  margin: 10px 0;
}

.file-exchange-category-audit-row {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) minmax(210px, 280px);
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid #d6c69c;
  border-radius: 9px;
  background: #fff;
}

.file-exchange-category-audit-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.file-exchange-category-audit-row strong,
.file-exchange-category-audit-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-exchange-category-audit-row select {
  min-height: 36px;
  border: 1px solid #b7cfdd;
  border-radius: 8px;
  background: #fff;
}

.file-exchange-blocking-message {
  padding: 12px 20px;
  border-bottom: 1px solid #e3a8a8;
  background: #fff0f0;
  color: #8d1818;
}

.file-exchange-blocking-message[hidden] {
  display: none;
}

.file-exchange-blocking-message p {
  margin: 4px 0;
}

.file-exchange-blocking-message ul {
  max-height: 150px;
  margin: 6px 0 0;
  overflow: auto;
}

.file-exchange-revise-fields {
  margin: 0;
  padding: 10px 20px 12px;
  border: 0;
  border-bottom: 1px solid #c9dfea;
  background: #fff8e7;
}

.file-exchange-revise-fields[hidden] {
  display: none;
}

.file-exchange-revise-fields legend {
  padding: 0;
  font-weight: 900;
}

.file-exchange-revise-fields p {
  margin: 2px 0 8px;
  color: #5d6f79;
}

.file-exchange-revise-fields > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.file-exchange-revise-fields label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 750;
}

.file-exchange-batch-bar input {
  width: 72px;
}

.file-exchange-batch-bar {
  flex-wrap: wrap;
  padding: 4px 8px;
  gap: 6px;
  background: #fff;
}

.file-exchange-batch-bar label {
  display: inline-flex;
  grid-auto-flow: column;
  align-items: center;
}

.file-exchange-list-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.file-exchange-list-actions .secondary-btn {
  min-height: 27px;
  padding: 3px 7px;
  font-size: 11px;
}

.file-exchange-list-actions label {
  gap: 4px;
  font-size: 12px;
  white-space: nowrap;
}

.file-exchange-list-actions select {
  min-height: 27px;
  border: 1px solid #b7cfdd;
  border-radius: 7px;
  background: #fff;
}

.file-exchange-preview-list {
  display: block;
  min-height: 0;
  padding: 5px 8px;
  overflow: auto;
}

.file-exchange-preview-group {
  margin: 0 0 4px;
  border: 1px solid #b9d2de;
  border-radius: 14px;
  background: #f8fcfe;
}

.file-exchange-preview-group > summary {
  padding: 4px 9px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
}

.file-exchange-preview-group.is-error > summary { color: #a62020; }
.file-exchange-preview-group.is-warning > summary { color: #765000; }
.file-exchange-preview-group.is-ok > summary { color: #17653e; }

.file-exchange-preview-group-items {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  padding: 0 5px 5px;
}

.file-exchange-card {
  min-width: 0;
  border: 1px solid #3ca36d;
  border-radius: 8px;
  background: #fff;
}

.file-exchange-card.is-warning {
  border-color: #e9ad23;
  background: #fffdf5;
}

.file-exchange-card.is-error {
  border-color: #d93535;
  background: #fff8f8;
}

.file-exchange-card.is-error-confirmed {
  border-color: #2f9c6a;
  background: #f4fcf7;
  box-shadow: inset 3px 0 #2f9c6a;
}

.file-exchange-card.is-outside-batch {
  opacity: .62;
}

.file-exchange-card-summary {
  display: grid;
  grid-template-columns: auto 54px 92px minmax(190px, 1.2fr) minmax(250px, 1.8fr) auto;
  align-items: center;
  gap: 4px 7px;
  min-height: 31px;
  padding: 1px 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  list-style: none;
}

.file-exchange-card-summary::-webkit-details-marker {
  display: none;
}

.file-exchange-exclude {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  white-space: nowrap;
}

.file-exchange-exclude input {
  width: 14px !important;
  height: 14px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.file-exchange-card-title,
.file-exchange-card-sku,
.file-exchange-card-summary .file-exchange-card-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-exchange-card.is-error .file-exchange-status-mark { color: #a62020; }
.file-exchange-card.is-error-confirmed .file-exchange-status-mark { color: #17653e; }
.file-exchange-card.is-warning .file-exchange-status-mark { color: #765000; }
.file-exchange-card.is-ok .file-exchange-status-mark { color: #17653e; }

.file-exchange-card-summary .file-exchange-card-meta {
  margin: 0;
  font-size: 11px;
}

.file-exchange-batch-position {
  color: #587487;
  font-size: 12px;
  white-space: nowrap;
}

.file-exchange-card-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 7px;
}

.file-exchange-card-expanded {
  padding: 8px 11px 11px;
  border-top: 1px solid #d5e4eb;
}

.file-exchange-card-images {
  position: relative;
  width: 74px;
  height: 58px;
  margin: 0;
  overflow: hidden;
  border-radius: 7px;
  background: #e9f0f4;
}

.file-exchange-card-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-exchange-card-images figcaption {
  position: absolute;
  right: 3px;
  bottom: 3px;
  padding: 1px 4px;
  border-radius: 8px;
  background: rgb(5 35 53 / 78%);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.file-exchange-card-images > span {
  display: grid;
  height: 100%;
  place-items: center;
  color: #587487;
  font-size: 11px;
  text-align: center;
}

.file-exchange-image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, 72px);
  gap: 7px;
  align-items: start;
  margin: 8px 0 10px;
  min-height: 34px;
}

.file-exchange-image-deferred,
.file-exchange-image-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 10px;
  border-radius: 7px;
  background: #edf3f6;
  color: #587487;
  font-size: 12px;
  font-weight: 800;
}

.file-exchange-image-empty {
  color: #a62020;
  background: #fff0f0;
}

.file-exchange-image-thumbnail {
  position: relative;
  display: block;
  width: 72px;
  height: 72px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #9cb8c7;
  border-radius: 7px;
  background: #e8f0f4;
  cursor: zoom-in;
}

.file-exchange-image-thumbnail:hover,
.file-exchange-image-thumbnail:focus-visible {
  border-color: #078ac5;
  outline: 2px solid rgb(7 138 197 / 25%);
  outline-offset: 1px;
}

.file-exchange-image-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-exchange-image-number {
  position: absolute;
  top: 3px;
  left: 3px;
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  place-items: center;
  border-radius: 10px;
  background: rgb(5 35 53 / 86%);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.file-exchange-image-load-error {
  position: absolute;
  inset: 0;
  display: grid;
  padding: 18px 4px 4px;
  place-items: center;
  color: #a62020;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.file-exchange-image-load-error[hidden] {
  display: none;
}

.file-exchange-image-thumbnail.has-load-error {
  border-color: #d93535;
  background: #fff0f0;
}

.file-exchange-image-preview-dialog {
  width: min(92vw, 1100px);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #102531;
  box-shadow: 0 18px 54px rgb(0 0 0 / 38%);
}

.file-exchange-image-preview-dialog::backdrop {
  background: rgb(3 20 30 / 72%);
}

.file-exchange-image-preview-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: 92vh;
  padding: 42px 12px 12px;
}

.file-exchange-image-preview-title {
  margin: 0 44px 8px 0;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-exchange-image-preview-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 50%;
  background: rgb(0 0 0 / 36%);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.file-exchange-image-preview-stage {
  display: grid;
  min-height: 180px;
  max-height: calc(92vh - 76px);
  place-items: center;
  overflow: auto;
}

.file-exchange-image-preview-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 86px);
  object-fit: contain;
}

.file-exchange-image-preview-error {
  color: #ffb3b3;
  font-size: 18px;
  font-weight: 900;
}

.file-exchange-card h3 {
  margin: 0 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-exchange-card-meta {
  margin: 0;
  overflow: hidden;
  color: #587487;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-exchange-card-expanded details > summary {
  cursor: pointer;
  color: #075e91;
  font-size: 12px;
  font-weight: 800;
}

.file-exchange-title-count {
  margin: 0 0 8px;
  color: #587487;
}

.file-exchange-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.file-exchange-card dl div {
  min-width: 0;
  padding: 8px;
  border-radius: 9px;
  background: #edf6fa;
}

.file-exchange-card dt {
  color: #5d7888;
  font-size: 12px;
  font-weight: 800;
}

.file-exchange-card dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.file-exchange-footer {
  justify-content: flex-end;
  padding-block: 4px;
  border-top: 1px solid #c9dfea;
  border-bottom: 0;
}

.file-exchange-offer-controls {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
  border: 1px solid #c6dce7;
  border-radius: 10px;
}

.file-exchange-errors,
.file-exchange-warnings {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
}

.file-exchange-errors {
  background: #fde3e3;
  color: #8d1818;
}

.file-exchange-warnings {
  background: #fff1c9;
  color: #765000;
}

.file-exchange-error-approval {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #2f9c6a;
  border-radius: 8px;
  background: #effaf4;
  color: #145f3d;
  font-weight: 900;
}

.file-exchange-error-approval input {
  width: 16px !important;
  height: 16px !important;
  min-height: 0 !important;
  margin: 0 !important;
}

.file-exchange-sales-reference {
  margin-top: 9px;
  padding: 9px 10px;
  border: 1px solid #b8cfdb;
  border-radius: 9px;
  background: #f3f8fa;
  color: #294b5d;
  font-size: 12px;
}

.file-exchange-sales-reference > strong {
  display: block;
  margin-bottom: 5px;
}

.file-exchange-sales-reference ol {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 22px;
}

.file-exchange-sales-reference li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: baseline;
}

.file-exchange-sales-reference li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-exchange-sales-reference time {
  color: #587487;
  white-space: nowrap;
}

.file-exchange-description-preview {
  width: 100%;
  height: 360px;
  border: 1px solid #c6dce7;
  border-radius: 8px;
  background: #fff;
}

.file-exchange-footer {
  justify-content: flex-end;
  border-top: 1px solid #c9dfea;
  border-bottom: 0;
}

.file-exchange-mark-listed-panel {
  display: flex;
  flex: 1 1 420px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-right: auto;
}

.file-exchange-mark-listed-action {
  display: grid;
  flex: 0 0 auto;
  gap: 2px;
}

.file-exchange-mark-listed-action small {
  color: #587487;
  font-size: 10px;
  white-space: nowrap;
}

#markFileExchangeListedBtn:not(:disabled) {
  border-color: #14795d;
  background: #14795d;
  color: #fff;
}

.file-exchange-mark-listed-status {
  display: flex;
  flex: 1 1 260px;
  gap: 8px;
  align-items: center;
  min-width: 0;
  max-height: 78px;
  overflow: auto;
  padding: 5px 8px;
  border: 1px solid #bad2df;
  border-radius: 8px;
  background: #f4f9fc;
  color: #294b5d;
  font-size: 11px;
}

.file-exchange-mark-listed-status[hidden] {
  display: none;
}

.file-exchange-mark-listed-status > strong,
.file-exchange-mark-listed-status > span,
.file-exchange-mark-listed-status > small {
  flex: 0 0 auto;
  white-space: nowrap;
}

.file-exchange-mark-listed-status > div {
  flex: 0 0 auto;
}

.file-exchange-mark-listed-status ul {
  margin: 2px 0 0;
  padding-left: 18px;
}

.file-exchange-add-btn {
  background: #d92929;
  border-color: #d92929;
  color: #fff;
}

.file-exchange-add-btn:disabled {
  opacity: .4;
}

@media (max-width: 820px) {
  .file-exchange-settings > div {
    grid-template-columns: 1fr;
  }

  .file-exchange-settings-wide {
    grid-column: auto;
  }

  .file-exchange-result-tools-body {
    grid-template-columns: 1fr;
  }

  .file-exchange-result-tools-body small,
  .file-exchange-result-tools-body output {
    grid-column: auto;
  }

  .file-exchange-category-audit-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .file-exchange-category-audit-row select {
    grid-column: 1 / -1;
  }

  .file-exchange-utility-row,
  .file-exchange-batch-bar,
  .file-exchange-footer {
    flex-wrap: wrap;
  }

  .file-exchange-mark-listed-panel {
    flex-basis: 100%;
    flex-wrap: wrap;
  }

  .file-exchange-mark-listed-status {
    flex-basis: 100%;
  }

  .file-exchange-card dl,
  .file-exchange-offer-controls {
    grid-template-columns: 1fr;
  }

  .file-exchange-status-row {
    grid-template-columns: 1fr auto;
  }

  .file-exchange-status-summary {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* v34: ledger/editor/mobile polish. Keep this block last so it wins over older emergency overrides. */
body:not(.listing-item-film-camera) [data-film-camera-field],
body:not(.listing-item-film-camera) .service-seal-fieldset,
body.listing-item-lens-only [data-film-camera-field],
body.listing-item-lens-only .service-seal-fieldset,
body.listing-item-lens-only [data-body-only-field],
body.listing-item-lens-only [data-body-check-field],
body.listing-item-lens-only [data-body-function-field],
body.listing-item-lens-only #shutterCountFieldset,
body.listing-item-accessory [data-film-camera-field],
body.listing-item-accessory .service-seal-fieldset,
body.listing-item-accessory [data-body-only-field],
body.listing-item-accessory [data-body-check-field],
body.listing-item-accessory [data-body-function-field],
body.listing-item-accessory #shutterCountFieldset {
  display: none !important;
}

body:not(.listing-item-camera-body) [data-body-only-field],
body:not(.listing-item-camera-body) [data-body-check-field],
body:not(.listing-item-camera-body) [data-body-function-field],
body:not(.listing-item-camera-body) #shutterCountFieldset {
  display: none !important;
}

body:not(.listing-item-lens-only):not(.listing-item-camera-with-lens) [data-lens-function-field] {
  display: none !important;
}

#salesReferencePanel,
.sales-reference-panel,
[data-panel="sales-reference"] {
  display: none !important;
}

.ledger-panel {
  max-width: calc(100vw - 32px) !important;
  overflow: hidden !important;
}

.ledger-head {
  grid-template-columns: minmax(128px, 0.42fr) minmax(0, 1.58fr) !important;
  gap: 6px !important;
  padding: 8px 10px !important;
}

.ledger-head p {
  max-width: 420px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.ledger-head-actions {
  display: grid !important;
  grid-template-columns: minmax(190px, 1fr) auto auto !important;
  align-items: center !important;
  justify-content: end !important;
  gap: 6px !important;
}

.ledger-head-actions .ledger-search {
  min-width: 0 !important;
  width: 100% !important;
}

.ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

.ledger-table th,
.ledger-table td {
  padding: 4px 5px !important;
  font-size: 12px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.ledger-table th:nth-child(1),
.ledger-table td:nth-child(1) {
  width: 136px !important;
}

.ledger-table th:nth-child(2),
.ledger-table td:nth-child(2) {
  width: 82px !important;
}

.ledger-table th:nth-child(3),
.ledger-table td:nth-child(3) {
  width: auto !important;
}

.ledger-table th:nth-child(4),
.ledger-table td:nth-child(4) {
  width: 98px !important;
}

.ledger-table th:nth-child(5),
.ledger-table td:nth-child(5) {
  width: 110px !important;
}

.ledger-table th:nth-child(6),
.ledger-table td:nth-child(6) {
  width: 66px !important;
}

.ledger-table th:nth-child(7),
.ledger-table td:nth-child(7) {
  width: 66px !important;
}

.ledger-table th:nth-child(8),
.ledger-table td:nth-child(8) {
  width: 92px !important;
}

.ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: 62px 68px !important;
  gap: 3px !important;
}

.ledger-purchase-fields input,
.ledger-order-input,
.ledger-sku-input,
.ledger-cost-input {
  width: 100% !important;
  min-width: 0 !important;
  height: 26px !important;
  padding: 2px 6px !important;
  font-size: 11px !important;
}

.ledger-title strong {
  display: block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.ledger-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 3px !important;
}

.ledger-edit,
.ledger-delete,
.ledger-mobile-edit,
.ledger-mobile-delete {
  min-height: 26px !important;
  height: 26px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.ledger-delete,
.ledger-mobile-delete {
  border-color: #f2b8b5 !important;
  color: #a2271f !important;
  background: #fff8f7 !important;
}

.status-grid,
.editor-count-strip {
  gap: 6px !important;
}

.status-card-action,
.editor-count-card {
  min-height: 44px !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
}

.status-card-action strong,
.editor-count-card strong {
  font-size: 22px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  box-shadow: 0 6px 16px rgba(7, 56, 88, 0.08) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
  top: 0 !important;
  z-index: 150 !important;
  min-height: 40px !important;
  padding: 5px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: 40px !important;
  z-index: 149 !important;
  padding: 6px 8px !important;
  background: #f5fbff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  top: 96px !important;
  z-index: 148 !important;
  padding: 5px 8px !important;
  background: #fff7d8 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  top: 152px !important;
  z-index: 147 !important;
  min-height: 54px !important;
  padding: 6px 8px !important;
  background: #063653 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: 206px !important;
  z-index: 146 !important;
  padding: 6px 8px !important;
  background: #f8fcff !important;
}

.editor-selected-item-bar .editor-ledger-row-label {
  font-size: 11px !important;
  margin-bottom: 3px !important;
  color: #526b82 !important;
}

.editor-selected-item-bar .editor-ledger-row {
  display: grid !important;
  grid-template-columns: minmax(104px, 0.75fr) minmax(70px, 0.45fr) minmax(0, 1.55fr) minmax(86px, 0.55fr) minmax(86px, 0.55fr) minmax(70px, 0.35fr) minmax(58px, 0.32fr) !important;
  gap: 4px !important;
  align-items: center !important;
}

.editor-selected-item-bar .editor-ledger-cell {
  min-height: 26px !important;
  padding: 3px 6px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.listing-status-panel--global {
  display: grid !important;
  grid-template-columns: minmax(110px, 0.35fr) minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
}

.listing-status-actions {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

.listing-status-btn,
.step-nav button,
.pill,
.option-button,
.filter-chip,
.secondary-btn,
.primary-btn {
  min-height: 32px !important;
  padding: 5px 10px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
}

.pill,
.option-button {
  line-height: 1.15 !important;
}

.form-grid,
.basic-fast-grid,
.condition-grid,
.function-grid {
  gap: 8px !important;
}

.purchase-card .form-grid,
.basic-fast-card .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.form-grid input,
.form-grid select,
.basic-fast-grid input,
.basic-fast-grid select,
input,
select {
  min-height: 34px !important;
  padding: 5px 9px !important;
  font-size: 13px !important;
}

textarea {
  padding: 7px 9px !important;
  font-size: 13px !important;
}

fieldset {
  padding: 8px !important;
  margin: 0 0 8px !important;
}

legend,
.group-title {
  font-size: 17px !important;
  line-height: 1.2 !important;
  margin-bottom: 6px !important;
}

.option-grid,
.condition-grid,
.function-options,
.pill-grid {
  gap: 5px !important;
}

.option-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.condition-grid,
.function-options {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)) !important;
}

.ai-inline-card,
.start-card.ai-drop-zone {
  padding: 9px 10px !important;
  border-radius: 10px !important;
}

.ai-card-head,
.start-card.ai-drop-zone .ai-card-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: start !important;
}

.ai-card-head p,
.start-card.ai-drop-zone p {
  margin: 2px 0 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.ai-cost-links {
  display: flex !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
}

.ai-cost-links button {
  min-height: 26px !important;
  padding: 3px 8px !important;
  font-size: 11px !important;
}

.ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
  align-items: center !important;
}

.ai-action-row .upload-box,
.ai-action-row button {
  min-width: 0 !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 4px 6px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  text-align: center !important;
}

.ai-action-row .ai-recognize-btn {
  background: #d7352a !important;
  border-color: #d7352a !important;
  color: #fff !important;
  font-weight: 800 !important;
}

.ai-paste-hint {
  margin: 4px 0 !important;
  font-size: 11px !important;
}

.ai-preview-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 0.52fr) minmax(0, 0.48fr) !important;
  gap: 6px !important;
}

.ai-image-preview,
.ai-result {
  min-height: 42px !important;
  padding: 6px !important;
}

.accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr)) !important;
  gap: 5px !important;
}

.accessory-grid button,
.accessory-button {
  min-height: 30px !important;
  padding: 4px 5px !important;
  font-size: 11px !important;
  line-height: 1.08 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: keep-all !important;
}

.photo-url-card {
  padding: 8px !important;
}

.photo-url-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: center !important;
}

.photo-url-head p {
  font-size: 12px !important;
  line-height: 1.3 !important;
  margin: 0 !important;
}

.photo-url-actions {
  display: flex !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}

.photo-url-actions .secondary-btn,
.photo-file-btn {
  min-height: 28px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
}

.photo-url-row {
  display: grid !important;
  grid-template-columns: 32px minmax(0, 1fr) auto !important;
  gap: 5px !important;
  padding: 5px !important;
}

.photo-url-row small,
.photo-url-row p {
  display: none !important;
}

.live-preview-panel {
  padding: 10px !important;
}

.live-preview-panel > .panel-heading,
.live-copy-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.live-copy-actions {
  justify-content: flex-end !important;
  margin: 4px 0 8px !important;
}

.live-copy-actions .compact-copy {
  width: 124px !important;
  min-width: 0 !important;
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 13px !important;
}

#liveConditionDescriptionOutput,
#liveHtmlOutput,
.copy-output-details,
.html-code-details,
.live-hidden-source {
  display: none !important;
}

.live-preview-frame-card,
.html-preview-card {
  min-height: 680px !important;
  margin-top: 6px !important;
}

#liveHtmlPreviewFrame,
#htmlPreviewFrame {
  min-height: 640px !important;
}

@media (min-width: 1180px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-workspace,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-form-layout {
    display: grid !important;
    grid-template-columns: minmax(560px, 0.92fr) minmax(420px, 0.72fr) !important;
    gap: 14px !important;
    align-items: start !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
    position: sticky !important;
    top: 274px !important;
    max-height: calc(100vh - 286px) !important;
    overflow: auto !important;
  }
}

@media (max-width: 900px) {
  .hero {
    padding: 14px 16px !important;
    border-radius: 12px !important;
  }

  .hero h1 {
    font-size: 34px !important;
  }

  .hero p {
    display: none !important;
  }

  .hero-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .hero-actions .secondary-btn,
  .hero-actions .primary-btn {
    min-height: 34px !important;
    padding: 5px 6px !important;
    font-size: 12px !important;
  }

  .status-grid {
    grid-template-columns: repeat(3, minmax(118px, 1fr)) !important;
    overflow-x: auto !important;
  }

  .ledger-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .ledger-head-actions {
    grid-template-columns: 1fr 1fr !important;
  }

  .ledger-head-actions .ledger-search {
    grid-column: 1 / -1 !important;
  }

  .ledger-status-filters {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  .ledger-table,
  .ledger-table tbody,
  .ledger-table tr,
  .ledger-table td {
    display: block !important;
    width: 100% !important;
  }

  .ledger-table thead {
    display: none !important;
  }

  .ledger-table tr {
    margin: 6px 8px !important;
    padding: 8px !important;
    border: 1px solid #c8ddea !important;
    border-radius: 10px !important;
    background: #fff !important;
  }

  .ledger-table td {
    display: none !important;
    border: 0 !important;
    padding: 0 !important;
  }

  .ledger-table td.ledger-title {
    display: block !important;
  }

  .ledger-title strong {
    white-space: normal !important;
    font-size: 15px !important;
    line-height: 1.25 !important;
    margin-bottom: 5px !important;
  }

  .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(74px, 1fr) minmax(58px, 0.8fr) 42px minmax(48px, 0.8fr) 42px !important;
    gap: 4px !important;
    align-items: center !important;
  }

  .ledger-mobile-chip,
  .ledger-mobile-status {
    min-height: 24px !important;
    padding: 3px 5px !important;
    font-size: 11px !important;
    border-radius: 7px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .ledger-mobile-edit,
  .ledger-mobile-delete {
    width: 42px !important;
    padding: 2px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
    top: 0 !important;
    min-height: 36px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 36px !important;
    grid-template-columns: repeat(5, minmax(74px, 1fr)) !important;
    overflow-x: auto !important;
    padding: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 82px !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-row {
    grid-template-columns: minmax(0, 1fr) 66px 56px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell:nth-child(1),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell:nth-child(2),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell:nth-child(5),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell:nth-child(6) {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 132px !important;
    min-height: 44px !important;
    overflow-x: auto !important;
    padding: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 176px !important;
    grid-template-columns: 84px 1fr !important;
    padding: 5px !important;
  }

  .listing-status-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  .listing-status-btn {
    min-height: 28px !important;
    padding: 3px 4px !important;
    font-size: 10px !important;
  }

  .editor-workspace,
  .listing-form-layout,
  .basic-fast-grid,
  .form-grid,
  .purchase-card .form-grid,
  .basic-fast-card .form-grid {
    grid-template-columns: 1fr !important;
  }

  .option-grid,
  .condition-grid,
  .function-options {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .pill,
  .option-button {
    min-height: 34px !important;
    padding: 5px 7px !important;
    font-size: 12px !important;
  }

  .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .ai-action-row .upload-box,
  .ai-action-row button {
    height: 28px !important;
    min-height: 28px !important;
    font-size: 11px !important;
  }

  .ai-preview-grid {
    grid-template-columns: 1fr !important;
  }

  .accessory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .accessory-grid button,
  .accessory-button {
    min-height: 28px !important;
    font-size: 10px !important;
    padding: 3px !important;
  }

  .photo-url-row {
    grid-template-columns: 28px minmax(0, 1fr) 42px !important;
  }

  .live-preview-panel {
    position: static !important;
    max-height: none !important;
  }

  .live-copy-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .live-copy-actions .compact-copy {
    width: auto !important;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 13px !important;
  }

  .hero h1 {
    font-size: 28px !important;
  }

  .status-card-action,
  .editor-count-card {
    min-height: 38px !important;
    padding: 5px 7px !important;
  }

  .status-card-action strong,
  .editor-count-card strong {
    font-size: 20px !important;
  }

  .ledger-mobile-meta {
    grid-template-columns: minmax(72px, 1fr) 54px 38px 48px 38px !important;
  }

  .editor-selected-item-bar .editor-ledger-cell,
  .ledger-mobile-chip,
  .ledger-mobile-status {
    font-size: 10px !important;
  }

  .option-grid,
  .condition-grid,
  .function-options {
    grid-template-columns: 1fr !important;
  }

  .accessory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* === 20260719 v31 final listing UI tightening === */
html,
body {
  overflow-x: hidden;
}

body:not(.home-mode):not(.purchase-mode) .sales-reference-panel,
body:not(.home-mode):not(.purchase-mode) #salesReferencePanel {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) .status-grid {
  gap: 8px !important;
}

body:not(.home-mode):not(.purchase-mode) .status-card-action,
body:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 44px !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
}

body:not(.home-mode):not(.purchase-mode) .status-card-action strong,
body:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 24px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #9f1d1d !important;
  border-color: #f1b8b8 !important;
  background: #fff7f7 !important;
}

@media (min-width: 801px) {
  body:not(.home-mode):not(.purchase-mode) .ledger-table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table th,
  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    padding: 5px 6px !important;
    font-size: 13px !important;
    vertical-align: middle !important;
    overflow: hidden !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
    width: 198px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
    width: 130px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
    width: auto !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
    width: 120px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
    width: 106px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
    width: 78px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
    width: 86px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
    width: 96px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td:first-child > div,
  body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
    display: grid !important;
    grid-template-columns: minmax(74px, 0.95fr) minmax(76px, 1fr) !important;
    gap: 4px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table input,
  body:not(.home-mode):not(.purchase-mode) .ledger-table select {
    min-width: 0 !important;
    width: 100% !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 3px 7px !important;
    font-size: 13px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-actions button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 39px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 6px !important;
    font-size: 12px !important;
    border-radius: 999px !important;
  }
}

@media (max-width: 800px) {
  body:not(.home-mode):not(.purchase-mode) .status-grid {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(118px, 36vw) !important;
    overflow-x: auto !important;
    padding: 6px 8px !important;
    gap: 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .status-card-action {
    min-height: 54px !important;
    padding: 8px 10px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tbody,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table thead {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tbody {
    padding: 6px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tr {
    margin: 8px 0 !important;
    padding: 8px !important;
    border: 1px solid #cfe3f2 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    border: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td:not(.ledger-title):not(.ledger-actions) {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table .ledger-title strong {
    display: -webkit-box !important;
    margin-bottom: 6px !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    white-space: normal !important;
    font-size: 15px !important;
    line-height: 1.25 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(70px, 1fr) minmax(62px, 0.85fr) 42px minmax(54px, 0.75fr) 42px !important;
    gap: 4px !important;
    align-items: center !important;
    width: 100% !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta > * {
    min-width: 0 !important;
    min-height: 26px !important;
    padding: 3px 5px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-status {
    justify-content: center !important;
    text-align: center !important;
    background: #f6efdf !important;
    color: #073452 !important;
    font-weight: 700 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    width: 42px !important;
    justify-content: center !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-actions {
    display: none !important;
  }
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-head,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  background: #f3fbff !important;
  box-shadow: 0 1px 0 rgba(7, 52, 82, 0.12) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-head {
  top: 0 !important;
  z-index: 95 !important;
  min-height: 44px !important;
  padding: 6px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: 44px !important;
  z-index: 94 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 5px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  top: 94px !important;
  z-index: 93 !important;
  margin: 0 !important;
  padding: 6px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  top: 158px !important;
  z-index: 92 !important;
  padding: 6px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: 216px !important;
  z-index: 91 !important;
  display: grid !important;
  grid-template-columns: 150px 1fr !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 6px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-head h2 {
  font-size: 20px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 36px !important;
  padding: 5px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 20px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  margin-bottom: 3px !important;
  color: #486177 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  display: grid !important;
  grid-template-columns: 160px 118px minmax(220px, 1fr) 112px 105px 86px 86px !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-width: 0 !important;
  padding: 5px 7px !important;
  border: 1px solid #cfe3f2 !important;
  border-radius: 8px !important;
  background: #fff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span {
  display: block !important;
  color: #557089 !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-purchase small {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step {
  min-height: 42px !important;
  gap: 3px !important;
  padding: 5px 6px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step span {
  width: 26px !important;
  height: 26px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global strong {
  font-size: 22px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
  min-height: 34px !important;
  padding: 5px 8px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-group button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid .accessory,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .camera-type-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-grid button {
  min-height: 34px !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)) !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section {
  gap: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) select,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
  min-height: 36px !important;
  padding: 7px 10px !important;
  font-size: 14px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card {
  gap: 7px !important;
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone h4,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card h4 {
  margin: 0 !important;
  font-size: 16px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-paste-hint {
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row > *,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 6px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-recognize-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #recognizeSelectedBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #recognizeSelectedAssistBtn {
  border-color: #b81717 !important;
  background: #d82020 !important;
  color: #fff !important;
  font-weight: 900 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result {
  min-height: 42px !important;
  padding: 7px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .live-preview-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 0 0 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions button {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .output-details,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-details,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-code-details {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
  min-height: 620px !important;
}

@media (max-width: 800px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-head {
    top: 0 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 42px !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(92px, 1fr) !important;
    grid-template-columns: none !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 86px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 146px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 198px !important;
    grid-template-columns: 1fr !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: 1fr 78px 70px !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-title-cell {
    grid-column: 1 / -1 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-purchase,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(2),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(5) {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid .accessory,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-button {
    min-height: 30px !important;
    padding: 3px 4px !important;
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-group button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .camera-type-grid button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-grid button {
    min-height: 32px !important;
    padding: 4px 6px !important;
    font-size: 12px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
    min-height: 480px !important;
  }
}

/* v30 final listing UI fixes: compact ledger/editor, sticky context, and strict item-type fields. */
body:not(.home-mode):not(.purchase-mode) .ledger-wrap,
body:not(.home-mode):not(.purchase-mode) .ledger-scroll {
  overflow-x: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 4px 5px !important;
  font-size: 12px !important;
  line-height: 1.18 !important;
  vertical-align: middle !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) { width: 160px !important; }
body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) { width: 86px !important; }
body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) { width: auto !important; }
body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) { width: 106px !important; }
body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) { width: 106px !important; }
body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) { width: 70px !important; }
body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) { width: 64px !important; }
body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) { width: 88px !important; }

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(64px, .9fr) minmax(68px, 1fr) !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit-input,
body:not(.home-mode):not(.purchase-mode) .ledger-order-input,
body:not(.home-mode):not(.purchase-mode) .ledger-price-input {
  min-height: 28px !important;
  height: 28px !important;
  padding: 3px 6px !important;
  font-size: 12px !important;
  border-radius: 7px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-title > strong {
  display: block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 4px !important;
  flex-wrap: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 26px !important;
  height: 26px !important;
  padding: 3px 6px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  color: #b42318 !important;
  border-color: #f4b7ae !important;
  background: #fff5f3 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-card {
  padding: 8px !important;
  gap: 5px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-card-title {
  margin: 0 0 4px !important;
  font-size: 14px !important;
  line-height: 1.16 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
  display: grid !important;
  grid-template-columns: minmax(58px, 1fr) minmax(44px, .75fr) 34px minmax(42px, .72fr) 32px !important;
  gap: 3px !important;
  align-items: center !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-mobile-sku { order: 1 !important; }
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-date { order: 2 !important; }
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit { order: 3 !important; }
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-status { order: 4 !important; }
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete { order: 5 !important; }

body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta > * {
  min-width: 0 !important;
  min-height: 23px !important;
  padding: 2px 3px !important;
  font-size: 10px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  z-index: 90 !important;
  box-shadow: 0 1px 0 rgba(196, 221, 238, .85) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
  top: 0 !important;
  min-height: 36px !important;
  padding: 4px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: 36px !important;
  padding: 5px 8px !important;
  min-height: 34px !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-card {
  min-height: 28px !important;
  padding: 3px 8px !important;
  border-radius: 7px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  top: 70px !important;
  padding: 5px 8px !important;
  min-height: 44px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  font-size: 10px !important;
  margin-bottom: 2px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  display: grid !important;
  grid-template-columns: minmax(110px, .9fr) minmax(76px, .52fr) minmax(170px, 1.4fr) minmax(78px, .6fr) minmax(84px, .55fr) minmax(68px, .45fr) minmax(68px, .45fr) !important;
  gap: 4px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-height: 27px !important;
  padding: 3px 6px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span {
  font-size: 9.5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  top: 118px !important;
  padding: 4px 8px !important;
  min-height: 44px !important;
  background: #0b3d5c !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step {
  min-height: 34px !important;
  padding: 3px 6px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: 162px !important;
  padding: 5px 8px !important;
  background: #f7fcff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-label strong {
  font-size: 17px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 11.5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-section,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card {
  padding: 9px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) h2 {
  font-size: 18px !important;
  margin: 0 0 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) h3,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) legend,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .group-title {
  font-size: 14px !important;
  margin-bottom: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-grid input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-grid select,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-grid textarea,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid select {
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-pill,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-option,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .function-option {
  min-height: 31px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
  line-height: 1.12 !important;
  border-radius: 7px !important;
  white-space: normal !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-button {
  min-height: 32px !important;
  height: auto !important;
  padding: 4px 6px !important;
  font-size: 10.5px !important;
  line-height: 1.12 !important;
  border-radius: 7px !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card {
  padding: 8px 10px !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone h3,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card strong {
  font-size: 15px !important;
  margin-bottom: 2px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card p {
  font-size: 11.5px !important;
  line-height: 1.35 !important;
  margin: 0 0 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .file-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 3px 5px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  border-radius: 7px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-recognize-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtnAssist {
  color: #fff !important;
  background: #d92d20 !important;
  border-color: #d92d20 !important;
  font-weight: 800 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  padding: 10px !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  align-items: start !important;
  gap: 8px !important;
  margin-bottom: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head h2,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head h3 {
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .live-copy-actions,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 108px)) !important;
  gap: 6px !important;
  margin: 0 !important;
  justify-content: end !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions button {
  width: 108px !important;
  min-width: 0 !important;
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  border-radius: 7px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  min-height: 720px !important;
  padding: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
  height: calc(100vh - 170px) !important;
  min-height: 680px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-details,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-code-details,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveConditionDescriptionOutput,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlOutput,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sales-reference-panel {
  display: none !important;
}

body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) .service-seal-fieldset,
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) #shutterCountFieldset,
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) .service-seal-fieldset,
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) #shutterCountFieldset,
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-lens-function-field],
body:not(.listing-item-film-camera):not(.home-mode):not(.purchase-mode) .service-seal-fieldset,
body:not(.listing-item-film-camera):not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body:not(.listing-item-camera-body):not(.home-mode):not(.purchase-mode) #shutterCountFieldset,
body:not(.listing-item-camera-body):not(.home-mode):not(.purchase-mode) [data-body-only-field],
body:not(.listing-item-digital-body):not(.home-mode):not(.purchase-mode) [data-body-check-field],
body:not(.listing-item-digital-body):not(.home-mode):not(.purchase-mode) [data-body-function-field] {
  display: none !important;
  visibility: hidden !important;
}

@media (max-width: 700px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
    min-height: 34px !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 34px !important;
    grid-template-columns: repeat(5, minmax(66px, 1fr)) !important;
    gap: 4px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-card {
    min-height: 28px !important;
    padding: 3px 6px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 68px !important;
    padding: 5px 6px !important;
    min-height: 44px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: minmax(0, 1fr) 68px 54px 50px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(1),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(2),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(5) {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
    min-height: 25px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 116px !important;
    min-height: 40px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 156px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
    min-height: 28px !important;
    font-size: 10px !important;
    padding: 2px 4px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    grid-template-columns: minmax(58px, 1fr) minmax(42px, .75fr) 32px minmax(40px, .72fr) 30px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-button {
    min-height: 30px !important;
    font-size: 9.5px !important;
    padding: 3px 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .file-button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    font-size: 10px !important;
    padding: 2px 3px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
    grid-template-columns: 1fr !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .live-copy-actions,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions button {
    width: auto !important;
  }
}

/* v28-final-sticky: keep editor context visible while the form scrolls. */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  background: inherit;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  background: #eaf6fd !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  background: #fff8da !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  background: #073858 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  background: #f5fbff !important;
}

/* 20260719 ui-polish v25: compact ledger/editor overrides */
body:not(.home-mode):not(.purchase-mode) #salesReferencePanel {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body:not(.home-mode):not(.purchase-mode) [data-body-function-field] {
  display: none !important;
}

body.listing-item-film-camera:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body.listing-item-camera-body:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-camera-body:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-camera-body:not(.home-mode):not(.purchase-mode) [data-body-function-field] {
  display: block !important;
}

body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-lens-function-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-film-camera-field] {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-panel {
  max-width: 100% !important;
  overflow: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head {
  display: grid !important;
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 8px 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head h3 {
  margin: 0 !important;
  font-size: 19px !important;
  line-height: 1.15 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-summary {
  margin: 2px 0 0 !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
  display: grid !important;
  grid-template-columns: minmax(170px, 1fr) minmax(220px, 0.95fr) auto auto !important;
  gap: 6px !important;
  align-items: center !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head-actions p {
  margin: 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-search-input {
  width: 100% !important;
  min-width: 0 !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head-actions .primary-btn,
body:not(.home-mode):not(.purchase-mode) .ledger-head-actions a,
body:not(.home-mode):not(.purchase-mode) .ledger-toggle {
  width: auto !important;
  min-width: 0 !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-status-filters {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  padding: 6px 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-status-filters .filter-chip {
  min-height: 28px !important;
  padding: 3px 10px !important;
  font-size: 11px !important;
  border-radius: 999px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-scroll {
  overflow-x: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 4px 6px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  vertical-align: middle !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 24% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 10% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
  width: 31% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 10% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 10% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 7% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 4% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 4% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit-input,
body:not(.home-mode):not(.purchase-mode) .ledger-order-input {
  width: 100% !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 2px 5px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-title span {
  font-size: 10px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  gap: 3px !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-delete {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 32px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 2px 5px !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-delete {
  color: #b42318 !important;
  border-color: #f1b6b1 !important;
  background: #fff7f6 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  background: rgba(255, 255, 255, 0.98) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  top: 0 !important;
  z-index: 110 !important;
  min-height: 40px !important;
  padding: 5px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: 40px !important;
  z-index: 109 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(98px, 1fr)) !important;
  gap: 5px !important;
  padding: 5px 8px !important;
  border-bottom: 1px solid #cfe4f5 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 28px !important;
  padding: 4px 7px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 18px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  top: 78px !important;
  z-index: 108 !important;
  padding: 6px 8px !important;
  border-radius: 0 !important;
  box-shadow: 0 6px 16px rgba(6, 31, 52, 0.08) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  margin: 0 0 3px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  display: grid !important;
  grid-template-columns: minmax(128px, 1.1fr) minmax(90px, 0.75fr) minmax(220px, 2.2fr) minmax(86px, 0.75fr) minmax(94px, 0.8fr) minmax(72px, 0.65fr) minmax(78px, 0.7fr) !important;
  gap: 4px !important;
  align-items: stretch !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-height: 28px !important;
  padding: 4px 6px !important;
  border-radius: 7px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell small {
  font-size: 10px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong {
  font-size: 12px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  top: 132px !important;
  z-index: 107 !important;
  min-height: 48px !important;
  padding: 5px 8px !important;
  background: #063653 !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step {
  min-height: 38px !important;
  gap: 2px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step span {
  width: 22px !important;
  height: 22px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: 180px !important;
  z-index: 106 !important;
  display: grid !important;
  grid-template-columns: 150px minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 6px 8px !important;
  border-radius: 0 !important;
  box-shadow: 0 6px 16px rgba(6, 31, 52, 0.08) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global > div:first-child {
  min-width: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global > div:first-child span {
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #listingStatusText {
  font-size: 19px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
  min-height: 30px !important;
  padding: 4px 6px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #itemForm {
  padding-top: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-nav {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-heading {
  margin: 6px 0 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-heading h3 {
  font-size: 20px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .group-title {
  margin: 7px 0 5px !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-grid--setup {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card {
  padding: 9px 10px !important;
  border-radius: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) select,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
  min-height: 34px !important;
  padding: 6px 9px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-drop-zone,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card {
  gap: 6px !important;
  padding: 8px 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-drop-zone h4,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card strong {
  margin: 0 !important;
  font-size: 15px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-drop-zone p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-paste-hint,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .hint {
  margin: 2px 0 !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links a {
  min-height: 24px !important;
  padding: 3px 7px !important;
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  width: 100% !important;
  min-width: 0 !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 3px 5px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-queue-analyze {
  border-color: #d92d20 !important;
  background: #fff2f1 !important;
  color: #b42318 !important;
  font-weight: 900 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result {
  min-height: 36px !important;
  padding: 6px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 4px 6px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  line-height: 1.12 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: keep-all !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .function-choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade {
  min-height: 32px !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1.16 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  gap: 6px !important;
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head h3 {
  margin: 0 !important;
  font-size: 18px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  margin: 0 0 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy {
  width: auto !important;
  min-width: 112px !important;
  max-width: 150px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-textarea,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-html-output,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-hidden-source {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  min-height: 620px !important;
  padding: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
  height: calc(100vh - 260px) !important;
  min-height: 580px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-card .form-help,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-card p {
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #photoFolderInput + span::after {
  content: "（フォルダ内の画像/動画を一括追加）";
  margin-left: 4px;
  color: #52708a;
  font-size: 11px;
}

@media (max-width: 900px) {
  body:not(.home-mode):not(.purchase-mode) .ledger-head {
    display: block !important;
    padding: 10px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    margin-top: 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions p {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-status-filters {
    position: sticky !important;
    top: 0 !important;
    z-index: 45 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding: 5px 8px !important;
    background: #fff !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-status-filters .filter-chip {
    min-height: 26px !important;
    padding: 2px 4px !important;
    font-size: 10px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tbody,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    display: block !important;
    width: 100% !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table thead {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tr {
    margin: 6px 8px !important;
    padding: 7px !important;
    border: 1px solid #cfe4f5 !important;
    border-radius: 10px !important;
    background: #fff !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    padding: 0 !important;
    border: 0 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td:not(.ledger-title):not(.ledger-actions) {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
    margin: 0 0 5px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(66px, 1fr) minmax(52px, 0.8fr) 34px minmax(44px, 0.75fr) 32px !important;
    gap: 3px !important;
    align-items: center !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta > *,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 2px 4px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    color: #b42318 !important;
    border: 1px solid #f1b6b1 !important;
    background: #fff7f6 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-actions {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    overflow-x: auto !important;
    grid-template-columns: repeat(5, minmax(86px, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 76px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: minmax(0, 1fr) minmax(82px, 0.8fr) minmax(72px, 0.72fr) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(1),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(2),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(5),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(7) {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 124px !important;
    overflow-x: auto !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(72px, 1fr) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 172px !important;
    grid-template-columns: 1fr !important;
    gap: 5px !important;
    padding: 6px 8px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-grid--setup {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
    min-height: 28px !important;
    padding: 3px 4px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    justify-content: stretch !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
    min-height: 500px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
    height: 56vh !important;
    min-height: 470px !important;
  }
}

@media (max-width: 430px) {
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    grid-template-columns: minmax(58px, 1fr) minmax(46px, 0.75fr) 30px minmax(42px, 0.72fr) 30px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta > *,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    height: 22px !important;
    min-height: 22px !important;
    padding: 1px 3px !important;
    font-size: 9px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    grid-template-columns: repeat(5, 82px) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong {
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    font-size: 10px !important;
    padding: 2px 3px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* 20260719 ui-polish v20: ledger/editor/mobile tightening */
body:not(.home-mode):not(.purchase-mode) #salesReferencePanel {
  display: none !important;
}

body.listing-item-lens-only [data-body-only-field],
body.listing-item-lens-only [data-body-check-field],
body.listing-item-lens-only [data-body-function-field],
body.listing-item-lens-only [data-film-camera-field],
body.listing-item-accessory [data-body-only-field],
body.listing-item-accessory [data-body-check-field],
body.listing-item-accessory [data-body-function-field],
body.listing-item-accessory [data-lens-function-field],
body.listing-item-accessory [data-film-camera-field],
body:not(.listing-item-camera-body) [data-body-only-field],
body:not(.listing-item-camera-body) [data-body-check-field],
body:not(.listing-item-camera-body) [data-body-function-field],
body:not(.listing-item-film-camera) [data-film-camera-field],
[data-body-only-field].is-hidden,
[data-body-check-field].is-hidden,
[data-body-function-field].is-hidden,
[data-lens-function-field].is-hidden,
[data-film-camera-field].is-hidden {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 5px 6px !important;
  font-size: 13px !important;
  vertical-align: middle !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 206px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 92px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
  width: auto !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 124px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 118px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 86px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 82px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 120px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(84px, 1fr) minmax(78px, 1fr) !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields input,
body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields select,
body:not(.home-mode):not(.purchase-mode) .ledger-order-input,
body:not(.home-mode):not(.purchase-mode) .ledger-sku-input,
body:not(.home-mode):not(.purchase-mode) .ledger-price-input {
  min-height: 32px !important;
  height: 32px !important;
  padding: 4px 7px !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-title,
body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-width: 42px !important;
  min-height: 28px !important;
  padding: 4px 7px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  border: 1px solid #f1b8b8 !important;
  background: #fff7f7 !important;
  color: #b42318 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 160 !important;
  min-height: 42px !important;
  padding: 6px 10px !important;
  background: #eaf7ff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky !important;
  top: 54px !important;
  z-index: 159 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 6px !important;
  background: #f4fbff !important;
  border-bottom: 1px solid #cfe1ee !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 30px !important;
  padding: 4px 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  position: sticky !important;
  top: 100px !important;
  z-index: 158 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  padding: 6px 8px !important;
  background: #fff9dc !important;
  border: 1px solid #ead997 !important;
}

.editor-ledger-row-label {
  margin: 0 0 4px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  color: #5f6f82 !important;
}

.editor-ledger-row {
  display: grid !important;
  grid-template-columns: 150px 105px minmax(260px, 1.4fr) 108px 116px 90px 92px !important;
  gap: 6px !important;
  align-items: stretch !important;
}

.editor-ledger-cell {
  min-height: 36px !important;
  padding: 5px 7px !important;
  border: 1px solid #d4e4f0 !important;
  border-radius: 8px !important;
  background: #fff !important;
}

.editor-ledger-cell span {
  display: block !important;
  margin-bottom: 3px !important;
  color: #607086 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

.editor-ledger-cell strong,
.editor-ledger-cell small {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.editor-ledger-cell strong {
  font-size: 13px !important;
  line-height: 1.15 !important;
}

.editor-ledger-cell small {
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: 166px !important;
  z-index: 157 !important;
  min-height: 44px !important;
  padding: 5px !important;
  background: #0b4260 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: 210px !important;
  z-index: 156 !important;
  min-height: 48px !important;
  padding: 6px 8px !important;
  background: #f5fbff !important;
}

.field-card,
.basic-fast-card,
.item-specifics-panel,
.ai-inline-card,
.start-card {
  padding: 10px !important;
  border-radius: 12px !important;
}

.group-title,
.field-card h3,
.summary-card h3 {
  margin-top: 8px !important;
  margin-bottom: 6px !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
}

.choice-grid,
.grade-row,
.button-group,
.function-group,
.accessory-grid {
  gap: 6px !important;
}

.choice,
.grade,
.option-button,
.function-button,
.toggle-button {
  min-height: 34px !important;
  padding: 6px 9px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
}

.accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)) !important;
  gap: 6px !important;
  align-items: stretch !important;
}

.accessory {
  min-height: 31px !important;
  padding: 5px 7px !important;
  border-radius: 8px !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  word-break: keep-all !important;
  font-size: 12px !important;
  line-height: 1.12 !important;
}

.ai-inline-card,
.start-card.ai-drop-zone {
  padding: 10px !important;
}

.ai-card-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: start !important;
}

.ai-card-head p,
.start-card p,
.ai-paste-hint,
.hint {
  margin: 2px 0 6px !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  align-items: center !important;
}

.ai-action-row .upload-box,
.ai-action-row label,
.ai-action-row button {
  min-height: 32px !important;
  height: 32px !important;
  padding: 4px 6px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

#aiAnalyzeQueuedBtn,
#aiAnalyzeQueuedBtnAssist {
  border-color: #b42318 !important;
  background: #d92d20 !important;
  color: #fff !important;
  font-weight: 900 !important;
}

.ai-preview,
.ai-result {
  min-height: 34px !important;
  padding: 6px 8px !important;
  font-size: 12px !important;
}

.live-preview-panel {
  padding: 10px 12px !important;
}

.live-preview-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: center !important;
  margin-bottom: 6px !important;
}

.live-preview-head .eyebrow,
.live-preview-head h3 {
  margin: 0 !important;
}

.live-preview-head .eyebrow {
  font-size: 11px !important;
}

.live-preview-head h3 {
  font-size: 18px !important;
}

.live-copy-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 150px)) !important;
  gap: 8px !important;
  justify-content: end !important;
  align-items: center !important;
  margin: 0 0 8px auto !important;
}

.live-copy-actions .compact-copy {
  min-height: 32px !important;
  padding: 5px 10px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}

.live-hidden-source,
.copy-output-textarea,
.live-html-output {
  display: none !important;
}

.live-preview-frame-card {
  min-height: 560px !important;
  margin-top: 0 !important;
  padding: 8px !important;
}

#liveHtmlPreviewFrame {
  min-height: 520px !important;
  height: calc(100vh - 360px) !important;
}

.photo-folder-button {
  display: inline-flex !important;
}

.photo-url-row {
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  gap: 6px !important;
  padding: 6px !important;
}

@media (max-width: 760px) {
  body:not(.home-mode):not(.purchase-mode) .hero,
  body:not(.home-mode):not(.purchase-mode) .filter-note,
  body:not(.home-mode):not(.purchase-mode) .ledger-panel-head .ledger-note {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    min-height: 38px !important;
    padding: 5px 7px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 38px !important;
    grid-template-columns: repeat(5, minmax(62px, 1fr)) !important;
    overflow-x: auto !important;
    padding: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
    min-height: 28px !important;
    padding: 4px 6px !important;
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 78px !important;
    padding: 5px 6px !important;
  }

  .editor-ledger-row-label {
    display: none !important;
  }

  .editor-ledger-row {
    grid-template-columns: minmax(0, 1fr) 76px 62px 66px !important;
    gap: 4px !important;
  }

  .editor-ledger-cell {
    min-height: 30px !important;
    padding: 4px 5px !important;
  }

  .editor-ledger-row .editor-ledger-cell:nth-child(1),
  .editor-ledger-row .editor-ledger-cell:nth-child(2),
  .editor-ledger-row .editor-ledger-cell:nth-child(5) {
    display: none !important;
  }

  .editor-ledger-cell span {
    font-size: 9px !important;
  }

  .editor-ledger-cell strong {
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 126px !important;
    min-height: 38px !important;
    padding: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 164px !important;
    min-height: 42px !important;
    padding: 5px 6px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table thead {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tbody,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    display: block !important;
    width: 100% !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tbody {
    display: grid !important;
    gap: 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tr {
    display: grid !important;
    grid-template-columns: 1fr !important;
    padding: 8px !important;
    border: 1px solid #cfe1ee !important;
    border-radius: 10px !important;
    background: #fff !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    border: 0 !important;
    padding: 0 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td:not(.ledger-title):not(.ledger-actions):not(.ledger-mobile-cell) {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-title {
    margin-bottom: 6px !important;
    font-size: 15px !important;
    line-height: 1.25 !important;
  }

  .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: 64px 74px 46px 58px 42px !important;
    gap: 4px !important;
    align-items: center !important;
  }

  .ledger-mobile-meta > * {
    min-height: 26px !important;
    padding: 3px 4px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 11px !important;
  }

  .ledger-mobile-edit,
  .ledger-mobile-delete {
    min-height: 26px !important;
    padding: 3px 5px !important;
    font-size: 11px !important;
  }

  .ledger-filter-tabs,
  .product-list-filters,
  .status-filter-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  .field-card,
  .basic-fast-card,
  .item-specifics-panel,
  .ai-inline-card,
  .start-card {
    padding: 8px !important;
  }

  .basic-grid,
  .field-grid,
  .item-specifics-grid {
    gap: 7px !important;
  }

  .choice,
  .grade,
  .option-button,
  .function-button,
  .toggle-button {
    min-height: 31px !important;
    padding: 5px 7px !important;
    font-size: 12px !important;
  }

  .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  .accessory {
    min-height: 28px !important;
    padding: 4px 3px !important;
    font-size: 10px !important;
  }

  .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .ai-action-row .upload-box,
  .ai-action-row label,
  .ai-action-row button {
    min-height: 30px !important;
    height: 30px !important;
    padding: 3px 4px !important;
    font-size: 11px !important;
  }

  .live-copy-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
  }

  .live-preview-frame-card {
    min-height: 420px !important;
  }

  #liveHtmlPreviewFrame {
    min-height: 390px !important;
    height: 58vh !important;
  }
}

/* 2026-07-19 v12: selected ledger row, compact sticky editor, and final mobile/PC fit fixes. */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 150 !important;
  min-height: 40px !important;
  padding: 6px 0 !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky !important;
  top: 40px !important;
  z-index: 149 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 6px !important;
  background: #f6fbff !important;
  border-bottom: 1px solid #cfe1ee !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 30px !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip span {
  font-size: 11px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 18px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-preview {
  position: sticky !important;
  top: 84px !important;
  z-index: 148 !important;
  display: grid !important;
  grid-template-columns: 104px minmax(0, 1fr) !important;
  gap: 6px !important;
  align-items: stretch !important;
  min-height: 0 !important;
  padding: 6px !important;
  border-radius: 0 !important;
  border-width: 1px 0 !important;
  background: #fff9df !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  display: flex !important;
  align-items: center !important;
  color: #4f6478 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  display: grid !important;
  grid-template-columns:
    minmax(120px, .9fr)
    minmax(92px, .65fr)
    minmax(260px, 2.4fr)
    minmax(100px, .7fr)
    minmax(110px, .85fr)
    minmax(86px, .6fr)
    minmax(78px, .55fr) !important;
  gap: 4px !important;
  min-width: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-width: 0 !important;
  padding: 5px 7px !important;
  border: 1px solid #cfe1ee !important;
  border-radius: 8px !important;
  background: #fff !important;
  display: grid !important;
  align-content: center !important;
  gap: 2px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span {
  color: #60758b !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell small {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #052b46 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell small {
  color: #60758b !important;
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: 134px !important;
  z-index: 147 !important;
  min-height: 48px !important;
  padding: 6px 10px !important;
  border-radius: 0 !important;
  background: #083956 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step {
  min-height: 34px !important;
  gap: 3px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step .step-number {
  width: 24px !important;
  height: 24px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step .step-label {
  font-size: 11px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: 182px !important;
  z-index: 146 !important;
  min-height: 44px !important;
  padding: 6px 10px !important;
  border-radius: 0 !important;
  display: grid !important;
  grid-template-columns: 150px minmax(0, 1fr) !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-current {
  min-height: 34px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-current span {
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-current strong {
  font-size: 20px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-actions {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-btn {
  min-height: 30px !important;
  padding: 4px 7px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  table-layout: fixed !important;
  width: 100% !important;
  min-width: 0 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 5px 6px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 188px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 96px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
  width: auto !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 104px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 112px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 78px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 72px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 96px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(0, 82px) minmax(0, 90px) !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit-input,
body:not(.home-mode):not(.purchase-mode) .ledger-order-input {
  min-height: 28px !important;
  padding: 3px 6px !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-delete {
  min-height: 28px !important;
  padding: 4px 7px !important;
  font-size: 11px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .input-group,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .feature-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .optics-card {
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .check-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .inspection-option,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-button {
  min-height: 32px !important;
  padding: 5px 8px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  line-height: 1.12 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card {
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card .card-title,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card h3 {
  font-size: 16px !important;
  margin-bottom: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card p {
  margin: 0 0 6px !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-mini-actions,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-sub-actions {
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-mini-actions button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-sub-actions button {
  min-height: 26px !important;
  padding: 3px 8px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
  align-items: stretch !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 28px !important;
  padding: 4px 6px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-queue-analyze,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-queue-analyze:not(:disabled) {
  background: #fee2e2 !important;
  border-color: #dc2626 !important;
  color: #991b1b !important;
  font-weight: 900 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  min-height: 32px !important;
  padding: 4px 6px !important;
  font-size: 11.5px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  text-overflow: clip !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  padding: 10px !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
  margin: 0 !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 132px)) !important;
  justify-content: end !important;
  gap: 6px !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy {
  min-width: 0 !important;
  width: 100% !important;
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-hidden-source,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-textarea.live-hidden-source,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-html-output.live-hidden-source {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  margin-top: 0 !important;
  min-height: 680px !important;
  padding: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell iframe {
  min-height: 640px !important;
}

@media (max-width: 760px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    min-height: 36px !important;
    padding: 4px 0 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 36px !important;
    gap: 4px !important;
    padding: 4px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
    min-width: 88px !important;
    min-height: 28px !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-preview {
    top: 72px !important;
    grid-template-columns: 1fr !important;
    gap: 4px !important;
    padding: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-title-cell {
    grid-column: 1 / -1 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
    padding: 4px 5px !important;
    border-radius: 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span {
    font-size: 9px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell small {
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 136px !important;
    min-height: 42px !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 178px !important;
    min-height: 42px !important;
    padding: 5px 6px !important;
    grid-template-columns: 92px minmax(0, 1fr) !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-current strong {
    font-size: 17px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-btn {
    min-height: 28px !important;
    padding: 3px 5px !important;
    font-size: 11px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    grid-template-columns: minmax(68px, 1fr) minmax(56px, .85fr) auto auto auto !important;
    gap: 3px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-chip,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-status,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    min-height: 23px !important;
    padding: 3px 4px !important;
    font-size: 9.5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .input-group,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-card,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .feature-card,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .optics-card {
    padding: 8px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .check-button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .inspection-option,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-button {
    min-height: 30px !important;
    padding: 4px 6px !important;
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    min-height: 26px !important;
    padding: 3px 2px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
    min-height: 29px !important;
    padding: 3px 3px !important;
    font-size: 9.8px !important;
    line-height: 1.08 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
    min-height: 460px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell iframe {
    min-height: 430px !important;
  }
}

/* 2026-07-19 v10: apply the latest compact layout inside editor mode too. */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-panel {
  max-width: 100% !important;
  margin: 8px 0 10px !important;
  border-radius: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-head {
  display: grid !important;
  grid-template-columns: minmax(170px, 0.8fr) minmax(0, 2.4fr) !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 9px 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-head .eyebrow {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-head h3 {
  margin: 0 !important;
  font-size: 20px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-summary {
  margin: 1px 0 0 !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.8fr) auto auto auto !important;
  gap: 6px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-head-actions p {
  margin: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-search-input {
  min-height: 34px !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-head-actions .primary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-head-actions a,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-head-actions button {
  min-height: 32px !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-scroll {
  overflow-x: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table th,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 5px 6px !important;
  font-size: 12px !important;
  vertical-align: middle !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 184px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 108px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
  width: auto !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 118px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 112px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 76px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 72px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 92px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table .ledger-order-input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table .ledger-edit-input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table .ledger-price-input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table .ledger-sku-input {
  min-height: 30px !important;
  padding: 4px 7px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-title strong {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  gap: 4px !important;
  justify-content: flex-end !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-edit,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-delete {
  min-height: 28px !important;
  padding: 4px 7px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  min-height: 0 !important;
  padding: 7px 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar > div strong {
  font-size: 16px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl div {
  min-height: 36px !important;
  padding: 5px 7px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  z-index: 60 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  z-index: 59 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-card {
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field .field-label {
  margin-bottom: 3px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone {
  padding: 9px !important;
  gap: 7px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone {
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone p {
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links {
  gap: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links a {
  min-height: 26px !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  width: 100% !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .file-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 5px 6px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-queue-analyze {
  border-color: #d33 !important;
  background: #fff0f0 !important;
  color: #b30000 !important;
  font-weight: 900 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-queue-analyze:not(:disabled) {
  background: #d71920 !important;
  color: #fff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-paste-hint,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card > .hint {
  margin: 0 !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result {
  min-height: 34px !important;
  padding: 6px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)) !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  min-width: 0 !important;
  min-height: 34px !important;
  padding: 5px 6px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  text-overflow: clip !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .check-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .inspection-option,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-button {
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  gap: 7px !important;
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: end !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy {
  width: auto !important;
  min-width: 118px !important;
  min-height: 32px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  min-height: 600px !important;
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell iframe {
  min-height: 550px !important;
}

@media (max-width: 1280px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
    width: 160px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
    width: 92px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
    width: 98px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
    width: 96px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
    width: 82px !important;
  }
}

@media (max-width: 760px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-head {
    grid-template-columns: 1fr !important;
    padding: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
    grid-template-columns: 1fr !important;
    gap: 7px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-head-actions p {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-status-filters {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
    padding: 7px 9px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-status-filters .filter-chip {
    min-height: 28px !important;
    padding: 4px 5px !important;
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table tbody,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table tr {
    display: block !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table thead {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table tr {
    margin: 7px 8px !important;
    padding: 8px !important;
    border: 1px solid #cfe1ee !important;
    border-radius: 10px !important;
    background: #fff !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table td {
    display: none !important;
    width: auto !important;
    border: 0 !important;
    padding: 0 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-table td.ledger-title {
    display: block !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-title > strong {
    margin: 0 0 6px !important;
    font-size: 14px !important;
    line-height: 1.22 !important;
    white-space: normal !important;
  }

  .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(74px, 1fr) minmax(56px, 0.8fr) auto auto auto !important;
    align-items: center !important;
    gap: 4px !important;
  }

  .ledger-mobile-chip,
  .ledger-mobile-status,
  .ledger-mobile-edit,
  .ledger-mobile-delete {
    min-width: 0 !important;
    min-height: 25px !important;
    padding: 3px 5px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .ledger-mobile-edit,
  .ledger-mobile-delete {
    border: 1px solid #cce0ef !important;
    background: #fff !important;
    color: #063456 !important;
    font-weight: 800 !important;
  }

  .ledger-mobile-delete {
    border-color: #ffd0d0 !important;
    color: #b33030 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 38px !important;
    min-height: 38px !important;
    padding: 5px 7px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 76px !important;
    padding: 5px 7px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl div {
    min-height: 30px !important;
    padding: 3px 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dt {
    font-size: 9px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dd {
    font-size: 12px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 142px !important;
    padding: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 194px !important;
    padding: 6px 7px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-button {
    min-height: 30px !important;
    padding: 5px !important;
    font-size: 12px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .file-button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    min-height: 28px !important;
    padding: 4px 3px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
    min-height: 28px !important;
    padding: 3px 4px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
    grid-template-columns: 1fr !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    justify-content: stretch !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy {
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
    min-height: 430px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell iframe {
    min-height: 390px !important;
  }
}

/* 20260719 v16 final compact ledger/editor overrides */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  z-index: 80 !important;
  box-shadow: 0 1px 0 rgba(16, 50, 74, .1) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  top: 0 !important;
  z-index: 95 !important;
  min-height: 46px !important;
  padding: 6px 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: 46px !important;
  z-index: 92 !important;
  padding: 5px 8px !important;
  gap: 6px !important;
  background: #f6fbff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  display: block !important;
  top: 92px !important;
  z-index: 90 !important;
  margin: 0 !important;
  padding: 7px 10px !important;
  border-radius: 0 !important;
  background: #fff7da !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  top: 150px !important;
  z-index: 88 !important;
  min-height: 54px !important;
  padding: 7px 8px !important;
  border-radius: 0 !important;
  overflow-x: auto !important;
  background: #073755 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: 204px !important;
  z-index: 86 !important;
  min-height: 48px !important;
  padding: 7px 10px !important;
  background: #f6fbff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 30px !important;
  padding: 4px 9px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip span {
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 17px !important;
}

.editor-ledger-row-label {
  margin: 0 0 4px !important;
  font-size: 11px !important;
}

.editor-ledger-row {
  display: grid !important;
  grid-template-columns: 180px 115px minmax(220px, 1fr) 118px 112px 90px 82px !important;
  gap: 5px !important;
  align-items: stretch !important;
}

.editor-ledger-cell {
  min-width: 0 !important;
  padding: 5px 7px !important;
  border: 1px solid #cfe1ee !important;
  border-radius: 8px !important;
  background: #fff !important;
}

.editor-ledger-cell span {
  display: block !important;
  font-size: 10px !important;
  line-height: 1.05 !important;
  color: #5d7289 !important;
}

.editor-ledger-cell strong,
.editor-ledger-cell small {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.editor-ledger-cell strong {
  font-size: 13px !important;
  line-height: 1.2 !important;
}

.editor-ledger-cell small {
  font-size: 10px !important;
}

.ledger-panel {
  overflow: hidden !important;
}

.ledger-scroll {
  overflow-x: hidden !important;
}

.ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

.ledger-table th,
.ledger-table td {
  padding: 5px 6px !important;
  font-size: 12px !important;
  vertical-align: middle !important;
}

.ledger-table th:nth-child(1),
.ledger-table td:nth-child(1) {
  width: 200px !important;
}

.ledger-table th:nth-child(2),
.ledger-table td:nth-child(2) {
  width: 110px !important;
}

.ledger-table th:nth-child(3),
.ledger-table td:nth-child(3) {
  width: auto !important;
}

.ledger-table th:nth-child(4),
.ledger-table td:nth-child(4) {
  width: 122px !important;
}

.ledger-table th:nth-child(5),
.ledger-table td:nth-child(5) {
  width: 112px !important;
}

.ledger-table th:nth-child(6),
.ledger-table td:nth-child(6) {
  width: 84px !important;
}

.ledger-table th:nth-child(7),
.ledger-table td:nth-child(7) {
  width: 72px !important;
}

.ledger-table th:nth-child(8),
.ledger-table td:nth-child(8) {
  width: 112px !important;
}

.ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(84px, .9fr) minmax(84px, 1fr) !important;
  gap: 4px !important;
}

.ledger-purchase-fields input,
.ledger-table input {
  min-width: 0 !important;
  height: 28px !important;
  padding: 3px 6px !important;
  font-size: 12px !important;
}

.ledger-title > strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.ledger-actions {
  display: flex !important;
  gap: 4px !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
}

.ledger-edit,
.ledger-delete,
.ledger-mobile-edit,
.ledger-mobile-delete {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 28px !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.ledger-delete,
.ledger-mobile-delete {
  border: 1px solid #f2b8b5 !important;
  background: #fff5f5 !important;
  color: #b42318 !important;
}

.accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)) !important;
  gap: 6px !important;
}

.accessory {
  min-height: 32px !important;
  padding: 5px 7px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  word-break: keep-all !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-option,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .pill,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade-option,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .preset-note {
  min-height: 32px !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
}

.basic-purchase-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

.basic-purchase-card {
  padding: 10px !important;
}

.basic-purchase-card input,
.basic-purchase-card select {
  min-height: 34px !important;
  padding: 5px 8px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card {
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card h4 {
  margin: 0 0 4px !important;
  font-size: 16px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card p {
  margin: 2px 0 6px !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  min-height: 30px !important;
  padding: 4px 6px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-queue-analyze,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-queue-analyze:not(:disabled) {
  border-color: #c62828 !important;
  background: #c62828 !important;
  color: #fff !important;
  font-weight: 800 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  gap: 8px !important;
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: center !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head .eyebrow {
  margin: 0 !important;
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head h3 {
  margin: 0 !important;
  font-size: 18px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy {
  min-height: 32px !important;
  padding: 5px 9px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-details,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-code-details,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-textarea,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-html-output {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  min-height: 560px !important;
  padding: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell iframe,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
  min-height: 520px !important;
  height: calc(100vh - 285px) !important;
}

.sales-reference-panel,
.past-sales-panel,
[data-past-sales-panel],
[data-panel="past-sales"],
[data-section="past-sales"] {
  display: none !important;
}

body:not(.listing-item-film-camera) [data-film-camera-field],
body:not(.listing-item-camera-body) [data-body-only-field],
body:not(.listing-item-digital-body) [data-body-function-field],
body:not(.listing-item-digital-body) [data-body-check-field],
body.listing-item-lens-only [data-body-only-field],
body.listing-item-lens-only [data-body-function-field],
body.listing-item-lens-only [data-body-check-field],
body.listing-item-lens-only [data-film-camera-field],
[hidden],
[data-lens-function-field].is-hidden,
[data-body-function-field].is-hidden,
[data-body-check-field].is-hidden,
[data-body-only-field].is-hidden,
[data-film-camera-field].is-hidden {
  display: none !important;
}

@media (max-width: 720px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    top: 0 !important;
    min-height: 42px !important;
    padding: 5px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 42px !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding: 4px 5px !important;
    overflow: visible !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
    min-height: 26px !important;
    padding: 3px 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip span {
    font-size: 9px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
    font-size: 14px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 72px !important;
    padding: 6px !important;
  }

  .editor-ledger-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  .editor-ledger-title-cell {
    grid-column: 1 / -1 !important;
  }

  .editor-ledger-cell {
    padding: 4px 5px !important;
  }

  .editor-ledger-cell span {
    font-size: 9px !important;
  }

  .editor-ledger-cell strong {
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 130px !important;
    min-height: 48px !important;
    padding: 5px 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 178px !important;
    padding: 5px !important;
  }

  .listing-status-panel--global .status-buttons {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  .listing-status-panel--global .status-button {
    min-height: 30px !important;
    padding: 4px 6px !important;
    font-size: 12px !important;
  }

  .ledger-status-filters {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  .ledger-table thead {
    display: none !important;
  }

  .ledger-table,
  .ledger-table tbody,
  .ledger-table tr,
  .ledger-table td {
    display: block !important;
    width: 100% !important;
  }

  .ledger-table tr {
    margin: 7px 6px !important;
    padding: 7px 8px !important;
    border: 1px solid #cfe1ee !important;
    border-radius: 10px !important;
    background: #fff !important;
  }

  .ledger-table td {
    display: none !important;
    padding: 0 !important;
    border: 0 !important;
  }

  .ledger-table td.ledger-title {
    display: block !important;
  }

  .ledger-title > strong {
    display: -webkit-box !important;
    margin: 0 0 5px !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal !important;
    font-size: 15px !important;
    line-height: 1.22 !important;
  }

  .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(72px, 1fr) minmax(58px, .8fr) auto auto auto !important;
    gap: 4px !important;
    align-items: center !important;
  }

  .ledger-mobile-chip,
  .ledger-mobile-status,
  .ledger-mobile-edit,
  .ledger-mobile-delete {
    min-height: 24px !important;
    padding: 3px 5px !important;
    font-size: 10px !important;
  }

  .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  .accessory {
    min-height: 28px !important;
    padding: 3px !important;
    font-size: 9.5px !important;
    line-height: 1.05 !important;
  }

  .basic-purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    min-height: 28px !important;
    padding: 3px 2px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
    min-height: 420px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell iframe,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
    min-height: 380px !important;
    height: 420px !important;
  }
}

/* 2026-07-19 v14: final compact UI overrides. Keep this block at EOF so it wins over legacy rules. */
body:not(.home-mode):not(.purchase-mode) .ledger-table {
  table-layout: fixed !important;
  width: 100% !important;
  min-width: 0 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 5px 6px !important;
  vertical-align: middle !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 180px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 92px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
  width: auto !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 100px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 102px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 72px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 68px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 86px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  grid-template-columns: 76px 76px !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit-input,
body:not(.home-mode):not(.purchase-mode) .ledger-order-input {
  min-height: 28px !important;
  height: 28px !important;
  padding: 3px 7px !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
  display: block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  gap: 4px !important;
  align-items: center !important;
  justify-content: flex-end !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-delete {
  min-height: 28px !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-delete {
  border: 1px solid #f0b8b8 !important;
  background: #fff7f7 !important;
  color: #a33b3b !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  z-index: 240 !important;
  margin-inline: 0 !important;
  border-radius: 0 !important;
  box-shadow: 0 1px 0 rgba(9, 38, 58, .08) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  top: 0 !important;
  min-height: 38px !important;
  padding: 5px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar .primary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar .secondary-btn {
  min-height: 30px !important;
  padding: 5px 11px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: 38px !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 6px !important;
  background: #eef8ff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 30px !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip span {
  font-size: 11px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 17px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-preview {
  top: 80px !important;
  display: grid !important;
  grid-template-columns: 92px minmax(0, 1fr) !important;
  gap: 6px !important;
  padding: 7px 8px !important;
  background: #fff8d9 !important;
  border: 1px solid #f2d980 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  align-self: center !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  color: #496177 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  display: grid !important;
  grid-template-columns: 120px 86px minmax(180px, 1fr) 92px 92px 78px 66px !important;
  gap: 5px !important;
  align-items: stretch !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-width: 0 !important;
  min-height: 34px !important;
  padding: 4px 6px !important;
  border: 1px solid #d4e6f3 !important;
  border-radius: 8px !important;
  background: #fff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span {
  display: block !important;
  font-size: 9px !important;
  line-height: 1.05 !important;
  color: #63798c !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell small {
  display: block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  top: 128px !important;
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  padding: 5px 6px !important;
  min-height: 50px !important;
  background: #073555 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step {
  min-height: 40px !important;
  padding: 2px 3px !important;
  gap: 2px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step span {
  width: 22px !important;
  height: 22px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: 178px !important;
  display: grid !important;
  grid-template-columns: 126px 1fr !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 6px 8px !important;
  background: #f4fbff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global span {
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global strong {
  font-size: 18px !important;
  line-height: 1.05 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
  min-height: 30px !important;
  padding: 4px 6px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #itemForm {
  padding-top: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid label {
  gap: 3px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) select,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
  min-height: 34px !important;
  padding: 6px 9px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .check-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .inspection-option,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-button {
  min-height: 32px !important;
  padding: 5px 8px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  line-height: 1.18 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card {
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: start !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-paste-hint {
  margin: 2px 0 0 !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-queue-analyze,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-queue-analyze:not(:disabled) {
  border-color: #ef5a5a !important;
  background: #fff1f1 !important;
  color: #b21f1f !important;
  font-weight: 900 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result {
  min-height: 34px !important;
  padding: 6px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
  line-height: 1.12 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sales-reference-panel {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  padding: 10px !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  align-items: center !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 132px)) !important;
  justify-content: end !important;
  gap: 6px !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy {
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-hidden-source,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-code-details {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  min-height: 620px !important;
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell iframe {
  min-height: 580px !important;
}

@media (max-width: 760px) {
  body:not(.home-mode):not(.purchase-mode) .ledger-status-filters {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
    padding: 6px 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table thead {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tbody,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    display: block !important;
    width: 100% !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tr {
    padding: 7px !important;
    margin: 0 0 7px !important;
    border: 1px solid #d3e6f3 !important;
    border-radius: 10px !important;
    background: #fff !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    padding: 0 !important;
    border: 0 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td.ledger-title {
    display: block !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-title > strong {
    margin-bottom: 5px !important;
    white-space: normal !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(70px, 1fr) minmax(58px, .8fr) auto auto auto !important;
    gap: 4px !important;
    align-items: center !important;
    margin-top: 4px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-chip,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-status,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    min-width: 0 !important;
    min-height: 25px !important;
    padding: 3px 5px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    color: #a33b3b !important;
    background: #fff7f7 !important;
    border: 1px solid #f0b8b8 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    top: 0 !important;
    min-height: 36px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 36px !important;
    display: flex !important;
    gap: 5px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
    min-width: 86px !important;
    flex: 0 0 auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-preview {
    top: 76px !important;
    display: block !important;
    padding: 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-title-cell {
    grid-column: 1 / -1 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
    min-height: 30px !important;
    padding: 3px 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 138px !important;
    overflow-x: auto !important;
    grid-template-columns: repeat(6, 76px) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 188px !important;
    grid-template-columns: 1fr !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head {
    grid-template-columns: 1fr !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links {
    display: flex !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    min-height: 28px !important;
    padding: 4px 3px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
    min-height: 28px !important;
    padding: 3px 4px !important;
    font-size: 9.6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
    min-height: 430px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell iframe {
    min-height: 390px !important;
  }
}

/* 2026-07-19 v13: final override placed at EOF so it wins over legacy/mobile rules. */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 180 !important;
  min-height: 40px !important;
  padding: 6px 0 !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky !important;
  top: 40px !important;
  z-index: 179 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 6px !important;
  background: #f6fbff !important;
  border-bottom: 1px solid #cfe1ee !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 30px !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip span {
  font-size: 11px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 18px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-preview {
  position: sticky !important;
  top: 84px !important;
  z-index: 178 !important;
  display: grid !important;
  grid-template-columns: 104px minmax(0, 1fr) !important;
  gap: 6px !important;
  align-items: stretch !important;
  min-height: 0 !important;
  padding: 6px !important;
  border-radius: 0 !important;
  border-width: 1px 0 !important;
  background: #fff9df !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  display: flex !important;
  align-items: center !important;
  color: #4f6478 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  display: grid !important;
  grid-template-columns:
    minmax(120px, .9fr)
    minmax(92px, .65fr)
    minmax(260px, 2.4fr)
    minmax(100px, .7fr)
    minmax(110px, .85fr)
    minmax(86px, .6fr)
    minmax(78px, .55fr) !important;
  gap: 4px !important;
  min-width: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-width: 0 !important;
  padding: 5px 7px !important;
  border: 1px solid #cfe1ee !important;
  border-radius: 8px !important;
  background: #fff !important;
  display: grid !important;
  align-content: center !important;
  gap: 2px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span {
  color: #60758b !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell small {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #052b46 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell small {
  color: #60758b !important;
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: 134px !important;
  z-index: 177 !important;
  min-height: 48px !important;
  padding: 6px 10px !important;
  border-radius: 0 !important;
  background: #083956 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step {
  min-height: 34px !important;
  gap: 3px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step .step-number {
  width: 24px !important;
  height: 24px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step .step-label {
  font-size: 11px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: 182px !important;
  z-index: 176 !important;
  min-height: 44px !important;
  padding: 6px 10px !important;
  border-radius: 0 !important;
  display: grid !important;
  grid-template-columns: 150px minmax(0, 1fr) !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-current {
  min-height: 34px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-current span {
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-current strong {
  font-size: 20px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-actions {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-btn {
  min-height: 30px !important;
  padding: 4px 7px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  table-layout: fixed !important;
  width: 100% !important;
  min-width: 0 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 5px 6px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 188px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 96px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 104px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 112px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 78px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 72px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 96px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(0, 82px) minmax(0, 90px) !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit-input,
body:not(.home-mode):not(.purchase-mode) .ledger-order-input {
  min-height: 28px !important;
  padding: 3px 6px !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-delete {
  min-height: 28px !important;
  padding: 4px 7px !important;
  font-size: 11px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .input-group,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .feature-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .optics-card {
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .check-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .inspection-option,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-button {
  min-height: 32px !important;
  padding: 5px 8px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  line-height: 1.12 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card {
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card h3 {
  font-size: 16px !important;
  margin-bottom: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card p {
  margin: 0 0 6px !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
  align-items: stretch !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 28px !important;
  padding: 4px 6px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-queue-analyze,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-queue-analyze:not(:disabled) {
  background: #fee2e2 !important;
  border-color: #dc2626 !important;
  color: #991b1b !important;
  font-weight: 900 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  min-height: 32px !important;
  padding: 4px 6px !important;
  font-size: 11.5px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  text-overflow: clip !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  padding: 10px !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
  margin: 0 !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 132px)) !important;
  justify-content: end !important;
  gap: 6px !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy {
  min-width: 0 !important;
  width: 100% !important;
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-hidden-source,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-textarea.live-hidden-source,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-html-output.live-hidden-source {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  margin-top: 0 !important;
  min-height: 680px !important;
  padding: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell iframe {
  min-height: 640px !important;
}

@media (max-width: 760px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    min-height: 36px !important;
    padding: 4px 0 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 36px !important;
    gap: 4px !important;
    padding: 4px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
    min-width: 88px !important;
    min-height: 28px !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-preview {
    top: 72px !important;
    grid-template-columns: 1fr !important;
    gap: 4px !important;
    padding: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-title-cell {
    grid-column: 1 / -1 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
    padding: 4px 5px !important;
    border-radius: 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span {
    font-size: 9px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell small {
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 136px !important;
    min-height: 42px !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 178px !important;
    min-height: 42px !important;
    padding: 5px 6px !important;
    grid-template-columns: 92px minmax(0, 1fr) !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-current strong {
    font-size: 17px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-btn {
    min-height: 28px !important;
    padding: 3px 5px !important;
    font-size: 11px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    grid-template-columns: minmax(68px, 1fr) minmax(56px, .85fr) auto auto auto !important;
    gap: 3px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-chip,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-status,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    min-height: 23px !important;
    padding: 3px 4px !important;
    font-size: 9.5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .check-button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .inspection-option,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-button {
    min-height: 30px !important;
    padding: 4px 6px !important;
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    min-height: 26px !important;
    padding: 3px 2px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
    min-height: 29px !important;
    padding: 3px 3px !important;
    font-size: 9.8px !important;
    line-height: 1.08 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
    min-height: 460px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell iframe {
    min-height: 430px !important;
  }
}

/* 20260718 editor sticky/compact enforcement */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor {
  overflow: visible !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky !important;
  top: 0 !important;
  z-index: 3000 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 5px 6px !important;
  background: rgba(239, 249, 255, .99) !important;
  border-bottom: 1px solid #c8dfef !important;
  box-shadow: 0 4px 12px rgba(17, 64, 97, .08) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 4px !important;
  min-width: 0 !important;
  min-height: 34px !important;
  padding: 5px 8px !important;
  border: 1px solid #c8dfef !important;
  border-radius: 7px !important;
  background: #fff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
  color: #526c82 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 18px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  position: sticky !important;
  top: 45px !important;
  z-index: 2990 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 6px 10px !important;
  border-radius: 0 !important;
  border-top: 1px solid rgba(233, 211, 128, .95) !important;
  border-bottom: 1px solid rgba(233, 211, 128, .95) !important;
  background: rgba(255, 249, 220, .99) !important;
  box-shadow: 0 6px 14px rgba(17, 64, 97, .1) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar > div {
  min-width: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar span {
  display: block !important;
  margin-bottom: 1px !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
  color: #526c82 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 17px !important;
  line-height: 1.18 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(74px, auto)) !important;
  gap: 6px !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl > div {
  min-width: 0 !important;
  padding: 5px 7px !important;
  border: 1px solid #c8dfef !important;
  border-radius: 7px !important;
  background: #fff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dt {
  font-size: 10px !important;
  line-height: 1 !important;
  color: #6c8296 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dd {
  overflow: hidden !important;
  margin: 2px 0 0 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: 95px !important;
  z-index: 2980 !important;
  min-height: 38px !important;
  padding: 5px 6px !important;
  background: #083657 !important;
  border-bottom: 1px solid rgba(12, 165, 211, .8) !important;
  box-shadow: 0 6px 14px rgba(5, 35, 56, .18) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step {
  min-height: 28px !important;
  gap: 2px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-number {
  width: 22px !important;
  height: 22px !important;
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-label {
  font-size: 10px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: 133px !important;
  z-index: 2970 !important;
  min-height: 44px !important;
  padding: 6px 10px !important;
  background: rgba(246, 252, 255, .99) !important;
  border-bottom: 1px solid #c8dfef !important;
  box-shadow: 0 6px 14px rgba(17, 64, 97, .08) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global h2,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-title {
  font-size: 17px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-buttons,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-buttons button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
  min-height: 28px !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card {
  padding: 8px 10px !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-paste-hint,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .hint {
  display: -webkit-box !important;
  overflow: hidden !important;
  margin: 2px 0 4px !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 1 !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links {
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links a {
  min-height: 24px !important;
  padding: 3px 7px !important;
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
  align-items: stretch !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 28px !important;
  padding: 4px 5px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-selected-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result-preview {
  min-height: 46px !important;
  padding: 6px 8px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  min-width: 0 !important;
  min-height: 28px !important;
  padding: 4px 6px !important;
  border-radius: 7px !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  word-break: keep-all !important;
  font-size: 10.5px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-card .photo-url-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-card .photo-url-head p {
  margin: 2px 0 0 !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .primary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .secondary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .file-button {
  min-height: 28px !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions input {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-row {
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  gap: 5px !important;
  padding: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-row small,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-row .photo-hint {
  display: none !important;
}

@media (max-width: 760px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    grid-template-columns: repeat(5, minmax(64px, 1fr)) !important;
    gap: 4px !important;
    padding: 4px !important;
    overflow-x: visible !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
    min-height: 32px !important;
    padding: 4px 5px !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip span {
    font-size: 9px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
    font-size: 15px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 40px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 4px !important;
    min-height: 62px !important;
    padding: 5px 7px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar strong {
    font-size: 15px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl > div {
    padding: 4px 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dd {
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 108px !important;
    min-height: 36px !important;
    padding: 4px 3px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step {
    min-width: 58px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 144px !important;
    min-height: 76px !important;
    padding: 6px 7px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-buttons {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-buttons button {
    min-height: 28px !important;
    padding: 4px 5px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    min-height: 26px !important;
    padding: 3px 2px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
    min-height: 26px !important;
    padding: 3px 4px !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-card .photo-url-head {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .primary-btn,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .secondary-btn,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .file-button {
    min-height: 26px !important;
    padding: 3px 2px !important;
    font-size: 9px !important;
  }
}

/* Compact operational headers: preserve actions, reduce unused vertical hero space. */
.purchase-hero,
.hero-panel {
  min-height: 0 !important;
  padding: 14px 18px !important;
  gap: 14px !important;
  align-items: center !important;
}

.purchase-hero h1,
.hero-panel h2 {
  font-size: clamp(28px, 3.6vw, 42px) !important;
  line-height: 1.04 !important;
}

.purchase-hero .eyebrow,
.hero-panel .eyebrow {
  margin-bottom: 4px !important;
}

.purchase-hero p:last-child,
.hero-panel p:last-child {
  margin-top: 6px !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
}

.purchase-hero-actions,
.hero-actions {
  gap: 8px !important;
}

.purchase-hero-actions .home-primary-btn,
.purchase-hero-actions .home-secondary-btn,
.hero-actions .primary-pill,
.hero-actions .outline-pill {
  min-height: 42px !important;
  padding: 10px 16px !important;
}

@media (max-width: 760px) {
  .purchase-hero,
  .hero-panel {
    padding: 12px !important;
  }

  .purchase-hero h1,
  .hero-panel h2 {
    font-size: 28px !important;
  }

  .purchase-hero p:last-child,
  .hero-panel p:last-child {
    display: none;
  }
}

@media (max-width: 520px) {
  .home-screen {
    padding: 10px 9px 18px;
  }

  .home-shell {
    gap: 8px;
  }

  .home-hero {
    padding: 10px;
    border-radius: 13px;
  }

  .home-hero > p {
    display: none;
  }

  .home-brand-row {
    gap: 8px;
  }

  .home-brand-row .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    font-size: 16px;
  }

  .home-hero h1 {
    font-size: 24px;
    line-height: 1.05;
  }

  .home-hero-tags {
    gap: 5px;
    margin-top: 8px;
  }

  .home-hero-tags span {
    min-height: 27px;
    padding: 4px 9px;
    font-size: 12px;
  }

  .home-brand-tools,
  .home-research-grid {
    gap: 7px;
  }

  .home-tool-group {
    padding: 8px;
    border-radius: 13px;
  }

  .home-tool-group-head {
    display: none;
  }

  .home-menu-grid,
  .home-menu-grid.compact,
  .home-menu-grid.compact.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .home-menu-grid.compact .home-card {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 86px;
    padding: 8px;
    gap: 7px;
    border-radius: 11px;
  }

  .home-menu-grid.compact .home-card::after {
    opacity: .45;
    right: 8px;
    bottom: 8px;
    width: 84px;
    height: 28px;
  }

  .home-menu-grid.compact .home-card > .home-card-kicker,
  .home-menu-grid.compact .home-card p {
    display: none;
  }

  .home-menu-grid.compact .home-card h3 {
    min-width: 0;
    margin: 0;
    font-size: 17px;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .home-menu-grid.compact .home-card .home-primary-btn {
    width: auto;
    min-width: 92px;
    height: 30px;
    min-height: 30px;
    justify-self: start;
    padding: 0 9px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .home-research-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .home-finder-strip,
  .home-finder-desk {
    padding: 9px;
    border-radius: 11px;
    gap: 7px;
  }

  .home-finder-strip .home-card-kicker,
  .home-finder-desk .home-card-kicker {
    display: none;
  }

  .home-finder-strip strong,
  .home-finder-desk-head strong {
    font-size: 18px;
    line-height: 1.15;
  }

  .home-finder-strip .home-field,
  .home-finder-builder .home-field {
    gap: 4px;
    font-size: 12px;
  }

  .home-finder-strip input,
  .home-finder-builder input {
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 14px;
  }

  .home-finder-strip .home-primary-btn,
  .home-finder-desk .home-secondary-btn {
    height: 31px;
    min-height: 31px;
    padding: 0 9px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.1;
  }

  .home-finder-desk-head {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
  }

  .home-finder-desk-head .home-secondary-btn {
    min-width: 58px;
  }

  .home-finder-builder {
    gap: 6px;
  }

  .home-finder-builder .home-secondary-btn {
    width: 100%;
  }

  .home-finder-strip .home-primary-btn {
    width: auto;
    min-width: 92px;
    justify-self: start;
  }
}

@media (min-width: 901px) {
  .editor > .sync-panel {
    position: relative;
    top: auto;
    z-index: 34;
  }

  .listing-context-bar {
    position: sticky;
    top: 0;
    z-index: 33;
  }

  .editor > .stepper {
    position: sticky;
    top: 86px;
    z-index: 32;
  }

  .editor > .listing-status-panel--global {
    position: sticky;
    top: 154px;
    z-index: 31;
  }

  .top-step-nav {
    top: 210px;
    z-index: 30;
  }
}

@media (max-width: 520px) {
  .home-screen {
    padding: 10px 9px 18px;
  }

  .home-shell {
    gap: 8px;
  }

  .home-hero {
    padding: 10px;
    border-radius: 13px;
  }

  .home-hero > p {
    display: none;
  }

  .home-brand-row {
    gap: 8px;
  }

  .home-brand-row .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    font-size: 16px;
  }

  .home-hero h1 {
    font-size: 24px;
    line-height: 1.05;
  }

  .home-hero-tags {
    gap: 5px;
    margin-top: 8px;
  }

  .home-hero-tags span {
    min-height: 27px;
    padding: 4px 9px;
    font-size: 12px;
  }

  .home-brand-tools,
  .home-research-grid {
    gap: 7px;
  }

  .home-tool-group {
    padding: 8px;
    border-radius: 13px;
  }

  .home-tool-group-head {
    display: none;
  }

  .home-menu-grid,
  .home-menu-grid.compact,
  .home-menu-grid.compact.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .home-menu-grid.compact .home-card {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 86px;
    padding: 8px;
    gap: 7px;
    border-radius: 11px;
  }

  .home-menu-grid.compact .home-card::after {
    opacity: .45;
    right: 8px;
    bottom: 8px;
    width: 84px;
    height: 28px;
  }

  .home-menu-grid.compact .home-card > .home-card-kicker,
  .home-menu-grid.compact .home-card p {
    display: none;
  }

  .home-menu-grid.compact .home-card h3 {
    min-width: 0;
    margin: 0;
    font-size: 17px;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .home-menu-grid.compact .home-card .home-primary-btn {
    width: 100%;
    min-height: 30px;
    padding: 5px 6px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .home-research-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .home-finder-strip,
  .home-finder-desk {
    padding: 9px;
    border-radius: 11px;
    gap: 7px;
  }

  .home-finder-strip .home-card-kicker,
  .home-finder-desk .home-card-kicker {
    display: none;
  }

  .home-finder-strip strong,
  .home-finder-desk-head strong {
    font-size: 18px;
    line-height: 1.15;
  }

  .home-finder-strip .home-field,
  .home-finder-builder .home-field {
    gap: 4px;
    font-size: 12px;
  }

  .home-finder-strip input,
  .home-finder-builder input {
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 14px;
  }

  .home-finder-strip .home-primary-btn,
  .home-finder-desk .home-secondary-btn {
    min-height: 31px;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.1;
  }

  .home-finder-desk-head {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
  }

  .home-finder-desk-head .home-secondary-btn {
    min-width: 58px;
  }

  .home-finder-builder {
    gap: 6px;
  }

  .home-finder-builder .home-secondary-btn {
    width: 100%;
  }
}

/* Production listing layout: keep the creation workflow visible above the fold. */
.shell {
  margin-top: 10px;
}

.hero-panel {
  min-height: 0;
  padding: 16px 20px;
  border-radius: 14px;
  gap: 16px;
}

.hero-panel .eyebrow {
  margin-bottom: 4px;
  font-size: 11px;
}

.hero-panel h2 {
  font-size: clamp(28px, 3.1vw, 42px);
  line-height: 1.08;
}

.hero-panel p:last-child {
  margin-top: 6px;
  font-size: 14px;
}

.hero-actions {
  gap: 8px;
  min-width: min(100%, 460px);
}

.primary-pill,
.outline-pill {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
}

.status-grid {
  margin: 8px 0 10px;
  gap: 8px;
}

.status-grid article {
  min-height: 72px;
  padding: 9px 12px;
}

.status-grid strong {
  margin-top: 3px;
  font-size: 21px;
  line-height: 1.15;
}

.ledger-panel {
  margin-bottom: 12px;
}

.ledger-head {
  padding: 9px 12px;
}

.ledger-head .eyebrow {
  display: none;
}

.ledger-head h3 {
  font-size: 18px;
  line-height: 1.15;
}

.ledger-summary {
  margin-top: 2px;
}

.ledger-head-actions p {
  max-width: 520px;
}

.workspace {
  gap: 14px;
}

.sync-panel {
  padding-block: 7px;
}

.stepper {
  padding-block: 8px;
}

@media (max-width: 900px) {
  .hero-panel {
    display: grid;
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 10px;
  }

  .hero-panel h2 {
    font-size: clamp(26px, 7vw, 34px);
    line-height: 1.12;
  }

  .hero-panel p:last-child {
    font-size: 12px;
  }

  .hero-actions {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100%, calc(100% - 16px));
    margin-top: 8px;
  }

  .hero-panel {
    padding: 10px;
    border-radius: 12px;
  }

  .hero-panel h2 {
    font-size: 24px;
    line-height: 1.12;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .hero-panel p:last-child {
    display: none;
  }

  .hero-actions {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .primary-pill,
  .outline-pill {
    min-height: 38px;
    padding: 7px 8px;
    border-radius: 10px;
    font-size: 11px;
  }

  .status-grid {
    gap: 6px;
    margin: 7px 0 8px;
  }

  .status-grid article {
    min-height: 66px;
    padding: 8px;
  }

  .ledger-head {
    gap: 8px;
    padding: 12px;
  }

  .ledger-head-actions {
    gap: 8px;
  }

  .ledger-head-actions p {
    font-size: 11px;
    line-height: 1.45;
  }
}

@media (max-width: 520px) {
  .mobile-home-btn {
    display: none;
  }

  .status-grid {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
  }

  .status-grid article {
    flex: 0 0 128px;
    min-height: 58px;
    scroll-snap-align: start;
  }

  .status-grid span {
    font-size: 10px;
  }

  .status-grid strong {
    font-size: 18px;
  }

  .ledger-head-actions p {
    display: none;
  }

  .sync-panel {
    padding: 8px 10px;
  }

  .sync-note {
    display: none;
  }
}

@media (max-width: 520px) {
  .home-menu-grid.compact .home-card .home-primary-btn {
    width: auto;
    min-width: 92px;
    height: 30px;
    min-height: 30px;
    justify-self: start;
    padding: 0 9px;
  }

  .home-finder-strip .home-primary-btn {
    width: auto;
    min-width: 92px;
    height: 31px;
    min-height: 31px;
    justify-self: start;
    padding: 0 9px;
  }

  .home-finder-desk .home-secondary-btn {
    height: 31px;
    min-height: 31px;
    padding: 0 9px;
  }
}

@media (max-width: 520px) {
  .home-brand-tools,
  .home-research-grid {
    gap: 7px;
  }

  .home-tool-group {
    padding: 8px;
  }

  .home-tool-group-head {
    display: none;
  }

  .home-menu-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .home-menu-grid.compact .home-card {
    min-height: 92px;
    padding: 9px;
    gap: 7px;
  }

  .home-menu-grid.compact .home-card h3 {
    font-size: 16px;
    line-height: 1.1;
  }

  .home-menu-grid.compact .home-card .home-primary-btn {
    min-height: 30px;
    padding: 5px 7px;
    font-size: 11px;
    border-radius: 8px;
  }

  .home-research-grid {
    grid-template-columns: 1fr;
  }

  .home-research-grid .home-card-kicker,
  .home-finder-strip .home-card-kicker,
  .home-finder-desk .home-card-kicker {
    display: none;
  }

  .home-finder-strip,
  .home-finder-desk {
    padding: 10px;
  }

  .home-finder-strip strong,
  .home-finder-desk-head strong {
    font-size: 17px;
    line-height: 1.15;
  }

  .home-finder-strip .home-primary-btn,
  .home-finder-desk .home-secondary-btn {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 12px;
    border-radius: 8px;
  }

  .home-finder-desk-head {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .home-finder-builder {
    gap: 6px;
  }

  .home-finder-builder .home-field {
    margin-top: 2px;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    linear-gradient(180deg, #e8f5ff 0%, #f8fcff 32%, #edf7ff 100%);
  color: var(--ink);
  font-family: var(--font-ui);
  letter-spacing: 0;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button, input, select, textarea {
  font: inherit;
}

h1, h2, h3, h4, strong {
  font-weight: 600;
}

button {
  cursor: pointer;
}

.home-screen {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  padding: 18px clamp(14px, 3.2vw, 34px) 36px;
  background:
    linear-gradient(180deg, #041020 0%, #061d37 36%, #0a3658 66%, #05101d 100%);
  color: #f5fbff;
}

.home-screen::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -2;
  height: 54%;
  background:
    linear-gradient(180deg, transparent 0%, rgba(4, 12, 26, .08) 15%, rgba(3, 10, 21, .96) 100%),
    linear-gradient(90deg,
      transparent 0 4%,
      rgba(6, 23, 43, .88) 4% 9%,
      transparent 10% 14%,
      rgba(8, 30, 54, .92) 14% 22%,
      transparent 22% 27%,
      rgba(4, 19, 38, .9) 27% 34%,
      transparent 34% 39%,
      rgba(7, 27, 49, .94) 39% 51%,
      transparent 51% 55%,
      rgba(5, 22, 43, .9) 55% 63%,
      transparent 63% 69%,
      rgba(9, 32, 58, .92) 69% 81%,
      transparent 81% 86%,
      rgba(5, 19, 36, .9) 86% 96%,
      transparent 96% 100%);
}

.home-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(126, 218, 255, .18) 8% 8.25%, transparent 8.25% 100%),
    linear-gradient(90deg, transparent 0 50%, rgba(191, 152, 66, .2) 50% 50.18%, transparent 50.18% 100%),
    repeating-linear-gradient(90deg,
      transparent 0 28px,
      rgba(130, 210, 255, .12) 28px 30px,
      transparent 30px 54px,
      rgba(255, 197, 93, .1) 54px 56px,
      transparent 56px 86px),
    repeating-linear-gradient(0deg,
      transparent 0 26px,
      rgba(138, 211, 255, .08) 26px 28px,
      transparent 28px 58px),
    linear-gradient(120deg, rgba(11, 77, 125, .3), transparent 42%, rgba(191, 152, 66, .14) 82%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 43%, #000 66%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, transparent 43%, #000 66%, #000 100%);
  opacity: .86;
}

body.home-mode .app-header,
body.home-mode .shell,
body.home-mode .purchase-screen {
  display: none;
}

body:not(.home-mode) .home-screen {
  display: none;
}

body.purchase-mode .shell,
body.purchase-mode .home-screen {
  display: none;
}

body:not(.home-mode) .app-header {
  display: none;
}

body:not(.purchase-mode) .purchase-screen {
  display: none;
}

.home-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.home-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(5, 16, 34, .95) 0%, rgba(7, 39, 72, .88) 56%, rgba(10, 92, 132, .8) 100%);
  color: #fff;
  border: 1px solid rgba(174, 222, 255, .3);
  border-radius: 18px;
  padding: 24px 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .36), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(14px);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #7dd3fc, #bf9842 54%, #21a4d8);
}

.home-hero::after {
  content: "";
  position: absolute;
  right: 24px;
  bottom: 20px;
  width: min(340px, 34%);
  height: 72px;
  opacity: .55;
  background:
    linear-gradient(90deg, transparent 0 6%, rgba(125, 211, 252, .45) 6% 7%, transparent 7% 18%, rgba(191, 152, 66, .48) 18% 19%, transparent 19% 35%, rgba(125, 211, 252, .38) 35% 36%, transparent 36% 100%),
    linear-gradient(180deg, transparent 0 52%, rgba(125, 211, 252, .22) 52% 55%, transparent 55% 100%);
  pointer-events: none;
}

.home-brand-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-screen .brand-mark {
  background: linear-gradient(145deg, rgba(255,255,255,.2), rgba(191, 152, 66, .28));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 12px 26px rgba(0,0,0,.25);
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(31px, 3.4vw, 46px);
  line-height: 1.18;
  text-shadow: 0 12px 28px rgba(0, 0, 0, .28);
}

.home-hero > p {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  color: #d8efff;
  font-size: 15px;
  max-width: 900px;
}

.home-hero-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.home-hero-tags span {
  border: 1px solid rgba(185, 225, 255, .24);
  border-radius: 999px;
  background: rgba(4, 20, 41, .42);
  color: #e3f5ff;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 600;
}

.home-finder-strip {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(150px, .42fr) minmax(340px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(161, 213, 248, .24);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(11, 45, 78, .9), rgba(7, 22, 42, .8)),
    linear-gradient(90deg, rgba(191, 152, 66, .18), transparent 34%);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
}

.home-finder-strip > div {
  display: grid;
  gap: 7px;
}

.home-finder-strip strong {
  color: #f7fbff;
  font-size: 20px;
  line-height: 1.2;
}

.home-finder-desk {
  position: relative;
  z-index: 10;
  display: grid;
  gap: 12px;
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(161, 213, 248, .18);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(7, 28, 52, .76), rgba(7, 20, 37, .6));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(12px);
}

.home-finder-desk-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.home-finder-desk-head > div {
  display: grid;
  gap: 7px;
}

.home-finder-desk-head strong {
  color: #f7fbff;
  font-size: 18px;
}

.home-finder-builder {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  align-items: end;
  gap: 10px;
}

.home-keyword-ideas,
.home-keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
}

.home-keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  border: 1px solid rgba(166, 218, 255, .22);
  border-radius: 999px;
  background: rgba(4, 15, 31, .58);
  color: #e9f7ff;
  padding: 7px 9px 7px 12px;
  font-size: 12px;
  font-weight: 600;
}

.home-keyword-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-keyword-chip button {
  border: 0;
  border-radius: 999px;
  background: rgba(14, 165, 216, .22);
  color: #e9f7ff;
  min-width: 28px;
  height: 26px;
  padding: 0 9px;
  font-weight: 700;
}

.home-keyword-chip button:hover,
.home-keyword-chip button:focus {
  background: rgba(14, 165, 216, .38);
}

.home-keyword-chip .keyword-remove {
  background: rgba(248, 113, 113, .14);
  color: #fecaca;
}

.home-menu-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.home-brand-tools {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.home-research-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.home-tool-group {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid rgba(161, 213, 248, .2);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(8, 28, 52, .72), rgba(5, 17, 34, .54));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(12px);
}

.home-tool-group::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #7dd3fc, #bf9842, #14b8a6);
}

.home-tool-group-camera::before {
  background: linear-gradient(90deg, #7dd3fc, #bf9842);
}

.home-tool-group-tcg::before {
  background: linear-gradient(90deg, #14b8a6, #48b8e2);
}

.home-tool-group-research::before {
  background: linear-gradient(90deg, #4ba3d5, #234966);
}

.home-tool-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.home-tool-group-head h2 {
  margin: 0;
  color: #f7fbff;
  font-size: 20px;
  line-height: 1.25;
}

.home-menu-grid.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
}

.home-menu-grid.compact.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-menu-grid.compact.single {
  grid-template-columns: minmax(0, 1fr);
}

.home-research-grid .home-finder-strip,
.home-research-grid .home-finder-desk {
  margin-top: 0;
}

.home-research-grid .home-finder-strip {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.home-research-grid .home-finder-strip .home-primary-btn {
  grid-column: auto;
}

.home-research-grid .home-finder-builder {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.home-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(12, 37, 66, .9), rgba(7, 20, 39, .82));
  border: 1px solid rgba(161, 213, 248, .26);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 52px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255,255,255,.09);
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: auto;
  min-height: auto;
  color: #f7fbff;
  backdrop-filter: blur(12px);
}

.home-card > * {
  position: relative;
  z-index: 1;
}

.home-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--blue);
}

.home-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 12px auto;
  width: 118px;
  height: 42px;
  opacity: .38;
  background:
    repeating-linear-gradient(90deg, rgba(125, 211, 252, .34) 0 2px, transparent 2px 13px),
    linear-gradient(180deg, transparent 0 72%, rgba(191, 152, 66, .24) 72% 76%, transparent 76%);
  pointer-events: none;
}

.home-card-primary {
  background:
    linear-gradient(180deg, rgba(13, 48, 84, .86) 0%, rgba(8, 24, 48, .78) 100%);
}

.home-card-listing {
  border-color: #b9d9ec;
}

.home-card-listing::before {
  background: linear-gradient(90deg, #0ea5d8, #7dd3fc);
}

.home-card-create::before {
  background: linear-gradient(90deg, #7dd3fc, #bf9842);
}

.home-card-purchase::before {
  background: linear-gradient(90deg, #bf9842, #48b8e2);
}

.home-card-tcg::before {
  background: linear-gradient(90deg, #14b8a6, #e5b853);
}

.home-card-finance::before {
  background: linear-gradient(90deg, #22c55e, #7dd3fc);
}

.home-card-profit::before {
  background: linear-gradient(90deg, #e5b853, #70c9eb);
}

.home-card-kicker {
  width: fit-content;
  border-radius: 999px;
  background: rgba(111, 194, 239, .18);
  color: #bcecff;
  padding: 5px 10px 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  border: 1px solid rgba(125, 211, 252, .14);
}

.home-card h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.25;
}

.home-card h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
}

.home-card p {
  margin: 0;
  color: #c7e3f3;
  font-size: 12px;
  line-height: 1.42;
}

.home-action-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.camera-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-field {
  position: relative;
  color: #c5def0;
  font-size: 13px;
  font-weight: 600;
}

.home-field input,
.home-field select {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  border: 1px solid rgba(166, 218, 255, .26);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(4, 15, 31, .78);
  color: #f7fbff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.home-field select {
  appearance: auto;
}

.home-field input::placeholder {
  color: rgba(214, 235, 249, .56);
}

.home-finder-suggestions {
  position: absolute;
  z-index: 60;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  display: none;
  max-height: 260px;
  overflow: auto;
  border: 1px solid rgba(166, 218, 255, .28);
  border-radius: 12px;
  background: rgba(4, 15, 31, .96);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .35);
}

.home-finder-suggestions.show {
  display: grid;
}

.home-finder-option {
  border: 0;
  border-bottom: 1px solid rgba(166, 218, 255, .12);
  background: transparent;
  color: #e9f7ff;
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
}

.home-finder-option:last-child {
  border-bottom: 0;
}

.home-finder-option:hover,
.home-finder-option:focus {
  background: rgba(14, 165, 216, .18);
}

.home-finder-option span {
  display: block;
  margin-top: 3px;
  color: #93b9d0;
  font-size: 11px;
}

.home-card-actions {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
  gap: 10px;
}

.home-primary-btn,
.home-secondary-btn,
.mobile-home-btn {
  border: 0;
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 14px;
  font-weight: 600;
}

.home-primary-btn {
  background: linear-gradient(135deg, #16b7e6, #0f79b2);
  color: #fff;
  box-shadow: 0 14px 28px rgba(14, 165, 216, .28), inset 0 1px 0 rgba(255,255,255,.18);
}

.home-primary-btn:hover,
.home-primary-btn:focus {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(14, 165, 216, .36), inset 0 1px 0 rgba(255,255,255,.22);
}

.home-primary-btn:disabled,
.home-secondary-btn:disabled,
.ghost-btn:disabled,
.profile-btn:disabled {
  cursor: not-allowed;
  opacity: .48;
  filter: grayscale(.22);
  box-shadow: none;
}

.home-secondary-btn,
.mobile-home-btn {
  background: rgba(5, 20, 39, .62);
  color: #e8f7ff;
  border: 1px solid rgba(166, 218, 255, .28);
}

.danger-lite {
  color: #fee2e2;
  background: rgba(127, 29, 29, .42);
  border: 1px solid rgba(248, 113, 113, .26);
}

.mobile-home-btn {
  display: none;
  width: calc(100% - 24px);
  margin: 10px 12px;
}

.purchase-screen {
  min-height: calc(100vh - 88px);
  background: linear-gradient(180deg, #e8f5ff 0%, #f8fcff 42%, #eef8fe 100%);
  padding: 18px clamp(14px, 3vw, 34px) 36px;
}

.purchase-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.purchase-hero {
  background:
    linear-gradient(135deg, rgba(6,47,79,.98), rgba(23,77,115,.94)),
    radial-gradient(circle at 86% 16%, rgba(14,165,216,.24), transparent 34%);
  color: #fff;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 0 18px 44px rgba(6, 47, 79, .16);
}

.purchase-hero .eyebrow {
  color: #e7d39c;
}

.purchase-hero h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
}

.purchase-hero p:last-child {
  margin: 8px 0 0;
  color: #d7e9f5;
  font-size: 14px;
}

.purchase-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.purchase-status-grid {
  margin: 12px 0 14px;
}

.purchase-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}

.purchase-kpi-grid article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  box-shadow: 0 10px 24px rgba(30, 93, 145, .07);
}

.purchase-kpi-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.purchase-kpi-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 25px;
}

.purchase-sync-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 8px 10px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 10px;
  box-shadow: 0 8px 18px rgba(30, 93, 145, .06);
}

.purchase-sync-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.purchase-sync-head strong {
  color: var(--navy);
  font-size: 14px;
}

.purchase-sync-head span {
  color: var(--muted);
  font-size: 12px;
}

.purchase-db-scope {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(188, 214, 235, .9);
  border-radius: 9px;
  background: #eff8ff;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.purchase-db-scope strong {
  color: var(--navy);
  font-size: 12px;
}

.purchase-report-links {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
}

.purchase-report-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--navy);
  background: #f8fcff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.purchase-maintenance-details {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(188, 214, 235, .7);
  padding-top: 7px;
}

.purchase-maintenance-details summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.purchase-maintenance-body {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 7px;
}

.purchase-sync-panel label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.purchase-sync-panel input {
  min-height: 40px;
  border-width: 1px;
}

.purchase-sync-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.purchase-sync-actions .primary-btn,
.purchase-sync-actions .secondary-btn {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 12px;
  white-space: nowrap;
}

.listing-audit {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(188, 214, 235, .9);
  border-radius: 10px;
  background: #f8fcff;
  padding: 10px;
}

.listing-audit[hidden] {
  display: none;
}

.listing-audit-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--navy);
  font-weight: 900;
}

.listing-audit-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.listing-audit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.listing-audit-grid div {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 8px;
}

.listing-audit-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.listing-audit-grid strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
}

.listing-audit-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
}

.listing-audit-list li {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-audit-list.long li {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.5;
}

.listing-audit-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.listing-audit-details {
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.listing-audit-details summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 900;
  font-size: 12px;
}

.listing-audit-ok {
  color: #08725b;
  font-weight: 900;
}

.listing-audit-warn {
  color: #9f2416;
  font-weight: 900;
}

.purchase-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.purchase-list-panel {
  order: 2;
}

.purchase-form-panel {
  order: 1;
  position: sticky;
  top: 8px;
  z-index: 24;
}

.purchase-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(30, 93, 145, .09);
  padding: 16px;
}

.purchase-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.purchase-panel-search {
  min-width: min(360px, 100%);
  flex: 0 1 420px;
}

.purchase-panel-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.purchase-new-condition-btn {
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
}

.purchase-secondary-summary {
  display: none !important;
}

.purchase-store-fields {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #bfdcf1;
  border-radius: 14px;
  background: #f5fbff;
}

.purchase-store-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.purchase-store-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
}

.purchase-store-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.purchase-catalog-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef7ff;
}

.purchase-catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.purchase-catalog-toolbar .purchase-catalog-tabs {
  margin: 0;
}

.purchase-high-turnover-import {
  min-height: 38px;
  padding: 8px 14px;
  white-space: nowrap;
}

.purchase-stock-refresh-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.purchase-stock-refresh-controls button {
  min-height: 38px;
  white-space: nowrap;
}

#purchaseStockAggregationStatus.is-stale {
  color: #d97706;
}

.purchase-high-turnover-status {
  min-height: 18px;
  margin: -2px 0 8px;
  color: #176347;
  font-size: 12px;
  font-weight: 800;
}

.purchase-high-turnover-status:empty {
  display: none;
}

.purchase-high-turnover-status.error {
  color: #a62f2f;
}

.purchase-catalog-tab {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.purchase-catalog-tab.active {
  border-color: #b8d2e8;
  background: #fff;
  color: var(--navy);
  box-shadow: 0 6px 16px rgba(25, 83, 123, .12);
}

.purchase-sale-panel {
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf4;
  padding: 10px 12px;
}

.purchase-sale-panel summary {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.purchase-sale-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}

.purchase-sale-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.purchase-sale-grid textarea {
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  resize: vertical;
}

.purchase-sale-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  min-width: 120px;
}

.purchase-sale-status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.purchase-sale-results {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.purchase-sale-result {
  display: grid;
  gap: 4px;
  border: 1px solid #edd491;
  border-radius: 11px;
  background: #fffaf0;
  padding: 9px 10px;
}

.purchase-sale-result strong,
.purchase-sale-result span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-sale-result strong {
  color: var(--ink);
  font-size: 13px;
}

.purchase-sale-result span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.purchase-sale-result-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 3px;
}

.purchase-sale-result-actions button {
  min-height: 32px;
  padding: 6px 11px;
  font-size: 11px;
}

.purchase-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.purchase-form-grid .wide-label {
  grid-column: span 2;
}

.purchase-store-fields .purchase-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.purchase-form-panel {
  padding: 12px;
}

.purchase-form-panel .purchase-panel-head {
  margin-bottom: 8px;
}

.purchase-form-panel .purchase-panel-head h2 {
  font-size: 20px;
}

.purchase-form-panel .purchase-form-grid input,
.purchase-form-panel .purchase-form-grid select,
.purchase-form-panel .purchase-form-grid textarea {
  padding: 8px 10px;
}

.purchase-form-panel .purchase-form-grid textarea {
  min-height: 44px;
}

.purchase-form-panel .purchase-store-fields {
  margin: 10px 0 8px;
  padding: 10px;
}

.purchase-target-csv-panel {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 11px;
  border: 1px solid #bfd7e9;
  border-radius: 12px;
  background: #f4faff;
}

.purchase-target-csv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.purchase-target-csv-head > div:first-child {
  display: grid;
  gap: 2px;
}

.purchase-target-csv-head strong {
  color: var(--navy);
  font-size: 14px;
}

.purchase-target-csv-head span,
.purchase-target-csv-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.purchase-target-csv-actions,
.purchase-target-csv-confirm-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.purchase-target-csv-actions button,
.purchase-target-csv-confirm-actions button {
  min-height: 34px;
  padding: 6px 10px;
  white-space: nowrap;
}

.purchase-target-csv-note,
.purchase-target-csv-status {
  margin: 0;
}

.purchase-target-csv-status {
  min-height: 16px;
  color: #176347;
  font-size: 12px;
  font-weight: 800;
}

.purchase-target-csv-status:empty {
  display: none;
}

.purchase-target-csv-status.error,
.purchase-target-csv-preview li.error {
  color: #a62f2f;
}

.purchase-target-csv-preview {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #a9cbe2;
  border-radius: 10px;
  background: #fff;
}

.purchase-target-csv-preview[hidden] {
  display: none;
}

.purchase-target-csv-preview ul {
  max-height: 150px;
  margin: 0;
  padding-left: 20px;
  overflow: auto;
  color: var(--muted);
  font-size: 11px;
}

.purchase-target-csv-preview li.warning {
  color: #8a5a00;
}

.purchase-form-mode {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fcff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.purchase-advanced-fields {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fcff;
  padding: 9px 10px;
}

.purchase-advanced-fields summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.purchase-advanced-fields .purchase-form-grid {
  margin-top: 10px;
}

.purchase-form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.purchase-form-actions button {
  min-height: 40px;
  white-space: nowrap;
}

.purchase-form-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.purchase-form-grid input,
.purchase-form-grid select,
.purchase-form-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfdff;
  color: var(--ink);
  padding: 10px 11px;
}

.purchase-form-grid input[readonly] {
  background: #edf7ff;
  border-color: #a8d3ef;
  color: var(--ink);
  font-weight: 800;
}

.purchase-form-grid textarea {
  min-height: 76px;
  resize: vertical;
}

.purchase-add-btn {
  width: 100%;
  margin-top: 12px;
}

.purchase-search-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: end;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fcff;
}

.purchase-search-panel.research-catalog-mode .purchase-filter-group {
  display: none;
}

.purchase-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: 44px;
  padding: 5px;
  border: 1px solid #b9d3e8;
  border-radius: 14px;
  background: #eef7ff;
  white-space: nowrap;
  flex-wrap: nowrap;
  overflow: hidden;
}

.purchase-filter-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 0 1px;
}

.purchase-filter-divider {
  width: 1px;
  align-self: stretch;
  background: #b9d3e8;
  margin: 4px 2px;
}

.purchase-search-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.purchase-search-field input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #082438;
  caret-color: #082438;
  padding: 8px 10px;
}

.purchase-search-field input::placeholder {
  color: #496579;
  opacity: 1;
}

#purchaseStockAggregationStatus {
  color: #f2f8fc;
  font-weight: 900;
}

.purchase-check {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  word-break: keep-all;
}

.purchase-check input {
  width: 13px;
  height: 13px;
  margin: 0;
}

.purchase-clear-filters {
  min-width: 32px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.purchase-clear-filters:disabled {
  opacity: .48;
  cursor: default;
}

.purchase-list {
  display: grid;
  gap: 10px;
}

.purchase-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--blue-card);
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.purchase-row.empty {
  grid-template-columns: 1fr;
  align-items: start;
}

.purchase-row.empty strong,
.purchase-row.empty span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.purchase-row-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  min-width: 0;
  margin-top: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.purchase-detail-line {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-filter-summary {
  margin: 8px 8px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.purchase-supplier-meta {
  display: block;
  min-width: 0;
  margin-top: 3px;
  color: #49647d;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-mall-comparison {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.purchase-mall-label {
  color: #6a7d8f;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.purchase-mall-chip {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 210px;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid #d5e3ec;
  border-radius: 999px;
  background: #fff;
  color: #49647d;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-mall-chip.best {
  border-color: #96d7be;
  background: #e9faf2;
  color: #086341;
}

.purchase-mall-chip.limit-within {
  border-color: #96d7be;
  background: #e9faf2;
  color: #086341;
}

.purchase-mall-chip.limit-over {
  border-color: #efcc86;
  background: #fff8e7;
  color: #795000;
}

.purchase-mall-chip.pending {
  border-color: #d5e3ec;
  background: #f4f8fb;
  color: #6a7d8f;
}

.purchase-row-details b {
  color: var(--navy);
  font-weight: 700;
  margin-left: 0;
}

.purchase-row.empty strong {
  font-size: 18px;
}

.purchase-row.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(74, 144, 217, .16);
}

.candidate-row {
  background: #fffdf5;
  border-color: #eadcae;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  padding: 10px 12px;
}

.candidate-row.candidate-adopted {
  background: #eefaf5;
  border-color: #b9dfcf;
}

.candidate-row.candidate-soldout,
.candidate-row.candidate-ignored {
  background: #f4f6f8;
  border-color: #d8e0e6;
  opacity: .78;
}

.purchase-row.research-error {
  border-color: #e8a8a8;
  background: #fff0f0;
  color: #993737;
}

.purchase-research-more-row {
  justify-items: start;
  border-style: dashed;
  background: #f8fcff;
}

.purchase-research-more-row .purchase-research-more {
  width: fit-content;
  min-height: 36px;
  margin-top: 2px;
  padding: 7px 14px;
  border: 1px solid #b8d2e8;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
}

.purchase-product-row.purchase-condition-out {
  border-color: #59636d;
  background: #323941;
  color: #f5f7f9;
}

.purchase-product-row.purchase-condition-out .purchase-row-meta,
.purchase-product-row.purchase-condition-out .purchase-row-note,
.purchase-product-row.purchase-condition-out .purchase-row-details,
.purchase-product-row.purchase-condition-out .purchase-row-details b {
  color: #d4dbe2;
}

.purchase-product-row.purchase-condition-out .purchase-unit-badge,
.purchase-product-row.purchase-condition-out .purchase-condition-badge {
  border-color: #707b86;
  background: #48515b;
  color: #f5f7f9;
}

.purchase-product-row.purchase-missing-url:not(.purchase-condition-out) {
  border-color: #b8c2cc;
  border-style: dashed;
  background: #f6f8fa;
}

.purchase-product-row.purchase-missing-url:not(.purchase-condition-out) .purchase-row-meta,
.purchase-product-row.purchase-missing-url:not(.purchase-condition-out) .purchase-row-note {
  color: #5c6b78;
}

.purchase-missing-url-label {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 3px 8px;
  border: 1px solid #b8c2cc;
  border-radius: 999px;
  background: #eef2f5;
  color: #31404d;
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}

.purchase-product-row {
  background: #fff;
  cursor: pointer;
}

.purchase-product-row:focus-visible {
  outline: 3px solid rgba(74, 144, 217, .36);
  outline-offset: 2px;
}

.purchase-intent-restock {
  border-color: #eed7a5;
  background: #fff8e8;
}

.purchase-intent-additional {
  border-color: #b9dfcf;
  background: #eefaf5;
}

.purchase-intent-new {
  border-color: #c8def0;
  background: #f4fbff;
}

.purchase-selected-product {
  background: #f2f8fd;
  border-color: #b9d3e8;
}

.purchase-product-row,
.purchase-selected-product {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.purchase-row-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.purchase-row-title {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.purchase-row-title strong {
  font-size: 15px;
  line-height: 1.35;
}

.purchase-row-meta,
.purchase-row-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-row-meta {
  display: block;
}

.purchase-target-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.purchase-target-metrics > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid #c6d9e7;
  border-radius: 8px;
  background: #f6fbff;
  color: #183e59;
  font-size: 11px;
  font-weight: 800;
}

.purchase-target-metrics small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.purchase-target-stock-badge.has-stock {
  border-color: #8dceb3;
  background: #e7f8ef;
  color: #126346;
}

.purchase-target-stock-badge.no-stock {
  color: #657786;
}

.purchase-target-watch-editor {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.purchase-target-watch-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.purchase-target-watch-input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.purchase-target-watch-save {
  min-height: 36px;
  padding: 7px 11px;
  white-space: nowrap;
}

.purchase-condition-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #a7cfe0;
  background: #e8f7f1;
  color: #063a58;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.purchase-condition-out-label {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #707b86;
  background: #20262d;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.purchase-unit-status {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.purchase-unit-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #d5e3ec;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.purchase-unit-badge.active,
.purchase-unit-badge.intent-restock,
.purchase-unit-badge.intent-additional {
  border-color: #9fd6c3;
  background: #eafaf3;
  color: #116a4a;
}

.purchase-unit-badge.intent-new {
  border-color: #bfd7eb;
  background: #edf7ff;
  color: #0a4267;
}

.purchase-workflow-badges {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.purchase-status-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.workflow-badge {
  width: fit-content;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.workflow-badge.inventory-live,
.workflow-badge.photo-ready {
  border-color: #98d9c2;
  background: #eafaf3;
  color: #13704d;
}

.workflow-badge.seal-needed,
.workflow-badge.photo-waiting {
  border-color: #efd08b;
  background: #fff7df;
  color: #8a5c00;
}

.workflow-badge.seal-done,
.workflow-badge.photo-done {
  border-color: #bfd4e4;
  background: #eef6ff;
  color: #173a5e;
}

.workflow-badge.photo-blocked,
.workflow-badge.inventory-sold {
  border-color: #e9b7b7;
  background: #fff0f0;
  color: #9c3a3a;
}

.purchase-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  align-self: start;
  justify-self: stretch;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.purchase-row-actions::-webkit-scrollbar {
  display: none;
}

.candidate-row .purchase-row-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
}

.purchase-row-actions button,
.purchase-row-actions a {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid #b8d2e8;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f9ff 100%);
  color: var(--navy);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 1px 2px rgba(23, 58, 94, .08);
  cursor: pointer;
}

.purchase-row-actions button:hover,
.purchase-row-actions a:hover {
  border-color: #7fb7df;
  background: linear-gradient(180deg, #ffffff 0%, #eaf6ff 100%);
  transform: translateY(-1px);
}

.purchase-row-actions button:active,
.purchase-row-actions a:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(23, 58, 94, .08) inset;
}

.purchase-row-actions .purchase-jal-link {
  border-color: #9fc7e6;
  background: linear-gradient(180deg, #ffffff 0%, #eef8ff 100%);
}

.candidate-row .purchase-row-actions button,
.candidate-row .purchase-row-actions a {
  min-height: 38px;
  padding: 8px 12px;
  text-align: center;
}

.candidate-row .purchase-row-actions .purchase-send-draft,
.candidate-row .purchase-row-actions .purchase-undo-draft,
.candidate-row .purchase-row-actions button:disabled {
  min-width: max-content;
}

.purchase-row-actions .danger-link {
  color: #9c3a3a;
  border-color: #ead2d2;
  background: #fff7f7;
}

.purchase-row-actions button:disabled {
  opacity: .62;
  cursor: default;
  background: #eef2f5;
  color: #596875;
}

.app-header {
  background: linear-gradient(90deg, #10283e, #1e4f72);
  color: #fff;
  min-height: 88px;
  padding: 16px clamp(18px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(191,152,66,.28));
  display: grid;
  place-items: center;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.22);
}

.brand h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1;
  font-weight: 600;
}

.brand p {
  margin: 5px 0 0;
  color: #b9d3ee;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.ghost-btn, .profile-btn {
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  color: #fff;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 600;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 14px auto 36px;
}

.hero-panel {
  background:
    linear-gradient(135deg, rgba(16,40,62,.97), rgba(37,75,101,.94)),
    radial-gradient(circle at 92% 18%, rgba(47,142,219,.28), transparent 38%),
    radial-gradient(circle at 8% 18%, rgba(191,152,66,.22), transparent 30%);
  color: #fff;
  border-radius: 18px;
  padding: 26px 28px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #7b91aa;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
}

.hero-panel .eyebrow {
  color: #e7d39c;
}

.hero-panel h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.15;
  max-width: 620px;
}

.hero-panel p:last-child {
  margin: 10px 0 0;
  color: #dce7ed;
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  min-width: min(100%, 520px);
}

.primary-pill, .outline-pill {
  border: 0;
  background: #f7f3e8;
  color: var(--navy);
  border-radius: 14px;
  padding: 14px 22px;
  font-weight: 800;
  white-space: nowrap;
  font-size: 16px;
}

.outline-pill {
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.34);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.status-grid-note {
  margin: 10px 4px 6px;
  color: #496781;
  font-size: 13px;
  font-weight: 800;
}

.status-grid article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.status-card-action {
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.status-card-action:hover {
  border-color: rgba(24,168,216,.52);
  box-shadow: 0 10px 22px rgba(30,93,145,.12);
  transform: translateY(-1px);
}

.status-card-action.active {
  border-color: rgba(24,168,216,.72);
  box-shadow: inset 0 -4px 0 rgba(24,168,216,.36), 0 10px 22px rgba(30,93,145,.1);
}

.status-card-action:focus-visible {
  outline: 2px solid rgba(24,168,216,.46);
  outline-offset: 2px;
}

.status-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.status-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.listed-dialog[hidden] {
  display: none;
}

.listed-dialog {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
}

.listed-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 22, 38, .46);
}

.listed-dialog-panel {
  position: relative;
  width: min(860px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(4,22,38,.24);
}

.listed-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #f7fcff, #eef8fe);
}

.listed-dialog-head h3 {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 22px;
}

.listed-dialog-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.listed-dialog-title-row a {
  border: 1px solid rgba(24,168,216,.34);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.listed-dialog-close {
  flex: 0 0 auto;
}

.listed-dialog-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 148px);
  overflow: auto;
  padding: 14px;
}

.listed-dialog-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  padding: 12px;
}

.listed-dialog-item strong {
  display: block;
  color: var(--navy);
  font-size: 15px;
  line-height: 1.35;
}

.listed-dialog-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.listed-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.listed-dialog-actions button,
.listed-dialog-actions a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.listed-dialog-empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  padding: 18px;
  text-align: center;
  font-weight: 700;
}

.ledger-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(30,93,145,.08);
  margin: 0 0 14px;
  overflow: hidden;
}

.ledger-panel-collapsed {
  margin-bottom: 10px;
}

.ledger-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.ledger-head h3 {
  margin: 0;
  font-size: 17px;
}

.ledger-summary {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ledger-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.ledger-head-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.ledger-search-input {
  width: min(280px, 100%);
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.ledger-search-input:focus {
  outline: 2px solid rgba(33, 164, 216, .24);
  border-color: #21a4d8;
}

.ledger-head-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fcff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.ledger-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 14px;
  border: 1px solid #9fd2eb;
  border-radius: 999px;
  background: #0d3b5c;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.ledger-panel-collapsed .ledger-scroll {
  display: none;
}

.ledger-scroll {
  max-height: 440px;
  overflow-x: auto;
  overflow-y: auto;
}

.ledger-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}

.ledger-table th,
.ledger-table td {
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
  vertical-align: middle;
  text-align: left;
  white-space: nowrap;
}

.ledger-table th {
  position: sticky;
  top: 0;
  background: #f2f8fd;
  color: var(--navy);
  font-weight: 700;
}

.ledger-table th:nth-child(1),
.ledger-table td:nth-child(1) {
  width: 272px;
}

.ledger-table th:nth-child(2),
.ledger-table td:nth-child(2) {
  width: 118px;
}

.ledger-table th:nth-child(4),
.ledger-table td:nth-child(4) {
  width: 120px;
}

.ledger-table th:nth-child(5),
.ledger-table td:nth-child(5) {
  width: 82px;
}

.ledger-table th:nth-child(6),
.ledger-table td:nth-child(6) {
  width: 86px;
}

.ledger-table th:nth-child(7),
.ledger-table td:nth-child(7) {
  width: 72px;
}

.ledger-table th:nth-child(8),
.ledger-table td:nth-child(8) {
  width: 54px;
}

.ledger-table tr.selected td {
  background: #fff8df;
}

.ledger-title {
  width: 42%;
  min-width: 0;
  white-space: normal;
}

.ledger-title strong,
.ledger-title span {
  display: block;
}

.ledger-title strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-title span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.ledger-purchase-fields {
  display: grid;
  grid-template-columns: minmax(112px, .95fr) minmax(124px, 1fr);
  gap: 5px;
  width: 256px;
}

.ledger-order-input,
.ledger-edit-input {
  width: 112px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 7px;
  font: inherit;
  background: #fff;
}

.ledger-edit-input {
  width: 100%;
  min-width: 0;
}

.ledger-sku-input {
  width: 116px;
}

.ledger-price-input {
  width: 76px;
  text-align: right;
}

/* 台帳の仕入値の下：画面に無い値引きと実質仕入値（10/4 夜の2回目） */
.ledger-discount-note {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.3;
  color: #8a5a00;
  white-space: nowrap;
}

.ledger-order-input:focus,
.ledger-edit-input:focus {
  outline: 2px solid rgba(33, 164, 216, .28);
  border-color: #21a4d8;
}

.ledger-table .number {
  text-align: right;
}

.ledger-edit {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  padding: 5px 8px;
  font-weight: 700;
  cursor: pointer;
}

.ledger-empty {
  color: var(--muted);
  text-align: center;
}

.workspace {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 16px;
}

.side-panel, .editor {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(30,93,145,.09);
}

.sync-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 8px 10px;
  align-items: center;
  padding: 8px 12px;
  background: #eef7ff;
  border-bottom: 1px solid var(--line);
}

.sync-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.sync-head strong {
  font-size: 14px;
  color: var(--navy);
}

.sync-head span {
  color: var(--muted);
  font-size: 12px;
}

.sync-url-label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.sync-url-label input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

.sync-url-details {
  position: relative;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sync-url-details summary {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
}

.sync-url-details label {
  width: min(520px, 78vw);
  position: absolute;
  z-index: 8;
  top: calc(100% + 6px);
  right: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(30, 93, 145, .16);
}

.sync-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.sync-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.sync-actions .primary-btn,
.sync-actions .secondary-btn {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 12px;
  white-space: nowrap;
}

.side-panel {
  padding: 14px;
  height: fit-content;
  position: sticky;
  top: 16px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-title h3 {
  margin: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 0;
  background: var(--navy);
  color: #fff;
  font-size: 24px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0;
}

.filter-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 6px;
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  white-space: normal;
}

.filter-chip.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.draft-list {
  display: grid;
  gap: 10px;
}

.side-workflow-summary {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff, #eef8fe);
  padding: 10px;
}

.side-workflow-summary div {
  display: grid;
  grid-template-columns: minmax(86px, auto) minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  border-bottom: 1px solid rgba(190, 214, 232, .72);
  padding-bottom: 7px;
}

.side-workflow-summary div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.side-workflow-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.side-workflow-summary strong {
  color: var(--navy);
  font-size: 12px;
  text-align: right;
  overflow-wrap: anywhere;
}

.draft-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 7px;
  background: var(--blue-card);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.draft-card.selected {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.draft-card.empty {
  display: block;
  padding: 12px;
}

.draft-open {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 4px 6px;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}

.draft-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.draft-card span {
  color: var(--muted);
  font-size: 12px;
  display: block;
  margin-top: 4px;
}

.draft-delete {
  border: 1px solid #ead2d2;
  border-radius: 999px;
  background: #fff7f7;
  color: #9c3a3a;
  font-size: 11px;
  font-weight: 500;
  padding: 7px 9px;
  cursor: pointer;
}

.editor {
  overflow: visible;
}

.stepper {
  background: linear-gradient(90deg, var(--navy), #174b72);
  color: #fff;
  display: grid;
  grid-template-columns: repeat(var(--step-count, 6), 1fr);
  gap: 0;
  padding: 12px;
}

.selected-item-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid #d7e8f5;
  border-bottom: 1px solid #c9ddec;
  background: rgba(255, 250, 225, .97);
  color: var(--navy);
  box-shadow: 0 8px 20px rgba(20, 75, 115, .08);
}

.listing-context-bar {
  margin: 0 0 14px;
  border: 1px solid #c9ddec;
  border-radius: 14px;
}

.selected-item-bar > div:first-child {
  min-width: 0;
}

.selected-item-bar span,
.selected-item-bar dt {
  color: #6b7f94;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.selected-item-bar strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  line-height: 1.25;
}

.selected-item-bar dl {
  display: flex;
  gap: 8px;
  margin: 0;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.selected-item-bar dl div {
  min-width: 92px;
  padding: 6px 9px;
  border: 1px solid #d9e8f4;
  border-radius: 10px;
  background: #fff;
}

.selected-item-bar dd {
  margin: 1px 0 0;
  font-weight: 900;
  white-space: nowrap;
}

.step {
  border: 0;
  background: transparent;
  color: #a9c2dc;
  font-weight: 600;
  display: grid;
  gap: 5px;
  font-size: 13px;
  justify-items: center;
}

.step[hidden] {
  display: none;
}

.step span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.18);
  color: #fff;
}

.step.active {
  color: #fff;
}

.step.active span {
  background: var(--gold);
  color: var(--navy);
}

form {
  padding: clamp(14px, 2.6vw, 24px);
}

.top-step-nav {
  position: sticky;
  top: 0;
  z-index: 18;
  display: grid;
  grid-template-columns: minmax(130px, auto) 1fr minmax(180px, auto);
  align-items: center;
  gap: 10px;
  margin: calc(clamp(14px, 2.6vw, 24px) * -1) calc(clamp(14px, 2.6vw, 24px) * -1) 18px;
  padding: 10px clamp(14px, 2.6vw, 24px);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 252, 255, .96);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(28, 82, 124, .08);
}

.top-step-current {
  min-height: 48px;
  border: 1px solid #cfe4f4;
  border-radius: 14px;
  background: #fff;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 7px 12px;
  color: var(--navy);
}

.top-step-current span {
  color: #6c7f92;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}

.top-step-current strong {
  font-size: 18px;
  line-height: 1.2;
}

.top-step-btn {
  min-height: 48px;
  white-space: nowrap;
}

.form-section {
  display: none;
}

.form-section.active {
  display: block;
}

.section-heading {
  margin-bottom: 12px;
}

.section-heading h3 {
  margin: 0;
  font-size: 23px;
}

.group-title {
  margin: 13px 0 8px;
  color: var(--navy);
  font-size: 16px;
  font-weight: 600;
}

.group-title span {
  color: #e12121;
  font-size: 13px;
  margin-left: 4px;
}

.choice-grid, .grade-row, .accessory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 16px;
}

.choice, .grade, .accessory, .pill {
  border: 2px solid var(--line);
  background: #fff;
  border-radius: 12px;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 500;
  text-align: left;
}

.choice.active, .grade.active, .accessory.active, .pill.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.ai-inline-card {
  border: 2px solid #cfe7ff;
  border-radius: 16px;
  background: var(--blue-soft);
  padding: 12px;
  display: grid;
  gap: 9px;
  margin-bottom: 16px;
}

.ai-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ai-inline-card strong {
  display: block;
  color: #1258d8;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.ai-inline-card p {
  margin: 0;
  color: #2261d8;
  font-size: 14px;
  line-height: 1.6;
}

.ai-cost-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ai-cost-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #b9d5ec;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.ai-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-upload-actions .primary-btn,
.ai-upload-actions .secondary-btn,
.ai-upload-actions .upload-box {
  flex: 1 1 170px;
}

.ai-preview.compact {
  min-height: 92px;
}

.ai-preview.has-multiple {
  position: relative;
  align-items: stretch;
  justify-items: stretch;
  padding: 8px;
  background: #111923;
}

.ai-preview-strip {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 8px;
}

.ai-preview-strip figure {
  position: relative;
  min-height: 88px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  overflow: hidden;
  background: #111923;
}

.ai-preview-strip img {
  width: 100%;
  height: 100%;
  max-height: 128px;
  object-fit: contain;
}

.ai-preview-strip figcaption,
.ai-preview-count {
  position: absolute;
  background: rgba(2, 22, 37, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.ai-preview-strip figcaption {
  left: 6px;
  top: 6px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.ai-preview-count {
  right: 10px;
  bottom: 10px;
  border-radius: 999px;
  padding: 4px 8px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.product-info-grid,
.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-grid .wide-label {
  grid-column: span 2;
}

.item-specifics-identity-grid {
  margin: 0;
}

.item-specifics-identity-grid label {
  min-width: 0;
}

.basic-purchase-grid {
  display: grid;
  gap: 8px;
}

.item-specifics-panel {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border: 2px solid #cfe7ff;
  border-radius: 16px;
  background: #eef7ff;
}

.item-specifics-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.item-specifics-head h4 {
  margin: 0 0 4px;
  color: #124f9f;
  font-size: 17px;
}

.item-specifics-head p {
  margin: 0;
  color: #42637e;
  font-size: 13px;
  line-height: 1.55;
}

.item-specifics-auto {
  min-height: 44px;
  padding-inline: 18px;
  white-space: nowrap;
}

.item-specifics-status {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #f2ca65;
  border-radius: 10px;
  background: #fff8dd;
  color: #8a5500;
  font-size: 13px;
  font-weight: 800;
}

.item-specifics-status.is-complete {
  border-color: #9be4ba;
  background: #ecfff4;
  color: #08713d;
}

.item-specifics-status div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(138, 85, 0, .14);
}

.item-specifics-status i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #f2a900;
}

.item-specifics-status.is-complete i {
  background: #1fb86b;
}

.item-specifics-status small {
  grid-column: 1 / -1;
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  opacity: .82;
}

.item-specifics-trust {
  padding: 8px 10px;
  border: 1px solid #cfe2f3;
  border-radius: 10px;
  background: #f8fcff;
  color: #34566f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.item-specifics-trust.is-ok {
  border-color: #8bd8ad;
  background: #ecfff4;
  color: #08713d;
}

.item-specifics-trust.is-warn {
  border-color: #f2ca65;
  background: #fff8dd;
  color: #8a5500;
}

.item-specifics-trust.is-danger {
  border-color: #ef9a9a;
  background: #fff0f0;
  color: #9d1d1d;
}

.item-specifics-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.item-specifics-actions > button {
  min-width: 0;
}

.manual-ebay-lookup {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, auto);
  gap: 10px 14px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid #9ec9e5;
  border-radius: 12px;
  background: #f8fcff;
}

.manual-ebay-lookup h4,
.manual-ebay-lookup p {
  margin: 0;
}

.manual-ebay-lookup h4 {
  color: #124f9f;
  font-size: 15px;
}

.manual-ebay-lookup > div:first-child p {
  margin-top: 3px;
  color: #42637e;
  font-size: 12px;
  line-height: 1.45;
}

.manual-ebay-lookup-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 7px;
}

.manual-ebay-lookup-controls input {
  min-width: 0;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid #a9c8db;
  border-radius: 9px;
  background: #fff;
}

.manual-ebay-lookup-status {
  grid-column: 1 / -1;
  padding: 7px 9px;
  border-radius: 8px;
  background: #eaf4fa;
  color: #34566f;
  font-size: 12px;
  font-weight: 800;
}

.manual-ebay-lookup-status[data-status="found"] { background: #ecfff4; color: #08713d; }
.manual-ebay-lookup-status[data-status="none"] { background: #fff8dd; color: #8a5500; }
.manual-ebay-lookup-status[data-status="error"] { background: #fff0f0; color: #9d1d1d; }
.manual-ebay-lookup-status[data-status="loading"] { background: #eef7ff; color: #124f9f; }

@media (max-width: 760px) {
  .manual-ebay-lookup,
  .manual-ebay-lookup-controls {
    grid-template-columns: minmax(0, 1fr);
  }
}

.item-specifics-head {
  align-items: flex-start;
}

.item-specifics-head > div:first-child {
  min-width: 280px;
  max-width: 620px;
}

.item-specifics-head p {
  max-width: 620px;
  line-height: 1.45;
}

.item-specifics-upcdb.is-hidden {
  display: none;
}

.specific-candidate-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #f4bf57;
  border-radius: 12px;
  background: #fff9e8;
}

.specific-candidate-panel.is-hidden {
  display: none;
}

.specific-candidate-note,
.ai-specific-candidates strong {
  margin: 0;
  color: #8a5500;
  font-size: 13px;
  font-weight: 900;
}

.specific-candidate-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.specific-candidate-group {
  display: grid;
  gap: 7px;
}

.specific-candidate-group h5 {
  margin: 0;
  color: #123a5d;
  font-size: 13px;
}

.specific-candidate-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.specific-candidate-card {
  display: inline-flex;
  align-items: stretch;
  gap: 6px;
  max-width: min(100%, 460px);
}

.specific-candidate-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid #d5a83d;
  border-radius: 12px;
  background: #fff;
  color: #082f4b;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  text-align: left;
  white-space: normal;
}

.specific-candidate-source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #bfdaec;
  border-radius: 10px;
  background: #f7fcff;
  color: #0a4a73;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.specific-candidate-chip img {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  object-fit: contain;
  border-radius: 6px;
  background: #f3f8fc;
}

.specific-candidate-chip:hover,
.specific-candidate-chip:focus-visible {
  border-color: #0fa8d4;
  box-shadow: 0 0 0 3px rgba(15, 168, 212, .18);
  outline: 0;
}

.specific-candidate-chip small {
  color: #687f95;
  font-size: 11px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.ai-specific-candidates {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid #f4bf57;
  border-radius: 12px;
  background: #fff9e8;
}

.ai-specific-candidates p {
  margin: 0;
  color: #42637e;
  font-size: 12px;
  line-height: 1.45;
}

.item-specifics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.item-specifics-grid label {
  min-width: 0;
}

.item-specifics-grid label.is-hidden {
  display: none;
}

.identifier-field {
  display: grid;
  gap: 7px;
}

.identifier-review-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #42637e;
  font-size: 11px;
  font-weight: 900;
}

.identifier-review-row select {
  min-width: 0;
  height: 34px;
  padding: 4px 9px;
  border: 1px solid #bfd7e8;
  border-radius: 10px;
  background: #fff;
  color: #082f4b;
  font-size: 12px;
  font-weight: 850;
}

.shipping-service-grid,
.service-info-grid {
  display: grid;
  gap: 10px 12px;
  margin: 0 0 14px;
}

.shipping-service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-info-grid {
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
  align-items: stretch;
}

.service-check-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
}

.service-check-card input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--navy);
}

.service-check-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.service-check-wide {
  align-items: flex-start;
}

.service-check-wide span {
  display: block;
}

.service-seal-fieldset {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 10px;
  border: 1px solid #cfe2f1;
  border-radius: 14px;
  background: #f7fcff;
  padding: 10px;
  margin: 0 0 14px;
}

.service-seal-fieldset .pill {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.service-seal-fieldset p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.service-note-label {
  margin: 0;
}

.rate-label {
  position: relative;
}

.rate-label span {
  float: right;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}

.rate-label span.rate-error {
  color: var(--danger);
}

.rate-refresh-btn {
  align-self: end;
  min-height: 52px;
}

.business-policy-grid {
  display: grid;
  grid-template-columns: minmax(330px, 2fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr);
  gap: 12px;
  margin-bottom: 14px;
}

.business-policy-missing-warning {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 7px;
  border: 1px solid #dc8439;
  border-radius: 999px;
  background: #fff3e5;
  color: #9a431c;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  vertical-align: middle;
}

.business-policy-missing-warning[hidden] {
  display: none;
}

.policy-panel {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fcff;
}

.policy-panel-fixed {
  align-content: start;
}

.policy-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.policy-label-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}

.policy-panel--return .policy-label-line,
.policy-panel--payment .policy-label-line {
  overflow: hidden;
  text-overflow: ellipsis;
}

.policy-field-missing-warning {
  color: #b42318;
  font-weight: 900;
}

.policy-field-missing-warning[hidden] {
  display: none;
}

.policy-panel select,
.policy-panel input {
  width: 100%;
  min-width: 0;
}

.policy-panel select.is-policy-missing {
  border-color: #d92d20;
  background: #fff4f2;
  box-shadow: 0 0 0 2px rgba(217, 45, 32, 0.12);
}

.policy-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.policy-manager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: 0;
}

.policy-add-btn {
  min-height: 44px;
  padding-inline: 18px;
}

.policy-delete-btn {
  min-height: 44px;
  padding-inline: 14px;
  border-color: #f0b4ac;
  background: #fff7f5;
  color: var(--danger);
}

.policy-fixed-card {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
}

.policy-field-grid {
  margin-bottom: 12px;
}

.start-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.start-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: var(--blue-card);
  display: grid;
  gap: 12px;
  align-content: start;
}

.start-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
}

.start-icon.gold {
  background: var(--gold);
  color: var(--navy);
}

.start-icon.steel {
  background: var(--sky);
  color: var(--navy);
  border: 1px solid var(--line);
}

.start-card h4 {
  margin: 0 0 6px;
  font-size: 18px;
}

.start-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.upload-box {
  border: 2px dashed #cbd6de;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  min-height: 54px;
  color: var(--navy);
  font-weight: 500;
}

.upload-box input {
  display: none;
}

.ai-preview {
  min-height: 112px;
  border-radius: 14px;
  background: var(--sky);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  text-align: center;
}

.ai-preview img {
  width: 100%;
  height: 100%;
  max-height: 160px;
  object-fit: contain;
  background: #111923;
}

.ai-result {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.ai-result-head {
  display: grid;
  gap: 4px;
}

.ai-result-head strong {
  color: var(--ink);
  line-height: 1.35;
}

.ai-result-head span {
  color: var(--green);
  font-size: 12px;
  font-weight: 500;
}

.ai-result-error span {
  color: #9f2416;
}

.ai-error-lines {
  margin: 6px 0 0;
  padding-left: 18px;
  color: #9f2416;
  font-size: 13px;
  line-height: 1.55;
}

.ai-result-grid {
  margin: 0;
  display: grid;
  gap: 8px;
}

.ai-result-grid div {
  display: grid;
  grid-template-columns: minmax(88px, max-content) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.ai-result-grid dt,
.ai-result-grid dd {
  margin: 0;
  font-size: 12px;
}

.ai-result-grid dt {
  color: var(--muted);
  font-weight: 500;
}

.ai-result-grid dd {
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ai-draft-fields {
  border: 1px solid #cfe1ee;
  border-radius: 12px;
  background: #f7fbfe;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-draft-fields-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.ai-draft-fields-head strong {
  color: var(--ink);
  font-size: 14px;
}

.ai-draft-fields-head span {
  color: var(--muted);
  font-size: 12px;
}

.ai-draft-fields label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  gap: 5px;
}

.ai-draft-fields input,
.ai-draft-fields select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  padding: 7px 10px;
}

.ai-draft-fields input:focus,
.ai-draft-fields select:focus {
  outline: 2px solid rgba(28, 168, 215, 0.18);
  border-color: var(--accent);
}

.hint {
  font-size: 13px;
}

.history-search {
  font-size: 14px;
}

.history-listing-card .ai-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.history-listing-card .ai-card-head > div {
  min-width: 0;
}

.history-search-main {
  flex: 0 1 320px;
  width: min(320px, 100%);
  min-width: 220px;
  max-width: 320px;
  margin: 0;
}

.history-results {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: none;
  max-height: 190px;
  overflow-x: hidden;
  overflow-y: auto;
}

.history-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  text-align: left;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  justify-self: stretch;
  overflow: hidden;
}

.history-item strong {
  display: block;
  margin-bottom: 5px;
}

.history-item span {
  color: var(--muted);
  font-size: 13px;
}

.history-item strong,
.history-item span {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .history-listing-card .ai-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .history-search-main {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

.compact-start {
  width: 100%;
}

.compact-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

label, .wide-label {
  display: grid;
  gap: 5px;
  color: #41546a;
  font-weight: 500;
  font-size: 13px;
}

input, select, textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 10px;
  min-height: 46px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.shell input:not([type="file"]),
.shell select,
.shell textarea,
.purchase-screen input,
.purchase-screen select,
.purchase-screen textarea {
  background: #fff;
  color: #102033;
  -webkit-text-fill-color: #102033;
  caret-color: var(--navy);
}

.shell input::placeholder,
.shell textarea::placeholder,
.purchase-screen input::placeholder,
.purchase-screen textarea::placeholder {
  color: #7a8ea1;
  -webkit-text-fill-color: #7a8ea1;
}

.shell input:-webkit-autofill,
.shell select:-webkit-autofill,
.shell textarea:-webkit-autofill,
.purchase-screen input:-webkit-autofill,
.purchase-screen select:-webkit-autofill,
.purchase-screen textarea:-webkit-autofill {
  box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: #102033;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(66,125,168,.14);
}

.condition-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 9px;
  margin-bottom: 14px;
}

fieldset {
  border: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

legend {
  font-weight: 600;
  grid-column: 1 / -1;
  padding: 0;
  margin-bottom: 1px;
  color: var(--navy);
  font-size: 15px;
}

.condition-groups fieldset {
  min-width: 0;
  padding: 10px;
  border: 1px solid #cfe2f1;
  border-radius: 14px;
  background: #f7fcff;
}

.condition-groups .pill {
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.25;
}

.condition-text-fieldset {
  grid-template-columns: 1fr;
}

.condition-text-fieldset label {
  display: grid;
  gap: 5px;
}

.condition-text-fieldset label span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.condition-text-fieldset input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 14px;
}

.condition-text-fieldset p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.condition-text-fieldset.is-required {
  border-color: rgba(225, 29, 46, 0.35);
}

.condition-text-fieldset.is-required input {
  border-color: rgba(225, 29, 46, 0.55);
}

.shutter-count-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 800;
  color: var(--navy);
}

.shutter-count-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
}

.required-mark {
  color: #e11d2e;
  font-size: 12px;
  font-weight: 700;
  margin-left: 4px;
}

.note-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 10px;
}

.note-chip-row button {
  border: 1px solid #9ec9ff;
  background: var(--blue-soft);
  color: #1265ff;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 500;
}

.function-check-fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

[data-lens-function-field].is-hidden,
[data-body-function-field].is-hidden,
[data-body-check-field].is-hidden,
[data-body-only-field].is-hidden,
[data-film-camera-field].is-hidden {
  display: none;
}

.function-check-fieldset legend {
  grid-column: 1 / -1;
}

.menu-language-options {
  display: contents;
}

.menu-language-fieldset:not(.is-enabled) .menu-language-options {
  opacity: 0.45;
  pointer-events: none;
}

.check-option-wide {
  grid-column: 1 / -1;
}

.menu-language-help {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.check-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 9px 11px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.check-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
}

.check-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.check-option:has(input:checked) {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.profit-card {
  margin-top: 13px;
  padding: 15px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f7fbff, #eaf4ff);
  border: 1px solid #c8def7;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.profit-card--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto auto;
  align-items: center;
  margin: -4px 0 14px;
}

.profit-card--split > div {
  display: grid;
  gap: 3px;
}

.profit-card strong {
  font-size: 28px;
  color: var(--green);
}

.profit-card--split span {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}

.profit-card--split small,
.profit-card--split em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.profit-card--split em {
  justify-self: end;
  padding: 8px 10px;
  border: 1px solid #cfe0ef;
  border-radius: 999px;
  background: #fff;
  white-space: nowrap;
}

.profit-tool-link {
  min-height: 38px;
  padding: 8px 14px;
  white-space: nowrap;
}

.shipping-estimator {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #cfe2f1;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fcff, #eef8ff);
}

.shipping-estimator-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.shipping-estimator-head h4 {
  margin: 0 0 3px;
  color: var(--navy);
  font-size: 15px;
}

.shipping-estimator-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.shipping-estimator-head .secondary-btn {
  min-height: 38px;
  padding: 8px 14px;
  white-space: nowrap;
}

.shipping-estimator-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.shipping-estimator-grid label {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.shipping-estimator-grid input {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
}

.shipping-estimator-result {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.shipping-estimator-result span {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #cfe0ef;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.shipping-estimator-result strong {
  display: block;
  margin-top: 2px;
  color: var(--navy);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sales-reference-panel {
  display: grid;
  gap: 10px;
  margin: 14px 0 16px;
  padding: 13px;
  border: 1px solid #cfe0ef;
  border-left: 5px solid #18a8d8;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfeff, #f0f8ff);
}

.sales-reference-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.sales-reference-head h4 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 16px;
}

.sales-reference-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.sales-reference-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.sales-reference-actions .primary-btn,
.sales-reference-actions .secondary-btn {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 12px;
}

.sales-reference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sales-reference-grid article {
  min-width: 0;
  border: 1px solid #d3e4f2;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
}

.sales-reference-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
}

.sales-reference-grid strong {
  color: var(--ink);
  font-size: 18px;
}

.sales-reference-list {
  display: grid;
  gap: 6px;
  max-height: 190px;
  overflow: auto;
}

.sales-reference-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  border: 1px solid #d4e6f5;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
}

.sales-reference-row:hover,
.sales-reference-row:focus {
  border-color: #18a8d8;
  box-shadow: 0 0 0 3px rgba(24, 168, 216, .12);
}

.sales-reference-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.sales-reference-row strong {
  color: var(--navy);
}

.sales-reference-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 700;
}

.sales-reference-empty {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed #bdd7ea;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.photo-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.photo-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.photo-toolbar p {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.file-button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.listing-design-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #d7e5ef;
  border-left: 6px solid #3b8edb;
  border-radius: 10px;
  background: #f3f8fd;
  padding: 13px 14px;
  margin-bottom: 13px;
}

.listing-design-card strong {
  display: block;
  color: #173a5e;
  font-size: 15px;
  margin-bottom: 3px;
}

.listing-design-card p {
  margin: 0;
  color: #50677b;
  font-size: 13px;
  line-height: 1.45;
}

.listing-design-swatch {
  flex: 0 0 112px;
  height: 34px;
  border: 1px solid rgba(23, 58, 94, .14);
  border-radius: 999px;
  background: linear-gradient(90deg, #173a5e 0 38%, #3b8edb 38% 70%, #c59b35 70% 82%, #f3f8fd 82%);
}

.photo-list {
  display: grid;
  gap: 8px;
}

.photo-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--blue-card);
  padding: 8px;
}

.photo-thumb {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  background: var(--sky);
  color: var(--navy);
  display: grid;
  place-items: center;
  font-weight: 500;
  overflow: hidden;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-fields {
  display: grid;
  gap: 5px;
}

.photo-fields small {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}

.photo-clear {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  min-height: 34px;
  padding: 0 10px;
  font-weight: 600;
  cursor: pointer;
}

.photo-help {
  border-radius: 14px;
  background: var(--blue-soft);
  color: #1265ff;
  padding: 11px;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.7;
}

.photo-help ol {
  margin: 6px 0 0;
  padding-left: 20px;
}

.form-navigation {
  display: none;
}

.form-navigation.split {
  justify-content: space-between;
}

.form-navigation .primary-btn,
.form-navigation .secondary-btn {
  min-width: 170px;
}

.output-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin: -6px -6px 16px;
}

.output-tab {
  border: 0;
  border-bottom: 3px solid transparent;
  background: #fff;
  color: #52657a;
  min-height: 52px;
  padding: 10px;
  font-weight: 500;
  font-size: 16px;
}

.output-tab:focus-visible {
  outline: 2px solid rgba(24,168,216,.38);
  outline-offset: -2px;
}

.output-tab.active {
  color: var(--navy);
  border-color: #18a8d8;
  box-shadow: inset 0 0 0 2px rgba(24,168,216,.18);
}

.output-panel {
  display: none;
}

.output-panel.active {
  display: block;
}

.summary-grid {
  display: grid;
  gap: 9px;
  margin-bottom: 12px;
}

.summary-card,
.item-specifics-card,
.missing-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--blue-card);
  padding: 11px;
}

.summary-hero-card {
  border: 1px solid #bfd4e4;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(18,48,74,.98), rgba(37,75,101,.93)),
    radial-gradient(circle at 92% 12%, rgba(47,142,219,.26), transparent 34%);
  color: #fff;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.summary-title-block {
  display: grid;
  gap: 7px;
}

.summary-title-label {
  color: #9fc1da;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.summary-title-label b {
  display: inline-block;
  margin-left: 6px;
  color: #d9ecf8;
  font-size: 11px;
  letter-spacing: 0;
}

.summary-title-block h4 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.22;
}

.summary-title-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #c9d8e2;
  font-size: 12px;
  line-height: 1.4;
}

.summary-title-actions .secondary-btn {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 12px;
  white-space: nowrap;
}

.summary-title-actions span {
  min-width: min(100%, 320px);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.field-help {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.field-help span {
  min-width: min(100%, 260px);
  overflow-wrap: anywhere;
}

.field-help button {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #c8dceb;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.field-help.is-over {
  color: #b42318;
  font-weight: 700;
}

.summary-title-block p {
  margin: 0;
  color: #c9d8e2;
  font-size: 13px;
  font-weight: 500;
}

.status-badge {
  width: fit-content;
  border-radius: 999px;
  background: #f7f3e8;
  color: var(--navy);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.status-listed {
  border: 1px solid rgba(72, 202, 163, .72);
  background: #e9fbf5;
  color: #075e4b;
  box-shadow: 0 0 0 3px rgba(72, 202, 163, .14);
}

.summary-price-block {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.summary-price-block div {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  border-radius: 13px;
  padding: 10px 12px;
}

.summary-price-block .metric-filled {
  border-color: rgba(74, 218, 202, .58);
  background:
    linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.08));
  box-shadow: inset 0 -3px 0 rgba(74, 218, 202, .58);
}

.summary-price-block .metric-empty {
  opacity: .72;
  border-style: dashed;
}

.summary-price-block span {
  display: block;
  color: #bfd0dd;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.summary-price-block strong {
  display: block;
  color: #fff;
  font-size: 20px;
}

.summary-price-block .profit-good strong {
  color: #d8f7e9;
}

.summary-price-block .profit-bad strong {
  color: #ffd7d7;
}

.summary-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
}

.summary-card strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.summary-card.is-filled {
  border-color: rgba(24,168,216,.52);
  border-left: 5px solid #18a8d8;
  background:
    linear-gradient(180deg, #f9fdff, #eef8fe);
  box-shadow: inset 0 -2px 0 rgba(24,168,216,.2);
}

.summary-card.is-filled span {
  color: #315f80;
  font-weight: 700;
}

.summary-card.is-empty {
  border-style: dashed;
  opacity: .74;
}

.item-specifics-card {
  background: #fff;
  margin-bottom: 12px;
}

.summary-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.summary-card-head h4 {
  margin: 0;
  font-size: 18px;
}

.summary-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.specifics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.specifics-grid div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--blue-card);
  padding: 9px 10px;
}

.specifics-grid dt,
.specifics-grid dd {
  margin: 0;
}

.specifics-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
}

.specifics-grid dd {
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
}

.missing-card {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.missing-card strong {
  font-size: 15px;
}

.missing-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.missing-card.warn {
  border-color: #eed7a5;
  background: #fff8e8;
}

.missing-card.ok {
  border-color: #b9dfcf;
  background: #eefaf5;
}

.missing-card.danger {
  border-color: #efb4aa;
  background: #fff2f0;
}

.final-check-card {
  gap: 10px;
}

.final-check-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.final-check-list {
  display: grid;
  gap: 7px;
}

.final-check-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: start;
  gap: 8px;
  border: 1px solid rgba(126, 152, 174, .24);
  border-radius: 10px;
  background: rgba(255, 255, 255, .7);
  padding: 8px 9px;
}

.final-check-item b {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 11px;
  line-height: 1.2;
}

.final-check-item span {
  display: grid;
  gap: 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.final-check-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.final-check-issue b {
  background: #ffe1dc;
  color: #9f2416;
}

.final-check-warn b {
  background: #fff0c9;
  color: #7a5200;
}

.final-check-ok b {
  background: #dff6eb;
  color: #0b6b50;
}

.listing-status-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--blue);
  border-radius: 14px;
  background: linear-gradient(135deg, #f7fcff, #eef8fe);
  padding: 10px 12px;
  margin-bottom: 14px;
}

.listing-status-panel > div:first-child {
  flex: 0 0 148px;
}

.listing-status-panel span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.listing-status-panel strong {
  display: block;
  margin-top: 2px;
  color: var(--navy);
  font-size: 22px;
  line-height: 1.2;
}

.listing-status-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.22fr 1fr 1fr;
  gap: 7px;
  flex: 1 1 auto;
  min-width: 0;
}

.listing-status-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  min-height: 38px;
  padding: 7px 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.listing-status-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: 0 8px 18px rgba(6, 47, 79, .18);
}

.output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.html-editor-card,
.preview-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 10px 24px rgba(30,93,145,.08);
}

.output-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.output-card-head h4 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
}

.html-copy-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--blue-card);
  padding: 12px 14px;
}

.html-copy-card h4 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
}

.html-copy-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.listing-copy-stack {
  display: grid;
  gap: 10px;
}

.copy-output-block {
  display: grid;
  gap: 8px;
}

.copy-output-label {
  display: block;
}

.copy-output-details {
  margin-top: 0;
}

.copy-output-details summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.copy-output-details label {
  margin-top: 8px;
}

.copy-output-textarea {
  min-height: 92px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  background: #fbfdff;
}

#itemSpecificsOutput {
  min-height: 132px;
}

.compact-copy {
  min-height: 42px;
  padding: 9px 16px;
  background: var(--navy);
  white-space: nowrap;
}

.html-code-details {
  margin-top: 0;
}

.html-code-details summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.html-code-details label {
  display: block;
  margin-top: 8px;
}

.preview-toggle {
  display: inline-flex;
  gap: 4px;
  border-radius: 12px;
  background: var(--sky);
  padding: 4px;
}

.preview-mode-btn {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #52657a;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 500;
}

.preview-mode-btn.active {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 4px 12px rgba(15,45,75,.12);
}

.preview-shell {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--blue-soft);
  overflow: hidden;
  margin: 0 auto;
}

.preview-shell.desktop {
  width: min(100%, 820px);
}

.preview-shell.mobile {
  width: min(100%, 390px);
}

.browser-bar {
  display: grid;
  grid-template-columns: 12px 12px 12px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--blue-card);
}

.browser-bar span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.browser-bar span:nth-child(1) { background: #ff5f57; }
.browser-bar span:nth-child(2) { background: #ffbd2e; }
.browser-bar span:nth-child(3) { background: #28c840; }

.browser-bar strong {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #52657a;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#htmlPreviewFrame {
  display: block;
  width: 100%;
  height: 500px;
  border: 0;
  background: #fff;
}

.primary-btn, .secondary-btn {
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 14px;
  font-weight: 600;
}

.primary-btn {
  border: 0;
  background: var(--blue);
  color: #fff;
}

.secondary-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
}

.html-output {
  font-family: var(--font-code);
  min-height: 220px;
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1100px) {
  .home-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-menu-grid.compact,
  .home-menu-grid.compact.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-finder-strip {
    grid-template-columns: minmax(150px, .45fr) minmax(240px, 1fr);
  }

  .home-finder-strip .home-primary-btn {
    grid-column: 2;
  }

  .home-finder-builder {
    grid-template-columns: 1fr 1fr;
  }

  .home-finder-builder .home-field {
    grid-column: 1 / -1;
  }

  .home-card-listing {
    min-height: auto;
  }
}

@media (max-width: 860px) {
  .home-screen {
    padding: 12px;
  }

  .home-hero {
    border-radius: 14px;
    padding: 18px;
  }

  .home-hero::after {
    width: 42%;
    opacity: .32;
  }

  .home-hero h1 {
    font-size: 26px;
  }

  .home-hero > p {
    font-size: 14px;
  }

  .home-menu-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .home-tool-group {
    padding: 14px;
    border-radius: 14px;
  }

  .home-research-grid {
    grid-template-columns: 1fr;
  }

  .home-tool-group-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .home-menu-grid.compact,
  .home-menu-grid.compact.two {
    grid-template-columns: 1fr;
  }

  .home-finder-strip {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
    padding: 14px;
  }

  .home-finder-strip .home-primary-btn {
    grid-column: auto;
  }

  .home-finder-desk-head,
  .home-finder-builder {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .home-research-grid .home-finder-builder {
    grid-template-columns: 1fr;
  }

  .home-finder-desk-head {
    display: grid;
  }

  .home-finder-builder .home-field {
    grid-column: auto;
  }

  .home-card-listing {
    min-height: auto;
  }

  .home-card {
    padding: 16px;
    min-height: auto;
  }

  .home-card::after {
    opacity: .22;
  }

  .home-card h2 {
    font-size: 23px;
  }

  .home-card h3 {
    font-size: 21px;
  }

  .html-copy-card {
    align-items: stretch;
    flex-direction: column;
  }

  .listing-status-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .listing-status-panel > div:first-child {
    flex-basis: auto;
  }

  .listing-status-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .listing-status-btn {
    padding: 7px 6px;
    font-size: 11px;
  }

  .purchase-screen {
    padding: 12px;
  }

  .purchase-hero {
    align-items: stretch;
    flex-direction: column;
    border-radius: 14px;
    padding: 16px;
  }

  .purchase-hero h1 {
    font-size: 26px;
  }

  .purchase-hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .purchase-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-sync-panel {
    grid-template-columns: 1fr;
    padding: 9px 10px;
  }

  .purchase-sync-head {
    justify-content: space-between;
  }

  .purchase-db-scope {
    justify-content: flex-start;
  }

  .purchase-report-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .purchase-sync-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .purchase-sync-actions .primary-btn,
  .purchase-sync-actions .secondary-btn {
    min-height: 34px;
    padding: 6px;
  }

  .purchase-maintenance-body {
    grid-template-columns: 1fr;
  }

  .purchase-maintenance-body .purchase-sync-actions {
    grid-template-columns: repeat(3, 1fr);
  }

  .purchase-layout {
    grid-template-columns: 1fr;
  }

  .purchase-panel {
    border-radius: 14px;
    padding: 14px;
  }

  .purchase-form-panel {
    position: static;
    order: 1;
  }

  .purchase-list-panel {
    order: 2;
  }

  .purchase-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .purchase-search-panel {
    grid-template-columns: 1fr 1fr;
  }

  .purchase-search-field,
  .purchase-filter-group {
    grid-column: 1 / -1;
  }

  .purchase-filter-group {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .mobile-home-btn {
    display: block;
  }

  .app-header {
    display: none;
    min-height: 0;
    padding: 12px 14px;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .shell {
    width: 100%;
    margin: 0;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand h1 {
    font-size: 21px;
  }

  .brand p {
    margin-top: 3px;
    font-size: 12px;
  }

  .header-actions {
    margin-left: auto;
  }

  .ghost-btn, .profile-btn {
    padding: 7px 10px;
    font-size: 12px;
  }

  .hero-panel {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
    gap: 12px;
  }

  .hero-panel h2 {
    max-width: none;
    font-size: 28px;
    line-height: 1.15;
    word-break: keep-all;
  }

  .hero-panel p:last-child {
    display: block;
    max-width: none;
    font-size: 13px;
    line-height: 1.5;
    word-break: keep-all;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
    justify-content: stretch;
  }

  .hero-actions .primary-pill,
  .hero-actions .outline-pill {
    width: 100%;
    text-align: center;
  }

  #downloadUploadWaitingCsvBtn {
    grid-column: 1 / -1;
    order: 3;
  }

  .primary-pill, .outline-pill {
    padding: 8px 11px;
    font-size: 12px;
  }

  .status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(74px, 1fr));
    gap: 8px;
  }

  .status-grid article {
    padding: 9px 8px;
  }

  .status-grid span {
    font-size: 11px;
  }

  .status-grid strong {
    font-size: 20px;
  }

  .listed-dialog {
    padding: 10px;
  }

  .listed-dialog-panel {
    max-height: calc(100vh - 20px);
  }

  .listed-dialog-item {
    grid-template-columns: 1fr;
  }

  .listed-dialog-actions {
    justify-content: flex-start;
  }

  .ledger-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ledger-head-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .ledger-head-actions p {
    flex-basis: 100%;
  }

  .ledger-scroll {
    margin: 0 -1px;
    max-height: 56vh;
    overflow-x: visible;
    overflow-y: auto;
  }

  .ledger-table {
    display: block;
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
  }

  .ledger-table thead {
    display: none;
  }

  .ledger-table tbody {
    display: grid;
    gap: 10px;
    padding: 10px;
  }

  .ledger-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
  }

  .ledger-table tr.selected {
    border-color: #8cbbe4;
    background: #f2f8fd;
  }

  .ledger-table th,
  .ledger-table td,
  .ledger-table th:nth-child(n),
  .ledger-table td:nth-child(n) {
    display: block;
    width: auto;
    min-width: 0;
    border-bottom: 0;
    padding: 0;
    white-space: normal;
  }

  .ledger-table td::before {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
  }

  .ledger-table td:nth-child(1)::before {
    content: "購入情報";
  }

  .ledger-table td:nth-child(2)::before {
    content: "注文番号";
  }

  .ledger-table td:nth-child(4)::before {
    content: "管理番号";
  }

  .ledger-table td:nth-child(5)::before {
    content: "グレード";
  }

  .ledger-table td:nth-child(6)::before {
    content: "仕入値";
  }

  .ledger-table td:nth-child(7)::before {
    content: "状態";
  }

  .ledger-table td:nth-child(3) {
    grid-column: 1 / -1;
    order: -2;
  }

  .ledger-table td:nth-child(8) {
    order: -1;
    justify-self: start;
  }

  .ledger-title {
    width: auto;
  }

  .ledger-title strong {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.35;
  }

  .ledger-empty {
    grid-column: 1 / -1;
  }

  .ledger-purchase-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    width: 100%;
  }

  .ledger-order-input,
  .ledger-edit-input {
    width: 100%;
    min-height: 28px;
    padding: 4px 6px;
  }

  .ledger-sku-input {
    width: 100%;
  }

  .ledger-price-input {
    width: 100%;
  }

  .ledger-edit {
    min-height: 30px;
    padding: 6px 12px;
  }

  .workspace {
    display: block;
  }

  .sync-panel {
    grid-template-columns: 1fr;
    padding: 9px 10px;
  }

  .sync-note {
    grid-column: auto;
  }

  .sync-head {
    justify-content: space-between;
  }

  .sync-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .ai-draft-fields {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .ai-draft-fields-head {
    display: grid;
    gap: 3px;
  }

  .sync-url-details label {
    position: static;
    width: 100%;
    margin-top: 4px;
  }

  .sync-actions .primary-btn,
  .sync-actions .secondary-btn {
    padding: 8px 6px;
    font-size: 12px;
  }

  .side-panel {
    display: none;
  }

  .editor {
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .stepper {
    overflow-x: auto;
    grid-template-columns: repeat(var(--step-count, 6), minmax(54px, 1fr));
    padding: 9px 6px;
    position: static;
    border-radius: 0;
  }

  .step {
    font-size: 11px;
    gap: 4px;
  }

  .step span {
    width: 24px;
    height: 24px;
  }

  .field-grid, .start-options, .summary-detail-grid, .specifics-grid, .item-specifics-grid {
    grid-template-columns: 1fr;
  }

  .shipping-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-info-grid {
    grid-template-columns: 1fr;
  }

  .item-specifics-head,
  .item-specifics-status {
    grid-template-columns: 1fr;
  }

  .specific-candidate-groups {
    grid-template-columns: 1fr;
  }

  .specific-candidate-chip {
    justify-content: space-between;
    width: 100%;
  }

  .sales-reference-head,
  .sales-reference-grid {
    grid-template-columns: 1fr;
  }

  .sales-reference-actions {
    justify-content: stretch;
  }

  .sales-reference-actions .primary-btn,
  .sales-reference-actions .secondary-btn {
    flex: 1;
  }

  .item-specifics-auto {
    width: 100%;
  }

  .ai-card-head {
    display: grid;
    gap: 8px;
  }

  .ai-cost-links a {
    flex: 1 1 120px;
  }

  .purchase-form-grid {
    grid-template-columns: 1fr;
  }

  .purchase-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .purchase-row-actions {
    justify-content: flex-start;
  }

  .business-policy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .policy-panel--shipping {
    grid-column: 1 / -1;
  }

  .policy-manager {
    grid-template-columns: 1fr;
  }

  form {
    max-width: 640px;
    margin: 0 auto;
    padding: 16px;
  }

  .top-step-nav {
    top: 0;
    grid-template-columns: 1fr 1fr;
    margin: -16px -16px 14px;
    padding: 8px 12px;
    gap: 8px;
  }

  .top-step-current {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 42px;
    padding: 6px 10px;
  }

  .top-step-current strong {
    font-size: 16px;
  }

  .top-step-btn {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .top-step-nav--only-next #topNextStepBtn,
  .top-step-nav--only-prev #topPrevStepBtn {
    grid-column: 1 / -1;
  }

  .choice-grid, .grade-row, .accessory-grid, fieldset {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .condition-groups {
    grid-template-columns: 1fr;
  }

  .choice, .grade, .accessory, .pill {
    min-height: 42px;
    padding: 9px 10px;
    font-size: 13px;
  }

  .group-title {
    font-size: 15px;
  }

  .summary-hero-card {
    grid-template-columns: 1fr;
  }

  .summary-price-block {
    grid-template-columns: 1fr;
  }

  .photo-toolbar, .profit-card {
    align-items: stretch;
    flex-direction: column;
  }

  .photo-toolbar-actions {
    justify-content: stretch;
  }

  .photo-toolbar-actions .secondary-btn {
    flex: 1;
  }

  .form-navigation {
    position: sticky;
    bottom: 0;
    z-index: 30;
    margin: 14px -14px -14px;
    padding: 9px 14px;
    background: rgba(246, 251, 255, .97);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 24px rgba(30, 93, 145, .12);
  }

  .form-navigation .primary-btn,
  .form-navigation .secondary-btn {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .home-screen {
    padding: 10px;
  }

  .home-brand-row {
    gap: 10px;
  }

  .home-hero {
    padding: 14px;
  }

  .home-hero::after {
    display: none;
  }

  .home-hero h1 {
    font-size: 23px;
  }

  .home-card {
    border-radius: 14px;
    padding: 14px;
  }

  .home-card-actions {
    grid-template-columns: 1fr;
  }

  .home-action-stack {
    grid-template-columns: 1fr;
  }

  .home-hero-tags span {
    padding: 6px 10px;
  }

  .app-header {
    padding: 10px 12px;
    gap: 8px;
  }

  .shell {
    width: 100%;
    margin: 0;
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .brand h1 {
    font-size: 18px;
    white-space: nowrap;
  }

  .brand p {
    display: none;
  }

  .header-actions {
    width: auto;
    margin-left: auto;
    gap: 6px;
  }

  .ghost-btn, .profile-btn {
    flex: initial;
    padding: 7px 9px;
    font-size: 11px;
  }

  .profile-btn {
    display: none;
  }

  .hero-panel {
    border-radius: 12px;
    padding: 16px 14px;
    align-items: stretch;
    gap: 12px;
  }

  .hero-panel .eyebrow {
    margin-bottom: 2px;
    font-size: 10px;
  }

  .hero-panel h2 {
    max-width: none;
    font-size: clamp(26px, 8vw, 34px);
    line-height: 1.15;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    justify-content: stretch;
  }

  .primary-pill, .outline-pill {
    padding: 9px 8px;
    font-size: 12px;
    min-height: 42px;
    text-align: center;
  }

  #downloadUploadWaitingCsvBtn {
    grid-column: 1 / -1;
    order: 3;
  }

  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .status-grid article {
    padding: 8px 7px;
    border-radius: 10px;
  }

  .status-grid span {
    font-size: 10px;
  }

  .status-grid strong {
    font-size: 18px;
  }

  .side-panel {
    padding: 12px;
  }

  .stepper {
    grid-template-columns: repeat(var(--step-count, 6), minmax(44px, 1fr));
    padding: 7px 4px;
  }

  .step {
    font-size: 9px;
  }

  .step span {
    width: 21px;
    height: 21px;
  }

  form {
    padding: 12px;
  }

  .top-step-nav {
    top: 0;
    margin: -12px -12px 12px;
    padding: 7px 10px;
  }

  .top-step-current {
    min-height: 38px;
  }

  .top-step-current span {
    font-size: 10px;
  }

  .top-step-current strong {
    font-size: 15px;
  }

  .section-heading {
    margin-bottom: 9px;
  }

  .section-heading h3 {
    font-size: 21px;
  }

  .choice-grid, .grade-row, .accessory-grid, fieldset {
    gap: 7px;
  }

  .condition-groups fieldset {
    padding: 9px;
  }

  .choice, .grade, .accessory, .pill {
    min-height: 40px;
    padding: 8px 9px;
    border-radius: 9px;
    font-size: 12px;
  }

  input, select, textarea {
    min-height: 42px;
    padding: 9px 10px;
  }

  textarea {
    min-height: 84px;
  }

  .form-navigation {
    margin: 12px -12px -12px;
    padding: 8px 12px;
  }

  .primary-btn, .secondary-btn {
    min-height: 42px;
    padding: 9px 11px;
    font-size: 13px;
  }

  .photo-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .photo-thumb {
    width: 52px;
    height: 52px;
  }

  .photo-clear {
    grid-column: 2;
    width: fit-content;
  }

  .output-tab {
    min-height: 46px;
    font-size: 14px;
  }

  #htmlPreviewFrame {
    height: 420px;
  }
}

@media (max-width: 520px) {
  body {
    line-height: 1.42;
  }

  .home-screen {
    padding: 7px;
  }

  .home-shell {
    width: 100%;
  }

  .home-hero {
    border-radius: 11px;
    padding: 10px 11px;
  }

  .home-screen .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 12px;
  }

  .home-hero .eyebrow {
    margin-bottom: 1px;
    font-size: 10px;
  }

  .home-hero h1 {
    font-size: 19px;
    line-height: 1.18;
  }

  .home-hero > p {
    display: none;
  }

  .home-hero-tags {
    margin-top: 8px;
    gap: 5px;
  }

  .home-hero-tags span {
    padding: 3px 7px;
    font-size: 10px;
  }

  .home-brand-tools,
  .home-menu-grid,
  .home-menu-grid.compact,
  .home-research-grid {
    gap: 8px;
  }

  .home-tool-group {
    padding: 9px;
    border-radius: 11px;
  }

  .home-tool-group-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
  }

  .home-tool-group-head h2 {
    font-size: 16px;
    line-height: 1.2;
  }

  .home-card {
    border-radius: 11px;
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 6px;
  }

  .home-card-kicker {
    padding: 3px 7px;
    font-size: 10px;
  }

  .home-card > .home-card-kicker {
    display: none;
  }

  .home-card h3 {
    min-width: 0;
    font-size: 18px;
    line-height: 1.18;
    overflow-wrap: anywhere;
  }

  .home-card p {
    display: none;
  }

  .home-card .home-primary-btn,
  .home-primary-btn,
  .home-secondary-btn {
    min-height: 36px;
    padding: 7px 9px;
    border-radius: 10px;
    font-size: 13px;
  }

  .home-card .home-primary-btn {
    width: 100%;
    min-width: 0;
    white-space: nowrap;
  }

  .home-finder-strip,
  .home-finder-desk {
    border-radius: 11px;
    padding: 9px;
    gap: 7px;
  }

  .home-finder-strip strong,
  .home-finder-desk-head strong {
    font-size: 16px;
  }

  .home-field {
    gap: 3px;
    font-size: 11px;
  }

  .home-field input,
  .home-field select {
    min-height: 38px;
    padding: 7px 9px;
    border-radius: 10px;
    font-size: 14px;
  }

  .home-finder-desk-head,
  .home-finder-builder {
    gap: 7px;
  }

  .home-keyword-ideas,
  .home-keyword-list {
    gap: 5px;
  }

  .home-keyword-chip {
    padding: 5px 7px 5px 9px;
    font-size: 11px;
  }

  .home-finder-suggestions {
    max-height: min(260px, 48vh);
  }

  .home-finder-option {
    padding: 8px 9px;
  }

  .purchase-screen {
    min-height: 100vh;
    padding: 7px;
  }

  .purchase-hero {
    border-radius: 11px;
    padding: 10px;
    gap: 8px;
  }

  .purchase-hero .eyebrow {
    margin-bottom: 1px;
    font-size: 10px;
  }

  .purchase-hero h1 {
    font-size: 20px;
    line-height: 1.15;
  }

  .purchase-hero p:last-child {
    display: none;
  }

  .purchase-hero-actions {
    gap: 6px;
  }

  .purchase-hero-actions .home-primary-btn,
  .purchase-hero-actions .home-secondary-btn {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .purchase-status-grid,
  .purchase-kpi-grid {
    gap: 5px;
    margin: 7px 0;
  }

  .purchase-kpi-grid article,
  .purchase-status-grid article {
    min-height: auto;
    padding: 6px 7px;
    border-radius: 9px;
  }

  .purchase-kpi-grid span,
  .purchase-status-grid span {
    font-size: 10px;
  }

  .purchase-kpi-grid strong,
  .purchase-status-grid strong {
    margin-top: 1px;
    font-size: 16px;
  }

  .purchase-sync-panel {
    gap: 6px;
    margin-bottom: 7px;
    padding: 7px;
    border-radius: 10px;
  }

  .purchase-sync-panel .sync-note,
  .purchase-sync-panel .purchase-db-scope {
    display: none;
  }

  .purchase-sync-head strong {
    font-size: 13px;
  }

  .purchase-db-scope,
  .purchase-report-link,
  .purchase-sync-actions .primary-btn,
  .purchase-sync-actions .secondary-btn {
    min-height: 30px;
    padding: 5px 7px;
    border-radius: 9px;
    font-size: 11px;
  }

  .purchase-report-links,
  .purchase-sync-actions {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 1px;
    scrollbar-width: none;
  }

  .purchase-report-links::-webkit-scrollbar,
  .purchase-sync-actions::-webkit-scrollbar {
    display: none;
  }

  .purchase-report-link,
  .purchase-sync-actions .primary-btn,
  .purchase-sync-actions .secondary-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .purchase-maintenance-details {
    padding-top: 4px;
  }

  .purchase-maintenance-details summary {
    font-size: 11px;
  }

  .purchase-layout {
    gap: 8px;
  }

  .purchase-list-panel {
    order: 2;
  }

  .purchase-form-panel {
    order: 1;
  }

  .purchase-panel {
    border-radius: 11px;
    padding: 9px;
  }

  .purchase-panel-head {
    gap: 7px;
    margin-bottom: 7px;
  }

  .purchase-panel-head h2 {
    font-size: 17px;
  }

  .purchase-form-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .purchase-form-grid .wide-label,
  .purchase-store-fields .purchase-form-grid {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .purchase-form-grid label {
    gap: 3px;
    font-size: 11px;
  }

  .purchase-form-grid input,
  .purchase-form-grid select,
  .purchase-form-grid textarea,
  .purchase-search-field input,
  .purchase-sync-panel input {
    min-height: 36px;
    padding: 7px 8px;
    border-radius: 9px;
    font-size: 13px;
  }

  .purchase-form-grid textarea {
    min-height: 58px;
  }

  .purchase-form-actions {
    gap: 6px;
    margin-top: 7px;
  }

  .purchase-form-actions button {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .purchase-search-panel {
    gap: 6px;
    margin-bottom: 7px;
    padding: 7px;
    border-radius: 10px;
  }

  .purchase-filter-group {
    min-height: 0;
    gap: 4px;
    padding: 4px;
  }

  .purchase-check,
  .purchase-clear-filters {
    min-height: 28px;
    padding: 0 6px;
    font-size: 11px;
  }

  .purchase-list {
    gap: 7px;
  }

  .purchase-row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 9px;
    border-radius: 10px;
  }

  .purchase-row-title strong {
    font-size: 13px;
  }

  .purchase-row-title {
    font-size: 13px;
  }

  .purchase-row-meta,
  .purchase-row-note,
  .purchase-detail-line {
    font-size: 11px;
    line-height: 1.35;
  }

  .purchase-row-details {
    gap: 4px 8px;
  }

  .purchase-unit-badge,
  .purchase-condition-badge,
  .purchase-condition-out-label,
  .workflow-badge {
    min-height: 19px;
    padding: 2px 6px;
    font-size: 10px;
  }

  .purchase-row-actions,
  .candidate-row .purchase-row-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
  }

  .purchase-row-actions button,
  .purchase-row-actions a,
  .candidate-row .purchase-row-actions button,
  .candidate-row .purchase-row-actions a {
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 11px;
  }
}

@media (max-width: 520px) {
  .home-screen {
    padding: 10px 9px 18px;
  }

  .home-shell {
    gap: 8px;
  }

  .home-hero {
    padding: 10px;
    border-radius: 13px;
  }

  .home-hero > p {
    display: none;
  }

  .home-brand-row {
    gap: 8px;
  }

  .home-brand-row .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    font-size: 16px;
  }

  .home-hero h1 {
    font-size: 24px;
    line-height: 1.05;
  }

  .home-hero-tags {
    gap: 5px;
    margin-top: 8px;
  }

  .home-hero-tags span {
    min-height: 27px;
    padding: 4px 9px;
    font-size: 12px;
  }

  .home-brand-tools,
  .home-research-grid {
    gap: 7px;
  }

  .home-tool-group {
    padding: 8px;
    border-radius: 13px;
  }

  .home-tool-group-head {
    display: none;
  }

  .home-menu-grid,
  .home-menu-grid.compact,
  .home-menu-grid.compact.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .home-menu-grid.compact .home-card {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 86px;
    padding: 8px;
    gap: 7px;
    border-radius: 11px;
  }

  .home-menu-grid.compact .home-card::after {
    opacity: .45;
    right: 8px;
    bottom: 8px;
    width: 84px;
    height: 28px;
  }

  .home-menu-grid.compact .home-card > .home-card-kicker,
  .home-menu-grid.compact .home-card p {
    display: none;
  }

  .home-menu-grid.compact .home-card h3 {
    min-width: 0;
    margin: 0;
    font-size: 17px;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .home-menu-grid.compact .home-card .home-primary-btn {
    width: 100%;
    min-height: 30px;
    padding: 5px 6px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .home-research-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .home-finder-strip,
  .home-finder-desk {
    padding: 9px;
    border-radius: 11px;
    gap: 7px;
  }

  .home-finder-strip .home-card-kicker,
  .home-finder-desk .home-card-kicker {
    display: none;
  }

  .home-finder-strip strong,
  .home-finder-desk-head strong {
    font-size: 18px;
    line-height: 1.15;
  }

  .home-finder-strip .home-field,
  .home-finder-builder .home-field {
    gap: 4px;
    font-size: 12px;
  }

  .home-finder-strip input,
  .home-finder-builder input {
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 14px;
  }

  .home-finder-strip .home-primary-btn,
  .home-finder-desk .home-secondary-btn {
    min-height: 31px;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.1;
  }

  .home-finder-desk-head {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
  }

  .home-finder-desk-head .home-secondary-btn {
    min-width: 58px;
  }

  .home-finder-builder {
    gap: 6px;
  }

  .home-finder-builder .home-secondary-btn {
    width: 100%;
  }
}

/* Final mobile density override for the listing desk. */
@media (max-width: 520px) {
  .mobile-home-btn {
    display: none !important;
  }

  .status-grid {
    display: flex !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .status-grid::-webkit-scrollbar {
    display: none;
  }

  .status-grid article {
    flex: 0 0 128px;
    min-height: 58px;
    scroll-snap-align: start;
  }

  .ledger-head-actions p,
  .sync-note {
    display: none !important;
  }

  .sync-panel {
    padding: 8px 10px;
  }
}

/* Final production density override for desktop and mobile listing screens. */
.shell {
  margin-top: 10px;
}

.hero-panel {
  min-height: 0;
  padding: 16px 20px;
  border-radius: 14px;
  gap: 16px;
}

.hero-panel .eyebrow {
  margin-bottom: 4px;
  font-size: 11px;
}

.hero-panel h2 {
  font-size: clamp(28px, 3.1vw, 42px);
  line-height: 1.08;
}

.hero-panel p:last-child {
  margin-top: 6px;
  font-size: 14px;
}

.hero-actions {
  gap: 8px;
  min-width: min(100%, 460px);
}

.primary-pill,
.outline-pill {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
}

.status-grid {
  margin: 8px 0 10px;
  gap: 8px;
}

.status-grid article {
  min-height: 72px;
  padding: 9px 12px;
}

.status-grid strong {
  margin-top: 3px;
  font-size: 21px;
  line-height: 1.15;
}

.ledger-head {
  padding: 9px 12px;
}

.ledger-head .eyebrow {
  display: none;
}

.ledger-head h3 {
  font-size: 18px;
  line-height: 1.15;
}

.workspace {
  gap: 14px;
}

.sync-panel {
  padding-block: 7px;
}

.stepper {
  padding-block: 8px;
}

@media (max-width: 900px) {
  .hero-panel {
    display: grid;
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 10px;
  }

  .hero-actions {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .hero-panel {
    padding: 10px;
    border-radius: 12px;
  }

  .hero-panel h2 {
    font-size: 24px;
    line-height: 1.12;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .hero-panel p:last-child,
  .mobile-home-btn,
  .ledger-head-actions p,
  .sync-note {
    display: none !important;
  }

  .hero-actions {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .primary-pill,
  .outline-pill {
    min-height: 38px;
    padding: 7px 8px;
    border-radius: 10px;
    font-size: 11px;
  }

  .status-grid {
    display: flex !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    margin: 7px 0 8px;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .status-grid::-webkit-scrollbar {
    display: none;
  }

  .status-grid article {
    flex: 0 0 128px;
    min-height: 58px;
    padding: 8px;
    scroll-snap-align: start;
  }

  .status-grid span {
    font-size: 10px;
  }

  .status-grid strong {
    font-size: 18px;
  }
}

/* Final small-phone polish: keep the listing form visible immediately. */
@media (max-width: 520px) {
  .hero-panel {
    padding: 8px 10px;
    gap: 7px;
  }

  .hero-panel .eyebrow {
    margin-bottom: 2px;
    font-size: 10px;
  }

  .hero-panel h2 {
    font-size: 22px;
  }

  .hero-actions {
    gap: 5px;
  }

  .primary-pill,
  .outline-pill {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 10px;
  }

  #downloadUploadWaitingCsvBtn {
    grid-column: 1 / -1;
  }
}

.btn-label-short {
  display: none;
}

/* Mobile header actions: keep all three route buttons on one row. */
@media (max-width: 520px) {
  .hero-actions {
    display: grid;
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, .72fr) minmax(0, 1fr);
    gap: 5px;
  }

  .hero-actions .primary-pill,
  .hero-actions .outline-pill {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    padding: 5px 4px;
    white-space: nowrap;
  }

  #listingHomeBtn {
    order: 1;
  }

  #listingPurchaseBtn {
    order: 2;
  }

  #downloadUploadWaitingCsvBtn {
    grid-column: auto !important;
    order: 3;
  }

  .btn-label-full {
    display: none;
  }

  .btn-label-short {
    display: inline;
  }
}


/* Listing final polish: keep the active workflow status visible on every step. */
.listing-status-panel--global {
  position: relative;
  z-index: 19;
  margin: 0;
  border-left-width: 4px;
  border-radius: 0;
  padding: 8px 14px;
  box-shadow: 0 8px 18px rgba(28, 82, 124, .06);
}

.listing-status-panel--global > div:first-child {
  flex-basis: 126px;
}

.listing-status-panel--global strong {
  font-size: 20px;
}

.listing-status-panel--global .listing-status-btn {
  min-height: 34px;
}

.top-step-current strong {
  overflow-wrap: anywhere;
}

.sync-panel {
  grid-template-columns: minmax(280px, 1fr) auto auto;
  grid-template-areas:
    "head url actions"
    "note url actions";
  padding: 7px 10px;
}

.sync-head {
  grid-area: head;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.sync-note {
  grid-area: note;
  max-width: 420px;
  font-size: 11px;
}

.sync-url-details {
  grid-area: url;
}

.sync-actions {
  grid-area: actions;
}

.hero-panel {
  padding: 14px 20px;
  border-radius: 14px;
}

.hero-panel h2 {
  font-size: clamp(27px, 3vw, 38px);
}

.hero-panel p:last-child {
  margin-top: 5px;
  font-size: 14px;
}

@media (max-width: 720px) {
  .listing-status-panel--global {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 8px 10px;
  }

  .listing-status-panel--global > div:first-child {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-basis: auto;
    gap: 10px;
  }

  .listing-status-panel--global strong {
    font-size: 18px;
  }

  .listing-status-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .listing-status-btn {
    min-height: 32px;
    padding: 6px 5px;
    font-size: 11px;
  }

  .sync-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "note"
      "url"
      "actions";
    gap: 6px;
  }

  .sync-note {
    display: block !important;
    max-width: none;
    font-size: 11px;
  }
}

@media (max-width: 520px) {
  .hero-panel {
    padding: 8px 10px;
    gap: 6px;
  }

  .hero-panel h2 {
    font-size: 21px;
  }

  .hero-panel p:last-child {
    display: block !important;
    max-width: 15em;
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.35;
  }

  .top-step-nav {
    margin-bottom: 10px;
    padding-block: 8px;
  }
}

.ai-queue-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.ai-queue-actions .secondary-btn {
  min-width: 0;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 10px;
  white-space: normal;
}

.ai-queue-actions .ai-queue-analyze {
  flex: 1 1 180px;
}

.ai-queue-actions .ai-queue-clear {
  flex: 0 1 92px;
}

.ai-queue-actions button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

@media (max-width: 520px) {
  .ai-queue-actions {
    display: grid;
    grid-template-columns: 1fr 82px;
    gap: 6px;
  }

  .ai-queue-actions .secondary-btn {
    min-height: 36px;
    padding: 7px 8px;
    font-size: 12px;
  }
}


button.upload-box {
  font: inherit;
  cursor: pointer;
}

.ai-paste-hint {
  margin: -3px 0 0;
  color: #55708a;
  font-size: 12px;
  line-height: 1.45;
}

.ai-drop-zone {
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.ai-drop-zone:focus-visible {
  outline: 3px solid rgba(21, 163, 210, .28);
  outline-offset: 3px;
}

.ai-drop-zone.is-drag-over {
  border-color: #15a3d2 !important;
  box-shadow: 0 0 0 4px rgba(21, 163, 210, .16);
  background: #e9f8ff;
}

@media (max-width: 520px) {
  .profit-card--split {
    grid-template-columns: 1fr;
  }

  .profit-card--split em {
    justify-self: start;
  }

  .profit-tool-link {
    width: 100%;
    justify-content: center;
  }

  .ai-paste-hint {
    display: none;
  }
}

/* Basic step density: keep the first step usable with many required fields. */
.basic-fast-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
  align-items: start;
}

.basic-fast-grid--setup {
  margin-bottom: 16px;
}

.basic-fast-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #cfe2f1;
  border-radius: 14px;
  background: #f7fcff;
}

.basic-fast-card .group-title {
  margin: 0 0 8px;
}

.basic-fast-card .choice-grid,
.basic-fast-card .grade-row,
.basic-fast-card .accessory-grid {
  margin: 0;
  gap: 7px;
}

.basic-fast-card .choice-grid,
.basic-fast-card .grade-row {
  grid-template-columns: 1fr;
}

.basic-fast-card .accessory-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.basic-fast-card .choice,
.basic-fast-card .grade,
.basic-fast-card .accessory {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.basic-grade-card .grade-row {
  max-height: 316px;
  overflow: auto;
  padding-right: 2px;
}

.basic-title-card {
  grid-column: 1 / -1;
}

.item-specifics-title-card {
  grid-column: auto;
  padding: 12px;
  background: #f8fcff;
}

.basic-title-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.basic-title-grid .wide-label {
  grid-column: span 3;
}

.basic-purchase-card input,
.basic-purchase-card select {
  min-height: 40px;
  padding: 8px 10px;
}

.basic-accessory-inline {
  margin: 12px 0 16px;
}

.basic-accessory-inline .accessory-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ai-inline-card {
  padding: 10px 12px;
  gap: 7px;
}

.ai-card-head {
  align-items: center;
}

.ai-inline-card strong {
  margin-bottom: 1px;
  font-size: 16px;
}

.ai-inline-card p {
  font-size: 13px;
  line-height: 1.35;
}

@media (min-width: 901px) {
  .ai-inline-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .ai-card-head,
  .ai-upload-actions,
  .ai-paste-hint,
  .ai-queue-actions {
    grid-column: 1 / -1;
  }

  .ai-card-head > div:first-child {
    min-width: 0;
  }

  .ai-inline-card p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ai-preview.compact,
  .ai-result {
    min-height: 56px;
  }
}

.ai-upload-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ai-upload-actions .primary-btn,
.ai-upload-actions .secondary-btn,
.ai-upload-actions .upload-box,
.ai-upload-actions .file-button {
  min-width: 0;
  min-height: 42px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-preview.compact {
  min-height: 62px;
  max-height: 118px;
}

.ai-preview.compact img {
  max-height: 108px;
}

.ai-result {
  padding: 9px 12px;
}

.shipping-service-grid--compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.shipping-service-grid--compact .service-check-card {
  min-height: 42px;
  padding: 9px 10px;
  white-space: nowrap;
}

.shipping-service-grid--compact .service-check-card small {
  display: none;
}

  .shipping-service-grid--compact .service-check-wide {
    align-items: center;
  }

  .service-seal-fieldset {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-note-label {
    margin-bottom: 14px;
  }

.item-specifics-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.item-specifics-grid .wide-label {
  grid-column: span 3;
}

@media (min-width: 901px) {
  .listing-context-bar {
    position: sticky;
    top: 0;
    z-index: 33;
    box-shadow: 0 12px 28px rgba(20, 75, 115, .18);
  }

  .editor > .sync-panel {
    position: relative;
    top: auto;
  }

  .editor > .stepper {
    position: sticky;
    top: 86px;
    z-index: 30;
  }

  .editor > .listing-status-panel--global {
    position: sticky;
    top: 154px;
    z-index: 29;
  }

  .top-step-nav {
    top: 210px;
    z-index: 28;
  }
}

@media (max-width: 900px) {
  .selected-item-bar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .selected-item-bar dl {
    justify-content: stretch;
  }

  .selected-item-bar dl div {
    flex: 1 1 120px;
  }

  .basic-fast-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .basic-fast-card {
    padding: 10px;
  }

  .basic-fast-card .choice-grid,
  .basic-fast-card .grade-row,
  .basic-fast-card .accessory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .basic-grade-card .grade-row {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .basic-title-grid {
    grid-template-columns: 1fr;
  }

  .basic-title-grid .wide-label {
    grid-column: auto;
  }

  .product-info-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid .wide-label {
    grid-column: auto;
  }

  .basic-accessory-inline .accessory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .item-specifics-grid,
.item-specifics-grid .wide-label {
  grid-template-columns: 1fr;
  grid-column: auto;
}

  .shipping-estimator-head {
    grid-template-columns: 1fr;
  }

  .shipping-estimator-head .secondary-btn {
    width: 100%;
  }

  .shipping-estimator-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shipping-estimator-grid label:last-child {
    grid-column: 1 / -1;
  }

  .shipping-estimator-result {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shipping-service-grid--compact {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .shipping-service-grid--compact::-webkit-scrollbar {
    display: none;
  }

  .shipping-service-grid--compact .service-check-card {
    flex: 0 0 128px;
  }
}

@media (max-width: 520px) {
  .form-section .section-heading {
    margin-bottom: 8px;
  }

  .basic-fast-grid {
    margin-bottom: 10px;
  }

  .basic-fast-card .choice,
  .basic-fast-card .grade,
  .basic-fast-card .accessory {
    min-height: 34px;
    padding: 7px 8px;
    font-size: 11px;
  }

  .ai-inline-card {
    padding: 9px;
  }

  .ai-card-head {
    grid-template-columns: 1fr;
  }

  .ai-card-head p {
    display: block;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ai-cost-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .ai-upload-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-upload-actions .primary-btn,
  .ai-upload-actions .secondary-btn,
  .ai-upload-actions .file-button {
    min-height: 38px;
    padding: 8px;
    font-size: 12px;
  }

  .ai-preview.compact {
    min-height: 56px;
    max-height: 104px;
  }

  .ai-preview.compact img {
    max-height: 96px;
  }

  .shipping-service-grid--compact .service-check-card {
    flex-basis: 118px;
    min-height: 38px;
    padding: 8px;
    font-size: 12px;
  }
}

@media (min-width: 901px) {
  .workspace > .sync-panel,
  .workspace > .stepper,
  .workspace > .listing-status-panel--global {
    position: relative;
    top: auto;
  }

  .top-step-nav {
    top: 0;
  }
}

/* Stock UI readability: prevent overlap and make status colors self-explanatory. */
.purchase-sync-panel {
  grid-template-columns: minmax(170px, 1fr) minmax(170px, auto) minmax(220px, 1.4fr) minmax(150px, auto);
  align-items: start;
}

.purchase-sync-panel > .sync-note {
  grid-column: 1 / 3;
  margin: 0;
  max-width: none;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.purchase-sync-head,
.purchase-db-scope {
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.purchase-sync-head span,
.purchase-db-scope strong,
.purchase-db-scope span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.purchase-report-links,
.purchase-sync-actions {
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  overflow: visible;
}

.purchase-report-link,
.purchase-sync-actions .primary-btn,
.purchase-sync-actions .secondary-btn {
  min-width: max-content;
}

.purchase-maintenance-body .sync-note {
  grid-column: 1 / -1;
  margin: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.purchase-search-panel {
  align-items: start;
}

.purchase-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  overflow: visible;
  white-space: normal;
}

.purchase-filter-label {
  flex: 0 0 auto;
}

.purchase-check {
  min-width: fit-content;
}

.purchase-check:has(input:checked) {
  border-color: #79b8e6;
  background: #e9f5ff;
  color: #0b4b73;
  box-shadow: inset 0 0 0 1px rgba(24, 124, 190, .16);
}

.purchase-filter-summary {
  margin: 2px 4px 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.purchase-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.purchase-status-legend button {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid #d5e3ec;
  border-radius: 999px;
  background: #fff;
  color: #49647d;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  appearance: none;
}

.purchase-status-legend button.active {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.purchase-status-legend .legend-ok {
  border-color: #9fd6c3;
  background: #eafaf3;
  color: #116a4a;
}

.purchase-status-legend .legend-warn {
  border-color: #efd08b;
  background: #fff7df;
  color: #805500;
}

.purchase-status-legend .legend-danger {
  border-color: #e8a8a8;
  background: #fff0f0;
  color: #993737;
}

.purchase-status-legend .legend-info {
  border-color: #bfd7eb;
  background: #edf7ff;
  color: #0a4267;
}

.purchase-row-title,
.purchase-row-meta,
.purchase-row-note,
.purchase-detail-line,
.purchase-supplier-meta {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.purchase-status-line,
.purchase-unit-status,
.purchase-workflow-badges,
.purchase-mall-comparison {
  flex-wrap: wrap;
  overflow: visible;
  white-space: normal;
}

.purchase-condition-badge,
.purchase-unit-badge,
.workflow-badge,
.purchase-mall-chip {
  max-width: 100%;
  line-height: 1.25;
  white-space: normal;
}

.purchase-intent-restock {
  border-color: #9fd6c3;
  background: #eefaf5;
}

.purchase-intent-additional {
  border-color: #bfd7eb;
  background: #f2f8ff;
}

.purchase-intent-new {
  border-color: #bfd7eb;
  background: #f6fbff;
}

.purchase-product-row.purchase-condition-out {
  border-color: #e7a1a1;
  background: #fff1f1;
  color: #25313b;
}

.purchase-product-row.purchase-condition-out .purchase-row-meta,
.purchase-product-row.purchase-condition-out .purchase-row-note,
.purchase-product-row.purchase-condition-out .purchase-row-details,
.purchase-product-row.purchase-condition-out .purchase-row-details b {
  color: #704040;
}

.purchase-product-row.purchase-condition-out .purchase-unit-badge,
.purchase-product-row.purchase-condition-out .purchase-condition-badge {
  border-color: #e8a8a8;
  background: #fff7f7;
  color: #993737;
}

.purchase-condition-out-label,
.purchase-missing-url-label {
  margin: 0 6px 3px 0;
  border-color: #e8a8a8;
  background: #fff0f0;
  color: #993737;
  white-space: normal;
}

.purchase-product-row.purchase-missing-url:not(.purchase-condition-out) {
  border-color: #e8a8a8;
  background: #fff7f7;
}

.purchase-condition-badge {
  border-color: #bfd7eb;
  background: #edf7ff;
  color: #0a4267;
}

.purchase-unit-badge.intent-restock,
.purchase-unit-badge.intent-additional,
.purchase-unit-badge.active {
  border-color: #9fd6c3;
  background: #eafaf3;
  color: #116a4a;
}

.purchase-unit-badge.intent-new,
.purchase-unit-badge.unit-sold,
.purchase-unit-badge.unit-listed,
.purchase-unit-badge.unit-candidate {
  border-color: #bfd7eb;
  background: #edf7ff;
  color: #0a4267;
}

.purchase-unit-badge.unit-ebay-stock.zero {
  border-color: #e8a8a8;
  background: #fff0f0;
  color: #993737;
}

.purchase-unit-badge.zero:not(.unit-ebay-stock) {
  border-color: #d5e3ec;
  background: #f5f8fb;
  color: #687b8d;
}

.purchase-mall-chip.limit-over {
  border-color: #e8a8a8;
  background: #fff0f0;
  color: #993737;
}

.purchase-final-decision {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  min-width: 0;
}

.purchase-final-decision > strong {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.purchase-final-decision > span {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.purchase-decision-reason {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid #d5e3ec;
  border-radius: 999px;
  background: #fff;
  color: #49647d;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.purchase-final-ok > strong,
.purchase-decision-reason.ok {
  border: 1px solid #8fd0b7;
  background: #dff8ed;
  color: #0d6847;
}

.purchase-final-check > strong,
.purchase-decision-reason.warn {
  border: 1px solid #efd08b;
  background: #fff5d6;
  color: #805500;
}

.purchase-final-ng > strong,
.purchase-decision-reason.danger {
  border: 1px solid #e8a8a8;
  background: #ffe8e8;
  color: #993737;
}

.purchase-final-missing > strong,
.purchase-decision-reason.missing {
  border: 1px solid #cbd5de;
  background: #eef2f5;
  color: #4d5f70;
}

.purchase-decision-reason.info {
  border-color: #bfd7eb;
  background: #edf7ff;
  color: #0a4267;
}

.purchase-product-row.purchase-final-card-ok,
.purchase-selected-product.purchase-final-card-ok {
  border-color: #8fd0b7;
  border-left: 6px solid #2ca66f;
  background: #f0fbf6;
}

.purchase-product-row.purchase-final-card-check,
.purchase-selected-product.purchase-final-card-check {
  border-color: #efd08b;
  border-left: 6px solid #d69a00;
  background: #fff9e8;
}

.purchase-product-row.purchase-final-card-ng,
.purchase-selected-product.purchase-final-card-ng {
  border-color: #e8a8a8;
  border-left: 6px solid #d64b4b;
  background: #fff1f1;
}

.purchase-product-row.purchase-final-card-missing,
.purchase-selected-product.purchase-final-card-missing {
  border-color: #cbd5de;
  border-left: 6px solid #8c9aaa;
  background: #f6f8fa;
}

.purchase-unit-badge.unit-ebay-stock.zero,
.purchase-unit-badge.unit-listed.zero {
  border-color: #9fd6c3;
  background: #eafaf3;
  color: #116a4a;
}

@media (max-width: 900px) {
  .purchase-sync-panel {
    grid-template-columns: 1fr;
  }

  .purchase-sync-panel > .sync-note,
  .purchase-maintenance-details {
    grid-column: 1 / -1;
  }

  .purchase-report-links,
  .purchase-sync-actions,
  .purchase-maintenance-body .purchase-sync-actions {
    display: flex;
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .purchase-sync-panel .sync-note,
  .purchase-sync-panel .purchase-db-scope {
    display: flex;
  }

  .purchase-report-links,
  .purchase-sync-actions {
    flex-wrap: wrap;
    overflow: visible;
  }

  .purchase-report-link,
  .purchase-sync-actions .primary-btn,
  .purchase-sync-actions .secondary-btn {
    flex: 1 1 136px;
    min-width: 0;
    white-space: normal;
    line-height: 1.25;
  }

  .purchase-filter-group {
    flex-wrap: wrap;
    gap: 5px;
  }

  .purchase-filter-divider {
    display: none;
  }

  .purchase-status-legend button {
    flex: 1 1 132px;
  }

  .purchase-final-decision {
    grid-template-columns: 1fr;
  }

  .purchase-row-actions,
  .candidate-row .purchase-row-actions {
    flex-wrap: wrap;
    overflow: visible;
  }

  .purchase-row-actions button,
  .purchase-row-actions a,
  .candidate-row .purchase-row-actions button,
  .candidate-row .purchase-row-actions a {
    flex: 1 1 112px;
    min-width: 0;
    white-space: normal;
    line-height: 1.25;
  }
}

/* Mobile AI recognition layout: keep camera upload, preview, and errors within the viewport. */
@media (max-width: 640px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-shell,
  .shell,
  .workspace,
  .editor,
  #itemForm,
  .form-section,
  .basic-fast-grid,
  .basic-fast-card,
  .ai-inline-card,
  .item-specifics-panel {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .shell,
  .workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .side-panel {
    display: none;
  }

  .top-step-nav {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-inline: 0;
  }

  .top-step-current,
  .top-step-btn {
    width: 100%;
    min-width: 0;
  }

  .ai-inline-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
    overflow: hidden;
  }

  .start-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .start-card {
    overflow: hidden;
  }

  .ai-card-head,
  .ai-upload-actions,
  .ai-queue-actions,
  .item-specifics-head,
  .item-specifics-status {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
  }

  .ai-card-head > *,
  .item-specifics-head > *,
  .item-specifics-status > *,
  .ai-result,
  .ai-result-head,
  .ai-error-lines,
  .ai-result-grid,
  .ai-preview,
  .ai-preview-strip {
    min-width: 0;
    max-width: 100%;
  }

  .ai-inline-card strong,
  .ai-inline-card p,
  .item-specifics-head h4,
  .item-specifics-head p,
  .ai-result,
  .ai-error-lines li {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .ai-inline-card p {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .ai-cost-links,
  .ai-upload-actions,
  .ai-queue-actions {
    gap: 8px;
  }

  .ai-cost-links a,
  .ai-upload-actions .primary-btn,
  .ai-upload-actions .secondary-btn,
  .ai-upload-actions .upload-box,
  .ai-queue-actions .secondary-btn,
  .item-specifics-auto {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
  }

  .ai-paste-hint {
    display: none;
  }

  .ai-preview,
  .ai-preview.compact,
  .ai-preview.has-multiple {
    width: 100%;
    min-height: 126px;
    overflow: hidden;
  }

  .ai-preview img {
    display: block;
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
  }

  .ai-preview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-preview-strip figure {
    min-width: 0;
    min-height: 112px;
  }

  .ai-result-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-error-lines {
    margin: 8px 0 0;
    padding-left: 18px;
  }

  .item-specifics-panel {
    padding: 12px;
    margin-inline: 0;
  }
}

/* Stock purchase desk: keep the helper form compact so research stays in view. */
@media (min-width: 901px) {
  .purchase-hero {
    padding: 14px 18px;
  }

  .purchase-hero h1 {
    font-size: clamp(24px, 2.7vw, 34px);
  }

  .purchase-hero p:last-child {
    margin-top: 5px;
  }

  .purchase-sync-panel {
    grid-template-columns: auto auto minmax(0, 1fr) auto auto;
    max-width: 980px;
    margin: 8px 0 10px;
    padding: 7px 9px;
    gap: 6px 8px;
    align-items: center;
  }

  .purchase-sync-panel > .sync-note {
    display: none;
  }

  .purchase-sync-head {
    align-items: center;
    white-space: nowrap;
  }

  .purchase-db-scope,
  .purchase-report-link,
  .purchase-sync-actions .primary-btn,
  .purchase-sync-actions .secondary-btn {
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 8px;
  }

  .purchase-report-links {
    justify-content: flex-start;
  }

  .purchase-sync-actions {
    justify-content: flex-end;
  }

  .purchase-maintenance-details {
    grid-column: auto;
    border-top: 0;
    padding-top: 0;
    justify-self: start;
  }

  .purchase-maintenance-details[open] {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(188, 214, 235, .7);
    padding-top: 7px;
  }

  .purchase-form-panel {
    max-width: 980px;
    padding: 10px 12px;
  }

  .purchase-form-panel .purchase-panel-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 6px;
  }

  .purchase-form-panel .eyebrow,
  .purchase-form-mode {
    display: none;
  }

  .purchase-form-panel .purchase-panel-head h2 {
    font-size: 18px;
  }

  .purchase-new-condition-btn {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .purchase-form-panel .purchase-form-grid {
    grid-template-columns: repeat(7, minmax(96px, 1fr));
    gap: 7px;
    align-items: end;
  }

  .purchase-form-panel .purchase-form-grid label,
  .purchase-store-fields .purchase-form-grid label {
    gap: 3px;
    font-size: 11px;
  }

  .purchase-form-panel .purchase-form-grid input,
  .purchase-form-panel .purchase-form-grid select,
  .purchase-form-panel .purchase-form-grid textarea {
    min-height: 34px;
    padding: 6px 8px;
    border-width: 1px;
    border-radius: 9px;
    font-size: 12px;
  }

  .purchase-form-panel .purchase-store-fields {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    margin: 8px 0 6px;
    padding: 8px 10px;
    border-radius: 10px;
  }

  .purchase-store-head {
    display: block;
    margin-bottom: 0;
  }

  .purchase-store-head h3 {
    font-size: 13px;
    white-space: nowrap;
  }

  .purchase-store-head span {
    display: none;
  }

  .purchase-store-fields .purchase-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .purchase-advanced-fields {
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 10px;
  }

  .purchase-advanced-fields .purchase-form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 7px;
  }

  .purchase-form-actions {
    grid-template-columns: minmax(180px, .45fr) minmax(180px, .45fr) auto;
    gap: 7px;
    margin-top: 7px;
  }

  .purchase-form-actions button {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
  }

  .purchase-list-panel {
    padding-top: 14px;
  }

  .purchase-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .purchase-row.empty {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .purchase-sync-panel,
  .purchase-form-panel {
    max-width: none;
  }

  .purchase-form-panel .purchase-form-grid,
  .purchase-store-fields .purchase-form-grid,
  .purchase-advanced-fields .purchase-form-grid {
    grid-template-columns: 1fr;
  }

  .purchase-form-panel .purchase-store-fields {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Wide Stock workspace: pin the control panels side-by-side and let research scroll below. */
@media (min-width: 1100px) {
  .purchase-shell {
    width: min(1760px, 100%);
    display: grid;
    grid-template-columns: minmax(360px, .78fr) minmax(0, 1.35fr);
    gap: 12px 14px;
    align-items: start;
  }

  .purchase-hero {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .purchase-layout {
    display: contents;
  }

  .purchase-sync-panel,
  .purchase-form-panel {
    position: sticky;
    top: 8px;
    z-index: 30;
    align-self: start;
    max-width: none;
    margin: 0;
  }

  .purchase-sync-panel {
    order: 2;
    grid-column: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    min-height: 100%;
    padding: 10px;
  }

  .purchase-sync-panel > .sync-note {
    display: block;
    grid-column: 1;
    margin: 0;
    font-size: 11px;
    line-height: 1.45;
  }

  .purchase-sync-head,
  .purchase-db-scope,
  .purchase-report-links,
  .purchase-sync-actions {
    justify-content: flex-start;
  }

  .purchase-report-links,
  .purchase-sync-actions {
    flex-wrap: wrap;
  }

  .purchase-maintenance-details,
  .purchase-maintenance-details[open] {
    grid-column: 1;
  }

  .purchase-form-panel {
    order: 2;
    grid-column: 2;
  }

  .purchase-list-panel {
    order: 3;
    grid-column: 1 / -1;
    padding-top: 14px;
  }

  .purchase-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (min-width: 1100px) and (max-width: 1380px) {
  .purchase-shell {
    grid-template-columns: minmax(300px, .7fr) minmax(0, 1.3fr);
  }
}

@media (max-width: 1099px) {
  .purchase-shell {
    display: block;
    width: min(1180px, 100%);
  }

  .purchase-layout {
    display: grid;
  }
}

/* Stock dark comfort theme: reduce eye strain while keeping decision colors readable. */
.purchase-screen {
  background:
    radial-gradient(circle at 18% 0%, rgba(22, 100, 135, .24), transparent 34%),
    linear-gradient(180deg, #071521 0%, #0b1d2b 48%, #07131d 100%);
  color: #dbeafe;
}

.purchase-panel,
.purchase-sync-panel {
  background: rgba(12, 28, 42, .96);
  border-color: rgba(119, 174, 210, .26);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .28);
}

.purchase-panel-head h2,
.purchase-sync-head strong,
.purchase-store-head h3,
.purchase-row-title,
.purchase-row-title strong,
.purchase-sale-panel summary {
  color: #f4f9ff;
}

.purchase-sync-head span,
.purchase-panel .eyebrow,
.purchase-filter-summary,
.purchase-row-meta,
.purchase-row-note,
.purchase-detail-line,
.purchase-supplier-meta,
.purchase-store-head span,
.purchase-sale-status,
.purchase-mall-label,
.purchase-maintenance-details summary,
.purchase-screen label {
  color: #a9bfd2;
}

.purchase-screen input,
.purchase-screen select,
.purchase-screen textarea {
  background: #0f2434;
  border-color: rgba(126, 177, 214, .34);
  color: #f4f9ff;
  -webkit-text-fill-color: #f4f9ff;
}

.purchase-screen input[readonly],
.purchase-screen textarea[readonly] {
  background: #142f43;
}

.purchase-screen input::placeholder,
.purchase-screen textarea::placeholder {
  color: #7f99ad;
  -webkit-text-fill-color: #7f99ad;
}

.purchase-db-scope,
.purchase-store-fields,
.purchase-search-panel,
.purchase-sale-panel,
.purchase-catalog-tabs,
.purchase-advanced-fields,
.purchase-maintenance-body label {
  background: rgba(15, 38, 56, .92);
  border-color: rgba(124, 182, 222, .26);
}

.purchase-db-scope strong,
.purchase-report-link,
.purchase-catalog-tab,
.purchase-check,
.purchase-clear-filters,
.purchase-row-actions button,
.purchase-row-actions a,
.purchase-new-condition-btn {
  color: #dff2ff;
}

.purchase-report-link,
.purchase-row-actions button,
.purchase-row-actions a,
.purchase-clear-filters,
.purchase-catalog-tab.active,
.purchase-check {
  background: #10283a;
  border-color: rgba(127, 191, 235, .34);
}

.purchase-check:has(input:checked),
.purchase-catalog-tab.active {
  background: #153b56;
  color: #f5fbff;
  box-shadow: inset 0 0 0 1px rgba(71, 176, 245, .22);
}

.purchase-high-turnover-status {
  color: #8ee7bd;
}

.purchase-high-turnover-status.error {
  color: #ffabab;
}

.purchase-target-metrics > span {
  border-color: rgba(126, 177, 214, .34);
  background: rgba(12, 31, 46, .92);
  color: #dff2ff;
}

.purchase-target-metrics small,
.purchase-target-watch-editor {
  color: #9fb7c8;
}

.purchase-target-stock-badge.has-stock {
  border-color: rgba(92, 214, 155, .54);
  background: rgba(20, 83, 58, .92);
  color: #d9ffed;
}

.purchase-target-stock-badge.no-stock {
  color: #bacbd8;
}

.purchase-row,
.purchase-product-row,
.candidate-row {
  background: rgba(18, 36, 49, .94);
  border-color: rgba(135, 182, 214, .28);
  color: #e8f3fb;
}

.purchase-row.empty,
.purchase-selected-product {
  background: rgba(14, 31, 45, .96);
}

.purchase-product-row.purchase-final-card-ok,
.purchase-selected-product.purchase-final-card-ok {
  background: linear-gradient(180deg, rgba(20, 64, 49, .94), rgba(13, 42, 37, .94));
  border-color: rgba(81, 196, 142, .52);
}

.purchase-product-row.purchase-final-card-check,
.purchase-selected-product.purchase-final-card-check {
  background: linear-gradient(180deg, rgba(70, 54, 17, .94), rgba(45, 38, 18, .94));
  border-color: rgba(224, 174, 55, .56);
}

.purchase-product-row.purchase-final-card-ng,
.purchase-selected-product.purchase-final-card-ng,
.purchase-product-row.purchase-condition-out {
  background: linear-gradient(180deg, rgba(74, 31, 35, .94), rgba(48, 23, 30, .94));
  border-color: rgba(230, 104, 104, .56);
}

.purchase-product-row.purchase-final-card-missing,
.purchase-selected-product.purchase-final-card-missing,
.purchase-product-row.purchase-missing-url:not(.purchase-condition-out) {
  background: linear-gradient(180deg, rgba(38, 48, 61, .96), rgba(26, 36, 48, .96));
  border-color: rgba(151, 171, 193, .42);
}

.purchase-condition-badge,
.purchase-unit-badge,
.workflow-badge,
.purchase-mall-chip,
.purchase-decision-reason,
.purchase-status-legend button {
  background: rgba(12, 31, 46, .92);
  border-color: rgba(126, 177, 214, .34);
  color: #d7eafd;
}

.purchase-unit-badge.intent-restock,
.purchase-unit-badge.intent-additional,
.purchase-unit-badge.active,
.purchase-decision-reason.ok,
.purchase-status-legend .legend-ok {
  background: rgba(20, 83, 58, .92);
  border-color: rgba(92, 214, 155, .54);
  color: #d9ffed;
}

.purchase-decision-reason.warn,
.purchase-status-legend .legend-warn {
  background: rgba(89, 66, 12, .92);
  border-color: rgba(238, 190, 70, .56);
  color: #fff2c8;
}

.purchase-condition-out-label,
.purchase-missing-url-label,
.purchase-decision-reason.danger,
.purchase-status-legend .legend-danger,
.purchase-mall-chip.limit-over {
  background: rgba(96, 36, 36, .92);
  border-color: rgba(242, 119, 119, .56);
  color: #ffe0e0;
}

.purchase-decision-reason.missing,
.purchase-status-legend .legend-info,
.purchase-unit-badge.zero:not(.unit-ebay-stock) {
  background: rgba(44, 57, 72, .92);
  border-color: rgba(157, 178, 199, .46);
  color: #dbe7f2;
}

.purchase-final-ok > strong {
  background: #14533a;
  border-color: #5cd69b;
  color: #e7fff2;
}

.purchase-final-check > strong {
  background: #5a420c;
  border-color: #eebe46;
  color: #fff5d6;
}

.purchase-final-ng > strong {
  background: #602424;
  border-color: #f27777;
  color: #ffe6e6;
}

.purchase-final-missing > strong {
  background: #2c3948;
  border-color: #9db2c7;
  color: #ecf5ff;
}

/* Stock research density: tighten the search/tabs area above the result cards. */
.purchase-list-panel {
  padding: 12px 14px 14px;
}

.purchase-list-panel .purchase-panel-head {
  align-items: start;
  gap: 10px;
  margin-bottom: 6px;
}

.purchase-list-panel .purchase-panel-head .eyebrow {
  margin-bottom: 2px;
  font-size: 11px;
}

.purchase-list-panel .purchase-panel-head h2 {
  font-size: 22px;
  line-height: 1.15;
}

.purchase-list-panel .purchase-panel-search {
  flex-basis: 360px;
}

.purchase-list-panel .purchase-search-field {
  gap: 3px;
  font-size: 11px;
}

.purchase-list-panel .purchase-search-field input {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 9px;
}

.purchase-list-panel .purchase-catalog-tabs {
  margin: 0 0 6px;
  padding: 3px;
  gap: 4px;
}

.purchase-list-panel .purchase-catalog-tab {
  min-height: 28px;
  padding: 5px 11px;
  font-size: 11px;
}

.purchase-list-panel .purchase-sale-panel {
  margin: 0 0 7px;
  padding: 7px 10px;
  border-radius: 10px;
}

.purchase-list-panel .purchase-sale-panel summary {
  font-size: 12px;
  line-height: 1.2;
}

.purchase-list-panel .purchase-search-panel {
  gap: 5px;
  margin-bottom: 9px;
  padding: 7px;
  border-radius: 10px;
}

.purchase-list-panel .purchase-filter-group {
  min-height: 34px;
  padding: 4px;
  gap: 4px;
  border-radius: 12px;
}

.purchase-list-panel .purchase-clear-filters {
  min-width: 28px;
  min-height: 28px;
  font-size: 15px;
}

.purchase-list-panel .purchase-check {
  min-height: 28px;
  padding: 0 6px;
  font-size: 11px;
}

.purchase-list-panel .purchase-filter-summary {
  margin: 0 3px;
  font-size: 11px;
}

/* Keep Listing status filters visible while the ledger and editor scroll below. */
body:not(.home-mode):not(.purchase-mode) .status-grid {
  position: sticky;
  top: 0;
  z-index: 46;
  padding: 6px 0 8px;
  background: rgba(232, 245, 252, .96);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 22px rgba(21, 72, 112, .12);
}

.purchase-list-panel .purchase-status-legend {
  gap: 5px;
  margin-top: 0;
}

.purchase-list-panel .purchase-status-legend button {
  min-height: 22px;
  padding: 3px 7px;
  font-size: 10px;
}

@media (min-width: 901px) {
  .purchase-list-panel {
    display: grid;
    grid-template-columns: auto auto minmax(280px, 540px);
    gap: 7px 12px;
    align-items: center;
  }

  .purchase-list-panel .purchase-panel-head {
    display: contents;
    margin: 0;
  }

  .purchase-list-panel .purchase-panel-head > div {
    grid-column: 1;
    grid-row: 1;
    min-width: 220px;
  }

  .purchase-list-panel .purchase-panel-head .eyebrow {
    margin: 0 0 1px;
    font-size: 10px;
    line-height: 1;
  }

  .purchase-list-panel .purchase-panel-head h2 {
    font-size: 20px;
    line-height: 1.08;
  }

  .purchase-list-panel .purchase-catalog-tabs {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    align-self: end;
  }

  .purchase-list-panel .purchase-panel-search {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    width: min(540px, 100%);
    min-width: 0;
    flex: none;
  }

  .purchase-list-panel .purchase-sale-panel,
  .purchase-list-panel .purchase-search-panel,
  .purchase-list-panel .purchase-list {
    grid-column: 1 / -1;
  }

  .purchase-list-panel .purchase-sale-panel {
    margin-top: 0;
  }

  .purchase-list-panel .purchase-search-panel {
    margin-bottom: 7px;
  }

  .purchase-list-panel .purchase-filter-group {
    min-height: 30px;
    background: rgba(15, 38, 56, .92);
    border-color: rgba(124, 182, 222, .26);
  }

  .purchase-list-panel .purchase-check,
  .purchase-list-panel .purchase-clear-filters {
    min-height: 24px;
  }
}

@media (max-width: 900px) {
  .purchase-list-panel {
    display: block;
  }

  .purchase-catalog-toolbar {
    align-items: stretch;
  }

  .purchase-catalog-toolbar .purchase-catalog-tabs,
  .purchase-high-turnover-import,
  .purchase-stock-refresh-controls {
    width: 100%;
  }

  .purchase-stock-refresh-controls {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .purchase-catalog-toolbar .purchase-catalog-tabs {
    justify-content: center;
  }

  .purchase-target-watch-controls {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Listing mobile flow: put the active editor before the ledger so AI recognition is reachable without a long scroll. */
@media (max-width: 900px) {
  body:not(.home-mode):not(.purchase-mode) .shell {
    display: flex;
    flex-direction: column;
  }

  body:not(.home-mode):not(.purchase-mode) .hero-panel {
    order: 1;
  }

  body:not(.home-mode):not(.purchase-mode) .status-grid-note {
    order: 2;
  }

  body:not(.home-mode):not(.purchase-mode) .status-grid {
    order: 3;
  }

  body:not(.home-mode):not(.purchase-mode) .workspace {
    order: 4;
  }

  body:not(.home-mode):not(.purchase-mode) .selected-item-bar {
    order: 5;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-panel {
    order: 6;
  }

  body.listing-ledger-open:not(.home-mode):not(.purchase-mode) .ledger-panel {
    order: 4;
  }

  body.listing-ledger-open:not(.home-mode):not(.purchase-mode) .selected-item-bar {
    order: 5;
  }

  body.listing-ledger-open:not(.home-mode):not(.purchase-mode) .workspace {
    order: 6;
  }

  body:not(.home-mode):not(.purchase-mode) .editor {
    display: flex;
    flex-direction: column;
  }

  body:not(.home-mode):not(.purchase-mode) .editor > .stepper {
    order: 1;
  }

  body:not(.home-mode):not(.purchase-mode) .editor > .listing-status-panel--global {
    order: 2;
  }

  body:not(.home-mode):not(.purchase-mode) .editor > form {
    order: 3;
  }

  body:not(.home-mode):not(.purchase-mode) .editor > .sync-panel {
    order: 4;
  }

  body:not(.home-mode):not(.purchase-mode) .top-step-nav {
    position: static;
  }
}

@media (max-width: 520px) {
  body:not(.home-mode):not(.purchase-mode) .status-grid-note {
    display: none;
  }

  body:not(.home-mode):not(.purchase-mode) .selected-item-bar {
    margin: 8px 0 0;
    padding: 8px 10px;
  }

  body:not(.home-mode):not(.purchase-mode) .selected-item-bar dl {
    display: none;
  }

  body:not(.home-mode):not(.purchase-mode) .selected-item-bar strong {
    font-size: 16px;
  }

  body:not(.home-mode):not(.purchase-mode) .form-section[data-section="assist"] .section-heading {
    display: none;
  }

  body:not(.home-mode):not(.purchase-mode) .start-options {
    gap: 10px;
  }

  body:not(.home-mode):not(.purchase-mode) .start-card {
    padding: 10px;
    border-radius: 12px;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 14px;
    width: auto;
    max-width: none;
    transform: translateY(16px);
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
  }

  .toast.show {
    transform: translateY(0);
  }
}

/* Compact Listing on phones so the editor stays usable above the fold. */
@media (max-width: 520px) {
  body:not(.home-mode):not(.purchase-mode) .shell {
    width: 100%;
    margin: 4px 0 16px;
  }

  body:not(.home-mode):not(.purchase-mode) .hero-panel {
    min-height: 0;
    border-radius: 10px;
    padding: 7px 8px;
    gap: 5px;
  }

  body:not(.home-mode):not(.purchase-mode) .hero-panel .eyebrow,
  body:not(.home-mode):not(.purchase-mode) .hero-panel p:last-child {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .hero-panel h2 {
    font-size: 20px;
    line-height: 1;
  }

  body:not(.home-mode):not(.purchase-mode) .hero-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  body:not(.home-mode):not(.purchase-mode) .hero-actions .primary-pill,
  body:not(.home-mode):not(.purchase-mode) .hero-actions .outline-pill {
    min-height: 30px;
    padding: 5px 4px;
    border-radius: 9px;
    font-size: 10px;
  }

  body:not(.home-mode):not(.purchase-mode) .status-grid {
    margin: 4px 0 6px;
    gap: 6px;
    padding: 4px 0 5px;
  }

  body:not(.home-mode):not(.purchase-mode) .status-grid article {
    flex: 0 0 96px;
    min-height: 44px;
    padding: 6px 7px;
    border-radius: 10px;
  }

  body:not(.home-mode):not(.purchase-mode) .status-grid span {
    font-size: 10px;
  }

  body:not(.home-mode):not(.purchase-mode) .status-grid strong {
    font-size: 18px;
    line-height: 1.05;
  }

  body:not(.home-mode):not(.purchase-mode) .stepper {
    grid-template-columns: repeat(var(--step-count, 6), minmax(42px, 1fr));
    padding: 6px 4px;
  }

  body:not(.home-mode):not(.purchase-mode) .step {
    gap: 2px;
    font-size: 10px;
  }

  body:not(.home-mode):not(.purchase-mode) .step span {
    width: 22px;
    height: 22px;
  }

  body:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    padding: 6px 8px;
    gap: 6px;
  }

  body:not(.home-mode):not(.purchase-mode) .listing-status-panel--global > div:first-child {
    align-items: center;
  }

  body:not(.home-mode):not(.purchase-mode) .listing-status-panel--global span {
    font-size: 12px;
  }

  body:not(.home-mode):not(.purchase-mode) .listing-status-panel--global strong {
    font-size: 16px;
  }

  body:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  body:not(.home-mode):not(.purchase-mode) .listing-status-btn {
    min-height: 30px;
    padding: 4px 2px;
    border-radius: 999px;
    font-size: 10px;
  }

  body:not(.home-mode):not(.purchase-mode) form {
    max-width: none;
    padding: 10px 8px;
  }

  body:not(.home-mode):not(.purchase-mode) .top-step-nav {
    margin: -10px -8px 8px;
    padding: 6px 8px;
    gap: 6px;
  }

  body:not(.home-mode):not(.purchase-mode) .top-step-current {
    min-height: 34px;
    border-radius: 10px;
  }

  body:not(.home-mode):not(.purchase-mode) .top-step-current span {
    font-size: 10px;
  }

  body:not(.home-mode):not(.purchase-mode) .top-step-current strong {
    font-size: 15px;
  }

  body:not(.home-mode):not(.purchase-mode) .top-step-btn {
    min-height: 36px;
    font-size: 12px;
  }

  body:not(.home-mode):not(.purchase-mode) .start-card,
  body:not(.home-mode):not(.purchase-mode) .basic-fast-card {
    padding: 8px;
    border-radius: 10px;
  }

  body:not(.home-mode):not(.purchase-mode) .start-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 22px;
  }

  body:not(.home-mode):not(.purchase-mode) .start-card h4 {
    margin: 0 0 4px;
    font-size: 16px;
  }

  body:not(.home-mode):not(.purchase-mode) .start-card p {
    font-size: 12px;
    line-height: 1.45;
  }

  body:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
    gap: 6px;
  }

  body:not(.home-mode):not(.purchase-mode) .basic-fast-card .group-title {
    margin-bottom: 6px;
    font-size: 14px;
  }

  body:not(.home-mode):not(.purchase-mode) .shell input:not([type="file"]),
  body:not(.home-mode):not(.purchase-mode) .shell select,
  body:not(.home-mode):not(.purchase-mode) .shell textarea {
    min-height: 36px;
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 14px;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head {
    padding: 7px 9px;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head h3 {
    font-size: 17px;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-summary {
    font-size: 12px;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
    gap: 6px;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-search-input {
    min-height: 34px;
    font-size: 13px;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-toggle,
  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions a {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 12px;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-scroll {
    max-height: 50vh;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tbody {
    gap: 7px;
    padding: 7px;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tr {
    gap: 6px;
    padding: 8px;
    border-radius: 10px;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
    gap: 5px;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-order-input,
  body:not(.home-mode):not(.purchase-mode) .ledger-edit-input,
  body:not(.home-mode):not(.purchase-mode) .ledger-sku-input,
  body:not(.home-mode):not(.purchase-mode) .ledger-price-input {
    min-height: 30px;
    padding: 5px 7px;
    font-size: 13px;
  }
}

/* Keep the shared DB toolbar inside the editor even after maintenance buttons are added. */
body:not(.home-mode):not(.purchase-mode) .editor > .sync-panel {
  grid-template-columns: minmax(220px, .85fr) minmax(0, 1.6fr);
  grid-template-areas:
    "head actions"
    "note actions"
    "url actions"
    "audit audit";
  align-items: start;
  overflow: hidden;
}

body:not(.home-mode):not(.purchase-mode) .editor > .sync-panel .sync-head,
body:not(.home-mode):not(.purchase-mode) .editor > .sync-panel .sync-note,
body:not(.home-mode):not(.purchase-mode) .editor > .sync-panel .sync-url-details,
body:not(.home-mode):not(.purchase-mode) .editor > .sync-panel .sync-actions {
  min-width: 0;
}

body:not(.home-mode):not(.purchase-mode) .editor > .sync-panel .sync-note {
  max-width: none;
  overflow-wrap: anywhere;
}

body:not(.home-mode):not(.purchase-mode) .editor > .sync-panel .sync-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 6px;
  max-width: 100%;
}

body:not(.home-mode):not(.purchase-mode) .editor > .sync-panel .sync-actions .primary-btn,
body:not(.home-mode):not(.purchase-mode) .editor > .sync-panel .sync-actions .secondary-btn {
  flex: 0 1 auto;
  max-width: 100%;
  white-space: nowrap;
}

body:not(.home-mode):not(.purchase-mode) .editor > .sync-panel .listing-audit {
  grid-area: audit;
  min-width: 0;
}

.purchase-trigger-action-status:not(:empty) {
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(31, 132, 183, .14);
  color: #d8efff;
}

.purchase-trigger-action-status.is-error:not(:empty) {
  border: 1px solid rgba(224, 49, 49, .72);
  background: rgba(224, 49, 49, .16);
  color: #ffd2d2;
}

/* Stock: empty-condition creation must be visibly active and validation must stay beside the form. */
.purchase-form-panel.is-new-condition-creation {
  border-color: rgba(35, 180, 230, .8);
  box-shadow: 0 0 0 2px rgba(35, 180, 230, .18);
}

.purchase-quick-validation-error {
  margin: 6px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(224, 49, 49, .75);
  border-radius: 8px;
  background: rgba(224, 49, 49, .16);
  color: #ffd7d7;
  font-weight: 700;
}

.purchase-compact-form-grid input[aria-invalid="true"] {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 2px rgba(224, 49, 49, .2);
}

@media (max-width: 900px) {
  body:not(.home-mode):not(.purchase-mode) .editor > .sync-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "note"
      "url"
      "actions"
      "audit";
  }

  body:not(.home-mode):not(.purchase-mode) .editor > .sync-panel .sync-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
    justify-content: stretch;
  }

  body:not(.home-mode):not(.purchase-mode) .editor > .sync-panel .sync-actions .primary-btn,
  body:not(.home-mode):not(.purchase-mode) .editor > .sync-panel .sync-actions .secondary-btn {
    width: 100%;
    white-space: normal;
  }
}

/* Listing screen split: ledger and editor are separate workspaces. */
.listing-editor-toolbar {
  display: none;
}

.listing-editor-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.ledger-new-btn {
  min-height: 36px;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.photo-url-card {
  margin: 14px 0;
}

.photo-url-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .workspace,
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .selected-item-bar {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-panel {
  display: block;
  margin-top: 12px;
}

body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-panel .ledger-toggle {
  display: none;
}

body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-panel-collapsed .ledger-scroll {
  display: block;
}

body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .workspace,
body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .selected-item-bar {
  display: none;
}

body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-panel {
  display: block;
  margin-top: 12px;
}

body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-panel .ledger-toggle {
  display: none;
}

body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-panel-collapsed .ledger-scroll {
  display: block;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .hero-panel,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-grid-note,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ledger-panel,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .side-panel,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .selected-item-bar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .mobile-home-btn {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .shell {
  width: min(100%, 1200px);
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .workspace {
  display: block;
  max-width: 860px;
  margin: 0 auto;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 58;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  background: rgba(232, 245, 252, .96);
  backdrop-filter: blur(10px);
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar .primary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar .secondary-btn {
  min-height: 38px;
  border-radius: 12px;
  padding: 7px 18px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor > .sync-panel {
  display: none;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) form {
  background: #fff;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) form {
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 18px 44px rgba(30, 93, 145, .08);
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-grid--setup {
  grid-template-columns: 1fr;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card .choice-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card .grade-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) {
    overflow-x: hidden;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .shell {
    margin: 0;
    padding: 0;
    width: 100%;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .workspace {
    width: 100%;
    max-width: none;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, .7fr);
    padding: 8px 10px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-title {
    font-size: 15px;
    white-space: normal;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    border-radius: 0;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) form {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card .choice-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card .grade-row {
    grid-template-columns: 1fr;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .hero-panel {
    display: none;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-head-actions p,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-search-input {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar .primary-btn,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar .secondary-btn {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 12px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn:last-child {
    grid-column: 1 / -1;
  }
}

.live-preview-panel {
  display: none;
}

.live-preview-head,
.live-copy-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.live-preview-head h3,
.live-copy-card h4 {
  margin: 0;
}

.live-preview-head > span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.live-copy-card,
.live-preview-frame-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
}

.live-copy-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.live-copy-card textarea {
  width: 100%;
  min-height: 94px;
  max-height: 180px;
  resize: vertical;
}

.live-html-output {
  min-height: 118px;
  max-height: 220px;
}

.live-preview-shell {
  width: 100%;
}

#liveHtmlPreviewFrame {
  display: block;
  width: 100%;
  height: 440px;
  border: 0;
  background: #fff;
}

@media (min-width: 1180px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .shell {
    width: min(100%, 1540px);
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .workspace {
    max-width: 1440px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 440px);
    gap: 16px;
    align-items: start;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor > .sync-panel,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    grid-column: 1 / -1;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #itemForm {
    grid-column: 1;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
    position: sticky;
    top: 116px;
    grid-column: 2;
    display: grid;
    gap: 12px;
    max-height: calc(100vh - 132px);
    overflow: auto;
    border: 1px solid #cfe3f2;
    border-radius: 18px;
    background: #f7fcff;
    padding: 14px;
    box-shadow: 0 18px 44px rgba(30, 93, 145, .08);
  }
}

/* Mobile Listing cleanup: phones are primarily for new-listing work, with ledger as a compact search view. */
@media (max-width: 900px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .shell,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .shell {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .workspace,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #itemForm,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .item-specifics-panel,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-panel,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-scroll,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, .7fr);
    gap: 8px;
    padding: 7px 8px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-title {
    font-size: 14px;
    white-space: normal;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar .primary-btn,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar .secondary-btn {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 6px 8px;
    white-space: normal;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    display: flex;
    gap: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper::-webkit-scrollbar {
    display: none;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step {
    flex: 1 0 70px;
    min-width: 0;
    padding-inline: 3px;
    white-space: normal;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    padding: 7px 8px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global > div:first-child {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
    min-width: 0;
    min-height: 34px;
    padding: 6px;
    white-space: normal;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) form {
    padding: 8px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-nav {
    grid-template-columns: minmax(0, 1fr);
    margin: -8px -8px 8px;
    padding: 8px;
    gap: 7px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-current,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-btn {
    width: 100%;
    min-width: 0;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-options,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-title-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .item-specifics-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .price-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .summary-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade-row,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-upload-actions,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-queue-actions,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .item-specifics-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .item-specifics-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .item-specifics-head p,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card p,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result {
    overflow-wrap: anywhere;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-paste-hint,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview.compact {
    width: 100%;
    min-height: 120px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .shell input:not([type="file"]),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .shell select,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .shell textarea,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .primary-btn,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .secondary-btn,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
    min-width: 0;
    max-width: 100%;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .hero-panel,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .status-grid-note,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .status-grid,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .selected-item-bar {
    display: none !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-panel {
    margin: 8px;
    border-radius: 16px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    width: 100%;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-head-actions p,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-head-actions a {
    display: none !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-search-input {
    grid-column: 1 / -1;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-new-btn {
    width: 100%;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-scroll {
    max-height: none;
    overflow: visible;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table tbody {
    gap: 8px;
    padding: 8px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table tr {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    padding: 10px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1),
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2),
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
    display: none !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td::before {
    display: none !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
    grid-column: 1 / -1;
    order: -2;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
    order: -1;
    justify-self: start;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-title strong {
    font-size: 15px;
    line-height: 1.35;
  }
}

@media (max-width: 430px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade-row,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-upload-actions,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-queue-actions,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .item-specifics-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Listing density pass: wider ledger, compact editor counts, and larger live preview. */
.editor-count-strip {
  display: none;
}

@media (min-width: 901px) {
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .shell,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .shell {
    width: min(100%, calc(100vw - 24px));
    max-width: 1880px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-panel,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-panel {
    margin-inline: 0;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-head,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-head {
    display: grid;
    grid-template-columns: minmax(160px, .34fr) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 11px 14px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-head-actions,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-head-actions {
    display: grid;
    grid-template-columns: minmax(240px, .9fr) minmax(300px, 1.25fr) auto auto auto;
    grid-template-areas: "note search new ebay toggle";
    align-items: center;
    justify-content: stretch;
    gap: 8px;
    width: 100%;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-head-actions p,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-head-actions p {
    grid-area: note;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-search-input,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-search-input {
    grid-area: search;
    width: 100%;
    min-width: 0;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-new-btn,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-new-btn {
    grid-area: new;
    min-height: 34px;
    padding: 7px 16px;
    white-space: nowrap;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-head-actions a,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-head-actions a {
    grid-area: ebay;
    min-height: 34px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-toggle,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-toggle {
    grid-area: toggle;
    min-height: 34px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-scroll,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-scroll {
    max-height: calc(100vh - 315px);
    min-height: 560px;
    overflow-x: hidden;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td {
    padding: 6px 6px;
    overflow: hidden;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(1),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(1) {
    width: 222px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(2),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(2) {
    width: 124px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(3),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(3) {
    width: auto;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(4),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(4) {
    width: 138px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(5),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(5) {
    width: 126px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(6),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(6) {
    width: 98px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(7),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(7) {
    width: 106px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(8),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(8) {
    width: 54px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-title,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-title {
    width: auto;
    min-width: 0;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-purchase-fields {
    width: 100%;
    grid-template-columns: minmax(82px, .95fr) minmax(84px, 1fr);
    gap: 4px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-order-input,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-edit-input,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-order-input,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-edit-input {
    width: 100%;
    min-width: 0;
    min-height: 30px;
    padding: 5px 7px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-sku-input,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-price-input,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-sku-input,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-price-input {
    width: 100%;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-edit,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-edit {
    padding: 5px 7px;
    min-width: 0;
    white-space: nowrap;
  }
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  background: #e8f5fc;
  backdrop-filter: none;
  border-bottom: 1px solid #cfe3f2;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  margin: 0;
  border: 1px solid #cfe3f2;
  border-top: 0;
  background: #fff;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 46px;
  padding: 7px 10px;
  border: 1px solid #d3e4f1;
  border-radius: 12px;
  background: #f8fcff;
  color: var(--navy);
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 19px;
  line-height: 1;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip.active {
  border-color: #21a4d8;
  box-shadow: inset 0 0 0 2px rgba(33, 164, 216, .14);
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  background: #073b5c;
  border: 1px solid #073b5c;
  border-bottom: 0;
  margin: 0;
  position: relative;
  z-index: 3;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  background: #f7fcff;
  border-top: 0;
  margin: 0;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 20px rgba(20, 75, 115, .06);
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #itemForm {
  margin-top: 0;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-nav {
  margin-top: 0;
  background: #fff;
  border-top: 0;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section[data-section="assist"] .section-heading {
  margin-bottom: 10px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section[data-section="assist"] .section-heading h3 {
  font-size: 22px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-options {
  gap: 10px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card {
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 18px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card h4 {
  margin-bottom: 2px;
  font-size: 18px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card p {
  font-size: 13px;
  line-height: 1.45;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-upload-actions label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-queue-actions button {
  min-height: 38px;
  padding-block: 7px;
}

.html-copy-card,
.live-copy-card {
  padding: 9px 10px;
  border-radius: 12px;
}

.html-copy-card p,
.live-copy-card p {
  display: none;
}

.html-copy-card h4,
.live-copy-card h4 {
  font-size: 14px;
}

.compact-copy {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.copy-output-textarea,
.live-copy-card textarea {
  min-height: 70px;
  max-height: 115px;
  font-size: 12px;
  line-height: 1.45;
}

.live-html-output {
  min-height: 82px;
  max-height: 135px;
}

#liveHtmlPreviewFrame {
  height: 560px;
}

@media (min-width: 1180px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    grid-column: 1 / -1;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
    top: 106px;
    gap: 8px;
    max-height: calc(100vh - 118px);
    padding: 10px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
    padding-bottom: 2px;
  }
}

@media (max-width: 900px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 7px 8px;
    scrollbar-width: none;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip::-webkit-scrollbar {
    display: none;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
    flex: 0 0 118px;
    min-height: 42px;
    padding: 6px 9px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
    font-size: 18px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    background: #073b5c;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section[data-section="assist"] .section-heading {
    display: none;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card {
    padding: 10px;
  }
}

/* Editor preview refinement: instructor-style input flow with a compact live preview. */
.editor-selected-item-bar {
  display: none;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor {
  background: #f3f5f7;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid #eadfac;
  border-top: 0;
  background: #fff8df;
  color: var(--navy);
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dt {
  display: block;
  color: #6b7f94;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--navy);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl {
  display: flex;
  gap: 8px;
  margin: 0;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl div {
  min-width: 94px;
  padding: 7px 10px;
  border: 1px solid #d9e8f4;
  border-radius: 10px;
  background: #fff;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dd {
  margin: 1px 0 0;
  color: var(--navy);
  font-size: 17px;
  font-weight: 900;
  white-space: nowrap;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  border-top: 1px solid #d8e8f4;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #itemForm {
  background: #f3f5f7;
  border-color: transparent;
  box-shadow: none;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section {
  max-width: 760px;
  margin-inline: auto;
  padding: 22px 16px 92px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-heading {
  margin-bottom: 14px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-heading h3 {
  font-size: 24px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-groups {
  display: block;
  max-width: 760px;
  margin-inline: auto;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-groups fieldset {
  display: block;
  margin: 0 0 13px;
  padding: 0;
  border: 0;
  background: transparent;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-groups legend,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .group-title {
  margin-bottom: 7px;
  color: var(--navy);
  font-size: 18px;
  font-weight: 900;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade-row,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  gap: 10px;
  margin-bottom: 16px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .pill {
  min-height: 56px;
  justify-content: flex-start;
  border-color: #d3dce1;
  border-radius: 8px;
  background: #fff;
  padding: 13px 18px;
  color: #011b33;
  font-size: 15px;
  text-align: left;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice.active,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade.active,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory.active,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .pill.active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .item-specifics-panel,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card {
  border-color: #cfe3f2;
  border-radius: 14px;
  box-shadow: none;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-details,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-code-details,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-card textarea {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-copy-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-card {
  display: flex;
  justify-content: flex-end;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-copy-card .output-card-head > div,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-copy-card > div,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-card-head > div {
  display: none;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-copy-card .output-card-head,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-card-head {
  width: 100%;
  justify-content: flex-end;
  align-items: center;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .compact-copy {
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 14px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  min-height: 0;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell {
  min-height: 0;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
  height: min(760px, calc(100vh - 260px));
  min-height: 560px;
}

@media (min-width: 1180px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor {
    grid-template-columns: minmax(0, 760px) minmax(390px, 520px);
    justify-content: center;
    column-gap: 22px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    grid-column: 1 / -1;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
    gap: 10px;
    padding: 14px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
    min-height: calc(100vh - 250px);
  }
}

@media (max-width: 900px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 12px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl div {
    min-width: 0;
    padding: 6px 8px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar strong {
    font-size: 17px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dd {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section {
    padding: 16px 12px 92px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .pill {
    min-height: 48px;
    padding: 11px 13px;
    font-size: 14px;
  }
}

/* Listing editor density pass: keep the active item visible and reduce scrolling. */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  gap: 8px;
  padding: 8px 10px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip span {
  font-size: 11px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 17px;
  line-height: 1;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid #eadfac;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar strong {
  font-size: 16px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl {
  gap: 6px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl div {
  min-width: 78px;
  padding: 5px 7px;
  border-radius: 8px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dt {
  font-size: 9px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dd {
  font-size: 13px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  padding: 8px 10px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-head {
  gap: 6px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-note {
  margin: 3px 0 0;
  font-size: 11px;
  line-height: 1.35;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-actions {
  gap: 6px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-actions .primary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-actions .secondary-btn {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 12px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky;
  top: 0;
  z-index: 65;
  padding: 6px 8px;
  box-shadow: 0 8px 16px rgba(0, 30, 56, .12);
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step {
  min-height: 42px;
  gap: 4px;
  font-size: 12px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step span {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky;
  top: 54px;
  z-index: 64;
  gap: 8px;
  padding: 7px 10px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global > div:first-child {
  min-width: 120px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global span {
  font-size: 10px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #listingStatusText {
  font-size: 18px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-nav {
  gap: 8px;
  padding: 7px 10px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-current {
  min-height: 38px;
  padding: 6px 10px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-current span {
  font-size: 10px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-current strong {
  font-size: 16px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-btn {
  min-height: 38px;
  padding: 7px 12px;
  font-size: 13px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section {
  padding-top: 14px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-heading {
  margin-bottom: 8px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-heading h3 {
  font-size: 20px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .group-title,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-groups legend {
  margin-bottom: 5px;
  font-size: 15px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .item-specifics-panel,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card {
  padding: 10px;
  border-radius: 12px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) label {
  gap: 4px;
  font-size: 12px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) select,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 13px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
  min-height: 74px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade-row,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  gap: 6px;
  margin-bottom: 10px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .pill {
  min-height: 36px;
  justify-content: flex-start;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.25;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  justify-content: center;
  overflow: visible;
  text-align: center;
  text-overflow: clip;
  white-space: normal;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-groups fieldset {
  margin-bottom: 8px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid[data-compact],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field-grid {
  gap: 8px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card {
  gap: 7px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head {
  gap: 8px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card h4 {
  font-size: 15px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-paste-hint,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .hint {
  font-size: 11px;
  line-height: 1.35;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-upload-actions {
  gap: 6px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-upload-actions label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-queue-actions button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links a {
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 12px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-queue-actions {
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 6px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result {
  min-height: 54px;
  padding: 7px;
  border-radius: 10px;
  font-size: 12px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview img {
  max-height: 150px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .business-policy-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .profit-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .shipping-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .repair-card {
  padding: 10px;
  border-radius: 12px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sales-reference-panel {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .compact-copy {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-copy-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-card {
  margin-bottom: 6px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
  min-height: 620px;
}

@media (max-width: 900px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    padding: 6px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
    flex-basis: 94px;
    min-height: 34px;
    padding: 5px 8px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    padding: 7px 8px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl {
    gap: 5px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl div {
    padding: 5px 6px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    overflow-x: auto;
    gap: 4px;
    padding: 5px 4px;
    scrollbar-width: none;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper::-webkit-scrollbar {
    display: none;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step {
    flex: 0 0 72px;
    min-height: 38px;
    font-size: 10px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 48px;
    grid-template-columns: 96px minmax(0, 1fr);
    padding: 6px 7px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #listingStatusText {
    font-size: 16px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 11px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn:last-child {
    grid-column: auto;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-nav {
    grid-template-columns: 1fr;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-current {
    min-height: 34px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-btn {
    min-height: 34px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section {
    padding: 10px 8px 78px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-grid--setup {
    gap: 8px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
    gap: 6px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) input,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) select,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 12px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .pill {
    min-height: 32px;
    padding: 6px 7px;
    font-size: 11.5px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
    font-size: 10.5px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head {
    align-items: center;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head p,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card p,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-paste-hint,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .hint {
    display: none;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-upload-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result {
    min-height: 44px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
    padding: 7px 8px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-note,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-url-details {
    display: none;
  }
}

/* 20260718 compact editor / category visibility hardening */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [hidden],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-lens-function-field].is-hidden,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-body-function-field].is-hidden,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-body-check-field].is-hidden,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-body-only-field].is-hidden,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-film-camera-field].is-hidden {
  display: none !important;
}

.status-grid + .listing-context-bar {
  margin: 8px 0 10px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky;
  top: 0;
  z-index: 82;
  min-height: 48px;
  padding: 6px 8px;
  background: #0a3a58;
  box-shadow: 0 1px 0 rgba(188, 220, 241, .65);
  transform: translateZ(0);
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: 48px;
  z-index: 81;
  transform: translateZ(0);
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-nav {
  padding: 6px 8px;
  background: #f7fbff;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: end;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .pill,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .service-check-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.18;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-groups {
  gap: 6px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-groups fieldset,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .function-check-fieldset {
  gap: 5px;
  margin-bottom: 5px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .group-title,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-groups legend {
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.18;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) select,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
  min-height: 31px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 12px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
  min-height: 62px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .item-specifics-panel,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .business-policy-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .profit-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .shipping-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .repair-card {
  padding: 8px;
  border-radius: 10px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card h4 {
  font-size: 14px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-paste-hint {
  font-size: 10.5px;
  line-height: 1.25;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-upload-actions label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-queue-actions button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links a {
  min-height: 28px;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: 11px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result {
  min-height: 38px;
  padding: 6px;
  font-size: 11px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview img {
  max-height: 118px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 4px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  overflow: visible;
  text-align: center;
  text-overflow: clip;
  white-space: normal;
  word-break: keep-all;
  font-size: 10.5px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .note-chip-row {
  gap: 4px;
  margin: 3px 0 6px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .note-chip-row button {
  padding: 3px 7px;
  font-size: 10px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .copy-output-textarea {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .live-copy-card p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .html-copy-card p {
  display: none;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .live-copy-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .html-copy-card {
  padding: 8px 10px;
}

@media (max-width: 900px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .shell {
    padding-inline: 5px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .hero-panel {
    padding: 10px;
    gap: 8px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .hero-panel h2 {
    font-size: 24px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .hero-panel p:not(.eyebrow) {
    display: none;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-grid {
    gap: 6px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-card-action,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-grid article {
    min-height: 54px;
    padding: 8px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-context-bar {
    padding: 8px;
    gap: 7px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-context-bar strong {
    font-size: 16px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
    flex-basis: 82px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .pill {
    min-height: 29px;
    padding: 4px 6px;
    font-size: 10.5px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 44px;
    grid-template-columns: 82px minmax(0, 1fr);
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #listingStatusText {
    font-size: 15px;
  }
}

/* 20260718 final instruction pass: make the deployed UI compact and deterministic. */
.sales-reference-panel,
.past-sales-panel,
[data-past-sales-panel] {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: 0 !important;
  z-index: 120 !important;
  min-height: 42px !important;
  padding: 5px 10px !important;
  background: #073b5c !important;
  box-shadow: 0 1px 0 rgba(7, 59, 92, 0.18);
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: 42px !important;
  z-index: 119 !important;
  padding: 6px 10px !important;
  background: rgba(245, 251, 255, 0.98) !important;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 5px 14px rgba(9, 49, 79, 0.08);
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global h2 {
  font-size: clamp(18px, 1.8vw, 25px) !important;
  line-height: 1.08 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
  min-height: 30px !important;
  padding: 4px 12px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .current-step-label {
  min-height: 34px !important;
  padding: 5px 10px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .current-step-label strong {
  font-size: 20px !important;
  line-height: 1.05 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  margin: 8px 0 0 !important;
  padding: 7px 10px !important;
  border-radius: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-name {
  font-size: clamp(16px, 1.5vw, 22px) !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-meta {
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-meta .selected-item-stat {
  min-width: 92px !important;
  padding: 5px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-meta .selected-item-stat strong {
  font-size: 17px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-content {
  padding: 16px 20px 96px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-section {
  margin-bottom: 14px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .tool-panel,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .specifics-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-panel {
  padding: 10px !important;
  border-radius: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-info-grid {
  gap: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .purchase-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) label {
  gap: 3px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) select,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
  min-height: 34px !important;
  padding: 7px 9px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-pill {
  min-height: 30px !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1.18 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade-row,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .button-grid {
  gap: 6px !important;
  margin-bottom: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-groups {
  gap: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-group,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) fieldset {
  margin-bottom: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-group legend,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) fieldset legend {
  margin-bottom: 5px !important;
  font-size: 14px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  word-break: keep-all;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card {
  padding: 8px !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card h3,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card h3 {
  margin: 0 0 2px !important;
  font-size: 16px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card p {
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-upload-actions,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-queue-actions {
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-upload-actions label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-queue-actions button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card button {
  min-height: 28px !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-details,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-code-details,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-textarea {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-card {
  padding: 9px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-card h3 {
  font-size: 17px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-card button {
  min-height: 30px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-preview-frame {
  min-height: 360px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-lens-function-field].is-hidden,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-body-function-field].is-hidden,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-body-check-field].is-hidden,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-body-only-field].is-hidden,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-film-camera-field].is-hidden {
  display: none !important;
}

@media (min-width: 901px) {
  body.listing-ledger-mode .shell,
  body:not(.listing-editor-mode):not(.mobile-editor-mode) .shell {
    width: min(100%, calc(100vw - 28px)) !important;
    max-width: 1680px !important;
  }

  .ledger-panel {
    overflow: hidden !important;
  }

  .ledger-head {
    grid-template-columns: minmax(145px, 0.32fr) minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 10px 12px !important;
  }

  .ledger-title-area h2 {
    font-size: 20px !important;
  }

  .ledger-title-area p,
  .ledger-head-note {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  .ledger-head-actions {
    grid-template-columns: minmax(0, 0.9fr) minmax(240px, 360px) auto auto auto !important;
    gap: 8px !important;
    align-items: center !important;
  }

  .ledger-search {
    min-width: 0 !important;
  }

  .ledger-head-actions .btn,
  .ledger-head-actions button {
    min-height: 32px !important;
    padding: 5px 10px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  .ledger-scroll {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 330px) !important;
    min-height: 440px !important;
  }

  .ledger-table {
    min-width: 0 !important;
    width: 100% !important;
    table-layout: fixed !important;
    font-size: 11.5px !important;
  }

  .ledger-table th,
  .ledger-table td {
    padding: 5px 4px !important;
  }

  .ledger-table colgroup col:nth-child(1) { width: 188px !important; }
  .ledger-table colgroup col:nth-child(2) { width: 92px !important; }
  .ledger-table colgroup col:nth-child(3) { width: auto !important; }
  .ledger-table colgroup col:nth-child(4) { width: 110px !important; }
  .ledger-table colgroup col:nth-child(5) { width: 112px !important; }
  .ledger-table colgroup col:nth-child(6) { width: 76px !important; }
  .ledger-table colgroup col:nth-child(7) { width: 72px !important; }
  .ledger-table colgroup col:nth-child(8) { width: 46px !important; }

  .ledger-purchase-fields {
    width: 180px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  .ledger-table .ledger-order-input,
  .ledger-table .ledger-edit-input,
  .ledger-table .ledger-price-input,
  .ledger-table .ledger-sku-input {
    min-height: 27px !important;
    padding: 4px 6px !important;
    border-radius: 7px !important;
    font-size: 11.5px !important;
  }

  .ledger-table .ledger-sku-input {
    max-width: 100px !important;
  }

  .ledger-table .ledger-price-input {
    max-width: 70px !important;
  }

  .ledger-table .status-chip,
  .ledger-table .ledger-status-badge,
  .ledger-table .status-pill {
    padding: 4px 7px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
  }

  .ledger-table .edit-button,
  .ledger-table .btn,
  .ledger-table button {
    min-height: 26px !important;
    padding: 3px 7px !important;
    font-size: 11px !important;
  }
}

@media (max-width: 900px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    min-height: 38px !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 38px !important;
    padding: 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-content {
    padding: 12px 10px 92px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-button {
    min-height: 28px !important;
    padding: 4px 6px !important;
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-upload-actions,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-queue-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* 20260718 final compact editor/layout overrides */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky !important;
  top: 0 !important;
  z-index: 240 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 5px 6px !important;
  background: rgba(234, 247, 255, .98) !important;
  border-bottom: 1px solid rgba(191, 219, 238, .9) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-card {
  min-height: 32px !important;
  padding: 5px 8px !important;
  border-radius: 7px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-card span {
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-card strong {
  font-size: 16px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  position: sticky !important;
  top: 45px !important;
  z-index: 235 !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 6px 10px !important;
  border-radius: 0 !important;
  background: rgba(255, 249, 219, .98) !important;
  border-top: 1px solid rgba(232, 214, 150, .9) !important;
  border-bottom: 1px solid rgba(232, 214, 150, .9) !important;
  box-shadow: 0 8px 16px rgba(31, 78, 121, .08) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar span {
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar strong {
  font-size: 16px !important;
  line-height: 1.2 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-meta {
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-meta div {
  min-width: 78px !important;
  padding: 5px 7px !important;
  border-radius: 7px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  padding: 6px 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel small {
  font-size: 11px !important;
  line-height: 1.3 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-actions {
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-actions button {
  min-height: 28px !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: 91px !important;
  z-index: 230 !important;
  min-height: 38px !important;
  padding: 5px 6px !important;
  background: #0a3a5c !important;
  box-shadow: 0 8px 16px rgba(3, 33, 54, .15) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step {
  min-height: 30px !important;
  gap: 2px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-number {
  width: 24px !important;
  height: 24px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-label {
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: 129px !important;
  z-index: 225 !important;
  min-height: 46px !important;
  padding: 6px 10px !important;
  background: rgba(246, 252, 255, .98) !important;
  border-bottom: 1px solid rgba(191, 219, 238, .95) !important;
  box-shadow: 0 8px 14px rgba(31, 78, 121, .08) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global h2,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-title {
  font-size: 18px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-buttons {
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-buttons button {
  min-height: 28px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-content {
  padding-top: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-content h2,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-title {
  margin: 0 0 8px !important;
  font-size: 20px !important;
  line-height: 1.2 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .purchase-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card {
  padding: 10px !important;
  border-radius: 8px !important;
  gap: 7px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) select,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
  min-height: 34px !important;
  padding: 6px 9px !important;
  border-radius: 7px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-button {
  min-height: 30px !important;
  padding: 5px 8px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade-row {
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  align-items: stretch !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  width: 100% !important;
  min-height: 30px !important;
  padding: 5px 7px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview-grid {
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-selected-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result-preview {
  min-height: 52px !important;
  padding: 8px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  min-height: 28px !important;
  padding: 4px 5px !important;
  border-radius: 7px !important;
  font-size: 10.5px !important;
  line-height: 1.1 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions input {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .primary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .secondary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .file-button {
  min-height: 28px !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-row {
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  gap: 6px !important;
  padding: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-thumb {
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  border-radius: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .past-sales-panel,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-panel="past-sales"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="past-sales"] {
  display: none !important;
}

@media (min-width: 901px) {
  .ledger-head {
    grid-template-columns: minmax(125px, .26fr) minmax(0, 1fr) !important;
  }

  .ledger-head-actions {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 420px) auto auto !important;
  }

  .ledger-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  .ledger-table th,
  .ledger-table td {
    padding: 4px 3px !important;
  }

  .ledger-table colgroup col:nth-child(1) { width: 138px !important; }
  .ledger-table colgroup col:nth-child(2) { width: 70px !important; }
  .ledger-table colgroup col:nth-child(3) { width: auto !important; }
  .ledger-table colgroup col:nth-child(4) { width: 86px !important; }
  .ledger-table colgroup col:nth-child(5) { width: 76px !important; }
  .ledger-table colgroup col:nth-child(6) { width: 58px !important; }
  .ledger-table colgroup col:nth-child(7) { width: 54px !important; }
  .ledger-table colgroup col:nth-child(8) { width: 36px !important; }

  .ledger-purchase-fields {
    width: 132px !important;
    grid-template-columns: 62px 64px !important;
    gap: 3px !important;
  }

  .ledger-table td:nth-child(3),
  .ledger-table td:nth-child(5),
  .ledger-table td:nth-child(6),
  .ledger-table td:nth-child(7) {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .ledger-table .ledger-order-input,
  .ledger-table .ledger-edit-input,
  .ledger-table .ledger-price-input,
  .ledger-table .ledger-sku-input {
    min-height: 25px !important;
    padding: 3px 5px !important;
    font-size: 10.5px !important;
  }

  .ledger-table .ledger-sku-input {
    max-width: 76px !important;
  }

  .ledger-table .ledger-price-input {
    max-width: 48px !important;
  }

  .ledger-table .status-chip,
  .ledger-table .ledger-status-badge,
  .ledger-table .status-pill {
    padding: 3px 5px !important;
    font-size: 10px !important;
  }

  .ledger-table .edit-button,
  .ledger-table .btn,
  .ledger-table button {
    min-height: 24px !important;
    padding: 2px 5px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 900px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    overflow-x: auto !important;
    scroll-snap-type: x proximity !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-card {
    min-width: 105px !important;
    scroll-snap-align: start !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 43px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-meta {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 115px !important;
    min-height: 34px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 149px !important;
    grid-template-columns: minmax(70px, .32fr) minmax(0, 1fr) !important;
    align-items: center !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-buttons {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    font-size: 10px !important;
    padding: 4px 3px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
    font-size: 9.5px !important;
    min-height: 26px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-head {
    flex-direction: column !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions {
    width: 100% !important;
    justify-content: stretch !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .primary-btn,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .secondary-btn,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .file-button {
    flex: 1 1 46% !important;
  }
}

/* 20260718 requested sticky and compact final pass */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode),
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .app-shell,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .workspace,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor {
  overflow: visible !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) {
  overflow-x: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky !important;
  top: 0 !important;
  z-index: 8000 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 5px !important;
  padding: 5px 6px !important;
  margin: 0 !important;
  background: rgba(239, 248, 255, .98) !important;
  border-bottom: 1px solid #c9deed !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-width: 0 !important;
  min-height: 34px !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 16px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  position: sticky !important;
  top: 45px !important;
  z-index: 7990 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 50px !important;
  padding: 7px 10px !important;
  margin: 0 !important;
  border-radius: 0 0 10px 10px !important;
  background: #fff8d9 !important;
  border: 1px solid #f2df95 !important;
  box-shadow: 0 6px 16px rgba(16, 48, 72, .08) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar > div {
  min-width: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dt {
  display: block !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
  color: #5d7288 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar strong {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(72px, 1fr)) !important;
  gap: 5px !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl > div {
  min-width: 0 !important;
  padding: 5px 7px !important;
  border-radius: 8px !important;
  background: #fff !important;
  border: 1px solid #cfe0ed !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dd {
  margin: 1px 0 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  margin-top: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: 104px !important;
  z-index: 7980 !important;
  min-height: 40px !important;
  padding: 5px 8px !important;
  margin: 0 !important;
  background: #073250 !important;
  border-radius: 0 !important;
  overflow-x: auto !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step {
  min-width: 68px !important;
  padding: 2px 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step-circle {
  width: 25px !important;
  height: 25px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step-label {
  font-size: 10px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: 144px !important;
  z-index: 7970 !important;
  display: grid !important;
  grid-template-columns: minmax(86px, .22fr) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 7px 10px !important;
  margin: 0 !important;
  background: rgba(245, 251, 255, .98) !important;
  border-bottom: 1px solid #c9deed !important;
  box-shadow: 0 8px 16px rgba(16, 48, 72, .07) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global h3 {
  font-size: 16px !important;
  line-height: 1.05 !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-buttons {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-buttons button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade-row button {
  min-height: 34px !important;
  padding: 6px 9px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-body {
  padding-top: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) fieldset {
  padding: 10px !important;
  border-radius: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .purchase-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field-label {
  font-size: 12px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) select,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
  min-height: 36px !important;
  padding: 7px 9px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card {
  padding: 9px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head {
  gap: 6px !important;
  margin-bottom: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head p {
  max-height: 1.4em !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  align-items: stretch !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  min-height: 31px !important;
  padding: 5px 6px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-drop-hint {
  margin: 5px 0 !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview-grid {
  min-height: 42px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  min-width: 0 !important;
  min-height: 28px !important;
  padding: 5px 6px !important;
  border-radius: 7px !important;
  font-size: 10.5px !important;
  line-height: 1.1 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  text-overflow: clip !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: start !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-head p {
  margin: 2px 0 0 !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .primary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .secondary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .file-button {
  min-height: 30px !important;
  padding: 5px 8px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-list,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-row {
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-row {
  padding: 6px !important;
}

@media (max-width: 760px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 3px !important;
    padding: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
    min-height: 32px !important;
    padding: 4px 5px !important;
    grid-template-columns: 1fr !important;
    gap: 1px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip span {
    font-size: 9px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
    font-size: 15px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 40px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 0 !important;
    padding: 6px 8px !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar strong {
    font-size: 14px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl > div {
    padding: 4px 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dt {
    font-size: 8.5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dd {
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 104px !important;
    min-height: 36px !important;
    padding: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 140px !important;
    grid-template-columns: minmax(72px, .35fr) minmax(0, 1fr) !important;
    padding: 6px 8px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global h3 {
    font-size: 15px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-buttons button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade-row button {
    min-height: 30px !important;
    padding: 5px !important;
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    min-height: 28px !important;
    padding: 4px 3px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
    min-height: 26px !important;
    padding: 4px 3px !important;
    font-size: 9px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-head {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions {
    justify-content: stretch !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .primary-btn,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .secondary-btn,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-actions .file-button {
    flex: 1 1 22% !important;
    padding: 5px 4px !important;
    font-size: 10px !important;
  }
}

/* 20260719: ledger filters, compact mobile ledger cards, and restored delete action */
.ledger-status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
  border-bottom: 1px solid var(--line);
}

.ledger-status-filters .filter-chip {
  width: auto;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.1;
}

.ledger-mobile-meta {
  display: none;
}

.ledger-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.ledger-delete {
  border: 1px solid #f0c7c7;
  border-radius: 999px;
  background: #fff7f7;
  color: #a63a3a;
  padding: 5px 8px;
  font-weight: 800;
  cursor: pointer;
}

.ledger-table th:nth-child(8),
.ledger-table td:nth-child(8) {
  width: 92px;
}

@media (max-width: 700px) {
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-status-filters,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-status-filters {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 5px !important;
    padding: 0 10px 8px !important;
    scrollbar-width: none;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-status-filters::-webkit-scrollbar,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-status-filters::-webkit-scrollbar {
    display: none;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-status-filters .filter-chip,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-status-filters .filter-chip {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    min-height: 28px !important;
    padding: 5px 9px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-scroll,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-scroll {
    overflow-x: hidden !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table tbody,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table tbody,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table tr {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table thead,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table thead {
    display: none !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table tr {
    margin: 8px 8px 0 !important;
    padding: 8px !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table tr.selected,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table tr.selected {
    background: #fff8df !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td {
    display: none !important;
    width: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td.ledger-title,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td.ledger-title {
    display: block !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-title strong,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-title strong {
    display: block !important;
    font-size: 15px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-title span:not(.ledger-mobile-chip):not(.ledger-mobile-status),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-title span:not(.ledger-mobile-chip):not(.ledger-mobile-status) {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(76px, 1fr) minmax(70px, .8fr) auto minmax(58px, auto);
    gap: 4px;
    align-items: center;
    margin-top: 7px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-mobile-chip,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-mobile-status,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-mobile-chip,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-mobile-status {
    min-width: 0;
    min-height: 24px;
    padding: 4px 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fcff;
    color: var(--navy);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-mobile-status,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-mobile-status {
    background: #fbf6e5;
    text-align: center;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-mobile-edit {
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--navy);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td.number,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td.number {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 6px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td.number::before,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td.number::before {
    content: none;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table .ledger-price-input,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table .ledger-price-input {
    width: 96px !important;
    max-width: 96px !important;
    min-height: 26px !important;
    padding: 3px 7px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
  }
}
/* 2026-07-19 v9: ledger/editor compactness and mobile usability fixes */
body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-panel,
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-panel {
  max-width: 100%;
  overflow: hidden;
}

body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-scroll,
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-scroll {
  overflow-x: hidden;
}

body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table,
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th,
body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td,
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td {
  padding: 6px 6px !important;
  vertical-align: middle;
}

body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1),
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(1) {
  width: 244px !important;
}

body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2),
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(2) {
  width: 128px !important;
}

body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3),
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(3),
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(3) {
  width: auto !important;
}

body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4),
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(4) {
  width: 134px !important;
}

body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5),
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(5) {
  width: 138px !important;
}

body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6),
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(6) {
  width: 92px !important;
}

body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7),
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(7) {
  width: 86px !important;
}

body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8),
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(8) {
  width: 104px !important;
}

.ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(98px, 1fr) minmax(96px, 1fr) !important;
  gap: 4px !important;
}

.ledger-table .ledger-order-input,
.ledger-table .ledger-edit-input,
.ledger-table .ledger-price-input,
.ledger-table .ledger-sku-input {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 7px !important;
  font-size: 13px !important;
}

.ledger-table .ledger-title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  white-space: nowrap;
}

.ledger-actions .ledger-edit,
.ledger-actions .ledger-delete {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 42px !important;
  min-height: 28px !important;
  padding: 4px 7px !important;
  border-radius: 999px;
  font-size: 12px !important;
  line-height: 1 !important;
}

.ledger-actions .ledger-delete,
.ledger-delete {
  border: 1px solid #f2b8b5 !important;
  background: #fff7f6 !important;
  color: #b42318 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 110;
  min-height: 42px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 0;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky;
  top: 42px;
  z-index: 109;
  margin: 0;
  padding: 7px 10px;
  gap: 8px;
  background: #eef8ff;
  border-bottom: 1px solid #c8e1f2;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 34px;
  padding: 5px 9px;
  border-radius: 8px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  position: sticky;
  top: 90px;
  z-index: 108;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(520px, 1.7fr);
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 0;
  background: #fff8d8;
  border: 1px solid #ecd57b;
  box-shadow: 0 6px 14px rgba(12, 58, 90, 0.08);
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar > div:first-child {
  min-width: 0;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar > div:first-child span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #61748b;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar > div:first-child strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  line-height: 1.25;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl {
  display: grid;
  grid-template-columns: repeat(6, minmax(72px, 1fr));
  gap: 6px;
  margin: 0;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl div {
  min-width: 0;
  padding: 5px 7px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #c9dceb;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dt {
  font-size: 10px;
  line-height: 1.1;
  color: #697c91;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dd {
  overflow: hidden;
  margin: 2px 0 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  margin-top: 0;
  padding: 8px 10px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky;
  top: 144px;
  z-index: 107;
  margin: 0;
  padding: 8px 12px;
  border-radius: 0;
  background: #073456;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky;
  top: 214px;
  z-index: 106;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 0;
  background: #f7fcff;
  box-shadow: 0 6px 14px rgba(12, 58, 90, 0.08);
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-buttons button {
  min-height: 34px;
  padding: 5px 8px;
  font-size: 13px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-nav,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-heading,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .group-title {
  margin-top: 8px;
  margin-bottom: 8px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid label input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid label select {
  min-height: 36px;
  padding: 7px 9px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone {
  gap: 7px !important;
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone > div:nth-child(2) {
  gap: 2px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-paste-hint {
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  align-items: center;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  white-space: nowrap;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-queue-analyze {
  border-color: #e5484d !important;
  background: #fff5f5 !important;
  color: #b42318 !important;
  font-weight: 900 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-queue-analyze:not(:disabled) {
  background: #d92d20 !important;
  color: #fff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result {
  min-height: 38px !important;
  padding: 7px !important;
  font-size: 12px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)) !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  min-width: 0 !important;
  min-height: 32px !important;
  padding: 5px 6px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade-row {
  gap: 7px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .check-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .inspection-option,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-button {
  min-height: 34px !important;
  padding: 6px 9px !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  gap: 8px !important;
  padding: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy {
  width: 100%;
  min-height: 34px !important;
  padding: 6px 10px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-hidden-source,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel textarea[hidden] {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-card {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  min-height: 520px !important;
  margin-top: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell iframe {
  min-height: 470px !important;
}

@media (max-width: 1280px) {
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(1),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(1) {
    width: 204px !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table th:nth-child(2),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:nth-child(2) {
    width: 108px !important;
  }
}

@media (max-width: 760px) {
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-status-filters,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-status-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 8px 10px;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table tbody,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table tbody,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table tr {
    display: block !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table thead,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table thead {
    display: none !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table tr {
    margin: 8px 10px !important;
    padding: 9px !important;
    border: 1px solid #cfe1ee !important;
    border-radius: 10px !important;
    background: #fff !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td {
    display: none !important;
    width: auto !important;
    border: 0 !important;
    padding: 0 !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td.ledger-title,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td.ledger-title {
    display: block !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-title > strong,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-title > strong {
    margin-bottom: 7px;
    white-space: normal;
    font-size: 15px;
    line-height: 1.25;
  }

  .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(86px, 1fr) minmax(64px, 0.8fr) auto auto;
    align-items: center;
    gap: 5px;
  }

  .ledger-mobile-chip,
  .ledger-mobile-status,
  .ledger-mobile-edit {
    min-height: 28px;
    padding: 4px 6px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
  }

  .ledger-mobile-edit {
    border: 1px solid #cce0ef;
    background: #fff;
    color: #063456;
    font-weight: 800;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    min-height: 38px;
    padding: 5px 8px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 38px;
    grid-template-columns: repeat(5, minmax(64px, 1fr));
    overflow-x: auto;
    padding: 6px 7px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
    min-height: 30px;
    padding: 4px 7px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 78px;
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 6px 8px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl div {
    padding: 4px 5px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 154px;
    overflow-x: auto;
    padding: 6px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 212px;
    grid-template-columns: 1fr;
    padding: 6px 8px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    min-height: 30px !important;
    padding: 5px 4px !important;
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
    min-height: 30px !important;
    padding: 4px !important;
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
    min-height: 420px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell iframe {
    min-height: 380px !important;
  }
}

/* 2026-07-19 v11-final: compact ledger/editor/mobile layout overrides legacy rules. */
body:not(.home-mode):not(.purchase-mode) .ledger-panel {
  max-width: 100% !important;
  margin: 10px 0 12px !important;
  overflow: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head {
  display: grid !important;
  grid-template-columns: minmax(130px, .55fr) minmax(0, 2fr) !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 9px 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head h3 {
  margin: 0 !important;
  font-size: 20px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-summary {
  margin: 0 !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(210px, .9fr) auto auto auto !important;
  gap: 6px !important;
  align-items: center !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head-actions p {
  margin: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-search-input,
body:not(.home-mode):not(.purchase-mode) .ledger-head-actions button,
body:not(.home-mode):not(.purchase-mode) .ledger-head-actions a {
  min-height: 32px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-scroll {
  overflow-x: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 5px 6px !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 172px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 92px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
  width: auto !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 106px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 104px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 72px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 70px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 84px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit-input,
body:not(.home-mode):not(.purchase-mode) .ledger-order-input {
  min-width: 0 !important;
  width: 100% !important;
  min-height: 30px !important;
  padding: 4px 7px !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  gap: 4px !important;
  justify-content: flex-end !important;
  align-items: center !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-delete {
  min-height: 28px !important;
  padding: 4px 7px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-delete,
.ledger-mobile-delete {
  border: 1px solid #f1b8b8 !important;
  background: #fff5f5 !important;
  color: #b32626 !important;
  font-weight: 800 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  box-shadow: 0 1px 0 rgba(203, 221, 234, .95) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  top: 0 !important;
  z-index: 90 !important;
  min-height: 40px !important;
  padding: 5px 8px !important;
  background: #eaf7ff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: 40px !important;
  z-index: 89 !important;
  padding: 6px 8px !important;
  gap: 6px !important;
  background: #f6fbff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  top: 82px !important;
  z-index: 88 !important;
  padding: 7px 10px !important;
  min-height: 0 !important;
  background: #fff8df !important;
  display: grid !important;
  grid-template-columns: minmax(220px, 1.2fr) minmax(0, 2fr) !important;
  gap: 8px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar strong {
  font-size: 16px !important;
  line-height: 1.2 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl div {
  min-height: 34px !important;
  padding: 4px 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dt,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dd {
  font-size: 11px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  top: 144px !important;
  z-index: 87 !important;
  padding: 8px 12px !important;
  background: #083b5b !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: 212px !important;
  z-index: 86 !important;
  padding: 7px 10px !important;
  background: #f6fbff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-buttons {
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .listing-status-btn {
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card {
  padding: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .check-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .inspection-option,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-button {
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone {
  padding: 9px !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card p {
  margin: 2px 0 !important;
  line-height: 1.35 !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
  width: 100% !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 5px 6px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-queue-analyze,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-queue-analyze:not(:disabled) {
  border-color: #dc2626 !important;
  background: #fee2e2 !important;
  color: #991b1b !important;
  font-weight: 900 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result {
  min-height: 34px !important;
  padding: 6px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)) !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  min-height: 34px !important;
  padding: 5px 6px !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  text-overflow: clip !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  padding: 10px !important;
  gap: 7px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: end !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head h3 {
  font-size: 18px !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy {
  width: auto !important;
  min-width: 118px !important;
  min-height: 32px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  min-height: 600px !important;
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell iframe {
  min-height: 550px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sales-reference-panel {
  display: none !important;
}

@media (max-width: 1280px) {
  body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
    width: 152px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
    width: 80px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
    width: 94px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
    width: 92px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
  body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
    width: 80px !important;
  }
}

@media (max-width: 760px) {
  body:not(.home-mode):not(.purchase-mode) .ledger-head,
  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
    grid-template-columns: 1fr !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions p {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-status-filters {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
    padding: 6px 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-status-filters button {
    min-height: 28px !important;
    padding: 4px 5px !important;
    font-size: 11px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tbody,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tr {
    display: block !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table thead {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tr {
    margin: 7px 8px !important;
    padding: 8px !important;
    border: 1px solid #cfe1ee !important;
    border-radius: 10px !important;
    background: #fff !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    display: none !important;
    width: auto !important;
    padding: 0 !important;
    border: 0 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td.ledger-title {
    display: block !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-title > strong {
    margin-bottom: 6px !important;
    white-space: normal !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
  }

  .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(76px, 1fr) minmax(62px, .8fr) auto auto auto !important;
    gap: 4px !important;
    align-items: center !important;
  }

  .ledger-mobile-chip,
  .ledger-mobile-status,
  .ledger-mobile-edit,
  .ledger-mobile-delete {
    min-width: 0 !important;
    min-height: 25px !important;
    padding: 3px 5px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    grid-template-columns: 1fr !important;
    top: 76px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar dl {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 150px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 206px !important;
    grid-template-columns: 1fr !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    min-height: 28px !important;
    padding: 4px 3px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
    min-height: 30px !important;
    padding: 3px 4px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
    grid-template-columns: 1fr !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    justify-content: stretch !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy {
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
    min-height: 430px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell iframe {
    min-height: 390px !important;
  }
}
/* 20260719 listing UI v16: compact ledger/editor/mobile hard overrides */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body:not(.home-mode):not(.purchase-mode) .sales-reference-panel,
body:not(.home-mode):not(.purchase-mode) #salesReferencePanel {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-card {
  max-width: 100% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-scroll {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 5px 6px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  vertical-align: middle !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 178px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 92px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
  width: auto !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 102px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 94px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 76px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 74px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 82px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit-input,
body:not(.home-mode):not(.purchase-mode) .ledger-order-input,
body:not(.home-mode):not(.purchase-mode) .ledger-cost-input {
  width: 100% !important;
  min-width: 0 !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 4px 6px !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
  display: block !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-delete {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 36px !important;
  min-height: 27px !important;
  padding: 3px 7px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  border: 1px solid #fecaca !important;
  background: #fff5f5 !important;
  color: #b42318 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  z-index: 90 !important;
  box-shadow: 0 1px 0 rgba(157, 196, 220, 0.45) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  top: 0 !important;
  min-height: 42px !important;
  padding: 6px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: 42px !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  min-height: 38px !important;
  padding: 5px 6px !important;
  background: #f7fcff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 30px !important;
  padding: 4px 8px !important;
  border-radius: 9px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip span {
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 18px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  top: 82px !important;
  display: block !important;
  padding: 7px 10px !important;
  background: #fff9df !important;
  border-color: #f3d46d !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  margin: 0 0 4px !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  display: grid !important;
  grid-template-columns: 170px 86px minmax(220px, 1fr) 104px 96px 78px 78px !important;
  gap: 5px !important;
  align-items: stretch !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-width: 0 !important;
  min-height: 34px !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell small {
  font-size: 10px !important;
  line-height: 1.05 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong {
  display: block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-title-cell strong {
  font-size: 14px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  top: 143px !important;
  min-height: 48px !important;
  padding: 6px 8px !important;
  background: #073b5c !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step {
  gap: 3px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-number {
  width: 26px !important;
  height: 26px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-label {
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: 191px !important;
  z-index: 92 !important;
  min-height: 48px !important;
  padding: 6px 8px !important;
  background: #f7fcff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-title {
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-value {
  font-size: 19px !important;
  line-height: 1.05 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .primary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .secondary-btn {
  min-height: 32px !important;
  padding: 5px 10px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #itemForm {
  margin-top: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-drop-zone {
  padding: 10px 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-heading {
  margin: 0 0 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-heading h3,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section h3 {
  margin: 0 0 8px !important;
  font-size: 21px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section h4,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section legend {
  margin-bottom: 5px !important;
  font-size: 15px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-groups,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade-options,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .button-group {
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .pill,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-pill,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .note-chip-row button {
  min-height: 32px !important;
  padding: 5px 9px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) select {
  min-height: 34px !important;
  padding: 6px 9px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
  min-height: 70px !important;
  padding: 7px 9px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  align-items: stretch !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtnAssist {
  border-color: #b42318 !important;
  background: #d92d20 !important;
  color: #fff !important;
  font-weight: 900 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-drop-zone p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-paste-hint,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .hint {
  margin: 4px 0 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-image-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result {
  min-height: 38px !important;
  padding: 6px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card .accessory-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-accessory-inline .accessory-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)) !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 30px !important;
  padding: 5px 6px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}

body:not(.listing-item-film-camera) [data-film-camera-field],
body:not(.listing-item-camera-body) [data-body-only-field],
body:not(.listing-item-digital-body) [data-body-check-field],
body:not(.listing-item-digital-body) [data-body-function-field],
body.listing-item-lens-only [data-body-only-field],
body.listing-item-lens-only [data-body-check-field],
body.listing-item-lens-only [data-body-function-field],
body.listing-item-lens-only [data-film-camera-field] {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-bottom: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head h3 {
  margin: 0 !important;
  font-size: 18px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 4px 0 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy {
  width: 100% !important;
  min-height: 32px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  min-height: 560px !important;
  margin-top: 6px !important;
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-shell {
  min-height: 500px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
  min-height: 470px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-details,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-code-details {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-copy-stack {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-block,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-copy-card {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-copy-card p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-block p {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-row {
  padding: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #photoFolderInput + span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-folder-hint {
  font-size: 12px !important;
  line-height: 1.25 !important;
}

@media (max-width: 760px) {
  body:not(.home-mode):not(.purchase-mode) {
    font-size: 13px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .listing-hero {
    padding: 14px !important;
    border-radius: 12px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .listing-hero h1 {
    font-size: 34px !important;
    line-height: 1 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .listing-hero p {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .stats-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .stat-card,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
    min-height: 44px !important;
    padding: 7px 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-card {
    padding: 12px !important;
    border-radius: 14px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-toolbar {
    gap: 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-search {
    width: 100% !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table tbody,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table tbody,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table tr,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table thead,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table thead {
    display: none !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table tr {
    margin: 7px 0 !important;
    padding: 8px !important;
    border: 1px solid #cfe4f4 !important;
    border-radius: 12px !important;
    background: #fff !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:not(.ledger-title):not(.ledger-actions),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:not(.ledger-title):not(.ledger-actions) {
    display: none !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-title,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-title {
    padding: 0 !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-title strong,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-title strong {
    display: -webkit-box !important;
    margin-bottom: 5px !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px !important;
    line-height: 1.2 !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(68px, 1fr) minmax(54px, 0.8fr) 42px minmax(54px, 0.8fr) 42px !important;
    gap: 4px !important;
    align-items: center !important;
    margin-top: 4px !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-mobile-chip,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-mobile-status,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-mobile-chip,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-mobile-status,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-mobile-edit,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-mobile-delete {
    min-width: 0 !important;
    min-height: 25px !important;
    padding: 3px 5px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-actions,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-actions {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    top: 0 !important;
    min-height: 40px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 40px !important;
    grid-template-columns: repeat(5, minmax(70px, 1fr)) !important;
    overflow-x: auto !important;
    scrollbar-width: none;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip::-webkit-scrollbar {
    display: none;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 82px !important;
    padding: 6px 8px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: minmax(0, 1fr) 72px 62px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
    min-height: 29px !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(1),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(2),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(5),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(6) {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 136px !important;
    min-height: 46px !important;
    grid-template-columns: repeat(6, minmax(56px, 1fr)) !important;
    overflow-x: auto !important;
    scrollbar-width: none;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper::-webkit-scrollbar {
    display: none;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 182px !important;
    display: block !important;
    padding: 6px 8px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-options,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-layout {
    display: block !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    min-height: 28px !important;
    padding: 4px 5px !important;
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card .accessory-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-accessory-inline .accessory-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
    min-height: 28px !important;
    padding: 4px 3px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-copy-stack,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
    min-height: 420px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
    min-height: 360px !important;
  }
}

/* 20260719 UI polish v19: final layout guards */
html,
body {
  max-width: 100%;
}

[data-film-camera-field][hidden],
[data-body-only-field][hidden],
[data-body-function-field][hidden],
[data-body-check-field][hidden],
[data-lens-function-field][hidden],
body.listing-item-lens-only [data-film-camera-field],
body.listing-item-lens-only [data-body-only-field],
body.listing-item-lens-only [data-body-function-field],
body.listing-item-lens-only [data-body-check-field],
body:not(.listing-item-film-camera) [data-film-camera-field],
body:not(.listing-item-camera-body) [data-body-only-field],
body:not(.listing-item-digital-body) [data-body-function-field],
body:not(.listing-item-digital-body) [data-body-check-field] {
  display: none !important;
}

body.listing-item-lens-only .service-seal-fieldset,
body.listing-item-lens-only #shutterCountFieldset {
  display: none !important;
}

#salesReferencePanel {
  display: none !important;
}

.ledger-card {
  overflow: hidden !important;
}

.ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

.ledger-table th,
.ledger-table td {
  padding: 5px !important;
  vertical-align: middle !important;
}

.ledger-table th:nth-child(1),
.ledger-table td:nth-child(1) {
  width: 205px !important;
}

.ledger-table th:nth-child(2),
.ledger-table td:nth-child(2) {
  width: 120px !important;
}

.ledger-table th:nth-child(3),
.ledger-table td:nth-child(3) {
  width: auto !important;
}

.ledger-table th:nth-child(4),
.ledger-table td:nth-child(4) {
  width: 116px !important;
}

.ledger-table th:nth-child(5),
.ledger-table td:nth-child(5) {
  width: 112px !important;
}

.ledger-table th:nth-child(6),
.ledger-table td:nth-child(6) {
  width: 82px !important;
}

.ledger-table th:nth-child(7),
.ledger-table td:nth-child(7) {
  width: 72px !important;
}

.ledger-table th:nth-child(8),
.ledger-table td:nth-child(8) {
  width: 86px !important;
}

.ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(76px, 1fr) minmax(72px, 1fr) !important;
  gap: 4px !important;
}

.ledger-edit-input,
.ledger-order-input {
  min-height: 28px !important;
  padding: 4px 7px !important;
  font-size: 12px !important;
}

.ledger-title strong {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.18 !important;
  font-size: 13px !important;
}

.ledger-actions {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 4px !important;
}

.ledger-actions button {
  min-height: 28px !important;
  padding: 3px 7px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
}

.ledger-delete,
.ledger-mobile-delete {
  border-color: #f2b8b5 !important;
  background: #fff4f1 !important;
  color: #a23b2d !important;
}

.editor-selected-item-bar {
  position: sticky !important;
  top: 0 !important;
  z-index: 92 !important;
  margin: 0 !important;
  border-radius: 0 0 10px 10px !important;
  padding: 7px 12px !important;
  background: #fff8d9 !important;
}

.editor-ledger-row-label {
  margin-bottom: 3px !important;
  font-size: 11px !important;
}

.editor-ledger-row {
  display: grid !important;
  grid-template-columns: 160px 112px minmax(180px, 1fr) 104px 102px 78px 86px !important;
  gap: 5px !important;
  align-items: center !important;
}

.editor-ledger-cell {
  min-height: 28px !important;
  padding: 4px 7px !important;
  border-radius: 8px !important;
  line-height: 1.15 !important;
  font-size: 12px !important;
}

.editor-ledger-cell span {
  font-size: 10px !important;
}

.editor-ledger-title-cell strong {
  font-size: 14px !important;
  line-height: 1.18 !important;
}

.stepper {
  position: sticky !important;
  top: 70px !important;
  z-index: 91 !important;
  min-height: 50px !important;
  padding: 5px 8px !important;
}

.step-number {
  width: 28px !important;
  height: 28px !important;
  font-size: 13px !important;
}

.step-label {
  font-size: 11px !important;
}

.listing-status-panel--global {
  position: sticky !important;
  top: 124px !important;
  z-index: 90 !important;
  padding: 6px 12px !important;
}

.listing-status-panel--global .listing-status-title strong {
  font-size: 20px !important;
}

.listing-status-actions {
  gap: 8px !important;
}

.listing-status-actions button {
  min-height: 32px !important;
  padding: 5px 10px !important;
  font-size: 13px !important;
}

.step-content h2 {
  margin: 8px 0 10px !important;
  font-size: 24px !important;
}

.step-content h3 {
  margin: 8px 0 6px !important;
  font-size: 17px !important;
}

.choice-grid,
.condition-grid,
.function-grid,
.accessory-grid {
  gap: 6px !important;
}

.choice-button,
.condition-button,
.function-button,
.accessory,
.choice,
.grade,
.option-button {
  min-height: 34px !important;
  padding: 6px 9px !important;
  border-radius: 8px !important;
  line-height: 1.18 !important;
  font-size: 13px !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: keep-all !important;
}

.accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)) !important;
  align-items: stretch !important;
}

.accessory {
  min-width: 0 !important;
  font-size: 12px !important;
}

.ai-inline-card,
.start-card {
  padding: 10px 12px !important;
}

.ai-inline-card p,
.start-card p {
  margin: 2px 0 6px !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  align-items: center !important;
}

.ai-action-row .upload-box,
.ai-action-row label,
.ai-action-row button {
  min-width: 0 !important;
  min-height: 32px !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

#aiAnalyzeQueuedBtn,
#aiAnalyzeQueuedBtnAssist {
  border-color: #b42318 !important;
  background: #d92d20 !important;
  color: #fff !important;
  font-weight: 900 !important;
}

.ai-preview-grid {
  grid-template-columns: minmax(120px, 0.8fr) minmax(160px, 1.2fr) !important;
  gap: 6px !important;
}

.copy-output-details,
.html-code-details {
  display: none !important;
}

.listing-copy-stack {
  display: none !important;
}

.live-preview-panel {
  padding: 12px !important;
}

.live-preview-head {
  align-items: center !important;
  margin-bottom: 8px !important;
}

.live-copy-actions {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 0 8px !important;
}

.live-copy-actions button {
  min-height: 34px !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

.live-preview-frame-card {
  min-height: 560px !important;
  margin-top: 6px !important;
}

#liveHtmlPreviewFrame {
  min-height: 500px !important;
}

.photo-url-row {
  grid-template-columns: 44px minmax(0, 1fr) auto !important;
  gap: 8px !important;
  padding: 8px !important;
}

.photo-url-row small {
  font-size: 11px !important;
}

.photo-url-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

.photo-url-actions .secondary-btn,
.photo-url-actions .primary-btn {
  min-height: 32px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden !important;
  }

  body:not(.home-mode):not(.purchase-mode) {
    font-size: 13px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .app-shell {
    padding: 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .listing-hero {
    min-height: 0 !important;
    padding: 12px !important;
    border-radius: 12px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .listing-hero h1 {
    font-size: 30px !important;
    line-height: 1 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .listing-hero p {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .hero-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .hero-actions button {
    min-height: 36px !important;
    padding: 5px 6px !important;
    font-size: 12px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .stats-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    overflow-x: auto !important;
  }

  body:not(.home-mode):not(.purchase-mode) .stat-card,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
    min-height: 40px !important;
    padding: 6px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .stat-value {
    font-size: 20px !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-card,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-card {
    padding: 10px !important;
    border-radius: 14px !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-toolbar,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-toolbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-search,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-search {
    width: 100% !important;
    min-height: 34px !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table tbody,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table tbody,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table thead,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table thead {
    display: none !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table tr {
    margin: 6px 0 !important;
    padding: 7px !important;
    border: 1px solid #cfe4f4 !important;
    border-radius: 12px !important;
    background: #fff !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-table td:not(.ledger-title):not(.ledger-actions),
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-table td:not(.ledger-title):not(.ledger-actions) {
    display: none !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-title,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-title {
    padding: 0 !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-title strong,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-title strong {
    display: -webkit-box !important;
    margin-bottom: 5px !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px !important;
    line-height: 1.18 !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(58px, 0.9fr) minmax(50px, 0.8fr) 40px minmax(50px, 0.8fr) 38px !important;
    gap: 4px !important;
    align-items: center !important;
    margin-top: 4px !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-mobile-chip,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-mobile-status,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-mobile-chip,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-mobile-status,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-mobile-edit,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-mobile-delete {
    min-width: 0 !important;
    min-height: 24px !important;
    padding: 3px 4px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) .ledger-actions,
  body:not(.home-mode):not(.purchase-mode):not(.listing-editor-mode) .ledger-actions {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 112 !important;
    min-height: 36px !important;
    padding: 5px 8px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    position: sticky !important;
    top: 36px !important;
    z-index: 111 !important;
    grid-template-columns: repeat(5, minmax(72px, 1fr)) !important;
    overflow-x: auto !important;
    padding: 5px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip::-webkit-scrollbar {
    display: none;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 75px !important;
    z-index: 110 !important;
    padding: 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: minmax(0, 1fr) 68px 50px 52px !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(1),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(2),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(5) {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
    min-height: 26px !important;
    padding: 3px 5px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-title-cell strong {
    font-size: 13px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 124px !important;
    z-index: 109 !important;
    min-height: 42px !important;
    grid-template-columns: repeat(6, minmax(52px, 1fr)) !important;
    overflow-x: auto !important;
    padding: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper::-webkit-scrollbar {
    display: none;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 166px !important;
    z-index: 108 !important;
    padding: 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions button {
    min-height: 30px !important;
    padding: 4px 5px !important;
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field-card {
    padding: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) input,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) select,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
    font-size: 16px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .function-button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade {
    min-height: 34px !important;
    padding: 6px 8px !important;
    font-size: 12px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card .accessory-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-accessory-inline .accessory-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
    min-height: 30px !important;
    padding: 4px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    min-height: 28px !important;
    padding: 4px 5px !important;
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    justify-content: stretch !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions button {
    flex: 1 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
    min-height: 420px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
    min-height: 380px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-row {
    grid-template-columns: 34px minmax(0, 1fr) 42px !important;
  }
}

/* 20260719 ui-polish v20 final cascade guard */
body:not(.home-mode):not(.purchase-mode) #salesReferencePanel {
  display: none !important;
}

body.listing-item-lens-only [data-body-only-field],
body.listing-item-lens-only [data-body-check-field],
body.listing-item-lens-only [data-body-function-field],
body.listing-item-lens-only [data-film-camera-field],
body.listing-item-accessory [data-body-only-field],
body.listing-item-accessory [data-body-check-field],
body.listing-item-accessory [data-body-function-field],
body.listing-item-accessory [data-lens-function-field],
body.listing-item-accessory [data-film-camera-field],
body:not(.listing-item-camera-body) [data-body-only-field],
body:not(.listing-item-camera-body) [data-body-check-field],
body:not(.listing-item-camera-body) [data-body-function-field],
body:not(.listing-item-film-camera) [data-film-camera-field],
[data-body-only-field].is-hidden,
[data-body-check-field].is-hidden,
[data-body-function-field].is-hidden,
[data-lens-function-field].is-hidden,
[data-film-camera-field].is-hidden {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 5px 6px !important;
  font-size: 13px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 206px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 92px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 124px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 118px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 86px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 82px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 120px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(84px, 1fr) minmax(78px, 1fr) !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields input,
body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields select,
body:not(.home-mode):not(.purchase-mode) .ledger-order-input,
body:not(.home-mode):not(.purchase-mode) .ledger-sku-input,
body:not(.home-mode):not(.purchase-mode) .ledger-price-input {
  min-height: 32px !important;
  height: 32px !important;
  padding: 4px 7px !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-title,
body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 42px !important;
  min-height: 28px !important;
  padding: 4px 7px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  border: 1px solid #f1b8b8 !important;
  background: #fff7f7 !important;
  color: #b42318 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 180 !important;
  min-height: 42px !important;
  padding: 6px 10px !important;
  background: #eaf7ff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky !important;
  top: 54px !important;
  z-index: 179 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 6px !important;
  background: #f4fbff !important;
  border-bottom: 1px solid #cfe1ee !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 30px !important;
  padding: 4px 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  position: sticky !important;
  top: 100px !important;
  z-index: 178 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  padding: 6px 8px !important;
  background: #fff9dc !important;
  border: 1px solid #ead997 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  margin: 0 0 4px !important;
  font-size: 11px !important;
  color: #5f6f82 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  display: grid !important;
  grid-template-columns: 150px 105px minmax(260px, 1.4fr) 108px 116px 90px 92px !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-height: 36px !important;
  padding: 5px 7px !important;
  border: 1px solid #d4e4f0 !important;
  border-radius: 8px !important;
  background: #fff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span {
  display: block !important;
  margin-bottom: 3px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell small {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong {
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: 166px !important;
  z-index: 177 !important;
  min-height: 44px !important;
  padding: 5px !important;
  background: #0b4260 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: 210px !important;
  z-index: 176 !important;
  min-height: 48px !important;
  padding: 6px 8px !important;
  background: #f5fbff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .item-specifics-panel,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card {
  padding: 10px !important;
  border-radius: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .function-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .toggle-button {
  min-height: 34px !important;
  padding: 6px 9px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)) !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  min-height: 31px !important;
  padding: 5px 7px !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  word-break: keep-all !important;
  font-size: 12px !important;
  line-height: 1.12 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  min-height: 32px !important;
  height: 32px !important;
  padding: 4px 6px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtnAssist {
  border-color: #b42318 !important;
  background: #d92d20 !important;
  color: #fff !important;
  font-weight: 900 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 150px)) !important;
  gap: 8px !important;
  justify-content: end !important;
  margin: 0 0 8px auto !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy {
  min-height: 32px !important;
  padding: 5px 10px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-hidden-source,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-textarea,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-html-output {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  min-height: 560px !important;
  margin-top: 0 !important;
  padding: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
  min-height: 520px !important;
  height: calc(100vh - 360px) !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-status-filters {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 6px 10px !important;
}

@media (max-width: 760px) {
  body:not(.home-mode):not(.purchase-mode) .hero,
  body:not(.home-mode):not(.purchase-mode) .filter-note,
  body:not(.home-mode):not(.purchase-mode) .ledger-panel-head .ledger-note {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    min-height: 38px !important;
    padding: 5px 7px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 38px !important;
    grid-template-columns: repeat(5, minmax(62px, 1fr)) !important;
    overflow-x: auto !important;
    padding: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 78px !important;
    padding: 5px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: minmax(0, 1fr) 72px 60px 62px !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(1),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(2),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(5) {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
    min-height: 30px !important;
    padding: 4px 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span {
    font-size: 9px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong {
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 126px !important;
    min-height: 38px !important;
    padding: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 164px !important;
    min-height: 42px !important;
    padding: 5px 6px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-status-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
    padding: 6px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-status-filters .filter-chip {
    min-height: 30px !important;
    padding: 4px 6px !important;
    font-size: 11px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table thead {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tbody,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    display: block !important;
    width: 100% !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tbody {
    display: grid !important;
    gap: 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tr {
    display: grid !important;
    grid-template-columns: 1fr !important;
    padding: 8px !important;
    border: 1px solid #cfe1ee !important;
    border-radius: 10px !important;
    background: #fff !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    border: 0 !important;
    padding: 0 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td:not(.ledger-title):not(.ledger-actions):not(.ledger-mobile-cell) {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-title {
    margin-bottom: 6px !important;
    font-size: 15px !important;
    line-height: 1.25 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: 64px 68px 40px 56px 40px !important;
    gap: 4px !important;
    align-items: center !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta > * {
    min-height: 26px !important;
    padding: 3px 4px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .function-button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .toggle-button {
    min-height: 31px !important;
    padding: 5px 7px !important;
    font-size: 12px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
    min-height: 28px !important;
    padding: 4px 3px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    min-height: 30px !important;
    height: 30px !important;
    padding: 3px 4px !important;
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
    min-height: 420px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
    min-height: 390px !important;
    height: 58vh !important;
  }
}
/* 20260719 ui-polish v21 final override */
body:not(.home-mode):not(.purchase-mode) #salesReferencePanel,
body:not(.home-mode):not(.purchase-mode) [data-sales-reference],
body:not(.home-mode):not(.purchase-mode) .sales-reference-panel {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) [hidden],
body:not(.home-mode):not(.purchase-mode) .is-hidden,
body:not(.home-mode):not(.purchase-mode) [data-conditional-visible="false"] {
  display: none !important;
}

body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body:not(.listing-item-film-camera):not(.home-mode):not(.purchase-mode) [data-film-camera-field] {
  display: none !important;
}

body.listing-item-camera-body:not(.home-mode):not(.purchase-mode) [data-lens-function-field] {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-panel {
  max-width: 100% !important;
  overflow: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head {
  display: grid !important;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 8px 10px !important;
  align-items: start !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head h3 {
  margin: 0 !important;
  font-size: 20px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-summary {
  font-size: 12px !important;
  margin: 2px 0 0 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) auto auto auto !important;
  gap: 6px !important;
  align-items: center !important;
  justify-content: end !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head-actions p {
  grid-column: 1 / -1 !important;
  margin: 0 !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-search-input,
body:not(.home-mode):not(.purchase-mode) .ledger-new-btn,
body:not(.home-mode):not(.purchase-mode) .ledger-head-actions a,
body:not(.home-mode):not(.purchase-mode) .ledger-toggle {
  height: 34px !important;
  min-height: 34px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
  border-radius: 16px !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-status-filters {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 5px !important;
  padding: 6px 10px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-status-filters .filter-chip {
  min-height: 28px !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-scroll {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 4px 5px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  vertical-align: middle !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 190px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 88px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
  width: auto !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 108px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 104px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 72px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 62px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 88px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: 84px minmax(0, 1fr) !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table input {
  height: 28px !important;
  min-height: 28px !important;
  padding: 3px 6px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  gap: 4px !important;
  align-items: center !important;
  justify-content: flex-end !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 26px !important;
  min-width: 36px !important;
  padding: 2px 6px !important;
  font-size: 10.5px !important;
  border-radius: 13px !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  color: #b42318 !important;
  border: 1px solid #f2b8b5 !important;
  background: #fff8f7 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  z-index: 90 !important;
  background: #f5fbff !important;
  box-shadow: 0 1px 0 #cfe1ee !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  top: 0 !important;
  min-height: 40px !important;
  padding: 6px 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: 40px !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 30px !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip span {
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 16px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  top: 82px !important;
  padding: 6px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  font-size: 11px !important;
  margin-bottom: 3px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  display: grid !important;
  grid-template-columns: 130px 86px minmax(160px, 1fr) 92px 92px 76px 76px !important;
  gap: 4px !important;
  align-items: stretch !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-height: 30px !important;
  padding: 4px 6px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span {
  font-size: 9px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong {
  font-size: 12px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-title-cell strong {
  font-size: 14px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  top: 136px !important;
  min-height: 46px !important;
  padding: 5px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step {
  min-height: 36px !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step span {
  width: 24px !important;
  height: 24px !important;
  font-size: 12px !important;
  margin-bottom: 2px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: 182px !important;
  min-height: 44px !important;
  padding: 6px 8px !important;
  display: grid !important;
  grid-template-columns: 150px repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .current-status h3 {
  font-size: 18px !important;
  line-height: 1.05 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-actions {
  display: contents !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-actions .pill,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  border-radius: 16px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-section {
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-heading {
  margin-bottom: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .group-title {
  margin: 8px 0 5px !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .compact-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-list,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card {
  padding: 8px !important;
  border-radius: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) select,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .pill,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .function-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .toggle-button {
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade-row,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .function-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-grid {
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head {
  display: flex !important;
  justify-content: space-between !important;
  gap: 8px !important;
  align-items: flex-start !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card-head p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card p {
  margin: 2px 0 5px !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links {
  display: flex !important;
  flex-direction: row !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links a {
  min-height: 24px !important;
  padding: 3px 7px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  width: 100% !important;
  min-width: 0 !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 3px 6px !important;
  font-size: 11px !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtnAssist,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-queue-analyze {
  background: #d92d20 !important;
  border-color: #b42318 !important;
  color: #fff !important;
  font-weight: 900 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-paste-hint {
  margin: 4px 0 !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result {
  min-height: 36px !important;
  padding: 6px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  min-height: 30px !important;
  height: auto !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
  line-height: 1.08 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-row {
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  gap: 5px !important;
  padding: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-index {
  width: 30px !important;
  height: 30px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-folder-btn {
  display: inline-flex !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  padding: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-bottom: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head h3 {
  font-size: 18px !important;
  line-height: 1.1 !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 0 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy {
  width: auto !important;
  min-width: 106px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-textarea,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-html-output,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-hidden-source {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  margin-top: 0 !important;
  padding: 6px !important;
  min-height: 620px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
  height: calc(100vh - 300px) !important;
  min-height: 580px !important;
}

@media (max-width: 760px) {
  body:not(.home-mode):not(.purchase-mode) .ledger-head {
    display: block !important;
    padding: 10px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions p,
  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions a {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-search-input,
  body:not(.home-mode):not(.purchase-mode) .ledger-new-btn,
  body:not(.home-mode):not(.purchase-mode) .ledger-toggle {
    width: 100% !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-status-filters {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
    padding: 6px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 35 !important;
    background: #fff !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-scroll {
    overflow-x: hidden !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table thead {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tbody,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    display: block !important;
    width: 100% !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tr {
    padding: 8px !important;
    margin: 6px !important;
    border: 1px solid #cfe1ee !important;
    border-radius: 10px !important;
    background: #fff !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    padding: 0 !important;
    border: 0 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td:not(.ledger-title):not(.ledger-actions) {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
    display: block !important;
    margin-bottom: 5px !important;
    font-size: 15px !important;
    line-height: 1.15 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(70px, 1fr) 54px 36px 48px 34px !important;
    gap: 4px !important;
    align-items: center !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta > * {
    height: 24px !important;
    min-height: 24px !important;
    padding: 2px 4px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-actions {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    top: 0 !important;
    min-height: 36px !important;
    padding: 5px 8px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-title {
    font-size: 14px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar button {
    height: 30px !important;
    min-height: 30px !important;
    padding: 4px 8px !important;
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 36px !important;
    gap: 4px !important;
    padding: 5px !important;
    overflow-x: auto !important;
    grid-template-columns: repeat(5, 96px) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 76px !important;
    padding: 5px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: 1fr 76px 70px !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-purchase,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(2),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(5),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(7) {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
    min-height: 28px !important;
    padding: 3px 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 126px !important;
    min-height: 42px !important;
    overflow-x: auto !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(70px, 1fr) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 168px !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 5px !important;
    padding: 5px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .current-status {
    grid-column: 1 / -1 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
    grid-column: 1 / -1 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    height: 28px !important;
    min-height: 28px !important;
    padding: 2px 3px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
    min-height: 26px !important;
    padding: 3px 4px !important;
    font-size: 9.5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    justify-content: stretch !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy {
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
    min-height: 460px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
    height: 52vh !important;
    min-height: 430px !important;
  }
}

/* 20260719 ui-polish v26 final cascade guard */
body:not(.home-mode):not(.purchase-mode) #salesReferencePanel {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body:not(.home-mode):not(.purchase-mode) [data-body-function-field] {
  display: none !important;
}

body.listing-item-film-camera:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body.listing-item-camera-body:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-camera-body:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-camera-body:not(.home-mode):not(.purchase-mode) [data-body-function-field] {
  display: revert !important;
}

body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-lens-function-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-film-camera-field] {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-panel {
  max-width: 100% !important;
  overflow: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head {
  display: grid !important;
  grid-template-columns: minmax(170px, 0.28fr) minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 8px 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
  display: grid !important;
  grid-template-columns: minmax(150px, 1fr) minmax(210px, 0.95fr) auto auto !important;
  gap: 6px !important;
  align-items: center !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-head-actions p {
  margin: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-search-input,
body:not(.home-mode):not(.purchase-mode) .ledger-head-actions .primary-btn,
body:not(.home-mode):not(.purchase-mode) .ledger-head-actions .secondary-btn,
body:not(.home-mode):not(.purchase-mode) .ledger-head-actions a,
body:not(.home-mode):not(.purchase-mode) .ledger-toggle {
  width: auto !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-scroll {
  overflow-x: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 4px 6px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  vertical-align: middle !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 23% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 10% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
  width: 31% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 10% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 10% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 7% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 4% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 5% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit-input,
body:not(.home-mode):not(.purchase-mode) .ledger-order-input {
  width: 100% !important;
  min-height: 26px !important;
  height: 26px !important;
  padding: 2px 5px !important;
  font-size: 11px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  gap: 3px !important;
  align-items: center !important;
  justify-content: flex-end !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 32px !important;
  min-height: 24px !important;
  height: 24px !important;
  padding: 2px 5px !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  color: #b42318 !important;
  border: 1px solid #f1b6b1 !important;
  background: #fff7f6 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  background: rgba(255, 255, 255, 0.98) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  top: 0 !important;
  z-index: 130 !important;
  min-height: 40px !important;
  padding: 5px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: 40px !important;
  z-index: 129 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(98px, 1fr)) !important;
  gap: 5px !important;
  padding: 5px 8px !important;
  border-bottom: 1px solid #cfe4f5 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 28px !important;
  padding: 4px 7px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 18px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  top: 78px !important;
  z-index: 128 !important;
  padding: 6px 8px !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  margin: 0 0 3px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  display: grid !important;
  grid-template-columns: minmax(128px, 1.1fr) minmax(86px, 0.7fr) minmax(220px, 2.1fr) minmax(86px, 0.7fr) minmax(94px, 0.8fr) minmax(72px, 0.62fr) minmax(78px, 0.68fr) !important;
  gap: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-height: 28px !important;
  padding: 4px 6px !important;
  border-radius: 7px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell small {
  font-size: 10px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong {
  font-size: 12px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  top: 132px !important;
  z-index: 127 !important;
  min-height: 48px !important;
  padding: 5px 8px !important;
  background: #063653 !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step {
  min-height: 38px !important;
  gap: 2px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step span {
  width: 22px !important;
  height: 22px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: 180px !important;
  z-index: 126 !important;
  display: grid !important;
  grid-template-columns: 150px minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 6px 8px !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
  min-height: 30px !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-nav {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-card {
  padding: 9px 10px !important;
  border-radius: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-grid--setup {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) select,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) textarea {
  min-height: 34px !important;
  padding: 6px 9px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-drop-zone,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card {
  gap: 6px !important;
  padding: 8px 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-drop-zone p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-card p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-paste-hint,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .hint {
  margin: 2px 0 !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links a {
  min-height: 24px !important;
  padding: 3px 7px !important;
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 30px !important;
  height: 30px !important;
  padding: 3px 5px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-queue-analyze {
  border-color: #d92d20 !important;
  background: #fff2f1 !important;
  color: #b42318 !important;
  font-weight: 900 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result {
  min-height: 36px !important;
  padding: 6px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 4px 6px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  line-height: 1.12 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: keep-all !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .option-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .function-choice,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .grade {
  min-height: 32px !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1.16 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  gap: 6px !important;
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
  align-items: center !important;
  margin-bottom: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  margin: 0 0 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy {
  width: auto !important;
  min-width: 112px !important;
  max-width: 150px !important;
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 10px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .copy-output-textarea,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-html-output,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-hidden-source {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  min-height: 620px !important;
  padding: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
  height: calc(100vh - 260px) !important;
  min-height: 580px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .photo-url-card p {
  font-size: 12px !important;
  line-height: 1.35 !important;
}

@media (max-width: 900px) {
  body:not(.home-mode):not(.purchase-mode) .ledger-head {
    display: block !important;
    padding: 10px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    margin-top: 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-head-actions p {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-status-filters {
    position: sticky !important;
    top: 0 !important;
    z-index: 45 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding: 5px 8px !important;
    background: #fff !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-status-filters .filter-chip {
    min-height: 26px !important;
    padding: 2px 4px !important;
    font-size: 10px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tbody,
  body:not(.home-mode):not(.purchase-mode) .ledger-table tr,
  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    display: block !important;
    width: 100% !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table thead {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table tr {
    margin: 6px 8px !important;
    padding: 7px !important;
    border: 1px solid #cfe4f5 !important;
    border-radius: 10px !important;
    background: #fff !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td {
    padding: 0 !important;
    border: 0 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-table td:not(.ledger-title):not(.ledger-actions) {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
    margin: 0 0 5px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(66px, 1fr) minmax(52px, 0.8fr) 34px minmax(44px, 0.75fr) 32px !important;
    gap: 3px !important;
    align-items: center !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta > *,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 24px !important;
    height: 24px !important;
    padding: 2px 4px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    color: #b42318 !important;
    border: 1px solid #f1b6b1 !important;
    background: #fff7f6 !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-actions {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    overflow-x: auto !important;
    grid-template-columns: repeat(5, minmax(86px, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 76px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: minmax(0, 1fr) minmax(82px, 0.8fr) minmax(72px, 0.72fr) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(1),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(2),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(5),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row .editor-ledger-cell:nth-child(7) {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 124px !important;
    overflow-x: auto !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(72px, 1fr) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 172px !important;
    grid-template-columns: 1fr !important;
    gap: 5px !important;
    padding: 6px 8px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-purchase-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .basic-fast-grid--setup {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory {
    min-height: 28px !important;
    padding: 3px 4px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
    justify-content: stretch !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
    min-height: 500px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
    height: 56vh !important;
    min-height: 470px !important;
  }
}

@media (max-width: 430px) {
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    grid-template-columns: minmax(58px, 1fr) minmax(46px, 0.75fr) 30px minmax(42px, 0.72fr) 30px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta > *,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    min-height: 22px !important;
    height: 22px !important;
    padding: 1px 3px !important;
    font-size: 9px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    grid-template-columns: repeat(5, 82px) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong {
    font-size: 11px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    font-size: 10px !important;
    padding: 2px 3px !important;
  }
}

/* 20260719 ui-polish v27: final layout override for listing ledger/editor. */
body:not(.home-mode):not(.purchase-mode) #salesReferencePanel {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-scroll {
  overflow-x: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 5px 6px !important;
  vertical-align: middle !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 20% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 10% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
  width: 30% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 13% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 9% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 8% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 10% !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: minmax(72px, 0.9fr) minmax(72px, 1fr) !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table input,
body:not(.home-mode):not(.purchase-mode) .ledger-table select {
  height: 30px !important;
  min-height: 30px !important;
  padding: 3px 8px !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions button,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  min-height: 28px !important;
  height: 28px !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #b42318 !important;
  background: #fff7f6 !important;
  border: 1px solid #f1b6b1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  background: #ffffff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
  top: 0 !important;
  z-index: 180 !important;
  min-height: 44px !important;
  padding: 6px 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: 44px !important;
  z-index: 178 !important;
  padding: 6px 8px !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip > * {
  min-height: 34px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  top: 92px !important;
  z-index: 176 !important;
  padding: 7px 8px !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  display: grid !important;
  grid-template-columns: minmax(120px, 1.2fr) minmax(74px, 0.7fr) minmax(250px, 2.2fr) minmax(92px, 0.8fr) minmax(88px, 0.8fr) minmax(80px, 0.7fr) minmax(72px, 0.7fr) !important;
  gap: 5px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-height: 36px !important;
  padding: 4px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span {
  font-size: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong {
  display: block !important;
  font-size: 13px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  top: 151px !important;
  z-index: 174 !important;
  min-height: 54px !important;
  padding: 6px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper > * {
  min-height: 40px !important;
  padding: 3px 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: 205px !important;
  z-index: 172 !important;
  padding: 6px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-options {
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .workflow-nav button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-options button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) fieldset button {
  min-height: 34px !important;
  padding: 5px 9px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  line-height: 1.18 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-options {
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) fieldset {
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-recognition-card {
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-recognition-card .section-subtext {
  margin-bottom: 6px !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  width: 100% !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 3px 6px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button:nth-child(3),
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #recognizeImageBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #recognizeSelectedBtn {
  color: #ffffff !important;
  background: #d92d20 !important;
  border-color: #d92d20 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-button {
  min-height: 30px !important;
  height: auto !important;
  padding: 4px 7px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .live-copy-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 4px 0 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .compact-copy {
  width: 100% !important;
  min-height: 32px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel textarea,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveConditionText,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlText {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  min-height: 620px !important;
  padding: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
  min-height: 580px !important;
  height: calc(100vh - 300px) !important;
}

body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-lens-function-field],
body:not(.listing-item-film-camera):not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body:not(.listing-item-camera-body):not(.home-mode):not(.purchase-mode) [data-body-only-field],
body:not(.listing-item-digital-body):not(.home-mode):not(.purchase-mode) [data-body-check-field],
body:not(.listing-item-digital-body):not(.home-mode):not(.purchase-mode) [data-body-function-field],
body:not(.listing-item-lens-only):not(.home-mode):not(.purchase-mode) [data-lens-function-field],
body:not(.home-mode):not(.purchase-mode) [data-film-camera-field].is-hidden,
body:not(.home-mode):not(.purchase-mode) [data-body-only-field].is-hidden,
body:not(.home-mode):not(.purchase-mode) [data-body-check-field].is-hidden,
body:not(.home-mode):not(.purchase-mode) [data-body-function-field].is-hidden,
body:not(.home-mode):not(.purchase-mode) [data-lens-function-field].is-hidden {
  display: none !important;
  visibility: hidden !important;
}

body.listing-item-film-camera:not(.home-mode):not(.purchase-mode) [data-film-camera-field]:not(.is-hidden),
body.listing-item-camera-body:not(.home-mode):not(.purchase-mode) [data-body-only-field]:not(.is-hidden),
body.listing-item-digital-body:not(.home-mode):not(.purchase-mode) [data-body-check-field]:not(.is-hidden),
body.listing-item-digital-body:not(.home-mode):not(.purchase-mode) [data-body-function-field]:not(.is-hidden),
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-lens-function-field]:not(.is-hidden) {
  visibility: visible !important;
}

body.listing-item-film-camera:not(.home-mode):not(.purchase-mode) fieldset[data-film-camera-field]:not(.is-hidden),
body.listing-item-camera-body:not(.home-mode):not(.purchase-mode) fieldset[data-body-only-field]:not(.is-hidden),
body.listing-item-digital-body:not(.home-mode):not(.purchase-mode) fieldset[data-body-check-field]:not(.is-hidden),
body.listing-item-digital-body:not(.home-mode):not(.purchase-mode) fieldset[data-body-function-field]:not(.is-hidden),
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) fieldset[data-lens-function-field]:not(.is-hidden) {
  display: block !important;
}

body.listing-item-film-camera:not(.home-mode):not(.purchase-mode) button[data-film-camera-field]:not(.is-hidden),
body.listing-item-camera-body:not(.home-mode):not(.purchase-mode) button[data-body-only-field]:not(.is-hidden),
body.listing-item-digital-body:not(.home-mode):not(.purchase-mode) button[data-body-check-field]:not(.is-hidden),
body.listing-item-digital-body:not(.home-mode):not(.purchase-mode) button[data-body-function-field]:not(.is-hidden),
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) button[data-lens-function-field]:not(.is-hidden) {
  display: inline-flex !important;
}

@media (max-width: 700px) {
  body:not(.home-mode):not(.purchase-mode) .ledger-card {
    padding: 9px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-card-title {
    font-size: 15px !important;
    line-height: 1.22 !important;
    margin-bottom: 6px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(70px, 1fr) minmax(62px, 0.8fr) 42px minmax(50px, 0.75fr) 38px !important;
    gap: 4px !important;
    align-items: center !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta > * {
    min-width: 0 !important;
    min-height: 24px !important;
    padding: 2px 4px !important;
    font-size: 10px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    padding: 1px 5px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
    min-height: 40px !important;
    padding: 5px 8px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 40px !important;
    grid-template-columns: repeat(5, minmax(82px, 1fr)) !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 84px !important;
    padding: 6px 8px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
    min-height: 30px !important;
    padding: 3px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(1),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(2),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(5) {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 138px !important;
    min-height: 46px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 184px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-options {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-button {
    font-size: 10px !important;
    padding: 3px 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .live-copy-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* v28-final: force compact ledger/editor/mobile layout at the end of the cascade. */
body:not(.home-mode):not(.purchase-mode) .ledger-wrap,
body:not(.home-mode):not(.purchase-mode) .ledger-scroll {
  overflow-x: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th,
body:not(.home-mode):not(.purchase-mode) .ledger-table td {
  padding: 5px 7px !important;
  vertical-align: middle !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(1) {
  width: 205px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(2) {
  width: 100px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(3),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(3) {
  width: auto !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(4) {
  width: 112px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(5) {
  width: 104px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(6) {
  width: 78px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(7) {
  width: 72px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-table th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) .ledger-table td:nth-child(8) {
  width: 86px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-purchase-fields {
  display: grid !important;
  grid-template-columns: 1fr .82fr !important;
  gap: 4px !important;
  max-width: 198px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit-input,
body:not(.home-mode):not(.purchase-mode) .ledger-order-input,
body:not(.home-mode):not(.purchase-mode) .ledger-sku-input,
body:not(.home-mode):not(.purchase-mode) .ledger-price-input {
  min-height: 30px !important;
  height: 30px !important;
  padding: 3px 7px !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-title strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-actions {
  display: flex !important;
  gap: 4px !important;
  align-items: center !important;
  justify-content: flex-end !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-edit,
body:not(.home-mode):not(.purchase-mode) .ledger-delete {
  display: inline-flex !important;
  min-width: 40px !important;
  min-height: 28px !important;
  padding: 3px 6px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ledger-delete,
body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
  color: #b42318 !important;
  border-color: #f3b5ad !important;
  background: #fff7f5 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
  top: 0 !important;
  min-height: 38px !important;
  padding: 5px 8px !important;
  z-index: 90 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header h2 {
  font-size: 18px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header .primary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header .secondary-btn {
  min-height: 30px !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: 38px !important;
  min-height: 36px !important;
  padding: 4px 6px !important;
  gap: 6px !important;
  z-index: 89 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 28px !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 12px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  top: 74px !important;
  padding: 5px 7px !important;
  z-index: 88 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  font-size: 11px !important;
  margin-bottom: 2px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
  grid-template-columns: 150px 96px minmax(210px, 1fr) 100px 100px 78px 78px !important;
  gap: 4px !important;
  align-items: stretch !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell {
  min-height: 30px !important;
  padding: 3px 6px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell small {
  font-size: 10px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell strong {
  font-size: 13px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  top: 126px !important;
  min-height: 44px !important;
  padding: 4px 6px !important;
  z-index: 87 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step {
  min-height: 36px !important;
  padding: 2px 4px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step span {
  width: 24px !important;
  height: 24px !important;
  margin-bottom: 2px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: 170px !important;
  min-height: 44px !important;
  padding: 5px 8px !important;
  z-index: 86 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global > div:first-child strong {
  font-size: 18px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-nav {
  padding: 6px 8px !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-current,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-btn {
  min-height: 34px !important;
  padding: 4px 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-current strong {
  font-size: 15px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section {
  padding-top: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-heading,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) h3,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) h4 {
  margin-top: 4px !important;
  margin-bottom: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) label.field {
  gap: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field select,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .field textarea {
  min-height: 34px !important;
  padding: 5px 8px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-options button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) fieldset button {
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .condition-options {
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-recognition-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone {
  padding: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone {
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  gap: 7px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-icon {
  width: 38px !important;
  height: 38px !important;
  font-size: 16px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone h4,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-recognition-card h4 {
  margin: 0 0 2px !important;
  font-size: 14px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-recognition-card p,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-paste-hint {
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
  grid-column: 1 / -1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .file-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row label,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 2px 5px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-recognize-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtnAssist {
  color: #fff !important;
  background: #d92d20 !important;
  border-color: #b42318 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-result {
  min-height: 28px !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-button {
  min-height: 30px !important;
  height: auto !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
  line-height: 1.12 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: keep-all !important;
  text-overflow: clip !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  padding: 8px !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  gap: 8px !important;
  align-items: center !important;
  margin-bottom: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-head h3 {
  font-size: 17px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .live-copy-actions,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 0 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions .compact-copy,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions button {
  width: auto !important;
  min-width: 108px !important;
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel textarea,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveConditionDescriptionOutput,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlOutput,
.copy-output-details,
.sales-reference-panel {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-frame-card {
  min-height: 680px !important;
  padding: 8px !important;
  margin-top: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #liveHtmlPreviewFrame {
  min-height: 640px !important;
  height: calc(100vh - 245px) !important;
}

body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) .service-seal-fieldset,
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) #shutterCountFieldset,
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-item-lens-only:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) .service-seal-fieldset,
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) #shutterCountFieldset,
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-only-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-check-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-body-function-field],
body.listing-item-accessory:not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body:not(.listing-item-film-camera):not(.home-mode):not(.purchase-mode) .service-seal-fieldset,
body:not(.listing-item-film-camera):not(.home-mode):not(.purchase-mode) [data-film-camera-field],
body:not(.listing-item-camera-body):not(.home-mode):not(.purchase-mode) #shutterCountFieldset,
body:not(.listing-item-camera-body):not(.home-mode):not(.purchase-mode) [data-body-only-field],
body:not(.listing-item-digital-body):not(.home-mode):not(.purchase-mode) [data-body-check-field],
body:not(.listing-item-digital-body):not(.home-mode):not(.purchase-mode) [data-body-function-field],
body:not(.listing-item-lens-only):not(.home-mode):not(.purchase-mode) [data-lens-function-field] {
  display: none !important;
  visibility: hidden !important;
}

@media (max-width: 700px) {
  body:not(.home-mode):not(.purchase-mode) .ledger-card {
    padding: 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-card-title {
    font-size: 15px !important;
    line-height: 1.2 !important;
    margin-bottom: 6px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta {
    display: grid !important;
    grid-template-columns: minmax(72px, 1fr) minmax(58px, .82fr) minmax(52px, .75fr) 38px 38px !important;
    gap: 3px !important;
    align-items: center !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-meta > * {
    min-width: 0 !important;
    min-height: 23px !important;
    padding: 2px 4px !important;
    font-size: 10px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-edit,
  body:not(.home-mode):not(.purchase-mode) .ledger-mobile-delete {
    padding: 1px 4px !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-page-header {
    min-height: 36px !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 36px !important;
    grid-template-columns: repeat(5, minmax(76px, 1fr)) !important;
    overflow-x: auto !important;
    min-height: 34px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 70px !important;
    padding: 5px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(1),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(2),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(5),
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-cell:nth-child(6) {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 124px !important;
    min-height: 42px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 166px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
    font-size: 10px !important;
    padding: 2px 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone {
    display: grid !important;
    grid-template-columns: 34px 1fr !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-cost-links {
    grid-column: 1 / -1 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid button,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-button {
    min-height: 30px !important;
    font-size: 9.5px !important;
    padding: 3px 3px !important;
    line-height: 1.08 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .live-copy-actions {
    justify-content: stretch !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-copy-actions button {
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }
}
/* Drive商品写真ワークフロー */
.drive-photo-settings-panel {
  margin-top: 10px;
  border: 1px solid var(--line, #cbddeb);
  border-radius: 12px;
  background: #f8fcff;
  overflow: hidden;
}

.drive-photo-settings-panel > summary {
  padding: 10px 12px;
  color: #174a69;
  font-weight: 800;
  cursor: pointer;
}

.drive-photo-settings-panel > .drive-photo-settings {
  margin-top: 0;
  padding: 12px;
  border-top: 1px solid var(--line, #cbddeb);
}

.drive-photo-settings {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line, #cbddeb);
}

.drive-photo-settings small,
.drive-photo-settings-guide,
.drive-photo-folder-status {
  color: var(--muted, #526b80);
  line-height: 1.5;
}

.drive-photo-settings-guide {
  margin: 8px 0 0;
}

.drive-photo-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.drive-photo-settings-actions .primary-btn,
.drive-photo-settings-actions .secondary-btn {
  min-width: 0;
}

.drive-photo-bulk-result {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #eef8fd;
  color: #174a69;
  font-weight: 700;
}

.drive-photo-rename-preview {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #b9d7e8;
  border-radius: 10px;
  background: #fff;
  color: #174a69;
}

.drive-photo-rename-preview[hidden] {
  display: none;
}

.drive-photo-rename-preview ul {
  display: grid;
  gap: 6px;
  max-height: 260px;
  margin: 0;
  padding-left: 22px;
  overflow: auto;
}

.drive-photo-rename-preview code {
  overflow-wrap: anywhere;
  white-space: normal;
}

.drive-photo-file-list {
  margin: 8px 0 14px;
  padding: 10px 12px 10px 30px;
  max-height: 150px;
  overflow: auto;
  border: 1px solid var(--line, #cbddeb);
  border-radius: 12px;
  background: #fff;
  color: #27445d;
}

.drive-photo-file-list li + li {
  margin-top: 4px;
}

/* Stockの補助パネルは仕入一覧を優先し、必要なときだけ展開する。 */
.purchase-collapsible-panel {
  min-height: 0 !important;
  position: static !important;
  overflow: visible;
}

.purchase-collapsible-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 16px;
  color: var(--text, #eef8ff);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.purchase-collapsible-panel > .purchase-collapsible-summary,
.purchase-collapsible-panel > .purchase-collapsible-body {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.purchase-collapsible-panel:not([open]) > .purchase-collapsible-body {
  display: none !important;
}

.purchase-collapsible-summary::-webkit-details-marker {
  display: none;
}

.purchase-collapsible-summary::after {
  content: "＋";
  flex: 0 0 auto;
  color: #7bdcff;
  font-size: 18px;
  font-weight: 800;
}

.purchase-collapsible-panel[open] > .purchase-collapsible-summary::after {
  content: "−";
}

.purchase-collapsible-summary:focus-visible {
  outline: 2px solid #55d7ff;
  outline-offset: -3px;
  border-radius: 12px;
}

.purchase-sync-panel > .purchase-collapsible-summary .purchase-sync-head {
  width: 100%;
}

.purchase-collapsible-body {
  padding: 0 16px 16px;
}

.purchase-sync-collapsible-body {
  display: grid;
  gap: 14px;
}

.purchase-form-summary > span:first-child {
  display: grid;
  gap: 2px;
}

.purchase-form-summary strong {
  font-size: 18px;
}

.purchase-form-summary .eyebrow {
  margin: 0;
}

.purchase-form-summary .purchase-form-mode {
  margin-left: auto;
}

.purchase-form-collapsible-body {
  display: grid;
  gap: 14px;
}

.purchase-form-action-head {
  min-height: 0;
  margin: 0;
}

@media (max-width: 720px) {
  .purchase-collapsible-summary {
    align-items: flex-start;
    padding: 11px 12px;
  }

  .purchase-collapsible-body {
    padding: 0 12px 12px;
  }

  .purchase-form-summary .purchase-form-mode {
    display: none;
  }
}

/* Stock v60 refinement: compact target editor and first-party sold-price reference. */
.purchase-form-panel {
  width: 100%;
  max-width: 900px;
  justify-self: start;
}

.purchase-quick-groups {
  display: grid;
  gap: 10px;
}

.purchase-form-group {
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(124, 182, 222, .26);
  border-radius: 12px;
  background: rgba(15, 38, 56, .92);
}

.purchase-form-group > h3,
.purchase-form-group .purchase-store-head h3 {
  margin: 0 0 8px;
  color: #e7f5ff;
  font-size: 14px;
}

.purchase-form-panel .purchase-form-group .purchase-form-grid,
.purchase-form-panel .purchase-store-fields .purchase-form-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.purchase-form-panel .purchase-store-fields.purchase-form-group {
  display: block;
  margin: 0;
  padding: 10px;
}

.purchase-form-panel .purchase-store-fields .purchase-store-head {
  margin-bottom: 8px;
}

.purchase-readonly-field small {
  color: #87a9c0;
  font-size: 10px;
  font-weight: 600;
}

.purchase-screen .purchase-readonly-field input[readonly] {
  border-style: dashed;
  border-color: rgba(127, 191, 235, .42);
  background: #18354a;
  color: #bcd5e6;
  -webkit-text-fill-color: #bcd5e6;
  cursor: default;
}

.purchase-sold-price-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
  margin-top: 7px;
  padding: 8px 10px;
  border: 1px solid rgba(90, 185, 235, .38);
  border-radius: 10px;
  background: rgba(13, 48, 68, .84);
  color: #dff5ff;
  font-size: 12px;
  font-weight: 700;
}

.purchase-sold-price-summary.is-empty {
  border-color: rgba(157, 178, 199, .32);
  background: rgba(35, 48, 61, .78);
  color: #b7c8d6;
}

.purchase-sales-low-confidence {
  color: #ffd58a;
  font-size: 10px;
  font-weight: 800;
}

.purchase-sales-median-warning {
  display: inline-flex;
  align-items: center;
  color: #ffd278;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.purchase-sold-price-summary .purchase-apply-sold-median {
  min-height: 30px;
  margin-left: auto;
  padding: 5px 10px;
  color: #e8f7ff;
  background: #17496a;
  border-color: rgba(111, 204, 255, .5);
}

.purchase-missing-ebay-price-label {
  display: inline-flex;
  margin: 0 6px 3px 0;
  padding: 3px 7px;
  border: 1px solid rgba(245, 190, 72, .58);
  border-radius: 999px;
  background: rgba(101, 70, 10, .92);
  color: #fff1bd;
  font-size: 11px;
  line-height: 1.2;
  vertical-align: middle;
}

.purchase-target-metrics > .is-missing {
  border-color: rgba(245, 190, 72, .5);
  color: #ffe6a0;
}

.purchase-apply-sold-medians {
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
}

.purchase-quick-update-reason {
  grid-column: 1 / -1;
  display: block;
  padding: 6px 9px;
  border: 1px solid rgba(245, 190, 72, .38);
  border-radius: 9px;
  background: rgba(83, 59, 13, .58);
  color: #ffe4a1;
  font-size: 11px;
  line-height: 1.4;
}

.purchase-quick-update-reason.is-registered {
  border-color: rgba(92, 214, 155, .38);
  background: rgba(20, 83, 58, .54);
  color: #d9ffed;
}

.purchase-form-summary .purchase-form-mode {
  display: inline-flex;
  max-width: 430px;
  border-color: rgba(245, 190, 72, .54);
  background: rgba(83, 59, 13, .9);
  color: #ffe4a1;
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}

.purchase-form-summary .purchase-form-mode.is-registered {
  border-color: rgba(92, 214, 155, .48);
  background: rgba(20, 83, 58, .9);
  color: #d9ffed;
}

@media (max-width: 900px) {
  .purchase-form-panel {
    max-width: none;
  }

  .purchase-form-panel .purchase-form-group .purchase-form-grid,
  .purchase-form-panel .purchase-store-fields .purchase-form-grid {
    grid-template-columns: 1fr;
  }

  .purchase-sold-price-summary .purchase-apply-sold-median {
    width: 100%;
    margin-left: 0;
  }
}

/* Stock v62 final cascade: eBay summary, wide condition editor, then the compact list. */
.purchase-sync-panel,
.purchase-form-panel {
  padding: 0;
}

.purchase-sync-panel > .purchase-collapsible-summary {
  min-height: 36px;
  padding: 7px 12px;
}

.purchase-form-panel {
  width: 100%;
  max-width: none;
  position: static;
}

.purchase-form-panel > .purchase-collapsible-summary {
  min-height: 40px;
  padding: 8px 12px;
}

.purchase-form-panel .purchase-form-collapsible-body {
  gap: 8px;
  padding: 0 12px 10px;
}

.purchase-form-panel .purchase-target-csv-panel {
  gap: 5px;
  margin-bottom: 4px;
  padding: 7px 9px;
}

.purchase-form-panel .purchase-target-csv-note,
.purchase-form-panel .purchase-target-csv-status {
  margin: 0;
  font-size: 10px;
  line-height: 1.35;
}

.purchase-form-panel .purchase-quick-groups {
  gap: 7px;
}

.purchase-form-panel .purchase-form-group,
.purchase-form-panel .purchase-store-fields.purchase-form-group {
  padding: 7px 8px;
}

.purchase-form-panel .purchase-form-group > h3,
.purchase-form-panel .purchase-form-group .purchase-store-head h3 {
  margin-bottom: 5px;
  font-size: 12px;
}

.purchase-form-panel .purchase-form-group .purchase-form-grid,
.purchase-form-panel .purchase-store-fields .purchase-form-grid {
  gap: 6px;
}

.purchase-form-panel .purchase-form-grid label {
  gap: 3px;
  font-size: 10px;
}

.purchase-form-panel .purchase-form-grid input {
  min-height: 31px;
  padding: 5px 7px;
  font-size: 12px;
}

@media (min-width: 901px) {
  .purchase-form-panel .purchase-quick-groups {
    grid-template-columns: minmax(190px, .65fr) minmax(440px, 1.45fr) minmax(480px, 1.6fr);
    align-items: start;
  }
}

@media (min-width: 1100px) {
  .purchase-shell {
    width: min(1760px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .purchase-hero,
  .purchase-sync-panel,
  .purchase-form-panel,
  .purchase-list-panel {
    grid-column: 1;
  }

  .purchase-hero {
    order: 1;
  }

  .purchase-sync-panel {
    order: 2;
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    position: static;
  }

  .purchase-form-panel {
    order: 3;
    position: static;
  }

  .purchase-list-panel {
    order: 4;
  }
}

@media (max-width: 900px) {
  .purchase-form-panel .purchase-quick-groups {
    grid-template-columns: 1fr;
  }
}

.purchase-product-row {
  padding: 7px 9px;
  border-radius: 11px;
}

.purchase-product-row .purchase-row-main {
  gap: 3px;
}

.purchase-compact-title-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.purchase-product-row .purchase-row-title {
  min-width: 0;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchase-final-decision-compact {
  display: inline-flex;
  flex: 0 0 auto;
}

.purchase-final-decision-compact > strong {
  min-height: 22px;
  padding: 3px 8px;
  font-size: 10px;
}

.purchase-product-row .purchase-row-meta {
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchase-target-metrics.purchase-target-metrics-compact {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.purchase-target-metrics.purchase-target-metrics-compact::-webkit-scrollbar {
  display: none;
}

.purchase-target-metrics.purchase-target-metrics-compact > span {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 3px 6px;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.purchase-sold-price-summary-compact {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchase-shop-fetch-status-compact {
  grid-column: 1 / -1;
  width: 100%;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  overflow: visible;
}

.purchase-shop-fetch-status-compact .purchase-shop-fetch-chip {
  flex: 0 0 auto;
  max-width: 100%;
  padding: 3px 6px;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.purchase-product-row .purchase-row-actions {
  gap: 5px;
}

.purchase-product-row .purchase-row-actions button,
.purchase-product-row .purchase-row-actions a {
  min-height: 29px;
  padding: 5px 10px;
  font-size: 10px;
}

.purchase-product-row .purchase-compact-detail {
  display: block;
  min-width: 0;
  color: #dbeafe;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.candidate-row .purchase-row-details {
  color: #dbeafe;
  font-size: 13px;
  line-height: 1.4;
}

.candidate-row .purchase-detail-line {
  color: #dbeafe;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.candidate-row .purchase-detail-line b {
  color: #f4f9ff;
  font-weight: 800;
}

/* Stock v63: exhaustive four-mode workflow and inline setup repair in "Other". */
.purchase-workflow-controls {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.purchase-workflow-mode {
  min-height: 38px;
  padding: 6px 8px;
  font-size: 12px;
}

.purchase-workflow-mode [data-purchase-workflow-count] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 20px;
  margin-left: 3px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .28);
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.purchase-other-reason-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 7px;
  border-top: 1px solid rgba(124, 182, 222, .2);
}

.purchase-other-reason {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid rgba(127, 191, 235, .3);
  border-radius: 999px;
  background: #10283a;
  color: #dff2ff;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.purchase-other-reason.active {
  border-color: #36c3ff;
  background: #0a6f99;
  color: #fff;
}

.purchase-other-reason-badges {
  display: inline-flex;
  flex: 0 1 auto;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

.purchase-other-reason-badge {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid rgba(245, 190, 72, .45);
  border-radius: 999px;
  background: rgba(88, 61, 8, .9);
  color: #ffe7a1;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.purchase-other-reason-missing_url,
.purchase-other-reason-missing_price,
.purchase-other-reason-missing_keyword {
  border-color: rgba(224, 49, 49, .5);
  background: rgba(111, 25, 31, .9);
  color: #ffd4d4;
}

.purchase-other-settings-editor {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(130px, .7fr) auto;
  gap: 6px;
  align-items: end;
  padding: 6px;
  border: 1px solid rgba(245, 190, 72, .32);
  border-radius: 8px;
  background: rgba(31, 42, 50, .78);
}

.purchase-other-settings-editor label {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: #cddce8;
  font-size: 9px;
  font-weight: 800;
}

.purchase-other-settings-editor input {
  width: 100%;
  min-width: 0;
  min-height: 29px;
  padding: 4px 7px;
  border: 1px solid rgba(127, 191, 235, .36);
  border-radius: 7px;
  background: #0c2537;
  color: #fff;
  font-size: 11px;
}

.purchase-other-settings-editor .purchase-other-settings-save {
  min-height: 29px;
  padding: 4px 10px;
  font-size: 10px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .purchase-workflow-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-other-settings-editor {
    grid-template-columns: 1fr;
  }
}

/* Stock v65: target-complete workflow counts and a shorter quick-entry panel. */
.purchase-workflow-mode {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  text-align: center;
}

.purchase-workflow-mode > small {
  display: block;
  overflow: hidden;
  color: #9fc6dd;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-workflow-mode.active > small {
  color: #e7f8ff;
}

.purchase-workflow-summary.has-count-warning {
  padding: 6px 8px;
  border: 1px solid rgba(224, 49, 49, .62);
  border-radius: 8px;
  background: rgba(111, 25, 31, .72);
  color: #ffd4d4;
  font-weight: 900;
}

.purchase-scope-notice {
  margin: 0;
  color: #9fc6dd;
  font-size: 11px;
  line-height: 1.35;
}

.purchase-scope-notice.is-filtered {
  padding: 5px 8px;
  border-left: 3px solid #35c4f2;
  background: rgba(20, 70, 98, .55);
  color: #e5f7ff;
}

.purchase-form-summary-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
  margin-left: auto;
}

.purchase-form-summary .purchase-new-condition-btn {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 4px 9px;
  font-size: 10px;
  white-space: nowrap;
}

.purchase-form-panel .purchase-form-collapsible-body {
  gap: 6px;
  padding-bottom: 8px;
}

.purchase-form-panel .purchase-target-csv-panel {
  display: block;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.purchase-target-csv-panel > summary {
  padding: 6px 9px;
  color: #dff2ff;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.purchase-target-csv-body {
  display: grid;
  gap: 5px;
  padding: 0 8px 8px;
  border-top: 1px solid rgba(124, 182, 222, .22);
}

.purchase-form-panel .purchase-quick-groups {
  align-items: stretch;
  gap: 6px;
}

.purchase-form-panel .purchase-form-group,
.purchase-form-panel .purchase-store-fields.purchase-form-group {
  height: 100%;
  padding: 6px 7px;
}

.purchase-form-panel .purchase-price-form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.purchase-form-panel .purchase-price-form-grid > label:nth-child(-n+3) {
  grid-column: span 2;
}

.purchase-form-panel .purchase-price-form-grid > label:nth-child(n+4) {
  grid-column: span 3;
}

.purchase-form-panel .purchase-form-actions {
  gap: 5px;
  margin-top: 0;
}

.purchase-form-panel .purchase-form-actions button {
  min-height: 31px;
  padding: 5px 9px;
  font-size: 11px;
}

.purchase-form-panel .purchase-quick-update-reason {
  padding: 4px 7px;
  font-size: 10px;
  line-height: 1.3;
}

@media (max-width: 760px) {
  .purchase-workflow-mode > small {
    white-space: normal;
  }

  .purchase-form-summary {
    flex-wrap: wrap;
  }

  .purchase-form-summary-actions {
    width: 100%;
    justify-content: space-between;
  }

  .purchase-form-summary .purchase-form-mode {
    display: inline-flex;
    max-width: none;
    text-align: left;
  }

  .purchase-form-panel .purchase-price-form-grid {
    grid-template-columns: 1fr;
  }

  .purchase-form-panel .purchase-price-form-grid > label:nth-child(n) {
    grid-column: auto;
  }
}

/* Stock v69: two-stage overview/detail workflow. */
.purchase-sticky-modebar {
  position: sticky;
  top: 0;
  z-index: 70;
  order: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px;
  border: 1px solid rgba(96, 174, 221, .34);
  border-radius: 14px;
  background: rgba(5, 24, 37, .96);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .32);
  backdrop-filter: blur(14px);
}

.purchase-sticky-modebar .purchase-workflow-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.purchase-sticky-modebar .purchase-workflow-mode {
  min-height: 40px;
  padding: 5px 8px;
}

.purchase-sticky-modebar .purchase-workflow-mode > small {
  display: none;
}

.purchase-sticky-modebar .purchase-sync-panel {
  position: relative !important;
  grid-column: auto;
  order: initial;
  width: auto;
  min-width: 132px;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  background: #102b3f;
  align-self: center;
}

.purchase-sticky-modebar .purchase-sync-panel > .purchase-collapsible-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 40px;
  min-height: 40px;
  padding: 6px 10px;
  white-space: nowrap;
}

.purchase-sticky-modebar .purchase-sync-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.purchase-sticky-modebar .purchase-sync-panel:not([open]) #purchaseSyncStatusText {
  display: none;
}

.purchase-sticky-modebar .purchase-sync-panel > .purchase-sync-collapsible-body {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 90;
  width: min(760px, calc(100vw - 32px));
  max-height: min(72vh, 720px);
  padding: 14px;
  overflow: auto;
  border: 1px solid rgba(96, 174, 221, .42);
  border-radius: 12px;
  background: #091f2e;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .5);
}

.purchase-layout {
  display: grid !important;
  order: 3;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas:
    "form"
    "list";
  gap: 9px;
  align-items: start;
}

.purchase-layout > .purchase-detail-aside {
  grid-area: aside;
}

.purchase-layout > .purchase-form-panel {
  grid-area: form;
  width: 100%;
  max-width: none;
}

.purchase-layout > .purchase-list-panel {
  grid-area: list;
  width: 100%;
  min-width: 0;
}

.purchase-detail-aside[hidden] {
  display: none !important;
}

.purchase-detail-mode {
  grid-template-columns: minmax(320px, 2fr) minmax(0, 3fr) !important;
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "aside list";
}

.purchase-detail-mode .purchase-detail-aside {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  min-width: 0;
  position: sticky;
  top: 62px;
  align-self: start;
  max-height: calc(100dvh - 250px);
  overflow: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.purchase-detail-scroll {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.purchase-quick-action-dock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(93, 196, 238, .55);
  border-radius: 10px;
  background: rgba(5, 25, 38, .98);
  box-shadow: 0 -8px 20px rgba(0, 0, 0, .3);
}

.purchase-quick-action-dock[hidden] {
  display: none !important;
}

.purchase-quick-dirty-dock {
  margin-right: auto;
  color: #ffd27a;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.purchase-form-primary-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.purchase-quick-action-dock #purchaseQuickUpdateBtn {
  min-height: 34px;
}

.purchase-detail-mode .purchase-detail-scroll > .purchase-form-panel {
  width: 100%;
  max-width: none;
  margin: 0;
}

.purchase-detail-mode .purchase-form-panel > .purchase-form-summary {
  cursor: default;
  list-style: none;
}

.purchase-detail-mode .purchase-form-panel > .purchase-form-summary::-webkit-details-marker {
  display: none;
}

.purchase-detail-aside > .purchase-back-to-products {
  width: max-content;
  min-height: 34px;
  padding: 6px 11px;
}

.purchase-selected-group-card {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid rgba(236, 187, 65, .52);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(71, 57, 17, .76), rgba(15, 39, 56, .96));
}

.purchase-selected-kicker {
  color: #f7ce66;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

.purchase-selected-title-line {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
}

.purchase-selected-title-line > strong {
  min-width: 0;
  color: #fff;
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.purchase-selected-counts {
  color: #d5e8f4;
  font-size: 11px;
  font-weight: 800;
}

.purchase-selected-group-card .purchase-target-metrics {
  margin: 0;
}

.purchase-selected-group-card .purchase-sold-price-summary {
  margin: 0;
}

.purchase-selected-shop-links {
  gap: 5px;
}

.purchase-detail-mode .purchase-list-panel > .purchase-panel-head,
.purchase-detail-mode .purchase-list-panel > .purchase-catalog-toolbar,
.purchase-detail-mode .purchase-list-panel > .purchase-high-turnover-status,
.purchase-detail-mode .purchase-list-panel > .purchase-sale-panel,
.purchase-detail-mode .purchase-list-panel > .purchase-search-panel {
  display: none !important;
}

.purchase-detail-mode .purchase-list-panel {
  padding: 9px;
}

.purchase-detail-mode .purchase-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 7px;
  padding: 0;
}

.purchase-list-mode .purchase-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

@media (max-width: 1100px) {
  .purchase-list-mode .purchase-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .purchase-list-mode .purchase-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Stock v90: candidate availability and color-variant visibility. */
.purchase-candidate-availability-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 8px;
  padding: 7px 10px;
  border: 1px solid rgba(135, 182, 214, .3);
  border-radius: 10px;
  background: rgba(18, 42, 58, .92);
  color: #dbeafe;
  font-size: 12px;
}

.purchase-candidate-availability-controls[hidden] {
  display: none !important;
}

.purchase-candidate-availability-controls label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: #f4f9ff;
  font-weight: 700;
  cursor: pointer;
}

.purchase-candidate-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.purchase-candidate-color-badge,
.purchase-candidate-soldout-badge,
.purchase-candidate-availability {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.purchase-candidate-color-badge {
  padding: 3px 7px;
  border: 1px solid rgba(89, 176, 231, .55);
  background: rgba(22, 83, 119, .75);
  color: #e9f7ff;
}

.purchase-candidate-color-badge.purchase-color-silver {
  border-color: #a9bac8;
  background: #536574;
  color: #fff;
}

.purchase-candidate-color-badge.purchase-color-black {
  border-color: #7b8b99;
  background: #1c2731;
  color: #f5f8fb;
}

.purchase-candidate-soldout-badge {
  padding: 3px 7px;
  border: 1px solid #9aa6b2;
  background: #3b4650;
  color: #eef2f6;
}

.purchase-candidate-availability {
  padding: 2px 0;
  color: #b9d7e9;
}

.purchase-candidate-availability.soldout {
  color: #f1b5b5;
}

.purchase-candidate-availability.unknown,
.purchase-candidate-availability.failure {
  color: #ffd27a;
}

.purchase-candidate-availability.failure {
  padding: 3px 8px;
  border: 1px solid rgba(255, 181, 71, .58);
  background: rgba(116, 70, 8, .72);
}

.purchase-candidate-availability.stale {
  color: #ffca6b;
  font-weight: 900;
}

.candidate-row.inventory-unknown {
  border-color: rgba(255, 181, 71, .55);
  background: rgba(73, 51, 19, .55);
}

@media (max-width: 620px) {
  .purchase-candidate-availability-controls label {
    width: 100%;
    margin-left: 0;
  }
}

/* Stock v89: global search, aligned eBay audit, and duplicate-condition guard. */
.purchase-sticky-modebar {
  align-items: center;
}

.purchase-sticky-modebar .purchase-workflow-controls {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: center;
}

.purchase-sticky-modebar .purchase-workflow-mode,
.purchase-sticky-modebar .purchase-sync-panel,
.purchase-sticky-modebar .purchase-sync-panel > .purchase-collapsible-summary {
  box-sizing: border-box;
  min-height: 40px;
  height: 40px;
  margin-block: 0;
}

.purchase-sticky-modebar .purchase-workflow-mode,
.purchase-sticky-modebar .purchase-sync-panel {
  align-self: center;
}

.purchase-sticky-modebar .purchase-sync-panel {
  top: 0;
  bottom: auto;
}

.purchase-sticky-modebar .purchase-sync-panel > .purchase-collapsible-summary,
.purchase-sticky-modebar .purchase-sync-head,
.purchase-sticky-modebar .purchase-collapsible-summary::after {
  align-items: center;
  line-height: 1;
}

.purchase-sticky-modebar .purchase-collapsible-summary::after {
  display: inline-flex;
  justify-content: center;
  min-width: 18px;
  height: 18px;
}

.purchase-overview-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.purchase-overview-title-line .purchase-row-title {
  min-width: 0;
}

.purchase-workflow-classification-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid rgba(125, 207, 255, .45);
  border-radius: 999px;
  background: #174762;
  color: #e9f8ff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.purchase-workflow-classification-badge.replenish {
  border-color: rgba(70, 212, 141, .55);
  background: #14553d;
  color: #d9ffed;
}

.purchase-workflow-classification-badge.buy-now {
  border-color: rgba(53, 195, 255, .58);
  background: #0f5776;
}

.purchase-workflow-classification-badge.explore {
  border-color: rgba(245, 190, 72, .58);
  background: #614b0d;
  color: #fff1bd;
}

.purchase-workflow-classification-badge.other {
  border-color: rgba(166, 180, 194, .5);
  background: #344654;
  color: #edf4f8;
}

.purchase-workflow-classification-badge.inventory-unknown {
  border-color: rgba(255, 181, 71, .62);
  background: #704a0d;
  color: #fff2c7;
}

.purchase-workflow-inventory-unknown.active {
  border-color: #ffb547;
  background: linear-gradient(180deg, #704a0d, #4e350d);
  color: #fff2c7;
}

.purchase-duplicate-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: min(86vh, 780px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(96, 174, 221, .5);
  border-radius: 15px;
  background: #091f2e;
  color: #f4f9ff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .62);
}

.purchase-duplicate-dialog::backdrop {
  background: rgba(0, 10, 18, .76);
  backdrop-filter: blur(3px);
}

.purchase-duplicate-dialog-shell {
  display: grid;
  gap: 12px;
  max-height: min(86vh, 780px);
  padding: 16px;
  overflow: auto;
}

.purchase-duplicate-dialog-shell > header,
.purchase-duplicate-dialog-shell > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.purchase-duplicate-dialog-shell > header h2,
.purchase-duplicate-dialog-shell > header span,
.purchase-duplicate-dialog-shell > p {
  margin: 0;
}

.purchase-duplicate-dialog-shell > header h2 {
  font-size: 18px;
  line-height: 1.3;
}

.purchase-duplicate-kicker {
  color: #f3ca67;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.purchase-duplicate-warning-list,
.purchase-duplicate-audit-list {
  display: grid;
  gap: 8px;
}

.purchase-duplicate-warning-item,
.purchase-duplicate-group {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(245, 190, 72, .38);
  border-radius: 10px;
  background: rgba(65, 49, 13, .62);
}

.purchase-duplicate-warning-item span,
.purchase-duplicate-warning-item small,
.purchase-duplicate-group small {
  color: #c9dce8;
}

.purchase-duplicate-group legend {
  padding: 0 6px;
  color: #ffe3a0;
  font-weight: 900;
}

.purchase-duplicate-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(11, 36, 52, .78);
  cursor: pointer;
}

.purchase-duplicate-group label > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.purchase-duplicate-group input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-height: 0 !important;
}

.purchase-duplicate-group.is-invalid {
  border-color: #ff6b6b;
  background: rgba(112, 25, 32, .72);
  box-shadow: 0 0 0 2px rgba(224, 49, 49, .24);
}

.purchase-duplicate-group-error {
  margin: 4px 0 0;
  padding: 7px 8px;
  border-radius: 7px;
  background: rgba(39, 7, 10, .7);
  color: #ffd7d7;
  font-size: 11px;
  line-height: 1.45;
}

.purchase-duplicate-audit-warning {
  padding: 10px;
  border: 1px solid #ff6b6b;
  border-radius: 9px;
  background: rgba(112, 25, 32, .74);
  color: #fff1f1;
  line-height: 1.5;
}

.purchase-dialog-action-reason {
  flex: 1 1 220px;
  color: #ffd0d0;
  font-size: 11px;
  line-height: 1.35;
}

.secondary-btn.danger-outline,
.danger-outline {
  border-color: #e03131 !important;
  background: transparent !important;
  color: #ff9d9d !important;
}

.secondary-btn.danger-outline:hover:not(:disabled),
.danger-outline:hover:not(:disabled) {
  background: rgba(224, 49, 49, .15) !important;
}

.purchase-target-maintenance-dialog,
.purchase-jan-audit-dialog {
  width: min(980px, calc(100vw - 28px));
}

.purchase-target-maintenance-dialog details {
  padding: 9px;
  border: 1px solid rgba(96, 174, 221, .35);
  border-radius: 10px;
  background: rgba(7, 28, 42, .75);
}

.purchase-target-maintenance-dialog summary {
  margin-bottom: 8px;
  color: #e9f6ff;
  font-weight: 900;
  cursor: pointer;
}

.purchase-target-maintenance-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(96, 174, 221, .35);
  border-radius: 10px;
  background: rgba(7, 28, 42, .75);
}

.purchase-target-maintenance-filters label {
  display: grid;
  gap: 4px;
  color: #dcecf5;
  font-weight: 800;
}

.purchase-target-maintenance-filters select {
  min-width: 150px;
}

.purchase-target-maintenance-filters .purchase-target-maintenance-check {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 40px;
}

.purchase-target-maintenance-check input {
  width: 18px;
  height: 18px;
  min-height: 0 !important;
}

.purchase-target-limit-warning {
  display: block;
  color: #ffd8a8 !important;
  font-weight: 900;
  line-height: 1.35;
}

.purchase-target-maintenance-list,
.purchase-jan-audit-list,
.purchase-target-delete-preview {
  display: grid;
  gap: 7px;
  max-height: 48vh;
  margin-bottom: 9px;
  overflow: auto;
}

.purchase-target-maintenance-row,
.purchase-target-delete-item,
.purchase-jan-audit-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 9px;
  border: 1px solid rgba(96, 174, 221, .32);
  border-radius: 9px;
  background: rgba(12, 43, 61, .82);
}

.purchase-target-delete-item,
.purchase-jan-audit-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.purchase-target-maintenance-row > span,
.purchase-target-delete-item > div,
.purchase-jan-audit-item > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.purchase-target-maintenance-row small,
.purchase-target-delete-item small,
.purchase-jan-audit-item small {
  color: #bad3e2;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.purchase-target-maintenance-row input {
  width: 18px;
  height: 18px;
  min-height: 0 !important;
}

.purchase-target-delete-caution {
  padding: 10px;
  border: 1px solid rgba(224, 49, 49, .62);
  border-radius: 9px;
  background: rgba(91, 19, 24, .56);
  color: #ffe3e3;
}

.purchase-jan-audit-item.mismatch {
  border-color: #ff6b6b;
  background: rgba(98, 25, 31, .68);
}

.purchase-jan-audit-item.match {
  border-color: rgba(70, 212, 141, .52);
  background: rgba(18, 79, 56, .55);
}

.purchase-jan-audit-item.unknown {
  border-color: rgba(245, 190, 72, .55);
  background: rgba(85, 65, 17, .55);
}

.purchase-jan-audit-status {
  font-weight: 900;
}

.purchase-duplicate-audit-summary {
  color: #dcecf5;
  line-height: 1.45;
}

.purchase-duplicate-empty {
  padding: 20px;
  border: 1px dashed rgba(96, 174, 221, .4);
  border-radius: 10px;
  color: #b9d3e3;
  text-align: center;
}

@media (max-width: 1180px) {
  .purchase-sticky-modebar .purchase-workflow-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .purchase-sticky-modebar .purchase-workflow-mode,
  .purchase-sticky-modebar .purchase-sync-panel,
  .purchase-sticky-modebar .purchase-sync-panel > .purchase-collapsible-summary {
    height: 40px;
  }
}

@media (max-width: 760px) {
  .purchase-sticky-modebar .purchase-workflow-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-duplicate-dialog-shell > footer {
    align-items: stretch;
    flex-direction: column;
  }
}

/* v87: keep the ledger compact while giving the full management title all remaining width. */
@media (min-width: 1101px) {
  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-wrap,
  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-scroll {
    overflow-x: hidden !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel table.ledger-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-table th,
  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-table td {
    padding: 5px 6px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-table :is(th, td):nth-child(1) {
    width: 110px !important;
    min-width: 110px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-table :is(th, td):nth-child(2) {
    width: 100px !important;
    min-width: 100px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-table :is(th, td):nth-child(3) {
    width: 110px !important;
    min-width: 110px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-table :is(th, td):nth-child(4) {
    width: auto !important;
    min-width: 150px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-table :is(th, td):nth-child(5) {
    width: 90px !important;
    min-width: 90px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-table :is(th, td):nth-child(6) {
    width: 130px !important;
    min-width: 130px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-table :is(th, td):nth-child(7) {
    width: 85px !important;
    min-width: 85px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-table :is(th, td):nth-child(8) {
    width: 84px !important;
    min-width: 84px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-table :is(th, td):nth-child(9) {
    width: 240px !important;
    min-width: 240px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-date-input {
    width: 98px !important;
    min-width: 0 !important;
    max-width: 98px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-sku-input {
    width: 78px !important;
    min-width: 0 !important;
    max-width: 78px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-order-input {
    width: 108px !important;
    min-width: 0 !important;
    max-width: 108px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-price-input {
    width: 73px !important;
    min-width: 0 !important;
    max-width: 73px !important;
    text-align: right !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-purchase-place,
  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel td.ledger-title > strong {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel td.ledger-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 3px !important;
    width: 240px !important;
    min-width: 240px !important;
    padding: 5px 4px !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel td.ledger-actions .status-badge {
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 5px 8px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel td.ledger-actions button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 42px !important;
    min-height: 28px !important;
    margin: 0 !important;
    padding: 3px 6px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
  }
}

.ledger-maintenance-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #a9c9dc;
  border-radius: 18px;
  background: #fff;
  color: #102f44;
  box-shadow: 0 24px 70px rgb(15 42 61 / 28%);
}

.ledger-maintenance-dialog::backdrop {
  background: rgb(7 28 43 / 58%);
  backdrop-filter: blur(2px);
}

.ledger-maintenance-dialog-shell {
  display: grid;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.ledger-maintenance-dialog-shell > header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #d1e2ec;
  background: #f8fcfe;
}

.ledger-maintenance-dialog-shell > header h2 {
  margin: 0;
  font-size: 20px;
}

.ledger-maintenance-dialog-shell > header .icon-btn {
  flex: 0 0 auto;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
}

.ledger-maintenance-dialog .drive-photo-settings,
.ledger-maintenance-dialog .item-integrity-controls {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.ledger-maintenance-dialog .sync-url-label {
  display: grid;
  gap: 5px;
}

.ledger-maintenance-dialog .sync-url-label input {
  width: 100%;
  min-width: 0;
}

.ledger-maintenance-dialog .drive-photo-settings-actions,
.ledger-maintenance-dialog .item-integrity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ledger-maintenance-dialog .drive-photo-bulk-result,
.ledger-maintenance-dialog .item-integrity-status,
.ledger-maintenance-dialog .item-integrity-backup-status {
  margin: 0;
}

.ledger-maintenance-btn {
  white-space: nowrap;
}

#ledgerPanel .ledger-actions .ledger-clone {
  color: #075985 !important;
  border-color: #7dd3fc !important;
  background: #f0f9ff !important;
}

#ledgerPanel .ledger-actions .ledger-clone:hover {
  border-color: #0ea5e9 !important;
  background: #e0f2fe !important;
}

/* v134: shared File Exchange required-field failures, without extra columns or row height. */
#ledgerPanel #ledgerAgingSummary {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  white-space: nowrap;
}

#ledgerPanel .ledger-aging-totals {
  overflow: hidden;
  text-overflow: ellipsis;
}

#ledgerPanel .ledger-aging-totals-compact {
  display: none;
}

#ledgerPanel .ledger-aging-actions .ledger-required-filter {
  min-height: 26px;
  padding: 2px 7px;
  border-color: #dc2626;
  color: #991b1b;
  font-size: 12px;
}

#ledgerPanel .ledger-aging-actions .ledger-required-filter.active {
  background: #991b1b;
  color: #fff;
}

@media (max-width: 1180px) {
  #ledgerPanel .ledger-aging-totals-full {
    display: none;
  }

  #ledgerPanel .ledger-aging-totals-compact {
    display: inline;
  }
}

#ledgerPanel #listingLedger tr.ledger-missing-required > td {
  background-color: rgba(254, 226, 226, .72);
  background-image: repeating-linear-gradient(-45deg, rgba(220, 38, 38, .07) 0, rgba(220, 38, 38, .07) 4px, transparent 4px, transparent 9px);
  box-shadow: inset 0 1px rgba(220, 38, 38, .28), inset 0 -1px rgba(220, 38, 38, .28);
}

#ledgerPanel #listingLedger .ledger-status-badge.is-listing-incomplete {
  position: relative;
}

#ledgerPanel #listingLedger .ledger-status-badge.is-listing-incomplete::before {
  content: "⚠";
  position: absolute;
  top: -6px;
  left: -5px;
  color: #991b1b;
  font-size: 11px;
  line-height: 1;
  text-shadow: 0 0 2px #fff;
}

.purchase-overview-card {
  display: flex;
  height: 100%;
  min-height: 0;
  padding: 9px 10px;
  border: 1px solid rgba(108, 179, 220, .34);
  border-radius: 11px;
  background: #10283a;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.purchase-overview-card:hover,
.purchase-overview-card:focus-visible {
  border-color: #55d7ff;
  background: #15354b;
  transform: translateY(-1px);
  outline: none;
}

/* v88: compact ledger status/actions and emphasize the primary edit action. */
@media (min-width: 1101px) {
  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-table :is(th, td):nth-child(9) {
    width: 198px !important;
    min-width: 198px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-table :is(th, td):nth-child(8) {
    padding-right: 1px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel td.ledger-row-controls {
    gap: 2px !important;
    width: 198px !important;
    min-width: 198px !important;
    padding: 5px 1px 5px 0 !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel td.ledger-row-controls .ledger-status-badge {
    box-sizing: border-box !important;
    flex: 0 0 48px !important;
    width: 48px !important;
    min-width: 48px !important;
    margin: 0 !important;
    padding: 5px 3px !important;
    overflow: hidden !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel td.ledger-row-controls button {
    min-width: 42px !important;
    min-height: 28px !important;
    padding: 3px 5px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel td.ledger-row-controls .ledger-edit {
    min-width: 50px !important;
    min-height: 30px !important;
    border-color: #075985 !important;
    background: #075985 !important;
    color: #fff !important;
    font-weight: 800 !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel td.ledger-row-controls .ledger-edit:hover,
  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel td.ledger-row-controls .ledger-edit:focus-visible {
    border-color: #0c4a6e !important;
    background: #0c4a6e !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel td.ledger-row-controls .ledger-clone {
    border-color: #7dd3fc !important;
    background: #f0f9ff !important;
    color: #075985 !important;
    font-weight: 700 !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel td.ledger-row-controls .ledger-delete {
    border-color: #ef4444 !important;
    background: #fff !important;
    color: #b91c1c !important;
    font-weight: 700 !important;
  }
}

.purchase-overview-card.no-within-limit {
  border-color: rgba(133, 151, 164, .32);
  background: #172632;
  filter: saturate(.45);
  opacity: .68;
}

.purchase-overview-card.is-priority-price-band:not(.is-strategy-excluded) {
  border-color: rgba(56, 220, 157, .78);
  background: linear-gradient(145deg, rgba(14, 76, 59, .72), #10283a 58%);
  box-shadow: inset 0 0 0 1px rgba(56, 220, 157, .16);
}

.purchase-overview-card.is-strategy-excluded {
  border-color: rgba(139, 154, 164, .36);
  background: #25313a;
  filter: saturate(.32);
  opacity: .72;
}

.purchase-overview-card.has-stagnation-risk:not(.is-strategy-excluded) {
  border-bottom-color: rgba(245, 190, 72, .82);
}

.purchase-overview-card .purchase-row-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 6px;
  min-width: 0;
  width: 100%;
  height: 100%;
  align-content: start;
}

.purchase-overview-card .purchase-row-title {
  min-width: 0;
  overflow: hidden;
  color: #f6fbff;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-overview-limit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid rgba(88, 218, 154, .48);
  border-radius: 999px;
  background: rgba(20, 99, 66, .82);
  color: #d9ffeb;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.purchase-overview-limit-badge.no-stock {
  border-color: rgba(239, 185, 64, .52);
  background: rgba(94, 66, 10, .86);
  color: #ffe8a8;
}

.purchase-decision-strip,
.purchase-overview-evidence,
.purchase-overview-availability,
.purchase-overview-prices,
.purchase-overview-colors,
.purchase-turnover-indicator {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  color: #bed5e4;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-decision-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 29px;
  padding: 2px 7px;
  border: 1px solid rgba(132, 166, 186, .34);
  border-radius: 8px;
  background: rgba(8, 25, 37, .58);
  overflow: visible;
  flex-wrap: wrap;
}

.purchase-decision-stock,
.purchase-decision-recommendation {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  color: #d8e6ee;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

button.purchase-decision-stock {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

button.purchase-decision-stock:hover,
button.purchase-decision-stock:focus-visible {
  color: #7bd9ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.purchase-decision-stock strong,
.purchase-decision-recommendation strong {
  color: #fff;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.05;
}

.purchase-decision-arrow {
  flex: 0 0 auto;
  color: #8eb0c3;
  font-size: 15px;
  font-weight: 900;
}

.purchase-decision-strip.needs-purchase {
  border-color: rgba(78, 225, 157, .58);
  background: linear-gradient(90deg, rgba(8, 30, 39, .72), rgba(10, 79, 53, .72));
}

.purchase-decision-strip.needs-purchase .purchase-decision-recommendation,
.purchase-decision-strip.needs-purchase .purchase-decision-recommendation strong {
  color: #73f0ad;
}

.purchase-decision-strip.is-sufficient {
  border-color: rgba(133, 151, 164, .28);
  background: rgba(34, 48, 58, .55);
}

.purchase-decision-strip.is-sufficient .purchase-decision-recommendation,
.purchase-decision-strip.is-sufficient .purchase-decision-recommendation strong {
  color: #9eacb5;
}

.purchase-decision-strip.is-insufficient-sales {
  border-color: rgba(239, 185, 64, .46);
  background: rgba(72, 55, 22, .54);
}

.purchase-decision-strip.is-insufficient-sales .purchase-decision-recommendation,
.purchase-decision-strip.is-insufficient-sales .purchase-decision-recommendation strong {
  color: #ffd58a;
}

.purchase-decision-caution {
  min-width: 0;
  overflow: hidden;
  color: #ffd47f;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-overview-evidence {
  color: #d6e9f4;
  font-size: 11px;
}

.purchase-overview-evidence strong {
  color: #f5fbff;
  font-size: 12px;
}

.purchase-open-sold-matches {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f5fbff;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: rgba(117, 210, 255, .58);
  text-underline-offset: 2px;
  cursor: pointer;
}

.purchase-open-sold-matches:hover,
.purchase-open-sold-matches:focus-visible {
  color: #7bd9ff;
}

.purchase-overview-availability {
  color: #aebfca;
  font-size: 10px;
}

.purchase-overview-availability .purchase-overview-limit-badge {
  min-height: 0;
  padding: 1px 5px;
  font-size: 10px;
  line-height: 1.15;
}

.purchase-overview-prices {
  color: #ecf8ff;
}

.purchase-overview-colors {
  color: #cbd8ff;
  font-size: 9px;
}

.purchase-overview-colors > span {
  display: inline-block;
}

.purchase-overview-colors .is-primary,
.purchase-color-detail .is-primary {
  color: #f5fbff;
  font-weight: 900;
}

.purchase-overview-colors .is-reference,
.purchase-color-detail .is-reference {
  opacity: .78;
}

.purchase-overview-colors .is-unknown,
.purchase-color-detail .is-unknown {
  color: #ffd487;
  opacity: 1;
}

.purchase-strategy-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.purchase-overview-card .purchase-strategy-badges {
  grid-column: 1 / -1;
}

.purchase-strategy-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  max-width: 100%;
  padding: 2px 7px;
  border: 1px solid rgba(135, 176, 203, .42);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
}

.purchase-strategy-badge.priority {
  border-color: rgba(65, 224, 158, .68);
  background: rgba(14, 105, 70, .88);
  color: #d9ffed;
}

.purchase-strategy-badge.excluded {
  border-color: rgba(157, 172, 182, .5);
  background: rgba(65, 77, 86, .9);
  color: #e0e7eb;
}

.purchase-strategy-badge.stagnation,
.purchase-turnover-indicator.warning {
  border-color: rgba(245, 190, 72, .62);
  background: rgba(93, 61, 9, .88);
  color: #ffe3a0;
}

.purchase-strategy-badge.stagnation {
  border-radius: 999px;
  white-space: nowrap;
}

.purchase-decision-strip .purchase-overview-inventory-unknown-badge {
  grid-column: auto;
  flex: 0 0 auto;
  justify-self: auto;
  margin-left: auto;
  padding: 2px 6px;
  line-height: 1.1;
}

.purchase-strategy-badge.inventory-contradiction {
  border-color: rgba(255, 132, 110, .72);
  background: rgba(111, 34, 30, .9);
  color: #ffe0da;
}

.purchase-turnover-indicator {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  padding: 2px 7px;
  border: 1px solid rgba(89, 196, 149, .36);
  border-radius: 999px;
  background: rgba(18, 75, 55, .7);
  color: #c9f9df;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.purchase-overview-evidence .purchase-turnover-indicator.compact {
  display: inline;
  width: auto;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  white-space: nowrap;
}

.purchase-overview-evidence .purchase-turnover-indicator.compact.warning {
  color: #ffd47f;
}

.purchase-turnover-indicator.unavailable {
  border-color: rgba(135, 151, 163, .34);
  background: rgba(55, 69, 79, .68);
  color: #b9c7d0;
}

.purchase-selected-group-card > .purchase-strategy-badges,
.purchase-selected-group-card > .purchase-turnover-indicator {
  width: fit-content;
}

.purchase-color-detail,
.purchase-sold-price-detail,
.purchase-stock-match-breakdown,
.purchase-sold-match-breakdown,
.purchase-target-conditions-detail {
  padding: 7px 8px;
  border: 1px solid rgba(112, 176, 214, .26);
  border-radius: 8px;
  background: rgba(6, 28, 42, .58);
  color: #d8ebf6;
  font-size: 10px;
}

.purchase-color-detail > summary,
.purchase-sold-price-detail > summary,
.purchase-stock-match-breakdown > summary,
.purchase-sold-match-breakdown > summary,
.purchase-target-conditions-detail > summary {
  color: #e8f5fc;
  font-weight: 900;
  cursor: pointer;
}

.purchase-sold-price-detail .purchase-sold-price-summary,
.purchase-sold-price-detail .purchase-selected-counts {
  display: block;
  margin-top: 6px;
}

.purchase-selected-prices {
  color: #f5fbff;
  font-size: 12px;
  font-weight: 900;
}

.purchase-color-detail ul,
.purchase-stock-match-breakdown ul,
.purchase-sold-match-breakdown ul,
.purchase-target-conditions-detail ul {
  display: grid;
  gap: 3px;
  margin: 5px 0 0;
  padding-left: 18px;
}

.purchase-stock-match-breakdown li,
.purchase-sold-match-breakdown li {
  display: grid;
  grid-template-columns: minmax(64px, auto) minmax(60px, auto) minmax(78px, auto) minmax(0, 1fr);
  gap: 4px 8px;
  align-items: baseline;
  min-width: 0;
}

.purchase-stock-match-breakdown li {
  grid-template-columns: minmax(64px, auto) minmax(72px, auto) minmax(0, 1fr);
}

.purchase-stock-match-title,
.purchase-sold-match-title {
  min-width: 0;
  overflow: hidden;
  color: #d8ebf6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .purchase-stock-match-breakdown li,
  .purchase-sold-match-breakdown li {
    grid-template-columns: auto auto auto;
  }

  .purchase-stock-match-title,
  .purchase-sold-match-title {
    grid-column: 1 / -1;
  }
}

.purchase-unknown-model-notice {
  margin: 5px 0;
  padding: 6px 9px;
  border: 1px solid rgba(245, 190, 72, .58);
  border-radius: 8px;
  background: rgba(83, 56, 13, .72);
  color: #ffe3a0;
  font-size: 11px;
}

.purchase-unknown-model-notice summary {
  cursor: pointer;
  font-weight: 900;
}

.purchase-unknown-model-notice summary span {
  margin-left: 6px;
  text-decoration: underline;
}

.purchase-unknown-model-notice ul {
  display: grid;
  gap: 3px;
  max-height: 260px;
  margin: 7px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.purchase-unknown-model-notice button {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  min-height: 0;
  padding: 3px 5px;
  border: 0;
  background: rgba(4, 24, 37, .52);
  color: #e7f5ff;
  text-align: left;
  cursor: pointer;
}

.purchase-unknown-model-notice button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-color-detail li > span {
  display: inline-flex;
  margin-right: 4px;
  padding: 1px 5px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 9px;
}

.purchase-unknown-color-items {
  display: grid;
  gap: 3px;
  margin-top: 5px;
}

.purchase-open-unknown-item {
  width: 100%;
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 212, 135, .58);
  border-radius: 6px;
  background: rgba(76, 54, 18, .72);
  color: #fff0c7;
  font-size: 10px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.purchase-open-unknown-item:hover {
  border-color: #ffd487;
  background: rgba(106, 73, 17, .92);
}

.purchase-form-summary .purchase-new-condition-btn {
  border-color: #9adfff;
  background: #eaf8ff;
  color: #09273b;
  font-weight: 900;
}

.purchase-form-summary .purchase-new-condition-btn:hover:not(:disabled) {
  background: #fff;
  color: #041925;
}

.purchase-form-summary .purchase-new-condition-btn:disabled {
  border-color: #405360;
  background: #263641;
  color: #93a6b2;
  cursor: not-allowed;
  opacity: 1;
}

.purchase-form-panel > .purchase-form-summary {
  min-height: 38px;
  padding: 6px 10px;
}

.purchase-form-summary-title {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  min-width: 0;
}

.purchase-form-summary-title > strong {
  font-size: 14px;
  white-space: nowrap;
}

.purchase-form-summary .purchase-form-mode {
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 3px 7px;
  border: 1px solid rgba(138, 181, 210, .38);
  border-radius: 999px;
  background: rgba(32, 58, 76, .9);
  color: #d9eaf5;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.purchase-form-summary .purchase-form-mode.is-unregistered {
  border-color: rgba(239, 185, 64, .58);
  background: rgba(94, 66, 10, .9);
  color: #ffe8a8;
}

.purchase-form-panel:has(.purchase-form-mode.is-unregistered) > .purchase-form-summary {
  background: rgba(80, 57, 11, .42);
}

.purchase-form-panel .purchase-form-collapsible-body {
  gap: 5px;
  padding: 0 9px 8px;
}

.purchase-compact-form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.purchase-compact-form-grid label {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: #d9ebf7;
  font-size: 9px;
  font-weight: 800;
}

.purchase-compact-form-grid label > span {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-compact-form-grid label > span > b {
  flex: 0 0 auto;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(45, 112, 151, .66);
  color: #dff5ff;
  font-size: 8px;
}

.purchase-compact-form-grid label > span > i {
  color: #ff6969;
  font-size: 11px;
  font-style: normal;
}

.purchase-compact-form-grid label > span > small {
  color: #88a9be;
  font-size: 8px;
}

.purchase-compact-form-grid input {
  width: 100%;
  min-width: 0;
  min-height: 29px;
  padding: 4px 6px;
  font-size: 11px;
}

.purchase-compact-form-grid .purchase-field-model {
  grid-column: span 2;
}

.purchase-compact-form-grid .purchase-field-url {
  grid-column: span 3;
}

.purchase-form-panel .purchase-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.purchase-form-panel .purchase-form-actions button {
  min-height: 29px;
  padding: 4px 8px;
  font-size: 10px;
}

.purchase-form-panel .purchase-quick-update-reason {
  flex: 1 1 280px;
  min-width: 0;
  padding: 4px 7px;
}

.purchase-detail-mode .purchase-compact-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.purchase-detail-mode .purchase-compact-form-grid .purchase-field-model {
  grid-column: span 1;
}

.purchase-detail-mode .purchase-compact-form-grid .purchase-field-url {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .purchase-sticky-modebar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .purchase-sticky-modebar .purchase-workflow-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-sticky-modebar .purchase-workflow-mode {
    min-height: 34px;
    padding: 4px 5px;
    font-size: 10px;
  }

  .purchase-detail-mode {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "aside"
      "list";
  }

  .purchase-detail-mode .purchase-detail-aside {
    position: relative;
    top: auto;
    max-height: calc(100dvh - 250px);
    overflow: hidden;
  }

  .purchase-detail-mode .purchase-compact-form-grid,
  .purchase-compact-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .purchase-detail-mode .purchase-compact-form-grid .purchase-field-model,
  .purchase-detail-mode .purchase-compact-form-grid .purchase-field-url,
  .purchase-compact-form-grid .purchase-field-model,
  .purchase-compact-form-grid .purchase-field-url {
    grid-column: auto;
  }

  .purchase-form-summary-actions {
    width: auto;
  }

  .purchase-form-summary .purchase-new-condition-btn {
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 620px) {
  .purchase-sticky-modebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .purchase-sticky-modebar .purchase-sync-panel {
    width: 100%;
  }

  .purchase-sticky-modebar .purchase-sync-panel > .purchase-collapsible-summary {
    justify-content: center;
  }

  .purchase-sticky-modebar .purchase-sync-panel > .purchase-sync-collapsible-body {
    right: auto;
    left: 0;
    width: calc(100vw - 24px);
  }

  .purchase-list-mode .purchase-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Listing header: shared compact one-line specification. */
body:not(.home-mode):not(.purchase-mode) .hero-panel {
  box-sizing: border-box;
  min-height: 0 !important;
  padding: 12px 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 16px !important;
}

body:not(.home-mode):not(.purchase-mode) .listing-header-title {
  flex: 0 0 auto;
  margin: 0 !important;
  max-width: none !important;
  color: #ffffff;
  font-size: 26px !important;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2 !important;
  white-space: nowrap;
}

body:not(.home-mode):not(.purchase-mode) .listing-header-title-prefix {
  color: rgba(255, 255, 255, 0.62);
  font-weight: 300;
}

body:not(.home-mode):not(.purchase-mode) .listing-header-title-main {
  color: #ffffff;
  font-weight: 700;
}

body:not(.home-mode):not(.purchase-mode) .hero-actions {
  flex: 0 1 auto;
  width: auto !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
}

body:not(.home-mode):not(.purchase-mode) .hero-actions .primary-pill,
body:not(.home-mode):not(.purchase-mode) .hero-actions .outline-pill {
  width: auto !important;
  min-width: 0 !important;
  min-height: 32px !important;
  padding: 6px 12px !important;
}

/* Stock compact header, explicit search, and detail navigation */
body.purchase-mode .purchase-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px !important;
}

.purchase-hero-title {
  min-width: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: nowrap;
}

.purchase-hero-title strong {
  color: #fff;
  font-weight: 700;
}

body.purchase-mode .purchase-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.purchase-search-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 36px 36px;
  align-items: center;
  gap: 5px;
}

.purchase-search-actions .purchase-search-submit,
.purchase-search-actions .purchase-search-clear {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

.purchase-detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  min-width: 0;
}

.purchase-detail-nav .purchase-back-to-products {
  flex: 0 0 auto;
  margin: 0;
}

.purchase-detail-nav .purchase-candidate-availability-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.purchase-detail-nav .purchase-candidate-availability-controls[hidden] {
  display: none;
}

.purchase-detail-nav .purchase-candidate-availability-controls label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  white-space: nowrap;
}

.purchase-mall-chip.purchase-mall-known .purchase-mall-price {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.purchase-mall-chip.purchase-mall-known.limit-within .purchase-mall-price {
  color: #6ee7a2;
}

.purchase-mall-chip.purchase-mall-known.limit-over .purchase-mall-price {
  color: #ff7474;
}

@media (max-width: 620px) {
  body.purchase-mode .purchase-hero-actions {
    gap: 5px;
  }

  body.purchase-mode .purchase-hero-actions .home-primary-btn,
  body.purchase-mode .purchase-hero-actions .home-secondary-btn {
    min-width: 0;
    padding-inline: 9px;
  }

  .purchase-detail-nav {
    align-items: flex-start;
    overflow-x: auto;
  }
}

/* Stock v126 final cascade override. */
body.purchase-mode .purchase-list-mode > .purchase-form-panel:not([open]) { display: none !important; }
body.purchase-mode .purchase-list-panel { display: block !important; padding: 9px 12px 12px; }
body.purchase-mode .purchase-list-panel .purchase-primary-toolbar {
  display: grid !important;
  grid-template-columns: minmax(360px, 1fr) auto auto auto;
  align-items: center !important;
  gap: 7px;
  margin: 0 0 6px;
}
body.purchase-mode .purchase-list-panel .purchase-primary-toolbar > * { min-width: 0; }
body.purchase-mode .purchase-list-panel .purchase-primary-toolbar > #purchasePanelTitle { display: none !important; }
body.purchase-mode .purchase-list-panel .purchase-panel-search {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 100%;
  min-width: 0;
  flex: none;
}
body.purchase-mode .purchase-list-panel .purchase-search-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 30px;
  gap: 5px;
}
body.purchase-mode .purchase-list-panel .purchase-search-field input {
  min-height: 42px;
  padding: 8px 13px;
  border: 2px solid #27b3e2;
  border-radius: 11px;
  background: #f8fdff;
  color: #082438;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 0 0 3px rgba(39, 179, 226, .12);
}
body.purchase-mode .purchase-list-panel .purchase-search-field input:focus {
  border-color: #55d7ff;
  box-shadow: 0 0 0 4px rgba(39, 179, 226, .23);
  outline: none;
}
body.purchase-mode .purchase-list-panel .purchase-search-submit,
body.purchase-mode .purchase-list-panel .purchase-search-clear { min-width: 0; min-height: 42px; padding: 0; }
body.purchase-mode .purchase-list-panel .purchase-catalog-tabs-compact {
  grid-column: 2 !important;
  grid-row: 1 !important;
  margin: 0;
  padding: 3px;
  white-space: nowrap;
}
body.purchase-mode .purchase-list-panel .purchase-catalog-tabs-compact .purchase-catalog-tab { min-height: 34px; padding: 5px 9px; }
body.purchase-mode .purchase-list-panel .purchase-stock-refresh-controls {
  grid-column: 3 !important;
  grid-row: 1 !important;
  display: inline-grid;
  grid-template-columns: minmax(0, auto) auto;
  align-items: center;
  gap: 5px;
  max-width: 205px;
  white-space: nowrap;
}
body.purchase-mode .purchase-list-panel #purchaseStockAggregationStatus {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.purchase-mode .purchase-list-panel .purchase-stock-refresh-controls button,
body.purchase-mode .purchase-list-panel .purchase-new-condition-btn { min-height: 38px; padding: 6px 10px; white-space: nowrap; }
body.purchase-mode .purchase-list-panel .purchase-new-condition-btn { grid-column: 4 !important; grid-row: 1 !important; }
body.purchase-mode .purchase-list-panel .purchase-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px 12px;
  margin: 0 0 7px;
  padding: 5px 7px;
  border-radius: 10px;
}
body.purchase-mode .purchase-list-panel .purchase-workflow-summary,
body.purchase-mode .purchase-list-panel .purchase-scope-notice { display: none !important; }
body.purchase-mode .purchase-list-panel .purchase-advanced-filter-panel:not([hidden]) { grid-column: 1 / -1; }
body.purchase-mode .purchase-list-panel .purchase-utility-row {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
}
body.purchase-mode .purchase-list-panel .purchase-utility-row > details {
  position: relative;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
body.purchase-mode .purchase-list-panel .purchase-utility-row > details > summary {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border: 1px solid rgba(120, 177, 215, .38);
  border-radius: 7px;
  background: rgba(16, 43, 61, .88);
  color: #d9edf9;
  font-size: 10px;
  line-height: 1.1;
  white-space: nowrap;
}
body.purchase-mode .purchase-list-panel .purchase-utility-row > details[open] {
  z-index: 50;
  padding: 7px;
  border: 1px solid rgba(96, 174, 221, .42);
  border-radius: 10px;
  background: #0b2536;
}
body.purchase-mode .purchase-list-panel .purchase-filter-summary {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #d8eaf5;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.purchase-mode .purchase-list-panel .purchase-status-legend {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 3px;
  margin: 0 0 0 3px;
}
body.purchase-mode .purchase-list-panel .purchase-status-legend button { min-width: 25px; min-height: 22px; padding: 2px 5px; font-size: 9px; }

@media (max-width: 1050px) {
  body.purchase-mode .purchase-list-panel .purchase-primary-toolbar { grid-template-columns: minmax(280px, 1fr) auto auto; }
  body.purchase-mode .purchase-list-panel .purchase-stock-refresh-controls { grid-column: 2 !important; grid-row: 1 !important; }
  body.purchase-mode .purchase-list-panel .purchase-new-condition-btn { grid-column: 3 !important; grid-row: 1 !important; }
  body.purchase-mode .purchase-list-panel .purchase-catalog-tabs-compact { grid-column: 2 / 4 !important; grid-row: 2 !important; justify-self: end; }
}

@media (max-width: 720px) {
  body.purchase-mode .purchase-list-panel .purchase-primary-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  body.purchase-mode .purchase-list-panel .purchase-panel-search { grid-column: 1 / -1 !important; grid-row: 1 !important; }
  body.purchase-mode .purchase-list-panel .purchase-catalog-tabs-compact { grid-column: 1 !important; grid-row: 2 !important; justify-self: start; }
  body.purchase-mode .purchase-list-panel .purchase-stock-refresh-controls { grid-column: 1 !important; grid-row: 3 !important; max-width: min(100%, 230px); }
  body.purchase-mode .purchase-list-panel .purchase-new-condition-btn { grid-column: 2 !important; grid-row: 3 !important; }
  body.purchase-mode .purchase-list-panel .purchase-search-panel { grid-template-columns: minmax(0, 1fr); }
  body.purchase-mode .purchase-list-panel .purchase-filter-summary,
  body.purchase-mode .purchase-list-panel .purchase-utility-row { grid-column: 1; grid-row: auto; }
  body.purchase-mode .purchase-list-panel .purchase-utility-row { justify-content: flex-start; flex-wrap: wrap; }
}

/* Stock v128 final cascade override. */
.purchase-sticky-modebar .purchase-workflow-controls {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
body.purchase-mode .purchase-list-panel .purchase-search-field input {
  color: #082438 !important;
  caret-color: #082438 !important;
}
body.purchase-mode .purchase-list-panel .purchase-search-field input::placeholder {
  color: #496579 !important;
  opacity: 1 !important;
}
body.purchase-mode .purchase-list-panel #purchaseStockAggregationStatus {
  color: #f2f8fc !important;
  font-weight: 900;
}
.purchase-stock-filter-controls[hidden] {
  display: none !important;
}
.purchase-overview-card .purchase-other-reason-badges {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 4px;
  overflow: visible;
}
@media (max-width: 1180px) {
  .purchase-sticky-modebar .purchase-workflow-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 760px) {
  .purchase-sticky-modebar .purchase-workflow-controls {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Shipping declaration: editable HS master and sold-item copy panel. */
.customs-item-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #bfd7e5;
  border-radius: 14px;
  background: #f7fbfd;
}

.customs-item-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.customs-item-panel-head h4,
.customs-item-panel-head p {
  margin: 0;
}

.customs-item-panel-head p {
  color: #536f80;
  font-size: 12px;
}

.customs-item-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) minmax(180px, 1fr) minmax(150px, .8fr) minmax(150px, .8fr);
  gap: 10px;
}

.customs-item-grid label {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.customs-item-grid input,
.customs-item-grid select {
  width: 100%;
  min-width: 0;
}

.customs-item-grid small {
  color: #9a3412;
  font-size: 11px;
}

.customs-declaration-name-field,
.customs-hs-evidence-field {
  grid-column: span 2;
}

.hs-code-master-dialog {
  width: min(1080px, calc(100vw - 32px));
}

.hs-code-master-controls {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.hs-code-master-controls > p {
  margin: 0;
  color: #405f73;
}

.hs-code-master-table-wrap {
  overflow: auto;
  border: 1px solid #c9dce7;
  border-radius: 10px;
}

.hs-code-master-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
}

.hs-code-master-table th,
.hs-code-master-table td {
  padding: 8px;
  border-bottom: 1px solid #dce8ef;
  text-align: left;
  vertical-align: middle;
}

.hs-code-master-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf6fa;
  font-size: 12px;
  white-space: nowrap;
}

.hs-code-master-table tbody th {
  min-width: 180px;
  font-size: 12px;
  white-space: nowrap;
}

.hs-code-master-table input,
.hs-code-master-table select {
  width: 100%;
  min-width: 115px;
}

.hs-code-master-table [data-hs-master-field="evidence"],
.hs-code-master-table [data-hs-master-field="notes"] {
  min-width: 210px;
}

.hs-code-master-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hs-code-master-actions small {
  min-width: 0;
  overflow: hidden;
  color: #607c8d;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-declaration-dialog {
  width: min(700px, calc(100vw - 24px));
}

.shipment-declaration-content {
  display: grid;
  gap: 0;
  padding: 14px 16px 16px;
}

.shipment-declaration-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 0;
  border-bottom: 1px solid #e0e9ee;
}

.shipment-declaration-row > span,
.shipment-declaration-row > label {
  color: #486576;
  font-size: 13px;
  font-weight: 700;
}

.shipment-declaration-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #102f44;
  font-size: 16px;
}

.shipment-declaration-row .secondary-btn {
  min-height: 30px;
  padding: 4px 9px;
}

.shipment-declaration-name-row {
  align-items: start;
}

.shipment-declaration-name-row > div {
  display: grid;
  gap: 4px;
}

.shipment-declaration-name-row textarea {
  width: 100%;
  min-height: 62px;
  resize: vertical;
}

.shipment-declaration-name-row small {
  color: #617b8b;
  text-align: right;
}

.shipment-declaration-name-actions {
  display: flex;
  justify-content: flex-end;
  padding: 6px 0;
}

.shipment-packing-option {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 8px 0 0 160px;
  color: #405f73;
  font-size: 12px;
}

.shipment-packing-option input {
  width: auto;
}

.shipment-field-warning,
.shipment-field-status {
  margin: 4px 0 6px 160px;
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
}

.shipment-field-status.is-verified {
  color: #166534;
}

.shipment-declaration-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 14px;
}

#ledgerPanel .ledger-actions .ledger-shipment-info {
  flex: 0 0 54px !important;
  width: 54px !important;
  min-width: 54px !important;
  min-height: 28px !important;
  padding: 3px 2px !important;
  border-color: #0d9488 !important;
  background: #ecfdf5 !important;
  color: #0f766e !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

#ledgerPanel .ledger-actions .ledger-shipment-info:hover,
#ledgerPanel .ledger-actions .ledger-shipment-info:focus-visible {
  border-color: #0f766e !important;
  background: #d1fae5 !important;
}

@media (max-width: 980px) {
  .customs-item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .customs-item-panel-head {
    display: grid;
  }

  .customs-item-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .customs-declaration-name-field,
  .customs-hs-evidence-field {
    grid-column: auto;
  }

  .shipment-declaration-row {
    grid-template-columns: 100px minmax(0, 1fr) auto;
    gap: 7px;
  }

  .shipment-packing-option,
  .shipment-field-warning,
  .shipment-field-status {
    margin-left: 0;
  }
}

/* ===== 2026-09-24 仕入管理の一覧（2列・仕入先ボタンのブランド色・その場で開く設定） ===== */
/* 1ページに多く並べるため2列。狭い画面では1列に戻す */
.purchase-list {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: start;
}

@media (max-width: 1180px) {
  .purchase-list {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* 分類タブは5つを1行に（stickyバー側の4列・6列指定より後から上書きする） */
.purchase-workflow-controls,
.purchase-sticky-modebar .purchase-workflow-controls {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

.purchase-workflow-mode {
  min-height: 38px !important;
  padding: 4px 6px !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
}

.purchase-workflow-mode small {
  display: none !important;
}

/* 分類バッジ「1. 在庫あり」 */
.purchase-workflow-classification-badge.stocked {
  border-color: rgba(52, 211, 153, .55);
  background: rgba(16, 185, 129, .16);
  color: #6ee7b7;
}

/* 仕入先ボタンと設定パネルは、カードの2列レイアウトの中で横いっぱいに置く */
.purchase-overview-card .purchase-overview-shop-links,
.purchase-overview-card .purchase-inline-settings {
  grid-column: 1 / -1 !important;
}

/* 仕入先ボタンは同じ幅の小さなボタンにそろえる */
body.purchase-mode .purchase-overview-shop-links,
.purchase-overview-shop-links {
  display: grid !important;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 3px;
  margin-top: 6px;
  overflow: visible;
}

body.purchase-mode .purchase-overview-shop-links .purchase-shop-btn,
.purchase-overview-shop-links .purchase-shop-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 22px !important;
  padding: 2px 3px !important;
  border-radius: 5px !important;
  border: 1px solid transparent;
  font-size: 10.5px !important;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: none !important;
}

/* 仕入先ごとの色（既定の赤い直リンク色より優先する） */
body.purchase-mode .purchase-row-actions a.purchase-direct-link.purchase-shop-kitamura,
.purchase-shop-btn.purchase-shop-kitamura { background: #c8161d !important; border-color: #e35b60 !important; color: #fff !important; }
body.purchase-mode .purchase-row-actions a.purchase-direct-link.purchase-shop-rakuten,
.purchase-shop-btn.purchase-shop-rakuten { background: #fff !important; border-color: #bf0000 !important; color: #bf0000 !important; }
body.purchase-mode .purchase-row-actions a.purchase-direct-link.purchase-shop-yahoo,
.purchase-shop-btn.purchase-shop-yahoo { background: #ff0033 !important; border-color: #ff5c7a !important; color: #fff !important; }
body.purchase-mode .purchase-row-actions a.purchase-direct-link.purchase-shop-map,
.purchase-shop-btn.purchase-shop-map { background: #15181c !important; border-color: #5c666f !important; color: #fff !important; }
body.purchase-mode .purchase-row-actions a.purchase-direct-link.purchase-shop-fujiya,
.purchase-shop-btn.purchase-shop-fujiya { background: #0b4ea2 !important; border-color: #4b8bd6 !important; color: #fff !important; }
body.purchase-mode .purchase-row-actions a.purchase-direct-link.purchase-shop-mercari,
.purchase-shop-btn.purchase-shop-mercari { background: #e4332e !important; border-color: #f07c78 !important; color: #fff !important; }
body.purchase-mode .purchase-row-actions a.purchase-direct-link.purchase-shop-ebay,
.purchase-shop-btn.purchase-shop-ebay { background: #fff !important; border-color: #0064d2 !important; color: #0064d2 !important; }
body.purchase-mode .purchase-overview-shop-links .purchase-shop-settings,
.purchase-shop-btn.purchase-shop-settings { background: transparent !important; border-color: #4d7f9c !important; color: #9ed3ef !important; }
body.purchase-mode .purchase-overview-shop-links .purchase-product-link-disabled,
.purchase-overview-shop-links .purchase-product-link-disabled { opacity: .5 !important; filter: grayscale(.5); }

/* 自動で出し直した仕入上限 */
.purchase-auto-ceiling {
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(110, 231, 183, .45);
  background: rgba(16, 185, 129, .12);
  color: #6ee7b7;
  font-size: 11px;
  white-space: nowrap;
}

.purchase-auto-ceiling.is-lower {
  border-color: rgba(252, 165, 165, .5);
  background: rgba(239, 68, 68, .12);
  color: #fca5a5;
}

/* カードの中で開く設定パネル */
.purchase-inline-settings {
  margin-top: 7px;
  padding: 8px;
  border: 1px dashed rgba(110, 190, 235, .45);
  border-radius: 9px;
  background: rgba(8, 26, 38, .75);
  cursor: default;
}

.purchase-inline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.purchase-inline-field {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.purchase-inline-field span {
  font-size: 10.5px;
  color: #9fc0d2;
}

.purchase-inline-field input,
.purchase-inline-field select {
  min-height: 26px;
  padding: 2px 6px;
  border: 1px solid #2b5d78;
  border-radius: 6px;
  background: #0b2230;
  color: #eaf4fa;
  font-size: 12px;
}

.purchase-inline-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  flex-wrap: wrap;
}

.purchase-inline-note {
  flex: 1;
  min-width: 140px;
  font-size: 10.5px;
  color: #7fa0b3;
}

.purchase-inline-actions button {
  min-height: 28px;
  padding: 3px 12px;
  font-size: 12px;
}

@media (max-width: 720px) {
  .purchase-overview-shop-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .purchase-inline-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .purchase-workflow-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* ===== 2026-09-24 一覧の余白を詰める（1画面に多く並べる） ===== */
.purchase-list {
  gap: 7px !important;
}

.purchase-overview-card {
  padding: 7px 8px !important;
  border-radius: 9px !important;
}

.purchase-overview-card .purchase-row-main {
  gap: 1px 6px !important;
}

/* 2026-09-24 v163: 商品名を一番目立たせる */
.purchase-overview-card .purchase-row-title {
  font-size: 16px !important;
  font-weight: 900 !important;
  letter-spacing: .2px !important;
  color: #ffffff !important;
  text-decoration: underline !important;
  text-decoration-color: rgba(125, 207, 255, .55) !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 3px !important;
}

.purchase-overview-card .purchase-overview-evidence,
.purchase-overview-card .purchase-overview-availability,
.purchase-overview-card .purchase-overview-prices,
.purchase-overview-card .purchase-color-summary {
  font-size: 11px !important;
  line-height: 1.35 !important;
}

.purchase-overview-card .purchase-decision-strip {
  display: inline-flex !important;
  width: fit-content !important;
  padding: 2px 8px !important;
  margin: 2px 0 !important;
}

.purchase-overview-card .purchase-decision-stock strong,
.purchase-overview-card .purchase-decision-recommendation strong {
  font-size: 13px !important;
}

.purchase-overview-card .purchase-strategy-badges,
.purchase-overview-card .purchase-other-reason-badges {
  gap: 3px !important;
  margin: 0 !important;
}

.purchase-overview-card .purchase-strategy-badge,
.purchase-overview-card .purchase-workflow-classification-badge,
.purchase-overview-card .purchase-overview-limit-badge {
  padding: 0 6px !important;
  font-size: 10.5px !important;
  line-height: 1.5 !important;
}

.purchase-overview-card .purchase-shop-fetch-status {
  gap: 3px !important;
}

.purchase-overview-card .purchase-shop-fetch-chip {
  padding: 0 6px !important;
  font-size: 10.5px !important;
  line-height: 1.5 !important;
}

.purchase-overview-shop-links {
  margin-top: 4px !important;
}

/* 2026-09-24 v160: カードは左右2段に並べて行数を減らす */
.purchase-overview-card .purchase-row-main {
  grid-template-columns: minmax(0, 1fr) !important;
}

.purchase-overview-line {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.purchase-overview-line > * {
  min-width: 0;
}

/* 監視状態だけは商品名の行の右端へ。ほかの情報は左にそろえる */
.purchase-overview-card .purchase-overview-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.purchase-overview-card .purchase-overview-title-line .purchase-row-title {
  flex: 1 1 auto;
  min-width: 0;
}

.purchase-overview-card .purchase-overview-title-line .purchase-shop-fetch-status {
  flex: 0 0 auto;
  /* compact は単独行用に width:100% を持っている。商品名の行に入れるときは中身の幅だけにする */
  width: auto !important;
  max-width: 45%;
  margin-left: auto;
}

/* 2026-09-24 v164: 監視の状態は1行に収める（キタムラだけなので幅いっぱい使う） */
.purchase-monitor-overview {
  grid-template-columns: minmax(0, 1fr) !important;
}

.purchase-monitor-overview-item {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  overflow-wrap: normal !important;
}

/* 2026-09-24 v164: 仕入条件の入力を 4行 → 2行にする */
.purchase-compact-form-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  gap: 4px 5px !important;
}

.purchase-compact-form-grid .purchase-field-model {
  grid-column: span 2 !important;
}

.purchase-compact-form-grid .purchase-field-url {
  grid-column: span 2 !important;
}

.purchase-compact-form-grid input {
  min-height: 27px !important;
}

@media (max-width: 1500px) {
  .purchase-compact-form-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1100px) {
  .purchase-compact-form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .purchase-compact-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* 2026-09-24 v165: 検索窓は固定。その下だけスクロールする */
body.purchase-mode .purchase-list-panel .purchase-primary-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 60 !important;
  padding: 6px 7px !important;
  border-radius: 12px !important;
  background: rgba(5, 24, 37, .97) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3) !important;
  backdrop-filter: blur(12px);
}

/* 仕入条件CSVは普段使わないので、たたんだときは細い1行だけにする */
.purchase-target-csv-panel:not([open]) > summary {
  padding: 3px 8px !important;
  font-size: 10.5px !important;
  opacity: .72;
}

/* 2026-09-24 v165: 仕入条件の入力は2行。重さは選択、送料の目安はここで直せる */
.purchase-compact-form-grid select {
  width: 100%;
  min-width: 0;
  min-height: 27px;
  padding: 3px 5px;
  border-radius: 6px;
  font-size: 11px;
}

.purchase-ship-settings {
  margin-top: 6px;
  border: 1px dashed rgba(127, 191, 235, .35);
  border-radius: 8px;
  background: rgba(10, 36, 58, .5);
}

.purchase-ship-settings > summary {
  padding: 4px 8px;
  color: #bcd9ee;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
}

.purchase-ship-settings-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 6px 8px 8px;
}

.purchase-ship-settings-body label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #d9ebf7;
  font-size: 10.5px;
  font-weight: 700;
}

.purchase-ship-settings-body input {
  width: 74px;
  min-height: 26px;
  padding: 3px 6px;
  font-size: 11px;
  text-align: right;
}

.purchase-ship-settings-note {
  color: #8fb2c8;
  font-size: 10px;
}

/* 2026-09-24 v166: 商品ページから作った下書きは台帳で見分ける */
.ledger-overlay-draft-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border: 1px solid #b45309;
  border-radius: 999px;
  background: #fff7ed;
  color: #b45309;
  font-size: 10px;
  font-weight: 900;
  vertical-align: middle;
}

/* 2026-09-24 v167: 編集画面は右の常時プレビューをやめ、幅いっぱいを入力に使う */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-layout {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel {
  display: none !important;
}

.listing-editor-popups {
  display: inline-flex;
  gap: 6px;
  margin-left: 8px;
}

.listing-editor-popups button.is-open {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #fff;
}

.editor-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(3, 14, 25, .55);
  backdrop-filter: blur(2px);
}

/* ポップアップにするときだけ、パネルを画面中央に浮かせる */
body.listing-editor-mode .item-specifics-panel.is-editor-modal,
body.listing-editor-mode .live-preview-panel.is-editor-modal {
  display: block !important;
  position: fixed !important;
  top: 3vh !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 4001 !important;
  width: min(1100px, 94vw) !important;
  max-height: 94vh !important;
  overflow: auto !important;
  padding: 14px 16px !important;
  border: 1px solid #94a3b8 !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45) !important;
}

body.editor-modal-open {
  overflow: hidden;
}

/* 空いた幅を使って、状態の入力欄を横に並べる */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-panel .field-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-panel .condition-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-panel .choice-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap: 10px !important;
}

@media (max-width: 1100px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-panel .field-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-panel .condition-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-panel .choice-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* 2026-09-24 v168: 仕入条件の入力はきっちり2行に収める（7列） */
.purchase-compact-form-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
}

.purchase-compact-form-grid .purchase-field-model,
.purchase-compact-form-grid .purchase-field-url {
  grid-column: span 2 !important;
}

/* 検索窓を確実に固定する（親が切り取っていると sticky が効かないため） */
body.purchase-mode .purchase-list-panel {
  overflow: visible !important;
}

body.purchase-mode .purchase-list-panel .purchase-primary-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 80 !important;
}

/* 2026-09-24 v169: 仕入条件は指定どおり2行。1行目6項目・2行目8項目 */
.purchase-compact-form-grid {
  grid-template-columns: repeat(24, minmax(0, 1fr)) !important;
}

.purchase-compact-form-grid > label[data-form-row="1"] {
  grid-column: span 4 !important;
}

.purchase-compact-form-grid > label[data-form-row="2"] {
  grid-column: span 3 !important;
}

/* 検索窓より上（区分タブ）も固定する */
body.purchase-mode .purchase-sticky-modebar {
  position: sticky !important;
  top: 0 !important;
  z-index: 90 !important;
}

body.purchase-mode .purchase-list-panel .purchase-primary-toolbar {
  top: 56px !important;
}

.purchase-quick-buffer-note {
  display: block;
  margin-top: 2px;
  color: #9ad7ff;
  font-size: 9.5px;
  font-weight: 700;
}

/* 2026-09-25 v171: 編集画面のヘッダーと、空いた幅の使い方 */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto !important;
  align-items: center !important;
  gap: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar .listing-editor-title {
  justify-self: start;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar .current-save-progress {
  position: static !important;
  justify-self: end;
  max-width: 260px;
  overflow: hidden;
  color: #8a5a00;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar .listing-editor-save {
  justify-self: end;
  min-width: 110px;
}

.listing-editor-popups {
  display: inline-flex;
  gap: 6px;
  justify-self: end;
}

.listing-editor-popups button {
  white-space: nowrap;
}

/* ポップアップは、非表示ルールより強い指定にする（これが無いと開かない） */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel.is-editor-modal,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .item-specifics-panel.is-editor-modal {
  display: block !important;
  position: fixed !important;
  top: 3vh !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 4001 !important;
  width: min(1180px, 95vw) !important;
  max-height: 94vh !important;
  overflow: auto !important;
  padding: 16px 18px !important;
  border: 1px solid #94a3b8 !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45) !important;
}

.editor-modal-close {
  position: sticky;
  top: 0;
  float: right;
  margin: -4px 0 4px 8px;
  padding: 4px 14px;
  border: 1px solid #94a3b8;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

/* 空いた右側を使う。ただし表示中のステップだけ。
   （全ての .form-section に display を強制すると、タブ切替で隠すことができなくなる） */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section:not(.active),
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section[hidden] {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section.active:not([hidden])[data-section="assist"] {
  display: block !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section.active:not([hidden]):not([data-section="assist"]) {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)) !important;
  gap: 12px !important;
  align-items: start !important;
  max-width: none !important;
  margin-inline: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section.active > .section-heading,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section.active > .item-specifics-panel,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section.active > .step-actions,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section.active > .top-step-nav,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section.active > .start-options,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section.active > .assist-layout,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section.active > .ai-result,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section.active > .ai-preview {
  grid-column: 1 / -1 !important;
}

@media (max-width: 1000px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section.active:not([hidden]):not([data-section="assist"]) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* 2026-09-25 v173: ポップアップは body 直下へ移して出すので、画面の状態に左右されない見た目にする */
.item-specifics-panel.is-editor-modal,
.live-preview-panel.is-editor-modal {
  padding: 16px 18px;
  border: 1px solid #94a3b8;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.item-specifics-panel.is-editor-modal .editor-modal-close,
.live-preview-panel.is-editor-modal .editor-modal-close {
  z-index: 2;
}

/* 2026-09-25 v174: 仕入条件は必ず2行。1行目6項目・2行目8項目を画面幅で崩さない */
.purchase-compact-form-grid {
  grid-template-columns: repeat(24, minmax(0, 1fr)) !important;
}

@media (min-width: 860px) {
  .purchase-compact-form-grid > label[data-form-row="1"] { grid-column: span 4 !important; }
  .purchase-compact-form-grid > label[data-form-row="2"] { grid-column: span 3 !important; }
}

@media (max-width: 859px) {
  .purchase-compact-form-grid > label[data-form-row="1"] { grid-column: span 12 !important; }
  .purchase-compact-form-grid > label[data-form-row="2"] { grid-column: span 12 !important; }
}

/* 必須は★。色と下地で、ひと目で分かるようにする */
.purchase-compact-form-grid > label > span > i {
  font-size: 0;
  font-style: normal;
}

.purchase-compact-form-grid > label > span > i::after {
  content: "★";
  margin-left: 2px;
  color: #ffca3a;
  font-size: 11px;
  text-shadow: 0 0 4px rgba(255, 202, 58, .55);
}

.purchase-compact-form-grid > label:has(i) > span {
  color: #ffe9a8;
  font-weight: 800;
}

.purchase-compact-form-grid > label:has(i) > input,
.purchase-compact-form-grid > label:has(i) > select {
  border-color: rgba(255, 202, 58, .5);
  background: rgba(255, 202, 58, .06);
}

.purchase-compact-form-grid > label:has(i) > input:focus,
.purchase-compact-form-grid > label:has(i) > select:focus {
  border-color: #ffca3a;
  box-shadow: 0 0 0 2px rgba(255, 202, 58, .22);
}

/* 2026-09-25 v177: 監視条件の欄から、そのまま各モールを開いて確かめられるようにする */
.purchase-compact-form-grid > label {
  position: relative;
}

.purchase-shop-link {
  display: inline-block;
  margin-top: 3px;
  color: #9ad7ff;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.purchase-shop-link:hover {
  text-decoration: underline;
}

.purchase-shop-link.is-ng {
  color: #ffb4a2;
}

.purchase-shop-link[aria-disabled="true"] {
  color: #7b8794;
  cursor: not-allowed;
  pointer-events: none;
}

/* 2026-09-25 v178: 1行目の幅を配り直し、仕入上限と円高8円の上限を横に並べる */
.purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickBrand) { grid-column: span 3 !important; }
.purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickModel) { grid-column: span 5 !important; }
.purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickEbay) { grid-column: span 3 !important; }
.purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickShipping) { grid-column: span 4 !important; }
.purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickCashProfitRate) { grid-column: span 3 !important; }
.purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickMaxPrice) { grid-column: span 6 !important; }

.purchase-compact-form-grid > label.purchase-readonly-field {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 8px;
  align-items: center;
}

.purchase-compact-form-grid > label.purchase-readonly-field > span {
  grid-column: 1 / -1;
}

.purchase-compact-form-grid > label.purchase-readonly-field > .purchase-quick-buffer-note {
  grid-column: 2;
  margin-top: 0;
  white-space: nowrap;
}

/* 2026-09-25 v179: 仕入条件から下書きを作るボタン */
.purchase-shop-btn.purchase-shop-draft {
  border-color: #2f9e44;
  background: #2f9e44;
  color: #fff;
  font-weight: 800;
}

.purchase-shop-btn.purchase-shop-draft:hover:not(:disabled) {
  background: #268b3c;
}

/* 2026-09-25 v180: 編集画面に未販売の仕入額を出す */
.editor-count-chip--money {
  border-color: #2f9e44 !important;
  background: #ebfbee !important;
}

.editor-count-chip--money strong {
  color: #1d7a34 !important;
}

/* 2026-09-25 v181: 仕入管理の入力欄が背景に溶けて見えない。
   目が疲れないよう、明るくしすぎずに「面」と「枠」で分かるようにする */
body.purchase-mode .purchase-form-grid input,
body.purchase-mode .purchase-form-grid select,
body.purchase-mode .purchase-form-grid textarea,
body.purchase-mode .purchase-compact-form-grid input,
body.purchase-mode .purchase-compact-form-grid select,
body.purchase-mode .purchase-compact-form-grid textarea,
body.purchase-mode .purchase-inline-settings input,
body.purchase-mode .purchase-inline-settings select,
body.purchase-mode .purchase-inline-settings textarea {
  background: #1b3145 !important;
  border: 1px solid #44658c !important;
  color: #eef4fb !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

body.purchase-mode .purchase-form-grid input::placeholder,
body.purchase-mode .purchase-form-grid textarea::placeholder,
body.purchase-mode .purchase-compact-form-grid input::placeholder,
body.purchase-mode .purchase-compact-form-grid textarea::placeholder,
body.purchase-mode .purchase-inline-settings input::placeholder,
body.purchase-mode .purchase-inline-settings textarea::placeholder {
  color: #8aa4bd !important;
  opacity: 1;
}

body.purchase-mode .purchase-form-grid input:focus,
body.purchase-mode .purchase-form-grid select:focus,
body.purchase-mode .purchase-form-grid textarea:focus,
body.purchase-mode .purchase-compact-form-grid input:focus,
body.purchase-mode .purchase-compact-form-grid select:focus,
body.purchase-mode .purchase-compact-form-grid textarea:focus,
body.purchase-mode .purchase-inline-settings input:focus,
body.purchase-mode .purchase-inline-settings select:focus,
body.purchase-mode .purchase-inline-settings textarea:focus {
  border-color: #7fc4ff !important;
  box-shadow: 0 0 0 3px rgba(127, 196, 255, .18) !important;
  outline: none;
}

/* 必須（★）の欄は、上の面の上に金色を薄くのせる */
body.purchase-mode .purchase-compact-form-grid > label:has(i) > input,
body.purchase-mode .purchase-compact-form-grid > label:has(i) > select {
  background: linear-gradient(0deg, rgba(255, 202, 58, .10), rgba(255, 202, 58, .10)), #1b3145 !important;
  border-color: rgba(255, 202, 58, .65) !important;
}

/* 自動計算など、読み取り専用は触れないことが分かる色に */
body.purchase-mode .purchase-form-grid input[readonly],
body.purchase-mode .purchase-compact-form-grid input[readonly] {
  background: #132536 !important;
  border-color: #33506e !important;
  border-style: dashed !important;
  color: #9fc6e4 !important;
}

/* ラベルも少し明るくして、どの欄の見出しか分かるように */
body.purchase-mode .purchase-compact-form-grid > label > span,
body.purchase-mode .purchase-form-grid > label > span {
  color: #b9cfe4;
}

/* 2026-09-25 v182: 仕入先のボタンは1行に収める */
body.purchase-mode .purchase-overview-shop-links {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 5px !important;
  overflow-x: auto;
  scrollbar-width: thin;
}

body.purchase-mode .purchase-overview-shop-links > a,
body.purchase-mode .purchase-overview-shop-links > button {
  flex: 0 0 auto;
  padding: 4px 9px !important;
  font-size: 11.5px !important;
  white-space: nowrap !important;
}

@media (max-width: 1200px) {
  body.purchase-mode .purchase-overview-shop-links > a,
  body.purchase-mode .purchase-overview-shop-links > button {
    padding: 4px 7px !important;
    font-size: 11px !important;
  }
}

/* 2026-09-25 v190: 仕入上限が古いときに気づけるようにする */
.purchase-auto-ceiling.is-stale {
  border-color: rgba(255, 169, 77, .7);
  background: rgba(255, 169, 77, .16);
  color: #ffd8a8;
}

.purchase-fresh-ceiling {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border: 1px solid rgba(255, 169, 77, .75);
  border-radius: 999px;
  background: rgba(255, 169, 77, .18);
  color: #ffd8a8;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

/* 2026-09-25 v190: キタムラにカタログが無い商品の印 */
.purchase-no-kitamura {
  display: flex !important;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  color: #9fc6e4;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.purchase-no-kitamura input {
  width: 13px !important;
  min-height: 0 !important;
  height: 13px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #ffca3a;
}

/* 2026-09-25 v191: 自社在庫の有無で分けて見たいので、切り替えを目立たせる */
.purchase-stock-filter-group.is-own-stock {
  border: 1px solid rgba(255, 202, 58, .45);
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(255, 202, 58, .08);
}

.purchase-stock-filter-group.is-own-stock > strong {
  color: #ffe9a8;
}

.purchase-stock-filter-group.is-own-stock button.active {
  border-color: #ffca3a;
  background: #ffca3a;
  color: #12212f;
  font-weight: 800;
}

/* 2026-09-25 v192: 件数が少ないときに幅が余るので、入る分だけ横に広げる */
.purchase-list {
  grid-template-columns: repeat(auto-fit, minmax(720px, 1fr)) !important;
}

@media (max-width: 1180px) {
  .purchase-list {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* カードの中も、余った幅を使い切る */
.purchase-overview-card,
.purchase-product-row {
  width: 100%;
  max-width: none !important;
}

/* v195: 仕入カードを2列に戻し、目標販売・仕入上限を大きく見せる */
.purchase-list {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: start;
}
@media (max-width: 1180px) {
  .purchase-list { grid-template-columns: minmax(0, 1fr) !important; }
}
.purchase-overview-card,
.purchase-product-row { width: 100%; max-width: none !important; }

/* 目標販売・仕入上限・見込利益は独立した行に置き、数字を大きく出す */
.purchase-overview-price-line { display: block; margin-top: 6px; }
.purchase-overview-prices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.purchase-price-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #2f5578;
  background: #14293d;
  line-height: 1.25;
}
.purchase-price-chip small {
  font-size: 11px;
  letter-spacing: .04em;
  color: #9fc0dd;
}
.purchase-price-chip b {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #eaf4ff;
}
.purchase-price-chip.is-target { background: #123043; border-color: #2d7ea8; }
.purchase-price-chip.is-target b { color: #7fd9ff; }
.purchase-price-chip.is-limit { background: #10313a; border-color: #2f8f7a; }
.purchase-price-chip.is-limit b { color: #7df0c6; font-size: 17px; }
.purchase-price-chip.is-profit { background: #1b2740; border-color: #46618f; }
.purchase-price-chip.is-missing { background: #3a2230; border-color: #8c4a63; }
.purchase-price-chip.is-missing b { color: #ffb3c6; font-size: 14px; }
.purchase-price-notes {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* v200: 仕入先のリンクは行いっぱいに広げて押しやすくする。
   これまで内容の幅しか取らず、右側（設定ボタンの右）が空いていた。 */
body.purchase-mode .purchase-overview-shop-links {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  width: 100%;
  overflow-x: visible;
}
body.purchase-mode .purchase-overview-shop-links > a,
body.purchase-mode .purchase-overview-shop-links > button {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  padding: 7px 4px !important;
  font-size: 12px !important;
  text-align: center;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 下書き・設定は押し間違えたくないので、少しだけ広く取る */
body.purchase-mode .purchase-overview-shop-links > .purchase-shop-draft,
body.purchase-mode .purchase-overview-shop-links > .purchase-shop-settings {
  flex: 1.25 1 0 !important;
}
@media (max-width: 1200px) {
  body.purchase-mode .purchase-overview-shop-links {
    flex-wrap: wrap !important;
  }
  body.purchase-mode .purchase-overview-shop-links > a,
  body.purchase-mode .purchase-overview-shop-links > button {
    flex: 1 1 88px !important;
    padding: 7px 4px !important;
    font-size: 11.5px !important;
  }
}

/* v202: 仕入条件フォームの「円高8円なら」を、余っている幅を使って読める大きさにする */
body.purchase-mode .purchase-field-price.purchase-readonly-field {
  position: relative;
}
body.purchase-mode .purchase-quick-buffer-note {
  display: block !important;
  margin-top: 4px !important;
  padding: 3px 9px !important;
  border: 1px solid #2f8f7a !important;
  border-radius: 7px !important;
  background: #10313a !important;
  color: #7df0c6 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  line-height: 1.35 !important;
  white-space: nowrap;
}
body.purchase-mode .purchase-quick-buffer-note:empty {
  display: none !important;
}

/* v203: 仕入条件は2行のまま。2行目が eBay販売履歴 を足して9項目になったため、
   24列（1行目の各項目が3〜6列を使う）と9項目の両方で割り切れる72列にする。
   1行目は従来の割り付けを3倍、2行目は9項目×8列＝72列でちょうど1行に収まる。 */
.purchase-compact-form-grid {
  grid-template-columns: repeat(72, minmax(0, 1fr)) !important;
}
@media (min-width: 860px) {
  .purchase-compact-form-grid > label[data-form-row="1"] { grid-column: span 9 !important; }
  .purchase-compact-form-grid > label[data-form-row="2"] { grid-column: span 8 !important; }
  .purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickBrand) { grid-column: span 9 !important; }
  .purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickModel) { grid-column: span 15 !important; }
  .purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickEbay) { grid-column: span 9 !important; }
  .purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickShipping) { grid-column: span 12 !important; }
  .purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickCashProfitRate) { grid-column: span 9 !important; }
  .purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickMaxPrice) { grid-column: span 18 !important; }
}
@media (max-width: 1499px) and (min-width: 860px) {
  /* 幅が足りないときは見出しと入力を詰めて、9項目1行を保つ */
  .purchase-compact-form-grid > label[data-form-row="2"] > span { font-size: 10px !important; letter-spacing: 0 !important; }
  .purchase-compact-form-grid > label[data-form-row="2"] input { font-size: 11.5px !important; padding: 5px 6px !important; }
}
@media (max-width: 859px) {
  .purchase-compact-form-grid > label[data-form-row="1"],
  .purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickBrand),
  .purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickModel),
  .purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickEbay),
  .purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickShipping),
  .purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickCashProfitRate),
  .purchase-compact-form-grid > label[data-form-row="1"]:has(#purchaseQuickMaxPrice),
  .purchase-compact-form-grid > label[data-form-row="2"] { grid-column: span 36 !important; }
}

/* 見出しは幅に収まらないので、切れっぱなしにせず「…」で終わらせる */
body.purchase-mode .purchase-compact-form-grid > label[data-form-row="2"] > span {
  display: block !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== 種類ごとの整理（v249・10/4 夜の確認）：飛ばす手順・見るところの案内・欄の説明 ===== */
body .stepper .step.step-skipped {
  opacity: .5;
  border-style: dashed !important;
  cursor: help;
}
body .stepper .step.step-skipped .step-skip-badge {
  display: inline-block;
  margin-left: 2px;
  padding: 0 5px;
  border-radius: 999px;
  background: #eef1f4;
  color: #5b6b78;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.6;
}
.step-skip-badge[hidden] {
  display: none !important;
}
.step-skip-note {
  margin: 4px 0 6px;
  padding: 4px 10px;
  border-left: 3px solid #b7c6d2;
  color: #5b6b78;
  font-size: 12px;
  line-height: 1.5;
}
.step-skip-note[hidden] {
  display: none !important;
}
.study-guide {
  margin: 6px 0;
  border: 1px solid #dbe4ea;
  border-radius: 8px;
  background: #f8fafb;
  font-size: 12px;
  line-height: 1.55;
  color: #33424d;
}
.study-guide > summary {
  cursor: pointer;
  padding: 6px 10px;
  font-weight: 600;
  list-style-position: inside;
}
.study-guide > summary small {
  margin-left: 4px;
  font-weight: 400;
  color: #6b7b88;
}
.study-guide .study-guide-body {
  margin: 0;
  padding: 0 12px 8px 12px;
}
.study-guide .study-guide-body ul,
ul.study-guide-body {
  margin: 0;
  padding-left: 18px;
}
ul.study-guide-body {
  padding: 0 12px 8px 28px;
}
.study-guide .study-guide-body li {
  margin: 2px 0;
}
.study-guide .study-guide-body p {
  margin: 4px 0;
}
.condition-field-help {
  flex-basis: 100%;
  width: 100%;
  margin: 0 0 4px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #4b5b68;
}
.condition-field-help > summary {
  display: inline-block;
  cursor: pointer;
  color: #4a7aa0;
  font-size: 11px;
}
.condition-field-help > p {
  margin: 2px 0 4px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f3f6f8;
}
.optics-review-note {
  margin: 6px 0 10px;
  padding: 8px 10px;
  border: 1px solid #f0d9a8;
  border-radius: 8px;
  background: #fff8e8;
  font-size: 12px;
  line-height: 1.5;
}
.optics-review-note[hidden],
[data-optics-field][hidden],
[data-viewfinder-function-field][hidden] {
  display: none !important;
}
.optics-review-note p {
  margin: 0 0 6px;
}
.editor > .step-skip-note,
.editor > .item-type-guide {
  margin-left: 20px;
  margin-right: 20px;
}
@media (max-width: 640px) {
  .editor > .step-skip-note,
  .editor > .item-type-guide {
    margin-left: 12px;
    margin-right: 12px;
  }
}

/* 在庫ラベルの印刷（v253） */
.stock-label-dialog .stock-label-controls {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.stock-label-dialog .stock-label-controls p {
  margin: 0;
  line-height: 1.6;
}

.stock-label-dialog .stock-label-scope,
.stock-label-dialog .stock-label-list-actions,
.stock-label-dialog .stock-label-settings,
.stock-label-dialog .stock-label-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.stock-label-dialog .stock-label-scope label,
.stock-label-dialog .stock-label-settings label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.stock-label-dialog .stock-label-settings input[type="number"] {
  width: 72px;
}

/* 一覧は普通の縦並びにする（10/6 ユーザー指摘）。以前は高さ300pxの grid の中で行に min-height: 0 が付いていて、
   106行が300pxに押し込まれ、1行が13pxにつぶれて上下の行と文字が重なっていた */
.stock-label-dialog .stock-label-list {
  display: block;
  max-height: 300px;
  overflow: auto;
  border: 1px solid #d1e2ec;
  border-radius: 10px;
}

.stock-label-dialog .stock-label-row {
  display: grid;
  grid-template-columns: auto 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid #eef4f8;
  font-variant-numeric: tabular-nums;
}

.stock-label-dialog .stock-label-row:last-child {
  border-bottom: 0;
}

.stock-label-dialog .stock-label-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-label-dialog .stock-label-row small {
  color: #4f6b7d;
}

.stock-label-dialog .stock-label-empty {
  padding: 12px;
  color: #4f6b7d;
}

.stock-label-dialog .stock-label-note {
  color: #4f6b7d;
  font-size: 13px;
}

.stock-label-dialog .stock-label-actions {
  justify-content: flex-end;
}

.stock-label-dialog input[type="radio"],
.stock-label-dialog input[type="checkbox"] {
  flex: none;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.stock-label-dialog .stock-label-scope label,
.stock-label-dialog .stock-label-settings label {
  white-space: nowrap;
}

.stock-label-dialog .stock-label-row {
  min-height: 36px;
  margin: 0;
}

/* チェック欄は共通の入力欄の指定（高さ36px）を受けて行を高くしていた */
#stockLabelDialog .stock-label-list > .stock-label-row input[type="checkbox"] {
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
}

#stockLabelDialog .stock-label-list > .stock-label-row {
  display: grid;
  grid-template-columns: 18px 92px minmax(0, 1fr) auto;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  max-height: none;
  overflow: visible;
  white-space: normal;
}

#stockLabelDialog .stock-label-row {
  padding: 6px 10px;
  line-height: 1.4;
}

/* 注文の確認待ち（v253・10/6）：eBay の注文を確かめてから商品へ適用する */
#ledgerPanel .ledger-maintenance-btn.ebay-order-review-btn.is-empty {
  opacity: 0.62;
}

#ledgerPanel .ledger-maintenance-btn.ebay-order-review-btn.has-pending {
  background: #b45309 !important;
  border-color: #f59e0b !important;
  color: #fff !important;
  font-weight: 700;
  opacity: 1;
}

#ledgerPanel .ledger-maintenance-btn.ebay-order-review-btn.has-pending:hover {
  background: #c2610f !important;
}

.ebay-order-review-dialog {
  width: min(920px, calc(100vw - 32px));
}

.ebay-order-review-dialog .ebay-order-review-controls {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.ebay-order-review-dialog .ebay-order-review-controls > p {
  margin: 0;
  line-height: 1.6;
}

/* 「eBayから注文を取得」（10/6）：共有DBの欄の「eBay販売同期」と同じ処理を、この画面から押せるようにした */
.ebay-order-review-dialog .ebay-order-review-fetch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 10px 12px;
  border: 1px solid #d1e2ec;
  border-radius: 10px;
  background: #f4f9fc;
}

.ebay-order-review-dialog .ebay-order-review-fetch button {
  min-height: 40px;
  font-weight: 700;
}

.ebay-order-review-dialog .ebay-order-review-fetch small {
  color: #4f6b7d;
  line-height: 1.5;
}

.ebay-order-review-dialog .ebay-order-review-list-actions,
.ebay-order-review-dialog .ebay-order-review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.ebay-order-review-dialog .ebay-order-review-actions {
  justify-content: flex-end;
}

.ebay-order-review-dialog .ebay-order-review-status {
  color: #4f6b7d;
  font-size: 13px;
}

.ebay-order-review-dialog .ebay-order-review-list {
  display: grid;
  max-height: min(56vh, 560px);
  overflow: auto;
  border: 1px solid #d1e2ec;
  border-radius: 10px;
}

.ebay-order-review-dialog .ebay-order-review-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #eef4f8;
}

.ebay-order-review-dialog .ebay-order-review-row:last-child {
  border-bottom: 0;
}

.ebay-order-review-dialog .ebay-order-review-row.is-checked {
  background: #f3f9fd;
}

.ebay-order-review-dialog .ebay-order-review-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ebay-order-review-dialog .ebay-order-review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: #4f6b7d;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.ebay-order-review-dialog .ebay-order-review-title {
  margin: 0;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ebay-order-review-dialog .ebay-order-review-title small {
  display: block;
  color: #4f6b7d;
  font-weight: 400;
}

.ebay-order-review-dialog .ebay-order-review-candidate,
.ebay-order-review-dialog .ebay-order-review-picked {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: #eef6fb;
}

.ebay-order-review-dialog .ebay-order-review-candidate.is-title-match {
  background: #fff7e6;
}

.ebay-order-review-dialog .ebay-order-review-candidate.is-none {
  background: #f5f5f5;
  color: #4f6b7d;
}

.ebay-order-review-dialog .ebay-order-review-candidate small,
.ebay-order-review-dialog .ebay-order-review-picked small {
  color: #4f6b7d;
}

.ebay-order-review-dialog .ebay-order-review-warning {
  color: #b42318;
  font-style: normal;
  font-weight: 700;
}

.ebay-order-review-dialog .ebay-order-review-ok {
  color: #146c43;
  font-style: normal;
}

.ebay-order-review-dialog .ebay-order-review-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.ebay-order-review-dialog .ebay-order-review-choices label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  white-space: nowrap;
}

.ebay-order-review-dialog .ebay-order-review-choices label.is-disabled {
  color: #9aa9b3;
}

.ebay-order-review-dialog input[type="radio"],
.ebay-order-review-dialog input[type="checkbox"] {
  flex: none;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.ebay-order-review-dialog .ebay-order-review-check {
  padding-top: 2px;
}

.ebay-order-review-dialog .ebay-order-review-search {
  display: grid;
  gap: 6px;
}

.ebay-order-review-dialog .ebay-order-review-search input[type="search"] {
  width: min(320px, 100%);
}

.ebay-order-review-dialog .ebay-order-review-search-results {
  display: grid;
  gap: 4px;
}

.ebay-order-review-dialog .ebay-order-review-search-results button {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  justify-content: flex-start;
  text-align: left;
  min-height: 0;
  padding: 6px 8px;
}

.ebay-order-review-dialog .ebay-order-review-search-empty,
.ebay-order-review-dialog .ebay-order-review-empty {
  margin: 0;
  padding: 8px;
  color: #4f6b7d;
}

.ebay-order-review-dialog #applyEbayOrderReviewBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 型番を判別できない商品のお知らせ（v270・10/13 ユーザー「仕入管理が非常に縦長。型番を判別できない商品20件 確認する を修正して」）
   検索パネルは 2 列のグリッドで、列の指定が無いこのお知らせが左の狭い列に入って 1 文字ずつ折り返していた。1 行まるごと使う */
body.purchase-mode .purchase-list-panel .purchase-unknown-model-notice {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
body.purchase-mode .purchase-list-panel .purchase-unknown-model-notice > summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 181, 71, .58);
  border-radius: 7px;
  background: rgba(101, 65, 9, .8);
  color: #fff1c2;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
}
body.purchase-mode .purchase-list-panel .purchase-unknown-model-notice > summary span {
  font-weight: 600;
  text-decoration: underline;
}
body.purchase-mode .purchase-list-panel .purchase-unknown-model-notice > ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 4px;
  margin: 6px 0 0;
  padding: 6px;
  list-style: none;
  border: 1px solid rgba(255, 181, 71, .35);
  border-radius: 8px;
  background: rgba(28, 46, 62, .8);
}
body.purchase-mode .purchase-list-panel .purchase-unknown-model-notice li button {
  display: flex;
  gap: 6px;
  align-items: baseline;
  width: 100%;
  min-width: 0;
  padding: 3px 6px;
  border: 1px solid rgba(124, 182, 222, .26);
  border-radius: 6px;
  background: rgba(16, 43, 61, .88);
  color: #dff2ff;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}
body.purchase-mode .purchase-list-panel .purchase-unknown-model-notice li button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.purchase-mode .purchase-list-panel .purchase-unknown-model-notice > small {
  display: block;
  margin-top: 4px;
  color: #9fc6dd;
  font-size: 10px;
}

/* v271（10/13 ユーザー）：出品台帳と編集画面のヘッダーを同じ 8 項目・同じ並びにし、
   未出品の 5 枚（減らす対象）と 出品中・販売の 3 枚 を枠で括る。狭い画面は今までどおり 1 列に流す */
@media (min-width: 901px) {
  .status-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    display: grid !important;
    grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) !important;
    gap: 8px !important;
    overflow: visible !important;
  }
  .status-group {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    align-items: stretch;
    min-width: 0;
    padding: 18px 6px 6px;
    border: 1px solid rgba(124, 182, 222, .3);
    border-radius: 10px;
  }
  .status-group--listed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .status-group > article {
    min-width: 0;
  }
  .status-group-label {
    position: absolute;
    top: 3px;
    left: 9px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.2;
    color: #7fa7c2;
  }
  .status-group-label small {
    margin-left: 4px;
    font-weight: 600;
    opacity: .85;
  }
  .status-group--prelist {
    border-color: rgba(255, 181, 71, .55);
    background: rgba(255, 181, 71, .06);
  }
  .status-group--prelist .status-group-label {
    color: #d9a048;
  }
  .status-group--listed {
    border-color: rgba(47, 158, 68, .45);
    background: rgba(47, 158, 68, .05);
  }
  .status-group--listed .status-group-label {
    color: #4cb866;
  }
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-group {
    padding: 14px 4px 4px;
    gap: 4px;
  }
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-group-label {
    top: 1px;
    font-size: 9px;
  }
}
@media (max-width: 900px) {
  .status-group {
    display: contents;
  }
  .status-group-label {
    display: none;
  }
}
.status-card-sub {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  color: #7fa7c2;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.editor-count-chip .status-card-sub {
  font-size: 9px;
}
.status-money-card--unsold,
#editorUnsoldCostChip {
  cursor: pointer;
}
