﻿/* 20260719 ledger/editor hotfix v5.
   Loaded after listing-ui-final.css so these rules win over older mobile/layout rules. */

@media (min-width: 701px) {
  #listingLedger td.ledger-title > .ledger-mobile-meta,
  #listingLedger td.ledger-title .ledger-mobile-chip,
  #listingLedger td.ledger-title .ledger-mobile-status,
  #listingLedger td.ledger-title .ledger-mobile-edit,
  #listingLedger td.ledger-title .ledger-mobile-delete,
  body:not(.home-mode):not(.purchase-mode) #listingLedger .ledger-mobile-meta,
  body:not(.home-mode):not(.purchase-mode) #listingLedger .ledger-mobile-edit,
  body:not(.home-mode):not(.purchase-mode) #listingLedger .ledger-mobile-delete {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

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

  body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title {
    position: static !important;
    display: table-cell !important;
    width: auto !important;
    overflow: hidden !important;
    vertical-align: middle !important;
  }

  body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title strong,
  body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title span {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-actions {
    display: table-cell !important;
    width: 112px !important;
    min-width: 112px !important;
    padding: 6px 8px !important;
    text-align: right !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
  }

  body:not(.home-mode):not(.purchase-mode) #listingLedger .ledger-actions .ledger-edit,
  body:not(.home-mode):not(.purchase-mode) #listingLedger .ledger-actions .ledger-delete {
    position: static !important;
    display: inline-flex !important;
    transform: none !important;
    width: auto !important;
    min-width: 44px !important;
    min-height: 28px !important;
    margin: 0 0 0 4px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
  }
}

/* v20: selected ledger row, compact sticky editor chrome, hide unused step 5 */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) {
  --editor-toolbar-h-v20: 34px;
  --editor-count-h-v20: 34px;
  --editor-selected-h-v20: 58px;
  --editor-sync-h-v20: 28px;
  --editor-stepper-h-v20: 38px;
  --editor-status-h-v20: 44px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-workspace,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .workflow-shell,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .workflow-main,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-layout {
  overflow: visible !important;
}

@media (min-width: 761px) {
  body:not(.home-mode):not(.purchase-mode) #listingLedger tr {
    display: table-row !important;
  }

  body:not(.home-mode):not(.purchase-mode) #listingLedger th,
  body:not(.home-mode):not(.purchase-mode) #listingLedger td {
    display: table-cell !important;
    position: static !important;
    float: none !important;
    vertical-align: middle !important;
  }

  body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title {
    min-width: 250px !important;
    max-width: 520px !important;
    white-space: normal !important;
  }

  body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title > :not(strong) {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) #listingLedger td:not(.ledger-actions) > .ledger-edit,
  body:not(.home-mode):not(.purchase-mode) #listingLedger td:not(.ledger-actions) > .ledger-delete,
  body:not(.home-mode):not(.purchase-mode) #listingLedger td:not(.ledger-actions) .ledger-edit,
  body:not(.home-mode):not(.purchase-mode) #listingLedger td:not(.ledger-actions) .ledger-delete {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-actions {
    width: 112px !important;
    min-width: 96px !important;
    max-width: 120px !important;
    text-align: right !important;
    white-space: nowrap !important;
    padding: 4px 6px !important;
    position: static !important;
  }

  body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-actions .ledger-edit,
  body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-actions .ledger-delete {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: static !important;
    transform: none !important;
    float: none !important;
    min-width: 42px !important;
    width: auto !important;
    height: 28px !important;
    min-height: 28px !important;
    margin: 0 0 0 4px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
    line-height: 1 !important;
  }
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 340 !important;
  height: var(--editor-toolbar-h-v20) !important;
  min-height: var(--editor-toolbar-h-v20) !important;
  padding: 4px 8px !important;
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  align-items: center !important;
  gap: 8px !important;
  background: #e9f7ff !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar button {
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  height: 26px !important;
  min-height: 26px !important;
  padding: 3px 8px !important;
  border-radius: 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-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;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
  position: sticky !important;
  top: calc(var(--editor-toolbar-h-v20) + var(--editor-count-h-v20)) !important;
  z-index: 330 !important;
  height: var(--editor-selected-h-v20) !important;
  min-height: var(--editor-selected-h-v20) !important;
  max-height: var(--editor-selected-h-v20) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #ead785 !important;
  border-radius: 0 !important;
  background: #fff7dc !important;
  overflow: hidden !important;
  box-shadow: none !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-selected-ledger-table {
  display: grid !important;
  grid-template-rows: 22px 36px !important;
  height: var(--editor-selected-h-v20) !important;
  width: 100% !important;
  border: 0 !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
  display: grid !important;
  grid-template-columns: minmax(132px, .85fr) minmax(92px, .55fr) minmax(250px, 1.7fr) minmax(96px, .65fr) minmax(110px, .7fr) minmax(90px, .55fr) minmax(86px, .5fr) !important;
  align-items: center !important;
  gap: 0 !important;
  min-width: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head {
  height: 22px !important;
  background: #eef7ff !important;
  border-bottom: 1px solid #c9ddeb !important;
  color: #06324f !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
  height: 36px !important;
  background: #fff7dc !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head span {
  padding: 0 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell {
  height: 100% !important;
  padding: 2px 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-purchase {
  display: grid !important;
  grid-template-columns: minmax(70px, .8fr) minmax(58px, .7fr) !important;
  gap: 4px !important;
  align-items: center !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  position: sticky !important;
  top: calc(var(--editor-toolbar-h-v20) + var(--editor-count-h-v20) + var(--editor-selected-h-v20)) !important;
  z-index: 325 !important;
  height: var(--editor-sync-h-v20) !important;
  min-height: var(--editor-sync-h-v20) !important;
  margin: 0 !important;
  padding: 2px 8px !important;
  border-radius: 0 !important;
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  gap: 8px !important;
  align-items: center !important;
  overflow: hidden !important;
  background: #e8f6ff !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head {
  margin: 0 !important;
  display: flex !important;
  gap: 6px !important;
  align-items: center !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 4px !important;
  overflow-x: auto !important;
  white-space: nowrap !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: calc(var(--editor-toolbar-h-v20) + var(--editor-count-h-v20) + var(--editor-selected-h-v20) + var(--editor-sync-h-v20)) !important;
  z-index: 320 !important;
  height: var(--editor-stepper-h-v20) !important;
  min-height: var(--editor-stepper-h-v20) !important;
  padding: 0 8px !important;
  border-radius: 0 !important;
  background: #064062 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  align-items: center !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step:nth-child(n+6),
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="photos"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="summary"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="output"] {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step {
  height: 38px !important;
  min-height: 38px !important;
  padding: 1px 4px !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 {
  position: sticky !important;
  top: calc(var(--editor-toolbar-h-v20) + var(--editor-count-h-v20) + var(--editor-selected-h-v20) + var(--editor-sync-h-v20) + var(--editor-stepper-h-v20)) !important;
  z-index: 315 !important;
  min-height: var(--editor-status-h-v20) !important;
  height: var(--editor-status-h-v20) !important;
  padding: 4px 8px !important;
  border-radius: 0 !important;
  display: grid !important;
  grid-template-columns: 120px 1fr !important;
  gap: 8px !important;
  align-items: center !important;
  overflow: hidden !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 !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 {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 8px !important;
  border-radius: 14px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="photos"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="photos"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="summary"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="output"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-step-panel="photos"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-step-panel="summary"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-step-panel="output"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #photosStep,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #summaryStep,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #outputStep {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .workflow-panel {
  scroll-margin-top: calc(var(--editor-toolbar-h-v20) + var(--editor-count-h-v20) + var(--editor-selected-h-v20) + var(--editor-sync-h-v20) + var(--editor-stepper-h-v20) + var(--editor-status-h-v20) + 8px) !important;
}

.ai-recognition-card .ai-actions,
.ai-camera-card .ai-actions,
.ai-panel .ai-actions,
.ai-action-row,
.ai-upload-actions,
.ai-recognition-actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 4px !important;
}

.ai-recognition-card button,
.ai-camera-card button,
.ai-panel button,
.ai-action-row button,
.ai-upload-actions button,
.ai-recognition-actions button,
.ai-upload-actions .file-button {
  min-width: 0 !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 6px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
}

[data-ai-action="recognize"],
.ai-recognize-btn,
#aiRecognizeBtn,
button[aria-label*="認識"] {
  border-color: #c9252d !important;
  background: #c9252d !important;
  color: #fff !important;
  font-weight: 800 !important;
}

.accessories-grid,
.accessory-grid,
.accessory-buttons,
.accessory-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)) !important;
  gap: 4px !important;
}

.accessory-button,
.accessory,
.accessory-toggle,
.accessories-grid button,
.accessory-grid button,
.accessory-buttons button {
  min-width: 0 !important;
  min-height: 26px !important;
  height: auto !important;
  padding: 4px 5px !important;
  border-radius: 7px !important;
  font-size: 10px !important;
  line-height: 1.12 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

@media (max-width: 760px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) {
    --editor-toolbar-h-v20: 32px;
    --editor-count-h-v20: 34px;
    --editor-selected-h-v20: 64px;
    --editor-sync-h-v20: 0px;
    --editor-stepper-h-v20: 36px;
    --editor-status-h-v20: 76px;
  }

  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) .editor-count-strip {
    grid-template-columns: repeat(5, minmax(78px, 1fr)) !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
    top: calc(var(--editor-toolbar-h-v20) + var(--editor-count-h-v20)) !important;
    height: var(--editor-selected-h-v20) !important;
    min-height: var(--editor-selected-h-v20) !important;
    max-height: var(--editor-selected-h-v20) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-table {
    grid-template-rows: 1fr !important;
    height: var(--editor-selected-h-v20) !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
    grid-template-columns: minmax(0, 1fr) 74px 72px 66px !important;
    grid-template-areas:
      "title title title title"
      "sku status price date" !important;
    height: var(--editor-selected-h-v20) !important;
    padding: 4px 6px !important;
    gap: 4px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(1) {
    grid-area: date !important;
  }

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

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(4) {
    grid-area: sku !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(6) {
    grid-area: price !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(7) {
    grid-area: status !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell {
    height: 26px !important;
    padding: 2px 5px !important;
    border: 1px solid #d4e6f4 !important;
    border-radius: 7px !important;
    background: #fff !important;
    font-size: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: calc(var(--editor-toolbar-h-v20) + var(--editor-count-h-v20) + var(--editor-selected-h-v20)) !important;
    height: var(--editor-stepper-h-v20) !important;
    min-height: var(--editor-stepper-h-v20) !important;
    grid-template-columns: repeat(5, minmax(64px, 1fr)) !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: calc(var(--editor-toolbar-h-v20) + var(--editor-count-h-v20) + var(--editor-selected-h-v20) + var(--editor-stepper-h-v20)) !important;
    height: var(--editor-status-h-v20) !important;
    min-height: var(--editor-status-h-v20) !important;
    grid-template-columns: 1fr !important;
    gap: 4px !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 {
    height: 24px !important;
    min-height: 24px !important;
    font-size: 10px !important;
  }

  .accessories-grid,
  .accessory-grid,
  .accessory-buttons,
  .accessory-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .accessory-button,
  .accessory,
  .accessory-toggle,
  .accessories-grid button,
  .accessory-grid button,
  .accessory-buttons button {
    min-height: 24px !important;
    padding: 3px 4px !important;
    font-size: 9.5px !important;
  }

  .ai-recognition-card .ai-actions,
  .ai-camera-card .ai-actions,
  .ai-panel .ai-actions,
  .ai-action-row,
  .ai-upload-actions,
  .ai-recognition-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .ai-recognition-card button,
  .ai-camera-card button,
  .ai-panel button,
  .ai-action-row button,
  .ai-upload-actions button,
  .ai-recognition-actions button,
  .ai-upload-actions .file-button {
    height: 26px !important;
    min-height: 26px !important;
    padding: 0 4px !important;
    font-size: 10px !important;
  }
}

/* v20260719-editor-ledger-row-v15
   Final compact overrides for the listing ledger/editor split. */

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

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

body:not(.home-mode):not(.purchase-mode) #listingLedger th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) #listingLedger td:nth-child(1) {
  width: 180px !important;
}

body:not(.home-mode):not(.purchase-mode) #listingLedger th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) #listingLedger td:nth-child(2) {
  width: 112px !important;
}

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

body:not(.home-mode):not(.purchase-mode) #listingLedger th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) #listingLedger td:nth-child(4) {
  width: 126px !important;
}

body:not(.home-mode):not(.purchase-mode) #listingLedger th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) #listingLedger td:nth-child(5) {
  width: 122px !important;
}

body:not(.home-mode):not(.purchase-mode) #listingLedger th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) #listingLedger td:nth-child(6) {
  width: 92px !important;
}

body:not(.home-mode):not(.purchase-mode) #listingLedger th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) #listingLedger td:nth-child(7) {
  width: 88px !important;
}

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

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

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

body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title {
  position: static !important;
  min-width: 0 !important;
}

body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title > :not(strong),
body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title small,
body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title span,
body:not(.home-mode):not(.purchase-mode) #listingLedger td:not(.ledger-actions) .ledger-edit,
body:not(.home-mode):not(.purchase-mode) #listingLedger td:not(.ledger-actions) .ledger-delete {
  display: none !important;
}

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

body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-actions {
  position: static !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 4px !important;
  min-width: 0 !important;
  overflow: visible !important;
}

