/* =====================================================================
 * 양향자 사이트 관리자 화면 — 2026-10-14 새 디자인
 * 대표 지시: "밤티 — 폴리전화AI·신고센터 사이트·폴리 같은 모던하고 깔끔한 문법" + "색상은 빨간색 국힘색"
 *  - 회색 판(#F2F4F6) 위 흰 카드(모서리 20). 테두리·그림자 없음. 깊이는 떠 있는 것(아래 탭 알약·시트·토스트)에만.
 *  - 주 색은 국민의힘 빨강: 채움 #E61E2B, 글자 #D31421(ppp-report/_build/brand.md 0절). 한 화면에 주 단추 하나.
 *  - 성향은 '점 + 글자': 우호 보라 · 중립 회색 · 비우호 슬레이트(폴리AI StanceColors 문법, 브랜드 빨강과 겹치지 않음).
 *  - Pretendard 400/500/600/700, 숫자 tabular-nums. 본문 16·보조 14. 누르는 곳 44.
 *  휴대폰(390px)을 먼저 맞추고 넓힌다. 밝은 화면 한 가지.
 * ===================================================================== */

:root {
  color-scheme: light;
  /* 면 — 차가운 회색만 */
  --bg: #F2F4F6;
  --surface: #FFFFFF;
  --fill: #F2F4F6;
  --fill-2: #E7EAEE;
  --track: #E5E8EB;
  --hover: #F7F8FA;
  --scrim: rgba(15, 18, 24, .32);
  /* 글자 */
  --ink: #191F28;
  --ink-2: #4E5968;
  --ink-3: #5F6875;
  --ink-4: #AEB5BE;      /* 글자 금지: 셰브런·가운뎃점·꺼진 것 */
  /* 선 */
  --line: #E5E8EB;
  --line-2: #D5DAE0;
  /* 브랜드(국민의힘) */
  --red: #E61E2B;
  --red-ink: #D31421;
  --red-press: #BC1300;
  --red-tint: #FDECEE;
  --focus: #112C56;      /* 국민의힘 남색 — 포커스 고리에만 */
  /* 성향 */
  --pos: #7C5CF0; --pos-ink: #5B37ED;
  --neu: #A7AFB9; --neu-ink: #4E5968;
  --neg: #2E3A4B; --neg-ink: #2E3A4B;
  --off: #AEB5BE;
  --pend: #D5DAE0;
  /* 접속 통계 차트(색각 검사를 통과한 값) */
  --series-visits: #1D4F91; --series-visitors: #2B93D4;
  /* 면 문맥값 — 회색 판 위 기본. 흰 그릇 안은 아래에서 바꾼다 */
  --btn-bg: var(--surface); --btn-hover: var(--hover); --quiet-hover: var(--track);
  --chip-bg: var(--surface); --seg-track: var(--track); --input-bg: var(--surface);
  /* 아이콘 */
  --i-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 4a7 7 0 1 0 0 14 7 7 0 0 0 0-14zM20 20l-4-4' fill='none' stroke='%235F6875' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  --i-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 12'%3E%3Cpath d='M1 1l5 5-5 5' fill='none' stroke='%23AEB5BE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235F6875' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-out: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 17L17 7M9 7h8v8' fill='none' stroke='%234E5968' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  /* 모양 */
  --r-card: 20px; --r-12: 12px; --r-8: 8px; --r-sheet: 28px; --r-dialog: 24px; --r-full: 999px;
  /* 간격 */
  --gutter: 16px;
  --gl: max(var(--gutter), env(safe-area-inset-left));
  --gr: max(var(--gutter), env(safe-area-inset-right));
  --card-pad: 20px; --sec-gap: 32px; --first-gap: 20px;
  /* 그림자 — 떠 있는 것에만 */
  --sh-glass: 0 4px 12px rgba(0, 0, 0, .08), 0 0 0 .5px rgba(0, 0, 0, .08);
  --sh-sheet: 0 -1px 0 rgba(0, 0, 0, .04), 0 18px 60px rgba(16, 24, 40, .22), 0 2px 10px rgba(16, 24, 40, .08);
  --sh-thumb: 0 3px 8px rgba(0, 0, 0, .10), 0 0 0 .5px rgba(0, 0, 0, .04);
  --sh-pop: 0 10px 30px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .06);
  /* 움직임 */
  --ease: cubic-bezier(.35, 0, .35, 1); --ease-sheet: cubic-bezier(.03, .4, .1, 1);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  /* 옛 이름(admin.js 가 쓰는 클래스가 따라오게) */
  --wash: var(--fill); --red-wash: var(--red-tint); --radius: var(--r-card);
  --navy: var(--series-visits); --blue: var(--series-visitors);
}
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 900px) { :root { --gutter: 32px; } }

/* 흰 그릇 안의 단추·칩·세그·입력칸은 회색 채움 */
.card, .tile, .sheet, .dialog, .cheers, .cheers__row, .logs, .pushcard, .nw,
.gate__card, .empty, .inline-error, .quick__btn {
  --btn-bg: var(--fill); --btn-hover: var(--fill-2); --quiet-hover: var(--fill);
  --chip-bg: var(--fill); --seg-track: var(--fill); --input-bg: var(--fill);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 var(--font); letter-spacing: .0057em;
  font-variant-numeric: tabular-nums; word-break: keep-all; overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
b, strong { font-weight: 700; }
h1, h2, h3, p, dl, dd, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.noscript { margin: 0; padding: 14px 16px; background: var(--red-tint); color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------------
 * 단추: 주(빨강, 한 화면에 하나) / 보조(회색 채움) / 글자
 * ------------------------------------------------------------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 20px; border: 0; border-radius: var(--r-full);
  background: var(--btn-bg); color: var(--ink); text-decoration: none;
  font: 700 16px/22px var(--font); letter-spacing: -.005em; white-space: nowrap;
  transition: background-color .15s var(--ease), transform .15s var(--ease);
}
@media (hover: hover) { .btn:hover { background: var(--btn-hover); } }
.btn:active { transform: scale(.97); }
.btn--block:active, .sheet__foot .btn:active, .dialog__actions .btn:active { transform: scale(.985); }
.btn:disabled { opacity: .38; }
.btn.is-busy { opacity: .55; pointer-events: none; }
.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 44px; padding: 0 16px; font: 600 15px/20px var(--font); }
.btn--primary { background: var(--red); color: #fff; }
@media (hover: hover) { .btn--primary:hover { background: var(--red-ink); } }
.btn--primary:active { background: var(--red-press); }
.btn--primary-sm { min-height: 44px; font: 700 15px/20px var(--font); }
.btn--quiet { min-height: 44px; padding: 0 12px; background: transparent; color: var(--ink-2); font: 600 15px/20px var(--font); }
@media (hover: hover) { .btn--quiet:hover { background: var(--quiet-hover); } }
.btn--danger { color: var(--red-ink); }
.btn__icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------------
 * 경고 띠(시험 DB 등 — 운영에서는 보이지 않는다)
 * ------------------------------------------------------------------- */
.notices { background: var(--red-tint); border: 0; color: var(--ink); }
.notice {
  display: flex; align-items: flex-start; gap: 8px;
  max-width: 1240px; margin: 0 auto;
  padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  font: 500 14px/20px var(--font);
}
.notice strong { font-weight: 700; color: var(--red-ink); }
.notice + .notice { border-top: 1px solid rgba(211, 20, 33, .12); }
.notice__icon { flex: none; width: 16px; height: 16px; margin-top: 2px; fill: none; stroke: var(--red-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notice:first-child { padding-top: max(8px, env(safe-area-inset-top)); }

/* ---------------------------------------------------------------------
 * 들어가기 전 화면(시작, 로그인, 권한 없음, 오류)
 * ------------------------------------------------------------------- */
.gate {
  min-height: 78vh; min-height: 78dvh;
  display: grid; place-items: center;
  padding: 32px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left));
}
.gate__card { width: 100%; max-width: 400px; display: grid; gap: 16px; padding: 28px 24px 24px; border: 0; border-radius: 24px; background: var(--surface); }
.gate__card--plain { background: transparent; text-align: center; }
.gate__brand { font: 700 18px/24px var(--font); letter-spacing: -.01em; }
.gate__busy { font: 500 15px/22px var(--font); color: var(--ink-3); }
.gate__title { font: 700 24px/32px var(--font); letter-spacing: -.02em; }
.gate__lead { font: 400 16px/25px var(--font); color: var(--ink-2); }
.gate__email { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }

.field { display: grid; gap: 8px; }
.field label { font: 600 15px/20px var(--font); color: var(--ink); }
.field input {
  width: 100%; min-width: 0; height: 52px; padding: 0 16px; border: 0; border-radius: var(--r-12);
  background: var(--input-bg); font: 400 17px/24px var(--font);
}
.field input:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px var(--focus); }
.field__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.form-error { padding: 0; background: none; color: var(--red-ink); font: 600 15px/22px var(--font); }

