/* =====================================================
   ESTILO WEDSHOOTS / SOCIAL ALBUM — Carol & Melina 2026
   Blanco limpio · Coral degradado · Curva orgánica · Barra con cámara central
   ===================================================== */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1f242d;
  --muted: #7b818c;
  --line: #eceef2;
  --coral: #ff6a6b;
  --coral-2: #ff8e6e;
  --grad: linear-gradient(135deg, #ff626d 0%, #ff8c68 100%);
  --shadow-sm: 0 4px 16px rgba(24, 32, 48, 0.08);
  --shadow-md: 0 12px 34px rgba(24, 32, 48, 0.12);
  --shadow-coral: 0 10px 24px rgba(255, 102, 107, 0.38);
  --radius: 18px;
  --sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100dvh; overflow-x: hidden; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }

/* Contenedor tipo app móvil centrado en pantallas grandes */
.app-shell {
  max-width: 520px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.06);
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
  position: relative;
}
@media (min-width: 900px) {
  .app-shell { max-width: 780px; }
}

/* ---------- Portada con curva inferior (como la imagen de referencia) ---------- */
.cover-hero {
  position: relative;
  background: var(--surface);
}
.cover-photo {
  position: relative;
  height: 250px;
  overflow: hidden;
  border-bottom-left-radius: 100% 38px;
  border-bottom-right-radius: 100% 38px;
  background: #2b2d38;
}
@media (min-width: 700px) {
  .cover-photo { height: 310px; }
}
.cover-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}
.cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.12) 45%, rgba(0,0,0,0.62) 100%);
}
.cover-text {
  position: absolute;
  left: 22px;
  bottom: 48px;
  color: #ffffff;
  z-index: 2;
  text-shadow: 0 2px 12px rgba(0,0,0,0.45);
}
.cover-text h1, .cover-text h2 {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.cover-date {
  font-size: 0.96rem;
  font-weight: 500;
  opacity: 0.94;
  margin-top: 4px;
}

.live-pill {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38e57d;
  box-shadow: 0 0 0 0 rgba(56, 229, 125, 0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(56, 229, 125, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 229, 125, 0); }
}

/* Botones superpuestos en el borde de la foto */
.cover-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  margin-top: -25px;
  position: relative;
  z-index: 4;
}
.btn-invite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--grad);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: var(--shadow-coral);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.btn-invite svg { width: 17px; height: 17px; }
.btn-invite:active { transform: scale(.96); }

.cover-icons {
  display: flex;
  align-items: center;
  gap: 10px;
}
.circle-action {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface);
  color: #3a3f4b;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  transition: transform .2s var(--ease), color .2s;
}
.circle-action svg { width: 21px; height: 21px; }
.circle-action:active { transform: scale(.93); color: var(--coral); }

/* ---------- Pestañas de vista (Cuadrícula · Feed · Favoritas) ---------- */
.view-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
  border-bottom: 1px solid var(--line);
}
.view-tab {
  padding: 13px 0 11px;
  display: grid;
  place-items: center;
  color: #9aa0ac;
  position: relative;
  transition: color .2s;
}
.view-tab svg { width: 21px; height: 21px; }
.view-tab.active {
  color: #2b303a;
}
.view-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  width: 56px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--coral);
}

.sub-stats {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px 2px;
  font-size: 0.8rem;
  color: var(--muted);
}
.sub-stats b { color: var(--text); font-weight: 600; }