body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-actions .ledger-edit,
body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-actions .ledger-delete {
  position: static !important;
  transform: none !important;
  min-width: 42px !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 2px 7px !important;
  font-size: 12px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 4200 !important;
  min-height: 34px !important;
  height: 34px !important;
  padding: 4px 8px !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky !important;
  top: 34px !important;
  z-index: 4190 !important;
  min-height: 38px !important;
  height: 38px !important;
  padding: 4px 8px !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-chip {
  min-height: 28px !important;
  height: 28px !important;
  padding: 3px 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  border-radius: 7px !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;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
  position: sticky !important;
  top: 72px !important;
  z-index: 4180 !important;
  min-height: 52px !important;
  height: 52px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  background: #fff8d9 !important;
  box-shadow: 0 1px 0 #e8dca6 !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-row-label {
  position: absolute !important;
  left: 8px !important;
  top: 4px !important;
  margin: 0 !important;
  font-size: 10px !important;
  line-height: 1 !important;
  color: #5b6f82 !important;
  font-weight: 800 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-table {
  display: grid !important;
  grid-template-rows: 16px 36px !important;
  height: 52px !important;
  width: 100% !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
  display: grid !important;
  grid-template-columns: 188px 122px minmax(260px, 1fr) 126px 122px 92px 88px !important;
  align-items: center !important;
  gap: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head {
  padding: 2px 8px 0 !important;
  background: #eef7ff !important;
  border-bottom: 1px solid #cbdff0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head span {
  font-size: 10px !important;
  font-weight: 800 !important;
  color: #003858 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
  padding: 2px 8px !important;
  background: #fff8d9 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell {
  height: 28px !important;
  min-width: 0 !important;
  padding: 3px 6px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-purchase {
  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) .editor-selected-ledger-cell strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell span {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  position: sticky !important;
  top: 124px !important;
  z-index: 4170 !important;
  display: flex !important;
  align-items: center !important;
  min-height: 24px !important;
  height: 24px !important;
  max-height: 24px !important;
  padding: 2px 8px !important;
  gap: 8px !important;
  border-radius: 0 !important;
  overflow: hidden !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-note,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-url-details,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-audit,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #saveGasEndpointBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #checkAiConfigBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #syncEbayOrdersBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #setupEbayOrderSyncBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #promotePcMasterBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #listedDiffAuditEditorBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #syncToGasBtn {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-head {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions {
  margin-left: auto !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions button {
  min-height: 20px !important;
  height: 20px !important;
  padding: 1px 7px !important;
  font-size: 10px !important;
  border-radius: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: 148px !important;
  z-index: 4160 !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  min-height: 36px !important;
  height: 36px !important;
  padding: 3px 8px !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step:nth-child(n+6),
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="photos"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="summary"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="output"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="photos"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="summary"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="output"] {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step {
  min-height: 28px !important;
  gap: 1px !important;
  font-size: 11px !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: 184px !important;
  z-index: 4150 !important;
  min-height: 42px !important;
  padding: 5px 8px !important;
  border-radius: 0 !important;
  background: #f5fbff !important;
}

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

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-label strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #listingStatusText {
  font-size: 18px !important;
  line-height: 1 !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) .top-step-nav {
  padding: 7px 10px !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-nav .current-step-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-nav button {
  min-height: 34px !important;
  height: 34px !important;
  padding: 4px 12px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .panel,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .input-card {
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .compact-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .choice-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .toggle-button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-btn {
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  border-radius: 7px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-recognition-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-panel {
  padding: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-recognition-actions,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card .button-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-recognition-actions button,
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-card .button-row button {
  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) #analyzeSelectedPhotosBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-ai-action="analyze"] {
  border-color: #d13438 !important;
  color: #d13438 !important;
  font-weight: 800 !important;
}

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

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .preview-copy-actions button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .live-preview-panel .copy-actions button,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .html-preview-panel .copy-actions button {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
  border-radius: 7px !important;
}

@media (max-width: 760px) {
  body:not(.home-mode):not(.purchase-mode) #listingLedger,
  body:not(.home-mode):not(.purchase-mode) #listingLedger tbody,
  body:not(.home-mode):not(.purchase-mode) #listingLedger tr,
  body:not(.home-mode):not(.purchase-mode) #listingLedger td {
    display: block !important;
    width: 100% !important;
  }

  body:not(.home-mode):not(.purchase-mode) #listingLedger tr {
    padding: 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title strong {
    font-size: 13px !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }

  body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-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-editor-toolbar {
    height: 34px !important;
    min-height: 34px !important;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
    top: 68px !important;
    height: 50px !important;
    min-height: 50px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-row-label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-table {
    grid-template-rows: 1fr !important;
    height: 50px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
    grid-template-columns: minmax(0, 1fr) 78px 62px 62px !important;
    grid-template-rows: 22px 22px !important;
    gap: 3px !important;
    height: 50px !important;
    padding: 4px !important;
  }

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

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell {
    height: 20px !important;
    padding: 2px 5px !important;
    background: #fff !important;
    border: 1px solid #d4e6f4 !important;
    border-radius: 7px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
    top: 118px !important;
    min-height: 22px !important;
    height: 22px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions button:not(#quickSaveBtn):not(#syncFromGasBtn) {
    display: none !important;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 174px !important;
    min-height: 58px !important;
    grid-template-columns: 1fr !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) .ai-recognition-actions,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-action-row,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-card .button-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

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

/* 2026-07-20 selected-ledger/editor compact final override.
   Frontend-only: keeps DB/shared data untouched while fixing the active editor surface. */
:root {
  --editor-toolbar-h: 32px;
  --editor-count-h: 34px;
  --editor-selected-h: 44px;
  --editor-sync-h: 24px;
  --editor-stepper-h: 36px;
  --editor-status-h: 52px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 5600 !important;
  height: var(--editor-toolbar-h) !important;
  min-height: var(--editor-toolbar-h) !important;
  margin: 0 !important;
  padding: 4px 8px !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar h2 {
  font-size: 15px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar .pill-btn,
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 button {
  min-height: 24px !important;
  height: 24px !important;
  padding: 0 10px !important;
  font-size: 12px !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: 5590 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  height: var(--editor-count-h) !important;
  min-height: var(--editor-count-h) !important;
  margin: 0 !important;
  padding: 3px 6px !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 2px 8px !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;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
  position: sticky !important;
  top: calc(var(--editor-toolbar-h) + var(--editor-count-h)) !important;
  z-index: 5580 !important;
  height: var(--editor-selected-h) !important;
  min-height: var(--editor-selected-h) !important;
  max-height: var(--editor-selected-h) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-top: 1px solid #f1dca5 !important;
  border-bottom: 1px solid #f1dca5 !important;
  border-radius: 0 !important;
  background: #fff8d8 !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  position: absolute !important;
  left: 8px !important;
  top: 2px !important;
  margin: 0 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  color: #62748a !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-table {
  display: grid !important;
  grid-template-rows: 14px 1fr !important;
  height: 100% !important;
  padding: 2px 0 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
  display: grid !important;
  grid-template-columns: 166px 120px minmax(260px, 1.7fr) 118px 118px 96px 96px !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 0 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head {
  height: 14px !important;
  font-size: 10px !important;
  line-height: 1 !important;
  color: #5f7288 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
  height: 28px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell {
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #editorSelectedItemStatus {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 20px !important;
  padding: 2px 10px !important;
  border-radius: 999px !important;
  background: #f6eed8 !important;
  font-weight: 800 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  position: sticky !important;
  top: calc(var(--editor-toolbar-h) + var(--editor-count-h) + var(--editor-selected-h)) !important;
  z-index: 5570 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: var(--editor-sync-h) !important;
  min-height: var(--editor-sync-h) !important;
  max-height: var(--editor-sync-h) !important;
  margin: 0 !important;
  padding: 1px 8px !important;
  border-radius: 0 !important;
  overflow: hidden !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-note,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-url-details,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-audit,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #checkAiConfigBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #syncEbayOrdersBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #setupEbayOrderSyncBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #promotePcMasterBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #listedDiffAuditEditorBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #syncToGasBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #syncTombstonesBtn {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel button {
  min-height: 22px !important;
  height: 22px !important;
  padding: 0 8px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  line-height: 1 !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) + var(--editor-sync-h)) !important;
  z-index: 5560 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  height: var(--editor-stepper-h) !important;
  min-height: var(--editor-stepper-h) !important;
  margin: 0 !important;
  padding: 3px 8px !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step {
  min-height: 30px !important;
  padding: 0 !important;
  gap: 1px !important;
  font-size: 11px !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="photos"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="summary"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="output"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #step-photos,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #step-summary,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #step-output {
  display: none !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-sync-h) + var(--editor-stepper-h)) !important;
  z-index: 5550 !important;
  display: grid !important;
  grid-template-columns: 150px 1fr !important;
  gap: 8px !important;
  align-items: center !important;
  min-height: var(--editor-status-h) !important;
  margin: 0 !important;
  padding: 4px 8px !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .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-panel--global button {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
}

#listingLedger td:not(.ledger-actions) .ledger-edit,
#listingLedger td:not(.ledger-actions) .ledger-delete {
  display: none !important;
}

#listingLedger .ledger-title small,
#listingLedger .ledger-title .ledger-meta,
#listingLedger .ledger-title [class*="meta"],
#listingLedger .ledger-title .sub,
#listingLedger .ledger-title .muted,
#listingLedger .ledger-submeta {
  display: none !important;
}

#listingLedger .ledger-actions {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  min-width: 112px !important;
  white-space: nowrap !important;
}

#listingLedger .ledger-actions .ledger-edit,
#listingLedger .ledger-actions .ledger-delete {
  position: static !important;
  transform: none !important;
  margin: 0 !important;
  min-height: 26px !important;
  height: 26px !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-panel,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-recognition-panel,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #cameraAiPanel {
  padding: 8px !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-inline-actions,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-buttons,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-actions {
  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) #aiCaptureBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiPhotoBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtnAssist,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiAnalyzeQueuedBtnInline,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #aiClearBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-recognize-btn {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessories-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-grid,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .accessory-buttons,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #accessoriesGrid {
  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-toggle,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-accessory] {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 7px !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #copyConditionDescriptionBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #copyHtmlBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-copy="condition"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-copy="html"] {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
}

@media (max-width: 760px) {
  :root {
    --editor-toolbar-h: 30px;
    --editor-count-h: 32px;
    --editor-selected-h: 58px;
    --editor-sync-h: 20px;
    --editor-stepper-h: 34px;
    --editor-status-h: 56px;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-table {
    grid-template-rows: 1fr !important;
    padding-top: 2px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
    grid-template-columns: 1fr 74px 70px 64px !important;
    grid-template-areas:
      "title title title title"
      "date sku price status" !important;
    gap: 3px !important;
    height: 56px !important;
    padding: 4px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(1) { grid-area: date !important; }
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(2) { display: none !important; }
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-title-cell { grid-area: title !important; }
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(4) { grid-area: sku !important; }
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(5) { display: none !important; }
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(6) { grid-area: price !important; text-align: right !important; }
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(7) { grid-area: status !important; }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-status,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel button:not(#saveToGasBtn):not(#readFromGasBtn) {
    display: none !important;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-actions {
    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,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-inline-actions,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-buttons,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .ai-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  #listingLedger .ledger-actions {
    min-width: 96px !important;
    gap: 4px !important;
  }

  #listingLedger .ledger-actions .ledger-edit,
  #listingLedger .ledger-actions .ledger-delete {
    min-height: 24px !important;
    height: 24px !important;
    padding: 0 7px !important;
    font-size: 11px !important;
  }
}

/* 20260719 v10: ledger-like selected item row, compact sticky editor, and real DOM fixes */
#listingLedger td:not(.ledger-actions) .ledger-edit,
#listingLedger td:not(.ledger-actions) .ledger-delete,
#listingLedger .ledger-title .ledger-edit,
#listingLedger .ledger-title .ledger-delete,
#listingLedger .ledger-title small,
#listingLedger .ledger-title .ledger-row-meta,
#listingLedger .ledger-title .ledger-title-meta,
#listingLedger .ledger-title .ledger-title-sub,
#listingLedger .ledger-inline-actions {
  display: none !important;
}

#listingLedger .ledger-title strong {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#listingLedger tr {
  position: relative !important;
}

#listingLedger td {
  vertical-align: middle !important;
}

#listingLedger td:nth-child(1) { width: 214px !important; }
#listingLedger td:nth-child(2) { width: 132px !important; }
#listingLedger td:nth-child(3) { width: auto !important; }
#listingLedger td:nth-child(4) { width: 138px !important; }
#listingLedger td:nth-child(5) { width: 118px !important; }
#listingLedger td:nth-child(6) { width: 94px !important; }
#listingLedger td:nth-child(7) { width: 82px !important; }
#listingLedger td:nth-child(8) { width: 90px !important; }

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

#listingLedger .ledger-edit-input,
#listingLedger .ledger-order-input {
  min-height: 26px !important;
  padding: 2px 6px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

#listingLedger .status-badge {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 24px !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

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

#listingLedger .ledger-actions .ledger-edit,
#listingLedger .ledger-actions .ledger-delete {
  min-height: 24px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 1910 !important;
  min-height: 30px !important;
  padding: 3px 6px !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky !important;
  top: 30px !important;
  z-index: 1900 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(96px, 1fr)) !important;
  gap: 6px !important;
  min-height: 32px !important;
  padding: 4px 6px !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
  position: sticky !important;
  top: 62px !important;
  z-index: 1890 !important;
  display: grid !important;
  grid-template-columns: 88px minmax(0, 1fr) !important;
  align-items: stretch !important;
  min-height: 44px !important;
  max-height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  background: #fff8dc !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  display: flex !important;
  align-items: center !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  color: #587086 !important;
  background: #fff8dc !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-table {
  display: grid !important;
  grid-template-rows: 17px 27px !important;
  min-width: 0 !important;
  overflow-x: auto !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
  display: grid !important;
  grid-template-columns: 142px 112px minmax(220px, 1fr) 124px 112px 86px 88px !important;
  align-items: center !important;
  min-width: 900px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head span {
  padding: 0 8px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 17px !important;
  color: #35536d !important;
  background: #eef7ff !important;
  border-bottom: 1px solid #cfe2f0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell {
  min-width: 0 !important;
  padding: 2px 8px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell span {
  display: inline !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  position: sticky !important;
  top: 106px !important;
  z-index: 1880 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  margin: 0 !important;
  padding: 1px 6px !important;
  overflow: hidden !important;
  border-radius: 0 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head {
  flex: 0 0 auto !important;
  min-width: 96px !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 4px !important;
  overflow-x: auto !important;
  flex-wrap: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions button {
  flex: 0 0 auto !important;
  min-height: 22px !important;
  padding: 2px 6px !important;
  border-radius: 7px !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: 130px !important;
  z-index: 1870 !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 4px 6px !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper [data-step="output"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="output"] {
  display: none !important;
}

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

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: 164px !important;
  z-index: 1860 !important;
  display: grid !important;
  grid-template-columns: 128px minmax(0, 1fr) !important;
  gap: 8px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 4px 8px !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global h3,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-label {
  font-size: 18px !important;
  line-height: 1.05 !important;
  margin: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .listing-status-actions {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(84px, 1fr)) !important;
  gap: 5px !important;
  min-width: 0 !important;
  overflow-x: auto !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .main-grid {
  padding-top: 6px !important;
}

.start-card.ai-drop-zone {
  padding: 8px !important;
  gap: 6px !important;
}

.start-card.ai-drop-zone .start-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 9px !important;
  font-size: 16px !important;
}

.start-card.ai-drop-zone h4 {
  margin: 0 !important;
  font-size: 16px !important;
  line-height: 1.1 !important;
}

.start-card.ai-drop-zone p {
  margin: 2px 0 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.start-card.ai-drop-zone .ai-cost-links {
  position: static !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  margin-left: auto !important;
}

.start-card.ai-drop-zone .ai-cost-links button {
  min-height: 24px !important;
  padding: 2px 7px !important;
  border-radius: 999px !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-height: 28px !important;
  padding: 2px 6px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

.ai-action-row .ai-recognize-btn {
  border-color: #e5484d !important;
  background: #fff1f0 !important;
  color: #b42318 !important;
  font-weight: 900 !important;
}

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

.accessory-grid .accessory {
  min-height: 30px !important;
  padding: 3px 5px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  line-height: 1.05 !important;
  overflow: hidden !important;
  overflow-wrap: anywhere !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

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

.live-preview-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-bottom: 6px !important;
}

.live-preview-actions {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  margin: 0 !important;
}

.live-preview-actions .compact-copy {
  min-height: 28px !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

.live-preview-frame-card {
  margin-top: 6px !important;
}

.live-preview-frame-card .output-card-head {
  margin-bottom: 4px !important;
}

.live-preview-shell {
  min-height: 58vh !important;
}

@media (max-width: 700px) {
  body {
    overflow-x: hidden !important;
  }

  .hero,
  .status-grid,
  .ledger-panel,
  .editor-shell,
  .editor-selected-item-bar,
  .sync-panel,
  .stepper,
  .listing-status-panel--global {
    max-width: 100vw !important;
  }

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

  #listingLedger tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto auto !important;
    gap: 5px 6px !important;
    align-items: center !important;
    margin: 7px 10px !important;
    padding: 8px !important;
    border: 1px solid #cfe2f0 !important;
    border-radius: 10px !important;
    background: #fff !important;
  }

  #listingLedger td {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  #listingLedger td:nth-child(3) {
    grid-column: 1 / -1 !important;
    order: 1 !important;
  }

  #listingLedger td:nth-child(4) {
    order: 2 !important;
  }

  #listingLedger td:nth-child(1) {
    order: 2 !important;
  }

  #listingLedger td:nth-child(7) {
    order: 2 !important;
  }

  #listingLedger td:nth-child(8) {
    order: 2 !important;
  }

  #listingLedger td:nth-child(2),
  #listingLedger td:nth-child(5),
  #listingLedger td:nth-child(6) {
    grid-column: span 2 !important;
    order: 3 !important;
  }

  #listingLedger .ledger-purchase-fields {
    display: flex !important;
    gap: 4px !important;
  }

  #listingLedger .ledger-purchase-fields input:nth-child(2) {
    display: none !important;
  }

  #listingLedger .ledger-edit-input,
  #listingLedger .ledger-order-input {
    min-height: 28px !important;
    max-width: 100% !important;
    padding: 3px 6px !important;
    font-size: 12px !important;
  }

  #listingLedger .ledger-sku-input {
    max-width: 104px !important;
  }

  #listingLedger .ledger-price-input {
    text-align: right !important;
  }

  #listingLedger .ledger-title strong {
    font-size: 15px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
  }

  #listingLedger .ledger-actions {
    gap: 4px !important;
  }

  #listingLedger .ledger-actions .ledger-edit,
  #listingLedger .ledger-actions .ledger-delete {
    min-height: 26px !important;
    padding: 3px 7px !important;
    font-size: 11px !important;
  }

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

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
    top: 62px !important;
    grid-template-columns: 74px minmax(0, 1fr) !important;
    min-height: 42px !important;
    max-height: 42px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
    grid-template-columns: 104px 90px minmax(170px, 1fr) 98px 92px 72px 76px !important;
    min-width: 702px !important;
  }

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

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 162px !important;
    grid-template-columns: 82px minmax(0, 1fr) !important;
    gap: 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global h3,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-label {
    font-size: 15px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .listing-status-actions {
    grid-template-columns: repeat(5, minmax(72px, 1fr)) !important;
  }

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

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

  .accessory-grid .accessory {
    min-height: 28px !important;
    font-size: 10px !important;
  }
}

