:root {
  --bg: #eef3fb;
  --bg-elev: rgba(255, 255, 255, 0.82);
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-soft: rgba(244, 247, 253, 0.92);
  --bg-code: #f5f7fb;
  --surface-muted: rgba(235, 241, 250, 0.72);
  --text: #12233f;
  --text-dim: #354866;
  --text-soft: #566b89;
  --border: rgba(111, 129, 156, 0.22);
  --border-strong: rgba(78, 101, 140, 0.3);
  --accent: #1f67f2;
  --accent-strong: #1647b8;
  --accent-soft: rgba(31, 103, 242, 0.12);
  --accent-glow: rgba(74, 144, 226, 0.18);
  --shadow-sm: 0 10px 30px rgba(36, 58, 94, 0.08);
  --shadow-md: 0 24px 60px rgba(36, 58, 94, 0.14);
  --shadow-lg: 0 40px 90px rgba(31, 55, 97, 0.16);
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 30px;
  --font: 'Pretendard Variable', 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --shell-w: 1480px;
  --reading-w: 860px;
  --sidebar-w: 290px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  background:
    radial-gradient(circle at top left, rgba(255, 236, 188, 0.86), transparent 28%),
    radial-gradient(circle at top right, rgba(79, 173, 255, 0.28), transparent 30%),
    linear-gradient(180deg, #f4f7fc 0%, #e6edf8 52%, #edf3fb 100%);
  color: var(--text);
  line-height: 1.78;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: -1;
}

body::before {
  top: -120px;
  right: -100px;
  width: min(36vw, 520px);
  height: min(36vw, 520px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(70, 140, 255, 0.26) 0%, rgba(70, 140, 255, 0) 70%);
}

body::after {
  bottom: -160px;
  left: -120px;
  width: min(44vw, 640px);
  height: min(44vw, 640px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 72%);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

button,
input,
textarea,
select {
  font: inherit;
}

code,
pre,
.c {
  font-family: var(--mono);
}

::selection {
  background: rgba(31, 103, 242, 0.18);
}

.book-site {
  padding-bottom: 56px;
}

.book-home-main,
.book-shell,
.book-search-inner,
.topbar-inner {
  width: min(calc(100% - 28px), var(--shell-w));
  margin-inline: auto;
}

.book-home-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.book-breadcrumb,
.book-updated,
.book-summary,
.section-credit {
  color: var(--text-soft);
}

.book-breadcrumb {
  font-size: 0.88rem;
}

.book-summary {
  max-width: 56ch;
  font-size: 1.02rem;
  line-height: 1.8;
  text-wrap: pretty;
}

.book-updated,
.section-credit {
  font-size: 0.9rem;
}

.book-content-card,
.book-header-card,
.book-sidebar,
.book-home-intro,
.book-home-section,
.book-search-strip {
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.book-home-section h2,
.book-header-card h1,
.book-home-title,
.section h2,
.section h3,
.section h4 {
  color: var(--text);
  letter-spacing: -0.02em;
}

.book-header-card h1,
.book-home-title {
  font-weight: 750;
}

.book-header-card h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.12;
}

.book-main {
  min-width: 0;
}

mark.book-search-hit {
  padding: 0 2px;
  border-radius: 6px;
  background: rgba(255, 226, 127, 0.72);
  color: inherit;
}

.card-grid {
  display: grid;
  gap: 18px;
}

.faq-list {
  display: grid;
  gap: 14px;
}

.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  padding: 16px 18px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.faq-list details > * + * {
  margin-top: 10px;
}

.screenshot {
  overflow: hidden;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-sm);
}

.screenshot img {
  width: 100%;
}

@media (max-width: 1080px) {
  body {
    font-size: 15.5px;
    line-height: 1.8;
  }

  .book-home-main,
  .book-shell,
  .book-search-inner,
  .topbar-inner {
    width: min(calc(100% - 20px), var(--shell-w));
  }

  .book-header-card h1,
  .book-home-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 120;
  padding: 12px 16px; border-radius: 16px; background: var(--text); color: #fff;
  transform: translateY(-160%); transition: transform 160ms ease; box-shadow: var(--shadow-sm);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgba(31, 103, 242, 0.34);
  outline-offset: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.book-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 130;
  min-width: min(320px, calc(100vw - 32px)); max-width: calc(100vw - 32px);
  padding: 14px 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.8);
  background: rgba(18, 35, 63, 0.92); color: #fff; text-align: center; font-size: 0.95rem; font-weight: 650;
  box-shadow: var(--shadow-md); opacity: 0; transform: translate(-50%, 16px); pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.book-toast.is-visible {
  opacity: 1; transform: translate(-50%, 0);
}