.mfa { display: grid; justify-items: center; gap: 10px; padding: 16px 12px; border: 0; border-radius: 16px; background: var(--fill); }
.mfa__qr { display: block; width: 196px; height: 196px; padding: 8px; border-radius: 12px; background: #fff; image-rendering: pixelated; }
.mfa__key { display: grid; justify-items: center; gap: 2px; text-align: center; }
.mfa__keylabel { font: 600 14px/20px var(--font); color: var(--ink-3); }
.mfa__secret { font: 700 16px/22px var(--font); letter-spacing: .04em; overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }
#mfa-code { font-size: 22px; font-weight: 700; letter-spacing: .2em; text-align: center; }

/* ---------------------------------------------------------------------
 * 앱 껍데기 — SPEAK 관리자 문법(2026-10-16, 대표: "스피크 관리자 사이트 문법 참고해서 메뉴 좌측으로")
 *   넓은 화면(≥900): 왼쪽 사이드바 248(이름 · 묶음 제목 · 메뉴 · 맨 아래 앱 설치) + 위 머리줄 56(묶음 › 화면 이름 · 이메일 · 사이트 보기 · 로그아웃)
 *   휴대폰(<900): 위 머리줄(화면 이름) + 아래 탭 막대(앞 4칸 + 더보기 — 나머지 화면 · 앱 설치 · 로그아웃). SPEAK 앱 모드와 같은 모양
 *   메뉴(.nav)는 하나를 CSS 로 바꿔 쓴다(배지 id 가 한 번만 있어야 해서). 사이드바는 fixed — 시트가 body 를 고정해도 흔들리지 않게
 * ------------------------------------------------------------------- */
:root { --side-w: 248px; --head-h: calc(52px + env(safe-area-inset-top)); --tab-h: 56px; }
@media (min-width: 900px) { :root { --head-h: 56px; } }
/* 키보드 초점이 머리줄·아래 알약 밑에 숨지 않게(WCAG 2.4.11) */
html { scroll-padding-top: calc(var(--head-h) + 8px); }
@media (max-width: 899px) { html { scroll-padding-bottom: calc(62px + max(12px, env(safe-area-inset-bottom)) + 8px); } }

.head {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: var(--head-h); padding: env(safe-area-inset-top) var(--gr) 0 var(--gl);
  background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.head__title { display: flex; align-items: center; flex-shrink: 0; min-width: 0; margin: 0; font: 700 18px/24px var(--font); letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.head__sec { display: none; flex: none; font-weight: 600; color: var(--ink-3); }
.head__sec:empty { display: none !important; }
.head__sec::after { content: "/"; content: "/" / ""; margin: 0 8px; font-weight: 400; color: var(--ink-4); }
.head__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.head__right { display: none; align-items: center; gap: 8px; min-width: 0; }
.head__right .btn { background: var(--fill); }
@media (hover: hover) { .head__right .btn:hover { background: var(--fill-2); } }
.head__email { min-width: 0; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 14px/20px var(--font); color: var(--ink-3); }

/* 휴대폰: 메뉴 = 아래에 떠 있는 유리 알약(대표 10/16: '하단 메뉴바만 유지' — 앞 판 모양 그대로) */
.side {
  position: fixed; z-index: 30; left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom)); max-width: 480px; height: 62px; margin: 0 auto; padding: 4px;
  border-radius: var(--r-full); background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); box-shadow: var(--sh-glass);
}
/* 알약 뒤로 내용이 칼로 자른 듯 끊기지 않게 */
.app::after {
  content: ""; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; pointer-events: none;
  height: calc(96px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(242, 244, 246, 0), var(--bg) 55%);
}
.side-top { display: none; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.brand::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--red); }
.nav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; height: 100%; }
.nav-sec { display: contents; }
.nav-sec-t { display: none; }
.nav__btn {
  position: relative; min-width: 0; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 0 4px; border: 0; border-radius: var(--r-full); background: none; color: var(--ink); font: 600 14px/18px var(--font);
  transition: background-color .15s var(--ease); -webkit-tap-highlight-color: transparent;
}
.nav__btn[hidden], .nav__btn.is-overflow, .nav__btn--install { display: none !important; }
.nav__btn[aria-current="page"], .nav__btn--more.is-current { background: var(--red-tint); color: var(--red-ink); font-weight: 700; }
.nav-ic { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .12s var(--ease); }
.nav__btn:active .nav-ic { transform: scale(.9); }
.nav__btn[aria-current="page"] .nav-ic { stroke-width: 2.1; }
.nav__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  position: absolute; top: 2px; left: 50%; margin-left: 6px; min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 10px;
  background: var(--red); color: #fff; font: 700 13px/1 var(--font); box-shadow: 0 0 0 2px #fff;
}
.nav__btn .badge { top: 4px; left: auto; right: max(2px, calc(50% - 30px)); margin-left: 0; }   /* '99+' 가 칸 밖으로 나가지 않게 */
/* 직원은 응원·연락으로 가는 '챙길 일' 칸을 보지 않는다 */
[data-role="member"] .quick { display: none; }

/* '더보기'(휴대폰) · 앱 설치 안내 — 내용 높이만큼 아래에서 */
.sheet.moresheet { inset: auto 0 0; height: auto;   /* 위쪽을 풀어야 내용 높이만큼만 올라온다 */ max-height: calc(100dvh - env(safe-area-inset-top) - 40px); }
.sheet.moresheet[open] { grid-template-rows: auto minmax(0, 1fr); }
.moresheet .sheet__title { -webkit-line-clamp: 1; }
.morebody { overflow-y: auto; overscroll-behavior: contain; padding: 0 0 max(16px, env(safe-area-inset-bottom)); }
.moregrp { padding: 4px var(--card-pad) 8px; }
.moregrp + .moregrp { box-shadow: inset 0 1px 0 var(--line); padding-top: 12px; }
.moregrp__t { margin: 0; padding: 0 0 4px; font: 600 14px/20px var(--font); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.morelist { display: block; margin: 0; padding: 0; list-style: none; }
.morelist__row { position: relative; display: flex; align-items: center; gap: 14px; width: calc(100% + 24px); min-height: 52px; padding: 0 12px; margin: 0 -12px;
  border: 0; border-radius: var(--r-12); background: none; color: var(--ink); font: 600 17px/24px var(--font); text-align: left; }
.morelist__row .nav-ic { color: var(--ink-2); }
.morelist__row::after { content: ""; margin-left: auto; width: 7px; height: 12px; background: var(--i-chev) center / contain no-repeat; }
.morelist__row[data-do]::after { content: none; }
.morelist__row[aria-current="page"], .morelist__row[aria-current="page"] .nav-ic { color: var(--red-ink); }
@media (hover: hover) { .morelist__row:hover { background: var(--hover); } }
.morelist__n { position: static; margin: 0 0 0 auto; box-shadow: none; }
.morelist__row:has(.morelist__n)::after { margin-left: 8px; }

.col { min-width: 0; }
.main {
  max-width: 1240px; min-width: 0; margin: 0 auto;
  padding: 16px var(--gr) calc(112px + env(safe-area-inset-bottom)) var(--gl);
}

/* ---------------------------------------------------------------------
 * 화면 공통
 * ------------------------------------------------------------------- */
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 var(--first-gap); }
.bar__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.panel__title { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }   /* 화면 이름은 머리줄(.head) — h1 은 화면 읽기·초점용 */
.bar__tools { margin-left: auto; }
.bar:not(:has(.bar__tools)) { margin: 0; }
.panel__lead { margin: -12px 0 16px; font: 500 14px/20px var(--font); color: var(--ink-3); }
.stamp { font: 500 14px/20px var(--font); color: var(--ink-3); }
.stamp time { font-weight: 600; color: var(--ink-2); }
.stamp time.is-bad { color: var(--red-ink); }
.stamp__ai { display: block; color: var(--red-ink); font-weight: 600; }
.stamp__ai[hidden] { display: none; }
.wait { padding: 24px 0; font: 500 15px/22px var(--font); color: var(--ink-3); }
.muted { font: 500 15px/22px var(--font); color: var(--ink-3); }

.inline-error {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; padding: 12px 16px;
  border-radius: 16px; background: var(--surface); color: var(--red-ink); font: 600 15px/22px var(--font);
}
.inline-error::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.empty { padding: 40px 24px; border: 0; border-radius: var(--r-card); background: var(--surface); text-align: center; font: 500 16px/24px var(--font); color: var(--ink-2); }
.empty--in { padding: 4px 0; border-radius: 0; background: none; text-align: left; font: 500 15px/22px var(--font); color: var(--ink-3); }

/* 통계 머리줄: 휴대폰에서는 두 줄(제목 + 새로고침 / 갱신 시각 + 자동) */
.bar--stats { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "stamp refresh" "auto auto"; gap: 4px 12px; align-items: center; }
.bar--stats .bar__tools { display: contents; }
.bar--stats .panel__title { grid-area: title; }
.bar--stats #stats-refresh { grid-area: refresh; justify-self: end; }
.bar--stats .stamp { grid-area: stamp; align-self: center; }
.bar--stats .switch { grid-area: auto; justify-self: start; }

.switch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 2px; border: 0; background: none; font: 600 15px/20px var(--font); color: var(--ink-2); }
.switch__track { position: relative; flex: none; width: 44px; height: 26px; border-radius: 13px; background: var(--ink-4); transition: background-color .15s var(--ease); }
.switch__knob { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--sh-thumb); transition: transform .15s var(--ease); }
.switch[aria-checked="true"] { color: var(--ink); }
.switch[aria-checked="true"] .switch__track { background: var(--red); }
.switch[aria-checked="true"] .switch__knob { transform: translateX(18px); }

/* 세그먼트(기간·연락 상태 등): 회색 통 안 흰 알 */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; padding: 3px; border-radius: var(--r-full); background: var(--seg-track); }
.seg__btn {
  position: relative; min-height: 38px; padding: 0 14px; border: 0; border-radius: var(--r-full); background: transparent;
  color: var(--ink-2); font: 600 15px/20px var(--font); white-space: nowrap;
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.seg__btn::after { content: ""; position: absolute; left: 0; right: 0; top: -3px; bottom: -3px; }
@media (hover: hover) { .seg__btn:hover { color: var(--ink); } }
.seg__btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--sh-thumb); }
.seg__btn:disabled { opacity: .38; }
.seg__btn[data-val="waiting"][aria-pressed="true"] { color: var(--red-ink); }