/* Editor header tightening: show the selected ledger item as a real ledger row,
   keep the shared DB short, and remove the legacy summary step from the flow. */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
  top: 90px !important;
  z-index: 1240 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #ead68c !important;
  border-radius: 0 !important;
  background: #fff8d9 !important;
  box-shadow: 0 1px 0 rgba(148, 185, 210, .35) !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-row-label {
  padding: 3px 8px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  font-weight: 700 !important;
  color: #50687d !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-row {
  display: grid !important;
  grid-template-columns: minmax(150px, 1fr) 140px minmax(280px, 2.2fr) 140px 130px 100px 110px !important;
  gap: 0 !important;
  align-items: stretch !important;
  border-top: 1px solid #ead68c !important;
  background: #fff8d9 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell {
  display: flex !important;
  min-width: 0 !important;
  min-height: 42px !important;
  padding: 5px 8px !important;
  flex-direction: column !important;
  justify-content: center !important;
  border: 0 !important;
  border-right: 1px solid #d5e4ef !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell:last-child {
  border-right: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell span {
  font-size: 11px !important;
  line-height: 1.1 !important;
  font-weight: 700 !important;
  color: #50687d !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell small {
  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) .editor-selected-item-bar .editor-ledger-cell strong {
  font-size: 14px !important;
  line-height: 1.2 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell small {
  font-size: 11px !important;
  line-height: 1.1 !important;
  color: #50687d !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  top: 148px !important;
  z-index: 1230 !important;
  display: grid !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 5px 10px !important;
  grid-template-columns: auto 1fr !important;
  align-items: center !important;
  gap: 6px 10px !important;
  border-radius: 0 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head {
  display: flex !important;
  min-width: 128px !important;
  align-items: center !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head strong {
  font-size: 15px !important;
  line-height: 1.2 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head span {
  font-size: 12px !important;
  line-height: 1.2 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions button {
  min-height: 30px !important;
  padding: 5px 9px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  top: 196px !important;
  z-index: 1220 !important;
  min-height: 52px !important;
  padding: 8px 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper [data-step="output"] {
  display: none !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-navigation--last {
  justify-content: flex-start !important;
}

@media (max-width: 700px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
    top: 86px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-row {
    grid-template-columns: 1fr 1fr !important;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell {
    min-height: 38px !important;
    padding: 4px 7px !important;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
    top: 214px !important;
    grid-template-columns: 1fr !important;
    padding: 5px 8px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    padding-bottom: 2px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions button {
    flex: 0 0 auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 270px !important;
    min-height: 50px !important;
    padding: 7px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 324px !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) .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 {
  position: sticky !important;
  background: #eef8ff !important;
  box-shadow: 0 1px 0 rgba(148, 185, 210, .45) !important;
  transform: translateZ(0);
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  top: 0 !important;
  z-index: 1260 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: 42px !important;
  z-index: 1250 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  top: 90px !important;
  z-index: 1240 !important;
  margin: 4px 0 0 !important;
  border: 1px solid #f0d883 !important;
  border-radius: 10px !important;
  background: #fff8d9 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  top: 148px !important;
  z-index: 1230 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  top: 196px !important;
  z-index: 1220 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-grid {
  align-items: center !important;
}

@media (max-width: 700px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    top: 0 !important;
    z-index: 1260 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    top: 38px !important;
    z-index: 1250 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
    top: 86px !important;
    z-index: 1240 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
    top: 214px !important;
    z-index: 1230 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: 270px !important;
    z-index: 1220 !important;
  }

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

/* 20260719 ledger/editor hotfix v6.
   Final override layer: keep the selected listing as a compact ledger row,
   collapse the shared DB bar, hide the obsolete step 5/output screen, and
   prevent duplicated ledger action buttons from floating over the title. */
body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title .ledger-mobile-meta,
body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title .ledger-mobile-chip,
body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title .ledger-mobile-status,
body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title .ledger-mobile-edit,
body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title .ledger-mobile-delete,
body:not(.home-mode):not(.purchase-mode) #listingLedger .ledger-mobile-meta,
body:not(.home-mode):not(.purchase-mode) #listingLedger .ledger-mobile-edit,
body:not(.home-mode):not(.purchase-mode) #listingLedger .ledger-mobile-delete {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title {
  position: static !important;
  display: table-cell !important;
  min-width: 0 !important;
  padding: 6px 8px !important;
  overflow: hidden !important;
  vertical-align: middle !important;
}

body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title strong {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title small,
body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title > span:not(.status-badge) {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-actions {
  display: table-cell !important;
  width: 112px !important;
  min-width: 112px !important;
  padding: 4px 6px !important;
  text-align: right !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
}

body:not(.home-mode):not(.purchase-mode) #listingLedger .ledger-actions button {
  position: static !important;
  display: inline-flex !important;
  width: auto !important;
  min-width: 42px !important;
  min-height: 26px !important;
  margin: 0 0 0 4px !important;
  padding: 2px 7px !important;
  align-items: center !important;
  justify-content: center !important;
  transform: none !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  line-height: 1.1 !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;
  z-index: 1600 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip .metric-card {
  min-height: 34px !important;
  padding: 5px 9px !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
  position: sticky !important;
  top: 80px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 1580 !important;
  border: 1px solid #efd978 !important;
  border-radius: 0 !important;
  background: #fff8d9 !important;
  box-shadow: 0 1px 0 rgba(148, 185, 210, .4) !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-row-label {
  position: absolute !important;
  top: 2px !important;
  left: 8px !important;
  padding: 0 !important;
  font-size: 10px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  color: #50687d !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-row {
  display: grid !important;
  grid-template-columns: 170px 120px minmax(260px, 1fr) 130px 120px 95px 100px !important;
  gap: 0 !important;
  align-items: stretch !important;
  padding-top: 12px !important;
  border-top: 0 !important;
  background: #fff8d9 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell {
  display: flex !important;
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 3px 7px !important;
  flex-direction: column !important;
  justify-content: center !important;
  border: 0 !important;
  border-right: 1px solid #d5e4ef !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell:last-child {
  border-right: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell span {
  display: block !important;
  font-size: 10px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  color: #50687d !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell small {
  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) .editor-selected-item-bar .editor-ledger-cell strong {
  font-size: 13px !important;
  line-height: 1.1 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell small {
  font-size: 9px !important;
  line-height: 1 !important;
  color: #50687d !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  position: sticky !important;
  top: 122px !important;
  display: grid !important;
  min-height: 34px !important;
  max-height: 34px !important;
  margin: 0 !important;
  padding: 3px 8px !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 4px 8px !important;
  z-index: 1570 !important;
  border-radius: 0 !important;
  background: #e8f6ff !important;
  overflow: hidden !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head {
  display: flex !important;
  min-width: 110px !important;
  align-items: center !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head strong {
  font-size: 13px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head span {
  font-size: 10px !important;
  line-height: 1 !important;
}

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

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: 156px !important;
  min-height: 44px !important;
  padding: 5px 8px !important;
  z-index: 1560 !important;
  background: #07324f !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper [data-step="output"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="output"] {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: 200px !important;
  min-height: 44px !important;
  padding: 5px 8px !important;
  z-index: 1550 !important;
  background: #f1faff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .main-grid {
  padding-top: 6px !important;
}

@media (max-width: 700px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    min-height: 34px !important;
    padding: 4px 6px !important;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
    top: 72px !important;
    max-height: 104px !important;
    overflow: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-row {
    grid-template-columns: 1fr 1fr !important;
    padding-top: 13px !important;
  }

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

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
    top: 176px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    grid-template-columns: 1fr !important;
    padding: 2px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions {
    justify-content: flex-start !important;
  }

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

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

/* 20260719 ledger/editor hotfix v9: selected row, compact sticky editor, cache refresh */
#listingLedger td.ledger-title {
  position: static !important;
  display: table-cell !important;
  min-width: 250px !important;
  max-width: 520px !important;
  padding: 4px 8px !important;
  vertical-align: middle !important;
}

#listingLedger td.ledger-title strong {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#listingLedger td.ledger-title small,
#listingLedger td.ledger-title span:not(.status-badge),
#listingLedger .ledger-mobile-meta,
#listingLedger .ledger-mobile-chip,
#listingLedger .ledger-mobile-status,
#listingLedger .ledger-mobile-edit,
#listingLedger .ledger-mobile-delete {
  display: none !important;
}

#listingLedger td.ledger-actions {
  position: static !important;
  display: table-cell !important;
  width: 104px !important;
  min-width: 104px !important;
  max-width: 104px !important;
  padding: 4px 6px !important;
  white-space: nowrap !important;
  text-align: right !important;
  vertical-align: middle !important;
}

#listingLedger td.ledger-actions .ledger-edit,
#listingLedger td.ledger-actions .ledger-delete {
  position: static !important;
  display: inline-flex !important;
  min-width: 42px !important;
  min-height: 26px !important;
  margin: 0 0 0 4px !important;
  padding: 2px 7px !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  transform: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  position: sticky !important;
  top: 0 !important;
  min-height: 34px !important;
  padding: 3px 6px !important;
  z-index: 1900 !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar .secondary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar .primary-btn {
  min-height: 27px !important;
  padding: 2px 9px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-title {
  font-size: 15px !important;
  line-height: 1.1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky !important;
  top: 34px !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  min-height: 34px !important;
  padding: 3px 6px !important;
  margin: 0 !important;
  z-index: 1880 !important;
  background: #eef8ff !important;
  overflow: hidden !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-width: 0 !important;
  min-height: 28px !important;
  padding: 3px 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;
  white-space: nowrap !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.editor-ledger-row-preview {
  position: sticky !important;
  top: 68px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 1860 !important;
  border: 1px solid #efd978 !important;
  border-radius: 0 !important;
  background: #fff8d9 !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-row-label {
  position: absolute !important;
  top: 2px !important;
  left: 6px !important;
  font-size: 9px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-row {
  display: grid !important;
  grid-template-columns: 190px 110px minmax(280px, 1fr) 126px 120px 86px 88px !important;
  gap: 0 !important;
  width: 100% !important;
  padding-top: 12px !important;
  background: #fff8d9 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell {
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 2px 6px !important;
  border: 0 !important;
  border-right: 1px solid #d5e4ef !important;
  border-radius: 0 !important;
  background: transparent !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell:last-child {
  border-right: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell span {
  display: block !important;
  font-size: 9px !important;
  line-height: 1 !important;
  color: #50687d !important;
  font-weight: 700 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell small {
  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) .editor-selected-item-bar .editor-ledger-cell strong {
  font-size: 12px !important;
  line-height: 1.05 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-cell small {
  font-size: 9px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  position: sticky !important;
  top: 110px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 4px 8px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 2px 6px !important;
  margin: 0 !important;
  z-index: 1840 !important;
  border-radius: 0 !important;
  background: #e8f6ff !important;
  overflow: hidden !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head {
  display: flex !important;
  min-width: 110px !important;
  align-items: center !important;
  gap: 5px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head strong {
  font-size: 12px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head span {
  font-size: 10px !important;
  line-height: 1 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions button {
  flex: 0 0 auto !important;
  min-height: 23px !important;
  padding: 2px 6px !important;
  border-radius: 7px !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: 138px !important;
  min-height: 38px !important;
  padding: 4px 6px !important;
  z-index: 1820 !important;
  background: #07324f !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper [data-step="output"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step-pill[data-step="output"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="output"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .workflow-section[data-section="output"] {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: 176px !important;
  min-height: 40px !important;
  padding: 4px 6px !important;
  z-index: 1800 !important;
  border-radius: 0 !important;
  background: #f1faff !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: 28px !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .main-grid {
  padding-top: 6px !important;
}

.ai-recognition-card,
.ai-camera-card,
.ai-panel {
  padding: 10px !important;
}

.ai-recognition-card button,
.ai-camera-card button,
.ai-panel button {
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

.ai-recognition-card .ai-actions,
.ai-camera-card .ai-actions,
.ai-panel .ai-actions,
.ai-recognition-card .ai-upload-actions,
.ai-camera-card .ai-upload-actions,
.ai-panel .ai-upload-actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

#recognizeImageBtn,
button[id*="recognize" i] {
  border-color: #f08a7b !important;
  color: #b42318 !important;
  font-weight: 800 !important;
}

.accessories-grid button,
.accessory-grid button,
.accessory-chip,
.accessory-toggle,
[data-accessory] {
  min-height: 28px !important;
  padding: 3px 8px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

@media (max-width: 700px) {
  #listingLedger .ledger-mobile-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 4px 6px !important;
    padding: 8px !important;
  }

  #listingLedger .ledger-mobile-title {
    grid-column: 1 / -1 !important;
  }

  #listingLedger .ledger-mobile-compact-line {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    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(86px, 1fr)) !important;
    min-height: 32px !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
    top: 64px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar .editor-ledger-row {
    min-width: 760px !important;
    grid-template-columns: 118px 90px 220px 98px 108px 76px 82px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
    top: 112px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    grid-template-columns: 1fr !important;
    padding: 1px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions {
    justify-content: flex-start !important;
  }

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

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-buttons {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(78px, 1fr)) !important;
    overflow-x: auto !important;
  }

  .ai-recognition-card .ai-actions,
  .ai-camera-card .ai-actions,
  .ai-panel .ai-actions,
  .ai-recognition-card .ai-upload-actions,
  .ai-camera-card .ai-upload-actions,
  .ai-panel .ai-upload-actions {
    grid-template-columns: repeat(4, minmax(58px, 1fr)) !important;
  }
}

/* 20260719 v11: final compact ledger/editor overrides. */
[data-section="output"],
.workflow-section[data-section="output"],
.stepper [data-step="output"],
.stepper .step-pill[data-step="output"],
.stepper .step[data-step="output"] {
  display: none !important;
}

#listingLedger {
  table-layout: fixed !important;
  width: 100% !important;
}

#listingLedger th,
#listingLedger td {
  padding: 4px 6px !important;
  vertical-align: middle !important;
}

#listingLedger .ledger-title > :not(strong) {
  display: none !important;
}

#listingLedger tr > td:not(.ledger-actions) .ledger-edit,
#listingLedger tr > td:not(.ledger-actions) .ledger-delete {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

#listingLedger td.ledger-actions {
  display: table-cell !important;
  max-width: 112px !important;
  min-width: 112px !important;
  padding: 4px 6px !important;
  position: static !important;
  text-align: right !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  width: 112px !important;
}

#listingLedger td.ledger-actions .ledger-edit,
#listingLedger td.ledger-actions .ledger-delete {
  align-items: center !important;
  display: inline-flex !important;
  font-size: 12px !important;
  justify-content: center !important;
  line-height: 1.1 !important;
  margin-left: 4px !important;
  min-height: 24px !important;
  min-width: 42px !important;
  padding: 2px 7px !important;
  position: static !important;
  transform: none !important;
}

#listingLedger th:nth-child(1),
#listingLedger td:nth-child(1) {
  max-width: 172px !important;
  width: 172px !important;
}

#listingLedger th:nth-child(2),
#listingLedger td:nth-child(2) {
  max-width: 118px !important;
  width: 118px !important;
}

#listingLedger th:nth-child(4),
#listingLedger td:nth-child(4) {
  max-width: 118px !important;
  width: 118px !important;
}

#listingLedger th:nth-child(5),
#listingLedger td:nth-child(5) {
  max-width: 112px !important;
  width: 112px !important;
}

#listingLedger th:nth-child(6),
#listingLedger td:nth-child(6) {
  max-width: 78px !important;
  width: 78px !important;
}

#listingLedger th:nth-child(7),
#listingLedger td:nth-child(7) {
  max-width: 78px !important;
  width: 78px !important;
}

#listingLedger th:nth-child(8),
#listingLedger td:nth-child(8) {
  max-width: 112px !important;
  width: 112px !important;
}

#listingLedger .ledger-purchase-fields {
  display: grid !important;
  gap: 4px !important;
  grid-template-columns: minmax(78px, 1fr) minmax(76px, 1fr) !important;
}

#listingLedger .ledger-edit-input,
#listingLedger .ledger-order-input {
  border-radius: 7px !important;
  font-size: 12px !important;
  min-height: 26px !important;
  padding: 2px 6px !important;
}

#listingLedger .status-badge {
  font-size: 12px !important;
  min-height: 24px !important;
  padding: 2px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
  background: #fff8d7 !important;
  border-bottom: 1px solid #f0d98a !important;
  border-radius: 0 !important;
  border-top: 1px solid #f0d98a !important;
  margin: 0 !important;
  max-height: none !important;
  min-height: auto !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 0 !important;
  position: sticky !important;
  top: 72px !important;
  z-index: 1885 !important;
}

.editor-ledger-row-label {
  color: #526a82 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  padding: 2px 6px 1px !important;
}

.editor-selected-ledger-table {
  min-width: 0 !important;
  overflow-x: auto !important;
}

.editor-selected-ledger-head,
.editor-selected-ledger-row {
  display: grid !important;
  grid-template-columns: 172px 118px minmax(260px, 1fr) 118px 112px 78px 90px !important;
  min-width: 948px !important;
}

.editor-selected-ledger-head span {
  background: #eaf5fc !important;
  border-bottom: 1px solid #cfe3f1 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  padding: 2px 6px !important;
  white-space: nowrap !important;
}

.editor-selected-ledger-cell {
  align-items: center !important;
  background: #fff8d7 !important;
  border-right: 1px solid rgba(207, 227, 241, 0.6) !important;
  display: flex !important;
  font-size: 13px !important;
  gap: 6px !important;
  min-height: 30px !important;
  min-width: 0 !important;
  padding: 3px 6px !important;
}

.editor-selected-title-cell 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) .sync-panel {
  align-items: center !important;
  display: grid !important;
  gap: 6px !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  margin: 0 !important;
  max-height: 42px !important;
  min-height: 32px !important;
  overflow: hidden !important;
  padding: 3px 8px !important;
  position: sticky !important;
  top: 126px !important;
  z-index: 1875 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-note,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-url-details,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-main p:nth-of-type(n+2) {
  display: none !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel p {
  font-size: 11px !important;
  line-height: 1.15 !important;
  margin: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel button {
  border-radius: 7px !important;
  font-size: 11px !important;
  min-height: 24px !important;
  padding: 2px 7px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  background: #07324f !important;
  border-radius: 0 !important;
  margin: 0 !important;
  min-height: 40px !important;
  padding: 4px 6px !important;
  position: sticky !important;
  top: 168px !important;
  z-index: 1865 !important;
}

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

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

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  border-radius: 0 !important;
  margin: 0 !important;
  min-height: 42px !important;
  padding: 4px 6px !important;
  position: sticky !important;
  top: 208px !important;
  z-index: 1855 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-buttons,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .listing-status-actions {
  display: grid !important;
  gap: 6px !important;
  grid-template-columns: repeat(5, minmax(88px, 1fr)) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-option,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .listing-status-btn {
  border-radius: 999px !important;
  font-size: 12px !important;
  min-height: 28px !important;
  padding: 2px 8px !important;
}

.ai-action-row,
.ai-recognition-card .ai-actions,
.ai-camera-card .ai-actions,
.ai-panel .ai-actions,
.ai-recognition-card .ai-upload-actions,
.ai-camera-card .ai-upload-actions,
.ai-panel .ai-upload-actions {
  align-items: center !important;
  display: grid !important;
  gap: 6px !important;
  grid-template-columns: repeat(4, minmax(70px, 1fr)) !important;
}

.ai-action-row .upload-box,
.ai-action-row button,
.ai-recognition-card button,
.ai-camera-card button,
.ai-panel button {
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  min-height: 28px !important;
  padding: 2px 8px !important;
  white-space: nowrap !important;
}

#recognizeImageBtn,
button[id*="recognize" i],
.ai-recognize-btn {
  background: #fff1f1 !important;
  border-color: #fca5a5 !important;
  color: #b91c1c !important;
  font-weight: 900 !important;
}

.accessories-grid,
.accessory-grid {
  gap: 6px !important;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)) !important;
}

.accessories-grid button,
.accessory-grid button,
.accessory-chip,
.accessory-toggle,
[data-accessory] {
  font-size: 12px !important;
  line-height: 1.05 !important;
  min-height: 28px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  padding: 2px 6px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.live-copy-actions {
  align-items: center !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 8px !important;
  justify-content: flex-end !important;
  margin: 0 0 8px !important;
}

.live-copy-actions .primary-btn {
  font-size: 13px !important;
  min-height: 30px !important;
  padding: 4px 12px !important;
}

@media (max-width: 700px) {
  #listingLedger,
  #listingLedger tbody {
    display: block !important;
    width: 100% !important;
  }

  #listingLedger thead {
    display: none !important;
  }

  #listingLedger tr {
    border: 1px solid #cfe3f1 !important;
    border-radius: 10px !important;
    display: grid !important;
    gap: 5px !important;
    grid-template-columns: 1fr auto auto auto !important;
    margin: 8px 0 !important;
    padding: 8px !important;
  }

  #listingLedger td {
    border: 0 !important;
    display: block !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 0 !important;
    width: auto !important;
  }

  #listingLedger td:nth-child(3) {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }

  #listingLedger td:nth-child(4) {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  #listingLedger td:nth-child(1) {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  #listingLedger td:nth-child(7) {
    grid-column: 3 !important;
    grid-row: 2 !important;
  }

  #listingLedger td.ledger-actions {
    display: flex !important;
    grid-column: 4 !important;
    grid-row: 2 !important;
    justify-content: flex-end !important;
    max-width: none !important;
    min-width: 86px !important;
    width: auto !important;
  }

  #listingLedger td:nth-child(2),
  #listingLedger td:nth-child(5),
  #listingLedger td:nth-child(6) {
    display: none !important;
  }

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

  #listingLedger .ledger-purchase-fields {
    grid-template-columns: 86px !important;
  }

  #listingLedger .ledger-purchase-fields input:nth-child(2) {
    display: none !important;
  }

  #listingLedger .ledger-edit-input,
  #listingLedger .ledger-order-input,
  #listingLedger .status-badge {
    font-size: 12px !important;
    min-height: 24px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
    top: 54px !important;
  }

  .editor-selected-ledger-head {
    display: none !important;
  }

  .editor-selected-ledger-row {
    grid-template-columns: minmax(0, 1fr) auto auto auto !important;
    min-width: 0 !important;
    padding: 5px 6px !important;
  }

  .editor-selected-ledger-cell {
    border: 0 !important;
    font-size: 12px !important;
    min-height: 24px !important;
    padding: 1px 4px !important;
  }

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

  .editor-selected-title-cell {
    grid-column: 1 !important;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-main {
    display: none !important;
  }

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

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

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

  .ai-action-row,
  .ai-recognition-card .ai-actions,
  .ai-camera-card .ai-actions,
  .ai-panel .ai-actions,
  .ai-recognition-card .ai-upload-actions,
  .ai-camera-card .ai-upload-actions,
  .ai-panel .ai-upload-actions {
    grid-template-columns: repeat(4, minmax(50px, 1fr)) !important;
  }

  .accessories-grid,
  .accessory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* 20260719 v13 final editor compaction and ledger-row lock.
   Keep these overrides together so later UI changes have one obvious place to adjust. */
#listingLedger {
  table-layout: fixed !important;
  width: 100% !important;
}

#listingLedger th:nth-child(1),
#listingLedger td:nth-child(1) {
  width: 220px !important;
}

#listingLedger th:nth-child(2),
#listingLedger td:nth-child(2) {
  width: 142px !important;
}

#listingLedger th:nth-child(3),
#listingLedger td:nth-child(3) {
  width: auto !important;
}

#listingLedger th:nth-child(4),
#listingLedger td:nth-child(4) {
  width: 136px !important;
}

#listingLedger th:nth-child(5),
#listingLedger td:nth-child(5) {
  width: 124px !important;
}

