/* 기본 · 레이아웃 · 공통 부품 (헤더 · 푸터 · 버튼 · 카드 · 섹션 제목) */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
:lang(ja), :lang(zh) { word-break: normal; line-break: strict; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 레이아웃 ---------- */
.container { width: 100%; max-width: calc(var(--w-container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.with-rail { display: grid; grid-template-columns: minmax(0, var(--w-main)) var(--w-rail); gap: 56px; justify-content: space-between; }
@media (max-width: 1100px) { .with-rail { grid-template-columns: 1fr; } }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1023px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- 글자 ---------- */
.t-display { font-size: var(--fs-display); font-weight: 700; line-height: 1.25; margin: 0; }
.t-h1 { font-size: var(--fs-h1); font-weight: 700; line-height: 1.3; margin: 0; }
.t-h2 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.35; margin: 0; }
.t-h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.4; margin: 0; }
.t-h4 { font-size: var(--fs-h4); font-weight: 500; line-height: 1.5; margin: 0; }
.t-body-s { font-size: var(--fs-body-s); }
.t-ui { font-size: var(--fs-ui); font-weight: 500; }
.t-caption { font-size: var(--fs-caption); color: var(--text-secondary); }
.t-label { font-size: var(--fs-label); font-weight: 700; letter-spacing: .02em; color: var(--text-accent); }
.t-opinion { font-family: var(--font-serif); font-size: var(--fs-opinion); font-weight: 700; line-height: 1.45; margin: 0; }
.t-quote { font-family: var(--font-serif); font-size: var(--fs-quote); font-weight: 700; line-height: 1.45; margin: 0; }
.muted { color: var(--text-secondary); }

/* ---------- 버튼 (피그마 Button: Primary / Secondary / Danger / Danger Solid × M / L) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 10px 16px; border-radius: var(--radius);
  font-size: var(--fs-ui); font-weight: 500; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-l { min-height: 52px; padding: 13px 20px; font-size: var(--fs-h4); }
.btn-primary { background: var(--brand-navy); color: var(--text-on-dark); }
.btn-secondary { background: transparent; border-color: var(--border-strong); color: var(--text-primary); }
.btn-danger { background: transparent; border-color: var(--state-danger); color: var(--state-danger); }
.btn-danger-solid { background: var(--state-danger); color: var(--text-on-dark); }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--brand-gold); outline-offset: 2px; }

/* ---------- 헤더 (와이어프레임 01: 로고 · 메뉴 · 도구 한 줄 + 2차 메뉴 짙은 띠) ---------- */
.site-header { background: var(--bg-page); border-bottom: 3px solid var(--brand-navy); }
.site-header.has-sub { border-bottom: 0; }
.site-header__bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: var(--bar-gap); min-height: 76px; }
.site-header { --brand-w: 232px; --bar-gap: 24px; }
.site-header__brand { padding: 14px 0; min-width: var(--brand-w); }
.logo { font-family: var(--font-serif); font-weight: 700; font-size: 30px; line-height: 1.1; letter-spacing: -.01em; white-space: nowrap; }
.logo-tagline { display: block; font-size: 10.5px; color: var(--text-secondary); margin-top: 4px; white-space: nowrap; }
.site-header__nav { display: flex; align-items: stretch; justify-content: flex-start; gap: 16px; align-self: stretch; overflow-x: auto; scrollbar-width: none; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.site-header__nav::-webkit-scrollbar { display: none; }
.site-header__nav a { flex: none; position: relative; display: flex; align-items: center; white-space: nowrap; color: var(--text-primary); }
.site-header a:hover, .subbar a:hover { text-decoration: none; }
/* 메뉴 밑줄: 굵은 금색 막대 (헤더 아래 선에 붙어요). 지금 화면은 늘 켜져 있고, 다른 메뉴는 마우스를 올리면 나와요. */
.site-header__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--brand-gold); transform: scaleX(0); transition: transform .18s ease; }
.site-header__nav a:hover::after, .site-header__nav a:focus-visible::after, .site-header__nav a.is-on::after { transform: scaleX(1); }
.subbar a { position: relative; }
.subbar a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--brand-gold); transform: scaleX(0); transition: transform .18s ease; }
.subbar a:hover::after, .subbar a:focus-visible::after, .subbar a.is-on::after { transform: scaleX(1); }
/* 다른 메뉴에 마우스를 올리면 지금 화면 막대는 잠시 사라져요 (막대가 하나만 보이게) */
.site-header__nav:has(a:hover) a.is-on:not(:hover)::after, .subbar__in:has(a:hover) a.is-on:not(:hover)::after { transform: scaleX(0); }
.site-header__actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; font-size: var(--fs-ui); flex-wrap: nowrap; }
.site-header__actions > *, .me-chip { white-space: nowrap; }
.hdr-link { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 4px 0; color: var(--text-primary); font: inherit; cursor: pointer; }
.hdr-link .i { width: 16px; height: 16px; }
.site-header__actions .btn { padding: 8px 16px; min-height: 0; font-size: var(--fs-ui); }
.show-tablet { display: none; }
/* 검색 · 알림 글자는 메뉴가 두 줄일 때만 (한 줄일 땐 자리가 모자라 아이콘만) */
.hdr-txt { display: none; }
.nav-live { color: var(--brand-gold) !important; gap: 6px; }
.nav-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-gold); }
.icon-btn { background: none; border: 0; padding: 4px; cursor: pointer; display: inline-flex; color: inherit; }

