/* ==========================================================================
   외부 구글/나눔 폰트 사전 정의 (@import 규격상 최상단 배치 필수)
   ========================================================================== */
@import url('https://fonts.googleapis.com/earlyaccess/nanumgothic.css');
@import url('https://fonts.googleapis.com/css2?family=Nanum+Gothic+Coding&family=Nanum+Myeongjo&family=Noto+Serif+KR&family=Dongle&display=swap&family=Open+Sans:ital,wdth,wght@0,75..100,300..800;1,75..100,300..800&display=swap');

/* ==========================================================================
   Google Material Symbols 아이콘 텍스트 노출(FOUT) 100% 완벽 차단
   - HTML 태그 내 텍스트 0% ➔ 지저분한 영문 단어 노출 0.000% 원천 차단
   - CSS attr(data-icon) 구문으로 폰트 로드 시 원래 아이콘 그림만 짠하고 노출
   ========================================================================== */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga';
}

.material-symbols-outlined[data-icon]::before {
  content: attr(data-icon);
}

@font-face {
  font-family: 'D2Coding';
  src:
    url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_three@1.0/D2Coding.woff') format('woff');
}

@font-face {
  font-family: 'NanumBarunpen';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_two@1.0/NanumBarunpen.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'RegularFont';
  font-weight: 400;
  font-style: normal;
  src: url('https://cdn.jsdelivr.net/gh/webfontworld/tmoney/TmoneyRoundWind-Regular.eot');
  src: url('https://cdn.jsdelivr.net/gh/webfontworld/tmoney/TmoneyRoundWind-Regular.eot?#iefix') format('embedded-opentype');
  font-display: swap;
}

html {
  scroll-behavior: smooth;
  font-size: 80% !important;
}

body {
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
  padding: 0px;
  margin: 0px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  font-family: var(--font-main);
  font-size: 1rem !important;
  color: #444;
  line-height: 1.8em;
  word-break: keep-all;
}

::-webkit-scrollbar {
  width: 8px;
  background-color: transparent;
}

::-webkit-scrollbar-thumb {
  /* border: 2px solid #9b6a2f; */
  background-color: #bbb;
  border-radius: 12px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #ccc;
}

::-webkit-scrollbar-track {
  background-color: transparent;
}

::-webkit-scrollbar-button {
  display: none;
}

header {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-content: stretch;
  justify-content: space-evenly;
  align-items: center;
  height: 55px;
  width: 100%;
  font-size: clamp(10pt, 5vw, 1.5rem);
  font-weight: 800;
  color: #555;
  position: fixed;
  top: 0;
  padding: 0 0 5px 0;
  transition: all .3s;
  background: #fff6;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 10px -10px rgb(0 0 0 / 50%);
  z-index: 12;
}

#doc-category {
  width: max(70vw, 400px);
  font-size: 8pt;
  color: #ccc;
  line-height: 0;
}

#doc-title-panel {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: baseline;
}

#priv-doc {
  text-align: right;
}

#next-doc {
  text-align: left;
}

#priv-doc,
#next-doc {
  font-size: 0.7em;
  color: #888;
  min-width: 30%;
}

#priv-doc a,
#next-doc a,
#priv-doc a:hover,
#next-doc a:hover {
  font-weight: 800;
  color: #888;
  text-decoration: none;
}

#doc-title {
  text-align: center;
  user-select: none;
}

#doc-title a {
  color: inherit;
}

#doc-title a:hover {
  color: inherit;
}

header img {
  width: 30px;
  padding: 0;
  margin: 0;
}

article {
  width: 95%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  counter-increment: table-no 0;
  counter-increment: reference-no 1;
  counter-increment: image-no 0;
  padding-bottom: 50vh;
  border-collapse: collapse;
}

table {
  font-family: var(--font-table);
  border-spacing: 0px;
  margin: 20px;
  word-break: break-all;
  border: 1px solid #ccc;
  counter-increment: table-no;
  width: fit-content;
  font-stretch: 75%;
}

table pre {
  font-size: 0.9em;
  line-height: 1.4em;
}

table thead {
  position: sticky;
  top: 0;
  background-color: #999;
  color: white;
  text-align: center;
  border: #555;
}

th {
  border: 1px solid #aaa;
  word-break: keep-all;
}

table.striped tr:nth-child(even) {
  background-color: #eee;
}

table.striped tr:nth-child(even):hover {
  background-color: #f2f2ee;
}

table.striped tr:nth-child(odd):hover {
  background-color: #fFfff8;
}

table td {
  margin: 0px;
  border: 1px solid #ddd;
  text-align: center;
  padding: 2px;
  word-break: keep-all;
  line-height: 1.5em;
  padding: 0 10px;
}

table.all-td-left td {
  text-align: left;
  padding-left: 10px;
}

table.all-td-center td,
table.all-td-center td:last-child {
  text-align: center;
}

