/* Keep the browser preview faithful to the centred square production artwork. */
.print-paper {
  aspect-ratio: 1;
  padding: 0;
}

.print-grid {
  position: absolute;
  left: 9.583%;
  top: 5.833%;
  width: 80.833%;
  height: 80.833%;
}

.print-footer {
  left: auto;
  right: 9.583%;
  bottom: 3.5%;
  transform: none;
  white-space: nowrap;
}

.style-caption {
  left: 9.583%;
  bottom: 4.2%;
  max-width: 53%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-mark {
  flex: 0 0 auto;
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.swatch.custom {
  background: linear-gradient(135deg, #8659ef 0 48%, #ff5e7e 48% 72%, #ffc247 72%);
}

.swatch.halloween {
  background: linear-gradient(135deg, #ff8a24 0 48%, #38204f 48% 100%);
}

.print-paper.style-halloween,
.print-paper.style-halloween .print-grid {
  background: linear-gradient(135deg, #ff8a24, #38204f);
}

.print-paper.style-halloween .print-grid img {
  filter: saturate(1.12) contrast(1.05);
}

.print-paper.style-halloween .print-footer,
.print-paper.style-halloween .style-caption {
  color: #fff4d8;
}

.print-paper.style-custom,
.print-paper.style-custom .print-grid {
  background: var(--custom-color, #8659ef);
}

.print-paper.style-custom .print-footer,
.print-paper.style-custom .style-caption {
  color: #fff;
}

.style-caption.is-placeholder {
  opacity: .58;
}

.custom-editor {
  width: min(100%, 520px);
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px solid rgba(134, 89, 239, .18);
  border-radius: 20px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 12px 30px rgba(65, 36, 50, .08);
}

.custom-colour-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font: 800 12px var(--display);
}

.colour-choices {
  display: flex;
  align-items: center;
  gap: 7px;
}

.colour-choice,
.colour-picker {
  position: relative;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  margin: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--choice, conic-gradient(#ff5e7e, #ffc247, #8659ef, #ff5e7e));
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
}

.colour-choice.is-selected {
  box-shadow: 0 0 0 2px var(--ink);
}

.colour-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.colour-picker span {
  color: #fff;
  font: 900 18px/1 var(--display);
  text-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}

.custom-message-field {
  position: relative;
  display: block;
}

.custom-message-field input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 2px solid #ded4dc;
  border-radius: 15px;
  background: #fff;
  color: var(--ink);
  font: 800 16px var(--display);
  outline: none;
}

.custom-message-field input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(134, 89, 239, .12);
}

.typing-prompt {
  position: absolute;
  z-index: 1;
  left: 16px;
  top: 15px;
  width: 9.4rem;
  overflow: hidden;
  border-right: 2px solid var(--coral);
  color: #918895;
  font: 700 16px/20px var(--display);
  white-space: nowrap;
  pointer-events: none;
  animation: custom-typing 2.4s steps(18, end) infinite alternate, custom-caret .7s step-end infinite;
}

.custom-message-field:focus-within .typing-prompt,
.custom-message-field:has(input:not(:placeholder-shown)) .typing-prompt {
  opacity: 0;
  animation: none;
}

.custom-count {
  display: block;
  margin: 6px 3px 0;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

@keyframes custom-typing {
  from { width: 0; }
  65%, to { width: 9.4rem; }
}

@keyframes custom-caret {
  50% { border-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .typing-prompt { animation: none; }
}

/* Accessibility, trust and conversion polish. */
:root { color-scheme: light only; }

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #202027;
  outline-offset: 3px;
}

.home-offer {
  margin: 15px 0 0;
  color: #57515d;
  font: 800 14px/1.4 var(--display);
}

.trust-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px 18px;
  margin-top: 18px;
  font-size: 14px;
}

.trust-links a,
.checkout-links a {
  color: #514b57;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.result-trust { margin-top: 13px; }

.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 17px;
}

.store-badge {
  min-width: 154px;
  min-height: 52px;
  padding: 7px 13px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  background: #202027;
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(32,32,39,.14);
}

.store-badge small,
.store-badge strong { display: block; }
.store-badge small { font: 700 8px/1.1 var(--body); letter-spacing: .08em; }
.store-badge strong { margin-top: 2px; font: 800 18px/1 var(--display); }
.store-badge-icon { width: 25px; height: 25px; flex: 0 0 auto; fill: currentColor; }
.store-badge-play { display: grid; place-items: center; font-size: 22px; }
.native-android .store-badges { display: none; }

.photo-edit-buttons {
  position: absolute;
  z-index: 4;
  left: 9.583%;
  top: 5.833%;
  display: grid;
  width: 80.833%;
  height: 80.833%;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: clamp(4px, 1.3vw, 8px);
  pointer-events: none;
}

.photo-edit-buttons button {
  width: 44px;
  height: 44px;
  margin: 3px;
  place-self: start end;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  font-size: 0;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
}

.photo-edit-buttons button::before {
  content: "↻";
  position: absolute;
  width: 28px;
  height: 28px;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 50%;
  background: rgba(32,32,39,.68);
  color: #fff;
  font: 900 15px/1 var(--display);
  box-shadow: 0 3px 10px rgba(0,0,0,.2);
  backdrop-filter: blur(6px);
}

.style-chip {
  min-height: 44px;
  padding: 8px 13px 8px 9px;
  font-size: 14px;
}

.colour-choice,
.colour-picker {
  width: 44px;
  height: 44px;
}

.colour-choice { background: var(--choice) !important; }
.colour-picker { background: conic-gradient(#ff5e7e, #ffc247, #8659ef, #ff5e7e) !important; }

.custom-colour-row { font-size: 14px; }
.custom-count { font-size: 13px; }

.order-card small {
  font-size: 14px;
  line-height: 1.35;
}

.order-card > b { font-size: 14px; }

.result-actions {
  grid-template-columns: 1fr;
  width: min(88%, 360px);
}

.button-utility {
  min-height: 48px;
  font-size: 14px;
}

.screen-result > .button-text { font-size: 14px; }
.sheet-close { width: 44px; height: 44px; }
.quantity-row button { width: 44px; height: 44px; }
.price-row { font-size: 14px; }
.checkout-note { font-size: 13px; }

.checkout-links {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin: 10px 0 0;
  font-size: 13px;
}

@media (max-width: 430px) {
  .wordmark { margin-bottom: 40px; }
  .home-offer { max-width: 290px; }
  .style-picker { display: grid; grid-template-columns: repeat(3, max-content); }
  .order-card { grid-template-columns: 44px 1fr auto; padding: 15px; gap: 10px; }
  .order-icon { width: 44px; height: 44px; }
}

@media (max-width: 350px) {
  .style-picker { grid-template-columns: repeat(2, max-content); }
  .order-card > b { display: none; }
}
