/* ============================================================
   QR Memories Builder — Elegant Wedding Design System
   Brand: #7f0f41 (deep rose)  |  Warm cream base
   Fonts: Cormorant Garamond (display) + Josefin Sans (UI)
   ============================================================ */

/* --- Reset & Base ----------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.builder-root {
  font-family: "Josefin Sans", sans-serif;
  font-size: 13px;
  color: #2a2520;
  background: #faf8f5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Success Overlay -------------------------------------- */
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.success-card {
  background: #ffffff;
  border: 1px solid #ebe7e1;
  border-radius: 24px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  padding: 56px 48px;
  text-align: center;
  max-width: 420px;
  width: 90%;
}

.success-check {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7f0f41, #a83466);
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-svg {
  width: 32px;
  height: 32px;
  color: #ffffff;
}

.success-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  color: #2a2520;
  margin-bottom: 12px;
}

.success-text {
  font-family: "Josefin Sans", sans-serif;
  font-size: 13px;
  color: #9a8e82;
  line-height: 1.6;
}

/* --- Header ----------------------------------------------- */
.builder-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #f2ece8;
}

.builder-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
}

.builder-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7f0f41, #a83466);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
}

.logo-text {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 20px;
  font-weight: 500;
  color: #2a2520;
  letter-spacing: 0.5px;
}

/* --- Header Step Dots ------------------------------------- */
.header-steps {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Josefin Sans", sans-serif;
  font-size: 11px;
  font-weight: 500;
  border: 1.5px solid #d4ccc8;
  background: transparent;
  color: #9a8e82;
  cursor: pointer;
  transition: all 0.3s ease;
}

.step-dot.active {
  background: #2a2520;
  border-color: #2a2520;
  color: #ffffff;
}

.step-dot.done {
  background: #7f0f41;
  border-color: #7f0f41;
  color: #ffffff;
}

.dot-check {
  width: 12px;
  height: 12px;
}

/* --- Main Layout ------------------------------------------ */
.builder-main {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  gap: 48px;
  padding: 40px 32px 120px;
  align-items: flex-start;
}

.panel-controls {
  flex: 1 1 500px;
  max-width: 680px;
  min-width: 0;
}

.panel-preview {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  padding-top: 0;
  margin-top: 0;
}

.preview-label {
  font-family: "Josefin Sans", sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #9a8e82;
  text-align: center;
  margin-bottom: 16px;
}

