﻿:root {
  color-scheme: light dark;
  --paper: #f7f6f2; --surface: #fffefa; --ink: #233633; --muted: #5c6c67;
  --line: #d8dfd8; --accent: #176451; --wash: #eaf1eb; --code: #e8eee8;
  --shadow: 0 8px 28px #23363308;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif; font-size: 17px; line-height: 1.85; word-break: keep-all; overflow-wrap: anywhere; }
header, main, footer { max-width: 1040px; margin: auto; padding: 28px 40px; }
a { color: var(--accent); text-underline-offset: .25em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 3px; }
.skip-link { position: absolute; left: 20px; top: -100px; z-index: 2; padding: 8px 16px; background: var(--surface); }
.skip-link:focus { top: 12px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-size: 1.1rem; font-weight: 800; text-decoration: none; color: var(--ink); }
.brand-mark { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--paper); font: bold 24px monospace; }
nav { display: flex; flex-wrap: wrap; gap: 20px; font-size: .85rem; }
nav a { text-decoration: none; color: var(--muted); }
h1, h2, h3 { color: var(--ink); }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); line-height: 1.35; letter-spacing: -.045em; margin: 16px 0 24px; text-wrap: balance; }
h2 { font-size: 1.45rem; margin-top: 3rem; line-height: 1.5; letter-spacing: -.025em; }
h3 { margin-top: 2rem; line-height: 1.5; }
p { margin: 1.25rem 0; }
.eyebrow { color: var(--accent); font-size: .78rem; font-weight: 750; letter-spacing: .1em; margin: 0; }
.hero { padding: 48px 0 44px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(2.8rem, 7vw, 4.8rem); margin: 18px 0; }
.intro { font-size: clamp(1.15rem, 2.7vw, 1.55rem); line-height: 1.65; letter-spacing: -.025em; }
.hero-note { color: var(--muted); font-size: .9rem; margin-bottom: 0; }
.section-heading { display: flex; align-items: baseline; gap: 12px; margin: 32px 0 20px; }
.section-heading h2 { font-size: 1rem; margin: 0; }
.section-heading span, time { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
time { display: block; }
.posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; list-style: none; padding: 0; margin: 0; }
.posts li { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.posts li:hover, .posts li:focus-within { border-color: var(--accent); }
.posts h2 { font-size: 1.25rem; line-height: 1.55; margin: 10px 0 14px; }
.posts a { color: var(--ink); text-decoration: none; }
.posts a:hover { color: var(--accent); text-decoration: underline; }
.post-summary { color: var(--muted); font-size: .9rem; line-height: 1.8; margin: 0; }
article, .tools, .related, .support { max-width: 740px; margin-left: auto; margin-right: auto; }
.article-heading { padding: 40px 0 32px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
article > p { line-height: 1.95; }
pre { max-width: 100%; background: #1f2c2a; color: #edf4ef; padding: 24px; border-radius: 12px; overflow: auto; white-space: pre; word-break: normal; overflow-wrap: normal; line-height: 1.7; }
code { font-family: Consolas, "SFMono-Regular", monospace; font-size: .9em; }
p code, .speech code, li code, td code { background: var(--code); padding: .15em .35em; border-radius: 4px; }
blockquote { margin: 28px 0; padding: 16px 24px; background: var(--wash); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.dialogue { --speaker-color: var(--accent); display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 18px; margin: 20px 0 0; align-items: start; }
.dialogue.right { grid-template-columns: minmax(0, 1fr) 64px; }
.dialogue.right .speaker { grid-column: 2; grid-row: 1; }
.dialogue.right .speech { grid-column: 1; grid-row: 1; justify-self: end; }
.dialogue.left.continued .speech { grid-column: 2; }
.dialogue.continued { margin-top: 6px; }
.dialogue[data-speaker="박도현"] { --speaker-color: #876121; }
.dialogue[data-speaker="정바다"] { --speaker-color: #426aab; }
.dialogue[data-speaker="박도은"] { --speaker-color: #90547e; }
.speaker { display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 700; color: var(--speaker-color); text-align: center; font-size: .78rem; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background-color: #efe7d6; border: 2px solid var(--surface); outline: 1px solid var(--line); }
.speech { position: relative; justify-self: start; max-width: 100%; min-width: 0; white-space: pre-wrap; background: var(--surface); padding: 14px 20px; border: 1px solid var(--line); border-radius: 16px; font-size: .95rem; box-shadow: var(--shadow); }
.dialogue:not(.continued) .speech { margin-top: 10px; }
.dialogue:not(.continued) .speech::before { content: ""; position: absolute; top: 16px; left: -7px; width: 12px; height: 12px; background: var(--surface); border: solid var(--line); border-width: 0 0 1px 1px; transform: rotate(45deg); }
.dialogue.right:not(.continued) .speech::before { left: auto; right: -7px; border-width: 1px 1px 0 0; }
.dialogue.left:not(.continued) .speech { border-top-left-radius: 4px; }
.dialogue.right:not(.continued) .speech { border-top-right-radius: 4px; }
.narration { margin: 22px auto 0; max-width: 85%; text-align: center; color: var(--muted); font-size: .82rem; line-height: 1.7; }
.narration + .dialogue { margin-top: 22px; }
.table-wrap { overflow-x: auto; margin: 28px 0; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 16px; text-align: left; vertical-align: top; }
th { background: var(--wash); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
footer { margin-top: 64px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); padding-bottom: 48px; }
.disclosure { color: var(--muted); font-size: .85rem; }
.tools, .related, .support { margin-top: 40px; padding: 8px 24px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.tools h2, .related h2, .support h2 { margin-top: 1rem; font-size: 1.1rem; }
.tools ul, .related ul { padding-left: 1.2rem; }
.tag { margin-left: 6px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: .75rem; }
.support-link { display: inline-block; padding: 10px 20px; background: var(--accent); color: var(--paper); border-radius: 8px; font-weight: 700; text-decoration: none; }
.support-qr { display: block; width: 160px; height: auto; }
.preview-banner { padding: 16px 20px; margin-bottom: 24px; border: 2px solid #9a6700; border-radius: 10px; background: #fff4ce; color: #624500; }
@media (prefers-color-scheme: dark) {
  :root { --paper: #14201e; --surface: #1c2a27; --ink: #e2eae3; --muted: #acbcb3; --line: #3b4d45; --accent: #95d6b6; --wash: #233b31; --code: #2b4036; --shadow: none; }
  .dialogue[data-speaker="박도현"] { --speaker-color: #e3bd7c; }
  .dialogue[data-speaker="정바다"] { --speaker-color: #9ebff3; }
  .dialogue[data-speaker="박도은"] { --speaker-color: #e1afd1; }
  pre { background: #0e1715; }
  .preview-banner { background: #3a3018; color: #f7d990; border-color: #b28c3b; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  header, main, footer { padding: 22px 20px; }
  .site-header { flex-wrap: wrap; gap: 16px; }
  nav { gap: 16px; }
  .hero { padding: 32px 0; }
  .posts { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .posts li { padding: 22px; }
  .article-heading { padding-top: 24px; }
  .dialogue { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; }
  .dialogue.right { grid-template-columns: minmax(0, 1fr) 48px; }
  .avatar { width: 44px; height: 44px; }
  .speech { padding: 14px 16px; }
  pre { padding: 18px; }
}
@media(max-width:480px){.support-qr{display:none}}
@media(min-width:481px){.support-link{display:none}}
@media (prefers-reduced-motion: no-preference) { a, .posts li { transition: color .15s, border-color .15s; } }