/* 칩: 가로로 흐르는 알약. 고른 칩 = 잉크 */
.chips { display: flex; flex-wrap: nowrap; gap: 8px; margin: 0 0 12px; padding-block: 4px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px;
  border: 0; border-radius: var(--r-full); background: var(--chip-bg); color: var(--ink);
  font: 600 15px/20px var(--font); letter-spacing: -.003em; white-space: nowrap;
}
.chip::after { content: ""; position: absolute; left: 0; right: 0; top: -2px; bottom: -2px; }
.chip:focus-visible { outline-offset: 1px; }
.chip__l { order: 1; }
.chip__n { order: 2; font-weight: 500; color: var(--ink-3); }
@media (hover: hover) { .chip:not([aria-pressed="true"]):hover { background: var(--btn-hover); } }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chip[aria-pressed="true"] .chip__n, .chip[aria-pressed="true"] .chip__n.is-hot { color: rgba(255, 255, 255, .72); font-weight: 500; }
.chip--pos { --st-c: var(--pos); } .chip--neu { --st-c: var(--neu); } .chip--neg { --st-c: var(--neg); }
.chip--pos .chip__l::before, .chip--neu .chip__l::before, .chip--neg .chip__l::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 6px 1px 0; border-radius: 50%; vertical-align: middle; background: var(--st-c);
}
.chip[aria-pressed="true"] .chip__l::before { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .9); }
.chips--news .chip__n.is-hot { color: var(--ink-2); font-weight: 600; }
.chip--todo .chip__n.is-hot { color: var(--red-ink); font-weight: 700; }
@media (max-width: 639px) {
  .chips { margin-left: calc(-1 * var(--gl)); margin-right: calc(-1 * var(--gr)); padding-left: var(--gl); }
  .chips::after { content: ""; flex: 0 0 calc(var(--gr) - 8px); }
}
@media (min-width: 640px) { .chips { flex-wrap: wrap; overflow: visible; } }

/* 찾기 칸 */
.search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 12px; }
.search input {
  width: 100%; min-width: 0; height: 48px; padding: 0 16px 0 44px; border: 0; border-radius: var(--r-12);
  background: var(--input-bg) var(--i-search) no-repeat 14px center / 20px; font: 400 16px/24px var(--font);
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px var(--focus); }
@media (min-width: 640px) { .search { max-width: 520px; } }

.listhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin: 8px 0 4px; }
.listhead:has(#news-clear:not([hidden])) #news-summary { flex-basis: 100%; }   /* 검색 중엔 요약이 한 줄을 다 쓰고 단추는 다음 줄 */
.summary { font: 500 14px/20px var(--font); color: var(--ink-3); }
.more { display: flex; justify-content: center; margin-top: 16px; }
.more .btn { min-width: 200px; }

/* ---------------------------------------------------------------------
 * 접속 통계
 * ------------------------------------------------------------------- */
.stats { transition: opacity .15s; }
.stats.is-loading { opacity: .55; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { min-width: 0; padding: 14px 12px 12px; border: 0; border-radius: var(--r-card); background: var(--surface); }
.tile__label { display: grid; gap: 8px; font: 600 14px/20px var(--font); color: var(--ink-3); }
.tile__value { margin-top: 6px; font: 700 24px/30px var(--font); letter-spacing: -.03em; white-space: nowrap; }
.tile__delta { min-height: 20px; font: 600 14px/20px var(--font); color: var(--ink-3); }
.tile__delta.is-up { color: var(--ink); }
.tile__more { display: grid; gap: 2px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font: 500 14px/20px var(--font); }
.tile__more div { display: flex; justify-content: space-between; gap: 6px; }
.tile__more dt { color: var(--ink-3); }
.tile__more dd { font-weight: 700; }
.key { display: block; flex: none; }
.tile .key { width: 18px; height: 3px; border-radius: 2px; }
.key--visits { background: var(--navy); }
.key--visitors { background: var(--blue); }
.key--cheers { background: var(--red); }
.key--line { width: 16px; height: 3px; border-radius: 2px; }
.key--rect { width: 10px; height: 10px; border-radius: 2px; }

.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.quick__btn { display: grid; gap: 2px; justify-items: start; min-width: 0; min-height: 64px; padding: 10px 12px; border: 0; border-radius: 16px; background: var(--surface); text-align: left; }
@media (hover: hover) { .quick__btn:hover { background: var(--hover); } }
.quick__n { font: 700 24px/30px var(--font); letter-spacing: -.02em; }
.quick__l { font: 600 14px/20px var(--font); color: var(--ink-3); }
.quick__btn.is-hot .quick__n { color: var(--red-ink); }
.stats > .empty { margin-top: 12px; }

.filters { display: flex; align-items: center; gap: 12px; margin: var(--sec-gap) 0 12px; }
.filters__label { flex: none; font: 600 15px/20px var(--font); color: var(--ink-3); }
.filters .seg { flex: 1; max-width: 360px; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.card { min-width: 0; padding: 20px; border: 0; border-radius: var(--r-card); background: var(--surface); }
.card__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: start; margin-bottom: 16px; }
.card__title { grid-column: 1; font: 700 17px/24px var(--font); letter-spacing: -.01em; }
.card__sub { grid-column: 1; font: 500 14px/20px var(--font); color: var(--ink-3); }
.card__toggle { grid-column: 2; grid-row: 1 / span 2; margin: -8px -8px 0 0; }
.card__note { margin-top: 12px; font: 500 14px/20px var(--font); color: var(--ink-3); }

.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 8px; font: 500 14px/20px var(--font); color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }

/* 차트(SVG) */
.plot { position: relative; min-height: 40px; touch-action: pan-y; -webkit-user-select: none; user-select: none; border-radius: 6px; }
.plot svg { display: block; max-width: 100%; overflow: visible; }
.plot .ax { font-size: 14px; fill: var(--ink-3); }
.plot .cap { font-size: 14px; font-weight: 600; fill: var(--ink); }
.plot .peak { font-size: 14px; font-weight: 700; fill: var(--ink); }
.plot .gridline { stroke: var(--line); stroke-width: 1; }
.plot .baseline { stroke: var(--line-2); stroke-width: 1; }
.plot .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.plot .ln--visits { stroke: var(--navy); }
.plot .ln--visitors { stroke: var(--blue); }
.plot .dot { stroke: #fff; stroke-width: 2; }
.plot .dot--visits { fill: var(--navy); }
.plot .dot--visitors { fill: var(--blue); }
.plot .col--cheers { fill: var(--red); }
.plot .col--visits { fill: var(--navy); }
.plot .col--visits.is-on { fill: #123a70; }
.plot .hoverband { fill: var(--fill); }
.plot .cross { stroke: var(--ink-4); stroke-width: 1; }

.tip {
  position: absolute; z-index: 5; top: 0; left: 0; pointer-events: none; min-width: 138px; padding: 10px 12px;
  border: 0; border-radius: 12px; background: var(--surface); box-shadow: var(--sh-pop);
  font: 500 14px/20px var(--font); white-space: nowrap;
}
.tip__head { margin-bottom: 2px; font-weight: 700; color: var(--ink); }
.tip__row { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.tip__row b { margin-left: auto; padding-left: 12px; color: var(--ink); font-weight: 700; }

.tablebox { margin-top: 12px; max-height: 320px; overflow: auto; border: 0; border-radius: var(--r-12); -webkit-overflow-scrolling: touch; }
.mini { width: 100%; border-collapse: collapse; font-size: 14px; }
.mini th, .mini td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mini th:first-child, .mini td:first-child { text-align: left; }
.mini thead th { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--line-2); font-weight: 600; color: var(--ink-3); }
.mini tbody tr:last-child td { border-bottom: 0; }

.bars { display: grid; gap: 12px; }
.bars__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: baseline; }
.bars__label { min-width: 0; font: 500 15px/22px var(--font); color: var(--ink-2); overflow-wrap: anywhere; }
.bars__label small { display: block; font: 500 14px/20px var(--font); color: var(--ink-3); }
.bars__val { font: 700 15px/22px var(--font); white-space: nowrap; }
.bars__val small { margin-left: 6px; font: 500 14px/20px var(--font); color: var(--ink-3); }
.bars__track { grid-column: 1 / -1; display: block; height: 6px; border: 0; border-radius: 3px; background: var(--fill-2); }
.bars__track--base { background: var(--fill-2); }
.bars__fill { display: block; height: 100%; min-width: 2px; border-radius: 3px; background: var(--navy); }
.bars__fill--cheers { background: var(--red); }
.bars__note { grid-column: 1 / -1; font: 500 14px/20px var(--font); color: var(--ink-3); }

/* ---------------------------------------------------------------------
 * 응원·연락 요청
 * ------------------------------------------------------------------- */
.cheers.is-loading, .logs.is-loading { opacity: .55; }
.cheers__head, .logs__head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* 휴대폰: 한 건이 흰 카드 한 장 */
.cheers__row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "who when" "phone phone" "call call" "msg msg" "memo del";
  gap: 14px; margin-bottom: 12px; padding: 18px 20px;
  border: 0; border-radius: var(--r-card); background: var(--surface); transition: opacity .12s;
}
.cheers__row.has-memo { grid-template-areas: "who when" "phone phone" "call call" "msg msg" "memo memo" "del del"; }
.cheers__row.has-memo .c-memo { margin-bottom: 0; }
.cheers__row.has-memo .c-del { justify-self: end; margin-top: -8px; }
.cheers__row.is-busy { opacity: .55; pointer-events: none; }
.cheers__row.is-off .who__name { color: var(--ink-3); }
.c-when { grid-area: when; text-align: right; font: 500 14px/20px var(--font); color: var(--ink-3); white-space: nowrap; padding-top: 3px; }
.c-who { grid-area: who; min-width: 0; }
.c-phone { grid-area: phone; min-width: 0; display: grid; gap: 8px; justify-items: start; }
.c-call { grid-area: call; min-width: 0; }
.c-msg { grid-area: msg; min-width: 0; }
.c-memo { grid-area: memo; min-width: 0; margin-bottom: -6px; }
.c-del { grid-area: del; align-self: end; margin: 0 -6px -6px 0; }

.who__name { display: block; font: 700 17px/24px var(--font); letter-spacing: -.01em; overflow-wrap: anywhere; }
.who__region { display: block; font: 500 15px/22px var(--font); color: var(--ink-3); overflow-wrap: anywhere; }
.who__off { display: inline-block; margin-top: 4px; }
.cell__label { display: block; margin-bottom: 6px; font: 600 14px/20px var(--font); color: var(--ink-3); }
.cell__label + .tag { margin-bottom: 2px; }

.tel {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 48px; padding: 0 18px; border: 0; border-radius: var(--r-full); background: var(--fill);
  font: 700 17px/24px var(--font); text-decoration: none; white-space: nowrap;
}
.tel:active { background: var(--fill-2); }
.tel__icon { flex: none; width: 19px; height: 19px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tel__hint { margin-left: auto; font: 600 14px/20px var(--font); color: var(--ink-3); }

.tag {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border: 0; border-radius: var(--r-8);
  background: var(--chip-bg); color: var(--ink-2); font: 600 14px/20px var(--font); white-space: nowrap;
}
.tag--pending, .tag--approved { background: var(--chip-bg); }
.tag--pending { color: var(--ink); }
.tag--approved { color: var(--ink-2); }
.tag--pending::before, .tag--approved::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag--pending::before { background: var(--red); }
.tag--closed { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-3); }
.tag--dup { background: var(--chip-bg); color: var(--ink); }
button.tag { min-height: 44px; padding: 0 12px; border-radius: var(--r-full); }

.call__pref { margin-bottom: 8px; font: 400 16px/24px var(--font); color: var(--ink); }
.c-call .seg { max-width: 340px; }
.msg__text { margin: 6px 0 10px; font: 400 16px/26px var(--font); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg__why { margin-top: 6px; font: 500 14px/20px var(--font); color: var(--ink-3); }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.memo__text { margin-bottom: 8px; padding: 10px 14px; border: 0; border-radius: var(--r-12); background: var(--fill); font: 400 16px/24px var(--font); white-space: pre-wrap; overflow-wrap: anywhere; }
.memo__box { display: block; width: 100%; min-height: 92px; margin-bottom: 8px; padding: 12px 14px; border: 0; border-radius: var(--r-12); background: var(--input-bg); font: 400 16px/24px var(--font); resize: vertical; }
.memo__box:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px var(--focus); }
.c-memo .btn--quiet { margin-left: -12px; }

/* ---------------------------------------------------------------------
 * 열람 기록
 * ------------------------------------------------------------------- */
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 8px; font: 400 16px/24px var(--font); color: var(--ink); }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--red); }

