/* ===== EMBRIAGAME — estilos ===== */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin:0; padding:0; height:100%; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0a0414;
  color: #f5e6ff;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 0, 128, 0.15), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0, 200, 255, 0.15), transparent 40%);
}

/* ===== LOGIN ===== */
.screen-login { display:flex; align-items:center; justify-content:center; padding:24px; }
.login-box {
  background: rgba(20, 8, 35, 0.85);
  border: 2px solid #ff2d8c;
  border-radius: 16px;
  padding: 32px;
  width: 100%; max-width: 420px;
  box-shadow: 0 0 30px rgba(255, 45, 140, 0.4), inset 0 0 20px rgba(255, 45, 140, 0.1);
}
.logo {
  font-family: 'Courier New', monospace;
  font-size: 42px; font-weight: 900;
  text-align: center; margin: 0 0 8px;
  color: #fff;
  text-shadow: 0 0 10px #ff2d8c, 0 0 20px #ff2d8c, 2px 2px 0 #6a008a;
  letter-spacing: 2px;
}
.logo span { color: #ffe14a; text-shadow: 0 0 10px #ffe14a; }
.tagline { text-align: center; color: #c8a8e0; margin: 0 0 24px; font-size: 14px; }

.login-form { display:flex; flex-direction:column; gap:14px; }
.login-form label { display:flex; flex-direction:column; font-size:13px; color:#c8a8e0; gap:6px; }
.login-form input {
  font-size: 18px; padding: 12px 14px;
  background: #1a0a2e; border: 2px solid #4a2070;
  border-radius: 8px; color: #fff;
  outline: none; transition: border-color .15s;
}
.login-form input:focus { border-color: #ff2d8c; }
.login-form button, .btn-primary {
  margin-top: 6px; padding: 14px;
  background: linear-gradient(135deg, #ff2d8c, #ffe14a);
  color: #1a0a2e; border: none; border-radius: 8px;
  font-size: 16px; font-weight: 800; letter-spacing: 1px;
  cursor: pointer; text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(255, 45, 140, 0.5);
  transition: transform .1s;
}
.login-form button:hover, .btn-primary:hover { transform: translateY(-1px); }
.login-form button:active, .btn-primary:active { transform: translateY(1px); }
.hint { text-align:center; color:#9079b0; font-size:12px; margin-top:18px; }
.err { color: #ff6b6b; background: rgba(255,107,107,0.1); padding: 10px; border-radius: 6px; font-size: 14px; margin: 0; }

/* ===== TOPBAR ===== */
.topbar {
  display:flex; justify-content:space-between; align-items:center;
  padding: 14px 24px; background: rgba(20, 8, 35, 0.9);
  border-bottom: 2px solid #ff2d8c;
  flex-wrap: wrap; gap: 10px;
}
.topbar h1 { margin:0; font-size:22px; color:#ffe14a; }
.pill.mesa {
  display:inline-block; background:#ff2d8c; color:#fff;
  padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight:700;
  margin-right: 8px;
}
.me { font-weight:700; color:#ffe14a; }
.btn-link { color: #c8a8e0; text-decoration: none; font-size: 14px; margin-left: 10px; }
.btn-link:hover { color: #ff2d8c; }
.btn-secondary {
  display:inline-block; padding: 8px 14px;
  border: 2px solid #4ad9ff; border-radius: 6px;
  color:#4ad9ff; text-decoration: none; font-size: 13px; font-weight: 700;
}

/* ===== LOBBY ===== */
.lobby { max-width: 900px; margin: 0 auto; padding: 24px; display: grid; gap: 20px; }
.panel {
  background: rgba(20, 8, 35, 0.7);
  border: 1px solid #4a2070;
  border-radius: 12px;
  padding: 20px;
}
.panel h2 { margin: 0 0 8px; color: #ffe14a; font-size: 18px; }
.muted { color: #9079b0; font-size: 13px; margin: 4px 0; }

.players-list { list-style: none; margin: 12px 0 0; padding: 0; }
.players-list li {
  display:flex; justify-content:space-between; align-items:center;
  padding: 12px 14px; background: #1a0a2e; border-radius: 8px;
  margin-bottom: 8px; border-left: 4px solid #ff2d8c;
}
.player-info { display:flex; align-items:center; gap:8px; }
.btn-challenge {
  background: #4ad9ff; color: #1a0a2e; border:none;
  padding: 8px 14px; border-radius: 6px; font-weight: 800; cursor: pointer;
  font-size: 13px; text-transform: uppercase;
}
.btn-challenge:hover { background: #ffe14a; }
.btn-accept { background: #4adb6a; color:#0a2e10; }
.btn-reject { background: #4a2070; color:#fff; }
.btn-danger { background: #ff4a4a; color: #fff; }

.status-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: #4a2070; color: #c8a8e0; margin-left: 8px;
}
.status-pending { background: #5a4500; color: #ffe14a; }
.status-rejected { background: #5a1010; color: #ff8a8a; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #ff2d8c; color: #fff;
  padding: 12px 20px; border-radius: 8px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .3s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  max-width: 90%; text-align: center;
}
.toast.show { opacity: 1; }

/* ===== JUEGO ===== */
.screen-game { overflow: hidden; }
.game-hud {
  display:flex; justify-content:space-between; align-items:center;
  padding: 10px 16px; background: rgba(20, 8, 35, 0.9);
  border-bottom: 2px solid #ff2d8c;
  flex-wrap: wrap; gap: 8px;
}
.hud-center { display:flex; gap:18px; font-size: 15px; }
.hud-center b { color: #ffe14a; }
.opp { color: #4ad9ff; font-size: 14px; }
.opp-progress { color: #ff8a8a; margin-left: 8px; }

.drunk-meter { padding: 6px 16px; background: rgba(20, 8, 35, 0.85); }
.drunk-label { font-size: 11px; color: #c8a8e0; margin-bottom: 4px; }
.drunk-bar { height: 8px; background: #1a0a2e; border-radius: 999px; overflow: hidden; border: 1px solid #4a2070; }
.drunk-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #4adb6a 0%, #ffe14a 50%, #ff2d8c 100%);
  transition: width .3s ease;
}

.canvas-wrap {
  position: relative;
  width: 100%; max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 3 / 2;            /* en desktop el ancho manda y este define el alto */
  background: #000;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
/* Capa de personajes: se superpone a #game con el MISMO tamaño y encuadre,
   pero sin el filtro de desenfoque, para que el compadre se lea siempre. */
.game-fx {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  z-index: 2;
}
#game {
  width: 100%; height: 100%;
  object-fit: contain;            /* responsive: escala al contenedor manteniendo aspecto */
  display: block;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}
.overlay {
  position: absolute; inset: 0;
  background: rgba(10, 4, 20, 0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
}
.overlay.hidden { display: none; }
.overlay-card {
  background: #1a0a2e; border: 2px solid #ff2d8c;
  border-radius: 12px; padding: 24px 32px; text-align: center;
  max-width: 90%;
  box-shadow: 0 0 30px rgba(255, 45, 140, 0.6);
}
.overlay-card h2 { margin: 0 0 12px; color: #ffe14a; font-size: 26px; }
.overlay-card p { color: #fff; margin: 0 0 18px; font-size: 16px; }
#ov-actions { display:flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#ov-actions a, #ov-actions button {
  background: #ff2d8c; color: #fff; padding: 10px 18px;
  border-radius: 8px; text-decoration:none; font-weight: 700;
  border: none; cursor: pointer; font-size: 14px;
}
#ov-actions .secondary { background: #4a2070; }

.controls-hint {
  text-align: center; padding: 10px;
  color: #9079b0; font-size: 12px;
}
.controls-hint span {
  display: inline-block;
  background: #1a0a2e; border: 1px solid #4a2070;
  padding: 2px 8px; border-radius: 4px;
  color: #ffe14a; font-family: monospace;
}

/* Leyenda de ítems: SIEMPRE visible (también en móvil, que es donde juegan
   los clientes del bar). Si no se ve, nadie descubre el agua ni el ave. */
.items-hint {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 6px 10px; padding: 6px 10px 10px;
  font-size: 11px; color: #cbb8e0; text-align: center;
}
.items-hint span { white-space: nowrap; }

/* Controles táctiles (móvil) */
.mobile-controls {
  display: none;
  position: fixed; bottom: 12px; left: 0; right: 0;
  justify-content: space-between; padding: 0 16px;
  z-index: 5; pointer-events: none;
}
.mobile-controls .mc-btn {
  pointer-events: auto;
  width: 70px; height: 70px;
  background: rgba(255, 45, 140, 0.7); color: #fff;
  border: 2px solid #fff; border-radius: 50%;
  font-size: 28px; font-weight: 800;
  user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
}
.mobile-controls .mc-btn.jump { margin-left: auto; background: rgba(74, 217, 255, 0.7); }

/* ===== ZONA INFERIOR: publicidad + menú ===== */
.game-extra {
  max-width: 900px; margin: 10px auto; padding: 0 12px;
  display: flex; align-items: stretch; gap: 10px;
}
.ad-banner {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  line-height: 0;                /* mata el gap de inline-block */
  max-width: 100%;
  background: transparent;
}
.ad-banner img {
  width: 100%; height: auto;     /* el contenedor se ajusta exactamente a la imagen */
  display: block;
  border-radius: 12px;
}
.ad-placeholder { color: #6a5585; font-size: 13px; letter-spacing: .5px; padding: 12px; }
.menu-btn {
  flex: 0 0 auto;
  background: #4a2070; color: #fff;
  border: 2px solid #ff2d8c; border-radius: 12px;
  padding: 0 20px; font-size: 16px; font-weight: 800; cursor: pointer;
}
.menu-btn:active { transform: translateY(1px); }

/* Menú del bar (modal) */
.menu-modal {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(10, 4, 20, 0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.menu-modal.hidden { display: none; }
.menu-card {
  background: #14071f; border: 2px solid #ff2d8c;
  border-radius: 16px; width: 100%; max-width: 420px;
  max-height: 85vh; max-height: 85dvh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 0 40px rgba(255, 45, 140, 0.5);
}
.menu-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid #4a2070;
  background: rgba(255, 45, 140, 0.08);
}
.menu-head h3 { margin: 0; color: #4ad9ff; font-size: 22px; font-weight: 900; letter-spacing: 1px; }
.menu-head h3 span { color: #ff2d8c; }
.menu-close { background: none; border: none; color: #c8a8e0; font-size: 22px; cursor: pointer; line-height: 1; padding: 4px; }
.menu-close:hover { color: #ff2d8c; }
.menu-scroll { overflow-y: auto; padding: 8px 18px; -webkit-overflow-scrolling: touch; }
.menu-cat {
  color: #ffe14a; font-size: 15px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px;
  margin: 16px 0 8px; padding-bottom: 4px; border-bottom: 1px dashed #4a2070;
}
.menu-cat:first-child { margin-top: 6px; }
.menu-item { display: flex; align-items: baseline; gap: 6px; padding: 5px 0; font-size: 14px; }
.menu-item .it-name { color: #f5e6ff; }
.menu-item .it-dots { flex: 1; border-bottom: 1px dotted #4a2070; transform: translateY(-3px); }
.menu-item .it-price { color: #4adb6a; font-weight: 700; white-space: nowrap; }
.menu-foot { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid #4a2070; }
.menu-action {
  flex: 1; display: block; text-align: center; text-decoration: none;
  padding: 13px; border-radius: 10px; border: none;
  background: #ff2d8c; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
}
.menu-action.secondary { background: #4a2070; }

@media (hover: none) and (pointer: coarse) {
  .controls-hint { display: none; }

  /* Layout responsive — EL JUEGO MANDA.
     Antes el canvas repartía el alto con el banner (flex 1) y encima el
     object-fit:contain le metía franjas negras: quedaba diminuto. Ahora va a
     ancho completo con su proporción 3:2 (el máximo real sin recortar nada)
     y el orden en pantalla es: juego → leyenda → controles → menú+publicidad.
     Si el teléfono es bajito, la página se desplaza; el juego nunca encoge. */
  .screen-game { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; overflow-y: auto; }
  .canvas-wrap {
    flex: 0 0 auto; width: 100%;
    aspect-ratio: 3 / 2;               /* mismo aspecto del canvas: cero franjas */
    max-height: 62vh; max-height: 62dvh;   /* tope solo para pantallas apaisadas */
  }

  /* La leyenda se queda (es como el cliente descubre el agua y el ave),
     pero en UNA línea deslizable: cuesta ~20px, no tres renglones. */
  .items-hint {
    order: 1; font-size: 10px; gap: 4px 12px; padding: 4px 10px 6px;
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .items-hint::-webkit-scrollbar { display: none; }

  .mobile-controls {
    order: 2;
    display: flex; position: static;
    flex: 0 0 auto; margin-top: auto;     /* anclado al fondo */
    padding: 4px 16px 12px;
  }

  /* Menú y "?" comparten una fila compacta; la publicidad va al fondo del todo */
  .game-extra {
    order: 3; flex: 0 0 auto; margin: 0; max-width: none;
    flex-direction: row; flex-wrap: wrap; padding: 6px 10px 10px; gap: 6px;
  }
  .menu-btn { order: 1; flex: 1 1 auto; width: auto; padding: 11px; }
  .menu-btn.ayuda { order: 2; flex: 0 0 52px; }
  .ad-banner { order: 3; flex: 0 0 auto; width: 100%; }
  .ad-banner img { max-height: 96px; object-fit: cover; }
}

/* ===== ADMIN ===== */
.admin-table {
  width: 100%; border-collapse: collapse; margin-top: 12px;
  background: #1a0a2e; border-radius: 8px; overflow: hidden;
}
.admin-table th, .admin-table td {
  padding: 12px; text-align: left; border-bottom: 1px solid #4a2070;
}
.admin-table th { background: #2a1040; color: #ffe14a; font-size: 13px; }
.admin-table td.loser { color: #ff8a8a; font-weight: 700; }
.admin-table td.winner { color: #4adb6a; font-weight: 700; }

/* ---------- Selector de mapas (lobby) ---------- */
.mapas { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.mapa {
  position: relative;
  display: block; padding: 14px 14px 14px 46px;
  border-radius: 10px; text-decoration: none;
  border: 2px solid #4a2070; background: #1a0a2e;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.mapa:hover { transform: translateY(-2px); }
.mapa b { display: block; color: #fff; font-size: 15px; margin-bottom: 3px; }
.mapa small { color: #b9a6d0; font-size: 11px; line-height: 1.35; display: block; }
.mapa-n {
  position: absolute; left: 12px; top: 14px;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #14061f;
}
.mapa-1 { border-color: #ff2d8c; box-shadow: 0 0 14px rgba(255,45,140,.25); }
.mapa-1 .mapa-n { background: #ff2d8c; }
.mapa-2 { border-color: #4ad9ff; box-shadow: 0 0 14px rgba(74,217,255,.25); background: #041c22; }
.mapa-2 .mapa-n { background: #4ad9ff; }
.mapa-3 { border-color: #ffb020; box-shadow: 0 0 14px rgba(255,176,32,.25); background: #23120a; }
.mapa-3 .mapa-n { background: #ffb020; }

/* ================= RANKING ================= */
.screen-rank { padding-bottom: 32px; }
.rank-top { text-align: center; padding: 20px 16px 8px; }
.rank-top .logo { font-size: 34px; margin-bottom: 4px; }
.rank-filtros { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.rank-filtro {
  font-size: 12px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid #4a2070; color: #c8a8e0; text-decoration: none;
}
.rank-filtro.on { background: #ff2d8c; border-color: #ff2d8c; color: #fff; font-weight: 700; }
.rank-main { max-width: 620px; margin: 0 auto; padding: 0 14px; }
.rank-vacio { text-align: center; color: #9079b0; padding: 40px 0; }

/* Podio */
.podio { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: end; margin: 18px 0 22px; }
.podio-puesto {
  background: rgba(20,8,35,.85); border: 2px solid #4a2070;
  border-radius: 14px; padding: 14px 8px 12px; text-align: center; position: relative;
}
.podio-puesto.p1 { border-color: #ffe14a; box-shadow: 0 0 26px rgba(255,225,74,.35); order: 2; padding-top: 22px; }
.podio-puesto.p2 { border-color: #cfd8e3; order: 1; }
.podio-puesto.p3 { border-color: #d08a4a; order: 3; }
.podio-puesto.es-tuyo { outline: 2px dashed #4ad9ff; outline-offset: 3px; }
.podio-medalla { font-size: 26px; line-height: 1; margin-bottom: 6px; }
.podio-avatar {
  width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 50%;
  overflow: hidden; background: #2a1040; border: 2px solid #ff2d8c;
  display: flex; align-items: center; justify-content: center;
}
.podio-puesto.p1 .podio-avatar { width: 82px; height: 82px; border-color: #ffe14a; }
.podio-avatar img { width: 100%; height: 100%; object-fit: cover; }
.podio-inicial { font-size: 26px; font-weight: 900; color: #ffe14a; }
.podio-nombre { font-weight: 800; font-size: 13px; color: #fff; word-break: break-word; }
.podio-puntos { font-family: monospace; font-size: 20px; color: #ff2d8c; font-weight: 900; }
.podio-puesto.p1 .podio-puntos { font-size: 25px; color: #ffe14a; }
.podio-detalle { font-size: 10px; color: #9079b0; margin-bottom: 8px; }

/* Botón compartir */
.btn-ig {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg,#833ab4,#fd1d1d,#fcb045);
  color: #fff; border: none; border-radius: 999px;
  padding: 6px 12px; font-size: 11px; font-weight: 800; cursor: pointer;
}
.btn-ig:disabled { opacity: .6; }
.btn-ig.mini { padding: 6px; border-radius: 50%; }

/* Lista 4-30 */
.rank-lista { display: flex; flex-direction: column; gap: 6px; }
.rank-fila {
  display: flex; align-items: center; gap: 10px;
  background: rgba(20,8,35,.7); border: 1px solid #33184f;
  border-radius: 10px; padding: 8px 10px;
}
.rank-fila.es-tuyo { border-color: #4ad9ff; background: rgba(74,217,255,.1); }
.rank-pos { width: 26px; text-align: center; font-weight: 800; color: #9079b0; font-size: 13px; }
.rank-avatar {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; overflow: hidden;
  background: #2a1040; display: flex; align-items: center; justify-content: center;
}
.rank-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rank-inicial { font-weight: 900; color: #ffe14a; font-size: 14px; }
.rank-nombre { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; color: #fff; }
.rank-nombre small { display: block; font-weight: 400; font-size: 10px; color: #9079b0; }
.rank-pts { font-family: monospace; font-weight: 800; color: #ff2d8c; font-size: 15px; }

/* Formulario de inscripción */
.rank-resumen { text-align: center; margin-bottom: 18px; }
.rank-puntos { font-family: monospace; font-size: 46px; font-weight: 900; color: #ffe14a; line-height: 1; }
.rank-meta { font-size: 12px; color: #c8a8e0; margin-top: 4px; }
.rank-puesto { font-size: 13px; color: #4ad9ff; margin-top: 8px; }
.rank-foto-bloque {
  border: 1px dashed #4a2070; border-radius: 10px; padding: 12px; margin-top: 6px;
  display: flex; flex-direction: column; gap: 10px;
}
.rank-nota { font-size: 12px; color: #c8a8e0; margin: 0; }
.rank-legal { font-size: 10px; color: #7a689a; margin: 0; }
.rank-obligatorio { color: #ffe14a; font-size: 11px; }

/* ============ BATALLA DE MESAS ============ */
.record-hist {
  border: 2px solid #ffe14a; border-radius: 14px; padding: 14px;
  background: linear-gradient(135deg, rgba(255,225,74,.12), rgba(255,45,140,.10));
  text-align: center; margin: 16px 0;
}
.record-tag { font-size: 11px; letter-spacing: 1px; color: #ffe14a; font-weight: 800; }
.record-nombre { font-size: 20px; font-weight: 900; color: #fff; margin-top: 4px; }
.record-puntos { font-family: monospace; font-size: 22px; color: #ffe14a; font-weight: 900; }
.record-detalle { font-size: 11px; color: #9079b0; margin-top: 3px; }

.mesa-campeona {
  border: 3px solid #ff2d8c; border-radius: 16px; padding: 18px 14px;
  background: rgba(40,8,50,.9); text-align: center; margin-bottom: 16px;
  box-shadow: 0 0 30px rgba(255,45,140,.4);
}
.campeona-tag { font-size: 12px; letter-spacing: 1px; color: #ffe14a; font-weight: 800; }
.campeona-num { font-size: 26px; font-weight: 900; color: #fff; margin: 6px 0 2px; letter-spacing: 2px; }
.campeona-puntos { font-family: monospace; font-size: 42px; font-weight: 900; color: #ff2d8c; line-height: 1; }
.campeona-detalle { font-size: 12px; color: #c8a8e0; margin-top: 6px; }
.campeona-equipo { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.equipo-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: #1a0a2e; border: 1px solid #4a2070; border-radius: 999px;
  padding: 4px 10px 4px 4px; font-size: 12px; color: #fff;
}
.equipo-chip img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.equipo-chip b { color: #ffe14a; font-family: monospace; }

.mesas-lista { display: flex; flex-direction: column; gap: 6px; }
.mesa-fila { background: rgba(20,8,35,.7); border: 1px solid #33184f; border-radius: 10px; }
.mesa-fila summary {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  cursor: pointer; list-style: none;
}
.mesa-fila summary::-webkit-details-marker { display: none; }
.mesa-pos { width: 24px; text-align: center; font-weight: 800; color: #9079b0; }
.mesa-nombre { flex: 1; font-weight: 800; color: #fff; font-size: 15px; }
.mesa-nombre small { display: block; font-weight: 400; font-size: 10px; color: #9079b0; }
.mesa-total { font-family: monospace; font-weight: 900; color: #ff2d8c; font-size: 17px; }
.mesa-equipo { padding: 0 12px 10px 46px; display: flex; flex-direction: column; gap: 4px; }
.equipo-linea { display: flex; justify-content: space-between; font-size: 12px; color: #c8a8e0; }
.equipo-pts { font-family: monospace; color: #ffe14a; }
.rank-filtro.destacado { border-color: #ffe14a; color: #ffe14a; font-weight: 700; }

/* Subida de foto con estilo propio (el input nativo se oculta) */
.input-oculto { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.campo-foto { display: flex; flex-direction: column; gap: 8px; }
.campo-label { font-size: 13px; color: #c8a8e0; }
.btn-foto {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; cursor: pointer;
  background: #1a0a2e; color: #4ad9ff;
  border: 2px dashed #4ad9ff; border-radius: 8px;
  font-size: 14px; font-weight: 700;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-foto:hover { background: #221040; }
.btn-foto.con-foto { border-style: solid; border-color: #4adb6a; color: #4adb6a; }
.foto-previa { display: flex; align-items: center; gap: 10px; }
.foto-previa img {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  border: 2px solid #4adb6a;
}
.btn-quitar {
  background: transparent; border: 1px solid #4a2070; color: #c8a8e0;
  border-radius: 6px; padding: 6px 12px; font-size: 12px; cursor: pointer;
}
.btn-quitar:hover { border-color: #ff2d8c; color: #ff2d8c; }

/* ================= TUTORIAL VISUAL ================= */
.tuto {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(6,2,14,.93);
  display: flex; align-items: center; justify-content: center; padding: 14px;
  overflow-y: auto;
}
.tuto.hidden { display: none; }
.tuto-card {
  background: #170a28; border: 2px solid #ff2d8c; border-radius: 16px;
  padding: 18px 16px; max-width: 460px; width: 100%;
  box-shadow: 0 0 40px rgba(255,45,140,.45);
}
.tuto-titulo {
  margin: 0 0 14px; text-align: center; color: #ffe14a; font-size: 22px;
  text-shadow: 0 0 12px rgba(255,225,74,.5);
}
.tuto-paso {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #33184f;
}
.tuto-paso:last-of-type { border-bottom: none; }
.tuto-paso p { margin: 0; font-size: 13.5px; line-height: 1.4; color: #e8dcf5; }
.tuto-paso b { color: #4ad9ff; }
.tuto-fig {
  flex: 0 0 96px; height: 72px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  background: #0e0518; border: 1px solid #33184f; border-radius: 10px;
  position: relative; overflow: hidden;
}

/* --- Teclas que se ven pulsar --- */
.tecla {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px;
  background: #2a1040; border: 2px solid #7a4aa0; border-bottom-width: 4px;
  color: #fff; font-size: 13px; font-weight: 800;
}
.tecla.grande { width: 34px; height: 34px; font-size: 16px; }
@keyframes pulsar {
  0%,70%,100% { transform: translateY(0); border-bottom-width: 4px;
                background: #2a1040; box-shadow: none; }
  80%,95%     { transform: translateY(3px); border-bottom-width: 1px;
                background: #ff2d8c; box-shadow: 0 0 14px rgba(255,45,140,.8); }
}
.anim-izq   { animation: pulsar 2.2s infinite; }
.anim-der   { animation: pulsar 2.2s infinite .7s; }
.anim-pulsa { animation: pulsar 1.6s infinite .3s; }

/* --- Bandeja que se inclina sola --- */
.fig-bandeja { position: relative; width: 64px; height: 46px; }
@keyframes tambalea { 0%,100%{transform:rotate(-13deg)} 50%{transform:rotate(13deg)} }
.fig-bandeja { animation: tambalea 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
.fig-palo  { position:absolute; left:31px; bottom:0; width:3px; height:18px; background:#8a6535; }
.fig-tabla { position:absolute; left:6px; bottom:17px; width:52px; height:5px;
             background:#a0723c; border-radius:2px; }
.fig-trago { position:absolute; left:26px; bottom:22px; width:13px; }

/* --- Items --- */
.fig-item { width: 34px; }
@keyframes flotar { 0%,100%{transform:translateY(-3px)} 50%{transform:translateY(3px)} }
.fig-item.flota { animation: flotar 1.6s ease-in-out infinite; }
.fig-item.agua  { filter: hue-rotate(160deg) saturate(2.2) brightness(1.1);
                  animation: flotar 1.6s ease-in-out infinite; }
@keyframes venir { 0%{transform:translateX(-26px) scale(.85)} 100%{transform:translateX(20px) scale(1.1)} }
.fig-item.persigue { width: 40px; animation: venir 1.5s ease-in infinite; }
@keyframes temblar { 0%,100%{transform:rotate(-7deg)} 50%{transform:rotate(7deg)} }
.fig-item.peligro { width: 38px; animation: temblar .5s ease-in-out infinite; }
/* Tachado rojo para "esto NO se recoge" */
.fig-item.tacha { position: relative; }
.tuto-fig .tacha::after { content: ''; }
.fig-item.tacha {
  filter: drop-shadow(0 0 0 transparent);
}
.tuto-fig:has(.tacha)::after {
  content: ''; position: absolute; left: 16px; right: 16px; top: 50%;
  height: 4px; background: #ff3b3b; transform: rotate(-28deg); border-radius: 2px;
  box-shadow: 0 0 10px rgba(255,59,59,.8);
}
.fig-emoji {
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}
.fig-cae { font-size: 24px; animation: flotar 1.2s ease-in-out infinite; }
.fig-flecha { color: #ff3b3b; font-size: 20px; font-weight: 900; }

/* --- Botón --- */
.tuto-btn {
  width: 100%; margin-top: 14px; padding: 14px;
  background: linear-gradient(135deg,#ff2d8c,#ffe14a);
  color: #1a0a2e; border: none; border-radius: 10px;
  font-size: 15px; font-weight: 900; letter-spacing: .5px; cursor: pointer;
  text-transform: uppercase; box-shadow: 0 4px 16px rgba(255,45,140,.5);
}
.tuto-btn:active { transform: translateY(2px); }
.tuto-nomas {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 10px; font-size: 11.5px; color: #9079b0; cursor: pointer;
}
.menu-btn.ayuda {
  flex: 0 0 auto; width: 42px; padding: 12px 0; font-weight: 900;
}
@media (max-width: 720px) {
  .tuto-card { padding: 14px 12px; }
  .tuto-titulo { font-size: 19px; }
  .tuto-paso p { font-size: 12.5px; }
  .tuto-fig { flex-basis: 84px; height: 64px; }
}

/* --- Arreglo del podio en móvil ---
   Con 'repeat(3, 1fr)' las columnas no bajan de su contenido (min-width:auto),
   así que el botón "Compartir" y los textos largos empujaban la 3ª columna
   fuera de la pantalla: 31px de scroll horizontal en un móvil de 375px. */
.podio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.podio-puesto { min-width: 0; }
.podio-nombre, .podio-detalle, .podio-puntos { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 430px) {
  /* En pantallas estrechas el botón queda solo con el icono */
  .podio .btn-ig { font-size: 0; padding: 8px; border-radius: 50%; gap: 0; }
  .podio .btn-ig svg { width: 16px; height: 16px; }
  .podio { gap: 5px; }
  .podio-puesto { padding: 12px 5px 10px; }
  .podio-nombre { font-size: 12px; }
  .podio-detalle { font-size: 9px; }
}

/* El botón vive dentro de .login-form, cuyas reglas de 'label' le ganaban el
   color. Se sube la especificidad para que al elegir foto se ponga verde. */
.campo-foto .btn-foto { color: #4ad9ff; border-color: #4ad9ff; }
/* !important a propósito: empata en especificidad con .campo-foto .btn-foto y
   con las reglas de label del formulario. Es la señal de "foto lista". */
.campo-foto .btn-foto.con-foto { border-color: #4adb6a !important; color: #4adb6a !important; }
.rank-filtro.premio { border-color: #4adb6a; color: #4adb6a; font-weight: 700; }
.rank-filtro.premio.on { background: #4adb6a; color: #0a2e10; }
