/* PoliWatch 디자인 셸 v1.11.10 — 광고띠·얇은 헤더·슬로건·유저드롭다운 */
/* v1.11.10 — 커뮤니티 검색바 한 줄(입력창 내 돋보기) · 범위 라벨 폭 */
/* v1.11.9 — 커뮤니티 검색 범위 select */
/* v1.11.8 — 소계 라벨 두 줄 고정 · 채무 빨강 제거 */
/* v1.11.7 — 관보 긴 소계 라벨 두 줄 */
/* v1.11.6 — 관보 소계 원문 항목명 줄바꿈 */
/* v1.11.5 — 관보 종류별 소계 4칸 양식 · 모바일은 현재가 · 원문 항목명 줄바꿈 */
/* v1.11.4 — 관보 상세 종류별 소계 표 */
/* v1.11.3 — 비교표 Grid · 우위 배경 · 가로스크롤 제거 */
/* v1.11.2 — 비교 숏컷 ico-scales 특수그래픽 제거(랭킹과 동일 이모지) */
/* v1.11.1 — 모바일 추천키워드 wrap · 비교 숏컷 아이콘 색 */
/* v1.11.0 — .pw-searchfield 공통 토큰(높이·정렬·버튼 밖) */
/* v1.10.8 — 통합 검색 버튼 표시 */
/* v1.10.7 — 광고 프레임·숏컷·카드 min-height (CLS) */
/* v1.10.6 — 홈 stats-row min-height (CLS) */
/* v1.10.5 — DB 정당 칩 제거 · 상태·지역·정당 드롭 한 줄 */
/* v1.10.4 — DB 필터 패널: 상태세그·지역드롭·정당칩·검색풀폭 */
/* v1.10.3 — 홈 히어로 스탯 5/6칸 data-n 대응 */
/* v1.10.2 — 홈 6스탯·빠른필터 affordance · 비교/상세 모바일 */
/* v1.10.1 — §C-5 홈 숏컷 여백 추가 축소 */
/* v1.10.0 — 모바일 크롬 다이어트: DB필터접이·검색상단·숏컷2-up·공지/HOT슬림 */
/* v1.9.9 — 모바일: DB정당칩·홈필터접이·상세 sticky 퀵액션 */
/* v1.9.8 — 모바일 P1: 헤더 로그인/가입 more 일원화(≤767) */
/* v1.9.7 — 모바일 BP 767 통일 · 뉴스 키워드 중앙 컨테이너 · 탭바 safe-area */
/* v1.9.6 — 하단 광고 라벨을 슬롯에 밀착 · 로딩 스켈레톤 펄스 */
/* v1.9.5 — 전 슬롯 모서리「광고」라벨 상시(프레임) */
/* v1.9.4 — 상단 광고 코너 칩 제거(슬롯 중앙 라벨과 통일) */
/* v1.9.3 — 홈 카드 테두리 통일 · 인기글 중첩 박스 완화 */
/* v1.9.2 — 홈 히어로 통계 6칸(임명직) 한 줄 · 카드/글자 축소 */
/* v1.9.1 — admin-header-align: 헤더는 admin과 무관 고정(--pw-side-w), 셸만 분기 */
/* v1.9.0 — header-final-layout: 광고 최상단 분리 · 헤더 얇게 */
/* v1.8.2 — 좌측 300×250 · 헤더 min 110px(배너 가림 방지) */
/* v1.8.1 — 보조 텍스트 대비 · 카드 경계 · 칩 토큰 */
/* v1.8.0 — [data-theme="light"] 토큰 세트 */

:root,
[data-theme="dark"] {
  --pw-bg: #0d1117;
  --pw-surface: #161b22;
  --pw-surface-2: #1c2230;
  --pw-border: #232a36;
  --pw-text: #e6edf3;
  --pw-text-2: #9aa7b4;
  --pw-text-3: #6b7682;
  --pw-text-muted: var(--pw-text-2);
  --pw-text-subtle: var(--pw-text-3);
  --pw-accent: #4d8dff;
  --pw-accent-bg: #18243a;
  --pw-green: #3fb950;
  --pw-orange: #d29922;
  --pw-red: #f85149;
  --bg-success: rgba(63, 185, 80, 0.16);
  --text-success: var(--pw-green);
  --text-danger: var(--pw-red);
  --pw-card: var(--pw-surface);
  --pw-card-border: var(--pw-border);
  --pw-card-shadow: none;
  --pw-chip-bg: var(--pw-surface-2);
  --pw-chip-text: var(--pw-text-2);
  --pw-chip-border: var(--pw-border);
  --pw-radius: 10px;
  --pw-radius-sm: 6px;
  /* 좌·우 300×250 배너 수용(패딩 10+10) · 헤더 로고 칸과 동일 */
  --pw-left-w: 320px;
  --pw-side-w: var(--pw-left-w);
  --pw-right-w: 320px;
  --pw-gap: 16px;
  --pw-max: 1480px;
  --pw-gutter: 16px;

  /* 기존 컴포넌트 호환 */
  --bg: var(--pw-bg);
  --bg2: var(--pw-surface);
  --bg3: var(--pw-surface-2);
  --border: var(--pw-border);
  --text: var(--pw-text);
  --muted: var(--pw-text-muted);
  --accent: var(--pw-accent);
  --accent2: var(--pw-red);
  --green: var(--pw-green);
  --yellow: var(--pw-orange);
  --tag-bg: var(--pw-chip-bg);
}

[data-theme="light"] {
  --pw-bg: #f6f8fa;
  --pw-surface: #ffffff;
  --pw-surface-2: #eef1f5;
  --pw-border: #e2e5ea;
  --pw-text: #1a1a1a;
  --pw-text-2: #55606e;
  --pw-text-3: #6b7280;
  --pw-text-muted: #55606e;
  --pw-text-subtle: #6b7280;
  --pw-accent: #0969da;
  --pw-accent-bg: #ddf4ff;
  --pw-green: #1a7f37;
  --pw-orange: #9a6700;
  --pw-red: #cf222e;
  --bg-success: rgba(26, 127, 55, 0.12);
  --text-success: var(--pw-green);
  --text-danger: var(--pw-red);
  --pw-card: #ffffff;
  --pw-card-border: #e2e5ea;
  --pw-card-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
  --pw-chip-bg: #eef1f5;
  --pw-chip-text: #33404f;
  --pw-chip-border: #dfe3e9;
  --muted: var(--pw-text-muted);
  --tag-bg: var(--pw-chip-bg);
}

