/* Previas UdeSA — zinc casi negro + flama. Mobile first. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url(/fonts/bricolage.woff2) format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --fondo: #0c0c0d;
  --panel: #17171a;
  --panel-2: #1f1f23;
  --borde: #2a2a2f;
  --texto: #f5f5f4;
  --texto-2: #a8a29e;   /* secundario tibio, no gris azulado */
  --acento: #ff4d2a;
  --acento-hover: #ff6242;
  --acento-tinta: #1c0800;
  --wa: #25d366;
  --wa-tinta: #04120a;
  --peligro: #f87171;
  --radio: 10px;
  --radio-carta: 18px;
  --tabs-alto: 62px;
  --ease-salida: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
::selection { background: var(--acento); color: var(--acento-tinta); }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; border-radius: 4px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--borde); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }
input { caret-color: var(--acento); }
img { display: block; }
button { font: inherit; color: inherit; }

.wordmark {
  font-family: "Bricolage Grotesque", -apple-system, sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
}
.wordmark.chico { font-size: 22px; }

svg { display: block; }
use { pointer-events: none; }

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--radio);
  padding: 13px 18px;
  font-weight: 600; font-size: 16px;
  cursor: pointer; text-decoration: none;
  transition: transform 0.12s var(--ease-salida), background 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-acento { background: var(--acento); color: var(--acento-tinta); }
