/* v186 — PC 좌측 통합 전투 UI */

@media (min-width:851px){
  body.unified-left-layout:not(.ui-mode-mobile-preview) .app{
    width:100%!important;
    height:100vh!important;
    min-height:720px!important;
    grid-template-columns:360px minmax(720px,1fr)!important;
    gap:4px!important;
    padding:4px!important;
    overflow:hidden!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .reference-left{
    grid-column:1!important;
    display:flex!important;
    flex-direction:column!important;
    height:calc(100vh - 8px)!important;
    min-height:0!important;
    padding:0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    scrollbar-width:thin;
    background:linear-gradient(180deg,#070b0e,#0b1013 52%,#06090b)!important;
    border:1px solid #6f4d25!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel{
    grid-column:2!important;
    width:auto!important;
    min-width:0!important;
    height:calc(100vh - 8px)!important;
    min-height:0!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .reference-right{
    display:none!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-panel{order:1}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-menu-dock{order:2}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-setup-host{order:3}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-combat-controls-host{order:4}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host{order:5}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hq-utility-section{order:6}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host{order:7}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-bottom-actions{order:8}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .desktop-ui-mode-switch{order:9}
  body.unified-left-layout:not(.ui-mode-mobile-preview) #desktopOnlineMatchInfo{order:10}
  body.unified-left-layout:not(.ui-mode-mobile-preview) #desktopMatchWaitingNotice{order:11}

  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-status-frame,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-log-frame{
    display:none!important;
  }

  /* 로그인 필수 상태에서도 좌측 로그인 폼만 활성화한다. */
  body.login-required.unified-left-layout:not(.ui-mode-mobile-preview) .app{
    pointer-events:auto!important;
    user-select:auto!important;
    filter:none!important;
  }
  body.login-required.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel,
  body.login-required.unified-left-layout:not(.ui-mode-mobile-preview) .reference-left>:not(.left-auth-panel){
    pointer-events:none!important;
    user-select:none!important;
    filter:brightness(.44) saturate(.65)!important;
  }
  body.login-required.unified-left-layout:not(.ui-mode-mobile-preview) #loginModal{
    display:none!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }

  /* 간편 로그인 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-panel{
    flex:0 0 auto!important;
    padding:0 7px 7px!important;
    background:linear-gradient(180deg,#111920,#080d10)!important;
    border-bottom:1px solid #67451f!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-panel .ornate-title{
    margin:0 -7px 6px!important;
    min-height:27px!important;
    font-size:13px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-fields{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,.72fr)!important;
    gap:5px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-panel input[type="email"],
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-panel input[type="password"]{
    width:100%!important;
    min-width:0!important;
    height:30px!important;
    padding:4px 7px!important;
    border:1px solid #705432!important;
    border-radius:3px!important;
    background:#05090c!important;
    color:#f2eadc!important;
    font-size:11px!important;
    outline:none!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-panel input:focus{
    border-color:#c3924b!important;
    box-shadow:0 0 0 2px #c3924b22!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-remember{
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    margin:5px 0!important;
    color:#cfc1a8!important;
    font-size:10px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr 1fr!important;
    gap:4px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-logged-out[hidden]{display:none!important}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-actions .btn,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-subpanel .btn{
    min-height:29px!important;
    padding:4px 5px!important;
    font-size:10px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-actions .btn.active{
    border-color:#d4a454!important;
    color:#ffe8bb!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-subpanel{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:5px!important;
    margin-top:6px!important;
    padding-top:6px!important;
    border-top:1px solid #4c351d!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-subpanel[hidden]{display:none!important}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-logged-in{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    min-height:36px!important;
    color:#bfe8c7!important;
    font-size:11px!important;
    font-weight:800!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-logged-in[hidden]{display:none!important}

  /* 전투 메뉴 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-menu-dock{
    flex:0 0 auto!important;
    padding:0 7px 7px!important;
    border:0!important;
    border-bottom:1px solid #5b3e20!important;
    background:#080d10!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-menu-dock>.ornate-title{
    margin:0 -7px 6px!important;
    min-height:27px!important;
    font-size:13px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .reference-topbar{
    position:static!important;
    inset:auto!important;
    display:block!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .top-options{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:5px!important;
    width:100%!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .top-options .btn{
    width:100%!important;
    min-width:0!important;
    min-height:31px!important;
    padding:4px!important;
    font-size:10px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .online-account-bar{
    display:none!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .faction-pickers{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:5px!important;
    margin-top:5px!important;
    font-size:9px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .faction-pickers span{
    min-width:0!important;
    padding:4px 5px!important;
    text-align:center!important;
    border:1px solid #46351f!important;
    background:#0b1013!important;
  }

  /* 전투 설정 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-setup-host{
    flex:0 0 auto!important;
    min-height:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-setup-host .compact-settings-holder{
    display:block!important;
    width:100%!important;
    margin:0!important;
    padding:0 7px 7px!important;
    border:0!important;
    border-bottom:1px solid #5b3e20!important;
    background:#080d10!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-setup-host .ornate-title{
    margin:0 -7px 6px!important;
    min-height:27px!important;
    font-size:13px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .formation-control>span{
    display:none!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .formation-inline{
    display:grid!important;
    grid-template-columns:67px minmax(0,1fr) 65px!important;
    gap:5px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .formation-inline select,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .formation-inline .btn{
    min-width:0!important;
    width:100%!important;
    height:31px!important;
    padding:3px 5px!important;
    font-size:9px!important;
  }

  /* 게임 시작 / 셔플 / 턴 종료 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-combat-controls-host{
    display:grid!important;
    grid-template-columns:1.2fr .8fr 1fr!important;
    gap:5px!important;
    flex:0 0 auto!important;
    padding:6px 7px!important;
    border-bottom:1px solid #5b3e20!important;
    background:#0b1013!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-combat-controls-host .btn{
    width:100%!important;
    min-width:0!important;
    min-height:32px!important;
    padding:4px!important;
    font-size:10px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-combat-controls-host .deck-info{display:none!important}

  /* 적군/아군 본진 상태: 작게 나란히 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host{
    flex:0 0 auto!important;
    padding:6px 7px!important;
    border-bottom:1px solid #5b3e20!important;
    background:#080d10!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .battle-status-pair{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:5px!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quickbar{
    position:relative!important;
    display:block!important;
    min-width:0!important;
    min-height:98px!important;
    padding:0 5px 20px!important;
    border:1px solid #72502b!important;
    border-radius:4px!important;
    overflow:hidden!important;
    cursor:pointer!important;
    box-shadow:inset 0 0 14px #0009!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .enemy-quickbar{
    background:linear-gradient(180deg,#3c1718,#13090a)!important;
    border-color:#a25656!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .ally-quickbar{
    background:linear-gradient(180deg,#172a42,#08101b)!important;
    border-color:#547fb1!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quickbar:focus,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quickbar:hover{
    outline:none!important;
    filter:brightness(1.12)!important;
    box-shadow:inset 0 0 14px #0008,0 0 0 2px #d6ab6533!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quickbar-title{
    height:25px!important;
    margin:0 -5px 5px!important;
    padding:5px 6px!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
    font-size:10px!important;
    line-height:15px!important;
    text-align:center!important;
    color:#f4e6cf!important;
    border-bottom:1px solid #ffffff22!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quickbar-stats{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:3px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quick-stat{
    position:relative!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:0!important;
    min-height:29px!important;
    padding:11px 2px 2px!important;
    border:1px solid #ffffff1c!important;
    background:#05080ba6!important;
    font-size:9px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quick-stat::before{
    content:attr(data-stat-label)!important;
    position:absolute!important;
    top:2px!important;
    left:0!important;
    right:0!important;
    color:#aeb8c2!important;
    font-size:6px!important;
    font-weight:900!important;
    letter-spacing:.05em!important;
    text-align:center!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quick-stat:nth-child(4),
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quick-stat:nth-child(5){
    grid-column:span 1!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quick-icon{
    display:none!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quick-stat b{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    color:#fff!important;
    font-size:9px!important;
    line-height:1!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .hq-quickbar-hint{
    position:absolute!important;
    left:5px!important;
    right:5px!important;
    bottom:4px!important;
    color:#cfc3af!important;
    font-size:7px!important;
    text-align:center!important;
    opacity:.85!important;
  }

  /* 필요할 때만 펼치는 아군 본진/책사 기능 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hq-utility-section{
    flex:0 0 auto!important;
    padding:5px 7px 7px!important;
    border-bottom:1px solid #5b3e20!important;
    background:#070b0e!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hq-utility-section[hidden]{display:none!important}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hq-utility-head{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    margin-bottom:5px!important;
    color:#e9d8b8!important;
    font-size:10px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hq-utility-head .btn{
    min-height:25px!important;
    padding:2px 8px!important;
    font-size:9px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hq-utility-host .enemy-hq-row{
    display:none!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hq-utility-host .ally-hq-row{
    display:block!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hq-utility-host .battle-hq{
    width:100%!important;
    height:184px!important;
    min-height:184px!important;
    max-height:184px!important;
    margin:0!important;
    border-radius:5px!important;
  }

  /* 아군 핸드 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host{
    flex:0 0 auto!important;
    min-height:344px!important;
    padding:0!important;
    border-bottom:1px solid #5b3e20!important;
    background:#070b0e!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host .right-hand-section{
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    height:344px!important;
    min-height:344px!important;
    max-height:344px!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    border:0!important;
    background:#080c0d!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host .right-hand-section>.ornate-title{
    display:flex!important;
    flex:0 0 28px!important;
    height:28px!important;
    min-height:28px!important;
    font-size:12px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host .handbox{
    display:flex!important;
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    padding:5px!important;
    overflow:hidden!important;
    border:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host .handhead{
    display:none!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-template-rows:repeat(2,150px)!important;
    grid-auto-rows:150px!important;
    gap:4px!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    padding:0 2px 2px 0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    align-content:start!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card{
    width:100%!important;
    height:150px!important;
    min-width:0!important;
    min-height:150px!important;
    max-height:150px!important;
    margin:0!important;
    grid-template-rows:24px minmax(70px,1fr) auto!important;
    border-radius:4px!important;
    overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card-title-area{
    min-height:24px!important;
    padding:3px 4px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card-name-text{
    font-size:9px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card-title-grade{
    min-width:25px!important;
    padding:1px 3px!important;
    font-size:7px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card-stat-cell{
    min-height:26px!important;
    padding:2px 1px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card-stat-cell b{
    font-size:10px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card-stat-cell span{
    font-size:6px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card-hover-tooltip{
    display:none!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-bottom-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:5px!important;
    flex:0 0 auto!important;
    padding:6px 7px!important;
    border-top:0!important;
    background:#080d10!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-bottom-actions .btn{
    width:100%!important;
    min-height:30px!important;
    font-size:10px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .desktop-ui-mode-switch{
    flex:0 0 auto!important;
    margin:0!important;
    padding:5px 7px!important;
  }

  /* 오른쪽 패널에 있던 보조 덱 박스는 상태 CARD 값으로 대체한다. */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .right-deck-section,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .right-action-strip{
    display:none!important;
  }
}

@media (min-width:851px) and (max-height:850px){
  body.unified-left-layout:not(.ui-mode-mobile-preview) .app{grid-template-columns:342px minmax(680px,1fr)!important}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-auth-panel{padding-bottom:5px!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:304px!important;
    min-height:304px!important;
    max-height:304px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand{
    grid-template-rows:repeat(2,130px)!important;
    grid-auto-rows:130px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card{
    height:130px!important;
    min-height:130px!important;
    max-height:130px!important;
  }
}

/* v187 — 화면 비율 안정화 / 전체화면 사용 억제 / 스크롤바 숨김 */
@media (min-width:851px){
  html,
  body,
  body.unified-left-layout:not(.ui-mode-mobile-preview){
    overflow:hidden!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .app{
    width:min(1088px,calc(100vw - 16px))!important;
    max-width:1088px!important;
    height:min(920px,calc(100vh - 16px))!important;
    min-height:720px!important;
    margin:8px 0 8px 8px!important;
    padding:0!important;
    gap:8px!important;
    grid-template-columns:308px minmax(0,772px)!important;
    justify-content:start!important;
    align-items:stretch!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .reference-left,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel{
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .reference-left{
    overflow-x:hidden!important;
    overflow-y:auto!important;
    scrollbar-width:none!important;
    -ms-overflow-style:none!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .reference-left::-webkit-scrollbar,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host .handbox::-webkit-scrollbar,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand::-webkit-scrollbar{
    width:0!important;
    height:0!important;
    display:none!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host .handbox,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand{
    scrollbar-width:none!important;
    -ms-overflow-style:none!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel{
    width:100%!important;
    overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .boardwrap{
    width:100%!important;
    max-width:100%!important;
    height:100%!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout{
    width:100%!important;
    max-width:none!important;
    height:100%!important;
    min-height:0!important;
    margin:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    height:100%!important;
    min-height:0!important;
    margin:0!important;
    padding:4px 6px 6px!important;
    gap:6px!important;
    grid-template-rows:122px 96px 96px 126px 96px 96px 122px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .lane,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-battle-row{
    min-height:0!important;
    height:100%!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .lane{
    padding:3px 6px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots{
    min-height:0!important;
    height:100%!important;
    gap:5px!important;
    align-items:stretch!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slot{
    min-height:86px!important;
    height:100%!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host{
    min-height:330px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host .right-hand-section{
    height:330px!important;
    min-height:330px!important;
    max-height:330px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand{
    grid-template-rows:repeat(2,143px)!important;
    grid-auto-rows:143px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card{
    height:143px!important;
    min-height:143px!important;
    max-height:143px!important;
  }
}

@media (min-width:851px) and (max-height:900px){
  body.unified-left-layout:not(.ui-mode-mobile-preview) .app{
    width:min(1048px,calc(100vw - 12px))!important;
    max-width:1048px!important;
    height:min(860px,calc(100vh - 12px))!important;
    margin:6px 0 6px 6px!important;
    gap:6px!important;
    grid-template-columns:296px minmax(0,746px)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board{
    padding:4px 5px 5px!important;
    gap:5px!important;
    grid-template-rows:114px 90px 90px 116px 90px 90px 114px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slot{
    min-height:80px!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:300px!important;
    min-height:300px!important;
    max-height:300px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand{
    grid-template-rows:repeat(2,128px)!important;
    grid-auto-rows:128px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card{
    height:128px!important;
    min-height:128px!important;
    max-height:128px!important;
  }
}

/* v188 — 전투 시작 시 필드 공백/행 붕괴 수정 */
@media (min-width:851px){
  /* v187의 고정 7행 그리드 대신, 실제 표시되는 행 수에 따라 유연하게 배치 */
  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;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    padding:4px 6px 6px!important;
    gap:5px!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > .enemy-hq-row{
    flex:0 0 84px!important;
    min-height:84px!important;
    height:84px!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 > #allyBaseDefenseLane{
    flex:0 0 72px!important;
    min-height:72px!important;
    height:72px!important;
  }

  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 > .lane[data-row="a2"],
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > .lane[data-row="a1"]{
    flex:1 1 0!important;
    min-height:84px!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > .neutral-lane{
    flex:0 0 110px!important;
    min-height:110px!important;
    height:110px!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .lane,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-battle-row{
    width:100%!important;
    min-height:0!important;
    box-sizing:border-box!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .lane{
    padding:3px 6px!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    gap:5px!important;
    align-items:stretch!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slot{
    height:100%!important;
    min-height:74px!important;
    max-height:none!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .unit{
    height:100%!important;
    min-height:0!important;
  }
}

@media (min-width:851px) and (max-height:900px){
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > .enemy-hq-row{
    flex-basis:78px!important;
    min-height:78px!important;
    height:78px!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 > #allyBaseDefenseLane{
    flex-basis:66px!important;
    min-height:66px!important;
    height:66px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > .neutral-lane{
    flex-basis:96px!important;
    min-height:96px!important;
    height:96px!important;
  }
  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 > .lane[data-row="a2"],
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > .lane[data-row="a1"]{
    min-height:76px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slot{
    min-height:68px!important;
  }
}

/* v189 — 핸드/필드 카드 크기 통일 + 전투열 높이 정렬 + 본진진영 스크롤바 제거 */
@media (min-width:851px){
  body.unified-left-layout:not(.ui-mode-mobile-preview){
    --v189-card-w:92px;
    --v189-card-h:124px;
    --v189-card-gap:6px;
    --v189-hand-title-h:28px;
  }

  /* 아군 핸드: 6장이 한 화면에 정확히 보이는 3x2 고정 비율 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host{
    min-height:calc(var(--v189-hand-title-h) + (var(--v189-card-h) * 2) + var(--v189-card-gap) + 14px)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host .right-hand-section{
    height:calc(var(--v189-hand-title-h) + (var(--v189-card-h) * 2) + var(--v189-card-gap) + 14px)!important;
    min-height:calc(var(--v189-hand-title-h) + (var(--v189-card-h) * 2) + var(--v189-card-gap) + 14px)!important;
    max-height:calc(var(--v189-hand-title-h) + (var(--v189-card-h) * 2) + var(--v189-card-gap) + 14px)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host .right-hand-section>.ornate-title{
    flex:0 0 var(--v189-hand-title-h)!important;
    height:var(--v189-hand-title-h)!important;
    min-height:var(--v189-hand-title-h)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host .handbox{
    padding:6px!important;
    overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand{
    grid-template-columns:repeat(3,var(--v189-card-w))!important;
    grid-template-rows:repeat(2,var(--v189-card-h))!important;
    grid-auto-rows:var(--v189-card-h)!important;
    justify-content:center!important;
    align-content:start!important;
    gap:var(--v189-card-gap)!important;
    width:100%!important;
    height:100%!important;
    padding:0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    scrollbar-width:none!important;
    -ms-overflow-style:none!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card{
    width:var(--v189-card-w)!important;
    min-width:var(--v189-card-w)!important;
    max-width:var(--v189-card-w)!important;
    height:var(--v189-card-h)!important;
    min-height:var(--v189-card-h)!important;
    max-height:var(--v189-card-h)!important;
    margin:0!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:6px!important;
    padding:4px 6px 6px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > .enemy-hq-row{
    flex:0 0 84px!important;
    min-height:84px!important;
    height:84px!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{
    flex:1 1 0!important;
    min-height:92px!important;
    height:auto!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .lane,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-battle-row{
    width:100%!important;
    box-sizing:border-box!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .lane{
    padding:3px 6px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .lane .label{
    font-size:12px!important;
    font-weight:800!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{
    justify-content:center!important;
    align-items:stretch!important;
    align-content:center!important;
    gap:var(--v189-card-gap)!important;
    width:100%!important;
    min-height:0!important;
    overflow:hidden!important;
    scrollbar-width:none!important;
    -ms-overflow-style:none!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots::-webkit-scrollbar,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-battlefield-grid::-webkit-scrollbar{
    width:0!important;
    height:0!important;
    display:none!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n4{
    grid-template-columns:repeat(4,var(--v189-card-w))!important;
    width:max-content!important;
    max-width:100%!important;
    margin:0 auto!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n3{
    grid-template-columns:repeat(3,var(--v189-card-w))!important;
    width:max-content!important;
    max-width:100%!important;
    margin:0 auto!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n2{
    grid-template-columns:repeat(2,var(--v189-card-w))!important;
    width:max-content!important;
    max-width:100%!important;
    margin:0 auto!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(--v189-card-w))!important;
    width:max-content!important;
    max-width:100%!important;
    margin:0 auto!important;
    padding:0!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(--v189-card-w)!important;
    min-width:var(--v189-card-w)!important;
    max-width:var(--v189-card-w)!important;
    height:var(--v189-card-h)!important;
    min-height:var(--v189-card-h)!important;
    max-height:var(--v189-card-h)!important;
    margin:0!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .unit{
    height:100%!important;
    min-height:0!important;
    grid-template-rows:22px minmax(0,1fr) 22px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .uimg{
    height:100%!important;
    min-height:0!important;
  }

  /* 본진 진영 내부 스크롤바 제거 및 높이 안정화 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-defense-lane,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .enemy-hq-defense-lane,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .ally-hq-defense-lane{
    overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-defense-lane .hq-battlefield-grid,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .enemy-hq-defense-lane .hq-battlefield-grid,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .ally-hq-defense-lane .hq-battlefield-grid{
    height:var(--v189-card-h)!important;
    min-height:var(--v189-card-h)!important;
    max-height:var(--v189-card-h)!important;
    border:0!important;
    border-radius:6px!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-defense-lane .hq-field-slot,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .enemy-hq-defense-lane .hq-field-slot,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .ally-hq-defense-lane .hq-field-slot{
    border-width:1px!important;
  }
}

@media (min-width:851px) and (max-height:900px){
  body.unified-left-layout:not(.ui-mode-mobile-preview){
    --v189-card-w:88px;
    --v189-card-h:118px;
    --v189-card-gap:5px;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > .enemy-hq-row{
    flex-basis:78px!important;
    min-height:78px!important;
    height:78px!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{
    min-height:86px!important;
  }
}

/* v190 — 전투열 높이·좌측 버튼 통일·본진상태 가독성·카드선 정리 */
@media (min-width:851px){
  body.unified-left-layout:not(.ui-mode-mobile-preview){
    --v190-card-w:88px;
    --v190-card-h:116px;
    --v190-card-gap:6px;
    --v190-button-h:32px;
    --v190-button-fs:10px;
  }

  /* 1) 핸드 카드/전투필드 카드 공통 크기 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host{
    min-height:calc(28px + (var(--v190-card-h) * 2) + var(--v190-card-gap) + 16px)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host .right-hand-section{
    height:calc(28px + (var(--v190-card-h) * 2) + var(--v190-card-gap) + 16px)!important;
    min-height:calc(28px + (var(--v190-card-h) * 2) + var(--v190-card-gap) + 16px)!important;
    max-height:calc(28px + (var(--v190-card-h) * 2) + var(--v190-card-gap) + 16px)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand{
    grid-template-columns:repeat(3,var(--v190-card-w))!important;
    grid-template-rows:repeat(2,var(--v190-card-h))!important;
    grid-auto-rows:var(--v190-card-h)!important;
    gap:var(--v190-card-gap)!important;
    justify-content:center!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card{
    width:var(--v190-card-w)!important;
    min-width:var(--v190-card-w)!important;
    max-width:var(--v190-card-w)!important;
    height:var(--v190-card-h)!important;
    min-height:var(--v190-card-h)!important;
    max-height:var(--v190-card-h)!important;
  }

  /* 2) 전투필드 전투열 높이 확대 — 카드 하단 잘림 방지 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board{
    gap:5px!important;
    padding:4px 6px 6px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > .enemy-hq-row{
    flex:0 0 84px!important;
    min-height:84px!important;
    height:84px!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{
    flex:1 1 0!important;
    min-height:126px!important;
    height:auto!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .lane{
    padding:18px 6px 5px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .lane .label{
    top:3px!important;
    left:8px!important;
    font-size:12px!important;
    line-height:1!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{
    gap:var(--v190-card-gap)!important;
    justify-content:center!important;
    align-items:stretch!important;
    align-content:center!important;
    overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n4{grid-template-columns:repeat(4,var(--v190-card-w))!important;width:max-content!important;margin:0 auto!important}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n3{grid-template-columns:repeat(3,var(--v190-card-w))!important;width:max-content!important;margin:0 auto!important}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n2{grid-template-columns:repeat(2,var(--v190-card-w))!important;width:max-content!important;margin:0 auto!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(--v190-card-w))!important;width:max-content!important;max-width:100%!important;margin:0 auto!important;padding:0!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(--v190-card-w)!important;
    min-width:var(--v190-card-w)!important;
    max-width:var(--v190-card-w)!important;
    height:var(--v190-card-h)!important;
    min-height:var(--v190-card-h)!important;
    max-height:var(--v190-card-h)!important;
    overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .unit{
    height:100%!important;
    min-height:0!important;
    grid-template-rows:24px minmax(0,1fr) 28px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .uimg{
    height:100%!important;
    min-height:0!important;
  }

  /* 3) 좌측 버튼 높이/글씨크기 통일 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .top-options .btn,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .formation-inline .btn,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .formation-inline select,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-combat-controls-host .btn,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-bottom-actions .btn,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-login-host .btn,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .auth-actions .btn{
    height:var(--v190-button-h)!important;
    min-height:var(--v190-button-h)!important;
    max-height:var(--v190-button-h)!important;
    padding:4px 8px!important;
    font-size:var(--v190-button-fs)!important;
    line-height:1.1!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .top-options .btn,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-bottom-actions .btn,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-combat-controls-host .btn,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .formation-inline .btn{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
  }

  /* 4) 본진 상태 박스 가독성 향상 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quickbar{
    min-height:112px!important;
    padding:0 6px 23px!important;
    border-radius:5px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quickbar-title{
    height:28px!important;
    margin:0 -6px 6px!important;
    padding:6px 6px!important;
    font-size:11px!important;
    font-weight:900!important;
    line-height:16px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quickbar-stats{
    gap:4px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quick-stat{
    min-height:34px!important;
    padding:13px 2px 3px!important;
    font-size:10px!important;
    border-radius:3px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quick-stat::before{
    top:2px!important;
    font-size:7px!important;
    color:#cad4de!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quick-stat b{
    font-size:12px!important;
    font-weight:1000!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .hq-quickbar-hint{
    font-size:8px!important;
    bottom:5px!important;
  }

  /* 5) 아이템 카드 능력치 표기: 공/방/체 +수치 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card.item-stat-card .card-stat-grid{
    grid-template-columns:1fr!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card.item-stat-card .card-stat-cell{
    border-right:0!important;
    border-bottom:1px solid rgba(255,255,255,.12)!important;
    justify-content:flex-start!important;
    padding:0 6px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card.item-stat-card .card-stat-cell:last-child{
    border-bottom:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card.item-stat-card .card-stat-cell b{
    font-size:11px!important;
    color:#fff2bd!important;
    letter-spacing:.01em!important;
  }

  /* 6) 카드 테두리 얇게, 사용 가능 상태도 굵기 동일 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battlefield-layout .unit,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .hq-field-slot .base-unit{
    border-width:1px!important;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.06),0 2px 7px rgba(0,0,0,.55)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card.grade-border-SSS,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .unit.grade-border-SSS,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .base-unit.grade-border-SSS,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card.grade-border-SS,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .unit.grade-border-SS,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .base-unit.grade-border-SS,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card.grade-border-S,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .unit.grade-border-S,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .base-unit.grade-border-S,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card.grade-border-RR,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .unit.grade-border-RR,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .base-unit.grade-border-RR,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card.grade-border-R,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .unit.grade-border-R,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .base-unit.grade-border-R,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card.grade-border-U,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .unit.grade-border-U,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .base-unit.grade-border-U,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card.grade-border-C,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .unit.grade-border-C,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .base-unit.grade-border-C{
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.05),0 2px 7px rgba(0,0,0,.55)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card.affordable,
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card.actionable-card:not(.opening-hand-card){
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.14),0 0 10px rgba(255,255,255,.08),0 2px 7px rgba(0,0,0,.55)!important;
    transform:none!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card.affordable{
    border-color:var(--card-accent,#d6e5f8)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card.actionable-card:not(.opening-hand-card){
    border-color:color-mix(in srgb,var(--card-accent,#9de3aa) 78%, white 22%)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card.affordable:not(.selected)::after{
    inset:1px!important;
    border-width:1px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .slot.valid,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .slot.supportable,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .slot.movable,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .slot.attackable{
    outline:none!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .slot.valid{box-shadow:inset 0 0 0 1px #9fd9ff,0 0 8px rgba(159,217,255,.30)!important}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .slot.supportable{box-shadow:inset 0 0 0 1px #a8efc2,0 0 8px rgba(168,239,194,.28)!important}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .slot.movable{box-shadow:inset 0 0 0 1px #f6d88a,0 0 8px rgba(246,216,138,.28)!important}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .slot.attackable{box-shadow:inset 0 0 0 1px #ffaaa0,0 0 8px rgba(255,170,160,.30)!important}

  /* 7) 본진 진영 내부 스크롤 방지 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .enemy-hq-defense-lane .hq-battlefield-grid,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .ally-hq-defense-lane .hq-battlefield-grid,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .hq-defense-lane .hq-battlefield-grid{
    height:var(--v190-card-h)!important;
    min-height:var(--v190-card-h)!important;
    max-height:var(--v190-card-h)!important;
    overflow:hidden!important;
  }
}

@media (min-width:851px) and (max-height:900px){
  body.unified-left-layout:not(.ui-mode-mobile-preview){
    --v190-card-w:84px;
    --v190-card-h:110px;
    --v190-card-gap:5px;
  }
  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{
    min-height:120px!important;
  }
}

/* v191 — 전투열 카드 위치 재정렬 / 카드 비율 2:3.1 고정 / 좌우 빈 공간 축소 */
@media (min-width:851px){
  body.unified-left-layout:not(.ui-mode-mobile-preview){
    --v191-card-w:78px;
    --v191-card-h:121px; /* 2 : 3.1 비율 */
    --v191-card-gap:6px;
    --v191-lane-label-h:16px;
  }

  /* 핸드 카드도 동일 비율 고정 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host{
    min-height:calc(28px + (var(--v191-card-h) * 2) + var(--v191-card-gap) + 16px)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host .right-hand-section{
    height:calc(28px + (var(--v191-card-h) * 2) + var(--v191-card-gap) + 16px)!important;
    min-height:calc(28px + (var(--v191-card-h) * 2) + var(--v191-card-gap) + 16px)!important;
    max-height:calc(28px + (var(--v191-card-h) * 2) + var(--v191-card-gap) + 16px)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand{
    grid-template-columns:repeat(3,var(--v191-card-w))!important;
    grid-template-rows:repeat(2,var(--v191-card-h))!important;
    grid-auto-rows:var(--v191-card-h)!important;
    gap:var(--v191-card-gap)!important;
    justify-content:center!important;
    align-content:start!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card{
    width:var(--v191-card-w)!important;
    min-width:var(--v191-card-w)!important;
    max-width:var(--v191-card-w)!important;
    height:var(--v191-card-h)!important;
    min-height:var(--v191-card-h)!important;
    max-height:var(--v191-card-h)!important;
    aspect-ratio:2 / 3.1!important;
  }

  /* 전투 보드: 행과 카드 위치 재정렬 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:4px!important;
    padding:4px 4px 6px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > .enemy-hq-row{
    flex:0 0 82px!important;
    min-height:82px!important;
    height:82px!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{
    flex:1 1 0!important;
    min-height:137px!important;
    height:auto!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .lane,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-battle-row{
    width:100%!important;
    box-sizing:border-box!important;
    min-height:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .lane{
    padding:16px 3px 3px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .lane .label{
    top:2px!important;
    left:6px!important;
    font-size:12px!important;
    line-height:1!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:flex!important;
    width:100%!important;
    height:auto!important;
    min-height:var(--v191-card-h)!important;
    max-height:none!important;
    justify-content:space-between!important;
    align-items:flex-start!important;
    align-content:flex-start!important;
    gap:var(--v191-card-gap)!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n4>.slot{flex:0 0 var(--v191-card-w)!important}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n3>.slot{flex:0 0 var(--v191-card-w)!important}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n2>.slot{flex:0 0 var(--v191-card-w)!important}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-battlefield-grid>.hq-field-slot{flex:0 0 var(--v191-card-w)!important}

  /* 카드 비율 2:3.1 고정 */
  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(--v191-card-w)!important;
    min-width:var(--v191-card-w)!important;
    max-width:var(--v191-card-w)!important;
    height:var(--v191-card-h)!important;
    min-height:var(--v191-card-h)!important;
    max-height:var(--v191-card-h)!important;
    aspect-ratio:2 / 3.1!important;
    margin:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .unit,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-field-slot .base-unit{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .unit{
    grid-template-rows:22px minmax(0,1fr) 25px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .uimg{
    height:100%!important;
    min-height:0!important;
  }

  /* 본진 진영도 같은 규칙으로 정렬 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .enemy-hq-defense-lane,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .ally-hq-defense-lane,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .hq-defense-lane{
    overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .enemy-hq-defense-lane .hq-battlefield-grid,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .ally-hq-defense-lane .hq-battlefield-grid,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .hq-defense-lane .hq-battlefield-grid{
    min-height:var(--v191-card-h)!important;
    height:var(--v191-card-h)!important;
    max-height:var(--v191-card-h)!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
}

@media (min-width:851px) and (max-height:900px){
  body.unified-left-layout:not(.ui-mode-mobile-preview){
    --v191-card-w:75px;
    --v191-card-h:116px;
    --v191-card-gap:5px;
  }
  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{
    min-height:132px!important;
  }
}

/* v191 — 전투열 카드 위치 재정렬 / 2:3.1 비율 고정 / 좌우 여백 제거 */
@media (min-width:851px){
  body.unified-left-layout:not(.ui-mode-mobile-preview){
    --v191-card-w:80px;
    --v191-card-h:124px; /* 2 : 3.1 비율 */
    --v191-card-gap:6px;
    --v191-lane-pad-x:4px;
    --v191-lane-pad-top:18px;
  }

  /* 핸드 카드도 동일 비율로 고정 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host{
    min-height:calc(28px + (var(--v191-card-h) * 2) + var(--v191-card-gap) + 16px)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host .right-hand-section{
    height:calc(28px + (var(--v191-card-h) * 2) + var(--v191-card-gap) + 16px)!important;
    min-height:calc(28px + (var(--v191-card-h) * 2) + var(--v191-card-gap) + 16px)!important;
    max-height:calc(28px + (var(--v191-card-h) * 2) + var(--v191-card-gap) + 16px)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand{
    grid-template-columns:repeat(3,var(--v191-card-w))!important;
    grid-template-rows:repeat(2,var(--v191-card-h))!important;
    grid-auto-rows:var(--v191-card-h)!important;
    gap:var(--v191-card-gap)!important;
    justify-content:space-between!important;
    align-content:start!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card{
    width:var(--v191-card-w)!important;
    min-width:var(--v191-card-w)!important;
    max-width:var(--v191-card-w)!important;
    height:var(--v191-card-h)!important;
    min-height:var(--v191-card-h)!important;
    max-height:var(--v191-card-h)!important;
  }

  /* 전투열 높이와 위치를 카드 비율 기준으로 재정렬 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board{
    gap:4px!important;
    padding:4px 4px 6px!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{
    flex:0 0 auto!important;
    min-height:calc(var(--v191-card-h) + var(--v191-lane-pad-top) + 8px)!important;
    height:auto!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .lane,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-defense-lane,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .enemy-hq-defense-lane,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .ally-hq-defense-lane{
    padding:var(--v191-lane-pad-top) var(--v191-lane-pad-x) 4px!important;
    overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .lane .label,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-defense-lane .label,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .enemy-hq-defense-lane .label,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .ally-hq-defense-lane .label{
    top:2px!important;
    left:6px!important;
    font-size:12px!important;
    line-height:1!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{
    width:100%!important;
    max-width:none!important;
    min-height:var(--v191-card-h)!important;
    height:var(--v191-card-h)!important;
    padding:0!important;
    margin:0!important;
    justify-content:space-between!important;
    align-items:stretch!important;
    align-content:stretch!important;
    gap:var(--v191-card-gap)!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n4{
    display:grid!important;
    grid-template-columns:repeat(4,var(--v191-card-w))!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n3{
    display:grid!important;
    grid-template-columns:repeat(3,var(--v191-card-w))!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n2{
    display:grid!important;
    grid-template-columns:repeat(2,var(--v191-card-w))!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{
    display:grid!important;
    grid-template-columns:repeat(5,var(--v191-card-w))!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(--v191-card-w)!important;
    min-width:var(--v191-card-w)!important;
    max-width:var(--v191-card-w)!important;
    height:var(--v191-card-h)!important;
    min-height:var(--v191-card-h)!important;
    max-height:var(--v191-card-h)!important;
    aspect-ratio:2 / 3.1!important;
    margin:0!important;
    justify-self:stretch!important;
    align-self:stretch!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .unit,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .base-unit{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
  }

  /* 본진 진영도 동일 비율/정렬로 맞춤 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .enemy-hq-defense-lane .hq-battlefield-grid,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .ally-hq-defense-lane .hq-battlefield-grid,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .hq-defense-lane .hq-battlefield-grid{
    height:var(--v191-card-h)!important;
    min-height:var(--v191-card-h)!important;
    max-height:var(--v191-card-h)!important;
  }
}

@media (min-width:851px) and (max-height:900px){
  body.unified-left-layout:not(.ui-mode-mobile-preview){
    --v191-card-w:76px;
    --v191-card-h:118px;
    --v191-card-gap:5px;
  }
}

/* v192 — 카드 2.5:3.5 비율 / 핸드 이름 표시 / 아이템 표기 / 전투열 여백 재조정 */
@media (min-width:851px){
  body.unified-left-layout:not(.ui-mode-mobile-preview){
    --v192-card-w:84px;
    --v192-card-h:117.6px; /* 2.5 : 3.5 = 5 : 7 */
    --v192-card-gap:6px;
  }

  /* 핸드 카드: 비율 고정 + 이름 잘림 완화 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host{
    min-height:calc(28px + (var(--v192-card-h) * 2) + var(--v192-card-gap) + 18px)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host .right-hand-section{
    height:calc(28px + (var(--v192-card-h) * 2) + var(--v192-card-gap) + 18px)!important;
    min-height:calc(28px + (var(--v192-card-h) * 2) + var(--v192-card-gap) + 18px)!important;
    max-height:calc(28px + (var(--v192-card-h) * 2) + var(--v192-card-gap) + 18px)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand{
    grid-template-columns:repeat(3,var(--v192-card-w))!important;
    grid-template-rows:repeat(2,var(--v192-card-h))!important;
    grid-auto-rows:var(--v192-card-h)!important;
    gap:var(--v192-card-gap)!important;
    justify-content:space-between!important;
    align-content:start!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card{
    width:var(--v192-card-w)!important;
    min-width:var(--v192-card-w)!important;
    max-width:var(--v192-card-w)!important;
    height:var(--v192-card-h)!important;
    min-height:var(--v192-card-h)!important;
    max-height:var(--v192-card-h)!important;
    aspect-ratio:2.5 / 3.5!important;
    grid-template-rows:30px minmax(0,1fr) 28px!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card .card-title-area{
    grid-template-columns:minmax(0,1fr) auto auto!important;
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
    padding:2px 4px!important;
    align-items:start!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card .card-name-text{
    white-space:normal!important;
    overflow:hidden!important;
    text-overflow:clip!important;
    display:-webkit-box!important;
    -webkit-line-clamp:2!important;
    -webkit-box-orient:vertical!important;
    line-height:1.03!important;
    font-size:10px!important;
    word-break:keep-all!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card .card-ready-badge,
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card .card-title-grade{
    align-self:center!important;
  }

  /* 모든 아이템 핸드 카드 표기: 공/방/체 + 지력,매력(괄호) */
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card.item-stat-card .card-stat-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card.item-stat-card .item-bonus-summary-cell{
    grid-column:1 / -1!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:2px!important;
    padding:2px 3px!important;
    border-right:0!important;
    background:rgba(255,255,255,.03)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card.item-stat-card .item-bonus-summary-cell b{
    font-size:12px!important;
    line-height:1!important;
    color:#fff2bd!important;
    letter-spacing:.02em!important;
    white-space:nowrap!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card.item-stat-card .item-bonus-summary-cell span{
    display:block!important;
    font-size:8px!important;
    line-height:1!important;
    color:#d8dfe8!important;
    white-space:nowrap!important;
  }

  /* 전투열: 카드 위 이름 줄용 여백 제거 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board{
    gap:4px!important;
    padding:4px 4px 6px!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{
    min-height:calc(var(--v192-card-h) + 4px)!important;
    height:auto!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .lane,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-defense-lane,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .enemy-hq-defense-lane,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .ally-hq-defense-lane{
    padding:2px 0 2px!important;
    overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .lane .label,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .hq-defense-lane .label,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .enemy-hq-defense-lane .label,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .ally-hq-defense-lane .label{
    top:1px!important;
    left:6px!important;
    font-size:11px!important;
    line-height:1!important;
    padding:0!important;
    margin:0!important;
    pointer-events:none!important;
    opacity:.92!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(--v192-card-w)!important;
    min-width:var(--v192-card-w)!important;
    max-width:var(--v192-card-w)!important;
    height:var(--v192-card-h)!important;
    min-height:var(--v192-card-h)!important;
    max-height:var(--v192-card-h)!important;
    aspect-ratio:2.5 / 3.5!important;
  }

  /* 전투열: 5장 기준, 좌우 여백은 카드 0.5장씩 */
  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{
    padding:0!important;
    margin:0 auto!important;
    max-width:none!important;
    height:var(--v192-card-h)!important;
    min-height:var(--v192-card-h)!important;
    gap:var(--v192-card-gap)!important;
    align-items:stretch!important;
    align-content:stretch!important;
    justify-content:center!important;
    overflow:hidden!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{
    width:calc((var(--v192-card-w) * 6) + (var(--v192-card-gap) * 4))!important;
    grid-template-columns:repeat(5,var(--v192-card-w))!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n4{
    width:calc((var(--v192-card-w) * 5) + (var(--v192-card-gap) * 3))!important;
    grid-template-columns:repeat(4,var(--v192-card-w))!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n3{
    width:calc((var(--v192-card-w) * 4) + (var(--v192-card-gap) * 2))!important;
    grid-template-columns:repeat(3,var(--v192-card-w))!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .slots.n2{
    width:calc((var(--v192-card-w) * 3) + (var(--v192-card-gap) * 1))!important;
    grid-template-columns:repeat(2,var(--v192-card-w))!important;
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview) .enemy-hq-defense-lane .hq-battlefield-grid,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .ally-hq-defense-lane .hq-battlefield-grid,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .hq-defense-lane .hq-battlefield-grid{
    height:var(--v192-card-h)!important;
    min-height:var(--v192-card-h)!important;
    max-height:var(--v192-card-h)!important;
  }
}

@media (min-width:851px) and (max-height:900px){
  body.unified-left-layout:not(.ui-mode-mobile-preview){
    --v192-card-w:80px;
    --v192-card-h:112px;
    --v192-card-gap:5px;
  }
}