/* 2차 메뉴: 화면 끝까지 짙은 남색 띠. 첫 칸은 위 메뉴 첫 칸(정치)과 같은 자리에서 시작해요 */
.site-header--inline .subbar__in { padding-left: calc(var(--gutter) + var(--brand-w) + var(--bar-gap)); }
.subbar { background: var(--brand-navy); color: var(--text-on-dark); }
.subbar__in { display: flex; justify-content: flex-start; gap: 28px; min-height: 48px; align-items: stretch; font-size: 14px; overflow-x: auto; scrollbar-width: none; }
.subbar__in::-webkit-scrollbar { display: none; }
.subbar a { flex: none; display: flex; align-items: center; white-space: nowrap; color: #fff; padding: 0; }
.subbar a:hover { color: var(--text-on-dark); }
.subbar a.is-on { color: var(--text-on-dark); font-weight: 700; }

/* 한 줄 헤더에서는 로그인한 독자를 동그란 사진만 (별명 · 띠는 마이페이지에서) */
@media (min-width: 1280px) { .site-header--inline .me-chip > .hide-mobile { display: none; } }
/* 두 줄 헤더 (로고 · 도구 / 메뉴): 1280px 아래, 그리고 메뉴 이름이 긴 영어 · 일본어 · 중국어 화면 */
.site-header--stack .site-header__bar { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "brand actions" "nav nav"; row-gap: 0; }
.site-header--stack .site-header__brand { grid-area: brand; }
.site-header--stack .site-header__actions { grid-area: actions; }
.site-header--stack .site-header__nav { grid-area: nav; min-height: 44px; border-top: 1px solid var(--border-default); }
.site-header--stack .subbar__in { justify-content: flex-start; }
.site-header--stack .hdr-txt { display: inline; }
@media (max-width: 1279px) {
  .site-header .site-header__bar { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "brand actions" "nav nav"; row-gap: 0; }
  .site-header .site-header__brand { grid-area: brand; }
  .site-header .site-header__actions { grid-area: actions; }
  .site-header .site-header__nav { grid-area: nav; min-height: 44px; border-top: 1px solid var(--border-default); }
  .site-header .subbar__in { justify-content: flex-start; }
  .site-header--inline .subbar__in { padding-left: var(--gutter); }
  .site-header .hdr-txt { display: inline; }
  .show-tablet { display: inline-flex; }
  .hide-tablet { display: none; }
}
/* 클래식 헤더 (처음 디자인): 왼쪽 날짜 · 가운데 큰 로고 · 오른쪽 도구 / 아래 가운데 메뉴. 1024px 아래는 두 줄 헤더와 같아요 */
.site-header__meta { display: none; font-size: var(--fs-caption); color: var(--text-secondary); line-height: 1.5; }
@media (min-width: 1024px) {
  .site-header--classic .site-header__bar { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "meta brand actions" "nav nav nav"; row-gap: 0; padding-top: 12px; }
  .site-header--classic .site-header__meta { display: block; grid-area: meta; }
  .site-header--classic .site-header__brand { grid-area: brand; text-align: center; min-width: 0; padding: 10px 0 14px; }
  .site-header--classic .logo { font-size: 40px; }
  .site-header--classic .logo-tagline { font-size: var(--fs-label); }
  .site-header--classic .site-header__actions { grid-area: actions; }
  .site-header--classic .site-header__nav { grid-area: nav; justify-content: center; gap: 28px; min-height: 52px; font-size: 16px; font-weight: 500; border-top: 0; }
  .site-header--classic .subbar__in { justify-content: center; padding-left: var(--gutter); }
  .site-header--classic .hdr-txt { display: none; }
}
@media (max-width: 767px) {
  .site-header__bar { min-height: 0; }
  .site-header__brand { padding: 10px 0; }
  .logo { font-size: 24px; }
  .logo-tagline { display: none; }
  .site-header__nav { gap: 18px; font-size: 15px; }
  .site-header__actions { gap: 10px; }
  .site-header__actions .hide-mobile { display: none; }
  .theme-pop { display: none; }
  .site-header .hdr-txt { display: none; }
  .subbar__in { gap: 20px; }
}

.site-header .live-strip { border-bottom: 0; }
.live-strip { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-default); font-size: var(--fs-ui); }
.live-strip__badge { white-space: nowrap; flex: none; background: var(--brand-gold); color: var(--text-primary); font-size: var(--fs-label); font-weight: 700; padding: 3px 8px; border-radius: var(--radius); }
.live-strip__meta { margin-left: auto; color: var(--text-secondary); white-space: nowrap; }
@media (max-width: 767px) { .live-strip__meta { display: none; } }

