/*
 * Sistema visual v2 (docs/diseno/01-sistema-visual.md).
 * Neutros de base y un solo acento: el cobalto en las pantallas del organizador y,
 * dentro de la invitación ([data-theme]), el color fuerte del evento.
 */

/* Plus Jakarta Sans alojada en mieventoya.app (DA-12). Licencia en /fonts/OFL.txt. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/plus-jakarta-sans.woff2") format("woff2");
}

:root {
  --ink: #141414;
  --text-2: #5c5c5c;
  --hint: #737373;
  --field: #f5f5f2;
  --line: #e6e6e1;
  --bg: #ffffff;
  --cobalt: #2b50e0;
  --cobalt-soft: #edf1fd;
  --cobalt-ink: #2340b8;
  --warn-bg: #fef6e7;
  --warn-ink: #7a3e00;
  --error: #c62828;
  --switch-off: #d6d6d1;

  /* Acento activo: cobalto fuera de la invitación. */
  --accent: var(--cobalt);
  --accent-soft: var(--cobalt-soft);
  --accent-ink: var(--cobalt-ink);

  --radius-card: 20px;
  --radius-field: 14px;
  --gutter: 24px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Colores del evento (C-7). Deben coincidir con src/config/themes.ts; una prueba lo revisa. */
[data-theme="menta"] {
  --ev-base: #2f8f7a;
  --ev-strong: #24705f;
  --ev-soft: #e6f4f0;
}
[data-theme="rosa"] {
  --ev-base: #c2577a;
  --ev-strong: #a8436a;
  --ev-soft: #fbeaf0;
}
[data-theme="azul"] {
  --ev-base: #3a6fb0;
  --ev-strong: #2f5e99;
  --ev-soft: #e6eef9;
}
[data-theme="arena"] {
  --ev-base: #9a6b3c;
  --ev-strong: #85592f;
  --ev-soft: #f6eee4;
}
[data-theme="amarillo"] {
  --ev-base: #f2d46b;
  --ev-strong: #7a5c00;
  --ev-soft: #fdf6d8;
}
[data-theme="lila"] {
  --ev-base: #c9b6ec;
  --ev-strong: #5b3fa0;
  --ev-soft: #f2ecfb;
}
[data-theme="durazno"] {
  --ev-base: #f5bfa0;
  --ev-strong: #9a4a24;
  --ev-soft: #fdeee5;
}
[data-theme="celeste"] {
  --ev-base: #a9d8ee;
  --ev-strong: #1f6a8a;
  --ev-soft: #e8f5fb;
}
[data-theme="coral"] {
  --ev-base: #e8664a;
  --ev-strong: #b0391f;
  --ev-soft: #fdece7;
}
[data-theme="mandarina"] {
  --ev-base: #f08a24;
  --ev-strong: #a35400;
  --ev-soft: #fef0e1;
}
[data-theme="amarillo-sol"] {
  --ev-base: #f5c518;
  --ev-strong: #9a5512;
  --ev-soft: #fef7d6;
}
[data-theme="verde-grama"] {
  --ev-base: #43a047;
  --ev-strong: #2a7230;
  --ev-soft: #e7f4e7;
}
[data-theme="turquesa"] {
  --ev-base: #1fb5ad;
  --ev-strong: #0e6f6a;
  --ev-soft: #e0f5f4;
}
[data-theme="azul-cielo"] {
  --ev-base: #3d9be9;
  --ev-strong: #1c5f99;
  --ev-soft: #e5f1fc;
}
[data-theme="morado"] {
  --ev-base: #8e5cd9;
  --ev-strong: #6236a8;
  --ev-soft: #f1eafb;
}
[data-theme="fucsia"] {
  --ev-base: #e04497;
  --ev-strong: #a81f68;
  --ev-soft: #fce6f1;
}
[data-theme="rosa-empolvado"] {
  --ev-base: #e3b5b8;
  --ev-strong: #8e4a52;
  --ev-soft: #fbeff0;
}
[data-theme="lavanda"] {
  --ev-base: #c8bee0;
  --ev-strong: #5e4e8c;
  --ev-soft: #f3f0fa;
}
[data-theme="azul-empolvado"] {
  --ev-base: #b4cbe3;
  --ev-strong: #3b5f86;
  --ev-soft: #eef3f9;
}
[data-theme="mantequilla"] {
  --ev-base: #f1e2a6;
  --ev-strong: #2f4a7a;
  --ev-soft: #fcf8e6;
}
[data-theme="salvia"] {
  --ev-base: #b5c4a8;
  --ev-strong: #4e6142;
  --ev-soft: #f1f4ec;
}
[data-theme="champana"] {
  --ev-base: #e6d3b3;
  --ev-strong: #7a5e33;
  --ev-soft: #faf5ec;
}
[data-theme="eucalipto"] {
  --ev-base: #9dc3bd;
  --ev-strong: #2f6660;
  --ev-soft: #ebf4f2;
}
[data-theme="borgona"] {
  --ev-base: #8e3b4a;
  --ev-strong: #6e2633;
  --ev-soft: #f6e8eb;
}
[data-theme="mostaza"] {
  --ev-base: #e3a72f;
  --ev-strong: #7a5300;
  --ev-soft: #fbf1d9;
}
[data-theme="terracota"] {
  --ev-base: #c2623a;
  --ev-strong: #8c3d1b;
  --ev-soft: #f8e9e1;
}
[data-theme="oliva"] {
  --ev-base: #8c9a3e;
  --ev-strong: #4f5a14;
  --ev-soft: #f0f2e0;
}
[data-theme="esmeralda"] {
  --ev-base: #2a9a72;
  --ev-strong: #15684b;
  --ev-soft: #e1f3eb;
}
[data-theme="azul-noche"] {
  --ev-base: #3557a6;
  --ev-strong: #22387a;
  --ev-soft: #e6ecf8;
}
[data-theme="vino"] {
  --ev-base: #9b3653;
  --ev-strong: #701f37;
  --ev-soft: #f6e5ea;
}
[data-theme="grafito"] {
  --ev-base: #55555e;
  --ev-strong: #2e2e35;
  --ev-soft: #eeeef0;
}
[data-theme="mieventoya"] {
  --ev-base: #2b50e0;
  --ev-strong: #2b50e0;
  --ev-soft: #f5f5f2;
}
[data-theme] {
  --accent: var(--ev-strong);
  --accent-soft: var(--ev-soft);
  --accent-ink: var(--ev-strong);
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}
a {
  color: var(--ink);
}
img,
svg {
  max-width: 100%;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Estructura */
.wrap {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 var(--gutter) 48px;
}
.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.row {
  display: flex;
  gap: 12px;
}
.row > * {
  flex: 1;
  min-width: 0;
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
.center {
  text-align: center;
}
@media (min-width: 768px) {
  :root {
    --gutter: 48px;
  }
}

/* Marca: MiEventoYa. "Ya" en cobalto para el organizador y en gris para el invitado. */
.brand {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}
.brand span {
  color: var(--cobalt);
}
/* En el encabezado de las pantallas del organizador el logo va a 20 px (M1, M3). */
.topbar .brand {
  font-size: 20px;
}
[data-theme] .brand span,
.brand-guest span {
  color: var(--text-2);
}

/* Tipografía */
.title-home,
.title-screen {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.title-home {
  font-size: 34px;
}
.title-screen {
  font-size: 30px;
}
.section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}
.support {
  margin: 0;
  font-size: 15px;
  color: var(--text-2);
}
.small {
  font-size: 14px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 700 16px/1.2 var(--font);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-primary,
.btn-whatsapp {
  min-height: 56px;
  background: var(--accent);
  color: #ffffff;
}
.btn-secondary {
  background: var(--bg);
  border-color: var(--ink);
  color: var(--ink);
}
.btn-tertiary {
  background: var(--field);
  color: var(--ink);
}
.btn-danger {
  background: var(--bg);
  border-color: var(--error);
  color: var(--error);
}
.btn-link {
  min-height: 44px;
  padding: 0 4px;
  background: none;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn svg {
  flex: none;
}

/* Barra fija inferior del asistente: Atrás y Siguiente. */
.bottom-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 12px;
  padding: 16px var(--gutter);
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.bottom-bar .btn {
  flex: 1;
  min-height: 56px;
}
/* Atrás ocupa solo lo necesario; Siguiente o Crear evento, el resto (diseño M2). */
.bottom-bar .btn-secondary {
  flex: none;
}

/* Campos */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.field p {
  margin: 0;
}
/* "Opcional" y otras ayudas van debajo de la etiqueta, como en el diseño. */
.field > label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stack > .divider {
  margin: 4px 0;
}
.field-hint {
  font-weight: 500;
  color: var(--text-2);
}
.input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-field);
  background: var(--field);
  color: var(--ink);
  font: 500 16px/1.4 var(--font);
}
textarea.input {
  resize: vertical;
}
.input[type="date"],
.input[type="time"] {
  appearance: none;
  -webkit-appearance: none;
}
.input::placeholder {
  color: var(--hint);
}
.input:focus {
  outline: none;
  background: var(--bg);
  border-color: var(--accent);
}
.input[aria-invalid="true"] {
  border-color: var(--error);
}
.field-error {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--error);
}

/* Interruptor: <button role="switch" aria-checked> con un <span> dentro. */
.switch {
  flex: none;
  width: 52px;
  height: 32px;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: var(--switch-off);
  display: flex;
  justify-content: flex-start;
  cursor: pointer;
}
.switch span {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #ffffff;
}
.switch[aria-checked="true"] {
  background: var(--accent);
  justify-content: flex-end;
}
.setting {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.setting-center {
  align-items: center;
}
.setting-label {
  font-size: 15px;
  font-weight: 700;
}

/* Casilla */
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
}
.check input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

/* Contador: − número + */
.counter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--field);
}
.counter button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font: 500 18px/1 var(--font);
  cursor: pointer;
}
.counter button:disabled {
  color: var(--hint);
  cursor: not-allowed;
}
.counter output {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
}

