/* FIRSTPAGE — 청소년 창업·경영·경제 언론.
   한국 종합·경제지 뉴스룸 UI + 청소년이 읽기 편한 리듬.
   토큰: CONDERI 공식 서체(Paperlogy) · Deep Ink Navy #102A56 · Ocean Blue #0B85B3
   골드 계열은 쓰지 않는다. */

@font-face { font-family: "Paperlogy"; src: url("/static/fonts/Paperlogy-4Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Paperlogy"; src: url("/static/fonts/Paperlogy-6SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Paperlogy"; src: url("/static/fonts/Paperlogy-7Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Paperlogy"; src: url("/static/fonts/Paperlogy-8ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --navy: #102A56;
  --navy-2: #0B1D3D;
  --ocean: #0B85B3;
  --ocean-dark: #076C92;
  --sky: #4FB3D9;
  --ink: #0D1522;
  --ink-2: #2A3444;
  --ink-3: #556173;
  --ink-4: #7B8798;
  --line: #E2E7EE;
  --line-strong: #C6CEDB;
  --bg: #FFFFFF;
  --bg-2: #F5F7FA;
  --bg-3: #EBEFF5;
  --card: #FFFFFF;
  --shadow: 0 1px 2px rgba(13, 21, 34, .05), 0 10px 26px rgba(13, 21, 34, .06);
  --radius: 12px;
  --radius-sm: 8px;
  --wrap: 1240px;
  --gap: 24px;
  --head-gap: 34px;
  --serif: "Nanum Myeongjo", "Noto Serif KR", "Apple SD Gothic Neo", serif;
  font-synthesis-weight: none;
}

[data-theme="dark"] {
  --ink: #F1F4F8;
  --ink-2: #D5DBE5;
  --ink-3: #A5AEBD;
  --ink-4: #808B9C;
  --line: #222A36;
  --line-strong: #323C4C;
  --bg: #0A0E15;
  --bg-2: #10151E;
  --bg-3: #171E29;
  --card: #121821;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 30px rgba(0, 0, 0, .35);
  --navy: #1B3C74;
  --ocean: #3FA9D4;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Paperlogy", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  font-size: 16px; line-height: 1.62; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
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; }
h1, h2, h3, h4 { margin: 0; line-height: 1.26; letter-spacing: -0.03em; font-weight: 800; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--bg-3); padding: 1px 5px; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--ocean); outline-offset: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 60; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 840px; }
.muted { color: var(--ink-4); }
.dot { color: var(--line-strong); margin: 0 4px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ocean); display: inline-block; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } html { scroll-behavior: auto; } }