table.text-align-last-td-left td:last-child,
table.last-td-left td:last-child {
  text-align: left;
  padding-left: 10px;
}

table.snd-last-td-left td:nth-last-child(2),
table.last-second-td-left td:nth-last-child(2) {
  text-align: left;
  padding-left: 10px;
}

table.first-td-left td:first-child {
  text-align: left;
  padding-left: 10px;
}

table.second-td-left td:nth-child(2) {
  text-align: left;
  padding-left: 10px;
}

table.only-first-td-center td {
  text-align: left;
}

table.only-first-td-center td:first-child {
  text-align: center;
}

table caption {
  text-align: left;
  caption-side: bottom;
  padding: 2px 10px;
}

table caption:before {
  content: "[표 " counter(table-no) "] "
}

caption {
  line-height: 0.8em;
  font-size: 0.8em;
}

table table {
  margin: 5px 0;
  padding: 0;
  border-color: #bbb;
}

table table th {
  background-color: #bbb;
}

article ol,
article ul {
  margin-left: 0.1em;
  padding-left: 1em;
}

article li>ol,
article li>ul {
  font-size: 0.95em;
  margin-top: 0.1em;
  margin-bottom: 0.35em;
}

article>ul,
article>ol {
  margin-left: 2.3em;
}

article>ul>li,
article>ol>li {
  line-height: 1.35em;
  margin-bottom: 0.3em;
}

article li::marker {
  content: initial;
}

td>ul,
td>ol {
  margin-left: 0.8em;
}

li::marker:not(article li::marker) {
  content: "";
}

.list-title {
  line-height: 2.5em;
}

.list-title+ol,
.list-title+ul {
  padding-top: 0px;
  margin-top: 0px;
  margin-bottom: 5px;
}

article>span.list-title {
  margin-left: 1em;
  color: #000;
  font-weight: bold;
}

td>.list-title+ul>li:first-child,
td>.list-title+ol>li:first-child {
  line-height: 0;
  padding-bottom: 0.5em;
}

td>.list-title+ul li,
td>.list-title+ol li {
  line-height: 1em;
}

#sitemap-tree {
  content: "";
}

/* 사용자 원본 모바일 상단 헤더 메뉴바 스타일 복원 */
header.site-header,
header #headerIcons {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
}

header.site-header {
  justify-content: space-between;
  width: 100%;
  height: 46px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e2e8f0;
  padding: 0 16px;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 100;
}

header #headerIcons {
  gap: 12px;
}

header #headerIcons div {
  margin: 0 5px;
}

header #headerIcons #header-up-icon,
header #headerIcons #tutorial-icon {
  display: flex;
  font-size: 7pt;
  flex-direction: column;
  align-items: center;
  flex-wrap: nowrap;
  border: 1px solid #ddd;
  border-radius: 5px;
  width: 35px;
  height: 35px;
  line-height: 1em;
  justify-content: space-evenly;
  margin: 5px;
  user-select: none;
  cursor: pointer;
}

/* 상단 헤더 미사용 (좁은 화면에서는 좌상단 고정 삼선 메뉴 사용) */
@media screen and (max-width: 960px) {
  header.site-header {
    display: none !important;
  }
}

.expendable>li::marker {
  content: "▼ ";
}

.expendable>li code {
  margin: 0;
}

.content {
  display: none;
}

.img-box {
  counter-increment: image-no;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
}

.img-box svg,
.img-box img {
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 5px;
  margin: 10px auto;
}

.img-box .caption:before {
  content: "[그림" counter(image-no) "] ";
  width: fit-content;
}

.img-box .description {
  visibility: hidden;
  display: none;
}

blockquote {
  display: block;
  padding: 5px 20px;
  border-left: 4px solid #e6e6e6;
  background-color: #F8F8F8;
  border-radius: 5px;
  font-family: var(--font-monospace);
  line-height: 1.5em;
  text-align: left;
  position: relative;
  overflow-y: hidden;
}

blockquote.shell {
  background: #000;
  color: #bbb;
  font-style: normal;
  padding: 1px 1em;
  border: 0;
  margin: 1em;
}

blockquote span.comment {
  color: #080;
  padding: 1em;
}

blockquote span.comment:before {
  content: "// ";
}

.blockquote-title,
.blockquote-name {
  margin: 20px auto 2px;
  width: 95%;
  font-size: 0.9em;
  display: block;
  color: var(--board-font-color);
}

.blockquote-title::before,
.blockquote-name::before {
  content: "◆ ";
}

.blockquote-title::after,
.blockquote-name::after {
  content: " :";
}

.blockquote-title+blockquote,
.blockquote-name+blockquote {
  margin-top: 0;
}

a {
  color: blue;
  text-decoration: underline;
  text-underline-offset: 0.3em;
  font-style: normal;
  font-weight: 650;
}

a:visited {
  color: blue;
}

