#print-preview {
  --pp-accent: #02a5d3;
  --pp-navy: #103653;
  --pp-muted: #3f5d73;
  --pp-line: #c5dce9;
  --pp-pale: #edf7fc;
  min-width: 0;
  color: var(--pp-navy);
}

#print-preview [hidden] { display: none !important; }
#print-preview button:focus-visible { outline: 2px solid #126c98; outline-offset: 3px; }

.pp-heading, .pp-toolbar, .pp-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pp-heading { justify-content: space-between; margin-bottom: 10px; }
.pp-title { margin: 0; font-size: 16px; font-weight: 800; }
.pp-dimensions { margin: 0; font-size: 13px; color: var(--pp-muted); font-variant-numeric: tabular-nums; }
.pp-toolbar { margin-bottom: 10px; }
.pp-toolbar:not(:has(> :not([hidden]))) { display: none; }
.pp-toggle { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 8px; background: var(--pp-pale); }
.pp-toggle button, .pp-upload button {
  min-height: 36px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}
.pp-toggle button[aria-pressed="true"] { background: var(--pp-navy); color: #fff; }
.pp-toggle button[aria-pressed="false"]:hover { background: #d7eef9; }

.pp-stage {
  --pp-max-height: clamp(126px, 34vw, 218px);
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: calc(var(--pp-max-height) + 38px);
  overflow: hidden;
  padding: 19px clamp(12px, 3vw, 26px);
  border: 1px solid var(--pp-line);
  border-radius: 9px;
  background-color: var(--pp-pale);
  background-image: radial-gradient(circle at center, #91bccf 0.7px, transparent 1.2px);
  background-size: 13px 13px;
  box-sizing: border-box;
}
.pp-stage[data-sides="2"] { perspective: 900px; }

.pp-graphic {
  --pp-ratio: 1;
  position: relative;
  width: min(100%, calc(var(--pp-ratio) * var(--pp-max-height)));
  aspect-ratio: var(--pp-ratio);
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 8px 21px #12365331, 0 1px 3px #10365327;
}
.pp-stage[data-sides="2"] .pp-graphic { backface-visibility: hidden; cursor: pointer; }
.pp-design { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; container-type: size; }
.pp-image, .pp-sample { position: absolute; inset: 0; width: 100%; height: 100%; }
.pp-image { display: block; object-fit: contain; }
.pp-sample {
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  padding: 6%;
  background: linear-gradient(137deg, #e9f8fc 13%, #caeaf8 92%);
}
.pp-sample::before, .pp-sample::after { position: absolute; z-index: -1; content: ""; }
.pp-sample::before {
  right: -19%;
  bottom: -52%;
  width: 79%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #8bdcf2;
}
.pp-sample::after {
  top: -73%;
  left: -34%;
  width: 61%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: clamp(10px, 10cqmin, 42px) solid var(--pp-accent);
}
.pp-stage[data-face="back"] .pp-sample { background: linear-gradient(137deg, #eff4ff 13%, #d0dff5 92%); }
.pp-stage[data-face="back"] .pp-sample::before { background: #adcaed; }
.pp-sample-title {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  color: #082743;
  font-size: clamp(9px, 17cqmin, 43px);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.pp-stage[data-folds="1"] .pp-graphic {
  box-shadow: 2px 2px #dbedf6, 3px 3px #7a9bad, 0 8px 21px #12365331;
}
.pp-stage[data-folds="2"] .pp-graphic {
  box-shadow: 2px 2px #dbedf6, 3px 3px #7a9bad, 5px 5px #dbedf6, 6px 6px #7a9bad, 0 8px 21px #12365331;
}
.pp-stage[data-type="poster"] .pp-graphic { outline: 1px solid #64869a6b; }
.pp-stage[data-type="panel"] .pp-graphic {
  box-shadow: 3px 3px #c5d0d6, 5px 5px #91a1ae, 5px 10px 22px #12365347;
}
.pp-stage[data-type="banner"] {
  background-color: #d5ddd9;
  background-image: linear-gradient(90deg, #ffffff2c 1px, transparent 1px),
    linear-gradient(#9cabb23d 1px, transparent 1px),
    linear-gradient(145deg, #e8e7df, #b5cdd2);
  background-size: 74px 34px, 100% 34px, cover;
}
.pp-stage[data-type="banner"] .pp-graphic {
  border: 6px solid #f4f7f7;
  border-radius: 1px;
  outline: 1px solid #718c99;
  box-shadow: 0 4px 4px #153d4930, 0 22px 32px #1236534d;
}
.pp-stage[data-type="banner"] .pp-graphic::after {
  position: absolute;
  z-index: 3;
  inset: 0;
  border: 1px solid #ffffff88;
  box-shadow: inset 0 0 0 3px #132f4d12;
  pointer-events: none;
  content: "";
}
.pp-stage[data-type="bag"] {
  --pp-max-height: clamp(118px, 30vw, 193px);
  --pp-bag-print-margin: 14% 15%;
  --pp-bag-side: #bd8954;
  --pp-bag-face: #e4bc85;
  --pp-bag-edge: #94613e;
  --pp-bag-handle: #9a6438;
  --pp-bag-ink: #56331c;
  min-height: calc(var(--pp-max-height) + 62px);
  padding-block-start: 43px;
}
.pp-stage[data-type="bag"][data-bag-tone="white"] {
  --pp-bag-side: #d2dadd;
  --pp-bag-face: #fcfdfe;
  --pp-bag-edge: #a9b7bf;
  --pp-bag-handle: #a5b4bd;
  --pp-bag-ink: #385064;
}
.pp-stage[data-type="bag"] .pp-graphic {
  border-radius: 1px 1px 5px 5px;
  background: linear-gradient(101deg, var(--pp-bag-side), var(--pp-bag-face) 18% 75%, var(--pp-bag-side));
  box-shadow: 3px 4px var(--pp-bag-edge), 4px 10px 17px #24344043;
}
.pp-stage[data-type="bag"] .pp-graphic::before {
  position: absolute;
  bottom: calc(100% - 1px);
  left: 30%;
  width: 40%;
  height: clamp(14px, 5vw, 29px);
  border: 3px solid var(--pp-bag-handle);
  border-bottom: 0;
  border-radius: 45% 45% 0 0;
  box-shadow: 0 -1px 0 var(--pp-bag-edge);
  box-sizing: border-box;
  content: "";
}
.pp-stage[data-type="bag"] :is(.pp-image, .pp-sample, .pp-edge-guide) {
  inset: var(--pp-bag-print-margin);
  width: auto;
  height: auto;
}
.pp-stage[data-type="bag"] .pp-image { width: 70%; height: 72%; }
.pp-stage[data-type="bag"] .pp-sample {
  border: 1px dashed var(--pp-bag-edge);
  border-radius: 4px;
  background: #fff3;
}
.pp-stage[data-type="bag"] .pp-sample::before, .pp-stage[data-type="bag"] .pp-sample::after { display: none; }
.pp-stage[data-type="bag"] .pp-sample-title { color: var(--pp-bag-ink); font-size: clamp(10px, 11cqmin, 26px); }
.pp-edge-markers { position: absolute; z-index: 2; inset: clamp(3px, 5cqmin, 12px); pointer-events: none; }
.pp-edge-markers span {
  position: absolute;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
.pp-eyelets span {
  width: clamp(4px, 5cqmin, 12px);
  border: clamp(1px, 1cqmin, 2px) solid #849aa5;
  background: #1c384a;
  box-shadow: 0 0 0 1px #f3f9fd;
}
.pp-standoffs { inset: clamp(5px, 8cqmin, 17px); }
.pp-standoffs span {
  width: clamp(5px, 7cqmin, 15px);
  border: 1px solid #778d9b;
  background: linear-gradient(145deg, #fff 13%, #dce7ed 36%, #94a8b5 68%, #e6eef2);
  box-shadow: 0 1px 2px #10365372;
}
.pp-edge-guide {
  position: absolute;
  z-index: 1;
  inset: 1px;
  border: 1px dashed #083d55;
  outline: 1px solid #fff;
  pointer-events: none;
}
.pp-stage[data-type="lightbox"] {
  background-color: #d9e7f0;
  background-image: repeating-linear-gradient(0deg, transparent 0 25px, #34607c25 26px 27px);
}
.pp-stage[data-type="lightbox"] .pp-graphic { border-radius: 2px; outline: 4px solid #34566d; }
.pp-stage[data-type="lightbox"][data-light="night"] {
  background-color: #092538;
  background-image: repeating-linear-gradient(0deg, transparent 0 25px, #d9f5ff20 26px 27px);
}
.pp-stage[data-type="lightbox"][data-light="night"] .pp-graphic {
  outline-color: #6edcfa;
  box-shadow: 0 0 12px #bff1ff, 0 0 42px #3acaefaf;
}
.pp-stage[data-type="lightbox"][data-light="night"] .pp-design { filter: brightness(1.16); }
.pp-stage[data-finish="foil"] .pp-sample-title { color: #815011; }
.pp-stage[data-finish="foil"] .pp-graphic { outline: 1px solid #bc8a36; }
.pp-stage[data-finish="lamination"] { --pp-sheen: #fff7; }
.pp-stage:is([data-finish="gloss"], [data-finish="lamination"]) .pp-design::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, transparent 29%, var(--pp-sheen, #fffb) 44%, transparent 57%);
  pointer-events: none;
  content: "";
}
.pp-stage[data-finish="matte"] .pp-design { filter: saturate(.86); }

.pp-upload { margin-top: 11px; }
.pp-upload .pp-upload-button { border-color: #87b7cc; background: var(--pp-pale); }
.pp-upload .pp-upload-button:hover { background: #d7eef9; }
.pp-upload :is(.pp-remove-button, .pp-guide-button) { border-color: var(--pp-line); }
.pp-upload :is(.pp-remove-button, .pp-guide-button):hover { background: var(--pp-pale); }
.pp-upload .pp-guide-button[aria-pressed="true"] { background: var(--pp-navy); color: #fff; }
.pp-file-name { flex: 1 1 110px; min-width: 0; color: var(--pp-navy); font-size: 13px; overflow-wrap: anywhere; }
.pp-help, .pp-eyelet-note, .pp-standoff-note, .pp-bag-note, .pp-status { margin: 0; color: var(--pp-muted); font-size: 12px; }
.pp-help, .pp-eyelet-note, .pp-standoff-note, .pp-bag-note, .pp-status:not(:empty) { margin-top: 6px; }
.pp-status { color: var(--pp-navy); font-weight: 700; }