#listingLedger th:nth-child(6),
#listingLedger td:nth-child(6) {
  width: 94px !important;
}

#listingLedger th:nth-child(7),
#listingLedger td:nth-child(7) {
  width: 88px !important;
}

#listingLedger th:nth-child(8),
#listingLedger td:nth-child(8) {
  width: 112px !important;
}

#listingLedger td.ledger-title > :not(strong),
#listingLedger td.ledger-title small,
#listingLedger td.ledger-title span,
#listingLedger td.ledger-title .ledger-meta,
#listingLedger td:not(.ledger-actions) > .ledger-edit,
#listingLedger td:not(.ledger-actions) > .ledger-delete,
#listingLedger td:not(.ledger-actions) .ledger-edit,
#listingLedger td:not(.ledger-actions) .ledger-delete,
#listingLedger td:nth-child(3) button {
  display: none !important;
}

#listingLedger td.ledger-title strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#listingLedger td.ledger-actions {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  min-width: 0 !important;
  padding: 6px 8px !important;
}

#listingLedger td.ledger-actions .ledger-edit,
#listingLedger td.ledger-actions .ledger-delete {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 44px !important;
  height: 30px !important;
  padding: 4px 9px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  border-radius: 999px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
  position: sticky !important;
  top: 0 !important;
  z-index: 120 !important;
  margin: 0 !important;
  padding: 4px 6px !important;
  border-radius: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  background: #fff8d8 !important;
  box-shadow: 0 1px 0 rgba(6, 43, 70, 0.14) !important;
}

.editor-ledger-row-label {
  color: #40556a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  margin: 0 0 2px !important;
}

.editor-selected-ledger-table {
  display: grid !important;
  gap: 2px !important;
  width: 100% !important;
  overflow: hidden !important;
}

.editor-selected-ledger-head,
.editor-selected-ledger-row {
  display: grid !important;
  grid-template-columns: 1.15fr 0.85fr minmax(260px, 2.7fr) 0.9fr 1fr 0.8fr 0.85fr !important;
  gap: 6px !important;
  align-items: center !important;
  min-width: 0 !important;
}

.editor-selected-ledger-head span {
  color: #063454 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

.editor-selected-ledger-cell {
  min-width: 0 !important;
  height: 30px !important;
  padding: 3px 7px !important;
  border: 1px solid #c7dcea !important;
  border-radius: 7px !important;
  background: #fff !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 13px !important;
}

.editor-selected-ledger-cell strong,
.editor-selected-ledger-cell span {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.editor-selected-purchase {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 4px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  position: sticky !important;
  top: 42px !important;
  z-index: 115 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  min-height: 36px !important;
  max-height: 44px !important;
  padding: 4px 8px !important;
  margin: 0 !important;
  overflow: hidden !important;
  border-radius: 0 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-main {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  max-width: 72vw !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions button {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 8px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: 78px !important;
  z-index: 114 !important;
  min-height: 52px !important;
  padding: 5px 8px !important;
  border-radius: 0 !important;
  background: #063454 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: 130px !important;
  z-index: 113 !important;
  padding: 6px 8px !important;
  margin: 0 !important;
  border-radius: 0 !important;
  background: #f1f8fd !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .status-buttons,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global .listing-status-actions {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(96px, 1fr)) !important;
  gap: 6px !important;
}

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

.stepper [data-step="output"],
.stepper [data-step="summary"],
.stepper .step[data-step="output"],
.stepper .step[data-step="summary"],
[data-step-jump="output"],
[data-step-jump="summary"] {
  display: none !important;
}

.ai-recognition-card .ai-actions,
.ai-camera-card .ai-actions,
.ai-panel .ai-actions,
.ai-action-row,
.ai-recognition-card .ai-upload-actions,
.ai-camera-card .ai-upload-actions,
.ai-panel .ai-upload-actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

.ai-recognition-card button,
.ai-camera-card button,
.ai-panel button {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 8px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
}

#aiAnalyzeQueuedBtn,
#aiAnalyzeQueuedBtnAssist,
[data-ai-action="recognize"],
.ai-recognize-btn {
  color: #fff !important;
  background: #c62828 !important;
  border-color: #c62828 !important;
}

.accessories-grid,
.accessory-grid,
.accessory-buttons {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)) !important;
  gap: 6px !important;
}

.accessories-grid button,
.accessory-grid button,
.accessory-buttons button,
.accessory-toggle {
  min-width: 0 !important;
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 6px !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
}

@media (max-width: 760px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
    top: 0 !important;
    padding: 4px !important;
  }

  .editor-selected-ledger-head {
    display: none !important;
  }

  .editor-selected-ledger-row {
    grid-template-columns: minmax(0, 1fr) 78px 74px 68px !important;
    gap: 4px !important;
  }

  .editor-selected-ledger-cell {
    height: 26px !important;
    padding: 2px 4px !important;
    font-size: 11px !important;
  }

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

  .editor-selected-title-cell {
    grid-column: 1 !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
    top: 34px !important;
    min-height: 32px !important;
    max-height: 34px !important;
    padding: 3px 5px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions button:not(#quickSaveBtn):not(#syncFromGasBtn) {
    display: none !important;
  }

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

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

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

  .ai-recognition-card .ai-actions,
  .ai-camera-card .ai-actions,
  .ai-panel .ai-actions,
  .ai-action-row,
  .ai-recognition-card .ai-upload-actions,
  .ai-camera-card .ai-upload-actions,
  .ai-panel .ai-upload-actions {
    grid-template-columns: repeat(4, minmax(44px, 1fr)) !important;
  }

  .ai-recognition-card button,
  .ai-camera-card button,
  .ai-panel button {
    padding: 3px 4px !important;
    font-size: 11px !important;
  }

  #listingLedger tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 86px 60px 76px !important;
    gap: 4px !important;
    padding: 7px !important;
  }

  #listingLedger td:nth-child(3) {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }

  #listingLedger td:nth-child(4) {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  #listingLedger td:nth-child(1) {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  #listingLedger td:nth-child(7) {
    grid-column: 3 !important;
    grid-row: 2 !important;
  }

  #listingLedger td.ledger-actions {
    grid-column: 4 !important;
    grid-row: 2 !important;
    min-width: 0 !important;
    justify-content: flex-end !important;
  }

  #listingLedger td:nth-child(2),
  #listingLedger td:nth-child(5),
  #listingLedger td:nth-child(6) {
    display: none !important;
  }

  #listingLedger .ledger-actions .ledger-edit,
  #listingLedger .ledger-actions .ledger-delete {
    min-width: 34px !important;
    height: 24px !important;
    padding: 2px 5px !important;
    font-size: 11px !important;
  }

  #listingLedger .ledger-title strong {
    font-size: 14px !important;
  }

  #listingLedger .ledger-purchase-fields {
    display: block !important;
  }

  #listingLedger .ledger-purchase-fields input:nth-child(2) {
    display: none !important;
  }
}

/* v14: ledger row preview, compact shared DB, and fixed editor chrome */
#listingLedger .ledger-title > :not(strong) {
  display: none !important;
}

#listingLedger .ledger-title strong {
  display: block !important;
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
}

#listingLedger td:not(.ledger-actions) .ledger-edit,
#listingLedger td:not(.ledger-actions) .ledger-delete,
#listingLedger .ledger-title .ledger-edit,
#listingLedger .ledger-title .ledger-delete {
  display: none !important;
}

#listingLedger td.ledger-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-width: 96px !important;
  width: 96px !important;
  position: static !important;
}

#listingLedger td.ledger-actions .ledger-edit,
#listingLedger td.ledger-actions .ledger-delete {
  position: static !important;
  transform: none !important;
  margin: 0 !important;
  width: auto !important;
  min-width: 42px !important;
  height: 30px !important;
  padding: 0 9px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 4100 !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 4px 8px !important;
  border-radius: 0 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-stat-card {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  align-items: center !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 3px 9px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-stat-card strong {
  font-size: 20px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
  position: sticky !important;
  top: 74px !important;
  z-index: 4080 !important;
  display: block !important;
  min-height: 50px !important;
  height: 50px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  border: 1px solid #f1d991 !important;
  background: #fff8d7 !important;
  box-shadow: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  position: absolute !important;
  left: 8px !important;
  top: 3px !important;
  z-index: 2 !important;
  font-size: 10px !important;
  line-height: 1 !important;
  color: #5f7185 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-table {
  display: grid !important;
  grid-template-rows: 18px 32px !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
  display: grid !important;
  grid-template-columns: 180px 116px minmax(260px, 1.8fr) 126px 120px 102px 96px !important;
  align-items: center !important;
  min-width: 0 !important;
  column-gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head span {
  min-width: 0 !important;
  padding: 2px 6px !important;
  overflow: hidden !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  color: #002d4d !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  background: #eef7ff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell {
  min-width: 0 !important;
  height: 28px !important;
  padding: 3px 6px !important;
  overflow: hidden !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  color: #002d4d !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  background: transparent !important;
  border: 0 !important;
}

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

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

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  position: sticky !important;
  top: 124px !important;
  z-index: 4075 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 28px !important;
  height: 28px !important;
  max-height: 28px !important;
  padding: 2px 8px !important;
  overflow: hidden !important;
  border-radius: 0 !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-note,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-url-details,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-audit,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #promotePcMasterBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #listedDiffAuditEditorBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #syncToGasBtn {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-head {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions {
  margin-left: auto !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  overflow: hidden !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: 152px !important;
  z-index: 4070 !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  min-height: 40px !important;
  height: 40px !important;
  padding: 4px 8px !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step:nth-child(n+6),
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="photos"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="summary"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="output"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="photos"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="summary"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="output"] {
  display: none !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) .stepper .step span {
  width: 22px !important;
  height: 22px !important;
  font-size: 12px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: 192px !important;
  z-index: 4060 !important;
  min-height: 46px !important;
  padding: 5px 8px !important;
  border-radius: 0 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .status-label strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #listingStatusText {
  font-size: 20px !important;
  line-height: 1 !important;
}

@media (max-width: 760px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    height: 34px !important;
    min-height: 34px !important;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
    top: 70px !important;
    height: 48px !important;
    min-height: 48px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-table {
    grid-template-rows: 1fr !important;
  }

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

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-title-cell {
    grid-column: 1 / -1 !important;
    height: 20px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell {
    height: 20px !important;
    padding: 2px 5px !important;
    background: #fff !important;
    border: 1px solid #d4e6f4 !important;
    border-radius: 7px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
    top: 118px !important;
    min-height: 24px !important;
    height: 24px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions button:not(#quickSaveBtn):not(#syncFromGasBtn) {
    display: none !important;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: 178px !important;
    min-height: 60px !important;
    grid-template-columns: 1fr !important;
  }
}

/* 2026-07-20 final compact editor ledger override. Keep this block at EOF. */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) {
  --editor-toolbar-h-final: 32px;
  --editor-count-h-final: 34px;
  --editor-selected-h-final: 46px;
  --editor-sync-h-final: 22px;
  --editor-stepper-h-final: 34px;
  --editor-status-h-final: 48px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 4300 !important;
  min-height: var(--editor-toolbar-h-final) !important;
  height: var(--editor-toolbar-h-final) !important;
  padding: 3px 8px !important;
  border-radius: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar .secondary-btn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar .primary-btn {
  min-height: 24px !important;
  height: 24px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky !important;
  top: var(--editor-toolbar-h-final) !important;
  z-index: 4290 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  min-height: var(--editor-count-h-final) !important;
  height: var(--editor-count-h-final) !important;
  padding: 4px 8px !important;
  gap: 6px !important;
  background: #eaf6ff !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 24px !important;
  height: 24px !important;
  padding: 2px 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-radius: 8px !important;
  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;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar.editor-ledger-row-preview {
  display: block !important;
  position: sticky !important;
  top: calc(var(--editor-toolbar-h-final) + var(--editor-count-h-final)) !important;
  z-index: 4280 !important;
  min-height: var(--editor-selected-h-final) !important;
  height: var(--editor-selected-h-final) !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border-top: 1px solid #f2cf74 !important;
  border-bottom: 1px solid #f2cf74 !important;
  background: #fff8dc !important;
  overflow: hidden !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-selected-ledger-table {
  display: grid !important;
  grid-template-rows: 18px 28px !important;
  width: 100% !important;
  height: 100% !important;
  gap: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
  display: grid !important;
  grid-template-columns: 176px 112px minmax(240px, 1fr) 112px 112px 88px 88px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head {
  height: 18px !important;
  padding: 0 8px !important;
  background: #eef7ff !important;
  color: #002d4d !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
  height: 28px !important;
  padding: 0 8px !important;
  background: #fff8dc !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell {
  min-width: 0 !important;
  height: 24px !important;
  padding: 2px 6px !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-purchase {
  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) .sync-panel {
  position: sticky !important;
  top: calc(var(--editor-toolbar-h-final) + var(--editor-count-h-final) + var(--editor-selected-h-final)) !important;
  z-index: 4270 !important;
  min-height: var(--editor-sync-h-final) !important;
  height: var(--editor-sync-h-final) !important;
  padding: 1px 8px !important;
  border-radius: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  overflow: hidden !important;
  background: #eaf6ff !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-note,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-url-details,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-audit,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #promotePcMasterBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #listedDiffAuditEditorBtn,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #syncToGasBtn {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-head {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 0 !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions {
  margin-left: auto !important;
  gap: 4px !important;
  flex-wrap: nowrap !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions button {
  min-height: 20px !important;
  height: 20px !important;
  padding: 0 6px !important;
  font-size: 10px !important;
  border-radius: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: calc(var(--editor-toolbar-h-final) + var(--editor-count-h-final) + var(--editor-selected-h-final) + var(--editor-sync-h-final)) !important;
  z-index: 4260 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  min-height: var(--editor-stepper-h-final) !important;
  height: var(--editor-stepper-h-final) !important;
  padding: 3px 8px !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step:nth-child(n+6),
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="photos"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="summary"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="output"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="photos"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="summary"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="output"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="final"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section.output-section {
  display: none !important;
}

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

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: calc(var(--editor-toolbar-h-final) + var(--editor-count-h-final) + var(--editor-selected-h-final) + var(--editor-sync-h-final) + var(--editor-stepper-h-final)) !important;
  z-index: 4250 !important;
  min-height: var(--editor-status-h-final) !important;
  height: var(--editor-status-h-final) !important;
  padding: 4px 8px !important;
  border-radius: 0 !important;
  display: grid !important;
  grid-template-columns: 150px minmax(0, 1fr) !important;
  gap: 8px !important;
  overflow: hidden !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: 28px !important;
  height: 28px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  border-radius: 999px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #listingStatusText {
  font-size: 20px !important;
}

@media (min-width: 761px) {
  #listingLedger tr {
    display: table-row !important;
  }

  #listingLedger td {
    position: static !important;
    vertical-align: middle !important;
  }

  #listingLedger td.ledger-title {
    position: static !important;
    min-width: 320px !important;
    max-width: 620px !important;
  }

  #listingLedger td.ledger-title > :not(strong),
  #listingLedger td.ledger-title small,
  #listingLedger td.ledger-title span,
  #listingLedger td.ledger-title .ledger-meta,
  #listingLedger td.ledger-title .ledger-subtitle,
  #listingLedger td:not(.ledger-actions) > .ledger-edit,
  #listingLedger td:not(.ledger-actions) > .ledger-delete,
  #listingLedger td:not(.ledger-actions) .ledger-edit,
  #listingLedger td:not(.ledger-actions) .ledger-delete,
  #listingLedger td:nth-child(3) button {
    display: none !important;
  }

  #listingLedger td.ledger-actions {
    position: static !important;
    display: flex !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: 112px !important;
    min-width: 112px !important;
    padding: 4px 8px !important;
  }

  #listingLedger td.ledger-actions::before,
  #listingLedger td.ledger-actions::after {
    display: none !important;
    content: none !important;
  }

  #listingLedger td.ledger-actions .ledger-edit,
  #listingLedger td.ledger-actions .ledger-delete {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    margin: 0 !important;
    min-height: 24px !important;
    height: 24px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    border-radius: 999px !important;
  }

  #listingLedger .ledger-purchase-fields {
    grid-template-columns: 94px 96px !important;
    gap: 4px !important;
  }

  #listingLedger .ledger-edit-input,
  #listingLedger .ledger-order-input {
    height: 28px !important;
    min-height: 28px !important;
    font-size: 12px !important;
    padding: 3px 6px !important;
  }
}

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

