:root {
  --teal: #2A4B57;
  --teal-dark: #1E3842;
  --gold: #CCB67A;
  --gold-dark: #B59C5B;
  --gold-soft: #F7F3E7;
  --bg: #FAF9F6;
  --surface: #FFFFFF;
  --text: #1E293B;
  --muted: #64748B;
  --border: #E5E2D9;
  --danger: #DC2626;
  --radius: 14px;
  --font-display: "Cinzel", Georgia, serif;
  --font-deco: "Cinzel Decorative", "Cinzel", Georgia, serif;
  --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* HEADER WITH DOUBLE GOLD HAIRLINE */
.eqr-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--teal);
  border-bottom: 1.5px solid var(--gold);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}
.eqr-header::after {
  content: "";
  display: block;
  height: 1px;
  background: var(--gold);
  margin-top: 3px;
}
.eqr-header-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 16px 8px;
}
.eqr-logo { height: 38px; width: auto; display: block; object-fit: contain; }

/* STEPPER */
.eqr-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 16px 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}
.eqr-stepper .step { display: inline-flex; align-items: center; gap: 6px; transition: color 0.2s; }
.eqr-stepper .step-dot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid rgba(204, 182, 122, 0.55);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.eqr-stepper .step.active { color: #FFFFFF; font-weight: 600; }
.eqr-stepper .step.active .step-dot { background: var(--gold); border-color: var(--gold); color: var(--teal-dark); }
.eqr-stepper .step.done .step-dot { background: rgba(204, 182, 122, 0.28); border-color: var(--gold); color: var(--gold); }
.eqr-stepper .step-line { width: 24px; height: 1px; background: rgba(204, 182, 122, 0.45); }

/* MAIN CONTAINER (for stages 0, 1, 2) */
.eqr-main {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px 104px;
}
.eqr-main.immersive-mode {
  max-width: 100%;
  padding: 0;
  margin: 0;
}

.eqr-stage { animation: eqrFade 0.28s ease-out; }
@keyframes eqrFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* LOADING */
.eqr-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 55vh; color: var(--muted); gap: 14px;
}
.eqr-spinner {
  width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--gold);
  border-radius: 50%; animation: eqrSpin 0.8s linear infinite;
}
@keyframes eqrSpin { to { transform: rotate(360deg); } }

/* TYPOGRAPHY & CARDS */
.eqr-title {
  font-family: var(--font-display); color: var(--gold-dark); font-size: 24px;
  font-weight: 600; text-align: center; margin: 4px 0 8px; line-height: 1.25;
}
.eqr-subtitle {
  color: var(--muted); font-size: 14px; text-align: center;
  margin: 0 auto 18px; max-width: 520px; line-height: 1.5;
}
.eqr-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(42, 75, 87, 0.06); padding: 24px;
}

