/**
 * ┌─────────────────────────────────────────────────────────────────────┐
 * │  FILE INDEX — 여수뉴스포털                                          │
 * ├──────────────┬──────────────────────────────────────────────────────┤
 * │  파일명      │  header.css                                           │
 * │  위치        │  /assets/css/header.css                                        │
 * │  생성일      │  2026-05-16                                           │
 * │  수정일      │  2026-06-02                                           │
 * │  버전        │  v1.1                                                 │
 * ├──────────────┼──────────────────────────────────────────────────────┤
 * │  기능/역할   │  스타일시트 — 포털·컴포넌트별 규칙 적용               │
 * ├──────────────┼──────────────────────────────────────────────────────┤
 * │  레이아웃    │  기준 너비: 1200px (전역·포털 변수와 연동)            │
 * │  섹터 구조   │  .sector-wrap width:100% — 다열은 .sector-inner (원칙2) │
 * │  폰트 기준   │  최소 14px (--fs-base 등 변수 연동)                 │
 * ├──────────────┼──────────────────────────────────────────────────────┤
 * │  연관 파일   │  load-by  : header.php·포털 레이아웃 (상이)            │
 * │              │  변수 주입: echoLayoutVars()·포털 CSS (해당 시)       │
 * ├──────────────┼──────────────────────────────────────────────────────┤
 * │  참조 사항   │  /docs/PROJECT_RULES.md 원칙8·포털 CSS 접두 규칙       │
 * ├──────────────┼──────────────────────────────────────────────────────┤
 * │  변경 이력   │  2026-05-16 v1.1 - s2 심볼·s2v5 지역드롭 z-index → --z-portal-floating │
 * │              │  2026-05-16 v1.0 - FILE INDEX 일괄 부여                     │
 * └──────────────┴──────────────────────────────────────────────────────┘
 */

/* 섹터2 전용 이미지: .sector-inner img height:auto 덮어쓰기 방지 */
.sector-inner .s2-common-img { height: 48px !important; width: auto !important; max-width: 180px !important; }
.sector-inner .s2-portal-img { height: 48px !important; width: auto !important; max-width: 180px !important; }
.sector-inner .s2-home-img   { height: 40px !important; width: auto !important; max-width: 160px !important; }
         sector-inner(display:block) > sector-full.s2-bar >
         .s2-item × N  (9요소 가로 flex)
══════════════════════════════════════════════════ */
.s2 .sector-inner {
  display: block !important;  /* 3열 그리드 해제 → s2-bar flex에 위임 */
  padding: 0;
}

/* ── s2-bar ── */
.s2-bar {
  display: flex;
  align-items: center;
  gap: 0;
  height: 64px;
  padding: 0 4px;
  box-sizing: border-box;
  width: 100%;
}

/* ── 공통 아이템 ── */
.s2-item {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
  .s2-item.s2-hide-mob {
    display: none !important;
  }

/* ① 심볼 이미지 + 드롭다운 래퍼 */
.s2-symbol {
  padding: 0 8px 0 0;
  position: relative;
  /* z-index 불필요 – 드롭다운은 body 직속으로 이동 */
}
.s2-symbol-link {
  display: flex;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  cursor: pointer;
}
.s2-symbol-img {
  height: 48px;
  width: auto;
  max-width: 56px;
  object-fit: contain;
  display: block;
}
.s2-symbol-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: #fff;
  font-size: 20px;
}

/* 심볼 우측 캐럿 아이콘 */
.s2-sym-caret {
  font-size: 14px;
  color: rgba(255,255,255,.7);
  margin-left: 1px;
  transition: transform .2s;
  flex-shrink: 0;
}
.s2-symbol:hover .s2-sym-caret,
.s2-symbol.sym-open .s2-sym-caret {
  transform: rotate(180deg);
}

/* ── 심볼 드롭다운 패널 (body 직속 – stacking context 탈출) ── */
/* ══ 사이트 이동 드롭다운 패널 (세로 리스트 – 롯데ON 스타일) ══ */
.s2-sym-dropdown {
  display: none;           /* JS가 sym-open 클래스로 제어 */
  position: absolute;      /* top/left는 JS positionDrop()이 계산 */
  width: 215px;            /* 세로 리스트 전용 너비 */
  background: #fff;
  border: 1px solid rgba(0,0,0,.09);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.08);
  z-index: var(--z-portal-floating, 2000000);
  padding: 0;
  pointer-events: auto;
  overflow: hidden;
}
.s2-sym-dropdown.sym-open {
  display: block;
  animation: symDropIn .2s cubic-bezier(.34,1.56,.64,1);
}

