/* Lapelly — Headshot Studio & Surgical Retouch Toolkit styles.
   Builds directly on /style.css tokens. Editorial studio aesthetic:
   clean slate/navy ink, warm terracotta highlight (#D97757), dark
   slate primary action (#111827), sage zero-subscription trust pills. */

:root {
  --st-terra: #D97757;
  --st-terra-deep: #B85C3E;
  --st-terra-soft: #FDF5F1;
  --st-terra-border: #EAB6A3;
  --st-dark: #111827;
  --st-dark-hover: #1F2937;
  --st-sage: #2E6B47;
  --st-sage-bg: #EAF5EE;
  --st-sage-pill: #6C8B74;
  --st-amber: #B45309;
  --st-amber-bg: #FEF6E7;
  --st-paper: #FAF8F6;
}

/* ── Active nav indicator ─────────────────────────────────────────── */
.nav-links a.is-active {
  color: var(--ink);
  font-weight: 700;
}

/* ── Studio Top Bar / Compact Hero ────────────────────────────────── */
.st-hero {
  background: linear-gradient(180deg, var(--bg-tint) 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--line);
  padding: 28px 0 24px;
}
.st-hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.st-hero h1 {
  font-size: clamp(1.65rem, 3.2vw, 2.3rem);
  line-height: 1.12;
  margin: 10px 0 8px;
}
.st-hero p.st-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 600px;
}
.st-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.st-micro-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  background: #FFFFFF;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}
.st-micro-pill.sage {
  background: var(--st-sage-bg);
  border-color: #C7E3D1;
  color: var(--st-sage);
}

/* ── Status Toast / Banner ────────────────────────────────────────── */
.st-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 0;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #FFFFFF;
}
.st-banner.show { display: flex; }
.st-banner.ok {
  background: var(--st-sage-bg);
  border-color: #BFE2CC;
  color: #1F5135;
}
.st-banner.err {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #991B1B;
}
.st-banner.info {
  background: var(--bg-tint);
  border-color: #C7DBFC;
  color: var(--navy);
}
.st-banner-close {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  opacity: .7;
}
.st-banner-close:hover { opacity: 1; }

/* ── Two-Column Workbench ─────────────────────────────────────────── */
.st-main {
  padding: 28px 0 64px;
  background: var(--bg-soft);
}
.st-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(350px, 430px);
  gap: 28px;
  align-items: start;
}
.st-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.st-panel {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.st-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.st-step-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .98rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.st-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--bg-tint);
  color: var(--blue-deep);
  font-size: .78rem;
  font-weight: 800;
}
.st-panel-meta {
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
}

/* ── Identity Vault (1–4 Selfies) ─────────────────────────────────── */
.st-vault-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.st-vault-badge.ready {
  background: var(--st-sage-bg);
  color: var(--st-sage);
  border-color: #C3E3CE;
}
.st-vault-drop {
  border: 1.5px dashed #C7D3E4;
  border-radius: 14px;
  padding: 14px;
  background: var(--bg-soft);
  transition: border-color .15s, background .15s;
}
.st-vault-drop.drag {
  border-color: var(--blue);
  background: var(--bg-tint);
}
.st-vault-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.st-vault-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1.5px dashed #CBD5E1;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  overflow: hidden;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  transition: border-color .15s, background .15s, transform .12s;
  padding: 6px;
  text-align: center;
}
.st-vault-slot:hover {
  border-color: var(--blue);
  color: var(--blue-deep);
  background: var(--bg-tint);
}
.st-vault-slot.filled {
  border-style: solid;
  border-color: #C3E3CE;
  padding: 0;
  cursor: default;
}
.st-vault-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.st-vault-check {
  position: absolute;
  bottom: 6px;
  left: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--st-sage);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}
.st-vault-rm {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(17, 24, 39, .76);
  color: #FFFFFF;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.st-vault-rm:hover { background: #DC2626; }
.st-vault-plus {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--bg-tint);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 800;
}
.st-privacy-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 11px;
  font-size: .79rem;
  color: var(--ink-soft);
}
.st-privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--st-sage);
  font-weight: 700;
}

