/* ============ Amore — tokens ============ */
@font-face { font-family: 'Cormorant'; src: url('/vendor/fonts/cormorant-garamond/files/cormorant-garamond-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('/vendor/fonts/cormorant-garamond/files/cormorant-garamond-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('/vendor/fonts/cormorant-garamond/files/cormorant-garamond-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('/vendor/fonts/cormorant-garamond/files/cormorant-garamond-latin-500-italic.woff2') format('woff2'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('/vendor/fonts/jost/files/jost-latin-300-normal.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('/vendor/fonts/jost/files/jost-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('/vendor/fonts/jost/files/jost-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Pinyon'; src: url('/vendor/fonts/pinyon-script/files/pinyon-script-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  /* Marca Amore = estilo «Rosa pasión» (editor, página de ventas y QR) */
  --cream: #FFF0F3;      /* fondo rosado muy claro */
  --paper: #FFFFFF;
  --brown: #4A1D2C;      /* vino profundo: texto */
  --peach: #E85A7A;      /* rosa pasión: acento */
  --peach-ink: #C2385B;  /* acento para texto pequeño (contraste AA) */
  --blush: #FFD6E0;
  --muted: #8A5A68;
  --gold: #E3B261;
  --line: rgba(74, 29, 44, .14);
  --ok: #3F7D5A;
  --err: #B3261E;
  --dusk: linear-gradient(180deg, #FFF0F3 0%, #FFD6E0 60%, #F7A8B8 100%);
  --display: 'Cormorant', 'Cormorant Garamond', Georgia, serif;
  --body: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --script: 'Pinyon', 'Snell Roundhand', cursive;
  --r-sm: 10px; --r-md: 16px; --r-lg: 28px;
  --tap: 52px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* El contenido enfocado no queda oculto bajo las barras fijas del editor */
html:has(.ed-bottom), html:has(.pv-actions) { scroll-padding-top: 140px; scroll-padding-bottom: 110px; }
body { margin: 0; font-family: var(--body); font-weight: 400; font-size: 1rem; line-height: 1.55; color: var(--brown); background: var(--cream); overflow-x: hidden; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--peach-ink); }
:focus-visible { outline: 3px solid var(--peach); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ============ Botones ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: var(--tap); padding: 0 1.4rem; border-radius: 999px; border: 1.5px solid var(--brown); background: transparent; color: var(--brown); font-weight: 500; font-size: 1rem; letter-spacing: .01em; cursor: pointer; text-decoration: none; transition: background .2s, color .2s, transform .1s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brown); color: var(--cream); }
.btn-primary:hover { background: #5b4440; }
.btn-peach { background: var(--peach); border-color: var(--peach); color: var(--brown); }
.btn-peach:hover { background: #E19E89; }
.btn-ghost { border-color: transparent; }
.btn-ghost:hover { background: rgba(73, 54, 51, .06); }
.btn-small { min-height: 40px; padding: 0 1rem; font-size: .92rem; }
.btn-danger { color: var(--err); border-color: rgba(163, 63, 51, .35); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }
.icon { width: 1.2em; height: 1.2em; flex: none; }

/* ============ Editor ============ */
.ed-header { position: sticky; top: 0; z-index: 30; background: rgba(248, 233, 223, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.ed-header-row { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: .75rem; padding: .65rem 16px; }
.brand { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 1.7rem; line-height: 1; color: var(--brown); text-decoration: none; }
.brand::after { content: ''; display: inline-block; width: .38em; height: .38em; margin-left: .12em; border-radius: 50%; background: var(--peach); vertical-align: .05em; }
.save-status { margin-left: auto; font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: .35rem; white-space: nowrap; }
.save-status[data-state="error"] { color: var(--err); }
.save-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.save-status[data-state="saving"] .dot { background: var(--peach); animation: pulse 1s infinite; }
.save-status[data-state="error"] .dot { background: var(--err); }
@keyframes pulse { 50% { opacity: .3; } }
.lang-select { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: .35rem .6rem; font-size: .85rem; min-height: 36px; }

.steps-nav { max-width: 720px; margin: 0 auto; padding: 0 16px .6rem; display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
.steps-nav::-webkit-scrollbar { display: none; }
.step-chip { flex: none; display: flex; align-items: center; gap: .4rem; min-height: 36px; padding: 0 .8rem 0 .35rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: .85rem; cursor: pointer; color: var(--muted); }
.step-chip .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); font-weight: 500; font-size: .8rem; color: var(--brown); }
.step-chip[aria-current="step"] { border-color: var(--brown); color: var(--brown); }
.step-chip[aria-current="step"] .n { background: var(--brown); color: var(--cream); }
.step-chip.off { text-decoration: line-through; opacity: .7; }
.step-chip.has-error .n { box-shadow: 0 0 0 2px var(--err); }

.ed-main { max-width: 720px; margin: 0 auto; padding: 1.5rem 16px 7.5rem; }
.ed-step-count { font-size: .85rem; color: var(--muted); margin: 0 0 .25rem; }
.ed-title { font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 7vw, 2.6rem); line-height: 1.05; margin: 0 0 .5rem; }
.ed-hint { margin: 0 0 1.4rem; color: var(--muted); max-width: 60ch; }
.notice { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--peach); border-radius: var(--r-sm); padding: .8rem 1rem; font-size: .93rem; margin: 0 0 1.2rem; }
.notice-err { border-left-color: var(--err); }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.1rem; margin-bottom: 1rem; }
.panel h3 { font-family: var(--display); font-weight: 600; font-size: 1.35rem; margin: 0 0 .75rem; }
.panel-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.panel-head h3 { margin: 0; flex: 1; }

.toggle-row { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; border-radius: var(--r-md); background: var(--paper); border: 1px solid var(--line); margin-bottom: 1.2rem; cursor: pointer; }
.toggle-row > span:first-child { flex: 1; font-weight: 500; }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: #D9C3B8; transition: background .2s; pointer-events: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(73,54,51,.3); transition: transform .2s; }
.switch input:checked + .track { background: var(--brown); }
.switch input:checked + .track::after { transform: translateX(22px); }
.switch input:focus-visible + .track { outline: 3px solid var(--peach); outline-offset: 2px; }
.section-body.is-off { opacity: .55; }

.field { margin-bottom: 1rem; }
.field > label, .label { display: block; font-weight: 500; font-size: .93rem; margin-bottom: .35rem; }
.field small, .help { display: block; color: var(--muted); font-size: .85rem; margin-top: .3rem; }
.input, .textarea, .select { width: 100%; min-height: 50px; padding: .75rem .9rem; border: 1px solid rgba(73,54,51,.25); border-radius: var(--r-sm); background: #fff; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--peach); box-shadow: 0 0 0 3px rgba(217, 143, 121, .25); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.textarea.letter { min-height: 340px; font-family: var(--display); font-size: 1.2rem; }
.row { display: flex; gap: .6rem; align-items: flex-end; }
.row > .grow { flex: 1; min-width: 0; }
.field-error { color: var(--err); font-size: .88rem; margin-top: .3rem; }

/* Foto (editor) */
.photo-slot { border: 1.5px dashed rgba(73,54,51,.3); border-radius: var(--r-md); background: #fff; overflow: hidden; }
.photo-slot .ph-empty { aspect-ratio: 4 / 3; display: grid; place-items: center; text-align: center; padding: 1rem; color: var(--muted); }
.photo-slot.small .ph-empty { aspect-ratio: 16 / 7; }
.photo-slot .ph-img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: var(--blush); }
.photo-slot.small .ph-img { aspect-ratio: 16 / 9; }
.photo-slot .ph-actions { display: flex; gap: .4rem; padding: .5rem; justify-content: flex-end; border-top: 1px solid var(--line); background: var(--paper); }
.photo-slot.busy { opacity: .6; pointer-events: none; }
.memories-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 600px) { .memories-grid { grid-template-columns: 1fr 1fr; } }

.item-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem; margin-bottom: .9rem; }
.item-card .item-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.item-card .item-head strong { flex: 1; font-family: var(--display); font-size: 1.2rem; font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 1.4rem 1rem; border: 1.5px dashed var(--line); border-radius: var(--r-md); margin-bottom: 1rem; }

.edit-map { height: 240px; border-radius: var(--r-sm); border: 1px solid var(--line); margin: .4rem 0; z-index: 0; }
.geo-results { list-style: none; margin: .4rem 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; overflow: hidden; }
.geo-results button { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: .7rem .8rem; min-height: 48px; cursor: pointer; font-size: .92rem; }
.geo-results li:last-child button { border-bottom: 0; }
.geo-results button:hover { background: var(--cream); }
.loc-status { font-size: .88rem; margin-top: .2rem; }
.loc-status.ok { color: var(--ok); } .loc-status.missing { color: var(--err); }

.options-list { list-style: none; padding: 0; margin: 0 0 .6rem; }
.options-list li { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.options-list .input { min-height: 46px; }
.correct-pick { flex: none; display: flex; align-items: center; gap: .3rem; font-size: .82rem; color: var(--muted); cursor: pointer; min-height: 46px; padding: 0 .3rem; }
.correct-pick input { width: 22px; height: 22px; accent-color: var(--brown); }
.icon-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--cream); }
.icon-btn[disabled] { opacity: .35; cursor: default; }

.design-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.design-picker label { position: relative; cursor: pointer; text-align: center; font-size: .85rem; }
.design-picker input { position: absolute; opacity: 0; }
.design-picker .sw { display: block; height: 56px; border-radius: var(--r-sm); border: 2px solid transparent; margin-bottom: .3rem; }
.design-picker input:checked + .sw { border-color: var(--brown); box-shadow: 0 0 0 3px var(--paper) inset; }
.design-picker input:focus-visible + .sw { outline: 3px solid var(--peach); }
.sw-rosa { background: linear-gradient(135deg, #FFD6E0, #E85A7A); }
.sw-sunset { background: linear-gradient(135deg, #F8E9DF, #D98F79); }
.sw-classic { background: #FFF8F3; border-color: var(--line) !important; background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(217,143,121,.15) 6px 7px); }
.sw-night { background: linear-gradient(135deg, #493633, #2f2220); }

.rec { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.rec-time { font-variant-numeric: tabular-nums; color: var(--err); font-weight: 500; }
audio { width: 100%; max-width: 100%; }

.lang-cards { display: grid; gap: .6rem; margin: 1rem 0 1.6rem; }
.lang-card { display: flex; align-items: center; gap: .8rem; padding: 0 1rem; min-height: 58px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--paper); cursor: pointer; font-size: 1.1rem; }
.lang-card input { width: 22px; height: 22px; accent-color: var(--brown); }
.lang-card:has(input:checked) { border-color: var(--brown); }

.ed-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 248, 243, .97); border-top: 1px solid var(--line); padding: .7rem 16px calc(.7rem + env(safe-area-inset-bottom)); }
.ed-bottom-row { max-width: 720px; margin: 0 auto; display: flex; gap: .6rem; }
.ed-bottom-row .btn { flex: 1; }

.toast { position: fixed; left: 50%; bottom: calc(5.5rem + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--brown); color: var(--cream); padding: .7rem 1.1rem; border-radius: 999px; font-size: .92rem; z-index: 60; max-width: calc(100vw - 32px); box-shadow: 0 6px 20px rgba(73,54,51,.25); }

.center-page { min-height: 100svh; display: grid; place-items: center; padding: 2rem 16px; text-align: center; background: var(--dusk); }
.center-page .card { max-width: 440px; }
.center-page h1 { font-family: var(--display); font-weight: 500; font-size: 2.2rem; line-height: 1.1; margin: .6rem 0; }

/* ============ Vista previa y QR ============ */
.pv-banner { position: sticky; top: 0; z-index: 40; background: var(--brown); color: var(--cream); font-size: .9rem; padding: .55rem 16px; text-align: center; }
.pv-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(73, 54, 51, .96); padding: .7rem 16px calc(.7rem + env(safe-area-inset-bottom)); }
.pv-actions .ed-bottom-row .btn-ghost { color: var(--cream); border-color: rgba(248,233,223,.5); }
.pv-actions .ed-bottom-row .btn-peach { flex: 1.4; }
.pv-sheet { position: fixed; inset: 0; z-index: 70; background: rgba(43, 31, 29, .55); display: flex; align-items: flex-end; justify-content: center; }
.pv-sheet .sheet { background: var(--paper); width: 100%; max-width: 560px; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 1.4rem 16px calc(1.2rem + env(safe-area-inset-bottom)); max-height: 85svh; overflow: auto; }
.pv-sheet h2 { font-family: var(--display); font-weight: 600; font-size: 1.6rem; margin: 0 0 .8rem; line-height: 1.15; }
.issue-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.issue-list li { display: flex; align-items: center; gap: .6rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.issue-list li span { flex: 1; }
.issue-list .sec { display: block; font-size: .8rem; color: var(--muted); }

.qr-page { min-height: 100svh; background: var(--dusk); padding: 2rem 16px 3rem; }
.qr-card { max-width: 480px; margin: 0 auto; background: var(--paper); border-radius: var(--r-lg); padding: 1.6rem 1.2rem; text-align: center; box-shadow: 0 20px 50px -20px rgba(73, 54, 51, .35); }
.qr-card h1 { font-family: var(--display); font-weight: 500; font-size: 2.2rem; line-height: 1.1; margin: .4rem 0 .6rem; }
.qr-img { width: min(100%, 300px); aspect-ratio: 1; margin: 1.2rem auto; border-radius: var(--r-md); background: #fff; padding: 8px; border: 1px solid var(--line); }
.qr-link { display: flex; gap: .5rem; margin: 1rem 0; }
.qr-link .input { font-size: .9rem; min-height: 48px; }
.qr-buttons { display: grid; gap: .6rem; }

/* ============ El regalo (vista previa y página pública) ============ */
.gift-bg { background: var(--dusk); min-height: 100svh; }
.gift { max-width: 600px; margin: 0 auto; background: var(--cream); min-height: 100svh; position: relative; overflow: hidden; }
@media (min-width: 640px) { .gift { box-shadow: 0 0 80px -30px rgba(73, 54, 51, .45); } }

.g-cover { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; color: #FFF6F0; isolation: isolate; }
.g-cover .cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.g-cover::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(217, 143, 121, .10) 0%, rgba(217, 143, 121, .18) 35%, rgba(73, 54, 51, .55) 68%, rgba(52, 37, 34, .88) 100%); }
.g-cover-inner { padding: 2rem 24px calc(2.2rem + env(safe-area-inset-bottom)); text-align: center; }
.g-for { font-family: var(--display); font-style: italic; font-size: 1.15rem; opacity: .92; margin: 0; }
.g-name { font-family: var(--script); font-weight: 400; font-size: clamp(3.6rem, 18vw, 5.6rem); line-height: 1.05; margin: .1rem 0 .4rem; color: #FFE7DA; text-shadow: 0 2px 24px rgba(73, 54, 51, .45); overflow-wrap: anywhere; }
.g-title { font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 7vw, 2.1rem); line-height: 1.15; margin: 0 auto .8rem; max-width: 22ch; }
.g-welcome { font-size: 1.02rem; font-weight: 300; line-height: 1.6; max-width: 34ch; margin: 0 auto 1rem; white-space: pre-line; }
.g-from { font-family: var(--display); font-style: italic; font-size: 1.15rem; margin: 0 0 1.6rem; }
.g-open { display: inline-flex; flex-direction: column; align-items: center; gap: .2rem; color: #FFF6F0; text-decoration: none; font-size: .9rem; letter-spacing: .02em; background: none; border: 0; cursor: pointer; min-height: var(--tap); }
.g-open svg { width: 22px; height: 22px; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.g-cover .cover-img, .g-cover-inner > * { animation: rise 1.1s cubic-bezier(.2, .7, .2, 1) both; }
.g-cover .cover-img { animation-name: settle; animation-duration: 1.8s; }
.g-cover-inner > :nth-child(2) { animation-delay: .25s; } .g-cover-inner > :nth-child(3) { animation-delay: .45s; }
.g-cover-inner > :nth-child(4) { animation-delay: .6s; } .g-cover-inner > :nth-child(5) { animation-delay: .75s; } .g-cover-inner > :nth-child(6) { animation-delay: 1s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes settle { from { opacity: 0; transform: scale(1.06); } }
.g-cover.no-photo { background: linear-gradient(180deg, var(--blush), var(--peach) 60%, var(--peach-ink)); }

.g-section { padding: 4rem 22px 1rem; }
.g-head { text-align: center; margin-bottom: 2rem; }
.g-head svg { width: 46px; height: 22px; color: var(--peach); margin: 0 auto .6rem; display: block; }
.g-head h2 { font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 9vw, 2.6rem); line-height: 1.05; margin: 0; }
.g-sub { text-align: center; font-family: var(--display); font-style: italic; font-size: 1.15rem; color: var(--muted); margin: -1.2rem auto 1.8rem; max-width: 30ch; }

/* Recuerdos: copias fotográficas */
.g-prints { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem .9rem; }
.g-print { margin: 0; background: #fff; padding: 8px 8px 0; border-radius: 4px; box-shadow: 0 10px 24px -14px rgba(73, 54, 51, .55); cursor: zoom-in; border: 0; text-align: left; width: 100%; }
.g-print:nth-child(4n+1) { transform: rotate(-1.6deg); } .g-print:nth-child(4n+2) { transform: rotate(1.3deg); }
.g-print:nth-child(4n+3) { transform: rotate(.8deg); } .g-print:nth-child(4n) { transform: rotate(-1deg); }
.g-print img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; background: var(--blush); }
.g-print figcaption { font-family: var(--display); font-style: italic; font-size: 1rem; line-height: 1.25; padding: .5rem .2rem .7rem; min-height: 1.2rem; color: var(--brown); }
.g-print.lead { grid-column: 1 / -1; transform: rotate(-.6deg); padding: 10px 10px 0; }
.g-print.lead img { aspect-ratio: 4 / 3; }
.g-prints.count-1 .g-print.lead img, .g-prints.count-2 .g-print img { aspect-ratio: 4 / 5; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100svh; }
.lightbox::backdrop { background: rgba(35, 25, 23, .9); }
.lightbox img { max-width: 94vw; max-height: 80svh; object-fit: contain; margin: 0 auto; border-radius: 4px; }
.lightbox p { color: #FFF6F0; text-align: center; font-family: var(--display); font-style: italic; font-size: 1.2rem; margin: .8rem 16px; }
.lightbox button { position: fixed; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 1.6rem; cursor: pointer; }

/* Carta */
.g-letter { background: var(--paper); border-radius: 6px; padding: 2rem 1.4rem 1.8rem; box-shadow: 0 18px 40px -26px rgba(73, 54, 51, .55); position: relative; }
.g-letter::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--peach), #EDBFA9); border-radius: 6px 6px 0 0; }
.g-letter-text { font-family: var(--display); font-size: 1.28rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.g-sign { font-family: var(--script); font-size: 2.3rem; text-align: right; margin: 1.2rem 0 0; color: var(--peach-ink); line-height: 1; }

/* Canción */
.g-song iframe { width: 100%; border: 0; border-radius: 14px; display: block; background: var(--blush); }
.g-song .yt { aspect-ratio: 16 / 9; height: auto; }
.g-song .note { text-align: center; font-size: .88rem; color: var(--muted); margin: .9rem 0 0; }
.g-song .open-link { display: flex; justify-content: center; margin-top: .6rem; }

/* Contador y línea del tiempo */
.g-counter { text-align: center; margin: 0 auto 2.6rem; padding: 1.6rem 1rem; border-radius: 50% / 38%; background: radial-gradient(closest-side, #FBEFE7, transparent); }
.g-counter .num { font-family: var(--display); font-weight: 500; font-size: clamp(4rem, 22vw, 5.6rem); line-height: .95; color: var(--peach-ink); font-variant-numeric: lining-nums; }
.g-counter .lbl { font-family: var(--display); font-style: italic; font-size: 1.45rem; margin-top: .2rem; }
.g-counter .since { font-size: .92rem; color: var(--muted); margin-top: .2rem; }
.g-timeline { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.g-timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--peach), rgba(217, 143, 121, .2)); }
.g-timeline li { position: relative; padding-bottom: 2rem; }
.g-timeline li::before { content: ''; position: absolute; left: -25px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--cream); border: 3px solid var(--peach); }
.g-timeline time { font-size: .85rem; color: var(--peach-ink); font-weight: 500; letter-spacing: .01em; }
.g-timeline h3 { font-family: var(--display); font-weight: 600; font-size: 1.45rem; line-height: 1.15; margin: .15rem 0 .3rem; }
.g-timeline p { margin: 0; white-space: pre-line; }
.g-timeline img { margin-top: .8rem; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-sm); background: var(--blush); }

/* Viajes */
.g-map { height: 340px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); z-index: 0; background: var(--blush); }
.g-map-fallback { display: grid; place-items: center; height: 100%; color: var(--muted); padding: 1rem; text-align: center; }
.heart-pin { width: 34px; height: 34px; display: grid; place-items: center; filter: drop-shadow(0 3px 4px rgba(73,54,51,.35)); }
.heart-pin svg { width: 34px; height: 34px; }
.leaflet-popup-content-wrapper { border-radius: 14px; font-family: var(--body); color: var(--brown); }
.leaflet-popup-content { margin: 12px 14px; min-width: 180px; }
.pop h4 { font-family: var(--display); font-size: 1.25rem; font-weight: 600; margin: 0 0 .2rem; line-height: 1.15; }
.pop time { font-size: .8rem; color: var(--peach-ink); }
.pop p { margin: .35rem 0 0; font-size: .9rem; white-space: pre-line; }
.pop img { margin-top: .5rem; border-radius: 8px; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.g-places { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 1rem; }
.g-place { display: grid; grid-template-columns: 96px 1fr; gap: .9rem; align-items: start; background: var(--paper); border-radius: var(--r-md); padding: .8rem; }
.g-place.no-img { grid-template-columns: 1fr; }
.g-place img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r-sm); background: var(--blush); }
.g-place h3 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.15; margin: 0; }
.g-place time { font-size: .82rem; color: var(--peach-ink); }
.g-place p { margin: .3rem 0 .4rem; font-size: .95rem; white-space: pre-line; }
.g-place .btn { min-height: 40px; padding: 0 .9rem; font-size: .85rem; }

/* Voz */
.g-voice { background: var(--paper); border-radius: var(--r-lg); padding: 1.6rem 1.2rem; text-align: center; }
.g-voice .wave { display: flex; gap: 4px; justify-content: center; align-items: center; height: 46px; margin-bottom: 1rem; }
.g-voice .wave i { width: 4px; border-radius: 2px; background: var(--peach); opacity: .75; }
.g-voice.playing .wave i { animation: wave 1s ease-in-out infinite alternate; }
@keyframes wave { to { transform: scaleY(.35); } }
.g-voice p { font-family: var(--display); font-style: italic; font-size: 1.25rem; margin: 0 0 1rem; }

/* Juego */
.g-quiz { background: var(--paper); border-radius: var(--r-lg); padding: 1.4rem 1.1rem; }
.g-quiz .progress { font-size: .85rem; color: var(--muted); text-align: center; margin-bottom: .4rem; }
.g-quiz .bar { height: 4px; background: var(--blush); border-radius: 2px; overflow: hidden; margin-bottom: 1.2rem; }
.g-quiz .bar i { display: block; height: 100%; background: var(--peach); transition: width .4s; }
.g-quiz h3 { font-family: var(--display); font-weight: 600; font-size: 1.6rem; line-height: 1.2; text-align: center; margin: 0 0 1.2rem; overflow-wrap: anywhere; }
.g-options { display: grid; gap: .6rem; }
.g-opt { min-height: var(--tap); padding: .75rem 1rem; border-radius: var(--r-md); border: 1.5px solid var(--line); background: #fff; text-align: left; cursor: pointer; font-size: 1rem; transition: border-color .2s, background .2s; overflow-wrap: anywhere; }
.g-opt:hover:not([disabled]) { border-color: var(--peach); }
.g-opt.wrong { border-color: var(--err); background: #FBEDEA; color: #7c2f26; animation: shake .4s; }
.g-opt.right { border-color: var(--ok); background: #EEF4EC; }
.g-opt[disabled] { cursor: default; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.g-feedback { min-height: 1.6rem; text-align: center; margin: .9rem 0 .4rem; font-weight: 500; }
.g-feedback.wrong { color: var(--err); } .g-feedback.right { color: var(--ok); }

/* Vale */
.voucher { position: relative; border-radius: 20px; padding: 2.2rem 1.5rem 1.8rem; text-align: center; overflow: hidden; }
.voucher::before, .voucher::after { content: ''; position: absolute; top: 50%; width: 28px; height: 28px; border-radius: 50%; background: var(--cream); transform: translateY(-50%); }
.voucher::before { left: -14px; } .voucher::after { right: -14px; }
.voucher .v-kicker { font-family: var(--display); font-style: italic; font-size: 1.1rem; margin: 0; }
.voucher .v-title { font-family: var(--display); font-weight: 600; font-size: clamp(1.8rem, 8vw, 2.4rem); line-height: 1.1; margin: .4rem 0 .8rem; overflow-wrap: anywhere; }
.voucher .v-desc { margin: 0 auto 1.2rem; max-width: 34ch; white-space: pre-line; }
.voucher .v-rule { border: 0; border-top: 1.5px dashed currentColor; opacity: .35; margin: 1.2rem 0; }
.voucher .v-people { display: flex; justify-content: space-around; gap: 1rem; }
.voucher .v-people span { display: block; font-size: .8rem; opacity: .75; }
.voucher .v-people strong { font-family: var(--script); font-weight: 400; font-size: 2rem; line-height: 1.1; overflow-wrap: anywhere; }
.voucher .v-msg { font-family: var(--display); font-style: italic; font-size: 1.15rem; margin: 1.2rem 0 0; white-space: pre-line; }
.voucher.d-rosa { background: linear-gradient(150deg, #FFF0F3 0%, #FFC2CF 55%, #E85A7A 100%); color: #4A1D2C; }
.voucher.d-sunset { background: linear-gradient(150deg, #FBEFE7 0%, #F0C7B3 55%, #D98F79 100%); color: var(--brown); }
.voucher.d-classic { background: #FFF8F3; color: var(--brown); border: 1.5px solid var(--peach); box-shadow: inset 0 0 0 6px #FFF8F3, inset 0 0 0 7px rgba(217, 143, 121, .5); }
.voucher.d-night { background: radial-gradient(120% 80% at 50% 0%, #6a4c47 0%, #493633 55%, #33241f 100%); color: #F8E9DF; }
.voucher.d-night .v-people strong { color: #F3C2AF; }
.voucher.reveal { animation: unveil .9s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes unveil { from { opacity: 0; transform: translateY(20px) scale(.96); } }
.v-actions { display: flex; justify-content: center; margin-top: 1.2rem; }

.g-footer { text-align: center; padding: 4rem 16px calc(3rem + env(safe-area-inset-bottom)); }
.g-footer .heart { width: 28px; color: var(--peach); margin: 0 auto .6rem; }
.g-footer p { font-family: var(--display); font-style: italic; font-size: 1.05rem; color: var(--muted); margin: 0; }
.preview-mode .g-footer { padding-bottom: 8rem; }
.preview-mode .g-cover { min-height: calc(100svh - 38px); }
.preview-mode .g-cover-inner { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom)); }

.g-state { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 2rem 16px; }
.g-state h1 { font-family: var(--display); font-weight: 500; font-size: 2rem; margin: 0 0 .6rem; }

/* ============ Impresión: solo el vale ============ */
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; }
  body.printing-voucher > *:not(#print-root) { display: none !important; }
  #print-root .voucher { margin: 0 auto; max-width: 150mm; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none !important; }
  #print-root .voucher::before, #print-root .voucher::after { background: #fff; }
  .pv-banner, .pv-actions, .v-actions { display: none !important; }
}
@media screen { #print-root { display: none; } }


/* =====================================================================
   ESTILOS DEL REGALO (7 temas). Redefinen las mismas variables, así
   todo el regalo —portada, carta, juego, mapa…— cambia de color.
   ===================================================================== */
[data-theme="atardecer"], body[data-gift-theme="atardecer"] {
  --cream: #F8E9DF; --paper: #FFF8F3; --brown: #493633; --peach: #D98F79; --peach-ink: #A9604D;
  --blush: #F0D3C4; --muted: #7A625D; --line: rgba(73,54,51,.16);
  --dusk: linear-gradient(180deg, #F8E9DF 0%, #F3D6C6 55%, #EDBFA9 100%);
}
[data-theme="rosa"], body[data-gift-theme="rosa"] {
  --cream: #FFF0F3; --paper: #FFFFFF; --brown: #4A1D2C; --peach: #E85A7A; --peach-ink: #C2385B;
  --blush: #FFD6E0; --muted: #8A5A68; --line: rgba(74,29,44,.14);
  --dusk: linear-gradient(180deg, #FFF0F3 0%, #FFD6E0 60%, #F7A8B8 100%);
}
[data-theme="noche"], body[data-gift-theme="noche"] {
  --cream: #14121B; --paper: #1F1C29; --brown: #F3E9DA; --peach: #D9B46A; --peach-ink: #E8C987;
  --blush: #2B2636; --muted: #B3A79A; --line: rgba(243,233,218,.14);
  --dusk: radial-gradient(120% 80% at 50% 0%, #2A2440 0%, #14121B 70%);
  color-scheme: dark;
}
[data-theme="lavanda"], body[data-gift-theme="lavanda"] {
  --cream: #F3EFFA; --paper: #FFFFFF; --brown: #2F2545; --peach: #8E7CC3; --peach-ink: #6B58A8;
  --blush: #E3DBF5; --muted: #6F6688; --line: rgba(47,37,69,.14);
  --dusk: linear-gradient(180deg, #F3EFFA 0%, #E3DBF5 60%, #C9B9EC 100%);
}
[data-theme="oceano"], body[data-gift-theme="oceano"] {
  --cream: #EEF6F8; --paper: #FFFFFF; --brown: #12343B; --peach: #2A8C9E; --peach-ink: #1D6E7D;
  --blush: #D3EBF0; --muted: #4F6F75; --line: rgba(18,52,59,.14);
  --dusk: linear-gradient(180deg, #EEF6F8 0%, #D3EBF0 60%, #A9D6DF 100%);
}
[data-theme="navidad"], body[data-gift-theme="navidad"] {
  --cream: #0F2A22; --paper: #163A2F; --brown: #F6EFE3; --peach: #E05A4C; --peach-ink: #F2D08A;
  --blush: #1E4A3C; --muted: #B9C8BE; --line: rgba(246,239,227,.14);
  --dusk: radial-gradient(120% 80% at 50% 0%, #1E4A3C 0%, #0F2A22 70%);
  color-scheme: dark;
}
[data-theme="fiesta"], body[data-gift-theme="fiesta"] {
  --cream: #FFF8EC; --paper: #FFFFFF; --brown: #2B2A4C; --peach: #FF6B5B; --peach-ink: #D9432F;
  --blush: #FFE3B3; --muted: #6A6886; --line: rgba(43,42,76,.14);
  --dusk: linear-gradient(160deg, #FFF8EC 0%, #FFE3B3 55%, #FFC2B8 100%);
}
body[data-gift-theme] { background: var(--dusk); color: var(--brown); }
.gift { color: var(--brown); background: var(--cream); }

/* Elementos que antes tenían colores fijos */
.g-opt { background: var(--paper); color: var(--brown); border-color: var(--line); }
.g-opt.wrong { background: #FBEDEA; color: #7c2f26; }
.g-opt.right { background: #EEF4EC; color: #234a2f; }
.g-quiz .bar, .g-voice .wave i { background: var(--blush); }
.g-voice .wave i { background: var(--peach); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { color: #2E2422; }
.pop time { color: #A9604D; }
.g-map { background: var(--blush); }

/* Efectos de partículas */
.g-particles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 32; pointer-events: none; }
html.g-locked, html.g-locked body { overflow: hidden; }

/* ---------- Sobre de apertura ---------- */
.g-intro {
  position: fixed; inset: 0; z-index: 34; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem 24px calc(2rem + env(safe-area-inset-bottom)); text-align: center; background: var(--dusk); color: var(--brown);
  transition: opacity .7s ease, visibility .7s;
}
.preview-mode .g-intro { position: fixed; top: 38px; }
.g-intro.gone { opacity: 0; visibility: hidden; }
.g-intro-kicker { font-family: var(--display); font-style: italic; font-size: 1.3rem; color: var(--peach-ink); margin: 0 0 1.4rem; }
.g-intro-title { font-family: var(--display); font-weight: 500; font-size: clamp(2.4rem, 11vw, 3.4rem); line-height: 1.05; margin: 1.8rem 0 .4rem; }
.g-intro-from { font-family: var(--script); font-size: 2rem; color: var(--peach-ink); margin: 0 0 1.8rem; line-height: 1.2; }
.g-intro-open {
  min-height: 56px; padding: 0 2.2rem; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--peach); color: #fff; font: 500 1.05rem var(--body); letter-spacing: .02em;
  box-shadow: 0 12px 30px -10px var(--peach); animation: glow 2.4s ease-in-out infinite;
}
[data-theme="noche"] .g-intro-open, [data-theme="navidad"] .g-intro-open { color: #1a1410; }
@keyframes glow { 50% { box-shadow: 0 12px 40px -6px var(--peach); transform: translateY(-1px); } }

.env { position: relative; width: 240px; height: 160px; cursor: pointer; animation: floaty 3.2s ease-in-out infinite; perspective: 800px; }
@keyframes floaty { 50% { transform: translateY(-8px) rotate(-1deg); } }
.env-back, .env-front, .env-flap { position: absolute; inset: 0; border-radius: 10px; }
.env-back { background: color-mix(in srgb, var(--peach) 78%, #000 22%); }
.env-letter {
  position: absolute; left: 14px; right: 14px; top: 12px; bottom: 10px; background: #FFFDF9; border-radius: 6px;
  display: grid; place-items: center; transition: transform .8s cubic-bezier(.2,.8,.2,1) .25s; box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.env-letter span { font-family: var(--script); font-size: 2rem; color: #A9604D; opacity: 0; transition: opacity .5s .6s; }
.env-front { background: var(--peach); clip-path: polygon(0 28%, 50% 62%, 100% 28%, 100% 100%, 0 100%); box-shadow: 0 18px 40px -18px rgba(0,0,0,.45); }
.env-flap {
  background: color-mix(in srgb, var(--peach) 88%, #fff 12%); clip-path: polygon(0 0, 100% 0, 50% 62%);
  transform-origin: top center; transition: transform .7s cubic-bezier(.4,.1,.2,1); z-index: 2;
}
.env-seal {
  position: absolute; left: 50%; top: 52%; width: 54px; height: 54px; margin: -27px 0 0 -27px; z-index: 3; border-radius: 50%;
  display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #F2D08A, #B9862F); color: #5a3a10;
  box-shadow: 0 4px 10px rgba(0,0,0,.3), inset 0 0 0 3px rgba(255,255,255,.25); transition: transform .45s, opacity .45s;
}
.env-icon { width: 26px; height: 26px; }
.g-intro.opening .env { animation: none; }
.g-intro.opening .env-seal { transform: scale(1.6); opacity: 0; }
.g-intro.opening .env-flap { transform: rotateX(180deg); z-index: 0; }
.g-intro.opening .env-letter { transform: translateY(-70px); z-index: 1; }
.g-intro.opening .env-letter span { opacity: 1; }

/* ---------- Portada ---------- */
.g-for { font-size: 1.25rem; letter-spacing: .02em; }
.g-cover.revealed .cover-img { animation: kenburns 22s ease-out both; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }

/* ---------- Cabeceras de sección ---------- */
.g-head .g-head-icon { display: block; width: 34px; height: 34px; margin: 0 auto .5rem; color: var(--peach); }
.g-head .g-head-icon svg { width: 34px; height: 34px; }
.g-head h2 { color: var(--brown); }

/* ---------- Carrusel de recuerdos ---------- */
.g-carousel {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 -22px; padding: 10px 11% 22px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.g-carousel::-webkit-scrollbar { display: none; }
.g-carousel .g-print { flex: 0 0 78%; scroll-snap-align: center; background: #FFFDF9; padding: 10px 10px 0; transform: none; }
.g-carousel .g-print:nth-child(odd) { transform: rotate(-1.4deg); }
.g-carousel .g-print:nth-child(even) { transform: rotate(1.2deg); }
.g-carousel .g-print img { aspect-ratio: 4 / 5; }
.g-carousel .g-print figcaption { color: #4A1D2C; }
.g-dots { display: flex; justify-content: center; gap: 7px; }
.g-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background .3s, width .3s; }
.g-dots i.on { background: var(--peach); width: 20px; border-radius: 4px; }
.lightbox .lb-close { position: fixed; top: 12px; right: 12px; }
.lightbox .lb-nav { position: fixed; top: 50%; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 1.8rem; cursor: pointer; transform: translateY(-50%); }
.lightbox .lb-nav.prev { left: 10px; } .lightbox .lb-nav.next { right: 10px; }
.lightbox button.lb-nav, .lightbox button.lb-close { right: auto; }
.lightbox .lb-close { right: 12px; left: auto; }

/* ---------- Vinilo ---------- */
.g-vinyl { display: flex; justify-content: center; margin: -.4rem 0 1.4rem; }
.g-vinyl .disc {
  width: 200px; height: 200px; border-radius: 50%; display: grid; place-items: center;
  background: repeating-radial-gradient(circle, #1b1416 0 2px, #2a2124 2px 4px); box-shadow: 0 18px 40px -16px rgba(0,0,0,.6), inset 0 0 0 6px #120d0e;
  animation: spin 9s linear infinite;
}
.g-vinyl .disc img, .g-vinyl .disc-label { width: 42%; height: 42%; border-radius: 50%; object-fit: cover; border: 3px solid var(--peach); }
.g-vinyl .disc-label { display: grid; place-items: center; background: var(--peach); color: #fff; }
.g-vinyl .disc-label svg { width: 40%; height: 40%; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Contador ---------- */
.g-counter .beat { display: block; width: 30px; height: 30px; margin: 0 auto .4rem; color: var(--peach); animation: beat 1.6s ease-in-out infinite; }
.g-counter .beat svg { width: 30px; height: 30px; fill: currentColor; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(1); } 45% { transform: scale(1.12); } }
.g-counter { background: radial-gradient(closest-side, var(--paper), transparent); }
.g-counter .num { color: var(--peach-ink); }

/* ---------- Mensaje de voz ---------- */
.g-play { width: 68px; height: 68px; border-radius: 50%; border: 0; background: var(--peach); display: grid; place-items: center; margin: 0 auto 1rem; cursor: pointer; box-shadow: 0 10px 24px -10px var(--peach); }
.g-play .tri { width: 0; height: 0; border-left: 20px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent; margin-left: 5px; }
.g-voice.playing .g-play .tri { width: 18px; height: 22px; border: 0; margin: 0; background: linear-gradient(90deg, #fff 0 6px, transparent 6px 12px, #fff 12px 18px); }
.g-voice audio { height: 40px; opacity: .85; }

/* ---------- Final ---------- */
.g-finale { text-align: center; padding: 4.5rem 24px 1rem; }
.g-finale-icon { display: block; width: 44px; height: 44px; margin: 0 auto 1rem; color: var(--peach); }
.g-finale-icon svg { width: 44px; height: 44px; }
.g-finale-text { font-family: var(--script); font-size: clamp(3rem, 14vw, 4.4rem); line-height: 1.1; color: var(--peach-ink); margin: 0 auto .6rem; max-width: 12ch; }
.g-finale-from { font-family: var(--display); font-style: italic; font-size: 1.3rem; margin: 0 0 1.6rem; }
.g-footer { padding-top: 2rem; }

/* ---------- Aparición al desplazarse ---------- */
.reveal-on-scroll { opacity: 0; transform: translateY(22px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal-on-scroll.in { opacity: 1; transform: none; }
@media print { .reveal-on-scroll { opacity: 1 !important; transform: none !important; } .g-intro, .g-particles { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .reveal-on-scroll { opacity: 1; transform: none; } }

/* ---------- Editor: ocasiones y estilos ---------- */
.occ-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .4rem 0 1.6rem; }
.occ-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 96px; padding: .7rem .4rem; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--paper); cursor: pointer; text-align: center; font-size: .86rem; line-height: 1.15; transition: border-color .2s, transform .15s, background .2s; }
.occ-card input { position: absolute; opacity: 0; pointer-events: none; }
.occ-card .occ-icon { width: 30px; height: 30px; color: var(--peach); }
.occ-card:has(input:checked) { border-color: var(--peach); background: #FFF0F3; box-shadow: 0 0 0 3px rgba(228,101,126,.18); }
.occ-card:has(input:focus-visible) { outline: 3px solid var(--peach); outline-offset: 2px; }
.occ-card:active { transform: scale(.97); }
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin: .4rem 0 1.6rem; }
@media (min-width: 560px) { .theme-grid { grid-template-columns: repeat(3, 1fr); } }
.theme-card { position: relative; border-radius: var(--r-md); border: 1.5px solid var(--line); overflow: hidden; cursor: pointer; background: var(--paper); }
.theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.theme-card .mini { display: block; height: 86px; position: relative; padding: 12px; }
.theme-card .mini b { display: block; font-family: var(--display); font-size: 1.5rem; font-weight: 500; line-height: 1; }
.theme-card .mini i { position: absolute; right: 12px; bottom: 12px; width: 34px; height: 12px; border-radius: 6px; }
.theme-card .mini u { position: absolute; left: 12px; bottom: 12px; width: 46%; height: 18px; border-radius: 4px; text-decoration: none; }
.theme-card .name { display: block; padding: .5rem .7rem; font-size: .86rem; font-weight: 500; }
.theme-card:has(input:checked) { border-color: var(--peach); box-shadow: 0 0 0 3px rgba(228,101,126,.22); }
.theme-card:has(input:focus-visible) { outline: 3px solid var(--peach); outline-offset: 2px; }
.ed-progress { height: 3px; background: var(--blush); }
.ed-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--peach), var(--gold)); transition: width .4s; }

/* ---------- v5: vídeo, reproductor de canción, muchas fotos, tarjeta del QR ---------- */
.g-video { border-radius: var(--r-lg); overflow: hidden; background: #000; box-shadow: 0 24px 50px -28px rgba(74,29,44,.6); }
.g-video-el { display: block; width: 100%; max-height: 78vh; background: #000; }
.ed-video { width: 100%; max-height: 360px; border-radius: var(--r-md); background: #000; }
.g-dots.g-count { font-size: .9rem; color: var(--muted); letter-spacing: .04em; }
.g-player { background: var(--paper); border-radius: var(--r-lg); padding: 1.6rem 1.2rem 1.3rem; text-align: center; box-shadow: 0 20px 44px -30px rgba(74,29,44,.5); }
.g-player .g-vinyl { margin: 0 0 1rem; }
.g-player .g-vinyl .disc { animation-play-state: paused; }
.g-player .g-vinyl.spinning .disc { animation-play-state: running; }
.g-player-title { font-family: var(--display); font-style: italic; font-size: 1.35rem; margin: 0 0 1rem; }
.g-player-row { display: flex; align-items: center; gap: 1rem; }
.g-player .g-play { margin: 0; flex: none; width: 58px; height: 58px; }
.g-player.playing .g-play .tri { width: 18px; height: 22px; border: 0; margin: 0; background: linear-gradient(90deg, #fff 0 6px, transparent 6px 12px, #fff 12px 18px); }
.g-player-track { flex: 1; min-width: 0; }
.g-seek { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--peach) var(--p, 0%), var(--blush) var(--p, 0%)); margin: 0; }
.g-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--peach); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.g-seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--peach); border: 3px solid #fff; }
.g-player-times { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: .35rem; }
.photos-bar { display: grid; gap: .6rem; margin-bottom: 1rem; }
.photos-bar .help { margin: 0; }
.song-src { margin-bottom: 1.2rem; }

/* Tarjeta A6 del QR (pantalla y papel) */
@page amoreCard { size: 105mm 148mm; margin: 0; }
#card-print-root { page: amoreCard; }
.qr-print-card { display: none; }
@media print {
  body.printing-card > *:not(#card-print-root) { display: none !important; }
  body.printing-card #card-print-root { display: block; }
  body.printing-card { background: #fff; }
  .qr-print-card { display: flex !important; }
}
.qr-print-card { width: 105mm; height: 148mm; flex-direction: column; align-items: center; justify-content: center; gap: 4mm; padding: 10mm 8mm; text-align: center;
  background: linear-gradient(180deg, #FFF0F3 0%, #FFD6E0 100%); color: #4A1D2C; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.qr-print-card .c-kicker { font-family: var(--script); font-size: 20pt; color: #C2385B; margin: 0; line-height: 1.1; }
.qr-print-card .c-name { font-family: var(--display); font-size: 24pt; font-weight: 500; margin: 0; line-height: 1.05; }
.qr-print-card img { width: 58mm; height: 58mm; background: #fff; padding: 3mm; border-radius: 4mm; }
.qr-print-card .c-scan { font-weight: 500; letter-spacing: .18em; text-transform: uppercase; font-size: 9pt; margin: 0; }
.qr-print-card .c-from { font-family: var(--display); font-style: italic; font-size: 13pt; margin: 0; }
.qr-print-card .c-heart { width: 7mm; height: 7mm; color: #E85A7A; }

/* ---------- v5: portada estilo revista ---------- */
.g-cover { justify-content: space-between; }
.g-cover::before { background:
  linear-gradient(180deg, rgba(28, 12, 18, .62) 0%, rgba(28, 12, 18, .38) 22%, rgba(28, 12, 18, .08) 46%, rgba(28, 12, 18, 0) 60%, rgba(28, 12, 18, .25) 82%, rgba(20, 8, 12, .7) 100%); }
.g-topbar { display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 20px 0; position: relative; z-index: 2; }
.g-topbar-name { font-family: var(--display); font-size: 1.35rem; font-weight: 500; letter-spacing: .01em; display: inline-flex; align-items: center; gap: .5rem; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.g-topbar-heart { display: inline-flex; width: 18px; height: 18px; color: #F6C9CF; }
.g-topbar-heart svg { width: 18px; height: 18px; }
.g-menu-btn { width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; background: none; border: 0; cursor: pointer; padding: 0; }
.g-menu-btn i { display: block; width: 22px; height: 2px; border-radius: 1px; background: #FFF6F0; box-shadow: 0 1px 6px rgba(0,0,0,.3); }
.g-menu { position: absolute; top: calc(62px + env(safe-area-inset-top)); right: 14px; z-index: 5; background: rgba(255,255,255,.96); color: var(--brown); border-radius: 16px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.45); padding: .4rem; min-width: 220px; backdrop-filter: blur(8px); }
.g-menu ul { list-style: none; margin: 0; padding: 0; }
.g-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: .7rem .9rem; border-radius: 10px; font-family: var(--display); font-size: 1.15rem; cursor: pointer; color: inherit; }
.g-menu button:hover, .g-menu button:focus-visible { background: var(--blush); }
.g-cover .g-cover-inner { flex: 1; padding: clamp(2.2rem, 9vh, 4.5rem) 26px 2rem; }
.g-cover .g-for { font-family: var(--body); font-style: normal; font-weight: 400; font-size: 1.05rem; letter-spacing: .02em; opacity: .95; margin: 0 0 .9rem; text-shadow: 0 1px 10px rgba(0,0,0,.35); }
.g-cover .g-title { font-family: var(--display); font-weight: 500; font-size: clamp(2.6rem, 12vw, 3.6rem); line-height: 1.05; letter-spacing: -.005em; max-width: 13ch; margin: 0 auto 1.1rem; text-shadow: 0 2px 22px rgba(0,0,0,.35); overflow-wrap: anywhere; }
.g-cover .g-welcome { font-size: 1.02rem; font-weight: 400; line-height: 1.55; max-width: 30ch; opacity: .95; text-shadow: 0 1px 10px rgba(0,0,0,.4); margin: 0 auto .8rem; }
.g-cover .g-from { font-size: 1.05rem; opacity: .9; margin: 0; text-shadow: 0 1px 10px rgba(0,0,0,.4); }
.g-cover .g-open { align-self: center; gap: .55rem; padding: 0 0 calc(1.6rem + env(safe-area-inset-bottom)); font-size: 1rem; letter-spacing: .01em; text-shadow: 0 1px 10px rgba(0,0,0,.45); }
.g-open-line { display: block; width: 190px; height: 1px; background: rgba(255,246,240,.75); }
.g-open-arrow { display: block; width: 24px; height: 24px; animation: nudge 2.4s ease-in-out infinite; }
.g-open-arrow svg { width: 24px; height: 24px; animation: none; }
.preview-mode .g-cover .g-open { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
.preview-mode .g-cover-inner { padding-bottom: 2rem; }
.g-cover .g-topbar, .g-cover .g-open { animation: rise 1.1s cubic-bezier(.2, .7, .2, 1) both; }
.g-cover .g-open { animation-delay: 1.1s; }

/* Mensaje final dentro del apartado sorpresa, encima del vale */
.g-section .g-finale { padding: 2.2rem 0 1rem; }
.g-section .g-finale-top { display: block; margin: -.4rem auto 1.4rem; }