/* ---------------------------------------------------------------- 유틸바 */
.util-bar { background: var(--navy); color: #C9D5E6; font-size: 13px; }
.util-inner { max-width: var(--wrap); margin: 0 auto; padding: 7px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.util-date { color: #93A6C4; letter-spacing: 0; }
.util-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.util-link { color: #D8E1EE; }
.util-link:hover { color: #fff; text-decoration: none; }
.util-form { display: inline; margin: 0; }
.util-button { background: none; border: 0; padding: 0; cursor: pointer; }
.util-user { color: #fff; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.util-join { background: var(--ocean); color: #fff; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.util-join:hover { background: var(--ocean-dark); text-decoration: none; }
.util-desk { color: #fff; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.45); }
.util-apply { color: var(--sky); font-weight: 600; }

/* 속보 티커 */
.ticker { display: flex; align-items: stretch; background: var(--bg-2); border-bottom: 1px solid var(--line); overflow: hidden; }
.ticker-label { flex: 0 0 auto; background: var(--ocean); color: #fff; font-weight: 800; font-size: 13px; padding: 8px 14px; letter-spacing: .04em; display: flex; align-items: center; }
.ticker-track { overflow: hidden; flex: 1 1 auto; position: relative; }
.ticker-move { display: flex; gap: 36px; padding: 8px 16px; white-space: nowrap; animation: ticker 52s linear infinite; }
.ticker:hover .ticker-move { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.ticker-tag { font-size: 12px; font-weight: 700; color: var(--ocean); }
.ticker-title { max-width: 46ch; overflow: hidden; text-overflow: ellipsis; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-move { animation: none; } }

/* ---------------------------------------------------------------- 마스트헤드 */
.site-head { position: relative; }
.masthead { border-bottom: 3px solid var(--ink); background: var(--bg); }
.masthead-inner { max-width: var(--wrap); margin: 0 auto; padding: 20px 20px 16px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand:hover { text-decoration: none; }
.brand-sub { font-size: 12.5px; color: var(--ink-3); border-left: 1px solid var(--line-strong); padding-left: 14px; letter-spacing: 0; max-width: 240px; line-height: 1.4; word-break: keep-all; }
.brand-logo { height: 34px; width: auto; }
.logo-on-dark { display: none; }
[data-theme="dark"] .logo-on-light { display: none; }
[data-theme="dark"] .logo-on-dark { display: block; }

.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 6px 6px 16px; min-width: 300px; background: var(--bg); }
.search:focus-within { border-color: var(--ocean); box-shadow: 0 0 0 3px rgba(11, 133, 179, .14); }
.search-input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; width: 100%; color: var(--ink); }
.search-go { border: 0; background: var(--bg-3); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); flex: 0 0 auto; }
.search-go:hover { background: var(--navy); color: #fff; }

/* 섹션 네비 + 메가메뉴 */
.nav-bar { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 40; }
.nav-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 8px; }
.nav-list { display: flex; gap: 2px; overflow: visible; }
.nav-item { position: relative; }
.nav-link { display: inline-flex; align-items: center; gap: 5px; padding: 13px 15px; font-size: 15.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; border-bottom: 3px solid transparent; background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; }
.nav-link:hover { color: var(--ink); text-decoration: none; border-bottom-color: var(--line-strong); }
.nav-link.is-active { color: var(--ink); border-bottom-color: var(--ocean); }
.nav-breaking { color: var(--ocean); }
.nav-caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .55; transition: transform .18s; }
.nav-trigger[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }
.nav-trigger[aria-expanded="true"] { border-bottom-color: var(--ocean); }
.nav-toggle { display: none; }

/* 섹션 드롭다운 — 아래 기사 카드가 비치지 않게 불투명 패널 하나로 닫아 띄운다.
   2026-11-18 대표 지적: 패널이 부모 li 폭으로 잘려(max-width:100%) 2열이 패널 밖으로 흘러나와
   배경 없이 카드 위에 글자가 얹혔다. 폭·배경·경계·그림자를 패널 안으로 고정한다. */
.mega-panel { position: absolute; top: 100%; left: 50%; transform: translateX(calc(-50% + var(--mega-shift, 0px))); width: min(760px, calc(100vw - 32px)); max-width: none; background-color: var(--card); background-image: none; border: 1px solid var(--line-strong); border-top: 2px solid var(--ocean); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 2px 4px rgba(13, 21, 34, .06), 0 22px 48px rgba(13, 21, 34, .18); padding: 20px 24px 22px; z-index: 45; isolation: isolate; }
[data-theme="dark"] .mega-panel { border-top-color: var(--ocean); box-shadow: 0 2px 4px rgba(0, 0, 0, .5), 0 22px 48px rgba(0, 0, 0, .55); }
.mega-panel[hidden] { display: none; }
.mega-inner { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 22px 26px; align-items: start; }
.mega-lead { min-width: 0; padding-right: 22px; border-right: 1px solid var(--line); }
.mega-kicker { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--ocean-dark); text-transform: uppercase; }
[data-theme="dark"] .mega-kicker { color: var(--ocean); }
.mega-lead p { margin: 6px 0 12px; font-size: 13.5px; color: var(--ink-3); }
.mega-more { font-size: 13.5px; font-weight: 700; color: var(--navy); }
[data-theme="dark"] .mega-more { color: var(--sky); }
.mega-list { display: grid; gap: 4px; min-width: 0; }
.mega-link { display: block; padding: 10px 12px; border-radius: var(--radius-sm); }
.mega-link:hover { background: var(--bg-2); text-decoration: none; }
.mega-link.is-active { background: var(--bg-3); }
.mega-name { display: block; font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.mega-note { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- 메인 */
.site-main { min-height: 60vh; padding-bottom: 56px; }
.home { padding-top: 28px; }
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--gap); margin-bottom: var(--head-gap); }
.hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--gap); }
.hero-main { display: flex; flex-direction: column; gap: 16px; }
.hero-main:hover { text-decoration: none; }
.hero-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--bg-3); }
.hero-text { display: flex; flex-direction: column; gap: 10px; }
.hero-title { font-size: clamp(26px, 2.7vw, 38px); line-height: 1.2; letter-spacing: -0.04em; }
.hero-main:hover .hero-title { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.hero-lead { color: var(--ink-3); font-size: 15.5px; margin: 0; }
.hero-meta, .card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-4); }
.hero-by, .card-byline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.hero-summary { border-left: 3px solid var(--ocean); background: var(--bg-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 12px 14px; }
.hero-summary-label { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; color: var(--ocean); margin-bottom: 4px; }
.hero-summary ol { counter-reset: hs; display: grid; gap: 3px; }
.hero-summary li { counter-increment: hs; font-size: 13.5px; color: var(--ink-2); padding-left: 16px; position: relative; line-height: 1.45; }
.hero-summary li::before { content: counter(hs); position: absolute; left: 0; top: 0; font-weight: 800; color: var(--ocean); font-size: 11.5px; }
.hero-side { display: flex; flex-direction: column; gap: 18px; border-left: 1px solid var(--line); padding-left: var(--gap); }
.hero-sub .card-thumb { aspect-ratio: 16 / 10; }

.rank-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; align-self: start; background: var(--bg-2); }
.rank-head { font-size: 16px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.rank-list { display: grid; gap: 10px; }
.rank-list li a { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.42; }
.rank-no { flex: 0 0 auto; width: 20px; font-weight: 800; color: var(--ocean); font-size: 14px; }
.rank-title { color: var(--ink-2); }
.rank-link { display: block; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 700; color: var(--navy); }
[data-theme="dark"] .rank-link { color: var(--sky); }
.rank-empty { color: var(--ink-4); font-size: 13.5px; }

.section-block { margin-bottom: var(--head-gap); }
.section-head { display: flex; align-items: baseline; gap: 14px; padding-bottom: 10px; margin-bottom: 18px; border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.section-head h2 { font-size: 21px; letter-spacing: -0.04em; }
.section-head h2::after { content: ""; }
.section-desc { margin: 0; font-size: 13px; color: var(--ink-4); flex: 1 1 auto; }
.more { margin-left: auto; font-size: 13px; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.section-head-solo { font-size: 20px; margin: 30px 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }

.card { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.card-link { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.card-link:hover { text-decoration: none; }
.card-link:hover .card-title { text-decoration: underline; text-underline-offset: 3px; }
.card-thumb { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-3); }
.card-body { display: flex; flex-direction: column; gap: 7px; }
.card-title { font-size: 16.5px; line-height: 1.36; letter-spacing: -0.03em; }
.card-lead { margin: 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-section { color: var(--ocean); font-weight: 700; }
.card-read { color: var(--ink-4); }
.card-read::before { content: "·"; margin-right: 6px; color: var(--line-strong); }
.hero-meta .card-read::before { content: "·"; }
.hero-sub { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.hero-sub:last-child { border-bottom: 0; padding-bottom: 0; }
.hero-sub .card-title { font-size: 17.5px; }

.thumb-ph { display: flex; align-items: center; justify-content: center; background:
  linear-gradient(135deg, var(--bg-3) 0%, var(--bg-2) 100%); color: var(--ink-4); }
.thumb-ph-mark { font-size: 12px; font-weight: 800; letter-spacing: .18em; opacity: .55; }

.latest-block { margin-top: 8px; }
.latest-list { border-top: 1px solid var(--line); }
.latest-item { border-bottom: 1px solid var(--line); }
.latest-item a { display: flex; align-items: center; gap: 14px; padding: 11px 0; font-size: 14.5px; }
.latest-section { flex: 0 0 62px; font-size: 12px; font-weight: 700; color: var(--ocean); }
.latest-title { flex: 1 1 auto; color: var(--ink-2); }
.latest-time { flex: 0 0 auto; font-size: 12.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; }

.chip-breaking { background: var(--ocean); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 3px; letter-spacing: .02em; }
.chip-hidden { background: var(--ink-4); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 3px; }
.badge-reporter { display: inline-flex; align-items: center; gap: 4px; background: rgba(11,133,179,.12); color: var(--ocean-dark); font-size: 11.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; border: 1px solid rgba(11,133,179,.35); }
[data-theme="dark"] .badge-reporter { color: var(--sky); border-color: rgba(79,179,217,.4); }
.badge-sm { font-size: 10.5px; padding: 0 6px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--bg-3); }
.avatar-fallback { display: inline-grid; place-items: center; font-weight: 800; color: var(--ink-3); font-size: 16px; }

/* ---------------------------------------------------------------- 섹션·검색 */
.page-head { padding: 30px 0 18px; border-bottom: 2px solid var(--ink); margin-bottom: 24px; }
.page-head h1 { font-size: clamp(24px, 3vw, 32px); }
.page-sub { margin: 8px 0 0; color: var(--ink-3); font-size: 14.5px; }
.section-lead { margin-bottom: 26px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.lead-main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--gap); }
.lead-main:hover { text-decoration: none; }
.lead-thumb { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); background: var(--bg-3); }
.lead-title { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.24; }
.lead-text { color: var(--ink-3); margin: 10px 0 12px; font-size: 15px; }
.pager { display: flex; justify-content: center; gap: 6px; margin: 30px 0 10px; }
.pg { min-width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; color: var(--ink-2); padding: 0 10px; }
.pg:hover { border-color: var(--ink-3); text-decoration: none; }
.pg.is-current { background: var(--navy); color: #fff; border-color: var(--navy); }
/* 검색 화면 필터·정렬 — 2026-11-18 Round 2: 필터 UI가 아예 없었다 */
.search-filters { display: grid; gap: 8px; margin: 0 0 22px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.filter-label { font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--ink-4); margin-right: 4px; }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink-2); background: var(--bg); }
.chip:hover { border-color: var(--ink-3); text-decoration: none; }
.chip.is-on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.empty, .empty-sm { color: var(--ink-4); font-size: 14px; padding: 24px 0; }
.empty-state { padding: 90px 0; text-align: center; }
.empty-state h1 { font-size: 26px; margin-bottom: 10px; }
.empty-state p { color: var(--ink-3); }

/* ---------------------------------------------------------------- 기사 */
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding-top: 28px; }
.article { min-width: 0; }
.art-head { margin-bottom: 22px; }
.art-kicker { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--ocean); margin-bottom: 10px; }
.art-title { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.18; letter-spacing: -0.045em; }
.art-sub { margin: 12px 0 0; font-size: 17px; color: var(--ink-3); font-weight: 400; line-height: 1.5; }
.byline { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 20px 0 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.byline-who { display: flex; align-items: center; gap: 10px; }
.byline-who:hover { text-decoration: none; }
.byline-name { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.byline-role { font-size: 12.5px; color: var(--ink-4); }
.byline-meta { display: flex; gap: 12px; font-size: 12.5px; color: var(--ink-4); flex-wrap: wrap; }
.byline-read { color: var(--ocean); font-weight: 700; }
.art-summary { margin: 22px 0 0; padding: 18px 20px; background: var(--bg-2); border-left: 4px solid var(--ocean); border-radius: 0 var(--radius) var(--radius) 0; }
.art-summary-head { display: block; font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--ocean); margin-bottom: 8px; }
.art-summary ol { counter-reset: s; display: grid; gap: 7px; }
.art-summary li { counter-increment: s; position: relative; padding-left: 24px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.art-summary li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 17px; height: 17px; border-radius: 50%; background: var(--ocean); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.art-lead { margin: 20px 0 0; font-size: 17.5px; line-height: 1.7; color: var(--ink-2); font-weight: 600; letter-spacing: -0.02em; }
.art-figure { margin: 26px 0; }
.art-figure img { width: 100%; border-radius: var(--radius); }
.art-figure figcaption { margin-top: 8px; font-size: 12.5px; color: var(--ink-4); display: flex; gap: 6px 10px; justify-content: space-between; align-items: baseline; line-height: 1.55; }
/* 캡션과 출처가 좁은 화면에서 나란히 눌러 줄바꿈되던 문제(2026-11-19 #68887) */
.art-figure figcaption .cap-text { flex: 1 1 auto; min-width: 0; }
.art-figure figcaption .cap-credit { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 700px) {
  .art-figure figcaption { flex-direction: column; gap: 3px; align-items: flex-start; }
  .art-figure figcaption .cap-credit { white-space: normal; }
}
.cap-credit { color: var(--ink-4); }
.art-body { font-family: var(--serif); font-size: 17px; line-height: 1.92; letter-spacing: -0.005em; color: var(--ink); margin-top: 26px; }
.art-body p { margin: 0 0 1.15em; }
.art-body h2 { font-family: "Paperlogy", sans-serif; font-size: 21px; margin: 2em 0 .6em; padding-top: .3em; border-top: 1px solid var(--line); letter-spacing: -0.035em; }
.art-body blockquote { margin: 1.6em 0; padding: 18px 22px; background: var(--bg-2); border-left: 4px solid var(--navy); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 19px; line-height: 1.6; font-weight: 600; letter-spacing: -0.02em; }
.art-body blockquote p { margin: 0; }
.art-list { list-style: none; padding-left: 0; margin: 0 0 1.2em; }
.art-list li { position: relative; padding-left: 18px; margin-bottom: .4em; }
.art-list li::before { content: "·"; position: absolute; left: 4px; color: var(--ocean); font-weight: 800; }
.art-photo-credit { font-size: 12.5px; color: var(--ink-4); font-family: "Paperlogy", sans-serif; }
.lnk-ext { color: var(--ocean-dark); border-bottom: 1px solid currentColor; }
.art-glossary { margin: 34px 0 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.art-glossary h2 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.art-glossary h2::before { content: ""; width: 20px; height: 20px; border-radius: 6px; background: var(--ocean); box-shadow: inset 0 0 0 4px var(--bg-2); flex: 0 0 auto; }
.gloss-list { display: grid; gap: 10px; margin: 0; }
.gloss-item { display: grid; grid-template-columns: 128px 1fr; gap: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.gloss-item:last-child { border-bottom: 0; padding-bottom: 0; }
.gloss-item dt { font-weight: 800; font-size: 14px; font-family: "Paperlogy", sans-serif; }
.gloss-item dd { margin: 0; font-size: 14px; color: var(--ink-3); line-height: 1.55; }
.art-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; }
.tag { font-size: 12.5px; color: var(--ink-3); background: var(--bg-3); padding: 4px 10px; border-radius: 999px; }
.tag:hover { background: var(--bg-2); text-decoration: none; }
.art-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tool-btn { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 8px 14px; font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.tool-btn:hover { border-color: var(--ink-3); }
.tool-btn[aria-pressed="true"] { border-color: var(--ocean); color: var(--ocean-dark); background: rgba(11,133,179,.07); }
.tool-ico { font-size: 14px; }
.revisions { margin: 26px 0 0; padding: 16px 18px; background: var(--bg-2); border-radius: var(--radius); }
.revisions h2 { font-size: 14.5px; margin-bottom: 10px; }
.rev-list { display: grid; gap: 8px; font-size: 13px; color: var(--ink-3); }
.rev-list li { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; }
.rev-when { color: var(--ink-4); font-variant-numeric: tabular-nums; }
.rev-who { color: var(--ink-4); }
.art-byline-foot { margin: 24px 0 0; padding: 16px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-3); }
.tip-box { margin: 32px 0 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.tip-box h2 { font-size: 16px; margin-bottom: 6px; }
.tip-help { font-size: 13.5px; color: var(--ink-4); }
.tip-form { display: grid; gap: 12px; margin-top: 12px; }

.art-aside { min-width: 0; }
.aside-head { font-size: 15px; padding-bottom: 8px; margin-bottom: 14px; border-bottom: 2px solid var(--ink); }
.related-list { display: grid; gap: 14px; margin-bottom: 22px; }
.related-list a { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.related-list a:hover { text-decoration: none; color: var(--ink); }
.related-thumb { width: 96px; height: 64px; flex: 0 0 auto; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-3); }
.aside-epaper { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); font-size: 13.5px; font-weight: 700; color: var(--navy); margin-bottom: 18px; }
[data-theme="dark"] .aside-epaper { color: var(--sky); }
.aside-nav { display: grid; gap: 10px; margin-top: 18px; }
.aside-nav a { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.aside-nav a span { display: block; font-size: 11.5px; color: var(--ocean); font-weight: 700; margin-bottom: 3px; }

/* ---------------------------------------------------------------- 광고 */
.ad-slot { margin: 26px 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); text-align: center; }
.ad-slot .ad-label { display: block; font-size: 10px; letter-spacing: .18em; color: var(--ink-4); margin-bottom: 6px; }
/* 광고 배너 이미지 — 원본 비율 그대로. 늘리거나 찌그러뜨리지 않고 슬롯 안에 맞춘다. */
.ad-slot.ad-direct { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.ad-slot .ad-link { display: flex; align-items: center; justify-content: center; max-width: 100%; }
.ad-slot .ad-image {
  display: block; margin: 0 auto; width: auto; height: auto;
  max-width: 100%; max-height: 360px;
  object-fit: contain; object-position: center;
  border-radius: var(--radius-sm); background: var(--bg);
}
.ad-slot .ad-text { display: block; font-size: 14px; color: var(--ink-2); padding: 8px 6px; }
.ad-slot .ad-sponsor { display: block; margin-top: 6px; font-size: 11px; color: var(--ink-4); }
.ad-slot .adsbygoogle { min-height: 90px; }
/* 제휴 광고(텐핑 소문박스) — 발급 코드의 인라인 style 대신 여기서 같은 배치를 준다. */
.ad-slot.ad-tenping { padding: 10px 12px 12px; }
/* 스크립트가 클래스명을 바꿔도(발급 스크립트의 className 대입) 배치가 유지되게 태그로 잡는다. */
.ad-slot.ad-tenping tenping { display: block; width: 100%; max-width: 768px; margin: 0 auto; }
.ad-slot.ad-tenping tenping iframe { display: block; width: 100%; max-width: 100%; border: 0; margin: 0 auto; }
.art-aside .ad-slot { margin: 0 0 18px; }

/* ---------------------------------------------------------------- 패널·폼 */
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; background: var(--card); }
.panel h2 { font-size: 17px; margin-bottom: 10px; }
.panel-sub { font-size: 14px; margin: 6px 0 10px; color: var(--ink-2); }
.panel-hint { font-size: 13px; color: var(--ink-4); }
.fld { display: grid; gap: 6px; font-size: 14px; }
.fld > span { font-weight: 700; font-size: 13.5px; }
.fld input, .fld select, .fld textarea, .field-row input, .field-row select {
  font: inherit; font-size: 14.5px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink); width: 100%;
}
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--ocean); box-shadow: 0 0 0 3px rgba(11,133,179,.13); outline: 0; }
.fld-help { font-size: 12.5px; color: var(--ink-4); font-weight: 400; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-3); }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; }
.auth-form { display: grid; gap: 14px; margin: 0; }
.auth-form.slim { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.apply-form { margin-top: 8px; }
.form-error { background: rgba(200, 40, 40, .08); border: 1px solid rgba(200, 40, 40, .3); color: #B02020; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13.5px; margin: 0; }
[data-theme="dark"] .form-error { color: #FF8A8A; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: var(--radius-sm); font-size: 14.5px; font-weight: 700; border: 1px solid transparent; cursor: pointer; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-ghost { background: var(--bg); border-color: var(--line-strong); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--ocean-dark); font-size: 13.5px; cursor: pointer; padding: 0; text-decoration: underline; }
.inline-form { display: inline; }
.flash { max-width: var(--wrap); margin: 14px auto 0; padding: 12px 18px; border-radius: var(--radius-sm); font-size: 14px; }
.flash-success { background: rgba(11,133,179,.1); border: 1px solid rgba(11,133,179,.3); }
.flash-info { background: var(--bg-2); border: 1px solid var(--line); }
.flash-error { background: rgba(200,40,40,.08); border: 1px solid rgba(200,40,40,.3); }

/* ---------------------------------------------------------------- 회원·마이페이지 */
.auth-wrap { max-width: 460px; margin: 0 auto; padding: 48px 20px; }
.auth-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--card); box-shadow: var(--shadow); }
.auth-head { margin-bottom: 20px; }
.auth-head h1 { font-size: 26px; }
.auth-head p { margin: 6px 0 0; color: var(--ink-3); font-size: 14px; }
.auth-alt { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.auth-links { display: flex; gap: 10px; justify-content: center; font-size: 13.5px; color: var(--ink-3); margin: 0; }
.auth-step { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--ocean); }
.auth-target { font-size: 14.5px; color: var(--ink-2); }
.auth-note { font-size: 13px; color: var(--ink-4); }
.auth-result { margin-top: 14px; padding: 12px; background: var(--bg-2); border-radius: var(--radius-sm); font-size: 14px; }
.code-input { letter-spacing: .4em; font-size: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.my-wrap { padding-top: 28px; }
.profile-row { display: flex; gap: 16px; align-items: center; margin-bottom: 10px; }
.profile-name { font-size: 20px; display: flex; align-items: center; gap: 8px; }
.mini-list { display: grid; gap: 8px; font-size: 14px; }
.mini-list li { display: flex; justify-content: space-between; gap: 14px; color: var(--ink-3); }
.mini-list a { color: var(--ink-2); }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.info-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--bg-2); }
.info-card h3 { font-size: 14.5px; margin-bottom: 6px; color: var(--ocean); }
.info-card p { margin: 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.55; }
.apply-guide { border-top: 1px solid var(--line); padding-top: 8px; margin-bottom: 18px; }

