/* ─── Design tokens ─── */
:root {
  color-scheme: light;
  --bg: #f8f7f4;
  --sidebar-bg: #f2ede3;
  --surface: #ffffff;
  --surface-alt: #f5f2eb;
  --surface-hover: #eee9de;
  --text: #18191c;
  --muted: #55606b;
  --subtle: #7d8590;
  --line: #dcd5c6;
  --line-soft: #eae4d9;
  --brand: #163f4a;
  --brand-bg: #e8f2f0;
  --brand-light: #2a6070;
  --accent: #8f3c2d;
  --gold: #a07528;
  --gold-bg: #fdf6e7;
  --tip: #1a6b3a;
  --tip-bg: #eaf6ee;
  --warn-bg: #fff8ed;
  --code-bg: #f4f0e6;
  --header-h: 58px;
  --sidebar-w: 256px;
  --toc-w: 212px;
  --content-w: 820px;
  --radius: 8px;
  --radius-sm: 5px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117;
  --sidebar-bg: #101820;
  --surface: #161b22;
  --surface-alt: #1c2430;
  --surface-hover: #222d3a;
  --text: #e6edf3;
  --muted: #aab4be;
  --subtle: #8b949e;
  --line: #2d3741;
  --line-soft: #252e38;
  --brand: #7ec8be;
  --brand-bg: #142128;
  --brand-light: #7ec8be;
  --accent: #e07b63;
  --gold: #d4ad5c;
  --gold-bg: #1e1a0e;
  --tip: #4caf77;
  --tip-bg: #0e1f15;
  --warn-bg: #1e1609;
  --code-bg: #0d1117;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.72;
  word-break: keep-all;
}

button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin-top: 0; }

/* ─── Inline code ─── */
code {
  padding: 0.1em 0.34em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86em;
}

/* ─── Keyboard keys ─── */
kbd {
  display: inline-block;
  padding: 0.16em 0.48em;
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.8em;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* ─── Top bar ─── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: var(--header-h);
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
}
[data-theme="dark"] .topbar { background: rgba(22,27,34,0.92); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-mark {
  display: grid;
  width: 30px; height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: var(--brand);
  color: #fff9ec;
  font-size: 0.88rem;
  font-weight: 800;
}
.brand-copy { display: grid; gap: 1px; min-width: 0; }
.brand strong { font-size: 0.93rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand small { color: var(--muted); font-size: 0.73rem; line-height: 1.2; }

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.version-pill {
  padding: 0.3rem 0.64rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.76rem;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.3rem 0.64rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 0.8rem;
}
.theme-toggle:hover, .icon-button:hover { border-color: var(--brand-light); }
.theme-icon { color: var(--gold); font-weight: 800; }

.menu-toggle {
  display: none;
  width: 34px; height: 34px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}
.menu-toggle span { display: block; height: 1.5px; margin: 4px 0; border-radius: 99px; background: var(--text); }

/* ─── Layout ─── */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  min-height: calc(100vh - var(--header-h));
}

/* ─── Sidebar ─── */
.sidebar {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg);
}
.sidebar-header {
  padding: 20px 18px 14px;
  border-bottom: 1px solid var(--line);
}
.sidebar-header strong { display: block; color: var(--text); font-size: 0.82rem; letter-spacing: 0.05em; text-transform: uppercase; }
.sidebar-header span { display: block; margin-top: 2px; color: var(--muted); font-size: 0.75rem; }

.sidebar-nav { display: grid; padding: 10px 10px; gap: 1px; }
.sidebar-nav a {
  border-radius: 6px;
  padding: 0.44rem 0.64rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
  transition: background 0.12s, color 0.12s;
}
.sidebar-nav a:hover { background: var(--surface-hover); color: var(--text); }
.sidebar-nav a.active {
  background: var(--brand-bg);
  box-shadow: inset 3px 0 0 var(--gold);
  color: var(--brand);
  font-weight: 700;
}

/* ─── Main content ─── */
.content {
  width: min(100%, var(--content-w));
  margin: 0 auto;
  padding: 44px 40px 96px;
}