/* ---------- 섹션 제목 (모듈 24) ---------- */
.section-title { display: flex; align-items: center; gap: 16px; border-top: 3px solid var(--brand-navy); padding-top: 12px; margin-bottom: 20px; }
.section-title h2 { flex: 1; }
.section-title a { font-size: var(--fs-ui); color: var(--text-secondary); }

/* ---------- 카드 ---------- */
.card { display: flex; flex-direction: column; gap: 8px; }
.card__img { aspect-ratio: 16 / 9; background: var(--bg-sunken); border-radius: var(--radius); }
.card__title { margin: 0; }
.card__meta { font-size: var(--fs-caption); color: var(--text-secondary); }
.row-thumb { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border-default); }
.row-thumb__text { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.row-thumb__img { width: 120px; height: 80px; flex: none; background: var(--bg-sunken); border-radius: var(--radius); }
.row-title { padding: 12px 0; border-bottom: 1px solid var(--border-default); }

/* ---------- 푸터 ---------- */
.site-footer { margin-top: 80px; border-top: 3px solid var(--brand-navy); padding: 40px 0; }
.site-footer .logo { font-size: 28px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 16px 0; font-size: var(--fs-caption); }
.site-footer__links a.is-legal { font-weight: 700; }
.site-footer__links a.is-on { font-weight: 700; color: var(--text-primary); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--brand-gold); text-underline-offset: 5px; }
.site-footer__legal { font-size: var(--fs-caption); color: var(--text-tertiary); line-height: 1.8; }

