/* Scenario Generator — dense tool deck (first screen = config) */
.sg-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.15rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.sg-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.75rem;
  padding: 0 0 0.35rem;
  border-bottom: 1px solid var(--line);
}

.sg-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--chrome-title-strong);
  line-height: 1.2;
}

.sg-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.sg-config-deck {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.sg-scenario-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.sg-seg {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  border-radius: 4px;
  padding: 0.22rem 0.55rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 560;
  cursor: pointer;
  line-height: 1.3;
}

.sg-seg:hover {
  border-color: var(--btn-hover-bd);
  color: var(--ink);
  background: var(--hover-bg);
}

.sg-seg.is-active {
  color: var(--chrome-pipe-active);
  border-color: var(--chrome-pipe-active-bd);
  background: var(--chrome-pipe-active-bg);
}

.sg-preview-deck {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sg-preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.sg-step-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.82rem;
  color: var(--chrome-title);
}

.sg-params {
  display: grid;
  gap: 0.4rem;
}

.sg-field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.35rem 0.45rem;
}

.sg-field {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.sg-field label {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.2;
}

.sg-field input,
.sg-field select {
  background: var(--board-input-bg);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 3px;
  padding: 0.28rem 0.4rem;
  font: inherit;
  font-size: 0.8rem;
  min-height: 1.7rem;
  box-sizing: border-box;
  width: 100%;
}

.sg-field input:focus,
.sg-field select:focus {
  outline: 2px solid rgba(58, 160, 232, 0.45);
  outline-offset: 1px;
}

.sg-field select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.sg-subhead {
  margin: 0.1rem 0 0;
  font-size: 0.72rem;
  color: var(--chrome-panel-title);
}

.sg-batch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.sg-batch-table th,
.sg-batch-table td {
  border: 1px solid var(--line);
  padding: 0.18rem 0.3rem;
  text-align: left;
}

.sg-batch-table th {
  background: var(--board-th-bg);
  color: var(--board-th);
  font-weight: 560;
}

.sg-batch-table input {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: 0;
  color: var(--ink);
  font: inherit;
  padding: 0.2rem;
}

.sg-wave-table .sg-wave-date-cell {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 7rem;
}

.sg-wave-table .sg-wave-qty-preview {
  white-space: nowrap;
  color: var(--chrome-panel-title);
  font-variant-numeric: tabular-nums;
}

.sg-wave-table .sg-posdd-eta {
  font-size: 0.68rem;
  color: var(--chrome-panel-title);
}

.sg-wave-table td.sg-wave--ibd,
.sg-wave-table .sg-wave-date-cell.sg-wave--ibd {
  border-left: 3px solid var(--chrome-pipe-active, #3d7ea6);
  background: color-mix(in srgb, var(--chrome-pipe-active, #3d7ea6) 10%, transparent);
}

.sg-wave-table td.sg-wave--gr,
.sg-wave-table .sg-wave-date-cell.sg-wave--gr {
  border-left: 3px solid #c45b4a;
  background: color-mix(in srgb, #c45b4a 9%, transparent);
}

.sg-wave-table .sg-wave-del {
  padding: 0.15rem 0.45rem;
  min-width: 1.6rem;
}

.sg-input-rand {
  display: flex;
  align-items: stretch;
  gap: 0.2rem;
  min-width: 0;
}

.sg-input-rand input {
  flex: 1;
  min-width: 0;
}

.sg-article-combobox {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
}

.sg-article-combobox input {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.sg-combobox-menu {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  max-height: 12rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.sg-combobox-menu.hidden {
  display: none;
}

.sg-combobox-item {
  display: block;
  width: 100%;
  padding: 0.25rem 0.45rem;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.sg-combobox-item:hover,
.sg-combobox-item.is-active {
  background: var(--accent-soft, rgba(0, 0, 0, 0.06));
}

.sg-combobox-empty {
  padding: 0.35rem 0.45rem;
  color: var(--muted);
  font-size: 0.85em;
}

.sg-rand-btn {
  flex: 0 0 auto;
  padding: 0.18rem 0.4rem;
  font-size: 0.68rem;
  line-height: 1.2;
}

.sg-size-manual {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.45rem;
}

.sg-size-manual .sg-subhead {
  margin: 0;
  width: 100%;
}

.sg-size-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.sg-size-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  padding: 0.1rem 0.2rem;
}

.sg-size-chip .sg-sz {
  width: 3.2rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.72rem;
  padding: 0.12rem;
}

.sg-size-chip .sg-szq {
  width: 3.4rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.72rem;
  padding: 0.12rem;
}

.sg-size-del {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.1rem 0.25rem;
}

.sg-size-del:hover {
  color: var(--err);
}

.sg-size-add {
  padding: 0.18rem 0.4rem;
  font-size: 0.68rem;
}

.sg-size-manual.is-readonly .sg-size-chip--ro {
  padding: 0.18rem 0.4rem;
  gap: 0.35rem;
}

.sg-sz-ro {
  font-size: 0.72rem;
  font-weight: 650;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink);
}

.sg-szq-ro {
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.sg-row-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.sg-row-actions .btn {
  padding: 0.22rem 0.5rem;
  font-size: 0.75rem;
}

.sg-check {
  margin: 0;
  font-size: 0.72rem;
  color: var(--ok);
  min-height: 1em;
}

.sg-check.is-bad {
  color: var(--err);
}

.sg-soft-warn {
  margin: 0.35rem 0 0;
  color: var(--warn, #a67c00);
  font-size: 0.72rem;
}

.sg-error {
  margin: 0.35rem 0 0;
  color: var(--err);
  font-size: 0.72rem;
}

.sg-view-toggle {
  display: flex;
  gap: 0.25rem;
  margin: 0;
}

.sg-tab {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 4px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}

.sg-tab.active {
  color: var(--chrome-pipe-active);
  border-color: var(--chrome-pipe-active-bd);
  background: var(--chrome-pipe-active-bg);
}

.sg-resolved {
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.sg-preview {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.sg-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.sg-payload-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  overflow: hidden;
}

.sg-payload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.sg-payload-head strong {
  font-size: 0.8rem;
}

.sg-payload-meta {
  color: var(--muted);
  font-size: 0.68rem;
  margin-left: 0.4rem;
}

.sg-payload-card pre {
  margin: 0;
  padding: 0.65rem 0.75rem;
  max-height: 220px;
  overflow: auto;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--board-soft);
  background: var(--board-formula-bg);
}

.sg-table-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sg-table-block > h3 {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--chrome-title);
}

.sg-wave-dates {
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  gap: 0.4rem 0.5rem;
}

.sg-wave-dates .sg-wave--ibd {
  padding: 0.28rem 0.35rem;
  border-radius: 3px;
  border-left: 3px solid var(--chrome-pipe-active, #3d7ea6);
  background: color-mix(in srgb, var(--chrome-pipe-active, #3d7ea6) 12%, transparent);
}

.sg-wave-dates .sg-wave--gr {
  padding: 0.28rem 0.35rem;
  border-radius: 3px;
  border-left: 3px solid #c45b4a;
  background: color-mix(in srgb, #c45b4a 10%, transparent);
}

.sg-wave-dates .sg-wave--ibd label {
  color: var(--chrome-pipe-active, #3d7ea6);
}

.sg-wave-dates .sg-wave--gr label {
  color: #c45b4a;
}

.sg-hint {
  margin: 0;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sg-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  border-left-width: 4px;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--line) 65%, transparent);
}

.sg-group-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 650;
  border-bottom: 1px solid var(--line);
  color: var(--chrome-title);
}

.sg-group-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.75rem;
}

.sg-group--prep {
  border-left-color: color-mix(in srgb, #6a8f71 85%, var(--line));
}
.sg-group--prep .sg-group-head {
  background: color-mix(in srgb, #6a8f71 14%, var(--surface));
}

.sg-group--init {
  border-left-color: color-mix(in srgb, #8b9aab 80%, var(--line));
}
.sg-group--init .sg-group-head {
  background: color-mix(in srgb, #8b9aab 14%, var(--surface));
}

.sg-payload-card.role-ctt-sql {
  border-left: 3px solid color-mix(in srgb, #6a8f71 90%, var(--line));
}

.sg-payload-card.role-ctt-sql .sg-sql-pre {
  max-height: 320px;
  white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.sg-group--wave-1 {
  border-left-color: color-mix(in srgb, #3aa0e8 85%, var(--line));
}
.sg-group--wave-1 .sg-group-head {
  background: color-mix(in srgb, #3aa0e8 16%, var(--surface));
}

.sg-group--wave-2 {
  border-left-color: color-mix(in srgb, #3dcd8d 85%, var(--line));
}
.sg-group--wave-2 .sg-group-head {
  background: color-mix(in srgb, #3dcd8d 14%, var(--surface));
}

.sg-group--wave-3 {
  border-left-color: color-mix(in srgb, #e0b84a 85%, var(--line));
}
.sg-group--wave-3 .sg-group-head {
  background: color-mix(in srgb, #e0b84a 14%, var(--surface));
}

.sg-group--wave-4 {
  border-left-color: color-mix(in srgb, #b478dc 85%, var(--line));
}
.sg-group--wave-4 .sg-group-head {
  background: color-mix(in srgb, #b478dc 14%, var(--surface));
}

.sg-payload-card.role-ibd {
  border-left: 3px solid color-mix(in srgb, #3aa0e8 90%, var(--line));
}
.sg-payload-card.role-gr {
  border-left: 3px solid color-mix(in srgb, #3dcd8d 90%, var(--line));
}
.sg-payload-card.role-line,
.sg-payload-card.role-mapping {
  border-left: 3px solid color-mix(in srgb, #8b9aab 80%, var(--line));
}

.sg-posdd-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.65rem;
  background: var(--surface-3);
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
}

.sg-posdd-row label {
  color: var(--muted);
}

.sg-date-step {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}

.sg-date-step input {
  width: 7.5rem;
  min-width: 0;
  background: var(--board-input-bg);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 4px 0 0 4px;
  padding: 0.25rem 0.4rem;
  font: inherit;
}

.sg-date-step-btns {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-left: none;
  border-radius: 0 4px 4px 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}

.sg-date-step-btn {
  flex: 1;
  margin: 0;
  padding: 0 0.28rem;
  border: none;
  background: transparent;
  color: color-mix(in srgb, var(--ink) 42%, transparent);
  font: inherit;
  font-size: 0.65rem;
  line-height: 1;
  cursor: pointer;
  min-width: 1.1rem;
}

.sg-date-step-btn + .sg-date-step-btn {
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

.sg-date-step-btn:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--chrome-pipe-active) 12%, transparent);
}

.sg-date-step-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--chrome-pipe-active) 55%, transparent);
  outline-offset: -1px;
}

.sg-posdd-orig {
  color: var(--muted);
  font-size: 0.72rem;
}

.sg-posdd-eta {
  color: var(--muted);
}

.sg-history-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.35);
}

.sg-history-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  width: min(28rem, 100vw);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.65rem 0.7rem 0.85rem;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18);
  transform: translateX(0);
  transition: transform 0.18s ease;
}

.sg-history-drawer[hidden],
.sg-history-backdrop[hidden] {
  display: none !important;
}

.sg-history-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-shrink: 0;
}

.sg-history-close {
  min-width: 2rem;
  padding: 0.15rem 0.4rem;
  font-size: 1.1rem;
  line-height: 1;
}

.sg-history-cap {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.68rem;
  margin-left: 0.35rem;
}

.sg-history-save-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.sg-history-name-lab {
  font-size: 0.72rem;
  color: var(--muted);
}

.sg-history-name-input {
  flex: 1 1 8rem;
  min-width: 0;
  background: var(--board-input-bg);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 3px;
  padding: 0.28rem 0.4rem;
  font: inherit;
  font-size: 0.8rem;
}

.sg-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.sg-history-empty {
  margin: 0;
  padding: 0.35rem 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.sg-history-row {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  overflow: hidden;
}

.sg-history-row.is-open {
  border-color: var(--chrome-pipe-active-bd, var(--line));
}

.sg-history-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.4rem 0.45rem;
  cursor: pointer;
}

.sg-history-main {
  flex: 1 1 10rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.sg-history-rename {
  width: 100%;
  box-sizing: border-box;
  background: var(--board-input-bg);
  border: 1px solid transparent;
  color: var(--ink);
  border-radius: 3px;
  padding: 0.2rem 0.35rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.sg-history-rename:hover,
.sg-history-rename:focus {
  border-color: var(--line);
  outline: none;
}

.sg-history-meta {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.35;
  padding: 0 0.35rem;
}

.sg-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  flex-shrink: 0;
}

.sg-history-copy,
.sg-history-delete {
  padding: 0.2rem 0.45rem;
  font-size: 0.72rem;
}

.sg-history-body {
  border-top: 1px solid var(--line);
  padding: 0.4rem 0.45rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: min(55vh, 28rem);
  overflow: auto;
  background: var(--surface);
}

.sg-hist-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sg-hist-block-key {
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--chrome-title, var(--ink));
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}

.sg-hist-block-pre {
  margin: 0;
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--board-input-bg, var(--surface-2));
  color: var(--ink);
  font-size: 0.68rem;
  line-height: 1.35;
  overflow: auto;
  max-height: 14rem;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (prefers-reduced-motion: reduce) {
  .sg-history-drawer {
    transition: none;
  }
}

/* Delete confirm — reject stripe + monospace name (payload tool vernacular) */
.sg-delete-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: calc(100vw - 2rem);
}

.sg-delete-dialog::backdrop {
  background: rgba(8, 12, 18, 0.55);
  backdrop-filter: blur(2px);
}

.sg-delete-panel {
  position: relative;
  width: min(22rem, 100%);
  margin: 0 auto;
  padding: 1rem 1.05rem 0.95rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.sg-delete-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #c45b4a;
}

.sg-delete-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.sg-delete-title {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--chrome-title-strong, var(--ink));
  line-height: 1.3;
}

.sg-delete-name {
  margin: 0 0 0.55rem;
  padding: 0.4rem 0.5rem;
  border: 1px dashed var(--line);
  border-radius: 3px;
  background: var(--board-input-bg, var(--surface-2));
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}

.sg-delete-note {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
}

.sg-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

.sg-delete-confirm {
  background: #c45b4a;
  border-color: #b04e3f;
  color: #fff;
}

.sg-delete-confirm:hover,
.sg-delete-confirm:focus {
  background: #b04e3f;
  border-color: #9a4336;
  color: #fff;
}

.sg-receipt-deck {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.15rem 0 0.15rem 0.5rem;
  border-left: 3px solid #3d4f5f;
}

.sg-receipt-import {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  min-height: 1.6rem;
}

.sg-receipt-import-lab {
  flex: 0 0 auto;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #3d4f5f;
}

.sg-receipt-file {
  flex: 0 1 auto;
  max-width: 14rem;
  font-size: 0.72rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
}

.sg-import-status {
  margin: 0;
  flex: 1 1 8rem;
  font-size: 0.7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.sg-receipt-pick {
  gap: 0.35rem 0.5rem;
  margin: 0;
}

.sg-receipt-pick .sg-field {
  min-width: 9rem;
  flex: 1 1 10rem;
}

.sg-receipt-pick .sg-field label {
  font-size: 0.65rem;
  margin-bottom: 0.1rem;
}

.sg-receipt-pick .sg-field input {
  padding: 0.28rem 0.4rem;
  font-size: 0.8rem;
}

.sg-receipt-summary {
  margin: 0;
  padding: 0.4rem 0.5rem 0.45rem;
  background: color-mix(in srgb, #3d4f5f 5%, var(--surface));
  border: 1px solid var(--line);
  border-radius: 4px;
}

.sg-receipt-empty {
  margin: 0;
  font-size: 0.7rem;
  color: var(--muted);
}

.sg-receipt-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  padding-bottom: 0.35rem;
  margin-bottom: 0.3rem;
  border-bottom: 1px solid var(--line);
}

.sg-receipt-stat {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.sg-receipt-lab {
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}

.sg-receipt-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--chrome-title-strong);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  word-break: break-all;
}

.sg-receipt-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.65rem;
  row-gap: 0.22rem;
  margin: 0;
  align-items: baseline;
}

.sg-receipt-dl dt {
  margin: 0;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.sg-receipt-dl dd {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--ink);
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.sg-receipt-dl dd.is-wide {
  grid-column: 2 / -1;
}

.sg-receipt-sizes {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.4rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}

.sg-receipt-size-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.sg-receipt-size-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  line-height: 1.3;
  padding: 0.12rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .sg-delete-dialog::backdrop {
    backdrop-filter: none;
  }
}
