    :root { 
        --bg: #ffffff; 
        --sidebar: #e5f0ff; 
        --text: #1a2b4c; 
        --muted: #5a6b85; 
        --brand: #0056ff; 
        --stroke: #e2e8f0;  
        --shadow: 0 2px 8px rgba(0, 0, 0, 0.1); 
        --radius: 16px;
        --note-bg: #f4f8ff;
        --note-border: #3b82f6;
        --note-text: #1e3a8a;

        --warn-bg: #fff8e6;
        --warn-border: #f59e0b;
        --warn-text: #78350f;

        --radius: 10px;
        --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.04);
    }
    /* * { box-sizing: border-box; } */
    body {
      margin: 0; 
      font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans KR", Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
      color: var(--text); 
      /* background: radial-gradient(1200px 600px at 80% -10%, rgba(79,124,255,.25), transparent 50%), radial-gradient(900px 500px at -10% 0%, rgba(0,211,167,.2), transparent 50%), var(--bg); */
      line-height: 1.6;
    }
    a { color: inherit; text-decoration: none; }

/* Header */

    .topbar { 
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 200;
        background: var(--bg);
        border-bottom: 1px solid var(--stroke);
        box-shadow: var(--shadow);
        padding: 0 20px;
    }
    .nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
    .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; }
    .brand-badge { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: var(--shadow); display: grid; place-items: center; font-size: 18px; }
    .menu { display: flex; gap: 18px; align-items: center; }
    .menu a { padding: 8px 10px; border-radius: 10px; color: var(--muted); }
    .menu a:hover,
    .menu a[aria-current="page"] {
        color: var(--text);
        background: rgba(0, 0, 0, 0.05);
    }

/* ================== 메인 레이아웃 ================== */
.main-container {
    display: flex;
    max-width: 1440px;
    margin: 0 auto;
}

#headFname {
    font-size: 40px;
    font-weight: 700;
}

/* ================== 왼쪽 사이드바 ================== */
#sidebar-left { 
    position: fixed;
    left: 0;
    top: 69.5px;
    bottom: 0;
    width: 350px;
    background: var(--bg);
    padding: 20px;
    border-right: 1px solid var(--stroke);
    transition: transform 0.3s ease;
    overflow-y:auto; 
    overflow-x: hidden;
}

#sidebar-left ul {
    list-style: none;
}

#sidebar-left ul:first-child {
    padding: 0 20px;
}

/* 기본 summary 스타일 */
summary {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

/* 기본 marker 제거 */
summary::-webkit-details-marker {
  display: none;
}

/* 1단 summary (최상위 카테고리용) */
#sidebar-left > ul > li > details > summary::before {
  content: "▶";
  margin-right: 0.5em;
  font-size: 0.85em;
  transition: transform 0.2s ease;
  color: #777;
}

#sidebar-left > ul > li > details[open] > summary::before {
  content: "▼";
  color: #222;
}

/* 2단 summary (하위 카테고리용) */
#sidebar-left details details > summary::before {
  content: "▸";
  margin-right: 0.4em;
  font-size: 1.5em;
  color: #777;
}

#sidebar-left details details[open] > summary::before {
  content: "▾";
  color: #333;
}

/* hover 효과 */
#sidebar-left summary:hover {
  background: rgba(0,0,0,0.05);
}

/* 하위 목록 여백 */
details > ul {
  /* margin-left: 1em; */
  padding-left: 0;
  /* border-left: 1px solid #ddd; */
}

/* 링크 스타일 */
#sidebar-left a {
  display: block;
  padding: 8px 0;
  border-radius: 4px;
  color: #444;
  text-decoration: none;
  padding-left: 40px;
}

#sidebar-left a:hover {
  background: rgba(0,0,0,0.05);
}

#sidebar-left a.active {
  background: #e5f0ff;
  color: #003366;
  /* font-weight: 600; */
}


/* ================== 중앙 컨텐츠 ================== */
#main-content { 
    flex: 1;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    margin: auto;
    margin-left: 350px;
    margin-right: 350px;
    padding-top: 80px;
}

#main-content h1 { font-size:28px; margin-bottom:20px; }

#main-content h2 { font-size:20px; margin-bottom:20px; }

#main-content h3 { font-size:20px; margin-bottom:20px; }

#main-content h1, #main-content h2, #main-content h3 {
    scroll-margin-top: 80px;
}

