/* Print Studio v4 — lab order ticket.
   Layout: focused Size, Photos and Order steps with shared navigation.
   Inherits the Famous Bridal site palette (ivory, ink, gold) and adds a navy action colour. */
.ps {
  --ps-bg: var(--fb-bg, #f8f5ef);
  --ps-surface: #fffdf9;
  --ps-sunk: #f1ebe2;
  --ps-ink: #23201d;
  --ps-muted: #6d6258;
  --ps-line: #e3d8c7;
  --ps-line-strong: #cdbfa9;
  --ps-gold: #a77c3b;
  --ps-gold-soft: #f4ead9;
  --ps-navy: #183247;
  --ps-navy-ink: #ffffff;
  --ps-navy-soft: #e5ebf0;
  --ps-good: #2e7a4e;
  --ps-warn: #9a6210;
  --ps-bad: #b03a3a;
  --ps-paper: #ffffff;
  --ps-shadow: 0 1px 2px rgba(35, 32, 29, .06), 0 10px 26px rgba(35, 32, 29, .08);
  --ps-display: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  --ps-body: Inter, "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --ps-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --ps-r: 10px;
  background: var(--ps-bg);
  color: var(--ps-ink);
  font-family: var(--ps-body);
  font-size: 15px;
  line-height: 1.5;
  padding-inline: 16px;
  padding-block: 8px 120px;
}
.ps.ps-wizard { padding-bottom: 48px; }
.ps *, .ps *::before, .ps *::after { box-sizing: border-box; }
.ps [hidden] { display: none !important; }
.ps button, .ps input, .ps select, .ps textarea { font: inherit; color: inherit; }
.ps button { cursor: pointer; }
.ps :focus-visible { outline: 2px solid var(--ps-gold); outline-offset: 2px; }
.ps h1, .ps h2, .ps h3 { font-family: var(--ps-display); font-weight: 600; line-height: 1.08; margin: 0; text-wrap: balance; color: var(--ps-ink); letter-spacing: 0; }
.ps-eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ps-gold); font-weight: 600; margin: 0; }
.ps-hint { font-size: 13px; color: var(--ps-muted); margin: 0; }
.ps-note { font-size: 12.5px; color: var(--ps-muted); margin: 0; }
.ps-num { font-family: var(--ps-mono); font-size: 12px; color: var(--ps-gold); margin-right: 10px; vertical-align: .35em; font-weight: 500; }

.ps-hero, .ps-step-nav, .ps-grid, .ps-wizard-footer, .ps-track-below { max-width: 960px; margin-inline: auto; }
.ps-hero { padding-block: 16px 6px; }
.ps-hero h1 { font-size: clamp(28px, 4vw, 32px); }
.ps-track-link { font-size: 13.5px; color: var(--ps-navy); font-weight: 600; text-underline-offset: 3px; }
.ps-step-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding-block: 6px; }
.ps-step-nav button { display: inline-flex; min-width: 0; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--ps-line); border-radius: 9px; background: var(--ps-surface); color: var(--ps-muted); padding: 9px 6px; font-size: 13px; font-weight: 700; }
.ps-step-nav button > span { display: inline-grid; place-items: center; width: 21px; height: 21px; flex: 0 0 auto; border-radius: 50%; background: var(--ps-sunk); color: var(--ps-muted); font: 700 11px/1 var(--ps-mono); }
.ps-step-nav button[aria-current="step"] { border-color: var(--ps-navy); background: var(--ps-navy-soft); color: var(--ps-navy); }
.ps-step-nav button[aria-current="step"] > span { background: var(--ps-navy); color: var(--ps-navy-ink); }
.ps-step-nav button:disabled { cursor: default; }
.ps-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; margin-top: 8px; }
.ps-work { min-width: 0; display: grid; }
.ps-block { display: grid; gap: 14px; min-width: 0; }
.ps-block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.ps-block-head h2 { font-size: 30px; }

.ps-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ps-tabs button { min-width: 0; border: 1px solid var(--ps-line-strong); background: var(--ps-surface); padding: 10px 8px; border-radius: 8px; font-weight: 600; font-size: 14px; line-height: 1.25; }
.ps-tabs button[aria-selected="true"] { background: var(--ps-navy); color: var(--ps-navy-ink); border-color: var(--ps-navy); }
.ps-catalogue { display: grid; gap: 12px; }
.ps-group-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ps-muted); font-weight: 600; margin: 6px 0 -4px; }
.ps-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.ps-size { position: relative; display: grid; grid-template-rows: 70px auto; gap: 8px; text-align: left; border: 1px solid var(--ps-line); background: var(--ps-surface); border-radius: var(--ps-r); padding: 12px; min-width: 0; }
.ps-size:hover { border-color: var(--ps-line-strong); }
.ps-size[aria-pressed="true"] { border-color: var(--ps-navy); box-shadow: inset 0 0 0 1px var(--ps-navy); }
.ps-size-shape { display: flex; align-items: flex-end; justify-content: flex-start; }
.ps-size-shape i { display: block; border: 1.5px solid var(--ps-ink); background: var(--ps-sunk); border-radius: 1px; }
.ps-size-shape canvas { display: block; max-width: 100%; }
.ps-size[aria-pressed="true"] .ps-size-shape i { background: var(--ps-navy-soft); border-color: var(--ps-navy); }
.ps-size b { display: block; font-size: 16px; line-height: 1.2; }
.ps-size small { display: block; color: var(--ps-muted); font-size: 12px; line-height: 1.35; }
.ps-size .ps-mono { font-family: var(--ps-mono); font-variant-numeric: tabular-nums; }
.ps-tag { position: absolute; top: 8px; right: 8px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--ps-gold); border: 1px solid currentColor; border-radius: 4px; padding: 1px 5px; }

.ps-options { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; padding: 14px; border: 1px dashed var(--ps-line-strong); border-radius: var(--ps-r); }
.ps-options-note { flex: 1 1 200px; }
.ps-field { display: grid; gap: 5px; min-width: 0; border: 0; padding: 0; margin: 0; }
.ps-field > span, .ps-field > legend, .ps-field-label { font-size: 12px; font-weight: 600; color: var(--ps-muted); padding: 0; margin: 0; }
.ps-field small { font-weight: 400; }
.ps-field-narrow input { width: 90px; }
.ps-grow { flex: 1 1 180px; }
.ps select, .ps input[type="text"], .ps input:not([type]), .ps input[type="tel"], .ps input[type="email"], .ps input[type="date"], .ps input[type="number"], .ps textarea {
  background: var(--ps-surface); border: 1px solid var(--ps-line-strong); border-radius: 8px; padding: 9px 11px; min-width: 0; max-width: 100%; font-size: 15px;
}
.ps textarea { width: 100%; resize: vertical; }
.ps input[type="range"] { accent-color: var(--ps-navy); width: 100%; }

.ps-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; padding: 11px 18px; font-weight: 700; font-size: 14.5px; border: 1px solid var(--ps-navy); background: var(--ps-navy); color: var(--ps-navy-ink); text-decoration: none; line-height: 1.2; }
.ps .ps-btn { color: var(--ps-navy-ink); background: var(--ps-navy); }
.ps .ps-btn.ps-btn-ghost { color: var(--ps-ink); background: transparent; }
.ps .ps-btn:hover { filter: brightness(1.12); }
.ps .ps-btn.ps-btn-ghost:hover { background: var(--ps-sunk); filter: none; }
.ps-btn-ghost { background: transparent; color: var(--ps-ink); border-color: var(--ps-line-strong); }
.ps-btn-ghost:hover { background: var(--ps-sunk); filter: none; }
.ps-btn-small { padding: 7px 12px; font-size: 13px; font-weight: 600; }
.ps-btn-block { width: 100%; }
.ps-btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.ps-icon-btn { border: 1px solid var(--ps-line); background: transparent; border-radius: 8px; width: 36px; height: 36px; font-size: 20px; line-height: 1; }

.ps-drop { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center; border: 1.5px dashed var(--ps-line-strong); border-radius: var(--ps-r); padding: 18px; background: var(--ps-surface); cursor: pointer; }
.ps-drop .ps-hint { grid-column: 2; }
.ps-drop.is-over, .ps-drop:hover { border-color: var(--ps-navy); background: var(--ps-navy-soft); }
.ps-drop-icon { grid-row: span 2; width: 44px; height: 44px; border-radius: 10px; background: var(--ps-navy); position: relative; }
.ps-drop-icon::before, .ps-drop-icon::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--ps-navy-ink); border-radius: 2px; transform: translate(-50%, -50%); }
.ps-drop-icon::before { width: 18px; height: 2.5px; }
.ps-drop-icon::after { width: 2.5px; height: 18px; }
.ps-drop-text { font-size: 15.5px; }
.ps-upload-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13.5px; padding: 10px 14px; border-radius: 8px; background: var(--ps-sunk); }
.ps-upload-bar { flex: 1 1 160px; height: 6px; border-radius: 3px; background: var(--ps-line); overflow: hidden; }
.ps-upload-bar i { display: block; height: 100%; background: var(--ps-navy); width: 0; transition: width .2s; }
.ps-bulk { background: var(--ps-gold-soft); border-radius: var(--ps-r); }
.ps-bulk summary { padding: 10px 14px; color: var(--ps-ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.ps-bulk[open] summary { border-bottom: 1px solid var(--ps-line); }
.ps-bulk-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; padding: 12px 14px; }
.ps-bulk .ps-hint { flex: 1 1 200px; color: var(--ps-ink); }

.ps-tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 14px; }
.ps-empty { grid-column: 1 / -1; border: 1px dashed var(--ps-line-strong); border-radius: var(--ps-r); padding: 28px 18px; text-align: center; color: var(--ps-muted); display: grid; gap: 6px; justify-items: center; }
.ps-empty b { color: var(--ps-ink); font-family: var(--ps-display); font-size: 22px; font-weight: 600; }
.ps-card { display: grid; grid-template-rows: auto 1fr; background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: var(--ps-r); overflow: hidden; min-width: 0; }
.ps-card.is-error { border-color: var(--ps-bad); }
.ps-stage { position: relative; display: grid; place-items: center; background: var(--ps-sunk); padding: 16px; height: 220px; }
.ps-stage canvas { display: block; max-width: 100%; max-height: 100%; box-shadow: var(--ps-shadow); cursor: pointer; background: var(--ps-paper); }
.ps-stage.is-framed canvas { outline: 8px solid var(--ps-frame, #1d1d1d); outline-offset: 0; }
.ps-stage-badge { position: absolute; left: 10px; bottom: 10px; font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, .92); color: var(--ps-ink); padding: 2px 8px; border-radius: 999px; }
.ps-card-body { display: grid; gap: 10px; padding: 12px; align-content: start; }
.ps-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ps-title { font-weight: 700; line-height: 1.25; }
.ps-meta { font-size: 12px; color: var(--ps-muted); overflow-wrap: anywhere; }
.ps-card select { font-size: 13.5px; padding: 7px 9px; width: 100%; }
.ps-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ps-badge { display: inline-flex; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; border: 1px solid currentColor; white-space: nowrap; color: var(--ps-muted); }
.ps-good { color: var(--ps-good); } .ps-ok { color: var(--ps-warn); } .ps-low { color: var(--ps-bad); }
.ps-qty { display: inline-flex; align-items: center; border: 1px solid var(--ps-line-strong); border-radius: 8px; overflow: hidden; }
.ps-qty button { border: 0; background: var(--ps-sunk); width: 34px; height: 34px; font-size: 18px; line-height: 1; }
.ps-qty input { width: 48px; border: 0 !important; border-radius: 0 !important; text-align: center; padding: 4px !important; background: transparent !important; -moz-appearance: textfield; }
.ps-qty input::-webkit-outer-spin-button, .ps-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ps-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ps-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ps-link-btn { border: 0; background: none; padding: 4px 2px; font-size: 12.5px; color: var(--ps-muted); text-decoration: underline; text-underline-offset: 3px; }
.ps-link-btn:hover { color: var(--ps-bad); }
.ps-chip { border: 1px solid var(--ps-line-strong); background: transparent; border-radius: 999px; padding: 6px 11px; font-size: 12.5px; font-weight: 600; }
.ps-chip[aria-pressed="true"] { border-color: var(--ps-gold); color: var(--ps-gold); background: var(--ps-gold-soft); }
.ps-card-error { font-size: 12.5px; color: var(--ps-bad); margin: 0; }
.ps-progress { position: absolute; left: 12px; right: 12px; top: 10px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .7); overflow: hidden; }
.ps-progress i { display: block; height: 100%; background: var(--ps-navy); width: 0; transition: width .2s; }

