:root {
  --ink: #211d1a;
  --muted: #706860;
  --paper: #f5efe6;
  --cream: #fffaf3;
  --white: #fffdf9;
  --coral: #ff6544;
  --coral-dark: #dd4d2e;
  --yellow: #ffd45f;
  --green: #285a54;
  --green-dark: #183d39;
  --blue: #6375a5;
  --product-image-background: #faf7ef;
  --line: rgba(55, 44, 37, 0.14);
  --shadow: 0 26px 80px rgba(58, 40, 28, 0.14);
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--paper); }
body.modal-open { overflow: hidden; }
main { min-width: 0; }
.landing { overflow: hidden; }
button, textarea, input, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.68; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.site-header {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 clamp(20px, 4vw, 64px);
  position: relative;
  z-index: 40;
  border-bottom: 1px solid transparent;
  background: rgba(245, 239, 230, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 800 24px/1 ui-rounded, "Arial Rounded MT Bold", sans-serif;
  letter-spacing: -1.1px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: block;
  flex: none;
  transform: rotate(-2deg);
  transition: transform 180ms ease;
}
.brand:hover .brand-mark { transform: rotate(2deg) scale(1.04); }

.header-nav { display: flex; align-items: center; justify-content: center; gap: 30px; }
.nav-link, .back-link, .text-button, .bag-heading button, .project-strip-heading button {
  appearance: none;
  border: 0;
  background: transparent;
}
.nav-link {
  min-height: 44px;
  padding: 8px 3px;
  color: #5e5751;
  font-size: 13px;
  font-weight: 800;
}
.nav-link:hover { color: var(--coral-dark); }
.delivery-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid rgba(40, 90, 84, 0.2);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.72);
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 850;
}
.delivery-button:hover { background: white; }
.delivery-button svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}
.delivery-button strong {
  min-width: 20px;
  color: var(--green-dark);
  font-size: 9px;
  letter-spacing: 0.05em;
}
.header-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.mode-pill {
  padding: 7px 10px;
  border-radius: 999px;
  background: #efddca;
  color: #6b5143;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.button {
  appearance: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 18px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .account-button:focus-visible, .account-orders-link:focus-visible,
.header-icon-button:focus-visible, .nav-link:focus-visible,
.product-card:focus-visible, .style-card:focus-visible, .project-chip:focus-visible,
.delete-product-button:focus-visible, .collection-controls button:focus-visible,
.order-list-item:focus-visible, .order-detail-close:focus-visible, .order-refresh-button:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}
.button-primary {
  background: var(--coral);
  color: white;
  box-shadow: 0 10px 28px rgba(255, 101, 68, 0.26);
}
.button-primary:hover { background: var(--coral-dark); box-shadow: 0 14px 32px rgba(255, 101, 68, 0.3); }
.button-quiet { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.5); }
.button-large { min-height: 52px; padding: 14px 23px; font-size: 14px; }
.button-full { width: 100%; }

.account-button {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  flex: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  transition: transform 180ms ease, background 180ms ease;
}
.account-button:hover { transform: translateY(-1px); background: white; }
.account-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.account-button > span {
  position: absolute;
  right: 3px;
  bottom: 4px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--cream);
  border-radius: 50%;
  background: var(--yellow);
}
.account-button.connected > span { background: #41a271; }

.header-icon-button {
  width: 44px;
  height: 44px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  transition: transform 180ms ease, background 180ms ease;
}
.header-icon-button:hover { transform: translateY(-1px); background: var(--green-dark); }
.header-icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.bag-button {
  margin-left: 1px;
}
.bag-button span {
  min-width: 18px;
  height: 18px;
  position: absolute;
  right: -2px;
  top: -2px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--coral);
  color: white;
  font-size: 8px;
  font-weight: 900;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--coral-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow > span { width: 22px; height: 2px; background: currentColor; }
.eyebrow.light { color: #ffc2a4; }

h1, h2, h3 { margin-top: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -0.045em; }

/* Landing */
.showcase-shell {
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: 26px clamp(24px, 4vw, 64px) 58px;
}
.showcase-stage {
  min-height: min(690px, calc(100dvh - 124px));
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(67, 48, 35, 0.08);
  border-radius: 34px;
  background: #ead9c5;
  box-shadow: 0 28px 90px rgba(74, 50, 32, 0.14);
}
.showcase-image {
  width: 100%;
  height: 100%;
  min-height: min(690px, calc(100dvh - 124px));
  position: absolute;
  inset: 0;
  display: block;
  object-fit: cover;
  object-position: center;
}
.showcase-start {
  width: min(370px, calc(100% - 56px));
  position: absolute;
  z-index: 2;
  top: 50%;
  left: clamp(28px, 5vw, 72px);
  padding: 28px;
  border: 1px solid rgba(55, 44, 37, 0.12);
  border-radius: 24px;
  background: rgba(255, 253, 249, 0.91);
  box-shadow: 0 24px 70px rgba(67, 45, 29, 0.16);
  backdrop-filter: blur(18px);
  transform: translateY(-50%);
}
.showcase-start h1 {
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(29px, 2.8vw, 39px);
  font-weight: 850;
  line-height: 0.98;
  letter-spacing: -0.055em;
}
.showcase-start > p {
  max-width: 30ch;
  margin: 12px 0 20px;
  color: #625a53;
  font-size: 13px;
  line-height: 1.48;
}
.showcase-actions { display: grid; gap: 9px; }
.showcase-actions .button { width: 100%; justify-content: space-between; }
.showcase-upload { cursor: pointer; }
.showcase-upload input {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.showcase-browse {
  border: 1px solid rgba(55, 44, 37, 0.15);
  background: rgba(255, 255, 255, 0.76);
}
.showcase-browse:hover { background: white; box-shadow: 0 10px 28px rgba(57, 42, 31, 0.1); }
.showcase-start > small {
  display: block;
  margin-top: 13px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
  text-align: center;
}
.resume-project {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(91, 67, 49, 0.12);
  border-radius: 26px;
  background:
    radial-gradient(circle at 94% 0%, rgba(255, 196, 89, 0.18), transparent 28%),
    linear-gradient(135deg, #fffaf3 0%, #f5ece1 100%);
  box-shadow: 0 18px 48px rgba(74, 50, 32, 0.08);
}
.resume-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 0 2px 15px;
}
.resume-heading strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.04em;
}
.resume-heading small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}
.resume-heading > span {
  flex: none;
  padding: 6px 9px;
  border: 1px solid rgba(40, 90, 84, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--green);
  font-size: 8px;
  font-weight: 850;
  white-space: nowrap;
}
.landing-project-list {
  min-width: 0;
  max-width: 100%;
  display: flex;
  gap: 11px;
  padding: 1px 2px 5px;
  overflow-x: auto;
  scrollbar-width: none;
}
.landing-project-list::-webkit-scrollbar { display: none; }
.landing-project-card {
  flex: 0 0 272px;
  min-width: 0;
  border: 1px solid rgba(75, 55, 40, 0.12);
  border-radius: 17px;
  background: rgba(255, 253, 249, 0.88);
  box-shadow: 0 8px 22px rgba(70, 48, 32, 0.06);
  text-align: left;
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.landing-project-card:hover {
  border-color: rgba(40, 90, 84, 0.45);
  background: white;
  box-shadow: 0 13px 28px rgba(70, 48, 32, 0.1);
  transform: translateY(-2px);
}
.landing-project-open {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 0;
  background: transparent;
  text-align: left;
}
.landing-project-art, .landing-project-add {
  width: 64px;
  height: 64px;
  border-radius: 13px;
  background-color: #ded2c5;
  background-position: center;
  background-size: cover;
}
.landing-project-copy { min-width: 0; }
.landing-project-card strong, .landing-project-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.landing-project-card strong { font-size: 11px; line-height: 1.25; }
.landing-project-card small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.landing-project-status {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  color: var(--green);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}
.landing-project-status i {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: #c6b8a9;
}
.landing-project-status.ready i { background: #41a271; }
.landing-project-status.working i { background: var(--coral); animation: pulse 1.3s infinite; }
.landing-project-status.failed { color: #9d4939; }
.landing-project-status.failed i { background: #c6493b; }
.landing-project-arrow {
  color: var(--coral);
  font-size: 15px;
  transition: transform 160ms ease;
}
.landing-project-card:hover .landing-project-arrow { transform: translateX(2px); }
.landing-project-card.new {
  border-style: dashed;
  box-shadow: none;
}
.landing-project-card.new {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.42);
}
.landing-project-add {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 101, 68, 0.12);
  background: #f7e7d8;
  color: var(--coral);
  font-size: 23px;
}
.landing-project-new-copy { min-width: 0; }
.landing-project-new-copy small { white-space: normal; line-height: 1.35; }
.landing-project-progress {
  display: grid;
  gap: 8px;
  padding: 0 11px 10px 87px;
}
.landing-project-progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #d9e2dc;
}
.landing-project-progress-track i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--yellow));
  transition: width 400ms ease;
}
.landing-ready-email {
  appearance: none;
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(40, 90, 84, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--green);
  font-size: 7px;
  font-weight: 850;
  text-align: left;
}
.landing-ready-email svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.landing-project-open:focus-visible,
.landing-project-card.new:focus-visible,
.landing-ready-email:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: -3px;
}
.landing-ready-email:hover { border-color: var(--green); background: white; }
.landing-ready-email.active { border-color: rgba(65, 162, 113, 0.28); background: #e9f3ed; color: #2d7d54; }

.product-section { max-width: 1460px; margin: 0 auto; padding: 54px clamp(22px, 5vw, 76px) 112px; }
.product-browser-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 30px;
}
.product-browser-heading h2 {
  margin: 0;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1;
}
.product-grid { display: grid; gap: 28px; }
.product-pair-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.product-card {
  min-height: 390px;
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(57, 45, 38, 0.08);
  border-radius: 24px;
  background: color-mix(in srgb, var(--accent) 11%, #f1e4d6);
  text-align: left;
  animation: card-in 500ms both;
  animation-delay: var(--delay);
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}
.landing.seen .product-card { animation: none; }
.product-card:hover {
  border-color: rgba(40, 90, 84, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(54, 39, 28, 0.13);
}
.product-card-visual { min-height: 285px; position: relative; overflow: hidden; }
.product-card-visual::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 32%,
    rgba(255, 255, 255, 0.38) 48%,
    transparent 64%
  );
  transform: translateX(-100%);
  animation: image-shimmer 1.3s ease-in-out infinite;
  transition: opacity 180ms ease;
}
.product-card:has(.product-image.loaded) .product-card-visual::after { opacity: 0; }
.product-card-visual .product-image {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity 260ms ease, transform 350ms ease;
}
.product-card-visual .product-image.loaded { opacity: 1; }
.product-card:hover .product-card-visual .product-image { transform: scale(1.018); }
.product-card-copy {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 16px;
  padding: 19px 21px;
  background: rgba(255, 250, 243, 0.78);
  backdrop-filter: blur(12px);
}
.product-card-copy h3 { min-width: 0; margin: 0; font-size: 26px; line-height: 1; }
.product-card-copy p {
  grid-column: 1;
  margin: 3px 0 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}
