.printly-editor {
  --pe-ink: #292624;
  --pe-muted: #7d7771;
  --pe-coral: #ed604d;
  --pe-coral-dark: #b94638;
  --pe-paper: #fff;
  --pe-canvas: #eeece8;
  --pe-line: #e3ded8;
  --pe-soft: #f7f5f2;
  background: var(--pe-soft);
  border: 1px solid var(--pe-line);
  border-radius: 20px;
  box-shadow: 0 20px 70px rgba(52, 43, 37, .11);
  clear: both;
  color: var(--pe-ink);
  font-family: "Segoe UI", Arial, sans-serif;
  margin: 54px 0;
  max-width: 1500px;
  overflow: hidden;
  width: 100%;
}

.printly-editor *,
.printly-editor *::before,
.printly-editor *::after { box-sizing: border-box; }

.printly-editor button,
.printly-editor input,
.printly-editor select,
.printly-editor textarea { font: inherit; }

.printly-editor button {
  color: inherit;
  cursor: pointer;
}

.printly-editor button:focus-visible,
.printly-editor input:focus-visible,
.printly-editor select:focus-visible,
.printly-editor textarea:focus-visible {
  outline: 3px solid rgba(237, 96, 77, .28);
  outline-offset: 2px;
}

.printly-editor__header {
  align-items: center;
  background: var(--pe-paper);
  border-bottom: 1px solid var(--pe-line);
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr auto 1fr;
  min-height: 78px;
  padding: 12px 20px;
}

.printly-editor__title p {
  color: var(--pe-coral);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  margin: 0 0 3px;
  text-transform: uppercase;
}

.printly-editor__title h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
}

.printly-editor__status {
  align-items: center;
  color: var(--pe-muted);
  display: flex;
  font-size: 11px;
  gap: 8px;
  justify-content: center;
}