.btn-acento:hover { background: var(--acento-hover); }
.btn-borde { background: transparent; color: var(--texto); border: 1px solid var(--borde); }
.btn-borde:hover { background: var(--panel); }
.btn-fantasma { background: transparent; color: var(--texto-2); }
.olvide { margin-top: 4px; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.btn-fantasma:hover { color: var(--texto); }
.btn-wa { background: var(--wa); color: var(--wa-tinta); }
.btn-ancho { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-svg { width: 20px; height: 20px; }

.btn-icono {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radio);
  background: transparent; border: 1px solid var(--borde); cursor: pointer;
  transition: background 0.15s;
}
.btn-icono:hover { background: var(--panel); }
.btn-icono svg { width: 20px; height: 20px; }
.btn-icono.acento { background: var(--acento); border-color: var(--acento); color: var(--acento-tinta); }

/* ===== Landing ===== */
.vista { min-height: 100dvh; }
.landing {
  min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: max(24px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  max-width: 480px; margin: 0 auto;
}
.landing-marca { padding-top: 6vh; }
.landing-flama { width: 44px; height: 44px; color: var(--acento); }
.landing .wordmark { font-size: clamp(56px, 17vw, 84px); line-height: 0.95; margin-top: 10px; }
.landing-sub {
  margin: 6px 0 0 4px; color: var(--acento);
  font-weight: 700; font-size: 15px; letter-spacing: 0.18em; text-transform: uppercase;
}
/* Mano de cartas decorativa de la landing */
.landing-cartas { position: relative; height: 208px; margin: 8px 0; }
.lc {
  position: absolute; left: 50%; top: 50%;
  width: 128px; height: 176px; border-radius: 16px;
  background: var(--panel-2); border: 1px solid var(--borde);
  box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.8);
}
.lc-1 { transform: translate(-92%, -48%) rotate(-11deg); }
.lc-2 { transform: translate(-8%, -50%) rotate(9deg); }
.lc-3 {
  transform: translate(-50%, -54%) rotate(-2deg);
  background: var(--panel);
  display: flex; align-items: center; justify-content: center;
}
.lc-3 svg { width: 44px; height: 44px; color: var(--acento); }
.lc-estampa {
  position: absolute; top: 12px; left: 10px;
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 15px;
  letter-spacing: 0.05em; color: var(--acento);
  border: 2px solid var(--acento); border-radius: 6px; padding: 1px 7px;
  transform: rotate(-9deg);
}
.landing-pitch { font-size: 22px; line-height: 1.35; color: var(--texto-2); margin: 0; }
.landing-pitch strong { color: var(--texto); }
.landing-botones { display: grid; gap: 10px; }
.landing-exclusivo {
  margin: 6px 0 0; text-align: center;
  color: var(--texto-2); font-size: 13px; font-weight: 600;
}

/* ===== Formularios ===== */
.tope {
  display: flex; align-items: center; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  max-width: 480px; margin: 0 auto;
}
.tope-titulo { font-weight: 700; }
.hoja { max-width: 480px; margin: 0 auto; padding: 8px 24px 40px; }
.titulo {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 800;
  font-size: 30px; letter-spacing: -0.02em; margin: 8px 0 18px;
}
.form .campo { display: block; margin-bottom: 16px; }
.campo > span { display: block; font-size: 14px; font-weight: 600; color: var(--texto-2); margin-bottom: 6px; }
.campo input {
  width: 100%; background: var(--panel); color: var(--texto);
  border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 13px 14px; font-size: 16px;
}
.campo input::placeholder { color: #948d86; }
.tel-grupo {
  display: flex; align-items: center;
  background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio);
  transition: border-color 0.15s;
}
.tel-grupo:focus-within { border-color: var(--acento); }
.tel-prefijo { padding: 13px 0 13px 14px; color: var(--texto-2); font-weight: 600; font-size: 16px; }
.tel-grupo input { flex: 1; width: auto; min-width: 0; border: none; background: transparent; padding: 13px 14px 13px 8px; }
.tel-grupo input:focus { outline: none; border: none; }
.campo input:focus { outline: none; border-color: var(--acento); }
.campo small { display: block; margin-top: 6px; font-size: 13px; color: var(--texto-2); }
.nota { color: var(--texto-2); font-size: 14px; margin: 0 0 16px; }

.genero { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.genero label { display: block; }
.genero input { position: absolute; opacity: 0; pointer-events: none; }
.genero span {
  display: flex; align-items: center; justify-content: center;
  padding: 13px; border: 1px solid var(--borde); border-radius: var(--radio);
  font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.genero span { gap: 8px; }
.anios { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 6px; }
.anios label { display: block; }
.anios input { position: absolute; opacity: 0; pointer-events: none; }
.anios span {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1; border: 1px solid var(--borde); border-radius: 50%;
  font-weight: 700; cursor: pointer; transition: all 0.15s;
}
.anios input:checked + span { background: var(--acento); border-color: var(--acento); color: var(--acento-tinta); }
.anios input:focus-visible + span { outline: 2px solid var(--acento); outline-offset: 2px; }
.campo select {
  width: 100%; background: var(--panel); color: var(--texto);
  border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 13px 14px; font-size: 16px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23a8a29e' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.campo select:focus { outline: none; border-color: var(--acento); }
.genero span svg { width: 18px; height: 18px; }
.genero input:checked + span { background: var(--acento); border-color: var(--acento); color: var(--acento-tinta); }
.genero input:focus-visible + span { outline: 2px solid var(--acento); outline-offset: 2px; }

.selector-foto {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 168px; height: 168px; margin: 8px auto 20px;
  border-radius: 50%; border: 2px dashed var(--borde); background: var(--panel);
  cursor: pointer; overflow: hidden; padding: 0;
  transition: border-color 0.15s;
}
.selector-foto:hover { border-color: var(--acento); }
.selector-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.selector-foto img[hidden] { display: none; }
.selector-foto.con-foto { border-style: solid; border-color: var(--acento); }
.selector-foto.con-foto .selector-foto-vacio { display: none; }
.selector-foto-vacio {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--texto-2); font-size: 14px; font-weight: 600;
}
.selector-foto-vacio svg { width: 26px; height: 26px; }
.selector-foto.ancha { width: 100%; height: 190px; border-radius: var(--radio-carta); margin: 0 0 16px; }

/* ===== App shell ===== */
.cabecera {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--fondo) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--borde);
}
.marca { display: flex; align-items: center; gap: 7px; color: var(--texto); text-decoration: none; }
.cabecera-der { display: flex; align-items: center; gap: 8px; }
.marca-flama { width: 22px; height: 22px; color: var(--acento); }
.avatar-boton {
  width: 38px; height: 38px; border-radius: 50%; padding: 0; border: 2px solid var(--acento);
  overflow: hidden; cursor: pointer; background: var(--panel);
}
.avatar-boton img { width: 100%; height: 100%; object-fit: cover; }

.panel { max-width: 480px; margin: 0 auto; padding: 14px 16px calc(var(--tabs-alto) + 24px); }
.panel-titulo {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 800;
  font-size: 26px; letter-spacing: -0.02em; margin: 4px 0 14px;
}
.panel-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.panel-cab .panel-titulo { margin: 0; }
.panel-cab-acciones { display: flex; gap: 8px; }

/* ===== Tabs ===== */
.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(3, 1fr);
  height: calc(var(--tabs-alto) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--fondo) 92%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--borde);
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: 0; color: var(--texto-2); cursor: pointer; font-size: 11px; font-weight: 600;
}
.tab svg { width: 24px; height: 24px; }
.tab.activa { color: var(--acento); }
.punto {
  position: absolute; top: 9px; right: calc(50% - 18px);
  width: 9px; height: 9px; border-radius: 50%; background: var(--acento);
  border: 2px solid var(--fondo);
}

