:root{font-family:system-ui,-apple-system,Segoe UI,Arial,sans-serif;background:#e5c99c;color:#37281b}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{border:1px solid #74563c;background:#fff8eb;color:#2e2019;border-radius:11px;min-height:45px;padding:10px 16px;font-weight:750;cursor:pointer}button:disabled{opacity:.43;cursor:not-allowed}.primary{background:#254e9b;color:white;border-color:#254e9b}input,select{width:100%;padding:12px;border:1px solid #927c63;border-radius:10px;background:#fffcf4;color:#23180f;min-height:45px}label{display:grid;gap:6px;font-size:.9rem;font-weight:700}a{color:#153f8c}a:hover{text-decoration:none}h1,h2,h3,p{margin-top:0}.brand{font-weight:900;color:#5c341d;font-size:clamp(1.5rem,4.5vw,2.25rem);letter-spacing:-.03em}.tag{font-size:.76rem;border-radius:99px;background:#f5e5c9;padding:6px 10px}.wrap{max-width:1080px;margin:auto;padding:15px}.top{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px}.top p{margin:0}.card{background:#fff1d9;border:1px solid #c9ad88;border-radius:19px;padding:18px;box-shadow:0 5px 22px #52311218}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.stack{display:grid;gap:13px}.small{color:#67513e;font-size:.88rem;line-height:1.5}.callout{background:#f8e5bb;border-left:4px solid #b28338;padding:11px 13px;border-radius:8px}.inline-actions{display:flex;gap:8px;flex-wrap:wrap}.inline-actions>*{flex:1}.error{background:#ffe3d9;color:#8c1d17;padding:10px;border-radius:9px;font-weight:650}.ok{color:#266149}.player{display:flex;justify-content:space-between;align-items:center;padding:11px 12px;border:1px solid #d6bb97;border-radius:12px;background:#fff9ee;gap:10px}.dot{display:inline-block;width:13px;height:13px;border:2px solid #55412d;vertical-align:middle;border-radius:50%;margin-right:6px}.player small{font-size:.76rem}.chatlist{background:#fffaf1;border-radius:12px;border:1px solid #ddc7a9;min-height:160px;max-height:245px;overflow-y:auto;padding:10px;display:grid;align-content:start;gap:8px}.chatmsg{border-bottom:1px solid #eee2ce;padding-bottom:7px;overflow-wrap:anywhere;font-size:.9rem}.chatmsg strong{font-size:.84rem;color:#683b20}.chatmsg time{color:#83725d;font-size:.7rem;margin-left:6px}.chatbox{display:flex;gap:8px;margin-top:10px}.chatbox input{min-width:0;flex:1}.chatbox button{flex:0 0 auto}.pill{background:#fff7ec;border:1px solid #b89d76;border-radius:99px;padding:5px 10px;font-size:.78rem;font-weight:800}.sep{height:1px;background:#dec5a2;margin:5px 0}.hide{display:none!important}#msg,#status{min-height:24px}.footer{margin:22px 0 0;color:#69513c;font-size:.78rem;text-align:center}.gamewrap{max-width:1400px;margin:auto;padding:10px}.gamecols{display:grid;grid-template-columns:minmax(0,1fr) 335px;gap:14px;align-items:start}.boardpanel{background:#f4dfbf;border-radius:18px;padding:10px;min-width:0}.board{width:100%;max-height:min(780px,85vh);display:block;aspect-ratio:1}.side{display:grid;gap:12px}.turno{background:#fff3d6;border:2px solid #b99769}.dice{display:flex;align-items:center;gap:7px;margin-bottom:8px}.dado{height:57px;width:57px;border:2px solid #c5ad87;display:grid;place-items:center;background:#fffdf3;border-radius:12px;font-size:29px;flex:0 0 57px}.dice .primary{flex:1}.pieces{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}.choiceShade{position:fixed;inset:0;background:#1a130ed1;z-index:200;display:grid;place-items:center;padding:14px}.choiceCard{background:#fff1d8;border:3px solid #332419;box-shadow:0 12px 40px #0007;border-radius:18px;max-width:460px;width:100%;padding:22px;text-align:center}.choiceCard .actions{display:grid;gap:9px}.choiceCard .actions button{min-height:55px}.logs{max-height:150px;overflow-y:auto;background:#fff8eb;padding:10px;border-radius:10px;font-size:.8rem;line-height:1.65}.card details summary{font-weight:800;cursor:pointer}.pieces .player{font-size:.82rem;display:block}.winner{background:#fdf1bc;border:2px solid #cb9d40;padding:10px;border-radius:10px;margin-bottom:8px}.token{cursor:default;transition:transform .42s ease-in-out}.token.moveable{cursor:pointer}.token.moveable .glow{opacity:1}.token .glow{opacity:0}.token:focus-visible .glow{opacity:1;stroke:#0d2f83;stroke-width:5}.moveguide{pointer-events:none}.chip{font-weight:900;padding:5px 10px;border-radius:12px;background:#e7d6b9}.confetti{pointer-events:none;position:fixed;inset:0;z-index:220;overflow:hidden}.confetti i{position:absolute;top:-18px;width:7px;height:14px;animation:caer 3.8s ease-in forwards}@keyframes caer{to{transform:translateY(110vh) rotate(960deg);opacity:0}}@media(max-width:920px){.gamecols{grid-template-columns:1fr}.board{max-height:none}.side{grid-template-columns:1fr 1fr}.turno{grid-column:1/-1}}@media(max-width:650px){.wrap,.gamewrap{padding:7px}.top{padding:6px}.grid2,.side{grid-template-columns:1fr}.boardpanel{padding:3px}.card{padding:12px}.brand{font-size:1.6rem}.turno{position:sticky;bottom:0;z-index:100;padding:10px}.dice .dado{width:46px;height:46px;flex-basis:46px;font-size:24px}.dice button{min-height:46px;font-size:.85rem}.chatlist{max-height:180px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}

/* Mejoras 4.0.2: visibilidad de desconexión y animación de cada tirada */
.avisoDesconexion{padding:12px 15px;margin:8px 0 14px;border:2px solid #bb733d;background:#fff0d5;color:#623614;border-radius:12px;font-weight:750}
.dado.rodando{animation:sacudirDados .18s ease-in-out infinite alternate}
@keyframes sacudirDados{from{transform:rotate(-10deg) scale(.96)}to{transform:rotate(10deg) scale(1.06)}}
@media(prefers-reduced-motion:reduce){.dado.rodando{animation:none}}

/* Estilos antes en atributos HTML: retirados para permitir una CSP estricta */
.enlace-publico{overflow-wrap:anywhere;font-weight:700}
.ayuda-corona{margin:8px 4px 0}
.boton-prision{background:#b5383b;color:white}
.boton-acarreo{background:#2c7049;color:white}
.nota-final{margin-top:12px}