/* ① 광고 띠 — 페이지 최상단(헤더 위), 풀폭 · 728×90 중앙 */
.pw-ad-top {
  background: var(--pw-bg);
  border-bottom: 1px solid var(--pw-border);
}
.pw-ad-top-inner {
  max-width: var(--pw-max);
  margin: 0 auto;
  padding: 10px var(--pw-gutter, 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  box-sizing: border-box;
  min-height: 110px;
}

/* 광고 슬롯 공통 — 모서리 작은「광고」표시(미리보기·실광고 공통) */
.pw-ad-frame {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}
.pw-ad-frame--side { margin: 12px auto 0; }
.pw-ad-frame--bottom {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  display: block;
}
.pw-ad-label {
  position: absolute;
  left: 6px;
  top: 6px;
  z-index: 2;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--pw-text-3);
  background: var(--pw-surface-2);
  border: 1px solid var(--pw-border);
  border-radius: 3px;
  padding: 1px 6px;
  line-height: 1.4;
  pointer-events: none;
}

/* ② 얇은 헤더 + 셸 = 1480px 연결 박스 */
/* 헤더는 페이지 종류(admin 포함)와 무관 — 항상 동일 그리드/폭. pw-shell--admin로 덮어쓰지 말 것 */
/* 그리드: [사이드바폭 | 1fr | 유저] — 로고 = 사이드바 칸 중앙 */
.pw-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--pw-bg);
}
.pw-header-inner {
  max-width: var(--pw-max);
  margin: 0 auto;
  padding: 12px 16px;
  min-height: 0;
  height: auto;
  display: grid;
  /* 본문(.pw-shell)과 동일한 좌우 대칭 → 슬로건이 진짜 페이지 정중앙 · 로그인 상태와 무관 */
  grid-template-columns: var(--pw-side-w) 1fr var(--pw-side-w);
  align-items: center;
  column-gap: 0;
  background: var(--pw-surface);
  border: 1px solid var(--pw-border);
  border-bottom: none;
  border-radius: var(--pw-radius) var(--pw-radius) 0 0;
  box-sizing: border-box;
}
.pw-logo-cell {
  grid-column: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}
.pw-logo {
  font-size: 21px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  padding: 4px 0;
  margin: 0;
  min-width: 0;
}
.pw-logo:hover { opacity: 0.92; }
.pw-logo span { color: var(--pw-accent); }
.pw-logo .pw-logo-kr {
  color: var(--pw-text-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-left: 5px;
  align-self: center;
}
.pw-slogan {
  grid-column: 2;
  justify-self: center;
  margin: 0;
  text-align: center;
  line-height: 1.25;
  /* 2줄 블록이 통째로 중앙정렬되면 메인 글자가 로고·버튼보다 위로 떠 보임 →
     부제 높이(약 절반)만큼 내려 메인 줄을 로고·버튼 세로중앙에 맞춤(광학 중앙정렬) */
  transform: translateY(7px);
}
.pw-slogan-main {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--pw-text);
  white-space: nowrap;
  letter-spacing: -0.2px;
}
.pw-slogan-main .accent,
.pw-slogan .accent {
  color: var(--pw-accent);
  font-weight: 800;
}
.pw-slogan-sub {
  margin: 3px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--pw-text-3);
  white-space: nowrap;
}
.pw-slogan[hidden] { display: none !important; }
.pw-header-search {
  flex: 1;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  background: var(--pw-bg);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius-sm);
  padding: 8px 12px;
}
.pw-header-search input {
  flex: 1;
  padding: 8px 0;
  background: transparent;
  border: none;
  color: var(--pw-text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.pw-header-search:focus-within { border-color: var(--pw-accent); }
.pw-header-search input:focus { outline: none; }
.pw-header-search input::placeholder { color: var(--pw-text-3); }
.pw-header-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
  margin-left: 0;
  min-width: 0;
}
.pw-theme-toggle {
  font-size: 17px;
  line-height: 1;
  padding: 6px 8px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  border-radius: var(--pw-radius-sm);
  color: var(--pw-text-2);
  flex-shrink: 0;
}
.pw-theme-toggle:hover {
  border-color: var(--pw-border);
  background: var(--pw-surface-2);
}
.pw-user-menu {
  position: relative;
}
.pw-user-menu[hidden] { display: none !important; }
.pw-user {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pw-accent);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--pw-radius-sm);
  padding: 6px 8px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.pw-user:hover,
.pw-user[aria-expanded="true"] {
  text-decoration: none;
  background: var(--pw-surface-2);
  border-color: var(--pw-border);
}
.pw-user-ico { font-size: 14px; line-height: 1; }
.pw-user-caret { font-size: 10px; opacity: 0.75; margin-left: 1px; }
.pw-user-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 148px;
  padding: 4px;
  background: var(--pw-surface);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  z-index: 60;
}
.pw-user-dropdown[hidden] { display: none !important; }
.pw-user-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--pw-text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.pw-user-dropdown-item:hover {
  background: var(--pw-surface-2);
  color: var(--pw-accent);
}
.pw-header-actions .btn {
  padding: 7px 14px;
  border-radius: var(--pw-radius-sm);
  border: 1px solid var(--pw-border);
  background: transparent;
  color: var(--pw-text-2);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.pw-header-actions .btn-primary {
  background: var(--pw-accent);
  border-color: var(--pw-accent);
  color: #fff;
}
.pw-header-actions .btn:hover { border-color: var(--pw-accent); color: var(--pw-text); }
.pw-header-actions .btn-primary:hover { background: #3d7ce0; color: #fff; }
.pw-header-search .pw-search-ico {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--pw-text-3);
  line-height: 1;
  user-select: none;
}
.pw-header-search .btn,
.pw-header-search #globalSearchBtn { display: none; }

/* 광고 띠 슬롯 — IAB 728×90 리더보드 */
.pw-ad-top .pw-ad-header,
.pw-ad-top #pwAdHeader,
.pw-ad-top #pwAdSlotHeader,
.pw-ad-header,
#pwAdHeader,
#pwAdSlotHeader {
  width: 728px;
  height: 90px;
  max-width: 100%;
  margin: 0 auto;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}
.pw-ad-top .pw-ad-header.pw-ad-preview,
.pw-ad-top .pw-ad-header:not([hidden]),
.pw-ad-top #pwAdHeader.pw-ad-preview,
.pw-ad-top #pwAdHeader:not([hidden]) {
  min-height: 90px;
  height: 90px;
  width: 728px;
  max-width: 100%;
  padding: 0;
  border: 1px dashed var(--pw-border);
  border-radius: var(--pw-radius-sm);
  background: var(--pw-surface-2);
  color: var(--pw-text-3);
  text-align: center;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
}

