/* Render approval keeps the portal's warm architectural editorial language. */
body[data-route="studio"] .render-selection-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid var(--arch-rule-soft);
  border-left: 3px solid var(--arch-clay);
  background: var(--arch-paper-raised);
  color: var(--arch-ink);
}

body[data-route="studio"] .render-selection-intro strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.2;
}

body[data-route="studio"] .render-selection-intro p {
  max-width: 680px;
  margin: 6px 0 0;
  color: var(--arch-muted);
  font-size: 12px;
  line-height: 1.55;
}

body[data-route="studio"] .render-selection-intro > span {
  flex: 0 0 auto;
  color: var(--arch-clay-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body[data-route="studio"] .variant-gallery.render-direction-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

body[data-route="studio"] .render-style-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--arch-rule-soft);
  background: var(--arch-paper-deep);
}

body[data-route="studio"] .render-style-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 2px 7px;
  border-bottom: 1px solid var(--arch-rule-soft);
}

body[data-route="studio"] .render-style-heading strong {
  color: var(--arch-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
}

body[data-route="studio"] .render-style-heading span {
  color: var(--arch-muted);
  font-size: 8px;
  line-height: 1.3;
  text-align: right;
}

body[data-route="studio"] .variant-choice-card {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--arch-rule);
  background: var(--arch-paper-raised);
  color: var(--arch-ink);
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

body[data-route="studio"] .variant-choice-card:hover {
  border-color: var(--arch-clay);
  transform: translateY(-1px);
}

body[data-route="studio"] .variant-choice-card.is-selected {
  border-color: var(--arch-clay-dark);
  box-shadow: inset 0 0 0 2px var(--arch-clay-dark);
}

body[data-route="studio"] .variant-choice-card.is-approved {
  box-shadow: inset 0 0 0 2px var(--arch-moss);
}

body[data-route="studio"] .variant-choice-control {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 8px;
  border-bottom: 1px solid var(--arch-rule-soft);
  background: rgba(247, 242, 233, .95);
}

body[data-route="studio"] .variant-choice-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

body[data-route="studio"] .variant-choice-radio {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 1px solid var(--arch-rule);
  border-radius: 50%;
  background: var(--arch-paper-raised);
}

body[data-route="studio"] .variant-choice-control input:checked + .variant-choice-radio {
  border: 4px solid var(--arch-clay-dark);
}

body[data-route="studio"] .variant-choice-control input:focus-visible + .variant-choice-radio {
  outline: 3px solid var(--arch-clay-soft);
  outline-offset: 2px;
}

body[data-route="studio"] .variant-choice-state {
  color: var(--arch-ink-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

body[data-route="studio"] .variant-choice-card.is-selected .variant-choice-state {
  color: var(--arch-clay-dark);
}

body[data-route="studio"] .variant-choice-card.is-approved .variant-choice-state {
  color: var(--arch-moss);
}

body[data-route="studio"] .variant-choice-card .variant-result-meta {
  display: grid;
  gap: 2px;
  padding: 10px 9px 4px;
}

body[data-route="studio"] .variant-choice-cost {
  display: block;
  min-height: 31px;
  padding: 4px 9px;
  color: var(--arch-clay-dark);
  font-size: 8.5px;
  font-weight: 750;
  line-height: 1.35;
}

body[data-route="studio"] .variant-selection-unavailable {
  padding: 8px 9px;
  border-top: 1px solid var(--arch-rule-soft);
  color: var(--arch-clay-dark);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.4;
}

body[data-route="studio"] .render-selection-dock {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid var(--arch-rule);
  background: var(--arch-ink);
  color: var(--arch-paper-raised);
}

body[data-route="studio"] .render-selection-dock[hidden] { display: none; }

body[data-route="studio"] .render-selection-dock-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

body[data-route="studio"] .render-selection-dock-copy strong {
  overflow: hidden;
  color: var(--arch-paper-raised);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-route="studio"] .render-selection-dock-copy span {
  color: #c7beb2;
  font-size: 10px;
  line-height: 1.35;
}

body[data-route="studio"] .render-selection-dock .btn {
  width: auto;
  min-width: 176px;
  min-height: 44px;
  margin: 0;
}

.render-review-sheet { color: var(--arch-ink); }
.render-review-image {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border: 1px solid var(--arch-rule-soft);
}
.render-review-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 12px 0 0;
  background: var(--arch-rule-soft);
}
.render-review-facts > div { padding: 11px; background: var(--arch-paper-raised); }
.render-review-facts dt {
  color: var(--arch-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.render-review-facts dd { margin: 4px 0 0; color: var(--arch-ink); font-size: 12px; font-weight: 750; }
.render-review-cost {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--arch-moss);
  background: rgba(91, 107, 77, .09);
}
.render-review-cost strong { color: var(--arch-moss); font-size: 12px; }
.render-review-cost p,
.render-review-disclosure { margin: 5px 0 0; color: var(--arch-ink-soft); font-size: 11px; line-height: 1.5; }
.render-review-disclosure { padding-top: 10px; border-top: 1px solid var(--arch-rule-soft); }
.render-review-actions { display: flex; gap: 8px; margin-top: 14px; }
.render-review-actions .btn { flex: 1; min-height: 48px; }

body[data-route="quote"] .render-approved-badge {
  display: block;
  width: max-content;
  margin-bottom: 6px;
  padding: 4px 6px;
  background: rgba(91, 107, 77, .12);
  color: var(--arch-moss);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

body.render-loading-active { overflow: hidden; }

.render-loading-overlay {
  position: fixed;
  z-index: 1400;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(28, 25, 21, .78);
  backdrop-filter: blur(8px);
}

.render-loading-panel {
  width: min(860px, 100%);
  max-height: min(760px, calc(100dvh - 48px));
  overflow: auto;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(247, 242, 233, .34);
  background: var(--arch-paper-raised);
  box-shadow: 0 28px 80px rgba(12, 10, 8, .42);
  color: var(--arch-ink);
}

.render-loading-kicker {
  color: var(--arch-clay-dark);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .16em;
}

.render-loading-panel h2 {
  margin: 9px 0 0;
  font: 400 clamp(30px, 5vw, 48px)/1 Georgia, "Times New Roman", serif;
  letter-spacing: -.035em;
}

.render-loading-panel > p {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--arch-muted);
  font-size: 12px;
  line-height: 1.55;
}

.render-loading-summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 25px;
  font-size: 11px;
}

.render-loading-summary span { color: var(--arch-muted); font-variant-numeric: tabular-nums; }

.render-loading-progress {
  height: 5px;
  margin-top: 9px;
  overflow: hidden;
  background: var(--arch-paper-deep);
}

.render-loading-progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--arch-clay);
  transition: width .28s ease;
}

