/* 갤러리 쉘 스타일. Bootstrap 5.3 위에 얹고, 색은 변수로 두어 밝은/어두운 모드를 한 곳에서 바꾼다. */
:root {
  --gx-bg: #f6f7fb;
  --gx-surface: #ffffff;
  --gx-surface-2: #eef1f8;
  --gx-line: #e1e6ef;
  --gx-fg: #1d2433;
  --gx-muted: #586177;
  --gx-accent: #2f6df6;
  --gx-accent-ink: #1f55d6;
  --gx-accent-soft: #e8efff;
  --gx-tag-ink: #1a3f9e;
  --gx-tag-bg: #e8efff;
  --gx-tag-bg-hover: #dbe6ff;
  --gx-tag-line: #c9d8fb;
  --gx-line-strong: #c3cbda;
  --gx-warm: #a34a07;
  --gx-warm-soft: #fff6e6;
  --gx-warm-line: #f6d9a8;
  --gx-code-bg: #f8f9fc;
  --gx-radius: 14px;
  --gx-nav-h: 40px;
  --gx-top-h: 96px;
  --gx-side-w: 296px;
  --bs-body-bg: var(--gx-bg);
  --bs-body-color: var(--gx-fg);
  --bs-primary: var(--gx-accent);
  --bs-primary-rgb: 47, 109, 246;
  /* ink variant: 4.5:1 on the page and panel surfaces (the plain accent gave 4.2:1 for small links) */
  --bs-link-color: var(--gx-accent-ink);
  --bs-link-color-rgb: 31, 85, 214;
  --bs-code-color: #b3245f;
  --bs-border-color: var(--gx-line);
  --bs-body-font-family:
    'Paperlogy', system-ui, -apple-system, 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic',
    'Noto Sans KR', sans-serif;
}
html[data-theme='dark'] {
  --gx-bg: #0f131a;
  --gx-surface: #171b23;
  --gx-surface-2: #212836;
  --gx-line: #2c3444;
  --gx-fg: #e7eaf1;
  --gx-muted: #9aa4b5;
  --gx-accent: #7aa2ff;
  --gx-accent-ink: #7aa2ff;
  --gx-accent-soft: #1d2a47;
  --bs-code-color: #f19bc2;
  --gx-tag-ink: #b9cdff;
  --gx-tag-bg: #1d2a47;
  --gx-tag-bg-hover: #25365b;
  --gx-tag-line: #34497a;
  --gx-line-strong: #3a4458;
  --gx-warm: #f5b45a;
  --gx-warm-soft: #2a2316;
  --gx-warm-line: #5a4519;
  --gx-code-bg: #11151c;
  --bs-primary-rgb: 122, 162, 255;
  --bs-link-color-rgb: 122, 162, 255;
  color-scheme: dark;
}
/* 틀이 직접 쓴 두 언어 글자(span, 코드 패널)만 숨긴다. 그리드·페이저·선택기는 자기 언어를 `lang`으로 알리므로(접근성)
   이 규칙이 닿으면 안 된다: 한국어 그리드가 영어 페이지에서 사라졌던 회귀(`lang="ko"`가 그리드 루트에 붙은 뒤). */
html[data-lang='ko'] :is(span, .gx-panel)[lang='en']:not(.mxg *, .mxg-controls *),
html[data-lang='en'] :is(span, .gx-panel)[lang='ko']:not(.mxg *, .mxg-controls *) {
  display: none !important;
}
html {
  scroll-padding-top: calc(var(--gx-top-h) + 12px);
}
body {
  background: var(--gx-bg);
  color: var(--gx-fg);
  line-height: 1.65;
}
code {
  color: var(--gx-warm);
  background: var(--gx-surface-2);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 0.9em;
}
a {
  text-decoration: none;
}
:focus-visible {
  outline: 2px solid var(--sm-brand, var(--gx-accent));
  outline-offset: 2px;
}

.gx-skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 2000;
  background: var(--gx-surface);
  padding: 8px 14px;
  border-radius: 8px;
}
.gx-skip:focus {
  left: 8px;
}
