@charset "utf-8";

/*
 * VS Code Dark+ 스킨 (Odyssey 기반)
 *
 * 01. 변수 / 리셋
 * 02. 타이틀바
 * 03. 액티비티바
 * 04. 사이드바 (탐색기 / 검색)
 * 05. 에디터 (탭 / 브레드크럼 / 줄 번호)
 * 06. 글 목록 / 커버
 * 07. 글 본문 (front matter / entry content / 코드 블록)
 * 08. 태그 / 관련글 / 페이지네이션
 * 09. 댓글 / 방명록
 * 10. 미니맵 / 상태바
 * 11. 티스토리 에디터 블록 (기본 기능 유지용)
 * 12. 반응형
 */

/* ========== 01. 변수 / 리셋 ========== */
:root {
  --titlebar: #3c3c3c;
  --activity: #333333;
  --activity-fg: #858585;
  --sidebar: #252526;
  --sidebar-fg: #cccccc;
  --sidebar-head: #bbbbbb;
  --editor: #1e1e1e;
  --fg: #d4d4d4;
  --muted: #858585;
  --gutter: #6e7681;
  --line: #3c3c3c;
  --hover: #2a2d2e;
  --select: #37373d;
  --focus-border: #007fd4;
  --accent: #007acc;
  --status: #007acc;
  --input: #3c3c3c;
  --blue: #569cd6;
  --lightblue: #9cdcfe;
  --yellow: #dcdcaa;
  --green: #6a9955;
  --orange: #ce9178;
  --teal: #4ec9b0;
  --purple: #c586c0;
  --num: #b5cea8;
  --link: #3794ff;
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Pretendard, "Apple SD Gothic Neo", sans-serif;
  --mono: "JetBrains Mono", D2Coding, Menlo, Consolas, monospace;
  --titlebar-h: 30px;
  --status-h: 22px;
  --ab-w: 48px;
  --sb-w: 260px;
  --gutter-w: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--editor);
  color: var(--fg);
  font: 14px/1.6 var(--ui);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}

div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, p, blockquote, th, td, figure {
  margin: 0;
  padding: 0;
}

header, footer, section, article, aside, nav, main, details, figure, figcaption { display: block; }
ul li { list-style: none; }
img, fieldset { border: 0; }
hr { display: none; }

a, a:link, a:visited { color: var(--link); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

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

::selection { background: #264f78; }

* { scrollbar-width: thin; scrollbar-color: rgba(121, 121, 121, 0.4) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(121, 121, 121, 0.4); }
::-webkit-scrollbar-thumb:hover { background: rgba(100, 100, 100, 0.7); }

.screen_out {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
}

#acc-nav a {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 1000;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
}

#acc-nav a:focus { top: 0; }

/* ========== 02. 타이틀바 ========== */
#titlebar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  height: var(--titlebar-h);
  padding: 0 8px;
  background: var(--titlebar);
  border-bottom: 1px solid #2b2b2b;
  color: #cccccc;
  font-size: 13px;
}

.tb-left, .tb-right {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.tb-right { justify-content: flex-end; }

.tb-center {
  flex: 0 1 460px;
  min-width: 0;
}

.tb-dots {
  display: inline-flex;
  gap: 8px;
  margin: 0 12px 0 6px;
}

.tb-dots i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}

.tb-dots i:nth-child(2) { background: #febc2e; }
.tb-dots i:nth-child(3) { background: #28c840; }

.tb-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  border-radius: 4px;
}

.tb-btn:hover { background: rgba(255, 255, 255, 0.1); }

#menubar {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

#menubar::-webkit-scrollbar { display: none; }

.mb-item {
  flex: none;
  padding: 2px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #cccccc;
  font: inherit;
  font-size: 13px;
  line-height: 20px;
  cursor: default;
}

.mb-item:hover,
.mb-item.open { background: rgba(255, 255, 255, 0.1); }
.mb-item:focus-visible { outline: 1px solid var(--accent, #007fd4); outline-offset: -1px; }

#menu-pop {
  position: fixed;
  z-index: 1000;
  min-width: 240px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 4px;
  border: 1px solid #454545;
  border-radius: 6px;
  background: #252526;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  font-size: 13px;
}

#menu-pop[hidden] { display: none; }

.mp-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0 10px 0 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #cccccc;
  font: inherit;
  line-height: 26px;
  text-align: left;
  cursor: default;
}

.mp-item .codicon { flex: none; width: 16px; font-size: 14px; }
.mp-text { flex: 1; white-space: nowrap; }
.mp-key { padding-left: 24px; color: #9d9d9d; font-size: 12px; white-space: nowrap; }

.mp-item:not(:disabled):hover,
.mp-item:not(:disabled):focus { outline: 0; background: #04395e; color: #ffffff; }
.mp-item:not(:disabled):hover .mp-key,
.mp-item:not(:disabled):focus .mp-key { color: #ffffff; }
.mp-item:disabled { color: #6b6b6b; }
.mp-item:disabled .mp-key { color: #6b6b6b; }

.mp-sep { height: 1px; margin: 4px 6px; background: #454545; }

.tb-command {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 22px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #cccccc;
  font-size: 12px;
}

.tb-command:hover { background: rgba(255, 255, 255, 0.1); }

.tb-command span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tb-deco {
  display: inline-flex;
  gap: 10px;
  margin-right: 6px;
  color: #9d9d9d;
}

/* ========== 03. 액티비티바 ========== */
#activitybar {
  position: fixed;
  top: var(--titlebar-h);
  bottom: var(--status-h);
  left: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: var(--ab-w);
  background: var(--activity);
}

.ab-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--ab-w);
  height: 48px;
  color: var(--activity-fg) !important;
  text-decoration: none !important;
}

.ab-item .codicon { font-size: 24px; }

.ab-item:hover,
.ab-item.active { color: #ffffff !important; }

.ab-item.active::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: #ffffff;
}

body.sidebar-hidden .ab-item.active::before { display: none; }
body.sidebar-hidden .ab-item.active { color: var(--activity-fg) !important; }

/* ========== 04. 사이드바 ========== */
#sidebar {
  position: fixed;
  top: var(--titlebar-h);
  bottom: var(--status-h);
  left: var(--ab-w);
  z-index: 300;
  overflow-y: auto;
  width: var(--sb-w);
  background: var(--sidebar);
  border-right: 1px solid #2b2b2b;
  color: var(--sidebar-fg);
  font-size: 13px;
}

body.sidebar-hidden #sidebar { display: none; }

.sb-view { display: none; }
.sb-view.active { display: block; }

.sb-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 35px;
  padding: 0 12px 0 20px;
  color: var(--sidebar-head);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pane + .pane,
.pane ~ .pane { border-top: 1px solid rgba(204, 204, 204, 0.15); }

.pane > summary {
  display: flex;
  align-items: center;
  height: 22px;
  padding-right: 8px;
  color: var(--sidebar-head);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  list-style: none;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
}

.pane > summary::-webkit-details-marker { display: none; }

.pane > summary::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin: 0 9px 0 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.1s;
}

.pane[open] > summary::before { transform: rotate(45deg) translate(-2px, 0); }
.pane > summary:focus-visible { outline: 1px solid var(--focus-border); outline-offset: -1px; }

.pane-body { padding: 2px 0 10px; }

/* --- 카테고리: 파일 트리 --- */
.category ul { margin: 0; padding: 0; }

.category li { position: relative; }

.category a {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding-right: 12px;
  overflow: hidden;
  color: var(--sidebar-fg) !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.category a:hover { background: var(--hover); }

.category a.active {
  background: var(--select);
  outline: 1px solid var(--focus-border);
  outline-offset: -1px;
  color: #ffffff !important;
}

.category .c_cnt {
  margin-left: auto;
  padding-left: 8px;
  color: var(--muted);
  font-size: 11px;
}

.category img { display: none; }

/* 새 글이 있는 카테고리 = git untracked 표시 */
.category a:has(img)::after {
  content: "U";
  margin-left: 6px;
  color: #73c991;
  font-weight: 700;
  font-size: 11px;
}

.category .link_tit { padding-left: 12px; font-weight: 600; }
.category .link_item { padding-left: 24px; }
.category .link_sub_item { padding-left: 42px; }

.category .link_tit::before,
.category .link_item::before,
.category .link_sub_item::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: no-repeat center / 16px 16px;
}

/* 폴더 아이콘 */
.category .link_tit::before,
.category li:has(> .sub_category_list) > .link_item::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23dcb67a' d='M1.5 3h4.6l1.5 1.6h6.9V13h-13z'/%3E%3C/svg%3E");
}

/* 마크다운 파일 아이콘 */
.category .link_item::before,
.category .link_sub_item::before,
.ico-md::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23519aba' d='M2 4.5h2l1.5 2 1.5-2h2v7H7V7.6L5.5 9.5 4 7.6v3.9H2zM11 4.5h1.6v3.5H14l-2.2 3.5L9.6 8H11z'/%3E%3C/svg%3E");
}