a:hover {
  text-decoration: underline;
  text-decoration-color: red;
  /* text-decoration-style: wavy; */
  text-underline-offset: 0.3em;
  cursor: pointer;
  /* font-weight: bold; */
}

u {
  text-decoration: 1px underline red;
  text-underline-offset: 0.3em;
}

sub {
  font-size: .9em;
  /* vertical-align: baseline; */
  color: #943200;
}

q:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
  text-decoration-color: red;
}

q:after {
  content: "";
}

q::before {
  content: "";
}

h1 {
  width: 95%;
  font-family: var(--font-sans-serif);
  margin: 100px 10px 20px;
  padding: 50px 0 10px;
  font-size: 1.4rem;
  border-bottom: 3px solid #ddd;
  counter-reset: h2-no;
  counter-increment: reference-no 0 h1-no 1;
  clear: both;
}

article h1:first-of-type {
  margin-top: 0;
}

h1:nth-child(-n + 10)::before {
  content: "0" counter(h1-no) ".";
}

h1::before {
  content: counter(h1-no) ".";
  margin-right: 20px;
  color: #888;
}

h1+h2 {
  padding: 4px;
  margin: 6px 12px;
}

h2 {
  width: 90%;
  font-size: 1.3rem;
  display: block;
  padding: 40px 4px 4px;
  border-bottom: 1px solid #CCC;
  margin: 30px 12px 8px;
  counter-increment: h2-no;
  clear: both;
}

h2:before {
  content: counter(h1-no) "-" counter(h2-no) ". ";
}

h3 {
  display: block;
  margin: 32px 8px 13px
}

h3:before {
  content: "- ";
}

del {
  color: #BBB;
}

samp {
  color: rgb(73, 145, 128);
}

iframe {
  background: #fff;
  border: 1px solid var(--border-primary);
  border-radius: var(--elem-radius);
  box-sizing: content-box;
  padding: 1rem;
  width: calc(100% - 2rem - 2px);
}

input::placeholder {
  color: #aaa;
  text-align: bold;
  font-size: 0.7em;
  font-weight: bold;
}

article details {
  width: 100%;
}

details h1 {
  display: inline;
}

details.h1-no {
  margin: 5px 0 40px;
  padding: 10px;
}

details>summary {
  display: block;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: red;
  text-underline-offset: 0.3em;
}

details>summary:hover {
  color: blue;
  text-decoration-color: blue;
}

details.h1-no>summary {
  border-bottom: 1px solid #a2a9b1;
  padding: 10px;
  cursor: pointer;
  text-align: left;
}

details>summary::-webkit-details-marker {
  background-size: contain;
  transform: rotate3d(0, 1, 1, 45deg);
  transition: transform 1.25s;
}

details[open]>summary::-webkit-details-marker {
  transform: rotate3d(0, 0, 1, 180deg);
}

details:not([open]) {
  animation: hide 0.25s;
  margin-bottom: 0px;
}

details[open]>summary~* {
  animation: reveal 1s;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(-1.25em);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hide {
  0% {
    transform: translateY(0);
  }

  75% {
    transform: translateY(-0.25em);
  }

  100% {
    transform: translateY(0);
  }
}

button {
  padding: 0.5em;
  font-size: 0.9em;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;

  background: var(--button-bg-color);
  color: var(--button-color);
  transition: 0.5s background;
}

button:active,
button:hover,
button:focus {
  background: var(--button-hover-bg-color);
  outline: 0;
}

button:disabled {
  opacity: 0.5;
}

:root {
  --font-main: 'RegularFont', 'Nanum Gothic', '맑은 고딕', Arial, sans-serif;
  --font-serif: 'Noto Serif KR', 'Times New Roman', serif;
  --font-sans-serif: '맑은 고딕', 'Nanum Gothic', Arial, sans-serif;
  --font-table: 'Open Sans', 'NanumBarunpen', sans-serif;
  --font-title: 'Times New Roman', Arial, serif;
  --font-monospace: 'D2Coding', monospace;
  --board-font-color: #444;
  --board-head-font-color: #888;
  --button-color: #888;
  --button-bg-color: #eee;
  --button-hover-bg-color: #ccc;
  --header-height: 70px;
}

/* special things */
#title {
  font-family: var(--font-title);
  position: relative;
  font-size: 2.5rem;
  font-weight: bold;
  color: #444;
  text-align: center;
  margin: 30px auto 30px;
  padding-top: 40px;
  line-height: 2.9rem;
}

#title-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid #eee;
  padding-bottom: 12px;
  margin: 30px 0 20px 0;
  font-family: var(--font-title);
}

.doc-title-text {
  font-size: 2.2rem;
  font-weight: bold;
  color: #1f1f1f;
  line-height: 1.2;
}

.doc-path-text {
  font-size: 0.9rem;
  color: #747775;
  text-align: right;
  font-weight: 500;
  margin-bottom: 4px;
}