/* 본문 중앙 검색 호스트 */
.pw-page-search-host { display: flex; justify-content: center; }
.pw-page-search-host:empty { display: none; }

/*
 * 공통 검색 토큰 .pw-searchfield
 * 행 = 박스(아이콘+입력) + 버튼(필드 밖). 높이·정렬·가로배분 통일.
 */
.pw-searchfield {
  --pw-search-h: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  min-width: 0;
  box-sizing: border-box;
}
.pw-searchfield-box {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--pw-search-h);
  min-height: var(--pw-search-h);
  padding: 0 12px;
  background: var(--pw-bg, var(--bg));
  border: 1px solid var(--pw-border, var(--border));
  border-radius: var(--pw-radius-sm, 6px);
  box-sizing: border-box;
}
.pw-searchfield-box:focus-within { border-color: var(--pw-accent, var(--accent)); }
.pw-searchfield .pw-search-ico {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1;
  color: var(--pw-text-3, var(--muted));
  user-select: none;
}
.pw-searchfield-box input,
.pw-searchfield-box .pw-search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--pw-text, var(--text));
  font-size: 13px;
  font-family: inherit;
  line-height: 1.3;
}
.pw-searchfield-box input::placeholder,
.pw-searchfield-box .pw-search-input::placeholder {
  color: var(--pw-text-3, var(--muted));
}
.pw-searchfield > .pw-search-btn,
.pw-searchfield > .btn {
  flex: 0 0 auto;
  height: var(--pw-search-h);
  min-height: var(--pw-search-h);
  padding-top: 0;
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-sizing: border-box;
}
.pw-searchfield .comm-search-scope {
  flex: 0 0 88px;
  width: 88px;
  min-width: 88px;
  max-width: 88px;
  height: var(--pw-search-h);
  min-height: var(--pw-search-h);
  padding: 0 4px 0 6px;
  border: 1px solid var(--pw-border, var(--border));
  border-radius: var(--pw-radius-sm, 6px);
  background: var(--pw-bg, var(--bg));
  color: var(--pw-text, var(--text));
  font-size: 13px;
  line-height: 1.2;
  font-family: inherit;
  box-sizing: border-box;
}
.pw-searchfield.comm-search-bar {
  flex-wrap: nowrap;
  max-width: none;
}
.pw-searchfield.comm-search-bar > .pw-search-btn {
  flex-shrink: 0;
}
.pw-searchfield.comm-search-bar .pw-searchfield-box {
  padding-right: 4px;
}
.pw-searchfield-box .comm-search-ico-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--pw-text-2, var(--muted));
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.pw-searchfield-box .comm-search-ico-btn:hover,
.pw-searchfield-box .comm-search-ico-btn:focus-visible {
  color: var(--pw-accent, var(--accent));
}
.pw-searchfield.comm-search-bar .pw-search-input::-webkit-search-decoration,
.pw-searchfield.comm-search-bar .pw-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

/* 레거시 클래스명 → 동일 토큰 (점진 수렴) */
.pw-page-search { /* = .pw-searchfield */ }

/* DB 정렬바: 검색창을 정렬 드롭다운 왼쪽·중앙에 배치 */
.sort-bar-mid { flex: 1; display: flex; justify-content: center; min-width: 0; padding: 0 12px; }
.sort-bar-mid:empty { display: none; }
.sort-bar-mid .pw-searchfield,
.sort-bar-mid .pw-page-search { max-width: 440px; }

/* 3단 셸 — 헤더 inner와 이어지는 하단 박스 + 좌/우 세로 구분선 */
.pw-shell {
  display: grid;
  grid-template-columns: var(--pw-left-w) 1fr var(--pw-right-w);
  gap: 0;
  max-width: var(--pw-max);
  margin: 0 auto;
  padding: 14px 0;
  align-items: start;
  background: var(--pw-surface);
  border: 1px solid var(--pw-border);
  border-top: none;
  border-radius: 0 0 var(--pw-radius) var(--pw-radius);
}
.pw-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 0 var(--pw-gutter, 16px);
}
/* 좌·우: 300px 배너가 컬럼 안에 들어가도록 가로 패딩 10 */
.pw-col.left,
.pw-col.right {
  padding-left: 10px;
  padding-right: 10px;
}
.pw-col.left { border-right: 1px solid var(--pw-border); }
.pw-col.right { border-left: 1px solid var(--pw-border); }
.pw-col-center { min-width: 0; }
.pw-col-center > .screen { display: none; flex-direction: column; gap: 12px; }
.pw-col-center > .screen.active { display: flex; }

.pw-card {
  background: var(--pw-card);
  border: 1px solid var(--pw-card-border);
  box-shadow: var(--pw-card-shadow);
  border-radius: var(--pw-radius);
  padding: 14px;
}
.pw-card.highlight { border: 2px solid var(--pw-accent); }
.pw-card-title {
  font-size: 12px;
  color: var(--pw-text-muted);
  margin: 0 0 10px;
  font-weight: 500;
}

/* 좌측 전역 메뉴 — 정답지: pw-card 안 세로 목록 (데모용 상단 알약 탭 없음) */
#pwGlobalNav.pw-nav,
.pw-col.left .pw-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: static;
  height: auto;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  justify-content: flex-start;
  align-items: stretch;
}
.pw-nav a,
.pw-nav .side-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--pw-radius-sm);
  color: var(--pw-text-2);
  font-size: 14px;
  text-decoration: none;
}
.pw-nav a:hover,
.pw-nav .side-nav-item:hover { color: var(--pw-text); }
.pw-nav a.active,
.pw-nav .side-nav-item.active {
  background: var(--pw-accent-bg);
  color: var(--pw-accent);
  font-weight: 600;
}
.pw-nav .ico, .pw-nav .side-nav-icon { width: 18px; text-align: center; flex-shrink: 0; }

.mobile-tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  height: auto;
  /* border-box: 콘텐츠 56px + safe-area (아이콘 영역 잠식 방지) */
  min-height: calc(56px + env(safe-area-inset-bottom, 0px));
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: var(--pw-surface);
  border-top: 1px solid var(--pw-border);
  border-bottom: none;
  justify-content: space-around;
  align-items: stretch;
  z-index: 120;
  box-sizing: border-box;
}

.pw-tools-panel[hidden], .pw-widget-panel[hidden] { display: none !important; }

.pw-link { color: var(--pw-accent); font-size: 12px; text-decoration: none; }
.pw-link:hover { text-decoration: underline; }
.pw-muted { color: var(--pw-text-muted); }

