/* 두들오버 안내·소개 페이지 공용 (편집기는 style.css 가 같은 토큰을 씀)
   색: 밝은 화면은 차가운 회색 종이 + 먹색 글씨, 어두운 화면은 상영관 회색. 강조는 크레파스 노랑 하나(글씨색이 아니라 '형광펜' 바탕으로만).
   모서리: 판(카드·표·안내 상자) 10px, 버튼·입력 8px, 그 밖은 0. */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");
@import url("https://fonts.googleapis.com/css2?family=Gaegu:wght@700&display=swap");

:root {
  color-scheme: light dark;
  --paper: #f2f3f5; --surface: #fafbfc; --ink: #17191e; --body: #2f343d; --muted: #555c69; --line: #d6d9df;
  --accent: #f5c400; --on-accent: #17191e; --mark: rgba(245, 196, 0, .45);
  --link: #1d5bb8; --warn-bg: #fff3d6; --warn-line: #e3c27a; --note-bg: #e9f0fb; --note-line: #b7cbea;
  --code: #e6e8ec; --focus: #1d5bb8;
  --r-panel: 10px; --r-ctl: 8px;
  --font: "Pretendard Variable", Pretendard, system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --hand: "Gaegu", "Pretendard Variable", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121419; --surface: #1a1d24; --ink: #f1f2f5; --body: #c9ced7; --muted: #a0a7b3; --line: #2d323c;
    --accent: #ffcc33; --on-accent: #17191e; --mark: rgba(255, 204, 51, .32);
    --link: #8fc3ff; --warn-bg: #2b2517; --warn-line: #6b5326; --note-bg: #18212e; --note-line: #2f4a6b;
    --code: #252932; --focus: #8fc3ff;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.75 var(--font); word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: var(--r-ctl); font-weight: 600; z-index: 20; }
.skip:focus { top: 8px; }

/* 상단 메뉴 */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top nav { max-width: 1120px; margin: 0 auto; padding: 0 20px; height: 60px; display: flex; gap: 22px; align-items: center; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }
.top nav a[aria-current] { font-weight: 600; }
.brand { margin-right: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--ink) !important; font: 700 24px/1 var(--hand); letter-spacing: -.01em; }
.brand img { width: 28px; height: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 20px; border-radius: var(--r-ctl); font: 600 16px/1 var(--font); text-decoration: none; white-space: nowrap; border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, background-color .15s ease; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn.ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn.ghost:hover { border-color: var(--muted); }
.top .btn { min-height: 36px; padding: 0 14px; font-size: 14px; color: var(--on-accent); }
.top .btn:hover { color: var(--on-accent); }

/* 글 페이지 */
.wrap { max-width: 1120px; margin: 0 auto; padding: 36px 20px 72px; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 56px; }
.wrap.noside { grid-template-columns: minmax(0, 1fr); max-width: 780px; }
.side { position: sticky; top: 84px; align-self: start; font-size: 15px; }
.side h2 { margin: 26px 0 8px; color: var(--ink); font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.side h2:first-child { margin-top: 0; }
.side ul { list-style: none; margin: 0 0 0 1px; padding: 0 0 0 12px; border-left: 1px solid var(--line); }
.side li a { display: block; padding: 5px 10px; margin-left: -13px; border-left: 2px solid transparent; border-radius: 0 var(--r-ctl) var(--r-ctl) 0; color: var(--muted); text-decoration: none; line-height: 1.45; font-size: 14.5px; }
.side li a:hover { color: var(--ink); background: var(--surface); }
.side li a[aria-current] { color: var(--ink); font-weight: 600; background: var(--surface); border-left-color: var(--accent); }
article { min-width: 0; max-width: 720px; }
article h1 { font: 700 clamp(30px, 4vw, 40px)/1.25 var(--font); letter-spacing: -.02em; margin: 0 0 10px; text-wrap: balance; }
article .lead { color: var(--muted); font-size: 19px; margin: 0 0 28px; }
article h2 { font-size: 25px; font-weight: 750; line-height: 1.35; letter-spacing: -.02em; margin: 60px 0 14px; padding-top: 22px; border-top: 1px solid var(--line); text-wrap: balance; scroll-margin-top: 80px; }
article h3 { font-size: 19px; font-weight: 700; line-height: 1.4; margin: 34px 0 6px; padding-left: 11px; border-left: 3px solid var(--accent); scroll-margin-top: 80px; }
article p { margin: 10px 0; }
article p, article li, article td { color: var(--body); }
article h2 + p, article h3 + p, article h2 + ul, article h3 + ul, article h2 + ol { margin-top: 6px; }
article ol, article ul { padding-left: 24px; }
article li { margin: 6px 0; }
article li::marker { color: var(--muted); }
code, kbd { font: 500 .86em/1 ui-monospace, "D2Coding", Consolas, monospace; background: var(--code); border-radius: 5px; padding: 2px 6px; }
kbd { box-shadow: inset 0 -2px 0 var(--line); }
.menu { background: linear-gradient(transparent 58%, var(--mark) 58%); font-weight: 600; padding: 0 1px; }
.note, .caution { border-radius: var(--r-panel); padding: 14px 18px; margin: 18px 0; font-size: 16px; border: 1px solid; }
.note { background: var(--note-bg); border-color: var(--note-line); }
.caution { background: var(--warn-bg); border-color: var(--warn-line); }
.note > :first-child, .caution > :first-child { margin-top: 0; }
.note > :last-child, .caution > :last-child { margin-bottom: 0; }
.tablewrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.6; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font-weight: 600; color: var(--muted); font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 18px 0; border-top: 1px solid var(--line); }
.cards a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.cards a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.cards b { display: block; font-size: 17px; }
.cards span { color: var(--muted); font-size: 15px; line-height: 1.55; display: block; margin-top: 2px; }
.prevnext { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 16px; }
.prevnext a { text-decoration: none; font-weight: 600; }
.prevnext small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.prevnext .next { text-align: right; margin-left: auto; }
.updated { color: var(--muted); font-size: 14px; margin-top: 32px; }
.ad-slot:not(:empty) { margin: 40px 0; text-align: center; min-height: 100px; }
.ad-slot .label { color: var(--muted); font-size: 12px; }
footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer.site div { max-width: 1120px; margin: 0 auto; padding: 22px 20px 30px; display: flex; gap: 8px 22px; flex-wrap: wrap; align-items: center; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--ink); }
footer.site .fbrand { font: 700 20px/1 var(--hand); color: var(--ink); margin-right: auto; }

@media (max-width: 860px) {
  .side ul { border-left: 0; padding-left: 0; }
  .side li a { margin-left: 0; border-left: 0; border-radius: var(--r-ctl); }
  .wrap { grid-template-columns: minmax(0, 1fr); gap: 4px; padding-top: 16px; }
  .side { position: static; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
  .side ul { display: flex; flex-wrap: wrap; gap: 2px 4px; }
  .side li a { margin-left: 0; padding: 6px 10px; }
  .side h2 { display: none; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .top nav { gap: 14px; padding: 0 16px; }
  .top nav .optional { display: none; }
  body { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