/* 들여쓰기 가이드 */
.category .sub_category_list::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 0;
  left: 31px;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}

/* --- 사이드바 리스트 --- */
.sb-list li a {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 12px 0 22px;
  color: var(--sidebar-fg) !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.sb-list li a:hover { background: var(--hover); }

.sb-list .codicon { flex: none; font-size: 14px; color: var(--muted); }
.sb-list .codicon-flame { color: #e8ab53; }

.sb-list .title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-list .date {
  color: var(--muted);
  font-size: 11px;
}

.ico-md {
  display: inline-flex;
  flex: none;
  width: 16px;
  height: 16px;
}

.ico-md::before {
  content: "";
  width: 16px;
  height: 16px;
  background: no-repeat center / 16px 16px;
}

.sb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 12px 12px 22px;
}

.sb-tags a {
  padding: 0 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--lightblue) !important;
  font: 12px/20px var(--mono);
  text-decoration: none !important;
}

.sb-tags a:hover { background: rgba(255, 255, 255, 0.12); }
.sb-tags a::before { content: "#"; color: var(--muted); }

.sb-count {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  padding: 4px 12px 12px 22px;
  font: 12px/1.7 var(--mono);
}

.sb-count dt { color: var(--lightblue); }
.sb-count dt::after { content: ":"; color: var(--fg); }
.sb-count dd { color: var(--num); }

/* --- 검색 뷰 --- */
.sb-search {
  position: relative;
  margin: 4px 12px 0 20px;
}

.sb-search input {
  width: 100%;
  height: 26px;
  padding: 0 30px 0 6px;
  border: 1px solid var(--input);
  border-radius: 2px;
  background: var(--input);
  color: var(--fg);
  font-size: 13px;
  outline: none;
}

.sb-search input:focus { border-color: var(--focus-border); }
.sb-search input::placeholder { color: #8b8b8b; }

.sb-search button {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 24px;
  height: 24px;
  border-radius: 3px;
  color: #cccccc;
}

.sb-search button:hover { background: rgba(255, 255, 255, 0.1); }

.sb-hint {
  margin: 10px 12px 0 20px;
  color: var(--muted);
  font-size: 12px;
}

/* ========== 05. 에디터 ========== */
#editor {
  min-height: 100vh;
  margin-left: calc(var(--ab-w) + var(--sb-w));
  padding-top: var(--titlebar-h);
  padding-bottom: var(--status-h);
}

body.sidebar-hidden #editor { margin-left: var(--ab-w); }

.tabs {
  position: sticky;
  top: var(--titlebar-h);
  z-index: 200;
  display: flex;
  height: 35px;
  background: var(--sidebar);
}

