/* 아는척뉴스 — 종이 신문 느낌 + 형광펜으로 그은 '아는 척 한마디' */
:root {
  --paper: #faf7f2;
  --ink: #1c1a17;
  --ink-2: #3d3934;
  --muted: #7a736a;
  --rule: #e6dfd3;
  --accent: #d2481f;      /* 주홍 */
  --hl: #ffe27a;          /* 형광펜 */
  --hl-ink: #1c1a17;
  --soft: #f2ede4;
  --link: #a8381a;
  --tabbar-h: 60px;
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161513;
    --ink: #eeeae3;
    --ink-2: #cfc9bf;
    --muted: #958e83;
    --rule: #2e2b27;
    --accent: #ff7a4d;
    --hl: #4a3f12;
    --hl-ink: #fff1bf;
    --soft: #1f1d1a;
    --link: #ff9b78;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  word-break: keep-all;          /* 한국어 단어 중간에서 줄바꿈하지 않기 */
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
a { color: var(--link); }
main { max-width: 620px; margin: 0 auto; padding: 0 20px 24px; outline: none; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }

/* 상단 */
.topbar {
  max-width: 620px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 20px 0;
}
.wordmark {
  font-weight: 800; font-size: 17px; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.wordmark span { color: var(--accent); }

.masthead { padding: 22px 0 18px; border-bottom: 2px solid var(--ink); }
.kicker { margin: 0; font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: 0.04em; }
.masthead h1 { margin: 2px 0 4px; font-size: 30px; line-height: 1.25; font-weight: 800; letter-spacing: -0.03em; }
.sub { margin: 0; color: var(--ink-2); font-size: 15px; font-weight: 500; }
.ai-note {
  margin: 12px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted);
  padding-left: 22px; position: relative;
}
.ai-note::before {
  content: 'AI'; position: absolute; left: 0; top: 2px;
  font-size: 9px; font-weight: 800; line-height: 1; padding: 3px 2px;
  border: 1.5px solid var(--muted); border-radius: 3px;
}
.banner {
  margin: 16px 0 0; padding: 10px 14px; background: var(--soft); border-radius: 8px;
  font-size: 14px; color: var(--ink-2);
}

/* 이슈 카드 */
.card { padding: 26px 0 24px; border-bottom: 1px solid var(--rule); cursor: pointer; }
.card:last-child { border-bottom: 2px solid var(--ink); }
.card-meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.num { font-size: 15px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.cat { font-size: 13px; font-weight: 700; color: var(--muted); }
.card-title { margin: 0 0 12px; font-size: 21px; line-height: 1.42; font-weight: 750; letter-spacing: -0.025em; }

.summary { margin: 0; padding: 0; list-style: none; color: var(--ink-2); }
.summary li { position: relative; padding-left: 16px; margin-bottom: 6px; }
.summary li::before {
  content: ''; position: absolute; left: 2px; top: 0.78em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--muted);
}

/* 간판 항목: 아는 척 한마디 */
.talk { margin: 20px 0 0; padding: 14px 16px 16px; background: var(--soft); border-radius: 12px; }
.talk figcaption {
  display: block; font-size: 13px; font-weight: 800; color: var(--accent);
  margin-bottom: 6px; letter-spacing: 0.02em;
}
.talk figcaption::before { content: '“ '; font-size: 16px; }
.talk blockquote {
  margin: 0; font-size: 18px; line-height: 1.65; font-weight: 650; color: var(--hl-ink);
  letter-spacing: -0.015em;
}
/* 형광펜으로 그은 듯한 배경 (줄마다 이어짐) */
.talk blockquote {
  display: inline;
  background: linear-gradient(transparent 12%, var(--hl) 12%, var(--hl) 92%, transparent 92%);
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
  padding: 0 4px;
}

/* 더 알아보기 */
.more { margin-top: 18px; }
.more summary {
  list-style: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  min-height: 46px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 10px;
  font-size: 15px; cursor: pointer; user-select: none;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::after {
  content: ''; margin-left: auto; width: 8px; height: 8px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s;
}
.more[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.more[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; background: var(--soft); }
.more-label { font-weight: 700; }
.more-hint { color: var(--muted); font-size: 13px; }
.more-body {
  border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 10px 10px;
  padding: 4px 16px 12px; cursor: auto; font-size: 16px;
}
.more-body section { padding: 14px 0; border-bottom: 1px dashed var(--rule); }
.more-body section:last-of-type { border-bottom: 0; }
.more-body h3 { margin: 0 0 6px; font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: 0.03em; }
.more-body p { margin: 0; }
.terms { margin: 0; }
.terms div { margin-bottom: 8px; }
.terms dt { font-weight: 700; display: inline; }
.terms dt::after { content: ' — '; color: var(--muted); font-weight: 400; }
.terms dd { display: inline; margin: 0; color: var(--ink-2); }
.views { margin: 0; padding: 0; list-style: none; }
.views li { margin-bottom: 12px; padding-left: 12px; border-left: 3px solid var(--rule); }
.views b { display: block; font-size: 14px; }
.views p { color: var(--ink-2); }
.sources { margin: 0; padding: 0; list-style: none; }
.sources li { margin-bottom: 4px; }
.sources a {
  display: block; padding: 8px 0; text-decoration: none; color: var(--ink-2); font-size: 15px; line-height: 1.5;
}
.sources a:active { opacity: .6; }
.src { display: block; font-size: 12px; font-weight: 700; color: var(--link); }
.fold {
  display: block; width: 100%; margin-top: 6px; min-height: 44px;
  background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer;
}

/* 끝맺음 */
.endnote { padding: 28px 0 8px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; }
.endnote .done { color: var(--ink); font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; margin-top: 12px;
  border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 700; font-size: 15px;
}
.empty { padding: 56px 0; text-align: center; color: var(--ink-2); }
.loading { padding: 56px 0; text-align: center; color: var(--muted); }

/* 지난 호 */
.days { margin: 0; padding: 0; list-style: none; }
.day {
  display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 0;
  border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink);
}
.day .d { flex: 0 0 48px; display: flex; flex-direction: column; line-height: 1.2; }
.day .d b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.day .d i { font-style: normal; font-size: 12px; color: var(--muted); }
.day.weekend .d i { color: var(--accent); }
.day .h { flex: 1; font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.day .h em { font-style: normal; color: var(--muted); font-size: 13px; }
.day.none { color: var(--muted); }
.day.none .h { font-size: 14px; }
.day.none .d b { color: var(--muted); font-weight: 600; }
.tag { flex: none; font-size: 11px; font-weight: 800; color: var(--paper); background: var(--accent); padding: 2px 7px; border-radius: 999px; }

/* 하단 탭 (엄지로 누르기 쉽게) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; justify-content: center; gap: 8px;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 8px 20px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--rule);
}
.tabbar a {
  flex: 1; max-width: 290px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px;
}
.tabbar a[aria-current] { color: var(--ink); background: var(--soft); }

@media (min-width: 700px) {
  .masthead h1 { font-size: 34px; }
  .card-title { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* 아침 알림 상자 (js/push.js) */
.pushbox { margin: 8px 0 24px; padding: 18px 18px 16px; border: 1px solid var(--rule); border-radius: 14px; background: var(--soft); font-size: 15px; line-height: 1.6; }
.pushbox:empty { display: none; }
.pushbox h2 { margin: 0 0 4px; font-size: 17px; }
.pushbox p { margin: 0 0 12px; color: var(--ink-2); }
.pushbox .steps { margin: 0 0 4px; padding-left: 20px; color: var(--ink-2); }
.pushbox .steps li { margin-bottom: 4px; }
.pushbox .tip, .pushbox .msg { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.pushbox .msg { color: var(--accent); }
.pushbox .linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.pushbox .btn { border: 0; margin-top: 0; font-family: inherit; cursor: pointer; }
