/* ============================================================
   MEMORA — create.css
   Luxury bespoke order form · Dark paper · Gold ink
   ============================================================ */

/* ── Page shell ──────────────────────────────────────────── */
.create-body {
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Header ──────────────────────────────────────────────── */
.cr-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(var(--space-5), 5vw, var(--space-12));
  height: 64px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cr-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.45rem;
  letter-spacing: 0.18em;
  color: var(--ink);
  text-decoration: none;
  transition: opacity var(--dur-fast);
}
.cr-logo:hover { opacity: 0.65; }
.cr-logo span  { color: var(--gold); }

.cr-step-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.cr-step-label span { color: var(--gold); }

/* ── Progress bar ────────────────────────────────────────── */
.cr-progress {
  padding: var(--space-5) clamp(var(--space-5), 5vw, var(--space-12)) 0;
  flex-shrink: 0;
}

.cr-progress__labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.cr-progress__label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color var(--dur-base);
  flex: 1;
  text-align: center;
}
.cr-progress__label:first-child { text-align: left; }
.cr-progress__label:last-child  { text-align: right; }
.cr-progress__label.active { color: var(--gold); }
.cr-progress__label.done   { color: var(--ash); }

.cr-progress__track {
  height: 2px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.cr-progress__fill {
  height: 100%;
  background: var(--gold);
  border-radius: 99px;
  width: 33.33%;
  transition: width 0.5s var(--ease-out);
}

/* ── Main column ─────────────────────────────────────────── */
.cr-main {
  flex: 1;
  padding: var(--space-12) clamp(var(--space-5), 5vw, var(--space-12)) var(--space-20);
  display: flex;
  justify-content: center;
}

.cr-col {
  width: 100%;
  max-width: 680px;
}

/* ── Step container ──────────────────────────────────────── */
.cr-step {
  display: block;
}
.cr-step--hidden {
  display: none;
}

/* Entrance animation */
.cr-step.cr-step--entering {
  animation: step-enter 0.35s var(--ease-out) both;
}
@keyframes step-enter {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}
.cr-step.cr-step--leaving {
  animation: step-leave 0.25s var(--ease-in) both;
}
@keyframes step-leave {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-20px); }
}

/* ── Step header ─────────────────────────────────────────── */
.cr-step__head {
  margin-bottom: var(--space-12);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-8);
}

.cr-step__headline {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 0.88;
  margin-bottom: var(--space-4);
}

.cr-hl-line {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(44px, 8vw, 64px);
  letter-spacing: 0.04em;
  color: var(--ink);
  display: block;
}

.cr-step__sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-muted);
  line-height: 1.6;
  max-width: 46ch;
}

/* ── Field wrapper ───────────────────────────────────────── */
.cr-field {
  margin-bottom: var(--space-8);
  position: relative;
}

.cr-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}
.cr-row .cr-field { margin-bottom: 0; }

.cr-field-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}
.cr-field-row .cr-label { margin-bottom: 0; }

/* ── Label ───────────────────────────────────────────────── */
.cr-label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-2);
}

.cr-required {
  color: var(--gold);
  margin-left: 2px;
}
.cr-optional {
  color: var(--ink-muted);
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
  font-size: 0.75rem;
}
.cr-hint {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-xs);
  color: var(--ink-muted);
  margin-top: var(--space-2);
  font-style: italic;
}

/* ── Core input ──────────────────────────────────────────── */
.cr-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-sm);
  padding: 0.8rem 1rem;
  line-height: 1.5;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}
.cr-input::placeholder {
  color: var(--ink-muted);
  font-style: italic;
}
.cr-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196,162,74,0.14);
  background: var(--bg-lift);
}
.cr-input--error {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(184,76,46,0.12) !important;
}
.cr-input--error:focus {
  border-color: var(--red);
}

/* Shake animation for validation errors */
@keyframes cr-shake {
  0%, 100% { transform: translateX(0); }
  16%       { transform: translateX(-8px); }
  33%       { transform: translateX(7px); }
  50%       { transform: translateX(-6px); }
  67%       { transform: translateX(5px); }
  83%       { transform: translateX(-3px); }
}
.cr-shake {
  animation: cr-shake 0.45s var(--ease-inout) both;
}