/* ---------- 아이콘 (static/icons.svg) ---------- */
.i { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.with-icon { display: inline-flex; align-items: center; gap: 4px; }
.with-icon .i { width: 16px; height: 16px; vertical-align: 0; }
.lang { display: inline-flex; align-items: center; gap: 4px; }
.lang .i { width: 16px; height: 16px; }
.mv__dur .i, .t-caption .i { width: 12px; height: 12px; vertical-align: -1px; }

/* 사이트 공지 띠 (관리자 48) */
.notice-banner { background: var(--brand-navy); color: var(--text-on-dark); text-align: center; font-size: var(--fs-ui); padding: 8px var(--gutter); }

/* ── 회원 공통 (머리글 · 댓글 · 프로필) ── */
/* 띠 */
/* 띠 배지 — 피그마 02 컴포넌트 "Belt": 모서리 4 · 연한 바탕 · 18×6 띠 막대(모서리 1, 0.5 테두리) · 굵은 11px 글자 */
.belt { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 6px; border-radius: 4px; font-size: 11px; line-height: 15px; font-weight: 700; background: var(--bg-paper); color: var(--text-primary); white-space: nowrap; vertical-align: middle; letter-spacing: 0; }
.belt::before { content: ""; flex: none; width: 18px; height: 6px; border-radius: 1px; background: var(--belt-c, var(--border-strong)); box-shadow: inset 0 0 0 .5px #d9d9d9; }
.belt--novice::before { display: none; }
.belt--novice { padding-left: 8px; }
.belt--white { --belt-c: var(--belt-white); }
.belt--yellow { --belt-c: var(--belt-yellow); }
.belt--green { --belt-c: var(--belt-green); }
.belt--blue { --belt-c: var(--belt-blue); }
.belt--red { --belt-c: var(--belt-red); }
.belt--black { --belt-c: var(--belt-black); }
.belt--s { padding: 1px 6px 1px 5px; gap: 4px; font-size: 10.5px; line-height: 14px; }
.belt--s::before { width: 14px; height: 5px; }
.sub-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand-gold); color: var(--brand-navy); }

/* 헤더 내 정보 */
.me-chip { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-ui); }
.me-chip:hover { text-decoration: none; }
.me-chip__avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-navy); color: var(--text-on-dark); display: grid; place-items: center; font-weight: 700; overflow: hidden; }
.me-chip__avatar img { width: 100%; height: 100%; object-fit: cover; }


/* ── 7단계: 언어 고르기 · 화면 밝기 (작은 펼침 메뉴) ── */
.pop { position: relative; }
.pop > summary { list-style: none; cursor: pointer; }
.pop > summary::-webkit-details-marker { display: none; }
.pop__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 140px; padding: 6px; background: var(--bg-paper); border: 1px solid var(--border-default); border-radius: 8px; box-shadow: 0 8px 24px rgb(0 0 0 / .14); display: grid; gap: 2px; }
.pop__menu a, .pop__menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; font: inherit; font-size: 14px; color: var(--text-primary); background: none; border: 0; cursor: pointer; text-decoration: none; white-space: nowrap; }
.pop__menu a:hover, .pop__menu button:hover { background: var(--bg-sunken); }
.pop__menu [aria-checked="true"] { font-weight: 700; color: var(--text-accent); }
.theme-ic { display: inline-flex; }
.theme-ic--dark { display: none; }
:root[data-theme="dark"] .theme-ic--light { display: none; }
:root[data-theme="dark"] .theme-ic--dark { display: inline-flex; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-ic--light { display: none; }
  :root:not([data-theme="light"]) .theme-ic--dark { display: inline-flex; }
}
/* 사진은 어두운 화면에서 살짝 낮춰요 */
:root[data-theme="dark"] img:not([src$=".svg"]) { filter: brightness(.92); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img:not([src$=".svg"]) { filter: brightness(.92); } }