/* BUTTONS */
.eqr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-family: var(--font-body); font-size: 14px;
  font-weight: 600; cursor: pointer; border: 1.5px solid transparent; text-decoration: none;
  transition: all 0.18s ease;
}
.eqr-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.eqr-btn-gold { background: var(--gold); color: #FFFFFF; }
.eqr-btn-gold:hover:not(:disabled) { background: var(--gold-dark); }
.eqr-btn-outline-gold { background: transparent; border-color: var(--gold); color: var(--gold-dark); }
.eqr-btn-outline-gold:hover:not(:disabled) { background: var(--gold-soft); }
.eqr-btn-outline-teal { background: #FFFFFF; border-color: var(--teal); color: var(--teal); }
.eqr-btn-outline-teal:hover:not(:disabled) { background: #F1F5F9; }
.eqr-btn-danger-outline { background: #FFFFFF; border-color: #FCA5A5; color: var(--danger); }
.eqr-btn-danger-outline:hover:not(:disabled) { background: #FEF2F2; }
.eqr-btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 8px; }
.eqr-btn-full { width: 100%; }

/* STAGE 0: PIN */
.eqr-pin-card { max-width: 420px; margin: 28px auto; text-align: center; }
.eqr-pin-badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--teal); background: var(--gold-soft);
  border: 1px solid rgba(204, 182, 122, 0.55); border-radius: 999px;
  padding: 4px 12px; margin-bottom: 12px;
}
.eqr-pin-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.eqr-input-wrap { position: relative; display: flex; align-items: center; }
.eqr-input-wrap input {
  width: 100%; padding: 13px 76px 13px 14px; border: 1.5px solid var(--gold);
  border-radius: 10px; font-size: 16px; letter-spacing: 0.14em; text-align: center; outline: none;
}
.eqr-icon-btn {
  position: absolute; right: 10px; background: transparent; border: none;
  color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; padding: 6px;
}
.eqr-pin-meta {
  display: flex; justify-content: space-between; margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--border); font-size: 12px; color: var(--muted);
}

/* STAGE 1: TEMPLATE SELECTION */
.eqr-section-head { margin-bottom: 16px; }
.eqr-cat-controls {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  margin-bottom: 16px; width: 100%; max-width: 100%;
}
.eqr-select-wrap { width: 100%; max-width: 360px; }
.eqr-select {
  width: 100%; padding: 11px 16px; font-family: var(--font-body); font-size: 14.5px;
  font-weight: 600; color: var(--teal); background: var(--surface); border: 1.5px solid var(--gold);
  border-radius: 999px; outline: none; box-shadow: 0 2px 6px rgba(42, 75, 87, 0.06); cursor: pointer;
}
.eqr-select-sm { border-radius: 8px; padding: 7px 12px; font-size: 13px; border-color: var(--border); width: auto; max-width: 240px; }
.eqr-cat-pills { display: flex; gap: 8px; overflow-x: auto; width: 100%; padding: 2px 2px 6px; scrollbar-width: thin; }
.eqr-pill {
  flex: 0 0 auto; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font-body); font-size: 12.5px; font-weight: 500; padding: 7px 13px;
  border-radius: 999px; cursor: pointer; transition: all 0.15s ease; white-space: nowrap;
}
.eqr-pill:hover { border-color: var(--gold); color: var(--teal); }
.eqr-pill.active { background: var(--teal); border-color: var(--teal); color: #FFFFFF; }
.eqr-templates-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; text-align: center; }
.eqr-templates-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.eqr-tpl-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.eqr-tpl-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(42, 75, 87, 0.14); border-color: var(--gold); }
.eqr-tpl-thumb { position: relative; aspect-ratio: 3 / 4; background: #F1F5F9; overflow: hidden; cursor: pointer; }
.eqr-tpl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eqr-tpl-zoom {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: none;
  background: rgba(42, 75, 87, 0.82); color: #FFFFFF; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.eqr-tpl-name {
  padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--text);
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.eqr-tpl-select-btn {
  width: 100%; border: none; background: var(--gold); color: #FFFFFF; font-family: var(--font-display);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; padding: 10px 8px; cursor: pointer;
}
.eqr-tpl-select-btn:hover { background: var(--teal); }

/* STAGE 2: FORM */
.eqr-form-card { max-width: 680px; margin: 0 auto; }
.eqr-selected-strip {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: var(--gold-soft); border: 1px solid rgba(204, 182, 122, 0.5);
  border-radius: 10px; margin-bottom: 18px; min-width: 0; max-width: 100%;
}
.eqr-selected-strip img { width: 44px; height: 58px; object-fit: cover; border-radius: 6px; border: 1px solid var(--gold); background: #FFF; flex-shrink: 0; }
.eqr-selected-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.eqr-selected-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eqr-mini-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.eqr-mini-cat { font-size: 12px; color: var(--teal); font-weight: 500; }
.eqr-form-title { margin-bottom: 18px; }
.eqr-form { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.eqr-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.eqr-two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.eqr-date-row { max-width: 240px; margin-left: auto; }
.eqr-label-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.eqr-field label { font-size: 13.5px; font-weight: 700; color: var(--gold-dark); }
.eqr-saved-tag { font-size: 11.5px; font-weight: 600; color: var(--gold-dark); opacity: 0; transition: opacity 0.2s; }
.eqr-saved-tag.show { opacity: 1; }
.eqr-field input[type="text"], .eqr-field input[type="date"], .eqr-field textarea {
  width: 100%; padding: 11px 13px; font-family: var(--font-body); font-size: 15px;
  color: var(--text); background: #FFFFFF; border: 1px solid #CBD5E1; border-radius: 9px; outline: none;
}
.eqr-field input:focus, .eqr-field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(204, 182, 122, 0.25); }
.eqr-field textarea { resize: vertical; min-height: 124px; line-height: 1.55; }
.eqr-field-error { margin: 2px 0 0; font-size: 12.5px; color: var(--danger); font-weight: 500; }

.eqr-upload-box {
  position: relative; border: 1.5px dashed var(--gold); background: #FCFBF7;
  border-radius: 10px; padding: 16px; text-align: center; cursor: pointer;
}
.eqr-upload-box:hover { background: var(--gold-soft); }
.eqr-upload-box input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.eqr-upload-hint { display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.eqr-upload-hint strong { color: var(--teal); font-size: 14px; }
.eqr-upload-hint span { color: var(--muted); font-size: 12px; }

.eqr-media-loaded {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px;
  background: #FAF9F6; display: flex; flex-direction: column; gap: 10px;
}
.eqr-media-preview { text-align: center; }
.eqr-media-preview img, .eqr-media-preview video { max-width: 100%; max-height: 220px; border-radius: 8px; object-fit: contain; }
.eqr-media-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.eqr-media-ok { font-size: 12.5px; font-weight: 600; color: var(--teal); }

.eqr-presets-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.eqr-preset-counter { font-size: 12px; color: var(--muted); font-weight: 500; }
.eqr-sugerencias-wrap { display: flex; align-items: stretch; gap: 8px; width: 100%; }
.eqr-sugerencias-wrap textarea { flex: 1 1 auto; min-width: 0; }
.eqr-arrow-btn {
  flex: 0 0 38px; border: 1.5px solid var(--gold); background: var(--gold-soft);
  color: var(--teal); font-size: 24px; line-height: 1; border-radius: 9px; cursor: pointer;
}
.eqr-arrow-btn:hover { background: var(--gold); color: #FFFFFF; }
.eqr-music-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px;
  background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46;
  border-radius: 8px; font-size: 12.5px; font-weight: 600;
}

/* ============================================================================
   STAGE 3: IMMERSIVE TEMPLATE RENDERER (WORDPRESS ELEMENTOR + SHORTCODES)
   ============================================================================ */
.eqr-immersive {
  width: 100%;
  min-height: 100vh;
}

.eqr-imm-canvas {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(28px, env(safe-area-inset-top)) 18px max(48px, env(safe-area-inset-bottom));
  overflow-x: hidden;
  background: radial-gradient(at center center, #1C6B83 0%, #01182A 75%);
  color: #FFFFFF;
}

.eqr-imm-canvas.has-step3-dock {
  padding-bottom: 190px;
}

.eqr-imm-canvas.tone-dark {
  color: #5C6470;
}

.eqr-imm-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.72;
  z-index: 1;
}

.eqr-audio-fab {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 30;
  background: rgba(5, 66, 89, 0.85);
  color: #FFFFFF;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.eqr-imm-content {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  animation: eqrFade 0.6s ease-out;
}

/* Gold hairline divider + Esfiros emblem */
.eqr-gold-divider {
  position: relative;
  width: 100%;
  border-top: 4px double var(--gold);
  margin: 18px 0 8px;
  display: flex;
  justify-content: center;
}

.eqr-emblem-btn {
  margin-top: -22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  animation: eqrFloat 3.4s ease-in-out infinite;
}

.eqr-emblem-btn img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

@keyframes eqrFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

.eqr-tooltip {
  position: absolute;
  top: 26px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--teal);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.eqr-imm-meta-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.eqr-imm-gold-label {
  font-family: var(--font-deco);
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-top: 6px;
}

.eqr-imm-person {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  color: inherit;
}

.eqr-imm-recipient {
  font-size: 22px;
}

/* Animated Mascot (#id_imagedefault) & Uploaded Media ([archivo]) */
.eqr-imm-mascot img {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
  margin: 4px auto;
  border-radius: 14px;
}

.eqr-imm-user-media {
  width: 100%;
  margin: 10px auto;
  display: flex;
  justify-content: center;
}

.eqr-imm-user-media img,
.eqr-imm-user-media video {
  width: auto;
  max-width: 92%;
  max-height: 440px;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(204, 182, 122, 0.65);
}

.eqr-imm-date {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--gold);
  margin: 4px 0 0;
}

.eqr-imm-canvas.tone-dark .eqr-imm-date {
  color: #7C7C7C;
}

.eqr-imm-message {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.65;
  white-space: pre-line;
  padding: 6px 10px;
  width: 100%;
  max-width: 460px;
  overflow-wrap: break-word;
  color: inherit;
}

/* [ruta_spotify] button pill */
.eqr-imm-music {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}

.eqr-spotify-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 24px;
  border-radius: 999px;
  border: 2px solid var(--gold);
  background: transparent;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
}

.eqr-imm-canvas.tone-dark .eqr-spotify-pill {
  color: #80724D;
  border-color: var(--gold);
}

.eqr-spotify-pill:hover {
  transform: scale(1.03);
  background: rgba(204, 182, 122, 0.18);
}

.eqr-spotify-pill img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.eqr-embed-toggle {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: inherit;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  cursor: pointer;
}
.eqr-imm-canvas.tone-dark .eqr-embed-toggle {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.eqr-embed-box {
  width: 100%;
  max-width: 380px;
}
.eqr-embed-box iframe {
  width: 100%;
  border: none;
  border-radius: 12px;
}

/* CEO FORM */
.eqr-ceo-box {
  width: 100%;
  max-width: 400px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(204, 182, 122, 0.5);
  backdrop-filter: blur(8px);
}
.eqr-ceo-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.eqr-ceo-form input,
.eqr-ceo-form select,
.eqr-ceo-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  font-family: var(--font-body);
  font-size: 14px;
  color: #1E293B;
  background: #FFFFFF;
}
.eqr-ceo-feedback { font-size: 13.5px; font-weight: 600; color: var(--gold); margin: 4px 0 0; }

.eqr-bottom-divider {
  margin-top: 22px;
}

.eqr-imm-brand-foot img {
  width: 165px;
  height: auto;
  opacity: 0.92;
}

.eqr-sealed-foot {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.85;
}
.eqr-sealed-tag { font-size: 11.5px; letter-spacing: 0.04em; }
.eqr-sealed-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.eqr-sealed-link {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(204, 182, 122, 0.6);
  color: inherit;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11.5px;
  text-decoration: none;
  cursor: pointer;
}

/* STEP 3 FLOATING SEAL DOCK (#id_contenedor + #id_regresar + #id_publicar) */
.eqr-step3-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 130;
  background: rgba(5, 66, 89, 0.96);
  border-top: 2px solid var(--gold);
  color: #FFFFFF;
  padding: 10px 16px max(14px, env(safe-area-inset-bottom));
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.eqr-step3-accordion {
  max-width: 560px;
  margin: 0 auto 10px;
  text-align: center;
}
.eqr-step3-accordion summary {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(12, 21, 30, 0.38);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--gold);
}
.eqr-step3-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
  text-align: left;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}