/* --- Step Content ----------------------------------------- */
.step-content {
  animation: fadeUp 0.3s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-heading {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  color: #2a2520;
  margin-bottom: 6px;
  line-height: 1.2;
}

.step-heading em,
.step-heading i {
  font-style: italic;
  color: #7f0f41;
}

.step-sub {
  font-family: "Josefin Sans", sans-serif;
  font-size: 13px;
  color: #9a8e82;
  margin-bottom: 32px;
  line-height: 1.5;
}

/* --- Fields ----------------------------------------------- */
.field {
  margin-bottom: 20px;
}

.field-label {
  display: block;
  font-family: "Josefin Sans", sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #9a8e82;
  margin-bottom: 8px;
}

.field-label .req {
  color: #7f0f41;
  margin-left: 2px;
}

.field-label .opt {
  color: #c0b8b0;
  font-size: 10px;
  letter-spacing: 1px;
  margin-left: 4px;
}

.field-input {
  width: 100%;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 16px;
  color: #2a2520;
  background: #faf8f5;
  border: 1.5px solid #ebe7e1;
  border-radius: 10px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-input:focus {
  border-color: #7f0f41;
  box-shadow: 0 0 0 3px rgba(127, 15, 65, 0.06);
}

.field-input.has-error {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.08);
}

.field-textarea {
  width: 100%;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 16px;
  color: #2a2520;
  background: #faf8f5;
  border: 1.5px solid #ebe7e1;
  border-radius: 10px;
  padding: 12px 16px;
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-textarea:focus {
  border-color: #7f0f41;
  box-shadow: 0 0 0 3px rgba(127, 15, 65, 0.06);
}

.field-error {
  font-family: "Josefin Sans", sans-serif;
  font-size: 11px;
  color: #c0392b;
  margin-top: 6px;
}

.field-hint {
  font-family: "Josefin Sans", sans-serif;
  font-size: 11px;
  color: #c0b8b0;
  margin-top: 6px;
}

.char-count {
  font-family: "Josefin Sans", sans-serif;
  font-size: 10px;
  color: #c0b8b0;
  text-align: right;
  margin-top: 4px;
}

/* --- Slug Row --------------------------------------------- */
.slug-row {
  display: flex;
  align-items: center;
  background: #faf8f5;
  border: 1.5px solid #ebe7e1;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.slug-row:focus-within {
  border-color: #7f0f41;
}

.slug-prefix {
  font-family: "Josefin Sans", sans-serif;
  font-size: 12px;
  color: #9a8e82;
  padding: 12px 2px 12px 14px;
  white-space: nowrap;
  user-select: all;
}

.slug-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: "Josefin Sans", sans-serif;
  font-size: 14px;
  color: #2a2520;
  padding: 12px 8px;
  outline: none;
}

.slug-status {
  padding: 0 14px;
  font-size: 11px;
  font-family: "Josefin Sans", sans-serif;
  display: flex;
  align-items: center;
  gap: 4px;
}

.slug-ok {
  color: #27ae60;
}

.slug-taken {
  color: #c0392b;
}

.slug-loading {
  color: #9a8e82;
}

.spinner-sm {
  width: 14px;
  height: 14px;
  border: 2px solid #ebe7e1;
  border-top-color: #7f0f41;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Toggle Group (Segmented) ----------------------------- */
.toggle-group {
  display: inline-flex;
  background: #f0ece6;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.toggle-btn {
  font-family: "Josefin Sans", sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.5px;
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #9a8e82;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-btn.active {
  background: #ffffff;
  color: #2a2520;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* --- Section Block ---------------------------------------- */
.section-block {
  background: #ffffff;
  border: 1px solid #ebe7e1;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.section-title {
  font-family: "Josefin Sans", sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #9a8e82;
  margin-bottom: 16px;
}

/* --- Palette / Preset Grid -------------------------------- */
.preset-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preset-swatch {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid #ebe7e1;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-swatch:hover {
  background: #faf8f5;
}

.preset-swatch.selected {
  border: 2px solid #2a2520;
  background: #faf6f1;
}

.swatch-half {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.swatch-label {
  font-family: "Josefin Sans", sans-serif;
  font-size: 12px;
  color: #2a2520;
  flex: 1;
}

/* --- Color Pickers ---------------------------------------- */
.color-pickers {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.picker-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 100px;
  min-width: 80px;
}

.picker-wrap {
  position: relative;
}

.color-input {
  width: 100%;
  height: 40px;
  border: 1.5px solid #ebe7e1;
  border-radius: 8px;
  cursor: pointer;
  padding: 2px;
  background: #ffffff;
}

.color-hex {
  font-family: "Josefin Sans", sans-serif;
  font-size: 11px;
  color: #9a8e82;
  text-align: center;
  letter-spacing: 0.5px;
}

/* --- Tab Bar ---------------------------------------------- */
.tab-bar {
  display: flex;
  background: #f0ece6;
  border-radius: 12px;
  padding: 4px;
  gap: 2px;
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  font-family: "Josefin Sans", sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #9a8e82;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  line-height: 1.4;
}

.tab-btn.active {
  background: #ffffff;
  color: #2a2520;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* --- Background Templates Grid ---------------------------- */
.bg-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.bg-thumb {
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  border: 1.5px solid #ebe7e1;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background-size: cover;
  background-position: center;
  transition: all 0.2s ease;
}

.bg-thumb:hover {
  border-color: #d4ccc8;
  transform: translateY(-1px);
}

.bg-thumb.selected {
  border: 2px solid #2a2520;
  box-shadow: 0 0 0 2px rgba(42, 37, 32, 0.08);
}

.bg-thumb-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 4px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
  font-family: "Josefin Sans", sans-serif;
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #ffffff;
  text-align: center;
}

/* --- Upload Zone ------------------------------------------ */
.bg-upload-zone {
  border: 2px dashed #ebe7e1;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #faf8f5;
}

.bg-upload-zone:hover {
  border-color: #d4ccc8;
  background: #f6f2ee;
}

.bg-upload-zone.drag-over {
  border-color: #7f0f41;
  background: #f9eef3;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.upload-icon {
  font-size: 28px;
  line-height: 1;
  color: #c0b8b0;
}

.upload-link {
  font-family: "Josefin Sans", sans-serif;
  font-size: 12px;
  color: #7f0f41;
  text-decoration: underline;
  cursor: pointer;
}

.upload-hint {
  font-family: "Josefin Sans", sans-serif;
  font-size: 10px;
  color: #c0b8b0;
}

.upload-preview-wrap {
  position: relative;
  display: inline-block;
}

.upload-preview-img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 10px;
  border: 1px solid #ebe7e1;
}

.upload-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2a2520;
  color: #ffffff;
  border: none;
  font-size: 14px;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Gradient Pickers ------------------------------------- */
.gradient-pickers {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

.gradient-mode-toggle {
  margin-bottom: 12px;
}

.gradient-direction {
  margin-top: 12px;
}

.direction-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-width: 140px;
}

.dir-btn {
  width: 40px;
  height: 40px;
  border: 1.5px solid #ebe7e1;
  border-radius: 8px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.dir-btn:hover {
  border-color: #d4ccc8;
}

.dir-btn.active {
  border: 2px solid #2a2520;
  background: #faf6f1;
}

/* --- Font Grid -------------------------------------------- */
.font-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.font-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1.5px solid #ebe7e1;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.font-card:hover {
  background: #faf8f5;
}

.font-card.selected {
  border: 2px solid #2a2520;
  background: #faf6f1;
}

.font-preview {
  font-size: 18px;
  color: #2a2520;
  line-height: 1.3;
}

/* --- Button Style Grid ------------------------------------ */
.btn-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.btn-style-card {
  padding: 20px 16px;
  border: 1.5px solid #ebe7e1;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-style-card:hover {
  background: #faf8f5;
}

.btn-style-card.selected {
  border: 2px solid #2a2520;
  background: #faf6f1;
}

.btn-style-demo {
  margin-bottom: 10px;
}

.btn-style-label {
  font-family: "Josefin Sans", sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9a8e82;
}

/* --- Layout Grid ------------------------------------------ */
.layout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.layout-card {
  padding: 20px 16px;
  border: 1.5px solid #ebe7e1;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.layout-card:hover {
  background: #faf8f5;
}

.layout-card.selected {
  border: 2px solid #2a2520;
  background: #faf6f1;
}

.layout-wireframe {
  margin-bottom: 10px;
}

.layout-label {
  font-family: "Josefin Sans", sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9a8e82;
}

/* --- Toggles / Switches ----------------------------------- */
.toggles-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toggle-info {
  flex: 1;
  min-width: 0;
}

.toggle-label {
  font-family: "Josefin Sans", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #2a2520;
  margin-bottom: 2px;
}

.toggle-desc {
  font-family: "Josefin Sans", sans-serif;
  font-size: 11px;
  color: #c0b8b0;
}

.switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  background: #d4ccc8;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.25s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.switch input:checked + .switch-slider {
  background: #7f0f41;
}

.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
}

/* --- Radio Cards ------------------------------------------ */
.radio-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.radio-card {
  padding: 18px 14px;
  border: 1.5px solid #ebe7e1;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.radio-card:hover {
  background: #faf8f5;
}

.radio-card.selected {
  border: 2px solid #2a2520;
  background: #faf6f1;
}

.radio-visual {
  margin-bottom: 10px;
}

.col-block {
  display: inline-block;
  width: 20px;
  height: 28px;
  border-radius: 3px;
  margin: 0 2px;
  background: #ebe7e1;
}

.radio-label {
  font-family: "Josefin Sans", sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9a8e82;
}

/* --- Phone Preview Frame ---------------------------------- */
.phone-frame {
  width: 420px;
  height: 840px;
  border: 3px solid #d0d0d0;
  border-radius: 36px;
  background: #ffffff;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 24px;
  background: #ffffff;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.phone-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 48px 20px 20px;
  overflow-y: auto;
  background-size: cover;
  background-position: center;
}

.phone-content.layout-top {
  justify-content: flex-start;
  padding-top: 56px;
}

.phone-content.layout-centered {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.phone-content.layout-split {
  justify-content: space-between;
}

/* --- Preview Elements Inside Phone ------------------------ */
.preview-couple-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 6px;
}

.preview-date {
  font-family: "Josefin Sans", sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.8;
}

.preview-welcome {
  font-family: "Josefin Sans", sans-serif;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 16px;
  opacity: 0.9;
}

.preview-countdown {
  font-family: "Josefin Sans", sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0.7;
}

.preview-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  width: 100%;
  padding: 0 12px;
}

