  :root {
    color-scheme: light;
    --page:            #f9f9f7;
    --surface-1:       #fcfcfb;
    /* 스크롤바 (2026-11-16): 손잡이는 배경과 대비 3:1 이상 (WCAG 1.4.11), 길은 투명 */
    --scrollbar-thumb: #8f8d86;
    --scrollbar-track: transparent;
    --text-primary:    #0b0b0b;
    --text-secondary:  #52514e;
    --text-muted:      #898781;
    --gridline:        #e1e0d9;
    --baseline:        #c3c2b7;
    --border:          rgba(11,11,11,0.10);
    --positive:        #2a78d6;
    --negative:        #e34948;
    --midpoint:        #f0efec;
    --soft:            rgba(11,11,11,0.035); /* 아주 연한 상자 배경 (카운트다운 등) */
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      color-scheme: dark;
      --page:            #1c1c1e;   /* 2026-10-26: 거의 검정(#0d0d0d)에서 흔한 다크 회색으로 */
      --surface-1:       #262628;
      --scrollbar-thumb: #78787d;
      --text-primary:    #f2f2f2;
      --text-secondary:  #c3c2b7;
      --text-muted:      #95948e;
      --gridline:        #343437;
      --baseline:        #4a4a4e;
      --border:          rgba(255,255,255,0.11);
      --positive:        #3987e5;
      --negative:        #e66767;
      --midpoint:        #3a3a3d;
      --soft:            rgba(255,255,255,0.05);
    }
  }
  :root[data-theme="dark"] {
    color-scheme: dark;
    --page:            #1c1c1e;   /* 2026-10-26: 거의 검정(#0d0d0d)에서 흔한 다크 회색으로 */
    --surface-1:       #262628;
    --scrollbar-thumb: #78787d;
    --text-primary:    #f2f2f2;
    --text-secondary:  #c3c2b7;
    --text-muted:      #95948e;
    --gridline:        #343437;
    --baseline:        #4a4a4e;
    --border:          rgba(255,255,255,0.11);
    --positive:        #3987e5;
    --negative:        #e66767;
    --midpoint:        #3a3a3d;
    --soft:            rgba(255,255,255,0.05);
  }

  * { box-sizing: border-box; }
  /* 가로 밀림 안전장치 (2026-12-02): 무엇이 조금 넘쳐도 페이지 전체가 옆으로 밀리지 않게. clip은 스크롤 상자를 만들지 않아
     머리글의 sticky가 그대로 동작한다 (hidden은 sticky를 깨뜨림). 표·차트처럼 옆으로 넘겨야 하는 것은 각자 overflow-x: auto */
  html { overflow-x: clip; }
  body {
    margin: 0;
    background: var(--page);
    color: var(--text-primary);
    /* 한글 웹폰트 Pretendard (2026-11-29, /fonts/pretendard.css) - 받기 전·못 받으면 기기 글꼴 */
    font-family: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
    /* 한글 줄바꿈 (2026-11-16): 단어 중간에서 끊지 않는다("개인정보처리방\n침" 같은 줄바꿈 방지).
       띄어쓰기 없는 아주 긴 영문·주소만 화면을 넘지 않게 아무 데서나 끊는다 */
    word-break: keep-all;
    /* break-word: 정말 넘칠 때만 끊는다. anywhere로 하면 좁은 칸(임기 막대의 연도 등)이 "2\n0\n2\n6"처럼 세로로 쪼개졌음 */
    overflow-wrap: break-word;
  }
  /* 제목은 줄 길이를 고르게, 문단은 마지막 줄에 한 단어만 남지 않게 (지원 안 하는 브라우저는 그냥 무시) */
  h1, h2, h3, .subtitle, .countdown-label { text-wrap: balance; }
  p, li, .hero-meta, .source-note, .countdown-meta { text-wrap: pretty; }
  main {
    max-width: 880px;
    margin: 0 auto;
    padding: 32px 20px 64px;
    /* 본문이 아직 비어 있을 때(글 목록을 받는 중) 맨 아래 줄(개인정보처리방침·약관)이 위쪽에 보였다가
       내려가지 않게, 처음부터 화면 아래에 둔다 (2026-11-29). 145px = 머리글 59 + 맨 아래 줄 60 + 그 위 여백 24 (+2)
       vh는 dvh를 모르는 옛 브라우저용 */
    min-height: calc(100vh - 145px);
    min-height: calc(100dvh - 145px);
  }
  h1 {
    font-size: clamp(18px, 4.5vw, 22px);
    margin: 60px 0 4px;
  }
  .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 0 28px;
  }
  .card {
    margin-bottom: 24px;
  }

  /* countdown */
  .countdown-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
  .countdown-dday {
    display: block;
    font-size: clamp(32px, 10vw, 56px);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 16px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
  }
  .countdown-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 6px;
    border-radius: 14px;
    background: var(--soft);
  }
  .countdown-unit {
    flex: 1 1 56px;
    background: transparent;
    border-radius: 8px;
    padding: 10px 4px;
    text-align: center;
  }
  .countdown-unit[hidden] { display: none; }
  .countdown-value {
    font-size: clamp(20px, 5.5vw, 28px);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
  }
  .countdown-unit-label { font-size: 11px; color: var(--text-secondary); margin-top: 6px; }
  .countdown-meta { font-size: 12px; color: var(--text-muted); margin-top: 14px; }

  /* pollster tabs */
  .pollster-tabs {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
  }
  .pollster-tab {
    appearance: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 14px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
  }
  .pollster-tab.active {
    color: var(--text-primary);
    font-weight: 600;
    border-bottom-color: var(--positive);
  }

  /* hero */
  .hero-row { display: flex; gap: 32px; flex-wrap: wrap; align-items: baseline; }
  .hero { }
  .hero-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
  .hero-value { font-size: clamp(32px, 9vw, 48px); font-weight: 600; line-height: 1; }
  .hero-value.positive { color: var(--positive); }
  .hero-value.negative { color: var(--negative); }
  .hero-meta { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
  /* 불러오기 실패 안내의 "다시 시도" 버튼 (2026-11-16) */
  .retry-btn {
    margin-left: 4px;
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-1);
    color: var(--positive);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
  }
  .retry-btn:hover { border-color: var(--positive); }
  .chat-load-error { padding: 24px 12px; font-size: 13px; color: var(--text-muted); text-align: center; }
  /* 공유 버튼 - 수치 줄 오른쪽 끝. 누르면 버튼이 "✓ 복사됨"으로 바뀌고 바로 아래에 결과 패널이 뜬다 */
  .share-wrap { position: relative; margin-left: auto; align-self: center; }
  .share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-1);
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
  }
  .share-btn:hover { color: var(--text-primary); }
  .share-btn svg { width: 15px; height: 15px; }
  .share-btn .icon-check { display: none; }
  .share-btn.done { background: var(--positive); border-color: var(--positive); color: #fff; font-weight: 600; }
  .share-btn.done .icon-share { display: none; }
  .share-btn.done .icon-check { display: inline; }
  .share-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: min(340px, calc(100vw - 32px));
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-1);
    box-shadow: 0 8px 28px rgba(0,0,0,0.16);
    z-index: 50;
    animation: share-pop .16s ease-out;
  }
  .share-panel[hidden] { display: none; }
  @keyframes share-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
  .share-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
  .share-panel-title { font-size: 14px; font-weight: 600; color: var(--positive); }
  .share-panel.failed .share-panel-title { color: var(--text-primary); }
  .share-panel-close {
    border: 0; background: none; padding: 0 2px; font-size: 20px; line-height: 1;
    color: var(--text-muted); cursor: pointer;
  }
  .share-panel-close:hover { color: var(--text-primary); }
  .share-panel-row { display: flex; gap: 6px; }
  .share-panel-url {
    flex: 1; min-width: 0;
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--page);
    color: var(--text-primary);
    font: inherit; font-size: 13px;
  }
  .share-panel-copy {
    flex: none;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-1);
    color: var(--text-primary);
    font: inherit; font-size: 13px;
    cursor: pointer;
  }
  .share-panel-copy:hover { border-color: var(--text-muted); }
  .share-panel-tip { margin: 8px 0 0; font-size: 12px; color: var(--text-muted); line-height: 1.5; }
  /* 직전 조사 대비 변화 "(▲1.2)" - 오르면 파랑, 내리면 빨강 (긍정·부정 같은 규칙) */
  .change { font-size: 0.82em; font-weight: 600; white-space: nowrap; }
  .hero-value .change { font-size: 0.42em; vertical-align: 0.35em; }
  .change.up { color: var(--positive); }
  .change.down { color: var(--negative); }
  .change.flat { color: var(--text-muted); }

  /* legend */
  .legend { display: flex; gap: 20px; margin: 24px 0 12px; }
  .legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); }
  .legend-key { width: 16px; height: 2px; border-radius: 1px; }
  .legend-key.positive { background: var(--positive); }
  .legend-key.negative { background: var(--negative); }

  .chart-wrap { overflow-x: auto; }
  /* 스크롤 영역은 테마에 맞는 얇은 스크롤바 (다크 모드에서 밝게 튀지 않게) */
  .chart-wrap, .chat-messages, .chat-form textarea {
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    scrollbar-width: thin;
  }
  /* 차트에만 (전체 svg에 걸면 테마 아이콘 같은 다른 svg도 640px이 되어 모바일 페이지 폭이 늘어났음) */
  .chart-wrap svg { display: block; width: 100%; min-width: 640px; height: auto; }
  .gridline { stroke: var(--gridline); stroke-width: 1; }
  .axis-text { fill: var(--text-muted); font-size: 11px; }
  .series-positive { stroke: var(--positive); }
  .series-negative { stroke: var(--negative); }
  .end-dot { stroke: var(--surface-1); stroke-width: 2; }
  .end-label { font-size: 12px; font-weight: 600; }
  .end-label.positive { fill: var(--positive); }
  .end-label.negative { fill: var(--negative); }

  .crosshair { stroke: var(--baseline); stroke-width: 1; pointer-events: none; }
  .hover-dot { pointer-events: none; }

  #tooltip {
    position: fixed;
    z-index: 70; /* 채팅창(.chat-panel, 60)보다 위 */
    pointer-events: none;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    opacity: 0;
    transition: opacity 0.08s ease;
    white-space: nowrap;
  }
  #tooltip .tt-date { color: var(--text-muted); margin-bottom: 4px; }
  #tooltip .tt-row { display: flex; align-items: center; gap: 6px; }
  #tooltip .tt-key { width: 10px; height: 2px; }
  #tooltip .tt-key.positive { background: var(--positive); }
  #tooltip .tt-key.negative { background: var(--negative); }
  #tooltip .tt-val { font-weight: 600; color: var(--text-primary); margin-left: auto; }
  #tooltip .tt-name { color: var(--text-secondary); }

  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  th, td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--gridline);
    font-variant-numeric: tabular-nums;
  }
  th { color: var(--text-secondary); font-weight: 500; }
  th.num, td.num { text-align: right; }
  td.num { white-space: nowrap; }
  td.cell-best { color: var(--positive); font-weight: 700; }
  td.cell-worst { color: var(--negative); font-weight: 700; }
  .source-note { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

  details { margin-top: 20px; }
  details summary {
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
    padding: 4px 0;
  }

  /* 맨 위 머리글 (theme.js가 넣음, 2026-11-25): 화면 전체 너비, 스크롤해도 위에 붙어 있다.
     왼쪽 로고 / 오른쪽 메뉴 · 페이지 버튼([data-header-action]) · 테마 버튼. 좁은 화면은 메뉴를 ☰ 안으로 */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 40; /* 툴팁(50)·채팅창(60)보다 아래 */
    background: color-mix(in srgb, var(--page) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    /* 구분선 (2026-11-27): 맨 위에서는 선 없이 배경과 이어지고, 스크롤해 본문이 밑으로 지나가면
       옅은 그림자가 생긴다 (theme.js가 is-scrolled를 붙임) */
    border-bottom: 1px solid transparent;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
  }
  .site-header.is-scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.18);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .site-header.is-scrolled { box-shadow: 0 8px 24px -14px rgba(0, 0, 0, 0.5); }
  }
  :root[data-theme="dark"] .site-header.is-scrolled { box-shadow: 0 8px 24px -14px rgba(0, 0, 0, 0.5); }
  @media (prefers-reduced-motion: reduce) {
    .site-header { transition: none; }
  }
  /* 왼쪽(로고·메뉴) | 가운데(검색) | 오른쪽(버튼) - 검색 칸이 화면 한가운데 오게 3칸 격자 */
  .site-header-inner {
    position: relative;
    display: grid;
    /* 양옆 칸은 내용보다 좁아지지 않고(max-content), 좁은 화면에서는 가운데 검색 칸이 줄어든다 (2026-11-28:
       태블릿 너비에서 검색 칸이 메뉴를 가렸음) */
    grid-template-columns: minmax(max-content, 1fr) minmax(160px, 440px) minmax(max-content, 1fr);
    align-items: center;
    gap: 12px;
    /* 화면 전체 너비 (2026-11-27, 전에는 가운데 1200px) */
    padding: 10px 24px;
  }
  .site-header-left { display: flex; align-items: center; min-width: 0; }
  .site-header .site-logo { margin-right: 12px; }
  .site-header .site-logo-svg { height: 34px; }
  .site-nav { display: flex; align-items: center; gap: 2px; }
  .site-nav a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
  }
  .site-nav a:hover { color: var(--text-primary); background: var(--soft); }
  /* 지금 페이지 (2026-12-02): 글자색 반전으로 채운 버튼 - 다른 메뉴(회색 글자)와 바로 구분된다 */
  .site-nav a[aria-current="page"],
  .site-nav a[aria-current="page"]:hover { color: var(--page); background: var(--text-primary); }
  /* 메뉴는 로고 바로 옆, 오른쪽 버튼들은 끝으로 밀어 둔다 */
  .site-header-actions { display: flex; align-items: center; gap: 8px; justify-self: end; }

  /* 검색 칸 */
  .site-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
  }
  .site-search .site-search-mark { position: absolute; left: 8px; pointer-events: none; }
  .site-search-mark .mark-bg { fill: var(--text-primary); }
  .site-search-mark .mark-line { stroke: var(--page); }
  .site-search-mark .mark-dot { fill: var(--page); }
  .site-search input {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 40px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-1);
    color: var(--text-primary);
    font: inherit;
    font-size: 15px;
  }
  .site-search input::placeholder { color: var(--text-muted); }
  .site-search input:focus-visible { outline: 2px solid var(--positive); outline-offset: 1px; border-color: transparent; }
  .site-search-close, .site-search-btn { display: none; }
  .site-search-btn {
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-1);
    color: var(--text-primary);
    cursor: pointer;
  }
  /* 검색 결과의 찾은 말 */
  .issue-body mark { background: color-mix(in srgb, #f2c94c 45%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
  .site-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-1);
    color: var(--text-primary);
    cursor: pointer;
  }
  @media (max-width: 720px) {
    .site-header-inner { padding: 8px 14px; display: flex; }
    .site-header-left { margin-right: auto; }
    /* 좁은 화면: 검색 칸은 숨겼다가 돋보기를 누르면 머리글 전체를 덮으며 펼쳐진다 */
    .site-search { display: none; }
    .site-search-btn { display: inline-flex; }
    .site-header.search-open .site-search {
      display: flex;
      position: absolute;
      inset: 0;
      padding: 8px 10px 8px 14px;
      gap: 6px;
      background: var(--page);
      z-index: 2;
    }
    .site-header.search-open .site-search .site-search-mark { left: 22px; }
    .site-header.search-open .site-search-close {
      display: inline-flex;
      flex: none;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      border: 0;
      background: none;
      color: var(--text-secondary);
      font-size: 24px;
      cursor: pointer;
    }
    .site-footer { padding: 16px 14px 24px; }
    .site-header .site-logo-svg { height: 30px; }
    .site-header-actions { gap: 6px; }
  }
  /* 메뉴는 ☰를 누르면 머리글 아래로 펼쳐진다 (2026-12-02: 메뉴가 셋이 되어 720px 대신 880px부터 접는다 -
     721~815px에서 메뉴·검색 칸이 한 줄에 안 들어가 화면이 옆으로 밀렸음) */
  @media (max-width: 880px) {
    .site-menu-btn { display: inline-flex; }
    .site-nav {
      display: none;
      position: absolute;
      top: calc(100% + 6px);
      right: 14px;
      flex-direction: column;
      align-items: stretch;
      min-width: 200px;
      padding: 6px;
      border: 1px solid var(--border);
      border-radius: 14px;
      background: var(--page);
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }
    .site-header.menu-open .site-nav { display: flex; }
    .site-nav a { padding: 11px 14px; border-radius: 10px; }
  }

  /* 로고 아래 구분선 = 대통령 임기 진행 막대 (theme.js termBar). 지난 기간은 파랑, 오늘 위치에 ② */
  .term-bar {
    --term-pct: 0%;
    --term-line: 26px; /* 선의 높이 위치: 위는 걷는 사람, 아래는 연도 */
    position: relative;
    height: 42px;
    margin: 0 0 16px;
    cursor: pointer;
    outline: none;
  }
  .term-track, .term-fill {
    position: absolute;
    left: 0;
    top: var(--term-line);
    border-radius: 2px;
  }
  .term-track { right: 0; height: 1px; background: var(--border); }
  .term-fill {
    width: var(--term-pct);
    height: 2px;
    margin-top: -0.5px;
    background: var(--positive);
    transition: width 0.8s ease-out;
  }
  /* 해가 바뀌는 곳 눈금 + 연도 */
  .term-tick {
    position: absolute;
    top: calc(var(--term-line) - 3px);
    width: 1px;
    height: 7px;
    background: var(--baseline);
  }
  .term-tick span {
    position: absolute;
    top: 9px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    line-height: 1;
    color: var(--text-muted);
  }
  /* 오늘 위치: 선 위의 점 + 그 위에서 걷는 사람 */
  .term-dot, .term-walker { position: absolute; left: var(--term-pct); transition: left 0.8s ease-out; }
  .term-dot {
    top: var(--term-line);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--positive);
    box-shadow: 0 0 0 2px var(--page);
    transform: translate(-50%, -50%);
  }
  .term-walker {
    top: calc(var(--term-line) - 26px);
    width: 17px;
    height: 22px;
    color: var(--text-primary);
    transform: translateX(-50%);
  }
  .term-walker svg { width: 17px; height: 22px; display: block; }
  .term-walker .pose-b { opacity: 0; }
  .term-bar.walking .term-walker .pose-a, .term-bar:hover .term-walker .pose-a { animation: term-step-a 0.5s steps(1) infinite; }
  .term-bar.walking .term-walker .pose-b, .term-bar:hover .term-walker .pose-b { animation: term-step-b 0.5s steps(1) infinite; }
  .term-bar.walking .term-walker svg, .term-bar:hover .term-walker svg { animation: term-bob 0.25s ease-in-out infinite alternate; }
  @keyframes term-step-a { 0% { opacity: 1; } 50% { opacity: 0; } }
  @keyframes term-step-b { 0% { opacity: 0; } 50% { opacity: 1; } }
  @keyframes term-bob { to { transform: translateY(-1px); } }
  /* 임기 끝(다음 대통령 취임)의 작은 불꽃 */
  .term-firework {
    position: absolute;
    left: 100%;
    top: calc(var(--term-line) - 24px);
    width: 20px;
    height: 20px;
    transform: translateX(-60%);
    animation: term-twinkle 1.2s ease-out 1;
  }
  .term-firework svg { width: 20px; height: 20px; display: block; }
  .term-bar:hover .term-firework { animation: term-twinkle 1.2s ease-out infinite; }
  @keyframes term-twinkle {
    0% { transform: translateX(-60%) scale(0.6); opacity: 0.4; }
    40% { transform: translateX(-60%) scale(1.12); opacity: 1; }
    100% { transform: translateX(-60%) scale(1); opacity: 1; }
  }
  .term-tip {
    position: absolute;
    top: 46px;
    left: var(--term-pct);
    z-index: 5;
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    font-size: 12px;
    white-space: nowrap;
    color: var(--text-secondary);
  }
  .term-tip strong { color: var(--text-primary); font-size: 13px; }
  .term-bar.tip-mid .term-tip { transform: translateX(-50%); }
  .term-bar.tip-start .term-tip { transform: translateX(-12px); }
  .term-bar.tip-end .term-tip { transform: translateX(calc(-100% + 12px)); }
  .term-bar:hover .term-tip, .term-bar:focus-visible .term-tip, .term-bar.show-tip .term-tip { display: flex; }
  .term-bar:focus-visible .term-dot { box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--positive); }
  @media (prefers-reduced-motion: reduce) {
    .term-fill, .term-dot, .term-walker { transition: none; }
    .term-bar .term-walker *, .term-bar .term-walker svg, .term-firework, .term-bar:hover .term-firework { animation: none !important; }
    .term-walker .pose-b { opacity: 0 !important; }
  }
  /* 사이트 로고 (theme.js가 넣음). 글자·원·KOREA 색이 테마를 따른다 */
  .site-logo { display: inline-flex; line-height: 0; border-radius: 6px; }
  .site-logo-svg { height: 40px; width: auto; display: block; }
  .site-logo .logo-text { fill: var(--text-primary); }
  .site-logo .logo-mark-bg { fill: var(--text-primary); }  /* 먹색 원 (정당 색을 피해 파랑 대신) */
  .site-logo .logo-mark { color: var(--page); }            /* 원 안 추세선 */
  .site-logo .logo-sub { fill: var(--text-muted); }
  .theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    background: var(--surface-1);
    cursor: pointer;
  }
  .theme-toggle:hover { color: var(--text-primary); }
  /* 머리글의 테마 버튼은 테두리 없이 (2026-11-28) - 마우스를 올리면 옅은 배경 */
  .site-header .theme-toggle { width: 36px; height: 36px; border: 0; background: none; }
  .site-header .theme-toggle:hover { background: var(--soft); }
  .theme-toggle svg { width: 16px; height: 16px; }

  /* 링크는 통째로 줄바꿈 (휴대폰 글꼴 크기를 키우면 "멤버 리스\n트"처럼 링크 안에서 갈라졌음) */
  /* 맨 아래 줄 - 머리글처럼 화면 전체 너비 (theme.js가 본문 밖 페이지 끝으로 옮긴다, 2026-11-27) */
  .site-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 24px;
    padding: 18px 24px 28px;
    font-size: 12px;
  }
  .site-footer a {
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
  }
  .site-footer a:hover { text-decoration: underline; }

  @media (max-width: 600px) {
    main { padding: 20px 14px 48px; }
    .card { margin-bottom: 16px; }
    .hero-row { gap: 20px; }
    /* 휴대폰에서도 년~초 여섯 칸을 한 줄에 (예전엔 '초'가 다음 줄로 넘어갔음) */
    .countdown-grid { gap: 2px; flex-wrap: nowrap; padding: 6px 4px; }
    .countdown-unit { flex: 1 1 0; min-width: 0; padding: 10px 0; }
  }

  /* 채팅(게시판+실시간 혼합) */
  .chat-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: var(--positive);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 60;
  }
  .chat-toggle.hidden { display: none; }

  .chat-panel {
    position: fixed;
    right: 20px;
    top: 20px;
    bottom: 84px;
    width: 420px;
    max-width: calc(100vw - 40px);
    height: auto;
    display: none;
    flex-direction: column;
    z-index: 60;
  }
  .chat-panel.open { display: flex; }

  @media (max-width: 1399px) {
    .chat-panel.open { bottom: 20px; }
  }

  /* 실제 카드처럼 보이는 시각적 껍데기는 이 안쪽 래퍼가 담당한다 (배경/테두리/
     둥근 모서리/overflow:hidden). #chatPanel 자체는 overflow를 hidden으로 두지
     않아야, 왼쪽에 책갈피처럼 튀어나온 펼침 버튼이 잘리지 않는다. */
  .chat-panel-inner {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
    overflow: hidden;
  }

  .chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--midpoint);
    border-bottom: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
    font-size: 14px;
    font-weight: 600;
  }
  .chat-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
  }

  .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  /* 글마다 위아래 여백 + 사이에 얇은 선 (카드·영상이 붙은 긴 글이 다음 글과 붙어 보였음) */
  .chat-message { padding: 10px 0; }
  .chat-message + .chat-message { border-top: 1px solid var(--border); }
  .chat-message-row { display: flex; gap: 8px; align-items: flex-start; }
  .chat-message:hover .chat-message-delete { visibility: visible; }
  .chat-message-delete {
    visibility: hidden;
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    padding: 0 2px;
    flex: 0 0 auto;
  }
  .chat-message-delete:hover { color: var(--negative); }
  /* 마우스가 없는 휴대폰에선 hover로 드러낼 수 없어 항상 보인다 */
  @media (hover: none) {
    .chat-message-delete { visibility: visible; }
  }
  .chat-staff-badge {
    font-size: 10px;
    font-weight: 700;
    color: var(--positive);
    border: 1px solid var(--positive);
    border-radius: 4px;
    padding: 0 4px;
    margin-left: 4px;
  }
  .chat-message-avatar { flex: 0 0 auto; }
  .chat-avatar-img { width: 26px; height: 26px; border-radius: 50%; display: block; }
  .chat-avatar-fallback {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--midpoint);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .chat-message-body { flex: 1; min-width: 0; }
  /* 채팅 본문 속 링크 */
  .chat-link { color: var(--positive); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }

  /* 링크 미리보기 카드: 대표 이미지(있으면) + 제목 2줄 + 설명 2줄 + 사이트 */
  .chat-link-card {
    display: flex;
    flex-direction: column;
    margin-top: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-1);
    color: inherit;
    text-decoration: none;
  }
  .chat-link-card:hover { border-color: var(--baseline); }
  .chat-link-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 1.91 / 1;
    object-fit: cover;
    background: var(--midpoint);
  }
  .chat-link-card-body { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px 9px; }
  .chat-link-card-title, .chat-link-card-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .chat-link-card-title { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--text-primary); }
  .chat-link-card-desc { font-size: 12px; line-height: 1.4; color: var(--text-secondary); }
  .chat-link-card-site { font-size: 11px; color: var(--text-muted); }

  .chat-youtube-embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    margin-top: 6px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
  }
  .chat-youtube-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
  }
  .chat-image-embed {
    display: block;
    margin-top: 6px;
    max-width: 220px;
    border-radius: 8px;
    overflow: hidden;
    border: none;
    background: none;
    padding: 0;
    cursor: zoom-in;
  }
  .chat-image-embed img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
  }

  /* 이미지를 새 탭으로 여는 대신, 화면 전체를 덮는 라이트박스로 원본 크기를 보여준다.
     모바일에서도 화면 꽉 차게 뜨도록 100dvh를 쓰고(주소창이 접히고 펼쳐지며 뷰포트
     높이가 바뀌는 문제 방지, 미지원 브라우저는 100vh로 자동 대체), 여백도 좁은
     화면에서는 더 줄인다. */
  /* 사진 크게 보기 - 브라우저 기본 모달 창(<dialog>, showModal). 포커스 가두기·Esc·뒤로 가기는 브라우저가 처리 */
  .image-lightbox {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 32px;
    border: 0;
    background: transparent;
    cursor: zoom-out;
  }
  /* display는 열렸을 때만 - 그냥 걸면 닫힌 상태를 덮어써 창이 늘 보인다 */
  .image-lightbox[open] { display: flex; align-items: center; justify-content: center; }
  .image-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.85);
    /* 배경 위에서 스크롤해도 뒤 페이지가 움직이지 않게 (backdrop은 기본이 스크롤 영역이 아니라 overflow를 줘야 함) */
    overflow: hidden;
    overscroll-behavior: contain;
  }
  dialog.image-lightbox:modal { overscroll-behavior: contain; }
  .image-lightbox-close {
    position: fixed;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
  }
  .image-lightbox-close:hover, .image-lightbox-close:focus-visible { background: rgba(255, 255, 255, 0.3); }
  .image-lightbox img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  }
  @media (max-width: 600px) {
    .image-lightbox { padding: 12px; }
  }
  .chat-message-name { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
  .chat-message-text { font-size: 13px; word-break: keep-all; overflow-wrap: anywhere; white-space: pre-wrap; }
  .chat-reactions { display: inline-flex; gap: 8px; align-items: center; }
  /* 글 맨 아래 줄 (아바타 26px + 간격 8px만큼 들여 본문과 맞춘다) */
  .chat-message-actions { margin-top: 5px; padding-left: 34px; line-height: 1; }
  .chat-reaction-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    padding: 0;
    cursor: pointer;
  }
  .chat-reaction-btn.active { color: var(--positive); font-weight: 600; }
  .chat-reaction-btn.chat-reaction-dislike.active { border-color: var(--negative); color: var(--negative); }
  /* 좋아요·싫어요는 글·댓글과 같은 선 아이콘 (2026-11-29) */
  .chat-reaction-like, .chat-reaction-dislike { display: inline-flex; align-items: center; gap: 3px; min-width: 22px; }
  .chat-reaction-like svg, .chat-reaction-dislike svg { width: 13px; height: 13px; }
  .chat-reaction-btn.active svg path { fill: currentColor; fill-opacity: 0.18; }
  .chat-reaction-btn:disabled { opacity: 0.5; cursor: default; }

  .chat-user-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid var(--border);
    font-size: 12px;
  }
  .chat-user-bar .chat-user-name { flex: 1; font-weight: 600; }
  .chat-rename-form:not([hidden]) {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 4px;
    min-width: 0;
  }
  .chat-rename-form input {
    flex: 1;
    min-width: 0;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    background: var(--page);
    font: inherit;
    font-weight: 600;
  }
  .chat-text-btn {  /* 이름 줄의 글자 버튼 (이름 바꾸기·저장·취소·로그아웃) */
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
  }

  #googleSignInBtn { display: inline-flex; justify-content: center; width: 100%; }
  /* 구글 버튼은 1~2초 뒤 iframe으로 바뀌는데, 다크 테마에서 iframe 안(라이트)과 색 설정이 다르면
     브라우저가 버튼 둘레에 흰 바탕을 깐다 - iframe 쪽을 라이트로 맞춰 투명하게 둔다 */
  #googleSignInBtn iframe { color-scheme: light; }

  .chat-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 2px 12px 10px; /* 바로 위 이름 줄과 한 덩어리로 (사이 구분선 없음) */
  }
  .chat-form-row {
    display: flex;
    gap: 6px;
    align-items: flex-end; /* 입력칸이 여러 줄로 커져도 버튼은 아래에 */
  }
  .chat-image-preview-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    background: var(--page);
    border: 1px solid var(--border);
    border-radius: 8px;
  }
  /* [hidden] 자체가 display:none이지만, 위 규칙과 특이성이 같아서(둘 다 클래스/속성
     선택자 1개) 나중에 로드되는 이 규칙이 이겨버린다 — hidden 속성만으로는 안 감춰지는
     문제가 있어 명시적으로 다시 덮어쓴다. */
  .chat-image-preview-bar[hidden] { display: none; }
  .chat-image-preview-bar img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    display: block;
    flex: 0 0 auto;
  }
  .chat-image-preview-label {
    font-size: 12px;
    color: var(--text-secondary);
    flex: 1;
    min-width: 0;
  }
  /* 인용 답장: 입력칸 위 "누구에게 답장" 막대 */
  .chat-reply-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px 4px 10px;
    background: var(--page);
    border: 1px solid var(--border);
    border-left: 3px solid var(--positive);
    border-radius: 8px;
  }
  .chat-reply-bar[hidden] { display: none; }
  .chat-reply-bar-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
  .chat-reply-bar-name { font-size: 12px; font-weight: 600; color: var(--positive); }
  .chat-reply-bar-snippet, .chat-reply-quote-text {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* 답장 글 위의 원글 인용 (누르면 원글로 이동) */
  .chat-reply-quote {
    display: flex;
    gap: 6px;
    align-items: baseline;
    max-width: 100%;
    margin: 2px 0 3px;
    padding: 3px 8px;
    border: none;
    border-left: 2px solid var(--baseline);
    border-radius: 4px;
    background: var(--midpoint);
    font: inherit;
    text-align: left;
    cursor: pointer;
  }
  .chat-reply-quote:hover { border-left-color: var(--positive); }
  .chat-reply-quote-name { font-size: 12px; font-weight: 600; color: var(--text-secondary); flex: none; }
  .chat-reply-quote-text { min-width: 0; }
  .chat-reply-quote.deleted { cursor: default; font-size: 12px; color: var(--text-muted); font-style: italic; }
  .chat-reply-btn { text-decoration: underline; text-underline-offset: 2px; }
  .chat-reply-btn:hover { color: var(--text-primary); }
  /* 인용을 눌러 원글로 갔을 때 잠깐 표시 */
  @keyframes chat-flash { from { background: color-mix(in srgb, var(--positive) 18%, transparent); } to { background: transparent; } }
  .chat-message-flash { animation: chat-flash 1.6s ease-out; border-radius: 6px; }

  /* 입력칸 위 링크 미리보기 (보내기 전) - 사진 첨부 막대와 같은 자리·모양 */
  .chat-link-preview-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    background: var(--page);
    border: 1px solid var(--border);
    border-radius: 8px;
  }
  .chat-link-preview-bar[hidden] { display: none; }
  .chat-link-preview-bar img {
    width: 48px;
    height: 32px;
    border-radius: 5px;
    object-fit: cover;
    display: block;
    flex: 0 0 auto;
    background: var(--midpoint);
  }
  .chat-link-preview-bar img[hidden] { display: none; }
  .chat-link-preview-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
  .chat-link-preview-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .chat-link-preview-site { font-size: 11px; color: var(--text-muted); }
  .chat-image-preview-remove {
    flex: 0 0 auto;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    padding: 2px 6px;
  }
  .chat-image-preview-remove:hover { color: var(--negative); }
  /* .chat-form button(파란 전송 버튼 모양)이 이기지 않도록 한 단계 더 구체적으로 */
  .chat-form .chat-image-preview-remove { background: none; color: var(--text-muted); padding: 2px 6px; border-radius: 6px; }
  .chat-form .chat-image-preview-remove:hover { color: var(--negative); background: var(--border); }
  .chat-image-btn {
    flex: 0 0 auto;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    line-height: 1;
    padding: 8px 9px;
    cursor: pointer;
    color: var(--text-secondary);
  }
  .chat-image-btn:hover { background: var(--border); }
  .chat-image-btn svg { width: 18px; height: 18px; display: block; margin: auto; }
  .chat-image-btn:disabled { opacity: 0.5; cursor: default; }
  .chat-form textarea {
    flex: 1;
    resize: none;
    font-family: inherit;
    line-height: 1.4;
    overflow-y: auto;
    transition: height 0.12s ease;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--page);
    color: var(--text-primary);
    font-size: 13px;
  }
  .chat-form button {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    background: var(--positive);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
  }

  /* 넓은 화면에서는 채팅 패널을 본문 오른쪽에 나란히 붙이고, main+패널을 하나의
     묶음으로 봐서 그 전체를 가운데 정렬한다 (패널만 별도로 오른쪽에 떠 있지
     않도록). 토글 버튼은 숨기고 패널은 항상 열어둔다. */
  @media (min-width: 1400px) {
    .layout {
      display: flex;
      justify-content: center;
      align-items: flex-start;
      gap: 32px;
    }
    /* 첫 화면(.layout 안)만 - 예전엔 main 전체에 걸려 통계·약관 페이지가 넓은 화면에서 왼쪽에 붙었음 */
    .layout main { margin: 0; }
    /* 본문 폭은 내용과 상관없이 680px (2026-12-02): 정해 두지 않으면 내용 길이에 맞춰 줄어, 정당 페이지는 기관 탭마다 폭이 달라졌다.
       680 = 예전 대통령 지지율 페이지가 보이던 폭 (880으로 넓혀 봤다가 예전 폭이 낫다고 해서 되돌림) */
    .layout main { flex: 0 1 680px; width: 680px; min-width: 0; }
    .chat-toggle { display: none; }
    /* 이 화면 폭에서는 채팅창이 항상 열려 있고 다시 열 토글 버튼도 숨겨져 있어서,
       닫기 버튼을 눌러도 실제로 닫히지 않는다 — 그래서 아예 숨긴다. */
    .chat-close { display: none; }
    .chat-panel {
      display: flex;
      position: sticky;
      top: 32px;
      right: auto;
      bottom: auto;
      height: calc(100vh - 64px);
    }
  }

  /* ── 매일 이슈 (2026-11-25, web/index.html) - 태그 단추·태그 창·글쓰기 창 ───────────────────── */
  /* '# 태그' 버튼 - 누르면 태그 고르기 창 */
  .tag-open-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-1);
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
  }
  .tag-open-btn[hidden] { display: none; }
  .tag-open-btn:hover { border-color: var(--text-muted); }
  .tag-open-hash {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--positive);
    color: #fff;
    font-size: 12px;
  }

  /* 태그 고르기 창 */
  .tag-dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .tag-dialog-head .issue-dialog-title { margin: 0; }
  .tag-dialog-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--soft);
    color: var(--text-primary);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
  }
  .tag-search {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-1);
    color: var(--text-primary);
    font: inherit;
    font-size: 15px;
  }
  .tag-search:focus-visible { outline: 2px solid var(--positive); outline-offset: 1px; }
  /* 태그 창 (2026-12-02): 창 높이를 넘으면 태그 목록만 스크롤 - 예전 max-height 50vh는 휴대폰에서 보이는 높이보다 컸다.
     창은 세로 묶음(제목·찾기 칸 고정 + 목록이 남은 높이)으로 */
  .tag-dialog:modal { display: flex; flex-direction: column; overflow: hidden; }
  .tag-dialog .tag-dialog-head, .tag-dialog .tag-search { flex: none; }
  .tag-list {
    display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; margin-top: 14px;
    flex: 1 1 auto; min-height: 0; max-height: min(60vh, 440px); max-height: min(60svh, 440px);
    overflow-y: auto; overscroll-behavior: contain;
  }
  .tag-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-1);
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
  }
  .tag-item:hover { border-color: var(--text-muted); }
  .tag-item[aria-current] { background: var(--text-primary); border-color: var(--text-primary); color: var(--page); font-weight: 600; }
  .tag-count {
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
  }
  .tag-item[aria-current] .tag-count { background: rgba(127, 127, 127, 0.3); color: inherit; }
  .tag-empty { margin: 16px 0 4px; color: var(--text-muted); font-size: 14px; text-align: center; }
  .tag-empty[hidden] { display: none; }
  /* 머리글의 '새 글 쓰기' */
  /* 검색 칸(38px)과 같은 높이 */
  .header-write { height: 38px; padding: 0 16px; }

  .issue-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-1);
    color: var(--text-primary);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
  }
  .issue-btn:hover { border-color: var(--text-muted); }
  .issue-btn[hidden] { display: none; } /* display를 정한 버튼은 hidden이 안 먹는다 */
  .issue-btn.primary { background: var(--positive); border-color: var(--positive); color: #fff; font-weight: 600; }
  .issue-btn:disabled { opacity: 0.6; cursor: default; }
  .issue-btn.danger { color: var(--negative); border-color: color-mix(in srgb, var(--negative) 45%, var(--border)); }

  /* 지지율 직접 등록·수정 (관리자만, 2026-12-02) */
  .poll-admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 8px; }
  .poll-admin-bar[hidden] { display: none; }
  .poll-admin-hint { font-size: 12px; color: var(--text-muted); }
  th.poll-admin-col, td.poll-admin-cell { width: 1%; text-align: right; white-space: nowrap; }
  .poll-edit-btn {
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-1);
    color: var(--text-secondary);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
  }
  .poll-edit-btn:hover { color: var(--text-primary); border-color: var(--text-muted); }
  .poll-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    vertical-align: 1px;
    white-space: nowrap;
    cursor: help;
  }
  .party-empty-cell { text-align: center; }
  .poll-badge.pending { background: color-mix(in srgb, #e67700 16%, transparent); color: #b35c00; }
  .poll-badge.edited { background: color-mix(in srgb, var(--positive) 14%, transparent); color: var(--positive); }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .poll-badge.pending { color: #ffa94d; }
  }
  :root[data-theme="dark"] .poll-badge.pending { color: #ffa94d; }
  .poll-editor { width: min(480px, calc(100vw - 32px)); }
  .poll-ed-pollster { margin: -6px 0 14px; color: var(--text-secondary); font-size: 14px; }
  .poll-ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .poll-ed-grid .issue-field { min-width: 0; }
  .poll-ed-grid input { width: 100%; min-width: 0; }
  .issue-field input[type="number"] {
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-1);
    color: var(--text-primary);
    font: inherit;
    font-size: 16px;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
  }
  .poll-ed-crawled {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin: 0 0 12px; padding: 8px 10px; border-radius: 10px;
    background: color-mix(in srgb, var(--positive) 8%, transparent); font-size: 13px;
  }
  .poll-ed-crawled[hidden] { display: none; }
  .poll-ed-note { margin: 0 0 8px; font-size: 12px; color: var(--text-muted); line-height: 1.5; }
  .poll-ed-delete { margin-right: auto; }
  #dataTable td:nth-child(2) { white-space: nowrap; }

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .issue {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-1);
    scroll-margin-top: 80px;
  }
  .issue.is-new { animation: issue-flash 1.6s ease-out; }
  @keyframes issue-flash { from { box-shadow: 0 0 0 3px var(--positive); } to { box-shadow: 0 0 0 0 transparent; } }
  @media (prefers-reduced-motion: reduce) { .issue.is-new { animation: none; } }

  .issue-body {
    font-size: 15px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .issue-body a { color: var(--positive); }
  .issue-tag { color: var(--positive); text-decoration: none; }
  .issue-tag:hover { text-decoration: underline; }

  /* 글쓰기·로그인 창 (브라우저 기본 모달) */
  .issue-dialog {
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--page);
    color: var(--text-primary);
  }
  .issue-dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    overflow: hidden;
    overscroll-behavior: contain;
  }
  dialog.issue-dialog:modal { overscroll-behavior: contain; }
  .issue-dialog-title { margin: 0 0 12px; font-size: 18px; }
  .issue-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
  .issue-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
  .issue-field small { font-weight: 400; color: var(--text-muted); }
  .issue-field input[type="date"], .issue-field input[type="text"], .issue-field textarea {
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-1);
    color: var(--text-primary);
    font: inherit;
    font-size: 15px;
    font-weight: 400;
  }
  .issue-field textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
  .issue-field input:focus-visible, .issue-field textarea:focus-visible { outline: 2px solid var(--positive); outline-offset: 1px; }
  .ed-images { display: flex; flex-wrap: wrap; gap: 8px; }
  .ed-images:empty { display: none; }
  .ed-image { position: relative; width: 84px; height: 84px; }
  .ed-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
  .ed-image button {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
  }
  .ed-add-image { align-self: flex-start; font-weight: 400; }
  .issue-error { margin: 0; color: var(--negative); font-size: 13px; }
  .issue-error:empty { display: none; }

  @media (max-width: 600px) {
    .header-write { height: 36px; padding: 0 12px; font-size: 13px; }
    /* 휴대폰: 태그 창은 화면 위쪽에서 (2026-12-02 - 예전 아래 시트는 삼성 인터넷 등 아래 도구 막대 뒤로 잘렸다.
       위에 두면 찾기 칸에서 자판이 올라와도 제목·찾기 칸이 가려지지 않는다) */
    .tag-dialog:modal {
      width: calc(100% - 20px);
      max-width: 100%;
      margin: calc(10px + env(safe-area-inset-top)) auto auto;
      max-height: calc(100vh - 20px);
      max-height: calc(100svh - 20px - env(safe-area-inset-top));
      border-radius: 16px;
      animation: tag-sheet-in 0.18s ease-out;
    }
    @keyframes tag-sheet-in { from { transform: translateY(-12px); opacity: 0; } }
    @media (prefers-reduced-motion: reduce) { .tag-dialog:modal { animation: none; } }
    .issue { padding: 12px 13px; }
    .issue-dialog { padding: 16px; }
  }

  /* 글쓰기 창의 큰 달력 (2026-11-25) - 브라우저 기본 날짜 고르기 창은 맥에서 너무 작았다 */
  .ed-date-row { display: flex; }
  .ed-date-btn {
    flex: 1 1 220px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-1);
    color: var(--text-primary);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
  }
  .ed-date-btn[aria-expanded="true"] { border-color: var(--positive); }
  .ed-cal {
    margin-top: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-1);
    font-weight: 400;
  }
  .ed-cal[hidden] { display: none; }
  .ed-cal-quick { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
  .ed-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
  .ed-cal-title { font-size: 17px; font-weight: 700; }
  .ed-cal-nav {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--page);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
  }
  .ed-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
  .ed-cal-wd { padding: 4px 0; font-size: 13px; color: var(--text-muted); font-weight: 600; }
  .ed-cal-wd:first-child, .ed-cal-day.sun { color: var(--negative); }
  .ed-cal-wd:last-child, .ed-cal-day.sat { color: var(--positive); }
  .ed-cal-day {
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--text-primary);
    font: inherit;
    font-size: 16px;
    cursor: pointer;
  }
  .ed-cal-day:hover { background: var(--soft); }
  .ed-cal-day.today { box-shadow: inset 0 0 0 2px var(--gridline); font-weight: 700; }
  .ed-cal-day[aria-pressed="true"] { background: var(--positive); color: #fff; font-weight: 700; }

  /* 태그 · 더 보기 줄 (글 바로 아래) 과 관리자 ⋯ 메뉴 (2026-11-27: 맨 아래 줄을 없앰) */
  .issue { position: relative; }
  .issue-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 10px;
    margin-top: 4px;
    font-size: 13px;
  }
  .issue-meta[hidden] { display: none; }
  .issue-menu-wrap { position: absolute; top: 8px; right: 8px; }
  .issue-menu-btn {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
  }
  .issue-menu-btn:hover, .issue-menu-btn[aria-expanded="true"] { background: var(--soft); color: var(--text-primary); }
  .issue-menu:popover-open, .issue-menu.is-legacy-pop:not([hidden]) {
    display: flex;
    flex-direction: column;
    min-width: 110px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--page);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  }
  .issue-menu[hidden] { display: none; }
  .issue-menu button {
    padding: 8px 12px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
  }
  .issue-menu button:hover { background: var(--soft); }
  .issue-menu button.danger { color: var(--negative); }

  /* 기사 링크 미리보기 (2026-11-27) - 타임라인 썸네일은 누르면 기사로 */
  .ed-preview { margin: -4px 0 14px; }
  .ed-preview[hidden] { display: none; }
  .ed-preview-note { margin: 0; font-size: 13px; color: var(--text-muted); }
  .ed-preview-card {
    display: flex;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-1);
  }
  .ed-preview-card img { flex: none; width: 96px; height: 64px; object-fit: cover; border-radius: 6px; }
  .ed-preview-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
  .ed-preview-site { color: var(--text-muted); font-size: 12px; }
  .ed-preview-info strong { font-size: 14px; line-height: 1.35; }
  .ed-preview-desc {
    color: var(--text-secondary);
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  /* '내용' 제목 줄 오른쪽: 기사 제목·요약 넣기 ↔ 빼기 (2026-12-03) - 넣은 상태는 옅은 파란 바탕 */
  .ed-body-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .ed-body-tools { display: flex; flex-wrap: wrap; gap: 6px; }
  .ed-body-tools[hidden] { display: none; }
  .ed-tool {
    padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-1);
    color: var(--text-primary); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
  }
  .ed-tool:hover { background: var(--soft); }
  .ed-tool:disabled { opacity: 0.4; cursor: default; }
  .ed-tool[aria-pressed="true"] { background: color-mix(in srgb, var(--positive) 12%, var(--surface-1)); border-color: color-mix(in srgb, var(--positive) 45%, var(--border)); color: var(--positive); }
  .ed-tool:focus-visible { outline: 2px solid var(--positive); outline-offset: 1px; }

  /* 글 속 출처 링크(▶ 유튜브, 📰 언론사) - 작고 흐리게, 밑줄은 마우스를 올렸을 때만 */
  .issue-body a.issue-source {
    font-size: 12.5px;
    color: var(--text-muted);
    text-decoration: none;
  }
  .issue-body a.issue-source:hover { color: var(--text-secondary); text-decoration: underline; }

  /* 기사 제목 줄 (기사 제목 넣기로 넣은 줄) */
  .issue-body .issue-title { font-weight: 700; }

  /* 좋아요·싫어요 (2026-11-28) - 태그·더 보기 줄의 오른쪽 끝 */
  .issue-reacts { margin-left: auto; display: inline-flex; gap: 2px; }
  .react-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 8px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--text-muted);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
  }
  .react-btn:hover { background: var(--soft); color: var(--text-secondary); }
  .react-btn svg { width: 16px; height: 16px; }
  .react-btn[data-r="like"][aria-pressed="true"] { color: var(--positive); }
  .react-btn[data-r="dislike"][aria-pressed="true"] { color: var(--negative); }
  .react-btn[aria-pressed="true"] svg path { fill: currentColor; fill-opacity: 0.18; }
  .react-btn:disabled { opacity: 0.6; cursor: default; }
  .issue-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    z-index: 80;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--text-primary);
    color: var(--page);
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }

  /* 검색 미리보기 목록 (2026-11-28) */
  .site-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 45;
    max-height: min(70vh, 460px);
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--page);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
    overscroll-behavior: contain;
  }
  .site-suggest[hidden] { display: none; }
  .site-header.suggest-open { z-index: 66; } /* 미리보기가 열리면 채팅창(60)보다 위 */
  .site-suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
  }
  .site-suggest-item:hover, .site-suggest-item[aria-selected="true"] { background: var(--soft); }
  .site-suggest-item img {
    flex: none;
    width: 52px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--soft);
  }
  .site-suggest-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
  .site-suggest-date { font-size: 11px; color: var(--text-muted); }
  .site-suggest-snip {
    font-size: 14px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .site-suggest mark { background: color-mix(in srgb, #f2c94c 45%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
  .site-suggest-all { justify-content: center; font-size: 13px; color: var(--positive); font-weight: 600; }
  .site-suggest-empty { padding: 14px; font-size: 13px; color: var(--text-muted); text-align: center; }
  @media (max-width: 720px) {
    .site-header.search-open .site-suggest { top: calc(100% + 2px); left: 10px; right: 10px; }
  }

  /* 사진 올리는 중 (2026-11-28) */
  .ed-image.is-uploading img { opacity: 0.45; }
  .ed-progress {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15));
    border-radius: 8px;
  }
  .ed-progress::before {
    content: "";
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ed-spin 0.9s linear infinite;
  }
  @keyframes ed-spin { to { transform: rotate(360deg); } }
  @media (prefers-reduced-motion: reduce) { .ed-progress::before { animation-duration: 3s; } }
  .ed-add-image.is-disabled { opacity: 0.5; pointer-events: none; }

  /* ── 댓글 (2026-11-29, issue-comments.js) ───────────────────────────── */
  /* 읽기 창 글의 '💬 N' - 좋아요 바로 왼쪽 */
  .issue-cmt-link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
  }
  .issue-cmt-link:hover { background: var(--soft); color: var(--text-secondary); }
  .issue-cmt-link svg { width: 16px; height: 16px; }
  .issue-cmt-link + .issue-reacts { margin-left: 0; }

  .cmt { margin: 26px 0 0; scroll-margin-top: 0; } /* 읽기 창 안 (넓은 화면은 아래 .iss-reader .cmt가 머리글 높이만큼) */
  .cmt[hidden] { display: none; }
  .cmt-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
  .cmt-title { margin: 0; font-size: 17px; font-weight: 800; }
  .cmt-write {
    padding: 4px 10px; border: 0; border-radius: 999px; background: none;
    color: var(--positive); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  }
  .cmt-write:hover { background: var(--soft); }
  .cmt-compose { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
  .cmt-sort { margin-left: auto; display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--soft); }
  .cmt-sort button {
    padding: 4px 12px; border: 0; border-radius: 999px; background: none;
    color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  }
  .cmt-sort button[aria-pressed="true"] { background: var(--page); color: var(--text-primary); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
  .cmt-form { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; }
  .cmt-input {
    width: 100%;
    box-sizing: border-box;
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-1);
    color: var(--text-primary);
    font: inherit;
    font-size: 15px;
    line-height: 1.55;
    resize: vertical;
  }
  .cmt-input:focus { outline: 2px solid color-mix(in srgb, var(--positive) 45%, transparent); outline-offset: 0; }
  .cmt-form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
  .cmt-who { color: var(--text-muted); }
  .cmt-rename { padding: 0; border: 0; background: none; color: var(--positive); font: inherit; cursor: pointer; }
  /* 그 자리 이름 바꾸기 (2026-12-02) */
  .cmt-who.is-editing { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .cmt-rename-input {
    width: 11em; max-width: 100%; height: 30px; padding: 0 10px;
    border: 1px solid var(--border); border-radius: 8px; background: var(--page); color: var(--text-primary);
    font: inherit; font-size: 14px;
  }
  .cmt-rename-input:focus-visible { outline: 2px solid var(--positive); outline-offset: 1px; border-color: transparent; }
  .cmt-rename-save {
    height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--positive); color: #fff;
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  }
  .cmt-rename-save:disabled { opacity: 0.6; cursor: default; }
  .cmt-rename-msg { color: var(--negative); font-size: 12px; }
  .cmt-rename-msg:empty { display: none; }
  .cmt-error { color: var(--negative); }
  .cmt-form-btns { margin-left: auto; display: inline-flex; gap: 6px; }
  .cmt-state { margin: 6px 0; color: var(--text-muted); font-size: 14px; }
  .cmt-state:empty { display: none; }
  .cmt-list-more { display: block; margin: 12px auto 0; }

  /* 댓글 하나: [세로줄(누르면 접기)] [머리 / 본문 / 단추 / 답글들] */
  /* 들여쓰기: 본문·답글은 이름과 같은 x에서 시작(접기 단추 18 + 간격 6), 세로줄은 접기 단추 가운데 아래 */
  .cmt-node { position: relative; padding-top: 8px; }
  .cmt-node.is-new > .cmt-main > .cmt-content { animation: issue-flash 1.6s ease-out; border-radius: 6px; }
  .cmt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 13px; min-height: 22px; }
  .cmt-fold {
    width: 18px; height: 18px; padding: 0; border: 1px solid var(--border); border-radius: 4px;
    background: none; color: var(--text-muted); font: inherit; font-size: 12px; line-height: 1; cursor: pointer;
  }
  /* 작성자는 본문보다 덜 눈에 띄게 (2026-11-29: 굵게 빼고 연하게) */
  .cmt-name { font-weight: 400; color: var(--text-secondary); }
  .cmt-name.is-deleted { color: var(--text-muted); }
  .cmt-badge { padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--positive) 12%, transparent); color: var(--positive); font-size: 11px; font-weight: 500; }
  .cmt-badge.is-me { background: var(--soft); color: var(--text-secondary); }
  .cmt-time, .cmt-folded { color: var(--text-muted); }
  .cmt-main { padding-left: 24px; }
  .cmt-body { margin: 3px 0 2px; font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
  .cmt-body a { color: var(--positive); }
  .cmt-body.is-deleted { color: var(--text-muted); font-style: italic; }
  .cmt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; margin-left: -8px; font-size: 13px; }
  .cmt-actions:empty { display: none; }
  .cmt-reacts { display: inline-flex; gap: 2px; }
  .cmt-act {
    height: 28px; padding: 0 8px; border: 0; border-radius: 999px; background: none;
    color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  }
  .cmt-act:hover { background: var(--soft); color: var(--text-secondary); }
  .cmt-act.danger:hover { color: var(--negative); }
  .cmt-slot:empty { display: none; }
  .cmt-slot .cmt-form { margin: 6px 0 4px; }
  .cmt-more {
    margin: 6px 0 0; padding: 2px 0; border: 0; background: none;
    color: var(--positive); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  }
  .cmt-more[hidden] { display: none; }
  /* 스레드 세로줄 - 머리 아래부터 그 댓글의 끝까지. 누르면 접힘 */
  .cmt-line {
    position: absolute;
    top: 34px;
    bottom: 0;
    left: 0;
    z-index: 1; /* 답글 영역보다 위 - 줄 어디를 눌러도 접힌다 */
    width: 18px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .cmt-line::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 8px;
    width: 2px;
    border-radius: 1px;
    background: var(--gridline);
  }
  .cmt-line:hover::before, .cmt-line:focus-visible::before { background: var(--positive); }
  .cmt-node.is-collapsed > .cmt-main, .cmt-node.is-collapsed > .cmt-line { display: none; }
  .cmt-node.is-collapsed { padding-bottom: 2px; }
  .cmt-node.is-collapsed > .cmt-head .cmt-name { color: var(--text-muted); }
  @media (max-width: 600px) {
    .cmt { padding-left: 0; }
    .cmt-main { padding-left: 20px; }
    .cmt-head { gap: 2px 4px; }
  }

  /* 댓글 사진 (2026-11-29) */
  .cmt-image {
    display: block;
    margin: 6px 0 4px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--soft);
    cursor: zoom-in;
    max-width: min(320px, 100%);
  }
  .cmt-image img { display: block; max-width: 100%; max-height: 260px; object-fit: contain; }
  .cmt-pick {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: 8px;
    background: none; color: var(--text-secondary); cursor: pointer;
  }
  .cmt-pick:hover { background: var(--soft); color: var(--text-primary); }
  .cmt-pick[hidden] { display: none; }
  .cmt-pick svg { width: 18px; height: 18px; }
  .cmt-attach { position: relative; align-self: flex-start; width: 120px; height: 90px; border-radius: 8px; overflow: hidden; background: var(--soft); }
  .cmt-attach[hidden] { display: none; }
  .cmt-attach img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .cmt-attach-rm {
    position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 15px; line-height: 1; cursor: pointer;
  }
  .cmt-attach-progress {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 13px; font-weight: 700;
  }

  /* ── 계정 (2026-11-29, account.js) ───────────────────────────────────── */
  .site-avatar {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    border-radius: 50%; object-fit: cover; overflow: hidden;
    color: #fff; font-weight: 700; line-height: 1; user-select: none; vertical-align: middle;
  }
  img.site-avatar { background: var(--soft); }
  .site-account { position: relative; display: inline-flex; align-items: center; }
  .site-login-btn {
    height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface-1); color: var(--text-primary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  }
  .site-login-btn:hover { background: var(--soft); }
  .site-account-btn { display: inline-flex; padding: 2px; border: 0; border-radius: 50%; background: none; cursor: pointer; }
  .site-account-btn:hover, .site-account-btn[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--gridline); }
  /* 펼침 메뉴는 Popover (account.js sitePopover) - 위치(top·right)는 열 때 JS가 단추 아래로. 닫힌 동안은 브라우저가 숨긴다.
     display를 열렸을 때만 주는 이유: 그냥 주면 닫힌 popover도 보인다(작성자 CSS가 브라우저 기본 display:none을 이김) */
  .site-account-menu, .site-bell-panel, .issue-menu {
    position: fixed; inset: auto; margin: 0; padding: 0; color: var(--text-primary);
  }
  .site-account-menu:popover-open, .site-account-menu.is-legacy-pop:not([hidden]) {
    min-width: 200px; padding: 6px;
    display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px;
    background: var(--page); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  }
  .site-account-menu[hidden] { display: none; }
  .site-account-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
  .site-account-head b { display: block; font-size: 14px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-account-head span { font-size: 12px; color: var(--text-muted); }
  .site-account-menu a, .site-account-menu button {
    padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text-primary);
    font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer;
  }
  .site-account-menu a:hover, .site-account-menu button:hover { background: var(--soft); }
  .site-account-menu button { color: var(--text-secondary); }
  .login-dialog { max-width: 400px; }
  .login-reason { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--positive) 10%, transparent); font-size: 14px; }
  .login-reason[hidden] { display: none; }
  .login-perks { margin: 0 0 16px; padding-left: 18px; font-size: 14px; line-height: 1.8; color: var(--text-secondary); }
  /* 구글 버튼(iframe) 뒤가 다크 모드에서 흰 박스로 칠해지지 않게 - 이 칸만 밝은 색 체계로 두면 iframe 바탕이 투명해진다 */
  /* 높이 고정: 구글 스크립트가 버튼을 그리는 순간 이 칸이 잠깐(약 0.03초) 80px로 커져, 가운데 정렬된 창이
     위로 18px 올라갔다 내려오는 흔들림이 있었다 (2026-11-29). 큰 버튼(large) 높이 44px에 맞춰 두고 넘치는 건 숨긴다 */
  .login-google { display: flex; justify-content: center; align-items: center; height: 44px; overflow: hidden; margin-bottom: 12px; color-scheme: light; position: relative; }
  /* 진짜 구글 버튼이 준비될 때까지 (account.js renderGoogle): 같은 크기의 회색 알약만 보이고 버튼은 숨긴다 */
  .login-google > * { transition: opacity 0.18s ease; }
  .login-google.is-wait > * { opacity: 0; }
  .login-google.is-wait::before {
    content: ""; position: absolute; left: 50%; top: 2px; transform: translateX(-50%);
    width: var(--gsi-w, 300px); height: 40px; border-radius: 999px;
    background: linear-gradient(90deg,
      color-mix(in srgb, var(--text-primary) 7%, transparent) 30%,
      color-mix(in srgb, var(--text-primary) 13%, transparent) 50%,
      color-mix(in srgb, var(--text-primary) 7%, transparent) 70%);
    background-size: 300% 100%;
    animation: skel-shimmer 1.5s ease-in-out infinite;
  }
  @media (prefers-reduced-motion: reduce) { .login-google.is-wait::before { animation: none; } }
  .login-dialog .issue-dialog-title:focus { outline: none; }
  .login-note { margin: 0; font-size: 12px; line-height: 1.6; color: var(--text-muted); }
  .login-note a { color: inherit; }
  /* 글 상자의 스크랩 단추 - 댓글 수와 좋아요 사이 */
  .scrap-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 28px; padding: 0;
    border: 0; border-radius: 999px; background: none; color: var(--text-muted); cursor: pointer;
  }
  .scrap-btn svg { width: 16px; height: 16px; }
  .scrap-btn:hover { background: var(--soft); color: var(--text-secondary); }
  .scrap-btn[aria-pressed="true"] { color: var(--positive); }
  .scrap-btn[aria-pressed="true"] svg path { fill: currentColor; }
  .scrap-btn + .issue-reacts { margin-left: 0; }
  .cmt-head .site-avatar { font-size: 10px !important; }
  @media (max-width: 600px) {
    .site-login-btn { height: 32px; padding: 0 10px; font-size: 13px; }
  }

  /* 답글 알림 🔔 · 신고 창 (2026-11-29) */
  .site-bell { position: relative; display: inline-flex; margin-right: 6px; }
  .site-bell-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--text-secondary); cursor: pointer;
  }
  .site-bell-btn:hover, .site-bell-btn[aria-expanded="true"] { background: var(--soft); color: var(--text-primary); }
  .site-bell-btn svg { width: 21px; height: 21px; }
  .site-bell-badge {
    position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box;
    border-radius: 999px; background: var(--negative); color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center;
  }
  .site-bell-badge[hidden] { display: none; }
  .site-bell-panel:popover-open, .site-bell-panel.is-legacy-pop:not([hidden]) {
    width: min(360px, calc(100vw - 24px));
    max-height: min(70vh, 520px); display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px;
    background: var(--page); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16); overflow: hidden;
  }
  .site-bell-panel[hidden] { display: none; }
  .site-bell-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
  .site-bell-head button { padding: 2px 6px; border: 0; background: none; color: var(--positive); font: inherit; font-size: 13px; cursor: pointer; }
  .site-bell-list { overflow-y: auto; }
  .site-bell-item { display: flex; gap: 10px; padding: 10px 14px; color: var(--text-primary); text-decoration: none; font-size: 13px; line-height: 1.45; }
  .site-bell-item + .site-bell-item { border-top: 1px solid var(--border); }
  .site-bell-item:hover { background: var(--soft); }
  .site-bell-item.is-unread { background: color-mix(in srgb, var(--positive) 7%, transparent); }
  .site-bell-snip { color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
  .site-bell-meta { margin-top: 2px; font-size: 12px; color: var(--text-muted); }
  .site-bell-empty { margin: 0; padding: 24px 16px; text-align: center; color: var(--text-muted); font-size: 13px; }
  .report-dialog { max-width: 400px; }
  .report-note { margin: 0 0 10px; font-size: 13px; color: var(--text-muted); }
  .report-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin-bottom: 10px; font-size: 14px; }
  .report-reasons label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
  .report-form textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--page); color: var(--text-primary); font: inherit; font-size: 14px; resize: vertical; }
  .report-msg { min-height: 1.4em; margin: 6px 0 0; font-size: 13px; color: var(--positive); }
  @media (max-width: 600px) {
    .site-bell { margin-right: 2px; }
    .site-bell-btn { width: 32px; height: 32px; }
    .report-reasons { grid-template-columns: 1fr; }
  }

  /* 싫어요 아이콘 = 좋아요를 뒤집은 것 (lib.js thumbIcon) */
  .thumb-down { transform: scaleY(-1); }

  /* ── 스켈레톤 (2026-11-29): 데이터를 받는 동안 실제 모양의 회색 틀을 먼저 보여 준다 ─────────────
     - 0.2초 안에 오면 보이지 않게 (틀이 번쩍였다 사라지는 것 방지): 틀은 0.2초 뒤에 서서히 나타난다
     - 빛이 지나가는 효과(shimmer)는 '동작 줄이기'를 켠 기기에서는 끈다
     타임라인: index.html #timelineSkel (home.js가 첫 화면·태그 바꿀 때 보이고 받으면 숨김)
     지지율: poll/index.html .card.is-loading (poll.js가 받으면 뗀다) */
  @keyframes skel-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
  @keyframes skel-in { from { opacity: 0; } to { opacity: 1; } }  @media (prefers-reduced-motion: reduce) {
    .card.is-loading .hero-value, .card.is-loading .chart-wrap::after { animation: none; }
  }

  /* 지지율 - 기관 탭 줄, 큰 수치 두 개, 차트 칸 */
  .card.is-loading .pollster-tabs:empty { min-height: 33px; } /* = 탭 버튼 높이 (안쪽 여백 8+8 + 글자 줄) */
  .card.is-loading .pollster-tabs:empty::before {
    content: ""; align-self: center; width: 260px; max-width: 70%; height: 14px; border-radius: 6px;
    background: color-mix(in srgb, var(--text-primary) 7%, transparent);
  }
  .card.is-loading .hero-value {
    color: transparent;
    min-width: 7ch;
    border-radius: 10px;
    background: linear-gradient(90deg,
      color-mix(in srgb, var(--text-primary) 7%, transparent) 30%,
      color-mix(in srgb, var(--text-primary) 13%, transparent) 50%,
      color-mix(in srgb, var(--text-primary) 7%, transparent) 70%);
    background-size: 300% 100%;
    animation: skel-in 0.25s ease 0.2s both, skel-shimmer 1.5s ease-in-out infinite;
  }
  .card.is-loading .hero-meta { visibility: hidden; }
  .card.is-loading .chart-wrap { position: relative; }
  /* 차트 자리: 옅은 가로 격자 + 지나가는 빛 (svg는 비어 있어도 viewBox 비율로 높이를 차지한다) */
  .card.is-loading .chart-wrap::after {
    content: "";
    position: absolute; inset: 8px 0 24px 32px;
    border-radius: 6px;
    background:
      repeating-linear-gradient(to bottom, var(--gridline) 0 1px, transparent 1px 20%),
      linear-gradient(90deg, transparent 30%, color-mix(in srgb, var(--text-primary) 8%, transparent) 50%, transparent 70%);
    background-size: 100% 100%, 300% 100%;
    animation: skel-in 0.25s ease 0.2s both, skel-shimmer 1.5s ease-in-out infinite;
    pointer-events: none;
  }

