.commerce-state-panel { min-height: 280px; padding: 28px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); }
.commerce-state-panel > i { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #ffb2b2; background: rgba(255, 112, 112, .12); font-size: 20px; }
.commerce-state-panel strong { display: block; }
.commerce-state-panel p { margin: 5px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.commerce-retry { min-height: 44px; }
.commerce-workspace { min-width: 0; }
.commerce-background { min-width: 0; display: grid; gap: 16px; }
.commerce-modal-isolated { pointer-events: none !important; user-select: none; }
.commerce-workspace .page-intro { display: none; }
.commerce-workspace button { min-height: 44px; }
.commerce-workspace .icon-button { min-width: 44px; }
.commerce-workspace :focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 78%, white); outline-offset: 2px; }
.merchant-main:focus-visible:has(.commerce-workspace) {
  outline: 2px solid color-mix(in srgb, var(--accent) 46%, transparent);
  outline-offset: -2px;
}

.commerce-section-nav {
  position: sticky;
  top: var(--merchant-topbar-height);
  z-index: 18;
  min-width: 0;
  margin: 0 0 20px;
  display: flex;
  gap: 44px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .12);
  scrollbar-width: none;
}
.commerce-section-nav::-webkit-scrollbar { display: none; }
.commerce-section-nav button {
  position: relative;
  flex: 0 0 auto;
  min-height: 48px;
  border: 0;
  padding: 0 2px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}
.commerce-section-nav button::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: transparent;
}
.commerce-section-nav button:hover { color: var(--text); }
.commerce-section-nav button[aria-current="page"] { color: var(--accent); font-weight: 750; }
.commerce-section-nav button[aria-current="page"]::after { background: var(--accent); }
.commerce-section-view { min-width: 0; }

