:root {
  /* Tema claro: gris muy claro + blanco, con vivos en café.
     (--gold se conserva como nombre del color de acento, ahora es café) */
  --bg: #f4f2ef;
  --panel: #ffffff;
  --panel-2: #f7f3ee;
  --line: #e4dbd0;
  --gold: #7b4a26;
  --gold-2: #96602f;
  --cafe-suave: #efe4d6;
  --green: #3f8a4d;
  --red: #c0453f;
  --text: #2d2520;
  --muted: #7d7168;
  --sq-light: #f0dcc0;
  --sq-dark: #a9774f;
  --bs-body-color: var(--text);
  --bs-body-bg: var(--bg);
  --bs-secondary-color: var(--muted);
  --bs-border-color: var(--line);
  --bs-link-color: var(--gold);
  --bs-link-color-rgb: 123, 74, 38;
  --bs-link-hover-color: var(--gold-2);
  --bs-link-hover-color-rgb: 150, 96, 47;
  --bs-primary: var(--gold);
  --bs-primary-rgb: 123, 74, 38;
}
.text-secondary { color: var(--muted) !important; }

body {
  background: radial-gradient(1200px 600px at 10% -10%, #efe3d3 0%, transparent 60%), var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
}

h1, h2, .brand, .display-font { font-family: 'Playfair Display', Georgia, serif; }

.navbar-chess { background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.navbar-chess .nav-link { color: var(--muted); }
.navbar-chess .nav-link:hover, .navbar-chess .nav-link.show { color: var(--gold); }
.navbar-chess { box-shadow: 0 1px 0 rgba(123,74,38,.06), 0 4px 16px rgba(60,40,20,.04); }
.brand { color: var(--gold) !important; font-size: 1.35rem; }
.brand-icon { font-size: 1.6rem; vertical-align: -2px; }

.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; font-weight: 600; }
.btn-gold:hover, .btn-gold:focus, .btn-gold:active { background: var(--gold-2) !important; border-color: var(--gold-2) !important; color: #fff !important; }
/* Botones secundarios: en tema claro "outline-light" sería invisible; se vuelven café suave */
.btn-outline-light { --bs-btn-color: var(--gold); --bs-btn-border-color: #d9cbbb; --bs-btn-bg: #fff;
  --bs-btn-hover-color: var(--gold); --bs-btn-hover-bg: var(--cafe-suave); --bs-btn-hover-border-color: #c9b39b;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--gold); --bs-btn-active-border-color: var(--gold);
  --bs-btn-disabled-color: var(--muted); --bs-btn-disabled-border-color: var(--line); }
.btn-check:checked + .btn-outline-light { color: #fff; background: var(--gold); border-color: var(--gold); }
.form-check-input:checked { background-color: var(--gold); border-color: var(--gold); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: #c9a57f; box-shadow: 0 0 0 .2rem rgba(123,74,38,.15); }
.border-warning { border-color: var(--gold) !important; }
.text-gold { color: var(--gold) !important; }

.card-chess { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(60,40,20,.04), 0 4px 14px rgba(60,40,20,.04); }
.card-chess .card-header { background: var(--panel-2); border-bottom: 1px solid var(--line); font-weight: 600; }
.card-hover { transition: transform .15s, border-color .15s; }
.card-hover:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 8px 22px rgba(123,74,38,.12); }

.hero { padding: 3rem 0 2rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); }

.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; }
.stat .n { font-size: 1.8rem; font-weight: 700; color: var(--gold); line-height: 1; }
.stat .l { color: var(--muted); font-size: .85rem; }

.table-chess { --bs-table-bg: transparent; --bs-table-border-color: var(--line); }
.table-chess thead th { color: var(--muted); font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.pos-1 { color: #b8860b; font-weight: 700; }
.pos-2 { color: #7d8894; font-weight: 700; }
.pos-3 { color: #a0612b; font-weight: 700; }

.badge-estado { font-weight: 500; }
.dot-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; margin-right: 5px; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .3 } }

.link-copy { font-family: ui-monospace, monospace; font-size: .8rem; word-break: break-all; }
.code-big { font-family: ui-monospace, monospace; font-size: 2.2rem; letter-spacing: .3em; color: var(--gold); }
.qr-box { border: 1px solid var(--line); background: #fff; padding: 14px; border-radius: 12px; display: inline-block; }

/* --------- Tablero --------- */
.white-1e1d7 { background-color: var(--sq-light); color: var(--sq-dark); }
.black-3c85d { background-color: var(--sq-dark); color: var(--sq-light); }
.board-b72b1 { border: 0; border-radius: 6px; overflow: hidden; box-shadow: 0 10px 28px rgba(60,40,20,.25); }
.sq-hl { box-shadow: inset 0 0 0 100px rgba(235, 200, 80, .5); }
.sq-check { box-shadow: inset 0 0 18px 6px rgba(220, 38, 38, .85); }
.sq-move::after { content: ''; position: absolute; inset: 38%; border-radius: 50%; background: rgba(0,0,0,.22); pointer-events: none; }
.square-55d63 { position: relative; }

.player-bar { display: flex; align-items: center; justify-content: space-between; padding: .55rem .8rem; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.player-bar.turno { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; background: #fff; }
.player-bar .nombre { font-weight: 600; }
.pieza-color { width: 14px; height: 14px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -1px; border: 1px solid #8a7c70; }
.pieza-color.w { background: #fff; }
.pieza-color.b { background: #2d2520; }

.movelist { max-height: 360px; overflow-y: auto; font-family: ui-monospace, monospace; font-size: .92rem; }
.movelist .row-mv { display: grid; grid-template-columns: 38px 1fr 1fr; padding: 2px 6px; }
.movelist .row-mv:nth-child(odd) { background: rgba(123,74,38,.05); }
.movelist .num { color: var(--muted); }
.movelist .last { color: var(--gold); font-weight: 700; }

/* --------- Monitor --------- */
.monitor-body main { padding-top: 1rem !important; }
.monitor-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.mon-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .6rem; height: 100%; cursor: pointer; transition: border-color .2s; }
.mon-card:hover { border-color: var(--gold); }
.mon-card.flash { animation: flash 1s; }
@keyframes flash { 0% { border-color: var(--gold); box-shadow: 0 0 20px rgba(123,74,38,.35) } 100% { border-color: var(--line); box-shadow: none } }
.mon-name { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-elo { color: var(--muted); font-size: .75rem; }
.mon-res { font-weight: 700; color: var(--gold); }
.standing-mini td { padding: .25rem .4rem; font-size: .9rem; }

.swal2-popup { background: var(--panel) !important; color: var(--text) !important; border: 1px solid var(--line); }
.swal2-input, .swal2-select, .swal2-textarea { background: var(--panel-2) !important; color: var(--text) !important; border-color: var(--line) !important; }
.swal2-select option { background: #fff; }
.swal2-popup .swal2-confirm { background-color: var(--gold); }
.swal2-popup .swal2-styled:focus { box-shadow: 0 0 0 3px rgba(123,74,38,.3); }
.promo-btn { font-size: 2.6rem; width: 70px; height: 70px; border-radius: 10px; border: 1px solid var(--line); background: var(--sq-light); margin: 4px; cursor: pointer; line-height: 1; }
.promo-btn:hover { background: var(--cafe-suave); border-color: var(--gold); }

.form-control, .form-select { background-color: #fff; border-color: #ddd2c5; color: var(--text); }
.form-control::placeholder { color: #a99d92; }
.nav-tabs .nav-link.active { background: var(--panel); border-color: var(--line) var(--line) var(--panel); color: var(--gold); }
.nav-tabs { border-color: var(--line); }

/* --------- Avatares --------- */
.avatar { border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center;
          flex-shrink: 0; vertical-align: middle; color: #fff; font-weight: 700; line-height: 1; border: 2px solid var(--line); }
.avatar-ini { user-select: none; }
.con-avatar { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; }
.con-avatar > .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foto-preview { width: 120px; height: 120px; font-size: 3rem; }
.bot-status { position: fixed; bottom: 14px; left: 14px; z-index: 1050; background: var(--panel); border: 1px solid var(--gold);
              border-radius: 999px; padding: .35rem .9rem; font-size: .85rem; box-shadow: 0 6px 20px rgba(60,40,20,.15); }

/* --------- Relojes --------- */
.reloj { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: 1.05rem; min-width: 64px;
         text-align: center; padding: .15rem .55rem; border-radius: 6px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.reloj.corre { background: var(--gold); color: #fff; border-color: var(--gold); }
.reloj.corre.bajo, .reloj.bajo.corre { background: var(--red); color: #fff; border-color: var(--red); }
.mon-card .reloj { font-size: .8rem; min-width: 48px; padding: .05rem .35rem; }

/* --------- Menú de usuario --------- */
.menu-usuario { display: flex !important; align-items: center; gap: .5rem; }
.menu-usuario .avatar { border-color: var(--gold); }
.navbar-chess .dropdown-menu { background: var(--panel); border: 1px solid var(--line); min-width: 210px; box-shadow: 0 10px 28px rgba(60,40,20,.12) !important; }
.navbar-chess .dropdown-item { color: var(--text); padding: .5rem 1rem; }
.navbar-chess .dropdown-item:hover { background: var(--cafe-suave); color: var(--gold); }
.navbar-chess .dropdown-header { color: var(--text); font-weight: 600; white-space: normal; }

/* --------- Conectados --------- */
.punto-conectado { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; border-radius: 50%;
                   background: #22c55e; border: 2px solid var(--panel); }
.punto-conectado.estado-jugando { background: #f59e0b; }
.punto-conectado.estado-ocupado { background: #ef4444; }

/* --------- Mi estado --------- */
.punto-estado { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.punto-nav { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border: 2px solid var(--bg); }
.estado-disponible { background: #22c55e; }
.estado-ocupado { background: #ef4444; }
.estado-oculto { background: #9ca3af; }
.estado-jugando { background: #f59e0b; }
.navbar-chess .dropdown-item.active, .navbar-chess .dropdown-item:active { background: var(--cafe-suave); color: var(--gold); }

/* --------- Aviso "Volver a la partida" --------- */
.aviso-partida { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1040; display: flex; align-items: center;
                 gap: .75rem; flex-wrap: wrap; justify-content: center; max-width: calc(100% - 32px); padding: .55rem .6rem .55rem 1rem;
                 background: var(--panel); border: 1px solid var(--gold); border-radius: 999px; box-shadow: 0 8px 24px rgba(60,40,20,.2); font-size: .92rem; }
.aviso-partida.mi-turno { background: var(--gold); color: #fff; animation: latir 1.6s infinite; }
@keyframes latir { 50% { box-shadow: 0 0 0 6px rgba(123,74,38,.2), 0 8px 24px rgba(60,40,20,.2); } }
body { padding-bottom: 70px; }

/* =====================================================================
   Pantalla de partida: el tablero es la prioridad
   PC: tablero a la izquierda (lo más grande posible) y panel a la derecha
   Celular: jugadores arriba/abajo con alto fijo; avisos flotantes (no empujan nada)
   ===================================================================== */
.modo-juego { padding-bottom: 0; margin: 0; overflow-x: hidden; }
.juego, .juego * { box-sizing: border-box; }
.juego-main { padding: 12px; }
.juego { display: grid; gap: 8px; }
.juego .j-cab { grid-area: cab; min-width: 0; }
.juego .j-estado { grid-area: est; }
.juego .j-arriba { grid-area: arr; }
.juego .j-tablero { grid-area: tab; }
.juego .j-abajo { grid-area: aba; }
.juego .j-aviso { grid-area: avi; }
.juego .j-jugadas { grid-area: jug; min-height: 0; display: flex; flex-direction: column; }
.juego .j-botones { grid-area: bot; display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.juego .movelist { flex: 1 1 auto; min-height: 0; }
.juego .player-bar { height: 48px; padding: .3rem .6rem; }
.juego .player-bar .nombre { min-width: 0; }
.juego .player-bar .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Estado / turno (sólo PC): alto fijo para que nada se mueva */
.j-estado { display: flex; align-items: center; gap: .5rem; min-height: 56px; padding: .5rem .9rem; border-radius: 10px;
            background: var(--panel-2); border: 1px solid var(--line); font-weight: 600; font-size: 1.05rem; }
.j-estado.mi-turno { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; color: var(--gold); background: var(--cafe-suave); }
.j-estado.jaque { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }

@media (min-width: 992px) {
  .juego {
    --tam: min(calc(100vh - 24px), calc(100vw - 24px - 16px - 340px));
    height: calc(100vh - 24px);
    grid-template-columns: var(--tam) minmax(320px, 1fr);
    grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto;
    grid-template-areas: "tab cab" "tab est" "tab arr" "tab aba" "tab avi" "tab jug" "tab bot";
    column-gap: 16px;
  }
  .juego .j-tablero { width: var(--tam); align-self: start; }
  .juego .movelist { max-height: none; }
}

@media (max-width: 991.98px) {
  .juego-main { padding: 6px; }
  .juego { grid-template-columns: 1fr; grid-template-areas: "cab" "arr" "tab" "aba" "bot" "jug"; gap: 6px; }
  .juego .j-estado, .juego .j-aviso { display: none !important; }   /* en celular van como avisos flotantes */
  .juego .j-tablero { width: min(100%, calc(100vh - 190px)); justify-self: center; }
  .juego .movelist { max-height: 32vh; }
  .juego .player-bar { height: 44px; }
  .juego .reloj { font-size: 1.15rem; min-width: 72px; }
}

/* Avisos flotantes del celular: arriba, encima de todo, sin mover el tablero */
.notis { position: fixed; top: 8px; left: 8px; right: 8px; z-index: 1070; display: flex; flex-direction: column;
         align-items: center; gap: 6px; pointer-events: none; }
.noti { box-sizing: border-box; pointer-events: auto; max-width: 420px; width: 100%; padding: .6rem .9rem; border-radius: 12px; font-weight: 600;
        background: var(--panel); color: var(--text); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(60,40,20,.2);
        display: flex; align-items: center; gap: .5rem; animation: notiEntra .2s ease-out; }
.noti.turno { background: var(--gold); color: #fff; border-color: var(--gold); }
.noti.alerta { background: var(--red); color: #fff; border-color: var(--red); }
.noti.sale { animation: notiSale .25s ease-in forwards; }
@keyframes notiEntra { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes notiSale { to { opacity: 0; transform: translateY(-12px); } }

/* --------- Ajustes del tema claro --------- */
.table-chess { --bs-table-hover-bg: rgba(123,74,38,.05); --bs-table-color: var(--text); }
.table-chess thead th { border-bottom-color: var(--line); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--gold); }
.nav-tabs .nav-link { color: var(--muted); }
.alert-info { --bs-alert-bg: #f3ebe1; --bs-alert-border-color: #e2d2bf; --bs-alert-color: #5c3a1e; }
.alert-secondary { --bs-alert-bg: #f1eee9; --bs-alert-border-color: var(--line); --bs-alert-color: var(--text); }
.text-bg-warning { background-color: #e9c46a !important; color: #3a2a10 !important; }
.badge.text-bg-secondary { background-color: #e7ded3 !important; color: #5c4a3b !important; }
.code-claro { background: #faf7f3; border: 1px solid var(--line); color: #3b2f27; }
.spinner-border.text-warning { color: var(--gold) !important; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: #3a2617; }
a:not(.btn):not(.nav-link):not(.dropdown-item):not(.text-reset) h5, .card-title { color: #3a2617; }
.text-bg-primary { background-color: var(--gold) !important; color: #fff !important; }
.text-bg-info { background-color: #e8d8c4 !important; color: #5c3a1e !important; }
.btn-outline-danger { --bs-btn-bg: #fff; }

/* =====================================================================
   Menú lateral izquierdo (fijo en PC, deslizable en celular)
   ===================================================================== */
:root { --ancho-lateral: 248px; }
.lateral { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.lat-cab { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem .9rem; }
.lat-cab .brand { font-size: 1.45rem; }
.lat-cuerpo { flex: 1 1 auto; overflow-y: auto; padding: .25rem .75rem 1rem; }
.lat-sec { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #a99d92; padding: 1rem .75rem .35rem; }
.lat-link { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; margin: 1px 0; border-radius: 9px;
            color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; transition: background .12s, color .12s; }
.lat-link > i:first-child { font-size: 1.1rem; width: 1.2rem; text-align: center; color: var(--muted); transition: color .12s; }
.lat-link:hover { background: var(--cafe-suave); color: var(--gold); }
.lat-link:hover > i:first-child { color: var(--gold); }
.lat-link.active { background: var(--gold); color: #fff; box-shadow: 0 4px 12px rgba(123,74,38,.25); }
.lat-link.active > i:first-child { color: #fff; }
.lat-link .badge { font-size: .7rem; }
.lat-pie { border-top: 1px solid var(--line); padding: .75rem; }
.lat-usuario { display: flex; align-items: center; gap: .65rem; padding: .45rem .55rem; border-radius: 10px; color: var(--text); text-decoration: none; }
.lat-usuario:hover, .lat-usuario.show { background: var(--cafe-suave); color: var(--text); }
.lat-usuario .avatar { border-color: var(--gold); }
.lat-usuario-txt { flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.lat-usuario.dropdown-toggle::after { margin-left: auto; color: var(--muted); }
.lat-pie .dropdown-menu { background: var(--panel); border: 1px solid var(--line); box-shadow: 0 -8px 28px rgba(60,40,20,.12) !important; }
.lat-pie .dropdown-item { color: var(--text); padding: .45rem 1rem; }
.lat-pie .dropdown-item:hover, .lat-pie .dropdown-item.active, .lat-pie .dropdown-item:active { background: var(--cafe-suave); color: var(--gold); }
.lat-pie .dropdown-item.text-danger:hover { color: var(--red) !important; }
.punto-nav { border-color: var(--panel); }

@media (min-width: 992px) {
  .lateral { position: fixed; top: 0; bottom: 0; left: 0; width: var(--ancho-lateral); z-index: 1030; }
  body.con-lateral { padding-left: var(--ancho-lateral); }
  body.con-lateral main.container { max-width: min(1240px, 100%); }  /* el contenedor nunca más ancho que el espacio junto al menú */
  body.con-lateral { overflow-x: hidden; }
  body.con-lateral .aviso-partida { left: calc(50% + var(--ancho-lateral) / 2); }
  body.con-lateral .bot-status { left: calc(var(--ancho-lateral) + 14px); }
}
@media (max-width: 991.98px) {
  .barra-movil { position: sticky; top: 0; z-index: 1030; display: flex; align-items: center; gap: .75rem; padding: .55rem 1rem;
                 background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
  .barra-movil .brand { font-size: 1.25rem; }
  .lateral.offcanvas-lg { --bs-offcanvas-width: 280px; --bs-offcanvas-bg: var(--panel); }
}

/* =====================================================================
   Inicio para visitantes: presentación por módulos
   ===================================================================== */
.lp-hero { padding: 2.5rem 0 1.5rem; }
.lp-etiqueta { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
               background: var(--cafe-suave); color: var(--gold); margin-bottom: 1rem; }
.lp-titulo { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.08; margin-bottom: 1rem; }
.lp-lead { font-size: 1.15rem; color: var(--muted); max-width: 34rem; margin-bottom: 1.6rem; }
.lp-codigo { max-width: 360px; }
.lp-codigo .input-group { margin-top: .3rem; }
.lp-cifras { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 3rem; margin-top: 2.5rem; padding: 1.2rem 1rem;
             background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.lp-cifras div { display: flex; flex-direction: column; align-items: center; }
.lp-cifras b { font-size: 1.8rem; color: var(--gold); line-height: 1.1; }
.lp-cifras span { color: var(--muted); font-size: .9rem; }

.lp-modulo { padding: 3.5rem 0; border-top: 1px solid var(--line); }
.lp-modulo h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: .9rem; }
.lp-num { display: inline-block; font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 1rem; color: var(--gold);
          border-bottom: 2px solid var(--gold); margin-bottom: .8rem; padding-bottom: .1rem; }
.lp-texto { font-size: 1.08rem; color: var(--muted); margin-bottom: 1.2rem; max-width: 32rem; }
.lp-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.lp-lista li { display: flex; gap: .55rem; align-items: baseline; font-weight: 500; }
.lp-lista i { color: var(--gold); }

/* Ilustraciones (dibujadas con HTML/CSS, se adaptan al tema) */
.lp-ilus { position: relative; padding: 1.5rem; border-radius: 22px;
           background: radial-gradient(120% 90% at 100% 0%, #ead9c4 0%, transparent 60%), linear-gradient(135deg, #f7efe5, #efe4d6); }
.lp-tarjeta { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 14px 34px rgba(60,40,20,.13); overflow: hidden; max-width: 440px; margin: 0 auto; }
.lp-tarjeta-cab { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--line); font-weight: 600; }
.lp-tarjeta-cab .punto-estado { margin-right: .35rem; }
.lp-fila { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.lp-fila:last-child { border-bottom: 0; }
.lp-fila .btn { pointer-events: none; }
.lp-barra { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; }
.lp-barra.lp-turno { background: var(--cafe-suave); }
.lp-reloj { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: .95rem; padding: .1rem .5rem; border-radius: 6px;
            background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.lp-reloj.corre { background: var(--gold); color: #fff; border-color: var(--gold); }
.lp-reloj.sm { font-size: .68rem; padding: 0 .3rem; }

.lp-tablero { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); aspect-ratio: 1; width: 100%; user-select: none; }
.lp-tablero i { min-width: 0; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; font-style: normal; container-type: inline-size; }
.lp-tablero i.c { background: var(--sq-light); }
.lp-tablero i.o { background: var(--sq-dark); }
.lp-tablero i.m { box-shadow: inset 0 0 0 100px rgba(235, 200, 80, .5); }
.lp-p { font-size: 78cqi; line-height: 1; font-family: 'Segoe UI Symbol', 'DejaVu Sans', 'Noto Sans Symbols 2', serif; }
.lp-p.w { color: #fff; text-shadow: 0 0 1px #2d2520, 0 0 1px #2d2520, 0 1px 1px #2d2520, 1px 0 1px #2d2520, -1px 0 1px #2d2520; }
.lp-p.b { color: #2d2520; text-shadow: 0 1px 0 rgba(255,255,255,.25); }

.lp-escena { position: relative; max-width: 480px; margin: 0 auto; padding: 1.5rem 0; }
.lp-tab-hero { border-radius: 14px; overflow: hidden; box-shadow: 0 24px 50px rgba(60,40,20,.28); border: 6px solid #fff; }
.lp-flota { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .9rem; border-radius: 12px;
            background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 26px rgba(60,40,20,.18); font-size: .92rem; white-space: nowrap; }
.lp-f1 { left: -14px; bottom: 10%; }
.lp-f2 { right: -14px; top: 8%; }
.lp-f3 { right: 4px; bottom: -12px; }
.lp-pc { max-width: 380px; }
.lp-niveles { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: 1rem; }
.lp-niveles span { padding: .3rem .7rem; border-radius: 999px; font-size: .8rem; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.lp-niveles span b { color: var(--text); margin-left: .2rem; }
.lp-niveles span.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.lp-niveles span.on b { color: #fff; }

.lp-qr { display: grid; grid-template-columns: repeat(21, 1fr); width: 112px; height: 112px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; flex-shrink: 0; }
.lp-qr i { background: #2d2520; }
.lp-qr b { background: transparent; }
.lp-cod { font-family: ui-monospace, monospace; font-size: 1.5rem; font-weight: 700; letter-spacing: .2em; color: var(--gold); }
.lp-tabla td { padding: .4rem .3rem; }

.lp-pantalla { background: #2d2520; border-radius: 14px; padding: .7rem; box-shadow: 0 18px 40px rgba(60,40,20,.3); max-width: 480px; margin: 0 auto; }
.lp-pantalla-cab { display: flex; justify-content: space-between; color: #e9dccb; font-size: .78rem; font-weight: 600; letter-spacing: .04em; padding: .1rem .2rem .55rem; }
.lp-mesas { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.lp-mesa { background: #fff; border-radius: 8px; padding: .35rem; }
.lp-mesa .lp-tablero { border-radius: 3px; overflow: hidden; }
.lp-mesa-n { display: flex; justify-content: space-between; align-items: center; font-size: .72rem; font-weight: 600; padding: .15rem .1rem; }

.lp-elo { font-size: 2.2rem; font-weight: 700; color: var(--gold); line-height: 1.1; }
.lp-graf { width: 100%; height: 130px; display: block; margin: .5rem 0 .8rem; }
.lp-seguro { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; color: var(--green);
             background: #e8f3ea; padding: .3rem .7rem; border-radius: 999px; }

.lp-final { text-align: center; padding: 3.5rem 1.5rem; margin-top: 1rem; border-radius: 22px;
            background: radial-gradient(90% 120% at 50% 0%, #ead9c4 0%, transparent 70%), var(--panel); border: 1px solid var(--line); }
.lp-final h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }

@media (max-width: 991.98px) {
  .lp-hero { padding-top: 1.2rem; }
  .lp-modulo { padding: 2.5rem 0; }
  .lp-ilus { padding: 1rem; }
  .lp-f1 { left: 4px; } .lp-f2 { right: 4px; }
}
@media (max-width: 575.98px) {
  .lp-flota { font-size: .8rem; padding: .4rem .65rem; }
  .lp-qr { width: 92px; height: 92px; }
  .lp-cod { font-size: 1.2rem; }
}

/* --------- Páginas legales --------- */
.legal { max-width: 820px; padding-bottom: 2rem; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: .3rem; }
.legal h2 { font-size: 1.3rem; margin: 2rem 0 .7rem; scroll-margin-top: 80px; }
.legal p, .legal li { line-height: 1.7; }
.legal-indice ol { columns: 2; column-gap: 2rem; padding-left: 1.2rem; }
.legal-indice a, .legal a { color: var(--gold); }
.legal-resumen { background: var(--cafe-suave); border-color: #e2cfb8; }
.legal-falta { background: #fff1b8; color: #6b4e00; padding: 0 .25rem; border-radius: 4px; }
.aviso-simple { font-size: .78rem; color: var(--muted); line-height: 1.5; }
.pie a { color: var(--muted); }
.pie a:hover { color: var(--gold); }
@media (max-width: 575.98px) { .legal-indice ol { columns: 1; } }