/* ── Select ──────────────────────────────────────────────── */
.cr-select-wrap {
  position: relative;
}
.cr-select {
  padding-right: 2.5rem;
  cursor: pointer;
}
.cr-select-caret {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  font-size: 0.75rem;
  pointer-events: none;
  transition: color 0.2s ease;
}
.cr-select-wrap:focus-within .cr-select-caret { color: var(--gold); }

/* ── Date input ──────────────────────────────────────────── */
.cr-date-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.cr-date-display {
  cursor: pointer;
  padding-right: 3rem;
}
.cr-date-native {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
  font-size: 0; /* prevents flash on some browsers */
}
.cr-date-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
  z-index: 1;
  pointer-events: none; /* native input handles clicks */
}

/* ── Textarea (lined paper) ──────────────────────────────── */
.cr-textarea-wrap {
  position: relative;
}

.cr-textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.75rem; /* matches the line spacing below */
  padding: 1rem 1rem 2.5rem; /* bottom room for counter */
  resize: vertical;
  min-height: 240px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cr-textarea::placeholder {
  color: var(--ink-muted);
  font-style: italic;
}
.cr-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196,162,74,0.14);
}

/* Lined paper effect via repeating-linear-gradient */
.cr-lined {
  background-image: repeating-linear-gradient(
    to bottom,
    var(--bg-card)     0px,
    var(--bg-card)     27px,
    rgba(196,162,74,0.07) 27px,
    rgba(196,162,74,0.07) 28px
  );
  background-attachment: local;
}
.cr-lined:focus {
  background-image: repeating-linear-gradient(
    to bottom,
    var(--bg-lift)     0px,
    var(--bg-lift)     27px,
    rgba(196,162,74,0.1) 27px,
    rgba(196,162,74,0.1) 28px
  );
}

.cr-char-count {
  position: absolute;
  bottom: 0.6rem;
  right: 0.85rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  transition: color 0.2s ease;
  pointer-events: none;
}
.cr-char-count.cr-char--near   { color: var(--gold); }
.cr-char-count.cr-char--limit  { color: var(--red); }

/* ── Occasion chips ──────────────────────────────────────── */
.cr-chips-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}
.cr-chips-wrap::-webkit-scrollbar { display: none; }
.cr-chips-wrap.is-dragging { cursor: grabbing; user-select: none; }

.cr-chips {
  display: flex;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
  width: max-content;
}

.cr-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--ink-muted);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
  user-select: none;
}
.cr-chip:hover {
  border-color: var(--border-hi);
  color: var(--ink);
}
.cr-chip[aria-checked="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
  font-weight: 500;
  box-shadow: 0 2px 12px rgba(196,162,74,0.3);
}
.cr-chip:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.cr-field--error .cr-chips-wrap {
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 2px rgba(184,76,46,0.35);
}

/* ── Theme carousel ──────────────────────────────────────── */
.cr-themes-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}
.cr-themes-wrap::-webkit-scrollbar { display: none; }
.cr-themes-wrap.is-dragging { cursor: grabbing; user-select: none; }

.cr-themes {
  display: flex;
  gap: var(--space-3);
  padding-bottom: var(--space-2);
  width: max-content;
}

.cr-theme-card {
  width: 128px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
  user-select: none;
}
.cr-theme-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.cr-theme-card[aria-checked="true"] {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196,162,74,0.25), 0 6px 20px rgba(0,0,0,0.3);
  transform: translateY(-3px);
}
.cr-theme-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.cr-theme-card__face {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}
.cr-theme-card__label {
  padding: 0.4rem 0.6rem 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  background: var(--bg-card);
  color: var(--ink-muted);
  border-top: 3px solid; /* color set inline */
}

