/* Ruleta del Amigo Invisible: portada con la ruleta del cliente, los 5 pasos y el juego de prueba (crear, invitar,
   wishlists y girar). La ruleta son dos capas: el disco que gira (imagen original o SVG con los nombres) y, encima,
   el marco recortado de la visual (madera, aro, flecha, botón central, soporte, regalos y sobre). */
.ruleta-pagina {
  --rubor: #F6DCD7;
  --salmon: #F2A397;
  --malva: #B96B7E;
  --ciruela: #8F4A5E;
  --ciruela-oscuro: #5E2236;
  --linea-suave: #E8D5DA;
}

/* ---------- La ruleta (componente) ---------- */
.ruleta { position: relative; width: 100%; aspect-ratio: 1080 / 1350; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.ruleta-marco { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
/* Centro del disco: (566, 590.5) sobre 1080 × 1350; radio 430 */
.ruleta-disco {
  position: absolute; z-index: 1; left: 12.5926%; top: 11.8889%; width: 79.6296%; aspect-ratio: 1;
  border-radius: 50%; will-change: transform; transform-origin: 50% 50%;
}
.ruleta-disco > img, .ruleta-disco > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ruleta-disco svg text { font-family: var(--fuente-titulo); font-weight: 600; }
.ruleta-disco .ganador { fill: #fff; fill-opacity: 0; stroke: var(--oro); stroke-width: 9; stroke-linejoin: round; animation: ganador 1s ease-in-out 3; }
@keyframes ganador { 50% { fill-opacity: .42; } }
.ruleta-toque {
  position: absolute; z-index: 3; left: 12.5926%; top: 11.8889%; width: 79.6296%; aspect-ratio: 1;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer; padding: 0;
}
.ruleta-toque:focus-visible { outline: 3px solid var(--oro); outline-offset: 6px; }

/* Confeti al parar */
.confeti { position: fixed; z-index: 60; top: 0; left: 0; width: 9px; height: 13px; border-radius: 2px; pointer-events: none; }

/* ---------- Portada ---------- */
.portada-ruleta {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: clamp(20px, 4vw, 64px);
  padding: clamp(28px, 5vw, 64px) clamp(16px, 5vw, 72px) clamp(36px, 5vw, 72px);
  background:
    radial-gradient(900px 560px at 78% 46%, #FBE1DC 0%, rgba(251, 225, 220, 0) 62%),
    linear-gradient(180deg, var(--crema) 0%, #FCEDE8 100%);
}
.texto-portada { position: relative; z-index: 1; max-width: 620px; justify-self: end; }
.sello-ruleta {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 7px 14px 7px 12px; border-radius: 999px;
  background: #fff; color: var(--granate); font: 700 12px/1 var(--fuente-texto); letter-spacing: .14em; text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(176, 40, 72, .12);
}
.sello-ruleta::before { content: ""; width: 20px; height: 10px; background: var(--ciruela); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 20'%3E%3Cpath d='M2 4c6-4 12-2 18 2 6-4 12-6 18-2-1 9-6 14-12 14-3 0-5-3-6-5-1 2-3 5-6 5C8 18 3 13 2 4zm9 5c-2 0-3 1-3 2 1 1 4 1 6 0-1-1-2-2-3-2zm18 0c-1 0-2 1-3 2 2 1 5 1 6 0 0-1-1-2-3-2z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 20'%3E%3Cpath d='M2 4c6-4 12-2 18 2 6-4 12-6 18-2-1 9-6 14-12 14-3 0-5-3-6-5-1 2-3 5-6 5C8 18 3 13 2 4zm9 5c-2 0-3 1-3 2 1 1 4 1 6 0-1-1-2-2-3-2zm18 0c-1 0-2 1-3 2 2 1 5 1 6 0 0-1-1-2-3-2z'/%3E%3C/svg%3E") center / contain no-repeat; }
.portada-ruleta h1 {
  margin: 0; font: 600 clamp(38px, 5.2vw, 68px)/1.04 var(--fuente-titulo); letter-spacing: -.01em; color: var(--tinta); text-wrap: balance;
}
.portada-ruleta h1 em { font-style: italic; font-weight: 500; color: var(--granate); }
.entradilla { margin: 20px 0 0; font: 500 clamp(18px, 1.8vw, 21px)/1.45 var(--fuente-texto); color: var(--tinta); text-wrap: pretty; }
.descripcion { margin: 14px 0 0; font-size: 16.5px; line-height: 1.6; color: var(--tinta-suave); text-wrap: pretty; }
.acciones-portada { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.boton--grande { padding: 16px 28px; font-size: 16px; }
.boton--borde.boton--grande { background: rgba(255, 255, 255, .6); }

.columna-portada { position: relative; justify-self: start; width: min(100%, 540px); }
.nota-ruleta {
  position: absolute; left: -2%; top: 18%; z-index: 4; margin: 0; display: grid; justify-items: start;
  font: 700 clamp(22px, 2.4vw, 30px)/1 var(--fuente-mano); color: var(--granate); rotate: -8deg; pointer-events: none;
}
.nota-ruleta svg { order: 2; width: 46px; height: 40px; margin: 2px 0 0 34px; fill: none; stroke: var(--granate); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.destello { position: absolute; color: var(--malva); opacity: .35; pointer-events: none; line-height: 1; }
.destello.d1 { left: 6%; top: 14%; font-size: 22px; }
.destello.d2 { left: 44%; top: 8%; font-size: 26px; color: var(--salmon); opacity: .6; }
.destello.d3 { right: 4%; bottom: 12%; font-size: 30px; }
.destello.d4 { left: 47%; bottom: 10%; font-size: 20px; color: var(--granate); opacity: .3; }

/* En una columna, la ruleta va justo después de la entradilla y los botones debajo de ella */
@media (max-width: 900px) {
  .portada-ruleta { grid-template-columns: 1fr; row-gap: 0; padding-top: 28px; text-align: center; }
  .texto-portada { display: contents; }
  .portada-ruleta > *, .texto-portada > * { max-width: 620px; justify-self: center; }
  .sello-ruleta { order: 1; }
  .portada-ruleta h1 { order: 2; }
  .entradilla { order: 3; }
  .columna-portada { order: 4; width: min(100%, 440px); margin-top: 14px; }
  .acciones-portada { order: 5; justify-content: center; margin-top: 8px; }
  .descripcion { order: 6; margin-top: 22px; }
  .nota-ruleta { left: -4px; top: 14%; }
  .destello.d2, .destello.d4 { display: none; }
  .destello.d1 { top: 30%; left: 4%; }
}
@media (max-width: 480px) {
  .acciones-portada .boton { flex: 1 1 100%; }
  .nota-ruleta { font-size: 20px; }
  .nota-ruleta svg { width: 34px; height: 30px; margin-left: 22px; }
}

/* ---------- Cómo funciona ---------- */
.como-funciona { padding: clamp(48px, 7vw, 96px) clamp(16px, 5vw, 72px); background: var(--tablero); }
.como-funciona h2 { margin: 0 0 clamp(28px, 4vw, 52px); text-align: center; font: 600 clamp(32px, 4vw, 50px)/1.05 var(--fuente-titulo); letter-spacing: -.015em; }
.pasos { list-style: none; margin: 0 auto; padding: 0; max-width: 1280px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); position: relative; }
.pasos::before { content: ""; position: absolute; left: 10%; right: 10%; top: 38px; border-top: 2px dashed #EBCFD1; }
.pasos li { position: relative; text-align: center; }
.icono-paso {
  position: relative; display: grid; place-items: center; width: 78px; height: 78px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 0 6px #fff, 0 10px 24px rgba(90, 30, 50, .12);
}
.icono-paso svg { width: 38px; height: 38px; fill: none; stroke: var(--ciruela-oscuro); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icono-paso .relleno { fill: var(--ciruela-oscuro); stroke: none; }
.icono-paso .lupa { fill: rgba(255, 255, 255, .7); }
.icono-paso .num {
  position: absolute; right: -4px; top: -4px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: var(--granate); color: #fff; font: 700 13px/1 var(--fuente-texto); box-shadow: 0 0 0 3px #fff;
}
.pasos h3 { margin: 0 0 8px; font: 600 clamp(18px, 1.5vw, 20px)/1.2 var(--fuente-titulo); color: var(--tinta); text-wrap: balance; }
.pasos p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--tinta-suave); text-wrap: pretty; }
@media (max-width: 1100px) {
  .pasos { grid-template-columns: 1fr; max-width: 640px; gap: 26px; }
  .pasos::before { left: 38px; right: auto; top: 40px; bottom: 40px; border-top: 0; border-left: 2px dashed #EBCFD1; }
  .pasos li { display: grid; grid-template-columns: 78px 1fr; column-gap: 20px; text-align: left; }
  .icono-paso { grid-row: 1 / span 2; margin: 0; }
  .pasos h3 { align-self: end; margin-top: 6px; }
}
@media (max-width: 420px) {
  .pasos::before { left: 30px; }
  .pasos li { grid-template-columns: 62px 1fr; column-gap: 14px; }
  .icono-paso { width: 62px; height: 62px; }
  .icono-paso svg { width: 30px; height: 30px; }
}

/* ---------- El juego ---------- */
.juego {
  padding: clamp(44px, 6vw, 88px) clamp(16px, 4vw, 56px) clamp(52px, 7vw, 96px); scroll-margin-top: 70px;
  background: linear-gradient(180deg, #FBEFF0 0%, #F6DCD7 100%);
}
.cabecera-juego { max-width: 720px; margin: 0 auto clamp(20px, 3vw, 36px); text-align: center; }
.cabecera-juego h2 { margin: 0; font: 400 clamp(48px, 7vw, 80px)/1 var(--fuente-script); color: var(--granate); }
.cabecera-juego p { margin: 12px auto 0; max-width: 54ch; color: var(--tinta-suave); text-wrap: pretty; }
.mesa-juego { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(20px, 3vw, 44px); max-width: 1180px; margin: 0 auto; align-items: start; }
.columna-ruleta { position: sticky; top: 84px; width: min(100%, 500px); justify-self: center; }
.pie-ruleta { margin: 4px 0 0; min-height: 1.2em; text-align: center; font: 700 clamp(20px, 2.2vw, 26px)/1.1 var(--fuente-mano); color: var(--granate); text-wrap: balance; }
@media (max-width: 900px) {
  .mesa-juego { grid-template-columns: 1fr; }
  .columna-ruleta { position: relative; top: 0; width: min(100%, 360px); }
}

/* Panel (la tarjeta de la derecha) */
.panel { background: var(--crema); border-radius: 26px; padding: clamp(20px, 3vw, 32px); box-shadow: 0 30px 70px rgba(90, 30, 50, .16); min-width: 0; }
.panel .fases { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.panel .fases li { display: grid; justify-items: center; gap: 6px; font: 600 12px/1.15 var(--fuente-texto); color: var(--tinta-suave); text-align: center; }
.panel .fases li span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 2px solid var(--linea-suave); font-weight: 700; }
.panel .fases li.activa { color: var(--granate); }
.panel .fases li.activa span, .panel .fases li.hecha span { background: var(--granate); border-color: var(--granate); color: #fff; }
.vista, .pila { display: grid; gap: 16px; }
.vista:focus { outline: none; }
.vista.entra { animation: entra-vista .35s ease; }
@keyframes entra-vista { from { opacity: 0; transform: translateX(14px); } }
.sin-js { margin: 0; color: var(--tinta-suave); }
.titulo-vista { margin: 0; font: 400 clamp(34px, 4.4vw, 44px)/1.05 var(--fuente-script); color: var(--granate); overflow-wrap: anywhere; }
.sub { margin: -6px 0 0; color: var(--tinta-suave); font-size: 15.5px; text-wrap: pretty; }
.pregunta { display: grid; gap: 6px; }
.enunciado { margin: 0; font: 600 16px/1.3 var(--fuente-texto); color: var(--tinta); }
.ayuda { margin: 0; font-size: 14px; color: var(--tinta-suave); }
.panel input[type="text"] {
  width: 100%; min-width: 0; padding: 12px 13px; border-radius: 12px; border: 1.5px solid var(--linea-suave); background: #fff; font-size: 16px;
}
.panel input[type="text"]:focus { outline: none; border-color: var(--granate); box-shadow: 0 0 0 3px rgba(176, 40, 72, .15); }
.pregunta.error input { border-color: var(--granate); }
.fila-anadir { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.fila-anadir .boton { padding: 12px 18px; }
.mensaje-error { margin: 0; color: var(--granate); font-weight: 600; font-size: 14px; }
.navegar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; margin-top: 4px; }
.navegar .progreso { font: 600 13px/1.2 var(--fuente-texto); color: var(--tinta-suave); }
.navegar .boton:last-child { margin-left: auto; }
.aviso { margin: 0; font-size: 12.5px; color: var(--tinta-suave); }
.volver { justify-self: start; margin: 0 0 -6px; padding: 4px 0; border: 0; background: none; color: var(--granate); font: 600 14px/1.2 var(--fuente-texto); cursor: pointer; }
.volver:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Participantes al crear */
.lista-nombres { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lista-nombres li {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-radius: 999px; background: #fff;
  border: 1.5px solid var(--linea-suave); font-weight: 600; font-size: 15px; max-width: 100%; animation: pop .25s ease;
}
.lista-nombres li > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes pop { from { transform: scale(.8); opacity: 0; } }
.punto { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(90, 30, 50, .15); }
.lista-nombres button { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 0; background: #F6E9EC; color: var(--tinta-suave); font-size: 17px; line-height: 1; cursor: pointer; }
.lista-nombres button:hover { background: #EED3DA; color: var(--granate); }
.lista-nombres .vacio { border-style: dashed; color: var(--tinta-suave); font-weight: 500; padding: 8px 14px; animation: none; }

/* Invitar */
.enlace-juego { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1.5px solid var(--linea-suave); font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.compartir-en { display: flex; gap: 10px; flex-wrap: wrap; }
.compartir-en .boton { padding: 11px 18px; }

/* Panel de participantes */
.tarjetas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tarjeta {
  width: 100%; height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 10px; padding: 12px;
  border-radius: 16px; border: 1.5px solid var(--linea-suave); background: #fff; text-align: left; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tarjeta:hover { transform: translateY(-2px); border-color: var(--salmon); box-shadow: 0 10px 22px rgba(90, 30, 50, .1); }
.avatar {
  grid-row: 1 / span 2; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  background: var(--c); color: var(--t, var(--ciruela-oscuro)); font: 600 18px/1 var(--fuente-titulo);
}
.tarjeta .nombre { font-weight: 700; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.estados { display: flex; gap: 6px; flex-wrap: wrap; }
.estado { font: 600 11.5px/1 var(--fuente-texto); padding: 4px 7px; border-radius: 999px; background: #F4ECEE; color: var(--tinta-suave); }
.estado.hecho { background: #E7F3EA; color: #2F6B45; }
.estado.hecho::before { content: "✓ "; }
.recuento { margin: 0; font-size: 14px; color: var(--tinta-suave); }
.todos-listos { margin: 0; padding: 14px 16px; border-radius: 14px; background: #fff; border: 2px dashed var(--oro); font-weight: 600; text-align: center; }

/* Wishlist del participante */
.wishlist-ruleta { display: grid; gap: 10px; padding: 14px; border-radius: 16px; border: 1.5px dashed color-mix(in srgb, var(--salmon) 60%, var(--granate)); background: #fff; }
.titulo-wl { margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.titulo-wl strong { font: 400 30px/1 var(--fuente-script); color: var(--granate); }
.titulo-wl small { color: var(--tinta-suave); font-size: 13px; }
.ideas-rapidas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ideas-rapidas > span { font-size: 13px; color: var(--tinta-suave); margin-right: 2px; }
.idea { padding: 6px 11px; border-radius: 999px; border: 1.5px solid var(--linea-suave); background: var(--crema); font-size: 13.5px; cursor: pointer; }
.idea:hover { border-color: var(--salmon); background: #fff; }
.deseos { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.deseos li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--crema); animation: pop .25s ease; }
.deseos .lazo { width: 24px; height: 24px; }
.deseos .que { font-weight: 600; overflow-wrap: anywhere; }
.deseos .quitar { border: 0; background: none; cursor: pointer; font-size: 20px; line-height: 1; color: var(--tinta-suave); padding: 0 4px; }
.deseos .vacio { grid-template-columns: 1fr; background: none; color: var(--tinta-suave); font-size: 14px; padding: 2px; animation: none; }
.lista-lista { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; color: #2F6B45; }
.boton.ancho { width: 100%; padding: 16px; font-size: 16px; }
.boton.girar { background: linear-gradient(180deg, #C2364F, var(--granate)); font-size: 17px; letter-spacing: .01em; }
.acciones-giro { display: grid; gap: 10px; }
.acciones-giro .fila { display: flex; gap: 10px; flex-wrap: wrap; }
.acciones-giro .fila .boton { flex: 1 1 auto; }

/* Wishlists del grupo */
.wishlists-grupo { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.wishlists-grupo > li { padding: 14px; border-radius: 16px; background: #fff; border: 1.5px solid var(--linea-suave); }
.wishlists-grupo .quien { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-weight: 700; }
.wishlists-grupo .quien .avatar { width: 32px; height: 32px; font-size: 15px; }
.wishlists-grupo ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14.5px; }
.wishlists-grupo li li::marker { color: var(--salmon); }
.wishlists-grupo .vacia { margin: 0; font-size: 14px; color: var(--tinta-suave); font-style: italic; }

/* ---------- Resultado (diálogo privado) ---------- */
dialog.resultado-ruleta {
  width: min(480px, calc(100vw - 24px)); max-height: calc(100svh - 24px); overflow: auto; padding: 0 clamp(20px, 5vw, 32px) clamp(22px, 5vw, 30px);
  border: 0; border-radius: 26px; background: var(--crema); color: var(--tinta); text-align: center; box-shadow: 0 40px 100px rgba(60, 10, 30, .4);
}
dialog.resultado-ruleta::backdrop { background: rgba(60, 20, 35, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog.resultado-ruleta[open] { animation: aparece-res .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes aparece-res { from { opacity: 0; translate: 0 18px; scale: .96; } }
.resultado-ruleta .cerrar { position: sticky; top: 10px; float: right; margin: 10px -12px 0 0; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); font-size: 22px; line-height: 1; cursor: pointer; }
.antetitulo { margin: 14px 0 0; font-weight: 600; color: var(--tinta-suave); }
.resultado-ruleta h2 { margin: 2px 0 0; font: 400 clamp(52px, 13vw, 70px)/1.05 var(--fuente-script); color: var(--granate); overflow-wrap: anywhere; }
.su-wishlist { margin: 18px 0 0; padding: 14px 16px; border-radius: 16px; background: #fff; text-align: left; }
.su-wishlist p { margin: 0 0 8px; font-weight: 700; }
.su-wishlist ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.su-wishlist li::marker { color: var(--salmon); }
.su-wishlist .vacia { margin: 0; font-weight: 400; color: var(--tinta-suave); }
.magia { margin: 20px 0 0; padding: 18px 16px; border-radius: 18px; background: #fff; border: 2px dashed var(--oro); }
.magia .script { margin: 0 0 8px; font: 400 clamp(34px, 8vw, 42px)/1.05 var(--fuente-script); color: var(--granate); }
.magia p:last-child { margin: 0; font-size: 15px; color: var(--tinta-suave); text-wrap: pretty; }
.privado { margin: 14px 0 0; font-size: 13px; color: var(--tinta-suave); }
.acciones-res { display: grid; gap: 10px; margin-top: 16px; }

/* Sobre que se abre y deja salir la etiqueta «Para: …» (la del sobre de la visual) */
.sobre-res { position: relative; width: 210px; height: 132px; margin: 64px auto 0; perspective: 600px; }
.sobre-res .fondo-sobre, .sobre-res .bolsillo, .sobre-res .solapa { position: absolute; left: 0; right: 0; }
.sobre-res .fondo-sobre { inset: 0; border-radius: 8px; background: #EBD3CD; box-shadow: 0 14px 28px rgba(90, 30, 50, .18); }
.sobre-res .bolsillo { inset: 0; z-index: 3; border-radius: 8px; background: #F3E3DE; clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%); }
.sobre-res .solapa {
  top: 0; height: 74px; z-index: 4; background: #F7EAE6; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: 50% 0;
  transition: transform .55s cubic-bezier(.4, 0, .2, 1) .15s, z-index 0s .4s;
}
.sobre-res .solapa::after { content: "?"; position: absolute; left: 50%; top: 12px; translate: -50% 0; font: 700 30px/1 var(--fuente-titulo); color: var(--ciruela); transition: opacity .2s ease .15s; }
.sobre-res.abierto .solapa::after { opacity: 0; }
.etiqueta {
  position: absolute; left: 50%; bottom: 10px; z-index: 2; width: 172px; translate: -50% 0; padding: 8px 10px 9px 30px;
  border-radius: 10px; background: #fff; box-shadow: 0 0 0 6px #EFA497, 0 10px 22px rgba(90, 30, 50, .2); text-align: left;
  transition: transform .6s cubic-bezier(.2, .9, .3, 1.2) .6s;
}
.etiqueta::before { content: ""; position: absolute; left: 9px; top: 50%; width: 10px; height: 10px; translate: 0 -50%; border-radius: 50%; background: #FBE1DC; box-shadow: inset 0 0 0 2px #EFA497; }
.etiqueta span { display: block; font: 600 12px/1 var(--fuente-texto); color: var(--tinta-suave); }
.etiqueta strong { display: block; margin-top: 3px; font: 600 20px/1.1 var(--fuente-titulo); color: var(--ciruela-oscuro); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sobre-res.abierto .solapa { transform: rotateX(180deg); z-index: 1; }
.sobre-res.abierto .etiqueta { transform: translateY(-96px) rotate(-4deg); }

/* ---------- Cierre ---------- */
.final-ruleta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 20px; padding: 26px 16px; background: var(--crema); text-align: center; }
.final-ruleta p { margin: 0; font-weight: 600; }

@media (max-width: 420px) {
  .panel { padding: 18px 14px; border-radius: 22px; }
  .fila-anadir .boton { padding: 12px 14px; }
  .tarjetas { grid-template-columns: 1fr 1fr; }
  .tarjeta { grid-template-columns: 1fr; justify-items: start; }
  .tarjeta .avatar { grid-row: auto; }
  .navegar .boton { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .vista.entra, .lista-nombres li, .deseos li, dialog.resultado-ruleta[open], .ruleta-disco .ganador { animation: none; }
  .sobre-res .solapa, .etiqueta { transition: none; }
  .tarjeta { transition: none; }
}
