/* UI del constructor (Generador de Invitaciones Digitales Pro). Fork de app.css del Generador de Landings.
   Esto NUNCA viaja a la invitación exportada. */

:root {
  --gp-bg: #f5f6fb;
  --gp-surface: #ffffff;
  --gp-border: #e4e6f0;
  --gp-text: #171923;
  --gp-text-soft: #666b80;
  --gp-primary: #0d0e32; /* azul Digital Carmelo */
  --gp-gold: #d3ac49; /* dorado Digital Carmelo */
  --gp-gold-light: #fcca55;
  --gp-gold-grad: linear-gradient(135deg, #f7dc8a 0%, #d3ac49 45%, #a8812a 100%);
  --gp-primary-dark: #06071f;
  --gp-danger: #e0455f;
  --gp-radius: 14px;
  --gp-radius-sm: 8px;
  --gp-shadow: 0 8px 24px rgba(23, 25, 35, .07);
  --footer-h: 40px;
  font-family: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--gp-bg); color: var(--gp-text); }
.app-root { min-height: calc(100vh - var(--footer-h)); }

button, input, select, textarea { font-family: inherit; font-size: 1rem; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .7rem 1.3rem; border-radius: var(--gp-radius-sm); border: none; cursor: pointer;
  font-weight: 600; transition: transform .12s ease, background .12s ease; background: var(--gp-border); color: var(--gp-text);
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--gp-primary); color: #fff; }
.btn--primary:hover { background: var(--gp-primary-dark); }
.btn--outline { background: #fff; border: 1.5px solid var(--gp-primary); color: var(--gp-primary); }
.btn--ghost { background: transparent; color: var(--gp-text-soft); }
.btn--ghost:hover { background: var(--gp-border); }
.btn--danger { color: var(--gp-danger); }
.btn--small { padding: .45rem .9rem; font-size: .85rem; }
.btn--lg { padding: 1rem 1.6rem; font-size: 1.05rem; }

/* ---------- Pantalla: Mis proyectos ---------- */
.screen--projects { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.projects-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.projects-header h2 { font-size: 1.7rem; margin: 0; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.project-card { background: var(--gp-surface); border-radius: var(--gp-radius); padding: 1.4rem; box-shadow: var(--gp-shadow); }
.project-card__thumb { height: 90px; border-radius: var(--gp-radius-sm); overflow: hidden; margin-bottom: 1rem; }
.project-card__thumb span { display: block; width: 100%; height: 100%; }
.project-card h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.project-card__meta { color: var(--gp-text-soft); font-size: .85rem; margin: 0 0 1rem; }
.project-card__actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.gf-empty { color: var(--gp-text-soft); }

/* Firma de marca del Generador (nunca viaja a la landing exportada) */
.brand-footer {
  height: var(--footer-h); display: flex; align-items: center; justify-content: center; gap: .6rem;
  background: var(--gp-primary); border-top: 1px solid rgba(211,172,73,.35);
}
.brand-footer__label { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(211,172,73,.8); font-weight: 600; }
.brand-footer__label::before, .brand-footer__label::after { content: ''; display: inline-block; width: 2px; height: 11px; background: var(--gp-gold); vertical-align: middle; margin: 0 .55rem; }
.brand-footer__name { font-weight: 700; font-size: .82rem; color: var(--gp-gold-light); }

/* ---------- Pantalla: Builder ---------- */
.builder { display: flex; flex-direction: column; height: calc(100vh - var(--footer-h)); }
.builder__topbar { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.25rem; background: var(--gp-surface); border-bottom: 1px solid var(--gp-border); }
.builder__name { flex: 1; border: none; background: transparent; font-size: 1.15rem; font-weight: 700; padding: .4rem .6rem; border-radius: var(--gp-radius-sm); max-width: 420px; }
.builder__name:focus { outline: none; background: var(--gp-bg); }
.builder__save-badge { font-size: .82rem; color: var(--gp-text-soft); padding: .3rem .7rem; border-radius: 999px; background: var(--gp-bg); }
.builder__save-badge.is-saving { color: var(--gp-primary); }

.builder__tabs { display: flex; gap: .3rem; padding: .6rem 1.25rem; background: var(--gp-surface); border-bottom: 1px solid var(--gp-border); overflow-x: auto; }
.builder__tab { padding: .55rem 1rem; border-radius: 999px; border: none; background: transparent; color: var(--gp-text-soft); font-weight: 600; cursor: pointer; white-space: nowrap; }
.builder__tab.is-active { background: var(--gp-primary); color: #fff; }

.builder__body { flex: 1; display: grid; grid-template-columns: minmax(360px, 480px) 1fr; overflow: hidden; }
.builder__panel { overflow-y: auto; padding: 1.75rem; background: var(--gp-bg); }
.builder__preview { display: flex; flex-direction: column; background: #e9eaf2; border-left: 1px solid var(--gp-border); }

.panel-title { font-size: 1.25rem; margin: 0 0 .3rem; }
.panel-subtitle { font-size: 1.05rem; margin: 1.2rem 0 .6rem; }
.gf-hint { color: var(--gp-text-soft); font-size: .9rem; margin: 0 0 1.2rem; }
.gf-suggestion strong { color: var(--gp-text); }
.gf-applied { color: #16a34a; font-weight: 600; margin-left: .4rem; }

/* Device bar + preview frame */
.device-bar { display: flex; gap: .4rem; padding: .8rem 1.25rem; }
.device-bar__btn { padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--gp-border); background: #fff; cursor: pointer; font-weight: 600; font-size: .85rem; color: var(--gp-text-soft); }
.device-bar__btn.is-active { background: var(--gp-primary); border-color: var(--gp-primary); color: #fff; }
.preview-frame-wrap { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 0 1.25rem 1.25rem; overflow: auto; }
.preview-frame-wrap[data-device="desktop"] { --gp-preview-width: 100%; }
.preview-frame { width: var(--gp-preview-width, 100%); max-width: 100%; height: 100%; min-height: 640px; border: none; border-radius: 10px; background: #fff; box-shadow: var(--gp-shadow); transition: width .2s ease; }
.preview-frame-wrap[data-device="tablet"] .preview-frame,
.preview-frame-wrap[data-device="celular"] .preview-frame { box-shadow: 0 0 0 10px #1c1d22, var(--gp-shadow); border-radius: 22px; }

/* Formularios genéricos */
.field-grid { display: flex; flex-direction: column; gap: 1.15rem; }
.gf-field { display: flex; flex-direction: column; gap: .4rem; }
.gf-label { font-weight: 600; font-size: .88rem; color: var(--gp-text); }
.gf-input, .gf-input textarea {
  border: 1px solid var(--gp-border); border-radius: var(--gp-radius-sm); padding: .7rem .85rem;
  background: #fff; width: 100%; color: var(--gp-text);
}
.gf-input:focus { outline: 2px solid var(--gp-primary); outline-offset: 1px; }
textarea.gf-input { resize: vertical; min-height: 80px; }
.gf-input--small { max-width: 160px; }
.gf-file { font-size: .85rem; }

.gf-image-preview { display: flex; align-items: center; gap: .8rem; }
.gf-image-preview img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--gp-radius-sm); border: 1px solid var(--gp-border); }
.gf-image-empty { color: var(--gp-text-soft); font-size: .85rem; }
.gf-image-remove { background: none; border: none; color: var(--gp-danger); cursor: pointer; font-size: .82rem; text-decoration: underline; }

.gf-imagelist { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .6rem; }
.gf-imagelist__item { position: relative; width: 72px; height: 72px; }
.gf-imagelist__item img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--gp-radius-sm); border: 1px solid var(--gp-border); }
.gf-imagelist__item button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: none; background: var(--gp-danger); color: #fff; cursor: pointer; line-height: 1; }

.gf-item-card { background: #fff; border: 1px solid var(--gp-border); border-radius: var(--gp-radius-sm); padding: 1rem; display: flex; flex-direction: column; gap: .8rem; margin-bottom: .9rem; }
.gf-item-card__head { display: flex; align-items: center; justify-content: space-between; }
.gf-item-card__actions { display: flex; gap: .3rem; }
.gf-icon-btn { width: 28px; height: 28px; border-radius: var(--gp-radius-sm); border: 1px solid var(--gp-border); background: #fff; cursor: pointer; }
.gf-icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.gf-icon-btn--danger { color: var(--gp-danger); border-color: transparent; }
.gf-add-btn { align-self: flex-start; margin-top: .4rem; }

.radio-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.radio-pill { display: flex; align-items: center; gap: .4rem; border: 1px solid var(--gp-border); padding: .5rem .9rem; border-radius: 999px; background: #fff; cursor: pointer; font-size: .9rem; }

.colors-row { display: flex; gap: 1.2rem; }
.color-box { display: flex; flex-direction: column; align-items: center; gap: .4rem; font-size: .82rem; color: var(--gp-text-soft); }
.color-box input[type="color"] { width: 44px; height: 44px; border: none; border-radius: 50%; overflow: hidden; padding: 0; cursor: pointer; }

/* Estilo: grid de estilos */
.style-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; }
.style-card { text-align: left; border: 2px solid var(--gp-border); border-radius: var(--gp-radius); padding: 1rem; background: #fff; cursor: pointer; }
.style-card.is-active { border-color: var(--gp-primary); box-shadow: 0 0 0 3px rgba(13,14,50,.16); }
.style-card__swatch { height: 60px; border-radius: var(--gp-radius-sm); display: flex; align-items: flex-end; gap: .4rem; padding: .5rem; margin-bottom: .7rem; }
.style-card__swatch span { width: 20px; height: 20px; border-radius: 50%; display: inline-block; }
.style-card strong { display: block; margin-bottom: .2rem; }
.style-card p { margin: 0; font-size: .82rem; color: var(--gp-text-soft); }

/* Secciones (paso 3) */
.sections-list { display: flex; flex-direction: column; gap: .5rem; }
.section-row { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--gp-border); border-radius: var(--gp-radius-sm); padding: .7rem 1rem; opacity: .6; }
.section-row.is-active { opacity: 1; }
.section-toggle { display: flex; align-items: center; gap: .6rem; font-weight: 600; cursor: pointer; flex: 1 1 auto; min-width: 0; }
.section-row__controls { display: flex; align-items: center; gap: .4rem; flex: 0 0 auto; }
.section-row__controls select.gf-input { width: 118px; flex: 0 0 auto; }

/* Contenido (paso 4) */
.content-block { background: #fff; border: 1px solid var(--gp-border); border-radius: var(--gp-radius-sm); margin-bottom: .8rem; overflow: hidden; }
.content-block summary { padding: .9rem 1.1rem; font-weight: 700; cursor: pointer; list-style: none; }
.content-block summary::-webkit-details-marker { display: none; }
.content-block__body { padding: 0 1.1rem 1.1rem; display: flex; flex-direction: column; gap: 1rem; }
.content-block__services { border-top: 1px solid var(--gp-border); padding-top: 1rem; margin-top: .5rem; }
.service-card .service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.service-card .service-grid .gf-field:nth-child(3) { grid-column: 1 / -1; }

/* Exportar */
.export-status { min-height: 1.4rem; color: var(--gp-text-soft); margin-bottom: 1rem; }
.export-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Responsive: tablet/desktop primero, apilar en pantallas chicas */
@media (max-width: 980px) {
  .builder__body { grid-template-columns: 1fr; grid-template-rows: auto auto; overflow: auto; }
  .builder__panel { max-height: 60vh; }
  .builder__preview { min-height: 420px; }
  .style-grid { grid-template-columns: 1fr; }
  .service-card .service-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .builder__topbar { flex-wrap: wrap; }
  .builder__name { max-width: 100%; order: 3; width: 100%; }
}

/* ======================================================================
   Extensiones del Generador de Invitaciones
   ====================================================================== */
.app-brand { display: flex; align-items: center; gap: .7rem; }
.app-brand__mark { width: 40px; height: 40px; border-radius: 12px; background: var(--gp-primary) url('../img/dc-mark.png') center / cover; box-shadow: 0 8px 18px -8px var(--gp-primary); }
.app-brand h1 { font-size: 1.35rem; margin: 0; line-height: 1.1; }
.app-brand small { display: block; color: var(--gp-text-soft); font-weight: 500; font-size: .82rem; }
.projects-header { align-items: flex-end; }
.projects-hint { color: var(--gp-text-soft); margin: -1rem 0 1.8rem; font-size: .92rem; }

.project-card { display: flex; flex-direction: column; }
.project-card__thumb { height: 140px; position: relative; display: flex; align-items: flex-end; padding: .8rem; color: #fff; }
.project-card__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project-card__thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.55)); }
.project-card__thumb strong { position: relative; z-index: 1; font-size: 1.05rem; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.project-card__badge { position: absolute; top: .6rem; left: .6rem; z-index: 1; background: rgba(255,255,255,.92); color: var(--gp-text); font-size: .72rem; font-weight: 700; padding: .25rem .55rem; border-radius: 999px; }
.project-card__actions { margin-top: auto; }

/* Modal de inicio rápido */
.modal { position: fixed; inset: 0; z-index: 3000; background: rgba(20, 16, 24, .55); display: flex; align-items: center; justify-content: center; padding: 1rem; backdrop-filter: blur(4px); }
.modal__box { background: #fff; border-radius: 20px; width: min(720px, 100%); max-height: 92vh; overflow: auto; padding: 1.8rem; box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); }
.modal__box h2 { margin: 0 0 .3rem; }
.modal__actions { display: flex; gap: .8rem; justify-content: flex-end; margin-top: 1.4rem; flex-wrap: wrap; }
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .7rem; margin: 1rem 0 1.2rem; }
.event-chip { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .9rem .5rem; border: 2px solid var(--gp-border); border-radius: 14px; background: #fff; cursor: pointer; font-weight: 600; font-size: .88rem; text-align: center; transition: border-color .15s, transform .15s; }
.event-chip span { font-size: 1.6rem; line-height: 1; }
.event-chip:hover { transform: translateY(-2px); }
.event-chip.is-active { border-color: var(--gp-primary); background: #f3f4fb; box-shadow: 0 0 0 3px rgba(13,14,50,.12); }

/* Datos: bloques plegables */
.fieldset { background: #fff; border: 1px solid var(--gp-border); border-radius: 12px; margin-bottom: .9rem; overflow: hidden; }
.fieldset > summary { padding: 1rem 1.1rem; font-weight: 700; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.fieldset > summary::-webkit-details-marker { display: none; }
.fieldset > summary::after { content: '▾'; color: var(--gp-text-soft); transition: transform .2s; }
.fieldset[open] > summary::after { transform: rotate(180deg); }
.fieldset > summary small { font-weight: 500; color: var(--gp-text-soft); font-size: .8rem; margin-left: auto; margin-right: .4rem; }
.fieldset__body { padding: 0 1.1rem 1.2rem; display: grid; gap: 1rem; }
.fieldset__row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 560px) { .fieldset__row { grid-template-columns: 1fr; } }
.gf-help { font-size: .78rem; color: var(--gp-text-soft); margin-top: -.1rem; }
.gf-check { display: flex; align-items: center; gap: .55rem; font-weight: 600; font-size: .9rem; cursor: pointer; }
.gf-check input { width: 18px; height: 18px; accent-color: var(--gp-primary); }
.gf-input::placeholder { color: #a3a6b5; }
.gf-dropzone { border: 1.5px dashed #c9cbd8; border-radius: 10px; padding: .7rem .9rem; background: #fbfbfe; display: flex; align-items: center; gap: .7rem; font-size: .85rem; color: var(--gp-text-soft); cursor: pointer; }
.gf-dropzone:hover { border-color: var(--gp-primary); color: var(--gp-primary); }
.gf-dropzone input { display: none; }
.gf-busy { opacity: .6; pointer-events: none; }
.gf-error { color: var(--gp-danger); font-size: .82rem; font-weight: 600; }

/* Estilo: tarjetas con mini-maqueta */
.style-card__swatch { height: 96px; position: relative; overflow: hidden; align-items: center; justify-content: center; flex-direction: column; gap: .2rem; }
.style-card__swatch em { font-style: normal; font-size: 1.35rem; line-height: 1; }
.style-card__swatch small { font-size: .55rem; letter-spacing: .25em; text-transform: uppercase; }
.style-card__swatch i { position: absolute; bottom: 8px; width: 46px; height: 12px; border-radius: 99px; }
.palette-row { display: flex; gap: .6rem; flex-wrap: wrap; margin: .4rem 0 1rem; }
.palette-chip { display: flex; align-items: center; gap: .5rem; padding: .45rem .8rem .45rem .5rem; border: 2px solid var(--gp-border); border-radius: 999px; background: #fff; cursor: pointer; font-size: .82rem; font-weight: 600; }
.palette-chip.is-active { border-color: var(--gp-primary); }
.palette-chip__dots { display: flex; }
.palette-chip__dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; margin-left: -6px; }
.palette-chip__dots span:first-child { margin-left: 0; }
.option-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.option-pill { padding: .5rem .9rem; border: 1.5px solid var(--gp-border); border-radius: 999px; background: #fff; cursor: pointer; font-size: .85rem; font-weight: 600; }
.option-pill.is-active { border-color: var(--gp-primary); background: var(--gp-primary); color: #fff; }
.font-sample { font-size: 1.3rem; line-height: 1.1; }

/* Secciones: nombre de variantes */
.section-row__controls select.gf-input { width: 170px; }
.section-row__edit { font-size: .8rem; }
.sections-toolbar { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
@media (max-width: 560px) { .section-row { flex-wrap: wrap; gap: .6rem; } .section-row__controls select.gf-input { width: 140px; } }

/* Música */
.music-card { background: #fff; border: 1px solid var(--gp-border); border-radius: 14px; padding: 1.1rem; display: grid; gap: .9rem; }
.music-file { display: flex; align-items: center; gap: .9rem; }
.music-file__icon { width: 52px; height: 52px; border-radius: 14px; background: var(--gp-primary); color: var(--gp-gold); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex: 0 0 auto; }
.music-file__name { font-weight: 700; word-break: break-all; }
.music-file__meta { color: var(--gp-text-soft); font-size: .84rem; }
.music-file audio { width: 100%; margin-top: .4rem; }
.size-meter { height: 8px; border-radius: 99px; background: #eceef5; overflow: hidden; }
.size-meter span { display: block; height: 100%; border-radius: inherit; background: #16a34a; }
.size-meter.is-aviso span { background: #eab308; }
.size-meter.is-alto span { background: var(--gp-danger); }
.size-note { font-size: .84rem; font-weight: 600; }
.size-note.is-ok { color: #15803d; } .size-note.is-aviso { color: #a16207; } .size-note.is-alto { color: var(--gp-danger); }
.tip { background: #fbf6ea; border: 1px solid #efdfb7; color: #6b5316; border-radius: 12px; padding: .8rem 1rem; font-size: .86rem; line-height: 1.5; }
.tip strong { color: #4a390c; }
.toggle-list { display: grid; gap: .5rem; }
.toggle-item { display: flex; align-items: flex-start; gap: .7rem; background: #fff; border: 1px solid var(--gp-border); border-radius: 12px; padding: .8rem 1rem; cursor: pointer; }
.toggle-item input { margin-top: .2rem; width: 18px; height: 18px; accent-color: var(--gp-primary); flex: 0 0 auto; }
.toggle-item strong { display: block; font-size: .92rem; }
.toggle-item small { color: var(--gp-text-soft); font-size: .8rem; }

/* Revisión */
.checklist { display: grid; gap: .5rem; margin: 1rem 0 1.4rem; }
.check-item { display: flex; gap: .7rem; align-items: flex-start; background: #fff; border: 1px solid var(--gp-border); border-radius: 12px; padding: .75rem .95rem; font-size: .9rem; }
.check-item__icon { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .8rem; flex: 0 0 auto; font-weight: 800; }
.check-item.is-ok .check-item__icon { background: #dcfce7; color: #15803d; }
.check-item.is-warn .check-item__icon { background: #fef3c7; color: #a16207; }
.check-item.is-error .check-item__icon { background: #fee2e2; color: var(--gp-danger); }
.check-item button { margin-left: auto; flex: 0 0 auto; }
.score { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--gp-border); border-radius: 14px; padding: 1rem 1.1rem; }
.score__ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--gp-primary) calc(var(--p) * 1%), #eceef5 0); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.score__ring span { width: 50px; height: 50px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem; }

/* Exportar */
.export-card { background: #fff; border: 1px solid var(--gp-border); border-radius: 14px; padding: 1.2rem; margin-bottom: 1rem; display: grid; gap: .7rem; }
.export-card h3 { margin: 0; font-size: 1.05rem; display: flex; align-items: center; gap: .5rem; }
.export-card p { margin: 0; color: var(--gp-text-soft); font-size: .88rem; }
.export-card .badge { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: #dcfce7; color: #15803d; padding: .2rem .5rem; border-radius: 99px; }
.export-report { font-size: .86rem; background: #f7f8fc; border-radius: 10px; padding: .8rem 1rem; line-height: 1.7; }
.steps-list { margin: .4rem 0 0; padding-left: 1.2rem; color: var(--gp-text-soft); font-size: .88rem; line-height: 1.7; }

/* Preview: barra con acciones */
.device-bar { align-items: center; flex-wrap: wrap; }
.device-bar__spacer { flex: 1; }
.device-bar__action { padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--gp-border); background: #fff; cursor: pointer; font-weight: 600; font-size: .8rem; color: var(--gp-text-soft); }
.preview-frame-wrap[data-device="celular"] .preview-frame { height: min(100%, 820px); }
.builder__footer-nav { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--gp-border); }

/* Pestaña "Vista previa" a pantalla completa en celulares */
.mobile-switch { display: none; }
@media (max-width: 980px) {
  .mobile-switch { display: flex; position: fixed; left: 50%; bottom: calc(var(--footer-h) + 12px); transform: translateX(-50%); z-index: 2500; background: #1c1d22; border-radius: 999px; padding: 4px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); }
  .mobile-switch button { border: 0; background: transparent; color: #fff; font-weight: 700; padding: .55rem 1.1rem; border-radius: 999px; cursor: pointer; font-size: .85rem; }
  .mobile-switch button.is-active { background: #fff; color: #1c1d22; }
  .builder__body { display: block; overflow: auto; }
  .builder__panel { max-height: none; padding-bottom: 5rem; }
  .builder[data-view="edit"] .builder__preview { display: none; }
  .builder[data-view="preview"] .builder__panel { display: none; }
  .builder[data-view="preview"] .builder__preview { height: calc(100vh - var(--footer-h) - 120px); }
  .preview-frame-wrap { padding: 0 .5rem .5rem; }
}
.toast { position: fixed; left: 50%; top: 1rem; transform: translate(-50%, -20px); background: #1c1d22; color: #fff; padding: .7rem 1.1rem; border-radius: 12px; font-weight: 600; font-size: .9rem; z-index: 4000; opacity: 0; transition: all .25s; pointer-events: none; max-width: 92vw; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--gp-danger); }
@media (max-width: 560px) {
  .builder__topbar { flex-wrap: wrap; gap: .4rem .6rem; padding: .6rem .9rem; }
  .builder__name { flex: 1 1 100%; order: 3; font-size: 1rem; }
  .builder__save-badge { margin-left: auto; }
  .brand-footer { gap: .3rem; padding: 0 .5rem; }
  .brand-footer__label { font-size: .58rem; letter-spacing: .08em; }
  .brand-footer__label::before, .brand-footer__label::after { display: none; }
  .brand-footer__name { font-size: .7rem; white-space: nowrap; }
  .device-bar { padding: .5rem .6rem; gap: .3rem; }
  .device-bar__btn, .device-bar__action { padding: .35rem .7rem; font-size: .75rem; }
  .device-bar__spacer { display: none; }
  .projects-header h1 { font-size: 1.15rem; }
}

/* Galería fija (4 espacios) */
.gal-editor { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: .8rem; }
.gal-slot { background: #fafbfe; border: 1px solid var(--gp-border); border-radius: 12px; padding: .6rem; display: flex; flex-direction: column; gap: .45rem; }
.gal-slot__frame { position: relative; display: flex; align-items: center; justify-content: center; border-radius: 8px; overflow: hidden; cursor: pointer; border: 1.5px dashed #c5c8d8; background: #fff; }
.gal-slot--v .gal-slot__frame { aspect-ratio: 4 / 5; }
.gal-slot--h .gal-slot__frame { aspect-ratio: 3 / 2; }
.gal-slot.has-image .gal-slot__frame { border-style: solid; border-color: transparent; }
.gal-slot__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gal-slot__frame input { display: none; }
.gal-slot__frame:hover { border-color: var(--gp-primary); }
.gal-slot__empty { display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 700; color: var(--gp-primary); text-align: center; padding: .5rem; }
.gal-slot__empty b { font-size: 1.8rem; line-height: 1; font-weight: 400; color: #b3b6c8; }
.gal-slot__name { margin: 0; font-size: .75rem; font-weight: 700; color: var(--gp-text-soft); }
.gal-slot__warn { margin: 0; font-size: .74rem; color: #a16207; background: #fef9e7; border-radius: 6px; padding: .35rem .5rem; }
.gal-slot__actions { display: flex; gap: .2rem; flex-wrap: wrap; }
.gal-slot__actions .btn { padding: .3rem .55rem; font-size: .76rem; }
.pos-picker { display: flex; align-items: center; gap: .6rem; }
.pos-picker__label { font-size: .74rem; font-weight: 600; color: var(--gp-text-soft); }
.pos-picker__grid { display: grid; grid-template-columns: repeat(3, 22px); gap: 2px; }
.pos-picker__btn { width: 22px; height: 22px; padding: 0; border: 1px solid var(--gp-border); background: #fff; border-radius: 4px; font-size: .7rem; line-height: 1; cursor: pointer; color: var(--gp-text-soft); }
.pos-picker__btn.is-active { background: var(--gp-primary); color: #fff; border-color: var(--gp-primary); }

/* Vista previa al compartir */
.share-card { background: #fff; border: 1px solid var(--gp-border); border-radius: 14px; padding: 1.2rem; display: grid; gap: .9rem; margin-bottom: 1rem; }
.share-card h3 { margin: 0; font-size: 1.05rem; }
.share-card .req { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: #fee2e2; color: var(--gp-danger); padding: .2rem .5rem; border-radius: 99px; margin-left: .4rem; }
.share-card .req.is-ok { background: #dcfce7; color: #15803d; }
.wa-mock { background: #e7ddd3; border-radius: 12px; padding: 1rem; }
.wa-mock__bubble { background: #d9fdd3; border-radius: 10px; padding: 4px; max-width: 340px; margin-left: auto; box-shadow: 0 1px 1px rgba(0,0,0,.12); font-family: system-ui, sans-serif; }
.wa-mock__card { background: #f0f2f5; border-radius: 7px; overflow: hidden; }
.wa-mock__img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; background: #ccc; }
.wa-mock__body { padding: .5rem .65rem .6rem; }
.wa-mock__title { font-weight: 700; font-size: .86rem; color: #111b21; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wa-mock__desc { font-size: .78rem; color: #54656f; line-height: 1.3; margin-top: .15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wa-mock__site { font-size: .72rem; color: #8696a0; margin-top: .25rem; }
.wa-mock__link { font-size: .86rem; color: #027eb5; padding: .35rem .4rem .1rem; word-break: break-all; }
.wa-mock__meta { font-size: .66rem; color: #667781; text-align: right; padding: 0 .4rem .2rem; }
.share-meta { font: .74rem/1.5 ui-monospace, Menlo, monospace; background: #f7f8fc; border-radius: 8px; padding: .6rem .8rem; color: #4b5064; white-space: pre-wrap; word-break: break-all; max-height: 180px; overflow: auto; }
.share-meta summary { cursor: pointer; font-family: Inter, system-ui, sans-serif; font-weight: 600; }
.app-brand small b { color: var(--gp-primary); }


/* ======================================================================
   Identidad Digital Carmelo (azul #0d0e32 + dorado #d3ac49)
   ====================================================================== */
.btn--gold { background: var(--gp-gold-grad); color: var(--gp-primary); box-shadow: 0 12px 28px -12px rgba(211,172,73,.8); }
.btn--gold:hover { filter: brightness(1.05); }
.builder__tab.is-active { background: var(--gp-primary); color: var(--gp-gold-light); }
.builder__topbar { gap: .8rem; }
.builder__brand { width: 34px; height: 34px; border-radius: 9px; background: var(--gp-primary) url('../img/dc-mark.png') center / cover; flex: 0 0 auto; }
.device-bar__btn.is-active { color: var(--gp-gold-light); }
.option-pill.is-active { color: var(--gp-gold-light); }

/* ---------- Pantalla de inicio ---------- */
.screen--projects { max-width: none; padding: 0 0 4rem; }
.home-hero { position: relative; overflow: hidden; background: var(--gp-primary); color: #fff; isolation: isolate; }
.home-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(ellipse at 18% 50%, rgba(211,172,73,.18), transparent 55%),
  radial-gradient(ellipse at 100% 0%, rgba(252,202,85,.10), transparent 45%); }
.home-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gp-gold-grad); }
.home-hero__inner { max-width: 1100px; margin: 0 auto; padding: 2.8rem 1.5rem 3rem; display: grid; grid-template-columns: auto 1fr; gap: 2.4rem; align-items: center; }
.home-hero__logo { width: 190px; height: 190px; object-fit: contain; mix-blend-mode: lighten; /* el fondo azul del logo se funde con el del encabezado */ }
.home-hero__eyebrow { margin: 0 0 .7rem; font-size: .72rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--gp-gold); }
.home-hero h1 { margin: 0; font-family: 'Cinzel', Georgia, serif; font-weight: 600; font-size: clamp(1.7rem, 4vw, 2.7rem); line-height: 1.12; letter-spacing: .02em;
  background: linear-gradient(180deg, #fff3cf 0%, #fcca55 45%, #c99a2e 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-hero h1 span { font-size: .6em; vertical-align: super; letter-spacing: .12em; }
.home-hero__lead { margin: .9rem 0 1.6rem; max-width: 34em; color: rgba(255,255,255,.78); font-size: 1.02rem; line-height: 1.55; }
.home-hero__actions { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }
.home-hero__note { font-size: .8rem; color: rgba(255,255,255,.55); }
.home-section { max-width: 1100px; margin: 0 auto; padding: 2.4rem 1.5rem 0; }
.home-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.home-section h2 { margin: 0; font-size: 1.35rem; color: var(--gp-primary); }
.home-section h2 small { font-size: .85rem; color: var(--gp-text-soft); font-weight: 600; margin-left: .4rem; }
.home-section__sub { margin: .25rem 0 0; color: var(--gp-text-soft); font-size: .9rem; }
.home-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.home-type { position: relative; text-align: left; border: 1px solid var(--gp-border); background: #fff; border-radius: 14px; padding: 1rem 1rem .95rem; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; font: inherit; }
.home-type:hover { transform: translateY(-3px); border-color: var(--gp-gold); box-shadow: 0 14px 30px -18px rgba(13,14,50,.5); }
.home-type__icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--gp-primary); font-size: 1.35rem; margin-bottom: .7rem; box-shadow: inset 0 0 0 1px rgba(211,172,73,.45); }
.home-type strong { display: block; color: var(--gp-primary); font-size: .95rem; }
.home-type small { display: block; margin-top: .15rem; color: var(--gp-text-soft); font-size: .76rem; }
.home-empty { display: flex; align-items: center; gap: 1.2rem; background: #fff; border: 1px dashed #c9cbe0; border-radius: 16px; padding: 1.4rem 1.5rem; }
.home-empty__icon { width: 54px; height: 54px; border-radius: 50%; flex: 0 0 auto; background: var(--gp-primary) url('../img/dc-mark.png') center / cover; box-shadow: 0 0 0 4px rgba(211,172,73,.25); }
.home-empty p { margin: 0; color: var(--gp-text-soft); }
.home-empty strong { display: block; color: var(--gp-primary); margin-bottom: .15rem; }
.project-card__badge { background: var(--gp-primary); color: var(--gp-gold-light); }
@media (max-width: 720px) {
  .home-hero__inner { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 2rem 1.25rem 2.4rem; gap: 1rem; }
  .home-hero__logo { width: 150px; height: 150px; }
  .home-hero__eyebrow { letter-spacing: .16em; font-size: .66rem; }
  .home-hero__actions { justify-content: center; }
  .home-hero__lead { margin-left: auto; margin-right: auto; }
  .home-types { grid-template-columns: repeat(2, 1fr); }
  .home-section { padding: 1.8rem 1.1rem 0; }
}

/* Exportar: pasos numerados */
.export-step { display: flex; align-items: center; gap: .6rem; margin: 1.6rem 0 .7rem; font-size: 1.05rem; color: var(--gp-primary); }
.export-step span { width: 28px; height: 28px; border-radius: 50%; background: var(--gp-primary); color: var(--gp-gold-light); display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 800; flex: 0 0 auto; }
.export-card p { margin: 0 0 .4rem; }
.export-social-note { font-size: .84rem; border-radius: 10px; padding: .6rem .8rem; margin: .2rem 0 0; }
.export-social-note.is-ok { background: #dcfce7; color: #166534; }
.export-social-note.is-warn { background: #f3f4fb; color: #3b3f63; }
.share-card .req { background: #f3f4fb; color: #3b3f63; }

/* Motivo decorativo */
.motif-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .5rem; margin-bottom: .6rem; }
.motif-chip { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .7rem .4rem .6rem; border: 2px solid var(--gp-border); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; font-size: .78rem; font-weight: 600; color: var(--gp-text); text-align: center; line-height: 1.2; }
.motif-chip.is-active { border-color: var(--gp-primary); box-shadow: 0 0 0 3px rgba(13,14,50,.12); }
.motif-chip__icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--gp-primary); }
.motif-chip__auto { color: var(--gp-gold-light); font-weight: 800; font-size: 1rem; }
.motif-chip__label small { display: block; font-weight: 500; color: var(--gp-text-soft); font-size: .7rem; }
.motif-chip__icon { color: var(--gp-gold-light); }
