/* 유튜브 요약 노트 화면. 색·글꼴은 초안 검토 페이지와 같은 체계(초록 계열), 글은 읽기 좋은 한 단 */
:root {
  --bg: #F1F4F2; --surface: #FFFFFF; --ink: #17211D; --ink2: #3F4D47; --ink3: #66756E;
  --line: #D9E1DC; --accent: #0F7A45; --accent-ink: #0B5C34; --accent-soft: #E1F1E8;
  --chip: #E8EEEA; --warn-bg: #FFF0DC; --warn: #9A4D08; --bad: #B42318; --mark: #FFE9A8;
  --font: 'Noto Sans KR', 'Malgun Gothic', -apple-system, 'Segoe UI', sans-serif;
  --mono: Consolas, 'D2Coding', monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1613; --surface: #18211D; --ink: #E8EFEB; --ink2: #B6C3BC; --ink3: #8B9A93;
    --line: #2B3732; --accent: #4FC38A; --accent-ink: #8FE0B5; --accent-soft: #17342A;
    --chip: #223029; --warn-bg: #3A2A14; --warn: #F0B070; --bad: #F4857B; --mark: #5A4A10;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.75;
  word-break: keep-all; overflow-wrap: anywhere;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
}
h1, h2, h3, p, ul { margin: 0; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
main, .top-in { max-width: 720px; margin: 0 auto; }

.top { padding-top: max(14px, env(safe-area-inset-top, 0px)); padding-bottom: 6px; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h1 { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
h1 a { text-decoration: none; }
.nav { display: flex; gap: 4px; }
.link { background: none; border: 0; color: var(--ink2); text-decoration: underline; padding: 8px 8px; min-height: 44px; display: inline-flex; align-items: center; font-size: 15px; }

.primary { background: var(--accent); color: #fff; border: 0; border-radius: 10px; min-height: 46px; padding: 0 22px; font-weight: 700; }
@media (prefers-color-scheme: dark) { .primary { color: #0A1A12; } }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: 15px; font-weight: 500; }
.btn.go { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.go { color: #0A1A12; } }
.btn[aria-pressed="false"] { color: var(--ink3); }

.login { margin-top: 10vh; }
.login form { background: var(--surface); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 1px 3px rgba(23, 33, 29, .08); }
.login label { font-size: 14px; color: var(--ink2); }
.login input { min-height: 48px; padding: 0 14px; border: 1px solid #C2CBC6; border-radius: 10px; background: var(--surface); }
.msg { min-height: 1.4em; font-size: 14px; color: var(--bad); }

.search { margin: 14px 0 6px; }
.search input { width: 100%; min-height: 50px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px; }
.count { font-size: 14px; color: var(--ink3); margin: 6px 2px 12px; }
.cards { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.card a.row { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; text-decoration: none; }
.card a.row:hover { background: var(--accent-soft); border-radius: 14px; }
.card h2 { font-size: 17px; line-height: 1.5; font-weight: 700; }
.card .meta { font-size: 13px; color: var(--ink3); }
.card ul { padding-left: 18px; font-size: 14.5px; color: var(--ink2); line-height: 1.65; display: flex; flex-direction: column; gap: 2px; }
.card li::marker { color: var(--accent); }
.card .snip { font-size: 14.5px; color: var(--ink2); }
mark.hit { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.empty { margin: 32px 0; padding: 24px; text-align: center; color: var(--ink2); background: var(--surface); border-radius: 14px; }

/* 노트 보기 */
.note { display: flex; flex-direction: column; gap: 18px; padding-top: 14px; font-size: 17px; line-height: 1.85; }
.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toast { font-size: 14px; color: var(--accent-ink); min-height: 1.4em; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--accent-ink); }
.note h1 { font-size: clamp(25px, 5.2vw, 34px); line-height: 1.4; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; font-size: 14px; line-height: 1.7; color: var(--ink2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 10px; }
.facts dt { color: var(--ink3); }
.facts dd { margin: 0; min-width: 0; }
.facts a { color: var(--accent-ink); }
.byline { font-size: 14px; color: var(--ink3); }
.note h2 { font-size: 21px; line-height: 1.5; font-weight: 700; margin-top: 10px; text-wrap: balance; }
.note p { font-size: 17px; }
.lead { font-size: 19px; font-weight: 500; }
.note ul, .note ol { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.note li::marker { color: var(--accent); }
.key { background: var(--accent-soft); border-radius: 14px; padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; }
.key h2 { margin: 0; font-size: 15px; color: var(--accent-ink); }
.opinion { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; }
.opinion h2 { margin: 0; font-size: 18px; }
.opinion li::marker { color: var(--warn); }
.ts { font-family: var(--mono); font-size: 12px; font-weight: 500; background: var(--chip); color: var(--ink2); padding: 1px 7px; border-radius: 6px; text-decoration: none; white-space: nowrap; vertical-align: 1px; margin-left: 3px; }
.ts:hover { background: var(--accent-soft); color: var(--accent-ink); }
body.no-ts .ts { display: none; }
.flag { background: var(--warn-bg); color: var(--warn); border-radius: 4px; padding: 0 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.foot { font-size: 13px; color: var(--ink3); border-top: 1px solid var(--line); padding-top: 12px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
