  :root {
    --navy: #0f2d52;
    --navy-mid: #185FA5;
    --navy-light: #2d7dd2;
    --navy-pale: #e6f1fb;
    --navy-bg: #f0f5fc;
    --red: #e03131;
    --red-pale: #fff0f0;    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-400: #adb5bd;
    --gray-600: #6c757d;
    --gray-800: #343a40;
    --text: #0d1b2a;
    --border: #d0dce8;
    --radius: 8px;
    --thumb-row-pad: 4px;
    --radius-lg: 8px;
  }

  /* ── 다크모드 (2026-07-17 실험): 팔레트·토글은 common.css/nav.js 공용. 여기는 메인 전용 보정만 ── */
  html.dark .board-section-title { color: #9cc4ee; } /* var(--navy) 텍스트 → 밝은 블루 */
  html.dark .nav-dropdown-item:hover { background: var(--gray-200); }
  html.dark .propose-bar-text { color: var(--text); } /* 제안 게이지 "추천 달성 NN/NN" — 다크에서 안 보임 → 제목 색 */
  html.dark .popup-card, html.dark .popup-body { background: var(--white); }
  html.dark .popup-footer { background: var(--gray-100); }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: var(--font-main);
    background: var(--navy-bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh; min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  /* ── NAV ── */
  nav {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 0 var(--navy);
  }
  .nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 10px;
  }
  .nav-top-bg {
    /* 배경은 nav에 gradient로 처리됨 */
  }
  .nav-top {
    display: flex;
    align-items: center;
    height: 56px;
    gap: 16px;
    position: relative;
  }
  .nav-logo {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    color: var(--navy);
    letter-spacing: -0.5px;
    flex-shrink: 0;
  }
  .nav-logo span { color: #85b7eb; }
  .nav-search {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 360px;
    display: flex;
    align-items: center;
    background: var(--gray-100);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.15s;
  }
  .nav-search:focus-within {
    border-color: var(--navy-mid);
    background: #fff;
  }
  .nav-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 13px;
    font-family: var(--font-main);
    padding: 8px 12px;
  }
  .nav-search input::placeholder { color: var(--gray-400); }
  .nav-search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    transition: color 0.15s;
  }
  .nav-search-btn:hover { color: var(--navy-mid); }
  .nav-bottom-wrap {
    background: var(--navy);
  }
  .nav-bottom {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
  }
  .nav-links {
    display: flex;
    gap: 4px;
  }
  .nav-link {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    background: transparent;
    font-family: var(--font-main);
  }
  .nav-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
  .nav-link.active { background: rgba(133,183,235,0.2); color: #85b7eb; }
  .nav-right { display: flex; gap: 8px; align-items: center; }
  .btn-login {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.85);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font-main);
    transition: all 0.15s;
  }
  .btn-login:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); }
  .btn-write {
    background: var(--navy-light);
    border: none;
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: 500;
    transition: background 0.15s;
  }
  .btn-write:hover { background: #3a8fe0; }

  /* (HERO BANNER CSS 제거 — 2026-07-29 기능 폐지) */

  .vote-bars {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
  }
  .vote-bar-pro {
    flex: 63;
    background: var(--navy-light);
    color: #fff;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    justify-content: space-between;
    min-width: 0; overflow: hidden; white-space: nowrap;
  }
  .vote-bar-neu {
    flex: 20;
    min-width: 0;
    background: #f59e0b;
    color: #fff;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    justify-content: space-between;
  }
  .vote-bar-con {
    flex: 37;
    background: var(--red);
    color: #fff;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    justify-content: space-between;
    min-width: 0; overflow: hidden; white-space: nowrap;
  }
  .vote-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .vote-count { color: rgba(255,255,255,0.5); font-size: 12px; }

  /* ── LAYOUT ── */
  .layout {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 10px;
    flex: 1;
  }

  /* ── 게시판 섹션 ── */
  .board-area { display: flex; flex-direction: column; gap: 12px; }
  /* === 제목 라인 새 base ===
     원칙: 부모 flex+align-items:baseline / 자식 inline 자연 baseline
     [N] 사이즈는 부모(제목) 폰트 inherit (미디어 아이콘은 2026-07-14 제거) */
  /* align-items baseline (2026-07-14): 제목과 [N]이 같은 글자 기준선 공유 — 옛 center는 줄높이 차이로 우연히 맞던 구조 */
  .post-card-simple { display: flex; align-items: baseline; gap: 8px; padding: 10px; cursor: pointer; border-bottom: 1px solid var(--gray-100); color: inherit; text-decoration: none; }
  .post-card-simple:visited { color: inherit; }
  .post-card-simple:last-child { border-bottom: none; }
  .post-card-simple:hover { background: var(--gray-50); }
  .post-title-simple { font-size: 13px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1; min-width: 0; }
  .post-title-simple.visited { color: var(--gray-400); }
  .post-title.visited, .post-title.visited .post-title-text { color: var(--gray-400); }
  /* [N]은 읽은 글에서도 빨간색 유지 (2026-07-14 - 클래스 통일 때 인라인 red가 빠지며 회색으로 덮이던 회귀 fix) */
  .post-title.visited .post-comment-count { color: var(--red); }
  .best-top-b-title.visited { color: var(--gray-400); }
  /* margin-left -5px = 부모 gap 8px 상쇄 → 제목↔[N] 실간격 3px (전 컴포넌트 표준 간격, 2026-07-14) */
  .simple-extra { display: flex; align-items: center; flex-shrink: 0; gap: 2px; line-height: 1; font-size: 13px; margin-left: -5px; }
  .board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  @media (max-width: 768px) { .board-grid { grid-template-columns: 1fr; } }
  .board-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .board-grid .board-section { min-height: 230px; }
  .board-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--gray-50);
  }
  .board-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
  }
  .board-more {
    font-size: 13px; /* 2026-07-20: 제목(board-section-title)과 동일 크기 */
    color: var(--gray-400);
    text-decoration: none;
  }
  .board-more:hover { color: var(--navy-mid); }

  /* 글 카드 */
  .post-list { display: flex; flex-direction: column; gap: 10px; }
  #list-best > .best-top-grid-b + div { border-top: 1px solid var(--gray-100); }
  .post-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
  }  .post-card:hover { border-color: var(--navy-light); }
  .post-card-reg {
    padding: 0;
    height: 74px;
    box-sizing: border-box;
    overflow: hidden;
  }
  .post-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0; /* 2026-07-20: 2→0, 제목+푸터 높이를 썸네일(46) 안에 맞춰 핫글과 동일 행높이(54px) */
  }
  .post-card-top:last-child { margin-bottom: 0; }
  /* [N] 통일 표준 (2026-07-14): 제목과 같은 폰트/줄높이 상속 + 베이스라인 정렬 + 광학 보정 위로 1px (전 컴포넌트 공통) */
  .post-comment-count {
    display: inline-block;
    color: var(--red);
    font-size: inherit;
    font-weight: 700;
    vertical-align: baseline;
    transform: translateY(var(--cc-nudge));
  }
  /* 베스트 세로 카드 제목 라인 — flex 부모, 자식들은 동일 .ti class */
  .post-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    overflow: hidden;
  }
  /* 베스트 세로 카드 — 제목/[N]/SVG 모두 .post-title-text class 한 가지 사용 */
  .post-title .post-title-text {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    vertical-align: baseline;
    margin-left: 3px;
    flex-shrink: 0;
  }
  /* 첫 자식 (실제 제목 텍스트)만 ellipsis */
  .post-title .post-title-text:first-child {
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: 0;
  }
  .post-title svg.post-title-text { width: 14px; height: 14px; align-self: center; }
  @media (max-width: 768px) {
    .post-title .post-title-text { font-size: 13px; }
    .post-title svg.post-title-text { width: 13px; height: 13px; }
  }
  @media (max-width: 360px) {
    .post-title .post-title-text { font-size: 12px; }
    .post-title svg.post-title-text { width: 12px; height: 12px; }
  }
  .td-title-extra {
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: 3px;  /* 제목 ↔ extra 사이 3px */
    color: var(--gray-400);  /* sep 점 색 */
  }
  .post-title-reg {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .post-card-inner { display: flex; height: 100%; }
  .post-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding: 0 10px; /* 2026-07-20: PC 상하 패딩 제거 — 콘텐츠(제목+뱃지푸터)가 썸네일(46)보다 커져 행이 늘어나던 것 fix. 모바일은 아래 오버라이드 유지 */
  }
  .post-thumb-img {
    flex-shrink: 0;
    width: 82px;
    height: 46px;
    margin: 0; /* 2026-07-20: 좌측 2px 제거 — 행 padding-left(thumb-row-pad)가 여백 담당 */
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border);
    box-sizing: border-box;
  }
  .post-thumb-video {
    flex-shrink: 0;
    width: 82px;
    height: 46px;
    margin: 0; /* 2026-07-20: 좌측 2px 제거 — 행 padding-left(thumb-row-pad)가 여백 담당 */
    border-radius: 6px;
    background: var(--gray-50);
    border: 1px solid var(--border);
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .post-thumb-text {
    flex-shrink: 0;
    width: 82px;
    height: 46px;
    margin: 0; /* 2026-07-20: 좌측 2px 제거 — 행 padding-left(thumb-row-pad)가 여백 담당 */
    border-radius: 6px;
    background: var(--gray-50);
    border: 1px solid var(--border);
    font-size: 10px;
    font-weight: 500;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  .pb-debate  { background: var(--red); color: #fff; margin-left: 4px; border-radius: 4px; line-height: 1; padding-bottom: 3px; }
  .pb-closed  { background: var(--gray-200); color: var(--gray-600); }

  /* 미니 투표바 */
  .mini-vote {
    display: flex;
    gap: 3px;
    margin-bottom: 8px;
    height: 22px;
  }
  .mv-bar-pro, .mv-bar-neu, .mv-bar-con {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
    border-radius: 6px;
  }
  .mv-bar-pro { background: var(--navy-light); }
  .mv-bar-neu { background: #f59e0b; }
  .mv-bar-con { background: var(--red); }

  .post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .post-meta { color: var(--gray-400); font-size: 12px; display: flex; align-items: center; gap: 0; white-space: nowrap; }
  .post-meta > span { display: inline-flex; align-items: center; line-height: 1; }
  .post-meta .meta-item { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
  .post-meta .meta-sep { color: var(--gray-400); font-size: 10px; }
  .post-meta .date-ico,
  .post-meta .stat-ico { width: 1em; height: 1em; color: currentColor; flex-shrink: 0; }
  /* 데스크탑/태블릿: 닉네임+시간만 / 모바일(≤768): 시간+조회+추천 */
  .post-meta-mobile { display: none; }
  .post-meta-desktop .meta-sep { margin: 0 4px; color: var(--gray-400); }
  .post-stats { display: flex; gap: 10px; color: var(--gray-600); font-size: 12px; }
  .stat-item { font-size: 12px; color: var(--gray-600); }
  .card-stats { font-size: 12px; color: var(--gray-600); }

  /* 베스트 TOP4: 정사각형 카드 (썸네일+제목 2줄) */
  .best-top-grid-b { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 5px; align-items: stretch; } /* 2026-07-20: list-best 컨테이너 패딩 제거 → 베스트4 영역만 자체 인셋 약 5px 유지 */
  .best-top-b-card {
    cursor: pointer; padding: 6px;
    border: 1px solid var(--border); border-radius: 6px;
    background: var(--white);
    display: flex; flex-direction: column;
    aspect-ratio: 1 / 1;
    color: inherit; text-decoration: none;
  }
  .best-top-b-card:visited { color: inherit; }
  .best-top-b-card:hover { background: var(--gray-50); }
  .best-top-b-thumb {
    width: 100%;
    flex: 1 1 0;
    min-height: 0;
    background: var(--gray-50); border: 1px solid var(--border); border-radius: 4px; overflow: hidden;
    box-sizing: border-box;
    margin-bottom: 6px;
    display: flex; align-items: center; justify-content: center;
  }
  .best-top-b-thumb img,
  .best-top-b-thumb video,
  .best-top-b-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .best-top-b-empty { font-size: 10px; color: var(--gray-400); font-weight: 500; }
  .best-top-b-title {
    flex: 0 0 auto;
    font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--text);
    display: block;
    overflow: hidden;
    height: calc(1.35em * 2);
    word-break: break-all;
  }
  .best-top-b-title .post-comment-count {
    color: var(--red);
    font-weight: 700;
    margin-left: 3px;
    display: inline-block;
    transform: translateY(var(--cc-nudge));
  }

  /* 베스트 세로 리스트 페이지네이션 (best top 4 아래) — 옛 핫이슈 화살표 스타일 차용(복제, 독립 클래스), 흰 배경 톤 적응 */
  .best-rest-pager {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; height: 40px; padding: 0; /* 2026-07-20: 높이=제목영역(board-section-head 40px)과 동일 */
    font-size: 13px; color: var(--gray-600);
    user-select: none;
    /* 2026-07-20: border-top 제거 — 마지막 행 border-bottom과 겹쳐 이중선으로 보임 */
  }
  .best-rest-arrow {
    background: var(--gray-50); border: 1px solid var(--border);
    color: var(--gray-600);
    width: 34px; height: 34px; /* 2026-07-20: 26→34 (≤360 32) */
    border-radius: 8px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 0; font-family: inherit;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
  }
  .best-rest-arrow:hover { background: var(--gray-100); color: var(--navy-mid); border-color: var(--navy-mid); }
  .best-rest-info { font-variant-numeric: tabular-nums; min-width: 32px; text-align: center; font-weight: 600; color: var(--navy-mid); letter-spacing: 0.3px; }

  /* 모바일: 4열 → 2열 */
  @media (max-width: 768px) {
    .best-top-grid-b { grid-template-columns: repeat(2, 1fr); }
    .best-rest-pager { font-size: 12px; gap: 12px; } /* height 40px는 base 유지 = 제목영역과 동일 */
    .best-rest-arrow { width: 34px; height: 34px; font-size: 14px; }
    /* 토론 카드(사이드바 mini) — 모바일 제목 옆 "참여 N · 댓글 N" 숨김 */
    .card-stats { display: none; }
    .post-meta { font-size: 11px; }
    /* 썸네일과 제목 사이 간격 — 게시판과 동일하게 8px */
    .post-card-content { padding: 4px 10px 4px 8px; }
    /* 모바일: 닉네임+시간 메타 숨기고 시간+조회+추천 메타 표시 */
    .post-meta-desktop { display: none; }
    .post-meta-mobile { display: block !important; line-height: 1.4; white-space: nowrap; }
    .post-meta-mobile svg { width: 1em; height: 1em; vertical-align: -0.15em; color: currentColor; margin-right: 2px; }
    .post-meta-mobile .meta-sep { margin: 0 4px; color: var(--gray-400); }
    /* 베스트 세로 카드 썸네일 — 갭 2씩, 82×46 → row 50 */
    :root { --thumb-row-pad: 2px; }
    .post-thumb-img, .post-thumb-text, .post-thumb-video {
      width: 82px !important;
      height: 46px !important;
    }
  }
  /* 좁은 모바일(≤360, 320 포함) */
  @media (max-width: 360px) {
    .post-title { font-size: 13px; }
    .post-meta { font-size: 10px; }
    .best-rest-pager { font-size: 11px; gap: 10px; }
    .best-rest-arrow { width: 32px; height: 32px; font-size: 13px; }
    /* 320: --thumb-row-pad 2px → row 46 (2+42+2) + 썸네일 75×42 (비율 82:46) */
    :root { --thumb-row-pad: 2px; }
    .post-thumb-img, .post-thumb-text, .post-thumb-video {
      width: 75px !important;
      height: 42px !important;
    }
  }

  /* 추천 진행 게이지 (주제 제안용) */
  .propose-bar {
    position: relative;
    height: 22px;
    background: var(--gray-100);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
  }
  .propose-bar:last-child { margin-bottom: 0; }
  .mini-vote:last-child { margin-bottom: 0; }
  .propose-fill {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 6px;
    transition: width 0.3s;
  }
  .propose-bar-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--navy-mid);
    white-space: nowrap;
    z-index: 1;
  }

  .loading { padding: 60px 20px; text-align: center; color: var(--gray-400); font-size: 14px; }

  /* ── 사이드바 ── */
  .sidebar { display: flex; flex-direction: column; gap: 10px; }
  /* 통계 카드 */
  /* ── 인증 카드 ── */
  .auth-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15,45,82,0.07);
  }
  .auth-head {
    background: var(--navy);
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.2px;
  }
  /* 비로그인 */
  .auth-inputs {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 14px 14px 0;
  }
  .auth-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 11px;
    font-size: 16px;
    font-family: var(--font-main);
    color: var(--text);
    background: var(--gray-50);
    outline: none;
    transition: border-color 0.15s, background 0.15s;
    box-sizing: border-box;
  }
  .auth-input:focus { border-color: var(--navy-mid); background: #fff; }
  .auth-input::placeholder { color: var(--gray-400); }
  .pw-wrap { position: relative; }
  .pw-wrap .auth-input { padding-right: 36px; }
  .pw-toggle {
    position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; padding: 0;
    color: var(--gray-400); display: flex; align-items: center;
    transition: color 0.15s;
  }
  .pw-toggle:hover { color: var(--navy-mid); }
  .auth-btn-login {
    display: block;
    width: calc(100% - 28px);
    margin: 7px 14px 0;
    padding: 9px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    transition: background 0.15s;
  }
  .auth-btn-login:hover { background: var(--navy-mid); }
  .auth-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 14px 12px;
  }
  .auth-auto {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--gray-600);
    cursor: pointer;
  }
  .auth-auto input { cursor: pointer; }
  .auth-links {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
  }
  .auth-link {
    background: none;
    border: none;
    font-family: var(--font-main);
    font-size: 11px;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
  }
  .auth-link:hover { color: var(--navy-mid); }
  .auth-divider { color: var(--gray-200); }
  /* 로그인 후 */
  .user-profile {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 9px 14px;
    background: linear-gradient(135deg, #e8f1fb 0%, #f0f5fc 100%);
    border-bottom: 1px solid var(--border);
  }
  .user-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
  .user-info { flex: 1; min-width: 0; }
  .user-name {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
    flex-shrink: 1;
  }
  .user-level-label {
    font-size: 11px;
    color: var(--navy-mid);
    font-weight: 600;
    margin-top: 2px;
  }
  .user-menu { display: flex; flex-direction: column; }
  .user-menu-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--gray-100);
    font-family: var(--font-main);
    font-size: 12px;
    color: var(--gray-800);
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
    width: 100%;
  }
  .user-menu-btn:hover { background: var(--gray-50); color: var(--navy-mid); }
  .menu-arrow { color: var(--gray-400); font-size: 15px; line-height: 1; }
  .auth-btn-logout {
    display: block;
    width: calc(100% - 28px);
    margin: 10px 14px 12px;
    padding: 7px;
    background: none;
    color: var(--red);
    border: 1px solid #ffd0d0;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.15s;
  }
  .auth-btn-logout:hover { background: #fff0f0; border-color: var(--red); }

  /* 제안 CTA */
  .cta-card {
    background: var(--navy);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
  }
  .cta-title { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
  .cta-desc { color: rgba(255,255,255,0.6); font-size: 12px; margin-bottom: 12px; line-height: 1.5; }
  .cta-btn {
    background: var(--navy-light);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-main);
    width: 100%;
    transition: background 0.15s;
  }
  .cta-btn:hover { background: #3a8fe0; }
  /* 네비 플레어 드롭다운 */
  .nav-item { position: relative; display: flex; align-items: center; }
  .nav-item::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 10px; }
  .nav-dropdown { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--gray-100); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.14); padding: 10px; z-index: 500; display: grid; grid-auto-flow: column; grid-template-rows: repeat(5, auto); gap: 2px; opacity: 0; visibility: hidden; transition: opacity 0.15s, visibility 0.15s; pointer-events: none; min-width: 120px; }
  .nav-item:hover .nav-dropdown { opacity: 1; visibility: visible; pointer-events: auto; }
  .nav-dropdown-item { font-size: 12px; font-weight: 600; padding: 5px 8px; border-radius: 6px; text-decoration: none; text-align: center; display: block; transition: background 0.1s; white-space: nowrap; }
  .nav-dropdown-item:hover { background: #e2e6ea; }

  /* ── 메인 팝업 ── */
  .popup-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,0.5);
    display: flex;
    overflow-y: auto;
    padding: 20px; box-sizing: border-box;
  }
  /* margin:auto 트릭: 합 높이가 화면보다 작으면 가운데, 크면 위에서 시작 + 스크롤 */
  .popup-grid {
    display: grid; gap: 16px;
    max-width: 100%;
    margin: auto;
  }
  .popup-grid.cnt-1 { grid-template-columns: 1fr; }
  .popup-grid.cnt-2 { grid-template-columns: 1fr 1fr; }
  .popup-grid.cnt-3,
  .popup-grid.cnt-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
  .popup-card {
    position: relative;
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    display: flex; flex-direction: column;
    width: 360px; max-width: 100%;
    max-height: calc(100vh - 40px);
  }
  .popup-card.hidden { visibility: hidden; }
  .popup-grid.cnt-1 .popup-card { width: 420px; }
  .popup-grid.cnt-3 .popup-card,
  .popup-grid.cnt-4 .popup-card {
    width: 320px; max-height: calc((100vh - 60px) / 2);
  }
  .popup-x {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(0,0,0,0.55); color: #fff;
    border: none; cursor: pointer;
    font-size: 18px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
  }
  .popup-x:hover { background: rgba(0,0,0,0.75); }
  .popup-body {
    flex: 1; overflow-y: auto; padding: 0;
    background: #fff; color: var(--text); font-size: 13px; line-height: 1.6;
  }
  .popup-body-inner { padding: 14px 16px; }
  .popup-banner { width: 100%; display: block; cursor: pointer; }
  .popup-banner-link { display: block; }
  /* 이미지 전용 팝업: 카드 크기는 그대로, 이미지만 상하좌우 중앙 배치 */
  .popup-card.image-only .popup-body {
    display: flex; align-items: center; justify-content: center;
    padding: 0;
  }
  .popup-card.image-only .popup-banner-link,
  .popup-card.image-only .popup-body > div {
    display: flex; align-items: center; justify-content: center;
    max-width: 100%; max-height: 100%;
  }
  .popup-card.image-only .popup-banner {
    width: auto; height: auto;
    max-width: 100%; max-height: 100%;
    object-fit: contain;
  }
  .popup-content { margin: 0; }
  .popup-content img { max-width: 100%; height: auto; }
  .popup-content p { margin: 0 0 8px; }
  .popup-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; background: #f1f3f5; border-top: 1px solid var(--border);
    font-size: 12px;
  }
  .popup-footer button {
    background: none; border: none; cursor: pointer;
    font-size: 12px; color: var(--gray-600); padding: 4px 8px;
    font-family: var(--font-main);
  }
  .popup-footer button:hover { color: var(--text); }
  .popup-footer .popup-hide-today { font-weight: 600; }
  @media (max-width: 720px) {
    /* grid 자체를 420px 상한으로 컴팩트하게. margin:auto가 가로/세로 가운데로 위치시킴 */
    .popup-grid { max-width: 420px; width: 100%; }
    .popup-grid.cnt-2,
    .popup-grid.cnt-3,
    .popup-grid.cnt-4 { grid-template-columns: 1fr; grid-template-rows: none; }
    .popup-card,
    .popup-grid.cnt-1 .popup-card,
    .popup-grid.cnt-3 .popup-card,
    .popup-grid.cnt-4 .popup-card { width: 100%; max-width: 420px; max-height: none; }
    .popup-body { font-size: 13px; }
  }
  @media (max-width: 360px) {
    .popup-body { font-size: 12px; }
    .popup-body-inner { padding: 12px 12px; }
  }
