/* 2026-11-12 버튼 간격·빈 오류 칸 정리 */

/* 오류 메시지 칸: 내용이 없으면 숨김 (빈 빨간 칸이 보이던 문제) */
.form-error:empty,
[role="alert"]:empty { display: none !important; }

/* 버튼 묶음: 위 문단과 간격, 버튼끼리 간격 */
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.detail-panel .row { gap: 12px; margin-top: 18px; }
form > .row { gap: 12px; margin-top: 22px; }

/* 버튼 아래 안내 문구가 버튼에 붙지 않게 */
.row + p.small,
.row + .small { margin-top: 12px; }

/* ---- 2026-11-12 줄바꿈 정리 ----
   한국어는 기본값이면 글자 단위로 끊겨 "플랫|폼", "유튜|브"처럼 단어가 쪼개집니다.
   단어(띄어쓰기) 단위로만 줄을 바꾸고, 아주 긴 영문·URL만 예외로 자릅니다. */
html, body { word-break: keep-all; overflow-wrap: break-word; }

/* 짧은 이름표는 한 줄로 유지 (버튼·칩·배지·표 머리·카드 항목 이름) */
.btn, button, dt, th, .eyebrow, .hub-chip, .tags > *, .card-platforms > span,
[class*="chip"], [class*="badge"], [class*="pill"] { white-space: nowrap; }

/* 카드의 '주요 플랫폼' 줄: 이름표는 한 줄, 값은 단어 단위로 */
.card-platforms { display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 2px; }

/* 좁은 화면에서 버튼 글자가 넘치면 단어 단위로는 줄바꿈 허용 */
@media (max-width: 520px) {
  .btn, button { white-space: normal; }
}

/* 761~960px(태블릿): 로그인 상태 헤더가 화면보다 넓어져 가로 스크롤이 생기던 문제.
   '업체 운영실' 버튼은 전체 메뉴(☰)에도 있으므로 이 폭에서는 숨깁니다. (760px 이하는 원래 숨김) */
@media (max-width: 960px) {
  #header .header-tools .partner-button { display: none; }
  #header .header-tools { gap: 12px; }
}

/* 휴대폰(520px 이하): 로그인 상태 헤더(로고·언어·채팅·알림·메뉴)가 화면보다 넓어
   메뉴(☰) 버튼이 화면 밖으로 밀려나던 문제. 로고·아이콘·간격을 줄여 한 줄에 맞춥니다. */
@media (max-width: 520px) {
  #header .header-inner { gap: 6px !important; }
  #header .brand { gap: 5px !important; min-width: 0; }
  #header .brand-word { font-size: 18px !important; }
  #header .brand-symbol-renewal { width: 28px !important; height: 28px !important; }
  #header .header-tools, #header .hub-header-tools { gap: 4px !important; }
  #header .hub-chat-link, #header .hub-bell { width: 36px !important; min-width: 36px !important; height: 36px !important; padding: 0 !important; }
  #header .mobile-toggle { width: 40px !important; height: 40px !important; min-width: 40px !important; flex: 0 0 40px !important; padding: 0 !important; }
  /* 알림 화면의 짧은 버튼은 줄바꿈하지 않음 */
  #read-all, #clear-read { white-space: nowrap; }
}
/* 아주 좁은 휴대폰(380px 이하): 채팅 아이콘은 전체 메뉴(☰)에서 들어갈 수 있으므로 숨김 */
@media (max-width: 380px) {
  #header .hub-chat-link { display: none !important; }
}

/* 섹션 제목 옆 '○○ 보기 ↗' 링크: 좁은 화면에서 자리가 모자라면 제목 아래로 내려감 */
.section-head { flex-wrap: wrap; row-gap: 8px; }

/* 정산 미리보기 금액(예: 2,100,000원)이 칸이 좁아 숫자 중간에서 끊기던 문제:
   칸이 좁으면 4칸 → 자동으로 줄 수를 늘리고, 금액은 한 줄로 */
.payout-figs { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.payout-figs b { white-space: nowrap; }