.tab-strip {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.tab-strip::-webkit-scrollbar { display: none; }

.tab {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  max-width: 240px;
  padding: 0 6px 0 12px;
  border-top: 1px solid transparent;
  border-right: 1px solid #252526;
  background: #2d2d2d;
  color: #969696 !important;
  font-size: 13px;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
}

.tab:hover { background: #323232; }

.tab.active {
  border-top-color: var(--accent);
  background: var(--editor);
  color: #ffffff !important;
}

.tab .codicon { flex: none; color: #519aba; }
.tab .codicon-json { color: #cbcb41; }
.tab .codicon-folder-opened { color: #dcb67a; }
.tab .codicon-search { color: #cccccc; }

.tab-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-dir {
  flex: none;
  max-width: 80px;
  overflow: hidden;
  color: #8b8b8b;
  font-size: 12px;
  text-overflow: ellipsis;
}

.tab:not(.active) .tab-dir { color: #6e6e6e; }

.tab-close {
  display: flex;
  flex: none;
  padding: 2px;
  border-radius: 4px;
  color: #cccccc;
  visibility: hidden;
}

.tab.active .tab-close,
.tab:hover .tab-close { visibility: visible; }
.tab-close .codicon { color: inherit !important; }
.tab-close:hover { background: rgba(255, 255, 255, 0.1); }

.tabs-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  padding: 0 14px;
  color: #cccccc;
}

.breadcrumbs {
  position: sticky;
  top: calc(var(--titlebar-h) + 35px);
  z-index: 199;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 22px;
  padding: 0 16px;
  overflow: hidden;
  background: var(--editor);
  box-shadow: 0 6px 6px -6px rgba(0, 0, 0, 0.6);
  color: #a9a9a9;
  font-size: 12.5px;
  white-space: nowrap;
}

.breadcrumbs a { color: inherit !important; }
.breadcrumbs a:hover { color: #ffffff !important; text-decoration: none; }
.breadcrumbs .codicon { font-size: 14px; opacity: 0.7; }

.breadcrumbs span {
  overflow: hidden;
  text-overflow: ellipsis;
}

#container { padding: 24px 100px 80px 0; }

/* 줄 번호: #content 왼쪽 거터에 각 블록 번호를 찍는다 */
#content {
  position: relative;
  max-width: calc(940px + var(--gutter-w));
  padding-left: var(--gutter-w);
  counter-reset: ln;
}

.post-cover .fm-line,
.post-cover h1,
.post-item,
.post-header,
#article-view > :is(p, h1, h2, h3, h4, h5, h6, ul, ol, blockquote, div, table) {
  counter-increment: ln;
}

.post-cover .fm-line::before,
.post-cover h1::before,
.post-item::before,
.post-header::before,
#article-view > :is(p, h1, h2, h3, h4, h5, h6, ul, ol, blockquote, div, table)::before {
  content: counter(ln);
  position: absolute;
  left: 0;
  width: calc(var(--gutter-w) - 20px);
  color: var(--gutter);
  font-weight: 400;
  font-size: 13px;
  font-family: var(--mono);
  font-style: normal;
  letter-spacing: 0;
  text-align: right;
  pointer-events: none;
}

/* ========== 06. 글 목록 / 커버 ========== */
.post-header {
  margin-bottom: 12px;
  color: var(--muted);
  font-family: var(--mono);
}

.post-header h1 {
  font-weight: 400;
  font-size: 13px;
  line-height: 1.6;
}

.post-header h1 span { color: var(--fg); }

.post-header h1 em {
  margin-left: 8px;
  color: var(--num);
  font-style: normal;
}

.post-header h1 em::before { content: "("; color: var(--muted); }
.post-header h1 em::after { content: ")"; color: var(--muted); }

#tt-body-archive .post-header span::before,
#tt-body-search .post-header span::before { content: "'"; color: var(--orange); }
#tt-body-archive .post-header span::after { content: "' 에 등록된 글"; }
#tt-body-search .post-header span::after { content: "' 의 검색결과"; }
#tt-body-tag .post-header span::before { content: "#"; color: var(--muted); }

.post-item::before { margin-top: 11px; }

.post-item a {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 10px 12px;
  margin-left: -12px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--fg) !important;
  text-decoration: none !important;
}

.post-item a:hover { background: var(--hover); }
.post-item a:focus-visible { outline: 1px solid var(--focus-border); }

.post-item .text {
  flex: 1;
  min-width: 0;
}

.post-item .title {
  display: block;
  overflow: hidden;
  color: var(--yellow);
  font-weight: 600;
  font-size: 15.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-item .title::before {
  content: "# ";
  color: var(--blue);
  font-family: var(--mono);
}

.post-item .excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: 4px 0 6px;
  color: var(--green);
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.post-item .excerpt::before {
  content: "// ";
  font-family: var(--mono);
}

.post-item .meta {
  display: block;
  color: var(--muted);
  font: 12px var(--mono);
}

.post-item .date { color: var(--orange); }
.post-item .date::before, .post-item .date::after { content: '"'; }

.post-item .thum {
  flex: none;
  overflow: hidden;
  width: 120px;
  height: 75px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #2d2d2d;
}

.post-item .thum img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.post-item a:hover .thum img { opacity: 1; }

.post-item.protected .codicon { font-size: 14px; color: var(--muted); }

/* 커버 & 관련글 */
[class^="cover-"],
.related-articles {
  position: relative;
  margin-bottom: 40px;
}

[class^="cover-"] h2,
.related-articles h2,
.tags h2,
.comments h2 {
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--sidebar-head);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

[class^="cover-"] ul,
.related-articles ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
}

.cover-list ul,
.cover-thumbnail-2 ul { grid-template-columns: 1fr; }

[class^="cover-"] li a,
.related-articles li a {
  display: block;
  height: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--sidebar);
  color: var(--fg) !important;
  text-decoration: none !important;
}

[class^="cover-"] li a:hover,
.related-articles li a:hover { border-color: var(--focus-border); }

[class^="cover-"] figure,
.related-articles figure {
  overflow: hidden;
  margin-bottom: 8px;
  border-radius: 4px;
  background: #2d2d2d;
  aspect-ratio: 16 / 9;
}

[class^="cover-"] figure:empty,
.related-articles figure:empty { display: none; }

.cover-thumbnail-2 li a { display: flex; flex-direction: row-reverse; gap: 16px; }
.cover-thumbnail-2 figure { flex: none; width: 140px; margin: 0; }
.cover-thumbnail-2 li a > span { flex: 1; min-width: 0; }

[class^="cover-"] figure img,
.related-articles figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

[class^="cover-"] .title,
.related-articles .title {
  display: block;
  overflow: hidden;
  color: var(--yellow);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[class^="cover-"] .excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  color: var(--green);
  font-size: 12.5px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

[class^="cover-"] .date,
[class^="cover-"] .meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font: 11.5px var(--mono);
}

[class^="cover-"] .meta .comment { margin-right: 8px; }

[class^="cover-"] .more {
  position: absolute;
  top: 0;
  right: 0;
  color: var(--link) !important;
  font-size: 12px;
}

.cover-event li a {
  position: relative;
  min-height: 110px;
  background-size: cover;
  background-position: center;
}

.cover-event li a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 5px;
  background: linear-gradient(90deg, rgba(30, 30, 30, 0.9), rgba(30, 30, 30, 0.3));
}

.cover-event .title,
.cover-event .more {
  position: relative;
  white-space: normal;
}

.cover-event .more {
  position: relative;
  display: inline-block;
  margin-top: 8px;
}

.not-found li {
  color: var(--muted);
  font: 13px/2 var(--mono);
}

.not-found li::before { content: "// "; color: var(--green); }

.not-found .tag,
.not-found .category,
.not-found .archive { display: none; }

#tt-body-tag .not-found ul,
#tt-body-category .not-found ul,
#tt-body-archive .not-found ul { display: none; }

#tt-body-tag .not-found .tag,
#tt-body-category .not-found .category,
#tt-body-archive .not-found .archive { display: block; }

/* ========== 07. 글 본문 ========== */
/* front matter */
.post-cover {
  margin-bottom: 18px;
  background-image: none !important;
  font-family: var(--mono);
}

.post-cover .fm-line {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--fg);
}

.post-cover .fm-sep { color: var(--muted); }
.post-cover .k { color: var(--lightblue); }
.post-cover .v { color: var(--orange); }
.post-cover a.v:hover { text-decoration: underline; }

.post-cover h1 {
  margin-top: 14px;
  color: var(--blue);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.35;
  font-family: var(--ui);
  word-break: keep-all;
}

