@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');
@import url('https://fonts.googleapis.com/css2?family=Nanum+Myeongjo:wght@400;700;800&display=swap');

:root {
  --navy: #16294B;
  --navy-soft: #3c4f75;
  --red: #C8102E;
  --ink: #14140f;
  --gray: #6d6d66;
  --gray-light: #9a9a92;
  --line: #dcdcd6;
  --line-soft: #ebebe5;
  --paper: #ffffff;
  --paper-tint: #f6f5f1;
  --sans: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --serif: 'Nanum Myeongjo', 'Apple SD Gothic Neo', serif;
  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  word-break: keep-all;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

img { max-width: 100%; display: block; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }

/* ---------- 제호 ---------- */
.masthead { border-bottom: 2px solid var(--navy); }
.masthead-inner {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 0 12px;
}
.masthead-meta {
  margin-left: auto; text-align: right;
  font-size: 11.5px; color: var(--gray); line-height: 1.5;
}
.masthead-meta strong { display: block; color: var(--navy); font-weight: 600; }

/* ---------- 섹션 메뉴 ---------- */
.nav { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); z-index: 20; }
.nav-inner { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; padding: 0 18px; max-width: var(--wrap); margin: 0 auto; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav a {
  flex: none; padding: 11px 0 9px; font-size: 14.5px; color: var(--navy);
  border-bottom: 2.5px solid transparent; margin-bottom: -1px; font-weight: 500;
}
.nav a.on { border-bottom-color: var(--red); font-weight: 700; }

/* ---------- 1면 사설 ---------- */
.lede { padding: 26px 0 26px; border-bottom: 1px solid var(--line); }
.lede-photo {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  background: var(--wash); margin-bottom: 16px;
}
.lede .kicker {
  font-size: 12px; color: var(--red); font-weight: 700; letter-spacing: .02em;
}
.lede h1 {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(27px, 6.4vw, 44px); line-height: 1.28;
  letter-spacing: -.025em; margin: 10px 0 0; color: var(--ink);
}
.lede .sub {
  font-family: var(--serif); font-size: clamp(15px, 3.4vw, 19px);
  color: var(--navy-soft); margin-top: 12px; line-height: 1.6;
}
.lede .excerpt {
  font-size: 15px; color: #44443e; margin-top: 14px; line-height: 1.85;
}
.byline { font-size: 12.5px; color: var(--gray); margin-top: 16px; }
.byline b { font-weight: 600; color: #3d3d38; }

/* ---------- 목록 ---------- */
.strip { padding: 22px 0 6px; }
.strip-head {
  display: flex; align-items: baseline; gap: 10px;
  border-bottom: 2px solid var(--navy); padding-bottom: 7px; margin-bottom: 4px;
}
.strip-head h2 { font-size: 15.5px; margin: 0; color: var(--navy); font-weight: 700; }
.strip-head span { font-size: 12px; color: var(--gray-light); }

.item { display: flex; gap: 14px; padding: 17px 0; border-bottom: 1px solid var(--line-soft); }
.item:last-child { border-bottom: 0; }
.item-body { flex: 1; min-width: 0; }
.item .sec { font-size: 11px; color: var(--red); font-weight: 600; }
.item h3 {
  font-family: var(--serif); font-weight: 700;
  font-size: 17px; line-height: 1.42; margin: 4px 0 0;
  letter-spacing: -.02em;
}
.item p { font-size: 13.5px; color: var(--gray); margin: 6px 0 0; line-height: 1.6; }
.item .when { font-size: 11.5px; color: var(--gray-light); margin-top: 7px; }
.item .thumb {
  width: 96px; height: 72px; flex: none; border-radius: 3px;
  object-fit: cover; background: var(--paper-tint);
}

.empty {
  padding: 40px 4px; color: var(--gray-light); font-size: 14px; text-align: center;
  line-height: 1.8;
}

/* ---------- 기사 본문 ---------- */
.article { padding: 28px 0 10px; max-width: 740px; }
.article .sec { font-size: 12.5px; color: var(--red); font-weight: 700; }
.article h1 {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(25px, 5.8vw, 38px); line-height: 1.32;
  letter-spacing: -.025em; margin: 10px 0 0;
}
.article .sub {
  font-family: var(--serif); font-size: 17px; color: var(--navy-soft);
  margin-top: 12px; line-height: 1.6;
}
.article .meta {
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center;
  font-size: 12.5px; color: var(--gray);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 11px 0; margin-top: 18px;
}
.article .meta b { color: #3d3d38; font-weight: 600; }
.prose {
  font-size: 16.5px; line-height: 1.95; color: #1f1f1a; margin-top: 24px;
}
.prose p { margin: 0 0 1.35em; }
.prose figure { margin: 26px 0; }
.prose figure img { width: 100%; border-radius: 3px; }
.article figure img { width: 100%; }
.prose figcaption { font-size: 12.5px; color: var(--gray); margin-top: 7px; }

/* 그래서 나한테 뭐가? */
.impact {
  border-left: 3px solid var(--red); background: var(--paper-tint);
  padding: 18px 20px; margin: 32px 0; border-radius: 0;
}
.impact h4 {
  margin: 0 0 10px; font-size: 15px; color: var(--navy); font-weight: 700;
  letter-spacing: -.02em;
}
.impact div { font-size: 15px; line-height: 1.85; color: #2c2c26; white-space: pre-wrap; }

/* 원문 확인 */
.sources { margin: 30px 0; border-top: 1px solid var(--line); padding-top: 16px; }
.sources h4 { margin: 0 0 10px; font-size: 13.5px; color: var(--navy); font-weight: 700; }
.sources a {
  display: block; font-size: 14px; color: #1b3a6b; padding: 5px 0;
  text-decoration: underline; text-underline-offset: 3px; word-break: break-all;
}
.video { margin: 28px 0; aspect-ratio: 16/9; }
.video iframe { width: 100%; height: 100%; border: 0; border-radius: 3px; }

/* 공유 */
.share { display: flex; gap: 8px; flex-wrap: wrap; margin: 26px 0; }
.share button {
  font-family: var(--sans); font-size: 13.5px; padding: 9px 16px;
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  border-radius: 3px; cursor: pointer; font-weight: 500;
}
.share button:hover { background: var(--paper-tint); border-color: var(--navy-soft); }

/* 기자 소개 */
.author {
  display: flex; gap: 13px; align-items: flex-start;
  border: 1px solid var(--line); padding: 16px; margin: 28px 0; border-radius: 3px;
}
.author .ini {
  width: 54px; height: 54px; border-radius: 50%; flex: none;
  background: var(--navy); color: #fff; display: flex;
  align-items: center; justify-content: center;
  font-size: 13.5px; font-weight: 700; letter-spacing: -.06em;
}
.author .nm { font-size: 14.5px; font-weight: 700; }
.author .bio { font-size: 12.5px; color: var(--gray); margin-top: 3px; line-height: 1.6; }
.author .em { font-size: 12.5px; color: var(--navy-soft); margin-top: 4px; }

.ad-slot { margin: 26px 0; }
.ad-slot:empty { display: none; }

/* ---------- 꼬리 ---------- */
.foot { background: var(--navy); color: #b9c2d6; margin-top: 46px; }
.foot .wrap { padding-top: 26px; padding-bottom: 30px; }
.foot .fname { color: #fff; font-size: 16px; font-weight: 700; letter-spacing: -.03em; }
.foot .fslogan { font-size: 12px; color: #8e9ab5; margin-top: 3px; }
.foot p { font-size: 12px; line-height: 1.9; margin: 14px 0 0; }
.foot a { color: #c9d2e4; text-decoration: underline; text-underline-offset: 2px; }
.foot .note { font-size: 11px; color: #7d89a5; margin-top: 14px; line-height: 1.8; }

/* ---------- 관리자 ---------- */
.admin-bar {
  background: var(--navy); color: #fff; padding: 11px 0;
}
.admin-bar .wrap { display: flex; align-items: center; gap: 12px; }
.admin-bar .t { font-size: 14.5px; font-weight: 600; }
.admin-bar .who { margin-left: auto; font-size: 12.5px; color: #b9c2d6; }
.admin-bar button {
  background: transparent; border: 1px solid #5b6b8c; color: #fff;
  font-family: var(--sans); font-size: 12.5px; padding: 5px 11px;
  border-radius: 3px; cursor: pointer;
}

.form { max-width: 720px; padding: 24px 0 60px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--gray-light); font-weight: 400; margin-top: 4px; line-height: 1.6; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 15px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px;
  background: #fff;
}
.field textarea { line-height: 1.8; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy); }
.row { display: flex; gap: 12px; }
.row .field { flex: 1; }

.btn {
  font-family: var(--sans); font-size: 14.5px; font-weight: 600;
  padding: 11px 22px; border-radius: 3px; cursor: pointer; border: 1px solid var(--navy);
  background: var(--navy); color: #fff;
}
.btn.ghost { background: #fff; color: var(--navy); }
.btn:disabled { opacity: .5; cursor: default; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 26px; }

.thumbs { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 10px; }
.thumbs figure { margin: 0; position: relative; }
.thumbs img { width: 84px; height: 64px; object-fit: cover; border-radius: 3px; border: 1px solid var(--line); }
.thumbs button {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
  border-radius: 50%; border: 0; background: var(--red); color: #fff;
  font-size: 12px; line-height: 1; cursor: pointer;
}

.msg { font-size: 13.5px; padding: 10px 13px; border-radius: 3px; margin: 14px 0; line-height: 1.6; }
.msg.err { background: #fcebeb; color: #8f1f1f; }
.msg.ok { background: #eaf3de; color: #37620f; }

.list-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}
.list-row .ttl { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 500; }
.list-row .ttl small { display: block; font-size: 11.5px; color: var(--gray-light); font-weight: 400; margin-top: 3px; }
.tag { font-size: 11px; padding: 3px 8px; border-radius: 2px; font-weight: 600; flex: none; }
.tag.pub { background: #eaf3de; color: #37620f; }
.tag.dft { background: #f1efe8; color: #5f5e5a; }
.list-row a.ed { font-size: 12.5px; color: var(--navy); text-decoration: underline; flex: none; }

.login { max-width: 340px; margin: 70px auto; padding: 0 18px; }
@media (min-width: 760px) {
  .cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: 40px; align-items: start; }
  .lede { border-bottom: 0; padding-top: 34px; }
  .item .thumb { width: 118px; height: 84px; }
}

.brand { display: inline-flex; align-items: center; }
.brand img { height: 34px; width: auto; }
.masthead-inner { gap: 10px; }
@media (min-width: 760px) { .brand img { height: 44px; } }
.login .brand { display: flex; justify-content: center; margin-bottom: 22px; }

/* ---------- 광고 배너 ---------- */
.ad { display: block; line-height: 0; }
.ad img { max-width: 100%; height: auto; object-fit: contain; margin: 0 auto; }
.ad-slot { margin: 24px 0; text-align: center; }
.ad-slot:empty { display: none; margin: 0; }
.ad-b1 { flex: 1 1 auto; text-align: center; padding: 0 14px; min-width: 0; }
.ad-b1:empty { display: none; }
.ad-b1 img { max-width: 100%; max-height: 90px; width: auto; height: auto; }
@media (max-width: 900px) { .ad-b1 { display: none; } }

.btn.danger {
  background: #fff; color: var(--red); border-color: var(--red);
}
.btn.danger:hover { background: #fcefef; }

/* 기사 안 배너는 본문 폭에 맞춘다 */
.article .ad-slot img, #ad-b2 img { width: 100%; max-width: 740px; height: auto; }
#ad-b2 { max-width: 740px; margin-left: 0; }

#ad-b4 { margin: 34px auto; text-align: center; }
#ad-b4 img { max-width: 100%; height: auto; }

@media (max-width: 759px) {
  .wrap { padding: 0 22px; }
  .nav-inner { padding: 0 22px; }
}

html, body { max-width: 100%; overflow-x: hidden; }
.masthead-inner, .nav-inner, .wrap { box-sizing: border-box; }

.prose figure { margin: 26px 0; }
.prose figcaption {
  font-size: 13px; color: var(--gray); line-height: 1.6;
  margin-top: 8px; padding-left: 10px; border-left: 3px solid var(--line);
}
.thumbs figure { position: relative; }
.thumbs .no {
  position: absolute; left: 4px; top: 4px; background: rgba(22,41,75,.88);
  color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 2px;
}
.thumbs .put {
  display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 11.5px;
  padding: 4px 0; border: 1px solid var(--line); background: #fff;
  color: var(--navy); cursor: pointer; border-radius: 2px;
}
.thumbs .put:hover { background: var(--wash); border-color: var(--navy); }

.article > figure figcaption {
  font-size: 13px; color: var(--gray); line-height: 1.6;
  margin-top: 8px; padding-left: 10px; border-left: 3px solid var(--line);
}

.previewbar {
  background: #8a5a00; color: #fff; font-size: 13px; font-weight: 600;
  text-align: center; padding: 9px 16px; letter-spacing: -.02em;
}

/* 방문 통계 */
.statcards { display: flex; gap: 10px; flex-wrap: wrap; }
.statcard {
  flex: 1 1 130px; border: 1px solid var(--line); padding: 14px 16px; border-radius: 3px;
}
.statcard b { display: block; font-size: 26px; color: var(--navy); letter-spacing: -.04em; }
.statcard span { font-size: 12px; color: var(--gray); }
.stattable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.stattable th, .stattable td {
  text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line);
}
.stattable th { color: var(--navy); font-size: 12px; font-weight: 700; }
.stattable td:last-child, .stattable th:last-child { text-align: right; }
.stattable a { color: var(--navy-soft); text-decoration: underline; text-underline-offset: 3px; }

.stattable .tsec { color: var(--red); font-size: 11.5px; font-weight: 700; margin-right: 6px; }
.stattable a { text-decoration: none; }
.stattable a:hover { text-decoration: underline; }