/* ── Package cards ───────────────────────────────────────── */
.cr-packages {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.cr-pkg {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-5);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}
.cr-pkg:hover {
  border-color: var(--border-hi);
  background: var(--bg-lift);
}
.cr-pkg[aria-checked="true"] {
  border-color: var(--gold);
  background: var(--bg-lift);
  box-shadow: 0 0 0 1px var(--gold), 0 4px 20px rgba(196,162,74,0.1);
}
.cr-pkg:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.cr-pkg__radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border-hi);
  flex-shrink: 0;
  margin-top: 3px;
  position: relative;
  transition: border-color 0.2s ease;
}
.cr-pkg__radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--gold);
  transform: scale(0);
  transition: transform 0.2s var(--ease-out);
}
.cr-pkg[aria-checked="true"] .cr-pkg__radio {
  border-color: var(--gold);
}
.cr-pkg[aria-checked="true"] .cr-pkg__radio::after {
  transform: scale(1);
}

.cr-pkg__body { flex: 1; min-width: 0; }

.cr-pkg__name {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.cr-pkg__pop {
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  background: var(--gold);
  color: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  vertical-align: middle;
}

.cr-pkg__desc {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-xs);
  color: var(--ink-muted);
  margin-bottom: var(--space-3);
  line-height: 1.5;
}

.cr-pkg__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cr-pkg__features li {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.cr-pkg__features li::before {
  content: '✓';
  color: var(--ash);
  font-size: 0.65rem;
  flex-shrink: 0;
}

.cr-pkg__price {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
}

/* Bundle extra slide-down */
.cr-bundle-extra {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.4s var(--ease-out),
    opacity 0.3s ease;
  margin-top: 0;
}
.cr-bundle-extra.cr-bundle-extra--open {
  max-height: 300px;
  opacity: 1;
  margin-top: var(--space-4);
}

/* ── Voice wall toggle card ──────────────────────────────── */
.cr-voice-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-5);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    border-left-color 0.2s ease,
    background 0.2s ease;
  user-select: none;
}
.cr-voice-card:hover {
  border-color: var(--border-hi);
  border-left-color: var(--border-hi);
  background: var(--bg-lift);
}
.cr-voice-card--on {
  border-left-color: var(--gold);
  background: var(--bg-lift);
}
.cr-voice-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.cr-voice-card__emoji {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}
.cr-voice-card__body { flex: 1; min-width: 0; }
.cr-voice-card__title {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}
.cr-voice-card__desc {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-xs);
  color: var(--ink-muted);
  line-height: 1.5;
  max-width: none;
}

.cr-voice-card__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  flex-shrink: 0;
}
.cr-voice-card__price {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  color: var(--gold);
}

/* Toggle pill */
.cr-voice-card__toggle {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--border);
  position: relative;
  transition: background 0.2s ease;
}
.cr-voice-card--on .cr-voice-card__toggle { background: var(--gold); }
.cr-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s var(--ease-out);
}
.cr-voice-card--on .cr-toggle-knob { transform: translateX(16px); }

/* ── Upload zones ────────────────────────────────────────── */
.cr-upload-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-10) var(--space-6);
  text-align: center;
  cursor: pointer;
  background: var(--bg-card);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}
.cr-upload-zone:hover,
.cr-upload-zone:focus-visible {
  border-color: var(--gold);
  background: var(--bg-lift);
  outline: none;
}
.cr-upload-zone.cr-dragover {
  border-color: var(--gold);
  background: rgba(196,162,74,0.04);
  box-shadow: 0 0 0 4px rgba(196,162,74,0.1), 0 0 30px rgba(196,162,74,0.06);
}

.cr-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.cr-upload-zone__body {
  pointer-events: none;
}
.cr-upload-zone__icon {
  color: var(--gold);
  opacity: 0.5;
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-4);
  transition: opacity 0.2s ease;
}
.cr-upload-zone:hover .cr-upload-zone__icon { opacity: 0.9; }

.cr-upload-zone__title {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--ink-muted);
  margin-bottom: var(--space-1);
  max-width: none;
}
.cr-upload-zone__link {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cr-upload-zone__hint {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-xs);
  color: var(--ink-muted);
  opacity: 0.6;
  max-width: none;
}