#subtitle {
  color: #943200;
  font-family: var(--font-main);
  font-size: 1.5rem;
  /* font-weight: 700; */
  margin: 0px auto 50px;
  text-align: center;
}

#source-info {
  font-size: 0.75em;
  color: #ccc;
}

.double_column {
  column-count: 2;
  column-width: 10rem;
  text-align: left;
  margin: 50px;
}

.image-container {
  max-width: 80%;
  margin: 40px auto;
  counter-increment: image-no;
}

.image-container>img {
  padding: 0;
  max-width: 100%;
  height: auto;
}

.image-container>.img-title {
  vertical-align: bottom;
  text-align: left;
  margin: -10px 15px 0;
  font-size: 0.8em;
}

.image-container>.img-title::before {
  content: "[그림 " counter(image-no) "] ";
}

/* MathJax */
.MathJax_Display {
  text-align: left !important;
}

[id^="affix-"] {
  padding: 15px;
  margin: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 10px;
  /* box-shadow: #8888 5px 5px 5px; */
  display: flex;
  flex-direction: column;
  min-width: 300px;
  max-width: 90%
}

.simple-box {
  display: flex;
  flex-direction: column;
  border: 1px solid #aaa;
  border: 1px solid #aaa;
  border-radius: 5px;
  margin: 25px 10px;
  padding: 8px;
  font-size: 0.9em;
  line-height: 1.6em;
}

span.comment {
  color: green;
}

/* text highlight */
q,
.hl,
.hl1,
.highlight1 {
  background-color: #bfb;
}

.hl2,
.highlight2 {
  background-color: beige;
}

/* boxing contents*/
.summary {
  color: #999;
  border-style: dashed;
  border-width: 2px;
  border-color: #aaa;
  margin: 50px 50px;
  padding: 10px 15px;
}

.moveto {
  background-color: white;
  border: 0;
  margin: 0;
  padding: 0;
}

/* tooltip */
.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
  /* If you want dots under the hoverable text */
}

/* Tooltip text */
.tooltip .tt_ctx {
  visibility: hidden;
  top: 110%;
  /* left: 50%; */
  background-color: #000A;
  color: #fff;
  text-align: left;
  padding: 5px;
  border-radius: 6px;

  /* Position the tooltip text - see examples below! */
  position: absolute;
  z-index: 1;
}

/* Show the tooltip text when you mouse over the tooltip container */
.tooltip:hover .tt_ctx {
  visibility: visible;
}

/* highlightjs : code veiwer */
.hljs-ln {
  margin: 0;
  width: 100%;
  font-family: var(--font-monospace);
  font-size: 0.9rem;
}

.hljs-ln td {
  padding: 0px 5px;
  text-align: left;
  border: 0;
  border-left: 1px solid #ddd;
  line-height: 1.5em;
}

table.hljs-ln tbody tr:nth-child(odd) {
  /* background-color: #0B0F0F; */
  background-color: white;
}

table.hljs-ln tbody tr:nth-child(even) {
  /* background-color: #1e2b2b; */
  background-color: white;
}

table.hljs-ln tbody tr:hover {
  /* background-color: #435e5e; */
  background-color: #eee;
}

.hljs-ln-numbers {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  /* color: #111; */
  border-right: 1px solid #111;
  vertical-align: top;
  width: 25px;
}

.hljs-ln-code,
.hljs-ln-numbers {
  line-height: 25px;
}

.hljs-ln-n {
  color: #888;
  text-align: right;
}

p {
  margin: 10px 30px 0 10px;
}

p::before {
  content: "";
  width: 0.1em;
  display: inline-block;
}

pre code {
  font-size: 0.9rem !important;
  font-family: var(--font-monospace) !important;
}

pre code.hljs {
  padding: 0px;
  width: 90%;
  margin: 10px auto;
}

pre {
  font-family: var(--font-monospace);
  white-space: pre-wrap;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
}

blockquote:hover .copy-button,
pre:hover .copy-button {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s ease;
}

blockquote .copy-button,
pre .copy-button {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  width: auto;
  padding: 3px 10px;
  height: auto;
  font-size: 11px;
  font-weight: 500;
  color: white;
  background-color: #212529;
  top: 6px;
  right: 6px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-sans), sans-serif;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

blockquote .copy-button:hover,
pre .copy-button:hover {
  cursor: pointer;
}

code {
  font-family: var(--font-monospace);
  background-color: #F0F0F0;
}

var {
  font-style: normal;
  border: 1px solid #ddd;
  padding: 2px;
  border-radius: 4px;
  margin-left: 2px;
  min-width: 1em;
  line-height: 1.2em;
  display: inline-block;
  text-align: center;
}

em {
  font-style: normal;
  color: red;
}

/* ==========================================
   Gemini Style Left Sidebar Layout
   ========================================== */

