/* Battle room only; lobby and creation dialog retain their existing layouts. */
.bs-room{--panel:#111622;--edge:#2a3243;max-width:1500px;margin:auto;color:#edf1fa}.bs-room button,.bs-room a{font-size:14px}.bs-room [hidden]{display:none!important}

/* Player area */
.bs-room .bsx-player{min-width:0;border:1px solid var(--edge);border-radius:10px;background:var(--panel);overflow:hidden;padding:0;box-shadow:none}.bs-room .bsx-player.is-leading{border-color:#53cdb0}.bs-room .bsx-player.is-winner{border-color:#42d99d;box-shadow:0 0 25px #42d99d12}
.bs-room .bsx-player-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:68px;padding:12px;border:0}.bs-room .bsx-player-identity{display:flex;align-items:center;gap:9px;min-width:0}.bs-room .bsx-player-identity>div{min-width:0}
/* Force every avatar/open-seat placeholder to a true square before rounding. */
#battle-app .bs-room .cb-avatar{display:block!important;box-sizing:border-box!important;width:32px!important;height:32px!important;min-width:32px!important;max-width:32px!important;min-height:32px!important;max-height:32px!important;aspect-ratio:1/1!important;flex:0 0 32px!important;margin:0!important;padding:0!important;border-radius:999px!important;object-fit:cover;overflow:hidden}
#battle-app .bs-room .cb-vacant{display:grid!important;place-items:center!important;line-height:0!important}
#battle-app .bs-room .cb-vacant>.cb-seat-plus{left:50%;top:50%;transform:translate(-50%,-50%)}
.bs-room .bsx-player-name{display:block;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:210px}.bs-room .bsx-player-head small{font-size:12px;color:#8f9bb0;display:block;margin-top:4px}.bs-room .bsx-player-total{font-size:19px;color:#57d9b4;white-space:nowrap}.bs-room .bsx-mini-wrap{padding:0 10px 10px}.bs-room .bsx-mini-result{height:53px;min-height:53px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:5px;text-align:center}.bs-room .bsx-mini-result strong{font-size:14px;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.bs-room .bsx-mini-result span{font-size:14px;color:#56ddb8}

/* Mini vertical reels */
.bs-room .reel-shell{height:clamp(225px,31vh,330px)!important;position:relative;overflow:hidden;border:1px solid #323b50;border-radius:7px;background:radial-gradient(ellipse at center,#25283b,#0c111b 80%);padding:0!important;min-height:0!important}.bs-room .case-reel{position:absolute!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;top:0!important;left:0!important;width:100%!important;height:auto!important;gap:8px!important;padding:0!important;margin:0!important;will-change:transform}.bs-room .reel-card{position:relative;box-sizing:border-box;flex:0 0 156px!important;width:100%!important;min-width:0!important;height:156px!important;min-height:156px!important;max-height:156px!important;margin:0!important;padding:8px 10px!important;border:0!important;border-radius:4px;background:radial-gradient(ellipse at center,color-mix(in srgb,var(--tier) 15%,transparent),transparent 75%);text-align:center}.bs-room .reel-card>div{height:103px!important;position:relative;display:flex;align-items:center;justify-content:center}.bs-room .reel-card>div>span{position:absolute;left:5px;top:2px;font-size:11px;color:var(--tier)}.bs-room .reel-card img{object-fit:contain;width:85%!important;height:100px!important;max-width:240px;filter:drop-shadow(0 8px 10px #0007)}.bs-room .reel-card strong{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:13px!important;margin:4px 0!important}.bs-room .reel-card small{font-size:12px!important;color:#acb6c9}.bs-room .reel-card:after{content:'';position:absolute;bottom:0;left:15%;right:15%;height:2px;background:var(--tier)}.bs-room .reel-card.is-dimmed{opacity:.32;filter:saturate(.7)}.bs-room .reel-card.is-winner{background:radial-gradient(ellipse at center,color-mix(in srgb,var(--tier) 23%,transparent),transparent 85%)}.bs-room .reel-card.is-winner img{filter:drop-shadow(0 8px 12px #0008) brightness(1.12)}.bs-room .reel-marker{position:absolute;inset:50% 0 auto!important;height:0!important;width:100%!important;z-index:4;pointer-events:none;background:none!important;border:0!important;transform:none!important}.bs-room .reel-marker:before,.bs-room .reel-marker:after{content:'';position:absolute;top:-7px;border-top:7px solid transparent;border-bottom:7px solid transparent}.bs-room .reel-marker:before{left:0;border-left:9px solid #bba0ff}.bs-room .reel-marker:after{right:0;border-right:9px solid #bba0ff}.bs-room .reel-marker i{display:none}.bs-room .reel-fade{position:absolute;left:0!important;right:0!important;width:100%!important;height:42px!important;z-index:3;pointer-events:none}.bs-room .reel-fade.left{top:0!important;bottom:auto!important;background:linear-gradient(#0d121c,transparent)!important}.bs-room .reel-fade.right{top:auto!important;bottom:0!important;background:linear-gradient(transparent,#0d121c)!important}.bs-room .bsx-empty-seat{min-height:clamp(225px,31vh,330px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px}.bs-room .bsx-empty-seat>div:last-child{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}.bs-room .bsx-empty-plus{font-size:30px;display:grid;place-items:center;width:48px;height:48px;line-height:1;border:1px dashed #62708a;border-radius:50%}

/* Leaderboard + drops are always visible together. */

/* Battle-specific provably fair modal uses the same visual system as case opening. */
.battle-fair-dialog{--accent:#a486ff}.battle-fair-dialog .case-fair-history-list{scrollbar-width:thin}.battle-fair-dialog .case-fair-win{grid-template-columns:58px minmax(0,1fr) auto}.battle-fair-dialog .case-fair-win-copy small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.battle-fair-pending{justify-content:flex-start;padding-top:44px}.battle-fair-commitment{width:min(100%,690px);margin-top:22px;text-align:left;display:grid;gap:7px}.battle-fair-commitment label{margin-top:5px;color:#8593a7;font-size:11px;font-weight:750}.battle-fair-commitment code{display:block;padding:10px 11px;border:1px solid #263244;border-radius:8px;background:#0f1721;color:#e3e9f2;font:500 12px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere}.battle-fair-footer{min-height:56px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 15px;border-top:1px solid #273142;background:#0b1119}.battle-fair-footer>span{font-size:11px;color:#8390a4}.battle-fair-footer>button{height:36px;padding:0 13px;border:1px solid #39465a;border-radius:8px;background:#141d29;color:#d9e0eb;font-size:12px;font-weight:700;cursor:pointer}.battle-fair-footer>button:hover:not(:disabled){border-color:#7966bb;background:#1b2432}.battle-fair-footer>button:disabled{opacity:.42;cursor:not-allowed}

@media(max-width:1150px){.bs-room .bsx-player-head{flex-wrap:wrap}.bs-room .bsx-player-name{max-width:145px}.bs-room .bsx-player-total{font-size:17px}}
@media(max-width:700px){.bs-room .bsx-player-name{max-width:120px}.battle-fair-footer{align-items:flex-start;flex-direction:column}.battle-fair-footer>button{width:100%}}
@media(prefers-reduced-motion:reduce){.bs-room .winner-flash{animation:none!important}}

.battle-room-page{overflow:auto!important}.battle-room-page #battle-app{height:auto!important;min-height:0;overflow:visible!important}.battle-room-page #cb-content{height:auto!important;overflow:visible!important}.bs-room .reel-marker:before,.bs-room .reel-marker:after{width:0;height:0;transform:none;background:none}.bs-room .reel-card>div{inset:auto}.bs-room .reel-card strong,.bs-room .reel-card small{position:static!important}.bs-room button:focus-visible{outline:2px solid #c4adff;outline-offset:3px}

/* Compact battle-room pass: more room for live drops, no redundant status chrome. */
#battle-app .bs-room .cb-vacant>.cb-seat-plus{
  position:static!important;
  inset:auto!important;
  display:block!important;
  width:12px!important;
  height:12px!important;
  margin:auto!important;
  transform:none!important;
}
.bs-room .bsx-mini-result:empty{display:none!important}
.bs-room .bsx-mini-result{height:42px;min-height:42px;gap:2px;padding:3px 5px}
.bs-room .bsx-mini-result strong{font-size:13px}.bs-room .bsx-mini-result span{font-size:13px}

/* Shorter reels free vertical space for the larger drops overview. */
.bs-room .reel-shell{height:180px!important}
.bs-room .reel-card{flex-basis:126px!important;height:126px!important;min-height:126px!important;max-height:126px!important;padding:6px 9px!important}
.bs-room .reel-card>div{height:82px!important}
.bs-room .reel-card img{width:88%!important;height:80px!important}
.bs-room .reel-card strong{font-size:12px!important;margin:2px 0!important}
.bs-room .reel-card small{font-size:11px!important}
.bs-room .reel-fade{height:32px!important}
.bs-room .bsx-empty-seat{min-height:180px;gap:12px}
.bs-room .bsx-empty-plus{width:46px;height:46px;display:grid;place-items:center;line-height:0}
.bs-room .bsx-empty-plus svg{display:block;width:18px;height:18px;margin:auto}

/* Two inward-facing arrows only; intentionally no line through the reel. */
.bs-room .reel-marker{
  left:0!important;right:0!important;top:50%!important;bottom:auto!important;
  width:100%!important;height:0!important;background:none!important;border:0!important;
  box-shadow:none!important;transform:none!important;overflow:visible!important;
}
.bs-room .reel-marker:before,.bs-room .reel-marker:after{
  content:''!important;position:absolute!important;top:50%!important;bottom:auto!important;
  width:0!important;height:0!important;background:none!important;clip-path:none!important;
  transform:translateY(-50%)!important;box-shadow:none!important;
  border-top:8px solid transparent!important;border-bottom:8px solid transparent!important;
}
.bs-room .reel-marker:before{
  left:0!important;right:auto!important;border-left:11px solid #bba0ff!important;border-right:0!important;
}
.bs-room .reel-marker:after{
  right:0!important;left:auto!important;border-right:11px solid #bba0ff!important;border-left:0!important;
}

/* Overview header: prize pool and fairness action share one compact row. */

/* Give drops the majority of the summary width and make each result readable at a glance. */

/* The old room header/footer/result are removed from markup; keep these inert if cached fragments survive. */

/* Keep the player/reel card at its final height from the first paint. The result
   area is reserved even before round one so item name/value cannot make it jump. */
.bs-room .bsx-mini-result:empty{
  display:flex!important;
  visibility:hidden!important;
}
.bs-room .bsx-mini-wrap{min-height:232px}

/* New drops enter on the left; older rounds are pushed to the right by the FLIP
   animation in case-battles.js. */

/* End-of-battle pot transfer: use the same flying item treatment as normal case
   openings, but add a brighter tail as the items converge on the winning row. */
.case-inventory-flight.battle-award-flight{z-index:10060;overflow:visible}
.case-inventory-flight.battle-award-flight:before{
  content:"";
  position:absolute;
  z-index:-1;
  left:50%;top:50%;
  width:76px;height:16px;
  transform:translate(-92%,-50%);
  border-radius:999px;
  background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--flight-tier) 18%,transparent),color-mix(in srgb,var(--flight-tier) 70%,transparent));
  filter:blur(7px);
  opacity:.82;
  pointer-events:none;
}
@keyframes battle-drop-arrival{
  0%,100%{background:transparent}
  38%{background:color-mix(in srgb,#58ddb8 10%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,#58ddb8 28%,transparent),0 0 18px rgba(88,221,184,.12)}
}
@media(prefers-reduced-motion:reduce){
  .case-inventory-flight.battle-award-flight{display:none!important}
}
.bs-room.mode-1v1 .reel-shell.is-horizontal .case-reel{
  flex-direction:row!important;align-items:stretch!important;
  top:0!important;left:0!important;width:auto!important;height:100%!important;
  gap:8px!important;white-space:nowrap!important;
}
.bs-room.mode-1v1 .reel-shell.is-horizontal .reel-card{
  flex:0 0 150px!important;width:150px!important;min-width:150px!important;max-width:150px!important;
  height:178px!important;min-height:178px!important;max-height:178px!important;
  padding:7px 9px!important;
}
.bs-room.mode-1v1 .reel-shell.is-horizontal .reel-card>div{height:116px!important}
.bs-room.mode-1v1 .reel-shell.is-horizontal .reel-card img{width:94%!important;height:110px!important}
.bs-room.mode-1v1 .reel-shell.is-horizontal .reel-card strong{font-size:12px!important;margin:2px 0!important}
.bs-room.mode-1v1 .reel-shell.is-horizontal .reel-card small{font-size:12px!important}
.bs-room.mode-1v1 .reel-shell.is-horizontal .reel-card:after{left:12%;right:12%}
.bs-room.mode-1v1 .reel-shell.is-horizontal .reel-fade{
  top:0!important;bottom:0!important;width:48px!important;height:100%!important;
}
.bs-room.mode-1v1 .reel-shell.is-horizontal .reel-fade.left{
  left:0!important;right:auto!important;background:linear-gradient(90deg,#0d121c,transparent)!important;
}
.bs-room.mode-1v1 .reel-shell.is-horizontal .reel-fade.right{
  right:0!important;left:auto!important;background:linear-gradient(270deg,#0d121c,transparent)!important;
}
/* Horizontal reels use top/bottom pointers. There is deliberately no center stick. */
.bs-room.mode-1v1 .reel-shell.is-horizontal .reel-marker{
  left:50%!important;right:auto!important;top:0!important;bottom:0!important;
  width:0!important;height:100%!important;overflow:visible!important;transform:none!important;
}
.bs-room.mode-1v1 .reel-shell.is-horizontal .reel-marker:before,
.bs-room.mode-1v1 .reel-shell.is-horizontal .reel-marker:after{
  left:50%!important;right:auto!important;width:0!important;height:0!important;
  transform:translateX(-50%)!important;background:none!important;
  border-left:8px solid transparent!important;border-right:8px solid transparent!important;
}
.bs-room.mode-1v1 .reel-shell.is-horizontal .reel-marker:before{
  top:0!important;bottom:auto!important;border-top:11px solid #bba0ff!important;border-bottom:0!important;
}
.bs-room.mode-1v1 .reel-shell.is-horizontal .reel-marker:after{
  top:auto!important;bottom:0!important;border-bottom:11px solid #bba0ff!important;border-top:0!important;
}

/* Start countdown floats over the center of the viewport and never takes layout space. */
@keyframes bs-countdown-pop{0%{transform:scale(1.28);opacity:.25;filter:blur(2px)}42%{transform:scale(.94);opacity:1;filter:blur(0)}100%{transform:scale(1);opacity:1}}
@keyframes bs-countdown-ring{0%{transform:rotate(18deg) scale(.82);opacity:.9}100%{transform:rotate(72deg) scale(1.22);opacity:.2}}
