:root {
  --paper: #f6f1e8;
  --panel: #fffaf1;
  --ink: #1f2522;
  --muted: #66706a;
  --line: #d8ccbb;
  --teal: #0d7b76;
  --teal-dark: #075551;
  /* Dark background: shared brand surface for high-contrast feature areas. */
  --dark-surface: #173a35;
  --amber: #b66a12;
  --red: #b94135;
  --blue: #315c9d;
  --shadow: 0 18px 48px rgba(38, 31, 21, 0.12);
  --radius: 8px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(31, 37, 34, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(31, 37, 34, 0.025) 1px, transparent 1px), var(--paper);
  background-size: 28px 28px;
  font-family: "Avenir Next", "Segoe UI", Verdana, sans-serif;
  letter-spacing: 0;
}

strong {
  font-weight: 600;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
a.primary,
a.ghost,
label.ghost {
  line-height: 1.2;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(49, 92, 157, 0.42);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 10px;
  left: 10px;
  padding: 9px 12px;
  color: white;
  border-radius: 6px;
  background: var(--ink);
  transform: translateY(-160%);
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

code {
  padding: 1px 4px;
  border: 1px solid #d8ccbb;
  border-radius: 5px;
  background: #fffdf8;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

.app {
  display: grid;
  grid-template-columns: 244px 1fr;
  min-height: 100vh;
  align-items: stretch;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: #eee3d1;
}

.brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding: 6px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px rgba(31, 37, 34, 0.12);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-weight: 600;
}

.brand small,
.eyebrow,
.metric span,
.metric small,
small,
.queue-head p,
.facts dt {
  color: var(--muted);
}

.nav {
  display: grid;
  flex: 0 0 auto;
  gap: 10px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-separator {
  height: 1px;
  margin: 0 8px;
  background: rgba(31, 37, 34, 0.16);
}

.nav-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 400;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 250, 241, 0.82);
  border-color: var(--line);
}

.nav-item.active {
  font-weight: 600;
}

.icon {
  width: 19px;
  height: 19px;
}

.rail-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(182, 106, 18, 0.3);
  border-radius: var(--radius);
  background: rgba(182, 106, 18, 0.08);
  color: #73430c;
}

.rail-footer {
  display: grid;
  flex: 0 0 auto;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(31, 37, 34, 0.1);
}

.coffee-button {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 58px;
  max-height: 60px;
  padding: 0;
  overflow: hidden;
  color: #fffaf1;
  border: 1px solid #0d2925;
  border-radius: 8px;
  background: var(--dark-surface);
  box-shadow: 0 12px 24px rgba(38, 31, 21, 0.16);
}

.coffee-button:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.coffee-pattern {
  position: absolute;
  inset: -14px -8px -14px auto;
  z-index: -1;
  display: grid;
  place-content: center;
  color: #f2e6d4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-style: italic;
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -1px;
  opacity: 0.12;
  transform: rotate(-8deg);
  transition:
    transform 300ms ease,
    opacity 220ms ease;
}

.coffee-art {
  position: absolute;
  top: 8px;
  left: 10px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--dark-surface);
  border-radius: 50%;
  background: #e7b65e;
  transform: none;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.coffee-art > svg:first-child {
  width: 23px;
  height: 23px;
}

.coffee-heart {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  color: #c93e37;
  transform: rotate(10deg);
  transition: transform 260ms ease;
}

.coffee-label {
  position: absolute;
  top: 18px;
  right: 8px;
  bottom: auto;
  left: 58px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-style: italic;
  font-weight: 600;
  transition:
    letter-spacing 240ms ease,
    transform 240ms ease;
}

.coffee-button:hover:not(:disabled) .coffee-pattern {
  opacity: 0.04;
  transform: rotate(0deg) scale(0.8);
}

.coffee-button:hover:not(:disabled) .coffee-art {
  transform: translateX(3px) rotate(-10deg) scale(0.9);
}

.coffee-button:hover:not(:disabled) .coffee-heart {
  transform: translateY(-4px) rotate(18deg) scale(1.2);
}

.coffee-button:hover:not(:disabled) .coffee-label {
  letter-spacing: 0.3px;
  transform: translateY(-2px);
}

.app-credit {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
}

.app-credit button {
  display: block;
  width: 100%;
  padding: 0;
  color: var(--teal-dark);
  border: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
}

.app-credit button:hover {
  text-decoration: underline;
}

@media (max-height: 760px) and (min-width: 861px) {
  .rail {
    gap: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .nav-item {
    min-height: 38px;
  }
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--teal);
}

.status-dot.warning {
  background: var(--amber);
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.screen-view {
  min-width: 0;
}

.topbar,
.queue-head,
.panel-head,
.button-row,
.topbar-actions {
  display: flex;
  align-items: center;
}

.topbar,
.queue-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.topbar h1,
.queue-head h2,
.panel h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
}

.eyebrow {
  margin: 0 0 3px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 500;
}

.topbar-actions,
.button-row {
  gap: 12px;
  flex-wrap: wrap;
}

.topbar-actions button,
.button-row button,
.panel-actions button,
.queue-actions button,
.preview-actions button,
.asset-body button,
.job-product-actions button,
a.primary,
a.ghost,
label.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.recovery-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 7px 8px 7px 12px;
  margin: -6px 0 18px;
  color: #5f3f08;
  border: 1px solid rgba(182, 106, 18, 0.28);
  border-radius: 7px;
  background: rgba(239, 198, 106, 0.18);
}

.recovery-banner span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.primary,
.ghost,
.small,
.danger {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--panel);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}

.primary {
  color: white;
  border-color: var(--teal-dark);
  background: var(--teal);
}

.primary svg,
a.primary,
a.primary:visited {
  color: white;
}