:root {
  --sidebar-width: 60px;
  --sidebar-bg: #f0f4f9;
  --sidebar-active-bg: #d3e3fd;
  --sidebar-active-color: #041e49;
  --sidebar-hover-bg: #e1e5ea;
  --sidebar-border: #e3e3e3;
  --panel-bg: #f0f4f9;
  --panel-border: #e0e0e0;
}

body {
  padding-left: var(--sidebar-width, 60px);
  transition: padding-left 0.3s ease;
}

header {
  left: var(--sidebar-width, 60px) !important;
  width: calc(100% - var(--sidebar-width, 60px)) !important;
  transition: left 0.3s ease, width 0.3s ease !important;
}

/* Sidebar Wrapper */
#sidebar-container {
  display: flex;
  flex-direction: row;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  transition: transform 0.3s ease;
  font-family: var(--font-main);
  background-color: var(--sidebar-bg);
  user-select: none;
  -webkit-user-select: none;
}

/* Narrow Icon Strip */
#sidebar-nav {
  width: 60px;
  height: 100%;
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  box-sizing: border-box;
  z-index: 102;
  background-color: var(--sidebar-bg);
  user-select: none;
}

#sidebar-nav .nav-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 12px;
}

#sidebar-nav .nav-item {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #444746;
  transition: background-color 0.2s ease, color 0.2s ease;
  position: relative;
}

#sidebar-nav #nav-home {
  box-sizing: border-box;
}

#sidebar-nav .nav-item:hover {
  background-color: var(--sidebar-hover-bg);
}

#sidebar-nav .nav-item.active {
  background-color: var(--sidebar-active-bg);
  color: var(--sidebar-active-color);
}

#sidebar-nav .nav-item .material-symbols-outlined {
  font-size: 24px;
}

/* Tooltip on hover for narrow strip */
#sidebar-nav .nav-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 70px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #313131;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 200;
}

#sidebar-nav .nav-item:hover::after {
  opacity: 1;
}

/* Expanded Sidebar Panel */
#sidebar-panel {
  width: 240px;
  height: 100%;
  background-color: var(--panel-bg);
  border-right: 1px solid var(--panel-border);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, width 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
  z-index: 101;
}

#sidebar-panel.collapsed {
  width: 0px;
  border-right-width: 0px;
  opacity: 0;
  pointer-events: none;
}

#sidebar-panel .panel-header {
  padding: 20px 15px 10px;
  font-size: 1.05em;
  font-weight: bold;
  color: #1f1f1f;
  border-bottom: 1px solid #e3e3e3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

#sidebar-panel .panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

/* Tab panes styling */
#sidebar-panel .tab-pane {
  display: none;
  height: 100%;
}

#sidebar-panel .tab-pane.active {
  display: block;
}

/* Sitemap tree inside panel (adapting old board styles) */
#sidebar-panel ul {
  list-style: none;
  padding-left: 0;
}

#sidebar-panel li {
  line-height: 1.8em;
  margin-bottom: 2px;
  padding: 2px;
}

#sidebar-panel li>ul,
#sidebar-panel li>ol {
  padding-left: 0.5em;
}

#sidebar-panel li.folder>span,
#sidebar-panel li.folder>a {
  font-weight: bold;
  color: #1f1f1f;
  cursor: pointer;
  display: flex;
  align-items: center;
}

#sidebar-panel li.folder>span::before,
#sidebar-panel li.folder>a::before {
  content: "📁";
  margin-right: 6px;
  font-size: 0.9em;
}

#sidebar-panel li.folder.collapsed>span::before,
#sidebar-panel li.folder.collapsed>a::before {
  content: "📁";
}

#sidebar-panel li.collapsed ul {
  display: none;
}

#sidebar-panel a {
  color: #444746;
  text-decoration: none;
  display: block;
  border-radius: 4px;
}

#sidebar-panel a:hover {
  background-color: var(--sidebar-hover-bg);
  color: #1f1f1f;
}

#sidebar-panel .this-doc {
  background-color: var(--sidebar-active-bg);
  border-radius: 4px;
  font-weight: bold;
}

#sidebar-panel .this-doc>span {
  color: var(--sidebar-active-color) !important;
  font-weight: bold;
  padding: 2px 6px;
}

#sidebar-panel .this-path>span,
#sidebar-panel .this-path>a {
  color: #b06000;
  font-weight: bold;
}