.preview-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  cursor: default;
  text-align: center;
  width: 100%;
}

.preview-btn-primary {
  background: rgba(255, 255, 255, 0.9);
  color: #2a2520;
}

.preview-btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.preview-btn-outline {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  opacity: 0.7;
}

.preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.preview-logo {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.preview-email-sub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 20px;
  width: 100%;
}

.preview-email-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  font-family: "Josefin Sans", sans-serif;
  font-size: 10px;
  color: #ffffff;
  text-align: center;
}

.preview-email-btn {
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.9);
  color: #2a2520;
  border: none;
  border-radius: 6px;
  font-family: "Josefin Sans", sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: default;
}

.preview-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-top: 12px;
}

.preview-gallery-item {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* --- Footer ----------------------------------------------- */
.panel-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid #f2ece8;
  padding: 16px 32px;
}

.footer-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.foot-dot {
  width: 8px;
  height: 8px;
  border-radius: 8px;
  background: #d4ccc8;
  transition: all 0.3s ease;
}

.foot-dot.active {
  width: 20px;
  background: #7f0f41;
}

.foot-dot.done {
  background: rgba(127, 15, 65, 0.5);
}

.footer-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
}

/* --- Buttons ---------------------------------------------- */
.btn {
  font-family: "Josefin Sans", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-ghost {
  background: transparent;
  color: #9a8e82;
  border: 1.5px solid #ebe7e1;
}

.btn-ghost:hover {
  background: #faf8f5;
  border-color: #d4ccc8;
  color: #2a2520;
}

.btn-primary {
  background: #2a2520;
  color: #ffffff;
}

.btn-primary:hover {
  background: #3d3630;
  box-shadow: 0 4px 12px rgba(42, 37, 32, 0.2);
}

.btn-create {
  background: linear-gradient(135deg, #7f0f41, #a83466);
  color: #ffffff;
  padding: 14px 36px;
  font-size: 13px;
}

.btn-create:hover {
  box-shadow: 0 6px 20px rgba(127, 15, 65, 0.25);
  transform: translateY(-1px);
}

/* --- Background Position Pad ------------------------------ */
.bg-position-pad {
  width: 120px;
  height: 120px;
  background: #faf8f5;
  border: 1.5px solid #ebe7e1;
  border-radius: 10px;
  position: relative;
  cursor: crosshair;
  margin: 12px 0;
}

.bg-position-dot {
  width: 14px;
  height: 14px;
  background: #7f0f41;
  border: 2px solid #ffffff;
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  transition: all 0.15s ease;
}

/* --- Overlay Slider --------------------------------------- */
.overlay-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: #f0ece6;
  border-radius: 6px;
  outline: none;
  margin: 12px 0;
}

.overlay-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #7f0f41;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.overlay-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #7f0f41;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* --- Emoji Row -------------------------------------------- */
.emoji-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.emoji-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1.5px solid #ebe7e1;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.emoji-btn:hover {
  background: #faf8f5;
  transform: scale(1.08);
}

