/* print fonts: the same files the server uses for the print file (public/fonts/fonts.json) */
@font-face { font-family: 'PS Cormorant Garamond'; src: url('fonts/CormorantGaramond.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'PS Great Vibes'; src: url('fonts/GreatVibes-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'PS Playfair Display'; src: url('fonts/PlayfairDisplay.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'PS Dancing Script'; src: url('fonts/DancingScript.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'PS Lato'; src: url('fonts/Lato-Regular.ttf') format('truetype'); font-display: swap; }
/* Portrait Studio wizard. Readability rule: body 16px, nothing under 13.5px, big buttons. */
.ps-root {
  --ps-cream: #faf6ee; --ps-cream-2: #f3ecdf; --ps-ink: #1f2a44; --ps-ink-2: #3b4664; --ps-muted: #5b6478;
  --ps-gold: #b8893a; --ps-gold-2: #f1e3c4; --ps-line: #e3d8c4; --ps-ok: #1d6b33; --ps-bad: #9b1c13; --ps-white: #fffdf9;
  --ps-serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  --ps-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  position: fixed; inset: 0; z-index: 2147483000; background: var(--ps-cream); color: var(--ps-ink);
  font: 16px/1.5 var(--ps-sans); display: flex; flex-direction: column; -webkit-font-smoothing: antialiased;
}
.ps-root[hidden] { display: none; }
.ps-root *, .ps-root *::before, .ps-root *::after { box-sizing: border-box; }
.ps-root h2, .ps-root h3 { font-family: var(--ps-serif); font-weight: 600; color: var(--ps-ink); margin: 0 0 8px; line-height: 1.2; }
.ps-root h2 { font-size: 28px; } .ps-root h3 { font-size: 20px; }
.ps-root p { margin: 0 0 12px; }
.ps-muted { color: var(--ps-muted); }
.ps-small { font-size: 14px; }

/* top bar */
.ps-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--ps-line); background: var(--ps-white); }
.ps-iconbtn { min-width: 48px; min-height: 48px; border: 0; background: transparent; color: var(--ps-ink); font: 600 16px var(--ps-sans);
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; border-radius: 10px; padding: 0 10px; }
.ps-iconbtn:hover { background: var(--ps-cream-2); }
.ps-iconbtn[disabled] { visibility: hidden; }
.ps-stepinfo { flex: 1; min-width: 0; }
.ps-stepname { font: 600 15px var(--ps-sans); color: var(--ps-muted); }
.ps-bar { height: 8px; background: var(--ps-cream-2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.ps-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--ps-gold), #d4a85a); border-radius: 99px; transition: width .35s ease; }

/* layout: desktop = stage left, panel right; phone = panel full screen */
.ps-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr); }
.ps-stage { position: relative; background: radial-gradient(ellipse at 50% 30%, #fffaf0, var(--ps-cream-2)); display: flex;
  align-items: center; justify-content: center; padding: 28px; overflow: hidden; min-height: 0; }
.ps-panel { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--ps-white); border-left: 1px solid var(--ps-line); }
.ps-body { flex: 1; overflow-y: auto; overflow-x: hidden; min-width: 0; padding: 24px 24px 16px; }
.ps-foot { padding: 14px 24px 18px; border-top: 1px solid var(--ps-line); background: var(--ps-white); }

@media (max-width: 820px) {
  .ps-main { grid-template-columns: minmax(0, 1fr); }
  .ps-stage { display: none; }
  .ps-root:is([data-step="5"], [data-step="8"]) .ps-stage { display: flex; height: var(--sh); padding: 10px; border-bottom: 1px solid var(--ps-line); }
  .ps-root { --sh: 38vh; } .ps-root[data-step="5"] { --sh: 60vh; } .ps-root[data-step="8"] { --sh: 60vh; } /* size step: big picture, the sizes are a dropdown */
  .ps-root:is([data-step="3"], [data-step="7"])[data-has-painting] .ps-stage { display: flex; height: 42vh; padding: 10px; border-bottom: 1px solid var(--ps-line); }
  .ps-root:is([data-step="3"], [data-step="7"])[data-has-painting] .ps-stage .ps-paint { width: auto; height: 100%; aspect-ratio: 2 / 3; }
  .ps-root[data-step="3"] .ps-stage { height: 34vh; }
  .ps-root:is([data-step="5"], [data-step="7"], [data-step="8"]) .ps-main { grid-template-rows: auto minmax(0, 1fr); }
  .ps-panel { border-left: 0; }
  .ps-body { padding: 18px 16px 12px; }
  .ps-foot { position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 18px rgba(31,42,68,.06); }
  .ps-root h2 { font-size: 25px; }
}