/* ── Style Fit Segmented Control ──────────────────────────────────── */
.st-seg {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
}
.st-seg button {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: .84rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.st-seg button.active {
  background: var(--st-dark);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(17, 24, 39, .18);
}

/* ── Filter Pills ─────────────────────────────────────────────────── */
.st-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 13px;
}
.st-filter-pill {
  border: 1px solid var(--line);
  background: #FFFFFF;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: .8rem;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .14s;
}
.st-filter-pill:hover {
  border-color: #B8C7DD;
  color: var(--ink);
}
.st-filter-pill.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #FFFFFF;
}

/* ── Pose Grid ────────────────────────────────────────────────────── */
.st-pose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 10px;
  max-height: 368px;
  overflow-y: auto;
  padding: 2px 4px 4px 2px;
}
.st-pose-card {
  position: relative;
  border: 2px solid var(--line);
  border-radius: 13px;
  background: var(--bg-soft);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  font-family: inherit;
  transition: border-color .14s, transform .12s, box-shadow .14s;
}
.st-pose-card:hover {
  border-color: #A8BEE0;
  transform: translateY(-1px);
}
.st-pose-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .16);
}
.st-pose-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #E9EEF5;
  overflow: hidden;
}
.st-pose-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.st-pose-cap {
  padding: 7px 8px 8px;
  background: #FFFFFF;
  font-size: .74rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  min-height: 36px;
  display: flex;
  align-items: center;
}
.st-card-check {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .36);
}
.st-pose-card.selected .st-card-check,
.st-attire-card.selected .st-card-check {
  display: flex;
}

/* ── Attire Grid ──────────────────────────────────────────────────── */
.st-attire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
  max-height: 290px;
  overflow-y: auto;
  padding: 2px 4px 4px 2px;
}
.st-attire-card {
  position: relative;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #FFFFFF;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-family: inherit;
  transition: border-color .14s, transform .12s, box-shadow .14s;
}
.st-attire-card:hover {
  border-color: #A8BEE0;
  transform: translateY(-1px);
}
.st-attire-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.st-attire-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #F1F4F9;
  overflow: hidden;
}
.st-attire-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.st-attire-cap {
  padding: 6px 8px 7px;
  font-size: .73rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.24;
  min-height: 34px;
  display: flex;
  align-items: center;
}
.st-attire-note {
  font-size: .78rem;
  color: var(--muted);
  margin: 0 0 10px;
}

/* ── Backdrop Swatch Pills ────────────────────────────────────────── */
.st-bg-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.st-bg-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px 7px 9px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #FFFFFF;
  color: var(--ink);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .14s, box-shadow .14s, background .14s;
}
.st-bg-pill:hover {
  border-color: #9FB5D6;
  background: var(--bg-soft);
}
.st-bg-pill.selected {
  border-color: var(--blue);
  background: var(--bg-tint);
  color: var(--navy);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}
.st-bg-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(14, 28, 51, .18);
  flex-shrink: 0;
}

/* ── Primary Generate Bar ─────────────────────────────────────────── */
.st-gen-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.st-gen-btn {
  width: 100%;
  padding: 16px 24px;
  border-radius: 14px;
  border: none;
  background: var(--blue);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 22px rgba(37, 99, 235, .26);
  transition: background .15s, transform .12s, box-shadow .15s;
}
.st-gen-btn:hover:not(:disabled) {
  background: var(--blue-deep);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .32);
}
.st-gen-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.st-gen-sub {
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
  margin: 0;
}