.ps-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ps-line); }
.ps-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 9px 0; border-bottom: 1px dashed var(--ps-line); font-size: 13.5px; }
.ps-lines li > span:last-child { font-family: var(--ps-mono); text-align: right; font-variant-numeric: tabular-nums; }
.ps-lines li small { grid-column: 1 / -1; color: var(--ps-muted); font-size: 12px; }
.ps-lines .ps-muted { color: var(--ps-muted); }

.ps-help { border: 1px solid var(--ps-line); border-radius: var(--ps-r); background: var(--ps-surface); }
.ps-help summary { padding: 10px 14px; color: var(--ps-muted); font-size: 13px; font-weight: 700; cursor: pointer; }
.ps-help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; padding: 4px 14px 14px; border-top: 1px solid var(--ps-line); }
.ps-help h3 { font-size: 21px; margin-bottom: 6px; }
.ps-help p { margin: 0; font-size: 13.5px; color: var(--ps-muted); }

.ps-review-step { width: min(760px, 100%); margin-inline: auto; }
.ps-review { display: grid; gap: 14px; padding: clamp(16px, 3vw, 24px); border: 1px solid var(--ps-line); border-radius: 14px; background: var(--ps-surface); box-shadow: var(--ps-shadow); }
.ps-review .ps-panel-head h2 { font-size: 30px; }
.ps-wizard-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 18px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--ps-line); }
.ps-step-message { min-width: 0; margin: 0; color: var(--ps-muted); font-size: 12.5px; }
.ps-wizard-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.ps-wizard-actions .ps-btn { min-width: 116px; }
.ps-track-below { margin-top: 12px; text-align: center; }

.ps-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(20, 18, 16, .55); display: grid; place-items: end center; }
.ps-panel { background: var(--ps-surface); color: var(--ps-ink); width: min(680px, 100%); max-height: 94vh; max-height: 94dvh; overflow: auto; border-radius: 16px 16px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px; overscroll-behavior: contain; }
.ps-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ps-panel h2 { font-size: 30px; }
.ps-panel-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.ps-editor-stage { display: grid; place-items: center; background: var(--ps-sunk); border-radius: 10px; padding: 16px; height: min(46vh, 440px); touch-action: none; user-select: none; }
.ps-editor-stage canvas { display: block; max-width: 100%; max-height: 100%; box-shadow: var(--ps-shadow); cursor: grab; background: var(--ps-paper); touch-action: none; }
.ps-editor-stage canvas.is-dragging { cursor: grabbing; }
.ps-editor-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.ps-swap-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px; scrollbar-width: none; }
.ps-swap-row::-webkit-scrollbar { display: none; }
.ps-swap-row button { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 8px; border: 2px solid transparent; padding: 0; overflow: hidden; background: var(--ps-sunk); }
.ps-swap-row button[aria-pressed="true"] { border-color: var(--ps-navy); }
.ps-swap-row img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps-swap-row .ps-swap-add { display: grid; place-items: center; font-size: 26px; color: var(--ps-muted); border: 1.5px dashed var(--ps-line-strong); }
.ps-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.ps-form .ps-field input, .ps-form .ps-field select { width: 100%; }
.ps-full { grid-column: 1 / -1; }
.ps-radio-row { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.ps-radio-row legend { width: 100%; margin-bottom: 4px; }
.ps-radio-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; }
.ps .ps-radio-row label { display: inline-flex; align-items: center; gap: 8px; width: auto; flex: 0 0 auto; }
.ps .ps-radio-row input { accent-color: var(--ps-navy); width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }
.ps-error { color: var(--ps-bad); font-size: 13.5px; margin: 10px 0; }
.ps-review [data-ps-form-body] { display: grid; gap: 12px; }
.ps-success { display: grid; gap: 12px; }
.ps-ref { font-family: var(--ps-mono); font-size: clamp(26px, 6vw, 34px); font-weight: 600; letter-spacing: .02em; margin: 0; color: var(--ps-navy); }
.ps-success-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ps-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 1100; background: var(--ps-ink); color: var(--ps-surface); padding: 10px 16px; border-radius: 8px; font-size: 14px; max-width: min(92vw, 520px); box-shadow: var(--ps-shadow); }
.ps-noscript { max-width: 1180px; margin: 20px auto; padding: 16px; background: var(--ps-gold-soft); border-radius: 8px; }

/* Track page */
.ps-track { max-width: 640px; margin: 0 auto; display: grid; gap: 18px; padding-block: 28px; }
.ps-track-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.ps-track-form .ps-field input { width: 100%; }
.ps-timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.ps-timeline li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding-bottom: 16px; position: relative; }
.ps-timeline li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--ps-line-strong); margin-top: 5px; justify-self: center; }
.ps-timeline li::after { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--ps-line); }
.ps-timeline li:last-child::after { display: none; }
.ps-timeline li.is-done::before { background: var(--ps-navy); }
.ps-timeline li.is-current::before { background: var(--ps-gold); box-shadow: 0 0 0 4px var(--ps-gold-soft); }
.ps-timeline time { display: block; color: var(--ps-muted); font-size: 12.5px; }
.ps-card-plain { background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: var(--ps-r); padding: 18px; display: grid; gap: 12px; }

@media (min-width: 720px) {
  .ps-overlay { place-items: center; padding: 20px; }
  .ps-panel { border-radius: 16px; padding: 22px 24px; }
}
@media (max-width: 560px) {
  .ps.ps-wizard { padding-bottom: calc(142px + env(safe-area-inset-bottom, 0px)); }
  .ps-step-nav { gap: 4px; }
  .ps-step-nav button { gap: 4px; padding: 8px 3px; font-size: 12px; }
  .ps-step-nav button > span { width: 19px; height: 19px; font-size: 10px; }
  .ps-tabs button { padding: 9px 4px; font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
  .ps-form { grid-template-columns: 1fr; }
  .ps-block-head h2 { font-size: 26px; }
  .ps-tray { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .ps-stage { height: 170px; padding: 12px; }
  .ps-sizes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ps-size { grid-template-rows: 40px auto; padding: 8px; gap: 6px; }
  .ps-size-shape { height: 40px; overflow: hidden; }
  .ps-size-shape > * { transform: scale(.6); transform-origin: left bottom; }
  .ps-size b { font-size: 14px; }
  .ps-size small { font-size: 10.5px; }
  .ps-tag { top: 5px; right: 5px; font-size: 8.5px; padding: 0 4px; }
  .ps-hero { padding-block: 12px 4px; }
  .ps-wizard-footer { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; max-width: none; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 0; padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--ps-line); background: var(--ps-surface); box-shadow: 0 -6px 18px rgba(35, 32, 29, .08); }
  .ps-step-message { min-height: 18px; text-align: center; font-size: 11.5px; }
  .ps-wizard-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .ps-wizard-actions .ps-btn { width: 100%; min-width: 0; }
  .ps-wizard-actions .ps-btn:first-child[hidden] + .ps-btn { grid-column: 1 / -1; }
  .ps-track-form { grid-template-columns: 1fr; }
  .ps-split { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .ps-size, .ps-btn, .ps-chip, .ps-tabs button { transition: border-color .15s, background-color .15s, box-shadow .15s, filter .15s; }
}

/* ===== v4.1 compact, icon-led controls (2026-10-04 evening) ===== */
.ps .ps-i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; display: block; }
.ps .ps-ico-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 10px; border: 1px solid var(--ps-line); background: var(--ps-surface); color: var(--ps-ink); }
.ps .ps-ico-btn:hover { background: var(--ps-sunk); }
.ps .ps-ico-btn[aria-pressed="true"] { background: var(--ps-gold-soft); border-color: var(--ps-gold); color: var(--ps-gold); }
.ps .ps-ico-btn.ps-ico-danger:hover { color: var(--ps-bad); border-color: var(--ps-bad); background: transparent; }
.ps .ps-ico-btn.ps-ico-primary { background: var(--ps-navy); border-color: var(--ps-navy); color: var(--ps-navy-ink); }
.ps .ps-ico-btn.ps-ico-sm { width: 32px; height: 32px; border-radius: 50%; }