/* Search Tab Specifics */
.search-type-wrapper {
  display: flex;
  border: 1px solid var(--panel-border, #c4c7c5);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.85em;
  margin-bottom: 12px;
}

.search-type-option {
  flex: 1;
  text-align: center;
  padding: 6px 0;
  cursor: pointer;
  background-color: #f1f3f4;
  color: #444746;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
  border-right: 1px solid var(--panel-border, #c4c7c5);
}

.search-type-option:last-child {
  border-right: none;
}

.search-type-option.active {
  background-color: var(--sidebar-active-bg, #d3e3fd);
  color: var(--sidebar-active-color, #041e49);
}

.search-wrapper {
  display: flex;
  margin-bottom: 15px;
  background-color: #fff;
  border: 1px solid #c4c7c5;
  border-radius: 20px;
  padding: 4px 12px;
  align-items: center;
}

.search-wrapper input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.95em;
  padding: 4px 0;
  background: transparent;
}

.search-results-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-results-list li {
  margin-bottom: 8px;
  border-bottom: 1px solid #eef0f2;
  padding-bottom: 8px;
}

.search-results-list a {
  padding: 6px;
  font-weight: 500;
  color: #1f1f1f;
}

.search-results-list .search-path-desc {
  font-size: 0.75em;
  color: #747775;
  padding-left: 6px;
  display: block;
  margin-top: 2px;
}

/* Recent Tab Specifics */
.recent-update-panel-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-update-panel-list li {
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid #e3e3e3;
}

.recent-update-panel-list .recent-date {
  font-size: 0.8em;
  color: #747775;
  font-weight: bold;
  display: block;
  margin-bottom: 4px;
}

.recent-update-panel-list .recent-content {
  font-size: 0.85em;
  line-height: 1.4em;
  display: block;
  color: #1f1f1f;
}

.recent-update-panel-list .recent-content a {
  display: inline;
  padding: 0;
  color: #0b57d0;
  text-decoration: underline;
}

/* Modals */
.site-modal-overlay {
  position: fixed;
  inset: 0 0 0 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.site-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.site-modal-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  width: min(500px, 90vw);
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.site-modal-overlay.active .site-modal-card {
  transform: scale(1);
}

.site-modal-header {
  color: black;
  padding: 16px 20px;
  border-bottom: 1px solid #e3e3e3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.1em;
}

.site-modal-close-btn {
  cursor: pointer;
  color: #444746;
  font-size: 24px;
}

.site-modal-body {
  padding: 20px;
  font-size: 0.95em;
  line-height: 1.6em;
}

/* Wide Help Modal Card Style */
#help-modal-overlay .site-modal-card {
  width: 95vw;
  max-width: 1400px;
  height: 90vh;
  max-height: 90vh;
}

/* KanaLoop-style OAuth login button style */
.site-login-btn {
  display: block;
  margin: 14px auto;
  padding: 12px 24px;
  font-size: 1.15em;
  border-radius: 30px;
  width: 80%;
  max-width: 320px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.site-login-btn:hover {
  opacity: 0.9;
}

.site-login-btn:active {
  transform: scale(0.98);
}

.google-btn {
  background-color: #3b5998;
  /* KanaLoop matching blue */
  color: white;
}

.naver-btn {
  background-color: #16ff25;
  /* KanaLoop matching green */
  color: #1f1f1f;
}

.kakao-btn {
  background-color: #ebff32;
  /* KanaLoop matching yellow */
  color: #1f1f1f;
}

.logout-btn {
  background-color: #333333;
  color: white;
}

/* 좁은 화면(<= 960px) 전용 좌상단 고정 삼선(햄버거) 메뉴 버튼 */
#mobile-header {
  display: none !important;
}

#mobile-menu-btn {
  display: none !important;
}

#sidebar-overlay {
  display: none !important;
}

/* Responsive Media Queries (화면 절반 너비 960px 이하 & 모바일) */
@media screen and (max-width: 960px) {
  :root {
    --sidebar-width: 0px !important;
  }

  body {
    padding-left: 0 !important;
    padding-top: 0 !important;
  }

  #mobile-menu-btn {
    display: flex !important;
    position: fixed !important;
    top: 8px !important;
    left: 10px !important;
    z-index: 9999 !important;
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 1px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    color: #334155 !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14) !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    user-select: none !important;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease !important;
  }

  #mobile-menu-btn * {
    pointer-events: none !important;
  }

  #mobile-menu-btn:hover,
  #mobile-menu-btn.active {
    background-color: #228be6 !important;
    border-color: #228be6 !important;
    color: #ffffff !important;
    transform: scale(1.05) !important;
    box-shadow: 0 6px 18px rgba(34, 139, 230, 0.3) !important;
  }

  #mobile-menu-btn.hidden-by-sidebar,
  body.mobile-nav-open #mobile-menu-btn {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }

  #sidebar-container {
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    z-index: 10000 !important;
    transform: translateX(-105%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  #sidebar-container.active {
    transform: translateX(0) !important;
    box-shadow: 6px 0 24px rgba(0, 0, 0, 0.18) !important;
  }

  #sidebar-overlay {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.4) !important;
    z-index: 9998 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
  }

  #sidebar-overlay.active {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}

#last-modified {
  position: absolute;
  width: 90vw;
  top: 60px;
  text-align: right;
}

#last-modified a {
  text-decoration: none;
  color: inherit;
  font-weight: normal;
}

header #home-group {
  display: flex;
  width: 80px;
  align-content: center;
  justify-content: space-between;
}

header #headerIcons {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-end;
}