/* buttons */
.ps-btn { width: 100%; min-height: 56px; border: 0; border-radius: 14px; background: var(--ps-ink); color: #fff;
  font: 700 18px var(--ps-sans); cursor: pointer; padding: 12px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.ps-btn:hover { background: var(--ps-ink-2); }
.ps-btn.ps-gold { background: var(--ps-gold); } .ps-btn.ps-gold:hover { background: #a57a30; }
/* after the hover rules: a tap leaves the pointer over the next screen's button, which must still look locked */
.ps-btn[disabled], .ps-btn[disabled]:hover { background: #b9bfcc; cursor: default; }
.ps-btn.ps-ghost { background: transparent; color: var(--ps-ink); border: 2px solid var(--ps-ink); min-height: 50px; font-size: 16px; }
.ps-link { background: none; border: 0; color: var(--ps-ink); text-decoration: underline; font: 600 16px var(--ps-sans); cursor: pointer; padding: 10px 0; min-height: 44px; }
.ps-foot .ps-hint { text-align: center; font-size: 14px; color: var(--ps-muted); margin: 8px 0 0; }

/* step 1 choices */
.ps-choices { display: grid; gap: 14px; margin-top: 16px; }
.ps-choice { display: flex; gap: 16px; align-items: center; text-align: left; width: 100%; padding: 18px; border: 2px solid var(--ps-line);
  border-radius: 16px; background: #fff; cursor: pointer; font: 16px var(--ps-sans); color: var(--ps-ink); min-height: 88px; }
.ps-choice:hover { border-color: var(--ps-gold); }
.ps-choice[aria-pressed="true"] { border-color: var(--ps-ink); box-shadow: 0 0 0 3px var(--ps-gold-2); }
.ps-choice b { display: block; font: 600 19px var(--ps-serif); margin-bottom: 2px; }
.ps-choice .ps-ico { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--ps-cream-2); display: grid; place-items: center; }

/* step 2 upload */
.ps-tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 8px; }
.ps-tip { margin: 0; text-align: center; font-size: 14px; }
.ps-tip img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 10px; display: block; border: 3px solid var(--ps-ok); }
.ps-tip.bad img { border-color: var(--ps-bad); }
.ps-tip figcaption { margin-top: 4px; font-weight: 600; }
.ps-tip.good figcaption { color: var(--ps-ok); } .ps-tip.bad figcaption { color: var(--ps-bad); }
.ps-tiplist { margin: 6px 0 14px; padding-left: 20px; } .ps-tiplist li { margin: 2px 0; }
.ps-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 150px)); gap: 10px; margin: 12px 0; justify-content: center; }
.ps-slot { position: relative; aspect-ratio: 4/5; border: 2px dashed var(--ps-gold); border-radius: 14px; background: var(--ps-cream);
  display: grid; place-items: center; text-align: center; cursor: pointer; font: 600 16px var(--ps-sans); color: var(--ps-ink); padding: 8px; overflow: hidden; }
.ps-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ps-slot .ps-slotlabel { position: absolute; left: 6px; top: 6px; background: rgba(31,42,68,.85); color: #fff; font-size: 14px; padding: 2px 8px; border-radius: 99px; }
.ps-slot .ps-remove { position: absolute; right: 6px; top: 6px; min-width: 40px; min-height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); font: 700 18px var(--ps-sans); cursor: pointer; color: var(--ps-ink); }
.ps-slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ps-consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--ps-cream); margin-top: 8px; cursor: pointer; }
.ps-consent input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--ps-ink); }

