:root {
  --crema: #fdf3e6;
  --crema-panel: #fffaf2;
  --rosa-suave: #f9dde3;
  --rosa: #eeadbe;
  --carmin: #c22a52;
  --rojo: #a51f30;
  --oro: #c99a3f;
  --oro-claro: #e3c98f;
  --tinta: #4a3428;
  --tinta-suave: #8a6f5e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--tinta);
  background:
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(238, 173, 190, .35), transparent 70%),
    radial-gradient(ellipse 50% 35% at 100% 12%, rgba(238, 173, 190, .28), transparent 70%),
    radial-gradient(ellipse 55% 30% at 15% 100%, rgba(238, 173, 190, .3), transparent 70%),
    var(--crema);
  min-height: 100vh;
}

.marco {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 14px 40px;
}

/* ---------- Cabecera ---------- */
.cabecera {
  position: relative;
  text-align: center;
  padding: 26px 16px 22px;
  border: 1.5px solid var(--oro-claro);
  border-radius: 18px;
  background: rgba(255, 250, 242, .65);
  overflow: hidden;
}
.cabecera::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed var(--oro-claro);
  border-radius: 13px;
  pointer-events: none;
}

.deco-margarita {
  position: absolute;
  width: 92px;
  height: 92px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg%3E%3Cellipse cx='50' cy='22' rx='11' ry='20' fill='%23fffdf6' stroke='%23e8ddc4' stroke-width='1.5'/%3E%3Cellipse cx='50' cy='78' rx='11' ry='20' fill='%23fffdf6' stroke='%23e8ddc4' stroke-width='1.5'/%3E%3Cellipse cx='22' cy='50' rx='20' ry='11' fill='%23fffdf6' stroke='%23e8ddc4' stroke-width='1.5'/%3E%3Cellipse cx='78' cy='50' rx='20' ry='11' fill='%23fffdf6' stroke='%23e8ddc4' stroke-width='1.5'/%3E%3Cellipse cx='30' cy='30' rx='14' ry='14' fill='%23fffdf6' stroke='%23e8ddc4' stroke-width='1.5' transform='rotate(45 30 30)'/%3E%3Cellipse cx='70' cy='30' rx='14' ry='14' fill='%23fffdf6' stroke='%23e8ddc4' stroke-width='1.5' transform='rotate(-45 70 30)'/%3E%3Cellipse cx='30' cy='70' rx='14' ry='14' fill='%23fffdf6' stroke='%23e8ddc4' stroke-width='1.5' transform='rotate(-45 30 70)'/%3E%3Cellipse cx='70' cy='70' rx='14' ry='14' fill='%23fffdf6' stroke='%23e8ddc4' stroke-width='1.5' transform='rotate(45 70 70)'/%3E%3Ccircle cx='50' cy='50' r='16' fill='%23e9b13c'/%3E%3C/g%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: .8;
  pointer-events: none;
}
.deco-margarita.izq { top: -22px; left: -20px; transform: rotate(-12deg); }
.deco-margarita.der { bottom: -24px; right: -20px; transform: rotate(18deg); width: 76px; height: 76px; }

.fecha-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--rojo);
  background: var(--rosa-suave);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.nombre-script {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: clamp(64px, 17vw, 96px);
  line-height: 1.05;
  color: var(--carmin);
}

.sesenta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: -6px;
}
.sesenta .num {
  font-size: clamp(44px, 12vw, 60px);
  font-weight: 800;
  color: var(--rojo);
  letter-spacing: .02em;
}
.linea-oro {
  flex: 0 1 90px;
  height: 1.5px;
  background: repeating-linear-gradient(90deg, var(--oro) 0 5px, transparent 5px 10px);
}

.anios {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .55em;
  text-indent: .55em;
  color: var(--tinta);
  margin-top: -4px;
}

.bajada {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--oro);
}

.invitacion-sub {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--tinta-suave);
}

/* ---------- Subida ---------- */
.panel-subida { text-align: center; margin-top: 18px; }

.btn-subir {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--carmin), var(--rojo));
  border: none;
  border-radius: 999px;
  padding: 15px 30px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(194, 42, 82, .35);
  transition: transform .12s ease;
}
.btn-subir:active { transform: scale(.97); }
.btn-subir.chico { font-size: 15px; padding: 11px 26px; box-shadow: none; }