/* ── Right Column — Sticky Live Studio Stage ──────────────────────── */
.st-stage-col {
  position: sticky;
  top: 82px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.st-stage-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
}
.st-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.st-stage-title {
  font-size: .86rem;
  font-weight: 800;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.st-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 800;
  background: var(--bg-soft);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.st-status-pill.preview {
  background: var(--st-amber-bg);
  color: var(--st-amber);
  border-color: #FCD34D;
}
.st-status-pill.unlocked {
  background: var(--st-sage-bg);
  color: var(--st-sage);
  border-color: #A7D7B9;
}
.st-status-pill.uhd {
  background: #EEF2FF;
  color: #3730A3;
  border-color: #C7D2FE;
}

.st-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  aspect-ratio: 3 / 4;
  max-height: 460px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .22s ease;
}
.st-frame.square {
  aspect-ratio: 1 / 1;
}
.st-frame img.st-stage-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.st-frame.is-recipe-preview {
  padding: 18px;
}
.st-frame.is-recipe-preview img.st-stage-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(14, 28, 51, .16);
}
.st-frame-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 28, 51, .68);
  backdrop-filter: blur(5px);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
}
.st-frame-overlay .spinner {
  border-color: rgba(255, 255, 255, .28);
  border-top-color: #FFFFFF;
}
.st-frame-overlay strong {
  font-size: .98rem;
}
.st-frame-overlay span {
  font-size: .82rem;
  color: rgba(255, 255, 255, .82);
  max-width: 260px;
}
.st-frame-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, .76);
  color: #FFFFFF;
  font-size: .73rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

/* Recipe summary chips */
.st-recipe-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.st-recipe-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: .75rem;
  font-weight: 700;
  color: var(--ink-soft);
}

/* Post-generation Action Bar */
.st-action-bar {
  display: none;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 13px;
}
.st-action-bar.show {
  display: grid;
}
.st-action-bar.two-col {
  grid-template-columns: 1fr auto;
}
.st-retouch-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--st-terra-border);
  background: var(--st-terra-soft);
  color: var(--st-terra-deep);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.st-retouch-trigger:hover {
  background: #FCEAE2;
  border-color: var(--st-terra);
  transform: translateY(-1px);
}
.st-upscale-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #FFFFFF;
  color: var(--ink);
  font-family: inherit;
  font-size: .84rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.st-upscale-trigger:hover:not(:disabled) {
  background: var(--bg-soft);
  border-color: #B6C5DC;
}
.st-upscale-trigger:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* ── High-AOV One-Time Unlock Panel (pro_04 Right Screen) ─────────── */
.st-unlock-panel {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.st-unlock-panel.show { display: block; }
.st-unlock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.st-unlock-head h2,
.st-unlock-head h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}
.st-nosub-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--st-sage-pill);
  color: #FFFFFF;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.st-credit-fast {
  display: none;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 13px;
  background: var(--st-sage-bg);
  border: 1px solid #BFE2CC;
}
.st-credit-fast.show { display: block; }
.st-credit-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  background: var(--st-sage);
  color: #FFFFFF;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  transition: filter .14s;
}
.st-credit-btn:hover:not(:disabled) { filter: brightness(1.06); }
.st-credit-btn:disabled { opacity: .6; cursor: not-allowed; }

.st-pack-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.st-pack-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #FFFFFF;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.st-pack-card:hover {
  border-color: #CBD5E1;
}
.st-pack-card.selected {
  border-color: var(--st-terra);
  background: var(--st-terra-soft);
  box-shadow: 0 0 0 2px rgba(217, 119, 87, .14);
}
.st-pack-card input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--st-terra);
  flex-shrink: 0;
}
.st-pack-body { flex: 1; min-width: 0; }
.st-pack-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.st-pack-name {
  font-size: .9rem;
  font-weight: 800;
  color: var(--ink);
}
.st-pack-price {
  font-size: .92rem;
  font-weight: 800;
  color: var(--ink);
}
.st-pack-desc {
  margin: 4px 0 0;
  font-size: .78rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.st-pack-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--st-terra);
  color: #FFFFFF;
  margin-left: 6px;
  vertical-align: middle;
}

.st-dark-cta {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: none;
  background: var(--st-dark);
  color: #FFFFFF;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, transform .1s;
}
.st-dark-cta:hover:not(:disabled) {
  background: var(--st-dark-hover);
  transform: translateY(-1px);
  text-decoration: none;
  color: #FFFFFF;
}
.st-dark-cta:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}
.st-checkout-note {
  text-align: center;
  font-size: .75rem;
  color: var(--muted);
  margin: 9px 0 0;
}

