*{box-sizing:border-box}body{margin:0;background:#020817;color:#d9d6ba;font:13px Tahoma,Verdana,Arial,sans-serif}.shell{max-width:1020px;margin:0 auto;background:linear-gradient(95deg,#070c29,#0b174d 15%,#101c5b 83%,#080b2b);min-height:100vh;border-left:3px solid #375b85;border-right:3px solid #375b85;box-shadow:0 0 35px #000}.topline{height:28px;background:#080b11;border-bottom:3px solid #476c90;color:#9dabb9;padding:4px 12px;font-size:12px}.topline span{margin-left:40px}.mast{text-align:right;height:43px;padding:3px 25px;background:linear-gradient(#3879a9,#163b6b);border-radius:30px 0 0 0;margin-left:75%;font:bold 25px Arial;color:#fff;text-shadow:2px 2px 3px #101c37}.stage{padding:13px 20px 10px}.heading{display:grid;grid-template-columns:285px 1fr;gap:15px;align-items:center}.logo{font:bold italic 100px Georgia,serif;letter-spacing:-10px;color:#9b0816;-webkit-text-stroke:2px #e95141;text-shadow:0 0 5px #ff402b,0 0 14px #d71714,4px 5px 1px #200108;transform:scaleX(.94);transform-origin:left}.chatwrap{min-width:0}.chatlog{height:116px;background:#050507;border:6px ridge #344869;border-radius:24px 18px 14px 12px;padding:15px 14px;overflow:auto;color:#a5a6a4;font-size:15px;box-shadow:inset 0 0 15px #000}.chatlog b{color:#b69b54}.chatlog div{margin:3px 0}.chatrow{display:flex;gap:5px;align-items:center;margin-top:8px}.chatrow input{flex:1;min-width:0;background:#090b16;border:1px solid #51658d;border-bottom:3px solid #bc352e;border-radius:8px;padding:8px;color:white}.chatrow button,.exitrow button{background:#0d0f1b;border:1px solid #627187;color:#bcb16e;border-radius:20px;padding:6px 12px;font:bold 12px Tahoma;cursor:pointer}.private{color:#c1ae67;border:3px ridge #52596c;border-radius:20px;padding:5px;font-weight:bold}.exitrow{height:54px;display:flex;align-items:center;justify-content:space-between}.exitrow button{border:none;color:#d0bf5a}.exitrow #status{color:#e8c96a}.play{display:grid;grid-template-columns:52px minmax(0,1fr) 30px;gap:4px;align-items:stretch}.vertical{background:#050a25;display:flex;flex-direction:column;align-items:center;justify-content:space-between;color:#b3b7bb;writing-mode:vertical-rl;font-size:15px;font-weight:bold;text-shadow:1px 1px 2px #000;padding:6px 0}.vertical b{color:#d4b860}.vertical.right{font-size:19px;color:#15265e;text-shadow:1px 1px 1px #264d8a;letter-spacing:3px;justify-content:center}.orb{display:block;width:26px;height:26px;border-radius:50%;background:radial-gradient(circle at 30% 25%,#f4b4ff,#6e0b87 58%,#150425 85%);box-shadow:0 0 6px #ab51ef}.orb.red{background:radial-gradient(circle at 30% 25%,#ffbbcc,#c01b36 60%,#20030b)}.board{min-width:0;border:1px solid #030616;box-shadow:0 0 8px #02040d}canvas{display:block;width:100%;height:auto;touch-action:none;cursor:crosshair}.bottom{display:flex;justify-content:space-between;align-items:center;background:#0c0b14;margin:8px 32px 0 56px;padding:6px 10px;min-height:38px;border-top:2px solid #3c2a2b}.rack{display:flex;gap:3px;flex-wrap:wrap}.mini{width:19px;height:19px;border-radius:50%;border:1px solid #aaa;box-shadow:inset -3px -3px 4px #222,0 0 3px #999}.turn{color:#b69d58;font-size:12px}.instructions{margin:12px 34px 0 55px;color:#b3b4c9;font-size:12px;line-height:1.5}footer{padding:20px;text-align:center;font-size:11px;color:#8293ae}a{color:#bdc9f1}@media(max-width:650px){.stage{padding:8px}.heading{grid-template-columns:1fr;gap:2px}.logo{font-size:65px}.chatlog{height:78px}.play{grid-template-columns:28px minmax(0,1fr) 17px}.vertical{font-size:10px}.vertical.right{font-size:10px;letter-spacing:1px}.orb{width:16px;height:16px}.instructions{margin:8px}.bottom{margin:6px 0}.private{display:none}.mast{font-size:17px;height:30px}}
/* V13: letrero vertical, centrado junto a la mesa */
.vertical.right{display:flex;align-items:center;justify-content:center;padding:0;background:#050a25;overflow:visible}
.brand-vertical{writing-mode:vertical-rl;text-orientation:mixed;font-family:Georgia,"Times New Roman",serif;font-size:clamp(10px,1.1vw,17px);font-style:italic;font-weight:600;letter-spacing:1.3px;color:#2368bc;text-shadow:0 0 2px #71b5ff,0 0 7px #0b3e87,1px 1px 1px #020717;white-space:nowrap}
.logo{transition:filter 60ms ease,opacity 60ms ease;filter:brightness(1.18);text-shadow:0 0 3px #ffb3a5,0 0 9px #ff3927,0 0 22px #e71815,0 0 38px #c00b0b,3px 4px 2px #270307}
.logo.neon-flicker{filter:brightness(.38);opacity:.76;text-shadow:0 0 2px #ff3d32,0 0 5px #a80a0a,3px 4px 2px #270307}
@media(max-width:650px){.brand-vertical{font-size:9px;letter-spacing:.4px}}

/* V22: lectura de abajo hacia arriba, como POOLNOSTALGIA, con grupo permanente */
.play{grid-template-columns:52px minmax(0,1fr) 30px}
.players-side{position:relative;background:#050a25;overflow:hidden;min-height:0}
.players-rotated{position:absolute;left:50%;top:50%;display:flex;align-items:center;justify-content:center;gap:11px;white-space:nowrap;transform:translate(-50%,-50%) rotate(-90deg);transform-origin:center;color:#77b9ff;font:italic 600 13px Georgia,"Times New Roman",serif;letter-spacing:.5px;text-shadow:0 0 3px #71b5ff,0 0 7px #0b3e87}
.players-rotated .versus{font-size:14px;font-style:italic;color:#dfb75c;text-shadow:0 0 5px #8d641e}
.group-ball{width:17px;height:17px;flex:none;display:none;border-radius:50%;border:1px solid #eee;box-shadow:inset -3px -3px 4px #252525,0 0 3px #b0b0b0;position:relative}
.group-ball.solid{display:block;background:radial-gradient(circle at 30% 25%,#fff9c0,#e6c51b 36%,#a98704 80%)}
.group-ball.striped{display:block;background:linear-gradient(0deg,#f7f7f7 0 28%,#c32632 29% 70%,#f7f7f7 71% 100%)}
@media(max-width:650px){.play{grid-template-columns:29px minmax(0,1fr) 17px}.players-rotated{font-size:9px;gap:5px}.players-rotated .versus{font-size:10px}.group-ball{width:11px;height:11px}}

/* V22.7: página a todo lo ancho; mesa de 900x455 intacta, con 480px libres a cada lado para el taco. */
html,body{width:100%;min-width:0}
.shell{max-width:none;width:100%;border-left:0;border-right:0}
.stage{padding:13px 0 10px}
.heading,.exitrow,.instructions{max-width:1280px;margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px}
.play{width:100%;display:flex;justify-content:center;align-items:stretch;gap:4px;overflow-x:auto;padding:0 8px}
.play .board{width:1860px;min-width:1860px;flex:none;border:0;box-shadow:none}
.play .board canvas{width:1860px;max-width:none;height:1415px}
.play .players-side{width:52px;min-width:52px}
.play .vertical.right{width:30px;min-width:30px}
.bottom{max-width:1280px;margin:8px auto 0;padding:6px 16px}
@media(max-width:650px){.play .players-side{width:29px;min-width:29px}.play .vertical.right{width:17px;min-width:17px}}

/* V22.8: mesa física de 900x455 sin escala; lienzo amplio y centrado dentro de la pantalla completa.
   Los márgenes del lienzo son visibles hasta el espacio real disponible del monitor. */
.shell{width:100%;max-width:none;margin:0}
.stage{width:100%;padding-left:0;padding-right:0}
.play{width:100%;display:grid;grid-template-columns:52px minmax(0,1fr) 30px;gap:4px;overflow:visible;padding:0 12px}
.play .board{width:100%;min-width:0;overflow:hidden;position:relative;height:1415px;box-shadow:none}
.play .board canvas{position:absolute;left:50%;top:0;transform:translateX(-50%);width:1860px!important;height:1415px!important;max-width:none}
.play .players-side{width:auto;min-width:0}
.play .vertical.right{width:auto;min-width:0}
.group-ball{display:none;width:21px;height:21px;flex:none;border:0;background:none!important;box-shadow:none!important;border-radius:0}
@media(max-width:650px){.play{grid-template-columns:29px minmax(0,1fr) 17px;padding:0 3px}.group-ball{width:16px;height:16px}}

/* V22.9: márgenes laterales a la mitad (240px) y verticales reducidos 75% (120px). */
.play .board{height:695px}
.play .board canvas{width:1380px!important;height:695px!important}

/* V22.10: margen superior/inferior 72 px (-40%); laterales 120 px (-50%).
   Mesa original de 900 x 455 px; los rótulos laterales siguen junto a la mesa. */
.play .board{height:599px;background:#0b174d}
.play .board canvas{width:1140px!important;height:599px!important}
.play .players-side,.play .vertical.right{background:#0b174d}
.players-rotated{gap:5px}

/* V22.11: nombres en las franjas laterales junto al taco, sin alterar mesa ni márgenes. */
.play .players-side{background:#0b174d}
.play .vertical.right{background:#0b174d}
.players-rotated{left:calc(50% + 9px)}
.brand-vertical{position:relative;left:-4px}

/* V22.13: franjas de jugadores junto al límite de taco, no al extremo del viewport. */
.play{position:relative;gap:0;padding:0;grid-template-columns:minmax(0,1fr)}
.play .board{grid-column:1;grid-row:1;z-index:1}
.play .players-side,.play .vertical.right{position:absolute;z-index:3;top:0;height:599px;width:44px;min-width:0;pointer-events:none;background:transparent}
.play .players-side{left:max(0px,calc(50% - 570px));}
.play .vertical.right{right:max(0px,calc(50% - 570px));width:30px}
.players-rotated{left:50%}
.brand-vertical{left:0}
@media(max-width:650px){.play .players-side{width:28px}.play .vertical.right{width:18px}}

/* V22.20: anuncios de final de partida. Solo sobre la mesa, no en los márgenes del taco. */
.play .board .end-screen{position:absolute;left:50%;top:72px;transform:translateX(-50%);width:900px;height:455px;z-index:5;overflow:hidden;background:#07110d;pointer-events:none}
.play .board .end-screen[hidden]{display:none!important}
.end-screen img{display:block;width:100%;height:100%;object-fit:cover;object-position:center center}
.end-screen .end-caption{position:absolute;bottom:8px;left:0;right:0;text-align:center;color:#fff7db;font:bold 13px Arial,sans-serif;text-shadow:0 2px 4px #000;background:linear-gradient(transparent,rgba(0,0,0,.65));padding:13px 8px 4px}
.pov-label{font:600 12px Arial,sans-serif;color:#dfc57b;white-space:nowrap;margin-right:10px}
.pov-label select{background:#111b3c;color:#fff;border:1px solid #50669a;border-radius:4px;padding:5px}

/* V22.24: pantalla de carga no bloqueante, con bola 8 animada */
.pool-loader{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;background:#0b174d;color:#fff;font-family:Arial,sans-serif;transition:opacity .4s ease,visibility .4s ease}
.pool-loader.loaded{opacity:0;visibility:hidden;pointer-events:none}
.loader-content{text-align:center;width:min(350px,82vw)}
.loader-eight{width:104px;height:104px;margin:0 auto 20px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 29% 23%,#65676d 0%,#292a2d 24%,#09090b 68%,#000 100%);box-shadow:inset -12px -12px 20px #0009,0 14px 35px #0009;animation:pool-roll 1.8s ease-in-out infinite}
.loader-eight span{display:grid;place-items:center;width:47px;height:47px;border-radius:50%;background:#f8f7ee;color:#151515;font:bold 32px Arial,sans-serif;box-shadow:0 2px 5px #0008}
.loader-title{font:bold 24px Georgia,serif;letter-spacing:2px;color:#e7d19c}.loader-caption{margin:15px 0 12px;font-size:14px;color:#d4def7}.loader-track{height:12px;background:#07102e;border:1px solid #6a7b9f;border-radius:20px;overflow:hidden}.loader-fill{height:100%;width:0;background:linear-gradient(90deg,#e1ba53,#fff2ad);border-radius:20px;transition:width .25s ease}.loader-percent{font:13px Arial,sans-serif;color:#c6d4f4;margin-top:9px}@keyframes pool-roll{0%,100%{transform:rotate(-14deg) translateY(0)}50%{transform:rotate(24deg) translateY(-6px)}}

/* V22.28: la partida real queda visible bajo el anuncio transparente */
.play .board .end-screen{background:rgba(0,0,0,.54);display:flex;align-items:center;justify-content:center}
.end-screen img{display:block;width:78%;height:78%;object-fit:contain;object-position:center;filter:drop-shadow(0 6px 14px rgba(0,0,0,.55))}
.end-screen .end-caption{bottom:2px;background:none;text-shadow:0 2px 5px #000,0 0 4px #000}


/* V22.40 — Layout basado en la captura corregida, sin nuevos paneles.
   La mesa se desplaza a la derecha sin cambiar las coordenadas físicas del canvas. */
:root{
 --pool-stage:#0b174d;
 --pool-table-offset:95px;
 --pool-active-color:#ffc34b;
 --pool-active-glow:rgba(255,178,45,.8);
 --pool-inactive-color:#79b9f9;
 --pool-name-scale:1.16;
}
.play{background:var(--pool-stage);overflow:hidden}
.play .board{background:var(--pool-stage);overflow:visible}
.play .board canvas#pool{left:calc(50% + var(--pool-table-offset))!important}
.play .players-side{
 left:max(4px,calc(50% + var(--pool-table-offset) - 570px - 14px));
 width:44px;z-index:4;
}
.play .vertical.right{display:none!important}
.players-rotated{overflow:visible}
.players-rotated #name0,.players-rotated #name1{
 display:inline-block;color:var(--pool-inactive-color);
 transform:scale(1);transition:color .25s,transform .3s,text-shadow .25s;
 transform-origin:center;
}
.players-rotated .player-active{
 color:var(--pool-active-color)!important;
 transform:scale(var(--pool-name-scale))!important;
 animation:pool-name-pulse 1.65s ease-in-out infinite;
}
@keyframes pool-name-pulse{
 0%,100%{text-shadow:0 0 3px #fff0b1,0 0 7px var(--pool-active-glow);filter:brightness(1)}
 50%{text-shadow:0 0 7px #fff3bc,0 0 16px var(--pool-active-glow),0 0 24px var(--pool-active-glow);filter:brightness(1.22)}
}
@media(prefers-reduced-motion:reduce){.players-rotated .player-active{animation:none}}
.play .board .end-screen{left:calc(50% + var(--pool-table-offset))}
.bottom{
 width:min(1140px,calc(100% - 24px));max-width:1140px;
 margin:8px auto 0;min-height:42px;
 background:#090a15;border-radius:3px;
 position:relative;z-index:1;
}
.bottom .rack{flex:1;min-width:0;max-width:75%}
.bottom .turn{max-width:48%;text-align:right}
.instructions{max-width:1140px;margin:10px auto 0}
@media(max-width:1200px){
 :root{--pool-table-offset:clamp(0px,7vw,95px)}
}
@media(max-width:700px){
 :root{--pool-table-offset:0px;--pool-name-scale:1.08}
 .play .players-side{left:0;width:29px}
 .bottom .rack{max-width:54%}
 .bottom .turn{max-width:46%;font-size:10px}
}

/* V22.41: sidebar horizontal como la captura proporcionada */
:root{--pool-table-offset:95px}
.play{position:relative;display:block;min-height:599px;overflow:visible}
.play .board{width:100%;height:599px;overflow:visible}
.play .board canvas#pool{left:calc(50% + var(--pool-table-offset))!important;pointer-events:auto}
.players-sidebar{position:absolute;left:max(8px,calc(50% + var(--pool-table-offset) - 570px - 290px));top:72px;width:264px;z-index:4;display:flex;flex-direction:column;gap:20px;pointer-events:none}
.player-card{height:98px;border:2px solid #06102b;border-radius:15px;display:flex;align-items:center;gap:12px;padding:10px;background:rgba(8,22,66,.65);min-width:0;pointer-events:none}
.player-card.is-active{border-color:#ffe600;box-shadow:0 0 5px rgba(255,231,0,.4)}
.avatar{width:74px;height:74px;border-radius:50%;background:#fff;color:#111;display:flex;align-items:center;justify-content:center;flex:none;font:14px Arial}
.player-details{min-width:0;align-self:stretch;display:flex;flex-direction:column;justify-content:center;gap:12px}
.player-name{font:italic bold 15px Georgia,serif;letter-spacing:.6px;color:#8fcaff;text-shadow:0 0 6px #54aaff;white-space:nowrap;transition:transform .2s,color .2s;transform-origin:left center}
.player-card.is-active .player-name{color:var(--pool-active-color);transform:scale(var(--pool-name-scale));animation:pool-name-pulse 1.65s ease-in-out infinite}
.pocketed{display:flex;flex-wrap:wrap;gap:3px;min-height:18px}
.pocketed-ball{width:18px;height:18px;border-radius:50%;font:bold 9px Arial;color:white;text-align:center;line-height:18px;border:1px solid rgba(255,255,255,.65);text-shadow:0 1px 2px #000;background:#777}
.pocketed-ball.stripe{box-shadow:inset 0 5px 0 2px #fff9,inset 0 -5px 0 2px #fff9}
.player-chat{height:294px;background:#060916;border-radius:23px;display:flex;flex-direction:column;padding:12px 10px;pointer-events:auto;min-height:0}
.player-chat-title{font:40px Arial,sans-serif;color:white;text-align:center}
.player-chat-log{flex:1;overflow:auto;color:#d7ddec;font-size:12px;overflow-wrap:anywhere}
.player-chat-log .private-msg{color:#f5d66e}
.player-chat-controls{display:flex;flex-direction:column;gap:6px}
.player-chat-controls input{width:100%;padding:7px;background:#0c1530;border:1px solid #53678f;color:white;border-radius:6px}
.player-chat-actions{display:flex;gap:6px}
.player-chat-actions button{flex:1;font-size:11px;background:#142247;color:#fff;border:1px solid #697a9d;border-radius:6px;padding:6px;cursor:pointer}
.player-chat-actions button[aria-pressed=true]{border-color:#ffd34d;color:#ffd34d}
.bottom{position:relative;left:var(--pool-table-offset);width:min(1095px,calc(100% - 315px));margin:8px auto 0}
.instructions{max-width:1095px}
@media(max-width:1120px){.players-sidebar{left:6px;width:22vw;min-width:170px}.play .board canvas#pool{left:calc(50% + 95px)!important}.player-card{padding:5px;gap:6px}.avatar{width:50px;height:50px;font-size:10px}.player-name{font-size:12px}}
@media(max-width:720px){.play{min-height:720px}.players-sidebar{top:610px;left:8px;width:calc(100% - 16px);display:grid;grid-template-columns:1fr 1fr;gap:8px}.player-chat{grid-column:1/-1;height:240px}.player-card{height:78px}.play .board canvas#pool{left:50%!important}.bottom{left:0;width:calc(100% - 16px);margin-top:260px}.instructions{margin:10px 8px}}

/* Los indicadores de bolas ahora se muestran debajo de los nombres. */
.bottom .rack{display:none!important}
.bottom{justify-content:flex-end}
.bottom .turn{max-width:100%}

/* V22.42 — Taco sobre tarjetas sin bloquear sus controles.
   La capa transparente muestra únicamente el taco; el canvas de mesa recibe el puntero. */
.play .board canvas#cue-overlay{
 position:absolute;left:calc(50% + var(--pool-table-offset))!important;
 top:0;transform:translateX(-50%);
 width:1140px!important;height:599px!important;max-width:none;
 z-index:7;pointer-events:none;background:transparent!important;
}
.play .board canvas#pool{z-index:1}
.play .players-sidebar{z-index:4;left:max(18px,calc(50% + var(--pool-table-offset) - 570px - 280px));}
.avatar-frame{position:relative;overflow:hidden;cursor:pointer;pointer-events:auto;border:3px solid #6b9ecb;box-shadow:0 0 6px #386ab5;transition:border-color .2s,box-shadow .2s}
.avatar-frame img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.avatar-upload{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%;font-size:0}
.avatar-frame.frame-neon{border-color:#25d9ff;box-shadow:0 0 12px #25d9ff}
.avatar-frame.frame-gold{border-color:#ffcb31;box-shadow:0 0 12px #ffc531}
.frame-picker{max-width:135px;font-size:9px;border:0;background:#0d1d49;color:#a5bbd7;border-radius:4px;pointer-events:auto}
.player-details{gap:4px}
.pocketed-canvas{width:192px;height:29px;max-width:100%;display:block}
.bottom #rack{display:none!important}
.bottom{justify-content:flex-end!important}
@media(max-width:1120px){.play .players-sidebar{left:18px}.play .board canvas#cue-overlay{left:calc(50% + 95px)!important}}
@media(max-width:720px){.play .board canvas#cue-overlay{left:50%!important}}

/* V22.43 — ZONA IZQUIERDA pegada a la mesa, con margen exterior.
   340 px de extensión transparente para el taco sobre tarjetas y chat. */
:root{--pool-table-offset:95px;--pool-left-extra:340px}
.play .players-sidebar{
 left:max(20px,calc(50% + var(--pool-table-offset) - 450px - 330px))!important;
 width:318px!important;top:72px;gap:20px;
}
.play .board canvas#cue-overlay{
 left:calc(50% + var(--pool-table-offset) - 570px - var(--pool-left-extra))!important;
 transform:none!important;width:1480px!important;height:599px!important;
 z-index:10!important;pointer-events:none!important;
}
.play .board canvas#pool{z-index:1}
.play .players-sidebar{z-index:4}
.play .player-card{pointer-events:none!important}
.play .avatar-frame{pointer-events:none!important;cursor:default}
.play .player-chat{pointer-events:auto}
.exitrow #status{display:none!important}
.profile-link{color:#d9c166;text-decoration:none;font-weight:bold;font-size:12px}
.profile-link:hover{text-decoration:underline}
.player-details{gap:10px}
@media(max-width:1200px){
 .play .players-sidebar{left:20px!important;width:260px!important}
 .play .board canvas#cue-overlay{left:calc(50% + 95px - 910px)!important}
}
@media(max-width:720px){
 .play .players-sidebar{top:610px;left:8px!important;width:calc(100% - 16px)!important}
 .play .board canvas#cue-overlay{left:calc(50% - 910px)!important}
}

.player-card.card-skin-neon{background:linear-gradient(120deg,#061335,#11306c);box-shadow:inset 0 0 13px rgba(38,190,255,.25)}
.player-card.card-skin-gold{background:linear-gradient(120deg,#211b19,#4b3212);box-shadow:inset 0 0 13px rgba(255,200,50,.18)}
.player-card.is-active{border-color:#ffe600!important}

/* V22.44 — mesa y zona izquierda, dimensiones en coordenadas físicas */
:root{--pool-table-offset:95px;--pool-left-extra:340px}
.play{position:relative!important;height:599px!important;min-height:599px!important;overflow:visible!important}
.play .board{position:relative;z-index:1;overflow:visible!important}
.play .players-sidebar{
 position:absolute!important;
 left:calc(50% + var(--pool-table-offset) - 570px - 420px)!important;
 top:72px!important;width:398px!important;
 height:455px!important;display:flex!important;flex-direction:column!important;
 gap:12px!important;z-index:3!important;
}
.play .player-card{
 flex:0 0 132px!important;height:132px!important;
 padding:14px!important;gap:15px!important;
 border-radius:16px;
}
.play .player-card .avatar{width:92px;height:92px}
.play .player-chat{
 flex:1 1 auto!important;height:auto!important;min-height:0!important;
 padding:12px!important;border-radius:20px!important;
}
.play .player-chat-title{display:none!important}
.play .player-chat-log{min-height:0}
.play > canvas#cue-overlay{
 position:absolute!important;
 top:0!important;
 left:calc(50% + var(--pool-table-offset) - 570px - 340px)!important;
 transform:none!important;
 width:1480px!important;height:599px!important;
 z-index:30!important;pointer-events:none!important;
 background:transparent!important;
}
.bottom{
 box-sizing:border-box!important;
 position:relative!important;
 left:var(--pool-table-offset)!important;
 width:900px!important;max-width:900px!important;
 margin:8px auto 0!important;
 min-height:44px!important;
 justify-content:flex-end!important;
}
@media(max-width:1400px){
 .play .players-sidebar{
  left:max(12px,calc(50% + var(--pool-table-offset) - 570px - 420px))!important;
  width:clamp(230px,calc(50% + var(--pool-table-offset) - 570px - 38px),398px)!important;
 }
 .play .player-card{gap:9px!important;padding:9px!important}
 .play .player-card .avatar{width:75px;height:75px}
}
@media(max-width:900px){
 :root{--pool-table-offset:0px}
 .play{height:980px!important;min-height:980px!important}
 .play .players-sidebar{
  top:605px!important;left:12px!important;width:calc(100% - 24px)!important;
  height:355px!important;display:grid!important;grid-template-columns:1fr 1fr!important;
  grid-template-rows:100px 245px!important;gap:10px!important;
 }
 .play .player-card{height:100px!important;min-width:0}
 .play .player-chat{grid-column:1/-1;height:245px!important}
 .play > canvas#cue-overlay{left:calc(50% - 910px)!important}
 .bottom{left:0!important;width:min(900px,calc(100% - 24px))!important}
}

/* V22.45: misma línea superior que la mesa, 50px entre zona izquierda y mesa.
   Mesa: 900x455, dentro de lienzo 1140x599, offset interior 120x72.
   Barra: a 50px de la parte inferior de la mesa; sidebar termina en la barra. */
:root{--pool-table-offset:95px;--pool-panel-width:330px;--pool-panel-gap:50px}
.play{height:599px!important;min-height:599px!important;overflow:visible!important}
.play .players-sidebar{
 left:calc(50% + var(--pool-table-offset) - 450px - var(--pool-panel-gap) - var(--pool-panel-width))!important;
 top:72px!important;width:var(--pool-panel-width)!important;height:555px!important;
 display:flex!important;flex-direction:column!important;gap:14px!important;z-index:4!important;
}
.play .player-card{height:136px!important;flex:0 0 136px!important;padding:13px!important}
.play .player-card .avatar{width:92px!important;height:92px!important}
.play .player-chat{height:auto!important;flex:1 1 auto!important;min-height:0!important;padding:12px!important}
.play .player-chat-title{display:none!important}
.play .player-chat-log{min-height:0!important}
.play > canvas#cue-overlay{z-index:40!important;pointer-events:none!important}
.bottom{
 left:var(--pool-table-offset)!important;width:900px!important;max-width:900px!important;
 min-height:50px!important;margin:-22px auto 0!important;z-index:2!important;
}
/* Los controles y las tarjetas quedan por debajo de la capa visual del taco. */
.play .board{z-index:1!important}
/* Marca intercambiable: original roja y nueva doble línea. */
.logo-theme{display:flex!important;flex-direction:column;justify-content:center;align-items:flex-start;
 font-style:italic!important;letter-spacing:-2px!important;transform:none!important;line-height:.8;
 width:270px;min-height:130px;animation:logo-led 6.4s infinite}
.logo-theme .logo-pool{font:bold italic 72px Georgia,serif;color:#50dfff;-webkit-text-stroke:1px #d7ffff;
 text-shadow:0 0 5px #3bfaff,0 0 16px #006cff,0 0 28px #2338d9}
.logo-theme .logo-nostalgia{font:bold italic 33px Georgia,serif;color:#ff743f;-webkit-text-stroke:.6px #ffdf9d;
 text-shadow:0 0 5px #ffb638,0 0 14px #ff2d0b,0 0 25px #ff1616;transform:skewX(-9deg);margin-left:8px}
.logo-theme.logo-red .logo-pool{font-size:90px;color:#e32b22;-webkit-text-stroke:2px #ff5b48;
 text-shadow:0 0 5px #ffb3a5,0 0 12px #ff3927,0 0 28px #e71815,0 0 38px #c00b0b}
.logo-theme.logo-red .logo-nostalgia{display:none}
@keyframes logo-led{0%,90%,94%,97%,100%{filter:brightness(1.1);opacity:1}91%,96%{filter:brightness(.45);opacity:.8}92%,98%{filter:brightness(1.3);opacity:1}}
@media(max-width:1500px){
 :root{--pool-table-offset:clamp(0px,calc((100vw - 1450px)*.2 + 95px),95px)}
 .play .players-sidebar{left:max(12px,calc(50% + var(--pool-table-offset) - 450px - 50px - 330px))!important}
}
@media(max-width:1150px){
 .play .players-sidebar{width:260px!important;left:12px!important}
 .play .player-card .avatar{width:70px!important;height:70px!important}
}
@media(max-width:900px){
 .play{height:980px!important;min-height:980px!important}
 .play .players-sidebar{top:605px!important;left:12px!important;width:calc(100% - 24px)!important;
 height:355px!important;display:grid!important;grid-template-columns:1fr 1fr!important;
 grid-template-rows:100px 245px!important;gap:10px!important}
 .play .player-card{height:100px!important;min-height:0!important;flex:auto!important}
 .play .player-chat{height:245px!important;grid-column:1/-1}
 .bottom{left:0!important;margin:8px auto 0!important;width:min(900px,calc(100% - 24px))!important}
}

/* V22.49 — desplazar TODA la zona izquierda, incluido el chat, sin
   alterar el espacio de 50px que la separa de la mesa. */
:root{--pool-panel-width:306px!important}
.play .players-sidebar{
 left:calc(50% + var(--pool-table-offset) - 450px - var(--pool-panel-gap) - var(--pool-panel-width))!important;
 width:var(--pool-panel-width)!important;
}
.play .player-card{gap:9px!important;padding:10px!important}
.play .player-chat{background:#fff!important;color:#172345!important}
.play .player-chat-log{color:#172345!important}
.play .player-chat-log .private-msg{color:#825400!important}
.play .player-chat-controls input{background:#f5f6f8!important;color:#172345!important;border-color:#c9ced8!important}
.play .player-chat-controls input::placeholder{color:#697080!important}
@media(max-width:1500px){
 .play .players-sidebar{left:max(12px,calc(50% + var(--pool-table-offset) - 450px - var(--pool-panel-gap) - var(--pool-panel-width)))!important}
}
@media(max-width:1150px){
 .play .players-sidebar{width:260px!important;left:12px!important}
}
@media(max-width:900px){
 .play .players-sidebar{left:12px!important;width:calc(100% - 24px)!important}
}


/* V22.54 — bodycam 2.5D independiente, reemplaza visualmente el chat SOLO en POV activo */
.play .player-chat{position:relative!important;overflow:hidden!important}
.bodycam-view{position:absolute;inset:0;z-index:5;background:#071521;color:#d5fff9;
 display:flex;flex-direction:column;gap:5px;padding:9px;box-sizing:border-box;border-radius:inherit}
.bodycam-view[hidden]{display:none!important}
.bodycam-top{display:flex;justify-content:space-between;gap:4px;font:700 10px system-ui;letter-spacing:.06em;color:#a9f6e5}
.bodycam-top span:last-child{font-weight:500;color:#ffdf8c}
#bodycam-canvas{display:block;width:100%;height:0;flex:1;min-height:90px;object-fit:contain;border-radius:8px;background:#102d28}
.bodycam-foot{font:10px/1.35 system-ui;color:#a9c5c0;text-align:center}

/* V22.55 Bodycam V2: mayor espacio de visor */
.bodycam-view{padding:7px!important;gap:3px!important}.bodycam-foot{font-size:9px!important}

/* V22.56: Bodycam a tamaño COMPLETO de la columna izquierda */
.play .players-sidebar{position:absolute!important;isolation:isolate!important;overflow:visible!important}
.play .players-sidebar > .bodycam-view{position:absolute!important;inset:0!important;z-index:80!important;display:flex!important;box-sizing:border-box!important;border:2px solid #6bd5c5!important;border-radius:18px!important;background:#061b1b!important;padding:9px!important;gap:7px!important;box-shadow:0 8px 24px #0009!important}
.play .players-sidebar > .bodycam-view[hidden]{display:none!important}
.play .players-sidebar > .bodycam-view #bodycam-canvas{flex:1!important;min-height:0!important;width:100%!important;height:100%!important;object-fit:fill!important}
.play .players-sidebar > .bodycam-view .bodycam-top{font-size:11px!important}
.play .players-sidebar > .bodycam-view .bodycam-foot{font-size:10px!important}

/* V22.67: ambiente detrás de la interfaz, sin redimensionar mesa ni bodycam */
html{background:#1b100c}
body{background:#1b100c url('escenario-bar-clasico.webp') center center/cover fixed no-repeat!important}
.shell{background:transparent!important;box-shadow:none!important}
.stage{background:transparent!important}
.play{background:transparent!important}
.play .board{background:transparent!important}
.scenario-bar{display:flex;align-items:center;gap:10px;padding:5px 16px;margin:0 auto;
 max-width:1120px;color:#f0d49e;background:rgba(10,8,9,.87);border:1px solid #735335;border-radius:9px;font:12px Tahoma,sans-serif}
.scenario-bar select{background:#191511;color:#fff0d5;border:1px solid #a37a4a;border-radius:5px;padding:5px}
.scenario-bar span{opacity:.75;font-size:11px}
html[data-scenario="bar-nocturno"] body{background-color:#110d1e!important;filter:none}
html[data-scenario="bar-nocturno"] body::before{content:"";position:fixed;inset:0;background:rgba(19,7,54,.45);pointer-events:none;z-index:0}
html[data-scenario="bar-calido"] body::before{content:"";position:fixed;inset:0;background:rgba(109,55,12,.23);pointer-events:none;z-index:0}
.shell{position:relative;z-index:1}
@media(max-width:650px){.scenario-bar{flex-wrap:wrap}.scenario-bar span{display:none}}

/* V22.68: eliminar el rectángulo azul del lienzo, sin cambiar dimensiones. */
.play .board, .play .board canvas#pool { background: transparent !important; }
.play .players-side, .play .vertical.right { background: transparent !important; }

/* V22.69: fondo espacial unido a la mesa real; sin segunda mesa en la imagen. */
html,body{background:#160e0a!important}
body{background-image:none!important}
#scene-backdrop{position:fixed;pointer-events:none;z-index:0;
 background-image:url('escenario-bar-clasico.png');background-size:100% 100%;background-repeat:no-repeat;
 filter:brightness(.82) saturate(.93);}
html[data-scenario="bar-nocturno"] #scene-backdrop{filter:brightness(.56) sepia(.18) hue-rotate(165deg)}
html[data-scenario="bar-calido"] #scene-backdrop{filter:brightness(.97) sepia(.2) saturate(1.15)}
html[data-scenario] body::before{display:none!important}
.shell{position:relative;z-index:1}

/* V22.70: entorno de bar texturizado, sin mesa duplicada */
#scene-backdrop{background-image:url("escenario-bar-clasico.webp")!important;filter:brightness(.92) saturate(.9)!important}

/* V22.71: fotografía superior sin mesa duplicada, anclada al lienzo jugable. */
#scene-backdrop{background-image:url("bar-clasico-superior.webp")!important;filter:none!important;background-size:100% 100%!important;}
.play .board{background:transparent!important;}
.play .board canvas#pool{background:transparent!important;}
/* Se conserva el chat blanco elegido por el usuario. */
.play .player-chat{background:#fff!important;color:#19243a!important;}

/* V22.72: quitar cualquier placa rectangular detrás de la mesa.
   La madera del escenario continúa debajo del tablero y la mesa proyecta una sombra tenue. */
.play,.play .board,.play .board canvas#pool,.stage{background:transparent!important;}
.play .board{box-shadow:none!important;border:0!important;}
.play .board canvas#pool{filter:drop-shadow(0 12px 13px rgba(0,0,0,.34));}

/* V22.78: suelo fotográfico continuo y sombra natural, sin placas rectangulares. */
#scene-backdrop{background-image:url('bar-clasico-superior.webp')!important;background-size:100% 100%!important;filter:none!important;}
.play .board{background:transparent!important;box-shadow:none!important;}
.play .board::before{content:none!important;}
.play .board canvas#pool{background:transparent!important;}
/* Conservar el chat blanco del jugador. */
.play .player-chat{background:#fff!important;color:#19243a!important;}

/* V22.79: escenario como UNA fotografía de fondo, sin placas bajo la mesa */
html,body{background-color:#20130d!important;background-image:none!important}
#scene-backdrop{position:fixed!important;inset:0!important;left:0!important;top:0!important;
 width:100vw!important;height:100vh!important;z-index:0!important;
 background-image:url("bar-clasico-superior.webp")!important;
 background-position:center center!important;background-size:cover!important;
 background-repeat:no-repeat!important;filter:none!important;pointer-events:none!important}
.shell,.stage,.play,.play .board,.play .board canvas#pool{background:transparent!important}
.play .board{box-shadow:none!important;border:0!important}
.play .board::before,.play .board::after{content:none!important}
.play .board canvas#pool{filter:drop-shadow(0 11px 9px rgba(0,0,0,.32))!important}
.play .player-chat{background:#fff!important;color:#19243a!important}

/* V22.80: el ambiente acompana al scroll de la pagina, no se fija al viewport. */
#scene-backdrop{position:absolute!important;top:0!important;left:0!important;right:0!important;bottom:auto!important;width:100%!important;height:100%!important;min-height:100%!important;background-attachment:scroll!important;}
html,body{min-height:100%!important;}
body{position:relative!important;}

/* V22.81: UNA imagen continua en el documento, sin cortes en el fondo. */
html{background:#20130d!important;}
body{background:#20130d url("bar-clasico-superior.webp") center top / cover no-repeat!important;min-height:100vh!important;}
#scene-backdrop{display:none!important;}
.shell,.stage,.play,.play .board{background:transparent!important;}
.play .board::before,.play .board::after{content:none!important;}
.play .board canvas#pool{filter:drop-shadow(0 10px 12px rgba(0,0,0,.32))!important;}
.play .player-chat{background:#fff!important;color:#19243a!important;}

/* V22.82: UNA sola fotografía de suelo para todo el documento. */
html{background:#20130d!important}
body{background:#20130d!important;position:relative!important;isolation:isolate;min-height:100vh!important}
body::before{content:""!important;display:block!important;position:absolute!important;inset:0!important;z-index:-1!important;pointer-events:none!important;background:url("bar-clasico-superior.webp") center top / cover no-repeat!important;filter:none!important;opacity:1!important}
#scene-backdrop{display:none!important}
.shell,.stage,.play,.play .board,.play .board canvas#pool{background:transparent!important}
.play .board::before,.play .board::after{content:none!important}
.play .board canvas#pool{filter:drop-shadow(0 12px 11px rgba(0,0,0,.33))!important}
.play .player-chat{background:#fff!important;color:#19243a!important}
html[data-scenario="bar-nocturno"] body::before{filter:brightness(.60) hue-rotate(9deg)!important}
html[data-scenario="bar-calido"] body::before{filter:sepia(.13) saturate(1.15)!important}

/* V22.83: fondo fotográfico único sin rectángulo duplicado ni franjas. */
html,body{background:#28170e!important}
body{background-image:url("bar-clasico-fondo-unico.webp")!important;background-position:center top!important;background-size:100% 100%!important;background-repeat:no-repeat!important;min-height:100vh!important}
body::before,#scene-backdrop{display:none!important;background-image:none!important}
.shell,.stage,.play,.play .board{background:transparent!important}
.play .board canvas#pool{background:transparent!important}
.play .player-chat{background:#fff!important;color:#19243a!important}

/* V22.84 — one background layer, no duplicate photo below the table */
html,body{background-color:#24140e!important}
body{background-image:url('bar-clasico-fondo-unico.webp')!important;background-position:center top!important;background-size:100% 100%!important;background-repeat:no-repeat!important;background-attachment:scroll!important;min-height:100vh!important}
body::before,body::after,#scene-backdrop{display:none!important;background-image:none!important}
.shell,.stage,.play,.play .board,.play .board canvas#pool{background:transparent!important}
.play .player-chat{background:#fff!important;color:#19243a!important}

/* V22.85 — escenario cenital único, sin fotografía superpuesta bajo la mesa */
html,body{background-color:#1e1009!important}
body{background-image:url('bar-clasico-fondo-unico.webp')!important;background-repeat:no-repeat!important;background-size:100% 100%!important;background-position:center top!important;background-attachment:scroll!important}
body::before,body::after,#scene-backdrop{display:none!important;background:none!important}
.shell,.stage,.play,.play .board,.play .board canvas#pool{background:transparent!important}
.play .board::before,.play .board::after{display:none!important}
.play .board canvas#pool{filter:drop-shadow(0 12px 11px rgba(0,0,0,.30))!important}

/* V22.85b — reposicionar el escenario completo para mostrar a los espectadores
   del lado superior junto a la mesa. Un único fondo; sin segunda capa ni mesa falsa. */
body{
 background-image:url('bar-clasico-fondo-unico.webp')!important;
 background-size:100% calc(100% - 125px)!important;
 background-position:center 125px!important;
 background-repeat:no-repeat!important;
 background-attachment:scroll!important;
}

/* V22.85c — escenario nuevo: una sola imagen, sin franjas ni desplazamientos artificiales. */
html{background-color:#1e1009!important}
body{
 background-color:#1e1009!important;
 background-image:url('bar-clasico-fondo-unico.webp')!important;
 background-position:center top!important;
 background-size:cover!important;
 background-repeat:no-repeat!important;
 background-attachment:scroll!important;
 min-height:100vh!important;
}
body::before,body::after,#scene-backdrop{display:none!important;background:none!important}

/* V23.11 — El taco se pinta sobre toda la ventana sin capturar clics. */
body > canvas#cue-overlay{
 position:fixed!important;inset:0 auto auto 0!important;
 left:0!important;top:0!important;transform:none!important;
 width:100vw!important;height:100vh!important;max-width:none!important;
 z-index:999!important;pointer-events:none!important;background:transparent!important;
}
