/* =====================================================================
   v228 — 전투열 실제 폭 복구 + 카드 비율 유지
   원인: 현재 HTML에서는 본진이 board 안으로 이동했지만 예전의 2열
   battlefield-layout(필드 + 우측 레일) 규칙이 남아 보이지 않는 빈 우측 열이
   약 23~25%의 폭을 계속 차지하고 있었다. board를 단일 열 전체 폭으로 복구한다.
   ===================================================================== */
@media (min-width:851px){
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .boardwrap{
    width:100%!important;
    min-width:0!important;
    padding-left:6px!important;
    padding-right:6px!important;
    overflow-x:hidden!important;
    box-sizing:border-box!important;
  }

  /* 삭제된 우측 레일을 위한 빈 grid 열을 제거한다. */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    padding:0!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board{
    grid-column:1/-1!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    padding-left:4px!important;
    padding-right:4px!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }

  /* 전투열은 전체 폭을 쓰되 카드 자체는 기존 2.5:3.89 크기를 유지한다. */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board>.lane,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board>.hq-battle-row,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board>.hq-defense-lane{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    box-sizing:border-box!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-battlefield-grid{
    display:grid!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    padding:0!important;
    margin:0!important;
    gap:var(--v216-card-gap,6px)!important;
    justify-content:space-evenly!important;
    justify-items:center!important;
    align-items:stretch!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n5,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-battlefield-grid{
    grid-template-columns:repeat(5,minmax(0,var(--v216-card-w,129.789px)))!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n4{
    grid-template-columns:repeat(4,minmax(0,var(--v216-card-w,129.789px)))!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n3{
    grid-template-columns:repeat(3,minmax(0,var(--v216-card-w,129.789px)))!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n2{
    grid-template-columns:repeat(2,minmax(0,var(--v216-card-w,129.789px)))!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slot,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-field-slot{
    width:var(--v216-card-w,129.789px)!important;
    min-width:var(--v216-card-w,129.789px)!important;
    max-width:var(--v216-card-w,129.789px)!important;
    height:var(--v216-card-h,201.894px)!important;
    min-height:var(--v216-card-h,201.894px)!important;
    max-height:var(--v216-card-h,201.894px)!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slot>.unit,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-field-slot>.unit,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-field-slot>.base-unit{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
    box-sizing:border-box!important;
  }
}