.logs { border: 0; border-radius: var(--r-card); background: var(--surface); overflow: hidden; }
.logs__row {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "act when" "detail detail" "who target";
  gap: 4px 10px; padding: 14px 20px; border-bottom: 0;
}
.logs__row + .logs__row::before { content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 1px; background: var(--line); }
.logs__row.is-count .l-act, .logs__row.is-count .l-detail { color: var(--ink-3); font-weight: 500; }
.l-when { grid-area: when; font: 500 14px/20px var(--font); color: var(--ink-3); white-space: nowrap; text-align: right; }
.l-who { grid-area: who; font: 500 14px/20px var(--font); color: var(--ink-3); overflow-wrap: anywhere; }
.l-act { grid-area: act; font: 600 16px/22px var(--font); }
.l-target { grid-area: target; font: 500 14px/20px var(--font); color: var(--ink-3); white-space: nowrap; text-align: right; }
.l-detail { grid-area: detail; font: 400 16px/24px var(--font); color: var(--ink-2); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------------
 * 확인 창, 토스트
 * ------------------------------------------------------------------- */
.dialog {
  width: min(400px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: var(--r-dialog);
  background: var(--surface); color: var(--ink); box-shadow: var(--sh-sheet);
}
.dialog::backdrop { background: var(--scrim); }
.dialog__in { padding: 24px 24px 20px; }
.dialog__title { font: 700 20px/28px var(--font); letter-spacing: -.012em; }
.dialog__body { margin-top: 8px; font: 400 16px/25px var(--font); color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.dialog__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 24px; }
#confirm-ok { background: var(--red); color: #fff; }
@media (hover: hover) { #confirm-ok:hover { background: var(--red-ink); } }

.toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 74px); transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 14px;
  background: rgba(25, 31, 40, .94); color: #fff; font: 600 15px/22px var(--font); text-align: center; box-shadow: var(--sh-pop);
}
.toast--error::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 8px 1px 0; border-radius: 50%; background: var(--red); vertical-align: middle; }

/* ---------------------------------------------------------------------
 * 너비별 배치(접속 통계·응원·열람 기록)
 * ------------------------------------------------------------------- */