.product-card-meta { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; }
.product-card-copy span { color: var(--muted); font-size: 10px; font-weight: 750; }
.product-card-proof { white-space: nowrap; }
.product-card-proof b { color: #d87525; font-size: 0.9em; }
.product-card-copy i {
  grid-column: 2;
  grid-row: 1 / span 3;
  color: var(--coral);
  font-size: 18px;
  font-style: normal;
  transition: transform 180ms ease;
}
.product-card:hover .product-card-copy i { transform: translateX(3px); }
.product-card.unavailable {
  filter: grayscale(0.65);
  opacity: 0.58;
}
.product-card.unavailable .product-card-copy i { display: none; }
.product-card.unavailable .product-card-copy span { color: #8d3f35; }
.product-card:disabled { cursor: not-allowed; }
.product-collection {
  min-width: 0;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(57, 45, 38, 0.08);
  border-radius: 28px;
  background: #eee3d7;
}
.product-collection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.product-collection-heading h3 { margin: 0; font-size: 32px; }
.collection-controls { display: flex; gap: 7px; }
.collection-controls button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--green-dark);
  font-size: 17px;
}
.product-collection-track {
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(320px, calc((100% - 16px) / 2));
  gap: 16px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-color: rgba(54, 92, 85, 0.35) transparent;
}
.collection-card {
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: color-mix(in srgb, var(--accent) 9%, #f6eee5);
}

/* Creator */
.creator { min-height: calc(100dvh - 76px); background: #ebe3d8; }
.creator-topbar {
  min-height: 66px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 9px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.82);
  backdrop-filter: blur(16px);
}
.back-link { justify-self: start; min-height: 44px; padding: 0; color: #5f5852; font-size: 11px; font-weight: 850; }
.back-link span { margin-right: 5px; font-size: 16px; }
.creator-title { min-width: 0; text-align: center; }
.creator-title span, .creator-title strong { display: block; }
.creator-title span { color: var(--coral-dark); font-size: 8px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.creator-title strong { max-width: 380px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.creator-actions { justify-self: end; display: flex; align-items: center; gap: 9px; }
.delete-product-button {
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #a23f32;
  font-size: 9px;
  font-weight: 850;
}
.delete-product-button:hover { background: #f5e1dc; }

.project-strip-shell {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
  align-items: center;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  background: #f8f2e9;
}
.project-strip-heading { display: flex; align-items: center; gap: 6px; padding-left: 20px; }
.project-strip-heading span { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.project-strip-heading button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e9ded2;
  font-size: 16px;
}
.project-strip { min-width: 0; display: flex; gap: 8px; overflow-x: auto; padding: 10px 20px 10px 0; scrollbar-width: none; }
.project-strip::-webkit-scrollbar { display: none; }
.project-chip {
  min-width: 188px;
  max-width: 220px;
  min-height: 54px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  text-align: left;
}
.project-chip.active { border-color: var(--green); background: white; box-shadow: 0 7px 20px rgba(42, 62, 55, 0.1); }
.project-chip-thumb { width: 40px; height: 40px; border-radius: 10px; background-position: center; background-size: cover; }
.project-chip > span:last-child { min-width: 0; }
.project-chip strong, .project-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-chip strong { font-size: 10px; }
.project-chip small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.project-chip.new { border-style: dashed; }
.project-chip-add { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: #ece1d4; color: var(--coral-dark); font-size: 18px; }

.creator-layout {
  min-height: calc(100dvh - 218px);
  display: grid;
  grid-template-columns: minmax(430px, 1.06fr) minmax(500px, 0.94fr);
}
.product-preview-panel {
  min-height: 650px;
  position: sticky;
  top: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 55px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.8), transparent 38%),
    linear-gradient(145deg, #eadfd1, #d9d1c7);
}
.preview-glow {
  width: min(48vw, 580px);
  aspect-ratio: 1;
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.48);
  filter: blur(1px);
}
.main-product-preview {
  width: min(48vw, 590px);
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(68, 51, 40, 0.08);
  border-radius: 38px;
  background: color-mix(in srgb, var(--preview-accent, #285a54) 12%, #eee1d3);
  box-shadow: 0 32px 85px rgba(70, 49, 34, 0.18);
}
.main-product-preview.empty { display: grid; place-items: center; border-style: dashed; box-shadow: none; }
.main-product-preview.empty button { border: 0; background: none; }
.main-product-preview.empty button span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 20px;
  background: var(--coral);
  color: white;
  font-size: 24px;
}
.main-product-preview.empty button strong { font-family: Georgia, serif; font-size: 18px; font-weight: 500; }
.main-product-preview.authentic { background: #f4eee6; }
.main-product-preview.product-photo { background: var(--product-image-background); }
.main-product-preview.product-photo > .product-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.production-gallery { position: absolute; inset: 0; background: #f4eee6; }
.production-gallery-stage {
  position: absolute;
  inset: 0;
  outline: none;
  touch-action: pan-y;
}
.production-gallery.multiple .production-gallery-stage { bottom: 94px; }
.production-gallery-stage:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(39, 91, 84, 0.42);
}
.production-mockup {
  width: calc(100% - 36px);
  height: calc(100% - 36px);
  position: absolute;
  inset: 18px;
  display: block;
  object-fit: contain;
  user-select: none;
}
.production-view-label {
  position: absolute;
  z-index: 2;
  top: 15px;
  left: 15px;
  padding: 7px 10px;
  border: 1px solid rgba(39, 91, 84, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.92);
  color: var(--green);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.production-view-count {
  position: absolute;
  z-index: 2;
  top: 15px;
  right: 15px;
  padding: 7px 10px;
  border: 1px solid rgba(58, 44, 35, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.92);
  color: var(--ink);
  font-size: 9px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}
.production-view-arrow {
  width: 44px;
  height: 44px;
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  padding: 0 0 4px;
  border: 1px solid rgba(58, 44, 35, 0.14);
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 8px 24px rgba(58, 44, 35, 0.14);
  color: var(--green);
  font: 400 34px/1 Georgia, serif;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
}
.production-view-arrow:hover { background: var(--white); transform: translateY(-50%) scale(1.04); }
.production-view-arrow:focus-visible { outline: 3px solid rgba(39, 91, 84, 0.28); outline-offset: 2px; }
.production-view-arrow.previous { left: 15px; }
.production-view-arrow.next { right: 15px; }
.production-view-picker {
  height: 72px;
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.production-view-picker button {
  flex: 0 0 68px;
  width: 68px;
  height: 68px;
  overflow: hidden;
  padding: 3px;
  border: 1px solid rgba(58, 44, 35, 0.16);
  border-radius: 13px;
  background: var(--white);
}
.production-view-picker button.selected {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(39, 91, 84, 0.18);
}
.production-view-picker img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 9px; }
.main-product-preview.authentic-pending { display: grid; place-items: center; background: #e6ddd2; box-shadow: none; }
.authentic-preview-message {
  width: min(290px, calc(100% - 40px));
  display: grid;
  justify-items: center;
  text-align: center;
}
.authentic-preview-message > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  border-radius: 16px;
  background: var(--green);
  color: var(--white);
  font-size: 18px;
}
.authentic-preview-message strong { font: 500 21px/1.15 Georgia, serif; }
.authentic-preview-message small { margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.authentic-preview-message button {
  margin-top: 16px;
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--coral);
  color: var(--white);
  font-size: 10px;
  font-weight: 900;
}
.preview-status {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 28px;
  width: max-content;
  max-width: calc(100% - 40px);
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border: 1px solid rgba(65, 49, 38, 0.1);
  border-radius: 15px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 13px 38px rgba(60, 43, 31, 0.14);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}
.preview-status > span { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); }
.preview-status.ready > span { background: #41a271; }
.preview-status.working > span { background: var(--coral); animation: pulse 1s infinite; }
.preview-status.failed > span { background: #c6493b; }
.preview-status strong, .preview-status small { display: block; }
.preview-status strong { font-size: 10px; }
.preview-status small { margin-top: 2px; color: var(--muted); font-size: 8px; }

.build-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--cream);
}
.build-scroll { flex: 1; }
.text-button { min-height: 40px; padding: 0; color: var(--green); font-size: 10px; font-weight: 900; text-decoration: underline; text-underline-offset: 3px; }

.variant-picker { margin-top: 15px; }
.variant-picker > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.variant-picker > div { display: flex; flex-wrap: wrap; gap: 7px; }
.variant-option {
  min-height: 40px;
  min-width: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  font-size: 10px;
  font-weight: 800;
}
.variant-option.selected { border-color: var(--green); background: var(--green); color: white; }

.style-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: white;
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.style-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(57, 42, 31, 0.09); }
.style-card.selected { border: 2px solid var(--green); background: #f1f5f1; }
.style-image { overflow: hidden; background: #e6d9ca; }
.style-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.style-copy strong { display: block; }
.style-check {
  width: 22px;
  height: 22px;
  position: absolute;
  top: 7px;
  right: 7px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 10px;
}
.style-card.selected .style-check { display: grid; }

.create-form textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 15px;
  border: 1px solid #d9cec2;
  border-radius: 14px;
  outline: 0;
  background: white;
  font-size: 13px;
  line-height: 1.55;
}
.create-form textarea:focus { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(255, 101, 68, 0.11); }
.photo-section {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 101, 68, 0.09), transparent 38%),
    rgba(255, 250, 243, 0.56);
}
.photo-upload-intro {
  max-width: 48ch;
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.reference-row { display: flex; align-items: center; gap: 10px; margin: 10px 0 14px; }
.photo-section .reference-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}
.photo-upload-input {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.upload-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #5e5751;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}
.upload-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-button .plus {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px dashed #b8a99d;
  border-radius: 11px;
  color: var(--coral-dark);
  font-size: 15px;
}
.photo-upload-button {
  width: 100%;
  min-height: 84px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border: 1px dashed #c99e8d;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.photo-upload-button:hover,
.photo-upload-button:focus-visible {
  border-color: var(--coral);
  background: white;
  box-shadow: 0 0 0 4px rgba(255, 101, 68, 0.1);
}
.photo-upload-button .plus {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 15px;
  background: var(--coral);
  color: white;
  font-size: 21px;
}
.photo-upload-copy {
  min-width: 0;
}
.photo-upload-copy strong,
.photo-upload-copy small {
  display: block;
}
.photo-upload-copy strong {
  font: 600 17px/1.15 Georgia, serif;
}
.photo-upload-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
}
.photo-upload-arrow {
  color: var(--coral-dark);
  font-size: 18px;
}
.photo-section .reference-thumbs {
  gap: 8px;
}
.photo-section .reference-thumb {
  width: 64px;
  height: 64px;
  border: 2px solid white;
  border-radius: 13px;
  box-shadow: 0 5px 15px rgba(57, 42, 31, 0.12);
}
.reference-row.has-photos .photo-upload-button {
  border-style: solid;
  border-color: rgba(40, 90, 84, 0.24);
  background: #edf3ef;
}
.reference-row.has-photos .photo-upload-button .plus {
  background: var(--green);
}
.reference-thumbs { min-width: 0; display: flex; gap: 6px; overflow-x: auto; }
.reference-thumb { width: 42px; height: 42px; flex: none; position: relative; overflow: hidden; border-radius: 10px; background: #e5d9cd; }
.reference-thumb img { width: 100%; height: 100%; object-fit: cover; }
.reference-thumb-unavailable::before {
  content: "PHOTO";
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #71645a;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.05em;
}
.reference-thumb small { display: none; }
.create-note { margin: 9px 4px 0; color: #8a8179; font-size: 8px; line-height: 1.45; text-align: center; }

.product-action-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px clamp(22px, 4vw, 48px);
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.95);
  backdrop-filter: blur(15px);
  box-shadow: 0 -12px 38px rgba(58, 41, 29, 0.08);
}
.product-action-bar span, .product-action-bar strong { display: block; }
.product-action-bar span { color: var(--muted); font-size: 9px; }
.product-action-bar strong { margin-top: 3px; font: 500 22px/1 Georgia, serif; }

.generation-progress {
  width: 100%;
  flex: 0 0 100%;
  padding: 13px 15px 12px;
  overflow: hidden;
  border: 1px solid rgba(190, 89, 67, 0.2);
  border-radius: 16px;
  background:
    radial-gradient(circle at 7% -35%, rgba(238, 166, 83, 0.24), transparent 44%),
    rgba(255, 250, 242, 0.98);
  box-shadow: 0 9px 26px rgba(74, 49, 33, 0.08);
}
.generation-progress-heading {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.product-action-bar .generation-progress-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--coral);
  color: var(--white);
  font-size: 13px;
  animation: generation-glow 2.2s ease-in-out infinite;
}
.product-action-bar .generation-progress-copy strong {
  margin: 0;
  color: var(--green);
  font: 800 11px/1.2 Arial, sans-serif;
}
.product-action-bar .generation-progress-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}
.product-action-bar .generation-progress-elapsed {
  color: var(--green);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}
.generation-progress-track {
  height: 7px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(68, 84, 65, 0.11);
}
.product-action-bar .generation-progress-track > span {
  width: 6%;
  height: 100%;
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), #e9a34d);
  transition: width 600ms ease-out;
}
.product-action-bar .generation-progress-track > span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.55) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: generation-shimmer 1.8s ease-in-out infinite;
}
.generation-progress p {
  margin: 7px 1px 0;
  color: var(--coral-dark);
  font-size: 9px;
  font-weight: 800;
}