/* ─── Sections ─── */
.doc-section {
  scroll-margin-top: calc(var(--header-h) + 20px);
  padding: 36px 0;
  border-bottom: 1px solid var(--line-soft);
}
.doc-section:first-child { padding-top: 0; }
.doc-section:last-child { border-bottom: none; }

/* ─── Typography ─── */
.breadcrumb { margin: 0 0 10px; color: var(--subtle); font-size: 0.76rem; font-weight: 600; }
.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: var(--brand-bg);
  color: var(--brand-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 14px;
  color: var(--text);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.02em;
}
h2 {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 1.55rem;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
}
h3::before {
  content: "";
  display: block;
  width: 3px;
  height: 14px;
  border-radius: 99px;
  background: var(--gold);
  flex: 0 0 auto;
}

p { color: var(--muted); margin-bottom: 12px; }
p:last-child { margin-bottom: 0; }

.lead {
  max-width: 700px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

/* ─── Feature card grid ─── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 24px 0 0;
}
.feature-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.feature-card:hover { border-color: var(--brand-light); box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.feature-icon {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-bg);
  color: var(--brand-light);
  font-size: 1rem;
  margin-bottom: 10px;
}
.feature-card strong { display: block; color: var(--text); font-size: 0.88rem; font-weight: 700; margin-bottom: 4px; }
.feature-card p { color: var(--muted); font-size: 0.8rem; line-height: 1.5; margin: 0; }

/* ─── Preset card grid ─── */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 20px 0 0;
}
.preset-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.preset-card:hover { border-color: var(--brand-light); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.preset-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
}
.preset-card-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
}
.preset-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.preset-info { flex: 1; min-width: 0; }
.preset-info strong { display: block; color: var(--text); font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.preset-info p { color: var(--muted); font-size: 0.8rem; line-height: 1.5; margin: 0 0 4px; }
.preset-info p.preset-use { color: var(--subtle); font-size: 0.76rem; margin: 0; font-style: italic; }

/* ─── Definition list ─── */
.definition-list { margin: 20px 0 0; border-top: 1px solid var(--line); }
.definition-list div {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}
.definition-list dt { color: var(--brand-light); font-size: 0.85rem; font-weight: 700; }
.definition-list dd { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ─── Figures ─── */
.doc-figure { margin: 0; }
.doc-figure.is-wide { margin: 22px 0 20px; }
.doc-figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.doc-figure figcaption { margin-top: 8px; color: var(--subtle); font-size: 0.82rem; }

/* ─── Annotated figure ─── */
.annotated-figure { margin: 20px 0; }
.annotation-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.annotation-stage img { width: 100%; }


/* ─── Numbered guide (interface cards) ─── */
.numbered-guide {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 20px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  list-style: none;
  overflow: hidden;
  counter-reset: guide;
}
.numbered-guide li {
  position: relative;
  padding: 16px 16px 16px 52px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  counter-increment: guide;
  transition: background 0.12s;
}
.numbered-guide li:hover { background: var(--surface-alt); }
.numbered-guide li:nth-child(2n) { border-right: 0; }
.numbered-guide li:nth-last-child(-n+2) { border-bottom: 0; }
.numbered-guide li:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.numbered-guide li::before {
  position: absolute;
  top: 16px; left: 15px;
  display: grid;
  width: 24px; height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff9ec;
  content: counter(guide);
  font-size: 0.74rem;
  font-weight: 900;
}
.numbered-guide strong { display: block; color: var(--text); font-size: 0.88rem; font-weight: 700; }
.numbered-guide p { margin: 3px 0 0; font-size: 0.83rem; color: var(--muted); }

/* ─── Steps (procedure) ─── */
.procedure-list {
  display: grid;
  gap: 0;
  margin: 20px 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.procedure-list li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 0 14px;
  padding: 0 0 22px;
  counter-increment: step;
}
.procedure-list li:last-child { padding-bottom: 0; }

.procedure-list li::before {
  content: counter(step);
  display: grid;
  width: 28px; height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff9ec;
  font-size: 0.76rem;
  font-weight: 900;
  flex: 0 0 auto;
  margin-top: 1px;
  position: relative;
  z-index: 1;
}

.procedure-list li { position: relative; }
.procedure-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 30px;
  left: 13px;
  width: 2px;
  bottom: 6px;
  background: var(--line);
  border-radius: 99px;
}

.procedure-list li > div,
.procedure-list li > * { grid-column: 2; }
.procedure-list li::before { grid-column: 1; grid-row: 1; }

.procedure-list strong { display: block; color: var(--text); font-size: 0.92rem; font-weight: 700; margin-bottom: 3px; margin-top: 3px; }
.procedure-list p { margin: 0; font-size: 0.88rem; }
.procedure-list em { color: var(--brand-light); font-style: normal; }

/* ─── Callout variants ─── */
.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 12px;
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
}
.callout::before {
  content: attr(data-icon);
  display: block;
  font-size: 0.9rem;
  line-height: 1.72;
  opacity: 0.8;
}
.callout > * { grid-column: 2; }
.callout::before { grid-column: 1; grid-row: 1 / span 10; align-self: start; padding-top: 2px; }
.callout strong { display: block; color: var(--text); font-size: 0.875rem; font-weight: 700; margin-bottom: 3px; }
.callout p { margin: 0; font-size: 0.86rem; }