@media (max-width: 359px) {
  .tile { padding: 10px 8px 8px; }
  .tile__label { min-height: 44px; align-content: start; }
  .tile__value { font-size: 20px; line-height: 26px; }
  .tile__delta { min-height: 40px; }
}
@media (min-width: 640px) {
  .tile { padding: 20px; }
  .tile__value { font-size: 40px; line-height: 46px; letter-spacing: -.032em; }
  .tiles, .quick { gap: 12px; }
  .quick__btn { display: flex; align-items: center; gap: 10px; padding: 0 16px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card--daily { grid-column: 1 / -1; }
  .bar--stats { display: flex; }
  .bar--stats .bar__tools { display: flex; flex: 1 1 auto; gap: 12px; }
  .bar--stats .stamp { margin-right: auto; }
}
@media (min-width: 760px) and (max-width: 899px), (min-width: 1024px) and (max-width: 1427px) {   /* 사이드바 248 만큼 옮김 */
  #cheers-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
  .cheers__row { margin-bottom: 0; }
}
@media (min-width: 900px) {
  /* 사이드바(SPEAK: 248 · 묶음 제목 14 · 메뉴 44 · 맨 아래 앱 설치) */
  .app::after { content: none; }
  .side {
    top: 0; right: auto; bottom: 0; left: 0; width: calc(var(--side-w) + env(safe-area-inset-left)); max-width: none; height: auto; margin: 0;
    border-radius: 0; display: flex; flex-direction: column;
    padding: 0 12px env(safe-area-inset-bottom) calc(12px + env(safe-area-inset-left)); background: var(--surface); box-shadow: 1px 0 0 var(--line);
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .side-top { display: flex; align-items: center; flex: none; height: var(--head-h); margin: 0; padding: 0 8px; box-shadow: 0 1px 0 var(--line-2); font: 700 17px/24px var(--font); letter-spacing: -.01em; color: var(--ink); }
  .nav { display: flex; height: auto; flex: 1 1 auto; min-height: 0; flex-direction: column; gap: 12px; padding: 12px 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .nav-sec { display: flex; flex-direction: column; gap: 2px; flex: none; }
  .nav-sec + .nav-sec { padding-top: 14px; box-shadow: inset 0 1px 0 var(--line); }
  .nav-sec[data-group="end"] { margin-top: auto; position: sticky; bottom: 0; background: var(--surface); }   /* 창이 낮아도 앱 설치가 늘 보이게 */
  .nav-sec[data-group="end"]:has(.nav__btn--install[hidden]) { box-shadow: none; padding-top: 0; }   /* 앱 설치가 숨으면 구분선도 */
  .nav-sec-t { display: block; margin: 0; padding: 0 12px 6px; font: 600 14px/21px var(--font); color: var(--ink-3); cursor: default; user-select: none; -webkit-user-select: none; }
  .nav__btn {
    flex: none; flex-direction: row; justify-content: flex-start; gap: 10px; width: 100%; height: 44px; padding: 0 10px 0 12px; background: none;
    border-radius: var(--r-12); color: var(--ink-2); font: 500 16px/22px var(--font); letter-spacing: -.01em; text-align: left;
    transition: background-color .15s var(--ease), color .15s var(--ease);
  }
  .nav__btn.is-overflow, .nav__btn--install { display: flex !important; }
  .nav__btn[hidden], .nav__btn--more { display: none !important; }
  .nav__btn:hover { background: var(--fill); color: var(--ink); }
  .nav__btn:focus-visible { outline-offset: -2px; }   /* .nav 가 스크롤 상자라 바깥 고리가 잘린다 */
  .nav__btn[aria-current="page"] { background: var(--red-tint); color: var(--red-ink); font-weight: 700; }
  .nav-ic { width: 20px; height: 20px; color: var(--ink-3); }
  .nav__btn:hover .nav-ic { color: var(--ink); }
  .nav__btn[aria-current="page"] .nav-ic { color: var(--red-ink); }
  .nav__label { flex: 1 1 auto; }
  .nav__btn .badge { position: static; margin: 0; box-shadow: none; }
  .col { margin-left: calc(var(--side-w) + env(safe-area-inset-left)); }
  .head { padding: 0 var(--gr) 0 var(--gutter); }   /* .col 이 이미 safe-left 만큼 밀려 있다 */
  .head__sec { display: inline; }
  .head__right { display: flex; margin-left: auto; }
  body:has(#view-app:not([hidden])) .notices { margin-left: calc(var(--side-w) + env(safe-area-inset-left)); }
  .main { padding: 24px var(--gr) 72px var(--gutter); }
  .toast { bottom: 32px; }
}
@media (min-width: 1248px) {   /* 사이드바 248 만큼 옮김(본문 936 이상) */
  .now { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 16px; }
  .now .tiles { grid-column: 1 / span 8; }
  .now .quick { grid-column: 9 / span 4; grid-row: 1; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 0; }
  .now .quick__btn { min-height: 0; }
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
  .card--daily { grid-column: 1 / span 8; grid-row: 1 / span 2; }
  .card--hourly { grid-column: 9 / span 4; grid-row: 1; }
  .card--devices { grid-column: 9 / span 4; grid-row: 2; }
  .card--funnel, .card--sections, .card--pages, .card--clicks { grid-column: span 6; }
  .card--referrers, .card--campaigns, .card--regions { grid-column: span 4; }
}
@media (min-width: 1428px) {   /* 응원 표는 본문 1,104 이상(사이드바 248 만큼 옮김) */
  .cheers { border: 0; border-radius: var(--r-card); background: var(--surface); overflow: hidden; }
  .cheers__head, .cheers__row, .cheers__row.has-memo {
    display: grid; grid-template-areas: none;
    grid-template-columns: 78px minmax(110px, .9fr) 150px 200px minmax(220px, 2.2fr) minmax(150px, 1.1fr) 60px;
    gap: 0 16px; align-items: start; padding: 14px 20px;
  }
  .cheers__head {
    position: static; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; white-space: normal;
    padding-top: 12px; padding-bottom: 12px; background: transparent; border-bottom: 1px solid var(--line-2);
    font: 600 14px/20px var(--font); color: var(--ink-3);
  }
  .cheers__row { margin: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
  .cheers__row:last-child { border-bottom: 0; }
  @media (hover: hover) { .cheers__row:hover { background: var(--hover); } }
  .cheers__row > * { grid-area: auto; }
  .c-when { text-align: left; padding-top: 2px; white-space: normal; }
  .c-when span { display: block; }
  .c-when__time { color: var(--ink); }
  .c-del, .cheers__row.has-memo .c-del { align-self: start; justify-self: auto; margin: -6px -6px 0 0; }
  .c-memo { margin-bottom: 0; }
  .cell__label { display: none; }
  .who__name { font-size: 16px; line-height: 22px; }
  .tel { width: auto; min-height: 32px; padding: 0; background: none; font-size: 16px; }
  .tel:hover .tel__num { text-decoration: underline; }
  .tel__hint { display: none; }
  .tel__icon { width: 16px; height: 16px; }
  .call__pref { font-size: 15px; margin-bottom: 6px; }
  .c-call .seg__btn { min-height: 36px; font-size: 14px; padding: 0 6px; }
  .msg__text { margin: 6px 0 8px; }
  .memo__text { font-size: 15px; }
  .cheers .btn--sm { min-height: 36px; font-size: 14px; padding: 0 12px; }
  .cheers .btn--quiet { min-height: 36px; }
  .cheers button.tag { position: relative; min-height: 30px; padding: 0 10px; font-size: 14px; }
  .cheers .btn--sm::after, .cheers .btn--quiet::after, .cheers button.tag::after, .tel::after {
    content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; margin-top: -22px;
  }

  .logs__head, .logs__row {
    display: grid; grid-template-areas: none;
    grid-template-columns: 150px minmax(160px, 240px) 130px 100px minmax(0, 1fr);
    gap: 0 16px; padding: 12px 20px; align-items: baseline;
  }
  .logs__head {
    position: static; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; white-space: normal;
    background: transparent; border-bottom: 1px solid var(--line-2); font: 600 14px/20px var(--font); color: var(--ink-3);
  }
  .logs__row > * { grid-area: auto; text-align: left; font-size: 15px; }
  .l-act { font-size: 15px; }
}

/* =====================================================================
 * 언론 보도 (news.js)
 *   모든 폭에서 760 가운데 한 열. 기사는 날짜마다 흰 카드 한 장, 행을 누르면 '자세히' 시트
 * ===================================================================== */
#panel-news { max-width: 760px; margin: 0 auto; --stick: var(--head-h); }   /* 휴대폰 칩 줄은 머리줄 바로 아래에 붙는다 */
.bar--news { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "stamp run"; column-gap: 12px; align-items: center; }
.bar--news .bar__tools { display: contents; }
.bar--news .panel__title { grid-area: title; }
#news-run { grid-area: run; }
.bar--news .stamp { grid-area: stamp; }
.news-running { display: flex; align-items: center; gap: 8px; margin: -12px 0 16px; font: 600 14px/20px var(--font); color: var(--ink-2); }
.news-running::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }

/* 알림 카드: 흰 한 줄 카드 */
.pushcard {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; min-height: 56px;
  margin: 0 0 16px; padding: 8px 8px 8px 16px; border: 0; border-radius: 16px; background: var(--surface);
}
.pushcard__icon { width: 20px; height: 20px; fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pushcard--on .pushcard__icon { stroke: var(--ink-2); }
.pushcard--warn .pushcard__icon { stroke: var(--red-ink); }
.pushcard__text { min-width: 0; }
.pushcard__title { font: 600 15px/20px var(--font); }
.pushcard__body { font: 500 14px/20px var(--font); color: var(--ink-3); }
.pushcard__steps { margin-top: 8px; padding: 0; counter-reset: st; display: grid; gap: 6px; }
.pushcard__steps li { counter-increment: st; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; font: 500 15px/22px var(--font); color: var(--ink-2); }
.pushcard__steps li::before {
  content: counter(st); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--fill); font: 700 13px/1 var(--font); color: var(--ink-2);
}
.pushcard__acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.pushcard__acts:empty { display: none; }
.pushcard__more { display: none; }
.pushcard__more::after, .rank__more::after { content: ""; flex: none; width: 12px; height: 7px; background: var(--i-down) center / contain no-repeat; transition: transform .15s var(--ease); }
.pushcard__more[aria-expanded="true"]::after, .rank__more[aria-expanded="true"]::after { transform: rotate(180deg); }
@media (min-width: 640px) { .pushcard__acts { grid-column: 3; grid-row: 1 / span 3; justify-content: flex-end; } }
@media (max-width: 639px) {
  .pushcard.is-compact .pushcard__more { display: inline-flex; grid-column: 3; grid-row: 1; }
  .pushcard.is-compact .pushcard__text { grid-column: 2; grid-row: 1; }
  .pushcard.is-compact .pushcard__acts { grid-column: 1 / -1; }
  .pushcard.is-compact:not(.is-open) .pushcard__body,
  .pushcard.is-compact:not(.is-open) .pushcard__acts { display: none; }
  .pushcard.is-compact.is-open { align-items: start; padding: 12px 8px 16px 16px; }
  .pushcard.is-compact .pushcard__stepsbtn { display: none; }
  .pushcard--ask .pushcard__acts { grid-column: 3; grid-row: 1; }
}

/* '기사·분석' 밑줄 탭 + 기간 세그먼트(한 줄, 안 들어가면 두 줄) */
.newsnav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 12px; }
#news-period { flex: none; }
@media (max-width: 639px) { #news-period .seg__btn { padding: 0 8px; } }
#news-view.seg { display: flex; gap: 20px; padding: 0; background: none; border-radius: 0; }
#news-view .seg__btn { min-height: 44px; padding: 0 8px; margin: 0 -6px; border-radius: 0; background: none; box-shadow: none; font: 600 17px/22px var(--font); letter-spacing: -.004em; color: var(--ink-3); }
#news-view .seg__btn::after { content: none; }
#news-view .seg__btn[aria-pressed="true"] { color: var(--ink); font-weight: 700; }
#news-view .seg__btn[aria-pressed="true"]::after { content: ""; position: absolute; left: 6px; right: 6px; top: auto; bottom: 4px; height: 2px; border-radius: 1px; background: var(--ink); }

/* 칩 줄 · 목록 머리 · '새 기사' 알약 */
.newsbar { position: relative; }
.newsfresh { position: absolute; left: 0; right: 0; top: 100%; z-index: 2; display: flex; justify-content: center; margin-top: 8px; pointer-events: none; }
.newsfresh .btn { pointer-events: auto; background: var(--red); color: #fff; box-shadow: var(--sh-pop); }
@media (hover: hover) { .newsfresh .btn:hover { background: var(--red-ink); } }
.newsfind, .newsback { display: none; }
#news-error { display: flex; }
#news-empty { display: grid; justify-items: center; gap: 16px; }
@media (max-width: 639px) {
  #news-list-view { display: flex; flex-direction: column; }
  #news-list-view > * { order: 2; }
  #news-list-view > .newsbar { order: -1; }
  #news-list-view > .listhead { order: 0; }
  #news-list-view > #news-search { order: 1; }
  #news-search:not(.is-open) { display: none; }
  .newsbar { position: sticky; top: var(--stick); z-index: 15; margin: 0 calc(-1 * var(--gr)) 0 calc(-1 * var(--gl)); padding: 4px 0 2px; background: var(--bg); }
  .newsbar > .chips { margin: 0; }
  .newsbar::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px; pointer-events: none; background: linear-gradient(var(--bg), rgba(242, 244, 246, 0)); }
  .newsfind { display: inline-flex; }
  .newsfind[hidden] { display: none; }
  .nw, .listhead, .nwday { scroll-margin-top: calc(var(--stick) - var(--head-h) + 56px); }   /* html scroll-padding(머리줄 + 8)에 더해짐 */
}
@media (max-width: 899px) { .newsback { display: inline-flex; } .newsback[hidden] { display: none; } }

/* 기사 행: 날짜마다 흰 카드 한 장 */
.newslist { display: block; transition: opacity .15s; }
.newslist.is-loading { opacity: .55; }
.nwday { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 32px 0 12px; padding: 0 4px; font: 700 20px/28px var(--font); letter-spacing: -.012em; }
.newslist > .nwday:first-child { margin-top: 4px; }
.nwday small { font: 500 14px/20px var(--font); letter-spacing: .01em; color: var(--ink-3); }

.nw {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 32px;
  grid-template-areas: "meta go" "title title" "sum sum" "tags tags" "cmt cmt";
  padding: 16px var(--card-pad); border: 0; border-radius: 0; background: var(--surface); transition: background-color .15s var(--ease);
}
.nwday + .nw, .newslist > .nw:first-child { border-top-left-radius: var(--r-card); border-top-right-radius: var(--r-card); }
.nw:has(+ .nwday), .newslist > .nw:last-child { border-bottom-left-radius: var(--r-card); border-bottom-right-radius: var(--r-card); }
.nw + .nw::before { content: ""; position: absolute; top: 0; left: var(--card-pad); right: var(--card-pad); height: 1px; background: var(--line); pointer-events: none; }
@media (hover: hover) {
  .nw:has(.nw__toggle:hover) { background: var(--hover); }
  .nw:has(.nw__toggle:hover)::before, .nw:has(.nw__toggle:hover) + .nw::before { opacity: 0; }
}
.nw:has(.nw__toggle:active) { background: var(--fill); }
.nw.is-busy { opacity: .55; pointer-events: none; }
.nw.is-hidden .nw__t { color: var(--ink-3); }

.nw__meta { grid-area: meta; display: flex; align-items: center; min-width: 0; white-space: nowrap; font: 500 14px/20px var(--font); letter-spacing: .01em; color: var(--ink-3); }
.nw__meta > * { flex: none; }
.nw__meta > * + *::before, .sheet__meta > * + *::before { content: "·"; margin: 0 6px; color: var(--ink-4); }
.nw__by { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nw__press { font-weight: 600; color: var(--ink-2); }
.tag--new { min-height: 0; padding: 0; background: none; color: var(--red-ink); font: 700 14px/20px var(--font); }
.tag--new::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 6px 1px 0; border-radius: 50%; background: var(--red); vertical-align: middle; }

.nw__acts { grid-area: go; align-self: start; justify-self: end; position: relative; z-index: 1; display: flex; margin: -12px -12px -12px 0; }
.nw__acts:empty { display: none; }
.nw__go { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-full); color: var(--ink-3); }
@media (hover: hover) { .nw__go:hover { background: var(--fill); color: var(--ink); } }
.nw__go .btn__icon { width: 18px; height: 18px; }

.nw__title { grid-area: title; margin-top: 6px; font: 600 17px/24px var(--font); letter-spacing: -.004em; }
.nw__toggle { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.nw__toggle::after { content: ""; position: absolute; inset: 0; }
.nw__toggle:focus-visible { outline: none; }
.nw__toggle:focus-visible::after { border-radius: 12px; box-shadow: inset 0 0 0 2px var(--focus); }
.nw__t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }

.nw__sum { grid-area: sum; margin-top: 6px; font: 500 15px/22px var(--font); letter-spacing: .0096em; color: var(--ink-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

.nw__tags { grid-area: tags; display: flex; flex-wrap: wrap; align-items: center; margin-top: 10px; font: 500 14px/20px var(--font); color: var(--ink-3); }
.nw__tags > * + *::before { content: "·"; margin: 0 6px; color: var(--ink-4); }
.nw__tags .tag { display: inline; min-height: 0; padding: 0; background: none; box-shadow: none; font: inherit; color: var(--ink-3); }
.nw__tags .tag--main { color: var(--ink); font-weight: 600; }
.nw .nw__topics { display: none; }

.nw__cmt { grid-area: cmt; display: flex; align-items: center; gap: 10px; min-width: 0; margin-top: 6px; }
.nw .nw__cmthead, .nw .nw__cmtline { min-width: 0; }
.nw .nw__cmtline { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw__cmtline { font: 500 14px/20px var(--font); color: var(--ink-3); }
.nw__cmtline b { font-weight: 600; color: var(--ink-2); }
.nw .nw__cmtnums, .nw .nw__cmtsum { display: none; }
.nw .nw__cmt .sbar { flex: 0 0 80px; }
@media (min-width: 640px) {
  .nw { grid-template-columns: minmax(0, 1fr) auto 32px; grid-template-areas: "meta meta go" "title title title" "sum sum sum" "tags cmt cmt"; }
  .nw__cmt { justify-self: end; margin-top: 10px; }
}
.nw--skel { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: none; gap: 10px; }
.skel { display: block; height: 14px; border-radius: 7px; background: var(--fill); }
.skel--40 { width: 40%; } .skel--90 { width: 90%; height: 20px; } .skel--70 { width: 70%; }

/* 성향 '점 + 글자' · 점 · 막대 */
.st { display: inline-flex; align-items: center; gap: 6px; padding: 0; background: none; border-radius: 0; box-shadow: none; font: 600 14px/20px var(--font); letter-spacing: .01em; color: var(--ink-2); white-space: nowrap; }
.st::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--st-c); }
.st--positive { --st-c: var(--pos); } .st--neutral { --st-c: var(--neu); } .st--negative { --st-c: var(--neg); }
.st--none { font-weight: 500; color: var(--ink-3); }
.st--none::before { background: none; box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.st--strong { font-weight: 700; color: var(--ink); }
.st--strong::before { width: 10px; height: 10px; }
.st__manual { font-weight: 500; color: var(--ink-3); }
.st__manual::before { content: "·"; margin-right: 6px; color: var(--ink-4); }
.kdot { display: inline-block; flex: none; width: 8px; height: 8px; margin: 0 6px 1px 0; border-radius: 50%; vertical-align: middle; }
.kdot--positive { background: var(--pos); } .kdot--neutral { background: var(--neu); } .kdot--negative { background: var(--neg); }
.kdot--pending { background: var(--pend); }
.kdot--off { background: none; box-shadow: inset 0 0 0 1.5px var(--off); }
.sbar { display: flex; gap: 2px; width: 100%; height: 8px; overflow: hidden; border-radius: var(--r-full); background: transparent; }
.sbar.is-empty { background: var(--fill-2); }
.sbar--thin { height: 6px; } .sbar--big { height: 12px; }
.sbar__s { display: block; height: 100%; min-width: 4px; }
.sbar__s--positive { background: var(--pos); } .sbar__s--neutral { background: var(--neu); }
.sbar__s--negative { background: var(--neg); } .sbar__s--pending { background: var(--pend); }

/* '자세히' 시트: 휴대폰은 아래에서, 넓은 화면은 오른쪽에 떠 있음 */
.sheet {
  width: 100%; max-width: 640px; height: calc(100dvh - env(safe-area-inset-top) - 40px); max-height: none;
  margin: auto auto 0; padding: 0; border: 0; border-radius: var(--r-sheet) var(--r-sheet) 0 0; overflow: hidden;
  background: var(--surface); color: var(--ink); box-shadow: var(--sh-sheet);
  transform: translateY(100%); transition: transform .3s var(--ease-sheet);
}
.sheet[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.sheet.is-in { transform: none; }
.sheet::backdrop { background: var(--scrim); }
.sheet__head { position: relative; padding: 22px 64px 12px var(--card-pad); border: 0; touch-action: none; }
.sheet__head::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; z-index: 1; pointer-events: none; background: linear-gradient(var(--surface), rgba(255, 255, 255, 0)); }
.sheet__grab { position: absolute; top: 6px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: rgba(60, 60, 67, .24); }
.sheet__meta { display: flex; flex-wrap: nowrap; align-items: center; white-space: nowrap; font: 500 14px/20px var(--font); color: var(--ink-3); }
.sheet__meta > * { flex: none; }
.sheet__meta > :nth-child(2) { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }   /* 기자가 여럿이면 기자 칸만 줄인다(가운뎃점이 줄 머리로 내려가던 것) */
.sheet__meta .nw__press { font-weight: 600; color: var(--ink-2); }
.sheet__title { margin-top: 4px; font: 700 20px/28px var(--font); letter-spacing: -.012em; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.sheet__close { position: absolute; top: 12px; right: 12px; width: 44px; min-height: 44px; padding: 0; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); }
.sheet__body { display: grid; gap: 28px; align-content: start; padding: 8px var(--card-pad) 32px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet.is-busy .sheet__body { opacity: .55; pointer-events: none; }
.sheet__foot { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 8px; border: 0; padding: 12px var(--card-pad) max(16px, env(safe-area-inset-bottom)); background: var(--surface); }
.sheet__foot::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 24px; pointer-events: none; background: linear-gradient(rgba(255, 255, 255, 0), var(--surface)); }
.sheet__foot .btn { min-height: 52px; font: 700 17px/22px var(--font); text-decoration: none; }
.sheet__foot .btn[hidden] { display: none; }
.sheet__foot .btn--go { background: var(--red); color: #fff; }
@media (hover: hover) { .sheet__foot .btn--go:hover { background: var(--red-ink); } }
.sheet__foot .btn--go:active { background: var(--red-press); }
.sheet > .toast { position: absolute; bottom: calc(96px + env(safe-area-inset-bottom)); }
@media (max-width: 359px) { .sheet__foot .btn { padding: 0 12px; font-size: 16px; } }
@media (min-width: 900px) {
  .sheet { width: min(560px, calc(100vw - 24px)); max-width: none; height: calc(100dvh - 24px); margin: 12px 12px 12px auto; border-radius: var(--r-dialog); transform: translateX(calc(100% + 24px)); }
  .sheet__grab { display: none; }
  .sheet__head { padding-top: 20px; }
  .sheet__foot { padding-bottom: 16px; }
  .sheet > .toast { bottom: 96px; }
}
.sheet .nw__tags, .sheet .nw__cmt, .sheet .nw__sum, .sheet .nw__meta { grid-area: auto; }
.sheet .nw__tags { margin-top: 0; }
.sheet .nw__topics { display: block; flex-basis: 100%; margin-top: 4px; color: var(--ink-3); }
.sheet .nw__topics::before { content: none; }
.nd__h { margin-bottom: 8px; font: 600 15px/20px var(--font); letter-spacing: .005em; color: var(--ink-3); }
.nd__h small { font: 500 14px/20px var(--font); color: var(--ink-3); }
.nd__p { font: 400 16px/26px var(--font); letter-spacing: .0057em; color: var(--ink); overflow-wrap: anywhere; }
.nd__note { margin: -4px 0 12px; font: 500 14px/20px var(--font); color: var(--ink-3); }
.nd > .sbar { margin: 8px 0 10px; }
.nw__cmthead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.nw__cmtnums { display: flex; flex-wrap: wrap; gap: 2px 12px; font: 500 14px/20px var(--font); color: var(--ink-2); }
.nw__cmtnums li { display: inline-flex; align-items: center; white-space: nowrap; }
.nd__link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font: 600 15px/20px var(--font); color: var(--ink-2); text-decoration: none; }
.nd__link::after { content: ""; width: 14px; height: 14px; background: var(--i-out) center / contain no-repeat; }
.nd__react { display: flex; flex-wrap: wrap; gap: 6px; }
.nd__react .tag { min-height: 28px; padding: 0 10px; border-radius: var(--r-8); background: var(--fill); font: 600 14px/20px var(--font); color: var(--ink-2); }
.nd--end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }

/* 성향 고치기: AI 가 고른 칸 = 흰 알 + 'AI' 꼬리, 사람이 고친 칸 = 흰 알 + 성향 색 테두리 */
.nd--fix .seg--stance { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row; margin-bottom: 12px; }
.seg--stance .seg__btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 8px; }
.seg--stance .seg__btn::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--st-c); }
.seg__btn--positive { --st-c: var(--pos); --st-ink: var(--pos-ink); }
.seg__btn--neutral { --st-c: var(--neu); --st-ink: var(--ink-2); }
.seg__btn--negative { --st-c: var(--neg); --st-ink: var(--neg-ink); }
.seg--stance .seg__btn.is-ai { background: var(--surface); color: var(--ink); box-shadow: var(--sh-thumb); }
.seg--stance .seg__btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--sh-thumb), inset 0 0 0 1.5px var(--st-ink); }
.ai { display: inline-flex; align-items: center; height: 18px; padding: 0 4px; border-radius: 4px; font: 700 13px/16px var(--font); color: var(--ink-2); background: var(--fill-2); }