/* ===== Chips selector de grupo ===== */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  padding: 7px 12px 7px 7px; border-radius: var(--radio);
  background: var(--panel); border: 1px solid var(--borde);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.chip img { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; }
.chip.activa { background: var(--acento); border-color: var(--acento); color: var(--acento-tinta); }

/* ===== Deck ===== */
#deck-zona { position: relative; }
.deck { position: relative; height: min(62dvh, 540px); }
.deck:empty { display: none; }
.carta {
  position: absolute; inset: 0;
  border-radius: var(--radio-carta); overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--borde);
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
  touch-action: none; user-select: none; -webkit-user-select: none;
  will-change: transform;
}
.carta img.carta-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.carta[data-pos="0"], .carta:not([data-pos]) { z-index: 3; }
.carta[data-pos="1"] { transform: scale(0.95) translateY(14px); filter: brightness(0.75); z-index: 2; }
.carta[data-pos="2"] { transform: scale(0.9) translateY(28px); filter: brightness(0.55); z-index: 1; }
.carta[data-pos] { transition: transform 0.3s var(--ease-salida), filter 0.3s; }
.carta.arrastrando { transition: none; }
.carta.volando { transition: transform 0.45s ease-in, opacity 0.4s ease-in; opacity: 0; pointer-events: none; }

.carta-info {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 56px 18px 16px;
  background: linear-gradient(to top, rgba(5, 4, 3, 0.92), rgba(5, 4, 3, 0.55) 55%, transparent);
}
.carta-nombre {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 800;
  font-size: 28px; letter-spacing: -0.02em; margin: 0; color: #fff;
}
.carta-meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.carta-meta span { color: #d6d3d1; font-size: 14px; font-weight: 600; }
.mini-avatares { display: flex; }
.mini-avatares img {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  border: 2px solid #050403; margin-left: -8px;
}
.mini-avatares img:first-child { margin-left: 0; }

.estampa {
  position: absolute; top: 22px;
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 30px;
  letter-spacing: 0.04em; padding: 4px 14px; border-radius: 8px;
  border: 3px solid; opacity: 0; transform: rotate(-12deg);
}
.estampa-vamos { left: 18px; color: var(--acento); border-color: var(--acento); }
.estampa-paso { right: 18px; color: #e7e5e4; border-color: #e7e5e4; transform: rotate(12deg); }

.deck-acciones { display: flex; justify-content: center; gap: 26px; padding-top: 18px; }
.accion {
  width: 62px; height: 62px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--borde); background: var(--panel);
  transition: transform 0.12s var(--ease-salida), background 0.15s;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.6);
}
.accion:active { transform: scale(0.9); }
.accion svg { width: 28px; height: 28px; }
.accion-paso { color: var(--texto-2); }
.accion-paso:hover { color: var(--texto); background: var(--panel-2); }
.accion-vamos { background: var(--acento); border-color: var(--acento); color: var(--acento-tinta); }
.accion-vamos:hover { background: var(--acento-hover); }

/* ===== Vacíos ===== */
.vacio { text-align: center; padding: 56px 20px 30px; }
#deck-zona .vacio {
  min-height: min(62dvh, 540px);
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 0; padding-bottom: 0;
}
.vacio-icono { width: 40px; height: 40px; margin: 0 auto 14px; color: var(--texto-2); opacity: 0.7; }
.vacio h2 {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 800;
  font-size: 24px; letter-spacing: -0.02em; margin: 0 0 8px;
}
.vacio p { color: var(--texto-2); margin: 0 0 20px; }
.vacio-acciones { display: grid; gap: 10px; max-width: 280px; margin: 0 auto; }

