/* v196 — 상태표시 단일 박스 / 카드 연출효과 패널 / 카드 3.3:4.8 / 라운딩 제거 */
@media (min-width:851px){
  body.unified-left-layout:not(.ui-mode-mobile-preview) .app{
    grid-template-columns:414px minmax(720px,1fr)!important; /* 기존 360px 대비 15% 확장 */
  }

  body.unified-left-layout:not(.ui-mode-mobile-preview){
    --v193-card-w:84px;
    --v193-card-h:122.1818px; /* 3.3 : 4.8 */
    --v193-field-gap:6px;
    --v193-hand-gap:0px;
    --v193-hand-section-h:302px;
    --v193-formation-w:534px; /* 카드 6장 + 간격 5개 */
    --v193-five-card-w:444px;
    --v193-four-card-w:354px;
    --v193-three-card-w:264px;
    --v193-two-card-w:174px;
    --v193-lane-h:126.1818px;
  }

  /* 핸드: 3.3 x 4.8 비율, 가로·세로 카드 사이 여백 제거 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host{min-height:var(--v193-hand-section-h)!important;}
  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 #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;
    column-gap:0!important;row-gap:0!important;gap:0!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(--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;
  }

  /* 전투 카드도 핸드와 동일한 3.3 x 4.8 비율 */
  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;
  }

  /* 전투진영 박스: 카드 6장 + 카드 사이 간격 5개가 정확히 들어가는 폭 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board{align-items:center!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;align-self:center!important;padding:2px 0 0!important;margin-left:auto!important;margin-right:auto!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;gap:var(--v193-field-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{
    display:grid!important;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;margin:0 auto!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(--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;margin:0 auto!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(--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;margin:0 auto!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(--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;margin:0 auto!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(--v193-card-h)!important;min-height:var(--v193-card-h)!important;max-height:var(--v193-card-h)!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-combat-controls-host{order:6!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hq-utility-section{order:7!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host{order:8!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-bottom-actions{order:9!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .desktop-ui-mode-switch{order:10!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) #desktopOnlineMatchInfo{order:11!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) #desktopMatchWaitingNotice{order:12!important;}

  /* 양측 상태 표시: 한 개의 외곽 박스 안에 적/아군 반반 배치 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host{
    padding:6px 7px!important;
    background:#080d10!important;
    border-bottom:1px solid #5b3e20!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:0!important;
    margin:0!important;
    padding:0!important;
    width:100%!important;
    border:1px solid #7a532c!important;
    background:linear-gradient(180deg,#0e1418,#080b0f)!important;
    box-shadow:0 8px 24px #0008,inset 0 0 0 1px #000!important;
    overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quickbar{
    min-width:0!important;
    min-height:78px!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    cursor:default!important;
    overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .enemy-quickbar{
    background:linear-gradient(180deg,#351517,#12090a)!important;
    border-right:1px solid #7a532c!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .ally-quickbar{
    background:linear-gradient(180deg,#122946,#08111c)!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quickbar:hover,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quickbar:focus{filter:none!important;outline:none!important;box-shadow:none!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quickbar-title{
    display:flex!important;align-items:center!important;gap:4px!important;height:28px!important;margin:0!important;padding:0 8px!important;
    border-bottom:1px solid #ffffff22!important;font-size:12px!important;font-weight:900!important;line-height:1!important;color:#e8edf2!important;
    text-align:left!important;letter-spacing:-.01em!important;white-space:nowrap!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .enemy-quickbar .hq-quickbar-title{color:#ffdbde!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .ally-quickbar .hq-quickbar-title{color:#dbeaff!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quickbar-stats{
    display:flex!important;align-items:center!important;gap:8px!important;padding:8px 8px 9px!important;flex-wrap:wrap!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quick-stat{
    position:relative!important;display:inline-flex!important;align-items:center!important;justify-content:flex-start!important;gap:3px!important;
    min-width:0!important;min-height:0!important;padding:0!important;border:0!important;background:transparent!important;font-size:12px!important;color:#f6f7fb!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quick-stat::before{display:none!important;content:none!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quick-icon{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:auto!important;min-width:10px!important;font-size:13px!important;line-height:1!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quick-stat b{color:#fff!important;font-size:12px!important;font-weight:900!important;line-height:1!important;white-space:nowrap!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .enemy-quickbar .hq-quick-stat.turn{display:none!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-battle-status-host .hq-quickbar-hint{display:none!important;}

  /* 일반 카드 연출효과 패널 — 고정 크기 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-section{
    padding:0 7px 7px!important;background:#080d10!important;border-bottom:1px solid #5b3e20!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-head{
    display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;
    padding:6px 8px!important;border:1px solid #6e4926!important;border-bottom:0!important;background:linear-gradient(180deg,#1d1710,#0b0a09)!important;
    color:#f1e3c8!important;font-size:12px!important;font-weight:900!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-head small{color:#bba88b!important;font-size:9px!important;font-weight:700!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;overflow:hidden!important;
    padding:8px!important;border:1px solid #6e4926!important;background:linear-gradient(180deg,#0d1318,#090d10)!important;
    box-shadow:inset 0 0 0 1px #000!important;color:#d8e0ea!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-card{display:grid!important;grid-template-columns:1fr!important;gap:6px!important;height:100%!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-title{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;color:#fff3da!important;min-height:18px!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-title b{font-size:13px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-type{flex:0 0 auto!important;padding:2px 6px!important;border:1px solid #7a5b33!important;background:#15110c!important;color:#f6dfb4!important;font-size:9px!important;font-weight:900!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-note{color:#8fbaff!important;font-size:9px!important;font-weight:800!important;line-height:1.2!important;min-height:12px!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card-effect-empty{display:flex!important;align-items:center!important;justify-content:center!important;height:100%!important;text-align:center!important;color:#9daaba!important;font-size:10px!important;line-height:1.6!important;padding:0 8px!important;}

  body.unified-left-layout:not(.ui-mode-mobile-preview) .card-scene-grid{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(2,1fr)!important;gap:6px!important;flex:1 1 auto!important;min-height:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card-scene-item{
    display:grid!important;grid-template-columns:58px minmax(0,1fr)!important;gap:6px!important;align-items:center!important;
    min-height:0!important;padding:5px!important;border:1px solid #284157!important;background:linear-gradient(180deg,#0f1c29,#0a121b)!important;overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card-scene-thumb{
    width:58px!important;height:48px!important;border:1px solid #4c647e!important;background:#0b1016!important;overflow:hidden!important;display:flex!important;align-items:center!important;justify-content:center!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card-scene-thumb img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card-scene-thumb.no-image{background:linear-gradient(180deg,#1a2736,#101821)!important;color:#9db8d5!important;font-size:11px!important;font-weight:900!important;letter-spacing:-.02em!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card-scene-meta{min-width:0!important;display:grid!important;gap:4px!important;align-content:center!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card-scene-kind{color:#ffe7bf!important;font-size:10px!important;font-weight:900!important;line-height:1!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card-scene-effect{color:#d5e4f3!important;font-size:10px!important;font-weight:700!important;line-height:1.25!important;word-break:keep-all!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;}

  /* 전투필드에서 전투열 외 공간 여백 축소/제거 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel{padding:0!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .boardwrap{
    padding:0!important;display:flex!important;justify-content:center!important;align-items:stretch!important;overflow:hidden!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout{
    width:var(--v193-formation-w)!important;min-width:var(--v193-formation-w)!important;max-width:var(--v193-formation-w)!important;
    margin:0 auto!important;padding:0!important;display:block!important;
  }
  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;
    margin:0 auto!important;padding:0!important;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout>.board > .river{
    width:var(--v193-formation-w)!important;min-width:var(--v193-formation-w)!important;max-width:var(--v193-formation-w)!important;margin:0 auto!important;
  }

  /* 카드 모서리 라운딩 제거 + 3.3:4.8 비율 고정 */
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card,
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card .cimg,
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card .cstats,
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card .card-stat-cell,
  body.unified-left-layout:not(.ui-mode-mobile-preview) #hand.hand .card .card-title-area,
  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,
  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,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .default-art,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .art,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .grade,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .buff,
  body.unified-left-layout:not(.ui-mode-mobile-preview) .battle-panel .battlefield-layout .typeicon{border-radius:0!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-hand-host #hand.hand .card{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{aspect-ratio:3.3 / 4.8!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){
    --v193-card-w:80px;
    --v193-card-h:116.3636px; /* 3.3 : 4.8 */
    --v193-field-gap:5px;
    --v193-hand-section-h:292px;
    --v193-formation-w:505px;
    --v193-five-card-w:420px;
    --v193-four-card-w:335px;
    --v193-three-card-w:250px;
    --v193-two-card-w:165px;
    --v193-lane-h:120.3636px;
  }
  body.unified-left-layout:not(.ui-mode-mobile-preview) .left-card-effect-body{height:176px!important;min-height:176px!important;max-height:176px!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card-scene-item{grid-template-columns:52px minmax(0,1fr)!important;}
  body.unified-left-layout:not(.ui-mode-mobile-preview) .card-scene-thumb{width:52px!important;height:42px!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{
    width:var(--v193-formation-w)!important;min-width:var(--v193-formation-w)!important;max-width:var(--v193-formation-w)!important;
  }
}