/* Print cards */
.ps-tray { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.ps-card { border-radius: 12px; }
.ps-stage { height: 200px; padding: 26px 14px 14px; }
.ps-stage-tag { position: absolute; left: 8px; top: 7px; font-size: 11.5px; font-weight: 700; color: var(--ps-ink); background: rgba(255, 253, 249, .92); padding: 2px 8px; border-radius: 999px; max-width: calc(100% - 70px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-stage-q { position: absolute; right: 8px; top: 7px; font-size: 10.5px; font-weight: 700; padding: 2px 8px 2px 18px; border-radius: 999px; background: rgba(255, 253, 249, .92); }
.ps-stage-q::before { content: ""; position: absolute; left: 7px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: currentColor; }
.ps-stage-badge { left: auto; right: 8px; bottom: 8px; background: var(--ps-navy); color: var(--ps-navy-ink); }
.ps-card-body { gap: 8px; padding: 10px; }
.ps-card select { font-size: 13px; padding: 6px 8px; border-radius: 8px; }
.ps-mini-seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--ps-sunk); border-radius: 9px; padding: 2px; gap: 2px; }
.ps-mini-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 0; background: transparent; border-radius: 7px; padding: 5px 4px; font-size: 12.5px; font-weight: 600; color: var(--ps-muted); }
.ps-mini-seg button .ps-i { width: 16px; height: 16px; }
.ps-mini-seg button[aria-pressed="true"] { background: var(--ps-surface); color: var(--ps-ink); box-shadow: 0 1px 2px rgba(35, 32, 29, .12); }
.ps-mini-seg button:disabled { opacity: .4; cursor: not-allowed; }
.ps-frame-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ps-swatches { display: flex; gap: 5px; flex: 0 0 auto; }
.ps-swatches button { width: 20px; height: 20px; border-radius: 50%; padding: 0; border: 2px solid var(--ps-surface); background: var(--sw); box-shadow: 0 0 0 1px var(--ps-line-strong); }
.ps-swatches button[aria-checked="true"] { box-shadow: 0 0 0 2px var(--ps-navy); }
.ps-frame-row .ps-style-sel { flex: 1 1 auto; min-width: 0; width: auto; }
.ps-card-tools { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ps-card-tools .ps-qty { border-radius: 10px; }
.ps .ps-card-tools .ps-qty .ps-ico-btn { width: 30px; height: 32px; border: 0; border-radius: 0; background: var(--ps-sunk); }
.ps-card-tools .ps-qty input { width: 34px; font-weight: 700; }
.ps-tool-icons { display: flex; gap: 4px; }
.ps .ps-tool-icons .ps-ico-btn { width: 32px; height: 32px; border-radius: 9px; }
.ps-card .ps-meta { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-card-error { font-size: 12px; }

/* Editor: full-height sheet on phones, nothing wider than the screen */
.ps-overlay { overflow: hidden; }
.ps-panel { grid-template-columns: minmax(0, 1fr); }
.ps-panel > * { min-width: 0; }
.ps-editor { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); height: 96vh; height: 96dvh; max-height: 96dvh; overflow-x: hidden; overflow-y: auto; }
.ps-ed-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ps-ed-title { flex: 1 1 auto; min-width: 0; }
.ps-ed-title h2 { font-size: 22px !important; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-ed-title p { margin: 1px 0 0; font-size: 12px; color: var(--ps-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-ed-head .ps-badge { flex: 0 0 auto; }
.ps-editor-stage { position: relative; flex: 1 1 auto; min-height: 220px; height: auto; padding: 12px; }
.ps-ed-hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: rgba(35, 32, 29, .72); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; pointer-events: none; transition: opacity .4s; }
.ps-ed-hint.is-gone { opacity: 0; }
.ps-ed-zoom { display: flex; align-items: center; gap: 10px; }
.ps-ed-zoom input { flex: 1 1 auto; min-width: 0; }
.ps-ed-tools { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-inline: -4px; padding: 2px 4px; }
.ps-ed-tools::-webkit-scrollbar { display: none; }
.ps-tool { flex: 1 0 58px; display: grid; justify-items: center; gap: 3px; border: 0; background: transparent; border-radius: 10px; padding: 7px 2px 6px; color: var(--ps-ink); font-size: 10.5px; font-weight: 600; }
.ps-tool .ps-i { width: 22px; height: 22px; }
.ps-tool span { white-space: nowrap; }
.ps-tool:hover { background: var(--ps-sunk); }
.ps-tool[aria-pressed="true"] { background: var(--ps-gold-soft); color: var(--ps-gold); }
.ps-tool[hidden] { display: none !important; }
.ps-ed-finish { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--ps-sunk); border-radius: 10px; padding: 3px; gap: 3px; }
.ps-ed-finish button { border: 0; background: transparent; border-radius: 8px; padding: 7px 4px; font-size: 13px; font-weight: 600; color: var(--ps-muted); }
.ps-ed-finish button[aria-checked="true"] { background: var(--ps-surface); color: var(--ps-ink); box-shadow: 0 1px 2px rgba(35, 32, 29, .12); }
.ps-swap-row { gap: 6px; padding: 2px; }
.ps-swap-row button { width: 48px; height: 48px; border-radius: 8px; }
.ps .ps-swap-row .ps-swap-add { display: grid; place-items: center; color: var(--ps-muted); }
.ps-ed-retouch textarea { font-size: 14px; }
@media (min-width: 720px) {
  .ps-editor { height: min(88vh, 860px); width: min(560px, 100%); padding: 16px 18px; }
}
.ps-overlay { grid-template-columns: minmax(0, 1fr); } .ps-overlay > .ps-panel { justify-self: center; max-width: 100%; }

.ps-stage-q { top: auto; bottom: 8px; left: 8px; right: auto; }
.ps .ps-stage-remove { position: absolute; right: 6px; top: 5px; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 253, 249, .92); border-color: transparent; color: var(--ps-muted); }
.ps .ps-stage-remove .ps-i { width: 15px; height: 15px; }
.ps .ps-stage-remove:hover { color: var(--ps-bad); }
.ps-stage-tag { max-width: calc(100% - 44px); }
.ps-tool { flex: 1 0 44px; font-size: 10px; padding-inline: 0; }
@media (max-width: 560px) {
  .ps-tray { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ps-stage { height: 168px; padding: 28px 10px 26px; }
  .ps-card-body { padding: 8px; gap: 6px; }
  .ps .ps-card-tools .ps-qty .ps-ico-btn { width: 26px; height: 30px; }
  .ps-card-tools .ps-qty input { width: 28px; font-size: 13px; }
  .ps .ps-tool-icons .ps-ico-btn { width: 30px; height: 30px; }
  .ps-mini-seg button { font-size: 11.5px; gap: 3px; }
  .ps-swatches button { width: 17px; height: 17px; }
  .ps-frame-row { flex-wrap: wrap; }
  .ps-frame-row .ps-style-sel { flex-basis: 100%; }
}
.ps-tool span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ps-frame-row { flex-wrap: wrap; }
.ps-frame-row .ps-style-sel { flex-basis: 100%; }
.ps-editor-stage.is-framed canvas { outline: 10px solid var(--ps-frame, #1d1d1d); }

/* ===== Step tabs (Size · Photos · Order) — 2026-10-06 ===== */
.ps-step-nav {
  position: sticky; top: var(--ps-head, 0px); z-index: 20;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  background: var(--ps-bg); border-bottom: 1px solid var(--ps-line);
  padding: 0; margin-block: 4px 14px;
}
.ps .ps-step-nav button {
  position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  border: 0; border-radius: 0; background: transparent; padding: 12px 10px 13px; min-width: 0;
  color: var(--ps-muted); font: inherit; text-align: left;
}
.ps-step-nav button + button::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 26px; margin-top: -13px; background: var(--ps-line); }
.ps-step-nav button::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: transparent; transition: background .2s; }
.ps-step-nav button[aria-current="step"]::after { background: var(--ps-navy); }
.ps-step-ico { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: var(--ps-sunk); color: var(--ps-muted); }
.ps-step-ico .ps-i { width: 18px; height: 18px; grid-area: 1 / 1; }
.ps-step-ico .ps-step-done { display: none; }
.ps-step-nav button[aria-current="step"] .ps-step-ico { background: var(--ps-navy); color: var(--ps-navy-ink); }
.ps-step-nav button.is-done:not([aria-current]) .ps-step-ico { background: var(--ps-gold-soft); color: var(--ps-gold); }
.ps-step-nav button.is-done:not([aria-current]) .ps-step-ico .ps-i:not(.ps-step-done) { display: none; }
.ps-step-nav button.is-done:not([aria-current]) .ps-step-ico .ps-step-done { display: block; }
.ps-step-txt { display: grid; min-width: 0; line-height: 1.2; }
.ps-step-txt b { font-size: 14.5px; color: inherit; }
.ps-step-txt small { font-size: 12px; color: var(--ps-muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-step-nav button[aria-current="step"] { color: var(--ps-navy); background: transparent; }
.ps-step-nav button[aria-current="step"] small { color: var(--ps-ink); }
.ps-step-nav button.is-done { color: var(--ps-ink); }
.ps-step-nav button:not(:disabled):not([aria-current]):hover { background: var(--ps-sunk); }
.ps-step-nav button:disabled { opacity: .5; cursor: not-allowed; }
.ps-step-nav button:focus-visible { outline: 2px solid var(--ps-gold); outline-offset: -2px; }

/* Product type: segmented pills, so they read differently from the step tabs */
.ps-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; background: var(--ps-sunk); border-radius: 12px; padding: 3px; }
.ps .ps-tabs button { border: 0; background: transparent; border-radius: 9px; padding: 9px 6px; font-size: 13.5px; font-weight: 600; color: var(--ps-muted); line-height: 1.2; }
.ps .ps-tabs button[aria-selected="true"] { background: var(--ps-surface); color: var(--ps-ink); box-shadow: 0 1px 3px rgba(35, 32, 29, .14); }

@media (max-width: 560px) {
  .ps .ps-step-nav button { flex-direction: column; justify-content: center; align-items: center; gap: 4px; padding: 9px 4px 10px; text-align: center; }
  .ps-step-ico { width: 30px; height: 30px; }
  .ps-step-txt { justify-items: center; }
  .ps-step-txt b { font-size: 13px; }
  .ps-step-txt small { font-size: 11px; max-width: 100%; }
  .ps .ps-tabs button { font-size: 12.5px; padding: 8px 4px; }
}
.ps .ps-step-nav button > .ps-step-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ps-sunk); color: var(--ps-muted); font: inherit; }
.ps .ps-step-nav button[aria-current="step"] > .ps-step-ico { background: var(--ps-navy); color: var(--ps-navy-ink); }
.ps .ps-step-nav button.is-done:not([aria-current]) > .ps-step-ico { background: var(--ps-gold-soft); color: var(--ps-gold); }
.ps .ps-step-nav button > .ps-step-txt { display: grid; width: auto; height: auto; background: none; border-radius: 0; place-items: initial; font: inherit; color: inherit; min-width: 0; }
@media (max-width: 560px) {
  .ps .ps-step-nav button > .ps-step-ico { width: 30px; height: 30px; }
  .ps .ps-step-nav button > .ps-step-txt { justify-items: center; }
}

/* ===== Card v3: two compact rows, details on hover (2026-10-06) ===== */
.ps-card-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ps-card-row .ps-size-sel { flex: 1 1 auto; min-width: 0; width: auto; }
.ps-ico-seg { display: inline-flex; flex: 0 0 auto; background: var(--ps-sunk); border-radius: 9px; padding: 2px; gap: 2px; }
.ps .ps-ico-seg button { display: grid; place-items: center; width: 30px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--ps-muted); padding: 0; }
.ps .ps-ico-seg button .ps-i { width: 17px; height: 17px; }
.ps .ps-ico-seg button[aria-pressed="true"] { background: var(--ps-surface); color: var(--ps-navy); box-shadow: 0 1px 2px rgba(35, 32, 29, .14); }
.ps .ps-ico-seg button:disabled { opacity: .35; cursor: not-allowed; }
.ps-card-actions { justify-content: space-between; }
.ps-qty-box { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 4px 0 9px; border: 1px solid var(--ps-line-strong); border-radius: 9px; background: var(--ps-surface); cursor: text; color: var(--ps-muted); font-weight: 700; font-size: 13px; }
.ps-qty-box:focus-within { border-color: var(--ps-navy); box-shadow: 0 0 0 2px var(--ps-navy-soft); }
.ps .ps-qty-box .ps-qty-input { width: 40px; border: 0 !important; padding: 0 2px !important; background: transparent !important; font-weight: 700; font-size: 14px; color: var(--ps-ink); text-align: left; box-shadow: none; outline: none; }
.ps-tool-icons { display: flex; gap: 4px; }
.ps .ps-tool-icons .ps-ico-btn { width: 32px; height: 32px; border-radius: 9px; }
.ps-card .ps-meta { display: none; }
/* details overlay */
.ps-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; display: grid; gap: 2px; background: linear-gradient(to top, rgba(20, 18, 16, .78), rgba(20, 18, 16, 0)); color: #fff; font-size: 11.5px; line-height: 1.3; opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s; pointer-events: none; }
.ps-info-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ps-info-row { display: flex; flex-wrap: wrap; gap: 0 8px; color: rgba(255, 255, 255, .85); }
.ps-info-row b { font-weight: 700; }
.ps-info-row b.ps-good { color: #8fe0b0; } .ps-info-row b.ps-ok { color: #f3c77a; } .ps-info-row b.ps-low { color: #ff9c9c; }
.ps-card:hover .ps-info, .ps-card:focus-within .ps-info, .ps-tray.is-info .ps-info { opacity: 1; transform: none; }
.ps-stage-q.ps-low { top: 7px; bottom: auto; right: 8px; left: auto; color: var(--ps-bad); }
.ps-stage-badge { bottom: auto; top: 30px; right: 8px; }
.ps-tray-head-tools { display: flex; align-items: center; gap: 8px; }
.ps .ps-info-toggle { width: 32px; height: 32px; border-radius: 9px; }
@media (hover: none) { .ps-card:focus-within .ps-info { opacity: 0; } .ps-tray.is-info .ps-info { opacity: 1; } }
@media (max-width: 560px) {
  .ps .ps-ico-seg button { width: 26px; }
  .ps .ps-tool-icons .ps-ico-btn { width: 29px; height: 30px; }
  .ps .ps-qty-box .ps-qty-input { width: 30px; }
  .ps-qty-box { padding-left: 7px; height: 30px; }
}

/* ===== Order drawer + cart button + add animation (2026-10-06) ===== */
.ps .ps-cart-fab {
  position: fixed; right: 18px; top: 50%; z-index: 70; width: 58px; height: 58px; border-radius: 18px;
  display: grid; place-items: center; border: 0; padding: 0;
  background: var(--ps-navy); color: var(--ps-navy-ink);
  box-shadow: 0 10px 24px rgba(24, 50, 71, .32), inset 0 -3px 0 rgba(0, 0, 0, .18);
  transform-origin: 50% 80%;
}
.ps .ps-cart-fab .ps-i { width: 26px; height: 26px; stroke-width: 1.9; }
.ps .ps-cart-fab:hover { filter: brightness(1.12); }
.ps .ps-cart-fab[aria-expanded="true"] { background: var(--ps-gold); }
.ps-cart-count {
  position: absolute; top: -7px; right: -7px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  display: grid; place-items: center; background: #e8735a; color: #fff; font: 800 12.5px/1 var(--ps-body);
  border: 2px solid var(--ps-bg); font-variant-numeric: tabular-nums;
}
.ps-cart-count.is-pop { animation: ps-pop .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes ps-pop { 0% { transform: scale(.4); } 60% { transform: scale(1.45); } 100% { transform: scale(1); } }
.ps-drawer {
  position: fixed; top: calc(var(--ps-head, 0px) + 12px); right: 12px; bottom: 12px; z-index: 80; width: min(340px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 12px; padding: 18px; overflow-y: auto;
  background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: 16px;
  box-shadow: -10px 0 40px rgba(35, 32, 29, .18);
  transform: translateX(calc(100% + 24px)) rotate(2deg); transition: transform .42s cubic-bezier(.34, 1.4, .5, 1); visibility: hidden;
}
.ps-drawer.is-open { transform: none; visibility: visible; }
.ps-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ps-drawer-head h2 { font-size: 28px; margin-top: 2px; }
.ps-drawer .ps-lines { flex: 0 1 auto; }
.ps-drawer-scrim { position: fixed; inset: 0; z-index: 75; background: rgba(20, 18, 16, .28); }
@media (min-width: 941px) { .ps-drawer-scrim { background: transparent; } }
@media (max-width: 560px) {
  .ps .ps-cart-fab { top: auto; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); right: 14px; width: 54px; height: 54px; border-radius: 16px; }
  .ps-drawer { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 72vh; transform: translateY(calc(100% + 24px)); border-radius: 18px; }
}
.ps-flyer { position: fixed; z-index: 2000; pointer-events: none; border-radius: 6px; box-shadow: 0 10px 24px rgba(0, 0, 0, .28); background: #fff; will-change: transform; }
.ps-spark { position: fixed; z-index: 2001; pointer-events: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.ps-spark.is-star { width: 14px; height: 14px; border-radius: 0; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.ps-plus-pop { position: fixed; z-index: 2001; pointer-events: none; font: 900 18px/1 var(--ps-body); color: #e8735a; text-shadow: 0 2px 0 #fff, 0 0 8px rgba(255, 255, 255, .8); }
@media (prefers-reduced-motion: reduce) { .ps-drawer { transition: none; } }
.ps-drawer .ps-totals { display: flex; justify-content: space-between; gap: 12px; }
@media (min-width: 561px) { .ps-drawer { bottom: auto; max-height: calc(100vh - var(--ps-head, 0px) - 24px); } }

/* Order step: thumbnail of each print with size and copies */
.ps-review-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 12px 0 4px; max-height: 300px; overflow-y: auto; padding: 2px; }
.ps .ps-rthumb { display: grid; gap: 4px; justify-items: center; padding: 6px 4px 5px; border: 1px solid var(--ps-line); border-radius: 10px; background: var(--ps-surface); color: var(--ps-ink); min-width: 0; }
.ps .ps-rthumb:hover { border-color: var(--ps-line-strong); background: var(--ps-sunk); }
.ps-rthumb-pic { display: grid; place-items: center; width: 72px; height: 72px; }
.ps-rthumb-pic canvas { display: block; box-shadow: 0 1px 4px rgba(35, 32, 29, .18); }
.ps-rthumb.is-framed .ps-rthumb-pic canvas { outline: 4px solid var(--ps-frame, #1d1d1d); }
.ps-rthumb-cap { display: flex; justify-content: space-between; gap: 4px; width: 100%; padding: 0 3px; font-size: 11px; line-height: 1.2; color: var(--ps-muted); }
.ps-rthumb-cap span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-rthumb-cap b { color: var(--ps-ink); font-weight: 800; flex: 0 0 auto; }
@media (max-width: 560px) { .ps-review-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .ps-rthumb-pic { width: 60px; height: 60px; } }

/* One Print/Frame button + size picker popover (2026-10-06) */
.ps .ps-pf-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px; border: 1px solid var(--ps-line-strong); border-radius: 9px; background: var(--ps-surface); color: var(--ps-ink); font-size: 12.5px; font-weight: 700; }
.ps .ps-pf-btn .ps-i { width: 17px; height: 17px; }
.ps .ps-pf-btn .ps-i:last-child { width: 13px; height: 13px; color: var(--ps-muted); margin-left: 1px; }
.ps .ps-pf-btn.is-frame { background: var(--ps-gold-soft); border-color: var(--ps-gold); color: var(--ps-gold); }
.ps .ps-pf-btn:hover { background: var(--ps-sunk); }
.ps .ps-pf-btn.is-frame:hover { background: var(--ps-gold-soft); filter: brightness(.97); }
.ps-pop { position: fixed; z-index: 1200; display: grid; gap: 2px; padding: 8px; background: #fffdf9; border: 1px solid #e3d8c7; border-radius: 12px; box-shadow: 0 14px 40px rgba(35, 32, 29, .22); font-family: Inter, "Noto Sans SC", Arial, sans-serif; animation: ps-pop-in .16s ease-out; }
@keyframes ps-pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.ps-pop-title { margin: 2px 4px 6px; font-size: 12px; color: #6d6258; line-height: 1.35; }
.ps-pop button { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; column-gap: 8px; text-align: left; border: 0; background: transparent; border-radius: 8px; padding: 7px 8px; font: inherit; font-size: 13.5px; font-weight: 600; color: #23201d; cursor: pointer; }
.ps-pop button:hover, .ps-pop button:focus-visible { background: #f1ebe2; outline: none; }
.ps-pop button .ps-i { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: #a77c3b; }
.ps-pop button small { grid-column: 2; font-size: 11px; color: #6d6258; font-weight: 500; }
.ps-pop button em { grid-column: 3; grid-row: 1 / span 2; font-style: normal; font-size: 10px; font-weight: 700; color: #2e7a4e; border: 1px solid currentColor; border-radius: 999px; padding: 1px 6px; }
/* keep row 2 inside narrow cards */
.ps-card-actions { flex-wrap: nowrap; }
.ps-qty-box { flex: 0 1 72px; min-width: 56px; }
.ps .ps-qty-box .ps-qty-input { width: 100%; min-width: 22px; }
.ps-tool-icons { flex: 0 0 auto; }
.ps-card-row .ps-size-sel { font-size: 12.5px; padding-right: 22px; text-overflow: ellipsis; }
@media (min-width: 561px) { .ps-tray { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } }
.ps .ps-pf-btn .ps-i:last-child { display: none; }
.ps .ps-pf-btn { padding: 0 9px 0 7px; }
@media (max-width: 560px) {
  .ps .ps-pf-btn { width: 32px; padding: 0; justify-content: center; }
  .ps .ps-pf-btn span { display: none; }
}

/* Print / Frame: one icon-only toggle, two clearly different looks (2026-10-06 13:20) */
.ps .ps-pf-btn, .ps .ps-pf-btn.is-frame { position: relative; width: 36px; height: 32px; padding: 0; justify-content: center; gap: 0; border-radius: 9px; }
.ps .ps-pf-btn span, .ps .ps-pf-btn .ps-i + .ps-i { display: none; }
.ps .ps-pf-btn .ps-i { width: 20px; height: 20px; }
.ps .ps-pf-btn:not(.is-frame) { background: #fff; color: var(--ps-navy); border: 1px dashed var(--ps-line-strong); }
.ps .ps-pf-btn.is-frame { background: linear-gradient(145deg, #c9a15f, #8f6930); color: #fff; border: 1px solid #7d5c28; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .28), 0 2px 6px rgba(143, 105, 48, .35); }
.ps .ps-pf-btn.is-frame .ps-i { stroke-width: 2; }
.ps .ps-pf-btn:not(.is-frame):hover { border-style: solid; border-color: var(--ps-gold); color: var(--ps-gold); background: var(--ps-gold-soft); }
.ps .ps-pf-btn.is-frame:hover { filter: brightness(1.08); }
@media (max-width: 560px) { .ps .ps-pf-btn, .ps .ps-pf-btn.is-frame { width: 32px; } }
.ps .ps-pf-btn .ps-i:only-child { display: block; width: 20px; height: 20px; margin: 0; color: inherit; }

/* Print / Frame illustrated toggle (owner's icon concept, 2026-10-06 13:30) */
.ps .ps-pf-btn, .ps .ps-pf-btn.is-frame, .ps .ps-pf-btn:not(.is-frame) {
  width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: none; filter: none;
  display: grid; place-items: center; flex: 0 0 auto; transition: transform .15s;
}
.ps .ps-pf-btn .ps-art { width: 38px; height: 38px; display: block; filter: drop-shadow(0 1px 2px rgba(35, 32, 29, .18)); }
.ps .ps-pf-btn:hover, .ps .ps-pf-btn:not(.is-frame):hover, .ps .ps-pf-btn.is-frame:hover { background: transparent; transform: scale(1.08); filter: none; }
.ps .ps-pf-btn:focus-visible { outline: 2px solid var(--ps-gold); outline-offset: 2px; }
.ps .ps-pf-btn::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ps-surface) center/10px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d6258' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h11l-3-3M17 17H6l3 3'/%3E%3C/svg%3E"); box-shadow: 0 0 0 1px var(--ps-line-strong); }
.ps-pop button .ps-art { width: 22px; height: 22px; }
.ps-pop button { grid-template-columns: 24px 1fr auto; }
@media (max-width: 560px) { .ps .ps-pf-btn, .ps .ps-pf-btn .ps-art { width: 34px; height: 34px; } }

/* Editor toolbar: labels always shown in full (phones get a 4 × 2 grid). */
.ps-ed-tools { gap: 2px; }
.ps-tool { flex: 1 0 auto; min-width: 52px; padding: 7px 6px 6px; font-size: 11px; }
.ps-tool span { max-width: none; overflow: visible; text-overflow: clip; white-space: nowrap; line-height: 1.15; }
@media (max-width: 560px) {
  .ps-ed-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; overflow: visible; margin-inline: 0; padding: 2px 0; }
  .ps-tool { min-width: 0; padding: 8px 2px 7px; font-size: 11.5px; background: var(--ps-sunk); }
  .ps-tool[aria-pressed="true"] { background: var(--ps-gold-soft); }
}

/* Paper finish hidden for now (everything prints glossy; staff confirm paper on WhatsApp). */
.ps-ed-finish[hidden], .ps-field[hidden] { display: none !important; }

/* ===================== Designs ===================== */
/* Gallery on the Size step */
.ps-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 10px; margin-bottom: 4px; }
.ps-chips::-webkit-scrollbar { display: none; }
.ps .ps-chip { flex: 0 0 auto; border: 1px solid var(--ps-line); background: var(--ps-surface); border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 600; color: var(--ps-muted); white-space: nowrap; }
.ps .ps-chip[aria-pressed="true"] { background: var(--ps-navy); border-color: var(--ps-navy); color: #fff; }
.ps-designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; margin-bottom: 22px; }
.ps .ps-dcard { display: grid; grid-template-rows: 172px auto; text-align: left; border: 1px solid var(--ps-line); background: var(--ps-surface); border-radius: 12px; padding: 0; overflow: hidden; min-width: 0; transition: transform .15s ease, box-shadow .15s ease, border-color .15s; }
.ps .ps-dcard:hover { transform: translateY(-2px); box-shadow: var(--ps-shadow); border-color: var(--ps-line-strong); }
.ps .ps-dcard[aria-pressed="true"] { border-color: var(--ps-navy); box-shadow: inset 0 0 0 2px var(--ps-navy), var(--ps-shadow); }
.ps-dcard-pic { display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 20%, #fbf8f2 0%, #ece4d6 100%); padding: 10px; }
.ps-dcard-pic canvas { display: block; max-width: 100%; max-height: 152px; box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 6px 14px rgba(35,32,29,.16); border-radius: 1px; }
.ps-dcard-txt { display: grid; gap: 1px; padding: 9px 11px 10px; position: relative; }
.ps-dcard-txt b { font-size: 14px; line-height: 1.25; }
.ps-dcard-txt small { color: var(--ps-muted); font-size: 12px; }
.ps-dcard-dots { display: flex; gap: 3px; margin-top: 4px; }
.ps-dcard-dots i { width: 11px; height: 11px; border-radius: 50%; background: linear-gradient(135deg, var(--c) 50%, var(--i) 50%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.ps .ps-dcard[aria-pressed="true"] .ps-dcard-txt::after { content: ""; position: absolute; right: 10px; top: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--ps-navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
@media (max-width: 560px) {
  .ps-designs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ps .ps-dcard { grid-template-rows: 150px auto; }
  .ps-dcard-pic canvas { max-height: 132px; }
}

/* Design card in the Photos tray */
.ps .ps-design-btn { flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ps-line-strong); background: var(--ps-gold-soft); border-radius: 9px; padding: 6px 9px; font-size: 13px; font-weight: 700; color: var(--ps-ink); text-align: left; }
.ps .ps-design-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps .ps-design-btn .ps-i { width: 18px; height: 18px; flex: 0 0 auto; color: var(--ps-gold); }
.ps .ps-design-btn:hover { border-color: var(--ps-gold); }
.ps-size-chip { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--ps-muted); padding: 6px 8px; border-radius: 8px; background: var(--ps-sunk); white-space: nowrap; }
.ps .ps-size-sel.ps-size-sm { flex: 0 0 auto; width: auto; max-width: 92px; }

/* Designer (editor) */
.ps-ed-body { display: contents; }
.ps-ed-main, .ps-ed-side { display: contents; }
.ps-ed-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; background: var(--ps-sunk); border-radius: 12px; padding: 3px; }
.ps .ps-ed-tabs button { display: grid; justify-items: center; gap: 2px; border: 0; background: transparent; border-radius: 9px; padding: 6px 2px 5px; font-size: 11.5px; font-weight: 700; color: var(--ps-muted); }
.ps .ps-ed-tabs button .ps-i { width: 19px; height: 19px; }
.ps .ps-ed-tabs button[aria-selected="true"] { background: var(--ps-surface); color: var(--ps-navy); box-shadow: 0 1px 2px rgba(35,32,29,.12); }
.ps-ed-panel { display: grid; gap: 10px; align-content: start; }
.ps-ed-sec { display: grid; gap: 7px; }
.ps .ps-ed-sec h3 { font-family: var(--ps-body); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ps-muted); }
.ps-ed-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-ed-note { margin: 0; font-size: 12.5px; color: var(--ps-muted); }
.ps .ps-btn-primary { background: var(--ps-navy); color: #fff; border-color: var(--ps-navy); }
.ps .ps-btn .ps-i { width: 17px; height: 17px; }

.ps-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ps .ps-filters button { display: grid; gap: 4px; justify-items: center; border: 0; background: transparent; padding: 0; font-size: 11.5px; font-weight: 600; color: var(--ps-muted); }
.ps-filters canvas { width: 100%; aspect-ratio: 1; border-radius: 10px; display: block; outline: 2px solid transparent; outline-offset: 1px; }
.ps .ps-filters button[aria-checked="true"] { color: var(--ps-navy); }
.ps .ps-filters button[aria-checked="true"] canvas { outline-color: var(--ps-navy); }

.ps-texts { display: grid; gap: 9px; }
.ps-text-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 6px; align-items: end; }
.ps-text-row label { display: grid; gap: 3px; min-width: 0; }
.ps-text-row label span { font-size: 12px; font-weight: 600; color: var(--ps-muted); }
.ps-text-row input { width: 100%; min-width: 0; border: 1px solid var(--ps-line-strong); border-radius: 8px; padding: 8px 10px; background: var(--ps-surface); font-size: 15px; }
.ps-text-tools { display: flex; gap: 4px; align-items: center; }
.ps-font-sel { max-width: 118px; border: 1px solid var(--ps-line); border-radius: 8px; padding: 7px 6px; background: var(--ps-surface); font-size: 12.5px; }
.ps .ps-text-tools .ps-ico-btn { width: 34px; height: 36px; }
.ps-text-hint { grid-column: 1 / -1; color: var(--ps-bad); font-size: 12px; }
.ps-text-hint:empty { display: none; }
.ps-text-auto { grid-column: 1 / -1; color: var(--ps-good); font-size: 12px; }
.ps-text-field-select { width: 100%; min-width: 0; }
.ps-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ps-control-grid input, .ps-control-grid select, .ps-colour-control input, .ps-colour-hex { width: 100%; min-width: 0; }
.ps-colour-control { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; align-items: end; }
.ps-colour-control input[type="color"], .ps-palette-row input[type="color"] { height: 38px; padding: 3px; border: 1px solid var(--ps-line-strong); border-radius: 8px; background: var(--ps-surface); }
.ps-colour-hex { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: lowercase; }
.ps-colour-hex[aria-invalid="true"] { border-color: var(--ps-bad); outline-color: var(--ps-bad); }
.ps-colour-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ps .ps-colour-chips button, .ps-colour-source { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; border: 2px solid var(--ps-surface); background: var(--sw); box-shadow: 0 0 0 1px var(--ps-line-strong); }
.ps-palette-list { display: grid; gap: 6px; min-width: 0; }
.ps-palette-row { display: grid; grid-template-columns: 28px 20px 42px minmax(0, 1fr); gap: 7px; align-items: center; min-width: 0; }
.ps-palette-arrow { color: var(--ps-muted); font-size: 11px; text-align: center; }
.ps-palette-row input { min-width: 0; width: 100%; }
.ps-history-row { padding-top: 2px; border-top: 1px solid var(--ps-line); }

.ps-themes { display: flex; flex-wrap: wrap; gap: 8px; }
.ps .ps-themes button { display: grid; justify-items: center; gap: 3px; border: 0; background: transparent; padding: 0; width: 54px; font-size: 11px; font-weight: 600; color: var(--ps-muted); }
.ps-themes i { width: 38px; height: 38px; border-radius: 50%; background: conic-gradient(var(--a) 0 50%, var(--b) 50% 75%, var(--c) 75% 100%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); outline: 2px solid transparent; outline-offset: 2px; transition: transform .12s; }
.ps .ps-themes button[aria-checked="true"] i { outline-color: var(--ps-navy); transform: scale(1.06); }
.ps .ps-themes button[aria-checked="true"] { color: var(--ps-navy); }
.ps-seg { display: flex; flex-wrap: wrap; gap: 3px; background: var(--ps-sunk); border-radius: 10px; padding: 3px; }
.ps .ps-seg button { flex: 1 1 auto; border: 0; background: transparent; border-radius: 8px; padding: 7px 10px; font-size: 13px; font-weight: 600; color: var(--ps-muted); }
.ps .ps-seg button[aria-checked="true"] { background: var(--ps-surface); color: var(--ps-ink); box-shadow: 0 1px 2px rgba(35,32,29,.12); }
.ps-range { display: grid; grid-template-columns: 112px minmax(0, 1fr) 54px; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.ps-range output { text-align: right; color: var(--ps-muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.ps-range input { width: 100%; min-width: 0; accent-color: var(--ps-navy); }

.ps-tpl-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.ps .ps-tpl-strip button { flex: 0 0 auto; width: 92px; display: grid; justify-items: center; gap: 4px; border: 1px solid var(--ps-line); background: var(--ps-surface); border-radius: 10px; padding: 6px 4px; font-size: 11px; font-weight: 600; color: var(--ps-muted); }
.ps .ps-tpl-strip button:hover { border-color: var(--ps-navy); color: var(--ps-ink); }
.ps-tpl-strip canvas { display: block; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.ps-tpl-strip span { line-height: 1.2; text-align: center; }
.ps .ps-free-tools { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin: 0; padding: 0; overflow: visible; }
.ps .ps-free-tools .ps-tool { min-width: 0; padding: 7px 0 6px; font-size: 10.5px; background: var(--ps-sunk); }
.ps .ps-free-tools .ps-tool:disabled { opacity: .38; cursor: default; }
.ps-editor-stage canvas.is-free { cursor: move; }
@media (max-width: 560px) {
  .ps .ps-free-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ps-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .ps-range { grid-template-columns: 96px minmax(0, 1fr) 48px; }
  .ps-control-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Wide designer on desktop: print on the left, controls on the right. */
@media (min-width: 900px) {
  .ps-editor.is-wide { width: min(1120px, 96vw); height: min(90vh, 900px); max-height: 92vh; display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: auto minmax(0, 1fr); gap: 12px 18px; overflow: hidden; }
  .ps-editor.is-wide .ps-ed-head { grid-column: 1 / -1; }
  .ps-editor.is-wide .ps-ed-body { display: contents; }
  .ps-editor.is-wide .ps-ed-main { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
  .ps-editor.is-wide .ps-ed-main .ps-editor-stage { flex: 1 1 auto; min-height: 0; }
  .ps-editor.is-wide .ps-ed-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; padding-right: 4px; }
  .ps-editor.is-wide .ps-ed-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .ps-editor.is-wide .ps-ed-tools .ps-tool { background: var(--ps-sunk); }
}

/* designer polish */
.ps .ps-ed-panel .ps-ed-sec h3 { font-family: var(--ps-body); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ps-muted); line-height: 1.3; }
.ps .ps-text-row .ps-font-sel { width: 112px; max-width: 112px; flex: 0 0 auto; }
.ps .ps-themes button { width: 60px; line-height: 1.2; text-align: center; align-content: start; }
.ps-editor.is-wide .ps-editor-stage { min-height: 46vh; }
@media (min-width: 900px) { .ps-editor.is-wide .ps-editor-stage { min-height: 0; } }
.ps .ps-ed-panel .ps-ed-sec h3 { font-family: Inter, "Helvetica Neue", Arial, sans-serif !important; }
.ps-dtools { margin: 0 0 8px; }
.ps .ps-dsearch { width: 100%; max-width: 420px; border: 1px solid var(--ps-line-strong); border-radius: 999px; padding: 9px 16px; background: var(--ps-surface); font-size: 14.5px; }
.ps .ps-opt-sel { width: 100%; border: 1px solid var(--ps-line-strong); border-radius: 8px; padding: 8px 10px; background: var(--ps-surface); font-size: 14px; }

/* Designer side panel never scrolls sideways; swap row explains itself. */
.ps-ed-panel { grid-template-columns: minmax(0, 1fr); }
.ps-ed-panel > *, .ps-ed-side > * { min-width: 0; }
@media (min-width: 900px) {
  .ps-editor.is-wide .ps-ed-side { min-width: 0; overflow-x: hidden; }
  .ps-editor.is-wide .ps-ed-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; }
  .ps-editor.is-wide .ps-ed-tools .ps-tool { min-width: 0; padding: 9px 2px 8px; }
  .ps-editor.is-wide .ps-swap-row { flex-wrap: wrap; overflow: visible; }
  .ps-editor.is-wide .ps-swap-row button { width: 56px; height: 56px; }
}
.ps-swap { display: grid; gap: 6px; }
.ps-swap-head { display: grid; gap: 1px; }
.ps-swap-head b { font-size: 13px; }
.ps-swap-head span { font-size: 12px; color: var(--ps-muted); line-height: 1.35; }
.ps .ps-swap-row button.is-used { box-shadow: inset 0 0 0 2px rgba(200,169,106,.55); }
.ps .ps-swap-row button[draggable="true"] { cursor: grab; }
/* Design card: photo suggestion + quick "Add photos" on the picked card */
.ps-dcard-tip { color: #8a6a2f; font-size: 12px; font-weight: 600; }
.ps-dcard-go { display: none; justify-self: start; margin-top: 7px; padding: 6px 12px; border-radius: 999px; background: var(--ps-navy); color: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.ps-dcard-go:hover { filter: brightness(1.15); }
.ps .ps-dcard[aria-pressed="true"] .ps-dcard-go { display: inline-block; }
/* Category chips: wrap onto a second line instead of running off the edge;
   on phones they scroll sideways with a fade hinting there is more. */
.ps-chips { flex-wrap: wrap; overflow-x: visible; }
@media (max-width: 600px) {
  .ps-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 28px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
}

/* Clear frame finishing and bounded framed previews. */
.ps-frame-finish { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 10px; background: var(--ps-sunk); }
.ps .ps-frame-finish button { min-width: 0; border: 0; border-radius: 8px; padding: 8px 7px; background: transparent; color: var(--ps-muted); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.ps .ps-frame-finish button[aria-checked="true"] { background: var(--ps-surface); color: var(--ps-navy); box-shadow: 0 1px 2px rgba(35,32,29,.14); }
.ps-ed-frame { display: grid; gap: 7px; }
.ps-ed-frame[hidden] { display: none !important; }
.ps-editor-stage { min-width: 0; min-height: 0; overflow: hidden; }

@media (max-width: 480px) {
  .ps-tray { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ps-stage { height: 220px; padding: 28px 16px 26px; }
  .ps-card-body { padding: 11px; gap: 8px; }
  .ps-card-row .ps-size-sel { font-size: 14px; text-overflow: clip; }
  .ps .ps-frame-finish button { font-size: 13px; padding-block: 9px; }
  .ps.ps-wizard { padding-bottom: calc(142px + env(safe-area-inset-bottom, 0px)); }
  .ps-wizard-footer { padding-left: 70px; }
  .ps .ps-cart-fab { left: 14px; right: auto; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: 46px; height: 46px; border-radius: 13px; }
}

/* Editor tools: compact icon row until the customer starts editing. */
.ps .ps-ed-tools.is-mini { display: flex; flex-wrap: nowrap; justify-content: center; gap: 6px; overflow-x: auto; margin-inline: 0; padding: 2px 0; }
.ps .ps-ed-tools.is-mini .ps-tool { flex: 0 0 40px; width: 40px; min-width: 0; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 50%; background: var(--ps-sunk); }
.ps .ps-ed-tools.is-mini .ps-tool .ps-i { width: 19px; height: 19px; }
.ps .ps-ed-tools.is-mini .ps-tool span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ps .ps-ed-tools.is-mini .ps-tool[aria-pressed="true"] { background: var(--ps-gold-soft); }
.ps .ps-ed-tools .ps-tool { will-change: transform; transform-origin: 0 0; }
@media (min-width: 760px) { .ps .ps-editor.is-wide .ps-ed-tools.is-mini { display: flex; } }

/* Editor: change the frame right here. */
.ps-ed-frames-wrap { display: grid; gap: 6px; min-width: 0; }
.ps-ed-frames-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.ps-ed-frames-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; color: var(--ps-ink); }
.ps .ps-link-btn { flex: none; border: 0; background: none; padding: 2px 0; color: var(--ps-gold); font-size: 12.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ps-ed-frames { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding: 3px 2px 6px; scrollbar-width: thin; }
.ps .ps-ed-frame-opt { flex: 0 0 auto; scroll-snap-align: center; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #efe9df; line-height: 0; box-shadow: 0 1px 3px rgba(35,32,29,.14); transition: transform .15s, border-color .15s; }
.ps .ps-ed-frame-opt canvas { display: block; width: 76px; height: 52px; }
.ps .ps-ed-frame-opt:hover { transform: translateY(-1px); }
.ps .ps-ed-frame-opt[aria-checked="true"] { border-color: var(--ps-gold); box-shadow: 0 0 0 2px var(--ps-gold-soft); }

/* Design card row: "Edit design" never truncates; the size picker takes the rest. */
.ps .ps-card-row .ps-design-btn { flex: 0 0 auto; }
.ps .ps-card-row .ps-size-sel.ps-size-sm { flex: 1 1 0; min-width: 64px; max-width: none; }

/* Wording language (EN / 简 / 繁) */
.ps-dtools { display: flex; gap: 8px; align-items: center; }
.ps-dtools .ps-dsearch { flex: 1 1 auto; min-width: 0; }
.ps-lang { display: inline-flex; flex: none; padding: 3px; gap: 2px; border-radius: 999px; background: var(--ps-sunk); }
.ps .ps-lang button { border: 0; background: transparent; border-radius: 999px; padding: 6px 11px; font-size: 13px; font-weight: 700; color: var(--ps-muted); white-space: nowrap; }
.ps .ps-lang button[aria-checked="true"] { background: var(--ps-surface); color: var(--ps-ink); box-shadow: 0 1px 2px rgba(35,32,29,.15); }
.ps-lang-wide { display: flex; width: 100%; }
.ps .ps-lang-wide button { flex: 1 1 0; }

/* Full preview (tap the empty area around the print) */
.ps-lightbox { position: fixed; inset: 0; z-index: 1100; display: grid; grid-template-rows: 1fr auto; place-items: center; gap: 10px; padding: max(16px, env(safe-area-inset-top, 0px)) 16px calc(18px + env(safe-area-inset-bottom, 0px)); background: rgba(14, 12, 10, .88); cursor: zoom-out; }
.ps-lightbox[hidden] { display: none !important; }
.ps-lightbox-stage { display: grid; place-items: center; min-height: 0; width: 100%; height: 100%; }
.ps-lightbox-art { display: block; width: auto; height: auto; max-width: 92vw; max-height: 78vh; max-height: 78dvh; box-shadow: 0 2px 6px rgba(0,0,0,.35), 0 30px 60px -20px rgba(0,0,0,.6); will-change: transform; }
.ps-lightbox-cap { margin: 0; color: #f4efe6; font-size: 14px; font-weight: 600; letter-spacing: .02em; text-align: center; }
.ps .ps-lightbox-close { position: absolute; top: max(14px, env(safe-area-inset-top, 0px)); right: 14px; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff; }
.ps-ed-expand { position: absolute; top: 10px; right: 10px; z-index: 5; opacity: .85; background: rgba(255,253,249,.92) !important; box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: transform .15s, opacity .15s; }
.ps-ed-expand:hover { opacity: 1; transform: scale(1.06); }
.ps-editor-stage { cursor: zoom-in; }
.ps-editor-stage canvas:not([data-ps-frame-shell]) { cursor: grab; }

/* "No frame" choice at the start of the frame row */
.ps .ps-ed-noframe { display: grid; place-items: center; align-content: center; gap: 2px; width: 80px; height: 56px; line-height: 1.1; background: var(--ps-surface); }
.ps-noframe-pic { width: 26px; height: 20px; border: 1.5px dashed var(--ps-line-strong); border-radius: 3px; position: relative; }
.ps-noframe-pic::after { content: ""; position: absolute; left: -3px; right: -3px; top: 50%; height: 1.5px; background: var(--ps-muted); transform: rotate(-35deg); }
.ps-noframe-txt { font-size: 11px; font-weight: 700; color: var(--ps-muted); }
.ps .ps-ed-noframe[aria-checked="true"] .ps-noframe-txt { color: var(--ps-gold); }
.ps-ed-frames-head .ps-field-label { flex: none; margin: 0; }
.ps-ed-frames-head .ps-ed-frames-name { flex: 1 1 auto; }

/* Livelier controls */
.ps .ps-ed-frame-opt { transition: transform .18s cubic-bezier(.2,.8,.2,1), border-color .15s, box-shadow .15s; }
.ps .ps-ed-frame-opt[aria-checked="true"] { transform: translateY(-2px); }
.ps .ps-ed-frame-opt:active, .ps .ps-tool:active, .ps .ps-swap-row button:active, .ps .ps-ed-tabs button:active { transform: scale(.93); }
.ps .ps-tool, .ps .ps-ed-tabs button, .ps .ps-swap-row button { transition: transform .15s cubic-bezier(.2,.8,.2,1), background-color .15s, color .15s; }
.ps .ps-ed-tabs button[aria-selected="true"] svg { animation: ps-tab-pop .32s cubic-bezier(.2,.8,.2,1); }
@keyframes ps-tab-pop { 0% { transform: scale(.7) rotate(-8deg); } 70% { transform: scale(1.12); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ps .ps-ed-frame-opt, .ps .ps-tool, .ps .ps-ed-tabs button { transition: none; }
  .ps .ps-ed-tabs button[aria-selected="true"] svg { animation: none; }
}

/* Print cards on phones: the picture first; tap it and the controls slide out */
.ps-card-wrap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .34s cubic-bezier(.2,.8,.2,1); }
.ps-card-clip { min-height: 0; overflow: hidden; }
.ps .ps-card-more { display: none; }
@media (max-width: 700px) {
  .ps-card:not(.is-open) .ps-card-wrap { grid-template-rows: 0fr; }
  .ps-card:not(.is-open) .ps-card-body { visibility: hidden; transition: visibility 0s .34s; }
  .ps-card.is-open { box-shadow: 0 0 0 2px var(--ps-gold-soft), var(--ps-shadow); border-color: var(--ps-gold); }
  .ps-card { transition: box-shadow .25s, border-color .25s; }
  .ps .ps-card-more { position: absolute; right: 10px; bottom: 10px; z-index: 4; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--ps-line-strong); background: rgba(255,253,249,.94); color: var(--ps-ink); box-shadow: 0 2px 6px rgba(35,32,29,.18); }
  .ps .ps-card-more svg { width: 18px; height: 18px; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
  .ps .ps-card.is-open .ps-card-more svg { transform: rotate(180deg); }
  .ps .ps-card:not(.is-open) .ps-card-more { animation: ps-more-hint 2.4s ease-in-out 1s 2; }
  @keyframes ps-more-hint { 0%, 100% { transform: none; } 50% { transform: translateY(-3px); } }
}
@media (max-width: 700px) and (prefers-reduced-motion: reduce) {
  .ps-card-wrap { transition: none; }
  .ps .ps-card:not(.is-open) .ps-card-more { animation: none; }
}

/* ---- Frame choice: one clear action instead of a Print only / With frame switch ---- */
.ps .ps-frame-add { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 12px; border: 1.5px dashed var(--ps-gold); border-radius: 12px; background: linear-gradient(120deg, #fffdf9, #fbf3e8 60%, #fffdf9); color: var(--ps-navy); font-size: 14px; font-weight: 700; text-align: left; cursor: pointer; transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .2s, border-color .2s; }
.ps .ps-frame-add:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(35,32,29,.10); border-style: solid; }
.ps .ps-frame-add:active { transform: scale(.98); }
.ps-frame-add-pic { width: 28px; height: 22px; flex: none; border: 3px solid #d9c9b0; border-radius: 3px; box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 1px #b99a6a55; background: #f6efe4; }
.ps-frame-add-txt { flex: 1 1 auto; min-width: 0; }
.ps-frame-add-go { font-size: 18px; color: var(--ps-gold); transition: transform .2s; }
.ps .ps-frame-add:hover .ps-frame-add-go { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .ps .ps-frame-add, .ps .ps-frame-add-go { transition: none; } }

/* ===== Editor: one section at a time; the preview takes the space the section does not need ===== */
.ps-ed-tabs { position: relative; gap: 0; }
.ps .ps-ed-tabs button { position: relative; z-index: 1; transition: color .25s ease, transform .15s cubic-bezier(.2,.8,.2,1); }
.ps .ps-ed-tabs button[aria-selected="true"] { background: transparent; box-shadow: none; }
.ps-ed-ind { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n, 5)); transform: translateX(calc(var(--i, 0) * 100%)); background: var(--ps-surface); border-radius: 9px; box-shadow: 0 1px 2px rgba(35,32,29,.14), 0 4px 10px rgba(35,32,29,.08); transition: transform .38s cubic-bezier(.2,.85,.25,1), width .38s cubic-bezier(.2,.85,.25,1); pointer-events: none; }
.ps-ed-sections { display: grid; grid-template-rows: 1fr; min-height: 0; transition: grid-template-rows .4s cubic-bezier(.2,.85,.25,1); }
.ps-ed-sections-in { min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 2px 2px 4px; }
.ps-editor.is-collapsed .ps-ed-sections { grid-template-rows: 0fr; }
.ps-editor.is-collapsed .ps-ed-sections-in { overflow: hidden; padding-block: 0; }
.ps .ps-ed-tabs button[aria-expanded="false"][aria-selected="true"] .ps-i { transform: translateY(1px) scale(.92); }
.ps .ps-ed-tabs button .ps-i { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
/* Frame section: bigger frame previews, so the choice is easy to see */
.ps-ed-frames { padding: 4px 2px 8px; }
.ps .ps-ed-frame-opt canvas { width: 96px; height: 66px; }

@media (max-width: 759px) {
  .ps-editor { height: 100dvh; max-height: 100dvh; overflow: hidden; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .ps-editor-stage { order: 1; flex: 1 1 0; min-height: 0; height: auto; }
  .ps-ed-zoom { order: 2; }
  .ps-ed-sections { order: 3; }
  .ps-ed-tabs { order: 4; }
  .ps-ed-sections-in { max-height: 44dvh; }
  /* all photo tools on one labelled row */
  .ps-ed-tools { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; overflow: visible; margin: 0; padding: 0; }
  .ps-tool { min-width: 0; padding: 7px 0 6px; font-size: 10px; background: var(--ps-sunk); border-radius: 10px; }
  .ps-tool span { font-size: 10px; }
  .ps-tool[aria-pressed="true"] { background: var(--ps-gold-soft); }
  .ps-ed-frames .ps-ed-frame-opt canvas { width: 104px; height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .ps-ed-ind, .ps-ed-sections, .ps .ps-ed-tabs button .ps-i { transition: none; }
}

/* ===== Working area: motion, feedback and navigation ===== */
.ps-ed-ghost { position: absolute; inset: 0; z-index: 3; pointer-events: none; transform-origin: 50% 50%; }
.ps-ed-ghost canvas { position: absolute; display: block; box-shadow: none !important; max-width: none !important; max-height: none !important; }
.ps-editor-stage canvas { transform-origin: 50% 50%; }
/* confirmation chip with Undo */
.ps-ed-chip { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 24px); padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(35,32,29,.86); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: 0 8px 20px rgba(0,0,0,.18); backdrop-filter: blur(6px); }
.ps-ed-chip span { overflow: hidden; text-overflow: ellipsis; }
.ps .ps-ed-chip button { border: 0; border-radius: 999px; padding: 6px 12px; min-height: 32px; background: rgba(255,255,255,.16); color: #ffe7c2; font-weight: 700; font-size: 13px; cursor: pointer; }
.ps .ps-ed-chip button:active { transform: scale(.94); }
/* previous / next print */
.ps-ed-nav { position: absolute; left: 10px; top: 10px; z-index: 5; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255,253,249,.92); box-shadow: 0 1px 4px rgba(0,0,0,.14); }
.ps .ps-ed-nav-btn { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--ps-navy); font-size: 22px; line-height: 1; display: grid; place-items: center; cursor: pointer; transition: transform .15s, background-color .15s; }
.ps .ps-ed-nav-btn:hover:not(:disabled) { background: var(--ps-sunk); }
.ps .ps-ed-nav-btn:active:not(:disabled) { transform: scale(.88); }
.ps .ps-ed-nav-btn:disabled { opacity: .28; cursor: default; }
.ps-ed-nav-count { min-width: 38px; text-align: center; font-size: 12px; font-weight: 700; color: var(--ps-ink); font-variant-numeric: tabular-nums; }
.ps-ed-hint { top: 54px; bottom: auto; }
/* grip handle (phones) */
.ps .ps-ed-grip { display: none; }
/* "Saved" badge on the card after Done */
.ps-done-badge { position: absolute; left: 50%; top: 42%; z-index: 7; padding: 6px 12px; border-radius: 999px; background: var(--ps-navy); color: #fff; font-size: 13px; font-weight: 700; pointer-events: none; box-shadow: 0 8px 18px rgba(24,50,71,.3); white-space: nowrap; }
/* scroll cue when a section has more below */
.ps-ed-sections-in.has-more { -webkit-mask-image: linear-gradient(#000 calc(100% - 26px), transparent); mask-image: linear-gradient(#000 calc(100% - 26px), transparent); }
/* Remove frame: quiet text link */
.ps .ps-frame-remove { color: var(--ps-muted); margin-left: 4px; }
.ps-ed-frames-head { flex-wrap: wrap; row-gap: 2px; }
/* tool press feedback */
.ps .ps-tool:active .ps-i { transform: scale(.85) rotate(-6deg); }
.ps .ps-tool .ps-i { transition: transform .2s cubic-bezier(.2,.85,.25,1); }

@media (max-width: 759px) {
  .ps .ps-ed-grip { display: grid; order: 3; place-items: center; width: 100%; height: 22px; margin: -4px 0 -6px; padding: 0; border: 0; background: transparent; cursor: grab; touch-action: none; }
  .ps .ps-ed-grip span { width: 40px; height: 5px; border-radius: 99px; background: var(--ps-line-strong); transition: width .25s cubic-bezier(.2,.85,.25,1), background-color .2s; }
  .ps .ps-ed-grip:active span, .ps .ps-ed-grip:hover span { width: 54px; background: var(--ps-gold); }
  .ps-editor.is-collapsed .ps-ed-grip span { width: 54px; background: var(--ps-gold); animation: ps-grip-hint 1.6s ease-in-out 1; }
  @keyframes ps-grip-hint { 0%, 100% { transform: none; } 30% { transform: translateY(-3px); } 60% { transform: translateY(1px); } }
  .ps-editor.is-collapsed .ps-editor-stage { padding: 6px; }
  /* comfortable tap targets */
  .ps .ps-ed-head .ps-ico-btn { width: 40px; height: 40px; }
  .ps .ps-ed-zoom .ps-ico-btn.ps-ico-sm { width: 40px; height: 40px; }
  .ps-tool span { font-size: 10.5px; }
}
@media (max-width: 360px) {
  .ps-ed-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 759px) and (orientation: landscape) and (max-height: 500px) {
  .ps-ed-sections-in { max-height: 34dvh; }
  .ps .ps-ed-grip { height: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ps .ps-tool .ps-i, .ps .ps-ed-grip span, .ps .ps-ed-nav-btn { transition: none; animation: none; }
}

/* ===== Phones: 1, 2 or 3 prints per row ===== */
.ps-cols { display: none; }
@media (max-width: 700px) {
  .ps-cols { display: inline-flex; gap: 2px; padding: 2px; margin-left: auto; border-radius: 10px; background: var(--ps-sunk); }
  .ps .ps-cols button { display: grid; place-items: center; width: 38px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--ps-muted); cursor: pointer; transition: background-color .2s, color .2s, transform .15s; }
  .ps .ps-cols button[aria-checked="true"] { background: var(--ps-surface); color: var(--ps-navy); box-shadow: 0 1px 2px rgba(35,32,29,.14); }
  .ps .ps-cols button:active { transform: scale(.9); }
  .ps-cols-ic { display: flex; gap: 2px; width: 18px; height: 14px; }
  .ps-cols-ic i { flex: 1; border-radius: 2px; background: currentColor; }
  .ps-tray-head-tools { flex-wrap: wrap; }
  .ps-tray[data-cols="1"] { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ps-tray[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ps-tray[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .ps-tray[data-cols="2"] .ps-card.is-open, .ps-tray[data-cols="3"] .ps-card.is-open { grid-column: 1 / -1; }
  .ps-tray[data-cols="2"] .ps-card:not(.is-open) .ps-stage { height: 172px; padding: 12px 10px 14px; }
  .ps-tray[data-cols="3"] .ps-card:not(.is-open) .ps-stage { height: 126px; padding: 8px 6px 10px; }
  .ps-tray[data-cols="3"] .ps-card:not(.is-open) .ps-stage-tag { font-size: 10px; padding: 1px 6px; top: 5px; left: 5px; }
  .ps .ps-tray[data-cols="3"] .ps-card:not(.is-open) .ps-card-more { width: 28px; height: 28px; right: 5px; bottom: 5px; }
  .ps .ps-tray[data-cols="3"] .ps-card:not(.is-open) .ps-card-more svg { width: 14px; height: 14px; }
  .ps-tray[data-cols="3"] .ps-card:not(.is-open) .ps-stage-q { display: none; }
}
@media (max-width: 700px) {
  .ps-tray[data-cols="2"] .ps-stage-tag, .ps-tray[data-cols="3"] .ps-stage-tag { z-index: 3; max-width: calc(100% - 10px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- 2026-10-16: frameless desk boards + templates on framed prints ---------- */
/* Desk board: a thin white-edged board standing on a stand, no moulding. */
.ps-stage.is-board canvas, .ps-editor-stage.is-board canvas, .ps-rthumb.is-board .ps-rthumb-pic canvas {
  outline: 0; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.10), 2px 3px 0 0 #e9e4da, 3px 5px 10px rgba(0,0,0,.22);
}
.ps-editor-stage.is-board canvas { box-shadow: 0 0 0 1px rgba(0,0,0,.10), 3px 4px 0 0 #e9e4da, 5px 9px 18px rgba(0,0,0,.24); }
.ps-board-note { display: flex; align-items: center; gap: 7px; margin: 2px 0 0; font-size: 12.5px; color: var(--ps-muted); }
.ps-board-ico { width: 14px; height: 18px; flex: 0 0 auto; border: 1.5px solid currentColor; border-radius: 2px; position: relative; }
.ps-board-ico::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 9px; height: 1.5px; margin-left: 1px; background: currentColor; transform: rotate(-35deg); transform-origin: left center; }
.ps .ps-tpl-btn { width: 100%; flex: 0 0 auto; margin-top: 2px; }
.ps-tpl-back { align-self: flex-start; }
.ps-frame-tip { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; padding: 10px 12px; border: 1px dashed var(--ps-line-strong); border-radius: 10px; background: var(--ps-gold-soft); font-size: 13px; line-height: 1.45; color: var(--ps-ink); }
.ps-frame-tip .ps-i { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; color: var(--ps-gold); }
.ps-tpl-strip.ps-tpl-strip-wrap { flex-wrap: wrap; overflow-x: visible; max-height: 360px; overflow-y: auto; }
@media (prefers-reduced-motion: no-preference) {
  .ps .ps-tpl-strip-wrap button { transition: transform .18s ease, border-color .18s ease; }
  .ps .ps-tpl-strip-wrap button:hover { transform: translateY(-2px); }
}

/* ================= Print Gifts (gift-20261020) — only used when the page carries a gift context ================= */
html.psg-locked { overflow: hidden; }
.psg-gate { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px; background: rgba(35, 32, 29, .55); overflow-y: auto; overscroll-behavior: contain; }
.psg-card { width: min(460px, 100%); background: var(--ps-surface); border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .28); overflow: hidden; margin: auto; }
.psg-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; background: var(--ps-gold-soft); border-bottom: 1px solid var(--ps-line); }
.psg-head h2 { font-size: 24px; }
.psg-gift-ico { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ps-navy); }
.psg-gift-ico svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.psg-body { display: grid; gap: 14px; padding: 18px 20px 20px; }
.psg-body p { margin: 0; }
.psg-msg-title { font-size: 22px; }
.psg-small, .psg-hint { color: var(--ps-muted); font-size: 12.5px; }
.psg-offer { display: grid; gap: 3px; padding: 12px 14px; border: 1px dashed var(--ps-gold); border-radius: var(--ps-r); background: #fffaf0; }
.psg-offer b { font-size: 16px; }
.psg-offer small { color: var(--ps-muted); font-size: 12.5px; }
.psg-note { padding: 10px 12px; border-radius: 8px; background: var(--ps-navy-soft); font-size: 13.5px; }
.psg-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 10px; background: var(--ps-sunk); }
.psg-tabs button { border: 0; border-radius: 7px; padding: 9px 8px; background: transparent; font-weight: 600; font-size: 14px; color: var(--ps-muted); }
.psg-tabs button[aria-selected="true"] { background: var(--ps-surface); color: var(--ps-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.psg-form { display: grid; gap: 12px; }
.psg-form .ps-field > span { font-size: 13px; font-weight: 600; }
.psg-form input { width: 100%; padding: 11px 12px; border: 1px solid var(--ps-line-strong); border-radius: 8px; background: #fff; font-size: 16px; }
.psg-form input:focus { border-color: var(--ps-navy); outline: none; box-shadow: 0 0 0 3px var(--ps-navy-soft); }
.psg-form input.psg-pin { width: 9.5em; letter-spacing: .5em; font-family: var(--ps-mono); text-align: center; }
.psg-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.psg-actions .ps-btn { flex: 1 1 auto; }

.psg-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 4px 0 12px; padding: 12px 14px; border: 1px solid var(--ps-gold); border-radius: var(--ps-r); background: linear-gradient(90deg, #fffaf0, var(--ps-gold-soft)); }
.psg-banner-main { display: flex; gap: 12px; align-items: flex-start; min-width: 0; flex: 1 1 320px; }
.psg-banner-txt { display: grid; gap: 2px; min-width: 0; }
.psg-banner-title { font-family: var(--ps-display); font-size: 19px; font-weight: 600; line-height: 1.15; }
.psg-banner-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; }
.psg-banner-txt small { color: var(--ps-muted); font-size: 12.5px; }
.psg-meter { display: inline-flex; gap: 3px; }
.psg-meter i { width: 12px; height: 16px; border: 1.5px solid var(--ps-gold); border-radius: 2px; background: #fff; }
.psg-meter i.is-on { background: var(--ps-gold); }
.psg-extra-note { color: var(--ps-warn); font-weight: 600; font-size: 13px; }
.psg-banner-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.psg-badge { position: absolute; left: 8px; bottom: 8px; z-index: 2; font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; background: var(--ps-good); color: #fff; pointer-events: none; }
.psg-badge.is-extra { background: var(--ps-warn); }
.ps-lines li.psg-line.is-free > span:first-child { color: var(--ps-good); font-weight: 700; }
.ps-lines li.psg-line.is-extra > span:first-child { color: var(--ps-warn); font-weight: 700; }
.psg-form-note { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--ps-gold-soft); font-size: 13.5px; grid-column: 1 / -1; }
.ps-form input.psg-locked-input { background: var(--ps-sunk); color: var(--ps-muted); cursor: default; }
.psg-success-note { font-weight: 600; }
@media (max-width: 560px) {
  .psg-gate { padding: 10px; place-items: start center; }
  .psg-head { padding: 14px 16px 12px; }
  .psg-head h2 { font-size: 21px; }
  .psg-body { padding: 14px 16px 16px; gap: 12px; }
  .psg-banner { padding: 10px 12px; }
  .psg-banner-title { font-size: 17px; }
  .psg-banner-tools { width: 100%; justify-content: space-between; }
  .psg-actions .ps-btn { width: 100%; }
}