/* ===== Listas (matches / grupos) ===== */
.item {
  display: flex; align-items: center; gap: 13px;
  padding: 12px; margin-bottom: 10px;
  background: var(--panel); border: 1px solid var(--borde); border-radius: 14px;
}
.item-foto { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.item-foto.redonda { border-radius: 50%; width: 52px; height: 52px; }
.item-cuerpo { flex: 1; min-width: 0; }
.item-nombre { font-weight: 700; font-size: 16px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-sub { color: var(--texto-2); font-size: 13px; margin: 2px 0 0; }
.item-boton { flex-shrink: 0; }
button.item { width: 100%; text-align: left; cursor: pointer; transition: background 0.15s; }
button.item:hover { background: var(--panel-2); }
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px;
  background: var(--acento); color: var(--acento-tinta);
  font-size: 12px; font-weight: 800;
}
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  border: 1px solid var(--borde); color: var(--texto-2);
  font-size: 12px; font-weight: 600;
}
.btn-wa-chico {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--wa); color: var(--wa-tinta); border: 0; border-radius: var(--radio);
  padding: 9px 13px; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none;
}
.btn-wa-chico svg { width: 17px; height: 17px; }

/* ===== Vista grupo ===== */
.grupo-cab { position: relative; border-radius: var(--radio-carta); overflow: hidden; margin-bottom: 14px; }
.grupo-cab img.portada { width: 100%; height: 220px; object-fit: cover; }
.grupo-cab-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(5, 4, 3, 0.85), transparent 60%);
}
.grupo-cab-info { position: absolute; left: 16px; right: 16px; bottom: 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.grupo-cab-info h2 {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 800;
  font-size: 26px; letter-spacing: -0.02em; margin: 0; color: #fff;
}
.grupo-volver { position: absolute; top: 10px; left: 10px; background: rgba(5, 4, 3, 0.55); border-color: transparent; color: #fff; }
.grupo-editar { position: absolute; top: 10px; right: 10px; background: rgba(5, 4, 3, 0.55); border-color: transparent; color: #fff; }
.seccion-titulo { font-size: 14px; font-weight: 700; color: var(--texto-2); text-transform: uppercase; letter-spacing: 0.08em; margin: 20px 0 10px; }
.miembro { display: flex; align-items: center; gap: 11px; padding: 8px 2px; }
.miembro img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.miembro-nombre { font-weight: 600; }
.miembro-admin { display: inline-flex; align-items: center; gap: 4px; color: var(--acento); font-size: 12px; font-weight: 700; }
.miembro-admin svg { width: 14px; height: 14px; }
.mini-genero { display: inline-flex; align-items: center; color: var(--texto-2); vertical-align: -2px; }
.mini-genero svg { width: 15px; height: 15px; }
.solicitud { display: flex; align-items: center; gap: 11px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--borde); border-radius: 14px; margin-bottom: 8px; }
.solicitud img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.solicitud-nombre { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.solicitud-botones { display: flex; gap: 8px; }
.btn-redondo {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--borde);
  display: flex; align-items: center; justify-content: center; cursor: pointer; background: var(--panel-2);
  transition: transform 0.12s var(--ease-salida);
}
.btn-redondo:active { transform: scale(0.9); }
.btn-redondo svg { width: 20px; height: 20px; }
.btn-redondo.si { background: var(--acento); border-color: var(--acento); color: var(--acento-tinta); }
.btn-redondo.no { color: var(--texto-2); }
.grupo-pie { margin-top: 26px; }
.btn-peligro { color: var(--peligro); border-color: var(--borde); }

/* ===== Perfil ===== */
.tope.simple { padding-top: 4px; }
.perfil { text-align: center; padding-top: 10px; }
.perfil-foto {
  position: relative; width: 148px; height: 148px; margin: 0 auto;
  border-radius: 50%; border: 3px solid var(--acento); overflow: visible;
  padding: 0; background: none; cursor: pointer;
}
.perfil-foto img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.perfil-lapiz {
  position: absolute; right: 2px; bottom: 2px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--acento); color: var(--acento-tinta);
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--fondo);
}
.perfil-lapiz svg { width: 19px; height: 19px; }
.perfil h2 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 26px; margin: 14px 0 2px; }
.perfil-genero {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--texto-2); font-size: 14px; font-weight: 600; margin: 2px 0 4px;
}
.perfil-genero svg { width: 16px; height: 16px; }
.perfil .btn { margin-top: 24px; max-width: 300px; }