.post-cover h1::before { margin-top: 10px; }
.post-cover h1 a { color: inherit !important; }

.post-cover h1::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 16px;
  background: var(--line);
}

/* entry content */
#article-view {
  min-height: 300px;
  margin: 0;
  padding: 0 0 40px;
  color: var(--fg);
  font-size: 15.5px;
  line-height: 1.8;
  word-wrap: break-word;
  letter-spacing: 0;
}

#article-view > * { margin-top: 0; }
#article-view p { margin-bottom: 18px; }

#article-view h2,
#article-view h3,
#article-view h4 {
  margin: 36px 0 14px;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: -0.3px;
}

#article-view h2[data-ke-size], #article-view h2 { font-size: 1.55em; line-height: 1.45; }
#article-view h3[data-ke-size], #article-view h3 { font-size: 1.32em; line-height: 1.5; color: var(--teal); }
#article-view h4[data-ke-size], #article-view h4 { font-size: 1.15em; line-height: 1.55; color: var(--lightblue); }

#article-view h2 + p,
#article-view h3 + p,
#article-view h4 + p { margin-top: 0; }

#article-view p[data-ke-size='size18'] { font-size: 1.12em; line-height: 1.75; }
#article-view p[data-ke-size='size16'] { line-height: 1.8; }
#article-view p[data-ke-size='size14'] { font-size: 0.88em; line-height: 1.75; }

#article-view a { color: var(--link); text-decoration: underline; }
#article-view strong, #article-view b { color: #ffffff; }
#article-view em, #article-view i:not(.codicon) { color: var(--purple); }

#article-view ul,
#article-view ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

#article-view ul li { list-style: disc; }
#article-view ol li { list-style: decimal; }
#article-view ul li ul li { list-style: circle; }

#article-view li {
  margin-bottom: 4px;
  line-height: 1.75;
}

#article-view li::marker { color: var(--muted); }

#article-view :not(pre) > code {
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--orange);
  font-size: 0.88em;
  font-family: var(--mono);
}

#article-view blockquote {
  margin: 0 0 20px;
  padding: 8px 16px;
  border: 0;
  border-left: 3px solid var(--green);
  background: rgba(106, 153, 85, 0.08);
  color: #b5b5b5;
  font-size: 1em;
  line-height: 1.75;
  text-align: left;
}

#article-view blockquote[data-ke-style='style1'] {
  padding: 34px 0 0;
  border: 0;
  background: url(https://t1.daumcdn.net/axz_keditor/dist/latest/image/blockquote-style1.svg) no-repeat 50% 0;
  font-size: 1.12em;
  text-align: center;
  filter: invert(0.85);
}

#article-view blockquote[data-ke-style='style3'] {
  border: 1px solid var(--line);
  background: var(--sidebar);
  padding: 18px 22px;
}

#article-view div[data-ke-type='moreLess'] {
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px dashed var(--line);
  background: var(--sidebar);
  color: var(--fg);
}

#article-view div[data-ke-type='moreLess'] .btn-toggle-moreless {
  color: var(--link);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

/* 코드 블록 */
#article-view pre {
  position: relative;
  margin: 0 0 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #1a1a1a;
  white-space: pre;
  word-break: normal;
  word-wrap: normal;
}

#article-view pre::before {
  content: attr(data-ke-language);
  display: block;
  height: 30px;
  padding: 0 44px 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--sidebar);
  color: #a9a9a9;
  font: 12px/30px var(--mono);
  text-transform: lowercase;
}

#article-view pre code,
#article-view pre code.hljs {
  display: block;
  overflow-x: auto;
  padding: 14px 16px !important;
  border: 0 !important;
  background: transparent !important;
  color: #d4d4d4;
  font-size: 13.5px !important;
  line-height: 1.65 !important;
  font-family: var(--mono) !important;
  white-space: pre;
}

.code-copy {
  position: absolute;
  top: 3px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 24px;
  border-radius: 4px;
  color: #cccccc;
  opacity: 0.6;
}

.code-copy:hover { background: rgba(255, 255, 255, 0.1); opacity: 1; }

/* Dark+ 문법 색상 (티스토리 코드블록 테마를 덮어씀) */
#article-view .hljs { color: #d4d4d4; }
#article-view .hljs-keyword,
#article-view .hljs-literal,
#article-view .hljs-symbol,
#article-view .hljs-name,
#article-view .hljs-selector-tag { color: #569cd6; }
#article-view .hljs-built_in,
#article-view .hljs-type,
#article-view .hljs-title.class_,
#article-view .hljs-class .hljs-title { color: #4ec9b0; }
#article-view .hljs-title,
#article-view .hljs-title.function_,
#article-view .hljs-function .hljs-title { color: #dcdcaa; }
#article-view .hljs-params,
#article-view .hljs-variable,
#article-view .hljs-attr,
#article-view .hljs-property,
#article-view .hljs-template-variable { color: #9cdcfe; }
#article-view .hljs-number { color: #b5cea8; }
#article-view .hljs-string,
#article-view .hljs-meta .hljs-string { color: #ce9178; }
#article-view .hljs-regexp,
#article-view .hljs-template-tag { color: #d16969; }
#article-view .hljs-comment,
#article-view .hljs-quote { color: #6a9955; font-style: italic; }
#article-view .hljs-doctag { color: #608b4e; }
#article-view .hljs-meta,
#article-view .hljs-meta .hljs-keyword,
#article-view .hljs-tag { color: #808080; }
#article-view .hljs-tag .hljs-name { color: #569cd6; }
#article-view .hljs-attribute { color: #9cdcfe; }
#article-view .hljs-selector-id,
#article-view .hljs-selector-class,
#article-view .hljs-selector-attr,
#article-view .hljs-selector-pseudo,
#article-view .hljs-bullet { color: #d7ba7d; }
#article-view .hljs-section { color: #569cd6; font-weight: 700; }
#article-view .hljs-link { color: #569cd6; text-decoration: underline; }
#article-view .hljs-addition { color: #b5cea8; background: rgba(155, 185, 85, 0.15); }
#article-view .hljs-deletion { color: #ce9178; background: rgba(255, 0, 0, 0.15); }
#article-view .hljs-emphasis { font-style: italic; }
#article-view .hljs-strong { font-weight: 700; }

/* 표 */
#article-view table {
  margin-bottom: 20px;
  border-collapse: collapse;
  border-color: var(--line) !important;
}

#article-view table td,
#article-view table th {
  padding: 8px 10px;
  border: 1px solid var(--line) !important;
  background: transparent !important;
  color: var(--fg) !important;
  font-size: 14px;
  word-break: break-word;
}

#article-view table tr:first-child td { background: var(--sidebar) !important; font-weight: 600; }
#article-view table tr:nth-child(2n) td { background: rgba(255, 255, 255, 0.02) !important; }