.commerce-overview { display: grid; gap: 16px; }
.commerce-overview-status {
  min-width: 0;
  min-height: 122px;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  border: 1px solid rgba(55,198,138,.24);
  border-radius: var(--radius-card);
  background: rgba(55,198,138,.055);
}
.commerce-overview-status.needs-action { border-color: rgba(243,182,88,.26); background: rgba(243,182,88,.055); }
.commerce-overview-status > i {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--success);
  background: rgba(55,198,138,.12);
  font-size: 27px;
}
.commerce-overview-status.needs-action > i { color: var(--warning); background: rgba(243,182,88,.12); }
.commerce-overview-status h2 { margin: 0 0 5px; font-size: 17px; letter-spacing: -.02em; }
.commerce-overview-status p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.commerce-overview-metrics {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
  background: var(--surface);
}
.commerce-overview-metrics > div {
  min-width: 0;
  min-height: 128px;
  padding: 17px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-content: center;
  column-gap: 11px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.commerce-overview-metrics > div + div { border-inline-start: 1px solid var(--line-soft); }
.commerce-overview-metrics i {
  grid-row: 1 / span 3;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 18px;
}
.commerce-overview-metrics .has-warning i { color: var(--warning); background: rgba(243,182,88,.1); }
.commerce-overview-metrics span { color: var(--muted); font-size: 12px; }
.commerce-overview-metrics strong {
  margin: 7px 0 5px;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(22px, 2vw, 28px);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.commerce-overview-metrics small { color: var(--muted-2); font-size: 10px; }

.commerce-overview-body {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(300px, .78fr) minmax(520px, 1.72fr);
  gap: 16px;
  align-items: start;
}
.commerce-overview-readiness,
.commerce-overview-orders {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}
.commerce-overview-readiness > header,
.commerce-overview-orders > header {
  min-height: 68px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.commerce-overview-readiness h3,
.commerce-overview-orders h3 { margin: 0 0 4px; font-size: 15px; }
.commerce-overview-readiness p,
.commerce-overview-orders p { margin: 0; color: var(--muted); font-size: 10px; }
.commerce-overview-readiness header button,
.commerce-overview-orders header button,
.commerce-overview-table-row button {
  border: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}
.commerce-overview-readiness ul { margin: 0; padding: 4px 18px 8px; list-style: none; }
.commerce-overview-check {
  min-width: 0;
  min-height: 62px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line-soft);
}
.commerce-overview-check:last-child { border-bottom: 0; }
.commerce-overview-check > i { color: var(--muted-2); font-size: 19px; }
.commerce-overview-check.complete > i { color: var(--success); }
.commerce-overview-check > span { min-width: 0; display: grid; gap: 4px; }
.commerce-overview-check strong { font-size: 12px; }
.commerce-overview-check small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.commerce-overview-check em { color: var(--muted); font-size: 10px; font-style: normal; }
.commerce-overview-check.complete em { color: var(--success); }

.commerce-overview-table { min-width: 0; overflow-x: auto; }
.commerce-overview-table-head,
.commerce-overview-table-row {
  min-width: 650px;
  display: grid;
  grid-template-columns: minmax(160px, 1.35fr) minmax(145px, 1fr) minmax(90px, .65fr) minmax(90px, .7fr) 54px;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
}
.commerce-overview-table-head { min-height: 38px; color: var(--muted-2); background: rgba(255,255,255,.018); font-size: 10px; }
.commerce-overview-table-row { min-height: 56px; border-top: 1px solid var(--line-soft); }
.commerce-overview-table-row strong { overflow-wrap: anywhere; font-size: 11px; }
.commerce-overview-table-row time { color: var(--muted); font-size: 10px; }
.commerce-overview-table-row b { color: var(--text); font-size: 12px; font-variant-numeric: tabular-nums; }
.commerce-overview-order-status { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.commerce-overview-order-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--warning); }
.commerce-overview-empty { min-height: 150px; display: grid; place-content: center; justify-items: center; gap: 5px; color: var(--muted); text-align: center; }
.commerce-overview-empty > i { color: var(--accent); font-size: 24px; }
.commerce-overview-empty strong { color: var(--text); font-size: 12px; }
.commerce-overview-empty span { font-size: 10px; }
.commerce-overview-quick-actions {
  padding: 14px 18px 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  border-top: 1px solid var(--line-soft);
}
.commerce-overview-quick-actions button {
  min-width: 0;
  min-height: 60px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  color: var(--muted);
  background: rgba(255,255,255,.014);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}
.commerce-overview-quick-actions button:hover { border-color: #36536f; color: var(--text); background: rgba(255,255,255,.035); }
.commerce-overview-quick-actions i { color: var(--accent); font-size: 17px; }

.commerce-readiness-panel { min-width: 0; overflow: hidden; }
.commerce-readiness { padding: 16px 20px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.commerce-readiness-item { min-width: 0; padding: 12px; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 3px 8px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255,255,255,.018); }
.commerce-readiness-item > i { grid-row: 1 / span 2; color: var(--muted-2); font-size: 18px; }
.commerce-readiness-item.complete > i { color: var(--success); }
.commerce-readiness-item span, .commerce-readiness-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.commerce-readiness-item span { font-size: 12px; font-weight: 700; }
.commerce-readiness-item small { color: var(--muted); font-size: 10px; }
.commerce-manual-checks { padding: 0 20px 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.commerce-manual-checks > div { min-width: 0; min-height: 48px; padding: 10px 12px; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 2px 7px; border: 1px dashed #35516d; border-radius: 10px; color: var(--muted); }
.commerce-manual-checks i { grid-row: 1 / span 2; color: var(--accent); }
.commerce-manual-checks span { overflow-wrap: anywhere; font-size: 11px; font-weight: 650; }
.commerce-manual-checks small { color: var(--muted-2); font-size: 9px; }

.commerce-settings-layout { min-width: 0; display: grid; grid-template-columns: minmax(560px, 1fr) minmax(424px, 454px); align-items: start; gap: 16px; }
.commerce-settings-layout.commerce-config-layout { grid-template-columns: minmax(0, 920px); justify-content: start; }
.commerce-settings-main { min-width: 0; display: grid; gap: 14px; }
.commerce-settings-section { min-width: 0; overflow: hidden; }
.commerce-settings-section .section-title > div { min-width: 0; }
.commerce-settings-section .section-title button { min-height: 44px; flex: 0 0 auto; }
.commerce-form-grid { padding: 18px 20px 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 14px; }
.commerce-field { min-width: 0; display: grid; align-content: start; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 650; }
.commerce-field > span { overflow-wrap: anywhere; }
.commerce-field input, .commerce-field textarea, .commerce-field select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-control); padding: 10px 12px; color: var(--text); background: #081321; }
.commerce-field textarea { resize: vertical; }
.commerce-field input:hover, .commerce-field textarea:hover, .commerce-field select:hover { border-color: #36536f; }
.commerce-field input:disabled, .commerce-field textarea:disabled, .commerce-field select:disabled, .commerce-workspace button:disabled { cursor: not-allowed; opacity: .55; }
.commerce-span-2 { grid-column: 1 / -1; }
.commerce-field-action { align-content: end; }
.commerce-field-action button { min-height: 44px; }
.commerce-inline-status { min-height: 18px; padding: 0 20px 16px; color: #ff9da2; font-size: 12px; }
.commerce-legal-fields { min-width: 0; margin: 4px 0 2px; padding: 0; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
.commerce-legal-heading { padding: 14px 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: rgba(255,255,255,.018); border-bottom: 1px solid var(--line-soft); }
.commerce-legal-heading > div { min-width: 0; }
.commerce-legal-heading legend { padding: 0; color: var(--text); font-size: 13px; font-weight: 700; }
.commerce-legal-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.commerce-legal-badge { flex: 0 0 auto; min-height: 30px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.commerce-legal-badge.ready { color: #8de6b2; background: rgba(58,190,112,.12); border: 1px solid rgba(58,190,112,.3); }
.commerce-legal-badge.pending { color: #ffd18a; background: rgba(255,173,51,.1); border: 1px solid rgba(255,173,51,.28); }
.commerce-legal-grid { padding: 15px; }
.commerce-color-field { grid-template-columns: minmax(0, 1fr) 50px; align-items: center; }
.commerce-color-field > span { grid-column: 1 / -1; }
.commerce-color-field input[type="color"] { padding: 4px; }
.commerce-color-field code { color: var(--muted); font-size: 10px; }
.commerce-logo-field {
  min-width: 0;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}
.commerce-logo-field > img {
  width: 88px;
  height: 88px;
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #081321;
}
.commerce-logo-field > button { min-height: 44px; white-space: nowrap; }

.commerce-config-status { margin: 16px 20px 0; padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 14px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255,255,255,.018); }
.commerce-config-status > div { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.commerce-config-status strong { font-size: 12px; }
.commerce-config-status span, .commerce-config-status small { color: var(--muted); font-size: 11px; }
.commerce-config-status p { flex-basis: 100%; margin: 3px 0 0; color: #ff9da2; font-size: 11px; }
.commerce-complete-badge { display: inline-flex; align-items: center; gap: 5px; color: #8de6b2; font-size: 11px; }
.commerce-config-edit-button { margin-inline-start: auto; }
.commerce-config-unlock { flex: 1 0 100%; padding-top: 12px; display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 10px 12px; border-top: 1px solid var(--line-soft); }
.commerce-config-unlock > p { grid-column: 1 / -1; min-height: 16px; }
.commerce-config-source { min-width: 0; padding: 12px 14px; display: grid; gap: 5px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255,255,255,.018); }
.commerce-config-source span, .commerce-coordinate-result span, .commerce-coordinate-result small { color: var(--muted); font-size: 11px; }
.commerce-config-source strong { overflow-wrap: anywhere; color: var(--text); font-size: 12px; }
.commerce-location-section { padding-bottom: 20px; }
.commerce-location-section > .commerce-field, .commerce-location-section > .commerce-coordinate-result, .commerce-location-section > button { margin-inline: 20px; }
.commerce-location-section > .commerce-field { margin-top: 18px; }
.commerce-coordinate-result { margin-top: 14px; padding: 12px 14px; display: grid; gap: 5px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255,255,255,.018); }
.commerce-coordinate-result strong { color: var(--text); font-size: 13px; overflow-wrap: anywhere; }
.commerce-location-section > button { margin-top: 14px; }
.commerce-validate-row { margin-top: -14px; padding: 15px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius-card) var(--radius-card); background: var(--surface-2); }
.commerce-validate-row button { min-height: 44px; }
.commerce-validate-row p { grid-column: 1 / -1; margin: -4px 0 0; color: var(--muted-2); font-size: 10px; }
.commerce-choice { min-width: 0; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; }
.commerce-choice legend { padding: 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.commerce-choice label { min-height: 44px; margin-inline-end: 20px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; }
.commerce-choice input { width: 18px; height: 18px; accent-color: var(--accent); }
.commerce-mode-fields { min-width: 0; padding: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255,255,255,.014); }
.commerce-action-pair { display: flex; flex-wrap: wrap; gap: 10px; }
.commerce-action-pair button { min-height: 44px; }
.commerce-map-actions .commerce-touch { min-width: 44px; min-height: 44px; }

.commerce-package-panel { min-width: 0; overflow: hidden; }
.commerce-package-toolbar { padding: 16px 20px; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(170px, 240px); gap: 12px; border-bottom: 1px solid var(--line-soft); }
.commerce-package-list { padding: 18px 20px 20px; display: grid; gap: 12px; }
.commerce-package-card { min-width: 0; display: flex; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 13px; background: rgba(255,255,255,.018); }
.commerce-package-cover { flex: 0 0 180px; min-height: 166px; overflow: hidden; background: #081321; }
.commerce-package-cover img { width: 100%; height: 100%; object-fit: cover; }
.commerce-package-body { min-width: 0; flex: 1 1 auto; padding: 16px; display: grid; align-content: start; gap: 13px; }
.commerce-package-heading { min-width: 0; display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.commerce-package-heading > div:first-child { min-width: 0; }
.commerce-package-heading h3 { margin: 7px 0 3px; overflow-wrap: anywhere; font-size: 16px; }
.commerce-package-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.commerce-package-status { display: inline-flex; min-height: 24px; align-items: center; border-radius: 999px; padding: 0 9px; color: var(--muted); background: rgba(255,255,255,.06); font-size: 10px; font-weight: 750; }
.commerce-package-status.status-published { color: #9ce7b1; background: rgba(71,201,112,.12); }
.commerce-package-status.status-archived { color: #a9b6c5; background: rgba(169,182,197,.08); }
.commerce-package-price { flex: 0 0 auto; display: grid; justify-items: end; gap: 3px; }
.commerce-package-price strong { color: var(--accent); font-size: 19px; }
.commerce-package-price del { color: var(--muted-2); font-size: 11px; }
.commerce-package-metrics { display: flex; flex-wrap: wrap; gap: 8px; }
.commerce-package-metrics span { min-height: 30px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-soft); border-radius: 9px; padding: 0 10px; color: var(--muted); font-size: 11px; }
.commerce-package-metrics b { color: var(--text); }
.commerce-package-meta { min-width: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted-2); font-size: 10px; }
.commerce-package-meta span { min-width: 0; overflow-wrap: anywhere; }
.commerce-package-meta i { margin-inline-end: 4px; }
.commerce-package-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.commerce-package-actions button { min-height: 44px; }
.commerce-package-empty { min-height: 220px; padding: 30px 20px; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; color: var(--muted); }
.commerce-package-empty > i { color: var(--accent); font-size: 28px; }
.commerce-package-empty strong { color: var(--text); }
.commerce-package-empty p { margin: 0 0 7px; font-size: 12px; }
.commerce-package-skeleton { min-height: 220px; padding: 30px 20px; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--muted); }
.commerce-package-skeleton span { width: min(420px, 90%); height: 12px; border-radius: 999px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.1), rgba(255,255,255,.04)); }
.commerce-package-skeleton span:nth-child(2) { width: min(340px, 76%); }
.commerce-package-skeleton span:nth-child(3) { width: min(280px, 62%); }
.commerce-package-skeleton strong { margin-top: 5px; font-size: 12px; }

.commerce-package-dialog { width: min(900px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 16px; color: var(--text); background: var(--surface); box-shadow: 0 28px 80px rgba(0,0,0,.54); }
.commerce-package-dialog::backdrop { background: rgba(2,8,15,.7); }
.commerce-package-dialog form { min-width: 0; }
.commerce-package-dialog header, .commerce-package-dialog footer { position: sticky; z-index: 2; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: color-mix(in srgb, var(--surface) 94%, black); }
.commerce-package-dialog header { top: 0; border-bottom: 1px solid var(--line); }
.commerce-package-dialog footer { bottom: 0; justify-content: flex-end; border-top: 1px solid var(--line); }
.commerce-package-dialog header h2 { margin: 0 0 4px; font-size: 17px; }
.commerce-package-dialog header p { margin: 0; color: var(--muted); font-size: 11px; }
.commerce-package-editor-grid { padding: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 14px; }
.commerce-package-validity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.commerce-package-validity[hidden] { display: none; }
.commerce-package-media-order { display: grid; gap: 8px; }
.commerce-package-media-order > span { color: var(--muted); font-size: 12px; font-weight: 650; }
.commerce-package-media-list { margin: 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.commerce-package-media-item { min-width: 0; min-height: 64px; padding: 8px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255,255,255,.018); }
.commerce-package-media-item > img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.commerce-package-media-item > span { min-width: 0; display: grid; gap: 3px; }
.commerce-package-media-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.commerce-package-media-item small { color: var(--muted-2); font-size: 10px; }
.commerce-package-media-item > div { display: flex; gap: 4px; }
.commerce-package-media-item .icon-button { min-width: 44px; min-height: 44px; }
.commerce-package-media-empty { margin: 0; padding: 18px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted-2); text-align: center; font-size: 11px; }
.commerce-package-editor-error { margin: 0; padding: 0 20px 16px; color: #ff9da2; font-size: 12px; }

.commerce-touch { min-width: 44px; min-height: 44px; }
.commerce-order-panel, .commerce-redemption-panel { min-width: 0; overflow: hidden; }
.commerce-order-filters { padding: 16px 20px; display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)) auto; align-items: end; gap: 12px; border-bottom: 1px solid var(--line-soft); }
.commerce-order-list { padding: 18px 20px 20px; display: grid; gap: 10px; }
.commerce-order-card { min-width: 0; padding: 14px; display: grid; grid-template-columns: minmax(220px, 1.2fr) minmax(300px, 1fr) auto; align-items: center; gap: 18px; border: 1px solid var(--line-soft); border-radius: 13px; background: rgba(255,255,255,.018); }
.commerce-order-card h3 { margin: 7px 0 3px; overflow-wrap: anywhere; font-size: 14px; }
.commerce-order-card p { margin: 0; color: var(--muted); font-size: 11px; }
.commerce-order-card dl { min-width: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.commerce-order-card dl div { min-width: 0; display: grid; gap: 4px; }
.commerce-order-card dt { color: var(--muted-2); font-size: 10px; }
.commerce-order-card dd { margin: 0; overflow-wrap: anywhere; color: var(--text); font-size: 11px; }
.commerce-order-status { display: inline-flex; min-height: 24px; align-items: center; border-radius: 999px; padding: 0 9px; color: #9ce7b1; background: rgba(71,201,112,.12); font-size: 10px; font-weight: 750; }
.commerce-order-state { min-height: 180px; padding: 30px 20px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); text-align: center; }
.commerce-order-state > i { color: var(--accent); font-size: 28px; }
.commerce-order-state strong, .commerce-order-state h2 { margin: 0; color: var(--text); }
.commerce-order-state p { margin: 0 0 6px; font-size: 12px; }
.commerce-operation-warning, .commerce-operation-error { margin: 14px 20px 0; padding: 11px 13px; border-radius: 10px; font-size: 12px; }
.commerce-operation-warning { border: 1px solid rgba(244,188,85,.28); color: #f5ca77; background: rgba(244,188,85,.08); }
.commerce-operation-error { border: 1px solid rgba(240,113,120,.28); color: #ff9da2; background: rgba(240,113,120,.08); }
.commerce-order-dialog { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 16px; color: var(--text); background: var(--surface); box-shadow: 0 28px 80px rgba(0,0,0,.54); }
.commerce-order-dialog-state .commerce-order-state { min-height: 220px; }
.commerce-order-dialog::backdrop { background: rgba(2,8,15,.7); }
.commerce-order-dialog-card > header, .commerce-order-dialog-card > footer { position: sticky; z-index: 2; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: color-mix(in srgb, var(--surface) 94%, black); }
.commerce-order-dialog-card > header { top: 0; border-bottom: 1px solid var(--line); }
.commerce-order-dialog-card > footer { bottom: 0; border-top: 1px solid var(--line); }
.commerce-order-dialog-card header h2 { margin: 6px 0 3px; overflow-wrap: anywhere; font-size: 17px; }
.commerce-order-dialog-card header p, .commerce-order-dialog-card footer > span { margin: 0; color: var(--muted); font-size: 11px; }
.commerce-order-dialog-card footer > div { display: flex; flex-wrap: wrap; gap: 8px; }
.commerce-order-detail-grid { padding: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.commerce-order-detail-grid > section { min-width: 0; padding: 15px; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(255,255,255,.014); }
.commerce-order-detail-grid > section:last-child { grid-column: 1 / -1; }
.commerce-order-detail-grid h3 { margin: 0 0 12px; font-size: 13px; }
.commerce-detail-list { margin: 0; display: grid; gap: 9px; }
.commerce-detail-list > div { min-width: 0; display: grid; grid-template-columns: minmax(90px, .35fr) minmax(0, 1fr); gap: 12px; }
.commerce-detail-list dt { color: var(--muted-2); font-size: 10px; }
.commerce-detail-list dd { margin: 0; overflow-wrap: anywhere; font-size: 11px; }
.commerce-voucher-list, .commerce-order-timeline { margin: 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.commerce-voucher-list li { min-width: 0; min-height: 44px; padding: 8px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; border: 1px solid var(--line-soft); border-radius: 9px; }
.commerce-voucher-list span, .commerce-voucher-list strong { overflow-wrap: anywhere; font-size: 11px; }
.commerce-voucher-list small { color: var(--muted-2); font-size: 10px; }
.commerce-order-timeline li { min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; }
.commerce-order-timeline i { color: var(--accent); }
.commerce-order-timeline li > div { min-width: 0; display: flex; justify-content: space-between; gap: 12px; }
.commerce-order-timeline strong, .commerce-order-timeline time { overflow-wrap: anywhere; font-size: 11px; }
.commerce-order-timeline time { color: var(--muted-2); }
.commerce-voucher-form { padding: 16px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.commerce-verified-voucher { margin: 0 20px 20px; padding: 15px; display: grid; grid-template-columns: minmax(190px, 1fr) minmax(280px, 1.4fr) auto; align-items: center; gap: 18px; border: 1px solid var(--line-soft); border-radius: 13px; background: rgba(255,255,255,.018); }
.commerce-verified-voucher h3 { margin: 7px 0 3px; font-size: 15px; }
.commerce-verified-voucher p { margin: 0; color: var(--muted); font-size: 11px; }
.commerce-verified-voucher dl { margin: 0; display: grid; gap: 6px; }
.commerce-verified-voucher dl div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; }
.commerce-verified-voucher dt { color: var(--muted-2); font-size: 10px; }
.commerce-verified-voucher dd { margin: 0; overflow-wrap: anywhere; font-size: 11px; }
.commerce-redemption-result { margin: 0 20px 20px; padding: 13px 15px; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; border: 1px solid rgba(71,201,112,.25); border-radius: 12px; background: rgba(71,201,112,.08); }
.commerce-redemption-result > i { color: #9ce7b1; font-size: 20px; }
.commerce-redemption-result strong { font-size: 12px; }
.commerce-redemption-result p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.commerce-redeemer-management { margin-top: 18px; }
.commerce-redeemer-management > .section-title { padding-inline: 20px; }
.commerce-redeemer-grid { display: grid; grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr); gap: 16px; }
.commerce-binding-card { min-height: 260px; padding: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.commerce-card-icon { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(49,196,224,.28); border-radius: 14px; color: var(--accent); background: rgba(49,196,224,.08); }
.commerce-card-icon i { font-size: 23px; }
.commerce-binding-card h3, .commerce-redeemer-card h3 { margin: 0 0 5px; font-size: 15px; }
.commerce-binding-card p, .commerce-redeemer-card header p, .commerce-redeemer-state p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.commerce-binding-card > button { margin-top: auto; width: 100%; }
.commerce-binding-code { display: grid; gap: 8px; }
.commerce-binding-code strong { color: var(--text); font-size: clamp(28px, 4vw, 38px); letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.commerce-binding-code span { color: #9ce7b1; font-size: 11px; }
.commerce-binding-expired { color: #ffc4c4 !important; }
.commerce-redeemer-card { min-width: 0; overflow: hidden; }
.commerce-redeemer-card > header { padding: 18px 20px 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); }
.commerce-redeemer-list { display: grid; }
.commerce-redeemer-row { min-width: 0; padding: 14px 20px; display: grid; grid-template-columns: 38px minmax(110px, .7fr) minmax(220px, 1.25fr) auto auto; align-items: center; gap: 12px; border-top: 1px solid var(--line-soft); }
.commerce-redeemer-row:first-child { border-top: 0; }
.commerce-redeemer-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--text); background: #13243a; }
.commerce-redeemer-row > div:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.commerce-redeemer-row > div:nth-child(2) strong { overflow-wrap: anywhere; font-size: 12px; }
.commerce-redeemer-row > div:nth-child(2) span { color: var(--muted); font-size: 10px; }
.commerce-redeemer-row dl { min-width: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.commerce-redeemer-row dl div { min-width: 0; }
.commerce-redeemer-row dt { color: var(--muted-2); font-size: 9px; }
.commerce-redeemer-row dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 10px; }
.commerce-redeemer-status { min-width: 56px; padding: 5px 8px; border-radius: 999px; text-align: center; font-size: 10px; }
.commerce-redeemer-status.active { color: #9ce7b1; background: rgba(71,201,112,.1); }
.commerce-redeemer-status.disabled { color: #ffc4c4; background: rgba(255,83,83,.09); }
.commerce-redeemer-actions { display: flex; gap: 7px; }
.commerce-redeemer-actions button { min-height: 44px; padding-inline: 10px; }
.commerce-redeemer-state { min-height: 180px; padding: 24px; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; color: var(--muted); }
.commerce-redeemer-state > i { color: var(--accent); font-size: 26px; }

.commerce-preview-column { position: sticky; top: calc(var(--merchant-topbar-height) + 16px); min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-card); background: #081321; }
.commerce-preview-heading { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.commerce-preview-heading h2 { margin: 0 0 4px; font-size: 15px; }
.commerce-preview-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.commerce-preview-heading > i { color: var(--accent); font-size: 22px; }
.commerce-preview-status { min-height: 28px; margin: -5px 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.commerce-preview-status-error { padding: 7px 9px; border: 1px solid rgba(255,111,111,.28); border-radius: 8px; color: #ffc4c4; background: rgba(255,83,83,.08); }
.commerce-preview-status button { min-height: 30px; border: 1px solid var(--line); border-radius: 7px; padding: 0 11px; color: var(--text); background: #102036; cursor: pointer; }
.commerce-phone { width: min(390px, 100%); margin: 6px auto; aspect-ratio: 390 / 844; overflow: hidden; border-radius: 22px; outline: 6px solid #172a40; color: var(--preview-text); background: var(--preview-surface); box-shadow: 0 24px 54px rgba(0,0,0,.36); container-type: inline-size; }
.commerce-phone-screen { width: 100%; height: 100%; min-height: 0; display: grid; grid-template-rows: 57% 8% minmax(0, 1fr) 7%; overflow: hidden; background: var(--preview-surface); }
.commerce-preview-hero { position: relative; min-height: 0; overflow: hidden; color: #fff; background: #1b2419; }
.commerce-preview-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.commerce-preview-media-placeholder { min-height: 0; display: grid; place-items: center; color: rgba(255,255,255,.48); background: linear-gradient(145deg, #243222, #10170f); }
.commerce-preview-hero > .commerce-preview-media-placeholder { position: absolute; inset: 0; }
.commerce-preview-media-placeholder i { font-size: clamp(22px, 8cqw, 34px); }
.commerce-preview-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,10,5,.52), rgba(6,8,4,.06) 42%, rgba(5,7,3,.88)); }
.commerce-preview-store { position: absolute; inset: 33px 22px auto; display: grid; gap: 5px; }
.commerce-preview-store strong { font-family: "Songti SC", "STSong", serif; font-size: clamp(17px, 5.1cqw, 20px); letter-spacing: .02em; }
.commerce-preview-store span { font-size: clamp(10px, 3.1cqw, 13px); }
.commerce-preview-offer { position: absolute; inset: auto 22px 16px; min-width: 0; }
.commerce-preview-offer h3 { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: clamp(26px, 7.2cqw, 29px); line-height: 1.12; letter-spacing: .02em; }
.commerce-preview-offer p { margin: 5px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255,255,255,.84); font-size: clamp(10px, 3.4cqw, 13px); }
.commerce-preview-offer > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.commerce-preview-offer > div > span { display: flex; align-items: baseline; gap: 9px; }
.commerce-preview-offer strong { color: var(--preview-accent); font-size: clamp(29px, 8.7cqw, 34px); font-weight: 500; }
.commerce-preview-offer del { color: rgba(255,255,255,.56); font-size: clamp(10px, 3cqw, 12px); }
.commerce-preview-offer button { min-height: 40px; border: 0; padding: 0 28px; color: #111; background: var(--preview-accent); font-size: clamp(11px, 3.6cqw, 14px); font-weight: 750; }
.commerce-preview-location { min-width: 0; padding: 0 22px; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto 32px; align-items: center; gap: 8px; border-bottom: 1px solid color-mix(in srgb, var(--preview-text) 12%, transparent); }
.commerce-preview-location i { color: var(--preview-brand); font-size: 18px; }
.commerce-preview-location > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(9px, 3.2cqw, 12px); }
.commerce-preview-location > b { display: flex; align-items: center; white-space: nowrap; color: var(--preview-brand); font-size: clamp(9px, 3.1cqw, 12px); font-weight: 500; }
.commerce-preview-location > b i { font-size: 14px; }
.commerce-preview-location > em { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--preview-brand) 34%, transparent); border-radius: 50%; font-style: normal; }
.commerce-preview-location > em i { font-size: 14px; }
.commerce-preview-more { min-height: 0; padding: 14px 20px 10px; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.commerce-preview-more > header { margin-bottom: 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.commerce-preview-more h3 { margin: 0; padding-inline-start: 9px; border-inline-start: 2px solid var(--preview-brand); font-family: "Songti SC", "STSong", serif; font-size: clamp(15px, 4.7cqw, 19px); }
.commerce-preview-more > header > span { display: flex; align-items: center; white-space: nowrap; color: color-mix(in srgb, var(--preview-text) 55%, transparent); font-size: clamp(8px, 2.7cqw, 11px); }
.commerce-preview-cards { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.commerce-preview-more article { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto auto auto; overflow: hidden; border-radius: 8px; background: color-mix(in srgb, var(--preview-surface) 96%, white); }
.commerce-preview-more article img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.commerce-preview-more article > .commerce-preview-media-placeholder { width: 100%; height: 100%; color: color-mix(in srgb, var(--preview-brand) 55%, transparent); background: color-mix(in srgb, var(--preview-brand) 9%, var(--preview-surface)); }
.commerce-preview-more article strong, .commerce-preview-more article span, .commerce-preview-more article b { margin-inline: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.commerce-preview-more article strong { margin-top: 7px; font-size: clamp(9px, 3.2cqw, 12px); }
.commerce-preview-more article span { margin-top: 3px; color: color-mix(in srgb, var(--preview-text) 62%, transparent); font-size: clamp(7px, 2.5cqw, 10px); }
.commerce-preview-more article b { margin-block: 4px 7px; color: var(--preview-brand); font-size: clamp(9px, 3.3cqw, 13px); }
.commerce-preview-empty { min-height: 0; padding: 24px 28px 18px; display: grid; place-content: center; justify-items: center; text-align: center; overflow: hidden; }
.commerce-preview-empty > i { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: var(--preview-brand); background: color-mix(in srgb, var(--preview-brand) 10%, transparent); font-size: 24px; }
.commerce-preview-empty h3 { margin: 12px 0 6px; font-family: "Songti SC", "STSong", serif; font-size: clamp(18px, 5.6cqw, 22px); }
.commerce-preview-empty > p { margin: 0; color: color-mix(in srgb, var(--preview-text) 62%, transparent); font-size: clamp(9px, 3cqw, 12px); line-height: 1.6; }
.commerce-preview-empty > div { width: 100%; margin-top: 16px; padding-top: 12px; display: grid; gap: 5px; border-top: 1px solid color-mix(in srgb, var(--preview-text) 10%, transparent); text-align: start; }
.commerce-preview-empty > div strong { color: var(--preview-brand); font-size: clamp(10px, 3.1cqw, 12px); }
.commerce-preview-empty > div span { overflow: hidden; color: color-mix(in srgb, var(--preview-text) 58%, transparent); font-size: clamp(8px, 2.6cqw, 10px); line-height: 1.5; }
.commerce-preview-spacer { min-height: 0; }
.commerce-preview-feedback { min-height: 0; padding: 28px; display: grid; place-content: center; justify-items: center; gap: 8px; color: color-mix(in srgb, var(--preview-text) 68%, transparent); text-align: center; }
.commerce-preview-feedback i { color: var(--preview-brand); font-size: 28px; }
.commerce-preview-feedback strong { color: var(--preview-text); font-size: 13px; }
.commerce-preview-feedback span { font-size: 10px; }
.commerce-preview-nav { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid color-mix(in srgb, var(--preview-text) 10%, transparent); background: color-mix(in srgb, var(--preview-surface) 96%, white); }
.commerce-preview-nav span { display: grid; place-content: center; justify-items: center; gap: 2px; color: color-mix(in srgb, var(--preview-text) 58%, transparent); font-size: clamp(8px, 1.5vw, 11px); }
.commerce-preview-nav span:first-child { color: var(--preview-brand); }
.commerce-preview-nav i { font-size: clamp(14px, 2.5vw, 19px); }

@media (max-width: 1180px) {
  .commerce-overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commerce-overview-metrics > div:nth-child(3) { border-inline-start: 0; }
  .commerce-overview-metrics > div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .commerce-overview-body { grid-template-columns: minmax(0, 1fr); }
  .commerce-readiness { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .commerce-order-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .commerce-order-card { grid-template-columns: minmax(200px, 1fr) minmax(260px, 1fr); }
  .commerce-order-card > button { grid-column: 1 / -1; justify-self: start; }
  .commerce-verified-voucher { grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.4fr); }
  .commerce-verified-voucher > button { grid-column: 1 / -1; justify-self: start; }
  .commerce-settings-layout { grid-template-columns: minmax(0, 1fr); }
  .commerce-preview-column { position: static; }
  .commerce-redeemer-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .commerce-section-nav { gap: 22px; }
  .commerce-overview-status { grid-template-columns: 54px minmax(0, 1fr); }
  .commerce-overview-status > button { grid-column: 1 / -1; width: 100%; }
  .commerce-overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commerce-overview-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commerce-state-panel { grid-template-columns: 40px minmax(0, 1fr); }
  .commerce-retry { grid-column: 1 / -1; width: 100%; }
  .commerce-readiness, .commerce-manual-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commerce-form-grid { grid-template-columns: minmax(0, 1fr); }
  .commerce-logo-field { grid-template-columns: 88px minmax(0, 1fr); }
  .commerce-logo-field > button { grid-column: 1 / -1; width: 100%; }
  .commerce-span-2 { grid-column: auto; }
  .commerce-mode-fields { grid-template-columns: minmax(0, 1fr); }
  .commerce-mode-fields.commerce-span-2 { grid-column: auto; }
  .commerce-validate-row { grid-template-columns: minmax(0, 1fr); }
  .commerce-field input, .commerce-field textarea, .commerce-field select { font-size: 16px; }
  .commerce-config-unlock { grid-template-columns: minmax(0, 1fr); }
  .commerce-config-unlock > p { grid-column: auto; }
  .commerce-package-toolbar, .commerce-package-editor-grid { grid-template-columns: minmax(0, 1fr); }
  .commerce-package-card { flex-direction: column; }
  .commerce-package-cover { flex-basis: auto; min-height: 190px; max-height: 260px; }
  .commerce-package-heading { gap: 10px; }
  .commerce-package-validity { grid-template-columns: minmax(0, 1fr); }
  .commerce-order-filters, .commerce-order-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .commerce-order-card { grid-template-columns: minmax(0, 1fr); }
  .commerce-order-card dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .commerce-order-card > button, .commerce-order-detail-grid > section:last-child { grid-column: auto; }
  .commerce-voucher-form, .commerce-verified-voucher { grid-template-columns: minmax(0, 1fr); }
  .commerce-verified-voucher > button { grid-column: auto; justify-self: stretch; }
  .commerce-order-dialog-card > footer { align-items: stretch; flex-direction: column; }
  .commerce-redeemer-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .commerce-redeemer-row dl { grid-column: 2 / -1; }
  .commerce-redeemer-actions { grid-column: 2 / -1; justify-content: flex-start; }
}

@media (max-width: 520px) {
  .commerce-section-nav { margin-inline: -14px; padding-inline: 14px; gap: 20px; }
  .commerce-section-nav button { min-height: 46px; font-size: 13px; }
  .commerce-overview-status { padding: 17px 15px; }
  .commerce-overview-metrics { grid-template-columns: minmax(0, 1fr); }
  .commerce-overview-metrics > div + div { border-inline-start: 0; border-top: 1px solid var(--line-soft); }
  .commerce-overview-metrics > div { min-height: 104px; }
  .commerce-overview-readiness > header,
  .commerce-overview-orders > header { align-items: flex-start; padding-inline: 14px; }
  .commerce-overview-readiness ul { padding-inline: 14px; }
  .commerce-overview-table-head { display: none; }
  .commerce-overview-table-row {
    min-width: 0;
    margin: 0 14px;
    padding: 12px 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
  }
  .commerce-overview-table-row time { grid-column: 1; }
  .commerce-overview-table-row b { grid-column: 2; grid-row: 1; text-align: right; }
  .commerce-overview-order-status { grid-column: 1; }
  .commerce-overview-table-row button { grid-column: 2; grid-row: 2 / span 2; }
  .commerce-overview-quick-actions { padding-inline: 14px; }
  .commerce-readiness, .commerce-manual-checks { grid-template-columns: minmax(0, 1fr); }
  .commerce-readiness, .commerce-manual-checks, .commerce-form-grid { padding-inline: 14px; }
  .commerce-settings-section .section-title { padding-inline: 14px; }
  .commerce-settings-section .section-title button { width: 100%; }
  .commerce-legal-heading { align-items: flex-start; flex-direction: column; }
  .commerce-config-status { margin-inline: 14px; }
  .commerce-location-section > .commerce-field, .commerce-location-section > .commerce-coordinate-result, .commerce-location-section > button { margin-inline: 14px; }
  .commerce-validate-row { padding-inline: 14px; }
  .commerce-action-pair { display: grid; }
  .commerce-preview-column { padding: 12px; }
  .commerce-phone { border-width: 4px; border-radius: 22px; }
  .commerce-package-toolbar, .commerce-package-list, .commerce-package-editor-grid { padding-inline: 14px; }
  .commerce-package-panel .section-title { padding-inline: 14px; }
  .commerce-package-panel .section-title button { width: 100%; }
  .commerce-package-heading { display: grid; }
  .commerce-package-price { justify-items: start; }
  .commerce-package-media-item { grid-template-columns: minmax(0, 1fr); }
  .commerce-package-media-item > img { width: 100%; height: 120px; }
  .commerce-package-media-item > div { justify-content: flex-start; }
  .commerce-order-filters, .commerce-order-list, .commerce-order-detail-grid, .commerce-voucher-form { padding-inline: 14px; }
  .commerce-order-panel .section-title, .commerce-redemption-panel .section-title { padding-inline: 14px; }
  .commerce-order-card dl { grid-template-columns: minmax(0, 1fr); }
  .commerce-verified-voucher, .commerce-redemption-result { margin-inline: 14px; }
  .commerce-redeemer-management > .section-title { padding-inline: 14px; }
  .commerce-redeemer-grid { gap: 12px; }
  .commerce-binding-card { min-height: 230px; padding: 18px 16px; }
  .commerce-redeemer-row { padding: 14px; grid-template-columns: 36px minmax(0, 1fr) auto; }
  .commerce-redeemer-row dl { grid-template-columns: minmax(0, 1fr); }
  .commerce-redeemer-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commerce-voucher-list li { grid-template-columns: minmax(0, 1fr); }
  .commerce-order-timeline li > div { display: grid; }
  .commerce-order-dialog-card > footer > div { display: grid; }
  .commerce-package-dialog, .commerce-order-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); margin: auto; border-radius: 12px; }
  .commerce-package-dialog header, .commerce-package-dialog footer,
  .commerce-order-dialog-card > header, .commerce-order-dialog-card > footer { padding-inline: 14px; }
  .commerce-package-dialog footer, .commerce-order-dialog-card > footer > div { width: 100%; }
  .commerce-package-dialog footer button, .commerce-order-dialog-card > footer button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .commerce-workspace *, .commerce-workspace *::before, .commerce-workspace *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media (forced-colors: active) {
  .commerce-readiness-item, .commerce-manual-checks > div, .commerce-phone { forced-color-adjust: auto; }
}

/* Commerce image library — reference option 1 */
.commerce-media-workspace { display: grid; gap: 22px; }
.commerce-media-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.commerce-media-header h2 { margin: 4px 0 6px; color: #f5f9ff; font-size: clamp(28px, 3vw, 42px); letter-spacing: -.04em; }
.commerce-media-header p { margin: 0; color: #8fa5be; }
.commerce-eyebrow { color: #32cae5; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.commerce-media-toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) 170px 170px; gap: 12px; }
.commerce-media-toolbar label { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 14px; border: 1px solid #233a55; border-radius: 10px; background: #0b1a2d; color: #728aa3; }
.commerce-media-toolbar input { width: 100%; border: 0; outline: 0; background: transparent; color: #ecf5ff; }
.commerce-media-toolbar select { min-height: 44px; padding: 0 12px; border: 1px solid #233a55; border-radius: 10px; background: #0b1a2d; color: #dbe8f5; }
.commerce-media-layout { display: grid; grid-template-columns: minmax(0, 72fr) minmax(280px, 28fr); gap: 20px; align-items: start; }
.commerce-media-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; min-height: 360px; }
.commerce-media-card { appearance: none; display: grid; align-content: start; min-width: 0; padding: 0; overflow: hidden; border: 1px solid #1d334c; border-radius: 12px; background: #0b1a2c; color: #eef7ff; text-align: left; cursor: pointer; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.commerce-media-card:hover { transform: translateY(-2px); border-color: #3e6c91; }
.commerce-media-card:focus-visible { outline: 3px solid #32cae5; outline-offset: 3px; }
.commerce-media-card.is-selected { border-color: #32cae5; box-shadow: 0 0 0 1px #32cae5, 0 16px 34px rgba(0, 0, 0, .24); }
.commerce-media-card-image { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #071321; }
.commerce-media-card-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.commerce-media-card-copy { display: grid; gap: 5px; padding: 12px; }
.commerce-media-card-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.commerce-media-card-copy small { color: #7890aa; }
.commerce-media-detail { position: sticky; top: 92px; display: grid; gap: 16px; padding: 16px; border: 1px solid #213852; border-radius: 14px; background: linear-gradient(180deg, #0d1d31, #091626); box-shadow: 0 18px 44px rgba(0, 0, 0, .2); }
.commerce-media-detail-preview { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 10px; background: #07111d; }
.commerce-media-detail-preview img { width: 100%; height: 100%; display: block; object-fit: contain; }
.commerce-media-detail-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.commerce-media-detail-heading span:first-child { color: #7890aa; font-size: 12px; }
.commerce-media-detail-heading h3 { margin: 4px 0 0; color: #f2f8ff; font-size: 18px; overflow-wrap: anywhere; }
.commerce-media-detail dl { display: grid; gap: 9px; margin: 0; }
.commerce-media-detail dl div { display: flex; justify-content: space-between; gap: 14px; color: #afc0d3; }
.commerce-media-detail dt { color: #6f879f; }
.commerce-media-detail dd { margin: 0; text-align: right; }
.commerce-media-references { padding: 14px; border: 1px solid #1c334d; border-radius: 10px; background: #081524; }
.commerce-media-references h4 { margin: 0 0 6px; color: #eef7ff; }
.commerce-media-references p { margin: 0 0 12px; color: #8da2b8; line-height: 1.55; }
.commerce-media-delete { width: 100%; }
.commerce-media-detail.is-empty, .commerce-media-empty { place-items: center; min-height: 360px; text-align: center; color: #8198af; }
.commerce-media-empty { grid-column: 1 / -1; padding: 48px 22px; border: 1px dashed #29425d; border-radius: 14px; background: rgba(8, 21, 36, .72); }
.commerce-media-empty i, .commerce-media-detail.is-empty i { color: #32cae5; font-size: 34px; }
.commerce-media-empty h3 { margin: 8px 0 0; color: #eaf5ff; }
.commerce-media-empty p { max-width: 520px; margin: 4px 0 18px; line-height: 1.65; }

@media (max-width: 1180px) {
  .commerce-media-layout { grid-template-columns: 1fr; }
  .commerce-media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .commerce-media-detail { position: relative; top: auto; grid-template-columns: minmax(180px, 260px) 1fr; }
  .commerce-media-detail-preview { grid-row: 1 / span 4; }
}
@media (max-width: 820px) {
  .commerce-media-header { align-items: stretch; flex-direction: column; }
  .commerce-media-toolbar { grid-template-columns: 1fr 1fr; }
  .commerce-media-toolbar label { grid-column: 1 / -1; }
  .commerce-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commerce-media-detail { grid-template-columns: 1fr; }
  .commerce-media-detail-preview { grid-row: auto; max-height: 480px; }
}
@media (max-width: 520px) {
  .commerce-media-toolbar { grid-template-columns: 1fr; }
  .commerce-media-toolbar label { grid-column: auto; }
  .commerce-media-grid { grid-template-columns: 1fr; }
  .commerce-media-card { grid-template-columns: 104px minmax(0, 1fr); align-items: center; }
  .commerce-media-card-image { aspect-ratio: 4 / 5; }
}