.eqr-step3-mascot {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}
.eqr-step3-body p { margin: 0; }

.eqr-step3-actions {
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.eqr-step3-btn {
  padding: 11px 14px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid var(--gold);
  transition: all 0.18s;
}
.eqr-step3-back { background: transparent; color: #FFFFFF; }
.eqr-step3-back:hover { background: rgba(255, 255, 255, 0.12); }
.eqr-step3-seal { background: var(--gold); color: var(--teal-dark); }
.eqr-step3-seal:hover { background: var(--gold-dark); color: #FFFFFF; }

/* FIXED BOTTOM BAR: STAGE 2 */
.eqr-bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 120;
  background: var(--teal); border-top: 1.5px solid var(--gold); padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  display: flex; justify-content: center; gap: 14px; box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.18);
}
.eqr-bar-btn {
  flex: 1; max-width: 240px; padding: 11px 16px; background: transparent;
  border: 2px solid var(--gold); border-radius: 12px; color: #FFFFFF;
  font-family: var(--font-body); font-size: 14.5px; font-weight: 700; cursor: pointer;
}
.eqr-bar-btn-primary { background: var(--gold); color: var(--teal-dark); }

/* INSTRUCTIONS FOOTER DRAWER (STAGE 1) */
.eqr-footer-drawer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 110;
  background: var(--teal); border-top: 1.5px solid var(--gold); color: #FFFFFF;
}
.eqr-footer-collapsed { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 16px; }
.eqr-wa-link { color: var(--gold); font-size: 13px; font-weight: 600; text-decoration: none; }
.eqr-footer-expanded { max-width: 680px; margin: 0 auto; padding: 18px 20px 22px; }
.eqr-footer-exp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: var(--gold); }
.eqr-close-btn { background: rgba(255,255,255,0.12); border: none; color: #FFF; width: 30px; height: 30px; border-radius: 8px; font-size: 20px; cursor: pointer; }
.eqr-steps-list { margin: 0 0 14px; padding-left: 20px; font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,0.9); }