/* ── Unlocked Download Panel ──────────────────────────────────────── */
.st-dl-panel {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.st-dl-panel.show { display: block; }
.st-dl-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.st-dl-secondary {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #FFFFFF;
  color: var(--ink);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: background .14s, border-color .14s;
}
.st-dl-secondary:hover:not(:disabled) {
  background: var(--bg-soft);
  border-color: #B8C7DD;
  text-decoration: none;
}
.st-dl-secondary:disabled { opacity: .6; cursor: not-allowed; }
.st-retouch-quota-note {
  font-size: .78rem;
  color: var(--st-sage);
  font-weight: 700;
  text-align: center;
  margin: 9px 0 0;
}

/* ── Bottom B2B Callout Card ──────────────────────────────────────── */
.st-b2b-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #E2EBF6;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .14s, box-shadow .14s;
}
.st-b2b-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: #FFFFFF;
}
.st-b2b-card strong {
  display: block;
  color: #FFFFFF;
  font-size: .9rem;
  margin-bottom: 3px;
}
.st-b2b-card span {
  display: block;
  font-size: .8rem;
  color: #B4C6DE;
  line-height: 1.4;
}
.st-b2b-arrow {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

/* ════════════════════════════════════════════════════════════════════
   OSRetouch — Surgical Inpaint & Micro-Rescue Modal (pro_04 Left)
   Reusable across /headshots and /teams
   ════════════════════════════════════════════════════════════════════ */
.os-rt-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(14, 24, 42, .62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.os-rt-modal {
  width: 100%;
  max-width: 650px;
  max-height: 92vh;
  background: #FFFFFF;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 28px 80px rgba(10, 22, 46, .34);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font);
  color: var(--ink);
}
.os-rt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px;
  background: var(--st-paper);
  border-bottom: 1px solid #EAE6E1;
}
.os-rt-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #E5E0DA;
  background: #FFFFFF;
  color: var(--ink);
  font-size: 1.15rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.os-rt-close:hover { background: var(--bg-soft); }
.os-rt-head-title {
  text-align: center;
  flex: 1;
  min-width: 0;
}
.os-rt-head-title b {
  display: block;
  font-size: .95rem;
  font-weight: 800;
  color: var(--ink);
}
.os-rt-head-title span {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  font-weight: 600;
}
.os-rt-quota {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  background: var(--st-sage-bg);
  color: var(--st-sage);
  border: 1px solid #C5E4D0;
  white-space: nowrap;
}
.os-rt-quota.paid {
  background: var(--st-amber-bg);
  color: var(--st-amber);
  border-color: #FCD34D;
}

.os-rt-body {
  padding: 18px 22px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.os-rt-subhead {
  margin: 0;
  font-size: 1.24rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Smart mask tools */
.os-rt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.os-rt-tool-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.os-rt-tool-btn {
  border: 1px solid var(--line);
  background: #FFFFFF;
  color: var(--ink);
  font-family: inherit;
  font-size: .76rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .13s, background .13s;
}
.os-rt-tool-btn:hover {
  border-color: var(--st-terra);
  background: var(--st-terra-soft);
  color: var(--st-terra-deep);
}
.os-rt-slider-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.os-rt-slider-wrap input[type="range"] {
  width: 78px;
  accent-color: var(--st-terra);
}

/* Interactive mask canvas stage */
.os-rt-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #F1EFEA;
  border-radius: 16px;
  border: 1px solid #E5E0DA;
  padding: 10px;
  min-height: 260px;
}
.os-rt-canvas-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 380px;
  border-radius: 12px;
  overflow: hidden;
  line-height: 0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  box-shadow: 0 8px 24px rgba(14, 28, 51, .14);
}
.os-rt-canvas-wrap img {
  display: block;
  max-width: 100%;
  max-height: 380px;
  width: auto;
  height: auto;
  pointer-events: none;
}
.os-rt-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}
.os-rt-pill-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(17, 24, 39, .78);
  color: #FFFFFF;
  font-size: .74rem;
  font-weight: 700;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.os-rt-pill-tag.fixed {
  background: rgba(17, 24, 39, .82);
}
.os-rt-pill-tag .os-rt-chk {
  color: #6EE7B7;
  margin-left: 3px;
}
.os-rt-hint {
  margin: -6px 0 0;
  font-size: .78rem;
  color: var(--muted);
}