.callout-tip {
  border-color: rgba(26,107,58,0.25);
  background: var(--tip-bg);
}
.callout-tip strong { color: var(--tip); }

.callout-gold {
  border-color: rgba(160,117,40,0.3);
  background: var(--gold-bg);
}
.callout-gold strong { color: var(--gold); }

.callout-warn {
  border-color: rgba(143,60,45,0.25);
  background: var(--warn-bg);
}
.callout-warn strong { color: var(--accent); }

/* ─── Tables ─── */
.doc-table {
  width: 100%;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-collapse: collapse;
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  font-size: 0.875rem;
}
.doc-table th,
.doc-table td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}
.doc-table th {
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.doc-table td { color: var(--muted); }
.doc-table tbody tr:last-child th,
.doc-table tbody tr:last-child td { border-bottom: 0; }
.doc-table tbody tr:hover td,
.doc-table tbody tr:hover th { background: var(--surface-alt); }
.doc-table thead th {
  background: var(--brand-bg);
  color: var(--brand-light);
  border-bottom: 1px solid var(--line);
}
.doc-table .key-col { width: 180px; }
.doc-table .narrow { width: 20%; }

/* ─── Media row ─── */
.media-row {
  display: grid;
  grid-template-columns: minmax(190px, 29%) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 18px;
}
.media-row .doc-figure img {
  max-height: 360px;
  object-fit: cover;
  object-position: top;
}

/* ─── Plain list ─── */
.plain-list {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.plain-list li::marker { color: var(--gold); }

.small-note { margin-top: 10px; font-size: 0.82rem; color: var(--subtle); }

/* ─── FAQ / Accordion ─── */
.faq-list { display: grid; gap: 6px; margin-top: 18px; }
.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.faq-list details[open] { border-color: var(--brand-light); }
.faq-list summary {
  cursor: pointer;
  padding: 13px 16px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
}
.faq-list summary::after {
  content: "+";
  font-size: 1rem;
  font-weight: 400;
  color: var(--subtle);
  flex: 0 0 auto;
  transition: transform 0.2s;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list .faq-body {
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

/* ─── Tabs ─── */
.tab-group { margin: 18px 0; }
.tab-bar {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.tab-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color 0.12s, border-color 0.12s;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--brand-light);
  border-bottom-color: var(--brand-light);
  background: none;
}
.tab-panel { padding: 0; }
.tab-panel[hidden] { display: none; }

/* ─── Scope grid ─── */
.scope-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.scope-grid article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.scope-grid h3 { margin-top: 0; font-size: 0.88rem; }
.scope-grid h3::before { display: none; }

/* ─── Badge ─── */
.badge {
  display: inline-block;
  padding: 0.12em 0.5em;
  border-radius: 999px;
  background: var(--brand-bg);
  color: var(--brand-light);
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
}

/* ─── Right TOC ─── */
.toc {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  padding: 36px 20px;
  border-left: 1px solid var(--line);
  background: var(--bg);
  overflow-y: auto;
}
.toc p {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.toc a {
  display: block;
  padding: 3px 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.5;
  transition: color 0.1s;
}
.toc a:hover { color: var(--brand-light); }
.toc a.toc-active { color: var(--brand-light); font-weight: 700; }

/* ─── Sidebar nav highlight (체험하기) ─── */
.sidebar-nav .nav-highlight {
  background: var(--brand);
  color: #fff9ec !important;
  font-weight: 700;
  border-radius: 6px;
  margin-bottom: 2px;
  text-align: center;
}
.sidebar-nav .nav-highlight:hover {
  background: var(--brand-light);
  color: #fff !important;
}
.nav-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 4px;
}

/* ─── TOC highlight ─── */
.toc .toc-highlight {
  color: var(--brand-light);
  font-weight: 700;
}

/* ─── Video wrap ─── */
.video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  margin: 24px 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #000;
  overflow: hidden;
}
.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius);
}