.cr-upload-zone--audio { padding: var(--space-8) var(--space-6); }

/* ── Photo strip ─────────────────────────────────────────── */
.cr-badge {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ash);
  background: rgba(122,148,128,0.12);
  border: 1px solid rgba(122,148,128,0.25);
  padding: 2px 8px;
  border-radius: 99px;
}
.cr-badge.cr-badge--full { color: var(--red); background: rgba(184,76,46,0.1); border-color: rgba(184,76,46,0.25); }

.cr-photo-strip {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.cr-photo-thumb {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-lift);
}
.cr-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cr-photo-thumb__rm {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(11,22,18,0.82);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
  color: var(--red);
  z-index: 1;
}
.cr-photo-thumb:hover .cr-photo-thumb__rm { opacity: 1; }
.cr-photo-thumb__rm:focus-visible { opacity: 1; outline: 2px solid var(--gold); }
.cr-photo-thumb__rm svg { width: 10px; height: 10px; }

/* ── Mini audio player ───────────────────────────────────── */
.cr-mini-player {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-md);
}

.cr-mini-player__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cr-mini-player__btn:hover {
  transform: scale(1.08);
  box-shadow: 0 3px 16px rgba(196,162,74,0.35);
}

.cr-mini-player__info { flex: 1; min-width: 0; }
.cr-mini-player__name {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-xs);
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: var(--space-2);
}
.cr-mini-player__progress-track {
  height: 2px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  cursor: pointer;
}
.cr-mini-player__progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 99px;
  width: 0%;
  transition: width 0.2s linear;
}

.cr-mini-player__remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.cr-mini-player__remove:hover {
  border-color: var(--red);
  color: var(--red);
}

/* ── Order receipt ───────────────────────────────────────── */
.cr-receipt {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-8);
  font-family: 'DM Sans', sans-serif;
}

.cr-receipt__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 0.9rem var(--space-5);
  border-bottom: 1px solid var(--border);
}
.cr-receipt__row:last-child { border-bottom: none; }
.cr-receipt__row--total {
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
  background: var(--bg-lift);
}

.cr-receipt__key {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  flex-shrink: 0;
}
.cr-receipt__val {
  font-size: var(--text-sm);
  color: var(--ink);
  text-align: right;
  min-width: 0;
  word-break: break-word;
}
.cr-receipt__val--total {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.75rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  line-height: 1;
}

/* ── Trust line ──────────────────────────────────────────── */
.cr-trust {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-xs);
  color: var(--ink-muted);
  text-align: center;
  padding: var(--space-4) 0;
  letter-spacing: 0.04em;
}

/* ── Step footer / CTAs ──────────────────────────────────── */
.cr-step__footer {
  margin-top: var(--space-10);
  border-top: 1px solid var(--border);
  padding-top: var(--space-6);
}
.cr-step__footer--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.cr-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem 2rem;
  background: var(--gold);
  color: var(--bg);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}
.cr-btn-primary:hover {
  background: #d4b05a;
  box-shadow: 0 6px 28px rgba(196,162,74,0.38);
  transform: translateY(-1px);
}
.cr-btn-primary:active { transform: translateY(0); }
.cr-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.cr-step__footer--split .cr-btn-primary { width: auto; flex: 1; }

.cr-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  background: transparent;
  color: var(--gold);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1.5px solid var(--border-hi);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
  white-space: nowrap;
}
.cr-btn-ghost:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.cr-btn-pay {
  background: var(--gold);
  position: relative;
  overflow: hidden;
}
.cr-btn-pay.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: pay-shimmer 1.2s infinite;
}
@keyframes pay-shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* ── Error messages ──────────────────────────────────────── */
.cr-error {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-xs);
  color: var(--red);
  margin-top: var(--space-3);
  min-height: 1.2em;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.cr-error:empty { display: none; }

.cr-inline-error {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-xs);
  color: var(--red);
  margin-top: var(--space-2);
}

.cr-field--hidden {
  display: none;
}

