/* ============================================================
   v1.3.44 — v1.3.43 의 글자확대 잘림 수정 + 자동확정 실패 사유 표시

   v1.3.43 에서 KPI 값을 한 줄로 고정하면서 칸 폭을 px 로 묶어 두었다.
   글자 크기를 키우면 글자만 커지고 칸은 그대로여서 숫자가 소리 없이 잘렸다.
   2026-09-12 실측: 1.25배 17px, 1.5배 51px, 2배 120px 잘림.
   v1.3.31 에서 고쳤던 문제("글자를 키우면 KPI 값이 잘린다")를 되살린 셈이다.

   고치는 방법:
    1) 칸 최소폭을 px → rem 으로 바꿔 글자 배율을 따라가게 한다.
    2) 칸의 overflow:hidden 을 걷어낸다. 그러면 격자 칸이 글자 최소폭 아래로
       줄지 않으므로 애초에 잘릴 일이 없다. 대신 확대하면 한 줄에 들어가는
       칸 수가 줄어든다 — 잘려서 못 읽는 것보다 낫다.

   PC 밝은 화면 전용. 모바일과 어두운 화면은 건드리지 않는다.
   ============================================================ */

@media (min-width:960px){

  /* ── 1. KPI 숫자가 확대해도 잘리지 않게 ────────────────────── */
  html:not([data-theme="dark"]) .v1321-kpis{
    /* 11.2rem = 기본 179px. 글자를 키우면 칸도 같이 커진다. */
    grid-template-columns:repeat(auto-fit,minmax(11.2rem,1fr))!important;
  }
  html:not([data-theme="dark"]) .v1321-kpis .v1200-kpi{
    /* v1.3.43 의 overflow:hidden 을 걷는다. 격자 칸이 글자보다 좁아지지 않는다. */
    overflow:visible!important;
    min-height:6rem!important;
  }
  html:not([data-theme="dark"]) .v1321-kpis .v1200-kpi>strong{
    max-width:none!important;
  }

  /* ── 2. 자동확정이 막힌 이유 ───────────────────────────────── */
  html:not([data-theme="dark"]) .closing-auto-block{
    display:grid!important;
    gap:2px!important;
    margin:8px 0 0!important;
    padding:8px 10px!important;
    border:1px solid #f0d9a6!important;
    border-radius:9px!important;
    background:#fff7e8!important;
    color:#8a5a0b!important;
  }
  html:not([data-theme="dark"]) .closing-auto-block strong{
    font-size:.84rem!important;
    font-weight:900!important;
    color:#8a5a0b!important;
  }
  html:not([data-theme="dark"]) .closing-auto-block span{
    font-size:.78rem!important;
    line-height:1.45!important;
    color:#6f5a3a!important;
    word-break:break-all!important;
  }
}

/* 이유 표시는 폰에서도 보여야 한다 — 크기만 작게 잡는다.
   (v1.3.43 과 달리 이 규칙은 화면 크기를 가리지 않는다. 배치는 바꾸지 않는다.) */
.closing-auto-block{
  margin:8px 0 0;
  padding:8px 10px;
  border:1px solid #f0d9a6;
  border-radius:9px;
  background:#fff7e8;
  color:#8a5a0b;
  display:grid;
  gap:2px;
}
.closing-auto-block strong{font-size:.82rem;font-weight:800}
.closing-auto-block span{font-size:.76rem;line-height:1.45;word-break:break-all}
html[data-theme="dark"] .closing-auto-block{
  background:rgba(180,120,20,.14);
  border-color:rgba(214,160,60,.4);
  color:#f0c987;
}
html[data-theme="dark"] .closing-auto-block span{color:#d8bd91}
