/* v198 — 좌측 폭 복원 / 실제 카드 동작 연출만 표시 / 효과창 50% 확대 / 핸드·전투열 카드 높이 밀착 */
@media (min-width:851px){
  /* v197의 5% 확장을 취소하고 v196 폭으로 복원 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .app{
    grid-template-columns:414px minmax(720px,1fr)!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview){
    /* 핸드 박스 내부 높이(302 - 제목 28 - 상하 패딩 10)를 두 줄이 정확히 채우도록 조정 */
    --v193-card-h:132px;
    --v193-card-w:90.75px; /* 3.3 : 4.8 */
    --v193-field-gap:6px;
    --v193-hand-gap:0px;
    --v193-hand-section-h:302px;
    --v193-formation-w:574.5px; /* 90.75 × 6 + 6 × 5 */
    --v193-five-card-w:477.75px;
    --v193-four-card-w:381px;
    --v193-three-card-w:284.25px;
    --v193-two-card-w:187.5px;
    --v193-lane-h:134px; /* 카드 132 + 상하 테두리 */
  }

  /* 연출효과창 높이 50% 확대: 186px → 279px */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-body{
    height:279px!important;
    min-height:279px!important;
    max-height:279px!important;
    padding:6px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-card.action-view-mode{
    display:grid!important;
    grid-template-rows:24px minmax(0,1fr)!important;
    gap:5px!important;
    height:100%!important;
    min-height:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-title{
    min-height:24px!important;
    height:24px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-stage{
    min-height:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-scene-tabs{
    display:none!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card-effect-empty{
    height:100%!important;
    border:1px solid #314e68!important;
    background:radial-gradient(circle at 50% 42%,#111d27,#070c11 72%)!important;
    color:#7f93a5!important;
  }

  /* 핸드 카드 두 줄이 핸드 카드 박스의 세로 높이를 정확히 채움 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host .right-hand-section{
    height:var(--v193-hand-section-h)!important;
    min-height:var(--v193-hand-section-h)!important;
    max-height:var(--v193-hand-section-h)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host .handbox{
    padding:5px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand{
    grid-template-columns:repeat(3,var(--v193-card-w))!important;
    grid-template-rows:repeat(2,var(--v193-card-h))!important;
    grid-auto-rows:var(--v193-card-h)!important;
    gap:0!important;
    padding:0!important;
    justify-content:center!important;
    align-content:stretch!important;
    overflow-x:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card{
    width:var(--v193-card-w)!important;
    min-width:var(--v193-card-w)!important;
    max-width:var(--v193-card-w)!important;
    height:var(--v193-card-h)!important;
    min-height:var(--v193-card-h)!important;
    max-height:var(--v193-card-h)!important;
    margin:0!important;
    aspect-ratio:3.3 / 4.8!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(--v193-card-w)!important;
    min-width:var(--v193-card-w)!important;
    max-width:var(--v193-card-w)!important;
    height:var(--v193-card-h)!important;
    min-height:var(--v193-card-h)!important;
    max-height:var(--v193-card-h)!important;
    margin:0!important;
    aspect-ratio:3.3 / 4.8!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > #enemyBaseDefenseLane,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > .lane[data-row="e1"],
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > .lane[data-row="e2"],
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > .neutral-lane,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > .lane[data-row="a2"],
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > .lane[data-row="a1"],
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > #allyBaseDefenseLane{
    width:var(--v193-formation-w)!important;
    min-width:var(--v193-formation-w)!important;
    max-width:var(--v193-formation-w)!important;
    height:var(--v193-lane-h)!important;
    min-height:var(--v193-lane-h)!important;
    max-height:var(--v193-lane-h)!important;
    flex:0 0 var(--v193-lane-h)!important;
    padding:0!important;
    overflow:hidden!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{
    height:var(--v193-card-h)!important;
    min-height:var(--v193-card-h)!important;
    max-height:var(--v193-card-h)!important;
    padding:0!important;
    align-items:stretch!important;
    align-content:stretch!important;
    overflow:hidden!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,var(--v193-card-w))!important;
    width:var(--v193-five-card-w)!important;
    min-width:var(--v193-five-card-w)!important;
    max-width:var(--v193-five-card-w)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n4{
    grid-template-columns:repeat(4,var(--v193-card-w))!important;
    width:var(--v193-four-card-w)!important;
    min-width:var(--v193-four-card-w)!important;
    max-width:var(--v193-four-card-w)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n3{
    grid-template-columns:repeat(3,var(--v193-card-w))!important;
    width:var(--v193-three-card-w)!important;
    min-width:var(--v193-three-card-w)!important;
    max-width:var(--v193-three-card-w)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n2{
    grid-template-columns:repeat(2,var(--v193-card-w))!important;
    width:var(--v193-two-card-w)!important;
    min-width:var(--v193-two-card-w)!important;
    max-width:var(--v193-two-card-w)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > .river,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .boardwrap{
    width:var(--v193-formation-w)!important;
    min-width:var(--v193-formation-w)!important;
    max-width:var(--v193-formation-w)!important;
  }
}

@media (min-width:851px) and (max-height:900px){
  body.unified-left-layout:not(.ui-mode-mobile-preview) .app{
    grid-template-columns:414px minmax(680px,1fr)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview){
    /* 낮은 화면: 292 - 제목 28 - 상하 패딩 10 = 254px → 카드 127px × 2 */
    --v193-card-h:127px;
    --v193-card-w:87.3125px;
    --v193-field-gap:5px;
    --v193-hand-section-h:292px;
    --v193-formation-w:548.875px;
    --v193-five-card-w:456.5625px;
    --v193-four-card-w:364.25px;
    --v193-three-card-w:271.9375px;
    --v193-two-card-w:179.625px;
    --v193-lane-h:129px;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-body{
    height:264px!important;
    min-height:264px!important;
    max-height:264px!important;
  }
}