.primary:hover {
  color: white;
  background: var(--teal-dark);
}

.ghost:hover,
.small:hover {
  border-color: #b6a58e;
}

.danger {
  color: white;
  border-color: #8f2f28;
  background: var(--red);
}

.small {
  min-height: 32px;
  padding: 0 11px;
  font-size: 13px;
}

.stretch {
  width: 100%;
  margin-top: 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-grid {
  display: grid;
  gap: 16px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
}

.hero-panel h2 {
  max-width: 720px;
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.15;
}

.hero-panel p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.92);
  box-shadow: var(--shadow);
}

.metric {
  display: grid;
  gap: 4px;
  padding: 16px;
}

.metric strong {
  font-family: Georgia, serif;
  font-size: 34px;
  font-weight: 500;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
}

.panel {
  padding: 16px;
}

.panel.wide {
  min-width: 0;
}

.panel-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel h2 {
  font-size: 18px;
  font-weight: 600;
}

.queue-head h2 {
  font-size: 22px;
  font-weight: 500;
}

.job-list {
  display: grid;
  gap: 8px;
}

.job-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 98px 118px 52px;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf8;
}

.job-row:hover,
.job-row.selected {
  border-color: var(--teal);
}

.job-row strong,
.job-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-row strong {
  font-weight: 500;
}

.jobs-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.jobs-master,
.job-detail-panel {
  min-width: 0;
}

.job-detail-panel {
  display: flex;
  flex-direction: column;
}

.job-detail-panel > .jobs-message {
  flex: 1;
}

.persisted-job-list {
  display: grid;
  gap: 8px;
}

.persisted-job-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  width: 100%;
  min-height: 82px;
  padding: 12px;
  color: var(--ink);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf8;
}

.persisted-job-row:hover,
.persisted-job-row.selected {
  border-color: var(--teal);
}

.persisted-job-row.selected {
  box-shadow: inset 4px 0 0 var(--teal);
}

.persisted-job-title {
  min-width: 0;
}

.persisted-job-title strong,
.persisted-job-title small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.persisted-job-title strong {
  font-weight: 500;
}

.persisted-job-row .progress-mini {
  min-width: 0;
}

.persisted-job-row > small {
  justify-self: end;
}

.jobs-message {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 7px;
}

.jobs-message.error {
  color: #842a23;
  border-color: rgba(185, 65, 53, 0.35);
  background: rgba(185, 65, 53, 0.06);
}

.job-detail-head {
  align-items: flex-start;
}

.job-detail-head small {
  display: block;
  margin-top: 3px;
}

.job-detail-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  margin-bottom: 16px;
}

.job-detail-progress > span {
  color: var(--muted);
}

.job-detail-progress > strong {
  font-weight: 500;
}

.job-detail-progress .main-progress {
  grid-column: 1 / -1;
  margin: 7px 0 0;
}

.job-progress-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.job-progress-stats div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 9px 10px;
  background: #fffdf8;
}

.job-progress-stats span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  text-transform: uppercase;
}

.job-progress-stats strong {
  font-size: 18px;
  font-weight: 500;
}

.job-progress-stats .has-error strong {
  color: var(--red);
}

.job-detail-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.job-detail-facts div {
  min-width: 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.job-detail-facts div:last-child {
  grid-column: 1 / -1;
}

.job-detail-facts dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.job-detail-facts dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.job-detail-actions {
  margin: 8px 0 18px;
}

.job-concurrency-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.job-concurrency-control > div:first-child {
  display: grid;
  gap: 2px;
}

.job-concurrency-control > div:first-child > span {
  font-weight: 500;
}

.number-stepper {
  display: grid;
  grid-template-columns: 32px 46px 32px;
  align-items: center;
  gap: 5px;
}

.number-stepper output {
  display: grid;
  height: 32px;
  place-items: center;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
  font-weight: 600;
}

.job-concurrency-error {
  margin: 10px 0 0;
}

.job-control-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.job-control-strip > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.job-control-strip > div:first-child > span {
  font-weight: 500;
}

.job-control-strip .button-row {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.job-control-error {
  margin: 10px 0 0;
}

.job-products-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.job-products-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.job-products-head span {
  color: var(--muted);
}

.job-product-list {
  display: grid;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf8;
}

.job-product-row {
  display: grid;
  grid-template-columns: 90px 110px minmax(140px, 1fr) 120px 118px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 54px;
  padding: 9px 11px;
  border-bottom: 1px solid #eadfce;
}

.job-product-row:last-child {
  border-bottom: 0;
}

.job-product-row strong {
  font-weight: 500;
}

.job-product-row > span:not(.pill) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.job-row-progress {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.job-row-progress > span:first-child {
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  font-size: 12px;
}

.job-product-error {
  margin: 10px 0 0;
}

.job-product-actions {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.job-product-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.job-product-actions > span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.file-badge {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(13, 123, 118, 0.35);
  border-radius: 6px;
  color: var(--teal-dark);
  background: rgba(13, 123, 118, 0.08);
  font-weight: 600;
  font-size: 12px;
}

.file-badge.warn {
  color: var(--red);
  border-color: rgba(185, 65, 53, 0.35);
  background: rgba(185, 65, 53, 0.08);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.pill.live {
  color: #084d49;
  background: rgba(13, 123, 118, 0.14);
}

.pill.done {
  color: #245e2a;
  background: rgba(66, 142, 74, 0.14);
}

.pill.error {
  color: #842a23;
  background: rgba(185, 65, 53, 0.14);
}

.pill.warning {
  color: #73430c;
  background: rgba(182, 106, 18, 0.16);
}

.pill.danger {
  color: #842a23;
  background: rgba(185, 65, 53, 0.14);
}

.progress-mini,
.main-progress {
  display: block;
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e7dccb;
}

.progress-mini i,
.main-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #6ea642);
}

.main-progress {
  height: 12px;
  margin: -8px 0 18px;
}

.row-action {
  color: var(--teal-dark);
  font-weight: 600;
}

.checklist {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.check {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.72);
}

.check.warn {
  background: var(--amber);
}

.stepper,
.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.72);
}

.step,
.segmented button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.step.active,
.segmented button.active {
  color: white;
  background: var(--ink);
  font-weight: 600;
}

.mapping-grid,
.config-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

input,
select {
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 10px;
  color: var(--ink);
  border: 1px solid #cbbba6;
  border-radius: 7px;
  background: #fffdf8;
  font-size: 15px;
  font-weight: 400;
  text-transform: none;
}

.output-folder-picker {
  display: grid;
  grid-column: 1 / -1;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.output-folder-picker > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 5px 5px 5px 11px;
  border: 1px solid #cbbba6;
  border-radius: 7px;
  background: #fffdf8;
}

.output-folder-picker strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 400;
}

.mapping-grid select {
  min-height: 44px;
  font-size: 16px;
}

.mapping-empty {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 150px;
  padding: 30px 20px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed #cbbba6;
  border-radius: 7px;
  background: rgba(255, 253, 248, 0.52);
}

.mapping-empty strong {
  color: var(--ink);
  font-weight: 500;
}

.mapping-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mapping-section-head h3 {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 600;
}

.mapping-section-head span {
  color: var(--muted);
  font-size: 13px;
}

.required-mapping-grid {
  margin-bottom: 18px;
}

.mapping-control {
  min-width: 0;
}

.mapping-match {
  display: block;
  margin-top: 6px;
  color: var(--amber);
  font-size: 12px;
}

.mapping-match.matched {
  color: var(--teal-dark);
}

.optional-mappings {
  margin: 0 -16px;
  padding: 0 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.optional-mappings summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 500;
  list-style-position: inside;
}

.optional-mappings summary small {
  margin-left: auto;
  color: var(--muted);
  font-weight: 400;
}

.optional-mapping-grid {
  padding-top: 4px;
}

.preview-head {
  margin-top: 18px;
}

.import-file-panel {
  margin-bottom: 16px;
}

.import-file-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 16px;
  align-items: start;
}