/* cropper */
.ps-crop { margin: 10px 0; }
.ps-cropbox { position: relative; width: 100%; max-width: 360px; margin: 0 auto; aspect-ratio: 4/5; overflow: hidden; border-radius: 14px; background: #222; touch-action: none; cursor: grab; }
.ps-cropbox img { position: absolute; left: 50%; top: 50%; transform-origin: center; user-select: none; -webkit-user-drag: none; max-width: none; }
.ps-cropbox::after { content: ''; position: absolute; inset: 0; border: 2px solid rgba(255,255,255,.85); border-radius: 14px; pointer-events: none;
  background: radial-gradient(ellipse 32% 26% at 50% 38%, transparent 96%, rgba(255,255,255,.55) 97%, transparent 100%); }
.ps-zoom { display: flex; align-items: center; gap: 12px; max-width: 360px; margin: 12px auto 0; font-weight: 600; }
.ps-zoom input { flex: 1; accent-color: var(--ps-gold); height: 32px; }
.ps-change { display: flex; align-items: center; justify-content: center; max-width: 360px; margin: 14px auto 0; }

/* step 3 painting */
.ps-progress { display: grid; gap: 8px; padding: 16px; border-radius: 16px; background: var(--ps-cream); margin: 8px 0 18px; }
.ps-barhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ps-barhead b { font: 600 19px var(--ps-serif); color: var(--ps-ink); }
.ps-barhead [data-pct] { font: 700 16px var(--ps-sans); color: var(--ps-gold); font-variant-numeric: tabular-nums; }
.ps-pbar { height: 12px; border-radius: 99px; background: var(--ps-cream-2); overflow: hidden; }
.ps-pbar-fill { height: 100%; width: 0; border-radius: inherit; transition: width .25s linear;
  background: linear-gradient(90deg, var(--ps-gold), #d9b56a, var(--ps-gold)); background-size: 200% 100%; animation: ps-sheen 1.6s linear infinite; }
@keyframes ps-sheen { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ps-pbar-fill { animation: none; transition: none; } }
.ps-field { display: block; margin: 0 0 14px; }
.ps-field > span { display: block; font-weight: 600; margin-bottom: 6px; }
.ps-field input, .ps-field select { width: 100%; min-height: 52px; border: 2px solid var(--ps-line); border-radius: 12px; padding: 10px 14px;
  font: 16px var(--ps-sans); color: var(--ps-ink); background: #fff; }
.ps-field input:focus, .ps-field select:focus { outline: none; border-color: var(--ps-gold); box-shadow: 0 0 0 3px var(--ps-gold-2); }
.ps-fieldset { border: 0; padding: 0; margin: 0 0 6px; }
.ps-label { font-weight: 600; margin: 14px 0 8px; }
.ps-wordshead { font: 600 19px var(--ps-serif); margin: 22px 0 4px; }
.ps-btn svg { vertical-align: -4px; margin-right: 4px; }
.ps-fieldset legend { font: 600 19px var(--ps-serif); margin-bottom: 8px; padding: 0; }
.ps-error { color: var(--ps-bad); font-weight: 600; background: #fbe1df; padding: 10px 12px; border-radius: 10px; margin: 8px 0; }

/* paintings, text overlay */
.ps-paint { position: relative; container-type: inline-size; margin: 0; border-radius: 6px; overflow: hidden; background: var(--ps-cream-2); }
.ps-paint img { display: block; width: 100%; height: auto; }
.ps-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 18cqw 6cqw 5cqw; text-align: center; color: #fffaf0; pointer-events: none;
  background: linear-gradient(to top, rgba(20,16,10,.55), rgba(20,16,10,0)); text-shadow: 0 1px 3px rgba(0,0,0,.5); font-family: var(--ps-serif); }
.ps-overlay .n { font-size: max(13.5px, calc(8.5cqw * var(--fs, 1))); line-height: 1.1; }
.ps-overlay .d { font-size: max(13.5px, calc(5.2cqw * var(--fs, 1))); letter-spacing: .04em; }
.ps-overlay .v { font-size: max(13.5px, calc(4.6cqw * var(--fs, 1))); font-style: var(--vs, italic); margin-top: 1cqw; }
.ps-overlay:empty { display: none; }
.ps-stage .ps-paint { width: min(100%, calc((100vh - 170px) * 2 / 3)); box-shadow: 0 18px 50px rgba(31,42,68,.25); }
.ps-design-hero { position: relative; }
.ps-painting-veil { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(250,246,238,.55); backdrop-filter: blur(3px);
  font: 600 22px var(--ps-serif); color: var(--ps-ink); text-align: center; padding: 20px; }

/* step 4 grid */
.ps-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 12px 0; }
.ps-pick { position: relative; border: 3px solid transparent; border-radius: 12px; padding: 0; background: none; cursor: pointer; overflow: hidden; text-align: left; }
.ps-pick[aria-pressed="true"] { border-color: var(--ps-gold); box-shadow: 0 0 0 3px var(--ps-gold-2); }
.ps-pick .ps-check { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); background: var(--ps-gold); color: #fff; border-radius: 99px;
  padding: 4px 12px 4px 9px; font: 700 14px/1 var(--ps-sans); display: none; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.ps-pick .ps-check svg { width: 16px; height: 16px; flex: none; }
.ps-pick[aria-pressed="true"] .ps-check { display: inline-flex; }
/* font picker */
.ps-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 4px 0 14px; }
.ps-font { min-height: 56px; border: 2px solid var(--ps-line); border-radius: 12px; background: #fff; cursor: pointer; padding: 6px 10px;
  display: grid; gap: 2px; text-align: center; color: var(--ps-ink); }
.ps-font .s { font-size: 20px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-font .l { font: 600 13.5px var(--ps-sans); color: var(--ps-muted); }
.ps-font[aria-pressed="true"] { border-color: var(--ps-gold); background: var(--ps-cream); box-shadow: 0 0 0 2px var(--ps-gold) inset; }
.ps-enlarge { position: absolute; right: 8px; bottom: 8px; min-width: 44px; min-height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95);
  cursor: pointer; display: grid; place-items: center; color: var(--ps-ink); }
.ps-wait { aspect-ratio: 2/3; border-radius: 12px; background: linear-gradient(110deg, var(--ps-cream-2) 30%, #fff 50%, var(--ps-cream-2) 70%);
  background-size: 200% 100%; animation: ps-shimmer 1.6s linear infinite; display: grid; place-items: center; text-align: center; padding: 10px; font-weight: 600; color: var(--ps-muted); }
.ps-wait.blocked { animation: none; background: #fbe1df; color: var(--ps-bad); }
@keyframes ps-shimmer { to { background-position: -200% 0; } }
.ps-lightbox { position: fixed; inset: 0; z-index: 3; background: rgba(15,18,28,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.ps-lightbox .ps-paint { width: min(92vw, calc((100vh - 120px) * 2 / 3)); }
.ps-lightbox .ps-iconbtn { color: #fff; position: absolute; right: 12px; top: 12px; background: rgba(255,255,255,.12); }

/* step 5 size + frame + wall */
.ps-sizes { display: grid; gap: 10px; margin: 8px 0 18px; }
.ps-size { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid var(--ps-line);
  border-radius: 12px; background: #fff; cursor: pointer; font: 16px var(--ps-sans); color: var(--ps-ink); text-align: left; min-height: 60px; width: 100%; }
.ps-size[aria-pressed="true"] { border-color: var(--ps-ink); box-shadow: 0 0 0 3px var(--ps-gold-2); }
.ps-size b { font-weight: 700; } .ps-size .ps-price { font: 700 17px var(--ps-sans); white-space: nowrap; }
.ps-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin: 8px 0 14px; }
.ps-frame { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border: 2px solid var(--ps-line); border-radius: 12px;
  background: #fff; cursor: pointer; font: 600 15px var(--ps-sans); color: var(--ps-ink); min-height: 92px; }
.ps-frame[aria-pressed="true"] { border-color: var(--ps-ink); box-shadow: 0 0 0 3px var(--ps-gold-2); }
.ps-frame { position: relative; }
.ps-delta { position: absolute; top: -9px; right: -6px; background: var(--ps-gold); color: #fff; font: 700 13.5px/1 var(--ps-sans);
  padding: 4px 8px; border-radius: 99px; box-shadow: 0 2px 6px rgba(31,42,68,.18); white-space: nowrap; }
.ps-frames { padding-top: 6px; }
.ps-swatch { width: 40px; height: 40px; border-radius: 6px; border: 1px solid rgba(31,42,68,.22); background: var(--sw); } /* solid chip in the frame colour */
.ps-total { display: flex; justify-content: space-between; align-items: baseline; font: 700 22px var(--ps-serif); margin: 4px 0 2px; }
.ps-wall { position: relative; width: 100%; max-width: min(900px, calc((100vh - 150px) * 300 / 270)); aspect-ratio: 300 / 270; container-type: inline-size;
  border-radius: 10px; overflow: hidden; background: linear-gradient(#efe6d6, #e5dac6 92.6%, #b89a76 92.6%, #a8885f); }
@media (max-width: 820px) { .ps-wall { max-width: calc((var(--sh) - 20px) * 300 / 270); } }
.ps-wall-inner { --cm: calc(100cqw / 300); position: absolute; inset: 0; }
.ps-wall .ps-onwall { position: absolute; left: 42%; transform: translateX(-50%); box-shadow: 0 calc(var(--cm) * 2) calc(var(--cm) * 5) rgba(0,0,0,.28);
  background: var(--fr, transparent); padding: var(--frpad, 0); transition: all .3s ease; }
.ps-wall .ps-onwall img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ps-wall svg { position: absolute; }
.ps-scale-note { position: absolute; left: 12px; bottom: 10px; background: rgba(255,253,249,.92); padding: 4px 10px; border-radius: 99px; font-size: 14px; font-weight: 600; color: var(--ps-ink); }

/* step 6 */
.ps-summary { display: flex; gap: 16px; align-items: flex-start; padding: 14px; border: 1px solid var(--ps-line); border-radius: 14px; background: #fff; margin: 10px 0 16px; }
.ps-summary .ps-paint { width: 120px; flex: none; }
.ps-summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.ps-summary dt { font-weight: 600; color: var(--ps-muted); } .ps-summary dd { margin: 0; }
.ps-offer { border: 2px dashed var(--ps-gold); background: #fff8ea; border-radius: 14px; padding: 16px; margin: 14px 0; }
.ps-offer b { font: 600 19px var(--ps-serif); display: block; margin-bottom: 4px; }
.ps-success { display: flex; gap: 12px; align-items: center; background: #e3f1e5; color: var(--ps-ok); padding: 14px; border-radius: 12px; font-weight: 700; margin-bottom: 12px; }
.ps-spin { width: 22px; height: 22px; border: 3px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: ps-rot 0.9s linear infinite; }
@keyframes ps-rot { to { transform: rotate(360deg); } }
.ps-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* small thumbnails: only the name fits at a readable size; the full text shows on the big view */
.ps-grid .ps-overlay .d, .ps-grid .ps-overlay .v, .ps-summary .ps-overlay .d, .ps-summary .ps-overlay .v { display: none; }
.ps-grid .ps-overlay, .ps-summary .ps-overlay { padding-top: 12cqw; }
.ps-slots.single { grid-template-columns: minmax(0, 300px); justify-content: center; }
.ps-foot .ps-total { margin-bottom: 10px; }

/* trust badge: one wide, short image under the main button */
.ps-trustbadge { display: flex; justify-content: center; margin-top: 12px; }
.ps-trustimg { display: block; height: 34px; width: auto; max-width: 100%; }
.ps-center { display: block; text-align: center; margin: 4px auto 0; }
/* reviews carousel */
.ps-reviews { margin: 18px 0 6px; }
.ps-reviews-head { display: flex; justify-content: space-between; align-items: center; }
.ps-reviews-head h3 { margin: 0; }
.ps-revtrack { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 10px; scrollbar-width: none; }
.ps-revtrack::-webkit-scrollbar { display: none; }
.ps-rev { flex: 0 0 min(78%, 280px); scroll-snap-align: start; margin: 0; background: #fff; border: 1px solid var(--ps-line); border-radius: 14px; overflow: hidden; }
.ps-rev img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ps-rev figcaption { padding: 12px 14px 14px; font-size: 15px; }
.ps-rev p { margin: 6px 0 8px; line-height: 1.45; }
.ps-stars { display: inline-flex; color: var(--ps-gold); } .ps-stars svg { width: 16px; height: 16px; }
.ps-sample { font: 700 12px var(--ps-sans); background: #fde7c2; color: #7a4b00; padding: 2px 6px; border-radius: 6px; }

/* size step: painting held up close */
.ps-sizeview { display: grid; gap: 10px; justify-items: center; width: 100%; }
.ps-viewtabs { display: inline-flex; background: #fff; border: 1px solid var(--ps-line); border-radius: 99px; padding: 3px; }
.ps-viewtabs button { border: 0; background: transparent; border-radius: 99px; padding: 7px 16px; font: 600 15px var(--ps-sans); color: var(--ps-muted); cursor: pointer; min-height: 40px; }
.ps-viewtabs button[aria-selected="true"] { background: var(--ps-ink); color: #fff; }
.ps-hold { position: relative; margin: 0; width: min(100%, calc((100vh - 220px) * 2 / 3)); aspect-ratio: 2 / 3; container-type: inline-size; border-radius: 10px; overflow: hidden; box-shadow: 0 18px 50px rgba(31,42,68,.2); }
.ps-hold-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ps-hold-art { position: absolute; inset: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.ps-hold-canvas { position: absolute; box-sizing: border-box; overflow: hidden; container-type: inline-size; background: var(--fr); }
/* the frame goes AROUND the canvas (the print size stays the same), so it grows the box outward by its width */
.ps-hold-canvas:not(.framed) { box-shadow: inset 0 0 1.5cqw rgba(0,0,0,.18); }
.ps-hold-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.ps-hold-canvas .ps-overlay { padding-top: 14cqw; }
/* to scale on the held-up canvas: no minimum font size here (the 13.5px floor made the words huge on small canvases) */
.ps-hold-canvas .ps-overlay .n { font-size: calc(8.5cqw * var(--fs, 1)); } .ps-hold-canvas .ps-overlay .d { font-size: calc(5.2cqw * var(--fs, 1)); } .ps-hold-canvas .ps-overlay .v { font-size: calc(4.6cqw * var(--fs, 1)); }
.ps-hold .ps-scale-note { position: absolute; left: 10px; bottom: 10px; }
@media (max-width: 820px) { .ps-root:is([data-step="5"], [data-step="8"]) .ps-stage .ps-hold { width: auto; height: calc(var(--sh) - 22px); } .ps-hold .ps-scale-note { font-size: 12.5px; padding: 3px 8px; left: 6px; bottom: 6px; } .ps-root[data-step="8"] .ps-hold .ps-scale-note { display: none; } /* frame step: small picture, the size is already chosen */ }

/* empty photo box: a short "add photo" strip; a chosen photo shows as a small portrait thumbnail */
.ps-slot:not(:has(img)) { aspect-ratio: auto; height: 84px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 15px; }
.ps-slot:not(:has(img))::before { content: "+"; display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: var(--ps-gold); color: #fff; font: 700 22px/1 var(--ps-sans); }
.ps-slots.single .ps-slot:has(img) { width: 150px; justify-self: center; }

.ps-restart { border: 0; background: transparent; color: var(--ps-ink); font: 600 15px var(--ps-sans); text-decoration: underline; cursor: pointer; min-height: 44px; padding: 0 6px; white-space: nowrap; }

/* several people: empty boxes are full-width short strips, chosen photos sit as small thumbnails in a row */
.ps-slots:not(.single) { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start; }
.ps-slots:not(.single) .ps-slot:not(:has(img)) { flex: 1 1 100%; height: 60px; justify-content: flex-start; padding-left: 14px; }
.ps-slots:not(.single) .ps-slot:not(:has(img))::before { width: 30px; height: 30px; font-size: 20px; }
.ps-slots:not(.single) .ps-slot:has(img) { flex: 0 0 104px; }
.ps-filebtn { position: relative; width: 100%; cursor: pointer; }
.ps-filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.ps-slots:not(.single) .ps-slotlabel { top: auto; bottom: 6px; font-size: 13.5px; }
.ps-slot:has(img) { border-style: solid; }
.ps-privacy { display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; font-size: 13.5px; color: var(--ps-muted); margin: 6px 0 0; }
.ps-privacy svg { width: 16px; height: 16px; flex: none; color: var(--ps-gold); }

/* phone: "add words?" while it paints, with a big example painting */
.ps-example { width: min(82%, 320px); margin: 14px auto 4px; box-shadow: 0 14px 36px rgba(31,42,68,.25); border-radius: 8px; }
/* the words sit at the bottom: crop the sky so the whole text block shows above the Yes / No buttons */
.ps-example { aspect-ratio: 4 / 5; } .ps-example img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.ps-example-tag { position: absolute; top: 10px; left: 10px; background: rgba(255,253,249,.92); color: var(--ps-ink); font: 700 12.5px/1 var(--ps-sans);
  letter-spacing: .04em; text-transform: uppercase; padding: 6px 9px; border-radius: 99px; }
.ps-yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ps-yesno .ps-btn { min-height: 54px; font-size: 16.5px; }
.ps-asked { margin: 18px 0 4px; }
@media (max-width: 820px) { .ps-root[data-asking] .ps-stage { display: none !important; } }
/* phone: pick step is a one-painting swipe carousel, with the full words visible */
.ps-dots { display: none; }
@media (max-width: 820px) {
  .ps-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 12px -16px 6px; padding: 0 16px; scroll-padding: 0 16px; scrollbar-width: none; }
  .ps-grid::-webkit-scrollbar { display: none; }
  .ps-grid > * { flex: 0 0 86%; scroll-snap-align: start; }
  .ps-grid .ps-overlay .d, .ps-grid .ps-overlay .v { display: block; }
  .ps-dots { display: flex; justify-content: center; gap: 8px; margin: 4px 0 10px; }
  .ps-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 99px; background: var(--ps-line); cursor: pointer; }
  .ps-dots button[aria-current="true"] { background: var(--ps-gold); width: 22px; }
}
.ps-sizeselect { margin: 2px 0 6px; }
/* phone size picker: a button + bottom sheet of sizes */
.ps-dd-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px; padding: 10px 14px; border: 2px solid var(--ps-line); border-radius: 12px;
  background: #fff; color: var(--ps-ink); font: 600 17px var(--ps-sans); cursor: pointer; text-align: left; }
.ps-dd-btn .ps-price { margin-left: auto; }
.ps-dd-btn svg { transform: rotate(90deg); flex: none; }
.ps-sheet { position: fixed; inset: 0; z-index: 2147483000; }
.ps-sheet-back { position: absolute; inset: 0; background: rgba(31,42,68,.45); }
.ps-sheet-card { position: absolute; left: 0; right: 0; bottom: 0; background: var(--ps-white); border-radius: 18px 18px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 30px rgba(31,42,68,.2); animation: ps-sheet-up .2s ease-out; max-height: 80vh; overflow: auto; }
.ps-sheet-head { display: flex; align-items: center; justify-content: space-between; font: 600 19px var(--ps-serif); padding: 6px 0 10px; }
.ps-sheet-list { display: grid; gap: 10px; }
@keyframes ps-sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ps-sheet-card { animation: none; } }
/* phone: frame choice in 2 rows: the 4 frame colours as small tiles, then a long "Canvas only" button */
@media (max-width: 820px) {
  .ps-frames { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding-top: 10px; }
  .ps-frame { gap: 7px; padding: 10px 2px 7px; min-height: 0; font-size: 13.5px; line-height: 1.15; text-align: center; }
  .ps-frame .ps-swatch { width: 24px; height: 24px; }
  .ps-frame .ps-delta { top: -10px; right: 50%; transform: translateX(50%); padding: 3px 6px; font-size: 12px; white-space: nowrap; }
  .ps-frame[data-frame="none"] { order: 1; grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 10px; padding: 8px 12px; min-height: 46px; }
  .ps-frame[data-frame="none"] .ps-swatch { width: 24px; height: 24px; }
}
/* frame / canvas features under the frame choice (Jondo spec on Printify) */
.ps-feats { margin: 4px 0 12px; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; color: var(--ps-ink); }
.ps-feats li { position: relative; padding-left: 20px; line-height: 1.35; }
.ps-feats li::before { content: ''; position: absolute; left: 3px; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: var(--ps-gold); }
/* phone frame picker rows (button + sheet): chip, name, +price pill on the right */
.ps-framebtn, .ps-framerow { justify-content: flex-start; gap: 12px; }
.ps-framebtn .ps-swatch, .ps-framerow .ps-swatch { width: 28px; height: 28px; flex: none; }
.ps-framebtn .ps-delta, .ps-framerow .ps-delta { position: static; transform: none; margin-left: auto; padding: 5px 9px; }
.ps-framebtn .ps-delta + svg { margin-left: 4px; }
.ps-framebtn b + svg { margin-left: auto; }
/* phone, last step before adding to cart: the painting big on top (the stage), the details below */
@media (max-width: 820px) {
  .ps-root[data-step="6"]:not([data-added]) .ps-stage { display: flex; height: 52vh; padding: 12px; border-bottom: 1px solid var(--ps-line); }
  .ps-root[data-step="6"]:not([data-added]) .ps-stage .ps-paint { width: auto; height: 100%; aspect-ratio: 2 / 3; }
  .ps-root[data-step="6"]:not([data-added]) .ps-main { grid-template-rows: auto minmax(0, 1fr); }
  .ps-root[data-step="6"]:not([data-added]) .ps-summary .ps-paint { display: none; }
}