/* 번역 안내 띠 */
.tr-banner { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin: 0 0 20px; padding: 10px 14px; border-radius: 8px; background: var(--state-info-soft); color: var(--text-primary); font-size: 14px; }
.tr-banner--reviewed { background: var(--state-success-soft); }
.tr-banner a, .tr-banner button { color: var(--text-link); font-weight: 500; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.tr-banner button[disabled] { opacity: .6; cursor: wait; }
.tr-wrap { max-width: 744px; margin: 16px auto 0; padding: 0 16px; }

/* 8단계: 팩트체크 라벨 · 정정 */
.fact-badge { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 12px; padding: 10px 14px; border-left: 4px solid var(--fact-c, var(--fact-pending)); background: var(--bg-paper); font-size: 14px; }
.fact-badge strong { color: var(--fact-c); }
.fact-badge__k { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--text-secondary); text-transform: uppercase; }
.fact-badge__note { color: var(--text-secondary); flex: 1 1 260px; }
.fact-badge a { margin-left: auto; color: var(--text-link); text-decoration: none; }
.fact-badge--true { --fact-c: var(--fact-true); } .fact-badge--mostly { --fact-c: var(--fact-mostly); } .fact-badge--disputed { --fact-c: var(--fact-disputed); } .fact-badge--false { --fact-c: var(--fact-false); } .fact-badge--pending { --fact-c: var(--fact-pending); }
.fact-chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 3px; color: #fff; background: var(--fact-c, var(--fact-pending)); vertical-align: middle; }
.fact-chip--true { --fact-c: var(--fact-true); } .fact-chip--mostly { --fact-c: var(--fact-mostly); } .fact-chip--disputed { --fact-c: var(--fact-disputed); } .fact-chip--false { --fact-c: var(--fact-false); } .fact-chip--pending { --fact-c: var(--fact-pending); }
.correction-note { margin: 0 0 12px; padding: 12px 14px; background: var(--state-warning-soft); border-left: 4px solid var(--state-warning); font-size: 14px; }
.correction-note p { margin: 4px 0 0; }
/* 언어가 길어도 헤더 오른쪽이 줄바꿈되지 않게 */
.me-chip > .hide-mobile:not(.belt) { max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .site-header__actions .btn { padding-left: 10px; padding-right: 10px; } }
@media (max-width: 1360px) { .me-chip .belt { display: none; } .me-chip > .hide-mobile:not(.belt) { max-width: 6em; } }

/* 기자 이름 → 기자 페이지 */
.byline-link { color: inherit; font-weight: 600; text-decoration: none; }
.byline-link:hover { text-decoration: underline; text-underline-offset: 3px; }
a.avatar { text-decoration: none; }

/* 큰 검색창 (검색 화면 · 404) */
.bigsearch { display: flex; align-items: stretch; width: 100%; max-width: 680px; height: 64px; border: 2px solid var(--brand-navy); border-radius: 12px; background: var(--bg-page); overflow: hidden; transition: box-shadow .15s ease; }
.bigsearch:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-gold) 35%, transparent); }
.bigsearch__icon { display: flex; align-items: center; padding: 0 4px 0 20px; color: var(--text-secondary); }
.bigsearch__icon .i { width: 22px; height: 22px; }
.bigsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: 18px; padding: 0 14px; }
.bigsearch input::placeholder { color: var(--text-tertiary); }
.bigsearch button { flex: none; border: 0; padding: 0 28px; background: var(--brand-navy); color: var(--text-on-dark); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.bigsearch button:hover { background: var(--brand-navy-soft); }
@media (max-width: 767px) { .bigsearch { height: 56px; } .bigsearch input { font-size: 16px; } .bigsearch button { padding: 0 18px; } .bigsearch__icon { padding-left: 14px; } }

/* 잠깐 뜨는 알림 (링크 복사 등) */
.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 100; background: var(--brand-navy); color: var(--text-on-dark); padding: 10px 18px; border-radius: 8px; font-size: 14px; box-shadow: 0 8px 24px rgb(0 0 0 / .2); }

