/* 도움 받을 곳 (templates/help.html, 5-5 나1). 색·모서리·그림자·간격·글자는 common.css의 토큰(var(--…))만 쓴다 (색 값을 직접 쓰지 않고, 새 변수를 만들지 않는다).
   공통 부품(.ui-*) 규칙은 여기에 쓰지 않고, 같은 토큰으로 같은 모양을 만든다: 기관 = 카드(흰 바탕·모서리 16·안쪽 16·그림자), 급할 때 = 위험색 카드 하나.
   글자 크기(5-1 D 규칙): 본문·설명·사실 줄·링크 16px, 안내·확인한 날·오류 14px, 한국어 이름 줄 13px, 묶음 제목 18px(Heading), 번호 30px 굵게(Display).
   누르는 곳(번호·외국 번호·공식 안내 페이지)은 44px 이상. 급할 때 카드의 글자는 --danger(--danger-soft 위 4.9:1).
   폰(320px~)에서는 한 열, 넓으면 칸을 나눈다 (고정 너비 없음). 마우스를 올려야만 보이는 것(hover)·position은 없다. */

[hidden] { display: none !important; } /* display를 정한 요소도 hidden이면 확실히 숨긴다 */

.help-page { min-width: 0; }

.help-intro,
.help-desktop {
  margin: var(--space-2) 0 0;
  color: var(--text-sub);
  font-size: 14px;
  line-height: var(--lh-caption);
  overflow-wrap: anywhere;
}

.help-list {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-4);
  min-width: 0;
}

.help-group { min-width: 0; }

.help-group-title {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-heading);
  font-weight: 700;
  line-height: var(--lh-heading);
  overflow-wrap: anywhere;
}

.help-orgs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 기관 카드 (ui-card 값) */
.help-org {
  border: 1px solid var(--line); /* v2 카드: 1px 선 */
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-4);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow-wrap: anywhere;
}

/* 급할 때: 위험색 카드 하나 안에 번호 둘 */
.help-group-emergency {
  padding: var(--space-4);
  border-radius: var(--r-md);
  background: var(--danger-soft);
  color: var(--danger);
}

.help-group-emergency .help-orgs { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }

.help-group-emergency .help-org {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.help-emergency-text {
  margin: 0 0 var(--space-3);
  font-size: 16px;
  font-weight: 700;
  line-height: var(--lh-body);
  overflow-wrap: anywhere;
}

.help-org-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: var(--lh-body);
}

.help-org-ko {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-1);
  margin: 0;
  color: var(--text-sub);
  font-size: 13px;
  line-height: var(--lh-caption);
}

.help-org-desc {
  margin: 0;
  font-size: 16px;
  line-height: var(--lh-body);
}

/* 큰 번호 = 전화 링크 (Display 30px 굵게, 누르는 곳 44px 이상) */
.help-number {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  color: var(--primary-dark);
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: var(--lh-display);
  text-decoration: underline;
  overflow-wrap: anywhere;
}

.help-group-emergency .help-number { color: var(--danger); }

.help-facts {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.help-fact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--space-1);
  min-width: 0;
  font-size: 16px;
  line-height: var(--lh-body);
  overflow-wrap: anywhere;
}

.help-label { font-weight: 700; }

.help-number-small {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 700;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

.help-source {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  max-width: 100%;
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 500;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

/* 확인한 날 = warn 띠 (5.0:1), 불러오지 못함 = 위험색 띠 (4.9:1) */
.help-checked,
.help-error {
  margin: var(--space-6) 0 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-md);
  font-size: 14px;
  line-height: var(--lh-caption);
  overflow-wrap: anywhere;
}

.help-checked { background: var(--warning-soft); color: var(--warning); }
.help-error { background: var(--danger-soft); color: var(--danger); }

.help-number:focus-visible,
.help-number-small:focus-visible,
.help-source:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
