/* mBlog — 1nk Style #01 (Editorial Newsroom) 원칙을 따라 새로 작성한 스타일
   규칙: 1px #dedede 구분선, 2px #151515 섹션 머리선, #f6f4ee 지면색 박스, 강조색은 로고·키커·포커스·hover 에만.
   금지: 진한 그림자, 번쩍이는 그라데이션, 보라/네온 색. */
:root {
  --ink: #151515;
  --body: #3d3d3d;
  --muted: #666666;
  --subtle: #8a8a8a;
  --rule: #dedede;
  --accent: #cf2e1a;
  --accent-hover: #b1281a;
  --accent-tint: #fadcd6;
  --paper: #f6f4ee;
  --surface: #ffffff;
  --font: 'S-CoreDream', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shell: min(1200px, calc(100% - 80px));
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font); font-weight: 500; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { word-break: keep-all; overflow-wrap: anywhere; color: var(--ink); }
p, li { overflow-wrap: anywhere; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
.shell { width: var(--shell); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* 미리보기 띠 */
.preview-bar { background: var(--accent-tint); color: var(--accent-hover); font-size: 13px; font-weight: 600; text-align: center; padding: 6px 12px; }

/* 머리글 (Masthead) */
.masthead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; min-height: 104px; border-bottom: 2px solid var(--ink); }
.masthead .tagline { font-size: 13px; color: var(--muted); }
.masthead .meta { text-align: right; font-size: 13px; color: var(--muted); }
.logo { font-size: clamp(36px, 4.06vw, 52px); font-weight: 650; letter-spacing: -0.045em; line-height: 1; color: var(--ink); }
.logo span { color: var(--accent); font-weight: 800; }
.logo:hover { color: var(--ink); }

/* 섹션 내비게이션 */
.gnb { border-bottom: 1px solid var(--rule); }
.gnb ul { display: flex; gap: 28px; list-style: none; margin: 0 auto; padding: 0; overflow-x: auto; scrollbar-width: none; }
.gnb a { display: block; padding: 14px 0 12px; font-size: 15px; font-weight: 650; color: var(--body); border-bottom: 2px solid transparent; white-space: nowrap; }
.gnb a:hover, .gnb a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* 키커·메타 */
.kicker { display: inline-block; font-size: 11px; font-weight: 780; letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.meta-line { font-size: 13px; color: var(--muted); }
.meta-line span + span::before { content: "·"; margin: 0 6px; color: var(--subtle); }

/* 섹션 머리 */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; border-top: 2px solid var(--ink); padding-top: 12px; margin: 50px 0 18px; }
.sec-head h2 { margin: 0; font-size: 20px; font-weight: 750; letter-spacing: -0.02em; }
.sec-head a.more { font-size: 13px; color: var(--muted); }
.sec-head a.more:hover { color: var(--accent); }

/* 첫 화면 3단 격자 */
.front { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr) minmax(0, 0.95fr); gap: 26px; padding-top: 28px; }
.lead .thumb { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: var(--paper); margin-bottom: 16px; }
.lead .thumb img { width: 100%; height: 100%; object-fit: cover; }
.lead h2 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 750; line-height: 1.25; letter-spacing: -0.03em; margin: 0 0 10px; }
.lead p { color: var(--body); margin: 0 0 10px; }
.second { border-left: 1px solid var(--rule); padding-left: 26px; }
.second article { padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--rule); }
.second article:last-child { border-bottom: 0; }
.second h3 { font-size: 19px; font-weight: 700; line-height: 1.35; margin: 0 0 8px; }
.second p { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.rail { border-left: 1px solid var(--rule); padding-left: 26px; }
.box { background: var(--paper); border: 1px solid var(--ink); padding: 18px; margin-bottom: 22px; }
.box h2 { font-size: 15px; font-weight: 750; margin: 0 0 8px; }
.box p { font-size: 14px; color: var(--body); margin: 0; }
.rank { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.rank li { counter-increment: r; display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 15px; font-weight: 600; line-height: 1.4; }
.rank li::before { content: counter(r); font-weight: 800; color: var(--accent); }
.rail-title { font-size: 13px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin: 0 0 4px; }

/* 카드 격자 */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; }
.card .thumb { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: var(--paper); margin-bottom: 12px; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.noimg { display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; letter-spacing: -0.04em; color: var(--subtle); }
.card h3 { font-size: 17px; font-weight: 700; line-height: 1.4; margin: 0 0 6px; }

/* 목록 (섹션·필자 페이지) */
.page-head { padding: 34px 0 20px; border-bottom: 2px solid var(--ink); }
.page-head h1 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 750; line-height: 1.2; letter-spacing: -0.03em; margin: 0 0 8px; }
.page-head p { color: var(--muted); margin: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.list .thumb { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: var(--paper); }
.list .thumb img { width: 100%; height: 100%; object-fit: cover; }
.list h2 { font-size: 20px; font-weight: 700; line-height: 1.35; margin: 0 0 6px; }
.list p { font-size: 15px; color: var(--muted); margin: 0 0 6px; }
.pager { display: flex; justify-content: center; gap: 6px; margin: 34px 0 10px; }
.pager a, .pager span { min-width: 38px; padding: 7px 10px; text-align: center; border: 1px solid var(--rule); font-size: 14px; }
.pager span[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* 기사 */
.article { max-width: 760px; margin: 0 auto; padding: 40px 0 20px; }
.article h1 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 750; line-height: 1.2; letter-spacing: -0.03em; margin: 0 0 14px; }
.article .deck { font-size: 19px; line-height: 1.6; color: var(--body); margin: 0 0 18px; }
.byline { display: flex; flex-wrap: wrap; gap: 4px 0; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.byline a { font-weight: 700; color: var(--ink); }
.hero { margin: 26px 0; }
.hero img { width: 100%; border-radius: 6px; }
.body { font-size: 17px; line-height: 1.75; color: var(--body); }
.body > * { max-width: 68ch; }
.body h2 { font-size: 24px; font-weight: 750; line-height: 1.35; margin: 2.2em 0 .7em; padding-top: 14px; border-top: 1px solid var(--rule); }
.body h3 { font-size: 20px; font-weight: 700; margin: 1.8em 0 .6em; }
.body h4 { font-size: 17px; font-weight: 700; margin: 1.6em 0 .5em; }
.body p { margin: 0 0 1.15em; }
.body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.body strong, .body b { color: var(--ink); font-weight: 700; }
.body ul, .body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.body li { margin-bottom: .4em; }
.body img, .body figure { margin: 1.6em auto; border-radius: 6px; }
.body figure { max-width: 100%; }
.body blockquote { margin: 1.6em 0; padding: 16px 20px; border-left: 3px solid var(--accent); background: var(--paper); color: var(--ink); }
.body blockquote p:last-child { margin: 0; }
.body pre { max-width: 100%; overflow-x: auto; background: var(--ink); color: #f3f3f3; padding: 16px 18px; border-radius: 4px; font: 14px/1.6 var(--mono); }
.body code { font-family: var(--mono); font-size: .9em; background: var(--paper); padding: 1px 5px; border-radius: 3px; }
.body pre code { background: none; padding: 0; color: inherit; }
.body table { width: 100%; max-width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; display: block; overflow-x: auto; }
.body th, .body td { border: 1px solid var(--rule); padding: 9px 11px; text-align: left; vertical-align: top; }
.body th { background: var(--paper); color: var(--ink); font-weight: 700; }
.body hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.embed { position: relative; aspect-ratio: 16 / 9; margin: 1.6em 0; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.author-box { display: grid; gap: 6px; margin: 34px 0; padding: 18px; background: var(--paper); border: 1px solid var(--ink); }
.author-box .name { font-weight: 750; }
.author-box p { margin: 0; font-size: 14px; color: var(--body); }

/* 바닥글 */
.footer { margin-top: 70px; border-top: 2px solid var(--ink); background: var(--paper); }
.footer .shell { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 26px; padding: 34px 0 28px; }
.footer .logo { font-size: 30px; }
.footer p { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.footer h2 { font-size: 13px; font-weight: 750; letter-spacing: .06em; margin: 0 0 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--body); }
.footer li { padding: 3px 0; }
.footer .copy { grid-column: 1 / -1; border-top: 1px solid var(--rule); padding-top: 14px; font-size: 12px; color: var(--subtle); }

/* 반응형 (가이드 기준 1050px / 780px) */
@media (max-width: 1050px) {
  .front { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .rail { grid-column: 1 / -1; border-left: 0; padding-left: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  :root { --shell: calc(100% - 32px); }
  .masthead { grid-template-columns: 1fr; text-align: center; min-height: 0; padding: 18px 0 14px; gap: 6px; }
  .masthead .meta { display: none; }
  .gnb ul { gap: 20px; }
  .front { grid-template-columns: 1fr; }
  .second { border-left: 0; padding-left: 0; }
  .rail { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .list li { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; }
  .list h2 { font-size: 17px; }
  .list p { display: none; }
  .footer .shell { grid-template-columns: 1fr; }
  .body { font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.ad { margin: 32px 0; }
.page-text { max-width: 720px; }
.page-text h2 { font-size: 20px; margin: 32px 0 10px; }
.page-text p, .page-text li { color: var(--body, #3d3d3d); line-height: 1.8; }
/* 편집기(CKEditor)로 쓴 본문: 유튜브·사진 캡션·표 */
.body figure.media { margin: 28px 0; }
.body figure.media iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.body figure.image { margin: 28px 0; }
.body figure.image img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.body figure figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 8px; }
.body figure.table { margin: 24px 0; overflow-x: auto; }