#main-content p { 
    font-size: 17px;
    line-height: 30px;
    /* color:var(--muted);  */
}

#main-content pre { border:1px solid var(--stroke); padding:20px; border-radius:8px; background:var(--sidebar); margin:20px 0; }

#main-content code {
    font-family: 'Courier New', Courier, monospace;
}

/* ================== 오른쪽 사이드바 ================== */
#sidebar-right { 
    width: 350px;
    background: var(--bg);
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    border-left: 1px solid var(--stroke);
    position: fixed;
    right: 0;
    top: 69.5px;
    bottom: 0;
}

#sidebar-right h4 {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 0;
    color: #666;
    padding-left: 20px;
}

#sidebar-right ul {
    list-style: none;
    padding: 0 20px;
}

#sidebar-right details ul {
    padding-right: 0;
}

#sidebar-right summary {
    padding: 0;
    font-weight: 400;
}

#sidebar-right summary a {
    width: 100%;
}

/* 링크 스타일 */
#sidebar-right a {
  display: block;
  padding: 8px;
  border-radius: 4px;
  color: #444;
  text-decoration: none;
}

#sidebar-right a:hover {
  background: rgba(0,0,0,0.05);
}

#sidebar-right a.active {
  background: #e5f0ff;
  color: #003366;
  /* font-weight: 600; */
}

/* Footer */
    footer { margin-top: 40px; border-top: 1px solid var(--stroke); padding: 24px 30px 60px 420px; color: var(--muted); font-size: 14px; }

/* PC에서는 햄버거 숨김 */
.menu-toggle {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text);
  cursor: pointer;
  display: none;
  padding: 5px 10px;
}

/* 반응형 */
@media (min-width: 1024px) {
    #main-content {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}

/* 🔹 2단계 (태블릿: 우측 사이드바 숨김) */
@media (max-width: 1500px) {
  body {
    grid-template-columns: 250px 1fr;
  }
  #sidebar-right {
    display: none;
  }
  #content {
    margin-right: 0;
  }
  #main-content {
    margin-right: 0;
  }
  footer {
    padding-right: 0;
  }
}

/* 🔹 3단계 (모바일: 좌측 사이드바 숨기고 햄버거 버튼 표시) */
@media (max-width: 1024px) {
  body {
    grid-template-columns: 1fr;
  }
  #sidebar-left {
    transform: translateX(-100%);
    box-shadow: var(--shadow);
  }
  #sidebar-left.active {
    transform: translateX(0);
  }
  #sidebar-right {
    display: none;
  }

  #main-content {
    margin-left: 0;
  }

  #content {
    margin: 80px 0 0 0;
    padding: 18px;
  }

  .menu {
    display: none;
  }
  
  /* 햄버거 버튼 */
  .menu-toggle {
    display: block;
  }

  /* 메뉴 항목 폰트 크기 조정 */
  summary {
    font-size: 15px;
  }
  details a {
    font-size: 14px;
  }
  footer {
    padding-left: 30px;
  }
}

@media (max-width: 700px) {
    img {
        width: 100%;
    }
}

/* > 참고사항 (파란 계열) */
.blockquote {
  position: relative;
  margin: 18px 0;
  padding: 5px 16px 5px 44px;
  border-left: 5px solid var(--note-border);
  background: var(--note-bg);
  color: var(--note-text);
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
}
.blockquote::before {
  content: "💡";
  position: absolute;
  left: 14px;
  top: 4px;
  font-size: 18px;
}

/* >> 주의사항 (노란 계열) */
.d_blockquote {
  position: relative;
  margin: 18px 0;
  padding: 5px 16px 5px 44px;
  border-left: 5px solid var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn-text);
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
}
.d_blockquote::before {
  content: "⚠️";
  position: absolute;
  left: 14px;
  top: 4px;
  font-size: 18px;
}

/* 반응형 - 모바일에서 여백, 폰트 크기 축소 */
@media (max-width: 640px) {
  .blockquote,
  .d_blockquote {
    padding: 5px 14px 5px 40px;
    font-size: 0.9rem;
  }
  .blockquote::before,
  .d_blockquote::before {
    left: 12px;
    font-size: 16px;
  }
}

table {
  border-collapse: collapse;
  width: 60%;
  font-size: 14px;
}

table th,
table td {
  border: 1px solid #000;
  padding: 10px 12px;
  text-align: center;
}

table th {
  font-weight: 600;
}