/* One room layout, shared by players and spectators. */
#erisRoomSurface.ludo-mode{--ludo-chat:clamp(175px,26%,220px)}
#erisRoomSurface.ludo-mode>.eris-room-stage{visibility:hidden!important;pointer-events:none!important}
#erisRoomSurface.ludo-mode>.eris-room-quick-actions,#erisRoomSurface.ludo-mode>.eris-room-tools,#erisRoomSurface.ludo-mode>#erisRoomContributionButton{display:none!important}
#erisRoomSurface.ludo-mode>.eris-room-chat{height:var(--ludo-chat)!important;bottom:0!important;z-index:650!important}
#erisRoomSurface.ludo-mode>.ludo-room,#erisRoomSurface.ludo-mode>.ludo-modal{position:absolute!important;inset:76px 0 var(--ludo-chat)!important;width:auto!important;height:auto!important;box-sizing:border-box;z-index:600;display:flex;flex-direction:column;min-height:0;overflow:hidden;color:#f4eee0;background:radial-gradient(ellipse at 50% 35%,#253651,#0d1526 75%);isolation:isolate}
#erisRoomSurface.ludo-mode>.ludo-modal{z-index:720}
.ludo-seat-strip,.ludo-lobby-seats{display:flex;align-items:center;flex:0 0 68px;gap:8px;padding:6px 12px;box-sizing:border-box;overflow-x:auto;overflow-y:hidden;border-bottom:1px solid #f1d39b20;background:#080f1b70;touch-action:pan-x}
#erisRoomSurface.ludo-mode .ludo-seat-proxy{position:relative!important;inset:auto!important;transform:none!important;translate:none!important;flex:0 0 44px!important;width:44px!important;height:44px!important;margin:0 0 8px!important;border:1px solid #fff4;border-radius:50%;padding:0!important;display:grid;place-items:center;visibility:visible!important;pointer-events:auto!important}
.ludo-seat-proxy .seat-pod{position:relative!important;inset:auto!important;width:100%!important;height:100%!important;display:grid;place-items:center}
.ludo-seat-proxy .seat-ava{width:78%!important;height:78%!important;border-radius:50%;overflow:hidden}
.ludo-seat-proxy .seat-frame{position:absolute;inset:-8%;background-size:contain;background-position:center;background-repeat:no-repeat;pointer-events:none}
#erisRoomSurface.ludo-mode .ludo-seat-proxy>b{position:absolute!important;top:calc(100% + 3px)!important;left:-4px!important;width:52px!important;max-width:52px!important;margin:0!important;display:block!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;font-size:9px!important;line-height:12px!important}
.ludo-seat-proxy>small,.ludo-seat-proxy .seat-mic{display:none!important}
.ludo-toolbar{display:flex;align-items:center;flex:0 0 40px;gap:5px;padding:5px 9px;box-sizing:border-box;overflow-x:auto;white-space:nowrap;border-bottom:1px solid #f1d39b20}
.ludo-toolbar strong{font-size:15px;letter-spacing:2px;color:#f2d18d}.ludo-pool{flex:1;min-width:110px;font-size:10px;color:#cbd4e0}
.ludo-room button,.ludo-modal button{font-family:inherit;color:#f8edda;cursor:pointer;border:1px solid #f3d6983b;border-radius:10px;background:#ffffff08;min-height:32px;padding:5px 9px}
.ludo-room button:disabled,.ludo-modal button:disabled{opacity:.4;cursor:default}.ludo-room button:focus-visible,.ludo-modal button:focus-visible{outline:2px solid #ffe0a0;outline-offset:2px}
.ludo-toolbar [data-seat-permission]{font-size:10px;min-height:28px;padding:3px 6px}.ludo-room [hidden],.ludo-modal [hidden]{display:none!important}
.ludo-players{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:5px 9px;flex:none;box-sizing:border-box}
.ludo-player{min-width:0;border:1px solid #ffffff18;border-top:2px solid var(--pawn);border-radius:8px;padding:5px;background:#050b1666}.ludo-player.active{border-color:var(--pawn);background:color-mix(in srgb,var(--pawn) 15%,#0d1728);box-shadow:0 0 12px #ffffff12}
.ludo-player b,.ludo-player small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.ludo-player small{font-size:8px;color:#bdc8d9;margin-top:2px}
.ludo-board-space{flex:1 1 0;min-width:0;min-height:0;display:grid;place-items:center;padding:6px;box-sizing:border-box;overflow:hidden}
.ludo-board{position:relative;flex:none;aspect-ratio:1;width:100%;height:auto!important;max-width:100%;max-height:100%;box-shadow:0 8px 25px #0008;border-radius:10px;touch-action:manipulation}
.ludo-board>svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.ludo-room button.ludo-token{position:absolute;transform:translate(-50%,-50%);width:6%;height:7.2%;min-height:0;padding:0;border:0;background:none;border-radius:50%;z-index:6;opacity:1;touch-action:manipulation}
.ludo-token svg{width:100%;height:100%;display:block;overflow:visible;pointer-events:none}.ludo-token.playable{filter:drop-shadow(0 0 4px #ffe595);animation:ludo-choice 1s ease-in-out infinite}.ludo-token.moving{z-index:12;animation:none}.ludo-token.finished{filter:drop-shadow(0 0 4px #ffeea8)}
@keyframes ludo-choice{50%{filter:drop-shadow(0 0 8px #ffe595);scale:1.12}}
.ludo-bomb{position:absolute;transform:translate(-50%,-50%);width:6%;height:6%;z-index:4;text-align:center;font-size:clamp(10px,3vw,24px);pointer-events:none;filter:drop-shadow(0 2px 2px #000)}.ludo-bomb.used{opacity:.3}.ludo-bomb.explode{animation:ludo-burst .45s ease-out}
@keyframes ludo-burst{50%{transform:translate(-50%,-50%) scale(1.6);filter:brightness(2)}100%{transform:translate(-50%,-50%) scale(.2);opacity:0}}
.ludo-control{flex:0 0 auto;padding:6px 9px 9px;border-top:1px solid #f1d39b20;background:#060c1777;box-sizing:border-box;min-height:85px}
.ludo-dice-wrap{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:5px}.ludo-room .ludo-die{position:relative;width:34px;height:34px;min-height:34px;flex:0 0 34px;padding:4px;border-radius:8px;background:linear-gradient(135deg,#fffaf0,#ddcba7);border-color:#bba06b;color:#30251c;box-shadow:0 3px 0 #695131}.ludo-die svg{width:100%;height:100%;display:block}.ludo-die.active{opacity:1}.ludo-die.selected{outline:2px solid #ffe689;outline-offset:2px;box-shadow:0 0 15px #ffc45477}.ludo-die.rolling{animation:ludo-roll .15s linear infinite}
@keyframes ludo-roll{50%{transform:rotate(13deg) translateY(-2px)}}
.ludo-room .ludo-roll,.ludo-modal .ludo-primary{background:linear-gradient(135deg,#f5dca0,#c09a52);color:#20170b;font-weight:900;border-color:#ffeabb;min-height:36px}.ludo-status{text-align:center;font-size:11px;line-height:15px;padding-top:6px}.ludo-status>span,.ludo-status>small{display:block}.ludo-status small{color:#a7b5c9;font-size:9px}.ludo-clock{color:#f4d695;font-weight:800}.ludo-picks{display:flex!important;justify-content:center;gap:5px;margin-top:4px}.ludo-picks button{width:28px;min-height:24px;font-size:10px;padding:2px}
.ludo-dialog{position:relative;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;width:100%;box-sizing:border-box;padding:0 13px 15px}.ludo-dialog>header{position:sticky;top:0;z-index:3;display:flex;align-items:center;gap:10px;background:#111b2d;padding:9px 0;border-bottom:1px solid #f3d69822}.ludo-dialog h2{font-size:17px;margin:0;flex:1;color:#f2d18d}.ludo-dialog h3{font-size:12px;margin:14px 0 8px}.ludo-dialog p{font-size:11px;line-height:17px;color:#b7c4d6}.ludo-modes,.ludo-stakes{display:flex;gap:6px;flex-wrap:wrap;margin:9px 0}.ludo-dialog .chosen{border-color:#f5dca0;background:#d6b46a2c}.ludo-ready-cards{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:12px 0}.ludo-ready-card{border:1px solid #ffffff20;border-left:3px solid var(--pawn);border-radius:10px;padding:9px;background:#060c1755;min-width:0}.ludo-ready-card b,.ludo-ready-card small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.ludo-ready-card small{font-size:9px;color:#b7c4d6;margin-top:5px}.ludo-dialog .ludo-primary{width:100%;margin:4px 0}.ludo-summary{padding:8px;border-radius:9px;background:#f5dca011;font-size:12px}.ludo-dialog details{border-top:1px solid #ffffff20;margin-top:12px;padding-top:10px;font-size:11px;line-height:18px}.ludo-dialog li{margin:6px 0}.ludo-error{color:#ff9cab!important}.ludo-result{position:absolute;inset:25% 8%;z-index:25;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#0a122bef;border:1px solid #f3d698;border-radius:18px;text-align:center;padding:10px;box-shadow:0 8px 30px #0009}.ludo-result strong{font-size:25px;color:#f5dca0}.ludo-result p{font-size:12px;margin:5px}.ludo-spark{position:absolute;width:5px;height:9px;z-index:30;background:var(--spark);pointer-events:none}
@media(max-height:650px){.ludo-seat-strip,.ludo-lobby-seats{flex-basis:54px}.ludo-players{padding:2px 8px}.ludo-player{padding:3px}.ludo-control{min-height:76px}.ludo-seat-proxy{scale:.85}}
@media(prefers-reduced-motion:reduce){.ludo-room *{animation:none!important}}
/* Ludo and chat share one bottom boundary. */
#erisRoomSurface.room-layout-v6.ludo-mode{
  --ludo-chat:clamp(160px,calc(var(--app-height,100dvh) * .22),200px);
}
#erisRoomSurface.room-layout-v6.ludo-mode > .eris-room-chat:has(#erisLiveChat){
  position:absolute!important;inset:auto 0 0!important;
  width:auto!important;height:var(--ludo-chat)!important;
  min-height:0!important;max-height:var(--ludo-chat)!important;
  transform:none!important;box-sizing:border-box!important;
  display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;
  overflow:hidden!important;z-index:650!important;
}
#erisRoomSurface.room-layout-v6.ludo-mode > .eris-room-chat #erisLiveChat{
  position:relative!important;inset:auto!important;
  height:auto!important;min-height:0!important;max-height:none!important;
  overflow-y:auto!important;overflow-x:hidden!important;
}
#erisRoomSurface.room-layout-v6.ludo-mode > .eris-room-chat > .eris-room-compose{
  position:relative!important;inset:auto!important;
  margin:0!important;width:100%!important;box-sizing:border-box!important;
}
#erisRoomSurface.room-layout-v6.ludo-mode > .ludo-room,
#erisRoomSurface.room-layout-v6.ludo-mode > .ludo-modal{
  inset:76px 0 var(--ludo-chat)!important;
  height:auto!important;min-height:0!important;max-height:none!important;
  overflow:hidden!important;
}

.ludo-magnet{position:absolute;transform:translate(-50%,-50%);width:6%;height:6%;z-index:4;text-align:center;font-size:clamp(10px,3vw,24px);pointer-events:none;filter:drop-shadow(0 0 3px #66dcff)}
.ludo-magnet.activated{animation:ludo-burst .25s ease-out}
.ludo-picks{display:none!important}

/* Always visible exit; lobby and board return to the regular room locally. */
#erisRoomSurface.ludo-mode .ludo-view-close{position:absolute!important;right:7px!important;top:7px!important;width:34px;height:34px;z-index:40;background:#101a2eef!important;font-size:24px;line-height:24px;padding:0!important}
.ludo-seat-strip{padding-right:48px}
#erisRoomSurface.ludo-mode .ludo-dialog [data-close]{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 36px;min-height:36px;font-size:25px;position:relative;z-index:5}
.ludo-result-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:12px}
.ludo-result-actions button{min-height:40px;background:#d0af6333}

.ludo-bank{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px;min-height:0}.ludo-bank:empty{display:none}.ludo-bank small{font-size:10px;color:#d7cbaa}.ludo-bank button{min-height:26px;padding:2px 8px}.ludo-bank button.selected{border-color:#ffe09d;background:#cbae6533}.ludo-dice-wrap>.ludo-die:disabled{opacity:1}