.brand-logo-layout {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: var(--space-5);
  align-items: center;
}

.brand-logo-panel {
  overflow: hidden;
}

.brand-logo-preview {
  display: grid;
  place-items: center;
  gap: var(--space-2);
  min-height: 144px;
  aspect-ratio: 1;
  overflow: hidden;
  color: var(--muted);
  border: 1px dashed #cbbba6;
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, rgba(31, 37, 34, 0.045) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(31, 37, 34, 0.045) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(31, 37, 34, 0.045) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(31, 37, 34, 0.045) 75%), #fffdf8;
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
  background-size: 20px 20px;
  font-size: 13px;
  font-weight: 600;
}

.brand-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-logo-copy h3 {
  margin: 0 0 var(--space-2);
}

.brand-logo-copy p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.brand-logo-content {
  display: grid;
  gap: var(--space-4);
}

.brand-logo-source-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.brand-logo-source-button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 68px;
  padding: var(--space-3);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  text-align: left;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    transform 120ms ease;
}

.brand-logo-source-button:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 20px rgba(13, 123, 118, 0.1);
  transform: translateY(-1px);
}

.brand-logo-source-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--teal-dark);
  border-radius: var(--radius);
  background: rgba(13, 123, 118, 0.1);
}

.brand-logo-source-button > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.brand-logo-source-button strong,
.brand-logo-source-button small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-logo-source-button small {
  color: var(--muted);
  line-height: 1.35;
}

.brand-logo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin: var(--space-5) calc(var(--space-4) * -1) calc(var(--space-4) * -1);
  padding: var(--space-4);
  border-top: 1px solid var(--line);
  background: rgba(246, 241, 232, 0.55);
}

.brand-logo-footer > div:first-child {
  display: grid;
  gap: 3px;
}

.brand-logo-footer > div:first-child span {
  color: var(--muted);
  font-size: 13px;
}

.brand-logo-footer-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.brand-logo-footer-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 40px;
}

.import-actions {
  display: grid;
  gap: 12px;
}

.import-actions .equal-action {
  color: var(--ink);
  border-color: var(--line);
  background: var(--panel);
}

.import-actions .equal-action:hover {
  color: var(--ink);
  border-color: #b6a58e;
  background: #fffdf8;
}

.panel-actions,
.hero-actions,
.queue-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.panel-actions {
  margin-top: 2px;
}

.inline-check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.5;
}

.inline-check-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  opacity: 0;
  pointer-events: none;
}

.inline-check-box {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 2px;
  place-items: center;
  border: 1px solid #8d9a92;
  border-radius: 4px;
  background: #fffdf8;
  box-shadow: inset 0 0 0 2px #fffdf8;
}

.inline-check-box::before {
  width: 10px;
  height: 10px;
  content: "";
  border-radius: 2px;
  background: var(--teal);
  transform: scale(0);
  transition: transform 120ms ease;
}

.inline-check-input:checked + .inline-check-box::before {
  transform: scale(1);
}

.inline-check-input:focus-visible + .inline-check-box {
  outline: 3px solid rgba(49, 92, 157, 0.42);
  outline-offset: 2px;
}

.hero-actions {
  align-items: flex-start;
}

.preview-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.progress-track {
  display: block;
  height: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7dccb;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #6ea642);
}

.queue-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.queue-list .queue-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf8;
}

