/* Ornament designer - customer page */
:root {
  --spruce: #123b2f;
  --spruce-2: #1d5545;
  --snow: #f2f5f3;
  --frost: #e3eae6;
  --line: #cfdad4;
  --paper: #ffffff;
  --ink: #15201c;
  --muted: #5b6b64;
  --yellow: #f4d900;
  --yellow-soft: #fff6b8;
  --cranberry: #b3122e;
  --radius-s: 8px;
  --radius-m: 14px;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Figtree', system-ui, sans-serif;
  --wood: radial-gradient(ellipse at 30% 25%, rgba(255, 255, 255, 0.25), transparent 55%),
    repeating-linear-gradient(94deg, rgba(150, 100, 50, 0) 0 9px, rgba(150, 100, 50, 0.16) 9px 10px, rgba(150, 100, 50, 0) 10px 23px, rgba(150, 100, 50, 0.1) 23px 25px),
    repeating-linear-gradient(88deg, rgba(255, 240, 210, 0.18) 0 14px, rgba(255, 240, 210, 0) 14px 31px),
    linear-gradient(100deg, #dcbc90, #d2ad7e 45%, #dfc297);
  --acrylic: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 38%),
    linear-gradient(135deg, rgba(210, 228, 236, 0.55), rgba(240, 247, 250, 0.35)),
    repeating-conic-gradient(#e9eef0 0 25%, #f8fafb 0 50%) 0 0 / 22px 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--snow);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--spruce); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; }

/* ------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 10px 24px;
  background: var(--spruce); color: #fff;
}
.brand { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: #fff; text-decoration: none; white-space: nowrap; }
.shop-link { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 12px; border: 1.5px solid rgba(255, 255, 255, 0.45); border-radius: 999px; color: #fff; text-decoration: none; font-weight: 600; font-size: 0.88rem; white-space: nowrap; margin-right: -12px; }
.shop-link span { font-size: 1.2em; line-height: 1; }
.shop-link b { font-weight: inherit; }
.shop-link:hover { border-color: var(--yellow); color: var(--yellow); }
.steps { display: flex; gap: 6px; list-style: none; margin: 0 auto; padding: 0; }
.steps li { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; color: rgba(255, 255, 255, 0.65); font-weight: 600; font-size: 0.92rem; }
.steps li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 0.78rem; }
.steps li.active { color: var(--spruce); background: var(--yellow); }
.steps li.active span { border-color: var(--spruce); }
.steps li.done { color: #fff; }
.price-pill { font-weight: 700; white-space: nowrap; font-size: 0.95rem; }
.price-pill small { font-weight: 500; opacity: 0.75; }

/* ------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid var(--spruce); background: var(--paper); color: var(--spruce);
  padding: 9px 16px; border-radius: 999px; font-weight: 600; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--frost); }
.btn.primary { background: var(--spruce); color: #fff; }
.btn.primary:hover { background: var(--spruce-2); }
.btn.primary:disabled { background: #9fb3ab; border-color: #9fb3ab; cursor: not-allowed; }
.btn.big { padding: 13px 26px; font-size: 1.05rem; }
.btn.small { padding: 6px 12px; font-size: 0.88rem; }
.btn.ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn.ghost:hover { border-color: var(--spruce); }
.btn.danger { border-color: #e7b7c0; color: var(--cranberry); background: transparent; }
.btn.danger:hover { background: #fbecef; }
.btn.wide { width: 100%; }

/* ------------------------------------------------ step 1 */
.step1-inner {
  max-width: 1080px; margin: 0 auto; padding: 40px 24px 60px;
  display: grid; grid-template-columns: minmax(260px, 0.9fr) 1.1fr; gap: 56px; align-items: start;
}
.hang-preview { position: sticky; top: 90px; display: flex; flex-direction: column; align-items: center; }
.ribbon { width: 3px; height: 70px; background: var(--cranberry); border-radius: 2px; }
.disc {
  position: relative; width: min(340px, 72vw); aspect-ratio: 1; border-radius: 50%;
  box-shadow: 0 24px 40px -18px rgba(18, 59, 47, 0.45), inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  margin-top: -6px;
}
.disc-hole { position: absolute; left: 50%; top: 5.7%; width: 5.2%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: var(--snow); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35); }
.disc-caption { margin-top: 18px; color: var(--muted); font-weight: 600; }
.material.wood { background: var(--wood); }
.material.acrylic { background: var(--acrylic); box-shadow: 0 24px 40px -18px rgba(18, 59, 47, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.9), inset 0 0 0 3px rgba(120, 150, 160, 0.35); }
.material.plain { background: #fff; }
/* foil balloons: the picked color with a metallic shine */
.material.foil {
  --pla: #c8ccd2;
  background:
    radial-gradient(ellipse at 30% 26%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 32%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 35%, rgba(0, 0, 0, 0.14) 62%, rgba(255, 255, 255, 0.28) 82%, rgba(0, 0, 0, 0.12) 100%),
    var(--pla);
}
/* PLA: the picked filament color with diagonal 3D-print layer lines (each line = a ridge with a lit and a shaded side). */
.material.pla {
  --pla: #e8e8e8;
  background:
    radial-gradient(ellipse at 30% 24%, rgba(255, 255, 255, 0.22), transparent 58%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0, rgba(0, 0, 0, 0.16) 1.8px, rgba(255, 255, 255, 0.2) 3.6px),
    var(--pla);
}
.material.pla.silk {
  background:
    linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.45) 38%, transparent 52%, rgba(255, 255, 255, 0.25) 70%, transparent 82%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0, rgba(0, 0, 0, 0.14) 1.8px, rgba(255, 255, 255, 0.24) 3.6px),
    var(--pla);
}

.hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.02em; color: var(--spruce); }
.hero p { color: var(--muted); max-width: 46ch; margin: 10px 0 0; font-size: 1.05rem; }
.banner { margin-top: 20px; padding: 12px 14px; background: var(--yellow-soft); border-radius: var(--radius-s); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-weight: 600; }
.choice-block { margin-top: 28px; }
.choice-block h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 12px; text-align: left;
  min-width: 200px; padding: 12px 16px 12px 12px; border-radius: var(--radius-m);
  border: 2px solid var(--line); background: var(--paper); cursor: pointer;
}
.choice .sw { width: 42px; height: 42px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
.choice b { display: block; font-size: 1.02rem; }
.choice small { color: var(--muted); }
.choice[aria-pressed='true'] { border-color: var(--spruce); box-shadow: inset 0 0 0 1px var(--spruce); background: #f7fbf9; }
.choice:disabled { opacity: 0.5; cursor: not-allowed; }
.choice .dot { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); }
.choice.has-dot { gap: 8px; }
.pills .choice { min-width: 0; padding: 8px 16px; border-radius: 999px; }
.step1-foot { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.sel-summary { font-weight: 600; }
.sel-summary .price { font-family: var(--display); font-size: 1.5rem; color: var(--spruce); display: block; }
.stock-note { color: var(--cranberry); font-weight: 600; font-size: 0.9rem; }

/* ------------------------------------------------ step 2 layout */
.step2 {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr) 290px;
  grid-template-areas: 'add stage props' 'add foot props';
  grid-template-rows: auto 1fr;
  gap: 0; min-height: calc(100vh - 56px);
}
.panel { background: var(--paper); padding: 16px; overflow-y: auto; max-height: calc(100vh - 56px); position: sticky; top: 56px; }
.add-panel { min-width: 0; grid-area: add; border-right: 1px solid var(--line); display: flex; flex-direction: column; height: calc(100vh - 56px); max-height: none; overflow: hidden; padding-bottom: 0; }
.add-panel .tabbody { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 16px; }
.add-panel .art-body { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }
.add-panel .art-body { overflow-y: auto; }
.art-controls { flex: none; }
.art-controls .field-label { margin: 10px 0 4px; font-size: 0.8rem; color: var(--muted); }
.pack-row { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.pack-row label { font-weight: 600; font-size: 0.86rem; }
.pack-row select { padding: 7px 10px; font-weight: 600; }
.art-controls .search { margin-top: 8px; padding: 6px 10px; font-size: 0.9rem; }
.art-controls .chip { padding: 4px 10px; font-size: 0.82rem; }
.art-controls .chips { gap: 5px; margin-top: 6px; }
.art-controls .hint { margin: 6px 0 0; font-size: 0.82rem; }
.chips.sets { margin-top: 0; }
.art-grid { flex: 1 0 250px; min-height: 0; overflow-y: auto; align-content: start; padding: 2px 2px 16px; margin-top: 8px; border-top: 1px solid var(--frost); padding-top: 10px; }
.prop-panel { grid-area: props; border-left: 1px solid var(--line); }
.stage-wrap { grid-area: stage; padding: 18px 20px 0; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.stage-foot-wrap { grid-area: foot; padding: 0 20px 30px; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.steps li em { font-style: normal; }
.edit-tab, .mini-order, .m-only { display: none !important; }

.tabs { display: flex; gap: 4px; background: var(--frost); padding: 4px; border-radius: 999px; margin-bottom: 12px; flex: none; }
.tab { flex: 1 1 auto; white-space: nowrap; border: 0; background: transparent; padding: 7px 8px; border-radius: 999px; font-weight: 600; font-size: 0.9rem; cursor: pointer; color: var(--muted); }
.tab.active { background: var(--paper); color: var(--spruce); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.field-label { display: block; font-weight: 600; font-size: 0.86rem; margin: 12px 0 5px; color: var(--ink); }
.field-label output { color: var(--muted); font-weight: 500; margin-left: 4px; }
select, input:not([type]), input[type='search'], input[type='text'], input[type='tel'], input[type='email'], input[type='number'], textarea {
  width: 100%; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: #fff;
}
select:focus, input:focus, textarea:focus { border-color: var(--spruce); outline: none; box-shadow: 0 0 0 3px rgba(18, 59, 47, 0.15); }
.search { margin-bottom: 2px; }
.hint { color: var(--muted); font-size: 0.86rem; margin: 8px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { border: 1.5px solid var(--line); background: #fff; padding: 5px 11px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--spruce); }
.chip[aria-pressed='true'] { background: var(--spruce); color: #fff; border-color: var(--spruce); }
.chips.cats .chip[aria-pressed='true'] { background: var(--yellow); color: var(--spruce); border-color: var(--yellow); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.tile {
  position: relative; aspect-ratio: 1; border: 1.5px solid var(--frost); border-radius: var(--radius-s); background: #fafcfb;
  padding: 6px; cursor: pointer; display: grid; place-items: center;
}
.tile:hover { border-color: var(--spruce); background: #fff; }
.tile { min-width: 0; min-height: 0; overflow: hidden; }
.tile img { position: absolute; left: 6px; top: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; }
.tile .count { position: absolute; right: 4px; bottom: 4px; font-size: 0.7rem; font-weight: 700; background: var(--spruce); color: #fff; border-radius: 999px; padding: 1px 6px; }
.tile .tname { position: absolute; left: 4px; top: 3px; right: 4px; font-size: 0.68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.dress-btn { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 2px solid var(--spruce); border-radius: var(--radius-m); background: var(--yellow-soft); cursor: pointer; text-align: left; }
.dress-btn:hover { background: var(--yellow); }
.dress-btn img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.dress-btn b { display: block; color: var(--spruce); font-size: 0.98rem; }
.dress-btn small { color: var(--muted); font-size: 0.8rem; }
.quick-text { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.sub { font-size: 1rem; margin: 22px 0 6px; }
.radio { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; font-weight: 600; }
.radio small { color: var(--muted); font-weight: 500; }
.color-row { display: flex; gap: 10px; align-items: center; margin: 6px 0 4px 26px; }
input[type='color'] { width: 44px; height: 36px; padding: 2px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: #fff; cursor: pointer; }
.swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.swatches button { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid rgba(0, 0, 0, 0.15); cursor: pointer; padding: 0; }

/* ------------------------------------------------ stage (the ornament) */
.side-tabs { display: flex; gap: 6px; margin-bottom: 4px; }
.side-tab { border: 1.5px solid var(--line); background: #fff; padding: 6px 16px; border-radius: 999px; font-weight: 600; cursor: pointer; }
.side-tab.active { background: var(--spruce); color: #fff; border-color: var(--spruce); }
.side-tab.add { border-style: dashed; color: var(--spruce); }
.stage { position: relative; margin-top: 10px; }
.stage.has-hole::before { content: ''; position: absolute; left: 50%; top: -14px; width: 3px; height: var(--string, 40px); background: var(--cranberry); border-radius: 2px; transform: translateX(-50%); }
.stage .material { position: absolute; border-radius: 50%; box-shadow: 0 26px 44px -20px rgba(18, 59, 47, 0.5); }
.stage canvas { display: block; }
.stage .canvas-container { position: absolute !important; left: 0; top: 0; }
/* balloons: the knot under the balloon, and a bit of ribbon */
.stage.frame-balloon .material::after, .item-pv.is-balloon .ipv-mat::after {
  content: ''; position: absolute; left: 50%; bottom: -5%; width: 7%; height: 6%; transform: translateX(-50%);
  background: inherit; background-color: var(--pla, #c8ccd2); clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 2px;
}
.stage.frame-balloon::after { content: ''; position: absolute; left: 50%; bottom: -26px; width: 2px; height: 30px; background: #9aa7a2; transform: translateX(-50%); }
.stage.drop-here { outline: 3px dashed var(--spruce); outline-offset: 6px; border-radius: 12px; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: var(--spruce); background: rgba(242, 245, 243, 0.6); border-radius: 50%; }
.toolbar { display: flex; gap: 6px; margin-top: 18px; width: 100%; max-width: 560px; }
.tb-gap { flex: 1; }
.icon-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 0.86rem; cursor: pointer; }
.icon-btn:hover { border-color: var(--spruce); }
.icon-btn:disabled { opacity: 0.45; cursor: default; }
.legend { color: var(--muted); font-size: 0.82rem; margin: 10px 0 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.lg-safe { width: 22px; border-top: 2px dashed #8aa39a; display: inline-block; }
.lg-hole { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--cranberry); display: inline-block; margin-left: 10px; }
.stage-foot { display: flex; justify-content: space-between; gap: 10px; width: 100%; max-width: 560px; margin-top: 22px; flex-wrap: wrap; }

/* ------------------------------------------------ properties */
.prop-empty ol { padding-left: 20px; color: var(--muted); font-size: 0.92rem; }
.prop-empty li { margin-bottom: 6px; }
.prop-panel h3 { font-size: 1.05rem; margin-bottom: 4px; }
.variants { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.variants button { min-width: 0; aspect-ratio: 1; border: 2px solid var(--frost); border-radius: var(--radius-s); background: #fafcfb; padding: 2px; cursor: pointer; }
.variants button img { width: 100%; height: 100%; object-fit: contain; }
.variants button[aria-pressed='true'] { border-color: var(--spruce); }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 14px 0 10px; }
.link-row { font-size: 0.86rem; color: var(--muted); margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.seg { display: flex; width: 100%; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { flex: 1; border: 0; background: #fff; padding: 6px 8px; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed='true'] { background: var(--spruce); color: #fff; }
.link-row select { width: auto; padding: 4px 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toggle-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.toggle { border: 1.5px solid var(--line); background: #fff; border-radius: var(--radius-s); padding: 5px 10px; cursor: pointer; font-size: 0.86rem; }
.toggle[aria-pressed='true'] { background: var(--spruce); color: #fff; border-color: var(--spruce); }
input[type='range'] { width: 100%; accent-color: var(--spruce); }
#tFont option { font-size: 1.1rem; }
.layers-box { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
.layers-box h3 small { font-family: var(--body); font-weight: 500; color: var(--muted); font-size: 0.8rem; }
.layers { list-style: none; margin: 8px 0 0; padding: 0; }
.layers li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: var(--radius-s); cursor: pointer; font-size: 0.86rem; }
.layers li:hover { background: var(--snow); }
.layers li.sel { background: var(--yellow-soft); }
.layers li.child { padding-left: 26px; }
.layers li.person { font-weight: 700; margin-top: 4px; }
.layers li.child { position: relative; font-size: 0.82rem; }
.layers li.child::before { content: ""; position: absolute; left: 14px; top: 0; bottom: 0; border-left: 2px solid var(--line); }
.layers li.person + li.child::before { top: -2px; }
.layers li img { width: 30px; height: 30px; object-fit: contain; flex: none; }
.layers li .tx { width: 30px; text-align: center; font-family: var(--display); font-weight: 800; flex: none; }
.layers li .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layers li button { border: 0; background: transparent; cursor: pointer; padding: 2px 5px; border-radius: 4px; color: var(--muted); }
.layers li button:hover { background: var(--frost); color: var(--ink); }
.layers .empty { color: var(--muted); cursor: default; }

/* ------------------------------------------------ step 3 */
.review { max-width: 1040px; margin: 0 auto; padding: 36px 24px 60px; display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: start; }
.review-left { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 22px; }
.review-previews { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.review-previews figure { margin: 0; text-align: center; }
.review-previews .pv { position: relative; width: min(340px, 80vw); aspect-ratio: 1; border-radius: 50%; box-shadow: 0 22px 40px -18px rgba(18, 59, 47, 0.5); overflow: hidden; }
.review-previews .pv img { position: absolute; inset: 0; width: 100%; height: 100%; }
.review-previews figcaption { margin-top: 8px; font-weight: 600; color: var(--muted); }
.review-previews.small .pv { width: 200px; }
.review-previews.small { position: static; flex-direction: row; justify-content: center; flex-wrap: wrap; margin: 20px 0; }
.order-form { background: var(--paper); border-radius: var(--radius-m); padding: 26px; box-shadow: 0 1px 0 var(--line); }
.order-form h2 { font-size: 1.6rem; color: var(--spruce); }
.order-line { margin: 8px 0 4px; font-weight: 600; }
.qty { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { border: 0; background: var(--frost); width: 40px; font-size: 1.2rem; cursor: pointer; }
.qty input { width: 64px; border: 0; text-align: center; border-radius: 0; }
.total { margin-top: 14px; font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--spruce); }
.total small { display: block; font-family: var(--body); font-size: 0.88rem; color: var(--muted); font-weight: 500; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.form-error { background: #fbecef; color: var(--cranberry); padding: 10px 12px; border-radius: var(--radius-s); font-weight: 600; }
.form-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.fulfill { display: block; border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.fulfill input { margin-right: 8px; }
.fulfill small { display: block; color: var(--muted); margin-left: 26px; }
.fulfill:has(input:checked) { border-color: var(--spruce); background: #f7fbf9; }

/* ------------------------------------------------ done */
.done-card { max-width: 640px; margin: 50px auto; padding: 36px 28px; text-align: center; background: var(--paper); border-radius: var(--radius-m); }
.done-check { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--yellow); color: var(--spruce); font-size: 2rem; font-weight: 800; }
.done-card h1 { color: var(--spruce); font-size: 2.2rem; }
.done-code { font-size: 1.15rem; }
.done-code b { font-family: var(--display); font-size: 1.5rem; letter-spacing: 0.04em; background: var(--yellow-soft); padding: 2px 10px; border-radius: 6px; }
.done-pay { background: var(--snow); border-radius: var(--radius-s); padding: 12px 14px; white-space: pre-line; }

/* ------------------------------------------------ toast */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--spruce); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 600; z-index: 50; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); max-width: calc(100vw - 32px); text-align: center; }

/* ------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .step2 { grid-template-columns: 350px minmax(0, 1fr); grid-template-areas: 'add stage' 'add foot' 'add props'; grid-template-rows: auto auto 1fr; }
  .prop-panel { position: static; max-height: none; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 820px) {
  .topbar { padding: 7px 12px; gap: 8px; flex-wrap: nowrap; }
  .brand { font-size: 0.95rem; min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
  .shop-link { min-height: 30px; padding: 0 9px; font-size: 0.8rem; margin-right: 0; }
  .steps { gap: 2px; margin: 0; flex: none; }
  .steps li { padding: 3px 7px; gap: 5px; font-size: 0.8rem; }
  .steps li:not(.active) em { display: none; }
  .price-pill { font-size: 0.84rem; }
  .step1-inner { grid-template-columns: 1fr; gap: 20px; padding: 20px 16px 40px; }
  .hang-preview { position: static; }
  .disc { width: min(220px, 60vw); }
  .ribbon { height: 30px; }
  .choice { min-width: 0; flex: 1 1 140px; }
  .step2 { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'stage' 'add' 'foot' 'props'; grid-template-rows: none; }
  .panel { position: static; max-height: none; border: 0; border-top: 1px solid var(--line); }
  .stage-wrap { padding: 10px 12px 8px; }
  .stage-foot-wrap { padding: 4px 16px 24px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .add-panel { height: auto; overflow: visible; }
  .add-panel .tabbody, .add-panel .art-body { overflow: visible; }
  .art-grid { max-height: none; overflow: visible; }
  .review { grid-template-columns: 1fr; gap: 24px; padding: 20px 16px 40px; }
  .review-left { position: static; }
  .review-previews { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .review-previews .pv { width: min(260px, 70vw); }
  .order-form { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* lock / adjust for clothes on a person */
.link-row { flex-direction: column; align-items: stretch; }
.lr-note { color: var(--muted); }
.lock-toggle { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-m); background: #fff; cursor: pointer; color: var(--spruce); }
.lock-toggle:hover { border-color: var(--spruce); }
.lock-toggle b { display: block; color: var(--ink); font-size: 0.92rem; }
.lock-toggle small { color: var(--muted); font-size: 0.8rem; }
.lock-toggle.on { background: var(--spruce); border-color: var(--spruce); color: var(--yellow); }
.lock-toggle.on b { color: #fff; }
.lock-toggle.on small { color: rgba(255, 255, 255, 0.75); }
.lock-toggle svg { flex: none; }
.lr-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.layers li button.lk { display: grid; place-items: center; color: #9fb3ab; }
.layers li button.lk.on { color: var(--spruce); }

/* ---- image protection: no drag, no long-press save, clicks pass through to the button ---- */
img, canvas { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tile img, .layers img, .set-chip img, .chip img, #reviewPreviews img { pointer-events: none; }
.canvas-container, .stage { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }

/* ---- "we'll design it" mode ---- */
.mode-title { font-size: 1.1rem; font-weight: 700; margin: 26px 0 10px; }
.start-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-card {
  display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer;
  padding: 16px 18px; border-radius: var(--radius-m); border: 2px solid var(--spruce);
  background: var(--paper); color: var(--spruce);
}
.mode-card b { font-family: var(--display); font-size: 1.15rem; }
.mode-card span { color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
.mode-card:hover { background: #f7fbf9; }
.mode-card.primary { background: var(--spruce); color: #fff; }
.mode-card.primary span { color: rgba(255, 255, 255, 0.82); }
.mode-card.primary:hover { background: var(--spruce-2); }
.mode-card:disabled { opacity: 0.45; cursor: not-allowed; }
@media (max-width: 560px) { .start-modes { grid-template-columns: 1fr; } }

.linkish { border: 0; background: none; padding: 0; color: var(--spruce); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.mode-switch { margin: 14px 0 0; color: var(--muted); font-size: 0.92rem; text-align: center; }
.quick-banner {
  width: 100%; max-width: 560px; margin-bottom: 12px; padding: 12px 14px; border-radius: var(--radius-s);
  background: var(--yellow-soft); font-size: 0.9rem; line-height: 1.4; display: flex; flex-direction: column; gap: 4px;
}
.quick-banner b { font-family: var(--display); font-size: 1rem; color: var(--spruce); }
.quick-banner .linkish { align-self: flex-start; font-size: 0.88rem; }
.quick-card { padding: 14px; margin: -2px -2px 16px; border-radius: var(--radius-s); background: var(--yellow-soft); }
.quick-card .field-label:first-of-type { margin-top: 8px; }
.quick-card textarea { background: #fff; }
.quick-card .hint { margin-bottom: 0; }
.step2.quick .prop-empty { display: none; }

.review-request { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; }
.review-request h3 { font-size: 1rem; margin-bottom: 6px; }
.review-request dl { margin: 0; }
.review-request dt { font-weight: 700; font-size: 0.82rem; color: var(--muted); margin-top: 8px; }
.review-request dd { margin: 2px 0 0; white-space: pre-wrap; }
.review-request ul { margin: 2px 0 0; padding-left: 18px; }

/* ---- shop building an order in the designer ---- */
.admin-bar {
  width: 100%; max-width: 560px; margin-bottom: 12px; padding: 12px 14px; border-radius: var(--radius-s);
  background: var(--spruce); color: #fff; font-size: 0.9rem; display: flex; flex-direction: column; gap: 8px;
}
.admin-bar .ab-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.admin-bar .ab-head b { font-family: var(--display); font-size: 1.05rem; margin-right: auto; }
.admin-bar .btn { background: var(--yellow); border-color: var(--yellow); color: var(--spruce); }
.admin-bar .btn { text-decoration: none; }
.admin-bar .btn.ghost { background: transparent; border-color: rgba(255,255,255,0.5); color: #fff; }
.admin-bar dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; }
.admin-bar dt { color: rgba(255,255,255,0.7); font-weight: 600; }
.admin-bar dd { margin: 0; white-space: pre-wrap; }
body.admin-edit .steps, body.admin-edit #backTo1, body.admin-edit #toReview, body.admin-edit #quickOffer, body.admin-edit .price-pill { display: none !important; }
.prop-empty .stuck { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---- guided tour ---- */
.help-btn {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  border: 1.5px solid rgba(255, 255, 255, 0.45); background: transparent; color: #fff;
  border-radius: 999px; padding: 5px 12px 5px 6px; font-weight: 600; font-size: 0.88rem; cursor: pointer;
}
.help-btn span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--yellow); color: var(--spruce); font-weight: 800; font-size: 0.8rem; }
.help-btn:hover { border-color: var(--yellow); }
.tour { position: fixed; inset: 0; z-index: 900; pointer-events: none; }
.tour-block { position: fixed; pointer-events: auto; background: transparent; }
.tour-spot {
  position: fixed; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 3px var(--yellow), 0 0 0 9999px rgba(10, 24, 19, 0.62);
  transition: left 0.25s ease, top 0.25s ease, width 0.25s ease, height 0.25s ease;
}
.tour.idle .tour-spot, .tour.idle .tour-block { display: none; }
.tour-card {
  position: fixed; width: min(340px, calc(100vw - 28px)); pointer-events: auto;
  background: var(--paper); color: var(--ink); border-radius: var(--radius-m); padding: 16px 18px 14px;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.45); border-top: 5px solid var(--yellow);
  transition: left 0.25s ease, top 0.25s ease;
}
.tour-card.pop { animation: tourpop 0.22s ease; }
@keyframes tourpop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tour-count { font-size: 0.75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; min-height: 1em; }
.tour-card h3 { font-size: 1.2rem; color: var(--spruce); margin: 2px 0 6px; }
.tour-text { margin: 0; font-size: 0.95rem; line-height: 1.45; }
.tour-do { margin: 10px 0 0; padding: 6px 10px; border-radius: var(--radius-s); background: var(--yellow-soft); font-weight: 700; font-size: 0.88rem; color: var(--spruce); }
.tour-do::before { content: '👉 '; }
.tour-do.ok { background: #d8f0e2; color: #17603a; }
.tour-do.ok::before { content: ''; }
.tour-btns { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.tour-gap { flex: 1; }
.tour-skip { border: 0; background: none; padding: 0; color: var(--muted); font-size: 0.85rem; text-decoration: underline; cursor: pointer; }
body.touring .toast { display: none !important; }
@media (max-width: 820px) { .help-btn b { display: none; } .help-btn { padding: 5px; } }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-card { transition: none; } .tour-card.pop { animation: none; } }

/* ---- pinned people ---- */
.pin-toggle { margin-bottom: 6px; }
.layers li button.pn { display: grid; place-items: center; color: #9fb3ab; }
.layers li button.pn.on { color: var(--cranberry); }
.layers li.pinned:not(.sel) .nm, .layers li.pinned:not(.sel) img { opacity: 0.55; }
.pin-note { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-s); background: #fbecef; color: var(--cranberry); font-size: 0.84rem; }
.pin-note span { flex: 1; color: var(--ink); }
.pin-note svg { flex: none; }

/* ---- phones: ornament pinned on top, pickers right under it ---- */
@media (max-width: 820px) {
  body.m-layout .prop-panel { display: none; }
  body.m-layout .edit-tab, body.m-layout .mini-order { display: block !important; }
  body.m-layout .m-only { display: inline-flex !important; }
  .mini-order { background: var(--spruce) !important; color: #fff !important; border-color: var(--spruce) !important; }
  .add-panel { padding: 10px 12px 16px; }
  .add-panel .tabs { position: sticky; top: var(--stk, 0px); z-index: 7; margin: 0 -12px 10px; border-radius: 0; padding: 6px 12px; background: var(--frost); box-shadow: 0 4px 8px -6px rgba(0, 0, 0, 0.3); }
  .tab { padding: 7px 6px; font-size: 0.86rem; }
  .edit-tab { position: relative; }
  .edit-tab.has-sel::after { content: ''; position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--cranberry); }
  .edit-body .quick-card { margin: 0 0 14px; }
  .side-tab { padding: 4px 12px; font-size: 0.85rem; }
  .side-tabs { margin-bottom: 0; }
  .toolbar { margin-top: 10px; gap: 5px; }
  .icon-btn { padding: 5px 10px; font-size: 0.82rem; }
  .quick-banner span { display: none; }
  .quick-banner { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 12px; margin-bottom: 6px; }
}
@media (max-width: 820px) and (min-height: 560px) {
  .stage-wrap { position: sticky; top: 0; z-index: 8; background: var(--snow); box-shadow: 0 8px 14px -12px rgba(0, 0, 0, 0.45); }
}
/* phones: the page never scrolls on the design screen (no pull-to-refresh, no address bar jumping);
   only the area under the ornament scrolls, inside its own box */
@media (max-width: 820px) {
  html.in-design, body.in-design { height: 100%; overflow: hidden; overscroll-behavior: none; }
  body.in-design .step2 {
    height: calc(100vh - var(--tbh, 48px));
    height: calc(100dvh - var(--tbh, 48px));
    min-height: 0; overflow-y: auto; overflow-x: hidden;
    overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  }
  body.in-design .stage, body.in-design .stage canvas { touch-action: none; }
}
@media (max-width: 380px) { .brand { display: none; } .topbar { justify-content: space-between; } }
@media (max-width: 359px) { .shop-link { padding: 0 10px; } .shop-link b { display: none; } }
/* big collections: tiles keep their square shape instead of being squashed to fit */
.grid .tile { min-height: auto; height: auto; }
.grid { grid-auto-rows: max-content; }

/* ---- phones: drag bar under the ornament to resize it ---- */
.stage-resizer { display: none; }
@media (max-width: 820px) and (min-height: 560px) {
  .stage-wrap { padding-bottom: 0; }
  .stage-resizer {
    display: flex; align-items: center; justify-content: center; align-self: stretch;
    height: 24px; margin: 4px -12px 0; cursor: ns-resize; touch-action: none; user-select: none;
  }
  .stage-resizer span { width: 54px; height: 5px; border-radius: 99px; background: #9fb3ab; transition: background 0.15s, width 0.15s; }
  .stage-resizer.dragging span, .stage-resizer:hover span { background: var(--spruce); width: 72px; }
}

/* ---- poses shown as pictures ---- */
.chips.poses { flex-wrap: wrap; gap: 5px; padding: 2px; }
@media (max-width: 820px) { .chips.poses { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; } }
.pose-chip {
  position: relative; flex: none; width: 52px; height: 62px; padding: 3px; cursor: pointer;
  border: 2px solid var(--line); border-radius: var(--radius-s); background: #fafcfb;
}
.pose-chip img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.pose-chip:hover { border-color: var(--spruce); }
.pose-chip[aria-pressed='true'] { border-color: var(--spruce); background: var(--yellow-soft); box-shadow: inset 0 0 0 1px var(--spruce); }
.pose-chip .style-tag {
  position: absolute; right: 2px; bottom: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: var(--spruce); color: #fff; font-size: 0.7rem; font-weight: 800; line-height: 18px; text-align: center;
}

@media (max-width: 820px) { .pose-chip { width: 62px; height: 74px; padding: 4px; } }

/* ---- "who" strip: Mom, Dad, Kids... as picture buttons (replaces the dropdown) ---- */
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.who-wrap { position: relative; margin: 0 -4px; }
.who-strip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 4px 6px; scroll-snap-type: x proximity; scroll-padding: 0 4px; scrollbar-width: none; }
.who-strip::-webkit-scrollbar { display: none; }
.who {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 64px; padding: 4px 2px 5px;
  border: 1.5px solid transparent; border-radius: var(--radius-m); background: transparent; cursor: pointer; scroll-snap-align: start;
}
.who-pic { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; background: var(--frost); border: 2px solid var(--line); display: block; }
.who-pic img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.who-pic.head img { object-fit: cover; object-position: 50% 0; transform: scale(1.55); transform-origin: 50% 0; }
.who-name { font-size: 0.74rem; font-weight: 700; color: var(--muted); line-height: 1.1; text-align: center; max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who:hover .who-pic { border-color: var(--spruce); }
.who[aria-pressed='true'] { background: var(--yellow-soft); border-color: var(--yellow); }
.who[aria-pressed='true'] .who-pic { border-color: var(--spruce); }
.who[aria-pressed='true'] .who-name { color: var(--spruce); }
.who-div { flex: none; width: 1px; margin: 8px 2px 20px; background: var(--line); }
.who-arrow {
  position: absolute; top: 15px; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line);
  background: #fff; color: var(--spruce); font-size: 1.1rem; font-weight: 800; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.who-arrow.prev { left: -2px; }
.who-arrow.next { right: -2px; }
@media (pointer: coarse) { .who-arrow { display: none !important; } }
.who-pic.avatar { background: #fff; }
.who-pic.avatar img { object-fit: cover; }
.who-pic.avatar { background: #fff; }
.who-pic.avatar img { object-fit: cover; }

/* ------------------------------------------------ choosing what to make */
.chooser { max-width: 980px; margin: 0 auto; padding: 48px 24px 70px; text-align: center; }
.chooser h1 { font-family: var(--display); color: var(--spruce); font-size: clamp(2rem, 5vw, 3rem); }
.chooser-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; margin-top: 30px; }
.ch-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 18px 20px; border-radius: var(--radius-m); background: var(--paper); border: 2px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color 0.15s, transform 0.15s; }
.ch-card:hover { border-color: var(--spruce); transform: translateY(-2px); }
.ch-card b { font-size: 1.2rem; margin-top: 10px; }
.ch-card small { color: var(--muted); }
.ch-pic { width: 100%; height: 190px; display: grid; place-items: center; }
.ch-pic .item-pv { height: 100%; width: auto; max-width: 100%; }

/* a picture of the blank item, built from its template (start page, chooser, review) */
.item-pv { position: relative; }
.item-pv .ipv-mat { position: absolute; box-shadow: 0 22px 38px -18px rgba(18, 59, 47, 0.45), inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.item-pv.is-balloon .ipv-mat { border-radius: 50%; }
.item-pv .ipv-area { position: absolute; border: 2px dashed rgba(18, 59, 47, 0.35); }
.item-pv .ipv-hole { position: absolute; border-radius: 50%; background: var(--snow); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35); }
.item-pv > img { position: absolute; }
/* shapes cut from an outline (heart, star, tree...): the shadow follows the outline, and the hanging string
   runs down to a hole that sits below the top */
.item-pv.shape-cut { filter: drop-shadow(0 12px 14px rgba(18, 59, 47, 0.28)); }
.item-pv.shape-cut .ipv-mat, .stage .material.shape-cut { box-shadow: none; }
.item-pv .ipv-string { position: absolute; width: 3px !important; transform: translateX(-50%); background: var(--cranberry); border-radius: 2px; }
.stage.has-hole.string-long::before { z-index: 2; pointer-events: none; }
.choice.has-ico { display: inline-flex; align-items: center; gap: 6px; }
.choice .shape-ico { flex: none; }
.hang-preview .step1-item { width: min(340px, 72vw); }
.hang-preview .step1-item.is-balloon { width: min(320px, 70vw); }
.hang-preview:not(.has-hole) .ribbon { display: none; }
.hang-preview .ribbon + .item-pv { margin-top: -6px; }
.hang-preview.is-balloon::after { content: ''; width: 2px; height: 46px; background: #9aa7a2; margin-top: 0; }
.hang-preview.is-balloon .disc-caption { order: 5; }
.review-previews .pv-mock { width: min(340px, 80vw); }
.review-previews.small .pv-mock { width: 200px; }
.preview-banner, .preview-note { background: var(--yellow-soft); border-radius: var(--radius-s); padding: 8px 12px; font-weight: 600; font-size: 0.88rem; margin-bottom: 10px; max-width: 560px; }
.choose-other { margin-top: 18px; }
.choose-other a { color: var(--spruce); font-weight: 600; }

/* customer pictures */
.upload-btn { display: block; text-align: center; cursor: pointer; }
.up-status { color: var(--spruce); font-weight: 600; min-height: 1.2em; }
.hint.small { font-size: 0.8rem; }
.up-quality { margin: 4px 0 8px; padding: 7px 10px; border-radius: var(--radius-s); font-size: 0.84rem; font-weight: 600; }
.up-quality.great, .up-quality.good { background: #e3f3ea; color: #1d5b3c; }
.up-quality.ok { background: var(--yellow-soft); color: #5a4a00; }
.up-quality.low { background: #fbe3e6; color: var(--cranberry); }

/* coming soon (products, colors, sizes, shapes) */
.choice.soon { border-style: dashed; }
.choice.soon small, .choice.soon span:last-child { font-style: italic; }
.ch-card.soon { cursor: default; opacity: 0.85; }
.ch-card.soon:hover { border-color: var(--line); transform: none; }
.soon-badge { background: var(--yellow); color: var(--spruce); border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: 0.8rem; }
.soon-note { background: var(--yellow-soft); border-radius: var(--radius-s); padding: 8px 12px; font-weight: 600; }

/* after tapping a clothing tile: the colors to pick from */
#variantWrap.flash { animation: pick-flash 1.6s ease-out; border-radius: var(--radius-s); }
@keyframes pick-flash {
  0%, 40% { box-shadow: 0 0 0 3px var(--yellow); background: var(--yellow-soft); }
  100% { box-shadow: 0 0 0 0 transparent; background: transparent; }
}
.back-pick { margin-bottom: 8px; }
body.m-layout .m-only[hidden] { display: none !important; }
