/* UI del Creador de Entregas (identidad Digital Carmelo: azul #0d0e32 + dorado #d3ac49).
   Nada de este archivo viaja a las entregas exportadas. */

:root {
  --gp-bg: #f4f5fa;
  --gp-surface: #ffffff;
  --gp-surface-2: #f8f8fc;
  --gp-border: #e2e4ef;
  --gp-text: #171923;
  --gp-soft: #5f647a;
  --gp-primary: #0d0e32;
  --gp-primary-2: #1c1e5a;
  --gp-gold: #d3ac49;
  --gp-gold-light: #fcca55;
  --gp-gold-grad: linear-gradient(135deg, #f7dc8a 0%, #d3ac49 45%, #a8812a 100%);
  --gp-danger: #d23a55;
  --gp-ok: #178a4c;
  --gp-warn: #a86a00;
  --gp-radius: 14px;
  --gp-radius-sm: 9px;
  --gp-shadow: 0 10px 30px -12px rgba(13, 14, 50, .18);
  --topbar-h: 60px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--gp-bg); color: var(--gp-text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
a { color: var(--gp-primary-2); }
:focus-visible { outline: 2px solid var(--gp-gold); outline-offset: 2px; }
.ic-wrap { display: inline-grid; place-items: center; flex: none; }
.ic-wrap .ic, .ic { width: 1.15em; height: 1.15em; }
.hide-sm { }
@media (max-width: 560px) { .hide-sm { display: none; } }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 40px; padding: .55rem 1.05rem; border-radius: var(--gp-radius-sm); border: 1px solid var(--gp-border); background: var(--gp-surface); color: var(--gp-text); font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .12s, box-shadow .15s; white-space: nowrap; }
.btn:hover { border-color: #c5c8da; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--gp-primary); border-color: var(--gp-primary); color: #fff; }
.btn--primary:hover { background: var(--gp-primary-2); border-color: var(--gp-primary-2); }
.btn--gold { background: var(--gp-gold-grad); border: 0; color: var(--gp-primary); box-shadow: 0 10px 24px -12px rgba(211, 172, 73, .9); }
.btn--gold:hover { filter: brightness(1.05); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--gp-soft); }
.btn--ghost:hover { background: rgba(13, 14, 50, .06); border-color: transparent; }
.btn--danger { color: var(--gp-danger); }
.btn--danger-solid { background: var(--gp-danger); border-color: var(--gp-danger); color: #fff; }
.btn--small { min-height: 34px; padding: .35rem .75rem; font-size: .82rem; }
.btn--lg { min-height: 50px; padding: .8rem 1.5rem; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--outline-light { background: transparent; border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn--outline-light:hover { border-color: var(--gp-gold); color: var(--gp-gold-light); }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--gp-soft); cursor: pointer; }
.icon-btn:hover:not(:disabled) { background: rgba(13, 14, 50, .07); color: var(--gp-text); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn--danger:hover:not(:disabled) { color: var(--gp-danger); background: rgba(210, 58, 85, .08); }
.icon-btn .ic { width: 18px; height: 18px; }

/* ---------- Home ---------- */
.home { min-height: 100%; display: flex; flex-direction: column; }
.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 15% 50%, rgba(211, 172, 73, .2), transparent 55%), radial-gradient(ellipse at 100% 0%, rgba(252, 202, 85, .1), 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: 1120px; 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: 170px; height: 170px; object-fit: contain; mix-blend-mode: lighten; }
.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.6rem); line-height: 1.15; background: linear-gradient(180deg, #fff3cf 0%, #fcca55 45%, #c99a2e 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-hero h1 span { display: block; font-size: .62em; letter-spacing: .16em; }
.home-hero__lead { margin: .9rem 0 1.6rem; max-width: 36em; color: rgba(255, 255, 255, .8); font-size: 1.02rem; }
.home-hero__actions { display: flex; gap: .8rem; flex-wrap: wrap; }
@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: 120px; height: 120px; }
  .home-hero__actions { justify-content: center; }
}
.home-section { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 2.2rem 1.5rem 3rem; }
.home-section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.2rem; }
.home-section h2 { margin: 0; font-size: 1.35rem; color: var(--gp-primary); }
.home-count { color: var(--gp-soft); font-size: .88rem; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.2rem; }
.pcard { background: var(--gp-surface); border-radius: var(--gp-radius); overflow: hidden; box-shadow: var(--gp-shadow); display: flex; flex-direction: column; }
.pcard__open { all: unset; cursor: pointer; display: block; }
.pcard__open:focus-visible { outline: 2px solid var(--gp-gold); outline-offset: -2px; }
.pcard__thumb { position: relative; aspect-ratio: 16/10; background: linear-gradient(135deg, #1c1e5a, #0d0e32); display: grid; place-items: center; overflow: hidden; }
.pcard__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pcard:hover .pcard__thumb img { transform: scale(1.04); }
.pcard__ph { color: var(--gp-gold); }
.pcard__ph .ic { width: 40px; height: 40px; }
.pcard__body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.pcard__title { margin: 0 0 .2rem; font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; }
.pcard__meta { margin: 0; color: var(--gp-soft); font-size: .8rem; }
.pcard__actions { margin-top: auto; padding-top: .8rem; display: flex; align-items: center; gap: .25rem; }
.pcard__actions .btn { margin-right: auto; }
.empty { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 3rem 1rem; text-align: center; color: var(--gp-soft); background: var(--gp-surface); border-radius: var(--gp-radius); border: 1.5px dashed var(--gp-border); }
.empty .ic { width: 32px; height: 32px; color: var(--gp-gold); }
.home-note { display: flex; gap: .6rem; align-items: flex-start; margin-top: 2rem; padding: .9rem 1rem; background: var(--gp-surface); border-radius: var(--gp-radius-sm); color: var(--gp-soft); font-size: .86rem; }
.brand-footer { display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap; padding: .75rem 1rem; 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, .85); font-weight: 600; }
.brand-footer__name { font-weight: 700; font-size: .82rem; color: var(--gp-gold-light); }
.brand-footer__name a { color: inherit; text-decoration: none; }
.brand-footer__name a:hover { text-decoration: underline; }

/* ---------- Diálogos y asistente ---------- */
.dlg { border: 0; padding: 0; border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(13, 14, 50, .5); width: min(460px, calc(100vw - 2rem)); background: var(--gp-surface); color: var(--gp-text); }
.dlg::backdrop { background: rgba(13, 14, 50, .55); backdrop-filter: blur(3px); }
.dlg__box { padding: 1.5rem; display: flex; flex-direction: column; gap: .8rem; }
.dlg__title { margin: 0; font-size: 1.15rem; }
.dlg__msg { margin: 0; color: var(--gp-soft); }
.dlg__actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .5rem; }
.dlg--wizard { width: min(760px, calc(100vw - 1.5rem)); max-height: calc(100vh - 2rem); max-height: calc(100dvh - 1.5rem); }
.wiz { display: flex; flex-direction: column; max-height: inherit; }
.wiz__head { position: relative; padding: 1.4rem 1.5rem .6rem; }
.wiz__steps { display: flex; gap: .35rem; margin-bottom: .8rem; }
.wiz__steps span { width: 36px; height: 4px; border-radius: 4px; background: var(--gp-border); }
.wiz__steps span.is-on { background: var(--gp-gold); }
.wiz__title { margin: 0; font-size: 1.35rem; color: var(--gp-primary); }
.wiz__close { position: absolute; top: .9rem; right: .9rem; }
.wiz__body { padding: .6rem 1.5rem 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: .45rem; }
.wiz__q { margin-top: 1rem !important; }
.wiz__foot { display: flex; justify-content: space-between; gap: .6rem; padding: 1rem 1.5rem; border-top: 1px solid var(--gp-border); background: var(--gp-surface-2); border-radius: 0 0 18px 18px; }
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .55rem; }
.type { display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .95rem .5rem; border-radius: 12px; border: 1.5px solid var(--gp-border); background: var(--gp-surface); cursor: pointer; font-weight: 600; font-size: .86rem; text-align: center; transition: border-color .15s, background .15s; }
.type:hover { border-color: #c5c8da; }
.type.is-active { border-color: var(--gp-gold); background: #fffaf0; box-shadow: 0 0 0 3px rgba(211, 172, 73, .2); }
.type__ic { color: var(--gp-primary); }
.type__ic .ic { width: 26px; height: 26px; }
.badge { display: inline-block; margin-left: .4rem; padding: .1rem .45rem; border-radius: 99px; background: var(--gp-gold); color: var(--gp-primary); font-size: .66rem; font-style: normal; font-weight: 700; letter-spacing: .04em; vertical-align: middle; }

/* ---------- Editor ---------- */
.editor { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.topbar { height: var(--topbar-h); flex: none; display: flex; align-items: center; gap: .6rem; padding: 0 .9rem; background: var(--gp-primary); color: #fff; border-bottom: 2px solid var(--gp-gold); }
.topbar__back { color: rgba(255, 255, 255, .8); }
.topbar__back:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.topbar__mark { border-radius: 6px; }
.topbar__name { flex: 1; min-width: 0; max-width: 420px; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: .4rem .6rem; color: #fff; font-weight: 700; font-size: 1rem; }
.topbar__name:hover { border-color: rgba(255, 255, 255, .2); }
.topbar__name:focus { outline: none; border-color: var(--gp-gold); background: rgba(255, 255, 255, .06); }
.savebadge { margin-left: auto; font-size: .76rem; color: rgba(255, 255, 255, .6); white-space: nowrap; }
.savebadge.is-saving { color: var(--gp-gold-light); }
@media (max-width: 560px) { .savebadge { display: none; } .topbar__mark { display: none; } }

.editor__body { flex: 1; min-height: 0; display: grid; grid-template-columns: 92px minmax(340px, 440px) 1fr; }
.tabs { background: var(--gp-surface); border-right: 1px solid var(--gp-border); display: flex; flex-direction: column; gap: .2rem; padding: .7rem .45rem; overflow-y: auto; }
.tab { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .65rem .2rem; border: 0; border-radius: 10px; background: transparent; color: var(--gp-soft); font-size: .72rem; font-weight: 600; cursor: pointer; }
.tab .ic { width: 21px; height: 21px; }
.tab:hover { background: var(--gp-bg); color: var(--gp-text); }
.tab.is-active { background: var(--gp-primary); color: #fff; }
.tab.is-active .ic { color: var(--gp-gold-light); }
.tab[data-tab="exportar"] { margin-top: auto; }
.panelhost { overflow-y: auto; background: var(--gp-bg); scroll-behavior: smooth; }
.panel { padding: 1.4rem 1.3rem 4rem; display: flex; flex-direction: column; gap: 1rem; }
.panel__head { margin-bottom: .2rem; }
.panel__title { margin: 0; font-size: 1.3rem; color: var(--gp-primary); }
.panel__lead { margin: .3rem 0 0; color: var(--gp-soft); font-size: .88rem; }
.panel__sub { margin: .8rem 0 -.3rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gp-soft); }
.stack { display: flex; flex-direction: column; gap: .9rem; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
@media (max-width: 420px) { .row-2 { grid-template-columns: 1fr; } }

/* Campos */
.fld { display: flex; flex-direction: column; gap: .35rem; position: relative; border-radius: 10px; transition: box-shadow .3s, background .3s; }
.fld.is-flash, .sec.is-flash, .lcard.is-flash { box-shadow: 0 0 0 3px rgba(211, 172, 73, .55); }
.fld__label { font-weight: 600; font-size: .84rem; color: var(--gp-text); }
.fld__hint { margin: 0; color: var(--gp-soft); font-size: .78rem; }
.fld__count { position: absolute; right: 0; top: 0; font-size: .72rem; color: var(--gp-soft); }
.fld__count.is-over { color: var(--gp-warn); font-weight: 700; }
.fld__msg { margin: 0; display: none; align-items: flex-start; gap: .35rem; font-size: .78rem; }
.fld__msg .ic { width: 15px; height: 15px; margin-top: 1px; }
.fld__msg.is-error, .fld__msg.is-warn, .fld__msg.is-ok, .fld__msg.is-info { display: flex; }
.fld__msg.is-error { color: var(--gp-danger); }
.fld__msg.is-warn { color: var(--gp-warn); }
.fld__msg.is-ok { color: var(--gp-ok); }
.fld__msg.is-info { color: var(--gp-soft); }
.inp { width: 100%; min-height: 42px; padding: .6rem .75rem; border: 1px solid var(--gp-border); border-radius: var(--gp-radius-sm); background: var(--gp-surface); font-size: .93rem; transition: border-color .15s, box-shadow .15s; }
.inp:hover { border-color: #c9ccdc; }
.inp:focus { outline: none; border-color: var(--gp-primary-2); box-shadow: 0 0 0 3px rgba(28, 30, 90, .12); }
textarea.inp { resize: vertical; line-height: 1.5; }
select.inp { cursor: pointer; }
.inp--hex { width: 88px; min-height: 34px; padding: .35rem .5rem; font-family: ui-monospace, monospace; font-size: .8rem; }

.chips { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.chips__label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gp-soft); margin-right: .2rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .65rem; border-radius: 99px; border: 1px solid var(--gp-border); background: var(--gp-surface); font-size: .76rem; cursor: pointer; color: var(--gp-text); text-align: left; }
.chip .ic { width: 13px; height: 13px; color: var(--gp-gold); }
.chip:hover { border-color: var(--gp-gold); background: #fffaf0; }

/* Switch */
.fld--inline { gap: .2rem; }
.sw { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-size: .88rem; font-weight: 500; }
.sw__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw__track { position: relative; width: 38px; height: 22px; border-radius: 99px; background: #cfd2e0; transition: background .2s; flex: none; }
.sw__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.sw__input:checked + .sw__track { background: var(--gp-primary); }
.sw__input:checked + .sw__track::after { transform: translateX(16px); }
.sw__input:focus-visible + .sw__track { outline: 2px solid var(--gp-gold); outline-offset: 2px; }

/* Segmentado */
.seg { display: flex; flex-wrap: wrap; gap: .3rem; padding: .25rem; background: #e9eaf3; border-radius: 11px; }
.seg__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg__btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 36px; padding: .35rem .7rem; border-radius: 8px; font-size: .82rem; font-weight: 600; color: var(--gp-soft); cursor: pointer; text-align: center; }
.seg__input:checked + .seg__btn { background: var(--gp-surface); color: var(--gp-primary); box-shadow: 0 1px 4px rgba(13, 14, 50, .12); }
.seg__input:focus-visible + .seg__btn { outline: 2px solid var(--gp-gold); }

.range-row { display: flex; align-items: center; gap: .8rem; }
.range { flex: 1; accent-color: var(--gp-primary); }
.range__out { min-width: 3em; font-size: .82rem; color: var(--gp-soft); text-align: right; }

/* Acordeón */
.acc { background: var(--gp-surface); border: 1px solid var(--gp-border); border-radius: var(--gp-radius-sm); }
.acc__sum { display: flex; align-items: center; gap: .55rem; padding: .8rem .95rem; cursor: pointer; font-weight: 600; font-size: .88rem; list-style: none; }
.acc__sum::-webkit-details-marker { display: none; }
.acc__sum > span:nth-child(2), .acc--flat .acc__sum > span:first-child { flex: 1; }
.acc__sum > .ic-wrap:last-child { transition: transform .2s; color: var(--gp-soft); }
.acc[open] > .acc__sum > .ic-wrap:last-child { transform: rotate(180deg); }
.acc__body { padding: .2rem .95rem 1rem; display: flex; flex-direction: column; gap: .85rem; }
.acc--flat { background: transparent; border-style: dashed; }

/* Notas */
.note { display: flex; gap: .55rem; align-items: flex-start; padding: .7rem .8rem; border-radius: var(--gp-radius-sm); font-size: .8rem; line-height: 1.45; background: #eef0fa; color: #33375c; }
.note .ic { width: 16px; height: 16px; margin-top: 1px; }
.note--warn { background: #fff5e2; color: #6d4700; }
.note--ok { background: #e8f6ee; color: #135f36; }

/* Estilo */
.tplgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.tplgrid--wiz { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tplcard { display: flex; flex-direction: column; gap: .2rem; padding: .5rem .5rem .75rem; border-radius: 12px; border: 1.5px solid var(--gp-border); background: var(--gp-surface); cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; }
.tplcard:hover { border-color: #c5c8da; }
.tplcard.is-active { border-color: var(--gp-gold); box-shadow: 0 0 0 3px rgba(211, 172, 73, .22); }
.tplcard__name { font-weight: 700; font-size: .9rem; margin-top: .45rem; padding: 0 .2rem; }
.tplcard__tag, .tplcard__ideal { font-size: .74rem; color: var(--gp-soft); padding: 0 .2rem; line-height: 1.35; }
.tplcard__ideal { font-size: .7rem; opacity: .85; }

/* Muestras de estilo (como en el Generador de Invitaciones) */
.mock { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; background: var(--m-bg); padding: .8rem .5rem; text-align: center; }
.mock__kicker { font-family: var(--m-label); font-size: .56rem; letter-spacing: .24em; text-transform: uppercase; color: var(--m-acc); font-weight: 600; }
.mock__name { font-family: var(--m-display); font-style: normal; font-size: 1.45rem; line-height: 1.05; color: var(--m-name); overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mock__line { display: block; width: 38%; height: 1px; background: var(--m-pri); margin-top: .2rem; }
.mock--glam .mock__name { text-shadow: 0 0 14px var(--m-pri); }
.mock--glam, .mock--premium { box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.mock--premium .mock__line { height: 0; border-top: 1px solid var(--m-pri); width: 50%; }
.mock--elegante::after, .mock--premium::after { content: ''; position: absolute; inset: 6px; border: 1px solid color-mix(in srgb, var(--m-acc) 55%, transparent); pointer-events: none; }
.mock--romantico .mock__name, .mock--glam .mock__name { font-size: 1.7rem; }
.mock--minimal .mock__name { text-transform: uppercase; letter-spacing: .06em; font-size: 1.15rem; }
.mock--infantil .mock__name { font-weight: 700; text-shadow: 2px 2px 0 color-mix(in srgb, var(--m-acc) 60%, transparent); }
.mock--botanico::before { content: ''; position: absolute; right: -8px; bottom: -6px; width: 44px; height: 56px; background: var(--m-pri); opacity: .35; border-radius: 100% 0 100% 0; transform: rotate(-20deg); }

.palettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: .45rem; }
.pal { display: flex; align-items: center; gap: .55rem; padding: .5rem .55rem; border: 1.5px solid var(--gp-border); border-radius: 10px; background: var(--gp-surface); cursor: pointer; text-align: left; }
.pal.is-active { border-color: var(--gp-gold); box-shadow: 0 0 0 3px rgba(211, 172, 73, .2); }
.pal__dots { display: flex; flex: none; }
.pal__dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.1); margin-left: -6px; }
.pal__dots i:first-child { margin-left: 0; }
.pal__dots--custom { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#f66, #fc6, #6c6, #6cf, #96f, #f66); color: #fff; }
.pal__name { font-size: .78rem; font-weight: 600; line-height: 1.2; }
.motifs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .4rem; }
.motif { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .6rem .3rem; border: 1.5px solid var(--gp-border); border-radius: 10px; background: var(--gp-surface); cursor: pointer; color: var(--gp-primary); }
.motif.is-active { border-color: var(--gp-gold); background: #fffaf0; box-shadow: 0 0 0 3px rgba(211,172,73,.2); }
.motif__icon { display: grid; place-items: center; height: 26px; color: #b0892f; }
.motif__auto { font-weight: 700; font-size: .95rem; color: var(--gp-soft); }
.motif__label { font-size: .68rem; font-weight: 600; text-align: center; line-height: 1.2; }
.pills { display: flex; flex-wrap: wrap; gap: .35rem; }
.pill { padding: .45rem .85rem; border-radius: 99px; border: 1.5px solid var(--gp-border); background: var(--gp-surface); font-size: .8rem; font-weight: 600; cursor: pointer; color: var(--gp-text); }
.pill.is-active { border-color: var(--gp-primary); background: var(--gp-primary); color: #fff; }
.colors-wrap { display: flex; flex-direction: column; gap: .7rem; padding: .9rem; background: var(--gp-surface); border: 1px solid var(--gp-border); border-radius: var(--gp-radius-sm); }
.colors { display: grid; grid-template-columns: 1fr; gap: .6rem; }
.color { display: flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 600; }
.color__input { width: 38px; height: 38px; padding: 0; border: 1px solid var(--gp-border); border-radius: 50%; overflow: hidden; cursor: pointer; background: none; flex: none; }
.color__input::-webkit-color-swatch-wrapper { padding: 0; }
.color__input::-webkit-color-swatch { border: 0; border-radius: 50%; }
.color__label { flex: 1; }
.colors__report { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.fontpairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .5rem; }
.fontpair { display: flex; flex-direction: column; gap: .15rem; padding: .8rem; border-radius: 12px; border: 1.5px solid var(--gp-border); background: var(--gp-surface); cursor: pointer; text-align: left; }
.fontpair.is-active { border-color: var(--gp-gold); box-shadow: 0 0 0 3px rgba(211, 172, 73, .2); }
.fontpair__display { font-size: 1.8rem; line-height: 1.15; }
.fontpair__name { font-size: .78rem; font-weight: 700; }
.fontpair__body { font-size: .76rem; color: var(--gp-soft); }

/* Uploader */
.upl { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: flex-start; position: relative; }
.upl > .fld__label, .upl > .fld__hint { width: 100%; }
.upl.is-busy::after { content: 'Optimizando…'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .85); border-radius: 12px; font-weight: 600; color: var(--gp-primary); }
.upl__zone { width: 100%; display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1.4rem 1rem; border: 1.5px dashed #c1c5d8; border-radius: 12px; background: var(--gp-surface); cursor: pointer; color: var(--gp-soft); font-size: .8rem; text-align: center; transition: border-color .15s, background .15s; }
.upl__zone strong { color: var(--gp-primary); font-size: .92rem; }
.upl__zone .ic { width: 26px; height: 26px; color: var(--gp-gold); }
.upl__zone:hover, .upl__zone.is-drag, .is-drag { border-color: var(--gp-gold); background: #fffaf0; }
.upl__zone.is-busy { opacity: .6; pointer-events: none; }
.upl__thumb { position: relative; width: 132px; aspect-ratio: 4/5; border-radius: 10px; overflow: hidden; background: #e7e8f0; flex: none; }
.upl__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upl__thumb--logo { aspect-ratio: auto; height: 90px; width: 160px; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0/14px 14px; display: grid; place-items: center; }
.upl__thumb--logo img { object-fit: contain; padding: .5rem; }
.upl__thumb--focal { width: 100%; aspect-ratio: auto; cursor: crosshair; background: #111; }
.upl__full { width: 100%; height: auto !important; max-height: 320px; object-fit: contain !important; }
.upl__focal { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, .35), inset 0 0 0 5px rgba(211, 172, 73, .9); pointer-events: none; transition: left .15s, top .15s; }
.upl__side { display: flex; flex-direction: column; gap: .5rem; }
.upl__meta { margin: 0; font-size: .74rem; color: var(--gp-soft); }
.upl__actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.upl--compact .upl__thumb { width: 96px; aspect-ratio: 16/10; }
.upl--compact .upl__zone { padding: .9rem; }

/* Secciones */
.secs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.sec { background: var(--gp-surface); border: 1px solid var(--gp-border); border-radius: 12px; transition: box-shadow .2s, opacity .2s; }
.sec.is-off .sec__head { opacity: .55; }
.sec.is-open { border-color: #c6c9dc; box-shadow: var(--gp-shadow); }
.sec.is-dragging { opacity: .7; box-shadow: 0 12px 30px -10px rgba(13, 14, 50, .35); }
.sec__head { display: flex; align-items: center; gap: .35rem; padding: .35rem .45rem .35rem .3rem; min-height: 52px; }
.sec__grip { display: grid; place-items: center; width: 24px; height: 36px; color: #a4a8bf; cursor: grab; touch-action: none; }
.sec__grip .ic { width: 16px; height: 16px; }
.sec__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #f0f1f8; color: var(--gp-primary); flex: none; }
.sec__icon .ic { width: 17px; height: 17px; }
.sec__name { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: .5rem .3rem; font-weight: 600; font-size: .9rem; cursor: pointer; }
.sec__name small { font-weight: 400; color: var(--gp-soft); }
.sec__move { display: flex; }
.sec__lock { display: grid; place-items: center; width: 38px; color: #a4a8bf; }
.sec__lock .ic { width: 16px; height: 16px; }
.sw--mini { padding: 0 .3rem; }
.sec__body { padding: .5rem 1rem 1.1rem; border-top: 1px solid var(--gp-border); }
.sec:first-child .sec__grip, .sec:last-child .sec__grip { visibility: hidden; }

.gthumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: .5rem; }
.gthumb { position: relative; aspect-ratio: 1; border-radius: 9px; overflow: hidden; background: #e7e8f0; }
.gthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gthumb__n { position: absolute; top: 4px; left: 4px; min-width: 20px; height: 20px; border-radius: 10px; background: rgba(13, 14, 50, .75); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
.gthumb__actions { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; background: linear-gradient(0deg, rgba(0, 0, 0, .65), transparent); padding: .2rem .1rem .1rem; }
.gthumb__actions .icon-btn { width: 26px; height: 26px; color: #fff; }
.gthumb__actions .icon-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .2); color: #fff; }
.gthumb__actions .icon-btn .ic { width: 15px; height: 15px; }
.gthumb--add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; border: 1.5px dashed #c1c5d8; background: var(--gp-surface); cursor: pointer; color: var(--gp-primary); font-weight: 600; font-size: .74rem; }
.gthumb--add .ic { width: 22px; height: 22px; color: var(--gp-gold); }
.gthumb--add.is-busy { opacity: .6; pointer-events: none; }

.links { display: flex; flex-direction: column; gap: .45rem; }
.lcard { border: 1px solid var(--gp-border); border-radius: 11px; background: var(--gp-surface-2); }
.lcard__tip { display: flex; flex-wrap: wrap; gap: .5rem; padding: .2rem .8rem .8rem; }
.lcard__tip > .note, .lcard__tip > div:first-child { flex-basis: 100%; }
.lcard.is-off { opacity: .6; }
.lcard.is-open { background: var(--gp-surface); border-color: #c6c9dc; }
.lcard__head { display: flex; align-items: center; gap: .4rem; padding: .35rem .35rem .35rem .6rem; }
.lcard__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff8e6; color: #8a6412; flex: none; }
.lcard__icon .ic { width: 17px; height: 17px; }
.lcard__title { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; border: 0; background: none; padding: .35rem .2rem; cursor: pointer; text-align: left; }
.lcard__title strong { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.lcard__status { font-size: .72rem; color: var(--gp-soft); }
.lcard__status.is-ok { color: var(--gp-ok); }
.lcard__status.is-warn { color: var(--gp-warn); }
.lcard__status.is-error { color: var(--gp-danger); }
.lcard__tools { display: flex; }
.lcard__body { padding: .6rem .9rem 1rem; border-top: 1px solid var(--gp-border); }
.lcard__actions { display: flex; gap: .4rem; justify-content: space-between; }
.iconpick { display: flex; flex-wrap: wrap; gap: .3rem; }
.iconpick__btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--gp-border); background: var(--gp-surface); cursor: pointer; color: var(--gp-soft); }
.iconpick__btn .ic { width: 18px; height: 18px; }
.iconpick__btn.is-active { border-color: var(--gp-gold); color: var(--gp-primary); background: #fffaf0; }
.addrow { display: flex; gap: .5rem; }
.addrow .inp { flex: 1; }
.music__file { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .88rem; overflow-wrap: anywhere; }
.music__file small { color: var(--gp-soft); font-weight: 400; margin-left: auto; white-space: nowrap; }
.music__player { width: 100%; height: 40px; }

/* Compartir */
.ogcard-wrap { background: #e6ddd4; padding: 1rem; border-radius: 14px; }
.ogcard { max-width: 330px; margin-left: auto; background: #dcf8c6; border-radius: 10px; padding: 4px; box-shadow: 0 1px 1px rgba(0, 0, 0, .12); font-family: system-ui, sans-serif; }
.ogcard__img { position: relative; aspect-ratio: 1200/630; border-radius: 7px 7px 0 0; overflow: hidden; background: #ccd; }
.ogcard__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ogcard__img.is-missing img { filter: grayscale(1) opacity(.35); }
.ogcard__img span { position: absolute; inset: 0; display: grid; place-items: center; font-size: .78rem; font-weight: 600; color: #555; }
.ogcard__body { display: flex; flex-direction: column; gap: .15rem; padding: .5rem .6rem .6rem; background: #cfe9ba; border-radius: 0 0 7px 7px; }
.ogcard__body strong { font-size: .86rem; color: #111; }
.ogcard__body span { font-size: .76rem; color: #333; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ogcard__body small { font-size: .7rem; color: #667; }
.wa-preview { overflow-wrap: anywhere; }

/* Exportar */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.check { display: flex; align-items: flex-start; gap: .5rem; padding: .6rem .7rem; border-radius: 9px; background: var(--gp-surface); font-size: .82rem; }
.check > span:nth-child(2) { flex: 1; }
.check .btn { margin: -.2rem -.2rem -.2rem 0; }
.check .ic { width: 16px; height: 16px; margin-top: 1px; }
.check.is-ok .ic-wrap { color: var(--gp-ok); }
.check.is-warn .ic-wrap { color: var(--gp-warn); }
.check.is-error { background: #fdecef; }
.check.is-error .ic-wrap { color: var(--gp-danger); }
.check.is-info .ic-wrap { color: var(--gp-soft); }
.fmt { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem; background: var(--gp-surface); border: 1px solid var(--gp-border); border-radius: 12px; }
.fmt__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--gp-primary); color: var(--gp-gold-light); flex: none; }
.fmt strong { font-size: .9rem; overflow-wrap: anywhere; }
.fmt p { margin: .2rem 0; font-size: .8rem; color: var(--gp-soft); }
.fmt small { font-size: .74rem; color: var(--gp-soft); }
.steps { margin-top: .4rem; padding: 1rem 1.1rem; border-radius: 12px; background: #e8f6ee; color: #144a2d; }
.steps h4 { display: flex; gap: .4rem; align-items: center; margin: 0 0 .5rem; font-size: .92rem; }
.steps ol { margin: 0 0 .6rem; padding-left: 1.2rem; font-size: .85rem; display: flex; flex-direction: column; gap: .3rem; }
.steps a { color: #0b5f33; font-weight: 700; }

/* Preview */
.pvcol { display: flex; flex-direction: column; min-width: 0; background: #e3e4ee; border-left: 1px solid var(--gp-border); }
.pvbar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem .8rem; background: var(--gp-surface); border-bottom: 1px solid var(--gp-border); flex-wrap: wrap; }
.pvbar__hint { font-size: .76rem; color: var(--gp-soft); text-align: center; flex: 1; }
.seg-mini { display: flex; gap: 2px; padding: 3px; background: #eceef5; border-radius: 9px; }
.seg-mini__btn { display: inline-flex; align-items: center; gap: .3rem; min-width: 34px; height: 30px; justify-content: center; border: 0; border-radius: 7px; background: transparent; color: var(--gp-soft); cursor: pointer; font-size: .78rem; font-weight: 600; padding: 0 .4rem; }
.seg-mini__btn .ic { width: 17px; height: 17px; }
.seg-mini__btn--text { padding: 0 .65rem; }
.seg-mini__btn.is-active { background: var(--gp-surface); color: var(--gp-primary); box-shadow: 0 1px 3px rgba(13, 14, 50, .15); }
.pv-stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 16px; }
.pv-shell { position: relative; overflow: hidden; background: #fff; box-shadow: 0 20px 50px -20px rgba(13, 14, 50, .45); border-radius: 6px; flex: none; }
.pv-shell[data-device="mobile"] { border-radius: 28px; box-shadow: 0 0 0 7px #16172a, 0 25px 50px -18px rgba(13, 14, 50, .6); }
.pv-shell[data-device="tablet"] { border-radius: 18px; box-shadow: 0 0 0 8px #16172a, 0 25px 50px -18px rgba(13, 14, 50, .6); }
.pv-frame { display: block; border: 0; transform-origin: 0 0; background: #fff; }

.mswitch { display: none; }

/* Responsive del editor */
@media (max-width: 1180px) {
  .editor__body { grid-template-columns: 76px minmax(320px, 400px) 1fr; }
  .tab { font-size: .66rem; }
}
@media (max-width: 900px) {
  .editor__body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .tabs { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--gp-border); padding: .35rem; overflow-x: auto; gap: .15rem; }
  .tab { flex: 1 0 auto; padding: .45rem .55rem; min-width: 64px; }
  .tab[data-tab="exportar"] { margin-top: 0; }
  .editor__body[data-view="edit"] .pvcol { display: none; }
  .editor__body[data-view="preview"] .panelhost { display: none; }
  .editor__body[data-view="preview"] .tabs { display: none; }
  .editor__body[data-view="preview"] { grid-template-rows: 1fr; }
  .pvcol { border-left: 0; }
  .mswitch { display: flex; flex: none; gap: .4rem; padding: .5rem .6rem calc(.5rem + env(safe-area-inset-bottom)); background: var(--gp-primary); }
  .mswitch__btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: rgba(255, 255, 255, .75); font-weight: 600; cursor: pointer; }
  .mswitch__btn.is-active { background: rgba(255, 255, 255, .12); color: var(--gp-gold-light); }
  .pvbar__hint { display: none; }
  .panel { padding: 1.1rem 1rem 3rem; }
}

/* Toasts */
.toasts { position: fixed; z-index: 1000; left: 50%; bottom: 1.2rem; transform: translateX(-50%); display: flex; flex-direction: column; gap: .4rem; align-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { display: flex; align-items: flex-start; gap: .55rem; padding: .7rem 1rem; border-radius: 11px; background: var(--gp-primary); color: #fff; font-size: .86rem; box-shadow: 0 14px 30px -10px rgba(13, 14, 50, .5); opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; pointer-events: auto; max-width: 100%; }
.toast.is-in { opacity: 1; transform: none; }
.toast .ic { width: 17px; height: 17px; margin-top: 1px; color: var(--gp-gold-light); flex: none; }
.toast--error { background: #7d1a2c; }
.toast--error .ic, .toast--warn .ic { color: #ffd27a; }
.toast--warn { background: #5b3d00; }
@media (max-width: 900px) { .toasts { bottom: 5rem; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Pie común de la suite: autoría y derechos */
.suite-by{font-weight:600;font-style:italic;color:rgba(252,202,85,.8);margin-left:.35em;white-space:nowrap}
.suite-legal{flex-basis:100%;display:block;width:100%;text-align:center;font-size:.64rem;line-height:1.45;letter-spacing:.02em;text-transform:none;font-weight:500;color:rgba(255,255,255,.45);margin-top:.15rem}

/* Botones de entrega: el link se pega directo, sin abrir la tarjeta */
.lcard__quick { padding: .1rem .9rem .3rem; }
.lcard__more { display: block; margin: 0 .9rem .7rem auto; border: 0; background: none; padding: .2rem 0; font: inherit; font-size: .82rem; font-weight: 600; color: var(--gp-text-soft, #5b5d78); text-decoration: underline; cursor: pointer; }