/* ── 정당 지지율 추이 (2026-12-02, party/index.html · js/party.js) ──
   민주=파랑(--positive), 국힘=빨강(--negative)은 지지율 페이지와 같은 색. 나머지는 서로·양당과 헷갈리지 않는 색,
   무당층은 회색 점선 */
:root {
  --party-rebuild:     #0e8fa8;
  --party-reform:      #ef7d1a;
  --party-progressive: #c2187a;
  --party-other:       #8e8e93;
  --party-none:        #a3a6ab;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --party-rebuild:     #33b3cc;
    --party-reform:      #f59a45;
    --party-progressive: #e0559f;
    --party-other:       #a1a1a6;
    --party-none:        #7d8086;
  }
}
:root[data-theme="dark"] {
  --party-rebuild:     #33b3cc;
  --party-reform:      #f59a45;
  --party-progressive: #e0559f;
  --party-other:       #a1a1a6;
  --party-none:        #7d8086;
}
.party-dem { --c: var(--positive); }
.party-ppp { --c: var(--negative); }
.party-rebuild { --c: var(--party-rebuild); }
.party-reform { --c: var(--party-reform); }
.party-progressive { --c: var(--party-progressive); }
.party-other { --c: var(--party-other); }
.party-none { --c: var(--party-none); }
.hero-value.party-dem, .hero-value.party-ppp { color: var(--c); }
.party-stroke-dem { stroke: var(--positive); }
.party-stroke-ppp { stroke: var(--negative); }
.party-stroke-rebuild { stroke: var(--party-rebuild); }
.party-stroke-reform { stroke: var(--party-reform); }
.party-stroke-progressive { stroke: var(--party-progressive); }
.party-stroke-other { stroke: var(--party-other); }
.party-stroke-none { stroke: var(--party-none); }
.party-line.dashed { stroke-dasharray: 5 4; }
.party-fill-dem { fill: var(--positive); }
.party-fill-ppp { fill: var(--negative); }
.party-fill-rebuild { fill: var(--party-rebuild); }
.party-fill-reform { fill: var(--party-reform); }
.party-fill-progressive { fill: var(--party-progressive); }
.party-fill-other { fill: var(--party-other); }
.party-fill-none { fill: var(--party-none); }
.party-bg-dem { background: var(--positive); }
.party-bg-ppp { background: var(--negative); }
.party-bg-rebuild { background: var(--party-rebuild); }
.party-bg-reform { background: var(--party-reform); }
.party-bg-progressive { background: var(--party-progressive); }
.party-bg-other { background: var(--party-other); }
.party-bg-none { background: var(--party-none); }
.end-label.party-fill-none, .end-label.party-fill-other { font-weight: 500; }