/* --- Flyer Preview ---------------------------------------- */
.flyer-preview-frame {
  min-width: 340px;
  background: #ffffff;
  border: 1px solid #ebe7e1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  position: relative;
  aspect-ratio: 3 / 4;
  max-width: 380px;
}

.flyer-preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.flyer-preview-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.flyer-preview-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: #2a2520;
}

.flyer-preview-slogan {
  font-family: "Josefin Sans", sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #9a8e82;
}

.flyer-preview-divider {
  width: 40px;
  height: 1px;
  background: #ebe7e1;
  margin: 4px 0;
}

.flyer-preview-body {
  font-family: "Josefin Sans", sans-serif;
  font-size: 11px;
  color: #9a8e82;
  line-height: 1.5;
}

.flyer-preview-qr {
  width: 80px;
  height: 80px;
  margin: 8px auto;
}

.flyer-qr-placeholder {
  width: 80px;
  height: 80px;
  background: #f0ece6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #c0b8b0;
}

.flyer-preview-url {
  font-family: "Josefin Sans", sans-serif;
  font-size: 10px;
  color: #c0b8b0;
  letter-spacing: 0.5px;
}

/* --- Align Grid ------------------------------------------- */
.align-grid {
  display: flex;
  gap: 6px;
}

.align-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #ebe7e1;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.align-btn:hover {
  border-color: #d4ccc8;
}

.align-btn.active {
  border: 2px solid #2a2520;
  background: #faf6f1;
}

/* --- Vue Transitions -------------------------------------- */
.slide-left-enter-active,
.slide-left-leave-active,
.slide-right-enter-active,
.slide-right-leave-active {
  transition: all 0.3s ease;
}

.slide-left-enter-from {
  opacity: 0;
  transform: translateX(24px);
}

.slide-left-leave-to {
  opacity: 0;
  transform: translateX(-24px);
}

.slide-right-enter-from {
  opacity: 0;
  transform: translateX(-24px);
}

.slide-right-leave-to {
  opacity: 0;
  transform: translateX(24px);
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.25s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* --- Responsive ------------------------------------------- */
@media (max-width: 900px) {
  .builder-main {
    flex-direction: column;
    gap: 32px;
    padding: 24px 16px 140px;
  }

  .panel-controls {
    max-width: 100%;
    flex: 1 1 auto;
  }

  .panel-preview {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .builder-header-inner {
    padding: 12px 16px;
  }

  .section-block {
    padding: 20px;
  }

  .step-heading {
    font-size: 26px;
  }

  .footer-buttons {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .phone-frame {
    width: 240px;
    height: 480px;
    border-radius: 28px;
  }

  .builder-header-inner {
    padding: 10px 12px;
  }

  .logo-text {
    font-size: 17px;
  }

  .step-dot {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .step-heading {
    font-size: 22px;
  }

  .tab-btn {
    font-size: 9px;
    padding: 8px 6px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 11px;
  }

  .panel-footer {
    padding: 12px 16px;
  }
}