.ai-recognition-card button,
.ai-camera-card button,
.ai-panel button,
.ai-action-row button {
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  border-radius: 8px !important;
}

[data-ai-action="recognize"],
.ai-recognize-btn,
#aiRecognizeBtn {
  background: #c9252d !important;
  border-color: #c9252d !important;
  color: #fff !important;
  font-weight: 900 !important;
}

.accessories-grid,
.accessory-grid,
.accessory-buttons {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)) !important;
  gap: 5px !important;
}

.accessory-button,
.accessories-grid button,
.accessory-grid button,
.accessory-buttons button {
  min-height: 28px !important;
  height: auto !important;
  padding: 4px 6px !important;
  font-size: 10.5px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  border-radius: 8px !important;
}

@media (max-width: 760px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) {
    --editor-toolbar-h-final: 32px;
    --editor-count-h-final: 32px;
    --editor-selected-h-final: 50px;
    --editor-sync-h-final: 0px;
    --editor-stepper-h-final: 34px;
    --editor-status-h-final: 58px;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-table {
    grid-template-rows: 1fr !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
    grid-template-columns: minmax(0, 1fr) 68px 58px 58px !important;
    grid-template-areas: "title title title title" "sku status price date" !important;
    height: 50px !important;
    gap: 3px !important;
    padding: 3px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(1) {
    grid-area: date !important;
    display: block !important;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-title-cell {
    grid-area: title !important;
    height: 22px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(4) {
    grid-area: sku !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(6) {
    grid-area: price !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(7) {
    grid-area: status !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell {
    height: 21px !important;
    padding: 2px 4px !important;
    background: #fff !important;
    border: 1px solid #d4e6f4 !important;
    border-radius: 6px !important;
    font-size: 10px !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: calc(var(--editor-toolbar-h-final) + var(--editor-count-h-final) + var(--editor-selected-h-final)) !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: calc(var(--editor-toolbar-h-final) + var(--editor-count-h-final) + var(--editor-selected-h-final) + var(--editor-stepper-h-final)) !important;
    grid-template-columns: 1fr !important;
    height: 58px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    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 {
    min-height: 24px !important;
    height: 24px !important;
    font-size: 10px !important;
  }

  .accessories-grid,
  .accessory-grid,
  .accessory-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .accessory-button,
  .accessories-grid button,
  .accessory-grid button,
  .accessory-buttons button {
    font-size: 9.5px !important;
    min-height: 26px !important;
    padding: 3px 4px !important;
  }

  .ai-recognition-card .ai-actions,
  .ai-camera-card .ai-actions,
  .ai-panel .ai-actions,
  .ai-action-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }
}

/* v21 final ledger/editor layout overrides. Keep this block at EOF. */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) {
  --editor-toolbar-h-v21: 34px;
  --editor-count-h-v21: 42px;
  --editor-selected-h-v21: 58px;
  --editor-sync-h-v21: 30px;
  --editor-stepper-h-v21: 54px;
  --editor-status-h-v21: 56px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 250 !important;
  min-height: var(--editor-toolbar-h-v21) !important;
  height: var(--editor-toolbar-h-v21) !important;
  padding: 4px 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky !important;
  top: var(--editor-toolbar-h-v21) !important;
  z-index: 249 !important;
  min-height: var(--editor-count-h-v21) !important;
  height: var(--editor-count-h-v21) !important;
  padding: 4px 8px !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 8px !important;
  border-radius: 8px !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: calc(var(--editor-toolbar-h-v21) + var(--editor-count-h-v21)) !important;
  z-index: 248 !important;
  min-height: var(--editor-selected-h-v21) !important;
  height: var(--editor-selected-h-v21) !important;
  padding: 3px 6px !important;
  border-radius: 0 !important;
  background: #fff7d8 !important;
  border: 1px solid #eadc9c !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label {
  height: 14px !important;
  margin: 0 0 2px !important;
  font-size: 10px !important;
  line-height: 14px !important;
  color: #50677b !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-table {
  display: grid !important;
  grid-template-rows: 14px 34px !important;
  width: 100% !important;
  gap: 0 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
  display: grid !important;
  grid-template-columns: minmax(130px, .72fr) minmax(112px, .45fr) minmax(300px, 2.2fr) minmax(110px, .52fr) minmax(110px, .5fr) minmax(90px, .38fr) minmax(90px, .4fr) !important;
  align-items: center !important;
  gap: 6px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head {
  font-size: 10px !important;
  font-weight: 800 !important;
  color: #33516a !important;
  line-height: 14px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell {
  min-width: 0 !important;
  height: 32px !important;
  padding: 3px 6px !important;
  overflow: hidden !important;
  border: 1px solid #c9deee !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #06253d !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-title-cell {
  font-weight: 800 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  position: sticky !important;
  top: calc(var(--editor-toolbar-h-v21) + var(--editor-count-h-v21) + var(--editor-selected-h-v21)) !important;
  z-index: 247 !important;
  min-height: var(--editor-sync-h-v21) !important;
  height: var(--editor-sync-h-v21) !important;
  padding: 2px 8px !important;
  overflow: hidden !important;
  border-radius: 0 !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,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-copy,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-status-detail {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-panel-header,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions {
  min-height: 24px !important;
  height: 24px !important;
  align-items: center !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  position: sticky !important;
  top: calc(var(--editor-toolbar-h-v21) + var(--editor-count-h-v21) + var(--editor-selected-h-v21) + var(--editor-sync-h-v21)) !important;
  z-index: 246 !important;
  min-height: var(--editor-stepper-h-v21) !important;
  height: var(--editor-stepper-h-v21) !important;
  padding: 4px 10px !important;
  background: #063553 !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step:nth-child(n+6),
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-step="photos"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-step="summary"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-step="output"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="photos"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="summary"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="output"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #photosStep,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #summaryStep,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #outputStep {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: calc(var(--editor-toolbar-h-v21) + var(--editor-count-h-v21) + var(--editor-selected-h-v21) + var(--editor-sync-h-v21) + var(--editor-stepper-h-v21)) !important;
  z-index: 245 !important;
  min-height: var(--editor-status-h-v21) !important;
  height: var(--editor-status-h-v21) !important;
  padding: 5px 8px !important;
  background: #edf7fc !important;
  overflow: hidden !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .content-grid {
  margin-top: 10px !important;
}

/* Keep the ledger itself as a real ledger row: no duplicated middle actions or meta lines. */
body:not(.home-mode):not(.purchase-mode) #listingLedger table {
  table-layout: fixed !important;
  width: 100% !important;
  min-width: 0 !important;
}

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

body:not(.home-mode):not(.purchase-mode) #listingLedger th:nth-child(1),
body:not(.home-mode):not(.purchase-mode) #listingLedger td:nth-child(1) { width: 250px !important; }
body:not(.home-mode):not(.purchase-mode) #listingLedger th:nth-child(2),
body:not(.home-mode):not(.purchase-mode) #listingLedger td:nth-child(2) { width: 150px !important; }
body:not(.home-mode):not(.purchase-mode) #listingLedger th:nth-child(3),
body:not(.home-mode):not(.purchase-mode) #listingLedger td:nth-child(3) { width: auto !important; }
body:not(.home-mode):not(.purchase-mode) #listingLedger th:nth-child(4),
body:not(.home-mode):not(.purchase-mode) #listingLedger td:nth-child(4) { width: 150px !important; }
body:not(.home-mode):not(.purchase-mode) #listingLedger th:nth-child(5),
body:not(.home-mode):not(.purchase-mode) #listingLedger td:nth-child(5) { width: 145px !important; }
body:not(.home-mode):not(.purchase-mode) #listingLedger th:nth-child(6),
body:not(.home-mode):not(.purchase-mode) #listingLedger td:nth-child(6) { width: 110px !important; }
body:not(.home-mode):not(.purchase-mode) #listingLedger th:nth-child(7),
body:not(.home-mode):not(.purchase-mode) #listingLedger td:nth-child(7) { width: 92px !important; }
body:not(.home-mode):not(.purchase-mode) #listingLedger th:nth-child(8),
body:not(.home-mode):not(.purchase-mode) #listingLedger td:nth-child(8) { width: 96px !important; }

body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title {
  position: static !important;
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: normal !important;
}

body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title > :not(strong),
body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title small,
body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title .ledger-title-meta,
body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title .ledger-card-meta,
body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title .ledger-row-meta,
body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title .ledger-inline-meta,
body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title::before,
body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-title::after {
  content: none !important;
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) #listingLedger td:not(.ledger-actions) .ledger-edit,
body:not(.home-mode):not(.purchase-mode) #listingLedger td:not(.ledger-actions) .ledger-delete {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-actions {
  position: static !important;
  display: table-cell !important;
  min-width: 96px !important;
  white-space: nowrap !important;
  text-align: right !important;
  overflow: visible !important;
}

body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-actions .ledger-edit,
body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-actions .ledger-delete {
  position: static !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 38px !important;
  width: auto !important;
  height: 26px !important;
  margin: 0 0 0 3px !important;
  padding: 0 7px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

.accessories-grid,
.accessory-grid,
.accessory-buttons {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)) !important;
  gap: 5px !important;
}

.accessory-button,
.accessories-grid button,
.accessory-grid button,
.accessory-buttons button {
  min-width: 0 !important;
  min-height: 28px !important;
  height: auto !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  text-overflow: clip !important;
}

.ai-recognition-card .ai-actions,
.ai-camera-card .ai-actions,
.ai-panel .ai-actions,
.ai-action-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

.ai-recognition-card .ai-actions button,
.ai-camera-card .ai-actions button,
.ai-panel .ai-actions button,
.ai-action-row button {
  min-height: 28px !important;
  height: 28px !important;
  padding: 3px 6px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

.ai-recognition-card .ai-actions button:nth-child(3),
.ai-camera-card .ai-actions button:nth-child(3),
.ai-panel .ai-actions button:nth-child(3),
.ai-action-row button:nth-child(3) {
  border-color: #d01b2d !important;
  color: #d01b2d !important;
  font-weight: 900 !important;
}

.live-preview-actions,
.summary-copy-actions,
.html-copy-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 6px !important;
}

.live-preview-actions button,
.summary-copy-actions button,
.html-copy-actions button {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
}

@media (max-width: 760px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) {
    --editor-toolbar-h-v21: 36px;
    --editor-count-h-v21: 38px;
    --editor-selected-h-v21: 72px;
    --editor-sync-h-v21: 0px;
    --editor-stepper-h-v21: 48px;
    --editor-status-h-v21: 86px;
  }

  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) .editor-selected-ledger-head {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-table {
    grid-template-rows: 1fr !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
    grid-template-columns: 1fr 82px 80px !important;
    grid-template-areas:
      "title sku status"
      "purchase price status" !important;
    gap: 4px !important;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-title-cell { grid-area: title !important; }
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-purchase { grid-area: purchase !important; }
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(4) { grid-area: sku !important; }
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(6) { grid-area: price !important; }
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(7) { grid-area: status !important; }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: calc(var(--editor-toolbar-h-v21) + var(--editor-count-h-v21) + var(--editor-selected-h-v21)) !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: calc(var(--editor-toolbar-h-v21) + var(--editor-count-h-v21) + var(--editor-selected-h-v21) + var(--editor-stepper-h-v21)) !important;
  }

  .ledger-mobile-card,
  body:not(.home-mode):not(.purchase-mode) #listingLedger tr {
    padding: 8px !important;
    gap: 4px !important;
  }

  body:not(.home-mode):not(.purchase-mode) #listingLedger td.ledger-actions {
    display: flex !important;
    gap: 5px !important;
    justify-content: flex-end !important;
    width: 100% !important;
  }

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

  .accessory-button,
  .accessories-grid button,
  .accessory-grid button,
  .accessory-buttons button {
    min-height: 26px !important;
    padding: 3px 4px !important;
    font-size: 9px !important;
  }
}

/* v22 ledger/editor normalization. Keep this block at EOF. */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) {
  --editor-toolbar-h-v22: 38px;
  --editor-count-h-v22: 40px;
  --editor-selected-h-v22: 54px;
  --editor-sync-h-v22: 30px;
  --editor-stepper-h-v22: 50px;
  --editor-status-h-v22: 58px;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 120 !important;
  min-height: var(--editor-toolbar-h-v22) !important;
  height: var(--editor-toolbar-h-v22) !important;
  padding: 4px 8px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  position: sticky !important;
  top: var(--editor-toolbar-h-v22) !important;
  z-index: 118 !important;
  min-height: var(--editor-count-h-v22) !important;
  padding: 4px 6px !important;
  gap: 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;
}

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) #editorSelectedItemBar {
  display: block !important;
  position: sticky !important;
  top: calc(var(--editor-toolbar-h-v22) + var(--editor-count-h-v22)) !important;
  z-index: 116 !important;
  min-height: var(--editor-selected-h-v22) !important;
  margin: 0 !important;
  padding: 4px 6px !important;
  border-radius: 0 !important;
  border: 1px solid #ead37b !important;
  background: #fff8d8 !important;
  box-shadow: 0 1px 0 rgba(0, 42, 70, .08) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #editorSelectedItemBar .editor-ledger-row-label {
  margin: 0 0 2px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  color: #5f7186 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-table {
  display: grid !important;
  grid-template-rows: 18px 30px !important;
  gap: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
  display: grid !important;
  grid-template-columns: minmax(160px, 220px) minmax(110px, 140px) minmax(260px, 1fr) minmax(110px, 130px) minmax(110px, 130px) minmax(88px, 110px) minmax(82px, 100px) !important;
  gap: 6px !important;
  align-items: center !important;
  grid-template-areas: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #173b58 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell {
  display: flex !important;
  min-width: 0 !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 3px 8px !important;
  align-items: center !important;
  gap: 4px !important;
  overflow: hidden !important;
  border: 1px solid #c9deee !important;
  border-radius: 7px !important;
  background: #fff !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell strong,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  display: grid !important;
  position: sticky !important;
  top: calc(var(--editor-toolbar-h-v22) + var(--editor-count-h-v22) + var(--editor-selected-h-v22)) !important;
  z-index: 114 !important;
  min-height: var(--editor-sync-h-v22) !important;
  margin: 0 !important;
  padding: 3px 8px !important;
  grid-template-columns: minmax(150px, 1fr) auto !important;
  gap: 8px !important;
  align-items: center !important;
  border-radius: 0 !important;
  border-width: 0 0 1px !important;
  overflow: hidden !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head {
  display: flex !important;
  gap: 6px !important;
  align-items: center !important;
  min-width: 0 !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 5px !important;
  justify-content: flex-end !important;
  min-width: 0 !important;
  overflow-x: auto !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions button {
  min-height: 24px !important;
  height: 24px !important;
  padding: 0 8px !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) .stepper {
  position: sticky !important;
  top: calc(var(--editor-toolbar-h-v22) + var(--editor-count-h-v22) + var(--editor-selected-h-v22) + var(--editor-sync-h-v22)) !important;
  z-index: 112 !important;
  min-height: var(--editor-stepper-h-v22) !important;
  padding: 5px 10px !important;
  background: #073759 !important;
  border-top: 1px solid #052a44 !important;
  border-bottom: 1px solid #0ea5d5 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="photos"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="summary"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step:nth-child(n+6),
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="photos"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="summary"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="output"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #photosStep,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #summaryStep,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #outputStep {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  top: calc(var(--editor-toolbar-h-v22) + var(--editor-count-h-v22) + var(--editor-selected-h-v22) + var(--editor-sync-h-v22) + var(--editor-stepper-h-v22)) !important;
  z-index: 110 !important;
  min-height: var(--editor-status-h-v22) !important;
  padding: 5px 8px !important;
  align-items: center !important;
  background: #eef8ff !important;
  border-top: 0 !important;
  border-bottom: 1px solid #bcd8ec !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global strong {
  font-size: 20px !important;
  line-height: 1 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions .listing-status-btn {
  min-height: 32px !important;
  padding: 4px 14px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
}

@media (min-width: 761px) {
  #listingLedger table {
    display: table !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
  }

  #listingLedger thead {
    display: table-header-group !important;
  }

  #listingLedger tbody {
    display: table-row-group !important;
  }

  #listingLedger tr {
    display: table-row !important;
    position: static !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    transform: none !important;
  }

  #listingLedger th,
  #listingLedger td {
    display: table-cell !important;
    position: static !important;
    float: none !important;
    transform: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: 42px !important;
    padding: 4px 6px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #listingLedger th:nth-child(1),
  #listingLedger td:nth-child(1) {
    width: 210px !important;
  }

  #listingLedger th:nth-child(2),
  #listingLedger td:nth-child(2) {
    width: 140px !important;
  }

  #listingLedger th:nth-child(3),
  #listingLedger td:nth-child(3) {
    width: auto !important;
  }

  #listingLedger th:nth-child(4),
  #listingLedger td:nth-child(4) {
    width: 140px !important;
  }

  #listingLedger th:nth-child(5),
  #listingLedger td:nth-child(5) {
    width: 128px !important;
  }

  #listingLedger th:nth-child(6),
  #listingLedger td:nth-child(6) {
    width: 100px !important;
  }

  #listingLedger th:nth-child(7),
  #listingLedger td:nth-child(7) {
    width: 92px !important;
  }

  #listingLedger th:nth-child(8),
  #listingLedger td:nth-child(8) {
    width: 104px !important;
  }

  #listingLedger td::before,
  #listingLedger td::after {
    display: none !important;
    content: none !important;
  }

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

  #listingLedger input,
  #listingLedger select {
    min-height: 28px !important;
    height: 28px !important;
    padding: 2px 7px !important;
    border-radius: 7px !important;
    font-size: 13px !important;
  }

  #listingLedger td.ledger-title {
    overflow: hidden !important;
  }

  #listingLedger td.ledger-title strong {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #listingLedger td.ledger-title > *:not(strong),
  #listingLedger td.ledger-title small,
  #listingLedger td.ledger-title span,
  #listingLedger td.ledger-title [class*="meta"],
  #listingLedger td.ledger-title [class*="sku"],
  #listingLedger td.ledger-title [class*="date"] {
    display: none !important;
  }

  #listingLedger td:not(.ledger-actions) .ledger-edit,
  #listingLedger td:not(.ledger-actions) .ledger-delete,
  #listingLedger td:not(.ledger-actions) button.ledger-edit,
  #listingLedger td:not(.ledger-actions) button.ledger-delete,
  #listingLedger td:not(.ledger-actions) button[aria-label*="編集"],
  #listingLedger td:not(.ledger-actions) button[aria-label*="削除"] {
    display: none !important;
  }

  #listingLedger td.ledger-actions {
    display: table-cell !important;
    width: 104px !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  #listingLedger td.ledger-actions .ledger-edit,
  #listingLedger td.ledger-actions .ledger-delete {
    position: static !important;
    display: inline-flex !important;
    width: auto !important;
    min-width: 42px !important;
    height: 26px !important;
    min-height: 26px !important;
    margin: 0 0 0 4px !important;
    padding: 0 7px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 760px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) {
    --editor-toolbar-h-v22: 34px;
    --editor-count-h-v22: 36px;
    --editor-selected-h-v22: 52px;
    --editor-sync-h-v22: 0px;
    --editor-stepper-h-v22: 44px;
    --editor-status-h-v22: 92px;
  }

  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) .editor-selected-ledger-head {
    display: none !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-table {
    grid-template-rows: 1fr !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
    grid-template-columns: minmax(0, 1fr) 76px 76px !important;
    grid-template-areas:
      "title sku status"
      "purchase price status" !important;
    gap: 4px !important;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-purchase {
    grid-area: purchase !important;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(4) {
    grid-area: sku !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(6) {
    grid-area: price !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(7) {
    grid-area: status !important;
  }

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

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
    top: calc(var(--editor-toolbar-h-v22) + var(--editor-count-h-v22) + var(--editor-selected-h-v22)) !important;
    overflow-x: auto !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: calc(var(--editor-toolbar-h-v22) + var(--editor-count-h-v22) + var(--editor-selected-h-v22) + var(--editor-stepper-h-v22)) !important;
  }

  #listingLedger td.ledger-title > *:not(strong),
  #listingLedger td.ledger-title small,
  #listingLedger td.ledger-title span {
    display: none !important;
  }

  #listingLedger td:not(.ledger-actions) .ledger-edit,
  #listingLedger td:not(.ledger-actions) .ledger-delete,
  #listingLedger td:not(.ledger-actions) button[aria-label*="編集"],
  #listingLedger td:not(.ledger-actions) button[aria-label*="削除"] {
    display: none !important;
  }
}
/* v23 stepper contrast fix. Keep this block at EOF. */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  background: #07324f !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-bottom: 2px solid #12a8d4 !important;
  box-shadow: 0 2px 0 rgba(18, 168, 212, 0.2) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step {
  color: #c9dbea !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step .circle,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step .bubble {
  background: #315d78 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step::after {
  background: rgba(176, 212, 231, 0.45) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.active,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.current,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.is-active,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[aria-current="step"] {
  color: #ffffff !important;
  font-weight: 800 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.active span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.current span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.is-active span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[aria-current="step"] span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.active .circle,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.current .circle,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.is-active .circle,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[aria-current="step"] .circle,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.active .bubble,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.current .bubble,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.is-active .bubble,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[aria-current="step"] .bubble {
  background: #d4a935 !important;
  border-color: #d4a935 !important;
  color: #06243a !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.completed,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.is-complete,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.done {
  color: #d7f7ff !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.completed span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.is-complete span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.done span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.completed .circle,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.is-complete .circle,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.done .circle,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.completed .bubble,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.is-complete .bubble,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step.done .bubble {
  background: #12a8d4 !important;
  border-color: #12a8d4 !important;
  color: #ffffff !important;
}

/* v24 fixed compact editor chrome. Keep this block at EOF. */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) {
  --editor-toolbar-h-v24: 32px;
  --editor-count-h-v24: 34px;
  --editor-selected-h-v24: 48px;
  --editor-sync-h-v24: 30px;
  --editor-stepper-h-v24: 44px;
  --editor-status-h-v24: 52px;
  --editor-sticky-total-v24: calc(
    var(--editor-toolbar-h-v24) +
    var(--editor-count-h-v24) +
    var(--editor-selected-h-v24) +
    var(--editor-sync-h-v24) +
    var(--editor-stepper-h-v24) +
    var(--editor-status-h-v24)
  );
  scroll-padding-top: calc(var(--editor-sticky-total-v24) + 8px) !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.editor-ledger-row-preview,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .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 {
  position: sticky !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  top: 0 !important;
  z-index: 9600 !important;
  min-height: var(--editor-toolbar-h-v24) !important;
  height: var(--editor-toolbar-h-v24) !important;
  padding: 2px 8px !important;
  border-radius: 0 !important;
  background: #e8f6ff !important;
  border-bottom: 1px solid #bdd9ec !important;
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  align-items: center !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-title {
  font-size: 16px !important;
  line-height: 1 !important;
  text-align: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar button {
  min-height: 24px !important;
  height: 24px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: var(--editor-toolbar-h-v24) !important;
  z-index: 9590 !important;
  min-height: var(--editor-count-h-v24) !important;
  height: var(--editor-count-h-v24) !important;
  padding: 3px 8px !important;
  border-radius: 0 !important;
  background: #eef9ff !important;
  border-bottom: 1px solid #bdd9ec !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-width: 0 !important;
  min-height: 26px !important;
  height: 26px !important;
  padding: 2px 10px !important;
  border-radius: 8px !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-count-chip span {
  font-size: 11px !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-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.editor-ledger-row-preview {
  top: calc(var(--editor-toolbar-h-v24) + var(--editor-count-h-v24)) !important;
  z-index: 9580 !important;
  min-height: var(--editor-selected-h-v24) !important;
  height: var(--editor-selected-h-v24) !important;
  padding: 4px 8px !important;
  border-radius: 0 !important;
  background: #fff6ce !important;
  border-top: 0 !important;
  border-bottom: 1px solid #e2cc75 !important;
  overflow: hidden !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-selected-ledger-table {
  height: 100% !important;
  display: block !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
  height: 100% !important;
  display: grid !important;
  grid-template-columns: 170px 116px minmax(220px, 1fr) 128px 130px 92px 112px !important;
  gap: 6px !important;
  align-items: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell {
  min-width: 0 !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 3px 8px !important;
  border: 1px solid #c7ddeb !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  overflow: hidden !important;
}

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

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell span {
  margin-top: 2px !important;
  font-size: 10px !important;
  line-height: 1 !important;
  color: #5d7890 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel {
  top: calc(var(--editor-toolbar-h-v24) + var(--editor-count-h-v24) + var(--editor-selected-h-v24)) !important;
  z-index: 9570 !important;
  min-height: var(--editor-sync-h-v24) !important;
  height: var(--editor-sync-h-v24) !important;
  padding: 2px 8px !important;
  border-radius: 0 !important;
  background: #e8f6ff !important;
  border-bottom: 1px solid #bdd9ec !important;
  display: grid !important;
  grid-template-columns: minmax(120px, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions {
  min-width: 0 !important;
  display: flex !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions button {
  flex: 0 0 auto !important;
  min-height: 24px !important;
  height: 24px !important;
  padding: 0 8px !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) .stepper {
  top: calc(var(--editor-toolbar-h-v24) + var(--editor-count-h-v24) + var(--editor-selected-h-v24) + var(--editor-sync-h-v24)) !important;
  z-index: 9560 !important;
  min-height: var(--editor-stepper-h-v24) !important;
  height: var(--editor-stepper-h-v24) !important;
  padding: 4px 8px !important;
  border-radius: 0 !important;
  background: #07324f !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-bottom: 2px solid #12a8d4 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 4px !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step {
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  font-size: 11px !important;
  line-height: 1.05 !important;
  color: #c9dbea !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step span,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step .circle,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step .bubble {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  margin-bottom: 2px !important;
  font-size: 11px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: calc(var(--editor-toolbar-h-v24) + var(--editor-count-h-v24) + var(--editor-selected-h-v24) + var(--editor-sync-h-v24) + var(--editor-stepper-h-v24)) !important;
  z-index: 9550 !important;
  min-height: var(--editor-status-h-v24) !important;
  height: var(--editor-status-h-v24) !important;
  padding: 4px 8px !important;
  border-radius: 0 !important;
  background: #f0f9ff !important;
  border-bottom: 1px solid #bdd9ec !important;
  display: grid !important;
  grid-template-columns: 140px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px !important;
  overflow: hidden !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global > div:first-child {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 2px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global > div:first-child span {
  font-size: 11px !important;
  line-height: 1 !important;
  color: #5d7890 !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(92px, 1fr)) !important;
  gap: 6px !important;
  align-items: center !important;
}

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

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-main,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) #itemForm {
  scroll-margin-top: calc(var(--editor-sticky-total-v24) + 10px) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .top-step-nav,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .section-progress,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .step-nav {
  margin-top: 6px !important;
}

@media (max-width: 760px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) {
    --editor-toolbar-h-v24: 30px;
    --editor-count-h-v24: 32px;
    --editor-selected-h-v24: 42px;
    --editor-sync-h-v24: 0px;
    --editor-stepper-h-v24: 40px;
    --editor-status-h-v24: 46px;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
    padding: 2px 6px !important;
    grid-template-columns: auto 1fr auto !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: 24px !important;
    min-height: 24px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-count-chip {
    padding: 2px 7px !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.editor-ledger-row-preview {
    padding: 3px 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
    grid-template-columns: minmax(0, 1fr) 72px 76px !important;
    grid-template-areas: "title sku status" !important;
    gap: 4px !important;
  }

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

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

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(4) {
    grid-area: sku !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell:nth-child(7) {
    grid-area: status !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .editor-selected-title-cell strong {
    font-size: 12px !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: calc(var(--editor-toolbar-h-v24) + var(--editor-count-h-v24) + var(--editor-selected-h-v24)) !important;
    grid-template-columns: repeat(5, minmax(68px, 1fr)) !important;
    padding: 3px 4px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: calc(var(--editor-toolbar-h-v24) + var(--editor-count-h-v24) + var(--editor-selected-h-v24) + var(--editor-stepper-h-v24)) !important;
    grid-template-columns: 84px minmax(0, 1fr) !important;
    gap: 4px !important;
    padding: 3px 6px !important;
  }

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

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-actions {
    display: flex !important;
    gap: 4px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .listing-status-btn {
    flex: 0 0 78px !important;
    min-width: 78px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 6px !important;
    font-size: 11px !important;
  }
}

/* v25 sticky compact editor chrome. Keep this block at EOF. */
body:not(.home-mode):not(.purchase-mode) {
  --editor-toolbar-h-v25: 30px;
  --editor-count-h-v25: 32px;
  --editor-selected-h-v25: 40px;
  --editor-sync-h-v25: 24px;
  --editor-stepper-h-v25: 38px;
  --editor-status-h-v25: 44px;
  scroll-padding-top: 216px;
}

body:not(.home-mode):not(.purchase-mode) .app-shell,
body:not(.home-mode):not(.purchase-mode) .listing-view,
body:not(.home-mode):not(.purchase-mode) .listing-workspace,
body:not(.home-mode):not(.purchase-mode) .workflow-shell,
body:not(.home-mode):not(.purchase-mode) .workflow-main,
body:not(.home-mode):not(.purchase-mode) .listing-editor-layout {
  overflow: visible !important;
}

body:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar,
body:not(.home-mode):not(.purchase-mode) .editor-count-strip,
body:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar,
body:not(.home-mode):not(.purchase-mode) .sync-panel,
body:not(.home-mode):not(.purchase-mode) .stepper,
body:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  position: sticky !important;
  z-index: 220 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  top: 0 !important;
  min-height: var(--editor-toolbar-h-v25) !important;
  height: var(--editor-toolbar-h-v25) !important;
  padding: 3px 10px !important;
  background: #eaf7ff !important;
  border-bottom: 1px solid #b9def3 !important;
}

body:not(.home-mode):not(.purchase-mode) .listing-editor-title {
  font-size: 16px !important;
  line-height: 1 !important;
}

body:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar button {
  min-height: 24px !important;
  height: 24px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

body:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  top: var(--editor-toolbar-h-v25) !important;
  min-height: var(--editor-count-h-v25) !important;
  height: var(--editor-count-h-v25) !important;
  padding: 4px 8px !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  background: #eff8ff !important;
  border-bottom: 1px solid #cbe4f3 !important;
  overflow: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .editor-count-chip {
  min-height: 0 !important;
  height: 24px !important;
  padding: 2px 8px !important;
  border-radius: 7px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 11px !important;
}

body:not(.home-mode):not(.purchase-mode) .editor-count-chip strong {
  font-size: 20px !important;
  line-height: 1 !important;
}

body:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  top: calc(var(--editor-toolbar-h-v25) + var(--editor-count-h-v25)) !important;
  min-height: var(--editor-selected-h-v25) !important;
  height: var(--editor-selected-h-v25) !important;
  padding: 3px 8px !important;
  background: #fff7d8 !important;
  border-bottom: 1px solid #ead78a !important;
  overflow: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .editor-ledger-row-label,
body:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-head {
  display: none !important;
}

body:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-table {
  height: 32px !important;
  overflow: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-row {
  display: grid !important;
  grid-template-columns: 150px 92px minmax(220px, 1fr) 120px 118px 86px 90px !important;
  gap: 6px !important;
  align-items: center !important;
}

body:not(.home-mode):not(.purchase-mode) .editor-selected-ledger-cell {
  min-height: 28px !important;
  height: 28px !important;
  padding: 2px 7px !important;
  border-radius: 7px !important;
  overflow: hidden !important;
}

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

body:not(.home-mode):not(.purchase-mode) .sync-panel {
  top: calc(var(--editor-toolbar-h-v25) + var(--editor-count-h-v25) + var(--editor-selected-h-v25)) !important;
  min-height: var(--editor-sync-h-v25) !important;
  height: var(--editor-sync-h-v25) !important;
  padding: 2px 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #e7f4fc !important;
  border-bottom: 1px solid #b9def3 !important;
  overflow: hidden !important;
}

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

body:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head strong,
body:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head span {
  font-size: 13px !important;
  line-height: 1 !important;
}

body:not(.home-mode):not(.purchase-mode) .sync-panel .sync-actions {
  margin-left: auto !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
}

body:not(.home-mode):not(.purchase-mode) .sync-panel button {
  min-height: 20px !important;
  height: 20px !important;
  padding: 0 7px !important;
  font-size: 10px !important;
  border-radius: 6px !important;
}

body:not(.home-mode):not(.purchase-mode) .stepper {
  top: calc(var(--editor-toolbar-h-v25) + var(--editor-count-h-v25) + var(--editor-selected-h-v25) + var(--editor-sync-h-v25)) !important;
  min-height: var(--editor-stepper-h-v25) !important;
  height: var(--editor-stepper-h-v25) !important;
  padding: 3px 10px !important;
  background: #07324f !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  color: #d7ecfb !important;
  border-top: 1px solid #062a43 !important;
  border-bottom: 1px solid #0da9d7 !important;
  opacity: 1 !important;
}

body:not(.home-mode):not(.purchase-mode) .stepper .step {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  gap: 2px !important;
  color: #d7ecfb !important;
  opacity: 1 !important;
  background: transparent !important;
}

body:not(.home-mode):not(.purchase-mode) .stepper .step span {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  font-size: 10px !important;
  background: #3e6a85 !important;
  color: #fff !important;
}

body:not(.home-mode):not(.purchase-mode) .stepper .step.active,
body:not(.home-mode):not(.purchase-mode) .stepper .step[aria-current="step"] {
  color: #fff !important;
}

body:not(.home-mode):not(.purchase-mode) .stepper .step.active span,
body:not(.home-mode):not(.purchase-mode) .stepper .step[aria-current="step"] span {
  background: #caa23a !important;
  color: #06243a !important;
}

body:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  top: calc(var(--editor-toolbar-h-v25) + var(--editor-count-h-v25) + var(--editor-selected-h-v25) + var(--editor-sync-h-v25) + var(--editor-stepper-h-v25)) !important;
  min-height: var(--editor-status-h-v25) !important;
  height: var(--editor-status-h-v25) !important;
  padding: 4px 10px !important;
  display: grid !important;
  grid-template-columns: 180px minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
  background: #f5fbff !important;
  border-bottom: 1px solid #b9def3 !important;
  z-index: 260 !important;
  overflow: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .listing-status-panel--global span {
  font-size: 10px !important;
  line-height: 1 !important;
}

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

body: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:not(.home-mode):not(.purchase-mode) .listing-status-btn {
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  border-radius: 999px !important;
}

body:not(.home-mode):not(.purchase-mode) #itemForm {
  padding-top: 8px !important;
  scroll-margin-top: 216px !important;
}

@media (max-width: 760px) {
  body:not(.home-mode):not(.purchase-mode) {
    --editor-toolbar-h-v25: 30px;
    --editor-count-h-v25: 30px;
    --editor-selected-h-v25: 34px;
    --editor-sync-h-v25: 0px;
    --editor-stepper-h-v25: 36px;
    --editor-status-h-v25: 76px;
    scroll-padding-top: 176px;
  }

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

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

  body:not(.home-mode):not(.purchase-mode) .editor-count-strip {
    overflow-x: auto !important;
    grid-template-columns: repeat(5, 108px) !important;
  }

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

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

  body:not(.home-mode):not(.purchase-mode) .stepper {
    top: calc(var(--editor-toolbar-h-v25) + var(--editor-count-h-v25) + var(--editor-selected-h-v25)) !important;
    grid-template-columns: repeat(5, 68px) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  body:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    top: calc(var(--editor-toolbar-h-v25) + var(--editor-count-h-v25) + var(--editor-selected-h-v25) + var(--editor-stepper-h-v25)) !important;
    grid-template-columns: 82px minmax(0, 1fr) !important;
    height: var(--editor-status-h-v25) !important;
    min-height: var(--editor-status-h-v25) !important;
    align-items: center !important;
  }

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

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

  body:not(.home-mode):not(.purchase-mode) #itemForm {
    scroll-margin-top: 176px !important;
  }
}

/* v26 sticky header safety: keep everything through "current status" visible. */
body:not(.home-mode):not(.purchase-mode) .editor,
body:not(.home-mode):not(.purchase-mode) .editor-shell,
body:not(.home-mode):not(.purchase-mode) .editor-main,
body:not(.home-mode):not(.purchase-mode) .listing-editor,
body:not(.home-mode):not(.purchase-mode) .listing-editor-layout,
body:not(.home-mode):not(.purchase-mode) .listing-main,
body:not(.home-mode):not(.purchase-mode) .main-content {
  overflow: visible !important;
}

body:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar {
  z-index: 310 !important;
}

body:not(.home-mode):not(.purchase-mode) .editor-count-strip {
  z-index: 309 !important;
}

body:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar {
  z-index: 308 !important;
}

body:not(.home-mode):not(.purchase-mode) .sync-panel {
  z-index: 307 !important;
}

body:not(.home-mode):not(.purchase-mode) .stepper {
  z-index: 306 !important;
}

body:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
  z-index: 305 !important;
  border-top: 1px solid #d3e8f5 !important;
}

body:not(.home-mode):not(.purchase-mode) .stepper,
body:not(.home-mode):not(.purchase-mode) .stepper * {
  opacity: 1 !important;
}

body:not(.home-mode):not(.purchase-mode) .stepper .step:not(.active):not([aria-current="step"]) {
  color: #d7ecfb !important;
}

body:not(.home-mode):not(.purchase-mode) .stepper .step:not(.active):not([aria-current="step"]) span {
  background: #37637e !important;
  color: #ffffff !important;
}

body:not(.home-mode):not(.purchase-mode) .sync-panel .sync-head {
  max-width: 42%;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (max-width: 760px) {
  body:not(.home-mode):not(.purchase-mode) .listing-editor-toolbar,
  body:not(.home-mode):not(.purchase-mode) .editor-count-strip,
  body:not(.home-mode):not(.purchase-mode) .editor-selected-item-bar,
  body:not(.home-mode):not(.purchase-mode) .stepper,
  body:not(.home-mode):not(.purchase-mode) .listing-status-panel--global {
    left: 0 !important;
    right: 0 !important;
  }
}

/* v27: the current editor has six steps (0-5), so do not squeeze or wash them out. */
body:not(.home-mode):not(.purchase-mode) .stepper {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

body:not(.home-mode):not(.purchase-mode) .stepper .step,
body:not(.home-mode):not(.purchase-mode) .stepper .step strong,
body:not(.home-mode):not(.purchase-mode) .stepper .step span,
body:not(.home-mode):not(.purchase-mode) .stepper .step small {
  color: inherit !important;
  text-shadow: none !important;
}

@media (max-width: 760px) {
  body:not(.home-mode):not(.purchase-mode) .stepper {
    grid-template-columns: repeat(6, 64px) !important;
  }
}

/* v28: compact AI recognition panel. Put controls on the left and preview/result on the right. */
body:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone,
body:not(.home-mode):not(.purchase-mode) .ai-inline-card.ai-drop-zone {
  display: grid !important;
  grid-template-columns: 64px minmax(0, 1fr) auto !important;
  grid-template-areas:
    "icon title cost"
    "actions preview preview"
    "hint result note" !important;
  align-items: center !important;
  column-gap: 10px !important;
  row-gap: 6px !important;
  padding: 10px 12px !important;
}

body:not(.home-mode):not(.purchase-mode) .ai-inline-card.ai-drop-zone {
  grid-template-columns: minmax(180px, 250px) minmax(0, 1fr) auto !important;
  grid-template-areas:
    "title title cost"
    "actions preview preview"
    "hint result note" !important;
}

body:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone > .start-icon {
  grid-area: icon !important;
}

body:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone > div:not(.start-icon):not(.ai-cost-links):not(.ai-action-row) {
  grid-area: title !important;
  min-width: 0 !important;
}

body:not(.home-mode):not(.purchase-mode) .ai-inline-card.ai-drop-zone > .ai-card-head {
  grid-area: title !important;
  min-width: 0 !important;
}

body:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone > .ai-cost-links {
  grid-area: cost !important;
  justify-self: end !important;
  align-self: start !important;
}

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

body:not(.home-mode):not(.purchase-mode) .ai-cost-links a,
body:not(.home-mode):not(.purchase-mode) .ai-cost-links button {
  min-height: 28px !important;
  padding: 3px 8px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone > .ai-action-row,
body:not(.home-mode):not(.purchase-mode) .ai-inline-card.ai-drop-zone > .ai-action-row {
  grid-area: actions !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(82px, 1fr)) !important;
  gap: 6px !important;
  min-width: 184px !important;
  max-width: 250px !important;
}

body:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
body:not(.home-mode):not(.purchase-mode) .ai-action-row .file-button,
body:not(.home-mode):not(.purchase-mode) .ai-action-row button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

body:not(.home-mode):not(.purchase-mode) .ai-action-row .ai-recognize-btn {
  color: #ffffff !important;
  background: #d92d20 !important;
  border-color: #d92d20 !important;
  font-weight: 900 !important;
}

body:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone > .ai-preview,
body:not(.home-mode):not(.purchase-mode) .ai-inline-card.ai-drop-zone > .ai-preview {
  grid-area: preview !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 70px !important;
  min-height: 70px !important;
  padding: 6px 10px !important;
  overflow: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .ai-preview img {
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

body:not(.home-mode):not(.purchase-mode) .ai-preview > span,
body:not(.home-mode):not(.purchase-mode) .ai-result > span {
  display: block !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  writing-mode: horizontal-tb !important;
}

body:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone > .ai-result,
body:not(.home-mode):not(.purchase-mode) .ai-inline-card.ai-drop-zone > .ai-result {
  grid-area: result !important;
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
  min-height: 36px !important;
  padding: 6px 10px !important;
  overflow: hidden !important;
}

body:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone > .ai-paste-hint,
body:not(.home-mode):not(.purchase-mode) .ai-inline-card.ai-drop-zone > .ai-paste-hint {
  grid-area: hint !important;
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

body:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone > .hint,
body:not(.home-mode):not(.purchase-mode) .ai-inline-card.ai-drop-zone > .hint {
  grid-area: note !important;
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

@media (max-width: 760px) {
  body:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone,
  body:not(.home-mode):not(.purchase-mode) .ai-inline-card.ai-drop-zone {
    grid-template-columns: minmax(128px, 38%) minmax(0, 1fr) !important;
    grid-template-areas:
      "title title"
      "actions preview"
      "hint result" !important;
    padding: 8px !important;
    column-gap: 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone > .start-icon,
  body:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone > .ai-cost-links,
  body:not(.home-mode):not(.purchase-mode) .ai-inline-card.ai-drop-zone .ai-cost-links,
  body:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone > .hint,
  body:not(.home-mode):not(.purchase-mode) .ai-inline-card.ai-drop-zone > .hint {
    display: none !important;
  }

  body:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone > .ai-action-row,
  body:not(.home-mode):not(.purchase-mode) .ai-inline-card.ai-drop-zone > .ai-action-row {
    min-width: 0 !important;
    max-width: none !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone > .ai-preview,
  body:not(.home-mode):not(.purchase-mode) .ai-inline-card.ai-drop-zone > .ai-preview {
    height: 64px !important;
    min-height: 64px !important;
  }
}

@media (max-width: 420px) {
  body:not(.home-mode):not(.purchase-mode) .start-card.ai-drop-zone,
  body:not(.home-mode):not(.purchase-mode) .ai-inline-card.ai-drop-zone {
    grid-template-columns: minmax(116px, 40%) minmax(0, 1fr) !important;
    padding: 8px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ai-action-row .upload-box,
  body:not(.home-mode):not(.purchase-mode) .ai-action-row .file-button,
  body:not(.home-mode):not(.purchase-mode) .ai-action-row button {
    height: 28px !important;
    min-height: 28px !important;
    padding: 3px 6px !important;
    font-size: 11px !important;
  }

  body:not(.home-mode):not(.purchase-mode) .ai-preview > span,
  body:not(.home-mode):not(.purchase-mode) .ai-result > span {
    font-size: 11px !important;
  }
}

/* v29: Step 1 basic information density.
   Keep purchase/type side by side and let condition use the full row. */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-fast-grid--setup {
  display: grid !important;
  grid-template-columns: minmax(320px, 0.95fr) minmax(380px, 1.05fr) !important;
  gap: 10px 12px !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-fast-grid--setup > .basic-fast-card {
  min-width: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border-radius: 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-fast-grid--setup > .basic-grade-card {
  grid-column: 1 / -1 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-fast-card .group-title {
  margin: 0 0 8px !important;
  line-height: 1.2 !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-purchase-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-purchase-grid label {
  min-width: 0 !important;
  gap: 3px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-purchase-grid input,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-purchase-grid select {
  min-height: 38px !important;
  height: 38px !important;
  padding: 6px 10px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-type-card .choice-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) [data-section="basic"] .basic-type-card .choice {
  min-height: 42px !important;
  padding: 7px 10px !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  white-space: normal !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-grade-card .grade-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-grade-card .choice {
  min-height: 38px !important;
  padding: 6px 10px !important;
  font-size: 14px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
}

@media (min-width: 1280px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-grade-card .grade-row {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-fast-grid--setup {
    grid-template-columns: 1fr !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-grade-card .grade-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-fast-grid--setup {
    gap: 8px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-fast-grid--setup > .basic-fast-card {
    padding: 10px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-purchase-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-type-card .choice-grid,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-grade-card .grade-row {
    gap: 6px !important;
  }

  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-type-card .choice,
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-grade-card .choice {
    min-height: 36px !important;
    padding: 5px 8px !important;
    font-size: 13px !important;
  }
}

/* 20260720 ledger compact row v30 */
#ledgerPanel .ledger-status-filters {
  display: none !important;
}

@media (min-width: 901px) {
  #ledgerPanel .ledger-scroll {
    overflow-x: hidden !important;
  }

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

  #ledgerPanel .ledger-table th,
  #ledgerPanel .ledger-table td {
    box-sizing: border-box;
    padding-left: 6px !important;
    padding-right: 6px !important;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #ledgerPanel .ledger-table th:nth-child(1),
  #ledgerPanel .ledger-table td:nth-child(1) {
    width: 15% !important;
  }

  #ledgerPanel .ledger-table th:nth-child(2),
  #ledgerPanel .ledger-table td:nth-child(2) {
    width: 8% !important;
  }

  #ledgerPanel .ledger-table th:nth-child(3),
  #ledgerPanel .ledger-table td:nth-child(3) {
    width: 29% !important;
  }

  #ledgerPanel .ledger-table th:nth-child(4),
  #ledgerPanel .ledger-table td:nth-child(4) {
    width: 10% !important;
  }

  #ledgerPanel .ledger-table th:nth-child(5),
  #ledgerPanel .ledger-table td:nth-child(5) {
    width: 11% !important;
  }

  #ledgerPanel .ledger-table th:nth-child(6),
  #ledgerPanel .ledger-table td:nth-child(6) {
    width: 7% !important;
  }

  #ledgerPanel .ledger-table th:nth-child(7),
  #ledgerPanel .ledger-table td:nth-child(7) {
    width: 7% !important;
  }

  #ledgerPanel .ledger-table th:nth-child(8),
  #ledgerPanel .ledger-table td:nth-child(8) {
    width: 13% !important;
    overflow: visible !important;
  }

  #ledgerPanel .ledger-table td:nth-child(1) {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  #ledgerPanel .ledger-table td:nth-child(1) input {
    width: calc(50% - 3px) !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  #ledgerPanel .ledger-table input {
    min-width: 0 !important;
    max-width: 100% !important;
    height: 32px !important;
    padding: 4px 8px !important;
  }

  #ledgerPanel td.ledger-title > :not(strong) {
    display: none !important;
  }

  #ledgerPanel td.ledger-title strong {
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #ledgerPanel td.ledger-actions {
    overflow: visible !important;
    text-align: left !important;
    white-space: nowrap !important;
  }

  #ledgerPanel td.ledger-actions .ledger-edit,
  #ledgerPanel td.ledger-actions .ledger-delete,
  #ledgerPanel td.ledger-actions button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 46px !important;
    max-width: none !important;
    height: 32px !important;
    margin: 0 3px 0 0 !important;
    padding: 4px 8px !important;
    font-size: 13px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }
}

@media (max-width: 900px) {
  #ledgerPanel .ledger-status-filters {
    display: none !important;
  }
}
/* 20260720 ledger final row repair v31
   Keep ledger rows as a real table. This cancels older flex overrides that
   pushed edit/delete buttons into the product-title column. */
#ledgerPanel .ledger-status-filters,
#ledgerPanel [aria-label="出品台帳ステータス絞り込み"] {
  display: none !important;
}

@media (min-width: 901px) {
  #ledgerPanel .ledger-scroll {
    overflow-x: hidden !important;
  }

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

  #ledgerPanel .ledger-table th,
  #ledgerPanel .ledger-table td,
  #listingLedger td {
    display: table-cell !important;
    box-sizing: border-box !important;
    height: 42px !important;
    padding: 4px 5px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #ledgerPanel .ledger-table th:nth-child(1),
  #ledgerPanel .ledger-table td:nth-child(1) { width: 16% !important; }
  #ledgerPanel .ledger-table th:nth-child(2),
  #ledgerPanel .ledger-table td:nth-child(2) { width: 8% !important; }
  #ledgerPanel .ledger-table th:nth-child(3),
  #ledgerPanel .ledger-table td:nth-child(3) { width: 30% !important; }
  #ledgerPanel .ledger-table th:nth-child(4),
  #ledgerPanel .ledger-table td:nth-child(4) { width: 9% !important; }
  #ledgerPanel .ledger-table th:nth-child(5),
  #ledgerPanel .ledger-table td:nth-child(5) { width: 11% !important; }
  #ledgerPanel .ledger-table th:nth-child(6),
  #ledgerPanel .ledger-table td:nth-child(6) { width: 7% !important; }
  #ledgerPanel .ledger-table th:nth-child(7),
  #ledgerPanel .ledger-table td:nth-child(7) { width: 7% !important; }
  #ledgerPanel .ledger-table th:nth-child(8),
  #ledgerPanel .ledger-table td:nth-child(8) { width: 12% !important; }

  #ledgerPanel .ledger-table td:nth-child(1) {
    display: table-cell !important;
  }

  #ledgerPanel .ledger-table td:nth-child(1) input,
  #ledgerPanel .ledger-table td:nth-child(1) select,
  #ledgerPanel .ledger-table .ledger-purchase-cell input,
  #ledgerPanel .ledger-table .ledger-purchase-cell select {
    display: inline-block !important;
    width: calc(50% - 4px) !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 30px !important;
    margin: 0 3px 0 0 !important;
    padding: 3px 7px !important;
    font-size: 13px !important;
    vertical-align: middle !important;
  }

  #ledgerPanel .ledger-table td:nth-child(2) input,
  #ledgerPanel .ledger-table td:nth-child(4) input,
  #ledgerPanel .ledger-table td:nth-child(6) input {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 30px !important;
    padding: 3px 7px !important;
    font-size: 13px !important;
  }

  #ledgerPanel td.ledger-title,
  #listingLedger td.ledger-title {
    position: static !important;
    display: table-cell !important;
    overflow: hidden !important;
    text-align: left !important;
  }

  #ledgerPanel td.ledger-title > :not(strong),
  #listingLedger td.ledger-title > :not(strong) {
    display: none !important;
  }

  #ledgerPanel td.ledger-title strong,
  #listingLedger td.ledger-title strong {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #listingLedger td:not(.ledger-actions) .ledger-edit,
  #listingLedger td:not(.ledger-actions) .ledger-delete,
  #ledgerPanel td:not(.ledger-actions) .ledger-edit,
  #ledgerPanel td:not(.ledger-actions) .ledger-delete {
    display: none !important;
  }

  #ledgerPanel td.ledger-actions,
  #listingLedger td.ledger-actions {
    position: static !important;
    display: table-cell !important;
    overflow: visible !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  #ledgerPanel td.ledger-actions .ledger-edit,
  #ledgerPanel td.ledger-actions .ledger-delete,
  #listingLedger td.ledger-actions .ledger-edit,
  #listingLedger td.ledger-actions .ledger-delete {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 42px !important;
    max-width: none !important;
    height: 30px !important;
    margin: 0 2px !important;
    padding: 3px 7px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  #ledgerPanel .status-badge {
    max-width: 100% !important;
    height: 28px !important;
    padding: 3px 9px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 900px) {
  #ledgerPanel .ledger-status-filters,
  #ledgerPanel [aria-label="出品台帳ステータス絞り込み"] {
    display: none !important;
  }
}

/* 20260722 listing workflow v10: show all six specification-defined steps. */
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="sale"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="photos"] {
  display: flex !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section[data-section="photos"] {
  display: none !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .form-section[data-section="photos"].active {
  display: block !important;
}

.sync-retry-btn {
  min-height: 30px;
  border: 1px solid #c2410c;
  border-radius: 8px;
  padding: 4px 10px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
  cursor: pointer;
}

.recognition-candidate-dialog {
  width: min(760px, calc(100vw - 32px));
  max-width: 760px;
  max-height: min(760px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #0f2940;
  box-shadow: 0 24px 70px rgba(3, 35, 57, 0.32);
}

.recognition-candidate-dialog::backdrop {
  background: rgba(2, 23, 39, 0.62);
  backdrop-filter: blur(2px);
}

.recognition-candidate-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  max-height: min(760px, calc(100dvh - 32px));
  overflow: hidden;
  border: 1px solid #b9d8ea;
  border-radius: 18px;
  background: #f7fbfe;
}

.recognition-candidate-shell > header,
.recognition-candidate-shell > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: #ffffff;
}

.recognition-candidate-shell > header {
  border-bottom: 1px solid #d4e5ef;
}

.recognition-candidate-shell > header span {
  color: #286084;
  font-size: 12px;
  font-weight: 800;
}

.recognition-candidate-shell > header h2 {
  margin: 2px 0 0;
  font-size: 22px;
}

.recognition-candidate-close {
  width: 38px;
  height: 38px;
  border: 1px solid #c9dce8;
  border-radius: 50%;
  background: #fff;
  color: #264a64;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.recognition-candidate-note {
  margin: 0;
  padding: 11px 18px;
  border-bottom: 1px solid #d4e5ef;
  background: #eaf6fd;
  color: #31556e;
  font-size: 13px;
}

.recognition-candidate-list {
  display: grid;
  gap: 10px;
  min-height: 160px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 16px;
}

.recognition-candidate-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 13px;
  border: 2px solid #cfe1ec;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.recognition-candidate-card.is-selected {
  border-color: #0898cf;
  box-shadow: 0 0 0 3px rgba(8, 152, 207, 0.12);
}

.recognition-candidate-card input {
  margin-top: 4px;
}

.recognition-candidate-card strong,
.recognition-candidate-card small,
.recognition-candidate-card span {
  display: block;
  overflow-wrap: anywhere;
}

.recognition-candidate-card strong {
  font-size: 17px;
}

.recognition-candidate-card small {
  margin-bottom: 5px;
  color: #08749d;
  font-weight: 800;
}

.recognition-candidate-card span {
  margin-top: 3px;
  color: #526d7f;
  font-size: 13px;
}

.recognition-candidate-empty {
  margin: auto;
  color: #526d7f;
  text-align: center;
}

.recognition-candidate-shell > footer {
  justify-content: flex-end;
  border-top: 1px solid #d4e5ef;
}

@media (max-width: 900px) {
  body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step {
    min-width: 0 !important;
    padding-inline: 2px !important;
    font-size: 10px !important;
  }

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

  .recognition-candidate-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .recognition-candidate-shell {
    max-height: calc(100dvh - 16px);
    border-radius: 14px;
  }

  .recognition-candidate-shell > header,
  .recognition-candidate-shell > footer {
    padding: 12px;
  }

  .recognition-candidate-shell > header h2 {
    font-size: 19px;
  }

  .recognition-candidate-list {
    padding: 10px;
  }
}

/* Release: 20260722-listing-v13; candidate safety, compact basic UI, live title, six-step navigation and service-worker recovery. */

.app-release-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 1.65rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid rgba(4, 58, 91, 0.2);
  border-radius: 999px;
  background: #fff7d6;
  color: #614600;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-purchase-card,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-type-card {
  align-self: stretch !important;
  height: 100% !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-type-card .choice-grid {
  grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
  height: calc(100% - 34px) !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) [data-section="basic"] .basic-type-card .choice {
  min-height: 38px !important;
  padding: 5px 7px !important;
  font-size: 13px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step,
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="sale"],
body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step[data-step="photos"] {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1px !important;
  line-height: 1 !important;
  text-align: center !important;
}

body.listing-editor-mode:not(.home-mode):not(.purchase-mode) .stepper .step span {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
}

.recognition-candidate-dialog {
  width: min(920px, calc(100vw - 32px));
  max-width: 920px;
}

.recognition-candidate-card {
  display: block;
  padding: 0;
  overflow: hidden;
}

.recognition-candidate-main {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  cursor: pointer;
}

.recognition-candidate-main > input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 4px 0 0;
}

.recognition-candidate-summary strong,
.recognition-candidate-summary small,
.recognition-candidate-summary > span {
  display: block;
  overflow-wrap: anywhere;
}

.recognition-candidate-summary strong {
  font-size: 17px;
}

.recognition-candidate-summary small {
  margin-bottom: 5px;
  color: #08749d;
  font-weight: 800;
}

.recognition-candidate-summary > span {
  margin-top: 3px;
  color: #526d7f;
  font-size: 13px;
}

.recognition-candidate-details {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px 56px;
  border-top: 1px solid #e2edf3;
  background: #fbfdff;
}

.recognition-detail-status {
  margin: 12px 0 0;
  color: #31556e;
  font-size: 13px;
}

.recognition-detail-status.is-error {
  color: #b42318;
}

.recognition-retry-detail {
  justify-self: start;
  min-height: 32px;
}

.recognition-specifics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
}

.recognition-specific-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid #d8e7ef;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}

.recognition-specific-row dt {
  color: #527084;
  font-weight: 800;
}

.recognition-specific-row dd {
  margin: 0;
  color: #122f44;
  overflow-wrap: anywhere;
}

.recognition-specific-row.is-conflict {
  border-color: #e9b949;
  background: #fffaf0;
}

.recognition-specific-row small {
  display: block;
  margin-top: 3px;
  color: #9a6700;
}

.recognition-identifiers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.recognition-identifier-group {
  padding: 10px;
  border: 1px solid #cfe1ec;
  border-radius: 10px;
  background: #fff;
}

.recognition-identifier-group h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.recognition-identifier-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.recognition-identifier-option + .recognition-identifier-option {
  margin-top: 6px;
}

.recognition-identifier-option:hover {
  background: #f0f8fc;
}

.recognition-identifier-option.is-disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.recognition-identifier-option input {
  margin-top: 3px;
}

.recognition-identifier-option strong,
.recognition-identifier-option span,
.recognition-identifier-option small {
  display: block;
  overflow-wrap: anywhere;
}

.recognition-identifier-option span {
  margin-top: 2px;
  color: #49677a;
  font-size: 12px;
}

.recognition-identifier-option small {
  margin-top: 3px;
  color: #6c7f8c;
  font-size: 11px;
}

.recognition-identifier-status {
  font-weight: 800;
}

.recognition-identifier-status.is-confirmed,
.recognition-identifier-status.is-common {
  color: #067647;
}

.recognition-identifier-status.is-review {
  color: #9a6700;
}

.recognition-identifier-status.is-unusable {
  color: #b42318;
}

.recognition-candidate-shell > footer {
  justify-content: space-between;
  flex-wrap: wrap;
}

.recognition-overwrite-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #284d65;
  font-size: 13px;
  font-weight: 800;
}

.recognition-overwrite-option input {
  width: 18px;
  height: 18px;
}

.recognition-footer-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.live-ebay-title-card {
  display: grid;
  gap: 7px;
  margin: 10px 0 14px;
  padding: 11px 12px;
  border: 1px solid #bcd8e8;
  border-radius: 12px;
  background: #f7fcff;
}

.live-ebay-title-head,
.live-ebay-title-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.live-ebay-title-head label {
  color: #153c57;
  font-size: 13px;
  font-weight: 900;
}

.live-ebay-title-head strong {
  color: #286084;
  font-size: 12px;
  white-space: nowrap;
}

#liveEbayTitleInput {
  width: 100%;
  min-height: 40px;
  border: 1px solid #a9c9dc;
  border-radius: 9px;
  padding: 8px 10px;
  background: #fff;
  color: #102f44;
  font-weight: 700;
}

.live-ebay-title-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.live-ebay-title-actions span {
  margin-right: auto;
  color: #5a7384;
  font-size: 11px;
}

.live-ebay-title-actions button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
}

@media (max-width: 900px) {
  .recognition-candidate-details {
    padding: 0 10px 10px 10px;
  }

  .recognition-specifics-grid,
  .recognition-identifiers {
    grid-template-columns: 1fr;
  }

  .recognition-candidate-main {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 12px;
    padding: 11px;
  }

  .recognition-candidate-shell > footer {
    align-items: stretch;
  }

  .recognition-overwrite-option {
    width: 100%;
  }

  .recognition-footer-actions {
    width: 100%;
  }

  .recognition-footer-actions button {
    flex: 1;
  }
}

/* 2026-07-22 v14: purchase place column and compact action area. */
@media (min-width: 901px) {
  #ledgerPanel .ledger-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  #ledgerPanel .ledger-table th,
  #ledgerPanel .ledger-table td {
    padding: 5px 6px !important;
  }

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

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

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

  #ledgerPanel .ledger-table th:nth-child(4),
  #ledgerPanel .ledger-table td:nth-child(4) { width: auto !important; }

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

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

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

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

  #ledgerPanel .ledger-table th:nth-child(9),
  #ledgerPanel .ledger-table td:nth-child(9) { width: 92px !important; }

  #ledgerPanel .ledger-table .ledger-purchase-place {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    color: #153c57 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
  }

  #ledgerPanel .ledger-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 3px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
  }

  #ledgerPanel .ledger-actions button {
    min-width: 40px !important;
    padding: 3px 5px !important;
  }

  #ledgerPanel .ledger-table td:nth-child(1) .ledger-date-input,
  #ledgerPanel .ledger-table .ledger-order-input,
  #ledgerPanel .ledger-table .ledger-sku-input,
  #ledgerPanel .ledger-table .ledger-price-input {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
}

