/* Tokens, reinicio, botones, barra superior, disposición general y acceso. */
:root {
  --fondo: #0d1512;
  --superficie: #16211c;
  --superficie-2: #1d2b24;
  --borde: #2b3c34;
  --texto: #e9f0ec;
  --texto-2: #9fb3a9;
  --acento: #e0b04a;
  --acento-oscuro: #9c7424;
  --peligro: #b8322e;
  --ok: #2d8a4e;
  --info: #2f6db3;
  --radio: 10px;
  --sombra: 0 10px 30px rgb(0 0 0 / .45);
  --fuente: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ancho-panel: 300px;
  --alto-barra: 48px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: radial-gradient(ellipse at 50% 30%, #13231b 0%, var(--fondo) 70%);
  color: var(--texto);
  font: 14px/1.4 var(--fuente);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0 0 .5em; font-weight: 700; }
input, select, button { font: inherit; color: inherit; }
input, select {
  background: var(--fondo); border: 1px solid var(--borde); border-radius: 8px; padding: 7px 9px;
}
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }

/* Botones */
.boton {
  background: var(--superficie-2); border: 1px solid var(--borde); border-radius: 8px;
  padding: 8px 14px; cursor: pointer; font-weight: 600; transition: filter .15s, transform .05s;
  white-space: nowrap;
}
.boton:hover { filter: brightness(1.15); }
.boton:active { transform: translateY(1px); }
.boton:disabled { opacity: .45; cursor: default; filter: none; }
.boton.primario { background: linear-gradient(#e8bd5c, var(--acento-oscuro)); color: #1c1405; border-color: #f1cf7e; }
.boton.peligro { background: linear-gradient(#c9423d, #8e2522); border-color: #d9605b; }
.boton.ok { background: linear-gradient(#37a05c, #1f6a3a); border-color: #4dba73; }
.boton.chico { padding: 5px 10px; font-size: 13px; }
.boton.conmutador[aria-pressed="true"] { background: var(--acento-oscuro); border-color: var(--acento); }

/* Barra superior */
.juego { height: 100%; display: grid; grid-template-rows: var(--alto-barra) minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
.barra {
  display: flex; align-items: center; gap: 16px; padding: 0 14px;
  background: linear-gradient(#1a2721, #121c17); border-bottom: 1px solid var(--borde);
}
.marca { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .3px; }
.logo { color: var(--acento); font-size: 18px; }
.info-torneo { flex: 1; min-width: 0; display: flex; gap: 14px; align-items: center; color: var(--texto-2); font-size: 13px; overflow: hidden; white-space: nowrap; }
.info-torneo b { color: var(--texto); }
.info-torneo .reloj-nivel { font-variant-numeric: tabular-nums; color: var(--acento); font-weight: 700; }
.info-torneo .pausado { background: var(--peligro); color: #fff; padding: 2px 8px; border-radius: 6px; font-weight: 700; }
.botones-barra { display: flex; gap: 6px; flex: none; }
.botones-barra .texto { margin-left: 5px; }
a.boton { text-decoration: none; color: inherit; display: inline-flex; align-items: center; }
#b-voz.en-llamada { background: #7c201d; border-color: #d05a54; }

/* Zona principal: mesa + panel lateral */
.zona { display: grid; grid-template-columns: minmax(0, 1fr) var(--ancho-panel); min-height: 0; }
.escenario {
  position: relative; min-width: 0; min-height: 0;
  /* Fila fija abajo para la barra de acción: la mesa nunca queda tapada. */
  display: grid; grid-template-rows: minmax(0, 1fr) auto var(--alto-acciones, 124px);
}

/* Acceso */
.acceso { height: 100%; display: grid; place-items: center; padding: 16px; }
.tarjeta { background: var(--superficie); border: 1px solid var(--borde); border-radius: 16px; padding: 24px; box-shadow: var(--sombra); }
.acceso .tarjeta { width: min(400px, 100%); display: grid; gap: 12px; text-align: center; max-height: 100%; overflow: auto; }
.acceso form { display: grid; gap: 12px; }
.acceso form p { margin: 0; }
.acceso label { display: grid; gap: 6px; text-align: left; color: var(--texto-2); }
.enlace { background: none; border: 0; color: var(--acento); cursor: pointer; text-decoration: underline; padding: 4px; }
.nota { color: var(--texto-2); font-size: 12px; }
.logo-grande { font-size: 40px; color: var(--acento); }
.error { color: #ff8a80; min-height: 1.2em; margin: 0; }

/* Avisos */
.aviso-conexion {
  position: fixed; top: calc(var(--alto-barra) + 8px); left: 50%; transform: translateX(-50%);
  background: var(--peligro); color: #fff; padding: 8px 16px; border-radius: 8px; z-index: 50; box-shadow: var(--sombra);
}
.tostadas { position: fixed; bottom: 16px; left: 16px; display: grid; gap: 8px; z-index: 60; pointer-events: none; }
.tostada {
  background: var(--superficie-2); border: 1px solid var(--borde); border-left: 4px solid var(--acento);
  padding: 8px 12px; border-radius: 8px; box-shadow: var(--sombra); max-width: 340px;
  animation: tostada-entra .2s ease-out;
}
.tostada.error { border-left-color: var(--peligro); }
@keyframes tostada-entra { from { transform: translateY(8px); opacity: 0; } }

/* «Reducir movimiento»: fuera solo lo que late sin parar. El reparto y las
   fichas se quedan: son información del juego y en Windows esta opción suele
   venir activada sin que nadie lo sepa (2026-09-25). */
@media (prefers-reduced-motion: reduce) {
  .boton-volver, .asiento.en-banco .banco-turno { animation: none !important; }
}

/* «Entrar con Google» (js/acceso.js): botón claro y sin logotipos de terceros. */
.entrar-google { display: grid; gap: 12px; justify-items: center; }
.boton-google {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px;
  background: #fff; color: #1f1f1f; font-weight: 700; text-decoration: none; border: 1px solid #dadce0;
  box-shadow: 0 2px 8px rgb(0 0 0 / .35);
}
.boton-google::before { content: "🔑"; }
.boton-google:hover { background: #f1f3f4; }