/* 댓글: 상자 없이 행과 선 */
.ctabs { margin: 16px 0 8px; grid-auto-columns: minmax(max-content, 1fr); overflow-x: auto; scrollbar-width: none; }   /* 네 자리 수가 옆 칸과 겹치지 않게 */
.ctabs::-webkit-scrollbar { display: none; }
.ctabs .seg__btn { padding: 0 4px; font-size: 14px; }
.ctabs .seg__btn::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 5px 1px 0; border-radius: 50%; vertical-align: middle; }
.ctabs [data-k="positive"]::before { background: var(--pos); } .ctabs [data-k="neutral"]::before { background: var(--neu); }
.ctabs [data-k="negative"]::before { background: var(--neg); } .ctabs [data-k="off"]::before { box-shadow: inset 0 0 0 1.5px var(--off); }
.cgrp__note { margin: 12px 0 0; font: 500 14px/20px var(--font); color: var(--ink-3); }
.cgrp { display: block; margin: 0; padding: 0; }
.cm { padding: 14px 0; border-radius: 0; background: none; }
.cm + .cm { border-top: 1px solid var(--line); }
.cm__body { font: 400 16px/26px var(--font); white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.cm.is-full .cm__body { display: block; overflow: visible; }
.cm__meta { margin-top: 6px; font: 500 14px/20px var(--font); color: var(--ink-3); }
.cm__more { margin: 2px 0 -8px -12px; }

/* 분석 */
.nstats .wait { padding-top: 6px; }
#news-stats-body { transition: opacity .15s; }
#news-stats-body.is-loading { opacity: .55; }
.ntiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 24px; }
.ntiles .tile { padding: 20px; }
.ntiles .tile__label { display: block; font: 600 15px/20px var(--font); letter-spacing: .005em; color: var(--ink-3); }
.ntiles .tile__label small { font: 500 14px/20px var(--font); color: var(--ink-3); }
#nt-articles { margin-top: 2px; font: 700 34px/40px var(--font); letter-spacing: -.032em; color: var(--red); }
#nt-articles::after { content: "건"; margin-left: 2px; font: 500 20px/28px var(--font); letter-spacing: -.01em; color: var(--ink-3); }
.ntiles .tile--sum .tile__more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 16px; padding: 0; border: 0; }
.ntiles .tile--sum .tile__more div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; }
.ntiles .tile--sum .tile__more div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.ntiles .tile--sum .tile__more dt { font: 500 14px/20px var(--font); color: var(--ink-3); }
.ntiles .tile--sum .tile__more dd { font: 700 24px/30px var(--font); letter-spacing: -.022em; color: var(--ink); }
#nt-today::after, #nt-yesterday::after { content: "건"; }
#nt-press::after { content: "곳"; }
#nt-today::after, #nt-yesterday::after, #nt-press::after { margin-left: 2px; font: 500 15px/20px var(--font); letter-spacing: 0; color: var(--ink-3); }
.tile__basis { margin: 2px 0 12px; font: 500 14px/20px var(--font); color: var(--ink-3); }
.ntiles .tile__note { margin-top: 12px; font: 500 14px/20px var(--font); color: var(--ink-3); }
.lrows { display: block; margin-top: 12px; }
.lrow { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto 56px; align-items: center; gap: 0 8px; min-height: 44px; font: 600 16px/22px var(--font); }
.lrow + .lrow::before { content: ""; position: absolute; left: 18px; right: 0; top: 0; height: 1px; background: var(--line); }
.lrow .kdot { width: 10px; height: 10px; margin: 0; }
.lrow__n { font-weight: 700; text-align: right; }
.lrow__p { font: 500 14px/20px var(--font); color: var(--ink-3); text-align: right; }