.pw-chiprow { display: flex; flex-wrap: wrap; gap: 6px; }
.pw-chip {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 14px;
  background: var(--pw-chip-bg);
  color: var(--pw-chip-text);
  cursor: pointer;
  border: 1px solid var(--pw-chip-border);
  font-family: inherit;
}
.pw-chip:hover { color: var(--pw-accent); }
.pw-chip.active { background: var(--pw-accent-bg); color: var(--pw-accent); border-color: var(--pw-accent); }
.home-widget-body .home-chip.pw-chip {
  border: 1px solid var(--pw-chip-border);
  background: var(--pw-chip-bg);
  padding: 4px 10px;
  border-radius: 14px;
}
.home-widget-body .home-chip.pw-chip:hover {
  background: var(--pw-accent-bg);
  color: var(--pw-accent);
}

.pw-rank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 5px 0;
  gap: 8px;
}
.pw-rank-row .val { color: var(--pw-green); font-variant-numeric: tabular-nums; flex-shrink: 0; }
a.pw-rank-row.home-rank-link { text-decoration: none; color: inherit; }
a.pw-rank-row.home-rank-link:hover .val { color: var(--pw-accent); }

.pw-page-head h1, .pw-page-head .page-title { font-size: 20px; margin: 0 0 4px; font-weight: 700; }
.pw-page-head p, .pw-page-head .page-sub { color: var(--pw-text-2); font-size: 13px; margin: 0 0 12px; }

.pw-hero { padding: 22px; text-align: center; }
.pw-hero h1 { font-size: 24px; margin: 0 0 6px; font-weight: 900; }
.pw-hero h1 em { color: var(--pw-accent); font-style: normal; }
.pw-hero p { color: var(--pw-text-2); margin: 0 0 14px; font-size: 13px; }
.pw-hero-sub { color: var(--pw-text-2); font-size: 13px; margin: 2px 0 16px; }

.pw-home-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.pw-shortcut {
  text-align: center;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.pw-shortcut:hover { border-color: var(--pw-accent); }
.pw-shortcut .ico { font-size: 22px; color: var(--pw-accent); }
.pw-shortcut p { margin: 6px 0 0; font-size: 13px; }
.pw-shortcut .pw-shortcut-person {
  display: inline-flex; align-items: baseline; gap: 5px; margin-top: 4px;
  max-width: 100%; white-space: nowrap; overflow: hidden;
}
.pw-shortcut .pw-shortcut-name {
  font-size: 13px; font-weight: 700; color: var(--pw-accent);
  overflow: hidden; text-overflow: ellipsis;
}
.pw-shortcut .pw-shortcut-party {
  font-size: 11px; font-weight: 500; color: var(--pw-text-3);
  flex-shrink: 0;
}

.pw-rowhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
}
.pw-rowhead .h, .pw-rowhead .home-widget-title { font-size: 13px; font-weight: 600; margin: 0; }

.pw-post {
  background: var(--pw-surface-2);
  border-radius: var(--pw-radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.pw-post:last-child { margin-bottom: 0; }
.pw-post:hover { outline: 1px solid var(--pw-accent); }
.pw-post .t { font-size: 13px; font-weight: 500; line-height: 1.4; }
.pw-post .m { font-size: 11px; color: var(--pw-text-3); margin-top: 3px; }

/* 홈 중앙: 카드 테두리 1px 통일 · 인기글은 리스트형(중첩 박스 제거) */
#screen-home .pw-card,
#screen-home .pw-notice-box.pw-card {
  border: 1px solid var(--pw-card-border);
  box-shadow: var(--pw-card-shadow);
}
#screen-home #homeHotPosts .pw-post {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--pw-border);
  border-radius: 0;
  padding: 10px 2px;
  margin-bottom: 0;
  outline: none;
}
#screen-home #homeHotPosts .pw-post:last-child { border-bottom: none; }
#screen-home #homeHotPosts .pw-post:hover { outline: none; background: transparent; }
#screen-home #homeHotPosts .pw-post:hover .t { color: var(--pw-accent); }

/* 홈 위젯 — 실시간 뉴스와 동일: 제목·본문 흰색 (메타·부가설명만 회색) */
#pwRightWidgets .pw-card-title,
#screen-home .home-widget-title,
#screen-home .pw-rowhead .h {
  color: var(--pw-text);
}
#screen-home a.pw-post,
#screen-home a.pw-post:visited,
#screen-home .pw-post .t {
  color: var(--pw-text);
}
#screen-home a.home-link-row,
#screen-home a.home-link-row:visited {
  color: var(--pw-text);
}
#pwRightWidgets a.trending-row,
#pwRightWidgets a.trending-row:visited,
#pwRightWidgets .trending-name {
  color: var(--pw-text);
}
#pwRightWidgets .home-issue-title,
#pwRightWidgets a.home-issue-item,
#pwRightWidgets a.home-issue-item:visited {
  color: var(--pw-text);
}
#pwRightWidgets a.trending-row:hover .trending-name,
#screen-home a.pw-post:hover .t,
#screen-home a.home-link-row:hover {
  color: var(--pw-accent);
}

#pwLeftTools .pw-card + .pw-card,
.pw-tools-panel > .pw-card + .pw-card { margin-top: 12px; }
.pw-widget-panel > .pw-card + .pw-card,
.pw-widget-panel .pw-card + .pw-card { margin-top: 12px; }
#pwRightWidgets .home-widget[style*="margin-top"] { margin-top: 12px !important; }

/* 홈 히어로 숫자 — 칸 수(data-n)에 맞춰 한 줄 · 지방의원 토글 시 5↔6 */
/* min-height: CLS 완화 (count 도착 전 자리 예약) */
#screen-home .stats-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
  min-height: 72px;
}
#screen-home .pw-home-shortcuts {
  min-height: 96px;
}
#screen-db #cardList {
  min-height: 480px; /* 첫 페이지 로딩 자리 예약 */
}
#screen-db #cardList .card.pw-card,
#screen-db #cardList .pw-card.card {
  min-height: 92px;
}
/* 광고 프레임: 슬롯 hidden이어도 자리 유지 → CLS↓ · unfilled는 JS collapse */
.pw-ad-frame {
  min-height: 90px;
  box-sizing: border-box;
}
.pw-ad-frame--side {
  min-height: 250px;
}
.pw-ad-frame--bottom {
  min-height: 90px;
}
.pw-ad-top .pw-ad-frame {
  min-height: 90px;
}
#screen-home .stats-row[data-n="6"] {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
#screen-home .stats-row[data-n="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
#screen-home a.stat {
  text-decoration: none; color: inherit; cursor: pointer;
  background: var(--pw-surface-2);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  padding: 12px 4px 10px;
  text-align: center;
  min-width: 0;
  transition: border-color 0.12s;
}
#screen-home a.stat:hover { border-color: var(--pw-accent); }
#screen-home .stat-ico { font-size: 13px; opacity: 0.8; line-height: 1; }
#screen-home .stat-num {
  color: var(--pw-accent);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.1;
  margin-top: 4px;
  letter-spacing: -0.02em;
}
#screen-home .stat-label {
  color: var(--pw-text-2);
  font-size: 11px;
  font-weight: 500;
  margin-top: 5px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}