.render-loading-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--arch-rule-soft);
  font-size: 10px;
}

.render-loading-section-heading > strong {
  color: var(--arch-ink);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.render-loading-section-heading > span { color: var(--arch-muted); }
.render-loading-queue-heading { margin-top: 18px; }

.render-loading-stages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px;
  list-style: none;
  background: var(--arch-rule-soft);
}

.render-loading-stage {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-width: 0;
  min-height: 72px;
  padding: 11px 12px;
  background: var(--arch-paper);
}

.render-loading-stage-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--arch-rule);
  color: var(--arch-muted);
  font: 800 9px/1 Inter, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.render-loading-stage-copy { display: grid; gap: 4px; min-width: 0; }
.render-loading-stage-copy strong { font-size: 10px; line-height: 1.35; }
.render-loading-stage-copy small { color: var(--arch-muted); font-size: 8.5px; line-height: 1.45; }
.render-loading-stage-state {
  color: var(--arch-muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.render-loading-stage.is-active { box-shadow: inset 2px 0 var(--arch-clay); }
.render-loading-stage.is-active .render-loading-stage-number { border-color: var(--arch-clay); background: var(--arch-clay-soft); color: var(--arch-clay-dark); }
.render-loading-stage.is-active .render-loading-stage-state { color: var(--arch-clay-dark); }
.render-loading-stage.is-done .render-loading-stage-number { border-color: var(--arch-moss); background: var(--arch-moss-soft); color: var(--arch-moss); }
.render-loading-stage.is-done .render-loading-stage-state { color: var(--arch-moss); }
.render-loading-stage.is-partial { box-shadow: inset 2px 0 var(--arch-clay-dark); }
.render-loading-stage.is-partial .render-loading-stage-number { border-color: var(--arch-clay-dark); background: var(--arch-clay-soft); color: var(--arch-clay-dark); }
.render-loading-stage.is-partial .render-loading-stage-state { color: var(--arch-clay-dark); }
.render-loading-stage.is-error { box-shadow: inset 2px 0 var(--arch-error); }
.render-loading-stage.is-error .render-loading-stage-number { border-color: var(--arch-error); color: var(--arch-error); }
.render-loading-stage.is-error .render-loading-stage-state { color: var(--arch-error); }

.render-loading-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 19px;
}

.render-loading-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--arch-rule-soft);
  background: var(--arch-paper);
}

.render-loading-thumb {
  position: relative;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  background: var(--arch-paper-deep);
}

.render-loading-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.62) 45%, transparent 65%);
  transform: translateX(-110%);
}

.render-loading-item.is-preparing .render-loading-thumb::before,
.render-loading-item.is-active .render-loading-thumb::before { animation: render-sweep 1.25s ease-in-out infinite; }