/* ===== Modales ===== */
.capa {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(5, 4, 3, 0.7);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px;
}
.tarjeta-modal {
  width: 100%; max-width: 440px;
  background: var(--panel); border: 1px solid var(--borde);
  border-radius: 18px; padding: 18px 18px max(18px, env(safe-area-inset-bottom));
  animation: subir 0.32s var(--ease-salida);
  max-height: 88dvh; overflow-y: auto;
}
@keyframes subir { from { transform: translateY(40px); opacity: 0; } }
.modal-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-cab h3 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 20px; margin: 0; }
#qr-caja { display: flex; justify-content: center; padding: 10px 0 14px; }
#qr-caja canvas { border-radius: 12px; }
.codigo-grande {
  display: block; width: 100%; text-align: center;
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 800;
  font-size: 30px; letter-spacing: 0.14em;
  background: var(--panel-2); border: 1px dashed var(--borde); border-radius: var(--radio);
  padding: 12px; margin-bottom: 12px; cursor: pointer; color: var(--texto);
}
.fila-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ===== Match overlay ===== */
.capa.match { align-items: center; background: rgba(5, 4, 3, 0.88); backdrop-filter: blur(6px); }
.match-caja { text-align: center; width: 100%; max-width: 400px; animation: aparecer 0.4s var(--ease-salida); }
@keyframes aparecer { from { transform: scale(0.85); opacity: 0; } }
.match-titulo {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 800;
  font-size: clamp(44px, 13vw, 60px); letter-spacing: -0.03em;
  color: var(--acento); margin: 0 0 22px; line-height: 1;
}
.match-fotos { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 18px; }
.match-fotos img {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--acento);
}
.match-fotos img:first-child { transform: rotate(-5deg); }
.match-fotos img:last-child { transform: rotate(5deg); }
.match-flama { width: 34px; height: 34px; color: var(--acento); flex-shrink: 0; animation: latir 1.1s ease-in-out infinite; }
@keyframes latir { 50% { transform: scale(1.18); } }
#match-texto { color: var(--texto-2); margin: 0 0 22px; }
#match-texto strong { color: var(--texto); }
.match-caja .btn { margin-bottom: 10px; }

/* ===== Editor de recorte (IG-style) ===== */
.crop-zona { position: relative; border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
#crop-canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: grab; }
#crop-canvas:active { cursor: grabbing; }
.crop-grid {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, transparent calc(33.33% - 0.5px), rgba(255,255,255,0.28) 33.33%, transparent calc(33.33% + 0.5px)),
    linear-gradient(to right, transparent calc(66.66% - 0.5px), rgba(255,255,255,0.28) 66.66%, transparent calc(66.66% + 0.5px)),
    linear-gradient(to bottom, transparent calc(33.33% - 0.5px), rgba(255,255,255,0.28) 33.33%, transparent calc(33.33% + 0.5px)),
    linear-gradient(to bottom, transparent calc(66.66% - 0.5px), rgba(255,255,255,0.28) 66.66%, transparent calc(66.66% + 0.5px));
}
.crop-circulo {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle closest-side at center, transparent 98%, rgba(5, 4, 3, 0.55) 100%);
}
.crop-circulo::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
}
#crop-zoom {
  width: 100%; margin: 0 0 6px; accent-color: var(--acento);
}
.nota.centrada { text-align: center; }

/* ===== Perfil: handle / estudio / ficha de usuario ===== */
.perfil-handle { color: var(--acento); font-weight: 700; font-size: 15px; margin: 0 0 2px; }
.miembro-handle { color: var(--texto-2); font-weight: 500; font-size: 13px; }
.usuario-ficha { text-align: center; padding: 6px 0 10px; }
.usuario-ficha img {
  width: 132px; height: 132px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 12px; border: 3px solid var(--acento);
}
.usuario-ficha h2 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 24px; margin: 0 0 4px; }
.perfil .btn + .btn { margin-top: 10px; }

/* ===== Tostadas ===== */
#tostadas { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabs-alto) + 18px); z-index: 90; display: grid; gap: 8px; pointer-events: none; }
.tostada {
  margin: 0 auto; max-width: 420px; width: fit-content;
  background: var(--panel-2); border: 1px solid var(--borde); color: var(--texto);
  border-radius: var(--radio); padding: 11px 16px; font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.7);
  animation: subir 0.3s var(--ease-salida);
}
.tostada.error { border-color: var(--peligro); color: var(--peligro); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Desktop: columna centrada con marco sutil */
@media (min-width: 700px) {
  body { background: #060606; }
  #app, .vista { max-width: 520px; margin: 0 auto; }
  #app { border-left: 1px solid var(--borde); border-right: 1px solid var(--borde); min-height: 100dvh; }
  .tabs { max-width: 520px; margin: 0 auto; border-left: 1px solid var(--borde); border-right: 1px solid var(--borde); }
}