/* ---------- Tarjeta de carga y nombre para Invitados ---------- */
.guest-upload-card {
  margin: 14px 16px 4px;
  padding: 14px 15px;
  border-radius: 16px;
  background: #fff8f7;
  border: 1px solid #ffd5d5;
  box-shadow: 0 4px 14px rgba(255, 106, 107, 0.08);
}
.guest-who-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.guest-who-text {
  font-size: 0.84rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.guest-who-text b {
  color: var(--text);
  font-weight: 700;
  margin-left: 4px;
}
.guest-name-btn {
  flex: none;
  padding: 5px 11px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #ffb8b8;
  color: #d94b54;
  font-size: 0.76rem;
  font-weight: 600;
}
.guest-rule-badge {
  font-size: 0.8rem;
  color: #5b616e;
  line-height: 1.4;
  margin-bottom: 11px;
}
.guest-rule-badge b { color: #d94b54; }
.guest-quick-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.quick-btn {
  padding: 10px 10px;
  border-radius: 11px;
  font-size: 0.82rem;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #f2c2c2;
  color: #3a3f4b;
  transition: transform .15s;
}
.quick-btn.primary {
  background: var(--grad);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(255, 102, 107, 0.28);
}
.quick-btn:active { transform: scale(.97); }
.admin-only[hidden] { display: none !important; }

/* ---------- Barra exclusiva Modo Administradora ---------- */
.admin-banner {
  margin: 10px 14px 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff5f5;
  border: 1px solid #ffc9c9;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-banner[hidden] { display: none !important; }
.admin-banner-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #c93b44;
  text-align: center;
}
.admin-banner-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.admin-pill-btn {
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #f0b4b4;
  color: #3a3f4b;
}
.admin-pill-btn.danger {
  background: #e53945;
  border-color: #e53945;
  color: #ffffff;
}
.admin-pill-btn.ghost {
  background: transparent;
  border-color: #dcdfe6;
  color: var(--muted);
}

/* Botones de admin sobre cada foto en la galería */
.tile.is-hidden img,
.tile.is-hidden video {
  opacity: 0.35;
  filter: grayscale(1);
}
.tile-admin-tools {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 6;
  display: flex;
  gap: 5px;
}
.tile-admin-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
  display: grid;
  place-items: center;
  font-size: 0.82rem;
}
.tile-admin-btn.del {
  background: #e53945;
  color: #ffffff;
}
.admin-access-box {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.admin-toggle-link {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
}
.icon-btn.danger-icon {
  background: rgba(229, 57, 69, 0.85);
}

/* ---------- Chips de Retos ---------- */
.retos {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 16px 6px;
  scrollbar-width: none;
}
.retos::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f7f8fa;
  font-size: 0.8rem;
  color: #5b616e;
  font-weight: 500;
  transition: all .25s var(--ease);
  white-space: nowrap;
}
.chip.active {
  background: var(--grad);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 5px 14px rgba(255, 102, 107, 0.3);
}

/* ---------- Galería: 3 columnas cuadradas exactas como la captura ---------- */
.gallery {
  padding: 10px 14px 30px;
}
.gallery.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.gallery.mode-grid .tile {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: #eef0f4;
  cursor: pointer;
  animation: pop .45s var(--ease) both;
}
.gallery.mode-grid .tile img,
.gallery.mode-grid .tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.gallery.mode-grid .tile:hover img,
.gallery.mode-grid .tile:hover video {
  transform: scale(1.05);
}
.gallery.mode-grid .tile .meta,
.gallery.mode-grid .tile .badge {
  display: none;
}
.gallery.mode-grid .tile .grid-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 6px 5px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #ffffff;
  font-size: 0.68rem;
  line-height: 1.2;
  pointer-events: none;
}
.gallery.mode-grid .tile .grid-caption b {
  display: block;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery.mode-grid .tile .grid-caption em {
  display: block;
  font-style: normal;
  color: #ffd7d5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery.mode-grid .tile .hearts-corner {
  position: absolute;
  left: 6px;
  top: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 600;
}

/* Modo Feed (1 columna tipo Instagram con mensajes completos) */
.gallery.mode-feed {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.gallery.mode-feed .tile .grid-caption { display: none; }
.gallery.mode-feed .tile {
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.gallery.mode-feed .tile img,
.gallery.mode-feed .tile video {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}
.gallery.mode-feed .tile .meta {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
}
.gallery.mode-feed .tile .meta .who { font-weight: 700; color: var(--text); display: block; }
.gallery.mode-feed .tile .meta .feed-msg { color: #4f5561; font-size: 0.86rem; margin-top: 3px; display: block; }
.gallery.mode-feed .tile .meta .hearts { color: var(--coral); font-weight: 600; flex: none; }
.gallery.mode-feed .tile .hearts-corner { display: none; }
.gallery.mode-feed .tile .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.72rem;
}

/* Icono de cámara de video en la esquina inferior derecha (idéntico al mockup) */
.tile .play {
  position: absolute;
  bottom: 7px;
  right: 7px;
  width: 24px;
  height: 18px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-size: 0.62rem;
}
.tile.new::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 3px var(--coral);
  animation: glow 2.4s ease-out forwards;
  pointer-events: none;
}
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes glow { from { opacity: 1; } to { opacity: 0; } }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 54px 28px 90px;
}
.empty .big { font-size: 2.8rem; margin-bottom: 10px; }
.empty h2 { font-size: 1.2rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty p { font-size: 0.9rem; line-height: 1.45; }

/* ---------- Pantalla Tarjeta QR (idéntica al teléfono derecho de tu imagen) ---------- */
.qr-screen {
  min-height: calc(100dvh - 88px);
  background: #fafbfc;
  padding: 14px 20px 36px;
  animation: pop .3s var(--ease);
}
.qr-topbar {
  padding: 4px 0 12px;
}
.back-link {
  color: var(--coral);
  font-weight: 600;
  font-size: 0.98rem;
}
.qr-card {
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(20, 28, 44, 0.1);
  border: 1px solid var(--line);
}
.qr-card-cover {
  position: relative;
  height: 165px;
  overflow: hidden;
}
.qr-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}
.qr-card-cover .cover-text {
  bottom: 16px;
  left: 18px;
}
.qr-card-cover .cover-text h2 { font-size: 1.5rem; }
.qr-card-body {
  padding: 24px 22px 28px;
  text-align: center;
}
.qr-instructions {
  color: #4f5561;
  font-size: 0.92rem;
  line-height: 1.45;
  margin-bottom: 18px;
}
.qr-frame {
  width: 186px;
  height: 186px;
  margin: 0 auto 16px;
  padding: 10px;
  background: #ffffff;
  border-radius: 12px;
}
.qr-frame img {
  width: 100%;
  height: 100%;
}
.qr-code-pill {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 8px;
  border: 1px solid #e2e5ec;
  background: #fafbfc;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #2c313c;
  margin-bottom: 20px;
}
.qr-share-btn {
  width: 100%;
  max-width: 240px;
  padding: 14px 24px;
}
.print-link {
  margin: 22px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--coral);
  font-weight: 600;
  font-size: 0.9rem;
}
.print-link svg { width: 18px; height: 18px; }