/* ── Success screen ──────────────────────────────────────── */
.cr-success {
  text-align: center;
  padding: var(--space-8) 0;
}
.cr-success__icon {
  font-size: 4rem;
  margin-bottom: var(--space-5);
  display: block;
  animation: success-bounce 0.6s var(--ease-out) both;
}
@keyframes success-bounce {
  0%   { transform: scale(0.5) rotate(-10deg); opacity: 0; }
  70%  { transform: scale(1.1) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.cr-success__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: var(--space-3);
}
.cr-success__sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-muted);
  max-width: 42ch;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}
.cr-success__qr-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-6);
}
.cr-success__qr {
  background: #fff;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  display: inline-block;
}
.cr-success__link-row {
  display: flex;
  gap: var(--space-2);
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: var(--space-6);
}
.cr-success__link-row .cr-input {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  cursor: default;
}
.cr-btn-copy {
  white-space: nowrap;
  padding: 0.8rem 1rem;
}
.cr-success__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .cr-row {
    grid-template-columns: 1fr;
  }
  .cr-btn-primary,
  .cr-btn-ghost {
    font-size: var(--text-xs);
  }
  .cr-hl-line { font-size: clamp(36px, 11vw, 52px); }
  .cr-packages { gap: var(--space-4); }
  .cr-pkg { flex-wrap: wrap; }
  .cr-pkg__price { width: 100%; text-align: left; }
  .cr-voice-card { flex-wrap: wrap; }
  .cr-success__link-row { flex-direction: column; }
}

/* ── Gift card preview (from qr.js) ──────────────────────── */
.cr-card-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.cr-card-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px; /* placeholder height while generating */
}

/* The canvas injected by renderCardPreview */
.qr-card-canvas {
  width: 400px;
  height: 400px;
  display: block;
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(196,162,74,0.18),
    0 8px 40px rgba(0,0,0,0.55),
    0 0 60px rgba(196,162,74,0.06);
  /* Crisp pixel rendering — canvas is already 400×400 native */
  image-rendering: auto;
}

.cr-card-preview__hint {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-align: center;
  max-width: 36ch;
}

@media (max-width: 460px) {
  .qr-card-canvas {
    width: min(400px, 92vw);
    height: min(400px, 92vw);
  }
}

@media (max-width: 400px) {
  .cr-header { padding-inline: var(--space-4); }
  .cr-progress { padding-inline: var(--space-4); }
  .cr-main { padding-inline: var(--space-4); }
}


/* ══════════════════════════════════════════════════════════
   BUILD OVERLAY
   Full-screen overlay shown after payment, during asset upload.
   ══════════════════════════════════════════════════════════ */

.build-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);

  /* Entrance */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.build-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

/* Centered content column */
.build-col {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

/* ── SVG Progress Ring ───────────────────────────────────── */
.build-ring-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}
.build-ring-svg {
  display: block;
  overflow: visible;
}
.build-ring-track {
  stroke: rgba(255,255,255,0.07);
}
.build-ring-arc {
  stroke: var(--gift-accent, var(--gold));
  transition: stroke-dashoffset 0.05s linear; /* JS drives this */
}

/* Percentage centered inside ring */
.build-ring-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  letter-spacing: 0.04em;
  color: var(--gift-accent, var(--gold));
  line-height: 1;
  pointer-events: none;
}

/* ── Stage headline ──────────────────────────────────────── */
.build-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-align: center;
  line-height: 1;
  min-height: 1.2em;
  transition: opacity 0.25s ease;
}

/* ── Stage subtitle ──────────────────────────────────────── */
.build-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: center;
  min-height: 1.4em;
  transition: opacity 0.25s ease;
}

/* ── Stage dots ──────────────────────────────────────────── */
.build-dots {
  display: flex;
  gap: 10px;
  align-items: center;
}
.build-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  transition: background 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}
.build-dot--active {
  background: var(--gift-accent, var(--gold));
  animation: dot-pulse 1.1s ease-in-out infinite;
}
.build-dot--done {
  background: var(--gift-accent, var(--gold));
  transform: scale(1);
  animation: none;
}
@keyframes dot-pulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.35); opacity: 0.7; }
}

