/* Amigo Secreto — estilos. Colores como tokens: claro por defecto, oscuro con prefers-color-scheme. */
:root {
  --fondo: #f7f1e6;
  --fondo-2: #efe5d3;
  --tarjeta: #fffdf9;
  --tinta: #1f2a24;
  --tinta-2: #4f5d55;
  --tinta-3: #7b877f;
  --linea: #e4d9c6;
  --linea-2: #d6c8b0;
  --pino: #1f4d3a;
  --pino-2: #2a6a50;
  --pino-claro: #e2eee6;
  --cereza: #b3372b;
  --cereza-claro: #fbe8e4;
  --oro: #b9862a;
  --oro-claro: #f6ebd2;
  --oro-texto: #7a5714;
  --exito: #2b7a4b;
  --exito-claro: #e1f1e6;
  --aviso-txt: #8a5a00;
  --aviso-claro: #fdf1d8;
  --boton: #1f4d3a;
  --boton-hover: #173c2d;
  --boton-txt: #ffffff;
  --portada: #1f4d3a;
  --portada-2: #173b2c;
  --portada-txt: #fbf5ea;
  --portada-txt-2: #cfe0d5;
  --foco: #c08f2c;
  --sombra-1: 0 1px 2px rgba(31, 42, 36, .06), 0 6px 18px rgba(31, 42, 36, .06);
  --sombra-2: 0 18px 48px rgba(31, 42, 36, .18);
  --radio: 18px;
  --radio-s: 12px;
  --fuente: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --titulos: 'Fraunces', Georgia, 'Times New Roman', serif;
  --ancho: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #0e1512;
    --fondo-2: #121c17;
    --tarjeta: #16221c;
    --tinta: #edf3ef;
    --tinta-2: #b4c2b9;
    --tinta-3: #8c9a91;
    --linea: #26362e;
    --linea-2: #34483d;
    --pino: #8fd0ab;
    --pino-2: #a9dcbf;
    --pino-claro: #1c3328;
    --cereza: #f08a7c;
    --cereza-claro: #3a1f1b;
    --oro: #e3b75c;
    --oro-claro: #33290f;
    --oro-texto: #f0cf86;
    --exito: #7fd3a0;
    --exito-claro: #173323;
    --aviso-txt: #f3c56b;
    --aviso-claro: #33280f;
    --boton: #2f7d5b;
    --boton-hover: #37906a;
    --boton-txt: #ffffff;
    --portada: #173a2c;
    --portada-2: #102a20;
    --portada-txt: #f4efe4;
    --portada-txt-2: #bcd3c5;
    --foco: #e3b75c;
    --sombra-1: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
    --sombra-2: 0 18px 48px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fondo);
  color: var(--tinta);
  font: 16px/1.5 var(--fuente);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main { flex: 1; outline: none; }
img { max-width: 100%; display: block; }
a { color: var(--pino); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--titulos); font-weight: 650; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: -999px; top: 8px; background: var(--tarjeta); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.saltar:focus { left: 8px; }
.sin-js { padding: 24px; text-align: center; }