@media (max-width: 860px) {
  #screen-home .stats-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  #screen-home a.stat { padding: 12px 6px; }
  #screen-home .stat-num { font-size: 20px; }
  #screen-home .stat-label { font-size: 12px; }
}
@media (max-width: 480px) {
  #screen-home .stats-row { grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 10px; }
  #screen-home a.stat { padding: 8px 3px 7px; }
  #screen-home .stat-ico { font-size: 12px; }
  #screen-home .stat-num { font-size: 15px; margin-top: 2px; }
  #screen-home .stat-label { font-size: 10px; margin-top: 3px; }
}

.pw-bottom {
  max-width: var(--pw-max);
  margin: 16px auto 24px;
  padding: 0 20px;
  display: flex;
  justify-content: center;
}

/* 광고 슬롯 — IAB 표준 규격 (비표준 크기 금지) */
.pw-ad,
.pw-ad-slot.pw-ad-preview {
  border: 1px dashed var(--pw-border);
  border-radius: var(--pw-radius);
  background: var(--pw-surface-2);
  color: var(--pw-text-3);
  text-align: center;
  padding: 0;
  font-size: 11px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
}
.pw-col .pw-ad-slot,
.pw-col .pw-ad {
  max-width: none;
  margin: 0 auto;
  box-sizing: border-box;
}

/* 좌측: 300×250 (160×600 지양 — 사이드바 아래 자연 이어붙임) */
.pw-ad-slot.pw-ad-sidebar#pwAdLeft,
#pwAdLeft,
#pwAdSlotLeft,
.ad-slot-left {
  width: 300px;
  height: 250px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  border: none;
  background: transparent;
  min-height: 0;
  flex-shrink: 0;
}
.pw-ad-slot.pw-ad-sidebar#pwAdLeft.pw-ad-preview,
.pw-ad-slot.pw-ad-sidebar#pwAdLeft:not([hidden]),
#pwAdLeft.pw-ad-preview,
#pwAdLeft:not([hidden]),
.ad-slot-left.pw-ad-preview,
.ad-slot-left:not([hidden]) {
  border: 1px dashed var(--pw-border);
  border-radius: var(--pw-radius);
  background: var(--pw-surface-2);
  width: 300px;
  height: 250px;
  max-width: 100%;
  min-height: 250px;
  padding: 0;
}

/* 우측: 300×250 중간 직사각형 */
.pw-ad-slot.pw-ad-sidebar#pwAdRight,
#pwAdRight,
#pwAdSlotRight {
  width: 300px;
  height: 250px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  border: none;
  background: transparent;
  min-height: 0;
}
.pw-ad-slot.pw-ad-sidebar#pwAdRight.pw-ad-preview,
.pw-ad-slot.pw-ad-sidebar#pwAdRight:not([hidden]),
#pwAdRight.pw-ad-preview,
#pwAdRight:not([hidden]) {
  border: 1px dashed var(--pw-border);
  border-radius: var(--pw-radius);
  background: var(--pw-surface-2);
  width: 300px;
  height: 250px;
  max-width: 100%;
  min-height: 250px;
  padding: 0;
}

/* 하단 배너: 728×90 (모바일에서 축소) */
.pw-bottom .pw-ad-slot.pw-ad-banner,
#pwAdBottom,
#pwAdSlotBottom {
  width: 728px;
  height: 90px;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}
.pw-bottom .pw-ad-slot.pw-ad-banner.pw-ad-preview,
.pw-bottom .pw-ad-slot.pw-ad-banner:not([hidden]),
#pwAdBottom.pw-ad-preview,
#pwAdBottom:not([hidden]) {
  padding: 0;
  min-height: 90px;
  height: 90px;
  width: 728px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 기존 위젯을 pw-card 안에서 */
.pw-col .home-widget { margin-bottom: 0; }
.pw-col .home-widget-title { font-size: 12px; color: var(--pw-text-3); text-transform: none; letter-spacing: 0; }
.pw-col .filter-item.active { background: var(--pw-accent-bg); color: var(--pw-accent); }
.pw-col .filter-item:hover { background: var(--pw-surface-2); }
.pw-col .sidebar-title { font-size: 12px; color: var(--pw-text-3); margin-bottom: 8px; text-transform: none; letter-spacing: 0; }

#screen-db .tabs { padding: 0; background: transparent; border: none; margin-bottom: 4px; }
#screen-db .tab { padding: 6px 12px; border-radius: var(--pw-radius-sm); border-bottom: 2px solid transparent; }
#screen-db .tab.active { color: var(--pw-accent); border-bottom-color: var(--pw-accent); }
#screen-db .sort-bar { margin-bottom: 8px; }
#screen-db .card.pw-card {
  background: var(--pw-surface);
  border-color: var(--pw-border);
  border-radius: var(--pw-radius);
  margin-bottom: 8px;
}

#screen-detail .detail-wrap { max-width: none; padding: 0; margin: 0; }
#screen-detail .detail-head.pw-card {
  background: var(--pw-surface);
  border-color: var(--pw-border);
  border-radius: var(--pw-radius);
  padding: 20px;
  margin-bottom: 12px;
}
#screen-detail .detail-box.pw-card {
  background: var(--pw-surface);
  border-color: var(--pw-border);
  border-radius: var(--pw-radius);
}
#screen-detail .detail-box.pw-card h3 {
  font-size: 12px;
  color: var(--pw-text-3);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  margin-bottom: 12px;
}
#screen-detail .detail-grid { gap: 12px; }
#screen-detail .detail-activity-disclaimer { margin: 0 0 12px; }
.pw-gaz-bd {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 13px;
}
.pw-gaz-bd caption {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--pw-text-3);
  margin-bottom: 6px;
}
.pw-gaz-bd thead th {
  font-size: 11px;
  font-weight: 600;
  color: var(--pw-text-3);
  border-bottom: 1px solid var(--pw-border);
}
.pw-gaz-bd th, .pw-gaz-bd td {
  border-top: 0.5px solid var(--pw-border);
  padding: 8px 6px;
}
.pw-gaz-bd tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--pw-text);
  white-space: nowrap;
  line-height: 1.35;
}
.pw-gaz-bd thead th:not(:first-child),
.pw-gaz-bd td { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) {
  .pw-gaz-bd { font-size: 12px; }
  .pw-gaz-bd.is-wide .pw-gaz-bd-sub { display: none; }
}

