/* ================================================================
   v214 — 덱 편집 UI 재배치 (PC 데스크톱, min-width:851px 기준)
   1) 덱 요약 문구("장수/지략가/병사/아이템/스킬/점수")를 "아군 덱 편집" 제목 옆으로 이동
   2) 랜덤 구성 비율 + "비율대로 랜덤 구성" 버튼을 카드 검색창 옆으로 이동,
      덱 이름 입력창·카드 검색창 폭을 줄여 공간 확보
   3) 보유 최대치 재설정 / 덱초기화 / 현재덱삭제 / 저장 버튼을 닫기 버튼 옆으로
      작게 이동 (기존 하단 전용 액션바 제거)
   4) 카드 목록 · 현재 덱 두 패널만 본문에 노출 (요약/비율/액션바는 모두 상단으로 이동)
   5) 덱 편집 창 전체 폭을 약 30% 축소하고, 카드도 동일 비율(70%)로 축소
   6) 카드 목록은 1줄에 5장, 현재 덱은 1줄에 4장 고정 표시
   이 파일은 항상 마지막에 로드되어 game.css/v212의 기존 규칙을 덮어쓴다.
   ================================================================ */

@media(min-width:851px){

  /* ---- 1) 헤드: 제목+요약문구 / 액션버튼 소형화 ---- */
  .deck-builder-head{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:10px!important;
    flex-wrap:wrap!important;
  }
  .deck-builder-head-title{
    display:flex!important;
    align-items:baseline!important;
    flex-wrap:wrap!important;
    gap:6px 14px!important;
    min-width:0!important;
  }
  .deck-builder-head-title h2{margin:0!important;font-size:16px!important;white-space:nowrap!important;}
  .deck-builder-head-title .deck-builder-summary{
    padding:0!important;
    border:0!important;
    background:none!important;
    color:#cdbb9e!important;
    font-size:11px!important;
    text-align:left!important;
    white-space:normal!important;
  }
  .deck-builder-head-title .deck-builder-summary b{font-size:12px!important;}
  .deck-builder-head-actions{
    display:flex!important;
    align-items:center!important;
    gap:6px!important;
    flex-wrap:wrap!important;
  }
  .btn.small{
    font-size:10px!important;
    padding:4px 9px!important;
    min-height:0!important;
    border-radius:6px!important;
  }

  /* ---- 2) 툴바: 덱이름/검색창 폭 축소 + 랜덤구성비율·버튼을 검색창 옆으로 ---- */
  .deck-builder-toolbar{
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:end!important;
    gap:8px!important;
  }
  .deck-builder-toolbar>label{flex:0 0 auto!important;min-width:0!important;}
  #deckBuilderName{width:110px!important;min-width:0!important;flex:0 0 110px!important;}
  .deck-builder-search-cluster{
    display:flex!important;
    align-items:end!important;
    gap:8px!important;
    flex:1 1 320px!important;
    flex-wrap:wrap!important;
  }
  #deckBuilderSearch{width:110px!important;min-width:0!important;flex:0 0 110px!important;}
  .deck-auto-ratio-inline{
    display:flex!important;
    align-items:end!important;
    gap:6px!important;
    flex-wrap:wrap!important;
    padding:4px 8px!important;
    border:1px solid #40301f!important;
    background:#0d1115!important;
    border-radius:4px!important;
  }
  .deck-auto-ratio-inline label{
    display:grid!important;
    gap:2px!important;
    font-size:8px!important;
    color:#cdbb9e!important;
  }
  .deck-auto-ratio-inline input[type=number]{
    width:36px!important;
    min-height:24px!important;
    padding:2px 4px!important;
    background:#111925!important;
    color:#e8edf5!important;
    border:1px solid #45556e!important;
  }
  .deck-auto-ratio-inline .btn{white-space:nowrap!important;align-self:end!important;}

  /* ---- 5)+6) 창 30% 축소 + 카드 5열(목록)/4열(현재 덱) 고정 ----
     카드 크기 변수는 #deckBuilderModal 안에서만 재정의되어 카드상점(다른 모달)에는
     영향을 주지 않는다. */
  #deckBuilderModal{
    --collection-card-width:122.5px;
    --collection-card-height:214.375px;
    --collection-card-title-height:33.6px;
    --collection-card-art-height:121.975px;
    --collection-card-stats-height:23.8px;
    --collection-card-desc-height:35px;
  }
  .deck-builder-box{width:min(1230px,96vw)!important;}
  .deck-builder-main{
    grid-template-columns:662px 528px!important;
    gap:8px!important;
  }
  .deck-builder-list{
    grid-template-columns:repeat(5,var(--collection-card-width))!important;
    gap:6px!important;
    justify-content:start!important;
  }
  .deck-builder-list.selected{
    grid-template-columns:repeat(4,var(--collection-card-width))!important;
    gap:6px!important;
  }
}