/* ─── Preset screenshots grid ─── */
.preset-screenshots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}
.preset-screenshots .doc-figure figcaption {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-top: 8px;
}

/* ─── App embed ─── */
.app-embed {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  margin: 18px 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}
.app-embed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.app-embed-title {
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}
.app-dot:nth-child(1) { background: #ff5f57; }
.app-dot:nth-child(2) { background: #ffbd2e; }
.app-dot:nth-child(3) { background: #28ca41; }
.app-embed-url {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}
.app-embed-actions { display: flex; align-items: center; gap: 8px; }
.app-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.3rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--brand-light);
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 0.12s, background 0.12s;
}
.app-launch-btn:hover {
  border-color: var(--brand-light);
  background: var(--brand-bg);
}
.app-embed-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a0e14;
}
.app-embed-viewport iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.app-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #0a0e14;
  color: var(--subtle);
  font-size: 0.88rem;
  z-index: 2;
  transition: opacity 0.4s;
}
.app-loader p { margin: 0; color: #6b7a8d; }
.app-loader.hidden { opacity: 0; pointer-events: none; }
.app-loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--brand-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Download card ─── */
.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-top: 12px;
}
.download-card-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.download-card-info strong { display: block; font-size: 0.95rem; color: var(--text); }
.download-card-info p { margin: 3px 0 0; font-size: 0.8rem; color: var(--muted); }
.download-icon { font-size: 1.8rem; line-height: 1; flex-shrink: 0; }
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.48rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.15s;
  text-decoration: none;
  flex-shrink: 0;
}
.download-btn:hover { opacity: 0.85; }
[data-theme="dark"] .download-btn { color: #0d1117; }
@media (max-width: 560px) {
  .download-card { flex-direction: column; align-items: flex-start; }
  .download-btn { width: 100%; justify-content: center; }
}

/* ─── Mobile backdrop ─── */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  border: 0;
  background: rgba(0,0,0,0.36);
}

/* ─── Responsive ─── */
@media (max-width: 1200px) {
  .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .toc { display: none; }
}

@media (max-width: 900px) {
  .menu-toggle { display: inline-block; }
  .version-pill { display: none; }
  .layout { display: block; }
  .sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    z-index: 40;
    width: min(86vw, var(--sidebar-w));
    transform: translateX(-108%);
    transition: transform 0.22s ease;
    box-shadow: 0 18px 48px rgba(0,0,0,0.18);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .content { padding: 28px 22px 72px; }
  .media-row, .scope-grid, .numbered-guide, .feature-grid, .preset-grid, .preset-screenshots { grid-template-columns: 1fr; }
  .numbered-guide li, .numbered-guide li:nth-child(2n) { border-right: 0; }
  .numbered-guide li:nth-last-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .numbered-guide li:last-child { border-bottom: 0; }
}

@media (max-width: 560px) {
  .topbar { padding: 0 13px; }
  .brand small, .theme-label { display: none; }
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.3rem; }
  .content { padding-inline: 14px; }
  .definition-list div { grid-template-columns: 1fr; gap: 3px; }
  .doc-table { display: block; overflow-x: auto; }
  .tab-btn { padding: 0.44rem 0.6rem; font-size: 0.8rem; }
}