/* ---------- Barra inferior con botón de cámara coral central ---------- */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 520px;
  height: calc(64px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.05);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  z-index: 30;
}
@media (min-width: 900px) {
  .bottom-nav { max-width: 780px; }
}
.nav-item {
  height: 100%;
  display: grid;
  place-items: center;
  color: #8b919e;
  transition: color .2s;
}
.nav-item svg { width: 23px; height: 23px; }
.nav-item.active { color: #191d24; }

.nav-camera {
  width: 58px;
  height: 58px;
  margin: -22px auto 0;
  border-radius: 50%;
  background: var(--grad);
  color: #ffffff;
  box-shadow: var(--shadow-coral), 0 0 0 4px #ffffff;
  display: grid;
  place-items: center;
  transition: transform .2s var(--ease);
}
.nav-camera svg { width: 26px; height: 26px; }
.nav-camera:active { transform: scale(.92); }

.avatar-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffe6e6;
  color: var(--coral);
  font-weight: 700;
  font-size: 0.78rem;
  display: grid;
  place-items: center;
  border: 1.5px solid #ffc9c9;
}

/* ---------- Hojas / Modales blancos limpios ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 22, 30, 0.45);
  backdrop-filter: blur(4px);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  padding: 12px 22px calc(26px + env(safe-area-inset-bottom));
  transform: translateY(105%);
  transition: transform .45s var(--ease);
  max-width: 520px;
  margin: 0 auto;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.16);
}
.sheet.open { transform: none; }
.sheet .grabber {
  width: 42px;
  height: 4px;
  border-radius: 9px;
  background: #dfe3eb;
  margin: 0 auto 16px;
}
.sheet h2 {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  margin-bottom: 4px;
}
.sheet .sub {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.field { display: block; margin-bottom: 14px; }
.field span {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #555b66;
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid #dcdfe6;
  background: #f9fafc;
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  resize: none;
}
.field input:focus, .field textarea:focus {
  border-color: var(--coral);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 106, 107, 0.16);
}

.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 10px;
  border-radius: 16px;
  background: #fff6f5;
  border: 1px dashed #ffb5b5;
  color: #d94b54;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform .2s;
}
.pick .ico { font-size: 1.8rem; }
.pick:active { transform: scale(.96); }

.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-bottom: 16px; }
.prev { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #eef0f4; }
.prev img, .prev video { width: 100%; height: 100%; object-fit: cover; }
.prev .x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: .75rem; }
.prev .bar { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--grad); transition: width .2s; }
.prev.done::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 106, 107, 0.72); font-size: 1.5rem; color: #fff; font-weight: 700; }
.prev.err::after { content: '!'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(180,20,30,.7); color: #fff; font-size: 1.5rem; }

.btn {
  width: 100%;
  padding: 15px;
  border-radius: 999px;
  background: var(--grad);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.98rem;
  box-shadow: var(--shadow-coral);
  transition: transform .2s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; box-shadow: none; }
.btn.ghost {
  background: #f3f5f8;
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--line);
}
.hint { font-size: .78rem; color: var(--muted); text-align: center; margin-top: 12px; }

/* Lista de invitados en hoja */
.people-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.person-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 12px;
  background: #f7f8fa;
  border: 1px solid var(--line);
  font-size: 0.92rem;
}
.person-row b { font-weight: 600; }
.person-row small { color: var(--muted); }