.quien { margin-top: 10px; font-size: 13px; color: var(--tinta-suave); }
.quien strong { color: var(--carmin); }
.link {
  font-family: inherit;
  font-size: inherit;
  color: var(--oro);
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.cola { margin-top: 14px; display: grid; gap: 8px; text-align: left; }
.item-subida {
  background: var(--crema-panel);
  border: 1px solid var(--oro-claro);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
}
.item-subida .fila {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}
.item-subida .nombre-archivo {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}
.item-subida .estado { color: var(--tinta-suave); font-weight: 600; flex-shrink: 0; }
.item-subida.ok .estado { color: #2e7d4f; }
.item-subida.error .estado { color: var(--rojo); }
.barra {
  margin-top: 7px;
  height: 6px;
  border-radius: 999px;
  background: var(--rosa-suave);
  overflow: hidden;
}
.barra > div {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rosa), var(--carmin));
  transition: width .25s ease;
}

.panel-cerrado {
  margin-top: 18px;
  text-align: center;
  background: var(--crema-panel);
  border: 1.5px solid var(--oro-claro);
  border-radius: 16px;
  padding: 22px 18px;
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- Galería ---------- */
.galeria-seccion { margin-top: 30px; }

.galeria-encabezado {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.galeria-encabezado h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--tinta);
}
.galeria-encabezado h2::before { content: '🌼 '; }
.stats { font-size: 12.5px; color: var(--tinta-suave); font-weight: 600; }

.chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--tinta-suave);
  background: var(--crema-panel);
  border: 1px solid var(--oro-claro);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}
.chip.activo {
  color: #fff;
  background: var(--carmin);
  border-color: var(--carmin);
}

.grilla {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 6px;
}
@media (min-width: 560px) { .grilla { grid-template-columns: repeat(4, 1fr); gap: 6px; } }

.celda {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--rosa-suave);
  border: none;
  padding: 0;
  cursor: pointer;
}
.celda img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.celda .play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(60, 20, 30, .25);
  color: #fff;
  font-size: 30px;
  pointer-events: none;
}
.celda .autor-tag {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(transparent, rgba(60, 20, 30, .65));
  padding: 12px 6px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  pointer-events: none;
}
.autor-nombre {
  pointer-events: auto;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .55);
  text-underline-offset: 2px;
}
.celda.video-sin-thumb {
  background: linear-gradient(135deg, var(--rosa), var(--carmin));
}

.vacio {
  text-align: center;
  color: var(--tinta-suave);
  font-size: 15px;
  padding: 30px 10px;
}

.pie {
  margin-top: 36px;
  text-align: center;
  font-size: 12.5px;
  color: var(--tinta-suave);
}

/* ---------- Modal nombre ---------- */
.modal-fondo {
  position: fixed;
  inset: 0;
  background: rgba(60, 20, 30, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}
.modal {
  background: var(--crema-panel);
  border-radius: 18px;
  padding: 26px 22px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  border: 1.5px solid var(--oro-claro);
}
.modal-titulo { font-size: 22px; font-weight: 800; color: var(--carmin); }
.modal-texto { font-size: 14px; color: var(--tinta-suave); margin: 8px 0 14px; line-height: 1.45; }
.modal input {
  width: 100%;
  font-family: inherit;
  font-size: 17px;
  text-align: center;
  padding: 11px;
  border: 1.5px solid var(--oro-claro);
  border-radius: 12px;
  background: #fff;
  color: var(--tinta);
  margin-bottom: 14px;
  outline: none;
}
.modal input:focus { border-color: var(--carmin); }

/* ---------- Visor ---------- */
.visor {
  position: fixed;
  inset: 0;
  background: rgba(20, 8, 12, .93);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.visor-media {
  max-width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.visor-media img, .visor-media video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}
.visor-cerrar {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 34px;
  line-height: 1;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 61;
}
.visor-pie {
  color: var(--rosa-suave);
  font-size: 14px;
  font-weight: 700;
  padding-top: 10px;
}

[hidden] { display: none !important; }