/* 보호글 */
.entry-content .protected_form {
  padding: 80px 0 100px;
  text-align: center;
}

.entry-content .protected_form h2 {
  margin-bottom: 8px;
  color: var(--fg);
  font-size: 22px;
}

.entry-content .protected_form p { margin-bottom: 24px; color: var(--muted); }

.entry-content .protected_form input {
  width: 200px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--input);
  background: var(--input);
  color: var(--fg);
  outline: none;
}

.entry-content .protected_form input:focus { border-color: var(--focus-border); }

.btn, a.btn, .entry-content .protected_form .btn {
  display: inline-block;
  height: 30px;
  margin-left: 4px;
  padding: 0 14px;
  border-radius: 2px;
  background: #0e639c;
  color: #ffffff !important;
  font-size: 13px;
  line-height: 30px;
  vertical-align: top;
}

.btn:hover { background: #1177bb; text-decoration: none; }

/* 티스토리 자동 삽입 영역 */
#content .another_category {
  margin: 40px 0 !important;
  padding: 14px 18px !important;
  border: 1px solid var(--line) !important;
  background: var(--sidebar) !important;
}

#content .another_category h4 {
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: 0 !important;
  color: var(--sidebar-head) !important;
  font-size: 13px !important;
}

#content .another_category h4 a { color: var(--teal) !important; }
#content .another_category table { margin: 0 !important; border: 0 !important; }

#content .another_category th,
#content .another_category td {
  padding: 2px 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 13px !important;
}

#content .another_category th a { color: var(--fg) !important; }
#content .another_category th a.current { color: var(--yellow) !important; font-weight: 600; }
#content .another_category td { color: var(--muted) !important; }

.container_postbtn { margin: 40px 0 !important; padding: 0 !important; }

.absent_post {
  padding: 80px 0 !important;
  background: none !important;
  color: var(--muted) !important;
  font: 14px/1.75 var(--mono) !important;
}

.absent_post::before {
  content: "Error: 글을 찾지 못했습니다.";
  display: block;
  margin-bottom: 8px;
  color: #f48771;
  font-weight: 700;
  font-size: 20px;
}

.revenue_unit_wrap.position_list { max-width: 740px; margin: 30px auto; }

/* ========== 08. 태그 / 페이지네이션 ========== */
.tags { margin: 30px 0 40px; }

.tags a {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 1px 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--lightblue) !important;
  font: 12.5px/22px var(--mono);
  text-decoration: none !important;
}

.tags a::before { content: "#"; color: var(--muted); }
.tags a:hover { background: rgba(255, 255, 255, 0.12); }

.tag-cloud a.cloud1 { font-size: 16px; color: var(--yellow) !important; }
.tag-cloud a.cloud2 { font-size: 14.5px; color: var(--teal) !important; }

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 36px 0 20px;
  font-family: var(--mono);
}

.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 26px;
  padding: 0 8px;
  border-radius: 4px;
  color: #cccccc !important;
  font-size: 13px;
  text-decoration: none !important;
}

