/* v357 — LEFT UI FIX: 2026-08-13 */
@media (min-width:851px){
  /* 1) 진영 / 덱이름 / 덱편집 = 정확히 동일 폭 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .right-hand-section>.v287-hand-settings .formation-inline{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:4px!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .right-hand-section>.v287-hand-settings #allyFormationSelect,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .right-hand-section>.v287-hand-settings #battleDeckSelect,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .right-hand-section>.v287-hand-settings #deckBuilderBtn{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:32px!important;
    min-height:32px!important;
    max-height:32px!important;
    margin:0!important;
    padding:2px 5px!important;
    box-sizing:border-box!important;
    font-size:10px!important;
  }

  /* 2) 본진 상태 바로 아래에 덱 설정. 빈 제목줄/여백 제거 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftBattleStatusHost{
    margin:0!important;
    padding:0!important;
    border-bottom:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftBattleStatusHost .battle-status-pair{
    margin:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftHandHost{
    margin:0!important;
    padding:0!important;
    min-height:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftHandHost .right-hand-section{
    margin:0!important;
    padding:0!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    gap:0!important;
  }
  /* 이 빈 바가 본진 상태와 덱 버튼 사이 공간을 만들고 있었음 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftHandHost .right-hand-section>.hand-title-bar{
    display:none!important;
    height:0!important;
    min-height:0!important;
    max-height:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftHandHost .right-hand-section>.v287-hand-settings{
    order:1!important;
    display:block!important;
    flex:0 0 32px!important;
    width:100%!important;
    height:32px!important;
    min-height:32px!important;
    max-height:32px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
    position:relative!important;
    z-index:2!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftHandHost .right-hand-section>.v287-hand-settings .formation-control{
    margin:0!important;
    padding:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftHandHost .right-hand-section>.v287-hand-settings .formation-card-count{
    height:18px!important;
    min-height:18px!important;
    line-height:18px!important;
    margin:0!important;
    padding:0 2px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftHandHost .right-hand-section>.handbox{
    order:2!important;
    /* v365: 이 18px는 v364에서 '카드 n장' 줄을 숨기며 죽은 여백이 되어 핸드가 아래로 밀렸다. */
    margin:0!important;
    padding-top:0!important;
    position:relative!important;
    z-index:1!important;
  }

  /* 3) 로그인 영역: 로그아웃 + 카드상점 + 부스터팩 + 카드관리 한 줄, 메뉴 3개 동일 크기 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftAuthLoggedIn{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:4px!important;
    align-items:center!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftAuthLoggedIn .v357-auth-actions-row{
    flex:0 0 100%!important;
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:4px!important;
    margin:2px 0 0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftAuthLoggedIn .v357-auth-actions-row>#leftLogoutBtn,
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftAuthLoggedIn .v357-auth-actions-row>#cardShopBtn,
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftAuthLoggedIn .v357-auth-actions-row>#boosterPackBtn,
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftAuthLoggedIn .v357-auth-actions-row>#cardManagerBtn{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
    margin:0!important;
    padding:3px 2px!important;
    box-sizing:border-box!important;
    font-size:9px!important;
    line-height:1!important;
    white-space:nowrap!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftAuthLoggedIn .v357-auth-actions-row>#cardShopBtn,
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftAuthLoggedIn .v357-auth-actions-row>#boosterPackBtn,
  body.unified-left-layout:not(.ui-mode-mobile-preview) #leftAuthLoggedIn .v357-auth-actions-row>#cardManagerBtn{
    font-weight:900!important;
  }
}