/* Grupo de opciones en fila */
.options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.option {
  display: inline-flex;
  align-items: center;
}

/* Avance de pasos: 4 segmentos (3 en Recuperar acceso). */
.progress {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 6px;
}
.progress span {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}
.progress .done {
  background: var(--accent);
}

/* Pasos numerados ("Cómo funciona") */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: paso;
  /* Todas las filas miden lo que la más alta: los círculos quedan a la misma distancia
     aunque un texto ocupe más líneas que otro. */
  display: grid;
  grid-auto-rows: 1fr;
}
.steps li {
  position: relative;
  padding: 0 0 24px 48px;
  counter-increment: paso;
}
.steps li::before {
  content: counter(paso);
  position: absolute;
  left: 0;
  top: -4px;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background: var(--bg);
}
.step-title {
  display: block;
  font-weight: 700;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15.5px;
  top: 32px;
  bottom: 0;
  border-left: 1px solid var(--line);
}

/* Tarjetas */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 20px;
}
.card-soft {
  background: var(--accent-soft);
  border-color: transparent;
}

/* Opciones (tipo de evento, filtros) */
.option {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--field);
  color: var(--ink);
  font: 600 15px/1 var(--font);
  cursor: pointer;
}
.option[aria-pressed="true"],
.option[aria-checked="true"] {
  background: var(--accent);
  color: #ffffff;
}
/* Tipos de evento: cuadrícula de 2 x 2 con botones iguales (diseño 04, F2.4). */
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.options-grid .option {
  justify-content: center;
  padding: 0 16px;
  font-size: 14px;
}
/* Paso 3: ¿Qué les vas a pedir a tus invitados? Tarjetas con círculo de selección (diseño 04). */
.list-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.list-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.list-choice[aria-checked="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.list-choice-dot {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1.5px solid var(--hint);
  border-radius: 999px;
  background: var(--bg);
}
.list-choice[aria-checked="true"] .list-choice-dot {
  border: 6px solid var(--accent);
}
.list-choice-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.list-choice-title {
  font-size: 16px;
  font-weight: 700;
}
.option[aria-disabled="true"] {
  color: var(--hint);
  cursor: not-allowed;
}