.pagination a:hover { background: var(--hover); }
.pagination a .selected,
.pagination .selected { color: #ffffff; }

.pagination a:has(.selected) {
  background: var(--accent);
  color: #ffffff !important;
}

.pagination .no-more-prev,
.pagination .no-more-next {
  opacity: 0.3;
  pointer-events: none;
}

/* ========== 09. 댓글 / 방명록 ========== */
.comments { margin-bottom: 60px; }

.tt-comments-wrap { color: var(--fg); }

.tt-comment-cont,
.tt-comment-cont .tt-wrap-cmt .tt_desc,
.tt-comment-cont .tt-wrap-cmt .tt-link-user,
.tt-comment-cont .tt-box-total .tt_txt_g,
.tt-comment-cont .tt-txt-mention {
  color: var(--fg) !important;
  font-size: 14px;
}

.tt-comment-cont .tt-box-total .tt_num_g { color: var(--num) !important; font-size: 14px; }

.tt-comments-wrap textarea,
.tt-comments-wrap input[type=text],
.tt-comments-wrap input[type=password] {
  border-color: var(--input) !important;
  background: var(--input) !important;
  color: var(--fg) !important;
}

.tt-comments-wrap textarea:focus,
.tt-comments-wrap input:focus { border-color: var(--focus-border) !important; }

.tt-comment-cont .tt-btn_register,
.tt-comment-cont .tt-btn_register:hover,
.tt-comment-cont .tt-btn_register:focus {
  border-color: #0e639c !important;
  border-radius: 2px;
  background: #0e639c !important;
  color: #ffffff !important;
}

.tt-comment-cont .tt-btn_register:hover { background: #1177bb !important; }

.my_edit .ico_more { fill: #cccccc !important; }

/* 댓글 영역 글자색 일괄 보정 (검은 글씨 → 밝은 글씨) */
.tt-comments-wrap,
.tt-comments-wrap *:not(svg):not(path):not(.codicon) {
  color: var(--fg) !important;
}

/* 작성자 이름 */
.tt-comments-wrap [class*="user"],
.tt-comments-wrap [class*="nick"],
.tt-comments-wrap [class*="name"] {
  color: var(--lightblue) !important;
}

/* 날짜·보조 텍스트 */
.tt-comments-wrap [class*="date"],
.tt-comments-wrap [class*="time"],
.tt-comments-wrap [class*="info"] {
  color: var(--muted) !important;
}

/* 작성 중인 입력칸 (textarea 또는 contenteditable) */
.tt-comments-wrap [contenteditable="true"],
.tt-comments-wrap textarea {
  background: var(--input) !important;
  color: var(--fg) !important;
  caret-color: #aeafad;
}

.tt-comments-wrap ::placeholder { color: #8b8b8b !important; }

.tt-comments-wrap [contenteditable="true"]:empty::before,
.tt-comments-wrap [data-placeholder]::before { color: #8b8b8b !important; }

/* 댓글 더보기(⋯) 버튼
   원본은 어두운 점 스프라이트 이미지라 어두운 배경에서 안 보임 → 이미지 대신 밝은 ⋯ 로 그림 */
.tt-wrap-cmt .tt-button-modify:not(.tt-list-modify *) {
  width: 24px !important;
  height: 24px !important;
  border-radius: 4px !important;
  background-image: none !important;
  background-color: transparent !important;
}

.tt-wrap-cmt .tt-button-modify:not(.tt-list-modify *)::after {
  content: "\22EF";
  position: absolute;
  inset: 0;
  color: #cccccc;
  font-size: 18px;
  line-height: 24px;
  text-align: center;
}

.tt-wrap-cmt .tt-button-modify:not(.tt-list-modify *):hover,
.tt-wrap-cmt .tt-box-modify.tt-box-modify-open .tt-button-modify:not(.tt-list-modify *) {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* 수정·삭제 메뉴 (VS Code 컨텍스트 메뉴) */
.tt-comments-wrap .tt-wrap-cmt .tt-list-modify {
  padding: 4px !important;
  border: 1px solid #454545 !important;
  border-radius: 6px !important;
  background: #252526 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6) !important;
}

.tt-comments-wrap .tt-wrap-cmt .tt-list-modify a,
.tt-comments-wrap .tt-wrap-cmt .tt-list-modify button {
  display: block;
  width: 100%;
  padding: 0 14px !important;
  border-radius: 3px;
  background: transparent !important;
  color: #ffffff !important;
  font-size: 13px;
  line-height: 28px;
  text-align: left;
}

.tt-comments-wrap .tt-wrap-cmt .tt-list-modify a:hover,
.tt-comments-wrap .tt-wrap-cmt .tt-list-modify button:hover {
  background: #04395e !important;
}

/* 비밀번호 확인 레이어 */
.tt-wrap-cmt .tt_box_pwd {
  border: 1px solid #454545;
  background: #252526 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6) !important;
}

.tt_form_pwd .tt_inp_g {
  border-color: var(--input) !important;
  background: var(--input) !important;
  color: var(--fg) !important;
}

/* 댓글 구분선 / 더보기 버튼 */
.tt-list-reply,
.tt-item-reply,
.tt-item-reply .tt-list-reply-comment { border-color: var(--line) !important; }

.tt-list-reply-comment .tt-item-reply::before { border-color: #555 !important; }

.tt_btn_prev_more {
  border-top-color: var(--line) !important;
  background-color: transparent !important;
  color: var(--link) !important;
}

/* 글 아래 작성자 명함 박스 (원래 #f7f7f7 밝은 회색) */
.tt_box_namecard {
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: var(--sidebar) !important;
}

.tt_box_namecard .tt_tit_cont,
.tt_box_namecard .tt_link .tt_tit_g,
.tt_box_namecard .tt_btn_subscribe .tt_txt_g { color: var(--fg) !important; }

.tt_box_namecard .tt_desc { color: var(--muted) !important; }
.tt_box_namecard .tt_link svg { fill: #cccccc; }

.tt_box_namecard .tt_btn_subscribe {
  border: 1px solid #555 !important;
}

.tt_box_namecard .tt_btn_subscribe:hover { background: rgba(255, 255, 255, 0.08) !important; }

/* ========== 10. 미니맵 / 상태바 ========== */
#minimap {
  position: fixed;
  top: calc(var(--titlebar-h) + 57px);
  right: 14px;
  bottom: calc(var(--status-h) + 8px);
  z-index: 150;
  width: 70px;
  cursor: pointer;
}

.mm-lines { position: relative; height: 100%; }

.mm-lines i {
  position: absolute;
  left: 0;
  display: block;
  max-width: 100%;
  background: repeating-linear-gradient(to bottom, rgba(212, 212, 212, 0.28) 0 2px, transparent 2px 4px);
}

.mm-lines i.mm-h { background: rgba(86, 156, 214, 0.75); }
.mm-lines i.mm-code { background: repeating-linear-gradient(to bottom, rgba(78, 201, 176, 0.45) 0 2px, transparent 2px 4px); }
.mm-lines i.mm-img { background: rgba(255, 255, 255, 0.08); }

.mm-slider {
  position: absolute;
  left: -4px;
  right: -4px;
  background: rgba(121, 121, 121, 0.2);
  opacity: 0;
  transition: opacity 0.15s;
}

#minimap:hover .mm-slider { opacity: 1; }

#statusbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  height: var(--status-h);
  background: var(--status);
  color: #ffffff;
  font-size: 12px;
}

.st-group {
  display: flex;
  min-width: 0;
  overflow: hidden;
}

.st-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  padding: 0 8px;
  color: #ffffff !important;
  white-space: nowrap;
  text-decoration: none !important;
}

.st-item .codicon { font-size: 14px; }
a.st-item:hover { background: rgba(255, 255, 255, 0.12); }

.st-remote { padding: 0 10px; background: #16825d; }
a.st-remote:hover { background: #1a9a6c; }

#dim { display: none; }

/* ========== 11. 티스토리 에디터 블록 (기능 유지) ========== */
#article-view figure { max-width: 100%; margin: 0 0 20px; clear: both; }
#article-view iframe, #article-view figure img, #article-view figure iframe { max-width: 100%; }
#article-view figure img:not([width]), #article-view figure iframe:not([width]) { width: 100%; }
#article-view figure img { display: inline-block; height: auto; }
#article-view span[data-lightbox] { cursor: pointer; }

#article-view figure figcaption {
  width: 100%;
  min-height: 20px;
  padding-top: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  caption-side: bottom;
  word-break: break-word;
}

#article-view figure.imageblock { display: table; position: relative; }
#article-view figure.imageblock.alignCenter { margin-left: auto; margin-right: auto; text-align: center; }
#article-view figure.imageblock.alignRight { margin-left: auto; text-align: right; }
#article-view figure.imageblock.floatLeft { float: left; margin-right: 20px; }
#article-view figure.imageblock.floatRight { float: right; margin-left: 20px; }
#article-view figure.imageblock.widthContent { display: block; }
#article-view figure.imageblock.widthContent img { width: 100%; }
#article-view figure.imageblock img { display: inline-block; max-width: 100%; margin: 0; height: auto; }

#article-view figure.imagegridblock { position: relative; width: 100%; }
#article-view figure.imagegridblock .image-container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; }
#article-view figure.imagegridblock .image-container > span { margin-top: 2px; }
#article-view figure.imagegridblock img { margin: 0; height: inherit; }
#article-view figure.imagegridblock span img { width: 100%; }

#article-view figure.imageslideblock { position: relative; font-size: 0; }
#article-view figure.imageslideblock .btn { display: none; }
#article-view figure.imageslideblock.ready .btn { display: inline-block; }
#article-view figure.imageslideblock.ready .mark { opacity: 1; }
#article-view figure.imageslideblock div.image-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-width: 480px;
  max-width: 100%;
  min-height: 300px;
  max-height: 860px;
  margin: 0 auto;
  background: #000;
}
#article-view figure.imageslideblock div.image-container span.image-wrap { display: none; }
#article-view figure.imageslideblock div.image-container span.image-wrap.selected { display: inline; }
#article-view figure.imageslideblock div.image-container img { max-width: 100%; max-height: 100%; }
#article-view figure.imageslideblock div.image-container .btn {
  position: absolute;
  top: 50%;
  width: 60px;
  height: 60px;
  margin-top: -20px;
  padding: 0;
  background: transparent;
}
#article-view figure.imageslideblock div.image-container .btn-prev { left: 0; }
#article-view figure.imageslideblock div.image-container .btn-next { right: 0; }
#article-view figure.imageslideblock div.image-container .btn span {
  display: inline-block;
  overflow: hidden;
  width: 40px;
  height: 40px;
  background-image: url('https://t1.daumcdn.net/tistory_admin/static/manage/post-editor/img_editor_content.svg');
  text-indent: -10000px;
  opacity: 0.3;
}
#article-view figure.imageslideblock div.image-container .btn:hover span { opacity: 1; }
#article-view figure.imageslideblock div.image-container .btn .ico-prev { background-position: -220px 0; }
#article-view figure.imageslideblock div.image-container .btn .ico-next { background-position: -260px 0; }
#article-view figure.imageslideblock div.mark { display: block; height: 44px; text-align: center; opacity: 0; }
#article-view figure.imageslideblock div.mark span {
  display: inline-block;
  overflow: hidden;
  width: 30px;
  height: 4px;
  margin: 20px 1px;
  background: #555;
  text-indent: -10000px;
  cursor: pointer;
}
#article-view figure.imageslideblock div.mark span:first-child { background: #ccc; }

#article-view figure.fileblock {
  position: relative;
  width: 470px;
  max-width: 100%;
  height: 73px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--sidebar);
}
#article-view figure.fileblock a { display: block; height: 100%; text-decoration: none; }
#article-view figure.fileblock .image {
  float: left;
  width: 30px;
  height: 30px;
  margin: 21px 17px 21px 22px;
  background-image: url('https://t1.daumcdn.net/tistory_admin/static/manage/post-editor/img_editor_content.svg');
  filter: invert(0.8);
}
#article-view figure.fileblock .desc { position: absolute; top: 4px; right: 60px; bottom: 0; left: 70px; }
#article-view figure.fileblock .filename { width: 100%; height: 20px; margin: 14px 0 0; color: var(--fg); font-size: 14px; }
#article-view figure.fileblock .name { display: block; overflow: hidden; max-width: 272px; text-overflow: ellipsis; white-space: nowrap; }
#article-view figure.fileblock .size { color: var(--muted); font-size: 12px; }
#article-view figure.fileblock a::after {
  content: '';
  position: absolute;
  top: 19px;
  right: 24px;
  width: 30px;
  height: 30px;
  background-image: url('https://t1.daumcdn.net/tistory_admin/static/manage/post-editor/img_editor_content.svg');
  background-position: -40px 0;
  filter: invert(0.8);
}