/* ───────── barra ───────── */
.barra {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--fondo) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--linea);
}
.barra-in { max-width: var(--ancho); margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; min-height: 60px; }
.marca { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tinta); font-family: var(--titulos); font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.marca-ico { width: 30px; height: 30px; flex: none; }
.barra-der { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.chip-yo {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0;
  padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--linea-2);
  background: var(--tarjeta); text-decoration: none; color: var(--tinta); font-weight: 600; font-size: 15px;
}
.chip-yo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────── botones ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  background: var(--boton); color: var(--boton-txt); font-weight: 700; font-size: 15.5px; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background .15s, transform .1s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent; text-align: center;
}
.btn:hover { background: var(--boton-hover); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-sec { background: var(--tarjeta); color: var(--tinta); border-color: var(--linea-2); }
.btn-sec:hover { background: var(--fondo-2); }
.btn-suave { background: var(--pino-claro); color: var(--pino); }
.btn-suave:hover { background: color-mix(in srgb, var(--pino-claro) 80%, var(--pino) 20%); }
.btn-peligro { background: var(--tarjeta); color: var(--cereza); border-color: color-mix(in srgb, var(--cereza) 45%, transparent); }
.btn-peligro:hover { background: var(--cereza-claro); }
.btn-rojo { background: var(--cereza); color: #fff; }
.btn-rojo:hover { background: color-mix(in srgb, var(--cereza) 85%, #000); }
.btn-wsp { background: #1f8f4e; color: #fff; }
.btn-wsp:hover { background: #187a41; }
.btn-chico { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-chico svg { width: 16px; height: 16px; }
.btn-claro { background: rgba(255, 255, 255, .14); color: var(--portada-txt); border-color: rgba(255, 255, 255, .28); }
.btn-claro:hover { background: rgba(255, 255, 255, .22); }
.btn-oro { background: #e8c46a; color: #2b1f05; }
.btn-oro:hover { background: #f0d080; }
.btn-icono { width: 40px; min-height: 40px; padding: 0; border-radius: 999px; background: transparent; color: var(--tinta-2); border: 1px solid transparent; }
.btn-icono:hover { background: var(--fondo-2); color: var(--tinta); }
.enlace-btn { background: none; border: 0; padding: 4px 2px; color: var(--pino); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.acciones { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ───────── avatar ───────── */
.avatar {
  --tam: 48px;
  width: var(--tam); height: var(--tam); flex: none; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  color: #fff; font-weight: 800; font-size: calc(var(--tam) * .4); letter-spacing: .02em;
  box-shadow: 0 0 0 3px var(--tarjeta), 0 0 0 4px var(--linea);
  user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.c0 { background: #b3372b; } .c1 { background: #1f6f50; } .c2 { background: #a8761c; } .c3 { background: #2b5f8f; }
.c4 { background: #8a3d7c; } .c5 { background: #c0612a; } .c6 { background: #4c7a2c; } .c7 { background: #6a4f9e; }

/* ───────── portada ───────── */
.portada {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(1200px 400px at 85% -10%, rgba(232, 196, 106, .22), transparent 60%), linear-gradient(160deg, var(--portada), var(--portada-2));
  color: var(--portada-txt);
}
.portada::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23e8c46a' stroke-opacity='.28' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M28 22v16M20 30h16M22.5 24.5l11 11M33.5 24.5l-11 11'/%3E%3Cpath d='M118 96v12M112 102h12'/%3E%3Ccircle cx='96' cy='34' r='2.2' fill='%23e8c46a' fill-opacity='.35' stroke='none'/%3E%3Ccircle cx='46' cy='120' r='1.8' fill='%23ffffff' fill-opacity='.35' stroke='none'/%3E%3Ccircle cx='140' cy='146' r='1.6' fill='%23ffffff' fill-opacity='.3' stroke='none'/%3E%3Cpath d='M70 72l3 7 7 3-7 3-3 7-3-7-7-3 7-3z' fill='%23e8c46a' fill-opacity='.22' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
}
.portada-in { position: relative; max-width: var(--ancho); margin: 0 auto; padding: 40px 16px 56px; display: grid; gap: 18px; }
.portada-ante { font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #e8c46a; }
.portada h1 { font-size: clamp(34px, 7.4vw, 64px); font-weight: 800; max-width: 16ch; text-wrap: balance; }
.portada-msg { font-size: clamp(16px, 2.2vw, 19px); color: var(--portada-txt-2); max-width: 58ch; white-space: pre-line; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0;
  padding: 7px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 600;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); color: var(--portada-txt);
}
.chip svg { width: 17px; height: 17px; flex: none; color: #e8c46a; }
.chip b { color: #f3d78f; font-weight: 700; }
.portada .acciones { margin-top: 4px; }
.adorno { position: absolute; right: max(16px, calc((100vw - var(--ancho)) / 2 + 16px)); bottom: -6px; width: 230px; height: auto; opacity: .95; pointer-events: none; z-index: -1; }
@media (max-width: 760px) { .adorno { width: 140px; right: -12px; bottom: -10px; opacity: .55; } }

/* ───────── contenido ───────── */
.contenido { max-width: var(--ancho); margin: 0 auto; padding: 0 16px 48px; }
.estado-sorteo {
  position: relative; margin: -30px 0 28px; padding: 18px 20px; border-radius: var(--radio);
  background: var(--tarjeta); box-shadow: var(--sombra-1); border: 1px solid var(--linea);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.estado-sorteo .ico-grande { width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--oro-claro); color: var(--oro-texto); }
.estado-sorteo .ico-grande svg { width: 26px; height: 26px; }
.estado-sorteo .txt { flex: 1 1 240px; min-width: 0; }
.estado-sorteo strong { display: block; font-size: 17px; }
.estado-sorteo .txt p { color: var(--tinta-2); font-size: 15px; }
.seccion-titulo { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 16px; flex-wrap: wrap; }
.seccion-titulo h2 { font-size: clamp(24px, 4vw, 32px); }
.seccion-titulo p { color: var(--tinta-3); font-size: 14.5px; }

/* ───────── tarjetas de personas ───────── */
.grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px; align-items: start; }
.persona {
  background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: var(--sombra-1);
  padding: 18px; display: grid; gap: 14px; min-width: 0; scroll-margin-top: 80px;
  transition: box-shadow .2s, border-color .2s;
}
.persona.resaltada { border-color: var(--oro); box-shadow: 0 0 0 3px color-mix(in srgb, var(--oro) 35%, transparent), var(--sombra-1); }
.persona-cab { display: flex; align-items: center; gap: 14px; min-width: 0; }
.persona-cab .avatar { --tam: 54px; }
.persona-nombre { min-width: 0; flex: 1; }
.persona-nombre h3 { font-size: 22px; overflow-wrap: anywhere; }
.persona-nombre p { color: var(--tinta-3); font-size: 14px; }
.persona-nombre a { color: inherit; text-decoration: none; }
.persona-nombre a:hover { text-decoration: underline; }
.cinta {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--oro-claro); color: var(--oro-texto); font-size: 12.5px; font-weight: 700;
}
.cinta svg { width: 14px; height: 14px; }
.notas { font-size: 14.5px; color: var(--tinta-2); background: var(--fondo); border-radius: var(--radio-s); padding: 10px 12px; white-space: pre-line; overflow-wrap: anywhere; }
.notas b { color: var(--tinta); }
.deseos { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.deseo { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--radio-s); background: var(--fondo); min-width: 0; }
.deseo-n {
  width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--oro-claro); color: var(--oro-texto); font-weight: 800; font-size: 14px; border: 1px solid color-mix(in srgb, var(--oro) 40%, transparent);
}
.deseo-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.deseo-txt strong { font-size: 16px; overflow-wrap: anywhere; }
.deseo-txt p { color: var(--tinta-2); font-size: 14.5px; white-space: pre-line; overflow-wrap: anywhere; }
.deseo-txt a { font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; width: fit-content; max-width: 100%; }
.deseo-txt a svg { width: 14px; height: 14px; flex: none; }
.deseo-foto { flex: none; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; border: 1px solid var(--linea); padding: 0; background: var(--fondo-2); cursor: zoom-in; }
.deseo-foto img { width: 100%; height: 100%; object-fit: cover; }
.vacio { color: var(--tinta-3); font-size: 15px; padding: 14px; text-align: center; border: 1.5px dashed var(--linea-2); border-radius: var(--radio-s); }
.persona.grande .deseo { flex-direction: column; }
.persona.grande .deseo-cab { display: flex; gap: 12px; align-items: flex-start; width: 100%; }
.persona.grande .deseo-foto { width: 100%; height: auto; max-height: 520px; }
.persona.grande .deseo-foto img { height: auto; max-height: 520px; object-fit: contain; background: var(--fondo-2); }
.volver { display: inline-flex; align-items: center; gap: 6px; margin: 22px 0 14px; font-weight: 600; text-decoration: none; }
.volver svg { width: 18px; height: 18px; }
.detalle { max-width: 720px; margin: 0 auto; }

/* parejas reveladas */
.parejas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.parejas li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radio-s); background: var(--fondo); font-weight: 600; min-width: 0; }
.parejas li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parejas .avatar { --tam: 32px; box-shadow: none; }
.parejas .flecha { color: var(--oro); flex: none; }

/* ───────── tarjeta genérica / formularios ───────── */
.tarjeta { background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: var(--sombra-1); padding: 20px; display: grid; gap: 16px; min-width: 0; }
.tarjeta > h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.tarjeta > h2 .paso { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--pino); color: var(--tarjeta); font-family: var(--fuente); font-size: 15px; font-weight: 800; }
.tarjeta .ayuda, .ayuda { color: var(--tinta-2); font-size: 14.5px; }
.pila { display: grid; gap: 18px; }
.campo { display: grid; gap: 6px; min-width: 0; }
.campo > span { font-weight: 650; font-size: 14.5px; }
.campo small { color: var(--tinta-3); font-size: 13px; font-weight: 500; }
.entrada {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--radio-s);
  border: 1.5px solid var(--linea-2); background: var(--tarjeta); color: var(--tinta); font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
textarea.entrada { min-height: 84px; resize: vertical; line-height: 1.45; }
.entrada:focus { outline: none; border-color: var(--pino); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pino) 22%, transparent); }
.entrada::placeholder { color: var(--tinta-3); }
.fila-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.casilla { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 15px; }
.casilla input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--pino); flex: none; }
.error-txt { color: var(--cereza); font-weight: 600; font-size: 14.5px; }
.ok-txt { color: var(--exito); font-weight: 600; font-size: 14.5px; }

/* ───────── mi perfil ───────── */
.cabecera-yo { display: flex; align-items: center; gap: 18px; margin: 26px 0 20px; flex-wrap: wrap; }
.cabecera-yo .txt { flex: 1 1 220px; min-width: 0; }
.cabecera-yo h1 { font-size: clamp(28px, 5vw, 40px); overflow-wrap: anywhere; }
.cabecera-yo p { color: var(--tinta-2); }
.foto-perfil { position: relative; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.foto-perfil .avatar { --tam: 86px; }
.foto-perfil .camara { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--boton); color: var(--boton-txt); box-shadow: 0 0 0 3px var(--fondo); }
.foto-perfil .camara svg { width: 17px; height: 17px; }
.yo-grilla { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .yo-grilla { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; } .yo-grilla .lado { position: sticky; top: 80px; } }
.editores { display: grid; gap: 14px; }
.editor { border: 1.5px solid var(--linea); border-radius: var(--radio-s); padding: 14px; display: grid; gap: 12px; background: var(--fondo); min-width: 0; }
.editor.vacio-ed { border-style: dashed; }
.editor-cab { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.editor-cab b { font-size: 15.5px; }
.guardado { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--tinta-3); display: inline-flex; align-items: center; gap: 4px; text-align: right; }
.guardado.ok { color: var(--exito); }
.guardado.mal { color: var(--cereza); }
.guardado svg { width: 15px; height: 15px; }
.editor-foto { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.editor-foto .miniatura { width: 92px; height: 92px; border-radius: 10px; overflow: hidden; border: 1px solid var(--linea-2); background: var(--fondo-2); flex: none; padding: 0; cursor: zoom-in; }
.editor-foto .miniatura img { width: 100%; height: 100%; object-fit: cover; }
.subiendo { font-size: 14px; color: var(--tinta-2); display: inline-flex; align-items: center; gap: 8px; }

/* ───────── mi amigo secreto ───────── */
.mi-amigo { text-align: center; overflow: hidden; position: relative; }
.mi-amigo.pendiente { text-align: left; }
.caja-btn { border: 0; background: none; padding: 6px; cursor: pointer; display: grid; justify-items: center; gap: 10px; margin: 0 auto; color: var(--tinta); font-weight: 700; font-size: 16px; -webkit-tap-highlight-color: transparent; }
.caja-svg { width: 150px; height: 150px; overflow: visible; }
.caja-tapa { transform-origin: 60px 46px; transform-box: view-box; }
.caja-btn:not(.abriendo) .caja-svg { animation: menear 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
.caja-btn.abriendo .caja-svg { animation: sacudir .45s ease-in-out; }
.caja-btn.abriendo .caja-tapa { animation: abrir .7s .4s cubic-bezier(.3, 1.4, .6, 1) forwards; }
@keyframes menear { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-5deg); } 88% { transform: rotate(5deg); } 92% { transform: rotate(-3deg); } 96% { transform: rotate(2deg); } }
@keyframes sacudir { 0%, 100% { transform: translateX(0) rotate(0); } 20% { transform: translateX(-6px) rotate(-4deg); } 40% { transform: translateX(6px) rotate(4deg); } 60% { transform: translateX(-4px) rotate(-2deg); } 80% { transform: translateX(3px) rotate(1deg); } }
@keyframes abrir { to { transform: translate(34px, -70px) rotate(32deg); opacity: 0; } }
.revelado { display: grid; justify-items: center; gap: 12px; animation: aparecer .6s cubic-bezier(.2, 1.3, .5, 1) both; }
.revelado .le-regalas { font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--oro-texto); }
.revelado .avatar { --tam: 92px; }
.revelado .nombre-rev { font-family: var(--titulos); font-weight: 800; font-size: clamp(34px, 8vw, 48px); color: var(--cereza); line-height: 1.05; overflow-wrap: anywhere; }
.revelado .deseos { width: 100%; text-align: left; }
@keyframes aparecer { from { opacity: 0; transform: scale(.6) translateY(16px); } to { opacity: 1; transform: none; } }
.confeti { position: absolute; left: 50%; top: 38%; width: 0; height: 0; pointer-events: none; }
.confeti i { position: absolute; width: 9px; height: 14px; border-radius: 2px; background: var(--c); opacity: 0; animation: confeti 1.4s var(--d) cubic-bezier(.15, .7, .4, 1) forwards; }
@keyframes confeti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); } }

/* ───────── panel del organizador ───────── */
.panel-cab { margin: 26px 0 18px; display: grid; gap: 8px; }
.panel-cab h1 { font-size: clamp(28px, 5vw, 40px); }
.panel-cab p { color: var(--tinta-2); max-width: 70ch; }
.lista-adm { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fila-adm { border: 1px solid var(--linea); border-radius: var(--radio-s); padding: 12px; display: grid; gap: 10px; background: var(--fondo); min-width: 0; }
.fila-adm-cab { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.fila-adm-cab .avatar { --tam: 42px; box-shadow: none; }
.fila-adm-cab .quien { flex: 1 1 160px; min-width: 0; }
.fila-adm-cab .quien b { display: block; font-size: 16.5px; overflow-wrap: anywhere; }
.fila-adm-cab .quien small { color: var(--tinta-3); font-size: 13.5px; overflow-wrap: anywhere; }
.etiquetas { display: flex; flex-wrap: wrap; gap: 6px; }
.etq { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--fondo-2); color: var(--tinta-2); white-space: nowrap; }
.etq svg { width: 13px; height: 13px; }
.etq.si { background: var(--exito-claro); color: var(--exito); }
.etq.no { background: var(--aviso-claro); color: var(--aviso-txt); }
.etq.mal { background: var(--cereza-claro); color: var(--cereza); }
.fila-adm .acciones { gap: 6px; }
.lista-chequeo { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lista-chequeo li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.lista-chequeo svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.lista-chequeo .si svg { color: var(--exito); }
.lista-chequeo .no svg { color: var(--aviso-txt); }
.pares-ex { display: flex; flex-wrap: wrap; gap: 8px; }
.par-ex { display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 999px; background: var(--fondo); border: 1px solid var(--linea); font-weight: 600; font-size: 14.5px; max-width: 100%; }
.par-ex span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.par-ex button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--fondo-2); color: var(--tinta-2); cursor: pointer; display: grid; place-items: center; flex: none; }
.par-ex button svg { width: 14px; height: 14px; }
.nuevo-par { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.nuevo-par .y { color: var(--tinta-3); font-weight: 700; }
@media (max-width: 560px) { .nuevo-par { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); } .nuevo-par .btn { grid-column: 1 / -1; } }
.resumen-sorteo { padding: 14px 16px; border-radius: var(--radio-s); background: var(--exito-claro); color: var(--tinta); display: flex; gap: 12px; align-items: flex-start; }
.resumen-sorteo svg { width: 24px; height: 24px; color: var(--exito); flex: none; margin-top: 1px; }
.aviso-caja { padding: 12px 14px; border-radius: var(--radio-s); background: var(--aviso-claro); color: var(--tinta); font-size: 14.5px; }
.zona-peligro { border-top: 1px dashed var(--linea-2); padding-top: 14px; display: grid; gap: 10px; }
.copiar-fila { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copiar-fila code { flex: 1 1 220px; min-width: 0; padding: 10px 12px; border-radius: var(--radio-s); background: var(--fondo); border: 1px solid var(--linea); font-size: 14.5px; overflow-wrap: anywhere; }

/* ───────── diálogo ───────── */
.dialogo {
  width: min(100% - 24px, 480px); max-height: min(100dvh - 24px, 760px); padding: 0; border: 0; border-radius: 22px;
  background: var(--tarjeta); color: var(--tinta); box-shadow: var(--sombra-2); overflow: auto;
}
.dialogo::backdrop { background: rgba(10, 20, 15, .55); backdrop-filter: blur(3px); }
.dialogo[open] { animation: subir .22s ease-out; }
@keyframes subir { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.hoja { padding: 20px; display: grid; gap: 16px; }
.hoja-cab { display: flex; align-items: center; gap: 10px; }
.hoja-cab h2 { font-size: 23px; flex: 1; min-width: 0; }
.quienes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 10px; }
.quien-btn { border: 1.5px solid var(--linea); background: var(--fondo); border-radius: 16px; padding: 14px 8px; display: grid; justify-items: center; gap: 8px; cursor: pointer; font-weight: 700; font-size: 15px; min-width: 0; transition: border-color .15s, background .15s; }
.quien-btn:hover { border-color: var(--pino); background: var(--pino-claro); }
.quien-btn span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quien-btn small { color: var(--tinta-3); font-weight: 600; font-size: 12px; margin-top: -6px; }
.quien-btn .avatar { --tam: 50px; box-shadow: none; }
.saludo { display: flex; align-items: center; gap: 12px; }
.saludo .avatar { --tam: 52px; }
.saludo b { font-family: var(--titulos); font-size: 24px; display: block; line-height: 1.15; }
.pin-entrada { font-size: 28px; letter-spacing: .5em; text-align: center; font-weight: 800; padding-left: calc(14px + .5em); }
.pin-entrada::placeholder { letter-spacing: .3em; font-weight: 500; font-size: 20px; }
.visor { width: min(100% - 16px, 1000px); max-width: none; background: #0b0f0d; }
.visor img { width: 100%; max-height: calc(100dvh - 110px); object-fit: contain; }
.visor .hoja { padding: 10px; gap: 8px; }
.visor .hoja-cab { color: #fff; }
.visor .hoja-cab h2 { font-size: 17px; font-family: var(--fuente); font-weight: 600; }
.visor .btn-icono { color: #fff; }
.visor .btn-icono:hover { background: rgba(255, 255, 255, .12); }

/* ───────── avisos y carga ───────── */
.aviso {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 14px; background: #1f2a24; color: #fff;
  font-weight: 600; font-size: 15px; box-shadow: var(--sombra-2); animation: subir .2s ease-out;
}
.aviso.mal { background: #8f2a20; }
.aviso.ok { background: #1f6a43; }
.cargando { display: flex; justify-content: center; gap: 8px; padding: 80px 16px; }
.punto { width: 12px; height: 12px; border-radius: 50%; background: var(--oro); animation: rebote 1s infinite ease-in-out; }
.punto:nth-child(2) { animation-delay: .15s; background: var(--cereza); }
.punto:nth-child(3) { animation-delay: .3s; background: var(--pino); }
@keyframes rebote { 0%, 80%, 100% { transform: scale(.5); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
.girando { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: girar .8s linear infinite; flex: none; }
@keyframes girar { to { transform: rotate(360deg); } }
.error-pagina { max-width: 560px; margin: 60px auto; padding: 0 16px; text-align: center; display: grid; gap: 14px; justify-items: center; }

/* ───────── pie ───────── */
.pie { border-top: 1px solid var(--linea); padding: 26px 16px calc(26px + env(safe-area-inset-bottom)); text-align: center; color: var(--tinta-3); font-size: 14px; display: grid; gap: 6px; }
.pie a { color: var(--tinta-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .caja-btn.abriendo .caja-tapa { opacity: 0; }
}
