/* Base de Emi & Victor: tipografía, color, botones y piezas compartidas.
   Mobile-first. La paleta hot vive en hot.css y solo se activa con body.tema-hot. */

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins-400.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/poppins-500.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-700.woff2") format("woff2");
}

:root {
  --coral: #ff6b6b;
  --amarillo: #ffd166;
  --verde: #06d6a0;
  --azul: #118ab2;
  --azul-btn: #0c5f86;
  --oscuro: #073b4c;
  --crema: #fff6ee;
  --papel: #fffbf7;
  --tinta: #073b4c;
  --tinta-suave: rgba(7, 59, 76, 0.72);
  --linea: rgba(7, 59, 76, 0.14);
  --sombra: 0 18px 40px rgba(7, 59, 76, 0.1);
  --radio: 22px;
  --fuente: "Poppins", "Avenir Next", "Segoe UI", sans-serif;
  --max: 1080px;
  --header: 4.5rem;
  --foco: #9a6b00;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--fuente);
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--tinta);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(255, 107, 107, 0.18), transparent 55%),
    radial-gradient(900px 420px at 110% 0%, rgba(17, 138, 178, 0.16), transparent 50%),
    var(--crema);
}

img, svg { max-width: 100%; }

button, input, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; }

h1, h2, h3, p { margin-top: 0; }

h1 {
  font-size: clamp(2.3rem, 1.2rem + 4vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 700;
}

h2 {
  font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h3 { font-size: 1.2rem; line-height: 1.25; }

a { color: var(--azul-btn); }

.saltar {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  background: var(--amarillo);
  color: var(--oscuro);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
}

.saltar:focus { top: 12px; }

.sr-solo {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 3px;
}

.barra {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 10px 16px calc(10px + env(safe-area-inset-top));
  background: rgba(7, 59, 76, 0.94);
  color: #f6fbff;
  backdrop-filter: blur(10px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  color: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 6px 2px;
  min-height: 44px;
}

.logo-punto {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 14px 0 0 var(--azul);
  margin-right: 16px;
}

.relojes-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  min-width: 0;
}

.relojes-mini strong { font-weight: 600; }

.selector-jugador {
  display: flex;
  gap: 8px;
}

.jugador-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
}

.jugador-btn[aria-pressed="true"] {
  background: #fff;
  color: var(--oscuro);
}

.jugador-btn[data-jugador="emi"][aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--coral); }
.jugador-btn[data-jugador="victor"][aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--azul); }

.avatar {
  width: 34px;
  height: 34px;
  display: block;
  flex: none;
}

.avatar-xl { width: 84px; height: 84px; margin: 0 auto 8px; }

.avatar svg { width: 100%; height: 100%; display: block; }

main {
  width: min(var(--max), calc(100% - 28px));
  margin: 0 auto;
  padding-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.99); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-coral { background: var(--coral); color: #2a0c0c; }
.btn-azul { background: var(--azul-btn); color: #f4fbff; }
.btn-verde { background: var(--verde); color: #05352a; }
.btn-amarillo { background: var(--amarillo); color: #3a2a00; }
.btn-oscuro { background: var(--oscuro); color: #f6fbff; }
.btn-fantasma {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}
.btn-peligro { background: #9f1239; color: #fff5f7; }

.fila-botones, .juego-acciones, .hot-acciones, .hot-seguridad {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

input[type="text"],
input[type="number"],
input[type="search"],
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--linea);
  background: #fff;
}

textarea { min-height: 96px; resize: vertical; }

label.campo { display: grid; gap: 6px; font-weight: 600; }

.aviso {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 209, 102, 0.35);
  color: var(--oscuro);
}

.kicker {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tinta-suave);
}

.pastilla {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(7, 59, 76, 0.06);
  font-size: 0.85rem;
  font-weight: 600;
}

.capa {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 59, 76, 0.72);
}

.capa-caja {
  width: min(440px, 100%);
  padding: 28px 22px;
  border-radius: 28px;
  background: var(--papel);
  color: var(--oscuro);
  text-align: center;
  box-shadow: var(--sombra);
}

.capa-caja p { color: var(--tinta-suave); }

#toasts {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 50;
  display: grid;
  gap: 8px;
  width: min(420px, calc(100% - 24px));
  pointer-events: none;
}

.toast {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--oscuro);
  color: #fff;
  box-shadow: var(--sombra);
}

.pie {
  width: min(var(--max), calc(100% - 28px));
  margin: 0 auto 28px;
  color: var(--tinta-suave);
  font-size: 0.92rem;
}

.pie small { display: block; margin-top: 4px; }

@media (max-width: 640px) {
  .barra { align-items: stretch; }
  .relojes-mini,
  .selector-jugador { width: 100%; }
  .relojes-mini { justify-content: space-between; }
  .jugador-btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