#article-view figure[data-ke-type='opengraph'] a {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--sidebar);
  color: var(--fg);
  text-decoration: none;
}
#article-view figure[data-ke-type='opengraph'] div.og-image {
  flex: none;
  width: 160px;
  height: 120px;
  border-right: 1px solid var(--line);
  background-size: cover;
  background-position: center;
}
#article-view figure[data-ke-type='opengraph'] div.og-image button { display: none; }
#article-view figure[data-ke-type='opengraph'] div.og-text { min-width: 0; padding: 12px 16px; }
#article-view figure[data-ke-type='opengraph'] p.og-title {
  overflow: hidden;
  margin: 0 0 6px;
  color: var(--yellow);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#article-view figure[data-ke-type='opengraph'] .og-desc {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
#article-view figure[data-ke-type='opengraph'] .og-host { margin: 6px 0 0; color: var(--muted); font-size: 12px; }

#article-view figure[data-ke-type='video'] { display: block; position: relative; text-align: center; }
#article-view figure[data-ke-type='video'] img { display: block; max-width: 100%; margin: 0 auto; }
#article-view figure[data-ke-type='video'][data-video-host] iframe { display: block; margin: 0 auto; }
#article-view figure[data-ke-type='video'] > iframe[width='0'][height='0'] { width: 860px; height: 484px; max-width: 100%; }
#article-view figure[data-ke-type=emoticon][data-ke-align=alignCenter] { text-align: center; }
#article-view figure[data-ke-type=emoticon][data-ke-align=alignRight] { text-align: right; }
#article-view figure[data-ke-type='map'], #article-view iframe[data-ke-type='map'] { display: block; margin: 0 auto; }

#article-view .moreless-content :first-child { margin-top: 0; margin-bottom: 0; }
#article-view div[data-ke-type='moreLess'] .moreless-content { display: none; }
#article-view div[data-ke-type='moreLess'].open .moreless-content { display: block; }

#article-view hr[data-ke-style] {
  display: block;
  width: 100%;
  height: 1px;
  margin: 30px 0;
  padding: 0;
  border: 0;
  background: var(--line);
}

.btn_more, .btn_less {
  display: block;
  width: 100%;
  margin: 20px 0;
  color: var(--link);
  font-size: 14px;
  text-align: left;
}

.box-timeline-content { word-break: break-all; }

/* ========== 12. 반응형 ========== */
@media screen and (max-width: 1200px) {
  #minimap { display: none; }
  #container { padding-right: 32px; }
}

@media screen and (max-width: 767px) {
  :root {
    --sb-w: 280px;
    --gutter-w: 40px;
  }

  .tb-btn { display: inline-flex; }
  .tb-dots, .tb-center, .tb-deco { display: none; }
  .tb-right { flex: none; }

  #activitybar { display: none; }

  #sidebar {
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.5);
  }

  body.sidebar-hidden #sidebar { display: block; }
  body.sidebar-open #sidebar { transform: none; }

  body.sidebar-open #dim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 290;
    background: rgba(0, 0, 0, 0.5);
  }

  #editor,
  body.sidebar-hidden #editor { margin-left: 0; }

  .tab { max-width: 180px; }
  .tabs-actions { display: none; }

  #container { padding: 16px 16px 60px 0; }

  .post-cover .fm-line::before,
  .post-cover h1::before,
  .post-item::before,
  .post-header::before,
  #article-view > :is(p, h1, h2, h3, h4, h5, h6, ul, ol, blockquote, div, table)::before {
    font-size: 11px;
  }

  .post-cover h1 { font-size: 23px; }
  .post-item .thum { width: 84px; height: 56px; }
  .post-item a { gap: 12px; }
  #article-view { font-size: 15px; }

  .cover-thumbnail-2 figure { width: 96px; }
  #article-view figure.imageslideblock div.image-container { min-width: 100%; width: 100%; }

  .hide-m { display: none; }
}

/* ========== 13. 명령 팔레트 / 알림 / 보기 설정 ========== */
#palette {
  position: fixed;
  inset: 0;
  z-index: 900;
}

#palette[hidden] { display: none; }

.pl-box {
  position: absolute;
  top: calc(var(--titlebar-h) + 6px);
  left: 50%;
  width: 600px;
  max-width: calc(100vw - 24px);
  transform: translateX(-50%);
  padding: 6px;
  border: 1px solid #454545;
  border-radius: 8px;
  background: #252526;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  font-size: 13px;
}

