/* Both editing engines share the shell. Each product supplies its own artwork and controls. */
.studio-page {
  --workspace: #eff0f4;
  --surface: #fff;
  --ink: #202435;
  --muted: #636c7e;
  --line: #dfe3eb;
  --soft: #f3f5f9;
  --accent: #006fa9;
  --active: #eaf6ff;
  --purchase: #d50068;
  --pad: clamp(12px, 1vw, 20px);
  margin: 0;
  background: var(--workspace);
  color: var(--ink);
  font-family: var(--pb-font, Arial, sans-serif);
}
.studio-page [hidden] { display: none !important; }
.studio-page :is(button, a, summary, textarea, select, input, canvas):focus-visible {
  outline: 3px solid #357de3;
  outline-offset: 2px;
}
.studio-page .constructor-topbar {
  position: relative;
  flex: none;
  min-height: 60px;
  padding: 8px var(--pad);
  background: var(--surface);
  border: 0;
  box-shadow: 0 1px 0 #dfe3eb;
  z-index: 4;
}
.constructor-topbar .logo {
  color: #181a22;
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 900;
  letter-spacing: -.075em;
  line-height: 1;
}
.constructor-topbar .logo b { color: #2344e8; }
.constructor-topbar .constructor-history {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 9px;
  align-items: center;
}
.constructor-history > button {
  width: 36px;
  height: 36px;
  background: transparent;
  font: 24px/1 Arial, sans-serif;
}
.constructor-history > button:disabled { color: #acb2bd; }
.studio-insert { position: relative; }
.studio-insert summary {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #0087cc;
  box-shadow: 0 0 0 1px #dfe7ef;
  font: 29px/1 Arial, sans-serif;
  list-style: none;
  cursor: pointer;
}
.studio-insert summary::-webkit-details-marker { display: none; }
.studio-insert[open] summary, .studio-insert summary:hover { background: #0074b2; }
.studio-insert-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  width: 170px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 5px 20px #24304a22;
}
.constructor-history .studio-insert-menu button {
  display: block;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
}
.constructor-history .studio-insert-menu button:hover { background: var(--soft); }
.constructor-topbar .designer-checkout {
  position: static;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 14px;
  margin-left: auto;
  padding: 0;
  max-width: 42%;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}
.designer-checkout .designer-total { display: grid; justify-items: end; margin: 0; min-width: 0; }
.designer-checkout .designer-total strong { font-size: 19px; line-height: 1.1; color: var(--ink); }
.designer-checkout .designer-total > span { color: var(--muted); font-size: 10px; }
.designer-checkout .designer-total #builderStatus {
  position: absolute;
  top: calc(100% + 6px);
  right: 12px;
  margin: 0;
  padding: 10px 14px;
  max-width: min(320px, 92vw);
  border: 1px solid #e1c8bd;
  border-radius: 6px;
  background: #fff9f2;
  color: #7b3619;
  font-size: 12px;
  text-align: left;
}
.constructor-topbar .designer-checkout .primary {
  width: auto;
  min-width: 0;
  flex: none;
  min-height: 40px;
  padding: 10px 16px;
  color: white;
  background: var(--purchase);
  font-weight: 700;
  font-size: 14px;
  border-radius: 6px;
}
.constructor-topbar .designer-checkout .primary:hover { background: #b10056; }
.constructor-topbar .designer-checkout .primary:disabled { color: #fff; background: #985174; opacity: 1; cursor: not-allowed; }
.designer-checkout .primary::before,
.reference-tabs > button::before, .studio-panel-heading::before,
#designPreview::before, #templatePreviewToggle::before,
.studio-shape-list button::before {
  display: inline-block;
  font: 900 .95em/1 'Printburo Icons', sans-serif;
  speak: never;
}
.designer-checkout .primary::before { content: '\f07a'; margin-right: 8px; }
.studio-page .studio-workspace { width: 100%; max-width: none; padding: 0; }
.studio-loading-title { margin: 24px 0 10px; }
.reference-grid {
  display: grid;
  grid-template-columns: clamp(246px, 18.5vw, 384px) minmax(0, 1fr) clamp(244px, 18vw, 382px);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "sidebar stage inspector";
  align-items: stretch;
  gap: 0;
  padding: 9px;
  background: var(--workspace);
}
.reference-grid .reference-library, .reference-grid .reference-inspector {
  position: relative;
  display: block;
  align-content: start;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 0 0 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 2px 5px #26375108;
  backdrop-filter: none;
  scrollbar-width: thin;
}
.reference-grid .reference-library { grid-area: sidebar; }
.reference-grid .reference-inspector { grid-area: inspector; }
.reference-tabs {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 2;
  align-items: stretch;
  min-height: 42px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.reference-tabs > button, .studio-panel-heading,
.reference-library .reference-tabs h2, .reference-inspector .reference-tabs h2 {
  flex: 1;
  margin: 0;
  padding: 12px 9px;
  border: 0;
  border-radius: 0;
  background: white;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
}
.reference-tabs > button + button { border-left: 1px solid #edf0f4; }
.reference-tabs > button[aria-selected=true], .reference-tabs .studio-panel-heading {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 #008ed0;
}
.reference-tabs > button::before, .studio-panel-heading::before { margin-right: 6px; }
[data-library-tab=design]::before, .reference-library .studio-panel-heading::before { content: '\f5fd'; }
[data-library-tab=files]::before { content: '\f302'; }
[data-inspector-tab=product]::before, #templateProductTab::before, .reference-inspector .studio-panel-heading::before { content: '\f1de'; }
[data-inspector-tab=object]::before { content: '\f247'; }
#templateTextTab::before { content: '\f031'; }
.reference-tabs > button:hover { background: var(--soft); }
.reference-add-actions {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  margin: 12px var(--pad);
  border: 1px solid #89bcde;
  border-radius: 6px;
  overflow: hidden;
}
.reference-add-actions button {
  min-width: 0;
  min-height: 40px;
  padding: 8px 3px;
  background: white;
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
}
.reference-add-actions button + button { border-left: 1px solid #89bcde; }
.reference-add-actions button:hover { background: var(--active); }
.reference-library [data-library-panel], .reference-template .reference-library > section { padding: 0 var(--pad); }
.reference-library h2, .reference-panel h2 { margin: 16px 0 9px; font-size: 15px; letter-spacing: -.025em; }
.reference-grid .builder-help, .reference-object-empty { color: var(--muted); font-size: 12px; line-height: 1.5; }
.reference-library .reference-library-tools {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  margin: 0 0 14px;
  padding: 3px;
  gap: 2px;
  background: var(--soft);
  border: none;
  border-radius: 6px;
}
.reference-library-tools button {
  display: block;
  padding: 8px 2px;
  color: var(--muted);
  background: transparent;
  border-radius: 4px;
  font-size: 12px;
}
.reference-library .reference-library-tools button[aria-pressed=true] {
  color: var(--ink);
  background: white;
  box-shadow: 0 1px 3px #26375119;
}
.studio-mask-card { padding: 13px 10px 10px; border: 1px solid var(--line); border-radius: 8px; }
.studio-mask-card h2 { margin: 0 0 4px; }
.reference-photo-templates, .studio-shape-list { display: grid; gap: 5px; }
.reference-photo-templates { grid-template-columns: repeat(2, minmax(0,1fr)); margin-top: 13px; }
.reference-photo-templates button {
  min-width: 0;
  min-height: 47px;
  padding: 5px 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--soft);
}
.reference-photo-templates button span {
  color: #9570f0;
  font: 900 clamp(20px, 1.58vw, 32px)/1.15 var(--pb-font,Arial,sans-serif);
  letter-spacing: -.065em;
}
@supports (background-clip: text) {
  .reference-photo-templates button span {
    color: transparent;
    background: linear-gradient(108deg, #fc806c 0 25%, #2699e9 27% 49%, #82bf66 51% 73%, #a16fec 76%);
    background-clip: text;
  }
  .reference-photo-templates button:nth-child(2n) span {
    background-image: linear-gradient(103deg, #ea628c 0 24%, #ffa34d 27% 48%, #a181ee 51% 72%, #4bb2b4 75%);
  }
}
.studio-shape-list { grid-template-columns: repeat(3, minmax(0,1fr)); margin-top: 5px; }
.studio-shape-list button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-height: 40px;
  padding: 4px 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--soft);
  color: var(--muted);
  font-size: 10px;
}
.studio-shape-list [data-photo-mask=heart]::before { content: '\f004'; color: #d24d76; }
.studio-shape-list [data-photo-mask=circle]::before { content: '\f111'; color: #339cd8; }
.studio-shape-list [data-photo-mask=star]::before { content: '\f005'; color: #d39331; }
.reference-photo-templates button:hover, .studio-shape-list button:hover { border-color: #85b5d6; }
.reference-library .preset-tray, .reference-files, .reference-library .studio-template-list {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 6px;
}
.reference-library .preset-print, .reference-files button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-width: 0;
  padding: 9px 4px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
}
.reference-library .preset-print:hover, .reference-files button:hover,
.reference-library .studio-template-card:hover { border-color: #83b8db; }
.reference-library .preset-print canvas { width: min(100%,60px); height: auto; }
.reference-files { margin-top: 12px; }
.reference-files canvas { width: 100%; height: auto; }
.reference-files span { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.reference-library .reference-draft, .reference-template #templateDraftStatus {
  margin: 18px var(--pad) 3px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.reference-library #newDraft, .reference-library #newTemplateDraft {
  margin: 5px var(--pad); padding: 8px 12px; border-radius: 5px;
  background: var(--soft); color: var(--ink); font-size: 12px;
}
.reference-library .reference-draft:empty { display: none; }
.reference-library .design-layers { display: grid; gap: 5px; }
.reference-library .design-layers button {
  padding: 9px; background: var(--soft); text-align: left; font-size: 12px; border-radius: 5px;
}
.reference-library .design-layers button[aria-pressed=true] {
  background: var(--active); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent);
}
.reference-grid .reference-stage {
  position: relative;
  grid-area: stage;
  display: grid;
  grid-template-rows: minmax(0,1fr);
  min-width: 0;
  min-height: 0;
  gap: 0;
  padding: 36px 10px 48px;
  background: transparent;
  border: none;
  overflow: hidden;
}
.reference-stage .designer-canvas-wrap {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  container-type: size;
  background: transparent;
  border-radius: 0;
}
.studio-workspace .reference-stage .builder-canvas {
  display: block;
  width: min(100cqw,100cqh);
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  background: transparent;
  border-radius: 0;
  touch-action: none;
}
.reference-stage .model-sides {
  position: absolute; top: 0; left: 9px; z-index: 1; display: grid;
  grid-template-columns: minmax(0,1fr); gap: 5px; width: clamp(48px,4.2vw,84px);
}
.reference-stage .model-sides button {
  display: grid; grid-template-columns: 1fr; gap: 0; min-width: 0; padding: 3px 4px 5px;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line); border-radius: 5px;
  font-size: 10px; line-height: 1.15;
}
.reference-stage .model-sides button[aria-pressed=true] {
  color: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent);
}
.reference-stage .model-sides canvas { width: 100%; height: auto; }
.reference-stage .designer-stage-bar { position: absolute; right: 10px; top: 0; z-index: 1; margin: 0; }
.reference-stage .designer-stage-bar button, .reference-zoom {
  background: var(--surface); color: var(--muted); border: 1px solid var(--line); border-radius: 6px;
}
.reference-stage .designer-stage-bar button { padding: 8px 11px; font-size: 12px; }
.reference-stage .designer-stage-bar button[aria-pressed=true] { color: var(--accent); border-color: var(--accent); background: var(--active); }
#designPreview::before, #templatePreviewToggle::before { content: '\f06e'; margin-right: 6px; }
.reference-stage .designer-help {
  position: absolute; left: 14px; bottom: 6px; width: min(44%, 310px);
  margin: 0; padding: 0; font-size: 11px;
}
.reference-zoom {
  position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; padding: 2px;
}
.reference-zoom button { height: 30px; min-width: 31px; padding: 2px 7px; border-radius: 3px; background: transparent; color: var(--ink); font-size: 17px; }
.reference-zoom #zoomReset { min-width: 44px; font-size: 12px; }
.reference-zoom button:hover { background: var(--soft); }
.reference-grid .reference-panel {
  display: grid; gap: 21px; align-content: start; padding: 19px var(--pad); min-width: 0;
}
.reference-panel > *, .reference-panel fieldset { min-width: 0; margin: 0; }
.studio-product-title, .reference-panel > h1 {
  padding-bottom: 15px; border-bottom: 1px solid var(--line);
}
.constructor-workspace .reference-panel h1 {
  color: var(--ink); font-size: clamp(20px,1.5vw,25px); line-height: 1.17; letter-spacing: -.045em; margin: 0;
}
.studio-product-title a { display: inline-block; margin-top: 7px; color: var(--accent); font-size: 12px; text-underline-offset: 3px; text-decoration: underline; }
.reference-panel legend, .reference-panel label, .reference-panel .studio-product-options h2 {
  color: var(--ink); font-size: 13px; font-weight: 650; line-height: 1.4;
}
.reference-panel legend { padding: 0; }
.reference-panel #garmentColorName { color: var(--muted); font-size: 12px; font-weight: 400; }
.reference-panel #swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; padding: 2px; }
.reference-panel .swatch {
  width: min(34px, calc((100% - 41px) / 6));
  height: auto; aspect-ratio: 1; padding: 0;
  border: 1px solid #d1d4dc; border-radius: 50%;
}
.reference-panel .swatch[aria-pressed=true] { box-shadow: none; outline: 2px solid var(--accent); outline-offset: 2px; }
.reference-sizes, .reference-panel .studio-choice-buttons {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin: 9px 0 0;
}
.reference-panel .studio-choice-buttons { grid-template-columns: repeat(auto-fit,minmax(70px,1fr)); }
.reference-sizes button, .reference-panel .studio-choice-buttons button {
  min-width: 0; min-height: 35px; padding: 7px 3px;
  border: 1px solid #d7dce5; border-radius: 4px; background: white;
  color: var(--ink); font-size: 12px; font-weight: 550; white-space: normal;
}
.reference-sizes button[aria-pressed=true], .reference-panel .studio-choice-buttons button[aria-pressed=true] {
  color: var(--accent); border-color: var(--accent); background: var(--active);
}
[data-section="shoe-bags"] .reference-panel .studio-choice-buttons {
  grid-template-columns: repeat(2,minmax(0,140px)); gap: 8px;
}
.reference-panel .studio-choice-buttons .bag-shape-choice {
  position: relative; padding: 3px; border-width: 2px; border-radius: 8px;
}
.bag-shape-choice img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 4px; }
[data-section="shoe-bags"] :is(.bag-shape-choice img, #templatePreview > .template-product-photo) { filter: grayscale(1) brightness(.65); }
.bag-shape-choice:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.bag-shape-choice[aria-pressed=true]::after {
  content: '✓'; position: absolute; top: 7px; right: 7px; display: grid; place-items: center;
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font: bold 14px/1 Arial,sans-serif;
}
.reference-sizes button:disabled { color: var(--muted); background: var(--soft); text-decoration: line-through; }
.reference-panel :is(#objectProperties,#textProperties,#imageProperties,#photoWordProperties) { display: grid; gap: 14px; }
.reference-panel h2 { margin: 0; overflow-wrap: anywhere; }
.reference-panel label { display: grid; gap: 7px; }
.reference-panel label:has(output) { grid-template-columns: 1fr auto; }
.reference-panel label:has(output) input { grid-column: 1/-1; }
.reference-panel output { color: var(--accent); }
.reference-panel .builder-fields { display: grid; grid-template-columns: minmax(0,1fr) 55px; gap: 8px; }
.reference-panel :is(textarea, select, input[type=text], input[type=color]) {
  min-width: 0; width: 100%; padding: 8px; border-radius: 5px;
  border: 1px solid #cfd5e0; background: white; color: var(--ink); font: inherit;
}
.reference-panel input[type=color] { height: 38px; padding: 3px; }
.reference-panel input[type=range] { width: 100%; margin: 0; accent-color: var(--accent); }
.reference-panel .studio-disclosure { border-block: 1px solid var(--line); }
.studio-disclosure summary { padding: 12px 0; cursor: pointer; font-size: 13px; font-weight: 650; }
.reference-panel .reference-align,.reference-panel .layer-controls {
  display: grid; gap: 4px; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 8px 0 14px;
}
.reference-panel .layer-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }
.reference-align button,.layer-controls button { padding: 7px 4px; border-radius: 4px; background: var(--soft); color: var(--ink); font-size: 12px; }
.layer-controls .reference-delete { color: #a82b4e; }
.reference-template .reference-library > section { margin-top: 15px; }
.reference-template .studio-template-list { margin-block: 10px; }
.studio-template-group { grid-column: 1 / -1; min-width: 0; }
.studio-template-group + .studio-template-group { border-top: 1px solid var(--line); padding-top: 12px; }
.studio-template-group .studio-template-group-title { margin: 0; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.studio-template-group > .studio-template-list { margin-block: 8px 6px; }
.reference-template .studio-template-card { border-color: var(--line); box-shadow: none; }
[data-section="shoe-bags"] .studio-template-cover { aspect-ratio: 1; object-fit: contain; }
.reference-template .studio-template-card[aria-pressed=true] { border-color: var(--accent); color: var(--accent); }
.reference-template .studio-product-options fieldset + fieldset { margin-top: 14px; }
.reference-stage .template-product-photo { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.reference-template .template-canvas .graduation-artwork { width: min(100%,calc(100cqh * var(--artwork-ratio,1.3333))); }
[data-section="shoe-bags"] .template-canvas:is([data-view-rotation="90"],[data-view-rotation="270"]) .graduation-artwork { width:min(100cqh,calc(100cqw * var(--artwork-ratio,1))); }
.template-rotation-controls button { min-width:38px; font-size:18px !important; line-height:1; }
.template-stage .studio-text-zone { border-style: none; }
.template-stage .studio-text-zone::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border: 2px dashed; border-color: inherit; border-radius: inherit;
}
.template-stage .studio-text-zone > svg { pointer-events: none; }
.template-stage .studio-text-zone .studio-inline-input {
  position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; min-width: 0; padding: 0 2%; margin: 0;
  border: none; border-radius: 0; background: transparent; color: transparent; -webkit-text-fill-color: transparent;
  caret-color: #f5dfa0; text-align: center; box-shadow: none; outline: none; cursor: text;
}
.template-stage .studio-text-zone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.template-canvas[data-preview-only] .studio-inline-input { visibility: hidden; }
.reference-template .designer-help { width: auto; max-width: calc(100% - 28px); }
.studio-pane-switch { display: none; }
@media (min-width:901px) {
  .studio-page { display: flex; flex-direction: column; height: 100dvh; min-height: 0; }
  .studio-workspace { flex: 1; min-height: 0; }
  .studio-workspace #builderRoot, .reference-grid { height: 100%; min-height: 0; }
}
@media (max-width:900px) {
  .studio-page { display: block; height: auto; min-height: 100dvh; }
  .studio-page .constructor-topbar { min-height: 55px; }
  .studio-workspace #builderRoot { height: auto; }
  .reference-grid {
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas: "stage" "navigation" "tools";
    height: auto; padding: 8px 8px 82px;
  }
  .reference-grid .reference-stage { height: clamp(285px,50svh,520px); padding: 12px 5px 36px; }
  .reference-stage .designer-stage-bar { top: 0; right: 2px; }
  .reference-stage .model-sides { left: 0; width: 43px; }
  .reference-stage .model-sides button { font-size: 9px; }
  .reference-grid .studio-pane-switch {
    grid-area: navigation; display: flex; gap: 4px; padding: 4px; margin: 8px 0;
    background: #e1e5ed; border-radius: 7px;
  }
  .studio-pane-switch button { flex: 1; min-height: 39px; padding: 5px; border-radius: 5px; color: var(--muted); background: transparent; font-size: 14px; font-weight: 650; }
  .studio-pane-switch button[aria-pressed=true] { color: var(--ink); background: white; box-shadow: 0 1px 3px #34445b15; }
  .reference-grid :is(.reference-library,.reference-inspector) { grid-area: tools; height: auto; overflow: visible; }
  .reference-grid .studio-pane-inactive { display: none; }
  .reference-tabs { position: static; border-radius: 7px 7px 0 0; overflow: hidden; }
  .reference-tabs > button, .reference-add-actions button, .reference-sizes button, .reference-panel .studio-choice-buttons button { min-height: 42px; }
  .reference-library .preset-tray { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .reference-stage .designer-help { position: static; font-size: 10px; width: auto; text-align: center; }
  .reference-stage:has(.reference-zoom) .designer-help { position: absolute; left: 0; bottom: 6px; width: 52%; text-align: left; }
  .reference-stage:has(.reference-zoom) .reference-zoom { left: auto; right: 0; transform: none; }
  .reference-template .designer-help { position: absolute; left: 0; right: 0; bottom: 5px; max-width: none; }
}
@media (max-width:800px) {
  .constructor-topbar .constructor-history { position: static; transform: none; margin-left: auto; gap: 4px; }
  .studio-insert summary { width: 39px; height: 39px; font-size: 23px; }
  .studio-insert-menu { left: auto; right: 0; transform: none; }
  .constructor-topbar .designer-checkout {
    position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; max-width: none;
    min-height: 62px; padding: 9px 14px max(9px,env(safe-area-inset-bottom));
    justify-content: space-between; background: #fff; border-top: 1px solid var(--line); border-radius: 0;
  }
  .designer-checkout .designer-total { justify-items: start; }
  .designer-checkout .designer-total > span { max-width: 33vw; text-align: left; }
  .designer-checkout .designer-total #builderStatus { top: auto; bottom: calc(100% + 4px); }
  .constructor-topbar .designer-checkout .primary { min-height: 42px; padding-inline: 13px; }
}

@font-face { font-family:'DejaVu Serif';src:url('/assets/DejaVuSerif.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap; }
@font-face { font-family:'Sprite Graffiti';src:url('/assets/SpriteGraffiti-Regular.otf') format('opentype');font-weight:400;font-style:normal;font-display:swap; }
.template-gallery { position:absolute; top:12px; left:12px; z-index:2; display:grid; gap:7px; width:76px; }
.template-gallery:empty { display:none; }
.template-gallery button { display:grid; justify-items:center; gap:3px; padding:5px; border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--muted); font-size:11px; cursor:pointer; }
.template-gallery button[aria-pressed=true] { border-color:var(--accent); color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.template-gallery img { display:block; width:62px; height:72px; object-fit:contain; }
@media (max-width:900px) { .template-gallery { top:8px; left:4px; width:54px; } .template-gallery img { width:42px; height:50px; } }

@font-face { font-family:'DejaVu Sans';src:url('/assets/DejaVuSans-Bold.ttf') format('truetype');font-weight:700;font-style:normal;font-display:swap; }

.pb-cart-review{box-sizing:border-box;width:min(620px,calc(100% - 24px));max-height:90dvh;margin:auto;padding:clamp(16px,3vw,28px);overflow:auto;color:#182236;background:#fff;border:1px solid #d8dfe9;border-radius:16px;box-shadow:0 18px 70px #18203542}
.pb-cart-review::backdrop{background:#1720359c}
.pb-cart-review h2{margin:0 0 16px;font-size:clamp(20px,3vw,26px);line-height:1.15}
.pb-review-gallery{display:flex;align-items:center;justify-content:center;gap:8px;background:#f2f3f6;border-radius:10px;padding:8px}
.pb-review-gallery figure{margin:0;min-width:0;flex:1;text-align:center}
.pb-review-gallery canvas{max-width:100%;max-height:48dvh;height:auto;width:auto;vertical-align:middle}
.pb-review-gallery figcaption,.pb-review-details{font-size:14px;color:#4c576b}
.pb-review-details{margin:12px 0}
.pb-review-warning{margin:12px 0;padding:12px;border-radius:8px;background:#fff2d5;color:#674400;font-weight:700}
.pb-review-warning:empty{display:none}
.pb-review-error{color:#a02a32;font-size:14px}
.pb-review-error:empty{display:none}
.pb-review-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.pb-review-actions button,.pb-review-actions a{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:9px 15px;border:1px solid #cbd3df;border-radius:8px;background:white;color:#26324a;font:inherit;font-size:14px;text-decoration:none;cursor:pointer}
.pb-review-actions .pb-review-primary{color:white;background:#273dd5;border-color:#273dd5;font-weight:700}
.pb-review-actions :disabled{opacity:.65;cursor:wait}
@media(max-width:480px){.pb-review-actions>*{width:100%}.pb-review-actions .pb-review-primary{order:-1}}

#templateWorkspace[data-section="shoe-bags"] #templateProductInspector :is(.studio-product-options,.studio-product-title > a) {display:none}
.bag-product-details {display:grid;gap:20px;margin-top:16px;line-height:1.5;overflow-wrap:anywhere}
.bag-product-details [hidden],.bag-product-details [data-bag-status]:empty {display:none}
.bag-product-details h2 {margin:0 0 6px;font-size:1rem}
.bag-product-details ul {margin:0;padding-inline-start:1.2em}
.bag-product-details p {margin:0}
.bag-product-description > * + * {margin-block-start:.55em}
.bag-product-description img {max-width:100%;height:auto}
.bag-product-details [data-bag-dimensions] p {white-space:pre-line}

.reference-template :is(#bagNext,#bagPersonalization,#templateLibraryChoices,#bagRetryInks)[hidden],
.designer-checkout #templateOrder[hidden] {display:none}
.reference-library .bag-step-button {display:block;width:100%;min-height:44px;margin:16px 0 4px}
.reference-library #bagNext:disabled {opacity:.5;cursor:default}
.reference-library .bag-personalization {display:grid;gap:12px}
.bag-name-label,.bag-ink-field legend {font-size:16px;font-weight:700;color:var(--ink)}
.reference-library .bag-name {
 box-sizing:border-box;width:100%;min-width:0;min-height:54px;padding:10px 12px;
 color:var(--ink);background:white;border:1px solid var(--line);border-radius:7px;
 font-family:inherit;font-size:clamp(20px,2vw,25px);font-weight:600;line-height:1.25;
}
.reference-library .bag-name:focus {outline:2px solid var(--accent);outline-offset:1px}
.bag-ink-field {min-width:0;margin:8px 0 0;padding:0;border:0}
.bag-ink-field legend {margin:0 0 8px;padding:0}
.bag-ink-options {display:flex;flex-wrap:wrap;gap:6px}
.bag-ink-options label {
 position:relative;display:inline-flex;align-items:center;gap:6px;min-height:40px;
 padding:5px 9px;border:1px solid var(--line);border-radius:7px;cursor:pointer;
 font-size:13px;font-weight:600;
}
.bag-ink-options input {position:absolute;opacity:0;width:1px;height:1px;margin:0}
.bag-ink-chip {display:block;flex:none;width:21px;height:21px;border-radius:50%;border:1px solid #9da5ae}
.bag-ink-options label:has(:checked) {background:var(--active);border-color:var(--accent)}
.bag-ink-options label:focus-within {outline:2px solid var(--accent);outline-offset:2px}
.bag-ink-field [role="status"]:empty {display:none}
