/* Product personalization setup. Kept separate from the storefront editor. */
.pw-shell,
.pw-modal {
  --pw-ink: #141511;
  --pw-paper: #f6f4ef;
  --pw-blue: #244cfc;
  --pw-line: #d7d7cf;
  --pw-muted: #65675f;
  color: var(--pw-ink);
  font:
    14px/1.5 Inter,
    Arial,
    sans-serif;
}
.pw-shell {
  width: 100%;
  max-width: 1400px;
  min-width: 0;
  margin-inline: auto;
  scroll-margin-top: 16px;
}
.pw-shell:has(#pw-save-draft) {
  padding-bottom: 120px;
}
.admin-main:has(.pw-shell) {
  min-width: 0;
}
.admin-main:has(#pw-save-draft) > .admin-header {
  margin-bottom: 22px;
}
.admin-main:has(#pw-save-draft) > .admin-header h1 {
  font-size: 22px;
}
.admin-main:has(#pw-save-draft) > .admin-header .eyebrow {
  display: none;
}
.pw-shell *,
.pw-modal * {
  box-sizing: border-box;
}
.pw-shell [hidden],
.pw-modal [hidden] {
  display: none !important;
}
.pw-shell h2,
.pw-shell h3,
.pw-modal h2,
.pw-modal h3 {
  margin: 0;
  color: var(--pw-ink);
  font-family: Inter, Arial, sans-serif;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.pw-shell h2,
.pw-modal h2 {
  font-size: clamp(24px, 2.4vw, 32px);
}
.pw-shell h3,
.pw-modal h3 {
  font-size: 20px;
}
.pw-shell p {
  margin: 0 0 12px;
}
.pw-shell button,
.pw-shell input,
.pw-shell select,
.pw-shell textarea,
.pw-modal button,
.pw-modal input {
  font: inherit;
}
.pw-shell button,
.pw-modal button {
  cursor: pointer;
}
.pw-shell button:disabled,
.pw-modal button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.pw-shell :is(button, a, input, select, textarea):focus-visible,
.pw-modal :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid var(--pw-blue);
  outline-offset: 3px;
}
.pw-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 23px;
}
.pw-header > div {
  min-width: 0;
}
.pw-header h2 {
  margin: 4px 0 9px;
}
.pw-header p {
  max-width: 65ch;
  color: var(--pw-muted);
  margin: 0;
}
.pw-header small {
  color: var(--pw-muted);
}
.pw-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--pw-line);
  border-radius: 4px;
  color: var(--pw-muted);
  font-size: 12px;
  font-weight: 550;
  line-height: 1.4;
}
.pw-status.is-saved,
.pw-status.is-complete {
  color: var(--pw-ink);
  background: #eeece6;
}
.pw-status.is-saving {
  border-color: #244cfc55;
  color: var(--pw-blue);
}
.pw-status.is-saving::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 2px solid #244cfc33;
  border-top-color: var(--pw-blue);
  border-radius: 50%;
  animation: pw-spin 0.8s linear infinite;
}
.pw-progress {
  height: 3px;
  overflow: hidden;
  background: #e3e2db;
  border: 0;
  border-radius: 0;
  margin: 0 0 24px;
  accent-color: var(--pw-blue);
}
.pw-progress > span,
.pw-progress > div {
  display: block;
  height: 100%;
  background: var(--pw-blue);
  transition: width 0.35s cubic-bezier(0.22, 0.8, 0.2, 1);
}
progress.pw-progress {
  display: block;
  width: 100%;
}
progress.pw-progress::-webkit-progress-bar {
  background: #e3e2db;
}
progress.pw-progress::-webkit-progress-value {
  background: var(--pw-blue);
  transition: width 0.35s;
}
progress.pw-progress::-moz-progress-bar {
  background: var(--pw-blue);
}
.pw-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.pw-steps > li {
  min-width: 0;
}
.pw-steps button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--pw-muted);
  font-size: 13px;
  font-weight: 570;
  text-align: left;
  line-height: 1.25;
  transition:
    color 0.18s,
    background 0.18s,
    border-color 0.18s;
}
.pw-steps button:hover {
  background: #eeece6;
  color: var(--pw-ink);
}
.pw-steps button.is-current,
.pw-steps button[aria-current="step"] {
  color: var(--pw-blue);
  border-color: #244cfc33;
  background: #244cfc08;
  font-weight: 700;
}
.pw-step-number,
.pw-steps button > b,
.pw-steps button > span:first-child:not(.pw-step-label) {
  display: inline-grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid #c9cac2;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 650;
  background: var(--pw-paper);
}
.pw-steps button.is-current :is(.pw-step-number, b),
.pw-steps button[aria-current="step"] :is(.pw-step-number, b),
.pw-steps button.is-current > .pw-step-number:first-child,
.pw-steps button[aria-current="step"] > .pw-step-number:first-child {
  border-color: var(--pw-blue);
  background: var(--pw-blue);
  color: white;
}
.pw-steps button.is-complete {
  color: var(--pw-ink);
}
.pw-steps button.is-complete :is(.pw-step-number, b) {
  border-color: var(--pw-ink);
}
.pw-step-label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.pw-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.95fr);
  gap: 30px;
  align-items: start;
}
.pw-preview {
  position: sticky;
  top: 20px;
  min-width: 0;
}
.pw-preview > h3 {
  margin-bottom: 12px;
}
.pw-preview-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #e8e6df;
  border: 1px solid var(--pw-line);
  border-radius: 4px;
  isolation: isolate;
}
.pw-preview-stage .pw-canvas,
.pw-preview-stage > canvas,
.pw-preview-stage > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pw-preview-stage .pw-zone-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  touch-action: none;
}
.pw-zone-overlay polygon,
.pw-zone-overlay rect {
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}
.pw-zone-overlay .is-active {
  stroke: var(--pw-blue);
  fill: #244cfc20;
}
.pw-zone-overlay .is-pending {
  stroke-dasharray: 6 5;
}
.pw-zone-handle {
  cursor: grab;
  touch-action: none;
  stroke: white;
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
  fill: var(--pw-blue);
  filter: drop-shadow(0 1px 3px #14151135);
}
.pw-zone-handle:active {
  cursor: grabbing;
}
.pw-zone-handle.is-active,
.pw-zone-handle.is-pending {
  animation: pw-corner-pulse 1.4s ease-in-out infinite;
}
.pw-zone-overlay text {
  font:
    700 16px Inter,
    Arial,
    sans-serif;
  pointer-events: none;
  paint-order: stroke;
  stroke: white;
  stroke-width: 3px;
  fill: var(--pw-blue);
}
.pw-preview-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.pw-preview-actions button {
  flex: 1 1 auto;
  min-height: 40px;
}
.pw-preview > .pw-note {
  margin-top: 12px;
}
.pw-preview-caption {
  margin-top: 10px;
  color: var(--pw-muted);
  font-size: 12px;
}
.pw-price {
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.04em;
}
.pw-price small {
  font-weight: 450;
  font-size: 12px;
  letter-spacing: 0;
  color: var(--pw-muted);
}
.pw-content {
  min-width: 0;
}
.pw-step-panel {
  min-width: 0;
  animation: pw-step-in 0.25s ease-out both;
}
.pw-step-panel > h3 {
  margin: 0 0 9px;
  font-size: 24px;
}
.pw-step-panel > p {
  color: var(--pw-muted);
  margin-bottom: 20px;
}
.pw-step-panel > :last-child {
  margin-bottom: 0;
}
.pw-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--pw-line);
  border-radius: 4px;
  background: #fffefb;
  margin: 0 0 14px;
}
.pw-card > h3,
.pw-card > h4 {
  margin: 0 0 12px;
  font-size: 17px;
}
.pw-card > p {
  color: var(--pw-muted);
  font-size: 13px;
}
.pw-card .pw-field:last-child {
  margin-bottom: 0;
}
.pw-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--pw-line);
  border-radius: 4px;
  background: #fffefb;
  margin-bottom: 10px;
  cursor: pointer;
  transition:
    border-color 0.18s,
    background 0.18s;
}
.pw-choice:hover {
  border-color: #244cfc66;
}
.pw-choice:has(input:checked),
.pw-choice[aria-pressed="true"],
.pw-choice.is-selected {
  border-color: var(--pw-blue);
  background: #244cfc06;
}
.pw-choice > input {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  margin: 2px 0;
  accent-color: var(--pw-blue);
}
.pw-choice strong {
  display: block;
  font-weight: 650;
}
.pw-choice small {
  display: block;
  font-size: 12px;
  color: var(--pw-muted);
  margin-top: 3px;
}
.pw-field {
  display: grid;
  gap: 7px;
  margin: 0 0 16px;
  min-width: 0;
}
.pw-field > span,
.pw-field > label {
  font-size: 13px;
  font-weight: 600;
}
.pw-field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.pw-field select,
.pw-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #b8bab0;
  border-radius: 4px;
  background: #fffefb;
  padding: 10px 12px;
  color: var(--pw-ink);
  box-shadow: none;
  line-height: 1.35;
}
.pw-field input[type="range"] {
  padding: 0 !important;
  min-height: 30px !important;
  accent-color: var(--pw-blue);
}
.pw-field textarea {
  min-height: 80px;
  resize: vertical;
}
.pw-field input::placeholder,
.pw-field textarea::placeholder {
  color: #83857c;
}
.pw-field small,
.pw-field .pw-note {
  margin: 0;
  color: var(--pw-muted);
  font-size: 12px;
  font-weight: 400;
}
.pw-field [aria-invalid="true"] {
  border-color: #b23524 !important;
}
.pw-note {
  color: var(--pw-muted);
  font-size: 12px;
  line-height: 1.55;
}
.pw-palette {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
  margin: 0 0 12px;
}
.pw-swatch {
  display: grid;
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
  place-items: center;
  border: 1px solid #14151133;
  border-radius: 50%;
  background: var(--swatch, #fffefb);
  transition:
    outline-color 0.18s,
    transform 0.18s;
}
.pw-swatch:hover {
  transform: translateY(-2px);
}
.pw-swatch[aria-pressed="true"] {
  outline: 2px solid var(--pw-blue);
  outline-offset: 3px;
}
.pw-swatch[aria-pressed="true"]::after {
  content: "✓";
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  color: var(--pw-blue);
  background: white;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 1px 3px #14151133;
}
.pw-color-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}
.pw-color-input input[type="color"] {
  width: 44px;
  height: 44px;
  padding: 3px;
  border: 1px solid #b8bab0;
  border-radius: 4px;
  background: white;
  cursor: pointer;
}
.pw-color-input input[type="text"] {
  min-width: 100px;
  max-width: 140px;
}
.pw-color-input label {
  font-size: 12px;
}
.pw-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 10px 0;
  cursor: pointer;
  line-height: 1.4;
}
.pw-check input {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--pw-blue);
}
.pw-check small {
  display: block;
  color: var(--pw-muted);
  font-size: 12px;
  margin-top: 3px;
}
.pw-variant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.pw-variant {
  min-width: 0;
  padding: 12px;
  background: #fffefb;
  border: 1px solid var(--pw-line);
  border-radius: 4px;
}
.pw-variant.is-selected {
  border-color: var(--pw-blue);
  box-shadow: inset 0 0 0 1px var(--pw-blue);
}
.pw-variant > strong,
.pw-variant h4 {
  display: block;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.pw-variant > img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 2px;
  margin-bottom: 10px;
  background: #eeece6;
}
.pw-variant .pw-status {
  margin: 0 0 10px;
}
.pw-variant button,
.pw-variant .pw-upload {
  width: 100%;
  margin-top: 8px;
}
.pw-variant .pw-note {
  margin-top: 9px;
}
.pw-upload {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px dashed #244cfc80;
  border-radius: 4px;
  background: #244cfc04;
  color: var(--pw-blue);
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.pw-upload:hover {
  background: #244cfc0a;
  border-color: var(--pw-blue);
}
.pw-upload:focus-within {
  outline: 3px solid var(--pw-blue);
  outline-offset: 3px;
}
.pw-upload input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.pw-upload > label {
  width: 100%;
  cursor: pointer;
}
.pw-zone-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}
.pw-zone-tools button[aria-pressed="true"] {
  color: white;
  background: var(--pw-blue);
  border-color: var(--pw-blue);
}
.pw-zone-tools .pw-note {
  flex-basis: 100%;
}
.pw-shell .pw-primary,
.pw-shell .pw-secondary,
.pw-shell .button,
.pw-modal .pw-primary,
.pw-modal .pw-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--pw-blue);
  border-radius: 4px;
  box-shadow: none;
  color: var(--pw-blue);
  background: transparent;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-align: center;
  text-decoration: none;
  transition:
    background 0.18s,
    border-color 0.18s;
}
.pw-shell .pw-primary,
.pw-shell .button-primary,
.pw-modal .pw-primary {
  background: var(--pw-blue);
  color: white;
}
.pw-shell .pw-primary:hover,
.pw-shell .button-primary:hover,
.pw-modal .pw-primary:hover {
  background: #173cdd;
  border-color: #173cdd;
  transform: none;
}
.pw-shell .pw-secondary:hover,
.pw-shell .button-outline:hover,
.pw-modal .pw-secondary:hover {
  background: #244cfc09;
  transform: none;
}
.pw-shell .pw-text-button {
  border: 0;
  padding: 9px 0;
  background: transparent;
  color: var(--pw-blue);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pw-shell button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.pw-footer {
  position: fixed;
  bottom: 0;
  left: 278px;
  right: 40px;
  max-width: 1400px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0 auto;
  padding: 16px 0 max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--pw-line);
  background: var(--pw-paper);
  box-shadow: 0 -12px 22px var(--pw-paper);
}
.pw-footer > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.pw-footer .pw-status {
  border: 0;
  padding-inline: 0;
}
.pw-footer .pw-primary {
  min-width: 130px;
}
.pw-footer .pw-note {
  margin: 0;
}
.pw-inline-error,
.pw-success,
.pw-banner {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 4px;
  border: 1px solid var(--pw-line);
  font-size: 13px;
  line-height: 1.5;
}
.pw-inline-error {
  color: #842f22;
  border-color: #bc756a;
  background: #fff6f2;
}
.pw-inline-error:empty,
.pw-success:empty {
  display: none;
}
.pw-success {
  color: #28523b;
  border-color: #a9bbad;
  background: #f0f5ed;
}
.pw-banner {
  background: #eeece6;
}
.pw-banner strong {
  display: block;
  margin-bottom: 4px;
}
.pw-banner p:last-child {
  margin-bottom: 0;
}
.pw-todo {
  margin: 12px 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.pw-todo li {
  padding: 12px 14px;
  border: 1px solid var(--pw-line);
  border-radius: 4px;
  background: #fffefb;
}
.pw-todo li button {
  border: 0;
  background: none;
  color: var(--pw-blue);
  font-weight: 650;
  padding: 0;
  text-align: left;
}
.pw-todo li small {
  display: block;
  color: var(--pw-muted);
  margin-top: 3px;
}
.pw-todo li.is-complete {
  background: #eeece6;
}
.pw-review {
  margin: 0 0 18px;
  padding: 0;
}
.pw-review > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--pw-line);
}
.pw-review dt {
  color: var(--pw-muted);
  font-size: 13px;
}
.pw-review dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
}
.pw-modal {
  width: min(740px, calc(100% - 28px));
  max-height: min(800px, calc(100svh - 28px));
  overflow: auto;
  padding: 25px;
  border: 1px solid var(--pw-line);
  border-radius: 6px;
  background: var(--pw-paper);
  box-shadow: 0 16px 70px #14151140;
}
.pw-modal::backdrop {
  background: #14151180;
}
.pw-modal[open] {
  animation: pw-step-in 0.2s ease-out;
}
.pw-modal h2 {
  margin-bottom: 12px;
}
.pw-modal p {
  color: var(--pw-muted);
}
.pw-modal > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.pw-modal > footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.pw-asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.pw-asset-grid button {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--pw-line);
  border-radius: 4px;
  color: var(--pw-ink);
  background: #fffefb;
  font-size: 12px;
  text-align: left;
}
.pw-asset-grid button:hover,
.pw-asset-grid button[aria-pressed="true"] {
  border-color: var(--pw-blue);
  box-shadow: inset 0 0 0 1px var(--pw-blue);
}
.pw-asset-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #eeece6;
}
.pw-asset-grid span {
  overflow-wrap: anywhere;
}
@keyframes pw-step-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes pw-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pw-corner-pulse {
  0%,
  100% {
    stroke-width: 2px;
  }
  50% {
    stroke-width: 6px;
  }
}
@media (min-width: 1500px) {
  .pw-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr);
    gap: 42px;
  }
  .pw-preview {
    top: 26px;
  }
  .pw-content {
    padding-top: 4px;
  }
}
@media (max-width: 1150px) {
  .pw-footer {
    left: 230px;
    right: 25px;
  }
}
@media (max-width: 1100px) {
  .pw-grid {
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) minmax(295px, 1fr);
  }
  .pw-steps button {
    flex-direction: column;
    gap: 5px;
    padding: 8px 4px;
    text-align: center;
    font-size: 12px;
  }
  .pw-card {
    padding: 14px;
  }
}
@media (max-width: 920px) {
  .pw-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .pw-preview {
    position: relative;
    top: auto;
    max-width: 580px;
    width: 100%;
    margin-inline: auto;
  }
  .pw-preview-stage {
    width: min(100%, calc(340px * var(--pw-image-ratio, 1)));
    height: auto;
    max-height: none;
    margin-inline: auto;
    border: 0;
    background: transparent;
    overflow: visible;
  }
  .pw-preview-stage .pw-canvas,
  .pw-preview-stage > canvas,
  .pw-preview-stage > img {
    width: 100%;
    margin-inline: auto;
  }
  .pw-preview-stage .pw-zone-overlay {
    width: 100%;
    left: 0;
    transform: none;
  }
  .pw-content {
    max-width: 680px;
    width: 100%;
    margin-inline: auto;
  }
  .pw-footer {
    margin-top: 0;
  }
}
@media (max-width: 780px) {
  .pw-footer {
    left: 18px;
    right: 18px;
  }
}
@media (max-width: 600px) {
  .admin-main:has(#pw-save-draft) > .admin-header {
    align-items: center;
    margin-bottom: 14px;
  }
  .admin-main:has(#pw-save-draft) > .admin-header h1 {
    font-size: 18px;
  }
  .pw-shell:has(#pw-save-draft) {
    padding-bottom: 124px;
  }
  .pw-header {
    gap: 10px;
    margin-bottom: 16px;
  }
  .pw-header h2 {
    font-size: 25px;
  }
  .pw-header p {
    font-size: 13px;
  }
  .pw-steps {
    gap: 2px;
    margin-bottom: 10px;
  }
  .pw-steps button {
    font-size: 10px;
    min-height: 64px;
    padding: 6px 2px;
    letter-spacing: -0.025em;
  }
  .pw-step-number,
  .pw-steps button > b,
  .pw-steps button > span:first-child:not(.pw-step-label) {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
    font-size: 11px;
  }
  .pw-progress {
    margin-bottom: 16px;
  }
  .pw-grid {
    display: block;
  }
  .pw-content,
  .pw-content :is(input, select, textarea, button, [tabindex]) {
    scroll-margin-top: 305px;
    scroll-margin-bottom: 110px;
  }
  .pw-preview {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px 12px;
    max-width: none;
    margin-bottom: 20px;
    padding: 7px 0 9px;
    border-bottom: 1px solid var(--pw-line);
    background: var(--pw-paper);
    box-shadow: 0 6px 12px #f6f4efeb;
  }
  .pw-preview > h3 {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    font-size: 15px;
  }
  .pw-preview .pw-price {
    grid-column: 2;
    grid-row: 1;
    font-size: 18px;
    text-align: right;
    line-height: 1.15;
  }
  .pw-preview .pw-price small {
    display: block;
    font-size: 9px;
    line-height: 1.4;
  }
  .pw-preview .pw-price br {
    display: none;
  }
  .pw-preview-caption {
    display: none;
  }
  .pw-preview-stage {
    grid-column: 1 / -1;
    grid-row: 2;
    width: min(100%, calc(200px * var(--pw-image-ratio, 1)));
    height: auto;
    max-height: none;
  }
  .pw-preview-stage .pw-canvas,
  .pw-preview-stage > canvas,
  .pw-preview-stage > img {
    width: 100%;
  }
  .pw-preview-stage .pw-zone-overlay {
    width: 100%;
  }
  .pw-preview-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    min-width: 0;
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    margin-top: 0;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }
  .pw-preview-actions:empty {
    display: none;
  }
  .pw-preview-actions button {
    flex: 1 0 auto;
    font-size: 12px !important;
    padding: 8px 10px !important;
    min-height: 34px !important;
    white-space: nowrap;
  }
  .pw-step-panel > h3 {
    font-size: 22px;
  }
  .pw-step-panel > p {
    font-size: 13px;
    margin-bottom: 15px;
  }
  .pw-card {
    padding: 14px;
  }
  .pw-field
    input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
  .pw-field textarea,
  .pw-field select {
    font-size: 16px;
  }
  .pw-variant-grid {
    gap: 8px;
  }
  .pw-variant {
    padding: 9px;
  }
  .pw-variant > strong,
  .pw-variant h4 {
    font-size: 12px;
  }
  .pw-variant .button,
  .pw-variant .pw-upload {
    min-height: 44px;
    padding: 9px 6px;
    font-size: 12px;
  }
  .pw-swatch {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
  .pw-palette {
    gap: 10px;
  }
  .pw-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    left: 0;
    right: 0;
    gap: 7px;
    padding: 10px 14px max(10px, env(safe-area-inset-bottom));
    margin: 0;
  }
  .pw-footer > .pw-status,
  .pw-footer > .pw-note {
    flex-basis: 100%;
    min-height: 20px;
    font-size: 11px;
  }
  .pw-footer > div {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.65fr) minmax(0, 1.1fr);
    gap: 6px;
  }
  .pw-footer .button,
  .pw-footer .pw-primary,
  .pw-footer .pw-secondary {
    min-width: 0;
    min-height: 48px;
    padding: 9px 7px;
    font-size: 12px;
  }
  .pw-footer .pw-primary {
    min-width: 0;
  }
  .pw-footer .pw-status {
    display: block;
    max-width: none;
    min-height: 18px;
    padding-block: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 11px;
  }
  .pw-review > div {
    gap: 10px;
  }
  .pw-review dt,
  .pw-review dd {
    font-size: 12px;
  }
  .pw-modal {
    padding: 18px;
  }
  .pw-modal h2 {
    font-size: 24px;
  }
  .pw-asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}
@media (max-width: 360px) {
  .pw-steps button {
    font-size: 9px;
  }
  .pw-footer {
    padding-inline: 10px;
  }
  .pw-footer .pw-primary,
  .pw-footer .pw-secondary {
    padding-inline: 5px;
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pw-shell *,
  .pw-modal,
  .pw-modal * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .pw-steps,
  .pw-progress,
  .pw-footer,
  .pw-zone-tools,
  .pw-preview-actions {
    display: none !important;
  }
  .pw-grid {
    display: block;
  }
  .pw-preview {
    position: static;
    max-width: 450px;
    margin-inline: auto;
  }
  .pw-step-panel {
    break-inside: avoid;
  }
}