/* Círculos de color del evento */
/* Ocho círculos en dos filas de cuatro, repartidos a todo el ancho (diseño M2 paso 2). */
.swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-items: center;
  row-gap: 18px;
}
/* Botón de 44 px para tocar fácil; el círculo de 40 px lleva un borde tenue para los colores claros. */
.swatch {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.swatch::before {
  content: "";
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--ev-base);
  box-shadow: inset 0 0 0 1px rgb(20 20 20 / 8%);
}
.swatch[aria-checked="true"]::before {
  box-shadow:
    inset 0 0 0 1px rgb(20 20 20 / 8%),
    0 0 0 3px var(--bg),
    0 0 0 5px var(--ink);
}

/* Colores del tipo y, debajo, "Usar el color de MiEventoYa" (diseño 04, F2.2). */
.color-picker {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.app-color {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-2);
  font: 600 14px/1 var(--font);
  cursor: pointer;
}
.app-color[aria-checked="true"] {
  border: 1.5px solid var(--ink);
  color: var(--ink);
}
.app-color-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #2b50e0;
  box-shadow: inset 0 0 0 4px #edf1fd;
}

/* Etiquetas de regalos */
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.tag-taken {
  border-color: transparent;
  background: var(--field);
  color: var(--hint);
}
.tag-mine {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.gift-taken .gift-name {
  color: var(--hint);
  text-decoration: line-through;
}

/* Ajustes del paso 4 */
.setting-label {
  display: block;
}
.setting-help {
  display: block;
  line-height: 1.5;
}
.setting-label-light {
  font-size: 15px;
  font-weight: 600;
}
.setting-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.setting-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.verification {
  min-height: 65px;
  margin-top: 20px;
}

/* Regalos del paso 3 */
.gift-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-card);
  background: var(--field);
}
.input-white,
.input-white:focus {
  background: var(--bg);
}
.gift-form-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
}
.btn-48 {
  min-height: 48px;
  font-size: 15px;
}
.btn-start {
  align-self: flex-start;
  padding: 0;
  font-weight: 700;
  font-size: 15px;
}
.list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
/* Con el botón para ordenar (H-3.12): título y conteo juntos a la izquierda, el botón a la derecha. */
.list-head-sort {
  align-items: center;
  gap: 12px;
}
.list-head-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  height: 44px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--hint);
  font: 600 14px var(--font);
  cursor: pointer;
}
.gift-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.gift-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.gift-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gift-item-name {
  font-weight: 700;
  overflow-wrap: anywhere;
}
.gift-item .icon-btn {
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

/* Lista de eventos ("Mis eventos") */
.event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.event-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  color: var(--ink);
  text-decoration: none;
}
.event-row-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.event-row-title {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Quitar de este dispositivo (H-1.11, diseño 06): el borde pasa de la fila a su elemento de la lista. */
.event-item {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg);
}
.event-item > .event-row {
  flex: 1;
  min-width: 0;
  border: 0;
}
.event-item > .event-row + .event-remove {
  margin-left: -8px;
}
.event-remove {
  flex: none;
  width: 44px;
  height: 44px;
  margin-right: 8px;
  padding: 0;
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  cursor: pointer;
}
.event-item-off {
  flex-direction: column;
  align-items: stretch;
}
.event-item-off > .event-row {
  padding-bottom: 6px;
}
.event-item-off .event-row-title {
  color: var(--text-2);
}
.event-item-off .dot {
  background: var(--line);
}
.event-status {
  color: var(--error);
  font-weight: 600;
}
.event-actions {
  display: flex;
  gap: 10px;
  padding: 0 16px 14px 42px;
}
.event-past {
  font-weight: 700;
  color: var(--ink);
}
.btn-inline.btn-inline-danger {
  color: var(--error);
}
.dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--ev-base);
}