/* 2026-07-23 v15: eBay API audit and verified UPC + MPN pairs. */
.recognition-api-audit {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #9dc9df;
  border-radius: 12px;
  background: #eef9ff;
  color: #163e57;
}

.recognition-api-audit.is-success {
  border-color: #58b88a;
  background: #effbf5;
}

.recognition-api-audit.is-error {
  border-color: #d69b58;
  background: #fff8eb;
}

.recognition-api-audit strong,
.recognition-api-audit span {
  display: block;
  overflow-wrap: anywhere;
}

.recognition-pair-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 2px solid #20a6d3;
  border-radius: 14px;
  background: #f4fbff;
}

.recognition-pair-section h3,
.recognition-pair-section p {
  margin: 0;
}

.recognition-pair-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

.recognition-pair-card {
  display: grid;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid #9fc7d9;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.recognition-pair-main {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  cursor: inherit;
}

.recognition-pair-main > input,
.recognition-pair-reference-mark {
  grid-column: 1;
  width: 20px;
  min-width: 20px;
  height: 20px;
  margin: 2px 0 0;
}

.recognition-pair-body {
  grid-column: 2;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.recognition-pair-body > span,
.recognition-pair-body > small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.recognition-pair-card.is-selected {
  border: 2px solid #087faa;
  box-shadow: 0 0 0 3px rgb(8 127 170 / 12%);
}

.recognition-pair-card.is-recommended {
  border-color: #1b8f5a;
  background: #f3fff8;
}

.recognition-pair-card.is-recommended.is-selected {
  border-color: #087a4d;
  box-shadow: 0 0 0 3px rgb(8 122 77 / 14%);
}

.recognition-pair-card.is-disabled {
  border-color: #d7c8aa;
  background: #fbf7ef;
  cursor: not-allowed;
  opacity: .82;
}

.recognition-pair-card.is-reference {
  cursor: default;
}

.recognition-pair-reference {
  border-top: 1px solid #b9dbe9;
  padding-top: 10px;
}

.recognition-pair-reference summary {
  width: fit-content;
  color: #526774;
  font-weight: 800;
  cursor: pointer;
}

.recognition-pair-reference[open] {
  display: grid;
  gap: 10px;
}

.recognition-pair-reference-mark {
  display: grid;
  place-items: center;
  color: #8a7352;
  font-weight: 900;
}

.recognition-candidate-card.is-disabled {
  border-color: #d9d9d9;
  background: #f7f7f7;
  opacity: .7;
  cursor: not-allowed;
}

.recognition-pair-values {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.recognition-pair-values strong {
  color: #082f49;
  font-size: 15px;
}

.recognition-pair-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.recognition-pair-color-badge,
.recognition-pair-recommended-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 25px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.recognition-pair-color-badge.is-known {
  border: 1px solid #167aa1;
  background: #e4f6fd;
  color: #07506d;
}

.recognition-pair-color-badge.is-unknown {
  border: 1px solid #b9a77f;
  background: #fff8e8;
  color: #75500a;
}

.recognition-pair-recommended-badge {
  border: 1px solid #128052;
  background: #daf7e8;
  color: #075d3b;
}

.recognition-pair-status {
  margin-top: 4px;
  font-weight: 800;
}

.recognition-pair-status.is-confirmed {
  color: #08764c;
}

.recognition-pair-status.is-review {
  color: #a25d00;
}

.recognition-pair-specific-preview {
  display: grid;
  gap: 8px;
  margin-left: 40px;
  padding: 10px;
  border: 1px solid #c9dce6;
  border-radius: 10px;
  background: #f7fbfd;
  cursor: default;
}

.recognition-pair-specific-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  color: #163e57;
}

.recognition-pair-specific-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #d9f2fb;
  color: #075f82;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.recognition-pair-specific-list {
  display: grid;
  gap: 5px;
  margin: 0;
}

