/* Extras (2026-10-24): libro con recetario, «La noche, hora a hora» del álbum y retrato
   colectivo. Usa las variables de app.css (colores, modo oscuro, tipografías). */

/* --- 📖 Libro: índice y muros que quedan como libro --- */
.gb-toc { list-style: none; margin: 18px auto 0; padding: 0; max-width: 420px; text-align: left; }
.gb-toc li { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px dotted var(--line); font-family: var(--serif); }
.gb-toc li .faint { white-space: nowrap; }
.gb-book { margin-top: 44px; }
.gb-book-head { text-align: center; margin: 0 0 20px; }
.gb-book-ico { display: block; font-size: 2.6rem; line-height: 1.2; }
.gb-book-head h2 { margin: 6px 0 2px; overflow-wrap: anywhere; }
.gb-book-head p { margin: 0; }
.gb-msg { overflow-wrap: anywhere; }
.gb-entry-photo { width: 100%; max-height: 320px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; }

/* Recetario: cada receta en su tarjeta, con la foto arriba y un borde de ficha de cocina. */
.gb-recipes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); align-items: start; }
.gb-recipe { break-inside: avoid; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); min-width: 0; }
.gb-recipe-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gb-recipe-body { margin: 10px; padding: 12px 14px 14px; border: 1.5px dashed var(--line); border-radius: 10px; }
.gb-recipe h3 { font-size: 1.3rem; margin: 0 0 6px; overflow-wrap: anywhere; }
.gb-recipe h3::before { content: ''; display: block; width: 36px; height: 3px; border-radius: 2px; background: var(--accent); margin-bottom: 10px; }
.gb-recipe p { margin: 0 0 10px; font: 1rem/1.55 var(--serif); white-space: pre-wrap; overflow-wrap: anywhere; }
.gb-recipe footer { color: var(--ink-3); font-size: .9rem; font-style: italic; text-align: right; }