/* Upscale mode info box */
.os-rt-upscale-info {
  display: none;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-tint);
  border: 1px solid #C7DBFC;
  font-size: .84rem;
  color: var(--navy);
  font-weight: 600;
}
.os-rt-upscale-info.show { display: block; }

/* Text refinement input */
.os-rt-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid #DCD7D0;
  background: #FFFFFF;
  font-family: inherit;
  font-size: .92rem;
  color: var(--ink);
  transition: border-color .14s, box-shadow .14s;
}
.os-rt-input:focus {
  outline: none;
  border-color: var(--st-terra);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, .16);
}

/* 1-Tap Rescue Chips */
.os-rt-chips-label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
.os-rt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.os-rt-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid #DDD8D1;
  background: #FFFFFF;
  color: var(--ink);
  font-family: inherit;
  font-size: .83rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .14s;
}
.os-rt-chip:hover {
  border-color: var(--st-terra);
  background: var(--st-terra-soft);
}
.os-rt-chip.active {
  background: var(--st-terra);
  border-color: var(--st-terra);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(217, 119, 87, .28);
}

/* Inline alert / 402 upsell inside modal */
.os-rt-alert {
  display: none;
  padding: 13px 15px;
  border-radius: 12px;
  font-size: .85rem;
  line-height: 1.45;
  border: 1px solid #F3C4B4;
  background: var(--st-terra-soft);
  color: #7C2D12;
}
.os-rt-alert.show { display: block; }
.os-rt-alert strong { display: block; margin-bottom: 4px; color: var(--ink); }
.os-rt-alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.os-rt-alert-btn {
  padding: 8px 14px;
  border-radius: 9px;
  border: none;
  background: var(--st-dark);
  color: #FFFFFF;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}
.os-rt-alert-btn.ghost {
  background: #FFFFFF;
  color: var(--ink);
  border: 1px solid var(--line);
}

/* Submit CTA */
.os-rt-submit {
  width: 100%;
  padding: 14px 20px;
  border-radius: 13px;
  border: none;
  background: var(--st-dark);
  color: #FFFFFF;
  font-family: inherit;
  font-size: .96rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .14s, transform .1s;
}
.os-rt-submit:hover:not(:disabled) {
  background: var(--st-dark-hover);
  transform: translateY(-1px);
}
.os-rt-submit:disabled {
  opacity: .58;
  cursor: not-allowed;
  transform: none;
}

/* Processing overlay inside modal */
.os-rt-busy {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, .74);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  z-index: 4;
}
.os-rt-busy.show { display: flex; }
.os-rt-busy .spinner {
  border-color: rgba(255, 255, 255, .28);
  border-top-color: #FFFFFF;
}

/* Side-by-side comparison view (pro_04 Mask Defect vs Fixed ✓) */
.os-rt-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.os-rt-compare-pane {
  position: relative;
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid #E5E0DA;
  background: #EAE7E2;
  line-height: 0;
}
.os-rt-compare-pane img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.os-rt-compare-pane canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.os-rt-compare-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.os-rt-keep-btn {
  padding: 13px 18px;
  border-radius: 12px;
  border: none;
  background: var(--st-dark);
  color: #FFFFFF;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
}
.os-rt-keep-btn:hover { background: var(--st-dark-hover); }
.os-rt-retry-btn {
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #FFFFFF;
  color: var(--ink);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
}
.os-rt-retry-btn:hover { background: var(--bg-soft); }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .st-workbench {
    grid-template-columns: 1fr;
  }
  .st-stage-col {
    position: static;
  }
}
@media (max-width: 600px) {
  .st-panel { padding: 16px; }
  .st-vault-grid { gap: 8px; }
  .st-pose-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 340px; }
  .st-attire-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 270px; }
  .st-action-bar.two-col { grid-template-columns: 1fr; }
  .os-rt-modal { max-height: 96vh; border-radius: 18px; }
  .os-rt-body { padding: 14px 16px 18px; }
  .os-rt-compare-actions { grid-template-columns: 1fr; }
  .os-rt-quota { display: none; }
}