/* ── Build error ─────────────────────────────────────────── */
.build-error {
  background: rgba(184,76,46,0.1);
  border: 1px solid rgba(184,76,46,0.3);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
  max-width: 420px;
}
.build-error__msg {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-sm);
  color: var(--ink);
  line-height: 1.6;
}
.build-error__link {
  color: var(--gift-accent, var(--gold));
}
.build-error__ref {
  font-family: 'DM Sans', monospace;
  font-size: 0.75rem;
  color: var(--ink-muted);
  display: block;
  margin-top: 4px;
  word-break: break-all;
}
.build-error__retry {
  font-size: var(--text-sm);
}

/* ── Linear progress bar (bottom of viewport) ───────────── */
.build-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255,255,255,0.06);
}
.build-bar__fill {
  height: 100%;
  width: 0%;
  background: var(--gift-accent, var(--gold));
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ══════════════════════════════════════════════════════════
   SUCCESS SCREEN — "IT'S / DONE."
   ══════════════════════════════════════════════════════════ */

/* The success section sits inside .cr-col like the other steps */
.cr-success {
  padding-top: var(--space-10);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  text-align: center;
  max-width: 560px;
  margin-inline: auto;
}

/* "IT'S / DONE." large type */
.success-headline {
  display: flex;
  flex-direction: column;
  line-height: 0.88;
  letter-spacing: 0.04em;
}
.success-headline__its {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(48px, 12vw, 72px);
  color: var(--ink-muted);
  display: block;
}
.success-headline__done {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(48px, 12vw, 72px);
  color: var(--gift-accent, var(--gold));
  display: block;
}

/* Subline: "{name}'s gift is live." */
.success-subline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* QR card preview — 400px square */
.success-card-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}
.success-card-preview {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}
.success-card-preview canvas,
.success-card-preview img {
  display: block;
  width: 100%;
  height: auto;
}

/* Action buttons row */
.success-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.success-action-btn {
  flex: 1;
  min-width: 160px;
  white-space: nowrap;
}

/* Copied state for copy button */
.cr-btn-ghost--copied {
  color: var(--ash);
  border-color: var(--ash);
}

/* Voice wall share section */
.success-voices-section {
  width: 100%;
}
.success-voices-card {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  text-align: left;
}
.success-voices-card__icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
  padding-top: 2px;
}
.success-voices-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.success-voices-card__label {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
}
.success-voices-card__hint {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.5;
}
.success-voices-card__row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.success-voices-input {
  flex: 1;
  min-width: 120px;
  font-size: 0.75rem;
  padding: 0.55rem var(--space-3);
}

/* Footer note */
.success-footer-note {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  opacity: 0.7;
}

/* sr-only (screen-reader only) */
.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;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .build-headline { font-size: 28px; }
  .build-ring-pct { font-size: 40px; }
  .success-headline__its,
  .success-headline__done { font-size: 52px; }
  .success-actions { flex-direction: column; }
  .success-voices-card { flex-direction: column; gap: var(--space-3); }
}

/* ══════════════════════════════════════════════════════════
   RECOVERY BANNER
   ══════════════════════════════════════════════════════════ */
.recovery-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #C4622D;
  color: #F5F0E8;
  padding: 12px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-body, sans-serif);
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}
.recovery-banner__body {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.recovery-banner__icon { flex-shrink: 0; font-size: 16px; }
.recovery-banner__text { flex: 1; }
.recovery-banner__ref  { font-family: monospace; font-size: 12px; background: rgba(0,0,0,0.2); padding: 1px 4px; border-radius: 3px; }
.recovery-banner__email { font-weight: 600; }
.recovery-banner__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.recovery-banner__contact {
  color: #F5F0E8;
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
}
.recovery-banner__dismiss {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: #F5F0E8;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.recovery-banner__dismiss:hover { background: rgba(0,0,0,0.35); }

/* Build error button group */
.build-error__btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

@media (max-width: 480px) {
  .recovery-banner { flex-direction: column; }
  .recovery-banner__actions { width: 100%; justify-content: flex-end; }
}