@keyframes generation-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(211, 102, 76, 0.16); transform: rotate(-5deg); }
  50% { box-shadow: 0 0 0 7px rgba(211, 102, 76, 0); transform: rotate(5deg); }
}

@keyframes generation-shimmer {
  55%, 100% { transform: translateX(100%); }
}

/* Pickers and drawers */
.product-picker-backdrop, .modal-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(31, 25, 22, 0.55);
  backdrop-filter: blur(10px);
}
.product-picker {
  width: min(900px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 30px;
  border-radius: 27px;
  background: var(--cream);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.28);
}
.picker-heading { display: flex; align-items: start; justify-content: space-between; gap: 30px; }
.picker-heading h2 { margin-bottom: 23px; font-size: clamp(30px, 4vw, 40px); line-height: 1; }
.modal-close {
  width: 38px;
  height: 38px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: #eee4da;
  font-size: 22px;
}
.picker-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.picker-product {
  min-height: 190px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 12%, #eadfd2);
  text-align: left;
}
.picker-product > div { min-height: 125px; position: relative; }
.picker-product .product-image {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: block;
  object-fit: cover;
}
.picker-product > span { display: block; padding: 12px; background: rgba(255, 253, 249, 0.78); }
.picker-product strong, .picker-product em { display: block; }
.picker-product strong { font: 500 17px/1 Georgia, serif; }
.picker-product em { margin-top: 4px; color: var(--muted); font-size: 8px; font-style: normal; }

