.initials-selector {
  display: grid;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: start;
}
.initials-selector[hidden], .initials-selector [hidden],
#card-editor:is([data-initials-mode="choose"], [data-initials-mode="loading"], [data-initials-mode="error"]) :is(.card-editor-layout, .customer-tabs),
#card-editor:is([data-initials-mode="paid"], [data-initials-mode="edit"]) :is(.customer-design-row .card-mini-button, [data-edit-field="secondary"], #card-extra-texts, .card-add-text-row, .card-other-designs) {
  display: none !important;
}
.initials-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 34rem;
  border: 1px solid #e7deda;
  border-radius: 1rem;
  background: white;
}
.initials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(3.1rem, 1fr));
  gap: .45rem;
  margin: .8rem 0 1rem;
}
.initials-grid button {
  display: grid;
  justify-items: center;
  gap: .2rem;
  padding: .2rem;
  color: #234534;
  background: white;
  border: 1px solid #d9cfca;
  border-radius: .65rem;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.initials-grid button[aria-pressed="true"] {
  border-color: #234534;
  outline: 2px solid #234534;
  outline-offset: -2px;
  background: #eaf1e9;
}
.initials-grid button:focus-visible { outline: 2px solid #963b3c; outline-offset: 2px; }
.initials-grid img { width: 100%; height: auto; border-radius: .35rem; }
@media (max-width: 720px) {
  .initials-selector { grid-template-columns: 1fr; }
  #card-editor.customer-editor.customer-mobile-editor .initials-selector {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem 1rem max(1rem, env(safe-area-inset-bottom));
  }
  .initials-preview img { max-width: 15rem; margin-inline: auto; }
}

#card-editor .initials-change {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: start;
  min-height: 44px;
  max-width: calc(100% - 2rem);
  margin: 0 0 .5rem;
  padding: 10px 20px;
  border: 1px solid var(--coral);
  border-radius: 999px;
  background: var(--soft);
  color: var(--coral-deep);
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}
#card-editor .initials-change:hover { background: var(--paper); }
#card-editor .initials-change:focus-visible { outline: 2px solid var(--coral-deep); outline-offset: 3px; }
#card-editor[data-initials-mode="edit"] .product-back { visibility: hidden; }
@media (max-width: 700px) {
  #card-editor .initials-change { flex: none; align-self: flex-start; margin: .5rem 1rem; }
}

.initials-product-note{display:inline-flex;align-self:flex-start;width:fit-content;margin:8px 0;padding:7px 14px;border:1px solid #c6d9cc;border-radius:999px;background:#edf5ef;color:#193f31;font-size:.95rem;font-weight:700;line-height:1.3}