.queue-list .queue-row p {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-list .queue-row small {
  display: block;
  margin-top: 4px;
  color: var(--red);
  overflow-wrap: anywhere;
}

.queue-error-details {
  margin-top: 7px;
}

.queue-error-details summary {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  cursor: pointer;
  color: var(--red);
  font-size: 13px;
  font-weight: 650;
}

.queue-error-details pre {
  margin: 6px 0 0;
  max-height: 180px;
  padding: 10px;
  overflow: auto;
  color: #842a23;
  border: 1px solid rgba(185, 65, 53, 0.24);
  border-radius: 7px;
  background: #fff4f1;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.empty-state {
  display: grid;
  min-height: 160px;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: rgba(255, 253, 248, 0.56);
}

.mapping-layout {
  grid-template-columns: minmax(0, 1fr);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.table-note {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fffdf8;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #eadfce;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #f3eadc;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

td {
  font-size: 13px;
}

.facts {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  margin: 0;
}

.facts dt {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.notice {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(13, 123, 118, 0.22);
  border-radius: 7px;
  background: rgba(13, 123, 118, 0.08);
}

.notice.error {
  color: #842a23;
  border-color: rgba(185, 65, 53, 0.28);
  background: rgba(185, 65, 53, 0.09);
}

.notice.warning {
  color: #73430c;
  border-color: rgba(182, 106, 18, 0.32);
  background: rgba(182, 106, 18, 0.1);
}

.notice a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  font-weight: 700;
  text-underline-offset: 3px;
}

.error-list {
  display: grid;
  gap: 10px;
}

.error-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(185, 65, 53, 0.24);
  border-radius: 7px;
  background: rgba(185, 65, 53, 0.07);
}

.error-item strong,
.error-item small,
.error-item span {
  overflow-wrap: anywhere;
}

.error-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.error-item strong {
  font-weight: 600;
}

.error-item p {
  margin: 0;
  font-size: 13px;
}

.validation-actions {
  margin-top: 14px;
}

.slider-label input {
  accent-color: var(--teal);
}

.compact {
  margin-top: 18px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.queue-tools {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(240px, 1fr);
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.queue-job-select {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  padding: 0 10px;
  color: var(--ink);
  border: 1px solid #cbbba6;
  border-radius: 7px;
  background: #fffdf8;
  text-transform: none;
}

.queue-job-select span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.queue-job-select select {
  width: 100%;
  min-height: 38px;
  padding: 0 26px 0 0;
  border: 0;
  background: transparent;
}

.queue-tools .search-field {
  width: 100%;
}

.search-field {
  position: relative;
  display: block;
}

.search-field svg {
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 1;
  color: var(--muted);
  transform: translateY(-50%);
}

.search-field input {
  padding-left: 38px;
}

.queue-filters {
  grid-column: 1 / -1;
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  padding: 3px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f3eadc;
}

.queue-filters button {
  display: inline-flex;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 7px;
  color: var(--muted);
  white-space: nowrap;
  border: 0;
  border-radius: 5px;
  background: transparent;
}

.queue-filters button span {
  min-width: 20px;
  padding: 2px 6px;
  color: inherit;
  border-radius: 999px;
  background: rgba(31, 37, 34, 0.08);
  font-size: 11px;
}

.queue-filters button.active {
  color: white;
  background: var(--ink);
  font-weight: 600;
}

.queue-list-head,
.queue-row {
  display: grid;
  grid-template-columns: 84px 92px minmax(100px, 1.2fr) minmax(90px, 0.8fr) 156px;
  align-items: center;
  gap: 8px;
}

.queue-list-head {
  padding: 9px 12px;
  color: var(--muted);
  background: #f3eadc;
  border: 1px solid var(--line);
  border-radius: 7px 7px 0 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.queue-row-list {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 7px 7px;
  background: #fffdf8;
}

.queue-row {
  min-height: 62px;
  padding: 10px 12px;
  border-bottom: 1px solid #eadfce;
}

.queue-row:last-child {
  border-bottom: 0;
}

.queue-sku {
  font-weight: 500;
}

.queue-prompt,
.queue-output {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.queue-output {
  color: var(--muted);
}

.queue-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.queue-actions .small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.icon-button:hover {
  color: var(--teal-dark);
  border-color: var(--teal);
}

.queue-feedback {
  margin-top: -3px;
}

.queue-row-detail {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 12px;
  border-top: 1px solid #eadfce;
  background: rgba(13, 123, 118, 0.05);
}

.queue-row-detail > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.queue-row-detail span {
  color: var(--muted);
  font-size: 12px;
}

.queue-row-detail strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 500;
}

.queue-row-error {
  grid-column: 1 / -1;
  padding-top: 10px;
  border-top: 1px solid #eadfce;
}

.queue-row-error small {
  color: var(--muted);
  font-size: 12px;
}

.failed-log-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 12px;
  padding: 12px;
  border: 1px solid #e6c8c1;
  border-radius: 7px;
  background: #fff7f3;
}

.failed-log-panel > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.failed-log-panel strong {
  font-weight: 600;
}

.failed-log-panel span {
  color: var(--muted);
  font-size: 13px;
}

.queue-prompt-editor {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  text-transform: none;
}

.queue-prompt-editor input {
  grid-column: 1;
}

.queue-prompt-editor button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.queue-empty {
  display: grid;
  min-height: 140px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
}

.queue-health {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.queue-health div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.queue-health dt {
  color: var(--muted);
}

.queue-health dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
}

.queue-concurrency-readout {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.queue-concurrency-readout span,
.queue-concurrency-readout small {
  color: var(--muted);
}

.queue-concurrency-readout span {
  font-size: 12px;
  text-transform: uppercase;
}

.queue-concurrency-readout strong {
  font-size: 26px;
  font-weight: 500;
}

.results-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
}

.results-tools {
  display: grid;
  grid-template-columns: minmax(200px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
  margin-bottom: 10px;
}

.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 6px 0;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.selection-bar .button-row {
  flex-wrap: nowrap;
}

.selection-bar .small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.result-feedback {
  margin-top: 0;
}

.folder-list {
  display: grid;
  gap: 8px;
}

.folder-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 8px;
  color: var(--ink);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf8;
}

.folder-item:hover,
.folder-item.active {
  border-color: var(--teal);
  box-shadow: inset 4px 0 0 var(--teal);
}

.folder-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 4px;
  color: inherit;
  text-align: left;
  border: 0;
  background: transparent;
}

.folder-main strong,
.folder-main small,
.folder-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-remove {
  color: #8f3d33;
}

.folder-item strong,
.asset-body strong {
  font-weight: 500;
}

.folder-item.active strong {
  font-weight: 600;
}

.folder-item small,
.folder-item span {
  color: var(--muted);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.asset {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.asset-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  box-shadow: 0 10px 24px rgba(38, 31, 21, 0.08);
}

.asset-card > div {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.asset-card strong,
.asset-card span,
.asset-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-card a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--teal-dark);
  font-weight: 600;
  text-decoration: none;
}

.asset-card a:hover {
  text-decoration: underline;
}

.asset.selected {
  border-color: var(--teal);
  box-shadow:
    inset 0 0 0 2px var(--teal),
    var(--shadow);
}

.asset.failed {
  border-color: rgba(185, 65, 53, 0.38);
}

.asset-art {
  position: relative;
  display: grid;
  min-height: 180px;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 48% 34%, rgba(255, 255, 255, 0.92) 0 18%, transparent 19%),
    linear-gradient(135deg, var(--swatch-a, #d8ccbb), var(--swatch-b, #0d7b76));
}

.asset-art img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.asset-check {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  border-radius: 5px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 2px 8px rgba(31, 37, 34, 0.14);
}

.asset-check input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--teal);
}

.failed-asset-icon {
  color: var(--red);
}

.missing-asset-state {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 16px;
  color: var(--red);
  text-align: center;
}

.missing-asset-state span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.missing-asset-state small {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.preview-missing-state {
  min-height: min(34vh, 320px);
}

.product-shape {
  width: 88px;
  height: 112px;
  border: 3px solid rgba(31, 37, 34, 0.72);
  border-radius: 8px 8px 24px 24px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 16px 18px 0 rgba(31, 37, 34, 0.16);
}

.asset-body {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.asset-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.asset-title .pill {
  flex: 0 0 auto;
}

.asset-body button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.asset-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.asset-actions .small {
  width: 100%;
}

.asset-body strong,
.asset-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-body .asset-missing-copy {
  color: var(--red);
}

.asset-prompt {
  display: -webkit-box;
  min-height: 34px;
  margin: 2px 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.asset-detail-grid {
  display: grid;
  gap: 5px;
  margin: 2px 0 4px;
}

.asset-detail-grid div {
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid rgba(31, 37, 34, 0.08);
  border-radius: 6px;
  background: #fbf8f0;
}

.asset-detail-grid dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.asset-detail-grid dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-detail-grid .asset-error-detail {
  border-color: rgba(185, 65, 53, 0.24);
  background: #fff4f1;
}

.asset-detail-grid .asset-error-detail dt {
  color: var(--red);
}

.settings-panel {
  margin-top: 16px;
}

.results-empty {
  display: grid;
  grid-column: 1 / -1;
  min-height: 220px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 7px;
}

.results-empty.compact {
  min-height: 128px;
  padding: 14px;
  text-align: center;
}

.preview-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(31, 37, 34, 0.58);
}

.preview-dialog {
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  padding: 18px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(21, 26, 24, 0.34);
}

.log-dialog {
  width: min(920px, 100%);
}

.job-log-preview {
  max-height: min(64vh, 680px);
  margin: 14px 0 0;
  padding: 14px;
  overflow: auto;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbf8f0;
}

.preview-art {
  display: grid;
  min-height: min(52vh, 480px);
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background:
    radial-gradient(circle at 48% 34%, rgba(255, 255, 255, 0.92) 0 18%, transparent 19%),
    linear-gradient(135deg, var(--swatch-a, #d8ccbb), var(--swatch-b, #0d7b76));
}

.preview-art img {
  width: 100%;
  max-height: min(52vh, 480px);
  object-fit: contain;
}

.preview-details {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.preview-details section,
.preview-details dl {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf8;
}

.preview-details h3 {
  margin: 0 0 6px;
  font-size: 13px;
}

.preview-details p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.preview-details small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.preview-details dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.preview-details dl div {
  min-width: 0;
}

.preview-details dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-details dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.preview-details .preview-error {
  border-color: rgba(185, 65, 53, 0.28);
  background: #fff4f1;
}

.preview-product-shape {
  width: 150px;
  height: 200px;
}

.preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.preview-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.support-layout {
  display: grid;
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
}
.help-hero {
  position: relative;
  display: grid;
  min-height: 230px;
  place-items: center;
  gap: 24px;
  padding: 38px 32px;
  overflow: hidden;
  color: #f8f1e6;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 12% 18%, rgba(231, 182, 94, 0.22) 0 2px, transparent 3px),
    linear-gradient(118deg, var(--dark-surface) 0 68%, #21554d 100%);
  background-size:
    26px 26px,
    auto;
  box-shadow: var(--shadow);
}
.help-hero::after {
  position: absolute;
  width: 310px;
  height: 310px;
  right: -175px;
  bottom: -210px;
  content: "";
  border: 1px solid rgba(231, 182, 94, 0.35);
  border-radius: 50%;
  box-shadow:
    0 0 0 36px rgba(231, 182, 94, 0.04),
    0 0 0 72px rgba(231, 182, 94, 0.035);
}
.help-hero-copy {
  position: relative;
  z-index: 1;
  text-align: center;
}
.help-hero h2,
.feedback-intro h2 {
  margin: 0;
  color: #f8f1e6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 500;
}
.help-hero p:last-child {
  margin: 8px 0 0;
  color: #c8d0ca;
}
.help-search-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(620px, 100%);
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  background: #fffaf1;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}
.help-search-wrap input {
  min-width: 0;
  height: 52px;
  flex: 1;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
}
.help-search-wrap button {
  display: grid;
  padding: 5px;
  color: var(--muted);
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.help-search-status {
  margin: -4px 0 -6px;
  color: var(--muted);
  font-size: 13px;
}
.help-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.help-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 310px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.94);
  box-shadow: 0 12px 30px rgba(38, 31, 21, 0.07);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.help-card-logo {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 28px;
  place-items: center;
  color: var(--teal-dark);
  border: 1px solid rgba(13, 123, 118, 0.2);
  border-radius: 50%;
  background: rgba(13, 123, 118, 0.08);
}

.help-card-logo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.help-card.teal .help-card-logo {
  color: var(--teal-dark);
  border-color: rgba(13, 123, 118, 0.22);
  background: rgba(13, 123, 118, 0.08);
}

.help-card.blue .help-card-logo {
  color: var(--blue);
  border-color: rgba(49, 92, 157, 0.22);
  background: rgba(49, 92, 157, 0.08);
}

.help-card.green .help-card-logo {
  color: #547e2d;
  border-color: rgba(84, 126, 45, 0.24);
  background: rgba(84, 126, 45, 0.09);
}

.help-card h2 {
  max-width: 320px;
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}
.help-card > *:not(.help-card-watermark) {
  position: relative;
  z-index: 1;
}
.help-card-watermark {
  position: absolute;
  z-index: 0;
  right: -34px;
  bottom: -42px;
  width: 190px;
  height: 190px;
  color: var(--ink);
  opacity: 0.045;
  transform: rotate(-9deg);
  pointer-events: none;
}
.help-card:hover {
  border-color: #c0ae94;
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.help-card-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 28px;
  place-items: center;
  color: var(--teal-dark);
  border: 1px solid rgba(13, 123, 118, 0.2);
  border-radius: 50%;
  background: rgba(13, 123, 118, 0.08);
}
.help-card-icon svg {
  width: 22px;
}
.help-card-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.help-card.amber .help-card-icon {
  color: #8b500d;
  border-color: rgba(182, 106, 18, 0.22);
  background: rgba(182, 106, 18, 0.09);
}
.help-card.blue .help-card-icon {
  color: var(--blue);
  border-color: rgba(49, 92, 157, 0.22);
  background: rgba(49, 92, 157, 0.08);
}
.help-card.blue .help-card-icon img {
  filter: invert(35%) sepia(18%) saturate(1903%) hue-rotate(175deg) brightness(87%) contrast(87%);
}
.help-card.green .help-card-icon {
  color: #547e2d;
  border-color: rgba(84, 126, 45, 0.24);
  background: rgba(84, 126, 45, 0.09);
}
.help-card.green .help-card-icon img {
  filter: invert(48%) sepia(28%) saturate(1003%) hue-rotate(46deg) brightness(91%) contrast(88%);
}
.help-card .eyebrow {
  margin: 0 0 8px;
  color: var(--teal-dark);
}
.help-card.amber .eyebrow {
  color: #8b500d;
}
.help-card.blue .eyebrow {
  color: var(--blue);
}
.help-card.green .eyebrow {
  color: #547e2d;
}
.help-card h3 {
  max-width: 300px;
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}
.help-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.help-card .ghost {
  margin-top: auto;
}
.help-learn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 2px;
  margin-top: auto;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  font-weight: 600;
}
.help-learn span {
  transition: transform 160ms ease;
}
.help-learn:hover span {
  transform: translateX(4px);
}
.help-empty {
  display: grid;
  min-height: 250px;
  place-items: center;
  align-content: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.help-empty h3 {
  margin: 12px 0 0;
  color: var(--ink);
}
.help-empty p {
  margin: 6px 0 14px;
}
.help-faq {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.9);
  box-shadow: 0 12px 30px rgba(38, 31, 21, 0.06);
}
.help-faq-intro {
  padding: 28px;
  border-right: 1px solid var(--line);
  background: #eee3d1;
}
.help-faq-intro h2 {
  margin: 6px 0 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 500;
}
.help-faq-intro > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.5;
}
.help-faq-intro button {
  margin-top: 18px;
}
.help-faq-list {
  padding: 8px 24px;
}
.help-faq-list details {
  border-bottom: 1px solid var(--line);
}
.help-faq-list details:last-child {
  border-bottom: 0;
}
.help-faq-list summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.help-faq-list summary::-webkit-details-marker {
  display: none;
}
.help-faq-list summary svg {
  flex: 0 0 auto;
  transition: transform 180ms ease;
}
.help-faq-list details[open] summary svg {
  transform: rotate(180deg);
}
.help-faq-list details p {
  margin: -3px 32px 18px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.help-dialog {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(21, 26, 24, 0.42);
}
.help-dialog-head {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px 20px;
  color: #f8f1e6;
  background: var(--dark-surface);
}
.help-dialog-head .eyebrow {
  color: #9eb3aa;
}
.help-dialog-head h2 {
  margin: 5px 0 0;
  color: #f8f1e6;
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 500;
}
.help-dialog-head .icon-button {
  color: white;
  border-color: rgba(255, 255, 255, 0.24);
  background: transparent;
}
.help-dialog-head .icon-button:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.08);
}
.tutorial-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 20px 26px 4px;
  padding: 4px;
  border: 1px solid #d8ccbb;
  border-radius: 10px;
  background: #eee3d1;
}
.tutorial-tabs button {
  display: flex;
  min-width: 0;
  min-height: 62px;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}
.tutorial-tabs button:hover {
  color: var(--ink);
  background: rgba(255, 250, 241, 0.58);
}
.tutorial-tabs button.active {
  color: var(--ink);
  border-color: rgba(49, 92, 157, 0.26);
  background: var(--panel);
  box-shadow: 0 5px 15px rgba(38, 31, 21, 0.1);
}
.tutorial-tabs button svg {
  flex: 0 0 auto;
  color: var(--blue);
}
.tutorial-tabs button span {
  display: grid;
  min-width: 0;
  gap: 2px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
}
.tutorial-tabs button small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.help-dialog-intro {
  margin: 22px 26px 8px;
  color: var(--muted);
  line-height: 1.55;
}
.tutorial-steps {
  display: grid;
  gap: 0;
  padding: 8px 26px;
  list-style: none;
}
.tutorial-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
}
.tutorial-steps li:not(:last-child)::after {
  position: absolute;
  top: 43px;
  bottom: -3px;
  left: 17px;
  width: 1px;
  content: "";
  background: var(--line);
}
.tutorial-steps li > span {
  z-index: 1;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: white;
  border-radius: 50%;
  background: var(--teal-dark);
  font-weight: 600;
}
.tutorial-step-content {
  min-width: 0;
  padding: 6px 0 10px;
}
.tutorial-step-title {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.5;
}
.tutorial-step-description {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.tutorial-step-description a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue);
  font-weight: 600;
  text-underline-offset: 3px;
}
.tutorial-image {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 12px 0 0;
  padding: 7px;
  overflow: hidden;
  border: 1px solid #d9cebd;
  border-radius: 9px;
  background: #151716;
  box-shadow: 0 8px 22px rgba(31, 37, 34, 0.12);
}
.tutorial-image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.tutorial-image-narrow img {
  width: 260px;
}
.tutorial-image-permissions img {
  width: min(450px, 100%);
}
.tutorial-image-wordpress-nav img {
  width: min(327px, 100%);
}
.tutorial-image-wordpress-export {
  width: 100%;
}
.tutorial-image-wordpress-export img {
  width: 100%;
}
.help-dialog-note {
  display: flex;
  gap: 9px;
  margin: 6px 26px 0;
  padding: 11px 12px;
  color: #73430c;
  border-left: 3px solid var(--amber);
  background: rgba(182, 106, 18, 0.08);
  font-size: 13px;
}
.help-dialog .preview-actions {
  position: sticky;
  z-index: 2;
  bottom: 0;
  margin-top: 18px;
  padding: 14px 26px;
  border-top: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.96);
  box-shadow: 0 -10px 22px rgba(38, 31, 21, 0.06);
  backdrop-filter: blur(8px);
}
.external-link-dialog {
  position: relative;
  width: min(500px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(21, 26, 24, 0.42);
}
.external-link-mark {
  display: grid;
  width: 50px;
  height: 50px;
  margin-bottom: 24px;
  place-items: center;
  color: #f8f1e6;
  border-radius: 50%;
  background: var(--dark-surface);
}
.external-link-mark svg {
  width: 21px;
}
.external-link-dialog h2 {
  margin: 5px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 500;
}
.external-link-dialog > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.external-link-dialog > p strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}
.external-link-dialog .notice {
  margin-top: 16px;
}
.external-link-dialog .preview-actions {
  margin-top: 24px;
}

.generate-csv-dialog {
  width: min(560px, 100%);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #fffdf8;
}

.generate-csv-dialog .preview-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.generate-csv-dialog .preview-actions button {
  justify-content: flex-start;
  width: 100%;
  min-height: 44px;
}
.feedback-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(420px, 1.3fr);
  gap: 16px;
}
.feedback-intro {
  min-height: 580px;
  padding: 34px;
  color: #f8f1e6;
  border-radius: var(--radius);
  background: var(--dark-surface);
  box-shadow: var(--shadow);
}
.feedback-intro > p:not(.eyebrow) {
  max-width: 390px;
  color: #c8d0ca;
  line-height: 1.65;
}
.feedback-mark {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 72px;
  place-items: center;
  color: var(--ink);
  border-radius: 50%;
  background: #e7b65e;
}
.feedback-address {
  display: flex;
  gap: 12px;
  padding-top: 28px;
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #c8d0ca;
  line-height: 1.5;
}
.feedback-address strong {
  color: white;
}
.feedback-form {
  padding: 26px;
}
.feedback-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.feedback-form label {
  margin-bottom: 16px;
}
.feedback-form textarea {
  width: 100%;
  padding: 12px;
  resize: vertical;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf8;
  line-height: 1.5;
}
.feedback-form label > small {
  justify-self: end;
  margin-top: 5px;
}
.feedback-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 5px;
}
.feedback-submit button {
  flex: 0 0 auto;
}