.recognition-pair-specific-row {
  display: grid;
  grid-template-columns: minmax(100px, .8fr) minmax(0, 1.2fr);
  gap: 8px;
  padding-top: 5px;
  border-top: 1px solid #deebf1;
}

.recognition-pair-specific-row dt,
.recognition-pair-specific-row dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.recognition-pair-specific-row dt {
  color: #526b79;
  font-size: 12px;
  font-weight: 800;
}

.recognition-pair-specific-row dd {
  color: #173d52;
  font-size: 13px;
}

.recognition-pair-specific-more {
  border-top: 1px solid #c9dce6;
  padding-top: 7px;
}

.recognition-pair-specific-more summary {
  width: fit-content;
  color: #087faa;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.recognition-pair-specific-more[open] {
  display: grid;
  gap: 8px;
}

.recognition-pair-specific-empty {
  margin: 0;
  color: #6d7d86;
  font-size: 13px;
}

.specific-candidate-chip.is-reference-only,
.specific-candidate-chip.is-reference-only:disabled {
  cursor: not-allowed;
  border-style: dashed;
  border-color: #c7a45b;
  background: #fffaf0;
  color: #6f5a35;
  opacity: .82;
}

#applyRecognitionCandidateBtn:disabled {
  cursor: not-allowed;
  opacity: .45;
  filter: grayscale(.35);
}