#screen-ranking .pw-searchfield.rank-search-bar { margin-bottom: 8px; max-width: none; }

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0;
}

/* 랭킹 카드 — design pw-rankcol */
#rankingGrid .rank-card.pw-card {
  padding: 16px;
  margin: 0;
}
#rankingGrid .rank-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
#rankingGrid .rank-card-note {
  font-size: 10px;
  color: var(--pw-text-3);
  margin: 0 0 10px;
  line-height: 1.4;
}
#rankingGrid .rank-card h3 .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
#rankingGrid .rank-item { border-bottom-color: var(--pw-border); }
#rankingGrid .rank-list-actions { margin-top: 8px; }
#rankingRightPanel .pw-card + .pw-card,
#detailRightPanel .pw-card + .pw-card,
#detailRightPanel > .pw-card { margin-top: 12px; }
#detailRightPanel > .pw-card:first-child,
#detailRightPanel > #detailMiniRank { margin-top: 12px; }

.compare-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.compare-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.compare-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--pw-border); border-radius: 999px; background: var(--pw-surface-2, rgba(255,255,255,.04)); font-size: 13px; white-space: nowrap; }
.compare-chip .pw-muted { font-size: 11px; }
.compare-table-wrap .compare-table { width: 100%; }

#screen-compare .compare-picker-card { margin-bottom: 0; }
#screen-compare .compare-picker { padding: 0; margin-bottom: 0; }
#screen-compare .compare-table-wrap { padding: 14px; overflow-x: hidden; }

.pw-cmp {
  display: grid;
  grid-template-columns: 52px repeat(var(--pw-cmp-n, 1), minmax(0, 1fr));
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  border: 0.5px solid var(--pw-border);
  border-radius: 8px;
}
.pw-cmp-cell {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 11px;
  line-height: 1.25;
  padding: 6px 4px;
  border-bottom: 0.5px solid var(--pw-border);
  border-right: 0.5px solid var(--pw-border);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.pw-cmp-label {
  justify-content: flex-start;
  text-align: left;
  background: var(--pw-surface-2);
  color: var(--pw-text-3);
  font-weight: 600;
}
.pw-cmp-head {
  position: relative;
  flex-direction: column;
  gap: 4px;
  min-height: 64px;
  background: var(--pw-surface-2);
}
.pw-cmp-head-label { min-height: 64px; }
.pw-cmp-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--pw-surface);
  border: 1px solid var(--pw-border);
  color: var(--pw-text-2);
  flex-shrink: 0;
}
.pw-cmp-avatar.tone-accent {
  border-color: var(--pw-accent);
  color: var(--pw-accent);
  background: var(--pw-accent-bg);
}
.pw-cmp-avatar.tone-danger {
  border-color: var(--pw-red);
  color: var(--pw-red);
  background: rgba(248, 81, 73, 0.12);
}
.pw-cmp-name { font-weight: 700; color: var(--pw-text); max-width: 100%; }
.pw-cmp-remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--pw-text-3);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.pw-cmp-remove:hover { color: var(--pw-red); }
.pw-cmp-district { line-height: 1.25; }
.pw-cmp-split { box-shadow: inset 0 2px 0 var(--pw-border); }
.pw-cmp-cell.is-best {
  background: var(--bg-success);
  color: var(--text-success);
  font-weight: 700;
}
.pw-cmp-cell.is-worst { color: var(--text-danger); }
.pw-cmp-cell.is-null { color: var(--pw-text-3); }
.pw-cmp-mark { font-size: 10px; font-weight: 700; margin-left: 2px; }

@media (min-width: 768px) {
  #screen-compare .compare-table-wrap { max-width: 900px; margin-left: auto; margin-right: auto; }
  .pw-cmp { grid-template-columns: 120px repeat(var(--pw-cmp-n, 1), minmax(0, 1fr)); }
  .pw-cmp-cell { min-height: 52px; font-size: 14px; padding: 8px 6px; }
  .pw-cmp-head, .pw-cmp-head-label { min-height: 76px; }
  .pw-cmp-avatar { width: 30px; height: 30px; font-size: 13px; }
  .pw-cmp-remove { width: 32px; height: 32px; font-size: 18px; }
  .pw-cmp-mark { font-size: 12px; }
}

#screen-news .news-page-toolbar { margin-bottom: 12px; }
#screen-news .news-popular-head { display: none; }
/* 좌측 칩 클래스가 중앙에 들어오면 숨김 — 모바일은 #newsTopicsMobile 사용 */
#screen-news .news-topics { display: none; }
#screen-news .news-topics-mobile-wrap { display: none; }
#screen-news .news-page-wrap { max-width: none; padding: 0; }
#screen-news .news-page-card { padding: 14px; }
#screen-news .news-list { gap: 4px; }