/* MODALS & TOAST */
.eqr-modal { position: fixed; inset: 0; z-index: 300; background: rgba(15, 23, 42, 0.65); display: flex; align-items: center; justify-content: center; padding: 16px; }
.eqr-modal-box { position: relative; width: 100%; max-width: 420px; background: #FFF; border-radius: 16px; padding: 24px; text-align: center; box-shadow: 0 20px 44px rgba(0,0,0,0.25); }
.eqr-modal-tpl { max-width: 400px; padding: 14px; }
.eqr-modal-tpl img { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 10px; background: #F8FAFC; }
.eqr-modal-tpl-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.eqr-modal-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(42,75,87,0.85); color: #FFF; font-size: 20px; cursor: pointer; }
.eqr-modal-actions { display: flex; gap: 10px; justify-content: center; }

.eqr-toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(10px);
  background: var(--teal); color: #FFF; border: 2px solid var(--gold); border-radius: 12px;
  padding: 10px 18px; font-size: 13.5px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity 0.22s, transform 0.22s; z-index: 400; max-width: 90vw; text-align: center;
}
.eqr-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.eqr-toast.error { border-color: #F87171; }

.eqr-imm-ar { margin: 14px auto 4px; display: flex; justify-content: center; }
.eqr-ar-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  max-width: calc(100vw - 32px); text-align: center; flex-wrap: wrap;
  padding: 12px 20px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(42, 75, 87, 0.92));
  color: #FFFFFF; border: 2px solid var(--gold);
  font-family: 'Cinzel', Georgia, serif; font-size: 14px; font-weight: 700;
  text-decoration: none; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.eqr-ar-pill:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45); }
.eqr-ar-song-chip {
  font-size: 11px; padding: 2px 7px; border-radius: 999px;
  background: rgba(204, 182, 122, 0.22); border: 1px solid var(--gold); color: var(--gold);
}

@media (max-width: 820px) { .eqr-templates-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .eqr-main { padding: 14px 12px max(96px, calc(84px + env(safe-area-inset-bottom))); }
  .eqr-main.immersive-mode { padding: 0; }
  .eqr-card { padding: 18px 14px; }
  .eqr-title { font-size: 20px; }
  .eqr-templates-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .eqr-two-col { grid-template-columns: 1fr; }
  .eqr-date-row { max-width: 100%; margin-left: 0; }
  .eqr-select, .eqr-field input, .eqr-field textarea, .eqr-ceo-form input, .eqr-ceo-form select, .eqr-ceo-form textarea { font-size: 16px; }
  .eqr-select-sm { max-width: 100%; width: 100%; }
}
