/*
  AF Custom Creations - Design Studio | Stage 4 Appearance Polish
  Additive presentation only. Does not change the preview geometry, prices,
  form validation, upload handling, save/open, or Square checkout behavior.
  Safe to remove by deleting this link from design-studio.html.
*/
:root {
  --ds4-emerald: #0a3e32;
  --ds4-forest: #0d5643;
  --ds4-gold: #c59b54;
  --ds4-gold-light: #eed8a6;
  --ds4-cream: #fcf8ef;
  --ds4-paper: #fffdf8;
  --ds4-ink: #193e32;
  --ds4-muted: #51665b;
  --ds4-border: #e5d8be;
  --ds4-shadow: 0 14px 38px rgba(11,54,42,.08);
}

/* Storybook introduction: decorative only, with no moving layout regions. */
body {
  background: linear-gradient(180deg, #f7f0e3 0, #fbf7ef 280px, #f6f1e6 100%);
}
.studio-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(42px,5vw,76px) 20px clamp(42px,4vw,58px);
  background:
    radial-gradient(ellipse at 14% 12%, rgba(230,200,142,.15), transparent 37%),
    radial-gradient(ellipse at 92% 96%, rgba(111,184,144,.19), transparent 42%),
    linear-gradient(133deg, #082a23 0%, #0b3d32 53%, #165743 100%);
  border-bottom: 1px solid rgba(230,201,154,.42);
}
.studio-hero::before,
.studio-hero::after {
  position: absolute;
  content: "";
  pointer-events: none;
  z-index: -1;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(243,220,170,.18);
  background: radial-gradient(circle at 35% 28%, rgba(243,220,170,.13), transparent 70%);
  border-radius: 31% 55% 40% 48%;
}
.studio-hero::before { top: -72px; left: -80px; transform: rotate(20deg); }
.studio-hero::after { right: -55px; bottom: -95px; transform: rotate(-20deg); }
.studio-hero h1 {
  max-width: 900px;
  font: 600 clamp(38px,4.7vw,67px)/1.12 'Playfair Display',Georgia,serif;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.studio-hero em { color: #e8c88c; }
.studio-hero p:last-of-type {
  color: #e8efe5;
  font-size: clamp(14px,1.3vw,17px);
  line-height: 1.7;
  max-width: 750px;
}
.afcc-stage4-perks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin: 25px auto 0;
  max-width: 900px;
}
.afcc-stage4-perks > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(232,203,155,.3);
  background: rgba(255,252,241,.09);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 650;
  color: #fff8e9;
}
.afcc-stage4-perks > span > span { color: #f4d293; font-size: 16px; }

/* Keep the approved two-column builder and phone preview arrangement. */
.studio-wrap { max-width: 1240px; padding-top: clamp(20px,3vw,42px); }
.studio-panel {
  border: 1px solid var(--ds4-border);
  border-radius: 25px;
  background: var(--ds4-paper);
  box-shadow: var(--ds4-shadow);
}
.studio-heading { position: relative; }
.studio-heading .studio-index {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 999px;
  background: #f5ebd7;
  border: 1px solid #e5d4b1;
  padding: 6px 11px;
  color: #79602f;
  font-size: 11px;
  letter-spacing: .13em;
}
.studio-heading .studio-index::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 2px solid #b69054;
  border-radius: 3px;
  box-sizing: border-box;
  transform: rotate(-15deg);
}
.studio-heading h2 { color: var(--ds4-emerald); letter-spacing: -.018em; }
.studio-heading p { line-height: 1.65; color: var(--ds4-muted); }
.studio-layout { gap: clamp(16px,2.6vw,32px); }

/* Garment stage gets a framing treatment, not altered scaling/coordinates. */
.studio-preview-wrap { min-width: 0; }
.studio-view-tabs {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 12px;
  padding: 5px;
  border-radius: 999px;
  background: #f4ebd9;
  border: 1px solid #e3d3b7;
}
.studio-view-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 24px;
  font-size: 13px;
  min-height: 43px;
  color: #35574a;
  background: transparent;
  transition: background .2s ease, color .2s ease;
}
.studio-view-btn:hover:not(.is-active):not([aria-pressed="true"]) { background: #fffdf7; }
.studio-view-btn.is-active,
.studio-view-btn[aria-pressed="true"] {
  background: var(--ds4-emerald);
  border-color: var(--ds4-emerald);
  color: #fff;
  box-shadow: 0 5px 14px rgba(8,47,37,.18);
}
.studio-stage {
  border-radius: 22px;
  border: 1px solid #decba8;
  box-shadow: inset 0 0 0 5px rgba(255,253,247,.48), 0 12px 24px rgba(29,62,48,.08);
  background:
    radial-gradient(circle at 50% 34%, #fffaf0, transparent 60%),
    repeating-linear-gradient(0deg,transparent,transparent 39px,rgba(163,143,110,.035) 40px),
    linear-gradient(160deg,#f8f1e3,#eae0cf);
}
.garment-preview-label {
  border-radius: 999px;
  background: rgba(255,253,246,.96);
  border-color: #d8c5a3;
  box-shadow: 0 5px 14px rgba(24,52,43,.07);
}
.stage-caption {
  color: #57675d;
  line-height: 1.6;
  background: #f8f3e9;
  border: 1px solid #e7dcc8;
  border-radius: 13px;
  padding: 11px 14px;
  margin: 12px 0;
}
/* Do not style .sweatshirt, .design-canvas, .draggable-layer or sleeve
   positioning: their dimensions directly affect print-preview fidelity. */

/* Four-step guidance, with subtle puzzle-inspired indicators. */
.studio-ux-intro {
  background: linear-gradient(145deg,#fbf5e9,#f7f0df);
  border: 1px solid #e1d0ac;
  border-radius: 18px;
  padding: 17px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.studio-ux-intro > p {
  color: #184a38;
  font: 700 15px/1.45 'DM Sans',Arial,sans-serif;
}
.studio-ux-steps { gap: 8px; }
.studio-ux-tab {
  position: relative;
  min-height: 74px;
  border-radius: 14px;
  border: 1px solid #ddd0ba;
  background: rgba(255,254,249,.91);
  color: #365a49;
  font: 700 12px/1.3 'DM Sans',Arial,sans-serif;
  box-shadow: 0 2px 6px rgba(24,56,41,.035);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.studio-ux-tab:hover { border-color: #b69356; box-shadow: 0 4px 13px rgba(19,61,45,.10); }
.studio-ux-tab[aria-current="step"] {
  background: #e9f2e8;
  color: #0b4833;
  border-color: #1d6a4f;
  box-shadow: inset 0 0 0 1px #1d6a4f, 0 5px 12px rgba(20,76,56,.09);
}
.studio-ux-tab-num {
  width: 29px;
  height: 29px;
  border-radius: 9px;
  background: #f6e8c9;
  color: #67502e;
  border: 1px solid #dcc49a;
  position: relative;
  font-weight: 800;
}
.studio-ux-tab-num::after {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  right: -5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: inherit;
  border: 1px solid #dcc49a;
  transform: translateY(-50%);
}
.studio-ux-tab[aria-current="step"] .studio-ux-tab-num {
  background: #155941;
  border-color: #155941;
  color: #fff;
}
.studio-ux-head {
  background: linear-gradient(105deg, #f4eee1,#fffaf1);
  border-left: 4px solid #c29b5c;
  border-radius: 13px;
  padding: 17px 18px;
}
.studio-ux-head h3 { color: #104531; letter-spacing: -.01em; }
.studio-ux-head p { color: #50675b; line-height: 1.6; }
.studio-ux-kicker { color: #805e2e; letter-spacing: .14em; }
.studio-ux-step { gap: 13px; }
.studio-ux-advanced,
.studio-ux-optional {
  border: 1px solid #e1d8c7;
  border-radius: 14px;
  background: #fffdf9;
  box-shadow: 0 2px 8px rgba(24,64,45,.025);
}
.studio-ux-advanced > summary,
.studio-ux-optional > summary {
  min-height: 52px;
  padding: 15px 17px;
  color: #15513b;
  border-radius: 14px;
}
.studio-ux-advanced > summary:hover,
.studio-ux-optional > summary:hover { background: #faf5ec; }
.studio-ux-advanced > summary::after,
.studio-ux-optional > summary::after { color: #9b733a; font-weight: 700; }
.studio-ux-advanced[open],
.studio-ux-optional[open] { background: #fffefa; border-color: #cab489; }
.studio-ux-details-body { padding: 0 15px 16px; }
.studio-ux-helper,
.studio-ux-save-note { color: #56675f; line-height: 1.6; }
.studio-ux-save-note {
  border-radius: 13px;
  background: #fff8e8;
  border-color: #e5d2a9;
}

/* Fields and action buttons stay familiar, but become easier to read/tap. */
.studio-controls input:not([type="radio"]):not([type="checkbox"]):not([type="range"]),
.studio-controls select,
.studio-request input:not([type="checkbox"]),
.studio-request select,
.studio-request textarea,
.studio-paid-fields input,
.studio-bulk-form input:not([type="checkbox"]),
.studio-bulk-form select,
.studio-bulk-form textarea {
  border-radius: 12px;
  border-color: #cfc7b9;
  background: #fffefa;
  min-height: 44px;
  color: #163e30;
}
.studio-controls input:focus-visible,
.studio-controls select:focus-visible,
.studio-controls textarea:focus-visible,
.studio-request input:focus-visible,
.studio-request select:focus-visible,
.studio-request textarea:focus-visible,
.studio-ux-tab:focus-visible,
.studio-ux-advanced summary:focus-visible,
.studio-ux-optional summary:focus-visible,
.studio-primary:focus-visible,
.studio-secondary:focus-visible,
.studio-view-btn:focus-visible { outline: 3px solid #b88941; outline-offset: 3px; }
.studio-primary,
.studio-secondary {
  min-height: 45px;
  border-radius: 12px;
  font-family: 'DM Sans',Arial,sans-serif;
  font-weight: 750;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.studio-primary { background: #0b513d; border-color: #0b513d; }
.studio-primary:hover:not(:disabled) { background: #073b2e; box-shadow: 0 5px 13px rgba(8,54,39,.14); }
.studio-secondary { background: #fffdf8; color: #164736; border-color: #9ab4a5; }
.studio-secondary:hover:not(:disabled) { background: #edf6ee; }
.studio-primary:disabled,
.studio-secondary:disabled { cursor: not-allowed; opacity: .6; }
.studio-ux-step .studio-button-row #save-design-spec {
  background: #0b513d;
  border-color: #0b513d;
  color: #fff;
}
.range-row output { border-radius: 10px; background: #f7eedc; }

/* Optional sleeves/back use the same visual language as the guided steps. */
.sleeve-customizer,
.back-customizer {
  border-radius: 16px;
  background: #fbf8f0;
  border-color: #ddcba6;
  padding: clamp(13px,2vw,19px);
}
.sleeve-customizer h3,
.back-customizer h3 { color: #124633; }
.studio-price-panel {
  border-radius: 18px;
  border: 1px solid #d2b178;
  background: linear-gradient(155deg,#faf1dc,#fff9ec);
  padding: clamp(17px,2.2vw,24px);
  box-shadow: inset 0 1px 0 #ffffff;
}
.studio-price-panel strong { color: #0c543d; }
.studio-paid-checkout-card,
.studio-approval-card {
  border-radius: 18px;
  border: 1px solid #ceb075;
  background: linear-gradient(145deg,#f9f0df,#fff9ed);
  box-shadow: 0 10px 25px rgba(71,50,19,.06);
}
.studio-paid-checkout-card h4,
.studio-approval-card h4 { color: #0d4432; }
.studio-paid-total { border-radius: 14px; background: #fffdf7; }

/* Inspiration, group orders and requests become a unified family of cards. */
.studio-ideas-grid figure,
.studio-idea-card,
.bulk-tier-list > *,
.studio-note {
  border-radius: 16px;
}
.studio-idea-card { overflow: hidden; box-shadow: 0 6px 16px rgba(18,52,40,.07); }
.studio-bulk-panel .bulk-tier-list > * { border-color: #d6c8aa; }
.studio-note { background: #f7f0df; border-color: #dec9a2; }

/* Photo editor: keep tool controls and canvas sizing intact. */
.ds-photo-dialog {
  border-radius: 22px;
  border: 1px solid #d7c099;
  background: #fffdf8;
}
.ds-photo-heading { border-bottom: 1px solid #eadfcb; padding-bottom: 10px; }
.ds-photo-actions { gap: 10px; }

/* Phone refinements. Preserve the approved preview/edit navigation. */
@media (max-width: 850px) {
  .studio-wrap { padding: 20px 13px 56px; }
  .studio-panel { border-radius: 20px; padding: 18px; }
  .studio-layout { gap: 20px; }
  .studio-ux-see-preview,
  .studio-ux-back-edit {
    border-radius: 12px;
    border: 1px solid #bed4c0;
    background: #edf5eb;
    color: #0f573f;
    min-height: 46px;
    font-size: 13px;
  }
  .studio-ux-see-preview:active,
  .studio-ux-back-edit:active { background: #dceadb; }
}
@media (max-width: 600px) {
  .studio-hero { padding: 38px 15px 39px; }
  .studio-hero h1 { font-size: clamp(34px,9vw,46px); }
  .afcc-stage4-perks { gap: 7px; }
  .afcc-stage4-perks > span { padding: 8px 11px; font-size: 11.5px; }
  .studio-wrap { padding: 16px 10px 48px; }
  .studio-panel { padding: 15px; margin-bottom: 16px; border-radius: 18px; }
  .studio-stage { border-radius: 16px; }
  .studio-ux-intro { padding: 10px; }
  .studio-ux-steps { gap: 5px; }
  .studio-ux-tab { min-height: 68px; border-radius: 11px; font-size: 11px; padding: 7px 2px; }
  .studio-ux-tab-num { width: 24px; height: 24px; font-size: 12px; border-radius: 7px; }
  .studio-ux-head { padding: 14px; }
  .studio-ux-head h3 { font-size: 22px; }
  .studio-ux-advanced > summary,
  .studio-ux-optional > summary { padding: 13px; }
  .studio-ux-details-body { padding: 0 11px 13px; }
  .studio-view-btn { padding: 10px 22px; }
  .studio-paid-checkout-card,
  .studio-approval-card,
  .studio-price-panel { padding: 15px; }
  .studio-ux-step .studio-button-row { gap: 8px; }
  .studio-ux-actions button { flex-basis: 100%; }
}
@media (max-width: 380px) {
  .studio-ux-tab { font-size: 10px; min-height: 66px; }
  .studio-ux-tab-num { width: 22px; height: 22px; }
  .studio-hero h1 { font-size: 33px; }
  .afcc-stage4-perks > span { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-ux-tab, .studio-primary, .studio-secondary, .studio-view-btn { transition: none; }
}
