/* 2PISO V23.1: controls de móvil en una sola pantalla, sin alterar las reglas. */
@media(max-width:860px){
  #gameShell.v15-game-shell{
    height:100dvh!important; max-height:100dvh!important;
    overflow:hidden!important; padding:0 0 calc(69px + env(safe-area-inset-bottom))!important;
    overscroll-behavior:none!important; display:flex!important;flex-direction:column!important;
  }
  #gameShell[hidden]{display:none!important}
  #gameShell .game-top{
    flex:0 0 auto!important;position:relative!important;top:auto!important;
    z-index:93!important; min-height:48px!important; height:48px!important;
    display:flex!important; flex-wrap:nowrap!important;align-items:center!important;
    gap:6px!important;padding:5px 9px!important;background:#1a0a38!important;
  }
  #gameShell .game-title{order:0!important;width:auto!important;min-width:0!important;flex:1!important;border:0!important;padding:0!important;text-align:left!important}
  #gameShell .game-title strong{display:block;font-size:15px!important;white-space:nowrap!important;line-height:1.1!important}
  #gameShell .game-title span{display:block;font-size:9px!important;letter-spacing:.13em!important;line-height:1.35!important}
  #gameShell .game-top>.back-btn,#gameShell .game-top>.game-meta{display:none!important}
  #gameShell.v23-header-open .game-top{height:auto!important;min-height:105px!important;flex-wrap:wrap!important}
  #gameShell.v23-header-open .game-top>.back-btn{display:inline-flex!important;order:3!important;font-size:10px!important;padding:7px 9px!important;min-height:35px!important}
  #gameShell.v23-header-open .game-top>.game-meta{display:flex!important;order:4!important;flex:1!important;width:auto!important;gap:5px!important;justify-content:flex-end!important}
  #gameShell.v23-header-open .game-meta .pill{display:none!important}
  #gameShell.v23-header-open .game-meta .copy-btn{min-height:35px!important;font-size:10px!important;padding:6px 9px!important}
  #gameShell .v23-header-toggle{order:2;display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px solid #b277f4;background:#36115e;color:#fff4dc;border-radius:12px;min-height:34px;padding:6px 11px;font-size:12px;font-weight:850}
  #gameShell .game-layout{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;overflow:hidden!important;padding:4px 6px 4px!important;gap:0!important}
  #gameShell .board-column{flex:1 1 auto!important;min-height:0!important;display:flex!important;flex-direction:column!important;align-items:center!important;overflow:hidden!important;width:100%!important}
  #gameShell .board-toolbar{flex:0 0 auto!important;width:100%!important;max-width:none!important;min-height:26px!important;height:29px!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:5px!important;padding:2px 6px!important;margin:0 0 3px!important;border-radius:8px!important;font-size:9px!important}
  #gameShell #boardZoom{font-size:9px!important;min-height:24px!important;height:24px!important;padding:2px 6px!important;border-radius:8px!important}
  #gameShell .v23-player-strip{flex:0 0 auto;display:flex;align-items:center;gap:6px;width:100%;height:35px;margin:0 0 3px;padding:3px 5px;border-radius:10px;background:#231045;border:1px solid #8552bd;overflow:hidden}
  #gameShell .v23-player-strip .v23-seat-chip{display:flex;align-items:center;gap:5px;min-width:0;flex:1 1 0;font-size:11px;color:#fff9e8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #gameShell .v23-player-strip .v23-seat-chip i{width:11px;height:11px;flex:none;border-radius:50%;background:var(--chip-color,#f2cb69);border:1px solid #fff8;box-shadow:0 0 5px var(--chip-color,#ffc)}
  #gameShell .v23-player-strip .v23-seat-chip b{font-size:11px;overflow:hidden;text-overflow:ellipsis}
  #gameShell .v23-player-strip .v23-players-open{flex:none;border:1px solid #a887ed;border-radius:9px;background:#47217c;padding:5px 7px;font-size:10px;font-weight:800;color:white;min-height:26px}
  #gameShell .board-viewport{flex:1 1 auto!important;min-height:0!important;display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;max-width:none!important;overflow:hidden!important;margin:0 auto!important}
  #gameShell .board-stage{flex:none!important;width:min(calc(100vw - 16px), calc(100dvh - 249px))!important;max-width:100%!important;max-height:100%!important;aspect-ratio:1!important;border:3px solid #e6c777!important;border-radius:14px!important;box-shadow:0 0 0 2px #9244e9,0 5px 12px #0006!important;margin:0 auto!important}
  #gameShell .board-stage canvas{width:100%!important;height:100%!important}
  #gameShell .dice-panel{
    display:flex!important; flex:0 0 auto!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;
    gap:6px!important;width:100%!important;max-width:none!important;height:72px!important;
    margin:4px 0 0!important;padding:7px 8px!important;border-radius:12px!important;
    background:#261049!important;border:1px solid #9258d0!important;box-shadow:none!important;
  }
  #gameShell .dice-left{flex:1 1 92px!important;min-width:0!important;max-width:145px!important;display:flex!important;flex-direction:column!important;gap:1px!important}
  #gameShell .dice-left .table-theme,#gameShell .dice-left small{display:none!important}
  #gameShell .dice-left .small-overline{font-size:9px!important;letter-spacing:.05em!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  #gameShell .dice-left strong{font-size:12px!important;line-height:1.15!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  #gameShell .dice-controls{flex:1 1 auto!important;min-width:0!important;display:flex!important;justify-content:flex-end!important;gap:5px!important;width:auto!important;max-width:none!important}
  #gameShell .dice-controls .die{width:43px!important;height:43px!important;min-width:43px!important;border-radius:10px!important;flex:none!important;box-shadow:0 3px 8px #0006!important}
  #gameShell #rollButton{flex:0 1 auto!important;min-width:65px!important;max-width:112px!important;min-height:43px!important;height:43px!important;white-space:normal!important;font-size:10px!important;line-height:1.05!important;padding:5px!important;letter-spacing:0!important;border-radius:10px!important}
  #gameShell .dice-panel .move-choices,#gameShell .dice-panel .v13-hint-row,#gameShell .dice-panel .dice-fairness{display:none!important}
  #gameShell .game-sidebar{display:none!important}
  #gameShell .game-mobile-dock{position:fixed!important;bottom:0!important;left:0!important;right:0!important;z-index:104!important;display:flex!important;gap:2px!important;height:calc(67px + env(safe-area-inset-bottom))!important;min-height:0!important;padding:4px 3px calc(4px + env(safe-area-inset-bottom))!important;background:#190b38!important;border-top:1px solid #9c58d9!important;box-shadow:0 -5px 15px #0007!important}
  #gameShell .game-mobile-dock button{min-height:50px!important;height:100%!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;flex:1!important;padding:3px 1px!important;font-size:10px!important;line-height:1!important;pointer-events:auto!important;touch-action:manipulation!important}
  #gameShell .game-mobile-dock button span{font-size:21px!important;line-height:1.15!important}
  #gameShell .game-mobile-dock button.v23-active{color:#ffda77!important;background:#432267!important;border-radius:10px!important}
  #gameShell .v23-scrim{position:fixed;inset:48px 0 calc(67px + env(safe-area-inset-bottom));background:#050014ab;z-index:98;display:none;touch-action:manipulation}
  #gameShell.v23-sheet-open .v23-scrim{display:block}
  #gameShell .v23-sheet{position:fixed!important;z-index:100!important;left:8px!important;right:8px!important;bottom:calc(68px + env(safe-area-inset-bottom))!important;height:auto!important;max-height:min(67dvh,520px)!important;min-height:0!important;display:none!important;flex-direction:column!important;padding:10px!important;border-radius:18px!important;border:1px solid #be83ee!important;background:linear-gradient(#321357,#170a32)!important;box-shadow:0 0 0 1px #0008,0 8px 35px #000a!important;overflow:hidden!important}
  #gameShell.v23-sheet-open .v23-sheet{display:flex!important}
  #gameShell .v23-sheet-head{display:flex;flex:none;align-items:center;justify-content:space-between;min-height:35px;margin-bottom:8px;border-bottom:1px solid #9874c355;padding-bottom:6px;color:#ffe09a;font-size:14px;font-weight:900}
  #gameShell .v23-sheet-close{height:31px;width:35px;border-radius:10px;background:#5d2981;color:white;border:1px solid #9c6ed5;font-size:17px}
  #gameShell .v23-sheet-body{min-height:0;overflow:auto;flex:1 1 auto;overscroll-behavior:contain}
  #gameShell .v23-sheet .chat-panel{display:flex!important;position:static!important;inset:auto!important;min-height:0!important;height:min(50dvh,350px)!important;max-height:100%!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
  #gameShell .v23-sheet .chat-messages{flex:1!important;min-height:70px!important;max-height:none!important;overflow:auto!important}
  #gameShell .v23-sheet .mobile-chat-close,#gameShell .v23-sheet .chat-panel>.panel-title{display:none!important}
  #gameShell .v23-sheet .chat-form{flex:none!important}
  #gameShell .v23-sheet .chat-form input{font-size:16px!important}
  #gameShell .v23-sheet #reactionTray{position:static!important;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:8px!important;background:transparent!important;border:none!important;box-shadow:none!important;padding:4px!important;transform:none!important;max-height:none!important}
  #gameShell .v23-sheet #reactionTray button{min-height:52px;border-radius:12px;background:#431d72;color:white;font-size:27px;border:1px solid #9864dc;touch-action:manipulation}
  #gameShell .v23-sheet #moveChoices{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px!important;padding:2px!important;margin:0!important;background:none!important;border:0!important}
  #gameShell .v23-sheet #moveChoices[hidden]{display:none!important}
  #gameShell .v23-sheet .move-legend{grid-column:1/-1;padding:7px!important;min-height:0!important;font-size:11px!important;line-height:1.3!important}
  #gameShell .v23-sheet .move-choice{min-height:49px!important;padding:8px!important;border-radius:12px!important;font-size:11px!important;line-height:1.2!important}
  #gameShell .v23-sheet .move-change-die{grid-column:1/-1}
  #gameShell .v23-sheet .v23-seat-full{display:flex!important;flex-direction:column!important;gap:8px!important}
  #gameShell .v23-sheet .v23-seat-full .seat-list{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important}
  #gameShell .v23-sheet .v23-seat-full .v12-score-caption{grid-column:1/-1}
  #gameShell .v23-sheet .v23-seat-full .player-seat{min-width:0!important}
  #gameShell .v23-sheet .v23-empty{font-size:13px;color:#ead7fc;padding:12px;text-align:center}
  #gameShell .v23-share-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:10px}
  #gameShell .v23-share-row button{border:1px solid #e0bc68;background:#f3ce76;color:#2b1738;border-radius:12px;padding:11px;font-weight:900}
  #gameShell .v23-share-code{display:block;font-weight:900;font-size:22px;color:#ffda80;letter-spacing:.14em;text-align:center;margin:8px}
}
@media(max-width:390px){
  #gameShell .board-stage{width:min(calc(100vw - 12px),calc(100dvh - 234px))!important}
  #gameShell .dice-left{max-width:100px!important;flex-basis:80px!important}
  #gameShell .dice-controls .die{width:38px!important;height:38px!important;min-width:38px!important}
  #gameShell #rollButton{min-width:58px!important;font-size:9px!important}
}
