/* Crosslink Small Update 58: Keep the dice visible above the opening-roll panel
   in portrait layout. Desktop board/overlay geometry is intentionally untouched. */
@media (max-width:800px) {
  /* The cup's dice rise from its top; place its entire playbar before the panel,
     with enough breathing room for the settled dice. */
  body.board-view .board-wrap > .playbar,
  body.board-view .board-wrap > .playbar:not(.classic-mode) {
    order:1!important;
    position:relative!important;
    overflow:visible!important;
    margin:44px auto 8px!important;
    isolation:auto!important;
    z-index:2!important;
  }
  body.board-view .board-wrap > #rollToStartOverlay {
    order:2!important;
    position:relative!important;
    inset:auto!important;
    left:auto!important;top:auto!important;
    transform:none!important;
    z-index:1!important;
    width:min(100%,420px)!important;
    max-width:calc(100vw - 24px)!important;
    min-width:0!important;
    max-height:none!important;
    overflow:visible!important;
    margin:0 auto 8px!important;
    padding:12px 14px!important;
    border-radius:18px!important;
  }
  body.board-view .board-wrap > .board-view-tools,
  body.board-view .board-wrap > #crosslinkTopControls {order:3!important;}
  body.board-view .board-wrap > #boardOptionsPanel {order:4!important;}
  body.board-view #rollToStartOverlay .rts-title {font-size:clamp(20px,5.2vw,25px)!important;line-height:1.1!important;margin:0 0 3px!important;}
  body.board-view #rollToStartOverlay .rts-sub {font-size:12px!important;line-height:1.25!important;margin-bottom:5px!important;}
  body.board-view #rollToStartOverlay .rts-list {gap:5px!important;margin:4px 0!important;}
  body.board-view #rollToStartOverlay .rts-row {padding:6px 9px!important;min-height:36px!important;gap:9px!important;border-radius:11px!important;}
  /* Player identity should stand out more than the dice arithmetic. */
  body.board-view #rollToStartOverlay .rts-name {
    flex:1 1 auto!important;
    min-width:0!important;
    font-size:clamp(15px,4.2vw,19px)!important;
    font-weight:950!important;
    line-height:1.15!important;
    letter-spacing:.005em!important;
    color:#23132f!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.board-view #rollToStartOverlay .rts-name .player-dot {width:13px!important;height:13px!important;flex:0 0 13px!important;}
  body.board-view #rollToStartOverlay .rts-dice {
    flex:0 0 auto!important;
    font-size:clamp(12px,3.3vw,15px)!important;
    white-space:nowrap!important;
    font-weight:800!important;
  }
  body.board-view #rollToStartOverlay .rts-message {font-size:13px!important;line-height:1.25!important;margin:5px 0!important;}
  body.board-view #rollToStartOverlay .rts-cup-guidance {font-size:12px!important;line-height:1.25!important;margin:5px 0!important;}
  body.board-view #rollToStartOverlay .rts-actions {gap:6px!important;margin-top:7px!important;}
  body.board-view #rollToStartOverlay .rts-actions button {font-size:11px!important;min-height:38px!important;padding:6px 9px!important;}
}
@media (max-width:380px) {
  body.board-view .board-wrap > #rollToStartOverlay {padding:10px 9px!important;}
  body.board-view #rollToStartOverlay .rts-name {font-size:15px!important;}
  body.board-view #rollToStartOverlay .rts-dice {font-size:12px!important;}
  body.board-view #rollToStartOverlay .rts-row {padding:6px!important;gap:5px!important;}
}