/* 띠 그림 (피그마 "띠 세트") — 색은 띠마다, 모양은 member.rs belt_svg / site.js PXBelt */
.beltsvg { display: block; width: 100%; height: auto; overflow: visible; }
.beltsvg .b { fill: var(--bf); stroke: var(--bs); stroke-width: 1.5; stroke-linejoin: round; }
.beltsvg .sh { fill: var(--bs); opacity: .25; }
.beltsvg .f { fill: none; stroke: var(--bs); stroke-width: 1.5; opacity: .5; }
.beltsvg .d { fill: #d4b04a; }
.beltsvg--novice .b { fill: var(--bg-page); stroke: #9aa0a6; stroke-width: 2; stroke-dasharray: 4 3; }
.beltsvg--novice .sh, .beltsvg--novice .f { display: none; }
.beltsvg--white { --bf: #f4f3ee; --bs: #bdbab0; }
.beltsvg--yellow { --bf: #e8c547; --bs: #b8962a; }
.beltsvg--green { --bf: #3e8e5a; --bs: #2b6640; }
.beltsvg--blue { --bf: #2f64b0; --bs: #1f4682; }
.beltsvg--red { --bf: #c0392b; --bs: #8e2a20; }
.beltsvg--black { --bf: #1e1e1e; --bs: #000; }
:root[data-theme="dark"] .beltsvg--black { --bs: #5a5a5a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .beltsvg--black { --bs: #5a5a5a; } }

/* ───────── 🔔 알림 작은 창 (헤더) ───────── */
.bell-pop > summary { position: relative; }
.bell-n { display: inline-block; margin-left: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand-gold); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; vertical-align: 1px; }
.bell-n[hidden] { display: none; }
.bell-pop[open] > summary { color: var(--brand-gold); }
.pop__menu.bell-menu { background: var(--bg-page); width: 380px; max-width: calc(100vw - 24px); padding: 0; gap: 0; border-radius: 4px; border-color: var(--border-strong); box-shadow: 0 12px 32px rgb(0 0 0 / .16); overflow: hidden; }
.bell-menu__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 12px; border-bottom: 3px solid var(--brand-navy); font-size: 16px; }
.bell-menu__head .link-btn { font-size: 13px; }
.pop__menu.bell-menu .link-btn { width: auto; padding: 0; text-decoration: underline; color: var(--text-secondary); }
.bell-menu .nt-list { max-height: min(420px, 60vh); overflow-y: auto; }
.bell-empty { padding: 28px 16px; text-align: center; color: var(--text-secondary); font-size: 14px; }
.bell-menu__foot { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border-default); }
.pop__menu.bell-menu .bell-menu__foot a { text-align: center; padding: 12px; border-radius: 0; font-weight: 700; font-size: 14px; }
.bell-menu__foot a + a { border-left: 1px solid var(--border-default); font-weight: 400 !important; color: var(--text-secondary) !important; }
.bell-guest { padding: 16px; display: grid; gap: 12px; justify-items: start; font-size: 14px; line-height: 1.6; color: var(--text-secondary); }
.bell-guest p { margin: 0; white-space: normal; }
.pop__menu.bell-menu .bell-guest .btn { width: auto; text-align: center; color: var(--text-on-dark); background: var(--brand-navy); padding: 8px 18px; border-radius: 2px; }
.pop__menu.bell-menu .bell-guest .btn:hover { background: var(--brand-navy-soft); }
.bell-push { display: flex; width: 100%; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border-default); color: var(--text-primary); }
.bell-push[hidden] { display: none; }

/* 알림 한 줄 (작은 창 · 알림 센터 같이) — 피그마 20 */
.nt-list { list-style: none; margin: 0; padding: 0; }
.nt { border-bottom: 1px solid var(--border-default); }
.nt > a { position: relative; display: grid !important; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 16px 40px 16px 16px !important; color: var(--text-primary) !important; text-decoration: none; white-space: normal !important; border-radius: 0 !important; }
.nt > a:hover { background: var(--bg-sunken); }
.nt.is-unread > a { background: var(--bg-paper); }
.nt.is-unread > a:hover { background: var(--bg-sunken); }
.nt__body { display: grid; gap: 4px; min-width: 0; }
.nt__head { font-size: 15px; line-height: 1.45; }
.nt__head b { font-weight: 700; }
.nt__text { font-size: 15px; line-height: 1.5; color: var(--text-secondary); overflow-wrap: anywhere; }
.nt__when { font-size: 13px; color: var(--text-tertiary); }
.nt__dot { position: absolute; top: 20px; right: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-gold); }
.nt-av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.nt-av img, .nt-av svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.nt-av--user { background: var(--brand-navy-soft); color: #fff; }
.nt-av--news { background: var(--brand-gold-soft); color: var(--brand-gold); }
.nt-av--plain { background: var(--bg-sunken); color: var(--text-secondary); }
.nt-av--belt { border-radius: 0; overflow: visible; }
.nt-av--belt svg { height: auto; }
.nt-list--s .nt > a { grid-template-columns: 36px 1fr; gap: 12px; padding: 14px 34px 14px 16px !important; }
.nt-list--s .nt-av { width: 36px; height: 36px; font-size: 14px; }
.nt-list--s .nt__head, .nt-list--s .nt__text { font-size: 14px; }
.nt-list--s .nt__text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nt-list--s .nt__dot { top: 18px; right: 14px; }
.nt-list--s .nt:last-child { border-bottom: 0; }

/* 켬/끔 스위치 — 피그마 04-2 */
.sw { position: relative; display: inline-block; width: 34px; height: 20px; flex: none; cursor: pointer; }
.sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: inherit; z-index: 1; }
.sw > span { position: absolute; inset: 0; border-radius: 10px; background: var(--bg-page); border: 2px solid var(--brand-navy); transition: background .15s; }
.sw > span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand-navy); transition: transform .15s, background .15s; }
.sw input:checked + span { background: var(--brand-navy); }
.sw input:checked + span::after { transform: translateX(14px); background: #fff; }
.sw input:focus-visible + span { outline: 2px solid var(--brand-gold); outline-offset: 2px; }
.sw input:disabled { cursor: not-allowed; }
.sw input:disabled + span { opacity: .35; }
:root[data-theme="dark"] .sw > span { border-color: #c9cfd8; } :root[data-theme="dark"] .sw > span::after { background: #c9cfd8; }
:root[data-theme="dark"] .sw input:checked + span { background: #c9cfd8; } :root[data-theme="dark"] .sw input:checked + span::after { background: #1f2a36; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sw > span { border-color: #c9cfd8; } :root:not([data-theme="light"]) .sw > span::after { background: #c9cfd8; } :root:not([data-theme="light"]) .sw input:checked + span { background: #c9cfd8; } :root:not([data-theme="light"]) .sw input:checked + span::after { background: #1f2a36; } }
@media (max-width: 480px) { .pop__menu.bell-menu { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; } }

/* ───────── 사이트 팝업 (alert · confirm · prompt 대신) ───────── */
.pxd { width: min(460px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--border-strong); border-top: 4px solid var(--brand-navy); border-radius: 4px; background: var(--bg-page); color: var(--text-primary); box-shadow: 0 24px 60px rgb(0 0 0 / .25); overflow: auto; }
.pxd::backdrop { background: rgb(15 20 28 / .5); }
.pxd[open] { animation: pxd-in .16s ease-out; }
@keyframes pxd-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .pxd[open] { animation: none; } }
.pxd__form { display: grid; gap: 12px; padding: 20px 22px 18px; }
.pxd__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pxd__title { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.4; letter-spacing: -0.01em; }
.pxd__x { flex: none; width: 32px; height: 32px; margin: -6px -8px 0 0; border: 0; background: none; font-size: 24px; line-height: 1; color: var(--text-secondary); cursor: pointer; border-radius: 4px; }
.pxd__x:hover { background: var(--bg-sunken); color: var(--text-primary); }
.pxd__text { margin: -4px 0 0; font-size: 14px; line-height: 1.6; color: var(--text-secondary); }
.pxd__text + .pxd__text { margin-top: -8px; }
.pxd__body { display: grid; gap: 8px; }
.pxd__body:empty { display: none; }
.pxd__label { font-size: 13px; font-weight: 700; margin-top: 4px; }
.pxd__input { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--border-default); border-radius: 4px; background: var(--bg-page); color: var(--text-primary); resize: vertical; }
.pxd__input:focus { outline: 2px solid var(--brand-navy); outline-offset: -1px; border-color: transparent; }
.pxd__count { justify-self: end; font-size: 12px; color: var(--text-tertiary); margin-top: -4px; }
.pxd__err { margin: 0; min-height: 0; font-size: 13px; color: var(--state-danger); }
.pxd__err:empty { display: none; }
.pxd__opts { display: grid; gap: 6px; }
.pxd__opt { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 11px 14px; border: 1px solid var(--border-default); border-radius: 4px; cursor: pointer; transition: border-color .12s, background .12s; }
.pxd__opt:hover { border-color: var(--text-secondary); }
.pxd__opt input { appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 2px 0 0; border: 2px solid var(--border-strong); border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.pxd__opt input::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-navy); transform: scale(0); transition: transform .12s; }
.pxd__opt input:checked { border-color: var(--brand-navy); }
.pxd__opt input:checked::after { transform: scale(1); }
.pxd__opt input:focus-visible { outline: 2px solid var(--brand-gold); outline-offset: 2px; }
.pxd__opt:has(input:checked) { border-color: var(--brand-navy); background: var(--bg-paper); box-shadow: inset 3px 0 0 var(--brand-gold); }
.pxd__opt-txt { display: grid; gap: 2px; }
.pxd__opt-txt b { font-size: 15px; font-weight: 700; }
.pxd__opt-txt small { font-size: 13px; color: var(--text-secondary); }
.pxd__list { display: grid; gap: 6px; }
.pxd__li { display: flex; gap: 6px; align-items: center; }
.pxd__rm { flex: none; width: 34px; height: 40px; border: 1px solid var(--border-default); border-radius: 4px; background: none; color: var(--text-secondary); font-size: 18px; cursor: pointer; }
.pxd__rm:hover { color: var(--state-danger); border-color: var(--state-danger); }
.pxd__add { justify-self: start; padding: 4px 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pxd__add[hidden] { display: none; }
.pxd__btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.pxd__btns .btn { min-width: 84px; }
.btn-danger-solid { background: var(--state-danger); color: #fff; border: 1px solid var(--state-danger); }
.btn-danger-solid:hover { filter: brightness(.92); }
.btn-danger-solid:disabled, .pxd__btns .btn-primary:disabled { opacity: .45; cursor: not-allowed; filter: none; }
@media (max-width: 480px) { .pxd { width: 100vw; max-width: none; margin: auto 0 0; border-radius: 12px 12px 0 0; } .pxd__btns .btn { flex: 1; } }

/* 공유하기 창 */
.pxs { width: min(440px, calc(100vw - 24px)); }
.pxs__card { display: grid; gap: 4px; padding: 12px 14px; background: var(--bg-paper); border-left: 3px solid var(--brand-gold); }
.pxs__card b { font-size: 15px; line-height: 1.45; }
.pxs__text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.pxs__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 12px 6px; padding: 6px 0 2px; }
.pxs__btn { display: grid; justify-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; cursor: pointer; color: var(--text-primary); font: inherit; border-radius: 6px; }
.pxs__btn:hover .pxs__ic { transform: translateY(-2px); }
.pxs__btn:focus-visible { outline: 2px solid var(--brand-gold); outline-offset: 2px; }
.pxs__ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; transition: transform .12s; }
.pxs__ic svg { width: 26px; height: 26px; }
.pxs__ic--kakao { background: #fee500; }
.pxs__ic--line { background: #06c755; }
.pxs__ic--x { background: #111; }
.pxs__ic--fb { background: #1877f2; }
.pxs__ic--mail, .pxs__ic--more { background: var(--bg-sunken); color: var(--text-primary); }
.pxs__lb { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.pxs__url { display: flex; gap: 6px; }
.pxs__url .pxd__input { flex: 1; min-width: 0; font-size: 13px; color: var(--text-secondary); }
.pxs__url .btn { flex: none; }
.share-col button[aria-pressed="true"] { color: var(--brand-gold); }
@media (max-width: 480px) { .pxd.pxs { width: 100vw; max-width: none; } .pxs__ic { width: 44px; height: 44px; } .pxs__ic svg { width: 24px; height: 24px; } }
