/* v197 — 좌측 폭 5% 확장 / 연출 애니메이션 무대 / 좌측 순서 / 전투필드 여백 제거 */
@media (min-width:851px){
  body.unified-left-layout:not(.ui-mode-mobile-preview) .app{
    grid-template-columns:435px minmax(720px,1fr)!important; /* v196 414px에서 약 5% 확장 */
  }

  /* 요청 순서: 효과창 → 적·아군 본진 → 아군 핸드 → 항복·셔플·턴종료 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-panel{order:1!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-menu-dock{order:2!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-setup-host{order:3!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-section{order:4!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host{order:5!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host{order:6!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-combat-controls-host{order:7!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hq-utility-section{order:8!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-utility-action-row{order:9!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) #desktopOnlineMatchInfo{order:10!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) #desktopMatchWaitingNotice{order:11!important;}

  /* 설정 / 규칙확인 / PC / 모바일 한 줄, 카드관리 버튼과 동일한 높이 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-utility-action-row{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:5px!important;
    width:100%!important;
    padding:7px!important;
    border-top:1px solid #5b3e20!important;
    border-bottom:1px solid #5b3e20!important;
    background:#080d10!important;
    box-sizing:border-box!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-utility-action-row .btn{
    width:100%!important;
    min-width:0!important;
    height:42px!important;
    min-height:42px!important;
    max-height:42px!important;
    box-sizing:border-box!important;
    padding:0 3px!important;
    font-size:10px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-utility-action-row #settingsBtn,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-utility-action-row #rulesBtn,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-utility-action-row .btn[data-ui-mode]{
    height:42px!important;
    min-height:42px!important;
    max-height:42px!important;
    box-sizing:border-box!important;
    padding:4px 3px!important;
    font-size:10px!important;
    line-height:1!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-bottom-actions,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .desktop-ui-mode-switch{
    display:none!important;
  }

  /* 연출효과 창: 크기는 고정하고 실제 애니메이션 무대로 사용 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-body{
    height:186px!important;
    min-height:186px!important;
    max-height:186px!important;
    padding:6px!important;
    overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-card{
    display:grid!important;
    grid-template-rows:20px minmax(0,1fr) 25px!important;
    gap:4px!important;
    height:100%!important;
    min-height:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-title{
    min-height:20px!important;
    height:20px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-stage{
    position:relative!important;
    min-height:0!important;
    overflow:hidden!important;
    isolation:isolate!important;
    border:1px solid #314e68!important;
    background:radial-gradient(circle at 50% 42%,#162a3c,#070c11 72%)!important;
    box-shadow:inset 0 0 18px #000!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-stage .hq-card-scene.left-effect-preview-scene{
    position:absolute!important;
    inset:0!important;
    left:0!important;
    top:0!important;
    right:0!important;
    bottom:0!important;
    width:100%!important;
    height:100%!important;
    min-width:0!important;
    min-height:0!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    z-index:1!important;
    border-radius:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-stage .hq-card-scene .scene-label{
    left:5px!important;
    right:5px!important;
    bottom:4px!important;
    padding:3px 5px!important;
    font-size:9px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-stage .hq-card-scene .scene-effect-caption{
    top:5px!important;
    left:5px!important;
    right:5px!important;
    gap:2px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-stage .hq-card-scene .scene-title-big{
    padding:2px 7px!important;
    font-size:11px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-stage .hq-card-scene .scene-title-small{
    padding:2px 6px!important;
    font-size:8px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-stage-badge{
    position:absolute!important;
    top:5px!important;
    left:5px!important;
    z-index:20!important;
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    padding:3px 6px!important;
    border:1px solid #ffffff3a!important;
    background:#03070cd9!important;
    color:#fff4da!important;
    font-size:9px!important;
    font-weight:900!important;
    pointer-events:none!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-stage-badge span{
    color:#9ed0ff!important;
    font-weight:800!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-scene-tabs{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:4px!important;
    min-height:25px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-scene-tab{
    height:25px!important;
    min-height:25px!important;
    padding:2px 3px!important;
    border:1px solid #35485b!important;
    border-radius:0!important;
    background:#0b141d!important;
    color:#aebdca!important;
    font-size:9px!important;
    font-weight:900!important;
    cursor:pointer!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-scene-tab.active{
    border-color:#c58b43!important;
    background:linear-gradient(180deg,#3b2814,#171008)!important;
    color:#ffe7bd!important;
    box-shadow:inset 0 0 0 1px #000!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%,#162a3c,#070c11 72%)!important;
  }

  /* 전투열 박스 바깥 여백 제거: 전투판은 전투열 묶음 크기에 정확히 맞춤 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel{
    align-items:center!important;
    padding:0!important;
    background:transparent!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .boardwrap{
    flex:0 0 auto!important;
    width:var(--v193-formation-w)!important;
    min-width:var(--v193-formation-w)!important;
    max-width:var(--v193-formation-w)!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0 auto!important;
    padding:0!important;
    overflow:visible!important;
    background:none!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{
    width:var(--v193-formation-w)!important;
    min-width:var(--v193-formation-w)!important;
    max-width:var(--v193-formation-w)!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    box-sizing:border-box!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board{
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-start!important;
    align-items:stretch!important;
    gap:0!important;
    background:transparent!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board>.lane{
    margin:0!important;
    border-radius:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .bottom-hud{
    width:100%!important;
    align-self:stretch!important;
  }
}

@media (min-width:851px) and (max-height:900px){
  body.unified-left-layout:not(.ui-mode-mobile-preview) .app{
    grid-template-columns:435px minmax(680px,1fr)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-body{
    height:176px!important;
    min-height:176px!important;
    max-height:176px!important;
  }
}
