/* 현황 위젯 — 색·글꼴·반경·테두리는 테마 변수를 그대로 쓴다(없으면 같은 값 대체) */
.fwlb, .fwlb-strip { font-family: var(--font-primary, 'Pretendard Variable', 'Pretendard', sans-serif); }

.fwlb {
  position: fixed;
  right: 16px;
  bottom: 96px; /* 우측 하단 카카오 버튼(24px + 50px) 위 */
  width: 248px;
  z-index: 800;
  padding: 12px;
  background: var(--bg-card, #1A1A1A);
  border: 1px solid var(--border-strong, rgba(255,255,255,.12));
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  color: var(--text-body, #D1D5DB);
}
.fwlb__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.fwlb__sum { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--text-heading, #fff); word-break: keep-all; }
.fwlb__pause {
  flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0; border: 1px solid var(--border-strong, rgba(255,255,255,.12)); border-radius: 50%;
  background: transparent; color: var(--text-muted, #9CA3AF); cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.fwlb__pause:hover, .fwlb__pause:focus-visible { color: var(--color-accent-400, #22D3EE); border-color: var(--color-accent-400, #22D3EE); }
.fwlb__i-play { display: none; }
.fwlb__pause[aria-pressed="true"] .fwlb__i-play { display: block; }
.fwlb__pause[aria-pressed="true"] .fwlb__i-pause { display: none; }

.fwlb__col + .fwlb__col { margin-top: 8px; }
.fwlb__lab { margin: 0 0 2px; font-size: 12px; font-weight: 500; color: var(--color-accent-400, #22D3EE); line-height: 1.5; }
.fwlb__win { height: 88px; overflow: hidden; border-top: 1px solid var(--border-subtle, rgba(255,255,255,.06)); }
.fwlb__list { list-style: none; margin: 0; padding: 0; will-change: transform; }
.fwlb__row {
  display: flex; align-items: center; gap: 6px; height: 29px; box-sizing: border-box;
  font-size: 13px; line-height: 1; border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,.06));
}
.fwlb__t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-body, #D1D5DB); }
.fwlb__s {
  flex: none; padding: 3px 7px; border-radius: var(--radius-full, 9999px);
  background: var(--badge-blue-bg, rgba(6,182,212,.15)); color: var(--badge-blue-text, #67E8F9); font-size: 11px; font-weight: 500; white-space: nowrap;
}
.fwlb__a { flex: none; min-width: 38px; text-align: right; font-size: 12px; color: var(--text-muted, #9CA3AF); white-space: nowrap; }

.fwlb__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.fwlb__more { font-size: 12px; font-weight: 500; color: var(--text-body, #D1D5DB); text-decoration: none; white-space: nowrap; }
.fwlb__more:hover, .fwlb__more:focus-visible { color: var(--color-accent-400, #22D3EE); }
.fwlb__cta { flex: none; min-height: 32px; padding: 6px 14px; font-size: 13px; }

/* 1280 미만 데스크톱: 더 작게 */
@media (min-width: 768px) and (max-width: 1279px) {
  .fwlb { width: 216px; right: 12px; padding: 10px; }
  .fwlb { width: 232px; }
  body.has-fw-livecard { --fwlb-gap: calc(232px + 12px + 24px); }
  .fwlb__sum { font-size: 12px; white-space: nowrap; letter-spacing: -.02em; }
  .fwlb__s { display: none; }
}
/* 낮은 화면 */
@media (min-width: 768px) and (max-height: 700px) {
  .fwlb { bottom: 84px; }
}

/* 모바일 띠 */
.fwlb-strip { display: none; }
@media (max-width: 767px) {
  .fwlb { display: none; }
  .fwlb-strip {
    position: fixed; top: 86px; left: 16px; right: 16px; z-index: 99; height: 36px;
    display: flex; align-items: center; gap: 8px; padding: 0 12px;
    background: var(--bg-card, #1A1A1A); border: 1px solid var(--border-strong, rgba(255,255,255,.12));
    border-radius: var(--radius-md, 12px); text-decoration: none; overflow: hidden;
    color: var(--text-body, #D1D5DB); font-size: 13px; line-height: 1;
  }
  .fwlb-strip__f { position: absolute; left: 12px; right: 36px; top: 0; bottom: 0; display: flex; align-items: center; gap: 8px; opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; pointer-events: none; }
  .fwlb-strip__f.is-on { opacity: 1; transform: none; }
  .fwlb-strip__k { flex: none; padding: 3px 7px; border-radius: var(--radius-full, 9999px); background: var(--badge-blue-bg, rgba(6,182,212,.15)); color: var(--badge-blue-text, #67E8F9); font-size: 11px; font-weight: 500; }
  .fwlb-strip__tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fwlb-strip__go { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--color-accent-400, #22D3EE); }
}
@media (prefers-reduced-motion: reduce) {
  .fwlb-strip__f { transition: none; }
}

/* 푸터가 보이면 위젯을 잠시 감춘다(푸터 링크를 가리지 않게) */
.fwlb { transition: opacity .25s ease, visibility .25s ease; }
.fwlb.is-off { opacity: 0; visibility: hidden; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .fwlb { transition: none; } }

/* 본문 비켜서기: 위젯이 실제로 나올 때(body.has-fw-livecard)만, 데스크톱 폭에서 구간 콘텐츠가 위젯 자리(폭+여백)를 비운다.
   배경은 구간(section) 전체 폭 그대로, 콘텐츠 컨테이너만 남은 영역 안에서 가운데 정렬. 헤더·푸터는 main 밖이라 그대로. */
@media (min-width: 768px) {
  body.has-fw-livecard { --fwlb-gap: calc(248px + 16px + 24px); }
  body.has-fw-livecard .site-main > section,
  body.has-fw-livecard .site-main > .section,
  body.has-fw-livecard main > section,
  body.has-fw-livecard main > .section { padding-right: var(--fwlb-gap); }
}
@media (min-width: 768px) and (max-width: 1279px) {
  body.has-fw-livecard { --fwlb-gap: calc(232px + 12px + 24px); }
}
/* 위젯 자리만큼 좁아진 1100~1279 에서는 고민 카드 4열이 너무 좁아(약 162px) 2열로 */
@media (min-width: 1025px) and (max-width: 1279px) {
  body.has-fw-livecard .painpoints-grid { grid-template-columns: repeat(2, 1fr); }
}