.specific-candidate-chip.is-catalog-verified {
  border-color: #16a3d1;
  box-shadow: inset 0 0 0 1px rgb(22 163 209 / 22%);
}

.recognition-api-error-detail {
  color: #a12b20;
  font-weight: 700;
}

@media (max-width: 700px) {
  .recognition-pair-list {
    grid-template-columns: 1fr;
  }

  .recognition-pair-card {
    padding: 10px;
  }

  .recognition-pair-main {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
  }

  .recognition-pair-specific-preview {
    margin-left: 34px;
  }

  .recognition-pair-specific-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* v88: final ledger column ownership. Keep this after historical hotfixes. */
@media (min-width: 1101px) {
  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-head {
    grid-template-columns: minmax(150px, 0.22fr) minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-head-actions {
    display: grid !important;
    grid-template-columns: minmax(110px, 1fr) minmax(170px, 0.9fr) repeat(4, max-content) !important;
    align-items: center !important;
    gap: 4px !important;
    min-width: 0 !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-head-actions > :not(.ledger-toggle) {
    grid-area: auto !important;
    grid-row: 1 !important;
    grid-column: auto !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel .ledger-head-actions p {
    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 .ledger-head-actions .ledger-maintenance-btn {
    min-width: 0 !important;
    padding-inline: 7px !important;
    white-space: nowrap !important;
  }

  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 :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: 198px !important; min-width: 198px !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 !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 .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-order-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-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-row-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 2px !important;
    width: 198px !important;
    min-width: 198px !important;
    padding: 5px 1px 5px 0 !important;
    white-space: nowrap !important;
    vertical-align: middle !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;
    font-size: 12px !important;
  }

  html body.listing-ledger-mode:not(.home-mode):not(.purchase-mode) #ledgerPanel td.ledger-row-controls 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 5px !important;
    border-radius: 999px !important;
    font-size: 12px !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;
  }
}
