:root {
  --navy: #102b46;
  --navy-2: #183a58;
  --orange: #e77825;
  --bg: #f3f5f7;
  --panel: #ffffff;
  --muted: #667687;
  --line: #dfe5ea;
  --shadow: 0 12px 34px rgba(16, 43, 70, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--navy);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 48px auto 80px;
}

.page-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 26px;
}

.brand-mark {
  width: 5px;
  min-height: 84px;
  border-radius: 999px;
  background: var(--orange);
}

.eyebrow, .label, .variant-number {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.eyebrow, .variant-number { color: var(--orange); }
.label { color: var(--muted); }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(28px, 4vw, 44px); }
h2 { margin: 5px 0 8px; font-size: 24px; }
h3 { margin: 5px 0 8px; font-size: 20px; }

.subtitle, .muted {
  color: var(--muted);
  line-height: 1.55;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 750;
  margin-bottom: 9px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input {
  min-width: 0;
  border: 1px solid #c8d2dc;
  border-radius: 10px;
  padding: 13px 14px;
  color: var(--navy);
  font: inherit;
  outline: none;
}

input:focus {
  border-color: var(--navy-2);
  box-shadow: 0 0 0 3px rgba(24,58,88,.1);
}

button {
  border: 0;
  border-radius: 10px;
  padding: 0 20px;
  background: var(--navy);
  color: white;
  font-weight: 750;
  cursor: pointer;
}

button:hover { background: var(--navy-2); }
button:disabled { opacity: .65; cursor: progress; }

.status {
  margin: 0 0 22px;
  padding: 15px 17px;
  border-radius: 12px;
  background: #e9eff4;
  color: var(--navy);
  line-height: 1.45;
}

.status.error {
  background: #fdeceb;
  color: #8a2d27;
}

.brief {
  font-size: 18px;
  line-height: 1.55;
  margin-bottom: 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin: 34px 0 16px;
}

.size-chip {
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 750;
}

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

.card {
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.image-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 18px;
  background: #eef2f5;
}

.preview {
  display: block;
  width: 100%;
  max-height: 500px;
  aspect-ratio: 9 / 14;
  object-fit: cover;
  border-radius: 10px;
  background: #dfe5ea;
}

.actual-size {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.thumb {
  width: 93px;
  height: 140px;
  object-fit: cover;
  border: 1px solid #cbd4dc;
  background: white;
}

.card-body { padding: 19px; }

.variant-idea {
  min-height: 64px;
  color: var(--muted);
  line-height: 1.45;
}

.download {
  display: inline-flex;
  margin-top: 7px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.download:hover { text-decoration: underline; }

.hidden { display: none !important; }

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .image-stage { grid-template-columns: 1fr auto; }
  .preview { max-width: 300px; }
}

@media (max-width: 650px) {
  .shell {
    width: min(100% - 24px, 1180px);
    margin-top: 24px;
  }
  .form-row { grid-template-columns: 1fr; }
  button { min-height: 46px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .image-stage { grid-template-columns: 1fr; }
  .actual-size { align-items: flex-start; }
}


.result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.secondary-button,
.select-button {
  min-height: 38px;
  padding: 9px 13px;
  border-radius: 9px;
}

.secondary-button {
  background: white;
  color: var(--navy);
  border: 1px solid var(--line);
}

.secondary-button:hover {
  background: #f7f9fa;
}

.card.selected {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.card-actions .download {
  margin-top: 0;
}

.select-button {
  background: var(--navy);
  color: white;
}

.thumbnail-reason {
  color: var(--navy-2);
  background: #f5f7f9;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.4;
  margin: 10px 0 0;
}


.workflow {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.workflow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8a98a5;
  transition: .2s ease;
}

.workflow-step .step-number {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #edf1f4;
  color: #7d8b98;
  font-weight: 800;
}

.workflow-step.active {
  color: var(--navy);
}

.workflow-step.active .step-number {
  background: var(--orange);
  color: white;
}

.workflow-step.done {
  color: var(--navy);
}

.workflow-step.done .step-number {
  background: var(--navy);
  color: white;
}

.step-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.step-copy strong {
  font-size: 14px;
}

.step-copy small {
  font-size: 11px;
  color: var(--muted);
}

.workflow-line {
  height: 1px;
  background: var(--line);
}

.primary-choice {
  width: 100%;
  min-height: 46px;
  font-size: 14px;
}

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

.card-actions .secondary-button {
  width: 100%;
}

.selection-panel {
  margin-top: 18px;
  background: white;
  border: 2px solid var(--orange);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow);
}

.selection-text {
  margin-top: 4px;
  font-weight: 800;
  font-size: 17px;
  color: var(--navy);
}

.final-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--orange);
  color: white;
  text-decoration: none;
  font-weight: 800;
  text-align: center;
}

.final-download:hover {
  filter: brightness(.96);
}

.card.selected {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
}

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

  .workflow-line {
    display: none;
  }

  .selection-panel {
    align-items: stretch;
    flex-direction: column;
  }
}


.title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.title-row h1 {
  margin-bottom: 8px;
}

