:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #edf1f6;
  --text: #141a22;
  --muted: #5a6573;
  --line: #dce3eb;
  --accent: #2b6fc4;
  --accent-ink: #ffffff;
  --accent-soft: #e2edf9;
  --shadow: 0 18px 50px rgba(20, 30, 45, .14);
  --radius: 14px;
  --font: "Pretendard", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --surface: #151a21;
    --surface-2: #1c222b;
    --text: #e7ebf0;
    --muted: #98a3b0;
    --line: #29303a;
    --accent: #6aa5ea;
    --accent-ink: #0b1018;
    --accent-soft: #19283a;
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
pre { font-family: var(--mono); font-size: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

/* One language at a time */
html[data-lang="ko"] [lang="en"]:not(html) { display: none !important; }
html[data-lang="en"] [lang="ko"]:not(html) { display: none !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.brand img { width: 26px; height: 26px; }
.brand { min-width: 0; }
.brand span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .topbar .wrap { gap: 12px; } .brand { font-size: 14px; gap: 8px; } }
.nav { display: flex; gap: 18px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; white-space: nowrap; }
.nav a:hover { color: var(--text); }
@media (max-width: 720px) { .nav { display: none; } .lang-toggle { margin-left: auto; } }
.lang-toggle { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: none; }
.lang-toggle button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; padding: 4px 10px; cursor: pointer; }
.lang-toggle button.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* Hero */
.hero { padding: 72px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(32px, 5.5vw, 54px); line-height: 1.15; letter-spacing: -.025em; margin: 0 0 18px; }
.hero p.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 680px; margin: 0 auto 30px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 20px; border-radius: 10px; font-weight: 600; text-decoration: none; font-size: 16px;
  border: 1px solid var(--line); color: var(--text); background: var(--surface);
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.disabled { opacity: .6; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }
.price { color: var(--muted); font-size: 14px; margin-top: 14px; }

.shot {
  margin: 44px auto 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line); max-width: 1000px;
}

/* Sections */
section { padding: 56px 0; }
section h2 { font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -.02em; margin: 0 0 10px; line-height: 1.25; }
section .sub { color: var(--muted); margin: 0 0 30px; max-width: 720px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .ico { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 12px; }
.card .ico svg { width: 19px; height: 19px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
ul.checks { list-style: none; padding: 0; margin: 0; }
ul.checks li { padding-left: 26px; position: relative; margin: 8px 0; }
ul.checks li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }

/* Docs pages */
.doc { padding: 48px 0 72px; }
.doc .wrap { max-width: 860px; }
.doc h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; margin: 0 0 8px; line-height: 1.2; }
.doc .meta { color: var(--muted); margin-bottom: 32px; }
.doc h2 { font-size: 22px; margin: 40px 0 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 18px; margin: 28px 0 8px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 12px 0 18px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.doc td:first-child { white-space: nowrap; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 20px; margin-bottom: 24px; }
.toc ol { margin: 6px 0 0; padding-left: 20px; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
footer a { color: var(--muted); }
footer .spacer { flex: 1; }

/* Landing images: gadgets alone on a transparent background, at their real on-screen size (2x files). */
img.gadget { display: block; max-width: 100%; height: auto; margin: 0 auto; border: 0; border-radius: 0; box-shadow: none; }
img.gadget.hero-shot { margin-top: 8px; }
.split img.gadget { border: 0; box-shadow: none; border-radius: 0; }