@media print {
  /* Cada muro empieza en una hoja nueva; su título nunca queda solo al pie. */
  .gb-book { break-before: page; margin-top: 0; padding-top: 6px; }
  .gb-book-head { break-after: avoid; }
  .gb-recipes { grid-template-columns: 1fr 1fr; gap: 12px; }
  .gb-recipe, .gb-entry { background: #fff; border-color: #ddd; }
  .gb-recipe-body { border-color: #ddd; }
  .gb-recipe-photo, .gb-entry-photo { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .gb-entry-photo { max-height: 220px; }
}

/* --- 🕒 Álbum: Todas / La noche, hora a hora --- */
.album-views-head { margin-bottom: 14px; }
.album-views-head h2 { min-width: 0; }
.album-views .chip { flex: none; white-space: nowrap; }

.tl-chart { margin: 0 0 20px; padding: 12px 12px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tl-bars { display: flex; align-items: flex-end; gap: 2px; height: 72px; }
.tl-bar { flex: 1 1 0; min-width: 0; height: var(--h, 6%); border: 0; padding: 0; border-radius: 3px 3px 0 0; background: color-mix(in srgb, var(--accent) 45%, transparent); cursor: pointer; }
.tl-bar:hover, .tl-bar:focus-visible { background: var(--accent); }
.tl-bar.is-peak { background: var(--accent); }
.tl-bar.is-empty { height: 2px; background: var(--line); cursor: default; }
.tl-axis { display: flex; justify-content: space-between; margin-top: 6px; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; border-radius: 1px; background: var(--line); }
.tl-day { margin-left: -22px; }
.tl-slot { position: relative; padding-bottom: 26px; scroll-margin-top: 16px; }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.tl-dot { position: absolute; left: -21px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--accent); }
.tl-time { margin: 0; font-size: 1.25rem; }
.tl-time .faint { font-family: var(--sans); font-style: normal; font-weight: 500; }
.tl-moments { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 10px; }
.tl-moments .pill { max-width: 100%; overflow-wrap: anywhere; }
.tl-slot.is-peak .tl-dot { width: 16px; height: 16px; left: -23px; top: 5px; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.tl-slot.is-peak > .gallery { padding: 6px; border-radius: 12px; background: var(--accent-soft); }

/* --- 🖼️ Retrato colectivo: hoja para elegir la foto principal --- */
.portrait-sheet { max-width: 560px; }
.portrait-preview { width: 100%; max-height: 34vh; object-fit: contain; border-radius: 12px; background: var(--surface-2); }
.portrait-preview.is-result { max-height: 56vh; }
.portrait-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; max-height: 26vh; overflow-y: auto; padding: 2px; }
.portrait-choices.is-busy { opacity: .5; pointer-events: none; }
.portrait-choice { position: relative; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: pointer; aspect-ratio: 1; }
.portrait-choice img { width: 100%; height: 100%; object-fit: cover; }
.portrait-choice[aria-checked='true'] { box-shadow: 0 0 0 3px var(--accent); }
.portrait-choice[aria-checked='true']::after { content: '✓'; position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: .8rem; font-weight: 700; }
.portrait-tag { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 4px; background: rgb(0 0 0 / 55%); color: #fff; font-size: .7rem; font-weight: 600; text-align: center; }
/* Los botones quedan siempre a la vista, aunque la hoja tenga que desplazarse. */
.portrait-actions { justify-content: flex-end; position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom)); margin-bottom: calc(-20px - env(safe-area-inset-bottom)); padding: 10px 0 calc(20px + env(safe-area-inset-bottom)); background: var(--surface); }

/* --- 🚩 Denuncias, bloqueo y reglas de la comunidad (2026-10-26) --- */
.report-btn { border: 0; background: none; cursor: pointer; font-size: .85rem; line-height: 1; padding: 6px; border-radius: 8px; opacity: .55; color: var(--ink-2); min-width: 32px; min-height: 32px; }
.report-btn:hover, .report-btn:focus-visible { opacity: 1; background: var(--surface-2); }
.song .report-btn, .person-row .report-btn { flex: none; }
.dm small .report-btn { min-width: 28px; min-height: 28px; padding: 4px; margin-left: 4px; vertical-align: middle; }
.wall-note, .candle, .memorial { position: relative; }
.wall-flag { position: absolute; top: 2px; right: 2px; background: var(--surface); }
.wall-report-list { margin-top: 12px; }
.wall-report-list .row { padding: 4px 0; border-bottom: 1px solid var(--line); }
.report-sheet .report-reasons { gap: 6px; }
.report-sheet textarea { width: 100%; }
.report-block { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.report-block input { margin-top: 3px; flex: none; }
.report-block span { display: grid; gap: 2px; }
.report-done { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 10px 0; }
.report-done .big { font-size: 2.6rem; }
.report-row { justify-content: center; gap: 6px; }
.report-alert { display: grid; gap: 2px; text-align: left; width: 100%; cursor: pointer; border: 1.5px solid color-mix(in srgb, var(--bad) 45%, var(--line)); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); color: var(--ink); font: inherit; }
.pill-bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.report-card { display: grid; gap: 10px; min-width: 0; }
.report-card.done { opacity: .7; }
.report-reasons-row { gap: 6px; }
.report-content { display: flex; gap: 12px; align-items: flex-start; min-width: 0; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.report-thumb { flex: none; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--surface); font-size: 1.8rem; text-decoration: none; }
.report-thumb img { width: 100%; height: 100%; object-fit: cover; }
.report-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.report-content audio { max-width: 100%; }
.report-notes { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: .9rem; overflow-wrap: anywhere; }
.report-actions { gap: 6px; }
.screen .report-screen-btn { right: auto; left: 16px; }
.rules-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rules-list li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
.rules-list li > span:first-child { flex: none; width: 1.6em; text-align: center; }
.rules-page { max-width: 720px; }
.rules-section h2 { font-size: 1.25rem; margin: 0; }
.rules-section p, .rules-section ul { margin: 0; line-height: 1.55; }
.join-rules a { color: inherit; text-decoration: underline; }

/* --- 📲 /probar: testers de Google Play --- */
.testers-page { max-width: 640px; }
.tester-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tester-step { display: flex; gap: 14px; align-items: flex-start; }
.tester-step .btn { justify-self: start; width: fit-content; }
.tester-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.tester-faq summary { cursor: pointer; font-weight: 600; }
.report-head { display: grid; gap: 2px; min-width: 0; }

/* --- ✉️ «¿Quisiste decir …@gmail.com?» bajo los campos de correo (js/correo-typo.js) --- */
.typo-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: .92rem; }
.typo-hint[hidden] { display: none; }
.typo-hint span { overflow-wrap: anywhere; min-width: 0; }
.typo-hint .btn { min-height: 0; padding: 6px 12px; font-size: .88rem; }

/* --- 🚪 La puerta del evento (panel → Inicio): cerrar entradas, cambiar código, sacar sin actividad --- */
.door-card { text-align: left; gap: 8px; }
.door-actions { flex-wrap: wrap; gap: 8px; }
.door-actions .btn { flex: 1 1 auto; white-space: normal; }
/* --- 🔒 Solo invitados ven las fotos (Ajustes) --- */
.privacy-box { gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); }
.privacy-box p { overflow-wrap: anywhere; }
/* Pantalla sin su llave en un evento con fotos solo para invitados (abajo a la izquierda). */
.screen-upsell.screen-locked { inset: auto auto 16px 16px; max-width: 460px; }
/* --- 🎁 Gala en camino y avisos de Galas --- */
.gala-news { gap: 0; }
.gala-news .gift-banner p { margin: 4px 0 0; overflow-wrap: anywhere; }
/* --- 🎭 Replica el meme (2026-10-29) --- */
.meme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.meme-tile { position: relative; display: grid; gap: 2px; padding: 0 0 8px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-align: left; overflow: hidden; cursor: pointer; font: inherit; }
.meme-tile img, .meme-tile .meme-ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--surface-2); }
.meme-tile b { font-size: .85rem; line-height: 1.25; padding: 4px 8px 0; overflow-wrap: anywhere; }
.meme-tile small { font-size: .75rem; color: var(--ink-3); padding: 0 8px; }
.meme-tile.done { border-color: #3b8f5a; }
.meme-tile.done::after { content: '✓'; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #3b8f5a; color: #fff; font-weight: 700; font-size: .85rem; }
.meme-ph { display: grid; place-items: center; font-size: 2.2rem; }
.meme-credit { margin: 0; font-size: .75rem; color: var(--ink-3); line-height: 1.4; }
.meme-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.meme-vs figure { margin: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.meme-vs img, .meme-vs .meme-ph { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: grid; background: var(--surface-2); }
.meme-vs figcaption { font-size: .8rem; color: var(--ink-3); text-align: center; padding: 6px; }
.meme-tip { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: .92rem; }
.meme-host-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.meme-host { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: .82rem; cursor: pointer; }
.meme-host img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.meme-host .row { gap: 6px; padding: 0 8px 8px; align-items: flex-start; }
.meme-host.off img { opacity: .35; filter: grayscale(1); }
.meme-mine img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
.meme-add { border: 1px dashed var(--line); border-radius: 12px; padding: 10px; }
.meme-add input[type=file] { width: 100%; min-width: 0; max-width: 100%; font-size: .85rem; }
.meme-add .btn { justify-self: start; }
/* Pantalla: el meme original en una esquina, junto a la foto del invitado. */
.sc-meme-orig { position: absolute; left: 3vw; bottom: 12vh; z-index: 3; margin: 0; width: min(26vw, 420px); background: #fff; padding: 8px 8px 4px; border-radius: 10px; box-shadow: 0 14px 40px rgb(0 0 0 / 45%); transform: rotate(-3deg); }
.screen-stage .slide .sc-meme-orig img { width: 100%; max-width: none; max-height: 40vh; display: block; border-radius: 4px; position: static; object-fit: contain; box-shadow: none; }
.sc-meme-orig figcaption { color: #1d1a17; font: 700 1.1rem var(--sans); text-align: center; padding: 4px 0 2px; }
/* --- 📣 Síguenos (2026-10-29) --- */
.screen-qr small.screen-follow { display: block; margin-top: 4px; font-weight: 700; opacity: .9; }
.follow-card .row { gap: 8px; flex-wrap: wrap; }
.story-offer strong { display: block; }
/* --- ❓ Ayuda y 📺 cómo proyectar (2026-10-30) --- */
.help-item { border-top: 1px solid var(--line); padding: 10px 0; }
.help-item:first-of-type { border-top: 0; }
.help-item summary { cursor: pointer; font-weight: 700; }
.help-item p { margin: 8px 0 0; color: var(--ink-2); line-height: 1.5; }
.help-section h2 { margin: 0; font-size: 1.15rem; }
.help-contact .btn { justify-self: start; overflow-wrap: anywhere; }
.project-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.project-step { display: flex; gap: 12px; align-items: flex-start; }
.project-step b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent, #fff); font-size: .9rem; }
/* --- 👋 Cómo funciona (tutorial del invitado, 2026-11-01) --- */
.tour { gap: 12px; }
.tour-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; margin: 0 -16px; }
.tour-track::-webkit-scrollbar { display: none; }
.tour-card { flex: 0 0 100%; scroll-snap-align: center; box-sizing: border-box; padding: 6px 16px; text-align: center; display: grid; gap: 8px; align-content: start; min-width: 0; }
.tour-card .tour-icon { font-size: 3.2rem; line-height: 1.1; }
.tour-card h3 { margin: 0; font-size: 1.3rem; overflow-wrap: anywhere; }
.tour-card p { margin: 0; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.tour-dots { display: flex; justify-content: center; gap: 8px; }
.tour-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background .2s, transform .2s; }
.tour-dots span.on { background: var(--accent); transform: scale(1.25); }
.tour-actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.tour-actions .btn:last-child { flex: 1 1 auto; max-width: 60%; }
@media (prefers-reduced-motion: reduce) { .tour-track { scroll-behavior: auto; } .tour-dots span { transition: none; } }
/* --- ✅ Confirmar asistencia (/e/CÓDIGO/confirmar, 2026-11-01) --- */
.rsvp-kicker { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink, var(--accent)); }
.rsvp-body { margin-top: 16px; text-align: left; }
.rsvp-label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: 6px; color: var(--ink-2); }
.rsvp-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rsvp-choice { text-align: center; padding: 12px 6px; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.rsvp-count { font-size: .8rem; flex: none; }
.rsvp-done { text-align: center; display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: var(--accent-soft); }
.rsvp-done h2 { margin: 0; font-size: 1.3rem; overflow-wrap: anywhere; outline: none; }
.rsvp-answer { margin: 0; font-size: 1.15rem; font-weight: 700; }
.rsvp-note { margin: 4px 0 0; font-style: italic; color: var(--ink-2); overflow-wrap: anywhere; white-space: pre-line; }
.rsvp-closed { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-weight: 600; text-align: center; }
.rsvp-foot { margin: 16px 0 0; text-align: center; }
/* Panel: confirmaciones */
.rsvp-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rsvp-sum > div { background: var(--surface-2); border-radius: 12px; padding: 10px 6px; text-align: center; min-width: 0; }
.rsvp-sum b { display: block; font-size: 1.5rem; line-height: 1.2; }
.rsvp-sum span { font-size: .8rem; color: var(--ink-2); overflow-wrap: anywhere; }
.rsvp-row { display: flex; gap: 10px; align-items: flex-start; border-top: 1px solid var(--line); padding: 10px 0; }
.rsvp-row:first-child { border-top: 0; }
.rsvp-row .grow { min-width: 0; }
.rsvp-row strong { overflow-wrap: anywhere; }
.rsvp-row .rsvp-note { font-size: .9rem; }
.rsvp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rsvp-actions .btn { white-space: normal; }
.tour .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 💸 La vaca: gastos compartidos (expenses-ui.js) */
.vaca-summary .rsvp-sum b { font-size: 1.15rem; overflow-wrap: anywhere; }
.vaca-payer { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 6px 0; }
.vaca-payer:first-of-type { border-top: 0; }
.vaca-payer .grow { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.vaca-amt { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.vaca-bal { flex-basis: 100%; font-size: .85rem; }
.vaca-bal.up { color: var(--ok, #2f855a); }
.vaca-line { display: flex; gap: 8px; align-items: flex-start; line-height: 1.4; overflow-wrap: anywhere; }
.vaca-line > span:last-child { min-width: 0; }
.vaca-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
.vaca-two input, .vaca-form input { width: 100%; min-width: 0; }
.rsvp-row .vaca-amt { align-self: center; }

/* 🧮 Cotizador de plan (plans-ui.js planQuote) */
.plan-quote { text-align: left; }
.quote-inputs { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.quote-range { flex: 1 1 160px; min-width: 0; accent-color: var(--accent); }
.quote-num { width: 92px; flex: none; }
.quote-out { display: grid; gap: 6px; }
.quote-plan { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; }
.quote-plan .grow { min-width: 0; }
.quote-plan strong { overflow-wrap: anywhere; }
.quote-price { white-space: nowrap; font-size: 1.05rem; }
.quote-pick { justify-self: start; white-space: normal; }
