/* =====================================================================
   Nuestro álbum · estilo editorial minimalista
   Títulos: Bodoni Moda · Texto: EB Garamond · Paleta vino / rosa / papel
   ===================================================================== */
:root {
  --bg: #f7f2ee;          /* papel */
  --paper: #fffdfb;       /* página */
  --red: #8f1430;         /* vino */
  --rose: #e2a9b6;        /* rosa medio */
  --pink: #f6e2e6;        /* rosa claro */
  --ink: #3a1620;         /* texto */
  --muted: #9b7d85;
  --line: #ecdfe2;
  --danger: #b3261e;
  --serif-display: 'Bodoni Moda', 'Didot', 'Times New Roman', serif;
  --serif: 'EB Garamond', Garamond, Georgia, serif;
  --shadow: 0 1px 2px rgba(58, 22, 32, .04), 0 14px 34px rgba(58, 22, 32, .07);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* "only": evita que Chrome/Android con modo oscuro forzado inviertan los colores */
  color-scheme: only light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--serif); font-size: 18px; font-weight: 500; line-height: 1.5; }
body { min-height: 100dvh; overscroll-behavior-y: none; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
i { font-style: italic; }

.ic { width: 22px; height: 22px; display: block; flex: none; }
.muted { color: var(--muted); font-style: italic; }
.small { font-size: .85rem; color: var(--muted); font-style: italic; line-height: 1.45; margin: 10px 0 0; }
.kicker { margin: 0; font-family: var(--serif); font-size: .7rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--red); }

#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; padding: 0 18px calc(var(--safe-b) + 120px); }
#app.v-login { padding-bottom: 0; }

/* ---------- Adornos ---------- */
.orn-line { display: flex; align-items: center; justify-content: center; gap: 10px; width: 42%; margin: 14px auto 0; color: var(--rose); }
.orn-line::before, .orn-line::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.orn-line .ic { width: 9px; height: 9px; }
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; width: 46%; margin: 34px auto; color: var(--rose); }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.divider .ic { width: 22px; height: 22px; }
.divider .duo { display: flex; gap: 2px; }
.divider .duo .ic { width: 13px; height: 13px; }
.the-end { text-align: center; color: var(--muted); margin: 40px 0 0; font-size: .95rem; }