/* ── 드롭다운 상단 헤더 ("사이트 이동" 타이틀) ── */
.s2-sym-drop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px 9px;
  border-bottom: 1px solid #f0f0f0;
}
.s2-sym-drop-title {
  font-size: 14px;
  font-weight: 700;
  color: #999;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.s2-sym-drop-caret {
  font-size: 14px;
  color: #ccc;
}

/* ── 세로 리스트 내부 ── */
.s2-sym-drop-inner {
  display: flex;
  flex-direction: column;
  padding: 6px 0 8px;
}

/* ── 구분선 ── */
.s2-sym-drop-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 4px 15px;
}

/* ── 각 메뉴 아이템 (가로 배치) ── */
.s2-sym-menu-item {
  display: flex;
  flex-direction: row;       /* 세로 리스트: 가로 flex */
  align-items: center;
  gap: 11px;
  padding: 9px 15px;
  border-radius: 0;
  text-decoration: none;
  color: var(--text-dark, #333);
  font-size: 14px;
  font-weight: 500;
  transition: background .13s;
  position: relative;
  text-align: left;
}
.s2-sym-menu-item:hover {
  background: #f7f8fa;
}
.s2-sym-menu-item.s2-sym-active {
  color: var(--mc, #3498db);
  font-weight: 700;
  background: color-mix(in srgb, var(--mc, #3498db) 6%, transparent);
}

/* ── 아이콘 원형 배지 (크기 축소) ── */
.s2-sym-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 14px;
  flex-shrink: 0;
  transition: transform .14s;
}
.s2-sym-menu-item:hover .s2-sym-icon {
  transform: scale(1.08);
}
.s2-sym-menu-item.s2-sym-active .s2-sym-icon {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--mc, #3498db) 30%, transparent);
}

/* ── S2 행 미니 GNB — 서브는 main.js body 클론 (.s2-gnb-dropdown-clone) ── */
.s2-gnb { flex: 1; min-width: 0; }
.s2-gnb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}
.s2-gnb-item { position: relative; flex: 0 0 auto; }
.s2-gnb-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  white-space: nowrap;
}
.s2-gnb-link:hover { color: var(--primary, #24aebe); }
.s2-gnb-dropdown {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid #dde3ea;
  border-top: 3px solid var(--primary, #24aebe);
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  z-index: 9999;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  border-radius: 0 0 8px 8px;
}
.s2-gnb-item:hover > .s2-gnb-dropdown {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
@media (min-width: 901px) {
  .s2-gnb-item.drop-open > .s2-gnb-dropdown {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}
.s2-gnb-dropdown-clone {
  position: fixed !important;
  z-index: var(--z-portal-floating, 2000000) !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid #dde3ea;
  border-top: 3px solid var(--primary, #24aebe);
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  border-radius: 0 0 8px 8px;
}
.s2-gnb-sub {
  display: block;
  padding: 8px 16px;
  color: #374151;
  text-decoration: none;
  font-size: 14px;
}
.s2-gnb-sub:hover { background: #f0f9fa; color: var(--primary, #24aebe); }
.s2-gnb-sub.sub-active { font-weight: 700; color: var(--primary, #24aebe); }

/* ── 메뉴명 ── */
.s2-sym-name {
  flex: 1;
  line-height: 1.2;
  letter-spacing: -.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 활성 도트 표시 (체크 아이콘 대체) ── */
.s2-sym-check {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mc, #3498db);
  flex-shrink: 0;
  /* fa-check 아이콘 숨김, 도트로 대체 */
  font-size: 0;
}

/* ② 포털종류 이미지 / 텍스트 로고 */
.s2-portal-type {
  padding: 0 12px 0 6px;
  border-right: 1px solid rgba(0,0,0,.08);
  margin-right: 12px;
}
.s2-portal-type a {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.s2-portal-type-img {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}
.s2-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.s2-logo-main {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.s2-logo-sub {
  font-size: 14px;
  color: #999;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ③ 검색창 */
.s2-search {
  flex: 1;            /* 나머지 공간 모두 차지 */
  min-width: 160px;
  max-width: 340px;
  padding: 0 12px 0 0;
}
.s2-search-form {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  background: #f5f5f5;
  border: 1.5px solid #e0e0e0;
  border-radius: 22px;
  overflow: hidden;
  transition: border-color .2s;
}
.s2-search-form:focus-within {
  border-color: var(--primary, #c0392b);
  background: #fff;
}
.s2-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 15px;
  outline: none;
  color: #333;
}
.s2-search-input::placeholder { color: #aaa; }
.s2-search-btn {
  flex-shrink: 0;
  border: none;
  color: #fff;
  padding: 8px 14px;
  font-size: 15px;
  cursor: pointer;
  border-radius: 0 20px 20px 0;
  transition: opacity .15s;
}
.s2-search-btn:hover { opacity: .85; }

/* ④⑤ 로그인/회원가입, ⑥ 서비스안내, ⑦ 후원하기, ⑧⑨ 추가메뉴 */
.s2-util-btn {
  padding: 0 3px;
}
.s2-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 10px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s, color .15s, opacity .15s;
  line-height: 1.3;
  min-width: 48px;
}
.s2-btn i {
  font-size: 16px;
  line-height: 1;
}
/* 로그인 버튼 */
.s2-btn-login {
  color: #555;
  border: 1.5px solid #e0e0e0;
  background: #fff;
}
.s2-btn-login:hover { background: #f5f5f5; color: #222; }

/* 회원가입 버튼 */
.s2-btn-join {
  background: #fff;
  border: 1.5px solid currentColor;
}
.s2-btn-join:hover { opacity: .8; }

/* 서비스안내 버튼 */
.s2-btn-service {
  color: #444;
  background: #f0f4f8;
  border: 1.5px solid #d0d8e4;
}
.s2-btn-service:hover { background: #e2e8f0; }

/* 후원하기 버튼 */
.s2-btn-donation {
  color: #fff;
  border: none;
}
.s2-btn-donation:hover { opacity: .88; }

/* 추가메뉴 버튼 */
.s2-btn-extra {
  color: #555;
  background: #f8f8f8;
  border: 1.5px solid #e5e5e5;
}
.s2-btn-extra:hover { background: #efefef; }

/* 컨트롤 영역 (글자크기, 테마, 관심) */
.s2-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 8px;
  border-left: 1px solid rgba(0,0,0,.08);
  margin-left: 4px;
  flex-shrink: 0;
}
.s2-ctrl-btn {
  font-size: 15px;
  text-decoration: none;
  line-height: 1;
}
.s2-fz { }
.s2-theme { }
.s2-interest { }

/* 다크모드 */
html[data-theme="dark"] .s2-bar {
  background: var(--dark-s2-bg, #1e1e1e);
}
html[data-theme="dark"] .s2-search-form {
  background: #2a2a2a;
  border-color: #444;
}
html[data-theme="dark"] .s2-search-form:focus-within {
  background: #333;
}
html[data-theme="dark"] .s2-search-input { color: #e0e0e0; }
html[data-theme="dark"] .s2-btn-login,
html[data-theme="dark"] .s2-btn-service,
html[data-theme="dark"] .s2-btn-extra {
  background: #2a2a2a;
  border-color: #444;
  color: #ccc;
}
html[data-theme="dark"] .s2-portal-type { border-color: rgba(255,255,255,.1); }
html[data-theme="dark"] .s2-controls    { border-color: rgba(255,255,255,.1); }
html[data-theme="dark"] .s2-logo-sub   { color: #666; }
  .s2-bar { height: auto; min-height: 56px; flex-wrap: wrap; padding: 6px 8px; gap: 4px; }
  .s2-search { max-width: none; flex-basis: 100%; order: 10; padding: 4px 0 0; }
  .s2-portal-type { border-right: none; margin-right: 4px; }
  /* S2 바: 2행 레이아웃 - 1행: 심볼+버튼류, 2행: 검색창 */
  .s2-bar {
    height: auto !important;
    flex-wrap: wrap !important;
    padding: 4px 8px !important;
    gap: 2px 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  /* 심볼(로고): 크기 축소 */
  .s2-symbol-img  { height: 36px !important; max-width: 40px !important; }
  /* 포털타입 이미지: 모바일 숨김 (심볼로 대체) */
  .s2-portal-type { display: none !important; }
  /* 검색창: 두 번째 행, 전체 폭 */
  .s2-search {
    flex-basis: 100% !important;
    min-width: 0 !important;     /* ← min-width:160px 제거 */
    max-width: 100% !important;
    order: 10 !important;
    padding: 2px 0 4px !important;
  }
  /* 버튼: 텍스트 숨기고 아이콘만 */
  .s2-util-btn { padding: 0 2px !important; }
  .s2-btn { padding: 4px 6px !important; font-size: 14px !important; min-width: 32px !important; }
  .s2-btn i { font-size: 15px !important; }
  .s2-btn span { display: none !important; }
  /* 서비스안내·후원하기 버튼: 모바일 숨김 (공간 절약) */
  .s2-btn-service,
  .s2-btn-extra   { display: none !important; }
  /* 글자크기·테마 컨트롤 */
  .s2-controls { gap: 4px !important; padding-left: 4px !important; }
  .s2-bar { padding: 3px 6px !important; }
  .s2-symbol-img { height: 30px !important; max-width: 34px !important; }
  /* 로그인·회원가입 버튼도 숨김 (공간 절약) */
  .s2-btn-login,
  .s2-btn-join    { display: none !important; }

/* ── 사이트 이동 드롭다운 다크모드 ── */
html[data-theme="dark"] .s2-sym-dropdown {
  background: #1a1f2e;
  border-color: rgba(255,255,255,.1);
  box-shadow: 0 12px 36px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.25);
}
html[data-theme="dark"] .s2-sym-drop-header {
  border-bottom-color: rgba(255,255,255,.08);
}
html[data-theme="dark"] .s2-sym-drop-title {
  color: rgba(255,255,255,.4);
}
html[data-theme="dark"] .s2-sym-drop-caret {
  color: rgba(255,255,255,.25);
}
html[data-theme="dark"] .s2-sym-drop-divider {
  background: rgba(255,255,255,.08);
}
html[data-theme="dark"] .s2-sym-menu-item {
  color: #c9cdd4;
}
html[data-theme="dark"] .s2-sym-menu-item:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}
html[data-theme="dark"] .s2-sym-menu-item.s2-sym-active {
  background: color-mix(in srgb, var(--mc, #3498db) 18%, transparent);
  color: #fff;
}
  .s2-sym-dropdown {
    width: 200px;  /* 모바일에서 살짝 좁게 */
  }
  .s2-sym-dropdown {
    width: 210px;  /* 태블릿 동일 너비 유지 */
  }

  /* ── s2-bar: 높이 52px 단일 행 ── */
  .s2-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding: 0 10px !important;
    gap: 6px !important;
    overflow: visible !important;   /* ← 검색창 잘림 방지 */
    box-sizing: border-box;
  }

  /* ── 로고(심볼): 좌측 고정 ── */
  .s2-item.s2-symbol {
    display: flex !important;
    flex-shrink: 0 !important;
    order: 1;
    padding-right: 2px;
  }
  .s2-symbol-img { height: 34px !important; max-width: 40px !important; width: auto !important; }
  .s2-sym-caret  { display: none !important; }
  .s2-sym-dropdown { display: none !important; }  /* 드롭다운 모바일 비활성 */

  /* ── 포털타입+로고텍스트: 숨김 ── */
  .s2-item.s2-portal-type,
  .s2-portal-type { display: none !important; }
  .s2-logo-text { display: none !important; }

  /* ── 검색창: flex-grow로 중간 공간 최대 활용 ── */
  .s2-item.s2-search,
  .s2-search {
    display: flex !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    order: 2;
  }
  .s2-search-form {
    width: 100% !important;
    height: 36px !important;
    min-width: 0 !important;
    border-radius: 20px !important;
  }
  .s2-search-input {
    font-size: 15px !important;
    padding: 0 10px !important;
    min-width: 0 !important;
  }
  .s2-search-btn {
    width: 36px !important;
    height: 36px !important;
    flex-shrink: 0;
    border-radius: 0 20px 20px 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* ── s2-util-btn (유틸버튼들): 로그인/회원가입만, 순서3 ── */
  .s2-item.s2-util-btn { order: 3; }

  /* 서비스/후원/추가 버튼 숨김 (공간 절약) */
  .s2-item.s2-util-btn:has(.s2-btn-service),
  .s2-item.s2-util-btn:has(.s2-btn-donation),
  .s2-item.s2-util-btn:has(.s2-btn-extra) { display: none !important; }
  /* 포함 선택자 미지원 브라우저 대비 */
  .s2-btn-service  { display: none !important; }
  .s2-btn-donation { display: none !important; }
  .s2-btn-extra    { display: none !important; }

  /* ── 우측 컨트롤 그룹(폰트/테마/관심): 맨 우측 ── */
  .s2-item.s2-controls,
  .s2-controls {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    flex-shrink: 0 !important;
    padding-left: 2px !important;
    border-left: none !important;
    order: 4;
  }

  /* 모든 s2-btn: 아이콘만 표시 */
  .s2-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    border-radius: 6px !important;
    font-size: 0 !important;
    flex-shrink: 0;
  }
  .s2-btn i, .s2-btn svg {
    font-size: 15px !important;
    margin: 0 !important;
  }
  .s2-btn span { display: none !important; }

  /* 로그인/회원가입 버튼 표시 */
  .s2-btn-login,
  .s2-btn-join { display: flex !important; }

  /* 관심/폰트/테마 버튼 표시 */
  .s2-interest { display: flex !important; }
  .s2-fz       { display: flex !important; }
  .s2-theme    { display: flex !important; }

/* ── 전체 바 */
.s2v5-bar {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 68px !important;
  height: auto !important;
  padding: 10px 28px !important;
  gap: 24px !important;
  box-sizing: border-box !important;
  background: #fff !important;
  border-bottom: 1px solid rgba(0,0,0,.07) !important;
  overflow: visible !important;  /* 드롭다운이 바깥으로 나올 수 있도록 */
  position: relative !important;
  z-index: 500 !important;       /* 섹터3보다 위 */
}

/* ── 공통 아이템 */
.s2v5-item {
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

/* ① 로고심볼 */
.s2v5-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  opacity: 1;
  transition: opacity .2s;
}
.s2v5-logo-link:hover { opacity: .75; }
.s2v5-logo-img {
  height: 44px !important;
  width: auto !important;
  max-width: 140px !important;
  object-fit: contain !important;
  display: block !important;
}
.s2v5-logo-icon {
  font-size: 32px !important;
  color: #24aebe !important;
}

/* ② 포털이미지 */
.s2v5-portal-link,
.s2v5-portal-text-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity .2s;
}
.s2v5-portal-link:hover,
.s2v5-portal-text-link:hover { opacity: .75; }
.s2v5-portal-img {
  height: 44px !important;
  width: auto !important;
  max-width: 160px !important;
  object-fit: contain !important;
  display: block !important;
}
.s2v5-portal-text {
  font-size: 17px;
  font-weight: 700;
  color: #24aebe;
  white-space: nowrap;
}

/* ③ 검색창 */
.s2v5-search {
  flex: 1 !important;
  min-width: 200px !important;
  max-width: 640px !important;
}
.s2v5-search-form {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  height: 46px !important;
  border: 2px solid #24aebe !important;
  border-radius: 23px !important;
  overflow: hidden !important;
  background: #fff !important;
  box-sizing: border-box !important;
}
.s2v5-search-input {
  flex: 1 !important;
  height: 100% !important;
  padding: 0 20px !important;
  border: none !important;
  outline: none !important;
  font-size: 15px !important;
  background: transparent !important;
  color: #1f2937 !important;
}
.s2v5-search-input::placeholder { color: #aaa; }
.s2v5-search-btn {
  flex-shrink: 0;
  height: 100% !important;
  padding: 0 22px !important;
  background: #24aebe !important;
  color: #fff !important;
  border: none !important;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.s2v5-search-btn:hover { background: #1d9aaa !important; }

/* ④ 로그인/로그아웃 */
.s2v5-auth {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap;
}
.s2v5-username {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}
.s2v5-auth-btn {
  font-size: 18px !important;
  color: #555;
  text-decoration: none;
  transition: color .2s;
}
.s2v5-auth-btn:hover { color: #24aebe; }
.s2v5-auth-div {
  color: #d1d5db;
  font-size: 18px;
}

/* ⑤ 알림 */
.s2v5-noti {
  position: relative !important;
}
.s2v5-noti-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #6b7280;
  text-decoration: none;
  font-size: 18px;
  transition: all .2s;
}
.s2v5-noti-btn:hover { background: #e5e7eb; color: #24aebe; }
.s2v5-noti-badge {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  background: #ef4444;
  color: #fff;
  font-size: 14px; font-weight: 700;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}

/* ⑥ 지역 */
.s2v5-region {
  position: relative !important;
  z-index: 9998 !important;
}
.s2v5-region-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  font-size: 18px;
  color: #1f2937;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}
.s2v5-region-btn:hover { border-color: #24aebe; background: #f3f4f6; }
.s2v5-chevron {
  font-size: 14px;
  color: #9ca3af;
  transition: transform .2s;
}
.s2v5-region-btn.open .s2v5-chevron { transform: rotate(180deg); }
.s2v5-region-drop {
  display: none;
  /* JS에서 position:fixed + body 직속으로 이동 — stacking context 완전 탈출 */
  position: fixed;
  min-width: 200px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-top: 3px solid #24aebe;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  padding: 4px 0;
  z-index: var(--z-portal-floating, 2000000) !important;
}
.s2v5-region-drop.open { display: block; }
.s2v5-region-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  color: #374151;
  text-decoration: none;
  font-size: 20px !important;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.s2v5-region-item:hover { background: #f0fafa; color: #24aebe; }
.s2v5-region-item.on {
  background: #e0f7fa;
  color: #0891b2;
  font-weight: 700;
  border-left: 3px solid #24aebe;
  padding-left: 19px;
}
.s2v5-region-item i { font-size: 15px; width: 18px; text-align: center; }

/* ⑦ 기타 */
.s2v5-extra-link {
  font-size: 18px;
  color: #6b7280;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s;
}
.s2v5-extra-link:hover { color: #24aebe; }
.s2v5-extra-placeholder {
  font-size: 18px;
  color: #d1d5db;
  letter-spacing: 2px;
}

/* ── 다크모드 */
html[data-theme="dark"] .s2v5-bar {
  background: #1f2937 !important;
  border-color: rgba(255,255,255,.08) !important;
}
html[data-theme="dark"] .s2v5-portal-text,
html[data-theme="dark"] .s2v5-username { color: #f3f4f6; }
html[data-theme="dark"] .s2v5-search-form {
  background: #374151 !important;
  border-color: #24aebe !important;
}
html[data-theme="dark"] .s2v5-search-input { color: #f3f4f6 !important; }
html[data-theme="dark"] .s2v5-auth-btn { color: #9ca3af; }
html[data-theme="dark"] .s2v5-auth-btn:hover { color: #24aebe; }
html[data-theme="dark"] .s2v5-auth-div { color: #4b5563; }
html[data-theme="dark"] .s2v5-noti-btn { background: #374151; color: #9ca3af; }
html[data-theme="dark"] .s2v5-noti-btn:hover { background: #4b5563; color: #24aebe; }
html[data-theme="dark"] .s2v5-region-btn { background: #374151; border-color: #4b5563; color: #f3f4f6; }
html[data-theme="dark"] .s2v5-region-btn:hover { border-color: #24aebe; }
html[data-theme="dark"] .s2v5-region-drop { background: #374151; border-color: #4b5563; }
html[data-theme="dark"] .s2v5-region-item { color: #e5e7eb; }
html[data-theme="dark"] .s2v5-region-item:hover { background: #4b5563; color: #24aebe; }
html[data-theme="dark"] .s2v5-region-item.on { background: #1e3a5f; color: #24aebe; }
html[data-theme="dark"] .s2v5-extra-link { color: #9ca3af; }
html[data-theme="dark"] .s2v5-extra-link:hover { color: #24aebe; }
  .s2v5-bar { flex-wrap: wrap; gap: 12px; padding: 10px 16px; min-height: auto; }
  .s2v5-search { order: 10; max-width: none; width: 100%; }
  .s2v5-auth-btn { font-size: 18px !important; }
  .s2v5-region-btn { font-size: 16px; padding: 6px 12px; }

/* ── 반응형: 모바일 (768px 이하) ─────────────────────────── */
@media (max-width: 768px) {
  .s2v5-bar { flex-wrap: wrap; gap: 12px; padding: 10px 16px; min-height: auto; }
  .s2v5-search { order: 10; max-width: none; width: 100%; }
  .s2v5-auth-btn { font-size: 18px !important; }
  .s2v5-region-btn { font-size: 16px; padding: 6px 12px; }
}

/* portal-mobile-header — 가시성 SSOT: includes/header_critical_css.php (first-paint)
   아래 규칙은 외부 CSS 로드 후 보강·뉴스 예외 레이아웃용 */
.nhx2-drawer:not(.is-open),
.nhx2-drawer[hidden] {
  display: none !important;
  pointer-events: none !important;
}

/* 모바일 전용 헤더 셸 — 데스크탑 S1/S2/S3 축소 렌더 대신 별도 UI */
.portal-mobile-header {
  display: none;
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.pmh-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
  min-width: 0;
}

.pmh-notice-link {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #334155;
  font-size: var(--fs-sm, 15px);
  font-weight: 700;
  text-decoration: none;
}

.pmh-notice-link i,
.pmh-notice-label {
  color: var(--pmh-accent, #0a4d8c);
  flex-shrink: 0;
}

.pmh-notice-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 모바일 헤더 공지 티커 — 좌측으로 흐름 (board.is_notice=1 자동 노출) */
.pmh-notice-label-fixed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  color: var(--pmh-accent, #0a4d8c);
  font-size: var(--fs-sm, 15px);
  font-weight: 800;
  white-space: nowrap;
}
.pmh-notice-ticker {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%);
}
.pmh-notice-track {
  display: inline-flex;
  gap: 28px;
  white-space: nowrap;
  animation: pmh-notice-scroll 12s linear infinite;
  will-change: transform;
}
.pmh-notice-ticker:hover .pmh-notice-track,
.pmh-notice-ticker:focus-within .pmh-notice-track { animation-play-state: running !important; }
.pmh-notice-item {
  color: #334155;
  font-size: var(--fs-sm, 15px);
  font-weight: 600;
  text-decoration: none;
}
.pmh-notice-item:hover { color: #0f172a; text-decoration: underline; }
@keyframes pmh-notice-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* L14·NTB 공지 티커 — loop + sweep 모드 (portal.css 미로드 14섹터 페이지용 SSOT) */
@keyframes l14-notice-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes ntb-notice-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes nhx2-notice-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes notice-ticker-sweep {
  0%   { transform: translateX(var(--notice-sweep-start, 100%)); }
  100% { transform: translateX(var(--notice-sweep-end, -100%)); }
}
.notice-ticker--sweep {
  animation: notice-ticker-sweep var(--notice-sweep-dur, 14s) linear infinite !important;
}
.l14-topbar-ticker-track,
.ntb-notice-track,
.nhx2-notice-track,
.pmh-notice-track {
  animation-play-state: running !important;
}
@media (prefers-reduced-motion: reduce) { .pmh-notice-track { animation: none; } }

.pmh-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 8px 14px;
  background: #fff;
}

.pmh-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #0f172a;
  font-size: var(--fs-lg, 18px);
  font-weight: 900;
  letter-spacing: -0.4px;
  text-decoration: none;
}

.pmh-logo-img {
  display: block;
  width: auto;
  max-width: 150px;
  max-height: 40px;
  object-fit: contain;
}

.pmh-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--pmh-accent, #0a4d8c);
  color: #fff;
  font-size: var(--fs-xl, 20px);
  flex-shrink: 0;
}

.pmh-logo-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pmh-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pmh-icon-btn,
.pmh-menu-btn,
.pmh-layer-close,
.pmh-search-submit {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.pmh-icon-btn,
.pmh-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: var(--fs-md, 17px);
  font-weight: 800;
  text-decoration: none;
}

.pmh-menu-btn {
  gap: 5px;
  padding: 0 10px;
  background: var(--pmh-accent, #0a4d8c);
  color: #fff;
  font-size: var(--fs-sm, 15px);
}

.pmh-context-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 14px 10px;
  background: #fff;
}

.pmh-current {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.pmh-current span {
  display: block;
  color: #64748b;
  font-size: var(--fs-sm, 15px);
  font-weight: 800;
  line-height: 1.2;
}

.pmh-current strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #0f172a;
  font-size: var(--fs-base, 16px);
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pmh-home-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(44px, 1fr));
  gap: 5px;
}

.pmh-home-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font-size: var(--fs-sm, 15px);
  font-weight: 900;
  text-decoration: none;
}

.pmh-home-switch a.is-active,
.pmh-home-switch a:hover,
.pmh-home-switch a:focus-visible {
  border-color: var(--pmh-accent, #0a4d8c);
  background: var(--pmh-accent, #0a4d8c);
  color: #fff;
}

.pmh-layer,
.pmh-drawer-wrap {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal, 2100000);
}

.pmh-search-layer {
  top: 0;
  bottom: auto;
  padding: 14px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
}

.pmh-layer-head,
.pmh-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pmh-layer-head strong,
.pmh-drawer-head strong {
  display: block;
  color: #0f172a;
  font-size: var(--fs-lg, 18px);
  font-weight: 900;
}

.pmh-layer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: var(--fs-md, 17px);
}

.pmh-search-form {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 12px;
}

.pmh-search-input {
  min-width: 0;
  flex: 1;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  color: #0f172a;
  font-size: var(--fs-base, 16px);
}

.pmh-search-submit {
  min-width: 64px;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--pmh-accent, #0a4d8c);
  color: #fff;
  font-size: var(--fs-md, 17px);
  font-weight: 900;
}

.pmh-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.45);
}

.pmh-drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(88vw, 390px);
  max-width: 100%;
  height: 100dvh;
  background: #fff;
  box-shadow: -18px 0 40px rgba(15, 23, 42, 0.22);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.pmh-drawer-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.pmh-drawer-head span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: var(--fs-sm, 15px);
  font-weight: 700;
}

.pmh-quick,
.pmh-news-grid,
.pmh-region-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pmh-quick {
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f7;
}

.pmh-quick a,
.pmh-news-grid a,
.pmh-region-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  font-size: var(--fs-base, 16px);
  font-weight: 800;
  text-decoration: none;
}

.pmh-drawer-section {
  padding: 16px;
  border-bottom: 1px solid #eef2f7;
}

.pmh-drawer-section h2 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: var(--fs-lg, 18px);
  font-weight: 900;
}

.pmh-menu-list {
  display: grid;
  gap: 8px;
}

.pmh-menu-group {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.pmh-menu-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 0 13px;
  color: #0f172a;
  font-size: var(--fs-base, 16px);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.pmh-menu-group summary::-webkit-details-marker {
  display: none;
}

.pmh-menu-group summary span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pmh-menu-group[open] summary > i {
  transform: rotate(180deg);
}

.pmh-sub-list {
  display: grid;
  gap: 1px;
  padding: 6px;
  background: #f8fafc;
}

.pmh-sub-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #475569;
  font-size: var(--fs-sm, 15px);
  font-weight: 700;
  text-decoration: none;
}

.pmh-sub-list a:hover,
.pmh-news-grid a.is-active,
.pmh-region-grid a.is-active {
  background: color-mix(in srgb, var(--pmh-accent, #0a4d8c) 10%, #fff);
  color: var(--pmh-accent, #0a4d8c);
}

.pmh-sub-home {
  color: var(--pmh-accent, #0a4d8c) !important;
  font-weight: 900 !important;
}

.pmh-region-grid a {
  justify-content: flex-start;
  gap: 8px;
}

.pmh-lock {
  overflow: hidden;
}

@media (max-width: 768px) {
  .portal-mobile-header {
    display: block !important;
  }

  #layout-header > .sector-wrap.s1,
  #layout-header > .sector-wrap.s2,
  #layout-header > .sector-wrap.s3,
  #layout-header.layout-header-news-v2 > .sector-wrap.s4,
  #layout-header.layout-header-news-v2 > .sector-wrap.s5,
  #layout-header.layout-header-news-v2 > .sector-wrap.s6,
  .l14-shell > .l14-sec.l14-s1,
  .l14-shell > .l14-sec.l14-s2,
  .l14-shell > .l14-sec.l14-s3,
  #layout-header > .l14-sec.l14-s1,
  #layout-header > .l14-sec.l14-s2,
  #layout-header > .l14-sec.l14-s3,
  .l14-shell[data-menu="news"] > .l14-sec.l14-s4,
  .l14-shell[data-menu="news"] > .l14-sec.l14-s5,
  .l14-shell[data-menu="news"] > .l14-sec.l14-s6,
  .l14-shell[data-menu="news"] #layout-header > .l14-sec.l14-s4,
  .l14-shell[data-menu="news"] #layout-header > .l14-sec.l14-s5,
  .l14-shell[data-menu="news"] #layout-header > .l14-sec.l14-s6 {
    display: none !important;
  }

  /* 뉴스: s3 = GNB(row2) 아래 header_sub 리더보드 — 모바일에서도 노출 */
  #layout-header.layout-header-news-v2 > .sector-wrap.s3[data-news-sub-ad="1"] {
    display: block !important;
  }
  #layout-header.layout-header-news-v2 > .sector-wrap.s3[data-news-sub-ad="1"] .nh2-row3 {
    border-bottom: 1px solid #e2e8f0;
  }
  #layout-header.layout-header-news-v2 > .sector-wrap.s3[data-news-sub-ad="1"] .nh2-banner-inner {
    padding: 8px 12px;
    min-height: auto;
  }

  /* L14: s4 top_banner = GNB 아래 header_sub — 모바일에서도 노출 (운영 레이아웃) */
  .l14-shell[data-menu="news"] > .l14-sec.l14-s4.l14-top_banner,
  .l14-shell[data-menu="news"] #layout-header > .l14-sec.l14-s4.l14-top_banner {
    display: block !important;
  }
  .l14-shell[data-menu="news"] .l14-s4.l14-top_banner .l14-inner {
    padding-top: 8px;
    padding-bottom: 8px;
    padding-left: var(--news-page-inset-x-md, 10px);
    padding-right: var(--news-page-inset-x-md, 10px);
  }
  .l14-shell[data-menu="news"] .l14-s4.l14-top_banner img,
  .l14-shell[data-menu="news"] .l14-s4.l14-top_banner .fb-banner-wrap {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .layout-header-news-v2 .nh2-row2,
  .ntb-sticky {
    position: static !important;
    top: auto !important;
  }

  .ntb-burger,
  .gnb-hamburger {
    display: none !important;
  }
}

@media (max-width: 430px) {
  .pmh-context-bar {
    grid-template-columns: 1fr;
  }

  .pmh-home-switch {
    width: 100%;
  }
}