/* Vista previa de la portada de la invitación */
.preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--ev-soft);
  text-align: center;
}
.preview-title {
  margin: 4px 0 0;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.preview-when {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
}
.preview .support {
  margin: 0;
}
/* "Así se verá en la invitación" de Otro evento (diseño 04, paso 1) */
.preview-plain {
  background: var(--field);
}
.preview-plain .eyebrow {
  color: var(--text-2);
}
.preview-plain .preview-title {
  font-size: 26px;
}
.preview-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* "¿Quisiste decir…?" (diseño 04, paso 1) */
.suggestion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.suggestion p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}
#sugerencia:empty {
  display: none;
}

/* Avisos */
.notice {
  padding: 14px 16px;
  border-radius: var(--radius-field);
  font-size: 14px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.notice-warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.notice-error {
  background: #fdecec;
  color: var(--error);
}

/* Ilustraciones */
.illustration {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto;
}

/* Inicio */
.topbar-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.hero {
  padding: 8px 0 32px;
}
.home-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 0 24px;
}

/* Asistente de crear (M2): encabezado, contenido y barra fija; sin pie legal. */
[data-mode="asistente"] .wrap {
  padding: 0;
}
[data-mode="asistente"] .footer {
  display: none;
}
.wizard {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wizard-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px var(--gutter) 16px;
  border-bottom: 1px solid var(--line);
}
.wizard-top {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wizard-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
}
.wizard-body {
  flex: 1;
  padding: 20px var(--gutter) 32px;
}
.title-screen[tabindex="-1"]:focus {
  outline: none;
}
.icon-btn {
  width: 44px;
  height: 44px;
  margin-left: -10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

/* M3 Listo para compartir */
.ready-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 28px;
}
.ready-section-line {
  padding: 24px 0 0;
  margin-bottom: 24px;
  border-top: 1px solid var(--line);
}
.ready-section-last {
  gap: 8px;
  margin-bottom: 0;
}
.ready-illustration {
  max-width: 240px;
}
.ready-meta {
  margin: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 15px;
  color: var(--text-2);
}
.link-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 16px;
  border-radius: var(--radius-field);
  background: var(--field);
}
.link-pill-text {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.link-pill-btn {
  flex: none;
  margin: 0;
  border: 0;
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
}
.message-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.message-card-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.message-card-text {
  white-space: pre-line;
}
.notice-icon {
  margin: 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  line-height: 1.5;
}
.notice-icon svg {
  flex: none;
  margin-top: 2px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.grid-2 .btn {
  padding: 0 12px;
  font-size: 15px;
}
.link-strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-underline-offset: 4px;
}
.ready-more {
  margin: 0;
  padding: 28px 0 32px;
  text-align: center;
}

/* Mensajes emergentes (M7, F-33) */
.toasts {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 24px;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.toast {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 512px;
  padding: 14px 16px;
  border-radius: var(--radius-field);
  font-size: 15px;
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.16);
}
.toast svg {
  flex: none;
}
.toast-ok {
  background: var(--ink);
  color: #ffffff;
}
.toast-error {
  padding: 13px 16px;
  border: 1.5px solid var(--error);
  background: var(--bg);
  color: var(--error);
  font-weight: 600;
}
.toast-info {
  background: var(--field);
  color: var(--ink);
}

/* M4 Invitación. Celular primero; en computador, portada fija a la izquierda (desde 960 px). */
.wrap-wide {
  max-width: none;
  padding: 0;
}
.loading {
  padding: 48px var(--gutter);
}
.btn-44 {
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
}
.self-start {
  align-self: flex-start;
}
.invitation {
  max-width: 560px;
  margin: 0 auto;
}
.invitation [id] {
  scroll-margin-top: 16px;
}
.guest-top {
  height: 72px;
  padding: 8px var(--gutter) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--ev-soft);
}
.guest-type {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-ink);
}
.guest-nav,
.guest-share {
  display: none;
}
.cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px var(--gutter) 32px;
  background: var(--ev-soft);
  text-align: center;
}
.cover-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--bg);
  color: var(--accent-ink);
}
.cover-title {
  margin: 0;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.cover-honorees {
  margin: 0;
  font-size: 16px;
  color: var(--text-2);
}
.cover-card {
  align-self: stretch;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-card);
  background: var(--bg);
  text-align: left;
}
.cover-row {
  display: flex;
  gap: 12px;
  align-items: center;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.cover-row svg {
  flex: none;
}
.cover-sub {
  font-size: 15px;
  color: var(--text-2);
}
.cover-sep {
  display: none;
}
/* Uno debajo del otro: "Agregar a tu calendario" no cabe al lado de "Cómo llegar" en celular. */
.cover-actions {
  display: grid;
  gap: 10px;
}
.calendar-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
}
.cover-message {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.invitation-main {
  padding: 0 var(--gutter);
}
.guest-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.guest-section-first {
  gap: 18px;
  border-top: 0;
}
.guest-section-small {
  gap: 12px;
}
.guest-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.guest-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.gift-cards {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gift-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.gift-card .tag {
  align-self: flex-start;
}
.gift-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.gift-card-name {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.gift-card-price {
  flex: none;
}
.gift-card-noprice {
  flex: none;
  color: var(--text-2);
}
.gift-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.gift-card-out {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  border-color: transparent;
  background: var(--field);
  color: var(--hint);
}
.gift-card-out .gift-card-name {
  text-decoration: line-through;
}
.gift-card-state {
  flex: none;
  font-size: 13px;
  font-weight: 600;
}
/* Cosas para llevar: quién lleva cada cosa (H-9.4) */
.need-people {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-2);
}
.need-card-done {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.need-card-done .need-people {
  color: inherit;
}
.contrib-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.guest-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: grid;
  padding: 12px var(--gutter) 20px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.guest-bar .btn {
  min-height: 52px;
  font-size: 15px;
}
body:has(.guest-bar) .footer {
  padding-bottom: 108px;
}
body:has(.guest-bar) .toasts {
  bottom: 100px;
}
@media (min-width: 960px) {
  .invitation {
    max-width: none;
  }
  .guest-top {
    padding: 0 48px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
  }
  .guest-top .brand {
    font-size: 20px;
  }
  .guest-type {
    display: none;
  }
  .guest-nav {
    display: flex;
    gap: 32px;
    font-size: 15px;
    font-weight: 600;
  }
  .guest-nav a {
    color: var(--ink);
    text-decoration: none;
  }
  .guest-share {
    display: inline-flex;
    gap: 8px;
    padding: 0 18px;
  }
  .invitation-grid {
    display: grid;
    grid-template-columns: 440px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 48px;
  }
  .invitation-cover {
    position: sticky;
    top: 40px;
  }
  .cover {
    gap: 16px;
    padding: 40px 32px;
    border-radius: 28px;
  }
  .cover-icon {
    display: none;
  }
  .cover-title {
    font-size: 44px;
    line-height: 1.05;
  }
  .cover-honorees {
    font-size: 17px;
  }
  .cover-card {
    margin-top: 0;
    padding: 20px;
  }
  .cover-message {
    margin: 0;
  }
  /* En computador la fecha va en una línea y sin íconos (diseño M4 computador). */
  .cover-row svg,
  .cover-br {
    display: none;
  }
  .cover-row {
    line-height: 1.45;
  }
  .cover-sep {
    display: inline;
  }
  .cover-time {
    font-size: 16px;
    color: var(--ink);
  }
  .guest-aportes {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 16px;
    row-gap: 0;
  }
  .guest-aportes .section-title {
    font-size: 17px;
    line-height: 1.5;
  }
  .guest-aportes .contrib-text {
    grid-column: 1;
    color: var(--text-2);
  }
  .guest-aportes .btn {
    grid-column: 2;
    grid-row: 1 / span 2;
    padding: 0 18px;
  }
  .invitation-main {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 40px;
  }
  .guest-section {
    padding: 0;
    border-top: 0;
  }
  .guest-section-first {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
  }
  .guest-section-small {
    padding-top: 28px;
    border-top: 1px solid var(--line);
  }
  .guest-title {
    font-size: 26px;
  }
  .gift-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .gift-card {
    padding: 18px;
  }
  .guest-bar {
    display: none;
  }
  body:has(.guest-bar) .footer {
    padding-bottom: 28px;
  }
  body:has(.guest-bar) .toasts {
    bottom: 24px;
  }
}

/* M4 Confirma tu asistencia (1.7b) */
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.choice {
  min-height: 52px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font: 700 15px/1.2 var(--font);
  cursor: pointer;
}
.choice[aria-checked="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.rsvp-companions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rsvp-companions.is-off .rsvp-label {
  color: var(--hint);
}
.rsvp-label {
  font-size: 15px;
  font-weight: 600;
}
.rsvp-hint {
  font-weight: 400;
  color: var(--text-2);
}
.rsvp-companions .small {
  font-size: 13px;
}
.counter-lg {
  flex: none;
  height: 48px;
  gap: 0;
  padding: 0;
}
.counter-lg button {
  width: 48px;
  height: 48px;
  background: transparent;
  font-size: 22px;
}
.counter-lg output {
  width: 28px;
  min-width: 0;
  font-size: 17px;
}
.notice-col {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  line-height: 1.5;
}
.notice-col .link-strong {
  align-self: flex-start;
  color: inherit;
}
.rsvp-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rsvp-done {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-card);
  background: var(--accent-soft);
}
.rsvp-done-text {
  font-size: 16px;
  line-height: 1.45;
}
.rsvp-done .btn {
  min-height: 52px;
  font-size: 15px;
}
@media (min-width: 960px) {
  .rsvp-form {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 2fr);
    gap: 16px 12px;
    align-items: end;
  }
  .rsvp-form > * {
    grid-column: 1 / -1;
  }
  .rsvp-form > .rsvp-name {
    grid-column: 1;
  }
  .rsvp-form > .choices {
    grid-column: 2;
  }
}

/* M4 Lista de regalos y hoja para apartar (1.7c) */
.ink {
  color: var(--ink);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* La píldora se ve de 40 px; el área que responde al toque mide 44 px (RNF-05). */
.chip {
  position: relative;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font: 600 14px/1 var(--font);
  cursor: pointer;
}
.chip::before {
  content: "";
  position: absolute;
  inset: -3px -1px;
}
.chip[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}
.gift-card-mine {
  border: 1.5px solid var(--accent);
}
.gift-card-buttons {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.gift-card-buttons .btn-primary {
  padding: 0 20px;
  font-size: 15px;
}
.gift-code-link {
  align-self: center;
  white-space: normal;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-underline-offset: 4px;
}
body.sheet-open {
  overflow: hidden;
}
body.sheet-open .toasts {
  top: 24px;
  bottom: auto;
}
.toasts {
  z-index: 30;
}
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgb(20 20 20 / 58%);
}
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 21;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 12px var(--gutter) 28px;
  border-radius: 28px 28px 0 0;
  background: var(--bg);
}
.sheet-grip {
  flex: none;
  width: 40px;
  height: 4px;
  align-self: center;
  border-radius: 999px;
  background: var(--line);
}
.sheet-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.sheet-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sheet-head .eyebrow {
  letter-spacing: 0.08em;
  color: var(--text-2);
}
.sheet-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.sheet-text {
  font-size: 16px;
  line-height: 1.5;
}
.sheet-main {
  min-height: 56px;
  font-size: 16px;
}
.sheet-center {
  gap: 14px;
  align-items: center;
  text-align: center;
}
.sheet-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.sheet-code {
  padding: 12px 20px;
  border-radius: 14px;
  background: var(--field);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.18em;
}
.sheet-wide {
  width: 100%;
}
.sheet-list {
  margin: 0;
  padding: 4px 16px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  font-size: 15px;
}
.sheet-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.sheet-list li:last-child {
  border-bottom: 0;
}
.sheet-list .support {
  flex: none;
  font-size: 15px;
}
.input-code {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
@media (min-width: 960px) {
  /* En computador la hoja se muestra como ventana centrada. */
  .sheet {
    left: 50%;
    right: auto;
    bottom: 50%;
    width: 440px;
    transform: translate(-50%, 50%);
    padding: 28px;
    border-radius: 28px;
  }
  .sheet-grip {
    display: none;
  }
}

/* M5 Panel del organizador (1.8) */
.panel-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
}
.panel-head .topbar {
  padding-top: 8px;
}
.panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--cobalt-soft);
  color: var(--cobalt-ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.panel-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.panel-title .title-screen {
  overflow-wrap: anywhere;
}
.panel-btn {
  min-height: 52px;
  font-size: 15px;
}
.panel-tabs {
  display: flex;
  margin: 0 -8px;
}
/* Cada pestaña mide su texto más una parte igual del espacio libre: así el espacio entre
   los textos es el mismo aunque "Respuestas" sea más largo que "Evento". */
.panel-tab {
  flex: 1 1 auto;
  min-height: 48px;
  padding: 0 4px;
  border: 0;
  border-bottom: 2.5px solid transparent;
  background: transparent;
  color: var(--text-2);
  font: 700 14px/1.2 var(--font);
  cursor: pointer;
}
.panel-tab[aria-selected="true"] {
  border-bottom-color: var(--cobalt);
  color: var(--ink);
}
.panel-body {
  padding-top: 24px;
}
.panel-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.panel-stack-12 {
  gap: 12px;
}
.panel-stats {
  gap: 12px;
}
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.stat-wide {
  gap: 12px;
}
.stat-wide > b {
  font-size: 16px;
}
.stat-number {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stat-label {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 15px;
}
.stat-row > b:first-child {
  font-size: 16px;
}
.stat-name {
  overflow-wrap: anywhere;
}
.stat-ratio {
  flex: none;
  font-size: 15px;
}
.bar {
  display: block;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--cobalt-soft);
  overflow: hidden;
  appearance: none;
}
.bar::-webkit-progress-bar {
  background: var(--cobalt-soft);
}
.bar::-webkit-progress-value {
  border-radius: 999px;
  background: var(--cobalt);
}
.bar::-moz-progress-bar {
  border-radius: 999px;
  background: var(--cobalt);
}
.rsvp-state {
  flex: none;
  font-size: 14px;
  font-weight: 600;
}
.rsvp-state.is-no {
  color: var(--hint);
}
.chips-accent .chip {
  padding: 0 14px;
}
.chips-accent .chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.rsvp-cards {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rsvp-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.rsvp-card-message {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-2);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.rsvp-card-time {
  font-size: 13px;
  color: var(--hint);
}
.state-card.state-card-left {
  align-items: stretch;
  text-align: left;
}
.state-card-left .btn-link {
  align-self: center;
}

/* Pestaña Regalos del panel (1.8b) */
.panel-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.gift-cards.panel-gifts {
  display: flex;
  gap: 12px;
}
.panel-gifts .gift-card-head {
  align-items: baseline;
}
.panel-card .notice {
  margin: 0;
}
.panel-gift-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.panel-gift-row .tag {
  align-self: center;
  min-width: 0;
  padding: 4px 12px;
  line-height: 1.25;
}
.panel-gift-buttons {
  flex: none;
  margin-left: auto;
  display: flex;
  gap: 6px;
}
/* Editar y eliminar un regalo: solo el ícono, con 44 px para el dedo. */
.panel-icon-btn {
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}
.panel-icon-btn:hover {
  background: var(--field);
}
.panel-icon-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.panel-icon-danger {
  color: var(--error);
}
.gift-card-name-taken {
  color: var(--hint);
  text-decoration: line-through;
}
.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}
.btn-tertiary.btn-sm {
  border-width: 0;
}
.btn-danger-soft {
  border-width: 1px;
  border-color: var(--line);
  background: var(--bg);
  color: var(--error);
}
.btn-danger-fill {
  background: var(--error);
  color: #ffffff;
}
.gift-who {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.gift-edit {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.gift-edit-new {
  padding-top: 0;
  border-top: 0;
}
.gift-edit-title {
  font-size: 16px;
}
.gift-edit .notice {
  margin: 0;
  line-height: 1.5;
}
.field-hint-inline {
  font-weight: 400;
  color: var(--text-2);
}
.panel-foot {
  font-size: 13px;
}

/* Pestaña Evento del panel (1.8c) */
.btn-inline {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.panel-access {
  margin-top: 8px;
  gap: 8px;
}
.panel-access-title {
  font-size: 17px;
}
.panel-access-line {
  line-height: 1.6;
}

/* M6 Recuperar acceso (1.9a) */
#recuperar-paso:empty {
  display: none;
}
.recover {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 24px;
}
.recover .stack {
  gap: 20px;
}
.recover-lead {
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.code-boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.code-box {
  width: 100%;
  height: 56px;
  padding: 0;
  border: 1.5px solid transparent;
  border-radius: var(--radius-field);
  background: var(--field);
  color: var(--ink);
  font: 700 22px/1 var(--font);
  text-align: center;
}
.code-box:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}
.code-box[aria-invalid="true"] {
  border-color: var(--error);
}
.recover-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 15px;
}
.event-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.event-row-button {
  width: 100%;
  background: var(--bg);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.event-row-button:disabled {
  cursor: progress;
}
.recover .btn-link {
  align-self: center;
}
.recover-help {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 32px 0 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.recover-help p {
  line-height: 1.55;
}
.recover-help a {
  color: var(--ink);
  font-weight: 700;
}
.verification[hidden] {
  display: none;
}

/* Política de tratamiento de datos (/privacidad) */
.legal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 24px;
  font-size: 15px;
  line-height: 1.6;
}
.legal p,
.legal ul {
  margin: 0;
}
.legal ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 20px;
}
.legal .section-title {
  margin-top: 16px;
}
.legal a:not(.btn) {
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.legal .btn {
  margin-top: 16px;
}

/* M7 Evento y página no encontrados */
.state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 32px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  text-align: center;
}
.state-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--field);
}
.state-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.state-btn {
  min-height: 52px;
  font-size: 15px;
}