/* ---------- Portada ---------- */
.cover { position: relative; margin: 0 -18px; height: min(86dvh, 720px); min-height: 460px; overflow: hidden; background: var(--pink); }
.cover-photo { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-photo img { width: 100%; height: 100%; object-fit: cover; }
.cover.has .cover-photo::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(40, 10, 18, .74) 0%, rgba(40, 10, 18, .28) 38%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, .16) 100%); }
.cover-empty { display: grid; justify-items: center; align-content: center; gap: 12px; height: 72%; color: var(--red); font-style: italic; font-size: .95rem; }
.cover-empty .ic { width: 46px; height: 46px; stroke-width: 1.1; }
.cover-hearts { position: absolute; inset: 0; pointer-events: none; }
.ch { position: absolute; display: block; transform: rotate(var(--r)); animation: float 7s ease-in-out infinite; }
.ch .ic { width: 100%; height: auto; }
.ch.a { color: #fff; opacity: .92; }
.ch.b { color: var(--pink); }
.ch.c { color: var(--rose); }
.cover:not(.has) .ch.a { color: var(--rose); }
.cover:not(.has) .ch.b { color: #fff; }
.cover-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 28px 38px; text-align: center; pointer-events: none; color: var(--red); }
.cover.has .cover-text { color: #fff; }
.cover-text .kicker { color: inherit; opacity: .92; }
.cover-title { margin: 12px 0 10px; font-family: var(--serif-display); font-weight: 600; font-size: clamp(2.6rem, 13vw, 3.6rem); line-height: .92; text-transform: uppercase; letter-spacing: -.01em; }
.cover-title i, .login-title i, .letter-title i, .page-head h2 i, .empty-state h2 i {
  display: block; font-family: var(--serif-display); font-style: italic; font-weight: 500; text-transform: none; font-size: .56em; letter-spacing: 0; margin-bottom: .08em; }
.cover-phrase { margin: 0 auto 14px; max-width: 86%; font-style: italic; font-size: 1.08rem; line-height: 1.4; }
.cover-menu { position: absolute; top: calc(var(--safe-t) + 14px); right: 14px; z-index: 2; }

@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

/* ---------- Botones de ícono ---------- */
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--red);
  background: rgba(255, 253, 251, .82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
.icon-btn:active { transform: scale(.94); }

/* ---------- Pestañas ---------- */
.tabs { display: flex; justify-content: center; gap: 32px; margin: 26px 0 26px; scroll-margin-top: 10px; }
.tabs button { padding: 10px 2px; font-size: .7rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid transparent; }
.tabs button.on { color: var(--red); border-color: var(--red); }

/* ---------- Página ---------- */
.book { display: block; }
.page { position: relative; background: var(--paper); padding: 44px 22px 34px; box-shadow: var(--shadow); scroll-margin-top: 16px; }
.page-more { position: absolute; top: 8px; right: 8px; z-index: 3; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.page-more:active { background: var(--pink); }
.page-head { text-align: center; margin-bottom: 18px; }
.page-head h2 { margin: 10px 0 0; font-family: var(--serif-display); font-weight: 600; font-size: 1.85rem; line-height: 1.02; text-transform: uppercase; color: var(--red); letter-spacing: -.005em; }

.desc { display: block; width: 100%; margin: 0 0 26px; padding: 2px 8px; text-align: center; font-style: italic; font-size: 1.04rem; line-height: 1.55; color: var(--ink); border-radius: 8px; }
.desc p { margin: 0 0 .7em; }
.desc p:last-child { margin-bottom: 0; }
.desc:active { background: var(--pink); }
.desc.empty { color: var(--muted); font-size: .92rem; padding: 14px; border: 1px dashed var(--line); }

/* ---------- Huecos y marcos ---------- */
.slots { display: grid; gap: 16px; }
.slot { margin: 0; min-width: 0; position: relative; }
.frame { display: block; width: 100%; background: var(--pink); }
.frame:active { transform: scale(.98); }
.pic { display: grid; place-items: center; width: 100%; aspect-ratio: var(--ar, 3 / 4); overflow: hidden; background: var(--pink); color: var(--rose); }
.pic img { width: 100%; height: 100%; object-fit: cover; }
.pic > .ic { width: 26%; max-width: 38px; height: auto; stroke-width: 1.2; }

.f-polaroid .frame { background: #fff; padding: 6px 6px 24px; box-shadow: 0 1px 2px rgba(58, 22, 32, .06), 0 8px 18px rgba(58, 22, 32, .08); }
.f-gingham .frame { padding: 7px; background: repeating-conic-gradient(var(--rose) 0 25%, #fff 0 50%) 0 0 / 10px 10px; }
.f-plain .frame { background: var(--pink); }
.f-film .frame { background: transparent; }
.f-tape .frame { position: relative; background: #fff; padding: 6px; box-shadow: 0 6px 16px rgba(58, 22, 32, .08); }
.f-tape .frame::before { content: ''; position: absolute; top: -9px; left: 50%; z-index: 2; width: 58px; height: 18px; transform: translateX(-50%) rotate(-4deg);
  background: rgba(226, 169, 182, .55); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.f-arch .frame { padding: 5px; border: 1px solid var(--rose); border-radius: 999px 999px 3px 3px; background: transparent; }
.f-arch .pic { border-radius: 999px 999px 2px 2px; }
.f-circle .frame { padding: 5px; border-radius: 50%; background: #fff; box-shadow: 0 8px 20px rgba(58, 22, 32, .1); }
.f-circle .pic { border-radius: 50%; --ar: 1 / 1; }
.f-heart .frame { background: transparent; }
.f-heart .pic { --ar: 1 / 1;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.6S1.6 15.2 1 8.6C.6 4.7 3.2 2.4 6.3 2.4c2.4 0 4.3 1.4 5.7 3.5 1.4-2.1 3.3-3.5 5.7-3.5 3.1 0 5.7 2.3 5.3 6.2-.6 6.6-11 13-11 13z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.6S1.6 15.2 1 8.6C.6 4.7 3.2 2.4 6.3 2.4c2.4 0 4.3 1.4 5.7 3.5 1.4-2.1 3.3-3.5 5.7-3.5 3.1 0 5.7 2.3 5.3 6.2-.6 6.6-11 13-11 13z'/%3E%3C/svg%3E") center / contain no-repeat; }

figcaption button { display: block; width: 100%; min-height: 30px; margin-top: 8px; padding: 2px; font-style: italic; font-size: .9rem; line-height: 1.3; text-align: center; color: var(--ink); }
figcaption button.empty { color: var(--muted); }
figcaption button.empty:not(:empty) { min-height: 22px; }

/* ---------- Los 19 diseños ---------- */
.l-magazine1 { --ar: 4 / 5; }
.l-magazine1 figcaption button { margin-top: 14px; font-family: var(--serif-display); font-size: 1.3rem; line-height: 1.25; color: var(--red); }
.l-magazine1 figcaption button.empty { font-family: var(--serif); font-size: .95rem; color: var(--muted); }

.l-polaroid2 { grid-template-columns: 1fr 1fr; }
.l-polaroid2 .s0 { transform: rotate(-1.5deg); }
.l-polaroid2 .s1 { transform: rotate(1.5deg); margin-top: 18px; }
.l-polaroid4 { grid-template-columns: 1fr 1fr; --ar: 1 / 1; }

.l-heartframe { width: 88%; margin: 0 auto; }
.l-heartframe .slot::before { content: ''; position: absolute; inset: -4% -4% 0; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, var(--pink), transparent); }

/* Corazón: dos lóbulos (fila 1), cuerpo (2), se angosta (3) y punta (4) */
.l-heart13 { grid-template-columns: repeat(5, 1fr); gap: 5px; --ar: 1 / 1; width: 94%; margin: 0 auto; }
.l-heart13 .s0 { grid-area: 1 / 1; } .l-heart13 .s1 { grid-area: 1 / 2; } .l-heart13 .s2 { grid-area: 1 / 4; } .l-heart13 .s3 { grid-area: 1 / 5; }
.l-heart13 .s4 { grid-area: 2 / 1; } .l-heart13 .s5 { grid-area: 2 / 2; } .l-heart13 .s6 { grid-area: 2 / 3; } .l-heart13 .s7 { grid-area: 2 / 4; } .l-heart13 .s8 { grid-area: 2 / 5; }
.l-heart13 .s9 { grid-area: 3 / 2; } .l-heart13 .s10 { grid-area: 3 / 3; } .l-heart13 .s11 { grid-area: 3 / 4; }
.l-heart13 .s12 { grid-area: 4 / 3; }
.l-heart13 .s0 .pic { border-top-left-radius: 50%; } .l-heart13 .s3 .pic { border-top-right-radius: 50%; }
.l-heart13 .s1 .pic { border-top-right-radius: 40%; } .l-heart13 .s2 .pic { border-top-left-radius: 40%; }
.l-heart13 .s12 .pic { border-bottom-left-radius: 50%; border-bottom-right-radius: 50%; }
.l-heart13 .pic > .ic { width: 40%; }
.l-heart13 .frame { background: transparent; }

.l-film3 { position: relative; width: 66%; margin: 0 auto; gap: 10px; padding: 12px 28px; background: var(--red); --ar: 4 / 3; }
.l-film3::before, .l-film3::after { content: ''; position: absolute; top: 0; bottom: 0; width: 9px;
  background: repeating-linear-gradient(to bottom, transparent 0 6px, var(--paper) 6px 13px, transparent 13px 19px); }
.l-film3::before { left: 10px; }
.l-film3::after { right: 10px; }
.l-film3 .pic { background: #f9eaee; }

.l-gingham4 { grid-template-columns: 1fr 1fr; gap: 18px; }

.l-scatter5 { position: relative; display: block; aspect-ratio: 1 / 1.22; --ar: 1 / 1; }
.l-scatter5 .slot { position: absolute; width: 50%; }
.l-scatter5 .s0 { left: 0; top: 2%; transform: rotate(-7deg); }
.l-scatter5 .s1 { right: 0; top: 0; transform: rotate(6deg); }
.l-scatter5 .s2 { left: 25%; top: 30%; transform: rotate(-2deg); z-index: 2; }
.l-scatter5 .s3 { left: 1%; top: 58%; transform: rotate(5deg); }
.l-scatter5 .s4 { right: 1%; top: 57%; transform: rotate(-5deg); z-index: 1; }

.l-tape3 { grid-template-columns: 1fr 1fr; gap: 24px 16px; padding-top: 8px; }
.l-tape3 .s0 { grid-column: 1 / -1; width: 86%; margin: 0 auto; --ar: 3 / 2; transform: rotate(-1deg); }
.l-tape3 .s1 { transform: rotate(-2deg); }
.l-tape3 .s2 { transform: rotate(2deg); margin-top: 14px; }

.l-ticket1 { grid-template-columns: 1fr 78px; gap: 0; position: relative; background: #fff; box-shadow: var(--shadow); --ar: 4 / 3.4; }
.l-ticket1 .frame { height: 100%; }
.l-ticket1 .pic { height: 100%; }
.stub { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-left: 1.5px dashed var(--rose); color: var(--red); padding: 10px 4px; text-align: center; }
.stub::before, .stub::after { content: ''; position: absolute; left: -10px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); }
.stub::before { top: -9px; } .stub::after { bottom: -9px; }
.stub span { font-size: .6rem; letter-spacing: .3em; text-transform: uppercase; font-weight: 600; }
.stub b { font-family: var(--serif-display); font-style: italic; font-weight: 500; font-size: 1.8rem; line-height: 1; }
.stub small { font-size: .62rem; font-style: italic; color: var(--muted); line-height: 1.2; }

.l-duo2 { grid-template-columns: 1fr 1fr; gap: 14px; position: relative; --ar: 3 / 5; }
.l-duo2 figcaption button { font-family: var(--serif-display); font-size: 1.15rem; color: var(--red); }
.l-duo2 figcaption button.empty { color: var(--rose); }
.duo-heart { position: absolute; left: 50%; top: 44%; z-index: 2; transform: translate(-50%, -50%); width: 38px; height: 38px;
  display: grid; place-items: center; border-radius: 50%; background: var(--paper); color: var(--red); box-shadow: var(--shadow); }
.duo-heart .ic { width: 16px; height: 16px; }

.l-arch3 { grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; --ar: 3 / 5; }
.l-arch3 .s1 { transform: translateY(-18px); }

.l-circles3 { grid-template-columns: 1fr 1fr; gap: 0 10px; }
.l-circles3 .s0 { grid-column: 1 / -1; width: 74%; margin: 0 auto; }
.l-circles3 .s1, .l-circles3 .s2 { width: 74%; margin-top: -16%; }
.l-circles3 .s2 { justify-self: end; }

.l-booth4 { width: 52%; margin: 0 auto; gap: 8px; padding: 10px 10px 0; background: #fff; box-shadow: var(--shadow); transform: rotate(1.5deg); --ar: 4 / 3; }
.booth-foot { padding: 6px 0 12px; text-align: center; font-family: var(--serif-display); font-style: italic; color: var(--red); font-size: 1rem; }

.l-wide2 { grid-template-columns: 1fr; --ar: 16 / 10; }
.l-wide2 .s0 { width: 92%; }
.l-wide2 .s1 { width: 92%; margin-left: auto; margin-top: -4px; }

.l-collage4 { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); grid-template-areas: "a b" "a d" "c d"; aspect-ratio: 1 / 1.2; gap: 12px; }
.l-collage4 .s0 { grid-area: a; } .l-collage4 .s1 { grid-area: b; } .l-collage4 .s2 { grid-area: c; } .l-collage4 .s3 { grid-area: d; }
.l-collage4 .slot, .l-collage4 .frame { height: 100%; }
.l-collage4 .pic { aspect-ratio: auto; height: 100%; }
.l-collage4 .f-polaroid .frame { padding-bottom: 16px; }
.l-collage4 .f-polaroid .pic { height: 100%; }

.l-mix4 { grid-template-columns: 1fr 1fr; }
.l-mix4 .s1, .l-mix4 .s3 { margin-top: 28px; }
.l-mix4 .s2 { margin-top: -28px; }

.l-grid9 { grid-template-columns: repeat(3, 1fr); gap: 8px; --ar: 1 / 1; }
.l-grid9 .f-polaroid .frame { padding: 3px 3px 10px; }
.l-grid9 .pic > .ic { width: 38%; }

/* ---------- Carta ---------- */
.page.letter { padding: 52px 28px 40px; }
.letter .kicker { text-align: center; }
.letter-title { margin: 12px 0 0; text-align: center; font-family: var(--serif-display); font-weight: 600; font-size: 3rem; line-height: .9; text-transform: uppercase; color: var(--red); }
.letter .desc { margin: 26px 0 0; text-align: justify; hyphens: auto; font-style: normal; font-size: 1.04rem; line-height: 1.62; padding: 0; }
.letter .desc p:first-child::first-letter { float: left; font-family: var(--serif-display); font-size: 3.7em; line-height: .78; padding: 8px 8px 0 0; color: var(--red); }
.letter .desc.empty { text-align: center; font-style: italic; padding: 14px; }
.letter .desc.empty::first-letter { all: unset; }
.signature { display: flex; justify-content: flex-end; margin: 18px 0 0; color: var(--red); }
.signature .ic { width: 18px; height: 18px; }

/* ---------- Vista "Páginas" ---------- */
.minis { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.mini { display: block; width: 100%; min-width: 0; cursor: pointer; }
.mini:active { transform: scale(.97); }
.mini-in { zoom: .5; pointer-events: none; }

.empty-state { text-align: center; padding: 40px 22px; margin-top: 24px; background: var(--paper); box-shadow: var(--shadow); line-height: 1.55; }
.empty-state h2 { margin: 12px 0 0; font-family: var(--serif-display); font-weight: 500; font-size: 1.8rem; line-height: 1; text-transform: uppercase; color: var(--red); }
.empty-state p:not(.kicker) { font-style: italic; color: var(--ink); margin: 18px 0 0; }
.empty-state .btn { margin-top: 22px; }

/* ---------- Botón flotante ---------- */
.fab { position: fixed; right: 20px; bottom: calc(var(--safe-b) + 22px); z-index: 10; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: var(--red); color: #fff; box-shadow: 0 10px 24px rgba(143, 20, 48, .35); }
.fab .ic { width: 26px; height: 26px; }
.fab:active { transform: scale(.94); }
@media (min-width: 600px) { .fab { right: calc(50% - 280px + 20px); } }

/* ---------- Hojas inferiores ---------- */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(40, 10, 18, .4); opacity: 0; transition: opacity .2s; }
.backdrop.show { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-width: 560px; margin: 0 auto; max-height: 92dvh; overflow-y: auto;
  background: var(--paper); color: var(--ink); border-radius: 22px 22px 0 0; padding: 8px 22px calc(var(--safe-b) + 20px);
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.sheet.show { transform: none; }
.handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 6px auto 20px; }
.sheet h2 { margin: 0 0 16px; font-family: var(--serif-display); font-weight: 500; font-size: 1.55rem; line-height: 1.1; color: var(--red); }
.sheet .kicker { margin: -8px 0 14px; }
.field { display: block; margin-bottom: 18px; }
.field > span { display: block; margin-bottom: 8px; font-size: .64rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.input { width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 1.1rem; outline: none;
  /* colores explícitos: el texto siempre oscuro sobre blanco, aunque el sistema esté en modo oscuro */
  color: var(--ink); -webkit-text-fill-color: var(--ink); caret-color: var(--red); color-scheme: only light; }
.input:focus { border-color: var(--rose); }
.input::placeholder { color: #a8868f; -webkit-text-fill-color: #a8868f; font-style: italic; opacity: 1; }
.input.line { color: var(--ink); }
textarea.input { resize: vertical; line-height: 1.5; }
textarea.big { font-size: 1.12rem; min-height: 140px; }
.form-thumb { width: 92px; height: 92px; object-fit: cover; margin: 0 auto 18px; background: #fff; padding: 4px 4px 14px; box-shadow: var(--shadow); }

.tpls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tpl { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 8px; border-radius: 10px; border: 1px solid var(--line); background: #fff; text-align: center; cursor: pointer; }
.tpl.on { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.tpl.off { opacity: .3; cursor: not-allowed; }
.tpl-prev { width: 100%; height: 128px; overflow: hidden; border-radius: 6px; background: var(--bg); }
.tpl-in { zoom: .26; pointer-events: none; }
.tpl-name { font-weight: 500; font-size: .8rem; line-height: 1.15; margin-top: 6px; }
.tpl-count { font-size: .68rem; color: var(--muted); font-style: italic; }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 20px; border-radius: 999px;
  font-size: .74rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; }
.btn + .btn { margin-top: 8px; }
.btn:disabled { opacity: .55; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--red); color: #fff; }
.btn.danger { color: var(--danger); border: 1px solid #efcaca; }
.btn.ghost { color: var(--muted); }

.menu-list button { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 56px; padding: 0 4px; border-bottom: 1px solid var(--line); font-size: 1.08rem; text-align: left; }
.menu-list button:last-child { border-bottom: 0; }
.menu-list button:active { background: var(--pink); }
.menu-list button:disabled { opacity: .4; }
.menu-list .mi { color: var(--red); }
.menu-list .grow { flex: 1; }
.menu-list small { display: block; font-size: .8rem; color: var(--muted); font-style: italic; }
.menu-list button > small { display: inline; margin-left: auto; }
.menu-list .danger, .menu-list .danger .mi { color: var(--danger); }

.big-choice { display: grid; gap: 10px; margin: 14px 0 12px; }
.choice { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.choice:active { background: var(--pink); }
.choice .mi { color: var(--red); }
.choice .mi .ic { width: 26px; height: 26px; }
.choice b { display: block; font-weight: 500; font-size: 1.08rem; }
.choice small { color: var(--muted); font-style: italic; }

.help { margin: 0 0 6px; padding: 0; list-style: none; display: grid; gap: 14px; }
.help li { display: flex; gap: 14px; line-height: 1.45; }
.help .mi { color: var(--red); padding-top: 2px; }
.help b { font-weight: 600; }

.meter { height: 6px; border-radius: 3px; background: var(--pink); overflow: hidden; }
.meter span { display: block; height: 100%; min-width: 3px; border-radius: 3px; background: var(--red); transition: width .6s ease; }
.meter.warn span { background: #c27a1d; }
.meter.danger span { background: var(--danger); }
.meter-text { margin: 10px 0 18px; text-align: center; font-style: italic; }
.facts { margin: 0; display: grid; gap: 0; }
.facts div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.small-loading { min-height: 90px !important; }
.small-loading .ic { width: 30px; height: 30px; }

/* ---------- Avisos ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 96px); z-index: 80; max-width: calc(100% - 40px); width: max-content;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: .22s;
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: .95rem; font-style: italic; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.no-scroll .toast, body:has(.sheet) .toast { bottom: auto; top: calc(var(--safe-t) + 72px); background: rgba(255, 253, 251, .96); color: var(--ink); }

/* ---------- Visor ---------- */
.viewer { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: #1d0a10; color: #fff; }
.v-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(var(--safe-t) + 10px) 14px 8px; }
.v-top .icon-btn { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: none; }
.v-spacer { width: 44px; flex: none; }
.v-title { flex: 1; min-width: 0; text-align: center; line-height: 1.3; }
.v-page { display: block; font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-count { font-size: .8rem; font-style: italic; opacity: .6; }
.v-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; display: grid; place-items: center; touch-action: none; }
.v-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: transform .22s ease, opacity .22s; will-change: transform; }
.v-stage img.fade { opacity: 0; }
.v-info { padding: 14px 22px 4px; max-height: 28dvh; overflow-y: auto; text-align: center; }
.v-info h2 { margin: 0; font-family: var(--serif-display); font-weight: 500; font-size: 1.3rem; }
.v-info h2.empty { opacity: .45; font-family: var(--serif); font-style: italic; font-size: 1rem; }
.v-info p { margin: 6px 0 0; opacity: .85; line-height: 1.5; white-space: pre-wrap; font-style: italic; }
.v-info time { display: block; margin-top: 8px; font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; opacity: .55; }
.v-actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 10px 14px calc(var(--safe-b) + 14px); }
.v-actions button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; border-radius: 12px; color: #fff;
  font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; }
.v-actions button:active { background: rgba(255, 255, 255, .1); }
.v-actions .ic { opacity: .9; }

/* ---------- Entrada ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: calc(var(--safe-t) + 24px) 10px calc(var(--safe-b) + 24px); text-align: center; }
.login-card { width: 100%; max-width: 340px; }
.login-mark { display: flex; justify-content: center; color: var(--red); margin-bottom: 22px; }
.login-mark .ic { width: 52px; height: 52px; }
.login-title { margin: 14px 0 12px; font-family: var(--serif-display); font-weight: 600; font-size: 3rem; line-height: .92; text-transform: uppercase; color: var(--red); }
.login-text { margin: 0; font-style: italic; color: var(--muted); }
.login form { display: grid; gap: 22px; margin-top: 34px; }
.pw { position: relative; }
.input.line { border: 0; border-bottom: 1px solid var(--rose); border-radius: 0; background: transparent; text-align: center; letter-spacing: .18em; padding: 12px 44px; }
.pw button { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); }
.demo-hint { margin-top: 26px; font-size: .8rem; font-style: italic; color: var(--muted); }
.shake { animation: shake .4s; }

.loading { display: grid; place-items: center; min-height: 70dvh; color: var(--rose); }
.loading .ic { width: 40px; height: 40px; }
.pulse { animation: pulse 1.2s ease-in-out infinite; display: inline-block; }

/* =====================================================================
   Funciones románticas
   ===================================================================== */
.center { text-align: center; }

/* ---------- Mesiversario en la portada ---------- */
.anniv { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 0;
  font-family: var(--serif-display); font-style: italic; font-weight: 500; font-size: 1.15rem; }
.anniv .ic { width: 12px; height: 12px; }
.anniv-sub { margin: 4px 0 0; font-size: .66rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; opacity: .85; }
.cover.celebrate .ch { animation: float 3.2s ease-in-out infinite, glow 2.4s ease-in-out infinite; }
.cover.celebrate .anniv .ic { animation: pulse 1.2s ease-in-out infinite; }
@keyframes glow { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }

/* ---------- Pestañas (3) y aviso de notas ---------- */
.tabs { gap: 24px; }
.unread-line { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin: -10px 0 22px; padding: 10px;
  color: var(--red); font-style: italic; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.unread-line .ic { width: 18px; height: 18px; }
.unread-line::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }

/* ---------- Firma ---------- */
.sig { margin: -16px 0 22px; text-align: center; font-style: italic; font-size: .88rem; color: var(--muted); }
.signature span { font-family: var(--serif-display); font-style: italic; font-size: 1.05rem; margin-right: 8px; }
.signature { align-items: center; }

/* ---------- Insignias: notas y corazones ---------- */
.note-badge { position: absolute; z-index: 3; display: flex; align-items: center; gap: 3px; padding: 6px 8px; border-radius: 999px;
  background: var(--paper); color: var(--red); box-shadow: 0 2px 8px rgba(58, 22, 32, .12); font-size: .72rem; font-weight: 600; }
.note-badge .ic { width: 16px; height: 16px; }
.note-badge.unread::after { content: ''; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--paper); }
.page > .note-badge { top: 10px; left: 10px; }
.slot > .note-badge { top: -6px; left: -6px; padding: 5px; }
.slot > .note-badge .ic { width: 14px; height: 14px; }
.heart-badge { position: absolute; z-index: 3; right: 6px; bottom: 4px; display: flex; gap: 1px; color: var(--red); pointer-events: none; }
.f-polaroid > .heart-badge, .f-tape > .heart-badge { bottom: 6px; }
.slot:has(figcaption) > .heart-badge { bottom: 42px; }
.heart-badge .ic { width: 11px; height: 11px; filter: drop-shadow(0 0 2px #fff); }

/* ---------- Libro: pasar páginas ---------- */
.book-wrap { margin-top: 2px; }
.book-view { display: grid; perspective: 2200px; }
.leaf { grid-area: 1 / 1; position: relative; transform-origin: left center; backface-visibility: hidden; }
.leaf.turn-out { z-index: 2; animation: turnOut .72s cubic-bezier(.45, .05, .3, 1) forwards; }
.leaf.turn-in { z-index: 2; animation: turnIn .72s cubic-bezier(.45, .05, .3, 1) forwards; }
.leaf.turn-out::after, .leaf.turn-in::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to left, rgba(58, 22, 32, .18), rgba(58, 22, 32, 0) 55%); animation: shade .72s forwards; }
@keyframes turnOut { 0% { transform: rotateY(0); } 80% { opacity: 1; } 100% { transform: rotateY(-115deg); opacity: 0; } }
@keyframes turnIn { 0% { transform: rotateY(-115deg); opacity: 0; } 20% { opacity: 1; } 100% { transform: rotateY(0); } }
@keyframes shade { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }
.book-nav { display: flex; align-items: center; justify-content: center; gap: 26px; margin: 22px 0 0; }
.book-nav button { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--red); border: 1px solid var(--line); background: var(--paper); }
.book-nav button:disabled { opacity: .3; }
.book-nav button:active:not(:disabled) { background: var(--pink); }
.book-count { font-style: italic; color: var(--muted); min-width: 64px; text-align: center; }
.book-count b { font-family: var(--serif-display); font-style: normal; color: var(--red); font-size: 1.2rem; }

/* ---------- Recuerdos: línea de tiempo ---------- */
.timeline { background: var(--paper); box-shadow: var(--shadow); padding: 40px 20px 34px; }
.tl { list-style: none; margin: 10px 0 0; padding: 0 0 0 30px; position: relative; }
.tl::before { content: ''; position: absolute; left: 10px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-dot { position: absolute; left: -30px; top: 2px; width: 21px; height: 21px; display: grid; place-items: center; background: var(--paper); color: var(--red); }
.tl-dot .ic { width: 15px; height: 15px; }
.tl-dot.small .ic { width: 12px; height: 12px; color: var(--rose); }
.tl-dot.tiny { left: -24px; top: 26px; width: 9px; height: 9px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 3px var(--paper); }
.tl-month { margin: 26px 0 12px -30px; padding-left: 30px; }
.tl-month span { display: inline-block; background: var(--paper); font-size: .66rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.tl-mark { position: relative; margin: 14px 0; }
.tl-mark p { margin: 0; color: var(--red); }
.tl-mark h3 { margin: 4px 0 0; font-family: var(--serif-display); font-weight: 600; font-size: 1.5rem; line-height: 1; text-transform: uppercase; color: var(--red); }
.tl-mark h3 i { display: block; font-style: italic; text-transform: none; font-size: .6em; font-weight: 500; }
.tl-mark time { font-size: .8rem; color: var(--muted); font-style: italic; }
.tl-mark.now p { color: var(--muted); }
.tl-item { position: relative; display: flex; gap: 14px; align-items: flex-start; margin: 0 0 16px; }
.tl-photo { flex: none; width: 92px; background: #fff; padding: 4px 4px 12px; box-shadow: 0 4px 12px rgba(58, 22, 32, .1); }
.tl-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--pink); }
.tl-text { display: grid; gap: 2px; padding-top: 4px; min-width: 0; }
.tl-text time { font-size: .64rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--red); }
.tl-text b { font-weight: 500; font-style: italic; line-height: 1.3; }
.tl-text small { color: var(--muted); font-size: .82rem; }
.tl-hearts { display: flex; gap: 2px; color: var(--red); margin-top: 2px; }
.tl-hearts .ic { width: 11px; height: 11px; }
.tl-undated { margin: 30px 0 4px; text-align: center; font-size: .66rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }

/* ---------- ¿Quién eres? ---------- */
.who { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.who button { display: grid; justify-items: center; gap: 10px; padding: 22px 10px; border: 1px solid var(--line); border-radius: 16px; background: #fff; font-size: 1.1rem; }
.who button.on, .who button:active { border-color: var(--red); background: var(--pink); }
.who-initial { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff;
  font-family: var(--serif-display); font-style: italic; font-size: 1.7rem; }

/* ---------- Notas de amor ---------- */
.notes-list { display: grid; gap: 14px; margin: 6px 0 22px; }
.envelope { position: relative; width: 100%; aspect-ratio: 16 / 10; max-width: 340px; margin: 0 auto; perspective: 800px; }
.env-back { position: absolute; inset: 0; background: var(--pink); border-radius: 6px; box-shadow: var(--shadow); }
.env-back::before { content: ''; position: absolute; inset: 0; border-radius: 6px;
  background: linear-gradient(to top right, transparent 49.5%, rgba(226, 169, 182, .55) 50%, transparent 50.5%),
              linear-gradient(to top left, transparent 49.5%, rgba(226, 169, 182, .55) 50%, transparent 50.5%); }
.env-flap { position: absolute; left: 0; right: 0; top: 0; height: 58%; background: #f1cfd7; clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center; transition: transform .6s ease; border-radius: 6px 6px 0 0; }
.env-seal { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--red); color: #fff; box-shadow: 0 3px 8px rgba(143, 20, 48, .35); transition: opacity .3s; }
.env-seal .ic { width: 18px; height: 18px; }
.env-from { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-style: italic; color: var(--red); }
.envelope.opening .env-flap { transform: rotateX(180deg); }
.envelope.opening .env-seal { opacity: 0; }
.envelope:not(.opening) { animation: nudge 2.6s ease-in-out infinite; }
@keyframes nudge { 0%, 85%, 100% { transform: rotate(0); } 90% { transform: rotate(-2deg); } 95% { transform: rotate(2deg); } }
.love-note { position: relative; background: #fff; padding: 22px 22px 14px; box-shadow: var(--shadow); border-top: 3px solid var(--red); }
.love-note.reveal { animation: reveal .6s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.love-body { font-size: 1.08rem; line-height: 1.6; }
.love-body p { margin: 0 0 .6em; }
.love-note .sig { margin: 6px 0 0; text-align: right; font-family: var(--serif-display); font-size: 1rem; color: var(--red); }
.note-meta { margin: 8px 0 0; font-size: .78rem; color: var(--muted); font-style: italic; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.note-meta button { margin-left: auto; color: var(--danger); font-style: italic; padding: 6px 2px; }
.note-form .btn .ic { width: 18px; height: 18px; }

/* ---------- Visor: corazón y notas ---------- */
.v-actions button.on { color: #ffb3c4; }
.v-heart .ic { transition: transform .2s; }
.v-actions button.on .v-heart .ic { transform: scale(1.15); }
.v-sig { margin: 2px 0 0 !important; font-style: italic; opacity: .6 !important; font-size: .85rem; }
.v-hearts, .v-notes { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .85rem; font-style: italic; }
.v-hearts .ic, .v-notes .ic { width: 13px; height: 13px; color: #ffb3c4; }
.burst { position: absolute; left: 50%; top: 50%; width: 110px; height: 110px; color: #fff; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.2); }
.burst .ic { width: 100%; height: 100%; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .35)); }
.burst.go { animation: burst .9s ease forwards; }
@keyframes burst { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  45% { transform: translate(-50%, -50%) scale(.95); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); } }

/* ---------- Música ---------- */
.music-btn { position: fixed; left: 20px; bottom: calc(var(--safe-b) + 26px); z-index: 10; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: var(--paper); color: var(--red); box-shadow: 0 6px 18px rgba(58, 22, 32, .15); }
.music-btn.on .ic { animation: spin 4s linear infinite; }
.music-btn:not(.on) { opacity: .75; }
@media (min-width: 600px) { .music-btn { left: calc(50% - 280px + 20px); } }
body.is-login .music-btn { display: none; }

/* ---------- Reacciones ---------- */
.react-pop { position: absolute; left: 10px; right: 10px; bottom: calc(var(--safe-b) + 84px); z-index: 3;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; padding: 10px 6px; border-radius: 20px;
  background: rgba(255, 253, 251, .97); color: var(--red); box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateY(12px) scale(.96); pointer-events: none; transition: .2s ease; }
.react-pop.open { opacity: 1; transform: none; pointer-events: auto; }
.react-pop button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 0; border-radius: 12px;
  font-size: .56rem; line-height: 1.15; color: var(--ink); text-align: center; }
.react-pop button .ic { width: 28px; height: 28px; color: var(--red); transition: transform .15s; }
.react-pop button:active .ic { transform: scale(1.25); }
.react-pop button.on { background: var(--pink); }
.v-react-chip { display: inline-flex; align-items: center; gap: 5px; margin: 0 6px; }
.v-react-chip .ic { width: 15px; height: 15px; color: #ffb3c4; }
.heart-badge .ic { width: 12px; height: 12px; }

/* ---------- Stickers ---------- */
.stickers { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.stk { position: absolute; width: calc(38px * var(--s, 1)); transform: translate(-50%, -50%) rotate(var(--r, 0deg)); pointer-events: none; }
.stk .ic { width: 100%; height: auto; stroke-width: 1.4; }
.stk.c-red { color: var(--red); }
.stk.c-rose { color: var(--rose); }
.stk.c-ink { color: var(--ink); }
.page.decorating { outline: 2px dashed var(--rose); outline-offset: 4px; }
.page.decorating .stickers { pointer-events: auto; touch-action: pan-y; }
.page.decorating .stk { pointer-events: auto; touch-action: none; cursor: grab; }
.page.decorating .stk.sel { filter: drop-shadow(0 0 0 var(--paper)); }
.page.decorating .stk.sel::after { content: ''; position: absolute; inset: -8px; border: 1px dashed var(--red); border-radius: 8px; }
.page.decorating :is(.frame, .desc, .page-more, .note-badge, figcaption button) { pointer-events: none; }
body.decor-mode .fab, body.decor-mode .music-btn, body.decor-mode .book-nav, body.decor-mode .show-link { visibility: hidden; }
body.decor-mode #app { padding-bottom: 260px; }
.decor-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-width: 560px; margin: 0 auto;
  padding: 12px 14px calc(var(--safe-b) + 12px); background: var(--paper); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px rgba(58, 22, 32, .15);
  animation: barUp .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes barUp { from { transform: translateY(100%); } }
.decor-tools { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.decor-tools button { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--red); border: 1px solid var(--line); background: #fff; }
.decor-tools button:active { background: var(--pink); }
.decor-hint { margin: 0 0 8px; text-align: center; font-size: .85rem; font-style: italic; color: var(--muted); }
.decor-palette { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.decor-palette button { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: var(--red); background: #fff; border: 1px solid var(--line); scroll-snap-align: start; }
.decor-palette button .ic { width: 28px; height: 28px; }
.decor-palette button:active { background: var(--pink); }
.decor-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.decor-actions .btn + .btn { margin-top: 0; }
.decor-actions .btn .ic { width: 18px; height: 18px; }

/* ---------- Presentación ---------- */
.show-link { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px auto 0; padding: 10px 18px; border-radius: 999px;
  color: var(--red); font-size: .7rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
.show-link .ic { width: 16px; height: 16px; }
.show-link:active { background: var(--pink); }
.timeline .show-link { margin: -4px auto 10px; }
.show { position: fixed; inset: 0; z-index: 95; background: #12060a; color: #fff; overflow: hidden; animation: fadeIn .5s ease; }
.show.out { opacity: 0; transition: opacity .45s; }
@keyframes fadeIn { from { opacity: 0; } }
.show-stage { position: absolute; inset: 0; }
.show-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 1.4s ease; }
.show-img.on { opacity: 1; }
.show-img.kb0 { animation: kb0 7s ease-out forwards; } .show-img.kb1 { animation: kb1 7s ease-out forwards; }
.show-img.kb2 { animation: kb2 7s ease-out forwards; } .show-img.kb3 { animation: kb3 7s ease-out forwards; }
@keyframes kb0 { from { transform: scale(1); } to { transform: scale(1.08) translate(1.5%, 1%); } }
@keyframes kb1 { from { transform: scale(1.08) translate(-1.5%, 0); } to { transform: scale(1); } }
@keyframes kb2 { from { transform: scale(1); } to { transform: scale(1.07) translate(-1.5%, -1%); } }
@keyframes kb3 { from { transform: scale(1.07) translate(0, 1.5%); } to { transform: scale(1); } }
.show-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 26px calc(var(--safe-b) + 34px); text-align: center;
  background: linear-gradient(to top, rgba(18, 6, 10, .85), rgba(18, 6, 10, 0)); opacity: 0; transition: opacity .8s; pointer-events: none; }
.show-cap.on { opacity: 1; }
.show-cap .kicker { color: #f3c6d0; }
.show-cap h2 { margin: 8px 0 0; font-family: var(--serif-display); font-weight: 500; font-style: italic; font-size: 1.5rem; line-height: 1.2; }
.show-cap time { display: block; margin-top: 6px; font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; opacity: .6; }
.show-top { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; align-items: center; gap: 14px; padding: calc(var(--safe-t) + 12px) 14px 0; }
.show-top .icon-btn { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }
.show-progress { flex: 1; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.show-progress span { display: block; height: 100%; width: 0; background: rgba(255, 255, 255, .85); }
@keyframes showbar { from { width: 0; } to { width: 100%; } }
.show-paused { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; padding: 10px 18px; border-radius: 999px;
  background: rgba(0, 0, 0, .45); font-size: .66rem; letter-spacing: .28em; text-transform: uppercase; opacity: 0; transition: opacity .25s; pointer-events: none; }
.show.paused .show-paused { opacity: 1; }
.show.paused .show-img.on { animation-play-state: paused; }
.show-end { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; opacity: 0; transition: opacity 1.2s; }
.show-end.on { opacity: 1; }
.show-end span .ic { width: 30px; height: 30px; color: #f3c6d0; animation: pulse 1.6s ease-in-out infinite; }
.show-end .kicker { color: #f3c6d0; }
.show-end h2 { margin: 0; font-family: var(--serif-display); font-weight: 500; font-size: 2rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Bienvenida (su toque inicia la música) ---------- */
.intro { position: fixed; inset: 0; z-index: 90; display: grid; align-items: end; overflow: hidden; cursor: pointer;
  background: var(--pink); color: var(--red); transition: opacity .7s ease, transform .7s ease; }
.intro.has { color: #fff; background: #1d0a10; }
.intro-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kenburns 18s ease-in-out infinite alternate; }
.intro.has::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(40, 10, 18, .8) 0%, rgba(40, 10, 18, .25) 45%, rgba(0, 0, 0, .1) 100%); }
.intro .cover-hearts { z-index: 1; }
.intro:not(.has) .ch.a { color: var(--rose); }
.intro:not(.has) .ch.b { color: #fff; }
.intro.celebrate .ch { animation: float 3.2s ease-in-out infinite, glow 2.4s ease-in-out infinite; }
.intro-text { position: relative; z-index: 2; text-align: center; padding: 0 28px calc(var(--safe-b) + 54px); }
.intro-text .kicker { color: inherit; opacity: .92; }
.intro-open { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 34px 0 0;
  font-size: .68rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; opacity: .92; }
.intro-heart { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; border: 1px solid currentColor; animation: pulse 1.6s ease-in-out infinite; }
.intro-heart .ic { width: 22px; height: 22px; }
.intro.out { opacity: 0; transform: scale(1.04); pointer-events: none; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }

/* Disco de vinilo con la portada de la canción */
.vinyl, .music-art { display: block; border-radius: 50%; background: #1d0a10 center / cover no-repeat; position: relative;
  box-shadow: inset 0 0 0 3px rgba(20, 6, 10, .85), inset 0 0 0 5px rgba(255, 255, 255, .12); }
.vinyl::after, .music-art::after { content: ''; position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 2px rgba(20, 6, 10, .6); }
.vinyl { width: 40px; height: 40px; }
.music-btn:has(.vinyl) { background: #1d0a10; }
.music-btn.on .vinyl { animation: spin 6s linear infinite; }
.music-art { flex: none; width: 64px; height: 64px; }
.music-art.playing { animation: spin 8s linear infinite; }

.music-now { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.music-now .mi { color: var(--red); }
.music-now b { display: block; font-weight: 500; word-break: break-word; }
.music-now small { color: var(--muted); font-style: italic; font-size: .85rem; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; margin-bottom: 10px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; flex: none; width: 48px; height: 28px; border-radius: 14px; background: var(--line); transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch-row input:checked + .switch { background: var(--red); }
.switch-row input:checked + .switch::after { transform: translateX(20px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--rose); outline-offset: 2px; }
.field output { float: right; font-style: italic; letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--red); }
input[type=range] { width: 100%; accent-color: var(--red); height: 32px; }

@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