header #headerIcons div {
  margin: 0 5px;
}

header #headerIcons #header-up-icon {
  display: flex;
  font-size: 7pt;
  flex-direction: column;
  align-items: center;
  flex-wrap: nowrap;
  border: 1px solid #ddd;
  border-radius: 5px;
  width: 35px;
  height: 35px;
  line-height: 1em;
  justify-content: space-evenly;
  margin: 5px;
  user-select: none;
  cursor: pointer;
}

header #headerIcons #tutorial-icon {
  display: flex;
  font-size: 7pt;
  flex-direction: column;
  align-items: center;
  flex-wrap: nowrap;
  border: 1px solid #ddd;
  border-radius: 5px;
  width: 35px;
  height: 35px;
  line-height: 1em;
  justify-content: space-evenly;
  margin: 5px;
  user-select: none;
  cursor: pointer;
}

.tutorial {
  /* display: none; */
  width: 0;
  animation: 2s ease infinite alternate tutorial-show;
  font-weight: bold;
  margin: 1px 20px 1px auto;
}

span.tutorial {
  display: block;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 8px;
}

@keyframes tutorial-show {
  0% {
    color: rgb(0, 0, 128);
    background-color: rgb(255, 255, 192);
  }

  50% {
    color: rgb(0, 128, 0);
    background-color: rgb(255, 192, 255);
  }

  100% {
    color: rgb(128, 0, 0);
    background-color: rgb(192, 255, 255);
  }
}

a.detail {
  display: inline;
  vertical-align: super;
  font-size: 0.8em;
  font-family: var(--font-table);
  color: #F88;
}

a.detail+span {
  position: relative;
}

a.detail:hover+span .description {
  visibility: visible;
}

a.detail+span .description {
  position: absolute;
  visibility: hidden;
  top: 3em;
  left: 0;
  left: initial;
  padding: 10px;
  background-color: black;
  border-radius: 1em;
  color: white;
  width: 70vw;
  font-family: var(--font-table);
  text-align: left;
  z-index: 20;
}

a.detail+span .reference {
  display: none;
}

.info {
  color: white;
  background-color: green;
  padding: 0 4px;
  border-radius: 4px;
}

.info:hover div,
.info:hover tspan,
.info:hover span {
  visibility: visible;
}

.info div,
.info tspan,
.info span {
  visibility: hidden;
  position: fixed;
  top: var(--header-height);
  left: 40px;
  width: 90%;
  border: 1px solid #ddd;
  background-color: #ffffdd;
  box-shadow: 5px 5px 5px 5px #eee8;
  padding: 10px;
  color: black;
  font-family: var(--font-table);
  border-radius: 10px;
  min-height: 50px;
  z-index: 20;
}

.info img {
  min-height: 300px;
  max-height: 300px;
}

button.quiz {
  border: 1px solid #ddd;
  padding: 3px;
  background-color: #444;
  color: #444;
}

button.quiz2 {
  border: 1px solid #ddd;
  padding: 3px;
  background-color: #444;
  color: #FFF;
}

.clear-both {
  clear: both;
}

.clear-right {
  clear: both;
}

.clear-left {
  clear: both;
}

div.page-move {
  margin: 250px auto 0;
  display: flex;
  flex-direction: row;
  align-content: center;
  justify-content: space-evenly;
  align-items: center;
}

div.page-move>span:nth-child(1),
div.page-move>span:nth-child(5) {
  font-size: 1.1em
}

div.page-move>span:nth-child(3) {
  font-size: 1.7em
}

@media screen and (max-width: 400px) {
  header ul {
    display: flex;
    width: 100vw;
    margin: 0;
    padding: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
  }

  header li>ul {
    top: 55px;
  }

  .idea div {
    left: 50px;
    max-width: 300px;
  }
}

@media screen and (min-width: 1500px) {
  .idea div {
    left: 350px;
    max-width: 800px;
  }
}

/* Header & Footer Removal */
header,
footer {
  display: none !important;
}

/* TOC active element styles */
#toc-tree a.active-toc {
  text-decoration: underline !important;
  text-decoration-color: red !important;
  text-underline-offset: 0.3em;
  font-weight: bold;
  color: red !important;
}

/* Sitemap tab Actions */
.sitemap-actions {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e3e3e3;
}

.sitemap-actions button {
  font-size: 0.75em;
  padding: 4px 10px;
  background-color: #fff;
  border: 1px solid #c4c7c5;
  border-radius: 12px;
  color: #444746;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.sitemap-actions button:hover {
  background-color: var(--sidebar-hover-bg);
}

/* TOC Doc Info Panel Details */
.toc-category-breadcrumb {
  font-size: 0.75em;
  color: #747775;
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
  font-weight: bold;
}

.toc-doc-title {
  font-size: 1.1em;
  font-weight: bold;
  color: #1f1f1f;
  line-height: 1.4em;
  margin-bottom: 15px;
  display: block;
}

