*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sidebar-w: 248px;
  --bg:           #f8fafc;
  --surface:      #ffffff;
  --border:       #e2e8f0;
  --text:         #1e293b;
  --muted:        #64748b;
  --accent:       #6366f1;
  --accent-light: rgba(99,102,241,0.08);
  --accent-border:rgba(99,102,241,0.22);
  --radius:       8px;
  --info-bg:      #eff6ff;
  --info-border:  #bfdbfe;
  --info-text:    #1e40af;
  --warn-bg:      #fefce8;
  --warn-border:  #fde68a;
  --warn-text:    #854d0e;

  --glass-bg:     linear-gradient(160deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.42) 100%);
  --glass-border: 1px solid rgba(255,255,255,0.65);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 8px 30px rgba(31,38,80,0.10);
  --glass-blur:   blur(12px) saturate(140%);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, 'Segoe UI', 'Noto Sans KR', sans-serif;
  font-size: 14px;
  line-height: 1.75;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(540px circle at 12% 16%, rgba(167,139,250,0.20), transparent 60%),
    radial-gradient(520px circle at 88% 10%, rgba(244,114,182,0.16), transparent 58%),
    radial-gradient(620px circle at 78% 92%, rgba(99,102,241,0.15), transparent 62%);
}

.docs-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--text);
  text-decoration: none;
}
.sidebar-logo:hover { opacity: 0.8; }
.sidebar-logo__icon { font-size: 1.25rem; }

.sidebar-nav { padding: 10px 0 24px; }

.nav-group { margin-bottom: 2px; }
.nav-group__title {
  padding: 8px 20px 3px;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}
.sidebar-link {
  display: block;
  padding: 5px 20px;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: color 0.12s, background 0.12s;
}
.sidebar-link:hover { color: var(--text); background: var(--bg); }
.sidebar-link.active {
  color: var(--accent);
  background: var(--accent-light);
  border-left-color: var(--accent);
  font-weight: 600;
}

.docs-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 52px 64px 96px;
  max-width: calc(var(--sidebar-w) + 780px);
}
.doc-section { display: none; }
.doc-section.active { display: block; }

.doc-section h1 {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 8px;
}
.page-desc {
  font-size: 0.93rem;
  color: var(--muted);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.doc-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 14px;
  color: var(--text);
}
.doc-section h3 {
  font-size: 0.93rem;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--text);
}
.doc-section p { margin-bottom: 12px; }
.doc-section ul, .doc-section ol {
  margin: 6px 0 14px 22px;
}
.doc-section li { margin-bottom: 6px; }

code {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: 'Consolas', 'SF Mono', monospace;
  font-size: 0.84em;
  word-break: break-all;
}

.notice {
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 18px 0;
  font-size: 0.87rem;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.65;
}
.notice--info { background: var(--info-bg); border: 1px solid var(--info-border); color: var(--info-text); }
.notice--warn { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text); }
.notice__icon { flex-shrink: 0; margin-top: 1px; }

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 24px;
  font-size: 0.875rem;
}
.doc-table th {
  text-align: left;
  padding: 9px 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.doc-table td {
  padding: 10px 13px;
  border: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}
.doc-table tr:hover td { background: #fafbfc; }

.steps { list-style: none; margin: 12px 0 20px; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
  align-items: flex-start;
}
.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0 24px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.15s;
}
.feature-card:hover { border-color: var(--accent-border); }
.feature-card__icon { font-size: 1.5rem; margin-bottom: 8px; }
.feature-card__title { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.feature-card__desc { font-size: 0.82rem; color: var(--muted); line-height: 1.55; }

.mobile-header {
  display: none;
  position: sticky;
  top: 0; z-index: 200;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  align-items: center;
  gap: 10px;
}
.mobile-header__title { font-weight: 700; font-size: 0.9rem; }
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--text);
  line-height: 1;
  padding: 2px 4px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 99;
}

@media (max-width: 800px) {
  .mobile-header { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    top: 49px;
    height: calc(100vh - 49px);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .docs-main { margin-left: 0; padding: 28px 20px 64px; }
  .feature-grid { grid-template-columns: 1fr; }
}

/* GLASS — 흰색 박스 유리화 (정의들보다 뒤에 와야 우선) */
.feature-card,
.docs-layout .sidebar,
.mobile-header {
  background: var(--glass-bg);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  :root { --glass-bg: var(--surface); }
}