.grid.ngrid { gap: 16px; }
@media (min-width: 640px) {
  .ntiles { grid-template-columns: 1fr 1fr; }
  .ntiles .tile--sum { grid-column: 1 / -1; }
  .grid.ngrid { grid-template-columns: 1fr 1fr; }
  .grid.ngrid .card--ndaily, .grid.ngrid .card--nhot { grid-column: 1 / -1; }
  .grid.ngrid > .card { grid-row: auto; }
}

.rank__row, .topic, .hot__row { position: relative; margin: 0 -12px; padding: 12px; border-radius: var(--r-12); }
.rank__row + .rank__row::before, .topic + .topic::before, .hot__row + .hot__row::before { content: ""; position: absolute; top: 0; left: 12px; right: 12px; height: 1px; background: var(--line); }
@media (hover: hover) {
  .rank__row:has(.rank__btn:hover), .topic:has(.topic__btn:hover), .hot__row:has(a.hot__title:hover) { background: var(--hover); }
  .rank__row:has(.rank__btn:hover)::before, .rank__row:has(.rank__btn:hover) + .rank__row::before,
  .topic:has(.topic__btn:hover)::before, .topic:has(.topic__btn:hover) + .topic::before,
  .hot__row:has(a.hot__title:hover)::before, .hot__row:has(a.hot__title:hover) + .hot__row::before { opacity: 0; }
}
.rank__row:has(.rank__btn:active), .topic:has(.topic__btn:active), .hot__row:has(a.hot__title:active) { background: var(--fill); }
.rank__btn::after, .topic__btn::after, a.hot__title::after { content: ""; position: absolute; inset: 0; }
.rank__btn:focus-visible, .topic__btn:focus-visible, a.hot__title:focus-visible { outline: none; }
.rank__btn:focus-visible::after, .topic__btn:focus-visible::after, a.hot__title:focus-visible::after { border-radius: 12px; box-shadow: inset 0 0 0 2px var(--focus); }

