/* PGH Design Editor — scoped under .pgh-de so it cannot affect the theme or other PGH pages. */
.pgh-de {
  --pgh-de-ink: #1d1d1d;
  --pgh-de-muted: #5b5b5b;
  --pgh-de-line: #d6d6d6;
  --pgh-de-accent: #0a5cad;
  --pgh-de-warn: #8a4b00;
  --pgh-de-bad: #a11a1a;
  --pgh-de-ok: #1b6b2a;
  color: var(--pgh-de-ink);
  font-size: 15px;
  line-height: 1.4;
  box-sizing: border-box;
}
.pgh-de *, .pgh-de *::before, .pgh-de *::after { box-sizing: inherit; }
.pgh-de [hidden] { display: none !important; }
body.pgh-de-page form.cart { display:none!important; }
.pgh-de { max-width:100%; min-width:0; overflow-wrap:anywhere; }
.pgh-de__comparison { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.pgh-de__comparison figure { margin:0; min-width:0; }
.pgh-de__comparison img { width:100%; height:auto; border:1px solid #d6d6d6; }
.pgh-de__qa pre { white-space:pre-wrap; font-size:12px; max-width:100%; }
.pgh-de input,.pgh-de select,.pgh-de textarea { max-width:100%; min-width:0; }
body.pgh-de-page .woocommerce-tabs ul.tabs { display:flex!important; flex-wrap:wrap!important; overflow:visible!important; white-space:normal!important; height:auto!important; max-width:100%; }
body.pgh-de-page .woocommerce-tabs ul.tabs li { max-width:100%; white-space:normal!important; }
body.pgh-de-page .woocommerce-tabs ul.tabs li a { white-space:normal!important; overflow-wrap:anywhere; }
body.pgh-de-page .woocommerce-tabs ul.tabs::-webkit-scrollbar { display:none; }
.pgh-de button, .pgh-de select, .pgh-de input, .pgh-de textarea { font: inherit; }
.pgh-de button {
  padding: 8px 12px; border: 1px solid var(--pgh-de-line); background: #fff; border-radius: 6px; cursor: pointer; min-height: 36px;
}
.pgh-de button:hover:not(:disabled) { border-color: var(--pgh-de-accent); }
.pgh-de button:disabled { opacity: .5; cursor: not-allowed; }
.pgh-de button:focus-visible, .pgh-de input:focus-visible, .pgh-de select:focus-visible, .pgh-de textarea:focus-visible, .pgh-de canvas:focus-visible {
  outline: 3px solid var(--pgh-de-accent); outline-offset: 2px;
}
.pgh-de__lock { margin: 0 0 10px; font-size: 12px; color: var(--pgh-de-muted); letter-spacing: .02em; }
.pgh-de__locked { padding: 12px; background: #fff3cd; color: var(--pgh-de-warn); border-radius: 6px; }

.pgh-de__modes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pgh-de__modes button[aria-selected="true"] { background: var(--pgh-de-accent); color: #fff; border-color: var(--pgh-de-accent); }

.pgh-de__layout { display: grid; grid-template-columns: 200px minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.pgh-de__tools, .pgh-de__side { display: flex; flex-direction: column; gap: 8px; }
.pgh-de__tools > button, .pgh-de__tools > select { width: 100%; text-align: left; }
.pgh-de__illus { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pgh-de__illus .pgh-de__cat { grid-column: 1 / -1; margin: 6px 0 0; font-weight: 600; font-size: 13px; color: var(--pgh-de-muted); }
.pgh-de__bg, .pgh-de__mugcolor { border: 1px solid var(--pgh-de-line); border-radius: 6px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.pgh-de__bg legend { padding: 0 4px; font-size: 13px; }
.pgh-de__mugcolor { font-size: 13px; }

.pgh-de__stage { min-width: 0; }
.pgh-de__controls { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; align-items: center; }
.pgh-de__guides { font-size: 13px; margin-left: auto; display: flex; gap: 4px; align-items: center; }
.pgh-de__canvas-wrap { width: 100%; background: #fff; border: 1px solid var(--pgh-de-line); border-radius: 8px; overflow: hidden; }
#pgh-de-canvas { display: block; width: 100%; height: auto; cursor: grab; touch-action: none; }
#pgh-de-mug { display: block; margin: 0 auto; max-width: 100%; }

.pgh-de__warnings { list-style: none; padding: 0; margin: 10px 0 0; color: var(--pgh-de-warn); font-size: 14px; }
.pgh-de__warnings li { margin: 2px 0; }
.pgh-de__error { color: var(--pgh-de-bad); min-height: 1.4em; margin: 10px 0 0; }

.pgh-de__review { border: 1px solid var(--pgh-de-line); border-radius: 8px; padding: 14px; background: #fafafa; }
.pgh-de__review h3 { margin: 0 0 8px; }
.pgh-de__review ul { padding-left: 18px; }
.pgh-de__quality--ok { color: var(--pgh-de-ok); }
.pgh-de__quality--warn { color: var(--pgh-de-warn); }
.pgh-de__quality--bad { color: var(--pgh-de-bad); }
.pgh-de__approve { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; }
.pgh-de__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pgh-de__note { font-size: 13px; color: var(--pgh-de-muted); }

.pgh-de__side details { border: 1px solid var(--pgh-de-line); border-radius: 8px; padding: 8px; background: #fff; }
.pgh-de__side summary { font-weight: 600; cursor: pointer; }
.pgh-de__layers { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; }
.pgh-de__layer { display: flex; gap: 4px; align-items: center; }
.pgh-de__layer-name { flex: 1; text-align: left; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pgh-de__layer.is-selected .pgh-de__layer-name { border-color: var(--pgh-de-accent); font-weight: 600; }
.pgh-de__layer button { padding: 4px 6px; min-height: 30px; font-size: 13px; }
.pgh-de__props { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.pgh-de__field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.pgh-de__field input, .pgh-de__field select, .pgh-de__field textarea { font-size: 15px; }
.pgh-de__check { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.pgh-de__empty { color: var(--pgh-de-muted); font-size: 13px; }
.pgh-de__warn { color: var(--pgh-de-warn); font-size: 13px; }

/* Mobile: canvas first, tools as a horizontal row below it, panels stacked. Gutter 16px. */
@media (max-width: 1024px) {
  .pgh-de__layout { grid-template-columns: minmax(0, 1fr) 220px; }
  .pgh-de__tools { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; order: 2; }
  .pgh-de__tools > * { flex: 1 1 140px; }
  .pgh-de__illus { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  .pgh-de__layout { grid-template-columns: 1fr; }
  .pgh-de__stage { order: 1; }
  .pgh-de__tools { order: 2; }
  .pgh-de__side { order: 3; }
  .pgh-de__controls button { flex: 1 1 calc(50% - 6px); }
  .pgh-de__guides { margin-left: 0; width: 100%; }
  .pgh-de__tools > * { flex: 1 1 45%; }
  .pgh-de { padding: 0; }
  .pgh-de__comparison { grid-template-columns:1fr; }
}
@media (max-width: 359px) {
  .pgh-de__controls button { flex: 1 1 100%; }
}

/* ---- 0.4.0: direct text editing, customer-friendly controls, mobile bottom sheet, layers drawer ---- */
.pgh-de__canvas-wrap { position: relative; }
.pgh-de__textedit {
  position: absolute; z-index: 5; margin: 0; padding: 2px 4px; resize: none; overflow: hidden;
  border: 2px dashed var(--pgh-de-accent); border-radius: 4px; background: transparent; color: transparent;
  line-height: 1.2; outline: none; white-space: pre-wrap; word-break: break-word;
}
.pgh-de__textedit:focus { outline: none; }
.pgh-de__layers-wrap > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.pgh-de__actionrow { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.pgh-de__act { min-height: 44px; min-width: 44px; padding: 8px 10px; }
.pgh-de__objname { margin: 0 0 4px; }
.pgh-de__advanced { margin-top: 8px; border: 1px dashed var(--pgh-de-line); padding: 8px; border-radius: 6px; }
.pgh-de__advanced > summary { cursor: pointer; font-size: 13px; }
/* ---- 0.5.0: mug preview face switch, mobile tool dock ---- */
.pgh-de__faces { display: flex; gap: 6px; justify-content: center; margin: 8px 0; }
.pgh-de__faces button[aria-pressed="true"] { background: var(--pgh-de-accent); color: #fff; border-color: var(--pgh-de-accent); }
#pgh-de-mug { width: 100%; max-width: 520px; height: auto; }
@media (max-width: 767px) {
  .pgh-de { padding-bottom: 150px; }
  .pgh-de__tools {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; flex-direction: row; flex-wrap: nowrap;
    gap: 4px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: #fff;
    border-top: 1px solid var(--pgh-de-line); box-shadow: 0 -2px 10px rgba(0, 0, 0, .08);
  }
  .pgh-de__tools > * { flex: 1 1 0; min-width: 0; font-size: 12px; padding: 6px 4px; }
  .pgh-de__tools > .pgh-de__bg { display: none; }
  .pgh-de__tools > .pgh-de__illus { position: fixed; left: 0; right: 0; bottom: calc(96px + env(safe-area-inset-bottom)); max-height: 45vh; overflow-y: auto; background: #fff; padding: 8px; grid-template-columns: repeat(3, 1fr); box-shadow: 0 -4px 12px rgba(0, 0, 0, .12); }
  .pgh-de__tools > .pgh-de__illus .pgh-de__cat { display: none; }
  .pgh-de__mugcolor { font-size: 12px; }
  .pgh-de button { min-height: 44px; }
  .pgh-de__ctl-object { display: none; } /* object actions live in the bottom sheet on phones */
  .pgh-de__controls button { flex: 1 1 calc(50% - 6px); }
  .pgh-de__layers-wrap { margin-top: 4px; }
  .pgh-de__layers-wrap .pgh-de__layers { max-height: 50vh; overflow-y: auto; }
  /* Bottom sheet: the selected object's controls dock to the bottom edge while something is selected. */
  .pgh-de[data-has-selection="true"] .pgh-de__side > details:not(.pgh-de__layers-wrap) {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; max-height: 48vh; overflow-y: auto;
    margin: 0; padding: 8px 14px 14px; border-radius: 14px 14px 0 0; background: #fff;
    box-shadow: 0 -6px 18px rgba(0, 0, 0, .18); border-top: 1px solid var(--pgh-de-line);
  }
  .pgh-de[data-has-selection="true"] .pgh-de__side > details:not(.pgh-de__layers-wrap) > summary {
    min-height: 32px; font-size: 13px; color: var(--pgh-de-muted);
  }
  .pgh-de[data-has-selection="true"] .pgh-de__stage { padding-bottom: 46vh; }
  .pgh-de__act { flex: 1 1 calc(33% - 6px); }
}
/* 0.6.0: full workspace, scoped to the guarded editor page. */
body.pgh-de-page { margin:0; padding:0; background:#f7f3ee; color:#2f2f2f; }
body.pgh-de-page .pgh-de {
  --pgh-de-ink:#2f2f2f; --pgh-de-muted:#81796f; --pgh-de-line:#e6ded4; --pgh-de-accent:#7e8760;
  font-family:Inter,Arial,sans-serif; font-size:13px; line-height:1.5; width:100%; max-width:none; margin:0; padding:0;
}
.pgh-de-page .pgh-de h1,.pgh-de-page .pgh-de h2,.pgh-de-page .pgh-de h3,.pgh-de-page .pgh-de p { color:inherit; letter-spacing:normal; }
.pgh-de-page .pgh-de h2 { font:600 14px/1.4 Inter,Arial,sans-serif; margin:0; }
.pgh-de-page .pgh-de button { color:#2f2f2f; text-transform:none; letter-spacing:normal; box-shadow:none; min-height:40px; border-radius:8px; font-size:12px; line-height:1.4; transition:background .15s,border-color .15s; }
.pgh-de-page .pgh-de button:hover:not(:disabled) { background:#f7f3ee; }
.pgh-de-page .pgh-de__header { min-height:94px; display:flex; gap:30px; align-items:center; padding:20px 30px; border-bottom:1px solid var(--pgh-de-line); background:white; }
.pgh-de-page .pgh-de__brand { display:flex; gap:10px; align-items:center; text-decoration:none; color:#2f2f2f; font:600 21px/1.05 Inter,Arial,sans-serif; flex-shrink:0; }
.pgh-de__brand svg { width:42px; height:42px; }
.pgh-de__brand > span > span { display:block; font-weight:400; }
.pgh-de__heading { display:grid; gap:5px; border-left:1px solid var(--pgh-de-line); padding-left:28px; }
.pgh-de__heading small { color:#7e8760; font-size:9px; letter-spacing:1.5px; }
.pgh-de__heading > span { font-size:14px; }
.pgh-de__header-actions { display:flex; align-items:center; gap:12px; margin-left:auto; }
.pgh-de__badge { border:1px solid #d9dfcc; background:#edf0e6; color:#626b4a; border-radius:5px; padding:6px 9px; font-size:9px; letter-spacing:1px; white-space:nowrap; }
.pgh-de-page .pgh-de button.pgh-de__primary { background:#a85f45; border-color:#a85f45; color:white; padding:13px 22px; }
.pgh-de-page .pgh-de button.pgh-de__primary:hover { background:#8f4f39; }
.pgh-de__primary span { padding-left:20px; }
.pgh-de-page .pgh-de__lock { text-align:center; margin:10px 16px 0; font-size:10px; color:#81796f; }
.pgh-de-page .pgh-de__modes { display:flex; width:fit-content; margin:18px auto 28px; background:#eee8df; border:1px solid var(--pgh-de-line); border-radius:12px; padding:4px; gap:4px; }
.pgh-de-page .pgh-de__modes button { border:0; background:transparent; min-width:120px; }
.pgh-de-page .pgh-de__modes button[aria-selected=true] { background:white; color:#2f2f2f; box-shadow:0 1px 4px #5949340a; }
.pgh-de-page .pgh-de__layout { grid-template-columns:230px minmax(0,1fr) 250px; gap:24px; max-width:1600px; margin:0 auto; padding:0 30px; }
.pgh-de-page .pgh-de__tools { padding:22px 18px; background:white; border:1px solid var(--pgh-de-line); border-radius:18px; gap:0; }
.pgh-de-page .pgh-de__tools .pgh-de__intro { font-size:10px; line-height:1.7; color:#81796f; margin:8px 0 18px; }
.pgh-de-page .pgh-de__tools > .pgh-de__tool { display:flex; align-items:center; gap:10px; border:0; border-bottom:1px solid #f0e8df; border-radius:0; padding:15px 0; text-align:left; min-height:64px; background:transparent; font-weight:600; }
.pgh-de__tool > span:first-child { display:grid; place-items:center; color:#a85f45; background:#f7f3ee; width:34px; height:34px; border-radius:9px; font:22px Georgia,serif; flex-shrink:0; }
.pgh-de__tool small { display:block; color:#81796f; font-size:9px; font-weight:400; margin-top:3px; }
.pgh-de-page .pgh-de__bg { order:4; margin-top:16px; font-size:11px; }
.pgh-de-page .pgh-de__colors { padding-top:22px; }
.pgh-de__color-heading { display:flex; justify-content:space-between; align-items:center; gap:5px; }
.pgh-de-page .pgh-de__color-heading h3 { font:600 12px Inter,Arial,sans-serif; margin:0; }
#pgh-de-color-name { color:#81796f; font-size:10px; }
.pgh-de__swatches { display:grid; grid-template-columns:repeat(4,28px); gap:12px; margin:18px 0 12px; }
.pgh-de-page .pgh-de__swatches button { background:var(--swatch); width:28px; min-height:28px; height:28px; border:1px solid #00000012; border-radius:50%; padding:0; }
.pgh-de-page .pgh-de__swatches button:hover:not(:disabled) { background:var(--swatch); transform:scale(1.08); }
.pgh-de-page .pgh-de__swatches button[aria-pressed=true] { outline:1px solid #7e8760; outline-offset:3px; }
.pgh-de-page .pgh-de__sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.pgh-de-page .pgh-de__tools .pgh-de__layers-wrap { border-top:1px solid var(--pgh-de-line); padding-top:10px; margin-top:6px; }
.pgh-de-page .pgh-de__care { color:#81796f; font-size:10px; line-height:1.8; margin:15px 0 0; }
.pgh-de-page .pgh-de__stage-head { display:flex; justify-content:space-between; align-items:center; gap:10px; margin:5px 0 28px; }
.pgh-de-page .pgh-de__stage-head h1 { font:400 27px/1.2 'Libre Baskerville',Georgia,serif; margin:0 0 10px; }
.pgh-de-page .pgh-de__stage-head p { font-size:11px; color:#81796f; margin:0; }
.pgh-de__stage-head > span { padding:4px 8px; border:1px solid var(--pgh-de-line); border-radius:5px; color:#81796f; font-size:9px; white-space:nowrap; }
.pgh-de-page .pgh-de__controls { gap:5px; margin:0 0 24px; }
.pgh-de-page .pgh-de__controls button { padding:5px 8px; min-height:32px; font-size:10px; background:transparent; }
.pgh-de-page .pgh-de__guides { color:#81796f; font-size:10px; }
.pgh-de__paper-labels { display:grid; grid-template-columns:1fr 1fr; text-align:center; color:#81796f; font-size:10px; margin:28px 0 10px; }
.pgh-de-page .pgh-de__canvas-wrap { border-radius:0; border:1px solid #d3c6b7; box-shadow:0 8px 28px #59493408; }
.pgh-de-page .pgh-de__stage-bottom { display:flex; align-items:center; justify-content:space-between; gap:10px; border-bottom:1px solid var(--pgh-de-line); padding:22px 0; margin:0 0 20px; }
#pgh-de-save-status { font-size:10px; color:#7e8760; }
.pgh-de-page .pgh-de__stage-bottom button { border:0; background:transparent; color:#a85f45; font-size:11px; white-space:nowrap; }
.pgh-de-page .pgh-de__stage > .pgh-de__note { font-size:10px; color:#81796f; line-height:1.7; }
.pgh-de-page .pgh-de__side > details { position:relative; border-radius:18px; padding:22px 18px; }
.pgh-de-page .pgh-de__side summary { list-style:none; font:600 13px Inter,Arial,sans-serif; }
.pgh-de-page .pgh-de__side summary::-webkit-details-marker { display:none; }
.pgh-de-page .pgh-de__props { margin-top:20px; gap:14px; }
.pgh-de-page .pgh-de__props p { font-size:11px; color:#81796f; margin:0; }
.pgh-de-page .pgh-de__field { gap:7px; font-size:11px; }
.pgh-de-page .pgh-de__field input:not([type=checkbox]):not([type=range]),.pgh-de-page .pgh-de__field select,.pgh-de-page .pgh-de__field textarea { border:1px solid #e1d5c8; border-radius:8px; background:white; padding:10px; width:100%; font-size:13px; color:#2f2f2f; }
.pgh-de-page .pgh-de__field input[type=color] { height:42px; }
.pgh-de-page .pgh-de__actionrow { gap:5px; }
.pgh-de-page .pgh-de__act { font-size:10px; min-height:32px; padding:6px 8px; }
.pgh-de-page .pgh-de__advanced { order:10; }
.pgh-de-page .pgh-de__faces { margin:10px 0; }
.pgh-de-page .pgh-de__faces button[aria-pressed=true] { background:#edf0e6; color:#626b4a; border-color:#b9c1a7; }
.pgh-de-page .pgh-de__review { background:white; padding:20px; border-radius:16px; }
.pgh-de-page .pgh-de__footer { display:flex; justify-content:space-between; gap:20px; max-width:1600px; padding:35px 30px 25px; margin:auto; color:#81796f; font-size:9px; }
.pgh-de-page .pgh-de__mobile-color,.pgh-de-page .pgh-de__sheet-close { display:none; }
@media (max-width:1190px) and (min-width:768px) {
  .pgh-de-page .pgh-de__layout { grid-template-columns:200px minmax(0,1fr) 210px; padding:0 20px; gap:16px; }
  .pgh-de-page .pgh-de__tools { order:0; grid-column:auto; flex-direction:column; flex-wrap:nowrap; }
  .pgh-de-page .pgh-de__tools > * { flex:none; }
  .pgh-de__heading { display:none; }
  .pgh-de-page .pgh-de__stage-head h1 { font-size:23px; }
  .pgh-de__stage-head > span { display:none; }
  .pgh-de-page .pgh-de__stage-bottom { flex-wrap:wrap; }
}
@media (max-width:767px) {
  .pgh-de-page .pgh-de { padding-bottom:116px; }
  .pgh-de-page .pgh-de__header { min-height:76px; padding:16px 20px; gap:12px; }
  .pgh-de-page .pgh-de__brand { font-size:17px; gap:7px; }
  .pgh-de__brand svg { width:32px; height:36px; }
  .pgh-de__heading { display:none; }
  .pgh-de__header-actions > button { display:none; }
  .pgh-de__header-actions { gap:0; }
  .pgh-de__badge { font-size:8px; }
  .pgh-de-page .pgh-de__lock { font-size:8px; }
  .pgh-de-page .pgh-de__modes { width:calc(100% - 32px); margin:16px auto 24px; }
  .pgh-de-page .pgh-de__modes button { min-width:0; flex:1; font-size:10px; padding:8px 5px; min-height:44px; }
  .pgh-de-page .pgh-de__layout { display:flex; flex-direction:column; padding:0 16px; gap:18px; }
  .pgh-de-page .pgh-de__stage,.pgh-de-page .pgh-de__side { width:100%; }
  .pgh-de-page .pgh-de__stage-head { margin:0 0 18px; }
  .pgh-de-page .pgh-de__stage-head h1 { font-size:25px; }
  .pgh-de-page .pgh-de__stage-head p { font-size:10px; }
  .pgh-de__stage-head > span { display:none; }
  .pgh-de-page .pgh-de__controls { gap:4px; margin-bottom:12px; }
  .pgh-de-page .pgh-de__controls button { flex:0 1 auto; min-height:36px; font-size:10px; }
  .pgh-de-page .pgh-de__guides { margin-left:auto; width:auto; }
  .pgh-de__paper-labels { margin-top:16px; font-size:9px; }
  .pgh-de-page .pgh-de__stage-bottom { padding:15px 0; flex-wrap:wrap; margin-bottom:12px; }
  #pgh-de-save-status { font-size:9px; }
  .pgh-de-page .pgh-de__tools { left:0; right:0; bottom:0; padding:9px 12px calc(9px + env(safe-area-inset-bottom)); border-radius:0; display:flex; flex-direction:row; align-items:stretch; gap:4px; border:0; border-top:1px solid var(--pgh-de-line); }
  .pgh-de-page .pgh-de__tools > h2,.pgh-de-page .pgh-de__tools > p,.pgh-de-page .pgh-de__tools > details { display:none; }
  .pgh-de-page .pgh-de__tools > .pgh-de__tool { flex:1; flex-direction:column; justify-content:center; gap:5px; width:auto; min-height:64px; font-size:9px; text-align:center; border:0; padding:0 2px; }
  .pgh-de__tool > span:first-child { width:24px; height:24px; background:transparent; font-size:23px; }
  .pgh-de__tool small { display:none; }
  .pgh-de-page .pgh-de__mobile-color { display:block; flex:1; font-size:10px; border:0; background:transparent; min-width:0; padding:4px; }
  .pgh-de-page .pgh-de__tools > .pgh-de__colors { display:none; position:fixed; bottom:88px; left:10px; right:10px; max-height:55vh; overflow:auto; border:1px solid var(--pgh-de-line); background:white; border-radius:18px; padding:24px; box-shadow:0 -5px 30px #59493418; }
  .pgh-de-page .pgh-de[data-color-open=true] .pgh-de__colors { display:block; }
  .pgh-de-page .pgh-de__colors .pgh-de__swatches { grid-template-columns:repeat(4,40px); gap:18px; }
  .pgh-de-page .pgh-de__swatches button { width:40px; min-height:40px; height:40px; }
  .pgh-de-page .pgh-de__sheet-close { display:block; min-height:36px; width:36px; padding:2px; font-size:22px; border:0; background:transparent; }
  .pgh-de-page .pgh-de__side > details > .pgh-de__sheet-close { position:absolute; top:10px; right:12px; }
  .pgh-de-page .pgh-de__side { order:3; }
  .pgh-de-page .pgh-de[data-has-selection=true] .pgh-de__side > details:not(.pgh-de__layers-wrap) { bottom:88px; max-height:47vh; border-radius:18px 18px 0 0; padding:18px; z-index:35; }
  .pgh-de-page .pgh-de[data-has-selection=true] .pgh-de__stage { padding-bottom:25vh; }
  .pgh-de-page .pgh-de__tools > .pgh-de__illus { bottom:88px; left:10px; right:10px; border:1px solid var(--pgh-de-line); border-radius:16px; padding:16px; }
  .pgh-de-page .pgh-de__footer { padding:20px 16px; font-size:8px; }
  .pgh-de__footer > span:last-child { display:none; }
}

/* 0.7.0 product entry and customer-facing approval. */
.pgh-de-page .pgh-de__product-back { color:#81796f; font-size:11px; text-decoration:none; white-space:nowrap; }
.pgh-de-page .pgh-de__heading { display:none; }
.pgh-de__product-entry { display:none; }
.pgh-de[data-screen=product] .pgh-de__workspace,.pgh-de[data-screen=product] .pgh-de__header-actions > button,.pgh-de[data-screen=product] .pgh-de__product-back { display:none; }
.pgh-de-page .pgh-de[data-screen=product] .pgh-de__product-entry { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:64px; align-items:center; max-width:1120px; margin:40px auto 64px; padding:0 24px; }
.pgh-de-page .pgh-de__cover { display:block; border-radius:20px; overflow:hidden; box-shadow:0 12px 40px #5949340a; }
.pgh-de-page .pgh-de__cover img { display:block; width:100%; height:auto; }
.pgh-de-page .pgh-de__product-entry h1 { font:400 38px/1.2 'Libre Baskerville',Georgia,serif; margin:14px 0 24px; }
.pgh-de-page .pgh-de__product-entry p { line-height:1.9; color:#81796f; margin-bottom:20px; }
.pgh-de-page .pgh-de__start { display:inline-block; color:white; background:#a85f45; padding:14px 26px; border-radius:8px; text-decoration:none; margin:10px 0 18px; font-weight:600; }
.pgh-de-page .pgh-de__eyebrow { font-size:10px; letter-spacing:1.5px; color:#7e8760; }
.pgh-de-page .pgh-de__product-info { max-width:1220px; margin:48px auto 0; padding:36px 30px; border-top:1px solid var(--pgh-de-line); display:grid; grid-template-columns:1.4fr 1fr; gap:40px 64px; }
.pgh-de-page .pgh-de__product-info h2 { font:400 23px/1.45 'Libre Baskerville',Georgia,serif; margin:0 0 20px; }
.pgh-de-page .pgh-de__product-info p { font-size:13px; line-height:1.9; color:#6e675e; }
.pgh-de-page .pgh-de__product-info a { color:#a85f45; }
.pgh-de-page .pgh-de__product-info dl { margin:0; font-size:12px; }
.pgh-de-page .pgh-de__product-info dt { font-weight:600; margin-top:16px; }
.pgh-de-page .pgh-de__product-info dd { margin:3px 0 0; color:#81796f; line-height:1.8; }
.pgh-de-page .pgh-de__faq { grid-column:1/-1; }
.pgh-de-page .pgh-de__faq details { border-top:1px solid var(--pgh-de-line); padding:16px 0; }
.pgh-de-page .pgh-de__faq summary { cursor:pointer; font-weight:600; }
.pgh-de-page .pgh-de__bg { border:0; border-top:1px solid var(--pgh-de-line); border-radius:0; padding:18px 0 0; margin-top:22px; }
.pgh-de-page .pgh-de__bg legend { font-weight:600; font-size:12px; padding:0; }
.pgh-de-page .pgh-de__bg label { color:#81796f; font-size:10px; }
.pgh-de-page .pgh-de__bg input[type=color] { width:100%; height:38px; padding:3px; border:1px solid var(--pgh-de-line); border-radius:5px; background:white; }
.pgh-de-page .pgh-de__bg p { font-size:10px; line-height:1.8; color:#81796f; }
.pgh-de-page .pgh-de[data-mode=review] .pgh-de__layout { grid-template-columns:minmax(0,1fr); max-width:1120px; }
.pgh-de-page .pgh-de[data-mode=review] .pgh-de__tools,.pgh-de-page .pgh-de[data-mode=review] .pgh-de__side,.pgh-de-page .pgh-de[data-mode=review] .pgh-de__stage > .pgh-de__note { display:none; }
.pgh-de-page .pgh-de__review { padding:28px; }
.pgh-de-page .pgh-de__review h2 { font:400 25px 'Libre Baskerville',Georgia,serif; }
.pgh-de-page .pgh-de__review > p { color:#81796f; font-size:12px; line-height:1.8; }
.pgh-de__review-mugs { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin:20px 0 24px; }
.pgh-de__review-mugs figure { margin:0; min-width:0; text-align:center; background:#f7f3ee; border-radius:16px; padding:12px 12px 20px; }
.pgh-de__review-mugs canvas { display:block; max-width:100%; margin:auto; }
.pgh-de__review-mugs figcaption { font-size:12px; color:#81796f; }
.pgh-de-page .pgh-de__approve { padding:18px 0; border-top:1px solid var(--pgh-de-line); font-size:13px; line-height:1.8; align-items:center; }
.pgh-de__approve input { width:20px; height:20px; flex-shrink:0; accent-color:#7e8760; }
.pgh-de__quantity { display:flex; flex-direction:column; gap:8px; font-size:12px; font-weight:600; max-width:180px; margin:10px 0; }
.pgh-de-page #pgh-de-quantity { border:1px solid #d3c6b7; border-radius:8px; background:white; min-height:46px; padding:10px 14px; font:16px Inter,Arial,sans-serif; }
.pgh-de-page #pgh-de-cart { min-height:48px; margin:12px 0 4px; }
.pgh-de-page .pgh-de__edit-again { margin-top:22px; display:block; border:0; color:#a85f45; }
.pgh-de-page #pgh-de-cart-result { padding:10px 0; font-size:14px; color:#626b4a; }
@media(max-width:767px) {
  .pgh-de-page .pgh-de__product-back { font-size:9px; white-space:normal; max-width:60px; margin-left:auto; }
  .pgh-de__header-actions { margin-left:0; }
  .pgh-de-page .pgh-de[data-screen=product] .pgh-de__product-entry { grid-template-columns:1fr; gap:24px; padding:0 20px; margin:24px auto 32px; }
  .pgh-de-page .pgh-de__product-entry h1 { font-size:29px; }
  .pgh-de-page .pgh-de__product-info { grid-template-columns:1fr; gap:28px; margin-top:26px; padding:28px 20px; }
  .pgh-de-page .pgh-de__product-info h2 { font-size:22px; }
  .pgh-de-page .pgh-de__product-info p { font-size:12px; }
  .pgh-de-page .pgh-de__colors .pgh-de__bg { display:flex; }
  .pgh-de-page .pgh-de[data-mode=review],.pgh-de-page .pgh-de[data-screen=product] { padding-bottom:0; }
  .pgh-de-page .pgh-de__review { padding:18px 12px; }
  .pgh-de__review-mugs { gap:10px; }
  .pgh-de__review-mugs figure { padding:5px 3px 14px; border-radius:10px; }
  .pgh-de__review-mugs figcaption { font-size:10px; }
  .pgh-de-page .pgh-de__approve { font-size:12px; align-items:flex-start; }
  .pgh-de-page #pgh-de-cart { width:100%; }
}


/* Photo state stays visible during local preview and secure original upload. */
.pgh-de__photo-status{font-size:13px;line-height:1.5;margin:8px 0;color:#526344}.pgh-de__photo-status:empty{display:none}.pgh-de__photo-status[data-state="error"]{color:#9b3b35}#pgh-de-photo-progress{width:100%;height:8px;accent-color:#7e8760}#pgh-de-photo-progress[hidden]{display:none}

/* 0.9.0: readable toolbar controls, preserving existing actions/history and wrapping. */
.pgh-de-page .pgh-de__controls button{background:#fff;border:1px solid #d4c8b9;color:#3d362d;min-height:36px;padding:7px 10px;box-shadow:0 1px 2px #5949340a;transition:background .12s,border-color .12s,box-shadow .12s;}
.pgh-de-page .pgh-de__controls button:hover:not(:disabled){background:#fcfaf6;border-color:#94a073;box-shadow:0 2px 5px #59493412;}
.pgh-de-page .pgh-de__controls button:active:not(:disabled){background:#e7ded2;border-color:#7e8760;box-shadow:inset 0 1px 2px #59493420;}
.pgh-de-page .pgh-de__controls button:disabled{background:#f0ece6;border-color:#e1d9cf;color:#9c948b;opacity:1;box-shadow:none;cursor:not-allowed;}
.pgh-de-page .pgh-de__controls button:focus-visible{outline:3px solid #68784a;outline-offset:3px;background:#fff;}
@media(max-width:600px){.pgh-de-page .pgh-de__controls button{min-height:40px;padding:8px 10px}.pgh-de__paper-labels{font-size:9px;gap:8px;}}
@media(prefers-reduced-motion:reduce){.pgh-de-page .pgh-de__controls button{transition:none}}