#pl-input {
  width: 100%;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--focus-border);
  border-radius: 3px;
  background: var(--input);
  color: var(--fg);
  font-size: 13px;
  outline: none;
}

#pl-input::placeholder { color: #8b8b8b; }

#pl-list {
  overflow-y: auto;
  max-height: min(420px, 55vh);
  margin: 6px 0 0;
  padding: 0;
}

#pl-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  padding: 0 10px 0 12px;
  border-radius: 3px;
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
}

#pl-list li .codicon { flex: none; font-size: 15px; color: #c5c5c5; }
#pl-list li .codicon-markdown { color: #519aba; }

#pl-list li.active {
  background: #04395e;
  outline: 1px solid var(--focus-border);
  outline-offset: -1px;
  color: #ffffff;
}

#pl-list li.disabled { color: var(--muted); cursor: default; }
#pl-list li.disabled.active { background: transparent; outline: 0; }

.pl-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-label mark {
  background: none;
  color: #2aaaff;
  font-weight: 700;
}

.pl-desc {
  overflow: hidden;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
}

#pl-list kbd {
  margin-left: auto;
  padding: 0 5px;
  border: 1px solid #555;
  border-bottom-width: 2px;
  border-radius: 3px;
  background: #333;
  color: #ccc;
  font: 11px/16px var(--mono);
}

.pl-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
  padding: 6px 8px 2px;
  border-top: 1px solid #3a3a3a;
  color: var(--muted);
  font-size: 11.5px;
}

.pl-foot b {
  color: var(--lightblue);
  font-family: var(--mono);
}

.pl-flash {
  border-radius: 3px;
  animation: pl-flash 1.2s ease-out;
}

@keyframes pl-flash {
  0%, 30% { background-color: rgba(234, 92, 0, 0.33); }
  100% { background-color: transparent; }
}

#toast {
  position: fixed;
  right: 16px;
  bottom: calc(var(--status-h) + 12px);
  z-index: 900;
  padding: 10px 14px;
  border: 1px solid #454545;
  border-radius: 6px;
  background: #252526;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  color: var(--fg);
  font-size: 13px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

#toast::before {
  content: "\24D8  ";
  color: var(--link);
}

#toast.show { opacity: 1; transform: none; }

body.minimap-off #minimap { display: none !important; }

body.no-ln #content { padding-left: 0; }

body.no-ln .post-cover .fm-line::before,
body.no-ln .post-cover h1::before,
body.no-ln .post-item::before,
body.no-ln .post-header::before,
body.no-ln #article-view > :is(p, h1, h2, h3, h4, h5, h6, ul, ol, blockquote, div, table)::before {
  display: none;
}

body.no-ln .post-item a { margin-left: 0; }

@media screen and (max-width: 767px) {
  .tb-center { display: none; }
  .pl-box { top: calc(var(--titlebar-h) + 4px); }
  .pl-foot { gap: 10px; }
}

/* ========== 14. 터미널 패널 ========== */
.tb-deco button {
  display: inline-flex;
  padding: 2px;
  border-radius: 4px;
  color: inherit;
}

.tb-deco button:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }

button.st-item:hover { background: rgba(255, 255, 255, 0.12); }

#panel {
  position: fixed;
  right: 0;
  bottom: var(--status-h);
  left: calc(var(--ab-w) + var(--sb-w));
  z-index: 350;
  display: flex;
  flex-direction: column;
  height: var(--panel-h, 260px);
  border-top: 1px solid #3c3c3c;
  background: var(--editor);
}

#panel[hidden] { display: none; }
body.sidebar-hidden #panel { left: var(--ab-w); }
body.panel-max #panel { height: calc(100vh - var(--titlebar-h) - var(--status-h)); }
body.panel-open #editor { padding-bottom: calc(var(--status-h) + var(--panel-h, 260px)); }
body.panel-open #minimap { bottom: calc(var(--status-h) + var(--panel-h, 260px) + 8px); }
body.panel-open #toast { bottom: calc(var(--status-h) + var(--panel-h, 260px) + 12px); }

.panel-sash {
  position: absolute;
  top: -3px;
  right: 0;
  left: 0;
  z-index: 1;
  height: 6px;
  cursor: ns-resize;
  transition: background 0.1s 0.2s;
}

.panel-sash:hover { background: var(--focus-border); }

.panel-head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: 35px;
  padding: 0 8px 0 20px;
}

.panel-tabs {
  display: flex;
  gap: 20px;
  color: #969696;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}

.panel-tabs span {
  padding: 6px 0 4px;
  border-bottom: 1px solid transparent;
}

.panel-tabs .active {
  border-bottom-color: #e7e7e7;
  color: #e7e7e7;
}

.panel-actions { display: flex; gap: 2px; }

.panel-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 22px;
  border-radius: 4px;
  color: #cccccc;
}

.panel-actions button:hover { background: rgba(255, 255, 255, 0.1); }

.term {
  flex: 1;
  overflow-y: auto;
  padding: 2px 20px 10px;
  color: #cccccc;
  font: 13px/1.5 var(--mono);
  cursor: text;
}

.tl {
  min-height: 1.5em;
  white-space: pre-wrap;
  word-break: break-all;
}

.term-line { display: flex; }
#term-prompt { flex: none; white-space: pre; }

#term-in {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #cccccc;
  font: inherit;
  caret-color: #ffffff;
}

.term a { color: inherit !important; text-decoration: none !important; }
.term a:hover { text-decoration: underline !important; }
.term a.t-dir, .t-dir { color: #3b8eea !important; font-weight: 600; }
.term a.t-tag { color: var(--lightblue) !important; }
.tp-user { color: #23d18b; font-weight: 600; }
.tp-path { color: #3b8eea; font-weight: 600; }
.t-dim, .t-num { color: #808080; }
.t-err { color: #f14c4c; }
.t-ok { color: #23d18b; }
.t-yellow { color: #e5e510; }
.t-art { color: #3b8eea; }
.t-pad { display: inline-block; }

.c-blk {
  display: inline-block;
  width: 2ch;
  height: 1em;
  vertical-align: middle;
  background: #cccccc;
}

.c-blk.r { background: #f14c4c; }
.c-blk.g { background: #23d18b; }
.c-blk.y { background: #e5e510; }
.c-blk.b { background: #3b8eea; }
.c-blk.m { background: #d670d6; }
.c-blk.c { background: #29b8db; }

@media screen and (max-width: 767px) {
  #panel,
  body.sidebar-hidden #panel { left: 0; }
  .panel-tabs span:not(.active) { display: none; }
  .term { padding: 2px 10px 10px; font-size: 12px; }
  #term-in { font-size: 16px; }
}