.party-chips { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 14px; }
.party-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.party-chip strong { color: var(--text-primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.party-chip .change { font-size: 12px; font-weight: 500; }
.party-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }

.party-legend { flex-wrap: wrap; gap: 6px 8px; }
.legend-toggle {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.legend-toggle[aria-pressed="false"] { opacity: 0.45; }
.legend-toggle[aria-pressed="false"] .legend-key { background: var(--text-muted); }
.legend-key.dashed { background: repeating-linear-gradient(90deg, var(--party-none) 0 4px, transparent 4px 7px) !important; }
.legend-toggle[aria-pressed="false"] .legend-key.dashed { background: repeating-linear-gradient(90deg, var(--text-muted) 0 4px, transparent 4px 7px) !important; }
#tooltip .tt-key[class*="party-bg-"] { height: 3px; border-radius: 2px; }

.table-scroll { overflow-x: auto; position: relative; } /* relative: 안의 .sr-only(절대 위치)가 칸 밖으로 나가 휴대폰 페이지 폭을 넓히지 않게 (2026-12-02) */
.table-scroll table th, .table-scroll table td { white-space: nowrap; }

/* 정당 수치 직접 수정 (관리자만, 2026-12-02) */
td.cell-edited { text-decoration: underline dotted; text-underline-offset: 3px; }
#partyAdminBar { margin: 12px 0 8px; display: block; }
#partyAdminBar[hidden] { display: none; }
#partyEdFields .issue-field small { margin-left: 4px; }

/* ── 첫 화면 매일 이슈: 노선도 목록(js/flow.js, 아래 '이슈 흐름') + 읽기 창(js/home.js) ──────────────
   넓은 화면(1000px 이상): 왼쪽 노선도 + 오른쪽 읽기 창(글 길이만큼, 페이지와 함께 스크롤).
   좁은 화면: 노선도만, 글을 누르면 읽기 창이 화면 전체로 (body.reader-open).
   (2026-12-03 예전 날짜별 목록·달력 띠 스타일은 지움) */
@media (min-width: 1000px) {
  main.issues-page { max-width: 1240px; }
}
.iss-split { margin-top: 10px; }
@media (min-width: 1000px) {
  /* 노선 칸·썸네일이 있어 왼쪽 칸 400~520px */
  .iss-split { display: grid; grid-template-columns: minmax(400px, 520px) minmax(0, 1fr); gap: 24px; align-items: start; }
}

/* 목록 줄 아래 작은 줄의 아이콘(좋아요·싫어요·북마크)과 썸네일 - lib.js ROW_ICONS·rowThumb */
.iss-bit { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.iss-bit svg { width: 14px; height: 14px; flex: none; }
.iss-bit.is-mine { color: var(--positive); }
.iss-bit.is-scrap { color: var(--positive); }
.iss-bit.is-scrap svg path { fill: currentColor; }
.iss-row-thumb {
  flex: none; position: relative; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--soft);
}
.iss-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.iss-row-thumb.is-video::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='white'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* 읽기 창 */
.iss-reader { display: none; }
@media (min-width: 1000px) {
  /* 창 안 스크롤 없이 글 길이만큼 - 페이지와 함께 움직인다 (2026-12-03 사용자 요청. 예전엔 화면에 붙어 따로 스크롤) */
  .iss-reader {
    display: flex; flex-direction: column;
    border: 1px solid var(--border); border-radius: 16px; background: var(--surface-1); overflow: hidden;
  }
  .iss-reader .cmt { scroll-margin-top: 72px; } /* 댓글로 갈 때 머리글에 가리지 않게 */
  .iss-reader-back { display: none !important; }
}
.iss-reader-bar {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 700; color: var(--text-secondary);
}
.iss-reader-date { flex: 1; min-width: 0; }
.iss-reader-nav { display: flex; gap: 4px; }
.iss-reader-bar button {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border: 1px solid var(--border); border-radius: 50%; background: var(--page); color: var(--text-primary); cursor: pointer; padding: 0;
}
.iss-reader-bar button svg { width: 18px; height: 18px; }
.iss-reader-bar button:disabled { opacity: 0.35; cursor: default; }
/* 넓은 화면은 페이지와 함께 스크롤(창 안 스크롤 없음), 좁은 화면(전체 화면 읽기 창)은 이 칸이 스크롤된다 */
.iss-reader-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 22px 28px; }
@media (min-width: 1000px) { .iss-reader-scroll { flex: none; overflow: visible; overscroll-behavior: auto; } }
.iss-reader-empty { color: var(--text-muted); text-align: center; margin: 60px 0; }

/* 좁은 화면: 읽기 창을 화면 전체로 */
@media (max-width: 999.98px) {
  body.reader-open { overflow: hidden; }
  body.reader-open .iss-reader {
    display: flex; flex-direction: column;
    position: fixed; inset: 0; z-index: 70; background: var(--page);
    padding-top: env(safe-area-inset-top);
  }
  .iss-reader-scroll { padding: 14px 16px calc(28px + env(safe-area-inset-bottom)); }
}

/* 읽기 창 속 글 (예전 글 상자 모양은 빼고 평평하게) */
.issue.is-reader { padding: 0; border: 0; background: none; border-radius: 0; }
.issue.is-reader .issue-body { font-size: 16px; line-height: 1.75; }
.issue.is-reader .issue-meta { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); gap: 6px 12px; }
.issue.is-reader .issue-meta-gap { flex: 1; }
.issue.is-reader .issue-menu-wrap { position: static; }
.iss-gallery { display: grid; gap: 6px; margin-bottom: 16px; }
.iss-gallery.n2 { grid-template-columns: 1fr 1fr; }
.iss-gallery.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.iss-gallery.n3 > :first-child { grid-row: span 2; }
.iss-gallery.n4 { grid-template-columns: 1fr 1fr; }
.iss-gallery-img { padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--soft); }
.iss-gallery-img img { display: block; width: 100%; height: 100%; max-height: 520px; object-fit: cover; }
.iss-gallery.n1 .iss-gallery-img img { object-fit: contain; max-height: 560px; background: var(--soft); }
.iss-gallery.n2 .iss-gallery-img, .iss-gallery.n4 .iss-gallery-img { aspect-ratio: 4 / 3; }
.iss-video { position: relative; aspect-ratio: 16 / 9; margin-bottom: 14px; border-radius: 10px; overflow: hidden; background: #000; }
.iss-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.iss-article {
  display: flex; gap: 14px; margin-top: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 12px;
  color: inherit; text-decoration: none; background: var(--page);
}
.iss-article:hover { border-color: var(--text-muted); }
.iss-article img { flex: none; width: 140px; height: 94px; object-fit: cover; border-radius: 8px; }
.iss-article-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.iss-article-site { font-size: 12px; color: var(--text-muted); }
.iss-article-text strong { font-size: 15px; line-height: 1.4; }
.iss-article-desc { font-size: 13px; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 600px) {
  .iss-article img { width: 96px; height: 72px; }
}

/* 머리글 '새 글 쓰기' (2026-12-02): 1024px보다 좁으면 '+'만 - 관리자 머리글(메뉴·검색·글쓰기·알림·아바타)이
   폴드 펼친 화면(884px)에서 한 줄을 넘어 페이지가 옆으로 넓어졌다 */
@media (max-width: 1023.98px) {
  .header-write .header-write-text { display: none; }
  .header-write { width: 38px; padding: 0; justify-content: center; font-size: 20px; line-height: 1; }
}
@media (max-width: 600px) { .header-write { width: 36px; height: 36px; } }

/* ── 이슈 흐름 (/flow/, js/flow.js, 2026-12-02): 태그 = 노선, 글 = 역 ───────────── */
.flow-row.is-selected a { background: color-mix(in srgb, var(--positive) 10%, transparent); }
/* 읽음 표시 (2026-12-03): 안 읽은 글은 제목 굵게 + 날짜 앞 파란 점, 읽은 글은 보통 굵기·흐린 제목 */
.flow-row.is-unread .flow-title { font-weight: 700; }
.flow-row.is-unread .flow-date::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%;
  background: var(--positive); vertical-align: 2px;
}
.flow-row.is-read .flow-title { font-weight: 500; color: var(--text-secondary); }
.iss-bit.is-cmt.is-new { color: var(--positive); font-weight: 700; }
.flow-svg .flow-x.is-unread { fill: var(--text-primary); }
.flow-note-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.flow-reads { display: inline-flex; align-items: center; gap: 8px; }
.flow-reads[hidden] { display: none; }
.flow-unread-n {
  padding: 4px 10px; border: 1px solid color-mix(in srgb, var(--positive) 35%, var(--border)); border-radius: 999px;
  background: none; color: var(--positive); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.flow-unread-n:hover { background: color-mix(in srgb, var(--positive) 8%, transparent); }
.flow-unread-n[aria-pressed="true"] { background: var(--positive); border-color: var(--positive); color: #fff; }
.flow-unread-n:focus-visible { outline: 2px solid var(--positive); outline-offset: 1px; }
.flow-chip[hidden] { display: none; }
.flow-row.is-new a { animation: issue-flash 1.6s ease-out; } /* 방금 쓴 글 */
/* 태그 클라우드: 낱말마다 left/top(가운데 점) - flow.js가 놓는다 */
.flow-lines { position: relative; height: 0; min-width: 0; }
/* 위쪽: 가운데 태그 클라우드 + 오른쪽 '태그 찾기' 단추 (2026-12-03 '목록으로'는 목록 페이지와 함께 없앰).
   왼쪽에 단추와 같은 폭의 빈 칸을 둬 클라우드가 화면 가운데에 오게. 600px 미만은 '태그'가 위 오른쪽, 클라우드는 아래 전체 폭 */
.flow-top {
  display: grid; grid-template-columns: 116px minmax(0, 1fr) 116px; grid-template-areas: ". cloud tags";
  align-items: center; gap: 16px;
}
/* 메뉴 바와 태그 클라우드 사이 (2026-12-03): 본문 위 여백 32px + 클라우드 위 20px = 52px이 너무 높았다 → 18px (휴대폰 14px) */
main.issues-page { padding-top: 18px; }
@media (max-width: 599px) { main.issues-page { padding-top: 14px; } }
.flow-top .flow-lines { grid-area: cloud; }
.flow-top-tags { grid-area: tags; justify-self: end; }
.flow-top-tags[hidden] { display: inline-flex; visibility: hidden; }
@media (max-width: 599px) {
  .flow-top { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: ". tags" "cloud cloud"; gap: 10px 8px; }
}
.flow-word {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  padding: 0; border: 0; border-radius: 4px; background: none; cursor: pointer;
  color: var(--c); font: inherit; font-weight: 800; line-height: 1; letter-spacing: -0.02em;
  transition: opacity 0.15s;
}
.flow-word.is-vertical { transform: translate(-50%, -50%) rotate(-90deg); }
.flow-word:not(.is-line) { font-weight: 700; }
.flow-word:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.flow-word:focus-visible { outline: 2px solid var(--positive); outline-offset: 2px; }
.flow-lines:has(.flow-word[aria-pressed="true"]) .flow-word[aria-pressed="false"] { opacity: 0.3; }
.flow-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface-1);
  color: var(--text-primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.flow-chip[hidden] { display: none; }
.flow-chip:hover { background: var(--soft); }
.flow-chip:focus-visible { outline: 2px solid var(--positive); outline-offset: 1px; }
.flow-note-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 8px; }
.flow-note-row .flow-note { margin: 0; }
@media (prefers-reduced-motion: reduce) { .flow-word { transition: none; } }
.flow-note { margin: 10px 0 8px; font-size: 12px; color: var(--text-muted); }
.flow-map { position: relative; }
.flow-svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.flow-svg .flow-l, .flow-svg .flow-x { transition: opacity 0.15s; }
.flow-svg .is-dim { opacity: 0.15; }
.flow-svg .flow-st { fill: var(--page); }
.flow-svg .flow-x { fill: var(--page); stroke: var(--text-primary); stroke-width: 2; }
.flow-list { list-style: none; margin: 0; padding: 0; }
.flow-row a {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 8px 9px var(--track, 6px); border-radius: 10px; color: inherit; text-decoration: none;
}
.flow-row a:hover { background: var(--soft); }
.flow-row a:focus-visible { outline: 2px solid var(--positive); outline-offset: -2px; }
.flow-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* 썸네일은 모든 화면에서 제목 앞(왼쪽) 원형 (2026-12-03) */
.flow-row .iss-row-thumb { order: -1; width: 56px; height: 56px; border-radius: 50%; }
.flow-row .iss-row-thumb.is-video::after { width: 20px; height: 20px; background-size: 12px; }
@media (max-width: 999px) { .flow-row .iss-row-thumb { width: 52px; height: 52px; } }
.flow-date { font-size: 11.5px; font-weight: 600; color: var(--text-muted); line-height: 1.2; }
.flow-title {
  font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: keep-all; overflow-wrap: anywhere;
}
.flow-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 12px; color: var(--text-muted); }
.flow-tag.is-line { color: var(--c); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .flow-svg .flow-l, .flow-svg .flow-x { transition: none; } }
/* 넓은 화면은 날짜를 보통 굵기로 (위치는 모든 화면에서 제목 바로 위 왼쪽) */
@media (min-width: 1000px) { .flow-date { font-weight: 400; } }