.toc-doc-nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e3e3e3;
  padding-bottom: 15px;
}

.toc-doc-nav-buttons a.nav-btn {
  flex: 1;
  text-align: center;
  padding: 6px 0;
  font-size: 0.8em;
  border: 1px solid #c4c7c5;
  border-radius: 16px;
  color: #1f1f1f;
  background-color: #fff;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.toc-doc-nav-buttons a.nav-btn:hover {
  background-color: var(--sidebar-hover-bg);
}

.toc-doc-nav-buttons a.nav-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

/* Page specific dynamic feature buttons inside icon bar */
#sidebar-page-features {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 12px;
  margin: 15px 0;
  border-top: 1px solid var(--sidebar-border);
  padding-top: 15px;
}

#sidebar-page-features .nav-item.active {
  background-color: var(--sidebar-active-bg);
  color: var(--sidebar-active-color);
}

/* Post-load last-modified override */
#last-modified {
  position: static !important;
  display: block !important;
  text-align: right !important;
  margin-top: 20px !important;
  margin-bottom: 20px !important;
  border-top: none !important;
  padding-top: 0 !important;
  font-size: 0.8em !important;
  color: #747775 !important;
  width: 100% !important;
}

/* Alt Keybind Badges */
.keybind-badge {
  display: none;
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: #ea4335;
  color: white;
  font-size: 9px;
  font-weight: 800;
  border-radius: 50%;
  width: 15px;
  height: 15px;
  text-align: center;
  line-height: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  z-index: 110;
  user-select: none;
}

body.show-keybinds .keybind-badge {
  display: block;
}

/* Migrated from index.html internal styles */
article a:hover {
  color: red;
}

@media screen and (min-width: 1150px) {
  article {
    padding: 0;
  }
}

/* Recent Visits Date Accordions & Deletion UI */
.recent-visit-day {
  overflow: hidden;
}

.recent-visit-day[open] {
  padding-bottom: 4px;
}

.recent-visit-summary {
  font-size: 0.75em;
  user-select: none;
  color: gray;
  text-decoration: none;
}

.recent-visit-summary:hover {
  background-color: #e8eaed;
}

.recent-visit-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-visit-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #eef0f2;
}

.recent-visit-item:last-child {
  border-bottom: none;
}

.recent-visit-link-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  font-size: 0.8em;
}

.recent-visit-link {
  font-size: 0.88em;
  font-weight: 500;
  color: #1f1f1f;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-visit-link:hover {
  text-decoration: underline;
  color: #1a0dab;
}

.recent-visit-path {
  font-size: 0.72em;
  color: #747775;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-visit-delete-btn {
  background: none;
  border: none;
  color: #747775;
  font-size: 1.2em;
  cursor: pointer;
  padding: 0 4px;
  margin-left: 8px;
  line-height: 1;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}

.recent-visit-delete-btn:hover {
  background-color: #f1f3f4;
  color: #d93025;
}

/* Changelog Badge Styles */
.changelog-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.78em;
  font-weight: 600;
  line-height: 1.2;
  margin-right: 6px;
  user-select: none;
}

.changelog-badge.added {
  background-color: #e6f4ea;
  color: #137333;
  border: 1px solid #ceebe1;
}

.changelog-badge.changed {
  background-color: #e8f0fe;
  color: #1a73e8;
  border: 1px solid #d2e3fc;
}

.changelog-badge.fixed {
  background-color: #fef7e0;
  color: #b06000;
  border: 1px solid #fce8b2;
}

.changelog-badge.removed {
  background-color: #fce8e6;
  color: #c5221f;
  border: 1px solid #fad2cf;
}

/* ==========================================================================
   [당장 구현할 사항.md 매뉴얼 명세 구현]
   1. 모바일 버전에서만 헤더가 출력된다 (데스크탑 display: none, 모바일 display: flex)
   2. 헤더는 항상 상단에 고정되어 있다 (position: fixed, top: 0, left: 0, width: 100%)
   3. 헤더는 네비게이션보다 z가 작다 (헤더 z-index: 900 < 네비게이션 z-index: 1000)
   4. 헤더의 가장 왼쪽에는 네비게이션을 호출하는 아이콘이 항상 있다
   5. 헤더는 현재 출력되는 문서의 title을 표시한다 (#header-doc-title)
   ========================================================================== */

/* 상단 헤더 미사용 */
.site-header {
  display: none !important;
}

/* 좁은 화면(max-width: 960px)에서는 네비게이션 툴팁 숨김 */
@media screen and (max-width: 960px) {
  .tooltip,
  #sidebar-container [data-tooltip]::before,
  #sidebar-container [data-tooltip]::after,
  #sidebar-panel [data-tooltip]::before,
  #sidebar-panel [data-tooltip]::after,
  .nav-item[data-tooltip]::before,
  .nav-item[data-tooltip]::after {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    content: none !important;
  }
}