.miron-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px 4px;
  margin-top: -2px;
  border: 2px solid var(--orange);
  border-radius: 6px;
  color: var(--orange);
  background: rgba(255,255,255,.72);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .04em;
  line-height: 1;
  transform: rotate(-6deg);
  box-shadow: 0 2px 0 rgba(231,120,37,.12);
}

.editor-hint {
  margin-bottom: 18px;
  padding: 13px 15px;
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  background: #f7f9fb;
  color: var(--navy-2);
  font-size: 13px;
  line-height: 1.55;
}

.editor-hint strong {
  color: var(--navy);
}

.editor-hint code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #e9eef2;
  color: var(--navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.app-footer {
  margin-top: 42px;
  padding: 20px 4px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
}

.app-footer p {
  margin: 0 0 6px;
}

.app-footer .copyright {
  color: #7f8b96;
  font-size: 11px;
}

@media (max-width: 650px) {
  .title-row {
    align-items: flex-start;
  }

  .miron-stamp {
    margin-top: 2px;
  }
}


.workflow {
  margin: 0 0 26px;
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px solid #d6dee6;
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fa 100%);
  box-shadow: 0 16px 38px rgba(16, 43, 70, 0.08);
}

.workflow-step {
  gap: 14px;
}

.workflow-step .step-number {
  width: 42px;
  height: 42px;
  font-size: 16px;
  font-weight: 850;
  box-shadow: inset 0 0 0 1px rgba(16, 43, 70, 0.06);
}

.workflow-step.active .step-number,
.workflow-step.done .step-number {
  box-shadow: none;
}

.step-copy strong {
  font-size: 16px;
}

.step-copy small {
  font-size: 12px;
}

.title-row {
  align-items: center;
  gap: 16px;
}

.miron-stamp-image {
  display: inline-block;
  width: 148px;
  max-width: 42vw;
  height: auto;
  object-fit: contain;
  transform: rotate(-7deg);
  filter: drop-shadow(0 3px 8px rgba(180, 28, 28, 0.16));
  user-select: none;
  pointer-events: none;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  margin-bottom: 18px;
}

.elapsed-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid #cfd8e1;
  background: white;
  color: var(--navy);
  font-weight: 800;
  font-size: 14px;
}

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

.phase-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f5f7f9;
  color: var(--muted);
  border: 1px solid transparent;
}

.phase-item .phase-badge {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #bcc8d3;
  background: white;
  position: relative;
  flex: 0 0 auto;
}

.phase-item.active {
  color: var(--navy);
  border-color: #d8e2ea;
  background: #eef3f7;
}

.phase-item.active .phase-badge {
  border-color: var(--orange);
  background: radial-gradient(circle at center, var(--orange) 0 45%, transparent 46% 100%), white;
}

.phase-item.done {
  color: var(--navy);
  background: #edf6f0;
  border-color: #d6e8db;
}

.phase-item.done .phase-badge {
  border-color: #2c8b57;
  background: #2c8b57;
}

.phase-item.done .phase-badge::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.phase-item.error {
  color: #8a2d27;
  background: #fdeceb;
  border-color: #f3cbc8;
}

.phase-item.error .phase-badge {
  border-color: #c94e45;
  background: #c94e45;
}

.progress-note {
  margin: 16px 0 0;
  color: var(--navy);
  font-weight: 700;
}

.placeholder-card .variant-idea {
  min-height: 64px;
}

.skeleton-block,
.skeleton-thumb {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #e6ebf0 0%, #f4f7f9 50%, #e6ebf0 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: 10px;
}

.skeleton-thumb {
  width: 93px;
  height: 140px;
  border: 1px solid #cbd4dc;
  background: linear-gradient(90deg, #f0f3f6 0%, #f8fafb 50%, #f0f3f6 100%);
  background-size: 200% 100%;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.card.is-updating {
  opacity: 0.72;
}

@media (max-width: 760px) {
  .progress-head {
    flex-direction: column;
    align-items: stretch;
  }

  .miron-stamp-image {
    width: 128px;
  }
}


/* v0.4.3.1 – image complexity selector */
.generator-options {
  margin: 18px 0 20px;
}

.complexity-control {
  margin: 0;
  padding: 0;
  border: 0;
}

.complexity-control legend {
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 750;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  overflow: hidden;
  border: 1px solid #c8d2dc;
  border-radius: 11px;
  background: white;
}

.segment-option {
  margin: 0;
  cursor: pointer;
  border-right: 1px solid #d7dee5;
}

.segment-option:last-child {
  border-right: 0;
}

.segment-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segment-option span {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 17px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  transition: background .15s ease, color .15s ease;
}

.segment-option input:checked + span {
  background: var(--navy);
  color: white;
}

.segment-option input:focus-visible + span {
  outline: 3px solid rgba(24,58,88,.18);
  outline-offset: -3px;
}

.option-hint {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 520px) {
  .segmented-control {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }

  .segment-option span {
    padding-inline: 9px;
  }
}

/* v0.4.3.4 branding */
.miron-stamp-image {
  width: 184px;
  max-width: 38vw;
  height: auto;
  object-fit: contain;
  transform: none;
  filter: none;
}
@media (max-width: 760px) {
  .miron-stamp-image {
    width: 150px;
  }
}