#screen-community .comm-layout { display: block; }
#screen-community .comm-feed { padding: 0; max-width: none; }
#screen-community .post-card.pw-card { margin-bottom: 4px; }
#screen-community .feed-controls-row { margin-bottom: 10px; }
/* 데스크톱: 좌측 #commBoards 사용 · 모바일(≤767)에서만 표시 */
.comm-boards-mobile { display: none; }
.home-filters-mobile { display: none; }
.detail-mobile-quick { display: none; }
/* DB: 내비 탭 → 필터 패널(세그·드롭·칩) → 검색 풀폭 */
.db-search-below { margin: 0 0 12px; }
.db-search-full { justify-content: stretch; }
.db-search-full .pw-searchfield,
.db-search-full .pw-page-search {
  max-width: none;
  width: 100%;
  margin: 0;
}
.db-source-row { margin: 0 0 2px; }
#screen-db .tabs.tabs--sub .tab {
  font-size: 12.5px;
  padding: 6px 11px;
}
.db-navdiv {
  height: 1px;
  background: var(--pw-border, var(--border));
  margin: 0 0 14px;
}
.db-filter-panel {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 0 0 12px;
  padding: 12px 14px;
  background: var(--pw-surface, var(--bg));
  border: 1px solid var(--pw-border, var(--border));
  border-radius: var(--pw-radius, 10px);
}
.db-filterbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
.dbf-line {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  min-width: 0;
}
.dbf-frow {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.dbf-frow--grow { flex: 1 1 auto; }
.dbf-label {
  flex: 0 0 auto;
  min-width: 34px;
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--pw-text-3, var(--muted));
  white-space: nowrap;
}
.dbf-label-inline {
  flex: 0 0 auto;
  margin: 0 2px 0 0;
  align-self: center;
}
.dbf-seg {
  display: inline-flex;
  background: var(--pw-surface-2, var(--bg2));
  border: 1px solid var(--pw-border, var(--border));
  border-radius: 999px;
  padding: 2px;
}
.dbf-seg button {
  border: 0;
  background: transparent;
  color: var(--pw-text-2, var(--muted));
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 30px;
  white-space: nowrap;
}
.dbf-seg button.on {
  background: var(--pw-accent, var(--accent));
  color: #fff;
  font-weight: 700;
}
.dbf-dd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 132px;
  min-height: 32px;
  padding: 6px 12px;
  background: var(--pw-surface-2, var(--bg2));
  border: 1px solid var(--pw-border, var(--border));
  border-radius: var(--pw-radius-sm, 6px);
  color: var(--pw-text, var(--text));
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.dbf-dd-btn--party { min-width: 148px; }
.dbf-dd-btn:hover { border-color: var(--pw-text-3, var(--muted)); }
.dbf-dd-txt { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbf-dd-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--opt-dot, #6b7080);
  flex: 0 0 auto;
}
.dbf-dd-car {
  color: var(--pw-text-3, var(--muted));
  font-size: 11px;
  line-height: 1;
  flex: 0 0 auto;
}
/* legacy chip helpers (홈 등에서 재사용 가능) */
.dbf-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.dbf-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  padding: 1px 0;
  scrollbar-width: thin;
}
.dbf-chip {
  flex: 0 0 auto;
  border: 1px solid var(--pw-border, var(--border));
  background: var(--pw-surface, var(--bg));
  color: var(--pw-text-2, var(--muted));
  font-size: 12px;
  font-family: inherit;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  min-height: 32px;
}
.dbf-chip.on {
  background: var(--pw-accent, var(--accent));
  border-color: var(--pw-accent, var(--accent));
  color: #fff;
  font-weight: 700;
}
.card.card--election { border-left: 3px solid #5b8def; }
.card.card--assembly { border-left: 3px solid #3ecf8e; }
.card.card--gazette { border-left: 3px solid #c9a227; }
.card.card--appointed { border-left: 3px solid #b07acc; }
.tag.source-badge { font-weight: 700; opacity: 0.95; }
.card-source-line {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--pw-text-2, var(--muted));
  margin: 0 0 2px;
}
.detail-provider {
  font-size: 12px;
  font-weight: 700;
  color: var(--pw-text-2, var(--muted));
  margin: 0 0 4px;
}
.detail-head--assembly { border-left: 3px solid #3ecf8e; }
.detail-head--election { border-left: 3px solid #5b8def; }
.detail-head--gazette { border-left: 3px solid #c9a227; }
.detail-head--appointed { border-left: 3px solid #b07acc; }
.detail-twin-note {
  font-size: 12px;
  color: var(--pw-text-2, var(--muted));
  margin: 0 0 6px;
}
.db-filters-collapse { margin: 0 0 10px; }
.db-filters-collapse-sum {
  display: none;
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--pw-text-2);
  padding: 10px 0;
}
.db-filters-collapse-sum::-webkit-details-marker { display: none; }
.pw-native-select-inert {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  pointer-events: none !important;
}
#screen-community .hot-banner.pw-card {
  margin-bottom: 12px;
  border: 1px solid var(--pw-card-border);
}
#screen-comm-write .comm-write-body { padding: 0; max-width: none; }
#screen-comm-write .comm-write-head { margin-bottom: 12px; }
#screen-comm-post .comm-post-wrap { padding: 0; max-width: none; }
#commWidgets .pw-card { margin-bottom: 12px; }
#commWidgets .pw-card:last-child { margin-bottom: 0; }
#miniRankContent .pw-card:last-child { margin-bottom: 0; }

.comm-notice-bar {
  margin-bottom: 12px;
  border-radius: var(--pw-radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--pw-text-2);
  border: 1px solid var(--pw-border);
}
.comm-notice-bar.highlight { background: var(--pw-surface-2); }
.comm-notice-label {
  background: var(--pw-accent);
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 700;
  flex-shrink: 0;
}

.footer {
  max-width: var(--pw-max);
  margin: 0 auto;
  box-sizing: border-box;
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 1099px) {
  .pw-shell { grid-template-columns: var(--pw-left-w) 1fr; }
  .pw-col.right { display: none; }
  .pw-header-inner { grid-template-columns: var(--pw-side-w) 1fr auto; }
  /* 2단: 광고 띠 320×100 */
  .pw-ad-top-inner { min-height: 0; }
  .pw-ad-top .pw-ad-header,
  .pw-ad-top #pwAdHeader,
  .pw-ad-top #pwAdSlotHeader,
  .pw-ad-header,
  #pwAdHeader,
  #pwAdSlotHeader,
  .pw-ad-top .pw-ad-header.pw-ad-preview,
  .pw-ad-top .pw-ad-header:not([hidden]),
  .pw-ad-top #pwAdHeader.pw-ad-preview,
  .pw-ad-top #pwAdHeader:not([hidden]) {
    width: 320px;
    height: 100px;
    min-height: 100px;
  }
}
/* v1.9.7 — 탭바(≤767)와 동일 기준. 768에서 좌·탭 둘 다 없는 1px 공백 제거 */
@media (max-width: 767px) {
  .pw-shell {
    grid-template-columns: 1fr;
    padding: 12px 0;
    border-radius: 0 0 var(--pw-radius-sm) var(--pw-radius-sm);
  }
  .pw-col.left { display: none; }
  /* 뉴스·커뮤니티 모바일 전용 크롬 (좌측 대체 · 세로 1행 예산) */
  #screen-news .news-topics-mobile-wrap {
    display: block;
    margin: 0 0 10px;
    max-height: none;
    overflow: visible;
  }
  #screen-news .news-topics-mobile-label {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--pw-text-3);
  }
  #screen-news .news-topics-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    overflow: visible;
    padding-bottom: 0;
  }
  #screen-news .news-topics-mobile .news-topic-chip {
    flex: 0 1 auto;
    white-space: nowrap;
  }
  .comm-boards-mobile {
    display: block;
    margin: 0 0 10px;
    max-height: 52px;
    overflow: hidden;
  }
  /* DB: 검색 상시 · 필터/칩 접이 · 정당 피커 버튼 */
  #screen-db .pw-page-head .page-sub { display: none; }
  #screen-db .pw-page-head { margin-bottom: 8px; }
  #screen-db .page-title { font-size: 1.15rem; }
  .db-filters-collapse {
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius-sm);
    background: var(--pw-surface);
    padding: 0 12px;
  }
  .db-filters-collapse-sum {
    display: block;
  }
  .db-filters-collapse:not([open]) .db-filters-collapse-body { display: none; }
  .db-filters-collapse[open] .db-filters-collapse-body {
    display: block;
    padding: 0 0 12px;
  }
  .db-filters-collapse .db-filter-panel {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
  }
  .db-filters-collapse .db-filterbar { margin-bottom: 0; }
  .db-search-full .pw-searchfield,
  .db-search-full .pw-page-search { max-width: none; }
  .home-filters-mobile {
    display: block;
    margin: 0 0 12px;
  }
  .home-filters-mobile-details {
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius-sm);
    background: var(--pw-surface);
    padding: 0 12px;
  }
  .home-filters-mobile-sum {
    list-style: none;
    cursor: pointer;
    padding: 12px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--pw-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .home-filters-mobile-caret {
    flex: none;
    color: var(--pw-text-3);
    font-size: 12px;
  }
  .home-filters-mobile-details[open] .home-filters-mobile-caret {
    transform: rotate(180deg);
  }
  .home-filters-mobile-sum::-webkit-details-marker { display: none; }
  .home-filters-mobile-body { padding: 0 0 12px; }
  .home-filters-mobile-more { display: inline-block; margin-top: 10px; font-size: 13px; }
  .detail-mobile-quick:not([hidden]) {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    z-index: 115;
    padding: 8px 10px;
    background: var(--pw-surface);
    border-top: 1px solid var(--pw-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
  }
  .detail-mobile-quick-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 720px;
    margin: 0 auto;
  }
  .detail-mobile-quick-name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .detail-mq-btn { min-height: 40px; flex-shrink: 0; }
  #screen-detail .detail-wrap {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }
  .pw-col { padding: 0 8px; }
  .pw-header-inner {
    grid-template-columns: 1fr auto;
    height: auto;
    min-height: 56px;
    padding: 8px 14px;
    border-radius: var(--pw-radius-sm) var(--pw-radius-sm) 0 0;
  }
  .pw-logo-cell {
    grid-column: 1;
    justify-content: flex-start;
  }
  .pw-slogan { display: none !important; }
  .pw-header-actions {
    grid-column: 2;
  }
  .pw-header-search { display: none; }
  /* 모바일: 광고 띠 320×50 */
  .pw-ad-top-inner {
    min-height: 0;
    padding: 8px 14px;
  }
  .pw-ad-top .pw-ad-header,
  .pw-ad-top #pwAdHeader,
  .pw-ad-top #pwAdSlotHeader,
  .pw-ad-header,
  #pwAdHeader,
  #pwAdSlotHeader,
  .pw-ad-top .pw-ad-header.pw-ad-preview,
  .pw-ad-top .pw-ad-header:not([hidden]),
  .pw-ad-top #pwAdHeader.pw-ad-preview,
  .pw-ad-top #pwAdHeader:not([hidden]) {
    display: flex;
    width: 320px;
    height: 50px;
    min-height: 50px;
    margin: 0 auto;
  }
  #pwAdLeft,
  #pwAdSlotLeft { display: none !important; }
  .pw-bottom .pw-ad-slot.pw-ad-banner,
  #pwAdBottom,
  #pwAdSlotBottom,
  .pw-bottom .pw-ad-slot.pw-ad-banner.pw-ad-preview,
  .pw-bottom .pw-ad-slot.pw-ad-banner:not([hidden]),
  #pwAdBottom.pw-ad-preview,
  #pwAdBottom:not([hidden]) {
    width: 320px;
    height: 50px;
    min-height: 50px;
  }
  .pw-user-nick { max-width: 7em; overflow: hidden; text-overflow: ellipsis; }
  .sort-bar { flex-wrap: wrap; gap: 8px; }
  .sort-bar-mid { order: 3; flex-basis: 100%; padding: 0; }
  /* 홈 숏컷(§C-5 H-D): 2-up 유지 · 카드 높이·패딩만 추가 축소 */
  .pw-home-shortcuts {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .pw-home-shortcuts .pw-shortcut:first-child {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    padding: 8px 10px;
    min-height: 40px;
  }
  .pw-home-shortcuts .pw-shortcut:first-child .ico { margin: 0; font-size: 16px; }
  .pw-home-shortcuts .pw-shortcut:first-child p { margin: 0; font-size: 12px; }
  .pw-home-shortcuts .pw-shortcut:first-child .pw-shortcut-person { margin-top: 0; margin-left: auto; }
  .pw-home-shortcuts .pw-shortcut:first-child .pw-shortcut-name { font-size: 12px; }
  .pw-home-shortcuts .pw-shortcut:not(:first-child) {
    padding: 8px 6px;
    min-height: 40px;
  }
  .pw-home-shortcuts .pw-shortcut:not(:first-child) .ico { font-size: 16px; }
  .pw-home-shortcuts .pw-shortcut:not(:first-child) p { margin: 4px 0 0; font-size: 12px; }
  #screen-home .pw-hero { padding: 12px 10px; }
  #screen-home .pw-hero-sub { margin: 0 0 8px; font-size: 12px; }
  .ranking-grid { grid-template-columns: 1fr; }

  /* 커뮤니티: 공지·HOT 접힌 chrome 슬림 (카드 셸 제거) */
  #screen-community .pw-notice-box.pw-card,
  #screen-community .hot-banner.pw-card {
    border: none;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    padding: 4px 0;
    margin-bottom: 6px;
  }
  #screen-community .pw-notice-box--slim,
  #screen-community .hot-banner--slim {
    min-height: 0;
  }
  #screen-community .pw-notice-head,
  #screen-community .hot-banner-head {
    gap: 8px;
    min-height: 32px;
  }
  #screen-community .pw-notice-label,
  #screen-community .hot-label {
    font-size: 10px;
    padding: 2px 6px;
  }
  #screen-community .comm-boards-mobile {
    max-height: none;
    margin-bottom: 10px;
  }
  #screen-community .comm-boards-mobile-bar {
    margin: 0;
  }
}