/* Pie legal */
.footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px var(--gutter) 28px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-2);
}
.footer p {
  margin: 0;
}
.footer a {
  color: var(--text-2);
  text-underline-offset: 2px;
}
@media (min-width: 768px) {
  .footer {
    flex-direction: row;
    justify-content: space-between;
    gap: 24px;
  }
}

/* Sitio del equipo (ADR-025): solo lectura, primero para celular */
.team {
  gap: 32px;
}
.team-head {
  gap: 8px;
}
.team-section {
  gap: 12px;
}
.team-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.team-table th,
.team-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}
.team-table th:first-child {
  padding-left: 0;
  text-align: left;
  white-space: normal;
}
.team-table thead th {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
}
.team-table tbody th {
  font-weight: 600;
}
.team-subtitle {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 700;
}
.team-pct {
  display: block;
  font-size: 12px;
  color: var(--hint);
}
.team-scroll {
  overflow-x: auto;
}
.team-table-wide th:first-child {
  position: sticky;
  left: 0;
  min-width: 72px;
  background: var(--bg);
  white-space: nowrap;
}
/* Fila de título de cada semana o mes en "Eventos por canal" (H-10.3, diseño 05). */
.team-group th {
  padding-top: 18px;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.team-table tbody tr.team-group:first-child th {
  padding-top: 8px;
}
.team-chart {
  margin: 0;
}
.team-chart svg {
  display: block;
  width: 100%;
  height: auto;
}
.team-chart figcaption {
  margin-top: 4px;
}
.team-chart-bar {
  fill: var(--accent);
}
.team-chart-hit {
  fill: transparent;
}
.team-chart g:hover .team-chart-bar {
  fill: var(--accent-ink);
}
.team-chart-base {
  stroke: var(--line);
  stroke-width: 1;
}
.team-chart-value {
  font-size: 11px;
  font-weight: 700;
  fill: var(--ink);
}
.team-chart-label {
  font-size: 10px;
  fill: var(--text-2);
}
.team-notes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
}
.team-notes b {
  color: var(--ink);
}

/* "¿Tienes un evento pronto? Crea el tuyo en MiEventoYa" (H-10.2, diseño 05): enlace de texto al final
   de la invitación y en la pantalla final del invitado. No usa el color del evento. */
.crea-tuyo {
  margin: 0;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
}
.crea-tuyo a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.crea-tuyo-final {
  padding: 4px 0 0;
  border-top: 0;
}