.printly-editor__status span {
  background: #4f9268;
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.printly-editor[data-save-state="saving"] .printly-editor__status span {
  animation: printly-pulse 1s infinite;
  background: #d99a42;
}

.printly-editor[data-save-state="warning"] .printly-editor__status span { background: #d99a42; }
.printly-editor[data-save-state="error"] .printly-editor__status span { background: #ba4239; }

@keyframes printly-pulse { 50% { opacity: .25; } }

.printly-editor__header-actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-start;
}

.printly-editor__header-actions button {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  justify-content: center;
}

.printly-editor__header-actions button,
.printly-editor__stage-toolbar button,
.printly-editor__zoom button,
.printly-editor__tools button,
.printly-editor__layers button {
  background: var(--pe-paper);
  border: 1px solid var(--pe-line);
  border-radius: 9px;
  min-height: 37px;
  padding: 7px 11px;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.printly-editor button:hover {
  border-color: #cfc6be;
  transform: translateY(-1px);
}

.printly-editor__header-actions > button[data-action="save-project"],
.printly-editor__header-actions .printly-editor__primary {
  background: var(--pe-coral);
  border-color: var(--pe-coral);
  color: #fff;
  font-weight: 750;
}

.printly-editor__header-actions .printly-editor__primary {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  justify-content: center;
  white-space: nowrap;
}

.printly-editor__areas {
  align-items: center;
  background: #fbfaf8;
  border-bottom: 1px solid var(--pe-line);
  display: flex;
  gap: 6px;
  min-height: 48px;
  overflow-x: auto;
  padding: 7px 20px;
}

.printly-editor__areas button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--pe-muted);
  min-height: 34px;
  padding: 6px 18px;
  white-space: nowrap;
}

.printly-editor__areas button.is-active {
  border-bottom-color: var(--pe-coral);
  color: var(--pe-ink);
  font-weight: 800;
}

.printly-editor__workspace {
  display: grid;
  grid-template-columns: minmax(285px, 315px) minmax(520px, 1fr) minmax(210px, 245px);
  min-height: 760px;
}

.printly-editor__tools,
.printly-editor__layers {
  background: var(--pe-paper);
  max-height: 820px;
  overflow: auto;
}

.printly-editor__tools { border-inline-end: 1px solid var(--pe-line); }
.printly-editor__layers { border-inline-start: 1px solid var(--pe-line); padding: 20px 15px; }

.printly-editor__tools details { border-bottom: 1px solid #eeeae6; }

.printly-editor__tools summary {
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  list-style: none;
  padding: 16px 18px;
  position: relative;
}

.printly-editor__tools summary::-webkit-details-marker { display: none; }

.printly-editor__tools summary::before {
  color: var(--pe-muted);
  content: "＋";
  font-family: Arial, sans-serif;
  font-size: 14px;
  inset-inline-end: 18px;
  position: absolute;
}

.printly-editor__tools details[open] summary::before { content: "−"; }

.printly-editor__panel {
  display: grid;
  gap: 11px;
  padding: 0 18px 18px;
}

.printly-editor label {
  color: #6a645f;
  display: grid;
  font-size: 10px;
  font-weight: 750;
  gap: 6px;
}

.printly-editor textarea,
.printly-editor input[type="number"],
.printly-editor select {
  background: #fbfaf8;
  border: 1px solid var(--pe-line);
  border-radius: 8px;
  color: var(--pe-ink);
  min-height: 38px;
  padding: 8px 9px;
  width: 100%;
}

.printly-editor textarea {
  min-height: 72px;
  resize: vertical;
  text-align: right;
}

.printly-editor input[type="range"] {
  accent-color: var(--pe-coral);
  min-height: 26px;
  width: 100%;
}

.printly-editor input[type="color"] {
  background: #fff;
  border: 1px solid var(--pe-line);
  border-radius: 8px;
  height: 38px;
  padding: 3px;
  width: 100%;
}

.printly-editor__row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.printly-editor__row--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.printly-editor__row--4 button { min-width: 0; padding-inline: 4px; }

.printly-editor__check {
  align-items: center;
  display: flex !important;
  flex-direction: row;
  font-weight: 600 !important;
  gap: 7px !important;
}

.printly-editor__upload {
  align-items: center;
  border: 1.5px dashed #d4cac1;
  border-radius: 11px;
  cursor: pointer;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  min-height: 92px;
  padding: 12px;
  text-align: center;
}

.printly-editor__upload strong { color: var(--pe-coral-dark); }
.printly-editor__upload span { color: #99908a; font-weight: 400; }
.printly-editor__upload input { display: none; }

.printly-editor__shapes {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(6, 1fr);
}

.printly-editor__shapes button {
  font-size: 19px;
  min-height: 40px;
  padding: 4px;
}

.printly-editor__template-list {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.printly-editor__template {
  min-width: 0;
  padding: 5px !important;
}

.printly-editor__template span {
  background-color: var(--a, #eee);
  background-image: linear-gradient(135deg, var(--a, #eee) 50%, var(--b, #777) 50%);
  background-position: center;
  background-size: cover;
  border-radius: 5px;
  display: block;
  height: 58px;
}

.printly-editor__template b {
  display: block;
  font-size: 9px;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.printly-editor__projects {
  background: var(--pe-soft);
  border-radius: 9px;
  color: var(--pe-muted);
  display: grid;
  font-size: 10px;
  gap: 5px;
  padding: 8px;
}

.printly-editor__projects[hidden] { display: none; }

.printly-editor__projects > div {
  align-items: center;
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr auto;
}

.printly-editor__projects button { font-size: 9px; min-height: 32px; }

.printly-editor__quality {
  background: #f1efeb;
  border-radius: 10px;
  margin: 16px 18px;
  padding: 12px;
}

.printly-editor__quality b,
.printly-editor__quality span { display: block; font-size: 10px; }
.printly-editor__quality span { color: var(--pe-muted); line-height: 1.45; margin-top: 4px; }
.printly-editor__quality.is-good { background: #e6f2e9; color: #37654a; }
.printly-editor__quality.is-medium { background: #fff0d2; color: #805b1a; }
.printly-editor__quality.is-low { background: #fae2df; color: #8f3b34; }

.printly-editor__stage {
  align-items: center;
  background-color: var(--pe-canvas);
  background-image:
    linear-gradient(45deg, #e8e5e1 25%, transparent 25%),
    linear-gradient(-45deg, #e8e5e1 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8e5e1 75%),
    linear-gradient(-45deg, transparent 75%, #e8e5e1 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  display: flex;
  justify-content: center;
  min-width: 0;
  overflow: auto;
  padding: 72px 34px 86px;
  position: relative;
}

.printly-editor__stage-toolbar {
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--pe-line);
  border-radius: 10px;
  box-shadow: 0 5px 18px rgba(43, 37, 32, .08);
  display: flex;
  gap: 3px;
  inset-inline-start: 50%;
  padding: 4px;
  position: absolute;
  top: 15px;
  transform: translateX(-50%);
  z-index: 4;
}

.printly-editor__stage-toolbar button {
  border-color: transparent;
  font-size: 9px;
  min-height: 31px;
  padding: 4px 7px;
}

.printly-editor__contextual {
  --pe-context-left: 50%;
  --pe-context-top: 12px;
  background: rgba(255, 255, 255, .98);
  border: 1px solid var(--pe-line);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(43, 36, 31, .18);
  display: flex;
  inset-inline-start: var(--pe-context-left);
  max-width: calc(100% - 24px);
  padding: 5px;
  position: absolute;
  top: var(--pe-context-top);
  transform: translateX(-50%);
  transition: opacity .16s ease, transform .16s ease;
  width: max-content;
  z-index: 7;
}

.printly-editor__contextual[hidden],
.printly-editor__contextual [hidden] {
  display: none !important;
}

.printly-editor__contextual-head {
  align-items: center;
  border-inline-end: 1px solid var(--pe-line);
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  justify-content: space-between;
  min-width: 122px;
  padding: 5px 8px;
}

.printly-editor__contextual-head span {
  color: var(--pe-coral-dark);
  display: block;
  font-size: 8px;
  font-weight: 800;
}

.printly-editor__contextual-head strong {
  display: block;
  font-size: 11px;
  margin-top: 2px;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.printly-editor__contextual-head > button {
  align-items: center;
  background: var(--pe-soft);
  border: 0;
  border-radius: 50%;
  display: flex;
  height: 30px;
  justify-content: center;
  min-height: 30px;
  padding: 0;
  width: 30px;
}

.printly-editor__contextual-head .printly-editor__icon {
  height: 16px;
  width: 16px;
}

.printly-editor__contextual-scroll {
  display: flex;
  gap: 5px;
  max-width: min(780px, calc(100vw - 470px));
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: #d7cec7 transparent;
  scrollbar-width: thin;
}

.printly-editor__contextual-group {
  align-items: stretch;
  border-inline-end: 1px solid var(--pe-line);
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 3px 6px;
}

.printly-editor__contextual-group:last-child {
  border-inline-end: 0;
}

.printly-editor__contextual-group label {
  align-items: center;
  background: var(--pe-soft);
  border: 1px solid transparent;
  border-radius: 9px;
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
  min-height: 36px;
  padding: 3px 6px;
}

.printly-editor__contextual-group label:focus-within {
  background: #fff;
  border-color: var(--pe-coral);
}

.printly-editor__contextual-group label > span {
  color: var(--pe-muted);
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
}

.printly-editor__contextual-group input[type="number"] {
  background: transparent;
  border: 0;
  min-height: 28px;
  padding: 2px;
  width: 54px;
}

.printly-editor__contextual-group input[type="range"] {
  accent-color: var(--pe-coral);
  width: 92px;
}

.printly-editor__contextual-group input[type="color"] {
  background: transparent;
  border: 0;
  height: 28px;
  padding: 0;
  width: 30px;
}

.printly-editor__contextual-group select {
  background: transparent;
  border: 0;
  min-height: 28px;
  max-width: 145px;
  padding: 2px 20px 2px 4px;
}

.printly-editor__contextual-group button {
  background: #fff;
  border: 1px solid var(--pe-line);
  border-radius: 9px;
  flex: 0 0 auto;
  font-size: 9px;
  min-height: 36px;
  padding: 5px 9px;
  white-space: nowrap;
}

.printly-editor__contextual-group button:hover,
.printly-editor__contextual-group button:focus-visible {
  border-color: var(--pe-coral);
  color: var(--pe-coral-dark);
  transform: none;
}

.printly-editor__contextual-group button.is-active {
  background: #fff0eb;
  border-color: #efb8aa;
  color: var(--pe-coral-dark);
}

.printly-editor__contextual-group button.is-danger {
  color: #a72d20;
}

.printly-editor__contextual-font {
  min-width: 164px;
}

.printly-editor__contextual-check input {
  accent-color: var(--pe-coral);
  height: 18px;
  width: 18px;
}

.printly-editor.has-contextual-selection .printly-editor__stage-toolbar {
  opacity: 0;
  pointer-events: none;
}

.printly-editor__canvas-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 640px;
  min-width: 640px;
}

.printly-editor__canvas-wrap {
  background: #fff;
  box-shadow: 0 13px 45px rgba(43, 36, 31, .18);
  height: 640px;
  width: 640px;
}

.printly-editor__canvas-wrap canvas { display: block; }

.printly-editor__zoom {
  align-items: center;
  background: rgba(255, 255, 255, .97);
  border: 1px solid var(--pe-line);
  border-radius: 999px;
  bottom: 18px;
  box-shadow: 0 5px 18px rgba(43, 37, 32, .08);
  display: flex;
  gap: 2px;
  inset-inline-start: 50%;
  padding: 4px;
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 4;
}

.printly-editor__zoom button {
  border: 0;
  font-size: 10px;
  min-height: 30px;
  padding: 4px 9px;
}

.printly-editor__zoom span {
  color: var(--pe-muted);
  font-size: 10px;
  min-width: 43px;
  text-align: center;
}

.printly-editor__layers-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.printly-editor__layers h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 500;
  margin: 0;
}

.printly-editor__layers-head span {
  background: var(--pe-soft);
  border-radius: 999px;
  color: var(--pe-muted);
  font-size: 10px;
  min-width: 25px;
  padding: 4px 7px;
  text-align: center;
}

.printly-editor__layers [data-layers] {
  display: grid;
  gap: 6px;
}

.printly-editor__layer {
  align-items: center;
  border: 1px solid var(--pe-line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 28px 28px;
  overflow: hidden;
}

.printly-editor__layer.is-active {
  background: #fff2ed;
  border-color: #eeb3a4;
}

.printly-editor__layer.is-hidden { opacity: .55; }

.printly-editor__layer button {
  border: 0;
  border-radius: 0;
  font-size: 9px;
  min-height: 36px;
  padding: 5px;
}

.printly-editor__layer-name {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.printly-editor__layer-icon { color: var(--pe-muted) !important; }

.printly-editor__layer-actions {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 13px;
}

.printly-editor__layer-actions button { font-size: 9px; min-height: 33px; }

.printly-editor__spec {
  border-top: 1px solid #eeeae5;
  color: var(--pe-muted);
  font-size: 10px;
  line-height: 1.5;
  margin-top: 18px;
  padding-top: 15px;
}

.printly-editor__spec b,
.printly-editor__spec span { display: block; }

.printly-editor__warnings {
  border-top: 1px solid #eeeae5;
  margin-top: 16px;
  padding-top: 14px;
}

.printly-editor__warnings h4 {
  font-size: 10px;
  margin: 0 0 8px;
}

.printly-editor__warnings ul {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.printly-editor__warnings li {
  color: var(--pe-muted);
  font-size: 9px;
  line-height: 1.4;
  padding-inline-start: 14px;
  position: relative;
}

.printly-editor__warnings li::before {
  color: #d18e34;
  content: "•";
  position: absolute;
  inset-inline-start: 2px;
}

.printly-editor__warnings li.is-low::before { color: #c34c3e; }
.printly-editor__warnings li.is-block { color: #9f2c22; font-weight: 700; }
.printly-editor__warnings li.is-block::before { color: #9f2c22; content: "!"; font-weight: 900; }
.printly-editor__warnings li.is-good::before { color: #4f9268; }

.printly-editor__checkout-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px;
  justify-content: flex-start;
}

.printly-editor__checkout-preview {
  align-items: center;
  background: #fff;
  border: 1px solid var(--pe-line);
  border-radius: 10px;
  display: grid;
  flex: 0 1 220px;
  gap: 8px;
  grid-template-columns: 72px minmax(0, 1fr);
  min-width: 160px;
  padding: 5px;
  text-align: start;
}

.printly-editor__header .printly-editor__checkout-preview {
  flex-basis: 64px;
  grid-template-columns: 54px;
  min-width: 64px;
}

.printly-editor__header .printly-editor__checkout-preview img {
  height: 42px;
  width: 54px;
}

.printly-editor__header .printly-editor__checkout-preview span { display: none; }

.printly-editor__checkout-preview[hidden] { display: none; }

.printly-editor__checkout-preview img {
  background: #f5efea;
  border-radius: 7px;
  height: 52px;
  object-fit: contain;
  width: 72px;
}

.printly-editor__checkout-preview span {
  color: var(--pe-ink);
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

.printly-editor__mockup-dialog {
  background: transparent;
  border: 0;
  color: var(--pe-ink);
  margin: auto;
  max-height: calc(100dvh - 40px);
  max-width: min(920px, calc(100vw - 40px));
  padding: 0;
  width: max-content;
}

.printly-editor__mockup-dialog::backdrop {
  backdrop-filter: blur(4px);
  background: rgba(31, 25, 22, .72);
}

.printly-editor__mockup-dialog-card {
  background: #fff;
  border: 1px solid var(--pe-line);
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(22, 17, 14, .35);
  overflow: hidden;
  width: min(860px, calc(100vw - 40px));
}

.printly-editor__mockup-dialog-card > header {
  align-items: center;
  border-bottom: 1px solid var(--pe-line);
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
}

.printly-editor__mockup-dialog-card h3 {
  font-size: 17px;
  margin: 0;
}

.printly-editor__mockup-dialog-card header button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--pe-line);
  border-radius: 50%;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 38px;
}

.printly-editor__mockup-dialog-stage {
  align-items: center;
  background: #f2ede8;
  display: flex;
  justify-content: center;
  max-height: calc(100dvh - 130px);
  min-height: 360px;
  padding: 20px;
}

.printly-editor__mockup-dialog-stage img {
  display: block;
  max-height: calc(100dvh - 170px);
  max-width: 100%;
  object-fit: contain;
}

.printly-editor__mockup-dialog-gallery {
  background: #fff;
  border-top: 1px solid var(--pe-line);
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 14px;
}

.printly-editor__mockup-dialog-gallery[hidden] { display: none; }

.printly-editor__mockup-dialog-gallery button {
  background: #fff;
  border: 1px solid var(--pe-line);
  border-radius: 999px;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 5px 12px;
}

.printly-editor__mockup-dialog-gallery button[aria-selected="true"] {
  background: #fff0eb;
  border-color: var(--pe-coral);
  color: var(--pe-coral-dark);
}

.printly-product-notice {
  background: #fff3ed;
  border-inline-start: 3px solid #f05a46;
  border-radius: 4px;
  font-size: 13px;
  padding: 12px;
}

.printly-product-notice a {
  color: #b84838;
  text-decoration: underline;
}

.printly-product-notice span { color: #776c65; margin-inline-start: 6px; }

.printly-editor[hidden] { display: none !important; }

.printly-studio-open { overflow: hidden !important; }

.printly-editor-launcher {
  align-items: center;
  background: #292321;
  border: 0;
  border-radius: 13px;
  color: #fff;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: 42px 1fr;
  margin: 18px 0;
  min-height: 68px;
  padding: 11px 16px;
  text-align: right;
  width: 100%;
}

.printly-editor-launcher > span {
  align-items: center;
  background: #ed604d;
  border-radius: 50%;
  display: flex;
  font-size: 20px;
  grid-row: 1 / 3;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.printly-editor-launcher strong { font-size: 16px; }
.printly-editor-launcher small { color: #d9cec8; }

.printly-editor--fullscreen {
  border: 0;
  border-radius: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  inset: 0;
  margin: 0;
  max-width: none;
  overflow: hidden;
  position: fixed;
  width: 100vw;
  height: 100dvh;
  z-index: 100000;
}

.printly-editor--fullscreen .printly-editor__workspace {
  height: auto;
  min-height: 0;
  overflow: hidden;
}

.printly-editor--fullscreen .printly-editor__tools,
.printly-editor--fullscreen .printly-editor__layers {
  max-height: none;
}

.printly-editor__close {
  border-radius: 50% !important;
  font-size: 23px;
  min-width: 40px;
  padding: 0 !important;
}

.printly-editor__onboarding {
  align-items: center;
  background: #fff5ef;
  border-bottom: 1px solid #f2d8cd;
  display: flex;
  gap: 8px;
  justify-content: center;
  min-height: 46px;
  padding: 6px 16px;
}

.printly-editor__onboarding > span {
  font-size: 12px;
  font-weight: 800;
}

.printly-editor__onboarding button {
  background: #fff;
  border: 1px solid #e5d5cc;
  border-radius: 999px;
  min-height: 32px;
  padding: 5px 12px;
}

.printly-editor__onboarding.is-dismissed { display: none; }

.printly-editor__search input {
  background: #fff;
  border: 1px solid var(--pe-line);
  border-radius: 9px;
  min-height: 40px;
  padding: 8px 10px;
  text-align: right;
  width: 100%;
}

.printly-editor__asset-list {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 220px;
  overflow: auto;
}

.printly-editor__asset {
  aspect-ratio: 1;
  background: #fff !important;
  overflow: hidden;
  padding: 5px !important;
}

.printly-editor__asset img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.printly-editor__palette-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.printly-editor__swatch {
  border: 2px solid #fff !important;
  border-radius: 50% !important;
  box-shadow: 0 0 0 1px #cfc6be;
  height: 32px;
  min-height: 32px !important;
  padding: 0 !important;
  width: 32px;
}

.printly-editor__mobile-nav { display: none; }

@media (max-width: 1200px) {
  .printly-editor__workspace { grid-template-columns: 285px minmax(520px, 1fr); }
  .printly-editor__layers { display: none; }
}

@media (max-width: 860px) {
  .printly-editor { border-radius: 13px; margin: 35px 0; }
  .printly-editor__header { grid-template-columns: 1fr auto; }
  .printly-editor__status { display: none; }
  .printly-editor__workspace { display: block; min-height: 0; }
  .printly-editor__tools { border-bottom: 1px solid var(--pe-line); border-inline-end: 0; max-height: none; }
  .printly-editor__stage { min-height: 600px; padding-inline: 0; }
  .printly-editor__canvas-shell { min-width: 640px; transform: scale(.78); }
  .printly-editor--fullscreen { border-radius: 0; margin: 0; }
  .printly-editor--fullscreen .printly-editor__workspace {
    display: grid;
    height: auto;
    grid-template-rows: minmax(330px, 1fr) auto;
    overflow: hidden;
  }
  .printly-editor__header { gap: 8px; padding: 8px 10px; }
  .printly-editor__header-actions { gap: 4px; }
  .printly-editor__header .printly-editor__checkout-preview {
    flex-basis: 54px;
    min-width: 54px;
  }
  .printly-editor--fullscreen .printly-editor__stage {
    grid-row: 1;
    min-height: 0;
  }
  .printly-editor--fullscreen .printly-editor__tools {
    bottom: 60px;
    display: none;
    inset-inline: 0;
    max-height: 52vh;
    overflow: auto;
    position: fixed;
    z-index: 4;
  }
  .printly-editor--fullscreen.is-mobile-tools-open .printly-editor__tools { display: block; }
  .printly-editor__mobile-nav {
    background: #fff;
    border-top: 1px solid var(--pe-line);
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 60px;
    inset-inline: 0;
    position: fixed;
    z-index: 6;
  }
  .printly-editor__mobile-nav button {
    background: #fff;
    border: 0;
    min-height: 44px;
  }
  .printly-editor__onboarding {
    justify-content: flex-start;
    overflow-x: auto;
  }
}

@media (max-width: 560px) {
  .printly-editor__header { align-items: start; }
  .printly-editor__header-actions button:not(:last-child) { display: none; }
  .printly-editor__areas { padding-inline: 8px; }
  .printly-editor__stage { min-height: 465px; padding-top: 54px; }
  .printly-editor__canvas-shell { min-height: 640px; transform: scale(.58); }
  .printly-editor__stage-toolbar { display: none; }
  .printly-editor__zoom { bottom: 10px; }
  .printly-editor__header-actions .printly-editor__primary span { display: inline; }
  .printly-editor__header-actions button.printly-editor__checkout-preview { display: inline-flex; }
  .printly-editor__mockup-dialog { max-width: calc(100vw - 20px); }
  .printly-editor__mockup-dialog-card { width: calc(100vw - 20px); }
  .printly-editor__mockup-dialog-stage { min-height: 240px; padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .printly-editor *,
  .printly-editor *::before,
  .printly-editor *::after {
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Printly Designer v4 module rail */
.printly-editor__workspace {
  direction: inherit;
  grid-template-columns: minmax(82px, 430px) minmax(520px, 1fr);
}

.printly-editor[data-panel-open="false"] .printly-editor__workspace {
  grid-template-columns: 82px minmax(520px, 1fr);
}

.printly-editor__tools {
  align-items: stretch;
  border-inline-end: 1px solid var(--pe-line);
  border-inline-end: 0;
  display: flex;
  max-height: 820px;
  min-width: 82px;
  overflow: hidden;
}

.printly-editor__rail {
  background: #292624;
  color: #f8f3ef;
  display: flex;
  flex: 0 0 82px;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 9px 7px;
}

.printly-editor__rail-main,
.printly-editor__rail-core {
  display: grid;
  gap: 5px;
}

.printly-editor__rail-core {
  border-top: 1px solid rgba(255, 255, 255, .14);
  margin-top: 14px;
  padding-top: 9px;
}

.printly-editor__rail .printly-editor__rail-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #d8d0cb;
  display: flex;
  flex-direction: column;
  font-size: 9px;
  gap: 5px;
  justify-content: center;
  min-height: 62px;
  padding: 7px 3px;
  width: 100%;
}

.printly-editor__rail .printly-editor__rail-button:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .1);
  color: #fff;
  transform: none;
}

.printly-editor__rail .printly-editor__rail-button.is-active {
  background: var(--pe-coral);
  border-color: var(--pe-coral);
  color: #fff;
}

.printly-editor__icon {
  fill: none;
  height: 21px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 21px;
}

.printly-editor__panel-stack {
  background: var(--pe-paper);
  flex: 1 1 348px;
  min-width: 0;
  overflow: auto;
  width: 348px;
}

.printly-editor[data-panel-open="false"] .printly-editor__panel-stack {
  display: none;
}

.printly-editor__module-panel {
  min-height: 100%;
}

.printly-editor__module-panel[hidden],
.printly-editor__legacy-tools,
.printly-editor__legacy-layers {
  display: none !important;
}

.printly-editor__panel-head {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--pe-line);
  display: flex;
  justify-content: space-between;
  min-height: 78px;
  padding: 15px 18px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.printly-editor__panel-head span {
  color: var(--pe-coral-dark);
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.printly-editor__panel-head h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
  margin: 0;
}

.printly-editor__panel-head h3 small {
  background: var(--pe-soft);
  border-radius: 99px;
  color: var(--pe-muted);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 10px;
  margin-inline-start: 5px;
  padding: 4px 7px;
}

.printly-editor__panel-head > button {
  align-items: center;
  background: var(--pe-soft);
  border: 0;
  border-radius: 50%;
  display: flex;
  font-size: 22px;
  height: 36px;
  justify-content: center;
  min-height: 36px;
  padding: 0;
  width: 36px;
}

.printly-editor__module-body {
  display: grid;
  gap: 13px;
  padding: 18px;
}

.printly-editor__module-body > button,
.printly-editor__module-body .printly-module-primary {
  background: #fff;
  border: 1px solid var(--pe-line);
  border-radius: 10px;
  min-height: 40px;
  padding: 8px 11px;
}

.printly-editor__module-body .printly-module-primary {
  background: var(--pe-coral);
  border-color: var(--pe-coral);
  color: #fff;
  font-weight: 800;
}

.printly-module-section {
  display: grid;
  gap: 11px;
}

.printly-module-section--soft {
  background: var(--pe-soft);
  border-radius: 13px;
  padding: 13px;
}

.printly-module-section h4,
.printly-editor__module-body h4 {
  font-size: 12px;
  margin: 0;
}

.printly-module-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.printly-module-chips button {
  background: var(--pe-soft);
  border: 1px solid var(--pe-line);
  border-radius: 999px;
  min-height: 31px;
  padding: 5px 11px;
  white-space: nowrap;
}

.printly-module-chips button[aria-pressed="true"] {
  background: #fff0eb;
  border-color: #efb8aa;
  color: var(--pe-coral-dark);
  font-weight: 750;
}

.printly-module-note,
.printly-editor__selection-hint,
.printly-editor__loading,
.printly-editor__empty {
  color: var(--pe-muted);
  font-size: 10px;
  line-height: 1.5;
  margin: 0;
}

.printly-editor__error {
  background: #fff1ee;
  border: 1px solid #efb8aa;
  border-radius: 10px;
  color: #8f3429;
  font-size: 11px;
  line-height: 1.45;
  margin: 0;
  padding: 9px 10px;
}

.printly-editor__selection-hint.has-selection {
  color: #37654a;
  font-weight: 700;
}

.printly-editor__property-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.printly-editor__layer-list {
  display: grid;
  gap: 7px;
}

.printly-editor__module-empty {
  align-items: center;
  color: var(--pe-muted);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 420px;
  padding: 34px;
  text-align: center;
}

.printly-editor__module-empty .printly-editor__icon {
  color: var(--pe-coral);
  height: 38px;
  width: 38px;
}

.printly-editor__module-warning {
  background: #fff0d2;
  border-bottom: 1px solid #e7c985;
  color: #6f4e13;
  font-size: 11px;
  line-height: 1.45;
  padding: 10px 20px;
  text-align: center;
}

.printly-editor__stage {
  grid-column: 2;
  min-height: clamp(520px, 72vh, 820px);
  align-items: flex-start;
  justify-content: flex-start;
  overflow: auto;
}

.printly-editor__canvas-shell {
  flex: 0 0 auto;
  margin: auto;
  min-height: 0;
  min-width: 0;
  position: relative;
  transform: none !important;
}

.printly-editor__canvas-wrap {
  inset-inline-start: 50%;
  position: absolute;
  top: 50%;
  transform-origin: center center;
}

.printly-editor__mobile-nav {
  overflow-x: auto;
  scrollbar-width: none;
}

.printly-editor__mobile-nav .printly-editor__icon {
  height: 19px;
  width: 19px;
}

@media (max-width: 1200px) {
  .printly-editor__workspace,
  .printly-editor[data-panel-open="false"] .printly-editor__workspace {
    grid-template-columns: minmax(82px, 390px) minmax(500px, 1fr);
  }
}

@media (max-width: 860px) {
  .printly-editor__workspace,
  .printly-editor[data-panel-open="false"] .printly-editor__workspace {
    display: block;
  }

  .printly-editor__stage {
    min-height: calc(100vh - 210px);
  }

  .printly-editor__contextual {
    border-radius: 18px 18px 0 0;
    bottom: 60px;
    box-shadow: 0 -14px 38px rgba(43, 36, 31, .2);
    flex-direction: column;
    inset-inline: 0;
    max-height: min(38vh, 290px);
    max-width: none;
    padding: 7px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    position: fixed;
    top: auto;
    transform: none;
    width: 100%;
    z-index: 7;
  }

  .printly-editor__contextual-head {
    border-bottom: 1px solid var(--pe-line);
    border-inline-end: 0;
    min-height: 43px;
    padding: 3px 5px 7px;
    width: 100%;
  }

  .printly-editor__contextual-head strong {
    font-size: 13px;
    max-width: 70vw;
  }

  .printly-editor__contextual-scroll {
    gap: 7px;
    max-width: none;
    padding: 6px 0 2px;
    width: 100%;
  }

  .printly-editor__contextual-group {
    gap: 6px;
    padding: 2px 8px;
  }

  .printly-editor__contextual-group label,
  .printly-editor__contextual-group button {
    min-height: 44px;
  }

  .printly-editor__contextual-group label > span,
  .printly-editor__contextual-group button {
    font-size: 11px;
  }

  .printly-editor__contextual-group input[type="number"] {
    font-size: 16px;
    width: 60px;
  }

  .printly-editor__contextual-group select {
    font-size: 16px;
    max-width: 190px;
  }

  .printly-editor--fullscreen.is-mobile-tools-open .printly-editor__contextual {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
  }

  .printly-editor__tools,
  .printly-editor--fullscreen .printly-editor__tools {
    background: transparent;
    border: 0;
    bottom: 60px;
    display: none;
    inset-inline: 0;
    max-height: 58vh;
    min-height: 220px;
    overflow: visible;
    position: fixed;
    width: 100%;
    z-index: 8;
  }

  .printly-editor--fullscreen.is-mobile-tools-open .printly-editor__tools {
    display: block;
  }

  .printly-editor__rail {
    display: none;
  }

  .printly-editor__panel-stack,
  .printly-editor[data-panel-open="false"] .printly-editor__panel-stack {
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -16px 45px rgba(43, 36, 31, .2);
    display: block;
    height: 58vh;
    max-height: 58vh;
    width: 100%;
  }

  .printly-editor__panel-head {
    border-radius: 18px 18px 0 0;
  }

  .printly-editor__mobile-nav {
    display: flex;
    gap: 2px;
    justify-content: flex-start;
  }

  .printly-editor__mobile-nav button {
    align-items: center;
    display: flex;
    flex: 0 0 76px;
    flex-direction: column;
    font-size: 9px;
    gap: 4px;
    justify-content: center;
  }

  .printly-editor__mobile-nav button.is-active {
    color: var(--pe-coral-dark);
    font-weight: 800;
  }
}

@media (max-width: 860px) and (max-height: 560px) {
  .printly-editor__contextual {
    max-height: 46vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .printly-editor__contextual {
    transition: none;
  }
}