.drawer-scrim { position: fixed; z-index: 74; inset: 0; background: rgba(31, 25, 22, 0.36); backdrop-filter: blur(4px); }
.bag-drawer {
  width: min(410px, 100%);
  position: fixed;
  z-index: 75;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  background: var(--white);
  box-shadow: -22px 0 70px rgba(47, 34, 25, 0.22);
}
.bag-heading {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}
.bag-heading span, .bag-heading strong { display: block; }
.bag-heading > div > span { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.bag-heading strong { margin-top: 3px; font: 500 18px/1 Georgia, serif; }
.bag-heading button { width: 42px; height: 42px; border-radius: 50%; font-size: 23px; }
.empty-bag { flex: 1; display: grid; place-content: center; padding: 38px; text-align: center; }
.empty-bag strong { font: 500 20px/1.1 Georgia, serif; }
.bag-items { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 17px; }
.bag-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.bag-thumb {
  width: 70px;
  height: 66px;
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #e8ddd2;
}
.bag-thumb > img { width: 100%; height: 100%; object-fit: contain; }
.real-preview-pending { display: grid; place-items: center; padding: 8px; }
.real-preview-pending > span { color: var(--muted); font-size: 7px; font-weight: 900; line-height: 1.2; text-align: center; text-transform: uppercase; }
.bag-item-copy { min-width: 0; }
.bag-item-copy > strong, .bag-item-copy > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bag-item-copy > strong { font-size: 10px; }
.bag-item-copy > span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.quantity-control {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 7px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.quantity-control button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; }
.quantity-control b { min-width: 14px; text-align: center; font-size: 9px; }
.bag-item-end { align-self: stretch; display: flex; flex-direction: column; align-items: end; justify-content: space-between; }
.bag-item-end strong { font-size: 10px; }
.bag-item-end button { width: 30px; height: 30px; border: 0; background: none; color: #9c9188; font-size: 18px; }
.bag-summary { padding: 18px; border-top: 1px solid var(--line); background: #f8f1e8; }
.bag-summary > div { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.bag-summary p { margin: 8px 0 13px; color: var(--muted); font-size: 9px; }
.bag-summary small { display: block; margin-top: 8px; color: #8f857c; font-size: 8px; text-align: center; }

/* Shared modal and checkout */
.modal {
  width: min(430px, 100%);
  position: relative;
  padding: 34px;
  border-radius: 25px;
  background: var(--cream);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.25);
}
.modal > .modal-close { position: absolute; top: 14px; right: 14px; }
.modal h2 { margin-bottom: 12px; font-size: 30px; line-height: 1.05; }
.modal > p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.6; }
.modal > small { display: block; margin-top: 11px; color: #8c8279; font-size: 9px; text-align: center; }
.no-photo-modal {
  text-align: center;
}
.no-photo-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border: 2px dashed rgba(255, 101, 68, 0.5);
  border-radius: 18px;
  background: #fff5ec;
  color: var(--coral-dark);
  font-size: 25px;
}
.no-photo-modal > p {
  margin-bottom: 20px;
}
.no-photo-actions {
  display: grid;
  gap: 9px;
}
.no-photo-actions .button-quiet {
  background: transparent;
}
.account-orders-link {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(40, 90, 84, 0.18);
  border-radius: 15px;
  background: #edf3ef;
  color: var(--green-dark);
  text-decoration: none;
}
.account-orders-link:hover { border-color: rgba(40, 90, 84, 0.35); background: #e5eee9; }
.account-orders-link > svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.account-orders-link span, .account-orders-link strong, .account-orders-link small { display: block; }
.account-orders-link strong { font-size: 11px; }
.account-orders-link small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.account-orders-link b { font-size: 15px; }
.modal #customer-email-form { display: grid; gap: 14px; margin-top: 18px; }

.checkout-modal { width: min(920px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 30px; background: var(--white); }
.checkout-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-right: 38px; }
.checkout-heading h2 { margin: 0; font-size: clamp(28px, 3vw, 36px); }
.checkout-heading > div > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.checkout-heading > div > p:empty { display: none; }
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(270px, 0.85fr);
  gap: 28px;
  margin-top: 25px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.delivery-form { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 13px; }
.form-section-heading { grid-column: 1 / -1; margin-bottom: 4px; }
.form-section-heading strong, .form-section-heading small { display: block; }
.form-section-heading strong { font: 500 17px Georgia, serif; }
.form-section-heading small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.field { display: grid; gap: 5px; }
.field.full, .optional-delivery.full { grid-column: 1 / -1; }
.field > span { color: #645d56; font-size: 9px; font-weight: 800; }
.field input, .field select {
  width: 100%;
  min-width: 0;
  height: 43px;
  padding: 0 11px;
  border: 1px solid #d9d0c7;
  border-radius: 11px;
  outline: 0;
  background: white;
  font-size: 11px;
}
.field input:focus, .field select:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255, 101, 68, 0.1); }
.field.invalid input, .field.invalid select { border-color: #b83d2b; }
.field.invalid input:focus, .field.invalid select:focus {
  border-color: #b83d2b;
  box-shadow: 0 0 0 3px rgba(184, 61, 43, 0.12);
}
.field-error { display: none; color: #9b2e20; font-size: 9px; line-height: 1.35; }
.field.invalid .field-error { display: block; }
.optional-delivery { border: 1px solid #ded5cc; border-radius: 11px; background: #fbf7f1; }
.optional-delivery summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  color: #645d56;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  list-style: none;
}
.optional-delivery summary::-webkit-details-marker { display: none; }
.optional-delivery summary::after { content: "+"; color: var(--coral-dark); font-size: 15px; }
.optional-delivery[open] summary::after { content: "−"; }
.optional-delivery summary span { margin-left: auto; color: #91877e; font-size: 8px; }
.optional-delivery > div { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 0 11px 11px; }
.order-review { position: relative; padding: 18px; border-radius: 18px; background: #f6efe6; }
.review-items { margin: 14px 0; border-top: 1px solid var(--line); }
.review-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.review-thumb { height: 48px; position: relative; overflow: hidden; border-radius: 9px; background: #e5d7c9; }
.review-thumb > img { width: 100%; height: 100%; object-fit: contain; }
.review-item strong, .review-item span { display: block; }
.review-item strong { font-size: 9px; }
.review-item span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.review-totals { margin: 0; }
.review-totals > div { display: flex; justify-content: space-between; gap: 15px; padding: 4px 0; font-size: 9px; }
.review-totals dt { color: var(--muted); }
.review-totals dd { margin: 0; font-weight: 900; }
.review-totals .review-total { margin-top: 7px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11px; }
.shipping-note { margin: 10px 0 14px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.payment-note { display: block; margin-top: 8px; color: #7e746b; font-size: 8px; line-height: 1.45; text-align: center; }
.payment-note a { color: var(--green); font-weight: 900; }
.checkout-blocker {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 28px;
  border-radius: inherit;
  background: rgba(247, 241, 232, 0.97);
  text-align: center;
  backdrop-filter: blur(5px);
}
.checkout-blocker strong { font: 500 24px Georgia, serif; }
.checkout-blocker p { margin: 9px 0 18px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.checkout-blocker button {
  justify-self: center;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  color: var(--coral-dark);
  font-size: 9px;
  font-weight: 900;
}
.checkout-modal.checkout-paused { width: min(720px, 100%); }
.checkout-modal.checkout-paused .checkout-layout { width: min(560px, 100%); grid-template-columns: 1fr; margin-inline: auto; }
.checkout-modal.checkout-paused .order-review { padding: 22px; }
.checkout-modal.checkout-paused .checkout-blocker { position: static; margin-top: 18px; padding: 22px; background: #eef3ef; backdrop-filter: none; }

.delivery-modal { width: min(470px, 100%); text-align: center; }
.delivery-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: #e1eee9;
  color: var(--green);
  font-size: 25px;
}
.delivery-modal h2 { margin: 0; font-size: 34px; }
.delivery-modal > p {
  max-width: 390px;
  margin: 10px auto 22px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.delivery-modal form { display: grid; gap: 12px; text-align: left; }
.country-combobox {
  overflow: hidden;
  border: 1px solid #d9d0c7;
  border-radius: 13px;
  background: white;
}
.country-combobox:focus-within {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 101, 68, 0.1);
}
.field .country-combobox input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.country-options {
  max-height: 190px;
  overflow-y: auto;
  padding: 4px;
  border-top: 1px solid #ebe3db;
  overscroll-behavior: contain;
}
.country-options button {
  width: 100%;
  min-height: 39px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 11px;
}
.country-options button:hover,
.country-options button.active { background: #f3ece3; }
.country-options button[aria-selected="true"] { color: var(--green); font-weight: 850; }
.country-options button strong { color: var(--muted); font-size: 8px; letter-spacing: 0.06em; }
.country-options-empty { margin: 0; padding: 14px 10px; color: var(--muted); font-size: 10px; }
.country-search-status {
  min-height: 13px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}
.delivery-modal > small {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}
.delivery-status {
  min-height: 16px;
  margin: 0;
  color: #9b3d30;
  font-size: 9px;
  line-height: 1.45;
}
.picker-product.unavailable {
  filter: grayscale(0.7);
  opacity: 0.56;
}
.picker-product.unavailable em { color: #8d3f35; }
.variant-option.unavailable { text-decoration: line-through; }
.bag-item.unavailable { border-color: rgba(155, 61, 48, 0.3); opacity: 0.7; }
.bag-item-delivery {
  display: block;
  margin-top: 5px;
  color: #9b3d30;
  font-size: 8px;
  font-weight: 800;
}

/* Footer, legal, success */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: #f0e7dc;
}
.site-footer .brand { font-size: 19px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 20px; }
.site-footer nav a { color: #405f57; font-size: 11px; font-weight: 800; text-underline-offset: 3px; }

.legal-body { min-height: 100dvh; background: var(--paper); }
.legal-shell { width: min(900px, calc(100% - 40px)); margin: 0 auto; padding: clamp(64px, 8vw, 110px) 0; }
.legal-shell > h1 { max-width: 760px; margin: 12px 0 28px; font-size: clamp(42px, 7vw, 76px); line-height: 0.98; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.legal-nav a {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
}
.legal-nav a[aria-current="page"] { border-color: var(--green); background: var(--green); color: white; }
.legal-document {
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fffaf4;
  box-shadow: 0 24px 70px rgba(59, 42, 31, 0.08);
}
.legal-document section + section { margin-top: 32px; padding-top: 30px; border-top: 1px solid var(--line); }
.legal-document h2 { margin: 0 0 12px; font-size: clamp(25px, 3.5vw, 34px); line-height: 1.05; }
.legal-document p { margin: 0 0 12px; color: #4e5854; font-size: 14px; line-height: 1.75; }
.legal-effective { margin-bottom: 30px !important; color: var(--muted) !important; font-size: 10px !important; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.trader-details { display: grid; grid-template-columns: minmax(120px, 0.6fr) 1.4fr; margin: 28px 0 0; border-top: 1px solid var(--line); }
.trader-details dt, .trader-details dd { margin: 0; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.55; }
.trader-details dt { padding-right: 20px; color: var(--muted); font-weight: 900; }
.trader-details a, .legal-help a { color: var(--green); font-weight: 900; }
.legal-help { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 34px; padding: 18px 20px; border-radius: 14px; background: #f1e7db; font-size: 12px; }

.orders-page {
  min-height: calc(100dvh - 76px);
  padding: clamp(30px, 5vw, 68px) clamp(18px, 5vw, 72px) 90px;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 212, 95, 0.2), transparent 26%),
    radial-gradient(circle at 86% 68%, rgba(40, 90, 84, 0.14), transparent 28%),
    var(--paper);
}
.orders-shell { width: min(1120px, 100%); margin: 0 auto; }
.orders-success-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 15px 18px;
  border: 1px solid rgba(40, 90, 84, 0.2);
  border-radius: 17px;
  background: #e7f0eb;
  color: var(--green-dark);
}
.orders-success-banner > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 12px;
  background: var(--green);
  color: white;
  font-size: 17px;
}
.orders-success-banner strong, .orders-success-banner p { display: block; margin: 0; }
.orders-success-banner strong { font-size: 12px; }
.orders-success-banner p { margin-top: 3px; color: #4f6963; font-size: 10px; line-height: 1.45; }
.orders-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 28px; }
.orders-heading > div > span { color: var(--coral-dark); font-size: 9px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.orders-heading h1 { margin: 7px 0 7px; font-size: clamp(42px, 6vw, 68px); line-height: 0.94; }
.orders-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.orders-auth, .orders-empty {
  padding: clamp(34px, 7vw, 70px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: center;
}
.orders-auth strong, .orders-empty strong { font: 500 clamp(28px, 4vw, 40px) Georgia, serif; }
.orders-auth p, .orders-empty p { margin: 10px auto 22px; color: var(--muted); font-size: 12px; }
.orders-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
.orders-list-panel, .order-detail {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 20px 60px rgba(59, 42, 31, 0.08);
}
.orders-list-panel { overflow: hidden; padding: 9px; }
.orders-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 13px 10px;
}
.orders-list-heading strong { font: 500 20px Georgia, serif; }
.orders-list-heading span { color: var(--muted); font-size: 9px; font-weight: 850; }
.orders-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 6px; }
.order-list-item {
  width: 100%;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  text-align: left;
}
.order-list-item:hover { background: #f7f1e9; }
.order-list-item.active { background: #eee5da; }
.order-list-item span:first-child { min-width: 0; flex: 1; }
.order-list-item strong, .order-list-item small { display: block; }
.order-list-item strong { font-size: 11px; }
.order-list-item small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.order-list-item > svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.order-list-status, .order-status-pill {
  flex: none;
  padding: 6px 8px;
  border-radius: 999px;
  background: #efe8dd;
  color: #6a6159;
  font-size: 8px;
  font-weight: 900;
}
.order-list-status.success, .order-status-pill.success { background: #deece6; color: var(--green-dark); }
.order-list-status.issue, .order-status-pill.issue { background: #fee4dc; color: #963923; }
.order-list-status.pending, .order-status-pill.pending { background: #fff0bd; color: #6a5522; }
.order-detail { width: min(820px, 100%); min-width: 0; overflow: hidden; margin: 0 auto; padding: clamp(22px, 4vw, 38px); }
.order-detail-close {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: -8px 0 20px -8px;
  padding: 7px 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
}
.order-detail-close:hover { background: #f3ede5; }
.order-detail-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.order-detail-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.order-detail-heading > div > span { color: var(--coral-dark); font-size: 9px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.order-detail-heading h2 { margin: 7px 0 8px; font-size: clamp(30px, 4vw, 43px); line-height: 1; }
.order-detail-heading p { max-width: 570px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.order-status-pill { margin-top: 2px; }
.order-refresh-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 22px 0 0; padding-top: 15px; border-top: 1px solid var(--line); }
.order-refresh-row small { color: var(--muted); font-size: 8px; }
.order-refresh-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(40, 90, 84, 0.22);
  border-radius: 999px;
  background: #edf3ef;
  color: var(--green);
  font-size: 9px;
  font-weight: 900;
}
.order-refresh-button:hover { border-color: var(--green); background: #e4eee8; }
.order-refresh-button:disabled { cursor: wait; opacity: 0.7; }
.order-refresh-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.order-refresh-button:disabled svg { animation: order-refresh-spin 900ms linear infinite; }
.order-refresh-error { margin: 10px 0 0; padding: 10px; border-radius: 10px; background: #fff0e9; color: #8b432f; font-size: 9px; line-height: 1.45; }
.order-detail-section { margin-top: 27px; }
.order-detail-section h3 { margin: 0 0 11px; font: 500 18px Georgia, serif; letter-spacing: -0.025em; }
.order-products { border-top: 1px solid var(--line); }
.order-products > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.order-products span, .order-products strong, .order-products small { display: block; }
.order-products strong { font-size: 11px; }
.order-products small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.order-products b { font-size: 10px; }
.order-facts { margin: 0; border-top: 1px solid var(--line); }
.order-facts > div { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 10px; }
.order-facts dt { color: var(--muted); }
.order-facts dd { margin: 0; font-weight: 850; text-align: right; }
.order-facts .total { padding-top: 13px; font-size: 12px; }
.order-tracking {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 13px;
  padding: 13px;
  border-radius: 13px;
  background: #e8f0ec;
  color: var(--green-dark);
  text-decoration: none;
}
.order-tracking + .order-tracking { margin-top: 8px; }
.order-tracking span { font-size: 10px; font-weight: 900; }
.order-tracking strong { font-size: 9px; }
.order-no-tracking { margin: 0; padding: 13px; border-radius: 13px; background: #f4eee6; color: var(--muted); font-size: 9px; }
.order-detail-footer { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.order-detail-footer a { color: var(--green); font-size: 9px; font-weight: 900; }

.toast {
  max-width: calc(100vw - 32px);
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: var(--toast-bottom, calc(24px + env(safe-area-inset-bottom)));
  padding: 12px 17px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 750;
}

@keyframes card-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes image-shimmer { to { transform: translateX(100%); } }
@keyframes pulse { 50% { transform: scale(0.65); opacity: 0.45; } }
@keyframes order-refresh-spin { to { transform: rotate(360deg); } }

@media (max-width: 1120px) {
  .showcase-stage,
  .showcase-image { min-height: 590px; }
  .creator-layout { grid-template-columns: minmax(400px, 0.95fr) minmax(480px, 1.05fr); }
}

@media (max-width: 860px) {
  .site-header { min-height: 66px; grid-template-columns: 1fr auto; padding: 0 18px; }
  .header-nav { display: none; }
  .header-actions { grid-column: 2; }
  .delivery-button { max-width: 145px; }
  .delivery-button #delivery-button-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mode-pill { display: none !important; }
  .account-button { width: 40px; height: 40px; }
  .showcase-shell { padding: 12px 14px 42px; }
  .showcase-stage {
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: 26px;
  }
  .showcase-image {
    width: 100%;
    height: auto;
    min-height: 0;
    position: static;
    order: 2;
    aspect-ratio: 1.28;
    object-fit: cover;
    object-position: right center;
  }
  .showcase-start {
    width: 100%;
    position: static;
    order: 1;
    padding: 22px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: var(--cream);
    box-shadow: none;
    backdrop-filter: none;
    transform: none;
  }
  .showcase-start h1 { font-size: 32px; }
  .showcase-start > p { max-width: 36ch; margin: 10px 0 17px; }
  .showcase-actions { grid-template-columns: 1fr 1fr; }
  .showcase-start > small { text-align: left; }
  .resume-project { margin-top: 12px; }
  .product-section { padding: 42px 20px 85px; }
  .product-grid { gap: 24px; }
  .product-pair-grid { gap: 10px; }
  .product-card { min-height: 330px; }
  .product-card-visual { min-height: 240px; }
  .product-card-copy { padding: 17px; }
  .product-card-copy h3 { font-size: 23px; }
  .product-collection { padding: 17px; border-radius: 22px; }
  .product-collection-track { grid-auto-columns: minmax(300px, 72vw); gap: 10px; }
  .creator { min-height: calc(100dvh - 66px); }
  .creator-topbar { min-height: 60px; grid-template-columns: 1fr auto; padding: 7px 12px; }
  .creator-title { display: none; }
  .creator-actions { grid-column: 2; }
  .project-strip-shell { min-height: 70px; grid-template-columns: 1fr; }
  .project-strip-heading { display: none; }
  .project-strip { padding: 8px 12px; }
  .project-chip { min-width: 170px; }
  .creator-layout { min-height: 0; display: block; }
  .product-preview-panel { min-height: 430px; position: relative; padding: 28px 20px 56px; }
  .preview-glow { width: min(78vw, 500px); }
  .main-product-preview { width: min(78vw, 500px); border-radius: 29px; }
  .preview-status { bottom: 17px; }
  .build-panel { border-left: 0; border-top: 1px solid var(--line); }
  .product-action-bar { padding: 13px 20px; }
}

@media (max-width: 600px) {
  .field input, .field select { font-size: 16px; }
  .site-header .brand { font-size: 22px; }
  .brand-mark { width: 31px; height: 31px; }
  .brand:hover .brand-mark { transform: rotate(2deg) scale(1.04); }
  .header-actions { gap: 6px; }
  .delivery-button { width: auto; min-width: 48px; height: 40px; padding: 0 7px; justify-content: center; gap: 4px; }
  .delivery-button #delivery-button-label { display: none; }
  .delivery-button.has-location { width: 58px; min-width: 58px; padding: 0 8px; }
  .delivery-button strong { min-width: 0; }
  .header-icon-button { width: 40px; height: 40px; }
  .eyebrow { margin-bottom: 17px; font-size: 9px; line-height: 1.35; }
  .showcase-shell { padding-inline: 10px; }
  .showcase-stage { border-radius: 22px; }
  .showcase-start { padding: 20px 16px 18px; }
  .showcase-start h1 { font-size: 29px; }
  .showcase-start > p { margin: 9px 0 15px; font-size: 12px; }
  .showcase-actions { gap: 7px; }
  .showcase-actions .button { min-width: 0; padding-inline: 14px; font-size: 12px; }
  .showcase-start > small { margin: 10px 2px 0; font-size: 8px; }
  .showcase-image { aspect-ratio: 1.2; }
  .resume-project { padding: 16px 10px 14px 16px; border-radius: 22px; }
  .resume-heading { align-items: center; padding: 0 6px 13px 1px; }
  .resume-heading strong { font-size: 20px; }
  .resume-heading small { max-width: 29ch; font-size: 8px; }
  .resume-heading > span { padding: 5px 8px; }
  .landing-project-list { gap: 9px; padding-right: 16px; }
  .landing-project-card { flex-basis: min(272px, 81vw); }
  .product-section { padding: 36px 14px 74px; }
  .product-grid { gap: 18px; }
  .product-browser-heading { margin-bottom: 18px; }
  .product-browser-heading h2 { font-size: 33px; }
  .product-pair-grid { grid-template-columns: 1fr 1fr; }
  .product-card { min-height: 0; border-radius: 16px; }
  .product-pair-grid .product-card-visual { min-height: 0; aspect-ratio: 1.08; }
  .product-card-copy { min-height: 72px; gap: 4px 8px; padding: 11px 12px; }
  .product-card-copy h3 { font-size: 16px; line-height: 1.08; }
  .product-card-meta { align-items: flex-start; flex-direction: column; gap: 2px; }
  .product-card-copy span { font-size: 9px; }
  .product-card-copy i { font-size: 14px; }
  .product-collection { margin-inline: -2px; padding: 12px 8px 9px 12px; border-radius: 18px; }
  .product-collection-heading { align-items: center; margin-bottom: 11px; padding-right: 4px; }
  .product-collection-heading h3 { font-size: 25px; }
  .collection-controls button { width: 36px; height: 36px; }
  .product-collection-track { grid-auto-columns: minmax(190px, 60vw); padding-bottom: 8px; }
  .collection-card .product-card-visual { min-height: 0; aspect-ratio: 1.22; }
  .creator-actions .button-quiet { display: none; }
  .back-link { font-size: 10px; }
  .project-chip { min-width: 158px; }
  .product-preview-panel { min-height: 370px; padding: 20px 14px 53px; }
  .main-product-preview { width: min(86vw, 410px); border-radius: 24px; }
  .preview-status { width: calc(100% - 28px); max-width: 360px; }
  .style-grid { gap: 8px; }
  .create-form textarea { min-height: 126px; font-size: 13px; }
  .reference-row { align-items: flex-start; flex-direction: column; }
  .product-action-bar { padding: 12px 15px calc(12px + env(safe-area-inset-bottom)); }
  .generation-progress { padding: 12px; }
  .product-action-bar .button { min-width: 145px; }
  .picker-products { grid-template-columns: repeat(2, 1fr); }
  .product-picker-backdrop, .modal-backdrop { align-items: end; padding: 0; }
  .product-picker, .modal { max-height: 94dvh; border-radius: 25px 25px 0 0; }
  .product-picker { padding: 23px 15px calc(20px + env(safe-area-inset-bottom)); }
  .picker-heading h2 { font-size: 32px; }
  .picker-product { min-height: 170px; }
  .picker-product > div { min-height: 110px; }
  .modal { padding: 31px 22px calc(25px + env(safe-area-inset-bottom)); }
  .bag-drawer { width: 100%; top: 10dvh; border-radius: 25px 25px 0 0; }
  .checkout-modal { width: 100%; max-height: 95dvh; padding: 24px 17px calc(20px + env(safe-area-inset-bottom)); }
  .checkout-layout { grid-template-columns: 1fr; }
  .delivery-form { grid-template-columns: 1fr; }
  .field { grid-column: 1 / -1; }
  .optional-delivery > div { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .site-footer nav { justify-content: flex-start; }
  .legal-shell { width: min(100% - 28px, 900px); padding: 46px 0 64px; }
  .legal-document { padding: 24px 18px; border-radius: 18px; }
  .trader-details { grid-template-columns: 1fr; }
  .trader-details dt { padding-bottom: 3px; border-bottom: 0; }
  .trader-details dd { padding-top: 0; }
  .legal-help { align-items: flex-start; flex-direction: column; }
  .orders-page { min-height: calc(100dvh - 66px); padding: 24px 12px 65px; }
  .orders-heading { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  .orders-heading h1 { font-size: 45px; }
  .orders-heading .button { min-height: 40px; }
  .orders-layout { grid-template-columns: 1fr; }
  .orders-list { grid-template-columns: 1fr; }
  .order-detail { padding: 22px 17px; }
  .order-detail-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .order-status-pill { order: -1; }
  .order-tracking { grid-template-columns: 1fr auto; }
  .order-tracking strong { grid-column: 1; }
  .order-tracking b { grid-column: 2; grid-row: 1 / span 2; }
}

@media (max-width: 370px) {
  .header-actions { gap: 4px; }
  .delivery-button { padding-inline: 5px; }
  .product-section { padding-inline: 10px; }
  .product-card-copy { min-height: 69px; padding-inline: 10px; }
  .product-card-copy h3 { font-size: 15px; }
  .product-action-bar span { max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

/* Iterative creator studio */
.main-product-preview.product-photo,
.studio-product-thumb,
.project-chip-thumb.unfinished,
.landing-project-art.unfinished {
  background-color: var(--product-image-background);
}

.project-chip-thumb.unfinished,
.landing-project-art.unfinished {
  background-size: contain;
  background-repeat: no-repeat;
}

.creator.is-make .product-preview-panel {
  background: #e7ded3;
}

.creator.is-make .preview-glow {
  display: none;
}

.creator.is-make .main-product-preview {
  width: min(39vw, 470px);
  border-color: transparent;
  border-radius: 30px;
  box-shadow: 0 20px 58px rgba(70, 49, 34, 0.1);
}

.build-scroll {
  min-height: 0;
}

.studio-product-summary {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 24px clamp(22px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background-color: var(--product-image-background);
}

.studio-product-thumb {
  width: 88px;
  height: 88px;
  overflow: hidden;
  border-radius: 18px;
}

.studio-product-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.studio-product-copy {
  min-width: 0;
}

.refine-product-summary > div > span {
  display: block;
  color: var(--coral-dark);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.studio-product-copy h2 {
  margin: 0;
  overflow: hidden;
  font-size: clamp(23px, 2.2vw, 30px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-product-copy p {
  max-width: 620px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.studio-product-copy small {
  display: block;
  margin-top: 5px;
  color: var(--green);
  font-size: 8px;
  font-weight: 850;
}

.product-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 10px 0 0;
}

.product-facts > div {
  display: flex;
  gap: 4px;
  font-size: 8px;
  line-height: 1.35;
}

.product-facts dt {
  color: var(--muted);
  font-weight: 800;
}

.product-facts dd {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
}

.product-facts.compact {
  margin-top: 7px;
}

.studio-product-summary .variant-picker {
  grid-column: 2 / -1;
  margin-top: -3px;
}

.studio-section {
  padding: 26px clamp(22px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}

.studio-heading {
  margin-bottom: 14px;
}

.studio-heading h2 {
  margin: 0;
  font-size: clamp(24px, 2.2vw, 29px);
  line-height: 1.05;
}

.studio-step-heading h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.studio-step-number {
  width: 29px;
  height: 29px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--coral);
  color: white;
  font: 900 12px/1 Arial, sans-serif;
  box-shadow: 0 5px 14px rgba(200, 50, 47, 0.17);
}

.studio-step-label {
  min-width: 0;
}

.style-grid {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 3px 3px 9px;
  scroll-padding-inline: 3px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.style-card,
.style-card.selected {
  min-width: 112px;
  flex: 1 0 112px;
  display: block;
  padding: 6px;
  scroll-snap-align: start;
  border-radius: 15px;
}

.style-card.selected {
  padding: 5px;
}

.style-image {
  width: 100%;
  display: block;
  aspect-ratio: 1;
  border-radius: 11px;
}

.style-copy {
  display: block;
  padding: 9px 4px 5px;
}

.style-copy strong {
  min-height: 2.1em;
  font: 600 14px/1.05 Georgia, serif;
  overflow-wrap: anywhere;
  white-space: normal;
}

.selected-style-description {
  min-height: 18px;
  margin: 3px 3px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}
.selected-style-description:empty { display: none; }

.idea-section {
  border-bottom: 0;
}

.create-note {
  text-align: left;
}

.photo-prompt-suggestions {
  display: grid;
  gap: 8px;
  margin: 2px 0 14px;
  padding: 13px 14px;
  border: 1px solid rgba(40, 90, 84, 0.14);
  border-radius: 14px;
  background: #edf3ef;
}

.photo-prompt-suggestions > span {
  color: var(--green-dark);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.photo-prompt-suggestions > div {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.photo-prompt-suggestions button {
  min-height: 40px;
  flex: none;
  padding: 0 13px;
  border: 1px solid rgba(40, 90, 84, 0.22);
  border-radius: 999px;
  background: var(--white);
  color: var(--green);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.photo-prompt-suggestions button:hover,
.photo-prompt-suggestions button:focus-visible {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(40, 90, 84, 0.1);
}

.refine-surface {
  background: linear-gradient(180deg, #fffaf3 0%, #f8f1e8 100%);
}

.refine-product-summary {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(22px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.7);
}

.refine-product-summary strong,
.refine-product-summary small {
  display: block;
}

.refine-product-summary strong {
  margin-top: 4px;
  font: 600 17px/1.15 Georgia, serif;
}

.refine-product-summary small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.refine-composer {
  padding: clamp(28px, 4vw, 48px);
}

.refine-heading h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

#revision-input {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  padding: 17px;
  border: 1px solid #d6c9bc;
  border-radius: 17px;
  outline: 0;
  background: var(--white);
  font-size: 13px;
  line-height: 1.55;
}

#revision-input:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 101, 68, 0.11);
}

.revision-tools {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 8px 0 12px;
}

.finish-toggle {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.upload-button:has(input:disabled),
.photo-upload-button:disabled,
.finish-toggle:disabled {
  pointer-events: none;
  opacity: 0.52;
}

.revision-finish-picker {
  margin: 12px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.72);
}

.revision-finish-picker > span {
  display: block;
  margin: 0 2px 10px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.style-grid.compact .style-card {
  min-width: 94px;
  flex-basis: 94px;
}

.revision-button {
  width: 100%;
  margin-top: 4px;
}

.revision-note {
  margin: 10px 4px 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
  text-align: center;
}

.original-idea {
  margin: 0 clamp(22px, 4vw, 48px) 34px;
  border-top: 1px solid var(--line);
}

.original-idea summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.original-idea summary::after {
  content: "＋";
  font-size: 14px;
}

.original-idea[open] summary::after {
  content: "−";
}

.original-idea p {
  margin: 0 0 18px;
  padding: 15px;
  border-radius: 13px;
  background: rgba(255, 253, 249, 0.7);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.creator.is-refine .product-preview-panel {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.68), transparent 42%),
    #ded5ca;
}

.creator.is-refine .main-product-preview {
  box-shadow: 0 26px 72px rgba(60, 43, 31, 0.15);
}

.creator.is-refine .preview-status {
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: 0 9px 25px rgba(60, 43, 31, 0.1);
}

#project-primary-action {
  min-width: 160px;
}

@media (max-width: 860px) {
  .creator.is-make .product-preview-panel {
    display: none;
  }

  .creator.is-make .build-panel {
    border-top: 0;
  }

  .studio-product-summary {
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 17px 16px;
  }

  .studio-product-thumb {
    width: 88px;
    height: 88px;
    border-radius: 15px;
  }

  .studio-section {
    padding: 24px 16px;
  }

  .style-grid {
    margin-right: -16px;
    padding-right: 32px;
  }

  .style-card,
  .style-card.selected {
    min-width: 132px;
    flex: 0 0 132px;
  }

  .create-form textarea,
  #revision-input {
    font-size: 16px;
  }

  .creator.is-refine .product-preview-panel {
    min-height: min(112vw, 520px);
    padding-bottom: 54px;
  }

  .creator.is-refine .main-product-preview {
    width: min(88vw, 440px);
  }

  .refine-product-summary {
    padding: 15px 17px;
  }

  .refine-composer {
    padding: 24px 17px;
  }

  .refine-heading h2 {
    font-size: 29px;
  }

  .original-idea {
    margin-inline: 17px;
  }

  .product-action-bar {
    z-index: 12;
  }
}

@media (max-width: 600px) {
  .studio-product-copy h2 {
    font-size: 22px;
  }

  .style-card,
  .style-card.selected {
    display: block;
    padding: 6px;
  }

  .style-card.selected {
    padding: 5px;
  }

  .style-copy {
    padding: 9px 4px 5px;
  }

  .reference-row {
    flex-direction: row;
    align-items: center;
  }

  .photo-section .reference-row {
    display: grid;
  }

  .photo-upload-button {
    min-height: 78px;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    padding: 12px 13px;
  }

  .photo-upload-button .plus {
    width: 46px;
    height: 46px;
  }

  .revision-tools {
    justify-content: space-between;
  }

  .product-action-bar > div {
    min-width: 0;
  }

  .product-action-bar strong {
    font-size: 19px;
  }

  #project-primary-action {
    min-width: 152px;
  }
}

.preview-zoomable {
  cursor: zoom-in;
}

.preview-zoomable:focus-visible {
  outline: 3px solid rgba(39, 91, 84, 0.45);
  outline-offset: -4px;
}

.preview-zoom-trigger {
  min-height: 34px;
  position: absolute;
  z-index: 4;
  right: 13px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(58, 44, 35, 0.14);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 7px 20px rgba(58, 44, 35, 0.13);
  color: var(--green);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.02em;
  backdrop-filter: blur(9px);
}

.preview-zoom-trigger svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.preview-zoom-trigger:hover {
  background: var(--white);
  transform: translateY(-1px);
}

.preview-zoom-mobile-copy {
  display: none;
}

.preview-zoom-trigger:focus-visible {
  outline: 3px solid rgba(39, 91, 84, 0.3);
  outline-offset: 2px;
}

.production-gallery.multiple .preview-zoom-trigger {
  bottom: 11px;
}

body.preview-zoom-open {
  overflow: hidden;
}

.preview-lightbox {
  position: fixed;
  z-index: 130;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.preview-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(28, 24, 20, 0.78);
  backdrop-filter: blur(12px);
  cursor: zoom-out;
}

.preview-lightbox-dialog {
  width: min(1180px, 100%);
  height: min(900px, calc(100dvh - 36px));
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 26px;
  background: #f2ebe2;
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.35);
}

.preview-lightbox-header,
.preview-lightbox-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  background: rgba(255, 252, 247, 0.92);
  backdrop-filter: blur(12px);
}

.preview-lightbox-header {
  border-bottom: 1px solid rgba(58, 44, 35, 0.1);
}

.preview-lightbox-header > div span,
.preview-lightbox-header > div strong {
  display: block;
}

.preview-lightbox-header > div span {
  color: var(--coral-dark);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.preview-lightbox-header > div strong {
  max-width: min(70vw, 650px);
  margin-top: 3px;
  overflow: hidden;
  font: 500 18px/1.2 Georgia, serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-lightbox-close {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px 7px 9px;
  border: 1px solid #a92322;
  border-radius: 999px;
  background: #c8322f;
  box-shadow: 0 7px 18px rgba(142, 28, 27, 0.24);
  color: var(--white);
  font-size: 10px;
  font-weight: 900;
}

.preview-lightbox-close:hover {
  background: #aa2725;
}

.preview-lightbox-close span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(88, 10, 10, 0.28);
  color: var(--white);
  font: 400 20px/1 Arial, sans-serif;
}

.preview-lightbox-mobile-close {
  display: none;
}

.preview-lightbox-stage {
  min-height: 0;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.92), rgba(232, 222, 211, 0.86) 72%),
    #e8ded3;
  cursor: grab;
  touch-action: none;
}

.preview-lightbox-stage.dragging {
  cursor: grabbing;
}

.preview-lightbox-stage img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
  user-select: none;
  will-change: transform;
  transform-origin: center;
}

.preview-lightbox-navigation {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.preview-lightbox-view-arrow {
  width: 52px;
  height: 52px;
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(58, 44, 35, 0.16);
  border-radius: 50%;
  background: rgba(255, 252, 247, 0.94);
  box-shadow: 0 10px 28px rgba(38, 30, 25, 0.2);
  color: var(--ink);
  pointer-events: auto;
  transform: translateY(-50%);
}

.preview-lightbox-view-arrow:hover {
  background: var(--white);
  transform: translateY(-50%) scale(1.06);
}

.preview-lightbox-view-arrow span {
  margin-top: -4px;
  font: 400 43px/1 Arial, sans-serif;
}

.preview-lightbox-view-arrow.previous {
  left: 18px;
}

.preview-lightbox-view-arrow.next {
  right: 18px;
}

.preview-lightbox-view-count {
  position: absolute;
  bottom: 15px;
  left: 50%;
  min-height: 28px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(28, 24, 20, 0.78);
  color: var(--white);
  font-size: 9px;
  font-weight: 900;
  pointer-events: none;
  transform: translateX(-50%);
}

.preview-lightbox-footer {
  border-top: 1px solid rgba(58, 44, 35, 0.1);
}

.preview-lightbox-help {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.preview-lightbox-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-lightbox-controls button,
.preview-lightbox-controls output {
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(58, 44, 35, 0.14);
  background: var(--white);
  color: var(--ink);
  font-weight: 900;
}

.preview-lightbox-controls button {
  min-width: 38px;
  padding: 0 10px;
  border-radius: 11px;
  font-size: 18px;
}

.preview-lightbox-controls button:disabled {
  opacity: 0.38;
  cursor: default;
}

.preview-lightbox-controls output {
  min-width: 58px;
  padding-inline: 8px;
  border-radius: 11px;
  font-size: 10px;
}

.preview-lightbox-controls .preview-zoom-reset {
  min-width: 62px;
  font-size: 9px;
}

.preview-lightbox-close:focus-visible,
.preview-lightbox-mobile-close:focus-visible,
.preview-lightbox-view-arrow:focus-visible,
.preview-lightbox-controls button:focus-visible {
  outline: 3px solid rgba(39, 91, 84, 0.32);
  outline-offset: 2px;
}

@media (max-width: 700px) {
  .preview-zoom-trigger {
    min-height: 36px;
    padding-inline: 10px;
    font-size: 9px;
  }

  .preview-zoom-desktop-copy {
    display: none;
  }

  .preview-zoom-mobile-copy {
    display: inline;
  }

  .preview-lightbox {
    padding: 0;
  }

  .preview-lightbox-dialog {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .preview-lightbox-header,
  .preview-lightbox-footer {
    padding: 11px 12px;
  }

  .preview-lightbox-header > div strong {
    max-width: 88vw;
    font-size: 15px;
  }

  .preview-lightbox-header .preview-lightbox-close {
    display: none;
  }

  .preview-lightbox-help {
    display: none;
  }

  .preview-lightbox-footer {
    flex-direction: column;
    justify-content: center;
    gap: 9px;
    padding-bottom: max(11px, env(safe-area-inset-bottom));
  }

  .preview-lightbox-controls {
    width: 100%;
    justify-content: center;
  }

  .preview-lightbox-controls button,
  .preview-lightbox-controls output {
    height: 44px;
  }

  .preview-lightbox-controls button {
    min-width: 44px;
  }

  .preview-lightbox-mobile-close {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 14px;
    background: #c8322f;
    box-shadow: 0 10px 26px rgba(142, 28, 27, 0.28);
    color: var(--white);
    font-size: 12px;
    font-weight: 900;
  }

  .preview-lightbox-mobile-close span {
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
  }

  .preview-lightbox-view-arrow {
    width: 48px;
    height: 48px;
  }

  .preview-lightbox-view-arrow.previous {
    left: 10px;
  }

  .preview-lightbox-view-arrow.next {
    right: 10px;
  }

  .preview-lightbox-view-count {
    bottom: 10px;
  }
}
