:root {
  --cream: #f4ede0;
  --paper: #fbf6ec;
  --rust: #a33b24;
  --rust-dark: #7c2c1b;
  --charcoal: #2b241e;
  --ink: #3a322a;
  --muted: #8a7d70;
  --line: #e2d6c4;
  --serif: "Cormorant Garamond", Palatino, "Palatino Linotype", serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--cream); color: var(--charcoal); font-family: var(--sans); font-size: 18px; line-height: 1.45; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  overscroll-behavior-y: contain;
}
button, input, select, textarea {
  font: inherit;
  color: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(163, 59, 36, .18);
}
button { cursor: pointer; appearance: none; -webkit-appearance: none; border-radius: 0; }
a { color: var(--rust); }

.banner {
  background: var(--charcoal);
  color: var(--paper);
  text-align: center;
  padding: .55rem 1rem;
  font-size: .9rem;
  letter-spacing: .04em;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 6vw;
  border-bottom: 1px solid var(--line);
}
.wordmark { font-family: var(--serif); letter-spacing: .32em; font-size: .85rem; }
.wordmark span { color: var(--rust); }
header nav { display: flex; gap: 1rem; }
header nav button {
  background: none;
  border: 0;
  color: var(--muted);
  padding: .4rem .2rem;
}
header nav button:hover, header nav button:focus { color: var(--charcoal); }

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(300px, .95fr);
  min-height: calc(100dvh - 7.5rem);
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
}
.stage {
  background: #cfc0a8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 1.4rem;
  position: sticky;
  top: 0;
  height: calc(100dvh - 7.5rem);
  overflow-y: auto;
}
.stage[data-ink="light"] { background: #d8cbb6; }
.garment-wrap { width: min(460px, 94%); }
.garment { width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(43,36,30,.28)); }
.garment.tiny { filter: none; width: 100%; }
.photo-mock {
  position: relative;
  width: 100%;
  line-height: 0;
  overflow: hidden;
  cursor: zoom-in;
  --zx: 50%;
  --zy: 40%;
}
.photo-zoom-inner {
  position: relative;
  transform-origin: var(--zx) var(--zy);
  transition: transform .16s ease-out;
  will-change: transform;
}
.photo-mock.zooming .photo-zoom-inner { transform: scale(2.35); }
.photo-mock img { width: 100%; height: auto; display: block; }
.print-on-photo {
  position: absolute;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-mock[data-kind="tee"] { --zy: 38%; }
.photo-mock[data-kind="tee"] .print-on-photo {
  left: 30.2%;
  top: 23%;
  width: 39.6%;
  height: 34%;
}
.photo-mock[data-kind="hoodie"] { --zy: 46%; }
.photo-mock[data-kind="hoodie"] .print-on-photo {
  left: 31.5%;
  top: 38.5%;
  width: 37%;
  height: 16%;
}
.photo-mock[data-kind="baby"] { --zy: 36%; }
.photo-mock[data-kind="baby"] .print-on-photo {
  left: 31%;
  top: 24%;
  width: 38%;
  height: 28%;
}
.zoom-hint {
  margin: .45rem 0 0;
  font-size: .85rem;
  color: var(--ink);
}
.zoom-btn {
  margin-top: .35rem;
  min-height: 44px;
  padding: .45rem .9rem;
  background: #fff;
  border: 1px solid var(--charcoal);
  font-size: .9rem;
}
.zoom-view {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(43,36,30,.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
}
.zoom-view.hidden { display: none !important; }
.zoom-view .zoom-frame {
  width: min(520px, 96vw);
  max-height: 82dvh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #cfc0a8;
  padding: .6rem;
}
.zoom-view .photo-mock { cursor: default; }
.zoom-view .photo-zoom-inner { transform: none; }
.zoom-view .print-on-photo { pointer-events: none; }
.zoom-close {
  margin-top: .8rem;
  min-height: 48px;
  padding: .7rem 1.4rem;
  background: #fff;
  color: var(--charcoal);
}
.photo-mock[data-ink="dark"] .print-on-photo { mix-blend-mode: multiply; }
.photo-mock[data-ink="light"] .print-on-photo { filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.print-on-photo svg { width: 100%; height: 100%; overflow: visible; }
.alt img { width: 100%; display: block; }
.stage-meta { text-align: center; }
.garment-caption {
  margin: .7rem 0 .15rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: .04em;
}
.alts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .45rem;
  max-width: 440px;
  margin-top: .3rem;
}
.alt {
  width: 72px;
  padding: .25rem .2rem .4rem;
  background: rgba(255,255,255,.28);
  border: 2px solid transparent;
  border-radius: 4px;
}
.alt[aria-pressed="true"] { border-color: var(--rust); background: #fff; }
.alt span {
  display: block;
  font-size: .65rem;
  color: var(--ink);
  text-align: center;
  line-height: 1.15;
  margin-top: .15rem;
  white-space: normal;
}
.choice-previews {
  display: flex;
  gap: .35rem;
  margin-bottom: .45rem;
}
.choice-previews img { width: 48%; height: auto; display: block; }
.wallets { display: grid; gap: .7rem; margin: 1.2rem 0 1rem; }
.pay-btn {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: .02em;
}
.pay-apple { background: #000; color: #fff; }
.pay-google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; }
.pay-paypal { background: #ffc439; color: #111; }
.pay-card { background: var(--rust); color: #fff; }
.wallet-sheet {
  position: fixed;
  inset: 0;
  background: rgba(43,36,30,.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 40;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
}
.wallet-sheet.hidden { display: none !important; }
.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-top: .85rem;
}
.field-head label { margin: 0; }
.type-scale {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  flex-shrink: 0;
}
.type-scale button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  font-size: 1.15rem;
  line-height: 1;
}
.type-scale span {
  min-width: 3.2rem;
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
}
.rude-sheet { align-items: center; z-index: 50; }
.rude-card {
  background: var(--paper);
  color: var(--charcoal);
  border-radius: 12px;
  padding: 1.5rem 1.35rem 1.25rem;
}
.rude-card .wallet-brand { color: var(--rust); letter-spacing: .14em; }
.rude-copy { margin: .55rem 0 0; color: var(--ink); }
.rude-copy + .rude-copy { margin-bottom: 1.1rem; }
.rude-card .btn { width: 100%; margin-top: .45rem; }
.rude-card .btn-ghost { width: 100%; }
.wallet-card {
  width: min(420px, 100%);
  background: #111;
  color: #f7f1e6;
  border-radius: 16px 16px 8px 8px;
  padding: 1.4rem 1.3rem 1.2rem;
}
.wallet-card[data-method="google-pay"],
.wallet-card[data-method="card"] { background: #fbf6ec; color: #2b241e; }
.wallet-card[data-method="paypal"] { background: #003087; color: #fff; }
.wallet-brand { margin: 0; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.wallet-amount { font-family: var(--serif); font-size: 2.2rem; margin: .4rem 0 .2rem; }
.wallet-item, .wallet-ship { color: inherit; opacity: .8; margin: .3rem 0 1rem; }
.wallet-card .btn { width: 100%; margin-bottom: .5rem; }
.wallet-card .btn-ghost { width: 100%; color: inherit; border-color: currentColor; }
.print-slot {
  overflow: hidden;
}
.panel { padding: 2rem 6vw 3rem; }
.steps { display: flex; gap: .6rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: .55rem .9rem;
  font-size: .95rem;
  min-height: 44px;
}
.step-n { font-weight: 600; }
.step-dot[aria-current="step"] { background: var(--charcoal); color: var(--paper); border-color: var(--charcoal); }
h1, h2 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0 0 .6rem; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: 1.7rem; }
.lede { color: var(--ink); max-width: 34rem; margin: 0 0 1.4rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.grid-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.choice {
  background: var(--paper);
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 1.1rem 1rem;
  text-align: left;
  min-height: 5.2rem;
}
.choice strong { display: block; font-family: var(--serif); font-size: 1.35rem; }
.choice small { color: var(--muted); }
.choice[aria-pressed="true"] { border-color: var(--rust); background: #fff; }
.sizes { display: flex; flex-wrap: wrap; gap: .65rem 0.85rem; margin: .4rem 0 1.2rem; }
.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: .9rem .55rem;
  margin: .4rem 0 1.4rem;
}
.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  width: auto;
  height: auto;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: .35rem .2rem .5rem;
  box-shadow: none;
  position: relative;
}
.swatch .dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px #cfc3b2;
  flex: none;
}
.swatch[aria-pressed="true"] { border-color: var(--rust); background: #fff; }
.swatch[data-ink="light"] .dot { box-shadow: 0 0 0 1px #2b241e55; }
.swatch span {
  position: static;
  transform: none;
  left: auto;
  top: auto;
  font-size: .8rem;
  color: var(--ink);
  white-space: normal;
  text-align: center;
  line-height: 1.15;
  max-width: 88px;
}
.size {
  min-width: 56px;
  min-height: 56px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.size[aria-pressed="true"] { background: var(--charcoal); color: var(--paper); border-color: var(--charcoal); }
label { display: block; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: .9rem 0 .35rem; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: .85rem .9rem;
  min-height: 52px;
}
textarea, .verse-field {
  min-height: 4.2rem;
  line-height: 1.45;
  resize: vertical;
  overflow: auto;
  field-sizing: content;
  word-break: break-word;
}
.verse-field-tag { min-height: 6.2rem; }
@media (max-width: 960px) {
  .verse-field { min-height: 4.6rem; }
  .verse-field-tag { min-height: 7.2rem; }
}
.hint { color: var(--muted); font-size: .92rem; margin: .3rem 0 1rem; }
.presets { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.2rem; }
.fonts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .5rem;
  margin: .3rem 0 1.2rem;
}
.font-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  min-height: 72px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: .45rem .2rem;
}
.font-choice strong { font-size: 1.45rem; font-weight: 500; line-height: 1; }
.font-choice span { font-family: var(--sans); font-size: .75rem; color: var(--muted); }
.font-choice[aria-pressed="true"] { border-color: var(--rust); background: var(--paper); }
.chip {
  background: #fff;
  border: 1px solid var(--line);
  padding: .65rem .95rem;
  border-radius: 999px;
  min-height: 44px;
}
.chip[aria-pressed="true"] { background: var(--rust); color: #fff; border-color: var(--rust); }
.materials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem 1.6rem;
  margin: 1.4rem 0 1.6rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.materials h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 .3rem;
}
.materials p { margin: 0; color: var(--ink); font-size: .98rem; }
.qty { display: flex; align-items: center; gap: .6rem; margin: .6rem 0 1.2rem; }
.qty button {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1.4rem;
}
.qty strong { min-width: 2rem; text-align: center; font-size: 1.3rem; }
.price-card {
  background: var(--paper);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.price-card .save { color: var(--rust); font-weight: 600; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 1rem 0; }
.totals .grand { font-family: var(--serif); font-size: 1.6rem; }
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: .7rem;
  align-items: center;
  padding: .75rem 6vw calc(.75rem + env(safe-area-inset-bottom));
  background: rgba(244,237,224,.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
  z-index: 20;
}
.dock .sum { flex: 1; min-width: 0; }
.dock .sum b { font-family: var(--serif); font-size: 1.35rem; }
.btn {
  border: 0;
  min-height: 48px;
  padding: .8rem 1.3rem;
  background: var(--rust);
  color: #fff;
  letter-spacing: .04em;
}
.btn:disabled { opacity: .45; }
.btn-ghost { background: transparent; color: var(--charcoal); border: 1px solid var(--charcoal); }
.hidden { display: none !important; }
.done { text-align: left; }
.code {
  font-family: var(--serif);
  font-size: 2rem;
  letter-spacing: .12em;
  margin: .4rem 0 1rem;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.error { color: var(--rust); margin: .4rem 0 1rem; }
.reorder-box {
  background: var(--paper);
  padding: 1rem;
  margin-bottom: 1.4rem;
}
@media (max-width: 960px) {
  .banner { font-size: .78rem; padding: .4rem .7rem; line-height: 1.3; }
  header {
    padding: .55rem 4vw;
    gap: .6rem;
  }
  header nav { gap: .35rem; }
  header nav button { min-height: 44px; padding: .45rem .55rem; font-size: .9rem; }
  .wordmark { letter-spacing: .18em; font-size: .75rem; }
  .layout {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-bottom: calc(7.2rem + env(safe-area-inset-bottom));
  }
  .stage {
    position: sticky;
    top: 0;
    z-index: 8;
    height: auto;
    max-height: 34vh;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: .85rem;
    padding: .55rem 4vw .55rem;
    box-shadow: 0 6px 16px rgba(43,36,30,.08);
  }
  .garment-wrap { width: 34%; max-width: 148px; flex: none; }
  .stage-meta { flex: 1; min-width: 0; text-align: left; }
  .garment-caption {
    margin: 0 0 .25rem;
    font-size: 1rem;
    line-height: 1.25;
  }
  .zoom-hint { margin: 0 0 .3rem; font-size: .8rem; }
  .alts { display: none; }
  .panel { padding: 1rem 4vw 1.5rem; }
  .steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .4rem;
    margin-bottom: 1.1rem;
  }
  .step-dot { width: 100%; padding: .45rem .2rem; }
  .step-label { display: none; }
  .lede { font-size: 1rem; margin-bottom: 1rem; }
  h1 { font-size: 1.7rem; }
  .grid-types {
    grid-template-columns: repeat(3, 1fr);
    gap: .45rem;
  }
  .choice {
    padding: .55rem .35rem .65rem;
    min-height: 0;
    text-align: center;
  }
  .choice strong { font-size: 1rem; }
  .choice small { display: block; font-size: .68rem; line-height: 1.25; }
  .choice-previews { justify-content: center; margin-bottom: .3rem; }
  .choice-previews img { width: 47%; max-height: 64px; object-fit: cover; }
  .swatches { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: .45rem; }
  .swatch { min-height: 76px; padding: .3rem .15rem .4rem; }
  .sizes, .presets {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: .5rem;
    padding-bottom: .35rem;
    margin-bottom: 1rem;
  }
  .sizes::-webkit-scrollbar, .presets::-webkit-scrollbar { display: none; }
  .size { flex: none; min-width: 56px; min-height: 48px; }
  .chip { flex: none; white-space: nowrap; }
  .fonts { grid-template-columns: repeat(2, 1fr); }
  .font-choice { min-height: 64px; }
  .materials, .grid-2, .field-row { grid-template-columns: 1fr; }
  .dock {
    flex-wrap: wrap;
    padding: .55rem 4vw calc(.55rem + env(safe-area-inset-bottom));
    gap: .5rem;
  }
  .dock .sum { order: -1; flex: 1 1 100%; font-size: .9rem; }
  .dock .btn, .dock .btn-ghost { flex: 1; min-width: 0; }
  .dock #next { flex: 1.4; min-height: 52px; }
  .dock .btn-ghost { min-height: 52px; }
  .pay-btn { min-height: 56px; }
  .wallet-card { max-height: 85dvh; overflow-y: auto; }
}
@media (max-width: 520px) {
  .garment-wrap { width: 38%; max-width: 128px; }
  .stage { max-height: 30vh; }
  .swatch .dot { width: 40px; height: 40px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .stage { max-height: 42vh; position: relative; }
  .garment-wrap { max-width: 110px; }
  .dock .sum { display: none; }
}
body.kb-open .dock { display: none; }
body.kb-open .stage { max-height: 22vh; }
body.kb-open .layout { padding-bottom: 1rem; }
body.zoom-open { overflow: hidden; }

.nav-shop{font:inherit;color:inherit;text-decoration:none;padding:.35rem .6rem;border:1px solid rgba(27,42,74,.25);border-radius:6px;margin-right:.4rem}

/* ---- 1.6.0 fixes ---- */
/* Mobile: grid children were growing to the width of the nowrap chip rows (page was ~1560px wide at 390px). */
.layout > *, .panel, .stage { min-width: 0; }
.presets, .sizes { max-width: 100%; }
.fonts > *, .grid-types > * { min-width: 0; }
.font-choice strong { color: var(--charcoal); }
/* Visible keyboard focus everywhere */
:focus-visible { outline: 3px solid #1B2A4A; outline-offset: 2px; }
.btn:focus-visible { outline-color: #B08D57; }
h1[tabindex="-1"]:focus { outline: none; }
.verse-field[aria-invalid="true"] { border-color: var(--rust); box-shadow: 0 0 0 2px rgba(163,59,36,.25); }
.error { font-weight: 600; background: #fbeee9; border-left: 3px solid var(--rust); padding: .6rem .8rem; }
.error.hidden { display: none; }
#fit-hint:empty { display: none; }
#fit-hint { color: var(--rust-dark); }
header nav a.nav-shop { min-height: 44px; display: inline-flex; align-items: center; }
.qty button { min-width: 52px; }
/* Review + disclaimer */
.review dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; margin: 0 0 1rem; padding: 1rem 1.1rem; background: var(--paper); }
.review dt { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; padding-top: .15rem; }
.review dd { margin: 0; overflow-wrap: anywhere; }
.disclaimer { background: #fff; border: 1px solid var(--line); border-left: 4px solid #B08D57; padding: 1rem 1.1rem; margin: 1rem 0; }
.disclaimer-h { font-size: 1.25rem; margin: 0 0 .4rem; }
.disclaimer p { font-size: .95rem; margin: 0 0 .8rem; color: var(--ink); }
label.agree { display: flex; gap: .7rem; align-items: flex-start; text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--charcoal); margin: .4rem 0 .5rem; cursor: pointer; padding: .55rem .4rem; border-radius: 4px; min-height: 44px; }
label.agree input { width: 26px; height: 26px; flex: none; margin: .05rem 0 0; accent-color: #1B2A4A; }
label.agree.needs { background: #fbeee9; outline: 2px solid var(--rust); }
.btn-cart { width: 100%; min-height: 56px; font-size: 1.1rem; margin: .4rem 0 .6rem; }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }
@media (max-width: 960px) {
  #step-4 .btn-cart { display: none; } /* the dock button is the add-to-cart on phones */
  .disclaimer p { font-size: .92rem; }
}
.chip-own { font-weight: 600; border-color: #1B2A4A; }
#terms-link { display: inline-block; padding: .6rem 0; min-height: 44px; }
.wordmark a { display: inline-block; padding: .75rem 0; }
.count { margin: .2rem 0 0; font-size: .85rem; color: var(--muted); min-height: 0; }
.count:empty { display: none; }
.count.at-limit { color: var(--rust); font-weight: 600; }
