/* ============ 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 {
  --cream: #F8E9DF;      /* crema rosado */
  --peach: #D98F79;      /* melocotón */
  --brown: #493633;      /* marrón oscuro */
  --paper: #FFF8F3;      /* papel cálido */
  --blush: #F0D3C4;      /* rubor intermedio */
  --peach-ink: #A9604D;  /* melocotón oscurecido para texto pequeño (contraste AA) */
  --muted: #7A625D;
  --line: rgba(73, 54, 51, .16);
  --ok: #5E7D5A;
  --err: #A33F33;
  --dusk: linear-gradient(180deg, #F8E9DF 0%, #F3D6C6 55%, #EDBFA9 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(3, 1fr); gap: .5rem; }
.design-picker label { 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-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, #EDBFA9, #D98F79 60%, #8a5a4e); }

.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-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; } }
