/* 데스크펫 v1.5 — 펫블록 화면: 판(캔버스)이 화면 대부분, 카드(점수·시간·배부름·보너스 코인)는 작게
 *  js/petblocks.js pickLayout 이 판이 더 커지는 쪽을 골라 .pb-root 에 붙임
 *    .pb-h = 카드를 판 오른쪽 좁은 세로 열로 (가로로 넓은 화면)
 *    .pb-v = 카드를 판 아래 얇은 줄로 (세로로 긴 화면 · 폰)
 *  일시정지는 위쪽 바 [일시정지] 버튼이 늘 있으므로 좁은 모양에선 카드 속 버튼을 숨김
 *  검사: node _dev/tests/test_hud_ratio.mjs */

/* ---------- 판 옆 좁은 열 ---------- */
.pb-root.pb-h { flex-direction: row; align-items: center; column-gap: clamp(10px, 1.2vw, 20px); }
.pb-root.pb-h .pb-side { display: flex; flex-direction: column; justify-content: center; width: clamp(150px, 12vw, 210px); max-width: none; gap: clamp(6px, 1vh, 10px); padding-bottom: 0; }
.pb-root.pb-h .pb-card { flex: none; padding: 6px 12px 8px; gap: 3px; border-radius: 16px; box-shadow: 0 4px 0 rgba(43,27,23,.2); }
.pb-root.pb-h .pb-lab { font-size: clamp(12px, 1.6vh, 15px); }
.pb-root.pb-h .pb-scoreN { font-size: clamp(26px, 4vh, 40px); }
.pb-root.pb-h .pb-timeN { font-size: clamp(16px, 2.3vh, 22px); }
.pb-root.pb-h .pb-coinN { font-size: clamp(20px, 3vh, 28px); }
.pb-root.pb-h .pb-coinico, .pb-root.pb-h .pb-petico { width: clamp(22px, 3.4vh, 32px); height: clamp(22px, 3.4vh, 32px); }
.pb-root.pb-h .pb-c-gauge { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.pb-root.pb-h .pb-c-gauge .pb-row { flex: none; gap: 6px; }
.pb-root.pb-h .pb-gN { min-width: 0; font-size: 12px; }
.pb-root.pb-h .pb-fav { font-size: 12px; }
.pb-root.pb-h .pb-fav img { width: 20px; height: 20px; }
.pb-root.pb-h .pb-bar { height: 14px; }
.pb-root.pb-h .pb-btn { height: clamp(40px, 5.6vh, 50px); font-size: clamp(16px, 2.2vh, 20px); }
.pb-root.pb-h .pb-frame { padding: 10px; border-radius: 28px; }
/* 낮은 화면(≤ 820): 일시정지는 위쪽 바 버튼으로 */
@media (max-height: 820px) { .pb-root.pb-h .pb-pause { display: none; } }

/* ---------- 판 아래 얇은 줄 ---------- */
.pb-root.pb-v { flex-direction: column; align-items: center; row-gap: 8px; }
.pb-root.pb-v .pb-pause { display: none; }
.pb-root.pb-v .pb-frame { padding: 8px; border-radius: 24px; }
/* 폰보다 넓으면: 카드 4장을 한 줄로 (점수 · 시간 · 배부름 · 코인) */
@media (min-width: 561px) {
  .pb-root.pb-v .pb-side { display: grid; width: calc(var(--pb-boardpx, 480px) + 24px); max-width: 100%; grid-template-columns: 1fr 1.2fr 1.6fr 0.9fr; grid-template-rows: auto; gap: 8px; padding-bottom: 0; }
  .pb-root.pb-v .pb-c-score, .pb-root.pb-v .pb-c-time, .pb-root.pb-v .pb-c-gauge, .pb-root.pb-v .pb-c-coin { grid-row: 1; grid-column: auto; }
  .pb-root.pb-v .pb-card { padding: 4px 10px 6px; gap: 2px; border-radius: 14px; box-shadow: 0 4px 0 rgba(43,27,23,.2); }
  .pb-root.pb-v .pb-lab { font-size: 12px; }
  .pb-root.pb-v .pb-scoreN { font-size: 26px; }
  .pb-root.pb-v .pb-timeN { font-size: 17px; }
  .pb-root.pb-v .pb-coinN { font-size: 20px; }
  .pb-root.pb-v .pb-coinico, .pb-root.pb-v .pb-petico { width: 22px; height: 22px; }
  .pb-root.pb-v .pb-bar { height: 14px; }
  .pb-root.pb-v .pb-row { gap: 6px; }
  .pb-root.pb-v .pb-c-gauge { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .pb-root.pb-v .pb-c-gauge .pb-row { flex: none; }
  .pb-root.pb-v .pb-gN { min-width: 0; font-size: 11px; }
  .pb-root.pb-v .pb-fav { display: none; }
}
/* 폰 세로: mobile.css 의 3칸+게이지 두 줄 그대로, 판 액자만 얇게 */
@media (max-width: 560px) {
  .pb-root.pb-v { row-gap: 6px; }
  .pb-root.pb-v .pb-frame { padding: 4px; border-width: 3px; border-radius: 20px; }
}
