/* Cosmos Pareja: estilos comunes. Pensado primero para el celular. */
:root {
  --fondo: #fbf4f1;
  --tarjeta: #ffffff;
  --texto: #3b2a35;
  --suave: #8a7380;
  --linea: #eadcd6;
  --rosa: #d9466f;
  --rosa-hover: #c23a61;
  --rosa-claro: #fde7ec;
  --ciruela: #5a3550;
  --verde: #2f8f62;
  --rojo: #c0392b;
  --sombra: 0 6px 24px rgba(90, 53, 80, 0.08);
  --radio: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #1d161b;
    --tarjeta: #2a2027;
    --texto: #f4e9ee;
    --suave: #b49fab;
    --linea: #3d3039;
    --rosa: #ef6b8f;
    --rosa-hover: #f4839f;
    --rosa-claro: #3f2430;
    --ciruela: #e7c3d8;
    --sombra: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
p { margin: 0 0 0.75rem; }
a { color: var(--rosa); }

.contenedor { max-width: 480px; margin: 0 auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }

.marca { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--rosa); margin: 8px 0 20px; text-decoration: none; }
.marca img { width: 34px; height: 34px; }

.tarjeta { background: var(--tarjeta); border-radius: var(--radio); padding: 20px; box-shadow: var(--sombra); margin-bottom: 16px; border: 1px solid var(--linea); }
.tarjeta.destacada { border-color: var(--rosa); }
.suave { color: var(--suave); font-size: 0.92rem; }
.centro { text-align: center; }
.oculto { display: none !important; }

label { display: block; font-weight: 600; font-size: 0.92rem; margin: 12px 0 6px; }
label .suave { font-weight: 400; }
input {
  width: 100%;
  font: inherit;
  font-size: 16px; /* menos de 16px hace zoom en iPhone */
  padding: 12px 14px;
  border: 1.5px solid var(--linea);
  border-radius: 12px;
  background: var(--tarjeta);
  color: var(--texto);
}
input:focus { outline: none; border-color: var(--rosa); box-shadow: 0 0 0 3px var(--rosa-claro); }
textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1.5px solid var(--linea); border-radius: 12px; background: var(--tarjeta); color: var(--texto); resize: vertical; }
textarea:focus { outline: none; border-color: var(--rosa); box-shadow: 0 0 0 3px var(--rosa-claro); }
input.codigo { text-transform: uppercase; letter-spacing: 0.25em; text-align: center; font-weight: 700; }

.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--rosa);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  user-select: none;
  transition: background 0.15s, transform 0.1s;
}
.boton:active { transform: scale(0.98); }
@media (hover: hover) { .boton:hover { background: var(--rosa-hover); } }
.boton:disabled { opacity: 0.6; cursor: default; }
.boton.secundario { background: transparent; color: var(--rosa); border: 1.5px solid var(--rosa); }
@media (hover: hover) { .boton.secundario:hover { background: var(--rosa-claro); } }
.boton.whatsapp { background: #1f9d55; }
.boton.peligro { background: transparent; color: var(--rojo); border: 1.5px solid var(--linea); }
.enlace { background: none; border: 0; color: var(--rosa); font: inherit; cursor: pointer; padding: 8px 0; text-decoration: underline; }

.pestanas { display: flex; background: var(--linea); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.pestanas button { flex: 1; border: 0; background: none; padding: 10px; border-radius: 999px; font: inherit; font-weight: 600; color: var(--suave); cursor: pointer; }
.pestanas button[aria-selected="true"] { background: var(--tarjeta); color: var(--texto); box-shadow: var(--sombra); }

.separador { display: flex; align-items: center; gap: 12px; color: var(--suave); font-size: 0.85rem; margin: 18px 0 4px; }
.separador::before, .separador::after { content: ""; flex: 1; height: 1px; background: var(--linea); }
#google { display: flex; justify-content: center; min-height: 44px; margin-top: 12px; }

.error { color: var(--rojo); font-size: 0.92rem; margin-top: 10px; min-height: 1.2em; }
.aviso { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ciruela); color: var(--fondo); padding: 12px 18px; border-radius: 999px; font-size: 0.95rem; z-index: 10; max-width: calc(100% - 32px); text-align: center; }

/* Pareja: los dos con el corazon en medio */
.pareja { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 8px 0 14px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1.4rem; background: var(--rosa-claro); color: var(--rosa); }
.avatar.vacio { background: transparent; border: 2px dashed var(--linea); color: var(--suave); }
.corazon { color: var(--rosa); font-size: 1.6rem; }
.nombres { display: flex; justify-content: center; gap: 46px; font-size: 0.9rem; color: var(--suave); margin-top: -6px; }

.codigo-grande { font-size: 2rem; font-weight: 800; letter-spacing: 0.2em; text-align: center; color: var(--ciruela); margin: 8px 0; user-select: all; }
.fila { display: flex; gap: 10px; }
.fila .boton { margin-top: 10px; }

.modulos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modulo { background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--radio); padding: 16px; }
.modulo .icono { font-size: 1.6rem; }
a.modulo { color: inherit; text-decoration: none; }
.modulo.activo { border-color: var(--rosa); }
@media (hover: hover) { a.modulo:hover { background: var(--rosa-claro); } }
.modulo b { display: block; margin-top: 6px; }
.etiqueta { display: inline-block; font-size: 0.75rem; background: var(--rosa-claro); color: var(--rosa); border-radius: 999px; padding: 2px 10px; margin-top: 8px; }

.encabezado { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.encabezado .marca { margin: 8px 0 16px; }
.icono-boton { border: 0; background: var(--tarjeta); width: 42px; height: 42px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; box-shadow: var(--sombra); color: var(--texto); }

.lista-simple { list-style: none; margin: 8px 0 0; padding: 0; }
.lista-simple li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.lista-simple li:last-child { border-bottom: 0; }
.chip { border: 1.5px solid var(--rosa); background: none; color: var(--rosa); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.alerta { border-left: 4px solid #b88a00; background: #fbf1d0; padding: 10px 12px; border-radius: 0 10px 10px 0; font-size: 0.92rem; margin-bottom: 16px; }
@media (prefers-color-scheme: dark) { .alerta { background: #3d3418; border-color: #f0c43a; } }
.mini { font-size: 0.82rem; }
details summary { cursor: pointer; font-weight: 600; padding: 4px 0; }

/* Invitacion a Pareja Plus */
.dialogo-plus { border: 0; padding: 0; width: 100%; max-width: 420px; margin: auto auto 0; border-radius: 22px 22px 0 0; background: var(--tarjeta); color: var(--texto); }
.dialogo-plus::backdrop { background: rgba(30, 15, 25, 0.45); }
@media (min-width: 600px) { .dialogo-plus { margin: auto; border-radius: 22px; } }
.plus-caja { padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); }
.plus-sello { display: inline-block; background: linear-gradient(90deg, #d9466f, #7b5ea7); color: #fff; font-weight: 700; border-radius: 999px; padding: 4px 14px; margin: 0 0 12px; }
.banda-plan { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--rosa-claro); border-radius: 14px; padding: 10px 14px; margin-bottom: 16px; font-size: 0.92rem; text-decoration: none; color: var(--texto); }
.banda-plan b { color: var(--rosa); white-space: nowrap; }
a.plus-tarjeta { display: block; text-decoration: none; color: var(--texto); border: 1.5px dashed var(--rosa); }
a.plus-tarjeta b { color: var(--rosa); }
details[open] summary { margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