.render-loading-thumb i {
  width: 14px;
  height: 14px;
  border: 1px solid var(--arch-rule);
  border-top-color: var(--arch-clay);
  border-radius: 50%;
}

.render-loading-item.is-active .render-loading-thumb i { animation: render-spin .9s linear infinite; }
.render-loading-item.is-done .render-loading-thumb { background: var(--arch-moss-soft); }
.render-loading-item.is-done .render-loading-thumb i { border: 0; border-radius: 0; transform: rotate(-45deg); width: 16px; height: 9px; border-left: 2px solid var(--arch-moss); border-bottom: 2px solid var(--arch-moss); }
.render-loading-item.is-error .render-loading-thumb { background: var(--arch-clay-soft); }
.render-loading-item.is-error .render-loading-thumb i { border: 0; border-radius: 0; }
.render-loading-item.is-error .render-loading-thumb i::after { content: '!'; color: var(--arch-error); font: 800 17px/1 Georgia, serif; }

.render-loading-item-copy { display: grid; min-width: 0; }
.render-loading-item-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.render-loading-item-copy small { overflow: hidden; color: var(--arch-muted); font-size: 8.5px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.render-loading-state { align-self: end; color: var(--arch-muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.render-loading-item.is-active .render-loading-state { color: var(--arch-clay-dark); }
.render-loading-item.is-done .render-loading-state { color: var(--arch-moss); }
.render-loading-item.is-error .render-loading-state { color: var(--arch-error); }
.render-loading-helper { min-height: 18px; padding-top: 12px; border-top: 1px solid var(--arch-rule-soft); }

body[data-route="studio"] .studio-draft-action {
  width: auto;
  min-height: 44px;
  padding: 10px 14px;
}

body[data-route="studio"] .studio-draft-status {
  margin-right: auto;
  color: var(--arch-muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.draft-review-sheet { color: var(--arch-ink); }
.draft-review-sheet dl { display: grid; gap: 1px; margin: 0; background: var(--arch-rule-soft); }
.draft-review-sheet dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 11px 12px; background: var(--arch-paper-raised); }
.draft-review-sheet dt { color: var(--arch-muted); font-size: 10px; }
.draft-review-sheet dd { margin: 0; font-size: 11px; font-weight: 750; text-align: right; }
.draft-review-sheet > p { color: var(--arch-muted); font-size: 11px; line-height: 1.5; }
.draft-review-actions { display: flex; gap: 8px; margin-top: 14px; }
.draft-review-actions .btn { flex: 1; min-height: 48px; }

@keyframes render-sweep { to { transform: translateX(110%); } }
@keyframes render-spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  body[data-route="studio"] .variant-gallery.render-direction-groups { grid-template-columns: 1fr; }
  body[data-route="studio"] .render-style-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .render-loading-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body[data-route="studio"] .render-selection-intro { display: grid; padding: 14px; }
  body[data-route="studio"] .render-selection-intro > span { justify-self: start; }
  body[data-route="studio"] .render-style-group { grid-template-columns: 1fr; padding: 7px; }
  body[data-route="studio"] .render-selection-dock {
    position: sticky;
    z-index: 32;
    bottom: calc(92px + env(safe-area-inset-bottom));
    display: grid;
    gap: 10px;
    margin-inline: -4px;
    box-shadow: 0 -8px 24px rgba(33, 31, 27, .18);
  }
  body[data-route="studio"] .render-selection-dock[hidden] { display: none; }
  body[data-route="studio"] .render-selection-dock .btn { width: 100%; min-width: 0; }
  .render-review-facts { grid-template-columns: 1fr; }
  .render-review-actions { display: grid; }
  .render-review-actions .btn { width: 100%; }
  .render-loading-overlay { place-items: end center; padding: 0; }
  .render-loading-panel { width: 100%; max-height: min(88dvh, 720px); padding: 22px 16px calc(22px + env(safe-area-inset-bottom)); border-width: 1px 0 0; }
  .render-loading-grid { grid-template-columns: 1fr; }
  .render-loading-stages { grid-template-columns: 1fr; }
  .render-loading-stage { min-height: 0; }
  .render-loading-stage-copy small { font-size: 9px; }
  .render-loading-item { padding: 8px; }
  .render-loading-summary { align-items: flex-end; }
  body[data-route="studio"] .studio-draft-status { flex-basis: 100%; order: 3; margin: 0; }
  .draft-review-actions { display: grid; }
  .draft-review-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-route="studio"] .variant-choice-card { transition: none; }
  .render-loading-progress > span { transition: none; }
  .render-loading-item.is-preparing .render-loading-thumb::before,
  .render-loading-item.is-active .render-loading-thumb::before,
  .render-loading-item.is-active .render-loading-thumb i { animation: none; }
}
