/* 네이버 프리미엄콘텐츠의 배치·간격을 따르고, 색은 커널아카데미(남색 #16264a, 옅은 초록 #f1f6ef, 선 #dfe5db). */
:root {
  --navy: #16264a;
  --navy-2: #2d4675;
  --ink: #111;
  --ink-2: #444;
  --muted: #777;
  --faint: #999;
  --soft: #f1f6ef;
  --soft-2: #e8f0e4;
  --line: #dfe5db;
  --line-2: #ebeeea;
  --page: #f5f7f4;
  --new: #e8513a;
  --wrap: 1080px;
}
* { box-sizing: border-box; }
html { background: #fff; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
body.is-channel { background: var(--page); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.i { width: 1em; height: 1em; vertical-align: -0.12em; flex: none; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: #fff; padding: 8px 12px; }
.muted { color: var(--muted); }

/* 윗줄 */
.top { background: #fff; position: relative; z-index: 20; }
.top-article { position: sticky; top: 0; border-bottom: 1px solid var(--line-2); }
.top-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; justify-content: space-between; position: relative; }
.logo { display: inline-flex; align-items: baseline; gap: 5px; color: var(--navy); }
.logo-k { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.logo-p { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 15px; color: var(--navy-2); }
.top-channel { position: absolute; left: 50%; transform: translateX(-50%); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; white-space: nowrap; max-width: 50%; overflow: hidden; text-overflow: ellipsis; }
.top-right { display: flex; align-items: center; gap: 16px; }
.top-login { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.top-my { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 11px; font-weight: 800; }
.progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--line-2); }
.progress span { display: block; height: 100%; width: 0; background: var(--navy); }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 22px; border-radius: 4px; border: 1px solid transparent; font-weight: 700; font-size: 15px; cursor: pointer; }
.btn-primary { background: var(--navy); color: #fff; width: 100%; height: 52px; font-size: 16px; }
.btn-primary:hover, .btn-sub:hover { background: #0f1c38; }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-sub { background: var(--navy); color: #fff; min-width: 170px; }
.btn-sub.on { background: #fff; color: var(--navy); border-color: var(--navy); }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid #d6dad3; border-radius: 4px; background: #fff; color: var(--ink-2); cursor: pointer; font-size: 20px; position: relative; }
.icon-btn.plain { border: 0; width: 36px; height: 36px; background: transparent; }
.icon-btn.font { font-size: 16px; font-weight: 700; }
.icon-btn[data-done]::after { content: "주소를 복사했어요"; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 6px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 500; padding: 4px 8px; border-radius: 4px; white-space: nowrap; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; }

/* 채널 홈 */
.channel { max-width: var(--wrap); margin: 0 auto; padding: 0 20px 64px; }
.ch-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px 0 22px; }
.ch-profile { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ch-logo { width: 52px; height: 52px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 900; font-size: 22px; color: var(--navy); flex: none; }
.ch-name { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.25; }
.ch-sub { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.ch-sub b { color: var(--navy); }
.ch-badge { display: inline-block; margin-left: 4px; padding: 0 7px; border: 1px solid var(--navy-2); color: var(--navy-2); border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 18px; vertical-align: 1px; }
.ch-actions { display: flex; gap: 8px; flex: none; }

.featured { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feat { position: relative; height: 208px; border-radius: 6px; overflow: hidden; color: #fff; display: block; }
.feat-bg, .feat-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.62)); }
.feat-text { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; }
.feat-text strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 18px; line-height: 1.35; letter-spacing: -0.02em; margin-bottom: 6px; }
.feat .meta { color: rgba(255, 255, 255, 0.85); }
.gen { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); }
.gen::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px); background-size: 22px 22px; }
.feat-bg.gen span { display: none; }

.tabs { display: flex; justify-content: center; gap: 56px; margin: 28px 0 16px; }
.tabs a { position: relative; padding: 6px 4px 12px; font-size: 16px; color: var(--ink-2); }
.tabs a.on { font-weight: 700; color: var(--ink); }
.tabs a.on::after { content: ""; position: absolute; left: -12px; right: -12px; bottom: 0; height: 2px; background: var(--ink); }

.notice-bar { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 16px; margin-bottom: 10px; background: #fff; border: 1px solid var(--line); border-radius: 6px; color: var(--navy-2); font-size: 14px; font-weight: 600; text-align: center; }
.notice-bar .tag { flex: none; white-space: nowrap; background: #8b918a; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 2px; }
.plan-bar { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 60px; margin-bottom: 20px; background: var(--soft-2); border: 1px solid var(--line); border-radius: 6px; }
.plan-card { display: grid; place-items: center; width: 54px; height: 34px; border-radius: 3px; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; box-shadow: 0 2px 6px rgba(22, 38, 74, 0.25); flex: none; }
.plan-text { display: grid; line-height: 1.35; }
.plan-text strong { font-size: 14px; }
.plan-text span { font-size: 13px; color: var(--ink-2); }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.card { display: grid; grid-template-columns: minmax(0, 1fr) 96px; grid-template-rows: 1fr auto; column-gap: 20px; row-gap: 14px; padding: 22px 24px 18px; background: #fff; border-radius: 6px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
.card:hover .card-title { text-decoration: underline; }
.card-text { display: block; min-width: 0; }
.card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 17px; line-height: 1.4; letter-spacing: -0.02em; margin-bottom: 8px; }
.card-excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.6; }
.card-thumb { position: relative; width: 96px; height: 96px; border-radius: 4px; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb.gen span, .side-thumb.gen span { position: absolute; inset: 9px; z-index: 1; color: #fff; font-size: 10px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { grid-column: 1 / -1; }
.meta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-2); }
.tag-free { display: inline-block; padding: 0 5px; margin-right: 4px; border-radius: 2px; background: var(--soft-2); color: var(--navy); font-size: 11px; font-weight: 800; }
.n { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-right: 5px; border-radius: 50%; background: var(--new); color: #fff; font-style: normal; font-size: 9px; font-weight: 900; vertical-align: 2px; }
.empty { display: grid; gap: 6px; place-items: center; padding: 56px 20px; background: #fff; border-radius: 6px; color: var(--muted); text-align: center; }
.empty strong { color: var(--ink); font-size: 16px; }

/* 채널 정보 탭 */
.info { display: grid; gap: 14px; }
.info-block { background: #fff; border-radius: 6px; padding: 26px 28px; }
.info-block h2 { margin: 0 0 12px; font-size: 18px; }
.info-block p { margin: 0 0 10px; font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.steps { margin: 0 0 10px; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: n; }
.steps li { counter-increment: n; position: relative; padding: 14px 16px 14px 52px; border: 1px solid var(--line-2); border-radius: 6px; font-size: 15px; color: var(--ink-2); }
.steps li::before { content: counter(n); position: absolute; left: 16px; top: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.steps b { display: block; color: var(--ink); }
.verdict { display: inline-flex; gap: 6px; margin-left: 4px; }
.verdict span { padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.verdict .use { background: #e3f1dd; color: #2f5d1f; }
.verdict .watch { background: #fbf0d9; color: #8a5a00; }
.verdict .skip { background: #f3e1df; color: #8a2a1f; }
.kv { width: 100%; border-collapse: collapse; font-size: 14px; }
.kv th, .kv td { padding: 11px 0; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.kv th { width: 90px; color: var(--muted); font-weight: 600; }

/* 콘텐츠 뷰어 */
.viewer { max-width: var(--wrap); margin: 0 auto; padding: 40px 20px 80px; display: grid; grid-template-columns: minmax(0, 680px) minmax(0, 1fr); column-gap: 50px; }
.article { min-width: 0; }
.cover { display: block; width: 100%; margin-bottom: 40px; }
.a-head { text-align: center; margin-bottom: 44px; }
.a-head h1 { margin: 0 0 12px; font-size: 28px; font-weight: 600; line-height: 1.42; letter-spacing: -0.03em; }
.a-meta { margin: 0 0 16px; font-size: 13px; color: var(--faint); }
.a-badge { color: var(--navy); font-weight: 800; letter-spacing: 0.02em; }
.a-author { display: grid; justify-items: center; gap: 6px; margin: 0 0 14px; font-size: 14px; }
.a-author i { font-family: Georgia, serif; color: var(--muted); }
.a-actions { display: flex; justify-content: center; gap: 6px; margin: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 16px; flex: none; }
.avatar.sm { width: 36px; height: 36px; font-size: 14px; }

.prose { font-size: 16px; line-height: 1.85; color: #222; }
.prose[data-size="lg"] { font-size: 18px; }
.prose[data-size="xl"] { font-size: 20px; }
.prose p { margin: 0 0 1.35em; }
.prose h2 { margin: 2.4em 0 0.9em; font-size: 1.3em; line-height: 1.45; color: var(--navy); letter-spacing: -0.02em; }
.prose h3 { margin: 1.8em 0 0.6em; font-size: 1.1em; }
.prose a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { margin: 0 0 1.35em; padding-left: 1.3em; }
.prose li { margin-bottom: 0.3em; }
.prose img { max-width: 100%; height: auto; display: block; margin: 0 auto 1.35em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose strong { font-weight: 700; }
.prose blockquote { margin: 2em 0; padding: 0 12%; text-align: center; font-family: "Nanum Myeongjo", Georgia, serif; font-size: 1.08em; color: var(--ink-2); position: relative; }
.prose blockquote::before, .prose blockquote::after { display: block; font-size: 38px; line-height: 1; color: #c7ccc4; font-family: Georgia, serif; }
.prose blockquote::before { content: "\201C"; margin-bottom: 8px; }
.prose blockquote::after { content: "\201D"; margin-top: 4px; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1.35em; font-size: 0.9em; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose th { background: var(--soft); }
.prose code { background: var(--soft); padding: 1px 5px; border-radius: 3px; font-size: 0.9em; }

/* 페이월: 미리보기 끝이 흐려지고 아래에 가입 버튼 */
.prose.locked { position: relative; max-height: none; }
.prose.locked { padding-bottom: 32px; }
.prose.locked::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 220px; background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 55%); }
.paywall { text-align: center; padding: 8px 0 12px; }
.pw-title { display: block; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.pw-desc { margin: 0 0 40px; font-size: 14px; color: var(--ink-2); }
.pw-btn { display: flex; align-items: center; justify-content: space-between; width: 600px; max-width: 100%; height: 52px; margin: 0 auto; padding: 0 20px; border-radius: 4px; background: linear-gradient(100deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; box-shadow: 0 6px 16px rgba(22, 38, 74, 0.28); }
.pw-btn:hover { filter: brightness(1.12); }
.pw-btn-title { font-size: 15px; font-weight: 700; color: rgba(255, 255, 255, 0.88); }
.pw-go { font-size: 20px; display: inline-flex; }
.pw-login { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.pw-login a { color: var(--navy); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.nudge { display: grid; gap: 2px; margin: 36px 0 0; padding: 18px 20px; border-radius: 6px; background: var(--soft); border: 1px solid var(--line); }
.nudge strong { font-size: 15px; color: var(--navy); }
.nudge span { font-size: 14px; color: var(--ink-2); }
.author-box { display: flex; gap: 12px; margin-top: 48px; padding: 4px 0 4px 20px; border-left: 2px solid var(--line); }
.info .author-box { margin-top: 0; }
.author-box strong { display: block; font-size: 15px; margin: 2px 0 6px; }
.author-box strong span { font-weight: 500; color: var(--muted); font-size: 13px; margin-left: 4px; }
.author-box p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink-2); }

.side { border-left: 1px solid var(--line-2); padding-left: 30px; min-width: 0; }
.side-sec { margin-bottom: 44px; }
.side-sec h3 { margin: 0 0 14px; font-size: 18px; letter-spacing: -0.02em; }
.side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.side-list a { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 6px; }
.side-list.ranked a { grid-template-columns: 18px minmax(0, 1fr) 64px; }
.side-list em { font-weight: 800; font-size: 17px; color: var(--ink); }
.side-text { min-width: 0; display: grid; gap: 4px; }
.side-text strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 600; line-height: 1.45; }
.side-text span { font-size: 12px; color: var(--muted); display: inline-flex; gap: 3px; align-items: center; }
.side-thumb { position: relative; width: 64px; height: 64px; border-radius: 4px; overflow: hidden; }
.side-thumb img { width: 100%; height: 100%; object-fit: cover; }
.side-thumb.gen span { font-size: 8px; inset: 6px; }
.side-join { display: grid; gap: 6px; padding: 20px; border-radius: 6px; background: var(--soft); }
.side-join strong { font-size: 15px; }
.side-join span { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.side-join .btn-sub { min-width: 0; width: 100%; }

/* 로그인·가입·MY·안내 */
.auth, .sheet { max-width: 460px; margin: 48px auto 72px; padding: 36px 32px; background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); }
.auth h1, .sheet h1 { margin: 0 0 8px; font-size: 24px; letter-spacing: -0.03em; }
.auth h2 { margin: 32px 0 8px; font-size: 17px; }
.lead { margin: 0 0 22px; color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.hint { color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.en { color: var(--muted); font-size: 0.92em; }
.plan { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 16px; margin-bottom: 22px; border: 1.5px solid var(--navy); border-radius: 6px; }
.plan strong { display: block; font-size: 15px; }
.plan > div span { font-size: 13px; color: var(--ink-2); }
.form label { display: grid; gap: 6px; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.form label small { font-weight: 400; color: var(--muted); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form input[type="email"], .form input[name="name"], .form input.code, .form select { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #d6dad3; border-radius: 4px; font: inherit; font-weight: 400; font-size: 15px; background: #fff; color: var(--ink); }
.form input.code { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; }
.form input.code::placeholder { letter-spacing: 0; font-weight: 400; text-transform: none; }
.form input:focus, .form select:focus { outline: 2px solid rgba(22, 38, 74, 0.25); border-color: var(--navy); }
.consent { margin: 4px 0 18px; padding: 14px 16px; border-radius: 6px; background: var(--page); }
.consent .check { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-weight: 500; }
.consent .check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--navy); flex: none; }
.consent details { margin: 2px 0 10px 27px; font-size: 13px; color: var(--ink-2); }
.consent details:last-child { margin-bottom: 0; }
.consent summary { cursor: pointer; color: var(--muted); }
.consent dl { margin: 8px 0 0; display: grid; grid-template-columns: 5rem 1fr; gap: 4px 10px; }
.consent dt { font-weight: 700; }
.consent dd { margin: 0; }
.consent details p { margin: 8px 0 0; line-height: 1.6; }
.consent a { color: var(--navy); text-decoration: underline; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0 0 14px; padding: 10px 12px; border-radius: 4px; background: #fdecea; color: #a4281b; font-size: 14px; }
.auth-alt { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.auth-alt a { color: var(--navy); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.me .kv { margin-bottom: 8px; }
.logout { margin-top: 36px; text-align: right; }

.policy { max-width: 760px; margin: 40px auto 72px; padding: 36px 40px; background: #fff; border-radius: 8px; font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.policy h1 { margin: 0 0 16px; color: var(--ink); font-size: 26px; }
.policy h2 { margin: 30px 0 8px; font-size: 17px; color: var(--ink); }
.policy table { border-collapse: collapse; width: 100%; font-size: 14px; }
.policy th, .policy td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.policy th { background: var(--soft); }
.policy a { color: var(--navy); text-decoration: underline; }

.foot { border-top: 1px solid var(--line-2); background: #fff; }
.foot-inner { max-width: var(--wrap); margin: 0 auto; padding: 24px 20px 36px; color: var(--muted); font-size: 12px; }
.foot-inner p { margin: 0 0 4px; }
.foot-copy { color: var(--faint); }
.to-top { position: fixed; right: 24px; bottom: 24px; width: 44px; height: 44px; border: 1px solid #d6dad3; border-radius: 4px; background: #fff; color: var(--ink-2); font-size: 20px; display: grid; place-items: center; cursor: pointer; z-index: 10; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.to-top.show { opacity: 1; pointer-events: auto; }

/* 좁은 화면: 사이드바는 본문 아래로, 카드는 한 줄 */
@media (max-width: 980px) {
  .viewer { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .side { border-left: 0; padding-left: 0; margin-top: 56px; border-top: 1px solid var(--line-2); padding-top: 32px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .featured { grid-template-columns: repeat(3, 78%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .feat { scroll-snap-align: start; }
}
@media (max-width: 640px) {
  .ch-head { flex-direction: column; align-items: stretch; }
  .ch-name { font-size: 22px; }
  .ch-actions .btn-sub { flex: 1; }
  .tabs { gap: 40px; }
  .card { grid-template-columns: minmax(0, 1fr) 76px; padding: 18px; column-gap: 14px; }
  .card-thumb { width: 76px; height: 76px; }
  .a-head h1 { font-size: 23px; }
  .top-article .logo { display: none; }
  .top-channel { position: static; transform: none; max-width: 75%; font-size: 17px; }
  .auth, .sheet, .policy { margin: 20px 12px 48px; padding: 28px 20px; }
  .form .row { grid-template-columns: 1fr; }
  .to-top { right: 14px; bottom: 14px; }
}