/* ---------------------------------------------------------------- 문서 */
.doc-page, .article-page { padding-bottom: 20px; }
.doc-page .page-head { margin-bottom: 20px; }
.doc-body { font-family: var(--serif); font-size: 16.5px; line-height: 1.85; }
.doc-body h2 { font-family: "Paperlogy", sans-serif; font-size: 19px; margin: 1.7em 0 .5em; }
.doc-body ul { list-style: none; padding-left: 0; }
.doc-body ul li { position: relative; padding-left: 16px; margin-bottom: .35em; }
.doc-body ul li::before { content: "·"; position: absolute; left: 3px; color: var(--ocean); font-weight: 800; }

/* ---------------------------------------------------------------- 기자 콘솔 */
.desk-wrap { padding-top: 24px; }
.desk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.desk-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.desk-list { display: grid; gap: 10px; }
.desk-list li { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.desk-list a { display: grid; gap: 2px; flex: 1 1 auto; }
.desk-title { font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.desk-meta { font-size: 12.5px; color: var(--ink-4); }
.manual-item { border-top: 1px solid var(--line); padding: 10px 0; }
.manual-item summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.manual-item ul { margin-top: 8px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-3); list-style: disc; padding-left: 18px; }
.tpl { font-family: ui-monospace, monospace; font-size: 12.5px; white-space: pre-wrap; background: var(--bg-2); padding: 12px; border-radius: var(--radius-sm); margin-top: 8px; }
.desk-editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
/* 작성기는 넓게 — 작성란·미리보기를 나란히 놓을 자리를 만든다 */
.desk-page .desk-wrap { max-width: 1680px; }
/* 작성란 · 실시간 미리보기 — 넓은 화면에서는 나란히, 좁아지면 미리보기 탭 */
.desk-workbench { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 18px; align-items: start; min-width: 0; }
.desk-preview { position: sticky; top: 70px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); overflow: hidden; max-height: calc(100vh - 92px); display: flex; flex-direction: column; }
.desk-preview-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-bottom: 1px solid var(--line); background: var(--bg); flex-wrap: wrap; }
.desk-preview-bar strong { font-size: 13px; color: var(--navy); }
[data-theme="dark"] .desk-preview-bar strong { color: var(--sky); }
.desk-preview-bar .fld-help { margin: 0; font-size: 11.5px; flex: 1 1 120px; min-width: 0; }
.desk-preview-scroll { overflow: auto; padding: 14px; background: #fff; flex: 1 1 auto; }
[data-theme="dark"] .desk-preview-scroll { background: var(--bg-2); }
.desk-preview-body { max-width: 100%; }
.desk-preview-body.is-narrow { width: 390px; max-width: 100%; margin: 0 auto; border: 1px solid var(--line);
  border-radius: 18px; padding: 12px; box-shadow: var(--shadow); }
.desk-preview-body .preview-article { max-width: 100%; }
.desk-preview-body .art-title { font-size: clamp(19px, 2.2vw, 26px); }
.desk-preview-body .art-body { font-size: 15px; }
.desk-preview-body .art-figure img { width: 100%; height: auto; border-radius: 10px; }
.desk-preview-toggle, .desk-preview-back { display: none; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: transparent; color: var(--ink-3); font: inherit; font-size: 12px;
  padding: 4px 10px; cursor: pointer; }
.seg button.is-on { background: var(--navy); color: #fff; }
[data-theme="dark"] .seg button.is-on { background: var(--ocean); }
/* 본문 편집 방식 탭 + 블록 편집 */
.ed-mode { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; flex-wrap: wrap; }
.ed-mode button { border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--ink-3);
  font: inherit; font-size: 12.5px; padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.ed-mode button.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
[data-theme="dark"] .ed-mode button.is-on { background: var(--ocean); border-color: var(--ocean); }
.ed-mode .fld-help { margin: 0 0 0 4px; }
.ed-blocks { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--bg-2); }
.ed-blocks-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.ed-block-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ed-block { border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 10px 12px; }
.ed-block.is-empty { color: var(--ink-4); font-size: 13px; text-align: center; }
.ed-block[data-type="chart"] { border-left: 3px solid var(--ocean); }
.ed-block[data-type="h2"] { border-left: 3px solid var(--navy); }
.ed-block[data-type="lead"] { border-left: 3px solid var(--sky); }
.ed-block-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ed-block-kind { font-size: 11.5px; font-weight: 700; color: var(--ocean); letter-spacing: .02em; }
.ed-block-meta { font-size: 12px; color: var(--ink-3); }
.ed-block-tools { margin-left: auto; display: flex; gap: 4px; }
.ed-block-tools .btn-sm { padding: 3px 8px; font-size: 12px; }
.ed-block .ed-block-del:hover { color: #B3261E; }
.ed-block-text { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  font-family: var(--serif); font-size: 14.5px; line-height: 1.7; resize: vertical; background: var(--bg);
  color: var(--ink); }
.ed-block-image { display: flex; gap: 10px; align-items: flex-start; }
.ed-block-image img { width: 120px; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.ed-block-fields { display: grid; gap: 4px; flex: 1 1 auto; min-width: 0; }
.ed-block-fields input { width: 100%; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 8px;
  font: inherit; font-size: 13.5px; background: var(--bg); color: var(--ink); }
.ed-block .btn-block-edit { margin-top: 6px; }
@media (max-width: 1500px) {
  .desk-workbench { grid-template-columns: minmax(0, 1fr); }
  .desk-preview { position: static; max-height: none; display: none; }
  .desk-preview-toggle { display: inline-flex; }
  .desk-preview-back { display: inline-flex; margin-left: auto; }
  .desk-page.preview-open .desk-preview, body.preview-open .desk-preview { display: flex; }
  body.preview-open .desk-main { display: none; }
}
.desk-main { display: grid; gap: 14px; min-width: 0; }
.desk-main textarea#ed-body { font-family: var(--serif); font-size: 15.5px; line-height: 1.75; }
.desk-side { display: grid; gap: 14px; position: sticky; top: 70px; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--bg-2); }
.desk-image { display: grid; gap: 10px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.desk-figure img { max-height: 180px; border-radius: var(--radius-sm); }
.desk-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.desk-tools { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.switch { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.correction-panel { margin-top: 20px; }
.correction-panel[hidden] { display: none; }
.corr-block { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.corr-list { display: grid; gap: 6px; font-size: 13.5px; }
.corr-list li { background: var(--bg-2); padding: 8px 10px; border-radius: var(--radius-sm); }
.corr-warn { background: rgba(200,120,0,.09); border-left: 3px solid #C87800; padding: 8px 12px; font-size: 13.5px; margin-bottom: 6px; }
.corr-tone { background: rgba(11,133,179,.08); border-left: 3px solid var(--ocean); padding: 8px 12px; font-size: 13.5px; margin-bottom: 6px; }
.corr-check { display: flex; gap: 8px; font-size: 13.5px; padding: 3px 0; }
.corr-check .ok { color: var(--ocean); font-weight: 800; }
.corr-check .no { color: #B02020; font-weight: 800; }

/* 관리 화면 */
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--bg-2); }
.stat span { display: block; font-size: 12.5px; color: var(--ink-4); }
.stat strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
.tbl th { font-size: 12px; color: var(--ink-4); font-weight: 700; }

/* ---------------------------------------------------------------- 전자 지면 */
.epaper-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.epaper-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 26px; align-items: start; padding-top: 8px; }
.issue-list { display: grid; gap: 8px; }
.issue-item { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.issue-item.is-active { border-color: var(--ocean); background: rgba(11,133,179,.06); }
.issue-no { font-weight: 800; font-size: 14.5px; }
.issue-date { font-size: 12.5px; color: var(--ink-4); }
.issue-pages { font-size: 12px; color: var(--ocean); font-weight: 700; }
.viewer { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); padding: 16px; }
.viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.viewer-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.viewer-tab { border: 1px solid var(--line-strong); background: var(--bg); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.viewer-tab.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
/* 확대는 `transform: scale()` 대신 **실제 폭**을 키운다. transform 은 레이아웃 크기를 바꾸지 않아
   확대한 면의 오른쪽·아래쪽이 스크롤 영역 밖으로 잘려 나가고(2026-11-19 제보: "지면 본문이 짤렸다"),
   스크롤해도 끝까지 볼 수 없었다. 폭을 키우면 스크롤 영역도 함께 넓어져 면 전체를 볼 수 있다. */
.viewer-stage { position: relative; display: block; background: #2B3038; border-radius: var(--radius-sm); padding: 18px; min-height: 420px; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
/* `img { display: block }`이 브라우저 기본 `[hidden] { display: none }`을 덮어 숨긴 면까지 그려지던 문제
   (2026-11-18 QA: /epaper/3에서 4면이 세로로 모두 렌더되고 확대 시 숨은 면이 버튼을 가림) */
img[hidden], .viewer-page[hidden], .viewer-stage img[hidden] { display: none !important; }
.viewer-page { display: block; margin: 0 auto; max-width: 100%; height: auto; box-shadow: 0 18px 50px rgba(0,0,0,.45); background: #fff; }
.viewer-page.zoom-1 { width: auto; }
.viewer-page.zoom-2 { width: 150%; max-width: none; }
.viewer-page.zoom-3 { width: 240%; max-width: none; }
.viewer-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; }
.viewer-count { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.epaper-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.epaper-note { font-size: 13px; color: var(--ink-4); }

/* ---------------------------------------------------------------- 푸터 */
.site-foot { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 20px; }
.foot-inner { max-width: var(--wrap); margin: 0 auto; padding: 36px 20px 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 32px; }
.foot-brand { min-width: 0; }
.foot-logo { display: inline-block; margin-bottom: 12px; }
.foot-desc { font-size: 13px; color: var(--ink-3); line-height: 1.6; max-width: 340px; }
.foot-support { font-size: 13px; font-weight: 700; }
.foot-nav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.foot-nav h2 { font-size: 12px; letter-spacing: .06em; color: var(--ink-4); text-transform: uppercase; margin-bottom: 10px; }
.foot-nav ul { display: grid; gap: 7px; font-size: 13px; }
.foot-nav a { color: var(--ink-2); }
.foot-family { border-top: 1px solid var(--line); }
.foot-family-inner { max-width: var(--wrap); margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ff-label { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; color: var(--ink-4); }
.ff-list { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; }
.ff-list a { display: inline-flex; gap: 6px; align-items: baseline; color: var(--ink-2); font-weight: 700; }
.ff-muted { font-weight: 400; color: var(--ink-4); font-size: 12px; }
.foot-legal { border-top: 1px solid var(--line); padding: 16px 20px 28px; max-width: var(--wrap); margin: 0 auto; font-size: 12px; color: var(--ink-4); line-height: 1.7; }
.foot-copy { margin-top: 6px; }

/* ---------------------------------------------------------------- 반응형 */
@media (max-width: 1240px) {
  :root { --wrap: 1080px; --gap: 20px; }
  .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .epaper-grid { grid-template-columns: 260px minmax(0, 1fr); }
}
@media (max-width: 1080px) {
  .home-top { grid-template-columns: minmax(0, 1fr) 280px; }
  .article-wrap { grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; }
  .desk-editor { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 860px) {
  .masthead-inner { padding: 14px 16px; }
  .brand-sub { display: none; }
  .search { min-width: 0; width: 100%; order: 3; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); margin: 6px 0; }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-list { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); flex-direction: column; padding: 8px 12px 16px; z-index: 50; max-height: 70vh; overflow: auto; }
  .nav-list.is-open { display: flex; }
  .nav-item { width: 100%; }
  .nav-link { width: 100%; padding: 12px 8px; border-bottom: 1px solid var(--line); justify-content: space-between; }
  .mega-panel { position: static; transform: none; width: 100%; max-width: 100%; background-color: transparent; box-shadow: none; border: 0; border-radius: 0; padding: 4px 0 10px; }
  .mega-inner { grid-template-columns: 1fr; gap: 8px; }
  .mega-lead { display: none; }
  .mega-link { background: var(--bg-2); }
  .home-top, .hero, .lead-main { grid-template-columns: minmax(0, 1fr); }
  .hero-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 16px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-wrap { grid-template-columns: minmax(0, 1fr); }
  .art-aside { border-top: 1px solid var(--line); padding-top: 20px; }
  .desk-cols, .info-grid { grid-template-columns: 1fr; }
  .desk-editor { grid-template-columns: minmax(0, 1fr); }
  .desk-side { position: static; }
  .epaper-grid { grid-template-columns: 1fr; }
  .foot-inner { grid-template-columns: 1fr; }
  .foot-nav { grid-template-columns: repeat(3, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .gloss-item { grid-template-columns: 1fr; gap: 2px; }
  .rev-list li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 620px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 16px; }
  .util-inner { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 12px; }
  .util-actions { gap: 10px; }
  .home { padding-top: 18px; }
  .hero-title { font-size: 25px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .card-thumb { aspect-ratio: 16 / 9; }
  .art-title { font-size: 26px; }
  .art-body { font-size: 16.5px; line-height: 1.85; }
  .art-summary { padding: 14px 15px; }
  .art-summary li { font-size: 14.5px; }
  .foot-nav { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .latest-section { flex: 0 0 50px; }
  .latest-title { font-size: 14px; }
  .viewer-stage { padding: 8px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .epaper-actions .btn { flex: 1 1 auto; }
}
@media print {
  .site-head, .site-foot, .ad-slot, .art-tools, .tip-box, .art-aside { display: none !important; }
  .article-wrap { display: block; }
  .art-body { font-size: 11pt; }
}

/* ── 본문 확장: 인라인 이미지·표·SVG 그래프·각주 ─────────────────────────── */
.fp-inline-fig { margin: 26px 0; }
.fp-inline-fig img { width: 100%; border-radius: var(--radius); display: block; }
.fp-inline-fig figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-4); line-height: 1.5; }

.fp-table-wrap { margin: 26px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.fp-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 320px; }
.fp-table th, .fp-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.fp-table th { background: var(--bg-2); font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.fp-table tbody tr:last-child td { border-bottom: 0; }

/* 숫자 띠(::kpi)·설명 상자(::box) — 본문 서식이 그대로 글자로 찍히지 않고 상자로 선다 */
.fp-kpi { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.fp-kpi-cell { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-left: 14px; border-left: 3px solid var(--ocean); }
.fp-kpi-cell strong { font-size: 23px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); line-height: 1.2; }
[data-theme="dark"] .fp-kpi-cell strong { color: #FFFFFF; }
.fp-kpi-cell span { font-size: 12.5px; color: var(--ink-3); }
.fp-note-box { margin: 26px 0; padding: 16px 18px; border-left: 4px solid var(--ocean); background: var(--bg-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 14.5px; color: var(--ink-2); }

.fp-chart { margin: 28px 0; padding: 14px 12px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.fp-chart-svg { width: 100%; height: auto; display: block; }
.fp-chart-title { font-size: 15px; font-weight: 700; fill: var(--ink); }
.fp-chart-axis { font-size: 11px; fill: var(--ink-4); }
.fp-chart-label { font-size: 11.5px; fill: var(--ink-3, var(--ink-4)); }
.fp-chart-value { font-size: 11px; font-weight: 700; fill: var(--ink-2); }
.fp-chart-unit { font-size: 10.5px; fill: var(--ink-4); }
.fp-chart-grid { stroke: var(--line); stroke-width: 1; }
.fp-chart-bar { fill: var(--ocean); }
.fp-chart-line { stroke: var(--ocean); stroke-width: 2.5; }
.fp-chart-dot { fill: var(--ocean); }
/* 도넛 조각 — 테마 변수 위에서 4색 순환 */
.fp-chart-slice-0 { fill: var(--ocean); }
.fp-chart-slice-1 { fill: var(--orange, #F26B21); }
.fp-chart-slice-2 { fill: var(--navy); }
.fp-chart-slice-3 { fill: var(--ocean-dark); }
.fp-chart-slice { stroke: #fff; stroke-width: 1.5; }
[data-theme="dark"] .fp-chart { background: #131A24; }
[data-theme="dark"] .fp-chart-title { fill: #E7EDF5; }
[data-theme="dark"] .fp-chart-value { fill: #D5DEEA; }
[data-theme="dark"] .fp-chart-grid { stroke: #263142; }

.article-footnotes { margin: 30px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.article-footnotes h2 { font-size: 14px; color: var(--ink-3); letter-spacing: .02em; }
.article-footnotes ol { margin: 10px 0 0 18px; font-size: 13px; color: var(--ink-3); line-height: 1.7; }
.article-footnotes li { margin-bottom: 6px; }
.fn-ref a { color: var(--ocean); text-decoration: none; font-size: 11px; font-weight: 700; padding: 0 1px; }
.fn-back { color: var(--ocean); text-decoration: none; font-size: 11px; }

.art-source { margin: 30px 0 0; padding: 18px 20px; border: 1px solid var(--line); border-left: 3px solid var(--ocean);
  border-radius: var(--radius); background: var(--bg-2); }
.art-source h2 { font-size: 14px; color: var(--ink-3); margin-bottom: 8px; }
.art-source p { font-size: 13.5px; color: var(--ink-3); margin-bottom: 12px; }
.art-source .source-name { font-weight: 700; color: var(--ink-2); }
.source-btn { display: inline-flex; align-items: center; gap: 6px; }

.ai-badge { display: flex; width: fit-content; align-items: center; gap: 6px; margin-top: 8px; padding: 3px 9px;
  font-size: 11.5px; font-weight: 600; color: var(--ink-4); border: 1px solid var(--line-strong);
  border-radius: 999px; background: var(--bg-2); }

.byline-views, .card-views { color: var(--ink-4); }
.card-views::before { content: "·"; margin: 0 6px; }

/* ── 기자콘솔 도구 ─────────────────────────────────────────────────────── */
.ed-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 10px; }
.ed-toolbar .btn-sm { padding: 6px 10px; font-size: 12.5px; }
.ed-toolbar .fld-help { margin: 0; }
.ed-toolbar .fld-help.is-error { color: #C0392B; }

.ed-modal { width: min(720px, 94vw); padding: 0; border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--bg); color: var(--ink); box-shadow: 0 24px 60px rgba(8, 16, 28, .28); }
.ed-modal::backdrop { background: rgba(8, 16, 28, .45); }
.ed-modal-body { padding: 22px 24px 18px; }
.ed-modal-body h2 { font-size: 18px; margin-bottom: 14px; }
.ed-modal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.ed-chart-rows, .ed-table-grid { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13.5px; }
.ed-chart-rows th, .ed-table-grid th { text-align: left; font-size: 12px; color: var(--ink-4); padding: 4px 6px; }
.ed-chart-rows td, .ed-table-grid td { padding: 4px 6px; }
.ed-chart-rows input, .ed-table-grid input { width: 100%; padding: 7px 9px; border: 1px solid var(--line-strong);
  border-radius: 8px; background: var(--bg-2); color: var(--ink); font: inherit; }
.ed-table-scroll { overflow-x: auto; }
.ed-modal-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.ed-chart-preview { margin-top: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-height: 90px; }
[data-theme="dark"] .ed-chart-preview { background: #131A24; }
.ed-row-del { padding: 4px 8px; font-size: 12px; }

/* ── 반응형 보강(2026-11-17) — 360·390·768·1024·1440px 실측 기준 ──────────── */
img, svg, video, canvas { max-width: 100%; height: auto; }
html, body { overflow-x: hidden; }
body { overflow-wrap: break-word; }
a, code, .art-body, .art-lead, .card-title, .card-lead, .desk-meta, .fp-table th, .fp-table td,
.source-name, .art-source p { overflow-wrap: anywhere; word-break: break-word; }
/* 그리드·플렉스 자식이 자기 폭을 밀어내지 않게 최소 폭을 0으로 고정 */
.article, .art-aside, .card, .desk-main, .desk-side, .viewer, .viewer-stage, .home-top > *,
.hero > *, .lead-main > *, .desk-cols > *, .epaper-grid > *, .stat-grid > *, .grid-3 > *, .grid-4 > * {
  min-width: 0;
}
.viewer-page, .viewer-stage img { max-width: 100%; }
.fp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* 모바일에서 그래프를 폭에 맞춰 축소하면 축 레이블이 8px로 줄어 읽을 수 없다.
   표처럼 가로 스크롤로 두고 최소 폭을 잡아 실효 글자를 12px 이상으로 유지한다(2026-11-18 QA). */
.fp-chart { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fp-chart-svg { display: block; width: 100%; height: auto; }
.ed-modal { max-width: min(720px, 94vw); }
.ed-toolbar, .desk-actions, .epaper-actions, .viewer-nav, .util-inner { flex-wrap: wrap; }
.art-source .source-btn { max-width: 100%; }
.ticker, .ticker-track, .util-inner { max-width: 100%; }

@media (max-width: 1024px) {
  .viewer-tabs { flex-wrap: wrap; }
  .issue-side { max-width: 100%; }
}
@media (max-width: 768px) {
  .byline { flex-wrap: wrap; }
  .byline-meta { flex-wrap: wrap; gap: 6px 10px; }
  .art-source { padding: 14px 16px; }
  .ed-modal-body { padding: 18px 16px 14px; }
  .ed-chart-rows input, .ed-table-grid input { font-size: 13px; }
  .fp-table { min-width: 0; font-size: 13.5px; }
  .fp-table th, .fp-table td { padding: 8px 10px; }
}
@media (max-width: 420px) {
  h1.art-title, .art-title { font-size: 23px; }
  .art-body { font-size: 15.8px; line-height: 1.8; }
  .card-title { font-size: 16.5px; }
  .wrap { padding: 0 14px; }
  .ed-toolbar .btn-sm { flex: 1 1 auto; }
  .fp-chart { padding: 8px 4px 4px; }
}

/* 모바일 탭 타깃 — 19~22px짜리 링크·칩을 손가락 크기(36~44px)로 올린다
   (2026-11-18 Round 2 QA R2-G3-10: 페이지당 24~43개가 24px 미만). */
@media (max-width: 900px) {
  .util-link, .util-button { min-height: 44px; display: inline-flex; align-items: center; padding: 0 6px; }
  .util-user { min-height: 44px; display: inline-flex; align-items: center; }
  .tag { min-height: 36px; display: inline-flex; align-items: center; padding: 6px 12px; }
  .tool-btn { min-height: 44px; padding: 10px 16px; }
  .pg { min-width: 44px; height: 44px; }
  .viewer-tab { min-height: 40px; display: inline-flex; align-items: center; padding: 8px 14px; }
  .foot-nav a { min-height: 36px; display: inline-flex; align-items: center; }
  .foot-nav ul { gap: 2px; }
  .btn-sm { min-height: 36px; }
  .eps-slot-clear { width: 36px; height: 36px; top: 2px; right: 2px; }
  .nav-link { min-height: 44px; }
  .search-go { min-width: 44px; min-height: 44px; }
}

@media (max-width: 640px) {
  /* 그래프 최소 폭 — 축 레이블 실효 12px 이상(11px × 560/640 ≈ 9.6px이 되지 않게 폰트도 키운다). */
  .fp-chart-svg { width: 560px; min-width: 560px; }
  .fp-chart-axis { font-size: 14px; }
  .fp-chart-label { font-size: 14px; }
  .fp-chart-value { font-size: 13.5px; }
  .fp-chart-title { font-size: 18px; }
  .fp-chart-unit { font-size: 13px; }
}

/* ------------------------------------------------------------------------- */
/* 편집부 지면 스튜디오 (/desk/epaper) — 가변 면수 · 블록 보드 · 기사 풀 · 광고 */
/* ------------------------------------------------------------------------- */
.eps-wrap { padding-top: 24px; padding-bottom: 60px; }
.eps-kicker { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--ocean); text-transform: uppercase; margin: 0 0 6px; }
.eps-head { align-items: flex-end; }
.eps-head .page-sub { max-width: 62ch; }

.eps-bar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px;
  padding: 16px; margin-bottom: 10px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
}
.eps-mode { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: var(--bg); }
.eps-mode-btn { border: 0; background: transparent; padding: 9px 20px; font-size: 14px; font-weight: 700; color: var(--ink-3); cursor: pointer; }
.eps-mode-btn[aria-pressed="true"] { background: var(--navy); color: #fff; }
.eps-field { display: grid; gap: 5px; font-size: 12.5px; color: var(--ink-3); min-width: 0; }
.eps-field > span { font-weight: 700; }
.eps-field select, .eps-field input, .eps-field textarea {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 9px 10px; min-width: 0; width: 100%;
}
.eps-bar-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.eps-status { font-size: 13px; color: var(--ink-3); margin: 0 0 16px; }
.eps-status strong { color: var(--navy); }
[data-theme="dark"] .eps-status strong { color: var(--sky); }
.eps-last-error { font-size: 13px; line-height: 1.5; color: #B3261E; margin: -8px 0 16px;
  padding: 8px 12px; border-radius: 10px; background: rgba(179, 38, 30, .08);
  border: 1px solid rgba(179, 38, 30, .22); }
[data-theme="dark"] .eps-last-error { color: #FF9B92; background: rgba(255, 155, 146, .1);
  border-color: rgba(255, 155, 146, .28); }

.eps-schedule {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end;
  padding: 16px; margin-bottom: 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: var(--bg);
}
.eps-schedule .eps-hint { grid-column: 1 / -1; margin: 0; }

.eps-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.eps-board-wrap, .eps-pool-wrap, .eps-ad, .eps-previewbox { min-width: 0; }

.eps-pagetabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.eps-tab {
  display: grid; gap: 1px; flex: 0 0 auto; padding: 7px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--bg); cursor: pointer; text-align: left;
}
.eps-tab-no { font-size: 12px; font-weight: 800; color: var(--ink-4); }
.eps-tab-label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.eps-tab.is-active { background: var(--navy); border-color: var(--navy); }
.eps-tab.is-active .eps-tab-no, .eps-tab.is-active .eps-tab-label { color: #fff; }

.eps-board { min-width: 0; }
.eps-sheet {
  display: grid; gap: 8px; padding: 10px; min-width: 0;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.eps-sheet-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.eps-sheet-name { font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.eps-sheet-section { font-size: 12px; color: var(--ink-3); }
.eps-front-body { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 8px; }
.eps-front-main, .eps-front-rail { display: grid; gap: 8px; align-content: start; min-width: 0; }
.eps-brief-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }

.eps-slot {
  position: relative; display: grid; gap: 3px; align-content: start; min-width: 0; min-height: 62px;
  padding: 8px 10px; padding-right: 26px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  background: var(--bg-2); cursor: pointer; text-align: left;
}
.eps-slot:hover { border-color: var(--ocean); }
.eps-slot.is-filled { background: var(--bg); border-style: solid; border-color: var(--line-strong); }
.eps-slot.is-selected { outline: 2px solid var(--ocean); outline-offset: 1px; background: var(--bg); }
.eps-slot.is-over { background: rgba(11, 133, 179, .12); border-color: var(--ocean); }
.eps-slot.is-empty { background: repeating-linear-gradient(135deg, var(--bg-2), var(--bg-2) 8px, var(--bg-3) 8px, var(--bg-3) 16px); }
.eps-slot.is-dup { border-color: #C2410C; }
.eps-slot-lead { min-height: 128px; }
.eps-slot-rail { min-height: 132px; }
.eps-slot-second, .eps-slot-third, .eps-slot-fourth { min-height: 74px; }
.eps-slot-brief1, .eps-slot-brief2, .eps-slot-brief3 { min-height: 70px; }
.eps-slot-ad { min-height: 52px; background: var(--navy); border: 1px solid var(--navy); color: #fff; }
.eps-slot-ad .eps-slot-label, .eps-slot-ad .eps-slot-title { color: #fff; }
.eps-slot-ad .eps-slot-meta { color: #CFE2F3; }
.eps-slot-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.eps-slot-label { font-size: 11.5px; font-weight: 800; letter-spacing: .02em; color: var(--ink-4); }
.eps-slot-badge { font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 999px; background: var(--bg-3); color: var(--ink-3); }
.eps-slot-badge.is-set { background: var(--ocean); color: #fff; }
.eps-slot-badge.is-empty { background: var(--ink-4); color: #fff; }
.eps-slot-badge.is-off { background: #6B7280; color: #fff; }
.eps-slot-badge.is-custom, .eps-slot-badge.is-ads { background: #fff; color: var(--navy); }
.eps-slot-title, .eps-card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.eps-slot-placeholder { font-weight: 500; color: var(--ink-4); }
.eps-slot-meta { font-size: 11.5px; color: var(--ink-4); overflow-wrap: anywhere; }
.eps-slot-clear {
  position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%;
  border: 0; background: var(--bg-3); color: var(--ink-3); font-size: 14px; line-height: 1; cursor: pointer;
}
.eps-slot-clear:hover { background: var(--ink-4); color: #fff; }
.eps-board-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.eps-warn { margin: 10px 0 0; padding: 9px 12px; border-radius: var(--radius-sm); background: #FEF3C7; color: #7C2D12; font-size: 12.5px; font-weight: 600; }
[data-theme="dark"] .eps-warn { background: #3B2A0B; color: #FCD9A2; }

.eps-pool-wrap { position: sticky; top: 12px; display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.eps-pool-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.eps-pool-head h2 { font-size: 16px; }
.eps-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.eps-filter { border: 1px solid var(--line-strong); background: var(--bg); border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 700; color: var(--ink-3); cursor: pointer; }
.eps-filter.is-active { background: var(--ocean); border-color: var(--ocean); color: #fff; }
.eps-search { font: inherit; font-size: 14px; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg); width: 100%; min-width: 0; }
.eps-pool { display: grid; gap: 8px; max-height: 58vh; overflow-y: auto; padding-right: 2px; }
.eps-card { display: grid; gap: 3px; padding: 9px 10px; border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--card); cursor: grab; }
.eps-card:hover { border-color: var(--ocean); }
.eps-card.is-picked { outline: 2px solid var(--ocean); outline-offset: 1px; }
.eps-card.is-used { border-left-color: var(--ocean); background: var(--bg-3); }
.eps-card.is-dragging { opacity: .55; }
.eps-card.is-empty { color: var(--ink-4); cursor: default; }
.eps-card-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.eps-card-section { font-size: 10.5px; font-weight: 800; color: var(--ocean); }
.eps-card-meta { font-size: 10.5px; color: var(--ink-4); }
.eps-card-used { font-size: 10.5px; font-weight: 800; color: #C2410C; }
.eps-card-lead { font-size: 11.5px; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.eps-hint { font-size: 11.5px; color: var(--ink-4); margin: 0; line-height: 1.5; }

.eps-ad, .eps-previewbox { margin-top: 22px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); display: grid; gap: 12px; }
.eps-ad-modes { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13.5px; }
.eps-ad-modes label, .eps-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.eps-ad-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.eps-ad-fields .eps-hint { grid-column: 1 / -1; }
.eps-ad > .btn { justify-self: start; }
.eps-check { font-size: 13px; }
.eps-preview-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.eps-preview-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.eps-preview-img { width: 100%; height: auto; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; }

.eps-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 12px);
  max-width: min(560px, calc(100vw - 32px)); padding: 11px 16px; border-radius: var(--radius-sm);
  background: var(--navy); color: #fff; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; z-index: 80;
}
.eps-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.eps-toast.is-error { background: #B91C1C; }

@media (max-width: 1024px) {
  .eps-grid { grid-template-columns: minmax(0, 1fr); }
  .eps-pool-wrap { position: static; }
  .eps-pool { max-height: none; }
}
@media (max-width: 620px) {
  .eps-bar { padding: 12px; gap: 10px 12px; }
  .eps-bar-actions { margin-left: 0; width: 100%; }
  .eps-bar-actions .btn { flex: 1 1 auto; }
  .eps-front-body { grid-template-columns: minmax(0, 1fr); }
  .eps-slot-lead { min-height: 104px; }
  .eps-slot { padding: 7px 8px; padding-right: 24px; }
  .eps-slot-title { font-size: 13px; }
  .eps-ad, .eps-previewbox, .eps-pool-wrap { padding: 12px; }
}

/* hidden 속성은 클래스 display 보다 우선해야 한다(패널이 닫히지 않는 문제 방지) */
.eps-schedule[hidden], .eps-ad[hidden], .eps-previewbox[hidden], .eps-warn[hidden], .eps-toast[hidden] { display: none !important; }
@media (min-width: 900px) {
  .eps-preview-img { max-width: 720px; margin: 0 auto; }
}

/* 1면 와이어프레임 — 우측 레일은 기사 단 높이에 맞춰 늘어난다(실제 지면과 같은 인상) */
.eps-front-body { align-items: stretch; }
.eps-front-rail { display: flex; flex-direction: column; }
.eps-front-rail .eps-slot { flex: 1 1 auto; }
.eps-front-rail .eps-slot-rail { min-height: 132px; }
@media (max-width: 1024px) {
  .eps-pool { max-height: 70vh; overflow-y: auto; }
}

/* 스튜디오 광고 배너 미리보기 — 원본 비율 유지(object-fit: contain), 넘치지 않게 */
.eps-ad-thumb {
  grid-column: 1 / -1;
  display: block; max-width: 100%; max-height: 160px; width: auto; height: auto;
  object-fit: contain; object-position: center;
  margin: 0 auto; padding: 4px; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.eps-ad-thumb[hidden] { display: none !important; }

/* 발행된 지면 목록 + 영구 삭제 */
.eps-issues { margin-top: 22px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); display: grid; gap: 10px; }
.eps-issue-list { display: grid; gap: 8px; }
.eps-issue { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.eps-issue.is-empty { color: var(--ink-4); justify-content: center; }
.eps-issue.is-fresh { border-left: 3px solid var(--ocean); }
.eps-issue-main { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.eps-issue-no { font-size: 14px; font-weight: 800; }
.eps-issue-meta { font-size: 12px; color: var(--ink-4); }
.eps-issue-view { font-size: 12.5px; font-weight: 700; color: var(--ocean); padding: 4px 8px; border-radius: var(--radius-sm); }
.eps-issue-del { font: inherit; font-size: 12.5px; font-weight: 700; color: #B91C1C; background: transparent; border: 1px solid #F3C6C6; border-radius: var(--radius-sm); padding: 5px 10px; cursor: pointer; }
.eps-issue-del:hover { background: #B91C1C; border-color: #B91C1C; color: #fff; }
.btn-danger { background: #B91C1C; color: #fff; }
.btn-danger:hover { background: #991B1B; }

/* 확인 모달 */
.eps-modal { position: fixed; inset: 0; background: rgba(9, 14, 22, .55); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 90; }
.eps-modal[hidden] { display: none !important; }
.eps-modal-box { width: min(460px, 100%); background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: grid; gap: 10px; }
.eps-modal-box h2 { font-size: 18px; }
.eps-modal-box p { margin: 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.6; }
.eps-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.eps-mode-hint { margin: -10px 0 16px; }

/* ═══════════════════════════════════════════════════════════════════════════
   AI 검색 — 항상 떠 있는 플로팅 버튼 + 검색 패널 (2026-11-18 대표 지시 #67233)
   · 기사를 읽다 모르는 용어를 바로 찾는다: 자체 용어사전·기사 문맥 → 공개 웹.
   · 다른 플로팅 UI(지면 스튜디오 토스트는 하단 중앙)와 겹치지 않게 우측 하단에 둔다.
   · 토큰(--navy/--ocean/--card/--line)만 써서 라이트·다크 모드가 함께 바뀐다.
   ═══════════════════════════════════════════════════════════════════════════ */
.ai-search { position: fixed; right: 20px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  transition: opacity .18s ease, transform .18s ease, visibility .18s; }
/* 모바일 섹션 드로어가 열려 있으면 AI 검색 FAB 은 접어 둔다(메뉴 마지막 항목을 가리지 않게) */
body.nav-open .ai-search { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(10px); }
@media (max-width: 860px) { body.nav-open .ai-search { display: none; } }
.ai-search [hidden], .ai-panel[hidden], .ai-sel[hidden] { display: none !important; }

.ai-fab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px 0 15px;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; cursor: pointer;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; font-family: "Paperlogy", sans-serif; font-size: 14px; font-weight: 700; letter-spacing: -.01em;
  box-shadow: 0 6px 18px rgba(13, 21, 34, .28), 0 1px 2px rgba(13, 21, 34, .2);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.ai-fab:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(13, 21, 34, .32); text-decoration: none; }
.ai-fab:active { transform: translateY(0); }
.ai-fab[aria-expanded="true"] { background: linear-gradient(180deg, var(--ocean) 0%, var(--ocean-dark) 100%); }
.ai-fab-ico { display: grid; place-items: center; width: 22px; height: 22px; }
.ai-fab-ico svg { display: block; }
[data-theme="dark"] .ai-fab { border-color: rgba(255, 255, 255, .22); box-shadow: 0 8px 22px rgba(0, 0, 0, .55); }

.ai-panel {
  position: fixed; right: 20px; bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  width: min(420px, calc(100vw - 24px)); max-height: min(78vh, 720px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 18px 48px rgba(13, 21, 34, .24), 0 2px 6px rgba(13, 21, 34, .1);
  animation: ai-rise .18s ease-out;
}
@keyframes ai-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ai-panel { animation: none; } }

.ai-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 0; }
.ai-panel-title { display: flex; align-items: center; gap: 7px; font-size: 16px; font-weight: 800; letter-spacing: -.03em; }
.ai-spark { color: var(--ocean); font-size: 15px; line-height: 1; }
.ai-close {
  width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line);
  border-radius: 50%; background: var(--bg-2); color: var(--ink-3); cursor: pointer; font-size: 13px;
}
.ai-close:hover { background: var(--bg-3); color: var(--ink); }
.ai-panel-sub { margin: 6px 18px 12px; font-size: 12.5px; line-height: 1.55; color: var(--ink-3); }

.ai-form { display: flex; gap: 8px; padding: 0 18px 10px; }
.ai-input {
  flex: 1 1 auto; min-width: 0; height: 42px; padding: 0 14px; font: inherit; font-size: 14px;
  color: var(--ink); background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 10px;
}
.ai-input::placeholder { color: var(--ink-4); }
.ai-input:focus { outline: 2px solid var(--ocean); outline-offset: 1px; border-color: var(--ocean); }
.ai-go {
  flex: 0 0 auto; height: 42px; padding: 0 16px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--navy); color: #fff; font-family: "Paperlogy", sans-serif; font-size: 13.5px; font-weight: 700;
}
.ai-go:hover { background: var(--navy-2); }
[data-theme="dark"] .ai-go { background: var(--ocean); }
[data-theme="dark"] .ai-go:hover { background: var(--ocean-dark); }

.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 10px; }
.ai-chip {
  padding: 6px 11px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer;
  background: var(--bg); color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.35;
}
.ai-chip:hover { border-color: var(--ocean); color: var(--ocean); background: var(--bg-2); }
.ai-chip-quiet { background: var(--bg-2); border-style: dashed; }

.ai-result { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 18px 6px; -webkit-overflow-scrolling: touch; }
.ai-hint { margin: 6px 0 2px; font-size: 13px; color: var(--ink-4); }
.ai-foot { margin: 0; padding: 10px 18px 14px; border-top: 1px solid var(--line); font-size: 11.5px; line-height: 1.5; color: var(--ink-4); }

.ai-loading { display: flex; align-items: center; gap: 10px; padding: 14px 2px; font-size: 13px; color: var(--ink-3); }
.ai-spinner {
  width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid var(--line-strong); border-top-color: var(--ocean); animation: ai-spin .8s linear infinite;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ai-spinner { animation: none; } }

.ai-empty { padding: 12px 2px; display: grid; gap: 10px; justify-items: start; }
.ai-empty-text { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ink-3); }

.ai-card { padding: 10px 0 6px; }
.ai-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ai-card-title { font-size: 19px; font-weight: 800; letter-spacing: -.035em; line-height: 1.28; }
.ai-badge {
  flex: 0 0 auto; margin-top: 3px; padding: 3px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap;
  color: var(--ocean-dark); background: rgba(11, 133, 179, .1); border: 1px solid rgba(11, 133, 179, .22);
}
.ai-badge-web { color: #6B4E00; background: #FFF6DF; border-color: #F1DFB2; }
[data-theme="dark"] .ai-badge { color: var(--sky); background: rgba(79, 179, 217, .12); border-color: rgba(79, 179, 217, .28); }
[data-theme="dark"] .ai-badge-web { color: #FFD98A; background: rgba(255, 203, 99, .1); border-color: rgba(255, 203, 99, .28); }

.ai-card-one { margin: 0 0 8px; font-size: 15px; font-weight: 700; line-height: 1.55; letter-spacing: -.02em; color: var(--ink); }
.ai-card-easy { margin: 0 0 8px; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.ai-src { display: inline-block; margin: 2px 0 10px; font-size: 12.5px; font-weight: 700; color: var(--ocean); }
.ai-src-quiet { font-weight: 600; color: var(--ink-4); }
.ai-src:hover { text-decoration: underline; }

.ai-sub-head { margin: 14px 0 7px; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; color: var(--ink-4); text-transform: none; }
.ai-ctx-box, .ai-art-box, .ai-term-box, .ai-alt { border-top: 1px solid var(--line); margin-top: 6px; }
.ai-ctx { padding: 7px 0 8px; }
.ai-ctx-sentence { margin: 0 0 4px; font-family: var(--serif); font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.ai-ctx-link { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.ai-ctx-link:hover { color: var(--ocean); }

.ai-arts { display: grid; gap: 8px; margin: 0 0 6px; padding: 0; list-style: none; }
.ai-art { padding: 8px 0; border-bottom: 1px solid var(--line); }
.ai-art:last-child { border-bottom: 0; }
.ai-art-title { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.45; color: var(--ink); }
.ai-art-title:hover { color: var(--ocean); }
.ai-art-meta { display: block; margin-top: 2px; font-size: 11px; color: var(--ink-4); }
.ai-art-lead { margin: 4px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-3); }
.ai-alt-head { margin: 8px 0 8px; font-size: 12.5px; color: var(--ink-3); }
.ai-notice { margin: 10px 0 4px; padding: 8px 10px; border-radius: 8px; background: var(--bg-2); font-size: 12.5px; line-height: 1.55; color: var(--ink-3); }
.ai-suggest { padding: 0; margin-top: 8px; }

/* 선택한 단어 — 기사 본문에서 드래그하면 그 자리에 뜬다. */
.ai-sel {
  position: fixed; z-index: 72; min-height: 38px; padding: 0 12px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--navy); border-radius: 9px; background: var(--navy); color: #fff;
  font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: -.01em;
  box-shadow: 0 8px 22px rgba(13, 21, 34, .3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ai-sel:hover { background: var(--navy-2); }
[data-theme="dark"] .ai-sel { background: var(--ocean); border-color: var(--ocean); }
[data-theme="dark"] .ai-sel:hover { background: var(--ocean-dark); }

@media (max-width: 620px) {
  .ai-search { right: 14px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .ai-fab { min-height: 46px; padding: 0 15px 0 13px; font-size: 13px; }
  .ai-panel {
    right: 10px; left: 10px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    max-height: 72vh; border-radius: 14px;
  }
  .ai-panel-sub { margin-bottom: 10px; }
  .ai-card-title { font-size: 17.5px; }
  /* 플로팅 버튼이 푸터 법적 고지 글자를 가리지 않게 자리를 비워 둔다. */
  .foot-legal { padding-bottom: 84px; }
}

@media print {
  .ai-search, .ai-sel { display: none !important; }
}

/* 다크 모드 대비 보정 — 패널 경계와 보조 문구가 배경에 묻히지 않게. */
[data-theme="dark"] .ai-panel { border-color: #2C3747; }
[data-theme="dark"] .ai-input { background: var(--bg-3); }
[data-theme="dark"] .ai-chip { background: var(--bg-3); }
[data-theme="dark"] .ai-hint, [data-theme="dark"] .ai-foot { color: var(--ink-3); }
[data-theme="dark"] .ai-panel-sub { color: var(--ink-3); }

/* Valantir 결합 표기 — AI 동작창(플로팅 검색 패널) 하단 */
.valantir-badge { display: flex; align-items: center; gap: 5px; justify-content: flex-end;
  margin: 0; padding: 0 18px 12px; font-size: 10.5px; letter-spacing: .02em;
  color: var(--ink-4); opacity: .72; user-select: none; pointer-events: none; }
.valantir-badge img { width: 14px; height: 14px; display: block; border-radius: 4px; }
.valantir-badge b { font-weight: 800; letter-spacing: .04em; }
.ai-valantir-line { margin: 6px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--ink-4); }
[data-theme="dark"] .valantir-badge, [data-theme="dark"] .ai-valantir-line { color: var(--ink-3); }
@media (max-width: 640px) { .valantir-badge { padding: 0 14px 10px; } }
