    * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
      background: #f5f5f4;
      color: #2a2a2a;
      min-height: 100dvh;
      width: 100vw;
      overflow: hidden;
}

/* ── Search Console impact ── */
.seo-impact { width: 100%; min-width: 0; }
.seo-impact-wrap { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 0 96px; }
.seo-impact-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.seo-impact-window-label { display: flex; align-items: center; gap: 7px; color: rgba(0, 0, 0, 0.42); font-size: 10px; font-weight: 750; letter-spacing: 0.4px; text-transform: uppercase; }
.seo-impact-window-label select { min-height: 42px; padding: 8px 11px; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 10px; background: #fff; color: #2a2a2a; font-family: inherit; font-size: 12px; font-weight: 650; text-transform: none; }
.seo-impact-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; max-width: 430px; margin: 14px 0 10px; padding: 4px; border-radius: 11px; background: rgba(0, 0, 0, 0.06); }
.seo-impact-tabs button { min-height: 42px; border: 0; border-radius: 8px; background: transparent; color: rgba(0, 0, 0, 0.48); font-family: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.seo-impact-tabs button.active { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); color: #2a2a2a; }
.seo-impact-timing { margin-bottom: 10px; padding: 10px 12px; border: 1px solid rgba(37, 99, 235, 0.14); border-radius: 10px; background: rgba(37, 99, 235, 0.045); color: #40516b; font-size: 11px; line-height: 1.5; }
.seo-impact-status { padding: 28px 8px; color: rgba(0, 0, 0, 0.42); font-size: 12px; text-align: center; }
.seo-impact-status[hidden] { display: none; }
.seo-impact-view[hidden] { display: none; }
.seo-impact-card { padding: 16px; border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 14px; background: #fff; }
.seo-impact-card-title { color: #2a2a2a; font-size: 14px; font-weight: 750; }
.seo-impact-card-meta { margin-top: 3px; color: rgba(0, 0, 0, 0.42); font-size: 11px; line-height: 1.4; }
.seo-impact-estimate { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 16px; }
.seo-impact-estimate-label { color: rgba(0, 0, 0, 0.42); font-size: 9px; font-weight: 800; letter-spacing: 0.45px; text-transform: uppercase; }
.seo-impact-estimate-value { margin-top: 3px; color: #1a7f37; font-size: 34px; font-weight: 800; letter-spacing: -0.7px; line-height: 1; }
.seo-impact-estimate-value.pending { max-width: 280px; color: #9a6700; font-size: 21px; line-height: 1.15; }
.seo-impact-estimate-note { max-width: 220px; color: rgba(0, 0, 0, 0.42); font-size: 10px; line-height: 1.4; text-align: right; }
.seo-impact-chart { width: 100%; height: 180px; margin-top: 14px; color: rgba(0, 0, 0, 0.48); }
.seo-impact-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.seo-impact-chart-point { cursor: pointer; outline: none; }
.seo-impact-chart-point:focus .seo-impact-chart-hit { stroke: rgba(37, 99, 235, 0.28); stroke-width: 7; }
.seo-impact-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 7px; color: rgba(0, 0, 0, 0.5); font-size: 10px; font-weight: 650; }
.seo-impact-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 999px; }
.seo-impact-join-note { margin-top: 8px; color: rgba(0, 0, 0, 0.46); font-size: 10px; line-height: 1.45; }
.seo-impact-matrix-wrap { width: 100%; overflow-x: auto; }
.seo-impact-matrix { width: 100%; min-width: 420px; margin-top: 14px; border-collapse: collapse; font-size: 11.5px; }
.seo-impact-matrix th, .seo-impact-matrix td { padding: 9px 7px; border-bottom: 1px solid rgba(0, 0, 0, 0.07); text-align: right; }
.seo-impact-matrix th:first-child, .seo-impact-matrix td:first-child { padding-left: 0; text-align: left; }
.seo-impact-matrix th { color: rgba(0, 0, 0, 0.4); font-size: 9px; font-weight: 800; letter-spacing: 0.3px; text-transform: uppercase; }
.seo-impact-matrix td { font-variant-numeric: tabular-nums; }
.seo-impact-matrix td:first-child { font-weight: 700; }
.seo-impact-baselines { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.seo-impact-baseline { min-width: 0; padding: 11px; border-radius: 10px; background: #f5f5f4; }
.seo-impact-baseline strong { display: block; font-size: 11.5px; }
.seo-impact-baseline span { display: block; margin-top: 4px; color: rgba(0, 0, 0, 0.5); font-size: 10px; line-height: 1.5; }
.seo-impact-caveat { margin-top: 11px; padding: 12px; border: 1px solid rgba(217, 119, 6, 0.24); border-radius: 10px; background: #fffbeb; color: #854d0e; font-size: 11px; line-height: 1.55; }
.seo-impact-caveat strong { color: #713f12; }
.seo-impact-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 13px; }
.seo-impact-summary > div { padding: 11px; border: 1px solid rgba(0, 0, 0, 0.07); border-radius: 10px; background: #fafaf9; }
.seo-impact-summary span { display: block; color: rgba(0, 0, 0, 0.42); font-size: 9px; font-weight: 800; letter-spacing: 0.35px; text-transform: uppercase; }
.seo-impact-summary strong { display: block; margin-top: 3px; font-size: 20px; }
.seo-impact-trend-controls { display: flex; justify-content: flex-end; margin-bottom: 9px; }
.seo-impact-trend-controls button { min-height: 40px; padding: 7px 12px; border: 1px solid rgba(0, 0, 0, 0.11); background: #fff; color: rgba(0, 0, 0, 0.52); font-family: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.seo-impact-trend-controls button:first-child { border-radius: 9px 0 0 9px; }
.seo-impact-trend-controls button:last-child { border-radius: 0 9px 9px 0; }
.seo-impact-trend-controls button.active { background: #2a2a2a; color: #fff; }
.seo-impact-empty, .seo-impact-unavailable { padding: 24px 18px; border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 14px; background: #fff; text-align: left; }
.seo-impact-unavailable { border-color: rgba(217, 119, 6, 0.2); background: #fffbeb; }
.seo-impact-empty strong, .seo-impact-unavailable strong { display: block; color: #2a2a2a; font-size: 14px; }
.seo-impact-empty span, .seo-impact-unavailable span { display: block; margin-top: 5px; color: rgba(0, 0, 0, 0.52); font-size: 11.5px; line-height: 1.5; }

@media (max-width: 600px) {
  .seo-impact-wrap { padding-bottom: 24px; }
  .seo-impact-head { display: block; }
  .seo-impact-window-label { justify-content: space-between; margin-top: 12px; }
  .seo-impact-window-label select { min-width: 130px; }
  .seo-impact-tabs { max-width: none; }
  .seo-impact-card { padding: 13px; }
  .seo-impact-chart { height: 154px; }
  .seo-impact-estimate-note { max-width: 130px; }
  .seo-impact-matrix { min-width: 0; table-layout: fixed; font-size: 10.5px; }
  .seo-impact-matrix th { overflow-wrap: anywhere; font-size: 8px; line-height: 1.25; }
  .seo-impact-matrix th:first-child, .seo-impact-matrix td:first-child { width: 34%; }
  .seo-impact-matrix th, .seo-impact-matrix td { padding-right: 4px; padding-left: 4px; }
  .seo-impact-baselines { gap: 7px; }
  .seo-impact-baseline { padding: 10px; }
}

/* ── Quick SEO bulk editor ── */
.quick-seo-bulk {
  width: 100%;
  min-width: 0;
}

.qseo-wrap {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 0 96px;
}

.qseo-page-title {
  margin-top: 2px;
  color: rgba(0, 0, 0, 0.5);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.qseo-page-sub {
  margin-top: 2px;
  color: rgba(0, 0, 0, 0.35);
  font-size: 12px;
}

.qseo-stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 16px 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: #fff;
}

.qseo-stat-card[hidden] { display: none; }
.qseo-stat-main .qseo-stat-label { color: rgba(0, 0, 0, 0.38); font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.qseo-stat-main .qseo-stat-number { margin-top: 2px; color: #2a2a2a; font-size: 32px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.1; }
.qseo-stat-main .qseo-stat-sub { margin-top: 2px; color: rgba(0, 0, 0, 0.4); font-size: 11px; }
.qseo-stat-main .qseo-stat-sub b { color: #1a7f37; font-weight: 700; }
.qseo-stat-spark { flex: 1; min-width: 180px; max-width: 340px; height: 52px; }
.qseo-stat-spark svg { display: block; width: 100%; height: 100%; }

.qseo-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 10px;
}

.qseo-toolbar input[type="text"],
.qseo-toolbar select {
  padding: 9px 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: #2a2a2a;
  font-family: inherit;
  font-size: 13px;
}

.qseo-toolbar input[type="text"] { flex: 1; min-width: 220px; }
.qseo-toolbar select { width: 190px; appearance: auto; font-weight: 600; cursor: pointer; }

.qseo-filter-rail {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  margin: 0 0 6px;
  padding: 2px 0 5px;
  overflow-x: auto;
  scrollbar-width: none;
}
.qseo-filter-rail::-webkit-scrollbar { display: none; }
.qseo-filter-label { flex: none; color: rgba(0, 0, 0, 0.42); font-size: 9px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; }
.qseo-filter-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  background: #fff;
  color: rgba(0, 0, 0, 0.62);
  font-family: inherit;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}
.qseo-filter-chip strong { display: grid; min-width: 21px; height: 21px; padding: 0 5px; place-items: center; border-radius: 999px; background: rgba(0, 0, 0, 0.065); color: #2a2a2a; font-size: 10px; }
.qseo-filter-chip.visibility { border-color: rgba(217, 119, 6, 0.18); color: #9a5a05; }
.qseo-filter-chip.visibility strong { background: rgba(217, 119, 6, 0.11); color: #9a5a05; }
.qseo-filter-chip.active { border-color: #2a2a2a; background: #2a2a2a; color: #fff; }
.qseo-filter-chip.active strong { background: rgba(255, 255, 255, 0.18); color: #fff; }

.qseo-data-freshness {
  min-height: 16px;
  margin: 2px 0 8px;
  color: rgba(0, 0, 0, 0.42);
  font-size: 11px;
  line-height: 1.4;
}
.qseo-data-freshness.unavailable { color: #9a6700; }

.qseo-recent-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: #fff;
  color: rgba(0, 0, 0, 0.55);
  font-size: 12px;
  font-weight: 600;
}

.qseo-recent-filter input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; }
.qseo-recent-filter input[type="number"] { width: 54px; padding: 4px 5px; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 6px; font-family: inherit; font-size: 12px; text-align: center; }
.qseo-count-line { min-height: 16px; margin: 2px 0 10px; color: rgba(0, 0, 0, 0.4); font-size: 12px; }

.qseo-bulk-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #2a2a2a;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  color: #fff;
}

.qseo-select-all { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; cursor: pointer; }
.qseo-select-all input { width: 16px; height: 16px; cursor: pointer; }
.qseo-sel-count { font-size: 13px; font-weight: 700; white-space: nowrap; }
.qseo-progress { color: rgba(255, 255, 255, 0.72); font-size: 11px; font-weight: 600; }
.qseo-bulk-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }

.qseo-bulk-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.qseo-bulk-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); }
.qseo-bulk-btn.primary { border-color: #1a7f37; background: #1a7f37; }
.qseo-bulk-btn.primary:hover:not(:disabled) { background: #166b2f; }
.qseo-bulk-btn:disabled { opacity: 0.42; cursor: not-allowed; }
.qseo-loading { padding: 28px 4px; color: rgba(0, 0, 0, 0.42); font-size: 13px; }

.qseo-table-scroll { overflow-x: auto; border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 14px; background: #fff; }
.qseo-table-scroll[hidden] { display: none; }
.qseo-table { width: 100%; min-width: 1540px; border-collapse: collapse; }
.qseo-table th { position: sticky; top: 0; padding: 10px 12px; border-bottom: 1px solid rgba(0, 0, 0, 0.08); background: #fafaf9; color: rgba(0, 0, 0, 0.38); font-size: 9.5px; font-weight: 700; letter-spacing: 0.5px; text-align: left; text-transform: uppercase; }
.qseo-table td { padding: 10px 12px; border-bottom: 1px solid rgba(0, 0, 0, 0.06); vertical-align: top; }
.qseo-table tr:last-child td { border-bottom: 0; }
.qseo-table tr.row-selected td { background: rgba(91, 157, 249, 0.05); }
.qseo-table tr.qseo-collection-row td:first-child { border-left: 4px solid #7c3aed; }
.qseo-col-product { width: 250px; min-width: 230px; }
.qseo-col-field { min-width: 210px; }

.qseo-prod-cell { position: relative; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.qseo-prod-cell > input[type="checkbox"] { flex: none; width: 16px; height: 16px; margin-top: 2px; cursor: pointer; }
.qseo-prod-thumb { flex: none; width: 44px; height: 44px; overflow: hidden; border-radius: 7px; background: #f0f0ee; }
.qseo-prod-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.qseo-prod-placeholder { display: grid; width: 100%; height: 100%; place-items: center; color: rgba(0, 0, 0, 0.25); font-size: 18px; }
.qseo-prod-info { flex: 1; min-width: 0; }
.qseo-prod-name { display: -webkit-box; overflow: hidden; color: #2a2a2a; font-size: 12.5px; font-weight: 600; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.qseo-prod-sku { margin-top: 1px; color: rgba(0, 0, 0, 0.4); font: 10.5px ui-monospace, Menlo, monospace; }
.qseo-prod-desc { display: -webkit-box; overflow: hidden; margin-top: 3px; color: rgba(0, 0, 0, 0.45); font-size: 10.5px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.qseo-kind-row { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.qseo-page-kind { display: inline-block; padding: 2px 6px; border-radius: 5px; background: rgba(0, 0, 0, 0.055); color: rgba(0, 0, 0, 0.48); font-size: 9px; font-weight: 750; letter-spacing: 0.35px; text-transform: uppercase; }
.qseo-issue-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.qseo-issue-badge { min-height: 34px; padding: 6px 9px; border: 0; border-radius: 7px; background: rgba(37, 99, 235, 0.09); color: #1d4ed8; font-family: inherit; font-size: 10.5px; font-weight: 750; cursor: pointer; }
.qseo-issue-badge.visibility { background: rgba(217, 119, 6, 0.1); color: #9a5a05; }
.qseo-card-collection .qseo-page-kind,
.qseo-collection-row .qseo-page-kind { background: rgba(124, 58, 237, 0.1); color: #6d28d9; }
.qseo-insight { flex: 0 0 100%; min-width: 0; padding: 9px 10px; border: 1px solid rgba(0, 0, 0, 0.07); border-radius: 9px; background: #fafaf9; }
.qseo-insight:focus { outline: 2px solid rgba(217, 119, 6, 0.5); outline-offset: 2px; }
.qseo-card-collection .qseo-insight,
.qseo-collection-row .qseo-insight { border-color: rgba(124, 58, 237, 0.13); background: rgba(124, 58, 237, 0.035); }
.qseo-opportunity { color: #2a2a2a; font-size: 12px; font-weight: 650; line-height: 1.45; }
.qseo-metrics { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; color: rgba(0, 0, 0, 0.42); font-size: 10.5px; line-height: 1.4; }
.qseo-metrics b { color: rgba(0, 0, 0, 0.62); font-weight: 700; }
.qseo-updated-chip { display: inline-block; margin-top: 4px; padding: 1px 6px; border-radius: 4px; background: rgba(26, 127, 55, 0.1); color: #1a7f37; font-size: 9px; font-weight: 700; }
.qseo-row-status { margin-top: 4px; font-size: 10px; font-weight: 700; line-height: 1.3; }
.qseo-row-status.success { color: #1a7f37; }
.qseo-row-status.error { color: #dc2626; }
.qseo-row-status.working { color: #2563eb; }

/* History stays inside the same identity column as status and score so the
   six-field editor does not gain another horizontal column on desktop. */
.qseo-history { margin-top: 6px; }
.qseo-history-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.qseo-history-btn,
.qseo-revert-btn {
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 7px;
  background: #fff;
  color: #334155;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.qseo-history-btn span { color: rgba(0, 0, 0, 0.36); font-variant-numeric: tabular-nums; }
.qseo-history-panel {
  box-sizing: border-box;
  width: 100%;
  max-width: 280px;
  max-height: 360px;
  overflow-y: auto;
  margin-top: 7px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 10px;
  background: #fafaf9;
}
.qseo-history-entry { padding: 10px; border-bottom: 1px solid rgba(0, 0, 0, 0.07); }
.qseo-history-entry:last-child { border-bottom: 0; }
.qseo-history-meta { display: flex; flex-direction: column; gap: 2px; }
.qseo-history-meta strong { color: #2a2a2a; font-size: 11px; }
.qseo-history-meta span,
.qseo-history-fields,
.qseo-history-revert-note { color: rgba(0, 0, 0, 0.46); font-size: 9.5px; line-height: 1.35; }
.qseo-history-fields { margin-top: 4px; color: #475569; font-weight: 650; }
.qseo-history-revert-note { margin-top: 3px; color: #6d28d9; }
.qseo-history-diff { margin-top: 7px; }
.qseo-history-diff > span { display: block; margin-bottom: 2px; color: rgba(0, 0, 0, 0.38); font-size: 8.5px; font-weight: 750; letter-spacing: 0.35px; text-transform: uppercase; }
.qseo-history-diff > div { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 5px; font-size: 9.5px; line-height: 1.35; }
.qseo-history-diff del,
.qseo-history-diff ins { overflow-wrap: anywhere; text-decoration: none; }
.qseo-history-diff del { color: #9f1239; }
.qseo-history-diff ins { color: #166534; }
.qseo-history-diff b { color: rgba(0, 0, 0, 0.25); font-weight: 500; }
.qseo-revert-btn { margin-top: 8px; color: #7c2d12; }
.qseo-revert-btn:disabled { color: rgba(0, 0, 0, 0.35); cursor: default; }

.qseo-attr-hover { display: inline-block; margin-top: 3px; border-bottom: 1px dashed rgba(0, 0, 0, 0.25); color: rgba(0, 0, 0, 0.4); font-size: 10px; cursor: help; }
.qseo-attr-tip { position: absolute; top: 100%; left: 70px; z-index: 30; display: none; width: 230px; padding: 10px 12px; border-radius: 10px; background: #2a2a2a; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); color: #fff; font-size: 11px; line-height: 1.5; }
.qseo-attr-tip b { color: rgba(255, 255, 255, 0.58); font-weight: 600; }
.qseo-prod-cell:hover .qseo-attr-tip,
.qseo-prod-cell:focus-within .qseo-attr-tip { display: block; }

.qseo-cn-cell { display: flex; flex-direction: column; gap: 6px; }
.qseo-cn-label { color: rgba(0, 0, 0, 0.32); font-size: 8.5px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; }
.qseo-cn-current { min-height: 34px; max-height: 64px; overflow: hidden; padding: 7px 9px; border: 1px solid rgba(0, 0, 0, 0.07); border-radius: 8px; background: #f5f5f4; color: rgba(0, 0, 0, 0.55); font-size: 11.5px; line-height: 1.4; white-space: pre-wrap; }
.qseo-cn-current.empty { color: rgba(0, 0, 0, 0.25); font-style: italic; }
.qseo-cn-new-row { display: flex; align-items: stretch; gap: 5px; }
.qseo-cn-new { flex: 1; min-width: 0; min-height: 44px; padding: 7px 9px; resize: vertical; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 8px; outline: none; background: #fff; color: #2a2a2a; font-family: inherit; font-size: 11.5px; line-height: 1.4; transition: border-color 0.15s, box-shadow 0.15s; }
.qseo-cn-new:focus { border-color: rgba(0, 0, 0, 0.3); }
.qseo-cn-new.dirty { border: 1.5px solid #5b9df9; box-shadow: 0 0 0 3px rgba(91, 157, 249, 0.12); }
.qseo-product-title-warning { display: flex; gap: 7px; padding: 9px 10px; border: 1px solid rgba(217, 119, 6, 0.28); border-radius: 8px; background: #fffbeb; color: #92400e; font-size: 11px; line-height: 1.45; }
.qseo-product-title-warning strong { color: #78350f; }
.qseo-product-title-warning-icon { flex: none; color: #d97706; font-size: 13px; line-height: 1.35; }
.qseo-product-title-warning > div { min-width: 0; }
.qseo-cell-btns { display: flex; flex-direction: column; gap: 4px; }
.qseo-cell-btn { display: flex; flex: 1; align-items: center; justify-content: center; width: 28px; min-height: 28px; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 6px; background: #fff; color: rgba(0, 0, 0, 0.45); cursor: pointer; }
.qseo-cell-btn:hover:not(:disabled) { border-color: rgba(0, 0, 0, 0.3); color: #2a2a2a; }
.qseo-cell-btn.ai { color: #7c3aed; }
.qseo-cell-btn:disabled { opacity: 0.4; cursor: wait; }
.qseo-field-unavailable { padding: 9px; color: rgba(0, 0, 0, 0.32); font-size: 11px; font-style: italic; line-height: 1.4; }

.qseo-cards { display: none; flex-direction: column; gap: 10px; }
.qseo-card { padding: 12px; border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 14px; background: #fff; }
.qseo-card.qseo-card-collection { border-left: 4px solid #7c3aed; }
.qseo-card.row-selected { border-color: #5b9df9; box-shadow: 0 0 0 3px rgba(91, 157, 249, 0.1); }
.qseo-card .qseo-prod-cell { margin-bottom: 12px; }
.qseo-card .qseo-cn-cell { margin-bottom: 12px; }
.qseo-field-name { margin-bottom: 4px; color: rgba(0, 0, 0, 0.45); font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.qseo-empty { padding: 30px 10px; color: rgba(0, 0, 0, 0.38); font-size: 13px; text-align: center; }
.qseo-pager { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 32px; margin-top: 14px; color: rgba(0, 0, 0, 0.45); font-size: 12px; }
.qseo-pager button { padding: 7px 12px; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 8px; background: #fff; color: #2a2a2a; font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.qseo-pager button:disabled { opacity: 0.4; cursor: not-allowed; }
.qseo-ai-note { margin-top: 6px; color: rgba(0, 0, 0, 0.38); font-size: 10.5px; text-align: center; }

@media (max-width: 820px) {
  .qseo-wrap { padding-bottom: 18px; }
  .qseo-page-title { margin-top: 4px; }
  .qseo-stat-card { align-items: stretch; gap: 8px; padding: 14px; }
  .qseo-stat-main { width: 100%; }
  .qseo-stat-spark { width: 100%; max-width: none; }
  .qseo-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
  .qseo-toolbar input[type="text"] { grid-column: 1 / -1; }
  .qseo-toolbar input[type="text"], .qseo-toolbar select, .qseo-recent-filter { width: 100%; min-width: 0; min-height: 42px; }
  .qseo-toolbar select { padding-right: 6px; padding-left: 8px; font-size: 11.5px; }
  .qseo-filter-rail { margin-right: -12px; margin-left: -12px; padding-right: 12px; padding-left: 12px; }
  .qseo-recent-filter { justify-content: flex-start; }
  .qseo-bulk-bar { gap: 8px; padding: 10px; }
  .qseo-bulk-actions { width: 100%; margin-left: 0; }
  .qseo-bulk-btn { flex: 1 1 calc(50% - 4px); justify-content: center; min-height: 36px; padding: 7px 8px; }
  .qseo-bulk-btn.primary { flex-basis: 100%; }
  .qseo-table-scroll { display: none; }
  .qseo-cards { display: flex; }
  .qseo-attr-tip { left: 26px; width: min(230px, calc(100vw - 80px)); }
  .qseo-history-panel { width: 100%; max-width: none; max-height: 420px; }
}

    body.scrollable {
      overflow: auto;
      position: static;
    }

    #vendor-mock-banner {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1200;
      height: var(--vendor-mock-banner-height);
      padding: env(safe-area-inset-top, 0px) 6px 0;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      white-space: nowrap;
      background: #fbbf24;
      border-bottom: 1px solid rgba(120,53,15,0.22);
      color: #3b2a00;
      font-size: 9.5px;
      font-weight: 700;
      letter-spacing: -0.08px;
      text-align: center;
    }

    #vendor-mock-banner[hidden] { display: none; }

    #env-banner {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 1200;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.3px;
    }
    #env-banner[hidden] { display: none; }
    #env-banner.env-dev {
      background: #fbbf24;
      color: #3b2a00;
      border-top: 1px solid rgba(120,53,15,0.22);
    }
    #env-banner.env-prod {
      background: #16a34a;
      color: #fff;
      border-top: 1px solid rgba(0,0,0,0.1);
    }
    #env-banner button {
      padding: 2px 10px;
      border-radius: 4px;
      border: 1px solid currentColor;
      background: rgba(255,255,255,0.2);
      color: inherit;
      font-size: 10px;
      font-weight: 700;
      cursor: pointer;
      letter-spacing: 0.3px;
      text-transform: uppercase;
    }
    #env-banner button:hover { background: rgba(255,255,255,0.35); }

    body.has-env-banner #mobile-fab-btn { bottom: 52px; }
    body.has-env-banner #mobile-fab-menu { bottom: 52px; }
    body.has-env-banner #mobile-section-bar { bottom: 32px; }
    body.has-env-banner #review-footer { padding-bottom: max(env(safe-area-inset-bottom, 16px), 56px); }

    body.vendor-mock-mode {
      --vendor-mock-banner-height: calc(28px + env(safe-area-inset-top, 0px));
    }

    body.vendor-mock-mode #home-screen,
    body.vendor-mock-mode #auth-screen,
    body.vendor-mock-mode #camera-screen,
    body.vendor-mock-mode #dragdrop-screen,
    body.vendor-mock-mode #update-screen {
      top: var(--vendor-mock-banner-height);
    }

    body.vendor-mock-mode #processing-screen,
    body.vendor-mock-mode #product-screen,
    body.vendor-mock-mode #review-screen,
    body.vendor-mock-mode #lookup-screen {
      padding-top: var(--vendor-mock-banner-height);
    }

    body.vendor-mock-mode #processing-header,
    body.vendor-mock-mode #product-header,
    body.vendor-mock-mode #review-header,
    body.vendor-mock-mode #lookup-header {
      top: var(--vendor-mock-banner-height);
    }

    /* ── Home Screen / Dashboard ── */
    #home-screen {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      background: #f5f5f4;
      z-index: 5;
      overflow: auto;
    }

    .home-topbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 20px 40px;
      border-bottom: 1px solid rgba(0,0,0,0.08);
      flex-shrink: 0;
      position: relative;
    }

    .home-topbar-left {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .home-topbar-logo-img {
      height: 24px;
      opacity: 0.9;
      filter: invert(1);
    }

    .home-topbar-nav {
      display: flex;
      gap: 8px;
    }

    .home-topbar-nav-item {
      padding: 6px 14px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      color: rgba(0,0,0,0.5);
      cursor: pointer;
      transition: color 0.15s, background 0.15s;
      border: none;
      background: none;
    }

    .home-topbar-nav-item:hover {
      color: #2a2a2a;
      background: rgba(0,0,0,0.06);
    }

    .home-topbar-nav-item.active {
      color: #2a2a2a;
      background: rgba(0,0,0,0.1);
    }

    /* Hide icons on desktop, show text */
    .nav-icon { display: none; }
    .nav-label { display: inline; }

    /* Hide mobile-only elements on desktop */
    #mobile-actions-btn { display: none; }
    .mobile-action-sheet { position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; transform: translateY(100%); pointer-events: none; }
    .mobile-action-sheet-backdrop { position: fixed; inset: 0; z-index: 199; opacity: 0; pointer-events: none; }
    .mobile-images-step { display: none !important; }
    .seo-filter {
      padding: 6px 14px; border-radius: 20px; border: 1px solid rgba(0,0,0,0.1);
      background: #fff; color: rgba(0,0,0,0.5); font-size: 12px; font-weight: 500; cursor: pointer;
    }
    .seo-filter:hover { background: rgba(0,0,0,0.03); }
    .seo-filter.active { background: #2a2a2a; color: #fff; border-color: #2a2a2a; }


    .filter-pill {
      padding: 8px 16px;
      border-radius: 50px;
      border: 1px solid rgba(0,0,0,0.12);
      background: #fff;
      color: rgba(0,0,0,0.5);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }
    .filter-pill.active {
      background: #2a2a2a;
      color: #fff;
      border-color: #2a2a2a;
    }

    .home-content {
      flex: 1;
      display: flex;
      padding: 24px;
      min-height: 0;
    }

    .home-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      grid-template-rows: repeat(2, 1fr);
      gap: 16px;
      width: 100%;
      flex: 1;
    }

    @media (max-width: 600px) {
      .home-content { padding: 12px; padding-bottom: 100px; }
      .home-topbar { padding: 10px 14px; }
      .home-topbar-logo-img { height: 20px; }

      /* Compact the filter toggle */
      #home-shopify-toggle button { padding: 8px 10px !important; font-size: 12px !important; }

      /* Compact search row */
      #home-search-input { padding: 8px 12px !important; font-size: 13px !important; }

      /* Bottom tab bar with icons */
      .home-topbar-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: #fff;
        border-top: 1px solid rgba(0,0,0,0.08);
        display: flex;
        justify-content: space-around;
        padding: 4px 0;
        padding-bottom: max(4px, env(safe-area-inset-bottom));
        gap: 0;
        box-shadow: 0 -1px 8px rgba(0,0,0,0.04);
      }
      .nav-icon { display: block; margin: 0 auto 2px; }
      .nav-label { display: block; }
      .home-topbar-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 9px;
        font-weight: 500;
        padding: 6px 2px 4px;
        border-radius: 0;
        color: rgba(0,0,0,0.35);
        letter-spacing: 0.2px;
      }
      .home-topbar-nav-item .nav-icon {
        width: 20px;
        height: 20px;
        stroke: rgba(0,0,0,0.35);
      }
      .home-topbar-nav-item.active {
        background: none;
        color: #2a2a2a;
        font-weight: 600;
      }
      .home-topbar-nav-item.active .nav-icon {
        stroke: #2a2a2a;
      }
      .home-topbar-nav-item:hover {
        background: none;
      }

      /* Hide entire bottom nav on mobile — stages accessed via header menu */
      .home-topbar-nav { display: none !important; }

      /* Hide metrics and audit log on mobile */
      #metrics-icon-btn { display: none !important; }
      #audit-log-btn { display: none !important; }

      /* Mobile FAB navigation button */
      #mobile-fab-btn { display: flex !important; }

      /* Compact product cards on mobile */
      .draft-card { padding: 12px; gap: 4px; border-radius: 8px; }
      .draft-card-title { font-size: 13px; }
      .draft-card-meta { font-size: 10px; }

      /* ── Product form mobile overhaul ── */

      /* Compact header — back arrow, title, actions */
      #product-header {
        padding: 8px 12px !important;
        gap: 6px;
      }
      #product-header-title { font-size: 14px; font-weight: 600; }
      #product-back-btn { display: none !important; }
      #product-home-btn { display: none !important; }
      #mobile-back-btn { display: block !important; }
      .header-actions-desktop { display: none !important; }
      #mobile-actions-btn { display: flex !important; }

      /* Hide step dots and wizard nav on mobile — replaced by section bar */
      .step-dots { display: none !important; }
      .wizard-nav { display: none !important; }

      /* Mobile section tab bar */
      #mobile-section-bar {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 90;
        background: #fff;
        border-top: 1px solid rgba(0,0,0,0.08);
        padding: 4px 0;
        padding-bottom: max(4px, env(safe-area-inset-bottom));
        box-shadow: 0 -1px 8px rgba(0,0,0,0.04);
      }
      .section-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 8px 2px 6px;
        border: none;
        background: none;
        cursor: pointer;
        color: rgba(0,0,0,0.35);
        font-size: 9px;
        font-weight: 500;
        letter-spacing: 0.2px;
      }
      .section-tab svg { stroke: rgba(0,0,0,0.35); }
      .section-tab.active { color: #2a2a2a; font-weight: 600; }
      .section-tab.active svg { stroke: #2a2a2a; }

      /* Add bottom padding for section bar */
      .wizard-step { padding-bottom: 100px !important; }

      /* Mobile action sheet */
      .mobile-action-sheet {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 200;
        background: #fff;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
        padding: 8px 16px;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
        transform: translateY(100%);
        transition: transform 0.25s ease;
      }
      .mobile-action-sheet.open { transform: translateY(0); pointer-events: auto; }
      .mobile-action-sheet-backdrop {
        position: fixed;
        inset: 0;
        z-index: 199;
        background: rgba(0,0,0,0.3);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s;
      }
      .mobile-action-sheet-backdrop.open { opacity: 1; pointer-events: auto; }
      .mobile-action-sheet .action-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 4px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        font-size: 15px;
        font-weight: 500;
        color: #2a2a2a;
        cursor: pointer;
        background: none;
        border-left: none;
        border-right: none;
        border-top: none;
        width: 100%;
        text-align: left;
      }
      .mobile-action-sheet .action-item:last-child { border-bottom: none; }
      .mobile-action-sheet .action-item svg { flex-shrink: 0; }
      .mobile-action-sheet .action-item.action-primary { color: #1a7f37; font-weight: 600; }
      .mobile-action-sheet .action-item.action-dark { color: #fff; background: #2a2a2a; border-radius: 10px; justify-content: center; margin-top: 4px; padding: 14px; border: none; }
      .mobile-action-sheet .mobile-action-cancel { text-align: center; padding: 14px; color: rgba(0,0,0,0.4); font-size: 14px; font-weight: 500; cursor: pointer; margin-top: 4px; }

      /* Mobile-friendly form fields — uniform sizing, prevent iOS zoom */
      .form-group input:not([type="checkbox"]),
      .form-group textarea,
      .form-group select {
        font-size: 16px !important;
        padding: 14px !important;
        border-radius: 10px !important;
        min-height: 48px;
        box-sizing: border-box;
      }
      .form-group label { font-size: 11px; }
      .ns-attr-grid .form-group input,
      .ns-attr-grid .form-group select {
        font-size: 16px !important;
        padding: 14px !important;
        border-radius: 10px !important;
        min-height: 48px;
      }
      .form-group input[readonly] {
        background: #f5f5f5 !important;
        opacity: 1 !important;
        color: rgba(0,0,0,0.5) !important;
      }

      /* Step title sizing */
      .step-title { font-size: 20px; }
      .step-subtitle { font-size: 13px; }

      /* Wizard step content padding */
      .wizard-step { padding: 16px !important; padding-bottom: 100px !important; }

      /* Mobile images step — hide from desktop step 2, show own step */
      .mobile-images-step.active { display: flex !important; }
      #desktop-images-section { display: none !important; }

      /* Mobile images: hide tabs/dropzone — JS builds inline search + camera bar */
      .mobile-images-step #ws-img-tabs { display: none !important; }
      .mobile-images-step #ws-tab-drop { display: none !important; }
      .mobile-images-step #ws-tab-camera { display: none !important; }
      .mobile-images-step #ws-tab-search { display: none !important; }
      .mobile-images-step #ws-image-upload-area { display: none !important; }
      .mobile-images-step #ws-existing-images { display: none !important; }
      .mobile-images-step .ns-attr-heading { display: none !important; }
      .mobile-images-step .ns-attr-section-body { padding: 0 !important; }

      /* Mobile: native camera, hide inline video */
      #ws-camera-inline { display: none !important; }
      #ws-camera-native { display: block !important; }

      /* Mobile image editor improvements */
      #ws-processed-grid { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
      #ws-image-search-results { max-height: 50vh !important; }
      .ws-img-tab { font-size: 13px !important; padding: 10px 12px !important; }
      #ws-image-dropzone { padding: 20px 16px !important; }

      /* ── Sleek mobile buttons ── */

      /* Wizard nav buttons — pill-shaped, taller touch targets */
      .wizard-nav { gap: 8px; }
      .wizard-nav button {
        border-radius: 50px !important;
        padding: 14px 16px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
      }
      .wizard-prev {
        background: rgba(0,0,0,0.04) !important;
        border: none !important;
        color: rgba(0,0,0,0.5) !important;
      }
      .wizard-skip {
        background: rgba(0,0,0,0.04) !important;
        border: none !important;
        color: rgba(0,0,0,0.5) !important;
        font-size: 14px !important;
      }
      .wizard-next {
        background: #2a2a2a !important;
        border: none !important;
        color: #fff !important;
      }

      /* Tag Pick/Type buttons — pill-shaped */
      .tag-add-btn {
        border-radius: 50px !important;
        padding: 6px 14px !important;
        font-size: 12px !important;
      }

      /* Tag option chips */
      .tag-option { border-radius: 50px !important; padding: 6px 14px !important; }

      /* Competitor lookup — stack on mobile */
      .competitor-lookup-row {
        flex-direction: column !important;
      }
      .competitor-lookup-btn {
        border-radius: 50px !important;
        padding: 12px 20px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
      }

      /* AI suggest button */
      .ai-suggest-btn { border-radius: 50px !important; }

      /* General: any remaining square buttons inside wizard */
      #product-back-btn { border-radius: 50px !important; }
      #product-home-btn { border-radius: 50px !important; }
      #mobile-actions-btn { border-radius: 50px !important; }

      /* ── Floating Action Button (FAB) ── */
      #mobile-fab-btn {
        position: fixed;
        bottom: max(24px, env(safe-area-inset-bottom, 24px));
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        border: none;
        background: #2a2a2a;
        color: #fff;
        box-shadow: 0 4px 16px rgba(0,0,0,0.25);
        cursor: pointer;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s, box-shadow 0.2s;
        -webkit-tap-highlight-color: transparent;
      }
      #mobile-fab-btn:active { transform: translateX(-50%) scale(0.92); }
      #mobile-fab-btn.open { background: #444; }

      #mobile-fab-menu {
        bottom: max(24px, env(safe-area-inset-bottom, 24px));
        left: 50%;
        width: 0;
        height: 0;
        overflow: visible;
      }

      .fab-menu-item {
        position: absolute;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        width: 64px;
        height: 64px;
        background: #fff;
        border: 1.5px solid rgba(0,0,0,0.08);
        border-radius: 50%;
        font-size: 10px;
        font-weight: 600;
        color: #2a2a2a;
        cursor: pointer;
        box-shadow: 0 4px 16px rgba(0,0,0,0.12);
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
        transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s;
        -webkit-tap-highlight-color: transparent;
        text-align: center;
        padding: 0;
      }
      .fab-menu-item:active { transform: translate(-50%, -50%) scale(0.9) !important; }
      .fab-menu-item svg { flex-shrink: 0; color: rgba(0,0,0,0.45); }
    }

    .home-content { flex-direction: column; }

    .drafts-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 14px;
      padding: 4px 0 24px;
    }

    .draft-card {
      padding: 16px;
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 10px;
      background: rgba(0,0,0,0.02);
      cursor: pointer;
      transition: background 0.2s, border-color 0.2s;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .draft-card:hover {
      background: rgba(0,0,0,0.05);
      border-color: rgba(0,0,0,0.25);
    }

    .draft-card-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 8px;
    }

    .draft-card-title {
      font-size: 14px;
      font-weight: 600;
      color: #2a2a2a;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      flex: 1;
    }

    .draft-card-delete {
      background: none;
      border: none;
      color: rgba(0,0,0,0.3);
      cursor: pointer;
      font-size: 16px;
      padding: 0 4px;
      line-height: 1;
      flex-shrink: 0;
    }

    .draft-card-delete:hover { color: #ff6b6b; }

    .draft-card-meta {
      font-size: 11px;
      color: rgba(0,0,0,0.35);
      margin-top: 1px;
    }

    .view-toggle {
      display: inline-flex;
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 8px;
      background: #fff;
      overflow: hidden;
      flex: none;
    }

    .view-toggle button {
      border: none;
      background: transparent;
      width: 34px;
      height: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: rgba(0,0,0,0.4);
      transition: background 0.15s, color 0.15s;
    }

    .view-toggle button + button { border-left: 1px solid rgba(0,0,0,0.12); }
    .view-toggle button.active { background: #2a2a2a; color: #fff; }
    .view-toggle button:hover:not(.active) { background: rgba(0,0,0,0.05); }
    .view-toggle button:focus-visible { outline: 2px solid #2563eb; outline-offset: -2px; }

    .live-header-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-top: 24px;
      padding: 0 4px;
    }

    .live-count {
      font-size: 12px;
      color: rgba(0,0,0,0.35);
      font-weight: 500;
    }

    .live-filter-bar {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 4px 6px;
      flex-wrap: wrap;
    }
    .live-filter-pills {
      display: flex;
      gap: 6px;
    }
    .live-filter-select {
      padding: 7px 12px;
      border-radius: 50px;
      border: 1px solid rgba(0,0,0,0.12);
      background: #fff;
      color: rgba(0,0,0,0.65);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      appearance: none;
      -webkit-appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 10px center;
      padding-right: 28px;
    }

    .live-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 14px;
      padding: 14px 4px 24px;
    }

    .product-tile {
      min-width: 0;
      background: #fff;
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 10px;
      overflow: hidden;
      cursor: default;
      transition: border-color 0.15s, box-shadow 0.15s;
      display: flex;
      flex-direction: column;
    }

    .product-tile:hover {
      border-color: rgba(0,0,0,0.25);
      box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    }

    .product-tile-thumb {
      aspect-ratio: 1 / 1;
      background: #f0f0ee;
      position: relative;
      overflow: hidden;
    }

    .product-tile-thumb img,
    .product-row-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .product-thumb-placeholder {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: rgba(0,0,0,0.2);
    }

    .product-thumb-placeholder svg { width: 24px; height: 24px; }

    .product-tile-live-badge {
      position: absolute;
      top: 8px;
      left: 8px;
      font-size: 10px;
      font-weight: 700;
      padding: 3px 7px;
      border-radius: 5px;
      background: #1a7f37;
      color: #fff;
      letter-spacing: 0.2px;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .product-tile-draft-badge {
      position: absolute;
      top: 8px;
      left: 8px;
      font-size: 10px;
      font-weight: 700;
      padding: 3px 7px;
      border-radius: 5px;
      background: rgba(217,119,6,0.9);
      color: #fff;
      letter-spacing: 0.2px;
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .product-tile-draft-badge svg { width: 8px; height: 8px; }

    .product-tile-live-badge svg,
    .product-row-live-badge svg { width: 8px; height: 8px; }

    .product-tile-thumb > .draft-card-delete {
      position: absolute;
      top: 7px;
      right: 7px;
      z-index: 1;
      width: 28px;
      height: 28px;
      padding: 0;
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 7px;
      background: rgba(255,255,255,0.92);
      color: rgba(0,0,0,0.45);
      font-size: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .product-edit-icon-btn {
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 7px;
      width: 28px;
      height: 28px;
      padding: 0;
      background: rgba(255,255,255,0.92);
      color: #2a2a2a;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: border-color 0.15s, color 0.15s;
    }
    .product-edit-icon-btn svg { width: 14px; height: 14px; }
    .product-edit-icon-btn:hover { border-color: rgba(0,0,0,0.35); }

    .product-tile-thumb > .product-edit-icon-btn {
      position: absolute;
      right: 7px;
      bottom: 7px;
      z-index: 1;
    }

    @media (hover: hover) and (pointer: fine) {
      .product-tile-thumb > .draft-card-delete {
        opacity: 0;
        transition: opacity 0.15s, color 0.15s;
      }
      .product-tile:hover .product-tile-thumb > .draft-card-delete,
      .product-tile-thumb > .draft-card-delete:focus-visible { opacity: 1; }
    }

    .product-tile-body {
      padding: 10px 12px 12px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      flex: 1;
      min-width: 0;
    }

    .product-tile-title {
      font-size: 13px;
      font-weight: 600;
      color: #2a2a2a;
      line-height: 1.3;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .product-tile-sku {
      font-size: 11px;
      color: rgba(0,0,0,0.4);
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .product-tile-meta-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 4px;
      gap: 6px;
    }

    .product-tile-category {
      font-size: 10px;
      color: rgba(0,0,0,0.5);
      background: rgba(0,0,0,0.06);
      padding: 2px 7px;
      border-radius: 4px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .product-tile-price {
      font-size: 13px;
      font-weight: 700;
      color: #2a2a2a;
      white-space: nowrap;
    }

    .field-label {
      font-size: 8.5px;
      font-weight: 700;
      color: rgba(0,0,0,0.32);
      text-transform: uppercase;
      letter-spacing: 0.4px;
      display: block;
      margin-bottom: 1px;
    }

    .product-tile-footer {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 6px;
      margin-top: 6px;
      padding-top: 8px;
      border-top: 1px solid rgba(0,0,0,0.07);
    }

    .product-tile-footer > div { min-width: 0; }

    .product-tile-owner-pill {
      display: inline-block;
      font-size: 11px;
      font-weight: 600;
      padding: 1px 7px;
      border-radius: 50px;
      background: rgba(22,163,74,0.1);
      color: #16a34a;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .product-tile-owner-pill.other,
    .product-row-owner-pill.other { background: rgba(37,99,235,0.1); color: #2563eb; }

    .product-tile-date {
      font-size: 11px;
      color: rgba(0,0,0,0.5);
      font-weight: 500;
    }

    .live-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 14px 4px 24px;
    }

    .product-row {
      background: #fff;
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 10px;
      padding: 10px 14px 10px 10px;
      display: flex;
      align-items: center;
      gap: 12px;
      cursor: default;
      transition: border-color 0.15s, box-shadow 0.15s;
      min-width: 0;
    }

    .product-row:hover {
      border-color: rgba(0,0,0,0.25);
      box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    }

    .product-row-thumb {
      width: 48px;
      height: 48px;
      border-radius: 7px;
      background: #f0f0ee;
      overflow: hidden;
      flex: none;
      position: relative;
    }

    .product-row-main {
      min-width: 0;
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .product-row-title {
      font-size: 13.5px;
      font-weight: 600;
      color: #2a2a2a;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .product-row-sub {
      font-size: 11px;
      color: rgba(0,0,0,0.4);
      display: flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
      overflow: hidden;
    }

    .product-row-sub > span:last-child {
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .product-row-sub .sep,
    .product-row-sub-mobile .sep { opacity: 0.5; }

    .product-row-sub .sku { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

    .product-row-end {
      display: flex;
      align-items: center;
      gap: 14px;
      flex: none;
    }

    .product-row-price {
      font-size: 13.5px;
      font-weight: 700;
      color: #2a2a2a;
      min-width: 56px;
      text-align: right;
      white-space: nowrap;
    }

    .product-row-field {
      text-align: right;
      min-width: 74px;
      display: none;
    }

    .product-row-field .field-label { text-align: right; }

    .product-row-owner-pill {
      display: inline-block;
      font-size: 10.5px;
      font-weight: 600;
      padding: 1px 7px;
      border-radius: 50px;
      background: rgba(22,163,74,0.1);
      color: #16a34a;
      max-width: 110px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .product-row-date-value {
      font-size: 11.5px;
      color: rgba(0,0,0,0.55);
      font-weight: 500;
    }

    .product-row-sub-mobile {
      font-size: 10.5px;
      color: rgba(0,0,0,0.4);
      display: flex;
      align-items: center;
      gap: 5px;
      margin-top: 1px;
      min-width: 0;
    }

    .product-row-sub-mobile .product-row-owner-pill {
      max-width: min(110px, 65%);
    }

    .product-row-live-badge {
      font-size: 10px;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 5px;
      background: rgba(26,127,55,0.1);
      color: #1a7f37;
      white-space: nowrap;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .product-row-actions {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .product-row-actions .product-edit-icon-btn {
      width: 26px;
      height: 26px;
      border-radius: 6px;
      border-color: rgba(0,0,0,0.08);
      background: rgba(0,0,0,0.03);
    }

    .product-row-actions .draft-card-delete {
      width: 26px;
      height: 26px;
      padding: 0;
      border: 1px solid rgba(0,0,0,0.08);
      border-radius: 6px;
      background: rgba(0,0,0,0.03);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    @media (min-width: 640px) {
      .product-row-field { display: block; }
      .product-row-sub-mobile { display: none; }
    }

    @media (min-width: 900px) {
      .live-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    }

    @media (max-width: 600px) {
      .live-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 10px 0 24px;
      }
      .product-tile-body { padding: 8px 9px 10px; }
      .product-tile-title { font-size: 12px; }
      .product-tile-thumb > .draft-card-delete { opacity: 1; }
      .live-list { padding-right: 0; padding-left: 0; }
      .product-row { padding: 8px 8px 8px 8px; gap: 8px; }
      .product-row-thumb { width: 42px; height: 42px; }
      .product-row-end { gap: 5px; }
      .product-row-price { min-width: 0; font-size: 12px; }
      .product-row-live-badge { padding: 3px 5px; gap: 3px; }
      .product-row-actions { gap: 4px; }
      .product-row-actions .product-edit-icon-btn { width: 24px; height: 24px; }
      .product-row-actions .draft-card-delete { width: 24px; height: 24px; }
    }

    .card-tags-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 8px;
    }

    .vendor-suggest-box {
      display: none;
      position: absolute;
      left: 0;
      right: 0;
      top: 100%;
      background: #fff;
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      z-index: 50;
      max-height: 200px;
      overflow-y: auto;
    }

    #preview-desc-area ul {
      list-style-position: inside;
      padding-left: 0;
      margin: 6px 0;
    }

    #preview-desc-area li {
      margin-bottom: 2px;
    }

    #preview-desc-area h3 {
      font-size: 15px;
      font-weight: 600;
      margin: 14px 0 4px 0;
    }

    #preview-desc-area h3:first-of-type {
      margin-top: 0;
    }

    #preview-desc-area p {
      margin: 4px 0;
    }

    .vendor-suggest-item {
      padding: 10px 14px;
      font-size: 13px;
      color: #2a2a2a;
      cursor: pointer;
      border-bottom: 1px solid rgba(0,0,0,0.04);
    }

    .vendor-suggest-item:last-child { border-bottom: none; }
    .vendor-suggest-item:hover { background: rgba(0,0,0,0.03); }

    .card-tag {
      font-size: 10px;
      font-weight: 500;
      padding: 2px 8px;
      border-radius: 4px;
      background: rgba(0,0,0,0.05);
      color: rgba(0,0,0,0.45);
      white-space: nowrap;
    }

    .owner-pill {
      display: inline-flex;
      align-items: center;
      align-self: flex-start;
      max-width: 100%;
      padding: 2px 8px;
      border-radius: 50px;
      font-size: 10.5px;
      font-weight: 600;
      line-height: 1.35;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .owner-pill-other { background: rgba(37,99,235,0.1); color: #2563eb; }
    .owner-pill-me { background: rgba(22,163,74,0.1); color: #16a34a; }
    .owner-pill-unclaimed { background: rgba(0,0,0,0.05); color: rgba(0,0,0,0.45); }
    .product-owner-row { display: flex; min-width: 0; margin-top: 2px; }

    .home-owner-filter {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 0 0 12px;
    }
    .home-owner-filter label {
      flex-shrink: 0;
      color: rgba(0,0,0,0.4);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }
    .home-owner-filter select {
      min-width: 0;
      max-width: 100%;
      padding: 8px 30px 8px 12px;
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 8px;
      background: #fff;
      color: #2a2a2a;
      cursor: pointer;
      font: 600 13px/1.2 inherit;
    }

    .draft-card-category {
      font-size: 11px;
      color: rgba(0,0,0,0.5);
      background: rgba(0,0,0,0.06);
      padding: 2px 8px;
      border-radius: 4px;
      display: inline-block;
    }

    .dn-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 10px;
      background: rgba(0,0,0,0.06);
      border-radius: 6px;
      font-size: 12px;
      color: #2a2a2a;
      cursor: grab;
    }

    .dn-chip .dn-chip-label {
      font-weight: 500;
      color: rgba(0,0,0,0.4);
      font-size: 10px;
      text-transform: uppercase;
    }

    .dn-chip .dn-chip-value {
      font-weight: 600;
    }

    .dn-chip .dn-chip-remove {
      background: none;
      border: none;
      color: rgba(0,0,0,0.3);
      cursor: pointer;
      font-size: 14px;
      padding: 0 2px;
      line-height: 1;
    }

    .dn-chip .dn-chip-remove:hover {
      color: #ff6b6b;
    }

    .dn-picker-option {
      padding: 8px 12px;
      font-size: 13px;
      color: rgba(0,0,0,0.7);
      cursor: pointer;
    }

    .dn-picker-option:hover {
      background: rgba(0,0,0,0.06);
    }

    .dn-picker-option.disabled {
      opacity: 0.3;
      cursor: default;
      pointer-events: none;
    }

    .pending-card-actions {
      display: flex;
      gap: 8px;
      margin-top: 4px;
    }

    .pending-card-actions button {
      flex: 1;
      padding: 8px 12px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      border: none;
    }

    .pending-edit-btn {
      background: rgba(0,0,0,0.06);
      color: #2a2a2a;
    }

    .pending-edit-btn:hover {
      background: rgba(0,0,0,0.12);
    }

    .pending-live-btn {
      background: #2a2a2a;
      color: #fff;
    }

    .pending-live-btn:hover {
      background: rgba(0,0,0,0.75);
    }

    .pending-live-btn:disabled {
      opacity: 0.4;
      cursor: not-allowed;
    }

    .pending-card-price {
      font-size: 13px;
      color: rgba(0,0,0,0.6);
      font-weight: 500;
    }

    .pending-card-netsuite-id {
      font-size: 10px;
      color: rgba(0,0,0,0.3);
      font-family: monospace;
    }

    .home-card {
      padding: 32px 24px;
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 12px;
      background: rgba(0,0,0,0.02);
      color: #2a2a2a;
      cursor: pointer;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 14px;
      transition: background 0.2s, border-color 0.2s;
    }

    .home-card:hover {
      background: rgba(0,0,0,0.04);
      border-color: rgba(0,0,0,0.3);
    }

    .home-card-icon {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      background: rgba(0,0,0,0.04);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .home-card-icon svg {
      width: 22px;
      height: 22px;
      stroke: rgba(0,0,0,0.45);
      fill: none;
      stroke-width: 1.5;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .home-card:hover .home-card-icon svg {
      stroke: rgba(0,0,0,0.7);
    }

    .home-card-title {
      font-size: 14px;
      font-weight: 500;
      color: rgba(0,0,0,0.85);
    }

    .home-card-desc {
      font-size: 12px;
      color: rgba(0,0,0,0.3);
      line-height: 1.4;
    }

    /* ── Camera Screen ── */
    #camera-screen {
      position: absolute;
      inset: 0;
      display: none;
      flex-direction: column;
    }

    /* Viewfinder fills entire screen */
    #viewfinder {
      position: absolute;
      inset: 0;
      background: #f5f5f4;
      z-index: 0;
    }

    #viewfinder video {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    /* Top bar overlay */
    #top-bar {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      z-index: 10;
      padding: env(safe-area-inset-top, 12px) 20px 12px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
      padding-top: max(env(safe-area-inset-top, 12px), 16px);
    }

    #app-title {
      font-size: 15px;
      font-weight: 600;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      color: rgba(255,255,255,0.9);
    }

    #photo-count {
      background: rgba(255,255,255,0.2);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      padding: 5px 14px;
      border-radius: 20px;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.5px;
      color: rgba(255,255,255,0.9);
    }

    /* Bottom controls overlay */
    #bottom-controls {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 10;
      background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
      padding-bottom: max(env(safe-area-inset-bottom, 20px), 24px);
    }

    /* Thumbnail strip */
    #thumbnail-strip {
      display: flex;
      gap: 10px;
      padding: 0 20px 20px;
      align-items: center;
      justify-content: center;
      min-height: 0;
      overflow-x: auto;
      scrollbar-width: none;
      transition: min-height 0.3s, padding 0.3s, opacity 0.3s;
    }

    #thumbnail-strip::-webkit-scrollbar { display: none; }

    #thumbnail-strip.has-photos {
      min-height: 64px;
      padding: 12px 20px 20px;
    }

    .thumb-wrapper {
      position: relative;
      flex-shrink: 0;
      animation: thumb-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes thumb-pop {
      0% { transform: scale(0); opacity: 0; }
      100% { transform: scale(1); opacity: 1; }
    }

    .thumb {
      width: 52px;
      height: 52px;
      border-radius: 10px;
      object-fit: cover;
      border: 2px solid rgba(0,0,0,0.3);
      display: block;
    }

    .thumb-remove {
      position: absolute;
      top: -7px;
      right: -7px;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: rgba(255,60,60,0.9);
      backdrop-filter: blur(4px);
      color: #2a2a2a;
      border: 2px solid rgba(0,0,0,0.5);
      font-size: 13px;
      font-weight: 600;
      line-height: 18px;
      text-align: center;
      cursor: pointer;
      z-index: 2;
    }

    /* Zoom slider */
    #zoom-control {
      display: none;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 0 40px 16px;
    }

    #zoom-control.visible { display: flex; }

    .zoom-label {
      font-size: 12px;
      font-weight: 600;
      color: rgba(255,255,255,0.7);
      min-width: 32px;
      text-align: center;
    }

    #zoom-slider {
      -webkit-appearance: none;
      appearance: none;
      flex: 1;
      height: 4px;
      border-radius: 2px;
      background: rgba(255,255,255,0.2);
      outline: none;
    }

    #zoom-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: #ffffff;
      border: none;
      box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    }

    #zoom-slider::-moz-range-thumb {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: #ffffff;
      border: none;
    }

    /* Shutter area */
    #shutter-area {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 20px;
      position: relative;
      height: 88px;
    }

    #shutter-btn {
      width: 76px;
      height: 76px;
      border-radius: 50%;
      border: 4px solid rgba(255,255,255,0.9);
      background: transparent;
      cursor: pointer;
      position: relative;
      flex-shrink: 0;
      -webkit-appearance: none;
      outline: none;
      transition: transform 0.15s;
    }

    #shutter-btn::after {
      content: '';
      position: absolute;
      inset: 4px;
      border-radius: 50%;
      background: rgba(255,255,255,0.95);
      transition: transform 0.1s ease;
    }

    #shutter-btn:active {
      transform: scale(0.92);
    }

    #shutter-btn:active::after {
      transform: scale(0.85);
    }

    #shutter-btn:disabled {
      opacity: 0.25;
      cursor: not-allowed;
    }

    #shutter-btn:disabled:active {
      transform: none;
    }

    /* Next button - positioned right of shutter */
    #next-btn {
      position: absolute;
      right: 24px;
      padding: 10px 22px;
      background: transparent;
      color: rgba(255,255,255,0.9);
      border: 1px solid rgba(255,255,255,0.3);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      opacity: 0;
      pointer-events: none;
      transform: translateX(8px);
      transition: opacity 0.25s, transform 0.25s, border-color 0.15s;
      -webkit-appearance: none;
    }

    #next-btn.visible {
      opacity: 1;
      pointer-events: auto;
      transform: translateX(0);
    }

    #next-btn:hover {
      border-color: rgba(255,255,255,0.6);
    }

    #next-btn:active {
      background: rgba(255,255,255,0.1);
    }

    /* ── Processing Screen ── */
    #processing-screen {
      display: none;
      flex-direction: column;
      min-height: 100dvh;
      background: #f5f5f4;
      z-index: 20;
    }

    #processing-header {
      position: sticky;
      top: 0;
      z-index: 30;
      padding: max(env(safe-area-inset-top, 12px), 16px) 20px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #f5f5f4;
      border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    #back-btn {
      padding: 8px 16px;
      background: transparent;
      color: rgba(0,0,0,0.6);
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      transition: border-color 0.15s;
    }

    #back-btn:hover { border-color: rgba(0,0,0,0.3); }

    #download-all-btn {
      padding: 8px 16px;
      background: transparent;
      color: rgba(0,0,0,0.8);
      border: 1px solid rgba(0,0,0,0.2);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      display: none;
      -webkit-appearance: none;
      transition: border-color 0.15s;
    }

    #download-all-btn:hover { border-color: rgba(0,0,0,0.4); }

    #processing-status {
      font-size: 13px;
      font-weight: 500;
      color: rgba(0,0,0,0.5);
      letter-spacing: 0.3px;
    }

    #results-grid {
      padding: 16px;
      padding-bottom: max(env(safe-area-inset-bottom, 16px), 40px);
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 14px;
    }
    @media (max-width: 1000px) {
      #results-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 600px) {
      #results-grid { grid-template-columns: 1fr; }
    }

    .result-card {
      background: #ffffff;
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid rgba(0,0,0,0.06);
      position: relative;
    }

    .drag-stage {
      position: relative;
      width: 100%;
      aspect-ratio: 1/1;
      background: #fff;
      overflow: hidden;
      touch-action: none;
    }

    .result-card.editing .drag-stage {
      cursor: grab;
      outline: 2px solid rgba(0,0,0,0.2);
      outline-offset: -2px;
    }
    .result-card.editing .drag-stage:active { cursor: grabbing; }

    .drag-stage img {
      position: absolute;
      max-width: 80%;
      max-height: 80%;
      user-select: none;
      -webkit-user-select: none;
      pointer-events: none;
    }

    .drag-stage .watermark-img {
      position: absolute;
      width: 30%;
      max-width: none;
      max-height: none;
      opacity: 0.5;
      pointer-events: none;
      user-select: none;
      -webkit-user-select: none;
    }

    /* Pencil edit button */
    .card-edit-btn {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 32px;
      height: 32px;
      background: rgba(0,0,0,0.5);
      border: 1px solid rgba(0,0,0,0.2);
      border-radius: 8px;
      color: #ffffff;
      font-size: 14px;
      cursor: pointer;
      z-index: 20;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s, border-color 0.15s;
    }
    .card-edit-btn:hover {
      background: rgba(0,0,0,0.7);
      border-color: rgba(0,0,0,0.4);
      color: #ffffff;
    }
    .result-card.editing .card-edit-btn { display: none; }

    /* Edit panel (hidden until editing) */
    .card-edit-tools {
      display: none;
      padding: 10px 12px 12px;
      border-top: 1px solid rgba(0,0,0,0.08);
      background: rgba(0,0,0,0.02);
    }
    .result-card.editing .card-edit-tools { display: block; }

    .edit-toolbar-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 6px;
    }
    .edit-toolbar-row:last-child { margin-bottom: 0; }

    .edit-toolbar-label {
      font-size: 9px;
      color: rgba(0,0,0,0.3);
      min-width: 44px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .edit-toolbar-row input[type="range"] {
      -webkit-appearance: none;
      appearance: none;
      flex: 1;
      height: 2px;
      border-radius: 1px;
      background: rgba(0,0,0,0.1);
      outline: none;
    }
    .edit-toolbar-row input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: #2a2a2a;
      border: none;
      box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    }
    .edit-toolbar-row input[type="range"]::-moz-range-thumb {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: #2a2a2a;
      border: none;
    }

    .edit-mode-btn {
      padding: 3px 10px;
      background: transparent;
      color: rgba(0,0,0,0.45);
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 4px;
      font-size: 10px;
      cursor: pointer;
      transition: all 0.15s;
    }
    .edit-mode-btn:hover { border-color: rgba(0,0,0,0.25); color: rgba(0,0,0,0.7); }
    .edit-mode-btn.active {
      background: rgba(0,0,0,0.1);
      border-color: rgba(0,0,0,0.25);
      color: #2a2a2a;
    }

    .edit-save-btn {
      width: 100%;
      padding: 8px;
      background: rgba(0,0,0,0.06);
      color: rgba(0,0,0,0.6);
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 6px;
      font-size: 11px;
      font-weight: 500;
      cursor: pointer;
      margin-top: 8px;
      transition: all 0.15s;
    }
    .edit-save-btn:hover { background: rgba(0,0,0,0.12); color: #2a2a2a; }

    /* Hide bg-picker, sharpen, result-actions when NOT editing */
    .result-card .bg-picker,
    .result-card .sharpen-control,
    .result-card .result-actions { display: none; }
    .result-card.editing .bg-picker,
    .result-card.editing .sharpen-control { display: flex; }

    .drag-hint {
      position: absolute;
      bottom: 10px;
      left: 0;
      right: 0;
      text-align: center;
      font-size: 11px;
      color: rgba(128,128,128,0.6);
      pointer-events: none;
      transition: opacity 0.3s;
      display: none;
    }
    .result-card.editing .drag-hint { display: block; }
    .drag-stage.dragged .drag-hint { opacity: 0; }

    /* ── Background color picker ── */
    .bg-picker {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 0;
      margin-bottom: 6px;
    }

    .bg-picker-label {
      font-size: 9px;
      color: rgba(0,0,0,0.3);
      min-width: 44px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .bg-swatch {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      border: 2px solid rgba(0,0,0,0.15);
      cursor: pointer;
      transition: border-color 0.15s, transform 0.1s;
      flex-shrink: 0;
      -webkit-appearance: none;
      padding: 0;
      outline: none;
    }

    .bg-swatch:active { transform: scale(0.9); }

    .bg-swatch.active {
      border-color: #2a2a2a;
      border-width: 3px;
    }

    .bg-custom-input {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      border: 2px solid rgba(0,0,0,0.15);
      cursor: pointer;
      padding: 0;
      overflow: hidden;
      flex-shrink: 0;
      position: relative;
    }

    .bg-custom-input.active {
      border-color: #2a2a2a;
      border-width: 3px;
    }

    .bg-custom-input input {
      position: absolute;
      inset: -4px;
      width: 36px;
      height: 36px;
      border: none;
      cursor: pointer;
      -webkit-appearance: none;
      padding: 0;
    }

    /* Sharpness slider */
    .sharpen-control {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 0;
      margin-bottom: 6px;
    }

    .sharpen-control label {
      font-size: 9px;
      color: rgba(0,0,0,0.3);
      white-space: nowrap;
      min-width: 44px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .sharpen-control input[type="range"] {
      -webkit-appearance: none;
      appearance: none;
      flex: 1;
      height: 2px;
      border-radius: 1px;
      background: rgba(0,0,0,0.1);
      outline: none;
    }

    .sharpen-control input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: #2a2a2a;
      border: none;
      box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    }

    .sharpen-control input[type="range"]::-moz-range-thumb {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: #2a2a2a;
      border: none;
    }

    .sharpen-value {
      font-size: 10px;
      color: rgba(0,0,0,0.3);
      font-weight: 500;
      min-width: 20px;
      text-align: right;
    }

    .result-actions {
      padding: 12px 14px;
      display: flex;
      gap: 8px;
      justify-content: space-between;
      align-items: center;
    }

    .result-label {
      font-size: 13px;
      font-weight: 500;
      color: rgba(0,0,0,0.4);
    }

    .result-actions button {
      padding: 7px 16px;
      background: transparent;
      color: rgba(0,0,0,0.6);
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      transition: border-color 0.15s;
    }

    .result-actions button:hover {
      border-color: rgba(0,0,0,0.3);
      color: rgba(0,0,0,0.8);
    }

    /* ── Loader ── */
    .spinner {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 48px 20px;
      gap: 16px;
      background: #ffffff;
      border-radius: 16px;
      border: 1px solid rgba(0,0,0,0.06);
    }

    .spinner-ring {
      width: 40px;
      height: 40px;
      border: 3px solid rgba(0,0,0,0.1);
      border-top-color: #2a2a2a;
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
    }

    @keyframes spin { to { transform: rotate(360deg); } }

    .progress-text {
      font-size: 13px;
      color: rgba(0,0,0,0.4);
      font-weight: 500;
    }

    /* ── Flash ── */
    #flash {
      position: fixed;
      inset: 0;
      background: #fff;
      opacity: 0;
      pointer-events: none;
      z-index: 100;
    }

    #flash.fire {
      animation: flash-anim 0.12s ease-out;
    }

    @keyframes flash-anim {
      0% { opacity: 0.7; }
      100% { opacity: 0; }
    }

    #capture-canvas { display: none; }

    /* ── Continue button on results page ── */
    #continue-btn {
      display: none;
      margin: 8px 16px 24px;
      padding: 12px;
      background: transparent;
      color: rgba(0,0,0,0.8);
      border: 1px solid rgba(0,0,0,0.2);
      border-radius: 8px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      text-align: center;
      transition: border-color 0.15s;
    }

    #continue-btn:hover { border-color: rgba(0,0,0,0.4); }

    /* ── Product Form Screen (Wizard) ── */
    #product-screen {
      display: none;
      flex-direction: column;
      min-height: 100dvh;
      background: #f5f5f4;
      z-index: 25;
    }

    #product-header {
      position: sticky;
      top: 0;
      z-index: 30;
      padding: max(env(safe-area-inset-top, 12px), 16px) 20px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #f5f5f4;
      border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    #product-back-btn {
      padding: 8px 16px;
      background: transparent;
      color: rgba(0,0,0,0.6);
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      transition: border-color 0.15s;
    }

    #product-back-btn:hover { border-color: rgba(0,0,0,0.3); }

    #product-header-title {
      font-size: 15px;
      font-weight: 600;
      color: rgba(0,0,0,0.6);
    }

    #product-header .spacer { width: 60px; }

    /* Step indicators */
    .step-dots {
      display: flex;
      gap: 6px;
      justify-content: center;
      padding: 16px 0 4px;
    }

    .step-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: rgba(0,0,0,0.15);
      transition: background 0.2s, width 0.2s;
      cursor: pointer;
      position: relative;
    }
    /* Larger touch target */
    .step-dot::before {
      content: '';
      position: absolute;
      inset: -10px;
    }

    .step-dot.active {
      background: #2a2a2a;
      width: 24px;
      border-radius: 4px;
    }

    .step-dot.done {
      background: rgba(0,0,0,0.4);
    }

    /* Wizard step container */
    .wizard-step {
      display: none;
      flex-direction: column;
      gap: 20px;
      padding: 20px 16px;
      padding-bottom: max(env(safe-area-inset-bottom, 16px), 40px);
    }

    .wizard-step.active { display: flex; }

    .step-title {
      font-size: 22px;
      font-weight: 700;
      color: #2a2a2a;
      letter-spacing: -0.3px;
    }

    .step-subtitle {
      font-size: 13px;
      color: rgba(0,0,0,0.3);
      margin-top: -12px;
    }

    .wizard-nav {
      display: flex;
      gap: 10px;
      margin-top: 8px;
    }

    .wizard-nav button {
      flex: 1;
      padding: 12px;
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      text-align: center;
      transition: border-color 0.15s;
    }

    .wizard-prev {
      background: transparent;
      color: rgba(0,0,0,0.6);
    }

    .wizard-prev:hover { border-color: rgba(0,0,0,0.3); }

    .wizard-next {
      background: transparent;
      color: rgba(0,0,0,0.8);
      border-color: rgba(0,0,0,0.25);
    }

    .wizard-next:hover { border-color: rgba(0,0,0,0.45); }

    .wizard-skip {
      background: rgba(0,0,0,0.04);
      color: rgba(0,0,0,0.6);
      border: 1px dashed rgba(0,0,0,0.2);
      font-size: 13px;
    }

    .wizard-skip:hover { color: #2a2a2a; border-color: rgba(0,0,0,0.4); background: rgba(0,0,0,0.06); }

    .tag-picker-selected {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      min-height: 36px;
      padding: 8px;
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      background: rgba(0,0,0,0.04);
    }

    .tag-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 10px;
      background: rgba(0,0,0,0.1);
      border-radius: 6px;
      font-size: 12px;
      color: #2a2a2a;
    }

    .tag-chip-remove {
      background: none;
      border: none;
      color: rgba(0,0,0,0.4);
      cursor: pointer;
      font-size: 14px;
      padding: 0 2px;
      line-height: 1;
    }

    .tag-chip-remove:hover { color: #ff6b6b; }

    .tag-picker-options {
      display: none;
      flex-wrap: wrap;
      gap: 6px;
      padding: 12px;
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      background: rgba(0,0,0,0.02);
      margin-top: 8px;
    }

    .tag-picker-options.open { display: flex; }

    .tag-option {
      padding: 5px 12px;
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 6px;
      font-size: 12px;
      color: rgba(0,0,0,0.6);
      cursor: pointer;
      transition: all 0.15s;
      background: transparent;
    }

    .tag-option:hover {
      background: rgba(0,0,0,0.08);
      color: #2a2a2a;
      border-color: rgba(0,0,0,0.25);
    }

    .tag-option.selected {
      background: rgba(0,0,0,0.12);
      color: #2a2a2a;
      border-color: rgba(0,0,0,0.3);
    }

    .seo-char-counter {
      font-size: 11px;
      color: rgba(0,0,0,0.35);
      margin-top: 4px;
      text-align: right;
      transition: color 0.2s;
    }
    .seo-char-counter.warning { color: #ea580c; }
    .seo-char-counter.over { color: #dc2626; font-weight: 600; }
    .seo-char-counter.good { color: #16a34a; }

    .tag-add-btn {
      padding: 6px 16px;
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      background: transparent;
      color: rgba(0,0,0,0.6);
      font-size: 13px;
      cursor: pointer;
      transition: all 0.15s;
    }

    .tag-add-btn:hover { color: #2a2a2a; border-color: rgba(0,0,0,0.3); }

    .ai-suggest-btn {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 5px 10px;
      background: transparent;
      color: rgba(0,0,0,0.5);
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 6px;
      font-size: 11px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      transition: border-color 0.15s, color 0.15s;
    }

    .ai-suggest-btn:hover { border-color: rgba(0,0,0,0.3); color: rgba(0,0,0,0.7); }

    .ai-suggest-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .ai-suggest-btn:disabled:active { transform: none; }

    .ai-suggest-btn .ai-spinner {
      display: none;
      width: 12px;
      height: 12px;
      border: 2px solid rgba(0,0,0,0.3);
      border-top-color: #2a2a2a;
      border-radius: 50%;
      animation: spin 0.6s linear infinite;
    }

    .ai-suggest-btn.loading .ai-spinner { display: inline-block; }
    .ai-suggest-btn.loading .ai-label { display: none; }

    .form-group-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .form-group label {
      font-size: 12px;
      font-weight: 600;
      color: rgba(0,0,0,0.4);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .form-group input:not([type="checkbox"]),
    .form-group textarea,
    .form-group select {
      background: #ffffff;
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 10px;
      padding: 12px 14px;
      font-size: 15px;
      color: #2a2a2a;
      font-family: inherit;
      -webkit-appearance: none;
      outline: none;
      transition: border-color 0.15s;
    }

    .form-group input:not([type="checkbox"]):focus,
    .form-group textarea:focus,
    .form-group select:focus {
      border-color: rgba(0,0,0,0.3);
    }


    .form-group input:not([type="checkbox"]).field-dirty,
    .form-group textarea.field-dirty,
    .form-group select.field-dirty {
      border: 1.5px solid #5b9df9;
      box-shadow: 0 0 0 3px rgba(91,157,249,0.12);
    }

    .form-group textarea {
      min-height: 100px;
      resize: vertical;
    }

    .form-group select {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 14px center;
      padding-right: 36px;
    }

    /* Shared product-edit field states */
    .form-group input.field-editable,
    .form-group textarea.field-editable,
    .form-group select.field-editable {
      background-color: #fff;
      border: 1px solid rgba(0,0,0,0.14);
      color: #2a2a2a;
      cursor: text;
    }
    .form-group select.field-editable { cursor: pointer; }
    .form-group input.field-readonly,
    .form-group textarea.field-readonly,
    .form-group select.field-readonly {
      background-color: #f0f0ee;
      border: 1px solid rgba(0,0,0,0.06);
      color: rgba(0,0,0,0.45);
      cursor: not-allowed;
      pointer-events: none;
    }
    .field-helper {
      color: rgba(0,0,0,0.4);
      font-size: 11px;
      line-height: 1.35;
      margin-top: 2px;
    }

    .form-row {
      display: flex;
      gap: 12px;
    }

    .form-row .form-group { flex: 1; }

    .form-hint {
      font-size: 11px;
      color: rgba(0,0,0,0.2);
      margin-top: 2px;
    }

    /* NetSuite attribute form */
    .ns-attr-section {
      margin-top: 16px;
    }
    .ns-attr-heading {
      font-size: 13px;
      font-weight: 700;
      color: rgba(0,0,0,0.5);
      text-transform: uppercase;
      letter-spacing: 0.6px;
      padding: 12px 0;
      margin-bottom: 8px;
      border-bottom: 1.5px solid rgba(0,0,0,0.08);
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
    }
    .ns-attr-heading::after {
      content: '';
      display: inline-block;
      width: 8px;
      height: 8px;
      border-right: 2px solid rgba(0,0,0,0.3);
      border-bottom: 2px solid rgba(0,0,0,0.3);
      transform: rotate(-45deg);
      transition: transform 0.2s;
      flex-shrink: 0;
      margin-left: 8px;
    }
    .ns-attr-heading.collapsed::after {
      transform: rotate(45deg);
    }
    .ns-attr-heading--static {
      cursor: default;
    }
    .ns-attr-heading--static::after {
      display: none;
    }
    .ns-attr-section-body {
      overflow: visible;
      transition: max-height 0.25s ease, opacity 0.2s;
      max-height: 2000px;
      opacity: 1;
    }
    .ns-attr-section-body.collapsed {
      overflow: hidden;
      max-height: 0 !important;
      opacity: 0;
      margin: 0;
      padding: 0;
    }
    .ns-attr-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
    }
    @media (max-width: 900px) {
      .ns-attr-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 500px) {
      .ns-attr-grid { grid-template-columns: 1fr; }
    }
    .ns-attr-grid .form-group input,
    .ns-attr-grid .form-group select {
      padding: 8px 10px;
      font-size: 13px;
      border-radius: 6px;
    }
    .ns-attr-grid .form-group select {
      padding-right: 28px;
      background-position: right 8px center;
    }
    .ns-attr-grid .form-group label {
      font-size: 10px;
    }

    .ns-attr-grid .form-group input.field-error {
      border-color: #ff6b6b !important;
    }
    .ns-attr-grid .form-group input.field-dirty,
    .ns-attr-grid .form-group select.field-dirty,
    .ns-attr-grid .form-group.is-dirty select {
      border: 1.5px solid #5b9df9 !important;
      box-shadow: 0 0 0 3px rgba(91,157,249,0.12);
    }
    .form-group.field-error input:not([type="checkbox"]):not([type="hidden"]),
    .form-group.field-error select,
    .form-group.field-error textarea {
      border: 1.5px solid #ff6b6b !important;
      box-shadow: none !important;
    }
    .ns-attr-grid .form-group.field-error input:not([type="checkbox"]):not([type="hidden"]),
    .ns-attr-grid .form-group.field-error select,
    .ns-attr-grid .form-group.field-error textarea {
      border: 1.5px solid #ff6b6b !important;
      box-shadow: none !important;
    }
    .ns-attr-grid .form-group input.field-error::placeholder {
      color: rgba(255,107,107,0.5);
    }
    .field-error-msg {
      color: #ff6b6b;
      font-size: 10.5px;
      line-height: 1.35;
      margin-top: 4px;
      max-width: 100%;
      overflow-wrap: anywhere;
    }
    .field-char-counter {
      color: rgba(0,0,0,0.35);
      font-size: 10.5px;
      line-height: 1.35;
      margin-top: 3px;
      text-align: right;
    }
    .field-char-counter.is-over { color: #ff6b6b; }
    .product-validation-status {
      background: rgba(255,107,107,0.08);
      border: 1px solid rgba(255,107,107,0.3);
      border-radius: 8px;
      color: #ff6b6b;
      font-size: 12px;
      line-height: 1.4;
      margin: 8px 16px 0;
      overflow-wrap: anywhere;
      padding: 8px 10px;
      text-align: center;
    }

    /* Admin field config controls */
    .field-admin-controls {
      display: flex;
      gap: 2px;
      flex-shrink: 0;
    }
    .ns-field-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: rgba(0,0,0,0.06);
      color: rgba(0,0,0,0.3);
      font-size: 9px;
      font-weight: 700;
      cursor: pointer;
      position: relative;
      flex-shrink: 0;
      font-style: italic;
    }
    .ns-field-icon:hover { background: rgba(0,0,0,0.12); color: rgba(0,0,0,0.5); }
    .ns-field-tip {
      position: absolute;
      bottom: calc(100% + 6px);
      left: 50%;
      transform: translateX(-50%);
      background: #2a2a2a;
      color: #fff;
      font-size: 10px;
      font-weight: 400;
      font-style: normal;
      padding: 4px 8px;
      border-radius: 4px;
      white-space: nowrap;
      z-index: 30;
    }
    .field-admin-btn {
      background: none;
      border: none;
      cursor: pointer;
      padding: 2px 4px;
      border-radius: 4px;
      opacity: 0.3;
      transition: opacity 0.15s, background 0.15s;
      display: flex;
      align-items: center;
    }
    .field-admin-btn:hover { opacity: 0.7; background: rgba(0,0,0,0.05); }
    .field-admin-btn.active { opacity: 1; }
    .field-admin-btn.vis-off { opacity: 0.15; }
    .field-admin-btn svg { width: 14px; height: 14px; }
    .field-label-row {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
      width: 100%;
    }
    .field-label-row label { margin: 0; margin-right: auto; }
    .field-icon-rail {
      display: flex;
      align-items: center;
      flex-shrink: 0;
      gap: 8px;
    }

    /* Voice-to-text mic button */
    .voice-mic-btn {
      flex-shrink: 0;
      width: 28px;
      height: 28px;
      border: none;
      background: rgba(0,0,0,0.05);
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: rgba(0,0,0,0.35);
      transition: all 0.2s;
      padding: 0;
    }
    .voice-mic-btn:hover { background: rgba(0,0,0,0.1); color: rgba(0,0,0,0.5); }
    .voice-mic-btn.voice-active {
      background: rgba(239,68,68,0.12);
      color: #ef4444;
      animation: voice-pulse 1.2s ease-in-out infinite;
    }
    @keyframes voice-pulse {
      0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.3); }
      50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
    }

    .field-admin-btn[data-tip],
    .ns-field-icon[data-tip],
    .voice-mic-btn[data-tip] { position: relative; }
    .field-admin-btn[data-tip]:hover::after,
    .ns-field-icon[data-tip]:hover::after,
    .voice-mic-btn[data-tip]:hover::after {
      content: attr(data-tip);
      position: absolute;
      right: 0;
      bottom: calc(100% + 6px);
      z-index: 60;
      padding: 5px 8px;
      border-radius: 7px;
      background: #2a2a2a;
      box-shadow: 0 6px 18px rgba(0,0,0,0.22);
      color: #fff;
      font-size: 11px;
      font-style: normal;
      font-weight: 500;
      letter-spacing: 0;
      line-height: 1.3;
      text-transform: none;
      white-space: nowrap;
    }

    .seo-field-actions {
      display: flex;
      align-items: center;
      flex-shrink: 0;
      gap: 6px;
    }
    .seo-field-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 28px;
      padding: 5px 9px;
      border: 1px solid rgba(0,0,0,0.14);
      border-radius: 7px;
      background: #fff;
      color: #2a2a2a;
      cursor: pointer;
      font: 600 11px/1 inherit;
    }
    .seo-field-btn:hover { border-color: rgba(0,0,0,0.3); }
    .seo-field-btn:disabled { cursor: wait; opacity: 0.65; }
    .seo-field-btn-ai { border-color: rgba(124,58,237,0.3); color: #7c3aed; }
    .seo-field-btn-label { display: inline-flex; align-items: center; gap: 5px; }
    .seo-field-btn svg { width: 12px; height: 12px; }
    .seo-field-spinner {
      display: none;
      width: 12px;
      height: 12px;
      border: 2px solid currentColor;
      border-top-color: transparent;
      border-radius: 50%;
      animation: spin 0.6s linear infinite;
    }
    .seo-field-btn.loading .seo-field-spinner { display: block; }
    .seo-field-btn.loading .seo-field-btn-label { display: none; }
    .seo-field-error {
      display: none;
      color: #dc2626;
      font-size: 11px;
      line-height: 1.35;
    }
    .seo-field-error:not(:empty) { display: block; }

    .form-group { position: relative; }
    .form-group.field-hidden { opacity: 0.25; }
    .form-group.field-hidden input,
    .form-group.field-hidden select,
    .form-group.field-hidden textarea { pointer-events: none; }
    .field-required-dot {
      color: #ff6b6b;
      font-size: 10px;
      margin-left: 3px;
    }
    .field-dirty-dot {
      display: none;
      width: 6px;
      height: 6px;
      background: #5b9df9;
      border-radius: 50%;
      margin-left: 4px;
      flex-shrink: 0;
    }
    .form-group.is-dirty .field-dirty-dot { display: inline-block; }

    .dirty-count-text {
      display: none;
      color: #5b9df9;
      font-size: 11px;
      font-weight: 600;
      line-height: 1.25;
      white-space: nowrap;
    }
    .dirty-count-text-mobile {
      padding: 2px 4px 10px;
      text-align: center;
    }
    .save-action-with-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }
    .dirty-count-badge {
      display: none;
      background: #5b9df9;
      color: #fff;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      line-height: 1.35;
      padding: 1px 6px;
      min-width: 16px;
      text-align: center;
    }

    /* Competitor SEO Lookup */
    .competitor-lookup {
      margin-top: 16px;
      padding: 16px;
      background: rgba(0,0,0,0.02);
      border: 1px solid rgba(0,0,0,0.06);
      border-radius: 10px;
    }
    .competitor-lookup-title {
      font-size: 11px;
      font-weight: 600;
      color: rgba(0,0,0,0.3);
      text-transform: uppercase;
      letter-spacing: 0.8px;
      margin-bottom: 12px;
    }
    .competitor-lookup-row {
      display: flex;
      gap: 8px;
      margin-bottom: 12px;
    }
    .competitor-lookup-row input {
      flex: 1;
      padding: 8px 12px;
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 8px;
      font-size: 13px;
      background: #fff;
    }
    .competitor-lookup-btn {
      padding: 8px 20px;
      background: #2a2a2a;
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      white-space: nowrap;
    }
    .competitor-lookup-btn:disabled { opacity: 0.4; cursor: default; }
    .competitor-result {
      background: #fff;
      border: 1px solid rgba(0,0,0,0.08);
      border-radius: 8px;
      padding: 12px;
      margin-bottom: 8px;
    }
    .competitor-result-url {
      font-size: 11px;
      color: rgba(0,0,0,0.35);
      margin-bottom: 6px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .competitor-result-title {
      font-size: 14px;
      font-weight: 500;
      margin-bottom: 6px;
    }
    .competitor-result-desc {
      font-size: 12px;
      color: rgba(0,0,0,0.5);
      margin-bottom: 8px;
    }
    .competitor-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
    }
    .competitor-tag {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 10px;
      background: rgba(0,0,0,0.04);
      border: 1px solid rgba(0,0,0,0.08);
      border-radius: 20px;
      font-size: 11px;
      color: rgba(0,0,0,0.6);
      cursor: pointer;
      transition: all 0.15s;
    }
    .competitor-tag:hover { background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.15); }
    .competitor-tag.added { background: #e8f5e9; border-color: #a5d6a7; color: #2e7d32; }
    .competitor-tag-plus { font-size: 13px; font-weight: 600; }

    /* Pricing info icon + tooltip */
    .pricing-info-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: rgba(0,0,0,0.08);
      color: rgba(0,0,0,0.4);
      font-size: 10px;
      font-weight: 700;
      cursor: help;
      margin-left: 6px;
      position: relative;
      vertical-align: middle;
    }
    .pricing-info-icon:hover { background: rgba(0,0,0,0.15); color: rgba(0,0,0,0.6); }
    .pricing-tooltip {
      display: none;
      position: absolute;
      bottom: calc(100% + 8px);
      left: 0;
      background: #2a2a2a;
      color: #fff;
      font-size: 11px;
      font-weight: 400;
      line-height: 1.5;
      padding: 10px 14px;
      border-radius: 8px;
      white-space: nowrap;
      z-index: 20;
      pointer-events: none;
    }
    .pricing-tooltip::after {
      content: '';
      position: absolute;
      top: 100%;
      left: 14px;
      border: 5px solid transparent;
      border-top-color: #2a2a2a;
    }
    .pricing-info-icon:hover .pricing-tooltip { display: block; }

    /* Pricing multiplier checkboxes */
    .pricing-multiplier-row {
      display: flex;
      gap: 16px;
      margin: 10px 0;
      align-items: center;
    }
    .pricing-multiplier-label {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      color: rgba(0,0,0,0.7);
      cursor: pointer;
    }
    .pricing-multiplier-label input[type="checkbox"] {
      width: 16px;
      height: 16px;
      cursor: pointer;
    }

    /* Year range modal */
    .year-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.7);
      z-index: 100;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .year-modal {
      background: #ffffff;
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 12px;
      padding: 24px;
      max-width: 320px;
      width: 90%;
    }
    .year-modal h3 {
      font-size: 15px;
      font-weight: 600;
      margin: 0 0 4px;
      color: #2a2a2a;
    }
    .year-modal p {
      font-size: 12px;
      color: rgba(0,0,0,0.4);
      margin: 0 0 16px;
    }
    .year-modal-row {
      display: flex;
      gap: 10px;
      margin-bottom: 12px;
    }
    .year-modal-row .form-group { flex: 1; }
    .year-modal-row input {
      width: 100%;
      background: #ffffff;
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 8px;
      padding: 10px;
      font-size: 14px;
      color: #2a2a2a;
      outline: none;
      font-family: inherit;
    }
    .year-modal-row input:focus { border-color: rgba(0,0,0,0.3); }
    .year-modal-btns {
      display: flex;
      gap: 8px;
    }
    .year-modal-btns button {
      flex: 1;
      padding: 10px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      border: 1px solid rgba(0,0,0,0.12);
      background: transparent;
      color: rgba(0,0,0,0.7);
      transition: all 0.15s;
    }
    .year-modal-btns button:hover { border-color: rgba(0,0,0,0.3); color: #2a2a2a; }
    .year-modal-btns button.primary {
      background: rgba(0,0,0,0.08);
      color: #2a2a2a;
    }

    .form-group-checkbox {
      flex-direction: row !important;
      align-items: center !important;
      gap: 8px !important;
    }
    .form-group-checkbox input[type="checkbox"] {
      width: 16px;
      height: 16px;
      padding: 0;
      border-radius: 4px;
      flex-shrink: 0;
    }

    /* Image preview strip in form */
    .form-images {
      display: flex;
      gap: 10px;
      overflow-x: auto;
      scrollbar-width: none;
      padding: 4px 0;
    }

    .form-images::-webkit-scrollbar { display: none; }

    .form-images img {
      height: 80px;
      border-radius: 10px;
      border: 1px solid rgba(0,0,0,0.1);
    }

    #publish-btn {
      padding: 12px;
      background: transparent;
      color: rgba(0,0,0,0.8);
      border: 1px solid rgba(0,0,0,0.2);
      border-radius: 8px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      text-align: center;
      margin-top: 8px;
      transition: border-color 0.15s;
    }

    #publish-btn:hover { border-color: rgba(0,0,0,0.4); }

    /* ── Review Screen ── */
    #review-screen {
      display: none;
      flex-direction: column;
      min-height: 100dvh;
      background: #f5f5f4;
      z-index: 26;
    }

    #review-header {
      position: sticky;
      top: 0;
      z-index: 30;
      padding: max(env(safe-area-inset-top, 12px), 16px) 20px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #f5f5f4;
      border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    #review-back-btn {
      padding: 8px 16px;
      background: transparent;
      color: rgba(0,0,0,0.6);
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      transition: border-color 0.15s;
    }

    #review-back-btn:hover { border-color: rgba(0,0,0,0.3); }

    #review-header-title {
      font-size: 15px;
      font-weight: 600;
      color: rgba(0,0,0,0.6);
    }

    #review-content {
      padding: 20px 16px;
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .review-images {
      display: flex;
      gap: 10px;
      overflow-x: auto;
      scrollbar-width: none;
      padding: 4px 0;
    }

    .review-images::-webkit-scrollbar { display: none; }

    .review-images img {
      height: 120px;
      border-radius: 12px;
      border: 1px solid rgba(0,0,0,0.1);
    }

    .review-field {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .review-field-label {
      font-size: 11px;
      font-weight: 600;
      color: rgba(0,0,0,0.3);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .review-field-value {
      font-size: 15px;
      color: #2a2a2a;
      line-height: 1.5;
      padding: 8px 10px;
      border-radius: 8px;
      border: 1px solid transparent;
      transition: border-color 0.15s, background 0.15s;
    }

    .review-field-editable {
      cursor: pointer;
      border: 1px dashed rgba(0,0,0,0.1);
    }

    .review-field-editable::after {
      content: ' ✎';
      font-size: 11px;
      color: rgba(0,0,0,0.25);
    }

    .review-field-editable:hover {
      border-color: rgba(0,0,0,0.2);
      background: rgba(0,0,0,0.03);
    }

    .review-field-value.empty {
      color: rgba(0,0,0,0.15);
      font-style: italic;
    }

    .review-edit-input,
    .review-edit-textarea {
      width: 100%;
      background: #ffffff;
      border: 1px solid rgba(0,0,0,0.2);
      border-radius: 8px;
      padding: 8px 10px;
      font-size: 15px;
      color: #2a2a2a;
      font-family: inherit;
      outline: none;
      -webkit-appearance: none;
      transition: border-color 0.15s;
    }

    .review-edit-input:focus,
    .review-edit-textarea:focus {
      border-color: rgba(0,0,0,0.4);
    }

    .review-edit-textarea {
      min-height: 70px;
      resize: vertical;
    }

    .review-edit-hint {
      font-size: 10px;
      color: rgba(0,0,0,0.15);
      margin-top: 2px;
      text-align: right;
    }

    .review-divider {
      height: 1px;
      background: rgba(0,0,0,0.06);
    }

    .review-row {
      display: flex;
      gap: 20px;
    }

    .review-row .review-field { flex: 1; }

    #review-footer {
      padding: 16px;
      padding-bottom: max(env(safe-area-inset-bottom, 16px), 40px);
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
    }

    #review-footer .dirty-count-text {
      width: 100%;
      margin-bottom: -2px;
    }

    #publish-btn {
      padding: 10px 24px;
      background: #2a2a2a;
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      -webkit-appearance: none;
      text-align: center;
    }

    #publish-btn:active { background: rgba(0,0,0,0.7); }
    #publish-btn:disabled { opacity: 0.25; cursor: not-allowed; }
    #publish-btn:disabled:active { background: #2a2a2a; }

    #save-draft-btn {
      padding: 10px 24px;
      background: transparent;
      color: rgba(0,0,0,0.7);
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s;
    }
    #save-draft-btn:hover { border-color: rgba(0,0,0,0.3); }
    #save-draft-btn:disabled { opacity: 0.25; cursor: not-allowed; }

    #publish-status {
      text-align: center;
      font-size: 13px;
      color: rgba(0,0,0,0.4);
      min-height: 20px;
      margin-bottom: 12px;
      user-select: text;
      -webkit-user-select: text;
      cursor: text;
      word-break: break-all;
      max-width: 100%;
    }

    /* ── Part Lookup Screen ── */
    #lookup-screen {
      display: none;
      flex-direction: column;
      min-height: 100dvh;
      background: #f5f5f4;
      z-index: 20;
    }

    #lookup-header {
      position: sticky;
      top: 0;
      z-index: 30;
      padding: max(env(safe-area-inset-top, 12px), 16px) 20px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #f5f5f4;
      border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    #lookup-back-btn {
      padding: 8px 16px;
      background: transparent;
      color: rgba(0,0,0,0.6);
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      transition: border-color 0.15s;
    }

    #lookup-back-btn:hover { border-color: rgba(0,0,0,0.3); }

    #lookup-header-title {
      font-size: 15px;
      font-weight: 600;
      color: rgba(0,0,0,0.6);
    }

    #lookup-header .spacer { width: 60px; }

    .lookup-body {
      padding: 20px 16px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .lookup-search-row {
      display: flex;
      gap: 10px;
    }

    .lookup-search-row input {
      flex: 1;
      background: transparent;
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      padding: 9px 14px;
      font-size: 13px;
      color: rgba(0,0,0,0.85);
      font-family: inherit;
      -webkit-appearance: none;
      outline: none;
      transition: border-color 0.15s;
    }

    .lookup-search-row input:focus {
      border-color: rgba(0,0,0,0.3);
    }

    .lookup-search-row input::placeholder {
      color: rgba(0,0,0,0.25);
    }

    #lookup-search-btn {
      padding: 9px 16px;
      background: transparent;
      color: rgba(0,0,0,0.6);
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      white-space: nowrap;
      transition: border-color 0.15s;
    }

    #lookup-search-btn:hover { border-color: rgba(0,0,0,0.3); }
    #lookup-search-btn:disabled { opacity: 0.3; cursor: not-allowed; }

    #lookup-status {
      font-size: 13px;
      color: rgba(0,0,0,0.4);
      min-height: 20px;
    }

    .lookup-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 10px;
    }

    @media (max-width: 900px) {
      .lookup-grid { grid-template-columns: repeat(3, 1fr); }
    }

    @media (max-width: 600px) {
      .lookup-grid { grid-template-columns: repeat(2, 1fr); }
    }

    .lookup-img-card {
      position: relative;
      border-radius: 12px;
      overflow: hidden;
      border: 2px solid transparent;
      cursor: pointer;
      transition: border-color 0.15s, transform 0.1s;
      background: #ffffff;
    }

    .lookup-img-card:active { transform: scale(0.97); }

    .lookup-img-card.selected {
      border-color: #2a2a2a;
    }

    .lookup-img-card img {
      width: 100%;
      aspect-ratio: 1;
      object-fit: cover;
      display: block;
    }

    .lookup-img-check {
      display: none;
      position: absolute;
      top: 8px;
      right: 8px;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: #2a2a2a;
      color: #fff;
      font-size: 14px;
      font-weight: 700;
      line-height: 24px;
      text-align: center;
    }

    .lookup-img-card.selected .lookup-img-check { display: block; }

    .lookup-skip-bg {
      display: none;
      position: absolute;
      top: 8px;
      left: 8px;
      padding: 3px 8px;
      background: rgba(0,0,0,0.7);
      color: rgba(0,0,0,0.6);
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 5px;
      font-size: 10px;
      font-weight: 500;
      cursor: pointer;
      z-index: 2;
      transition: border-color 0.15s, color 0.15s;
    }

    .lookup-img-card.selected .lookup-skip-bg { display: block; }

    .lookup-skip-bg:hover { border-color: rgba(0,0,0,0.4); }

    .lookup-skip-bg.active {
      background: rgba(255,140,0,0.2);
      border-color: rgba(255,140,0,0.5);
      color: rgba(255,180,80,0.9);
    }

    .lookup-img-source {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 4px 8px;
      background: rgba(0,0,0,0.7);
      font-size: 10px;
      color: rgba(0,0,0,0.5);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    #lookup-use-btn {
      display: none;
      padding: 12px;
      background: transparent;
      color: rgba(0,0,0,0.8);
      border: 1px solid rgba(0,0,0,0.2);
      border-radius: 8px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      text-align: center;
      margin-top: 4px;
      transition: border-color 0.15s;
    }

    #lookup-use-btn:hover { border-color: rgba(0,0,0,0.4); }

    /* Searchable dropdown */
    .search-select {
      position: relative;
    }

    .search-select-input {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      background: rgba(0,0,0,0.04);
      color: #2a2a2a;
      font-size: 14px;
      outline: none;
    }

    .search-select-input:focus {
      border-color: rgba(0,0,0,0.3);
    }

    .search-select-dropdown {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      max-height: 240px;
      overflow-y: auto;
      background: #ffffff;
      border: 1px solid rgba(0,0,0,0.15);
      border-top: none;
      border-radius: 0 0 8px 8px;
      z-index: 100;
    }

    .search-select-dropdown.open { display: block; }

    .search-select-option {
      padding: 8px 12px;
      font-size: 13px;
      color: rgba(0,0,0,0.7);
      cursor: pointer;
    }

    .search-select-option:hover {
      background: rgba(0,0,0,0.08);
      color: #2a2a2a;
    }

    /* ── Auth Screen ── */
    #auth-screen {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #f5f5f4;
      z-index: 100;
    }

    .auth-card {
      width: 100%;
      max-width: 400px;
      padding: 40px 32px;
      margin: 0 20px;
    }

    .auth-logo {
      display: block;
      height: 28px;
      margin: 0 auto 32px;
      filter: invert(1);
      opacity: 0.9;
    }

    .auth-title {
      font-size: 22px;
      font-weight: 700;
      text-align: center;
      color: #2a2a2a;
      margin-bottom: 4px;
    }

    .auth-subtitle {
      font-size: 13px;
      text-align: center;
      color: rgba(0,0,0,0.4);
      margin-bottom: 28px;
    }

    .auth-form {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .auth-row {
      display: flex;
      gap: 10px;
    }

    .auth-row .auth-input { flex: 1; }

    .auth-input {
      padding: 12px 14px;
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 8px;
      background: #fff;
      color: #2a2a2a;
      font-size: 14px;
      outline: none;
      width: 100%;
    }

    .auth-input:focus {
      border-color: rgba(0,0,0,0.3);
    }

    .auth-input.error {
      border-color: #ff6b6b;
    }

    .auth-select {
      padding: 12px 14px;
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 8px;
      background: #fff;
      color: #2a2a2a;
      font-size: 14px;
      outline: none;
      width: 100%;
      -webkit-appearance: none;
    }

    .auth-btn {
      padding: 13px;
      background: #2a2a2a;
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      margin-top: 4px;
    }

    .auth-btn:hover { opacity: 0.85; }
    .auth-btn:disabled { opacity: 0.4; cursor: not-allowed; }

    .auth-toggle {
      text-align: center;
      margin-top: 20px;
      font-size: 13px;
      color: rgba(0,0,0,0.45);
    }

    .auth-toggle a {
      color: #2a2a2a;
      font-weight: 600;
      text-decoration: none;
      cursor: pointer;
    }

    .auth-toggle a:hover { text-decoration: underline; }

    .auth-error {
      text-align: center;
      font-size: 13px;
      color: #ff6b6b;
      min-height: 18px;
    }

    .auth-domain-hint {
      font-size: 11px;
      color: rgba(0,0,0,0.35);
      text-align: center;
      margin-top: -4px;
    }

    /* ── Panel Overlay ── */
    .panel-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.3);
      z-index: 200;
      display: flex;
      justify-content: flex-end;
    }

    .panel {
      width: 100%;
      max-width: 380px;
      background: #fff;
      height: 100%;
      overflow-y: auto;
      padding: 28px 24px;
      box-shadow: -4px 0 20px rgba(0,0,0,0.1);
      animation: panelSlideIn 0.2s ease;
    }

    @keyframes panelSlideIn {
      from { transform: translateX(100%); }
      to { transform: translateX(0); }
    }

    .panel-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 24px;
    }

    .panel-title {
      font-size: 18px;
      font-weight: 700;
      color: #2a2a2a;
    }

    .panel-close {
      background: none;
      border: none;
      font-size: 22px;
      color: rgba(0,0,0,0.35);
      cursor: pointer;
      padding: 4px 8px;
    }

    .panel-close:hover { color: #2a2a2a; }

    @media (max-width: 600px) {
      .panel-overlay {
        justify-content: center;
        align-items: flex-end;
        overscroll-behavior: contain;
      }
      .panel {
        max-width: 100%;
        width: 100%;
        height: 92vh;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
        animation: panelSlideUp 0.25s ease;
        padding: 20px 16px;
        overscroll-behavior: contain;
      }
      @keyframes panelSlideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
      }
    }

    .panel-section {
      margin-bottom: 24px;
    }

    .panel-label {
      font-size: 11px;
      font-weight: 600;
      color: rgba(0,0,0,0.35);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 6px;
    }

    .panel-value {
      font-size: 15px;
      color: #2a2a2a;
      padding: 10px 0;
      border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    .panel-input {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 8px;
      background: #f5f5f4;
      color: #2a2a2a;
      font-size: 14px;
      outline: none;
    }

    .panel-input:focus { border-color: rgba(0,0,0,0.3); }

    .panel-btn {
      padding: 10px 16px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      border: none;
      width: 100%;
    }

    .panel-btn-primary {
      background: #2a2a2a;
      color: #fff;
    }

    .panel-btn-primary:hover { opacity: 0.85; }
    .panel-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

    .panel-btn-danger {
      background: none;
      color: #ff6b6b;
      border: 1px solid rgba(255,107,107,0.3);
    }

    .panel-btn-danger:hover { background: rgba(255,107,107,0.06); }

    .panel-status {
      font-size: 12px;
      text-align: center;
      min-height: 16px;
      margin-top: 8px;
    }

    .development-data-tools {
      margin-top: 18px;
    }

    #members-panel.panel-overlay {
      z-index: 1100;
    }

    .development-data-tools-label {
      padding: 0 0 8px;
      color: rgba(0,0,0,0.4);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }

    .development-data-card {
      padding: 12px;
      border: 1px solid #eadfbe;
      border-radius: 10px;
      background: #faf7ef;
    }

    .development-data-card-title {
      display: flex;
      align-items: center;
      gap: 7px;
      color: #2a2a2a;
      font-size: 13px;
      font-weight: 700;
    }

    .development-data-card-title svg,
    .pull-production-data-btn svg {
      flex-shrink: 0;
    }

    .development-data-card-copy {
      margin: 5px 0 10px;
      color: rgba(0,0,0,0.52);
      font-size: 11px;
      line-height: 1.4;
    }

    .pull-production-data-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      min-height: 44px;
      padding: 10px 14px;
      border: 1px solid #b78118;
      border-radius: 8px;
      background: #fff;
      color: #8b5e08;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
    }

    .pull-production-data-btn:hover { background: #fffdf8; }
    .pull-production-data-btn:disabled { cursor: wait; opacity: 0.65; }
    .pull-production-data-btn.is-loading svg { animation: pullDataSpin 0.9s linear infinite; }

    @keyframes pullDataSpin {
      to { transform: rotate(360deg); }
    }

    .pull-production-data-status {
      min-height: 16px;
      margin-top: 8px;
      color: rgba(0,0,0,0.48);
      font-size: 11px;
      line-height: 1.4;
      text-align: center;
    }

    .member-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 0;
      border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    .member-info {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .member-name {
      font-size: 14px;
      font-weight: 600;
      color: #2a2a2a;
    }

    .member-email {
      font-size: 12px;
      color: rgba(0,0,0,0.4);
    }

    .member-role {
      font-size: 11px;
      color: rgba(0,0,0,0.5);
      background: rgba(0,0,0,0.05);
      padding: 2px 8px;
      border-radius: 4px;
      text-transform: capitalize;
    }

    .member-remove {
      background: none;
      border: none;
      color: rgba(0,0,0,0.2);
      cursor: pointer;
      font-size: 18px;
      padding: 4px 8px;
    }

    .member-remove:hover { color: #ff6b6b; }

    /* Fullscreen editor sliders — large touch-friendly thumbs */
    .fs-editor-slider::-webkit-slider-runnable-track {
      height: 4px;
      background: rgba(255,255,255,0.15);
      border-radius: 2px;
    }
    .fs-editor-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: #fff;
      border: none;
      margin-top: -12px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    }
    .fs-editor-slider::-moz-range-track {
      height: 4px;
      background: rgba(255,255,255,0.15);
      border-radius: 2px;
      border: none;
    }
    .fs-editor-slider::-moz-range-thumb {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: #fff;
      border: none;
      box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    }

/* SEO gap score badge — turns the bulk list into a triage queue.
   Colour is backed up by the number itself and a title tooltip listing the
   specific gaps, so it never communicates by colour alone. */
.seo-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  padding: 0.1rem 0.4rem;
  margin-right: 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
  cursor: help;
}
.seo-score-good { background: #dcfce7; color: #14532d; }
.seo-score-warn { background: #fef3c7; color: #78350f; }
.seo-score-bad  { background: #fee2e2; color: #7f1d1d; }

/* The product description is real body copy, not a one-liner — give it room
   so an operator can actually read what they are about to publish. */
.qseo-cn-new.tall { min-height: 7.5rem; }

/* Undo is the fast path to the newest revertible revision. History owns the
   longer list, but this familiar control remains one tap away. */
.qseo-undo-btn {
  margin-top: 0;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  min-height: 32px;
}
.qseo-undo-btn:disabled { opacity: 0.6; cursor: default; }

/* ── Live page: enrichment activity ──
   Mobile-first. Three small multiples rather than one chart per metric keeps
   each figure legible without one metric's scale swamping another, and colour
   is never the only signal — every series carries its number and its label. */
.enr-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 16px;
  margin: 0 0 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.enr-card--desktop-only { display: none; }
@media (min-width: 768px) {
  .enr-card--desktop-only:not([hidden]) { display: block; }
}
.enr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.enr-title { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; color: #1f2328; }
.enr-since { font-size: 12px; color: rgba(0,0,0,0.35); white-space: nowrap; }

.enr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.enr-stat {
  padding: 10px 10px 8px;
  border-radius: 10px;
  background: #fafbfc;
  border: 1px solid rgba(0,0,0,0.08);
  min-width: 0;
}
.enr-stat-label {
  font-size: 11px; font-weight: 600; line-height: 1.25;
  color: rgba(0,0,0,0.55);
  display: flex; align-items: center; gap: 5px;
}
.enr-swatch { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.enr-stat-num {
  font-size: 26px; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; margin-top: 4px; color: #1f2328;
}
.enr-stat-delta { font-size: 11px; font-weight: 650; color: #1a7f37; font-variant-numeric: tabular-nums; }

.enr-chart { margin-top: 16px; color: #1f2328; }
.enr-chart svg { display: block; width: 100%; height: 132px; }
.enr-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.enr-legend span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: rgba(0,0,0,0.55);
}
.enr-foot {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 11px; line-height: 1.4; color: rgba(0,0,0,0.35);
}

/* Desktop parity: same card, more room for the trend. */
@media (min-width: 700px) {
  .enr-stat-num { font-size: 30px; }
  .enr-chart svg { height: 190px; }
}
/* Technical SEO Health */
.technical-seo{width:100%}.tseo-wrap{max-width:1120px;margin:0 auto;padding:26px 20px 54px}.tseo-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}.tseo-eyebrow{font-size:11px;line-height:1.2;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:rgba(0,0,0,.46);margin-bottom:5px}.tseo-refresh{border:0;border-radius:10px;background:#282828;color:#fff;padding:11px 17px;font-size:13px;font-weight:750;cursor:pointer;white-space:nowrap}.tseo-refresh:disabled{opacity:.55;cursor:wait}.tseo-status{margin:18px 0 10px;padding:10px 12px;border-radius:10px;background:#edeae2;color:#57534d;font-size:12px}.tseo-panels{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:10px 0 16px}.tseo-panel{min-height:144px;border:1px solid #dedad1;border-radius:13px;background:#fff;padding:12px;box-shadow:0 1px 0 rgba(0,0,0,.025);overflow-wrap:anywhere}.tseo-panel h3{font-size:13px;line-height:1.2;margin:7px 0}.tseo-panel strong,.tseo-panel span{display:block}.tseo-panel strong{font-size:12px}.tseo-panel span{font-size:11px;line-height:1.35;color:#74706a;margin-top:4px}.tseo-panel .tseo-panel-remedy{margin-top:8px;color:#5f554b}.tseo-dot{width:7px;height:7px;border-radius:50%;background:#248a58;display:block}.tseo-dot.sampled{background:#bd7119}.tseo-dot.off{background:#94918b}.tseo-panel.not-connected{background:#faf9f6}.tseo-note,.tseo-empty{padding:14px;border:1px dashed #bcb6aa;border-radius:13px;background:#fbfaf7;color:#5c5852;font-size:13px}.tseo-queue-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin:24px 0 10px}.tseo-queue-head h2{font-size:20px;line-height:1.2;margin:0}.tseo-queue-head span{font-size:12px;color:#716d67;text-align:right}.tseo-finding{display:grid;grid-template-columns:44px minmax(0,1fr) 180px;gap:14px;padding:16px;margin-bottom:10px;border:1px solid #dedad1;border-radius:15px;background:#fff}.tseo-rank{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:#fff0e5;color:#a94713;font-weight:850}.tseo-kind{color:#8c481f;font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase}.tseo-finding h3{font-size:16px;line-height:1.35;margin:3px 0 6px}.tseo-detail{color:#66615b;margin:0 0 8px}.tseo-pages{margin:9px 0;color:#57524c}.tseo-pages summary{font-size:12px;font-weight:700;cursor:pointer}.tseo-pages ul{max-height:190px;overflow:auto;margin:7px 0 0;padding:0 0 0 18px}.tseo-pages li{padding:3px 0}.tseo-pages a{color:#215f8d;overflow-wrap:anywhere}.tseo-pages p{font-size:11px;color:#77716b}.tseo-fix{border-top:1px solid #eeeae2;margin-top:11px;padding-top:10px}.tseo-fix>strong{font-size:12px}.tseo-fix p{margin:3px 0 0}.tseo-risk{text-align:right}.tseo-risk strong,.tseo-risk span{display:block}.tseo-risk strong{font-size:22px;line-height:1.15}.tseo-risk span{font-size:11px;color:#6e6963}.tseo-risk em{display:inline-block;margin-top:12px;padding:5px 9px;border-radius:20px;background:#f1efe9;color:#625e58;font-size:11px;font-style:normal;font-weight:750}

@media(max-width:900px){.tseo-panels{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){.tseo-wrap{padding:20px 14px 88px}.tseo-head{display:block}.tseo-head .qseo-page-title{font-size:26px}.tseo-refresh{width:100%;margin-top:15px}.tseo-panels{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;padding-bottom:5px}.tseo-panel{min-width:158px;scroll-snap-align:start}.tseo-queue-head{align-items:flex-start}.tseo-finding{grid-template-columns:38px minmax(0,1fr);padding:14px 12px}.tseo-risk{grid-column:2;text-align:left;display:grid;grid-template-columns:auto 1fr;gap:0 8px;align-items:baseline}.tseo-risk strong{font-size:19px}.tseo-risk span{align-self:center}.tseo-risk em{grid-column:1/-1;width:max-content}.tseo-pages ul{max-height:150px}.tseo-empty{font-size:13px}}
