:root {
  color-scheme: light dark;
  --bg: #14100c;
  --box: #0d0a07;
  --border: rgba(245, 236, 217, 0.14);
  --border-hover: rgba(249, 182, 79, 0.55);
  --text: #f5ecd9;
  --muted: #c2b6a2;
  --dim: #a99d89;
  --accent: #F9B64F;
  --link: #F9B64F;
  --raised: rgba(245, 236, 217, 0.08);
  --on-accent: #14100c;
  --font: system-ui, -apple-system, "Pretendard", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Noto Sans CJK KR", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #faf6ee;
    --border: rgba(42, 31, 20, 0.14);
    --border-hover: rgba(187, 116, 0, 0.55);
    --text: #2a1f14;
    --muted: #5a4a38;
    --dim: #6d5d4a;
    --accent: #BB7400;
    --link: #8a5500;
    --raised: rgba(42, 31, 20, 0.07);
    --on-accent: #fff8ea;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

a { color: var(--link); text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible, .skip:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2.5rem, 46rem); margin-inline: auto; }

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
}
.brand img { width: 1.1rem; height: auto; display: block; }

.lang {
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  text-decoration: none;
  line-height: 1.5;
}
.lang:hover { color: var(--text); border-color: var(--border-hover); }

.home main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
}
.home .wrap, .home .site-footer .wrap { width: min(100%, 36.25rem); }
.home .hero { width: 100%; max-width: 36.25rem; }

.hero-head { text-align: center; margin-bottom: 2rem; }

.lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
.lockup img { width: 17px; height: 42px; display: block; flex-shrink: 0; }

h1 {
  font-size: clamp(1.65rem, 4.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0;
}

.desc {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 30rem;
  margin: 0 auto;
}

.install-box {
  background: var(--box);
  color: #f5ecd9;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin: 2.5rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.install-header {
  background: rgba(245, 236, 217, 0.04);
  border-bottom: 1px solid rgba(245, 236, 217, 0.14);
  padding: 0.6rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: #a99d89;
}

.dots { display: flex; gap: 6px; }
.dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(245, 236, 217, 0.18);
}

.install-body {
  padding: 1rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.install-cmd {
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: nowrap;
}
.install-cmd .prompt { color: #F9B64F; user-select: none; margin-right: 0.5rem; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  background: rgba(245, 236, 217, 0.08);
  border: 1px solid rgba(245, 236, 217, 0.14);
  color: #f5ecd9;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
}
.copy-btn[hidden] { display: none; }
.copy-btn:hover { background: rgba(245, 236, 217, 0.16); border-color: rgba(249, 182, 79, 0.55); }
.copy-btn:focus-visible { outline-color: #F9B64F; }

h2 { font-size: 1.45rem; line-height: 1.35; margin: 3rem 0 1rem; }

p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.4rem; }

code { font-family: var(--mono); font-size: 0.92em; }
p code, li code, td code {
  background: var(--raised);
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
}

.note {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

table { border-collapse: collapse; width: 100%; margin: 0 0 1.25rem; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }

.doc { padding-block: 1.5rem 2rem; }
.doc h1 { font-size: clamp(1.65rem, 5.5vw, 2.2rem); margin-bottom: 0.5rem; }
.meta { color: var(--muted); font-size: 0.9rem; }

.site-footer { margin-top: 2rem; }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
  border-top: 1px solid var(--border);
  padding-block: 1.5rem 2rem;
  font-size: 0.8rem;
  color: var(--dim);
}
.site-footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--text); }
.site-footer nav a.lang:hover { color: var(--text); }
.home .site-footer { margin-top: 0; padding-inline: 1.25rem; }

@media (max-width: 30rem) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; left: -9999px; }
  tr { border-bottom: 1px solid var(--border); padding-block: 0.5rem; }
  td, th { border: 0; padding: 0.15rem 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .copy-btn, .lang, .site-footer nav a { transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
}