/* ---------- Visor a pantalla completa ---------- */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(12, 14, 18, 0.96);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.viewer.open { opacity: 1; pointer-events: auto; }
.viewer .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(14px + env(safe-area-inset-top)) 16px 10px;
}
.viewer .top .who b { display: block; font-size: 1rem; }
.viewer .top .who small { color: #b5bac4; font-size: .78rem; }
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  text-decoration: none;
}
.viewer .stage { flex: 1; display: grid; place-items: center; overflow: hidden; touch-action: pan-y; position: relative; }
.viewer .stage img, .viewer .stage video { max-width: 100%; max-height: 100%; object-fit: contain; animation: zoomIn .3s var(--ease); }
@keyframes zoomIn { from { opacity: 0; transform: scale(.96); } }
.viewer .nav { position: absolute; top: 50%; transform: translateY(-50%); }
.viewer .nav.prev-b { left: 12px; } .viewer .nav.next-b { right: 12px; }
@media (hover: none) { .viewer .nav { display: none; } }
.viewer .msg { text-align: center; font-size: 1.05rem; padding: 6px 24px 0; color: #ffd7d5; }
.reactions { display: flex; justify-content: center; gap: 8px; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
.react {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.08rem;
  transition: transform .2s var(--ease), background .2s;
}
.react small { font-size: .82rem; color: #e2e5ec; min-width: 8px; }
.react.on { background: rgba(255, 106, 107, 0.32); border-color: var(--coral); }
.react:active { transform: scale(1.25); }
.burst { position: fixed; pointer-events: none; font-size: 1.6rem; z-index: 80; animation: burst 1s var(--ease) forwards; }
@keyframes burst { to { transform: translate(var(--dx), -140px) scale(1.6) rotate(var(--rot)); opacity: 0; } }
.big-heart { position: absolute; font-size: 6rem; pointer-events: none; animation: bigHeart .9s var(--ease) forwards; }
@keyframes bigHeart { 0% { transform: scale(0); opacity: 0; } 30% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: calc(16px + env(safe-area-inset-top));
  transform: translate(-50%, -150%);
  z-index: 90;
  padding: 12px 20px;
  border-radius: 999px;
  background: #1f242d;
  color: #ffffff;
  font-size: .88rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  transition: transform .4s var(--ease);
  white-space: nowrap;
}
.toast.show { transform: translate(-50%, 0); }

/* Confeti */
.confetti { position: fixed; top: -12px; width: 9px; height: 14px; z-index: 85; pointer-events: none; animation: fall linear forwards; border-radius: 2px; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }

/* Impresión limpia de la tarjeta QR */
@media print {
  .bottom-nav, .qr-topbar, .print-link, #view-main { display: none !important; }
  .qr-screen { display: block !important; background: #fff; }
  .qr-card { box-shadow: none; max-width: 420px; margin: 0 auto; }
}