@media (max-width: 1180px) {
  .help-grid {
    grid-template-columns: 1fr;
  }

  .help-steps {
    grid-template-columns: 1fr;
  }
  .help-card {
    min-height: 0;
  }
  .metrics-grid,
  .metrics-row,
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid,
  .results-layout,
  .jobs-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .rail {
    position: sticky;
    top: 0;
    z-index: 5;
    align-self: start;
    gap: 10px;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    padding: 0;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .nav {
    grid-template-columns: minmax(0, 4fr) 1px minmax(0, 3fr);
    align-items: stretch;
    gap: 8px;
  }

  .nav-group {
    gap: 4px;
  }

  .nav-group-primary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-group-support {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-separator {
    width: 1px;
    height: auto;
    margin: 4px 0;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 2px;
    min-height: 46px;
    padding: 4px;
    font-size: 12px;
    text-align: center;
  }

  .rail-footer {
    grid-template-columns: auto minmax(150px, 190px) minmax(180px, 1fr);
    align-items: center;
    gap: 14px;
    margin-top: 0;
    padding-top: 8px;
  }

  .rail-status {
    min-height: 34px;
    padding: 6px 9px;
    white-space: nowrap;
  }

  .coffee-button {
    height: 48px;
  }

  .coffee-art {
    top: 7px;
    left: 24px;
    width: 34px;
    height: 34px;
  }

  .coffee-art > svg:first-child {
    width: 20px;
    height: 20px;
  }

  .coffee-heart {
    top: -3px;
    right: -2px;
    width: 11px;
  }

  .coffee-label {
    top: 14px;
    right: 8px;
    bottom: auto;
    left: 50px;
    font-size: 14px;
  }

  .coffee-pattern {
    display: none;
  }

  .app-credit {
    text-align: left;
  }

  .app-credit button {
    width: auto;
    text-align: left;
  }

  .workspace {
    padding: 14px;
  }

  .topbar,
  .queue-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .help-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .help-faq {
    grid-template-columns: 1fr;
  }
  .help-faq-intro {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .feedback-layout {
    grid-template-columns: 1fr;
  }
  .feedback-intro {
    min-height: 0;
  }
  .feedback-mark {
    margin-bottom: 32px;
  }
  .feedback-address {
    margin-top: 28px;
  }
  .feedback-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .feedback-submit {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions,
  .button-row {
    width: 100%;
    flex-wrap: wrap;
  }

  .topbar-actions button,
  .button-row button {
    flex: 1 1 160px;
  }

  .metrics-grid,
  .metrics-row,
  .mapping-grid,
  .config-grid,
  .settings-grid,
  .gallery {
    grid-template-columns: 1fr;
  }

  .import-file-layout,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    width: 100%;
  }

  .import-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .import-actions .stretch {
    margin-top: 0;
  }

  .output-folder-picker > div {
    grid-template-columns: 1fr;
  }

  .output-folder-picker button {
    width: 100%;
  }

  .job-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .job-detail-facts {
    grid-template-columns: 1fr;
  }

  .job-progress-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .job-detail-facts div:last-child {
    grid-column: auto;
  }

  .job-concurrency-control,
  .job-control-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .job-control-strip .button-row {
    width: 100%;
  }

  .job-product-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .job-product-row > span:not(.pill),
  .job-row-progress,
  .job-product-actions {
    grid-column: 1 / -1;
    white-space: normal;
  }

  .job-row-progress > span:first-child {
    text-align: left;
  }

  .job-product-actions {
    justify-content: stretch;
  }

  .queue-tools {
    grid-template-columns: 1fr;
  }

  .queue-filters:not(.result-filters) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .results-tools {
    grid-template-columns: 1fr;
  }

  .result-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .selection-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .selection-bar .button-row {
    overflow-x: auto;
  }

  .queue-list-head {
    display: none;
  }

  .queue-row-list {
    border-top: 1px solid var(--line);
    border-radius: 7px;
  }

  .queue-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 10px;
    padding: 12px;
  }

  .queue-status {
    justify-self: end;
  }

  .queue-prompt,
  .queue-output {
    grid-column: 1 / -1;
    white-space: normal;
  }

  .queue-prompt {
    color: var(--ink);
  }

  .queue-output {
    padding-top: 7px;
    border-top: 1px solid #eadfce;
  }

  .queue-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .queue-row-detail {
    grid-template-columns: 1fr;
    margin: 5px -12px -12px;
    padding: 12px;
  }

  .queue-prompt-editor {
    grid-template-columns: 1fr;
  }

  .queue-prompt-editor button {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }

  .job-row .pill,
  .job-row .progress-mini,
  .job-row .row-action {
    grid-column: 2;
  }

  .stepper,
  .segmented {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .step {
    padding: 0 8px;
  }

  .preview-backdrop {
    padding: 10px;
  }

  .preview-dialog {
    max-height: calc(100vh - 20px);
  }

  .preview-art {
    min-height: 340px;
  }

  .preview-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .brand-logo-layout,
  .brand-logo-source-actions {
    grid-template-columns: 1fr;
  }

  .brand-logo-preview {
    width: min(144px, 100%);
    min-height: auto;
  }

  .brand-logo-footer,
  .brand-logo-footer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-logo-footer-actions button {
    width: 100%;
  }

  .help-hero {
    min-height: 0;
    padding: 28px 18px;
  }

  .help-hero h2 {
    font-size: 36px;
  }

  .help-search-wrap {
    padding: 0 11px;
  }

  .help-card,
  .help-faq-intro {
    padding: 20px;
  }

  .help-faq-list {
    padding: 6px 18px;
  }

  .help-dialog-head,
  .help-dialog .preview-actions {
    padding-right: 18px;
    padding-left: 18px;
  }

  .help-dialog-intro,
  .tutorial-steps,
  .help-dialog-note,
  .tutorial-tabs {
    margin-right: 18px;
    margin-left: 18px;
  }

  .tutorial-steps {
    padding-right: 0;
    padding-left: 0;
  }

  .rail-footer {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .app-credit {
    grid-column: 1 / -1;
  }

  .app-credit,
  .app-credit button {
    text-align: center;
  }

  .app-credit button {
    width: 100%;
  }
}

@media (max-width: 440px) {
  .tutorial-tabs {
    grid-template-columns: 1fr;
  }
}
