:root {
  --bg: #f6f4f1;
  --card: #ffffff;
  --ink: #1f2328;
  --sub: #5b6470;
  --line: #e6e1da;
  --accent: #c4634a;
  --accent-soft: #fbefea;
  --head: #faf7f3;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --card: #1d2024;
    --ink: #e9eaec;
    --sub: #a2a9b3;
    --line: #2e3238;
    --accent: #e8927b;
    --accent-soft: #2a211f;
    --head: #23272c;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
body::before {
  content: "마이스튜디오";
  display: block;
  padding: 18px 20px 0;
  max-width: 820px;
  margin: 0 auto;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent);
}
main {
  max-width: 820px;
  margin: 12px auto 48px;
  padding: 32px 28px 36px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 24px rgba(0, 0, 0, 0.04);
}
h1 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
h2 {
  margin: 44px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  scroll-margin-top: 16px;
}
h3 { margin: 26px 0 8px; font-size: 17px; }
p { margin: 10px 0; }
ul, ol { margin: 10px 0; padding-left: 22px; }
li { margin: 5px 0; }
li::marker { color: var(--accent); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
b, strong { font-weight: 650; }
.meta { margin: 2px 0; color: var(--sub); font-size: 14px; }
.lead { margin-top: 20px; font-size: 16.5px; }
.note {
  margin: 20px 0;
  padding: 16px 18px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  font-size: 15px;
}
.note p:first-child { margin-top: 0; }
.note > :last-child { margin-bottom: 0; }
.toc {
  margin: 24px 0 8px;
  padding: 14px 18px;
  background: var(--head);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
}
.toc ol { margin: 0; columns: 2; column-gap: 28px; }
.toc li { break-inside: avoid; margin: 3px 0; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.table-wrap {
  margin: 14px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.6; }
th, td { padding: 11px 13px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child > th, tr:last-child > td { border-bottom: 0; }
thead th, tbody th { background: var(--head); font-weight: 650; white-space: nowrap; }
td + td, th + td, th + th { border-left: 1px solid var(--line); }
.doc-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.doc-list li { margin: 0; }
.doc-list a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--head);
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}
.doc-list a::after { content: "→"; float: right; color: var(--accent); }
.doc-list a:hover { border-color: var(--accent); }
footer, .foot { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--sub); font-size: 13.5px; }
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  body::before { padding: 14px 16px 0; }
  main { margin: 10px 0 32px; padding: 22px 16px 28px; border-radius: 0; border-left: 0; border-right: 0; }
  h1 { font-size: 23px; }
  h2 { font-size: 18px; margin-top: 34px; }
  .toc ol { columns: 1; }
  table { font-size: 14px; min-width: 520px; }
  thead th, tbody th { white-space: normal; }
}
@media print {
  body { background: #fff; }
  body::before { display: none; }
  main { border: 0; box-shadow: none; margin: 0; max-width: none; padding: 0; }
  .toc { display: none; }
}