.rank { display: block; }
.rank__row { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px 12px; gap: 6px 12px; align-items: baseline; }
.rank__row::after { content: ""; grid-column: 4; grid-row: 1; align-self: center; width: 7px; height: 12px; background: var(--i-chev) center / contain no-repeat; }
.rank__name { min-width: 0; font: 600 16px/22px var(--font); overflow-wrap: anywhere; }
.rank__name small { margin-left: 6px; font: 500 14px/20px var(--font); color: var(--ink-3); }
.rank__btn { min-height: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; text-decoration: none; }
.rank__n { font: 700 16px/22px var(--font); white-space: nowrap; }
.rank__avg { font: 600 14px/20px var(--font); color: var(--ink-3); text-align: right; }
.rank__avg.is-pos { color: var(--pos-ink); }
.rank__avg.is-neg { color: var(--neg-ink); font-weight: 700; }
.rank__bar { grid-column: 1 / 4; display: block; }
.rank__bar .sbar { height: 6px; }
.rank__last { grid-column: 1 / 4; font: 500 14px/20px var(--font); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank__more { display: none; gap: 6px; }

.topics { display: block; }
.topic { display: grid; grid-template-columns: minmax(0, 1fr) auto 12px; grid-template-areas: "name n chev" "mix mix chev"; gap: 2px 12px; align-items: baseline; min-height: 48px; background: none; }
.topic::after { content: ""; grid-area: chev; align-self: center; width: 7px; height: 12px; background: var(--i-chev) center / contain no-repeat; }
.topic__btn { grid-area: name; justify-self: start; min-height: 0; padding: 0; border: 0; background: none; color: inherit; font: 600 16px/22px var(--font); text-align: left; overflow-wrap: anywhere; }
.topic__n { grid-area: n; font: 700 16px/22px var(--font); }
.topic__mix { grid-area: mix; font: 500 14px/20px var(--font); color: var(--ink-3); }
.topic__mix:empty { display: none; }

.hot { display: block; }
.hot__row { display: grid; grid-template-columns: minmax(52px, max-content) minmax(0, 1fr); gap: 12px; align-items: start; }
.hot__n { font: 700 20px/26px var(--font); letter-spacing: -.02em; text-align: left; white-space: nowrap; }
.hot__n::after { content: "댓글"; display: block; font: 500 14px/20px var(--font); letter-spacing: 0; color: var(--ink-3); }
.hot__main { display: grid; gap: 4px; min-width: 0; }
.hot__title { font: 600 16px/24px var(--font); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.hot__meta, .hot__meta .st { font: 500 14px/20px var(--font); color: var(--ink-3); }

.kv { display: block; }
.kv div { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 12px 0; font: 500 15px/22px var(--font); }
.kv div + div { border-top: 1px solid var(--line); }
.kv dt { flex: none; color: var(--ink-3); white-space: nowrap; }
.kv dd { font-weight: 600; text-align: right; }
.ns__err { margin-top: 12px; padding: 0; background: none; color: var(--red-ink); font: 500 14px/20px var(--font); overflow-wrap: anywhere; }
.ns__err::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 6px 2px 0; border-radius: 50%; background: var(--red); }

.plot .col--positive { fill: var(--pos); } .plot .col--neutral { fill: var(--neu); }
.plot .col--negative { fill: var(--neg); } .plot .col--pending { fill: var(--pend); }
#nd-plot .col { stroke: var(--surface); stroke-width: 1px; }
#nd-plot .is-dense .col { stroke: none; }

/* 폰: 순위는 5개(주제 8개)만 먼저 */
@media (max-width: 639px) {
  .rank__more { display: flex; }
  .rank.is-capped > li:nth-child(n+6), .topics.is-capped > li:nth-child(n+9) { display: none; }
  .rank__last { display: none; }
}

/* ---------------------------------------------------------------------
 * 통계 › 볼 사이트 고르기 · 신고센터(ppr.js)
 * ------------------------------------------------------------------- */
.sitepick { max-width: 360px; margin: 0 0 20px; }
.sitepick .seg__btn { min-height: 40px; }
#panel-stats[data-site="ppr"] > :not(.sitepick):not(#ppr-view) { display: none !important; }
.ppr-card {
  display: grid; justify-items: start; gap: 12px; max-width: 480px; margin: 8px 0 0; padding: 28px 24px 24px;
  border-radius: var(--r-card); background: var(--surface);
}
.ppr-card__ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-12); background: var(--red-tint); color: var(--red-ink); }
.ppr-card__t { margin: 4px 0 0; font: 700 20px/28px var(--font); letter-spacing: -.02em; color: var(--ink); }
.ppr-card__d { margin: 0; font: 500 15px/23px var(--font); color: var(--ink-2); word-break: keep-all; }
.ppr-form { display: grid; gap: 14px; width: 100%; margin-top: 8px; }
.ppr-form input { background: var(--fill); }
.ppr-form input[readonly] { height: auto; padding: 0; background: none; font: 600 17px/24px var(--font); color: var(--ink); }   /* 계정은 글자로(비밀번호 관리자가 짝을 찾게 input 은 남김) */
.ppr-form input[readonly]:focus-visible { box-shadow: none; }
.ppr-form .btn--primary { width: 100%; min-height: 48px; margin-top: 4px; }
#ppr-open { margin-top: 4px; background: var(--fill); }   /* 흰 카드 위 단추 */
.ppr-note { margin: 0 0 12px; padding: 12px 16px; border-radius: var(--r-12); background: var(--red-tint); font: 500 15px/22px var(--font); color: var(--ink); word-break: keep-all; }
.ppr-frame {
  display: block; width: 100%; height: calc(100dvh - var(--head-h) - 112px); min-height: 480px; border: 0;
  border-radius: var(--r-card); background: var(--surface);
}
.ppr-frame[hidden] { display: none; }
@media (max-width: 899px) {
  .sitepick { max-width: none; margin-bottom: 16px; }
  .ppr-card { max-width: none; padding: 24px 20px 20px; }
  .ppr-frame { height: calc(100dvh - var(--head-h) - 92px - 62px - max(12px, env(safe-area-inset-bottom)) - 16px); min-height: 420px; }   /* 아래 알약에 안 걸리게 */
}

/* ---------------------------------------------------------------------
 * 고대비 · 움직임 줄이기 · 인쇄
 * ------------------------------------------------------------------- */
@media (forced-colors: active) {
  .btn, .chip, .seg__btn, .nav__btn, .nw__go, .tel, .search input, .field input, .memo__box { outline: 1px solid ButtonText; outline-offset: -1px; }
  .chip[aria-pressed="true"], .seg__btn[aria-pressed="true"], .seg__btn.is-ai, .nav__btn[aria-current="page"], .nav__btn--more.is-current { outline-width: 3px; }
  .card, .tile, .pushcard, .empty, .logs, .cheers__row, .sheet, .dialog, .nwday + .nw { outline: 1px solid CanvasText; }
  .sbar, .kdot, .st::before, .chip__l::before, .seg--stance .seg__btn::before, .ctabs .seg__btn::before { forced-color-adjust: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .btn:active { transform: none; }
}
@media print {
  .side, .head__right, .toast, .notices, .app::after { display: none; }
  .head { position: static; height: auto; padding: 0 0 12px; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .head__sec { display: inline; }
  .col { margin-left: 0; }
  .main { padding: 0; }
}

/* ---------------------------------------------------------------------
 * 휴대폰 다듬기(2026-10-15 실측 점검 wf_008feb5f-5e3)
 * ------------------------------------------------------------------- */
/* 숫자는 어디서나 고정 폭(tabular-nums) — 요소마다 font 단축 속성이 body 값을 되돌리던 것 */
*, *::before, *::after { font-variant-numeric: tabular-nums !important; }
@media (max-width: 639px) {
  /* 칩 줄 오른쪽 끝을 흐리게 — 뒤에 칩이 더 있다는 표시 */
  .newsbar > .chips, #cheers-filters {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  }
  /* 응원·연락: 할 일 칩(연락 대기·글 확인 대기)을 앞으로 */
  #cheers-filters .chip { order: 2; }
  #cheers-filters .chip[data-filter="all"] { order: 0; }
  #cheers-filters .chip--todo { order: 1; }
  #cheers-filters::after { order: 3; }   /* 줄 끝 여백이 '전체' 뒤로 끼어들던 것 */
  /* 열람 기록: 관리자·IP 를 한 줄 전체로(긴 이메일 + IPv6 가 가운데서 끊기던 것) */
  .logs__row { grid-template-areas: "act when" "detail detail" "who who" "target target"; }
  .l-target { text-align: left; }
}
/* 알림 카드 '방법 보기'를 펼치면 글이 오른쪽 칸까지 쓴다 */
.pushcard.is-compact.is-open .pushcard__text { grid-column: 2 / -1; }
.pushcard.is-compact.is-open .pushcard__title { padding-right: 76px; }
@media (max-width: 389px) { .mini th, .mini td { padding: 8px 6px; } }   /* '표로 보기' 4열이 360 에서 잘리던 것 */
@media (max-width: 359px) { .tel__hint { display: none; } }              /* 전화 알약이 320 에서 넘치던 것 */

/* 앱 설치 따라 하기 시트(아이폰·삼성 인터넷) — 단추는 사이드바 맨 아래·휴대폰 '더보기' 안 */
.installsteps { display: grid; gap: 4px; margin: 0; padding: 4px var(--card-pad) max(24px, env(safe-area-inset-bottom)); list-style: none; }
.installsteps li { display: flex; align-items: center; gap: 14px; min-height: 52px; font: 600 17px/24px var(--font); color: var(--ink); }
.installsteps__n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--red-tint); color: var(--red-ink); font: 700 15px/1 var(--font); }

/* 시간대별 방문: 날짜 고르기(2026-10-15) */
.daypick { display: flex; align-items: center; gap: 8px; margin: -4px 0 16px; }
.daypick__step {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: var(--r-full); background: var(--chip-bg); color: var(--ink); cursor: pointer;
}
.daypick__step svg { width: 20px; height: 20px; }
.daypick__step:disabled { opacity: .3; cursor: default; }
@media (hover: hover) { .daypick__step:not(:disabled):hover { background: var(--btn-hover); } }
.daypick__sel {
  flex: 1 1 auto; min-width: 0; max-width: 240px; height: 44px; padding: 0 36px 0 16px;
  border: 0; border-radius: var(--r-full); background: var(--chip-bg) var(--i-down) no-repeat right 16px center / 12px 7px;
  color: var(--ink); font: 600 16px/20px var(--font); -webkit-appearance: none; appearance: none; cursor: pointer;
}

/* 언론 보도 사진·댓글(2026-10-15): 네이버 뉴스 사진 서버의 대표 사진을 그대로 띄움, 댓글은 네이버처럼 순공감·최신 목록 */
.nw.has-img { grid-template-columns: minmax(0, 1fr) 64px 32px; grid-template-areas: "meta meta go" "title thumb thumb" "sum thumb thumb" "tags tags tags" "cmt cmt cmt"; column-gap: 12px; }
.nw__thumb { grid-area: thumb; align-self: start; width: 100%; aspect-ratio: 4 / 3; margin-top: 8px; border-radius: 10px; object-fit: cover; background: var(--fill); }
.nd__photo { margin: 0 0 16px; }
.nd__img { display: block; width: 100%; max-height: 360px; border-radius: 14px; object-fit: cover; background: var(--fill); }
.nd__photo figcaption { margin-top: 6px; font: 500 13px/18px var(--font); color: var(--ink-3); }
.cmbox { margin-top: 16px; }
.cmsort { max-width: 240px; margin-bottom: 10px; }
.cmchips { margin: 0 0 4px; }
.cmchips .chip .kdot { margin-right: 2px; }
.cmlist .cm { padding: 14px 0; outline: none; }
.cm__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; font: 600 14px/20px var(--font); color: var(--ink-2); }
.cm__when { font-weight: 500; color: var(--ink-3); }
.cm__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; font: 500 14px/20px var(--font); color: var(--ink-3); }
.cm__st { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink-2); }
.cm__next { margin-top: 8px; }
.cm__pending { margin: 10px 0 0; }
#news-sheet-body { grid-template-columns: minmax(0, 1fr); }   /* 댓글 칩 줄·사진이 시트 폭을 넓히지 않게 */
