/* ===========================================================================
   VS Code Dark+ Tistory Skin
   reference: VS Code default dark theme color tokens
   --------------------------------------------------------------------------- */

:root {
  /* fallback (index.xml variables override these via inline <style>) */
  --accent: #007acc;
  --bg-primary: #1e1e1e;
  --bg-sidebar: #252526;
  --bg-titlebar: #3c3c3c;
  --bg-menubar: #252526;
  --bg-tab-active: #1e1e1e;
  --bg-tab-inactive: #2d2d2d;
  --bg-statusbar: #007acc;
  --bg-activitybar: #333333;
  --bg-hover: #2a2d2e;
  --bg-callout: #094771;

  --text-color: #d4d4d4;
  --text-muted: #858585;
  --text-dim: #6a737d;
  --text-keyword: #569cd6;
  --text-string: #ce9178;
  --text-fn: #dcdcaa;
  --text-type: #4ec9b0;
  --text-number: #b5cea8;
  --text-comment: #6a9955;

  --border-color: #1e1e1e;
  --border-sidebar: #1e1e1e;

  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "Fira Code", "D2Coding", "SF Mono", Menlo, Consolas, monospace;

  --titlebar-h: 32px;
  --menubar-h: 30px;
  --statusbar-h: 22px;
  --activitybar-w: 48px;
  --sidebar-w: 260px;
  --tabbar-h: 36px;
  --breadcrumb-h: 22px;
  --workbench-h: calc(100vh - var(--titlebar-h) - var(--menubar-h) - var(--statusbar-h));
}

@supports (height: 100dvh) {
  :root {
    --workbench-h: calc(100dvh - var(--titlebar-h) - var(--menubar-h) - var(--statusbar-h));
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-primary);
  color: var(--text-color);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.6;
  height: 100%;
  overflow: hidden;
}

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

img { max-width: 100%; height: auto; }

button { font-family: inherit; cursor: pointer; }

/* ---------- Title Bar -------------------------------------------------- */
.titlebar {
  position: sticky; top: 0; z-index: 30;
  height: var(--titlebar-h);
  background: var(--bg-titlebar);
  display: flex; align-items: center; gap: 12px;
  padding: 0 12px;
  font-size: 12px;
  user-select: none;
  border-bottom: 1px solid #000;
}
.titlebar-controls { display: flex; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.titlebar-title { flex: 1; text-align: center; color: #cccccc; }
.titlebar-title a { color: #cccccc; font-weight: 500; }
.titlebar-sub { color: var(--text-muted); margin-left: 6px; }
.titlebar-actions { display: flex; align-items: center; }
.cmd-palette-trigger {
  background: rgba(255,255,255,0.06);
  color: var(--text-color);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
}
.cmd-palette-trigger:hover { background: rgba(255,255,255,0.12); }
.kbd {
  display: inline-block;
  padding: 0 4px;
  background: rgba(0,0,0,0.35);
  border-radius: 3px;
  font-family: var(--font-mono);
  margin: 0 1px;
}

/* ---------- Menu Bar --------------------------------------------------- */
.menubar {
  height: var(--menubar-h);
  background: var(--bg-menubar);
  display: flex; align-items: center; gap: 4px;
  padding: 0 8px;
  border-bottom: 1px solid #000;
  position: sticky; top: var(--titlebar-h); z-index: 29;
}
.menubar-item {
  color: #cccccc; padding: 4px 10px; font-size: 13px; border-radius: 3px;
}
.menubar-item:hover { background: var(--bg-hover); text-decoration: none; }
.menubar-spacer { flex: 1; }
.menubar-blog-menu ul {
  list-style: none; padding: 0; margin: 0; display: flex; gap: 4px;
}
.menubar-blog-menu li a {
  color: #cccccc; padding: 4px 10px; font-size: 13px; border-radius: 3px;
  display: inline-block;
}
.menubar-blog-menu li a:hover { background: var(--bg-hover); text-decoration: none; }

/* ---------- Workbench (main layout) ----------------------------------- */
.workbench {
  display: grid;
  grid-template-columns: var(--activitybar-w) var(--sidebar-w) minmax(0, 1fr);
  height: var(--workbench-h);
  min-height: 0;
  overflow: hidden;
}

/* ---------- Activity Bar ---------------------------------------------- */
.activitybar {
  background: var(--bg-activitybar);
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 0;
  gap: 4px;
  border-right: 1px solid #000;
  height: 100%;
  overflow: hidden;
}
.activity-item {
  width: 48px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  color: rgba(255,255,255,0.5);
  border-left: 2px solid transparent;
}
.activity-item:hover { color: #ffffff; text-decoration: none; }
.activity-item.is-active {
  color: #ffffff;
  border-left-color: var(--accent);
}
.activity-spacer { flex: 1; }

/* ---------- Side Bar (Explorer) --------------------------------------- */
.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-sidebar);
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  position: relative;
}
.sidebar-header {
  padding: 8px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #bbbbbb;
}
.sidebar-search-wrap { padding: 0 8px 8px; }
.sidebar-search {
  display: flex;
  align-items: center;
  background: #1f1f1f;
  border: 1px solid #3c3c3c;
  border-radius: 4px;
  overflow: hidden;
}
.sidebar-search:focus-within { border-color: var(--accent); }
.sidebar-search-input {
  min-width: 0;
  flex: 1;
  height: 30px;
  padding: 0 8px;
  background: transparent;
  border: 0;
  color: var(--text-color);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
}
.sidebar-search-input::placeholder { color: var(--text-muted); }
.sidebar-search-submit {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--text-muted);
}
.sidebar-search-submit:hover {
  background: var(--bg-hover);
  color: #fff;
}
.sidebar-section { border-top: 1px solid rgba(255,255,255,0.04); }
.sidebar-section summary {
  list-style: none;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cccccc;
  display: flex; align-items: center; gap: 4px;
  user-select: none;
}
.sidebar-section summary::-webkit-details-marker { display: none; }
.sidebar-section summary:hover { background: var(--bg-hover); }
.sidebar-section .chev { transition: transform 0.15s; flex-shrink: 0; }
.sidebar-section[open] .chev { transform: rotate(90deg); }

/* Explorer tree */
.explorer-tree { padding: 4px 0 8px; }
.explorer-tree ul { list-style: none; padding-left: 12px; margin: 0; }
.explorer-tree > ul { padding-left: 4px; }
.explorer-tree li { padding: 1px 0; }
.explorer-tree a {
  display: block;
  padding: 2px 8px;
  color: #cccccc;
  font-size: 13px;
  border-radius: 0;
  position: relative;
}
.explorer-tree a:hover { background: var(--bg-hover); text-decoration: none; }
.explorer-tree a::before {
  content: "> ";
  color: var(--text-muted);
  font-size: 10px;
}

/* Recent list */
.explorer-list { padding: 4px 0 8px; }
.explorer-list ul { list-style: none; padding: 0 8px 0 20px; margin: 0; }
.explorer-list li { padding: 2px 0; }
.explorer-list a {
  color: #cccccc; font-size: 12px;
  display: block; padding: 2px 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.explorer-list a:hover { background: var(--bg-hover); text-decoration: none; }
.explorer-list-meta {
  display: block;
  padding: 0 4px 3px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tag cloud */
.tag-cloud { padding: 6px 12px 12px; display: flex; flex-wrap: wrap; gap: 4px; }
.tag-cloud .tag,
.taglog-list .tag {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-keyword);
}
.tag-cloud .tag:hover,
.taglog-list .tag:hover { background: var(--accent); color: #fff; text-decoration: none; }
.tag-cloud .cloud1, .taglog-list .cloud1 { font-size: 14px; color: var(--text-fn); }
.tag-cloud .cloud2, .taglog-list .cloud2 { font-size: 13px; color: var(--text-type); }
.tag-cloud .cloud3, .taglog-list .cloud3 { font-size: 12px; }
.tag-cloud .cloud4, .taglog-list .cloud4 { font-size: 11px; opacity: 0.85; }
.tag-cloud .cloud5, .taglog-list .cloud5 { font-size: 10px; opacity: 0.7; }

/* Profile */
.profile { padding: 12px; text-align: center; }
.profile img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.profile-name { font-size: 13px; color: #cccccc; margin-top: 6px; font-family: var(--font-mono); }
.profile-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.stats-list { padding: 6px 12px 12px; }
.stats-list div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
}
.stats-list strong {
  color: var(--text-fn);
  font-weight: 500;
}

/* ---------- Editor Area ----------------------------------------------- */
.editor {
  background: var(--bg-primary);
  display: flex; flex-direction: column;
  height: 100%;
  overflow: hidden;
  min-width: 0;
}

/* Tabbar */
.tabbar {
  height: var(--tabbar-h);
  flex-shrink: 0;
  background: var(--bg-tab-inactive);
  display: flex; align-items: stretch;
  border-bottom: 1px solid #000;
  overflow-x: auto;
}
.tab {
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px;
  background: var(--bg-tab-inactive);
  border-right: 1px solid #1e1e1e;
  color: var(--text-muted);
  font-size: 13px;
  max-width: 240px;
  cursor: default;
}
.tab.is-active {
  background: var(--bg-tab-active);
  color: #ffffff;
  border-top: 1px solid var(--accent);
  margin-top: -1px;
  padding-top: 1px;
}
.tab-icon { flex-shrink: 0; }
.tab-label {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--font-mono); font-size: 12px;
}
.tab-close {
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 3px;
  color: var(--text-muted);
}
.tab-close:hover { background: var(--bg-hover); color: #fff; }

/* Breadcrumb */
.breadcrumb {
  height: var(--breadcrumb-h);
  flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 0 16px;
  background: var(--bg-primary);
  border-bottom: 1px solid #2d2d2d;
  font-size: 12px;
  color: var(--text-muted);
}
.breadcrumb .sep { color: var(--text-dim); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text-color); text-decoration: none; }
.breadcrumb .crumb { color: var(--text-color); }

/* Editor body */
/* 수정: max-width 제한 제거 → 오른쪽 남는 공간 없이 editor 영역 전체 사용 */
.editor-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 32px 80px;
  max-width: none;
  width: 100%;
  margin: 0;
  font-family: var(--font-ui);
}

/* ---------- Callout / Notice ------------------------------------------ */
.callout {
  background: var(--bg-callout);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  margin: 0 0 24px;
  font-size: 13px;
  display: flex; align-items: flex-start; gap: 10px;
}
.callout-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.callout-body a { color: #fff; text-decoration: underline; }

/* ---------- Home Cover ------------------------------------------------- */
.home-cover { margin: 0 0 28px; width: 100%; }
.home-cover .cover-head {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-comment);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}
.home-cover .cover-title { color: var(--text-comment); }
.cover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  width: 100%;
}
.cover-card {
  display: block;
  background: #252526;
  border: 1px solid #2d2d2d;
  border-radius: 6px;
  overflow: hidden;
  color: var(--text-color);
}
.cover-card:hover { border-color: var(--accent); text-decoration: none; }
.cover-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  background: #2d2d2d;
  overflow: hidden;
}
.cover-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.cover-card:hover .cover-thumb img { transform: scale(1.04); }
.cover-card-body { display: block; padding: 12px 14px; }
.cover-card-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-type);
  margin-bottom: 4px;
}
.cover-card-title {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
}
.cover-card:hover .cover-card-title { color: var(--accent); }
.cover-card-summary {
  display: -webkit-box;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cover-more {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-fn);
}

/* ---------- List context / taglog ------------------------------------- */
/* 수정: 목록/태그/방명록도 820px 제한 제거 */
.list-context,
.taglog-panel,
.guestbook-page {
  max-width: none;
  width: 100%;
  margin: 0 0 24px;
  padding: 18px 0 20px;
  border-bottom: 1px solid #2d2d2d;
}
.list-context-cover {
  display: none;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  background-color: #1f1f1f;
  background-size: cover;
  background-position: center;
}
.list-context:has(.list-context-cover) {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: #252526;
  border: 1px solid #2d2d2d;
  border-radius: 6px;
}
.list-context:has(.list-context-cover) .list-context-cover { display: block; }

@media (max-width: 960px) {
  .list-context:has(.list-context-cover) { grid-template-columns: 1fr; }
}

.list-context-body { min-width: 0; }
.list-context-meta {
  color: var(--text-comment);
  font-family: var(--font-mono);
  font-size: 12px;
  margin-bottom: 4px;
}
.list-context-title {
  margin: 0;
  color: #fff;
  font-size: 26px;
  line-height: 1.3;
}
.list-context-desc {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}
.list-context-desc span {
  display: block;
  margin-top: 2px;
}
.empty-state {
  margin-top: 16px;
  padding: 12px 14px;
  background: #252526;
  border: 1px solid #2d2d2d;
  border-radius: 4px;
}
.empty-state strong {
  display: block;
  color: #fff;
}
.empty-state span {
  color: var(--text-muted);
  font-size: 13px;
}
.taglog-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

/* ---------- Page type visibility -------------------------------------- */
.post-detail,
.permalink-extras { display: none; }

body#tt-body-page .post-card,
body#tt-body-page .paging { display: none; }

body#tt-body-page .post-detail,
body#tt-body-page .permalink-extras { display: block; }

/* ---------- Post Card -------------------------------------------------- */
.post-card {
  padding: 16px 0;
  border-bottom: 1px solid #2d2d2d;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  width: 100%;
}
.post-card[data-list-style="card"] {
  grid-template-columns: 1fr;
  background: #252526;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #2d2d2d;
}
.post-card:last-child { border-bottom: none; }
.post-info { min-width: 0; }
.post-thumb {
  display: block;
  overflow: hidden;
  border-radius: 4px;
  background: #2d2d2d;
  aspect-ratio: 16 / 10;
}
.post-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.2s;
}
.post-thumb:hover img { transform: scale(1.04); }

.post-thumb-fallback {
  display: none;
  background-size: cover;
  background-position: center;
}
.post-card.has-category-fallback .post-thumb-fallback { display: block; }

.post-card.has-category-fallback .post-thumb-fallback.post-thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  text-align: center;
  background: linear-gradient(135deg, #232323, #2b2b2b);
}
.post-thumb-placeholder .thumb-ph-icon { color: var(--text-keyword); opacity: 0.85; line-height: 0; }
.post-thumb-placeholder .thumb-ph-label {
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-type);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-comment);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.line-num { color: var(--text-comment); }
.post-cat { color: var(--text-type); font-family: var(--font-mono); }
.post-cat:hover { text-decoration: underline; }
.dot-sep { color: var(--text-dim); }
.post-rp { color: var(--text-fn); font-family: var(--font-mono); }

.post-title {
  margin: 6px 0 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}
.post-title a { color: #ffffff; }
.post-title a:hover { color: var(--accent); text-decoration: none; }

.post-summary {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Post Detail ------------------------------------------------ */
/* 수정: 글 상세 820px 제한 제거 */
.post-detail {
  max-width: none;
  width: 100%;
  margin: 0;
}
.post-detail-head {
  padding: 24px 0 16px;
  border-bottom: 1px solid #2d2d2d;
  margin-bottom: 24px;
  width: 100%;
}
.post-detail-title {
  font-size: 28px;
  font-weight: 700;
  margin: 8px 0 0;
  color: #ffffff;
  line-height: 1.3;
}

.post-content {
  width: 100%;
  max-width: none;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-color);
}
.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
  color: #ffffff;
  margin: 1.6em 0 0.6em;
  line-height: 1.3;
}
.post-content h2 { font-size: 22px; border-bottom: 1px solid #2d2d2d; padding-bottom: 6px; }
.post-content h3 { font-size: 18px; }
.post-content p { margin: 0.8em 0; }
.post-content blockquote {
  margin: 1em 0; padding: 8px 14px;
  border-left: 3px solid var(--accent);
  background: rgba(0, 122, 204, 0.08);
  color: var(--text-muted);
}
.post-content code {
  font-family: var(--font-mono);
  background: rgba(255,255,255,0.08);
  padding: 1px 5px; border-radius: 3px;
  font-size: 0.9em;
  color: var(--text-string);
}
.post-content pre {
  background: #0d0d0d;
  border: 1px solid #2d2d2d;
  border-radius: 4px;
  padding: 12px 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  width: 100%;
}
.post-content pre code { background: none; padding: 0; color: inherit; }
.post-content img { border-radius: 4px; margin: 1em 0; max-width: 100%; height: auto; }
.post-content a { color: var(--accent); }
.post-content ul, .post-content ol { padding-left: 1.6em; }
.post-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
  font-size: 13px;
}
.post-content table th, .post-content table td {
  border: 1px solid #2d2d2d; padding: 6px 10px; text-align: left;
}
.post-content table th { background: var(--bg-sidebar); }
.post-content hr { border: 0; border-top: 1px solid #2d2d2d; margin: 2em 0; }

/* Tags row */
.post-tags {
  margin: 24px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  width: 100%;
}
.post-tags a {
  display: inline-block;
  background: rgba(255,255,255,0.06);
  padding: 2px 8px; border-radius: 3px;
  margin: 0 4px 4px 0;
  color: var(--text-keyword);
}
.post-tags a:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* Admin buttons */
.post-admin { margin: 16px 0; display: flex; gap: 6px; }
.btn-admin {
  background: #2d2d2d; color: var(--text-color);
  border: 1px solid #3c3c3c;
  padding: 4px 12px; border-radius: 3px;
  font-family: var(--font-mono); font-size: 12px;
}
.btn-admin:hover { background: var(--accent); color: #fff; }

/* ---------- Permalink extras ------------------------------------------ */
/* 수정: 이전/다음, 관련글, 댓글 영역도 전체 폭 사용 */
.permalink-extras {
  max-width: none;
  width: 100%;
}

/* Post nav */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin: 32px 0;
  width: 100%;
}
.post-nav-item {
  background: #252526;
  border: 1px solid #2d2d2d;
  border-radius: 4px;
  padding: 12px 14px;
  display: block;
  color: var(--text-color);
}
.post-nav-item:hover { border-color: var(--accent); text-decoration: none; }
.post-nav-item.next { text-align: right; }
.post-nav-label { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.post-nav-title { display: block; font-size: 13px; margin-top: 2px; }

/* Related */
.related {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #2d2d2d;
  width: 100%;
}
.related-title { font-family: var(--font-mono); font-size: 12px; color: var(--text-comment); margin: 0 0 8px; }
.related-list { list-style: none; padding: 0; margin: 0; }
.related-list li { padding: 4px 0; }
.related-list a { font-size: 13px; }

/* Comments section */
.comments-section {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #2d2d2d;
  width: 100%;
}
.comments-title { font-family: var(--font-mono); font-size: 12px; color: var(--text-comment); margin: 0 0 12px; }
.comments-section [data-tistory-react-app],
.guestbook-page [data-tistory-react-app] {
  color: var(--text-color);
}
.comments-section .tt-comment-cont,
.guestbook-page .tt-comment-cont {
  margin-top: 12px;
}
.comments-section input,
.comments-section textarea,
.guestbook-page input,
.guestbook-page textarea {
  background: #1f1f1f;
  color: var(--text-color);
  border: 1px solid #3c3c3c;
  border-radius: 3px;
}

/* ---------- Revenue / Ad slots ---------------------------------------- */
.revenue-slot {
  margin: 0 0 16px;
  width: 100%;
}
.revenue-slot-lower {
  margin: 24px 0 0;
}
.revenue-slot:empty {
  display: none;
  margin: 0;
}
.revenue-slot ins,
.revenue-slot iframe,
.revenue-slot img {
  max-width: 100%;
}

/* ---------- Protected Post -------------------------------------------- */
/* 수정: 보호글도 전체 폭 사용 */
.protected-post {
  max-width: none;
  width: 100%;
  margin: 0;
}
.protected-body {
  margin-top: 24px;
  padding: 36px 24px;
  text-align: center;
  background: #252526;
  border: 1px solid #2d2d2d;
  border-radius: 6px;
}
.protected-lock {
  color: var(--text-muted);
  margin-bottom: 8px;
}
.protected-msg {
  margin: 0 0 18px;
  color: var(--text-color);
  font-size: 14px;
}
.protected-form {
  display: inline-flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
  justify-content: center;
}
.protected-input {
  height: 34px;
  min-width: 200px;
  padding: 0 12px;
  background: #1f1f1f;
  border: 1px solid #3c3c3c;
  border-radius: 4px;
  color: var(--text-color);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
}
.protected-input:focus { border-color: var(--accent); }
.protected-input::placeholder { color: var(--text-muted); }
.protected-submit {
  height: 34px;
  padding: 0 16px;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}
.protected-submit:hover { filter: brightness(1.1); }

/* ---------- Paging ----------------------------------------------------- */
.paging {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 40px 0 8px;
  padding-top: 16px;
  border-top: 1px solid #2d2d2d;
  font-family: var(--font-mono);
  width: 100%;
}
.paging::before {
  content: "// pagination";
  color: var(--text-comment);
  font-size: 12px;
  margin-right: 4px;
}
.paging-links {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
}
.paging-links:not(:has(.paging-num)) { display: none; }
.paging-links a,
.paging-links span,
.paging-links strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 28px;
  padding: 0 9px;
  border-radius: 4px;
  background: #252526;
  border: 1px solid #3c3c3c;
  color: var(--text-number);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.paging-control {
  color: var(--text-fn);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 3px;
}
.paging-control:not([href]) {
  color: var(--text-muted);
  opacity: 0.45;
  pointer-events: none;
}
.paging-control:hover,
.paging-links a:hover {
  background: #3a3d41;
  color: #fff;
  text-decoration: none;
}
.paging-links a:hover {
  border-color: var(--accent);
}
.paging-links .selected,
.paging-links .paging-num.selected,
.paging-links strong {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

/* ---------- Status Bar ------------------------------------------------- */
.statusbar {
  height: var(--statusbar-h);
  background: var(--bg-statusbar);
  color: #ffffff;
  display: flex; align-items: center;
  font-size: 12px;
  padding: 0 8px;
  position: sticky; bottom: 0; z-index: 30;
}
.status-item { padding: 0 8px; display: inline-flex; align-items: center; gap: 4px; }
.status-spacer { flex: 1; }
.status-accent { background: rgba(0,0,0,0.15); }

/* ---------- Command Palette ------------------------------------------- */
.cmd-palette {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 100;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 80px;
}
.cmd-palette[hidden] { display: none; }
.cmd-palette-box {
  width: 92%; max-width: 600px;
  background: #252526;
  border: 1px solid #454545;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  padding: 8px;
}
.cmd-palette-input {
  width: 100%;
  background: #3c3c3c;
  border: 1px solid #007fd4;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 3px;
  font-size: 14px;
  font-family: var(--font-mono);
  outline: none;
}
.cmd-palette-hint {
  padding: 8px 12px 4px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ---------- Mobile sidebar toggle ------------------------------------- */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: calc(var(--statusbar-h) + 12px);
  right: 12px;
  z-index: 40;
  width: 44px; height: 44px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  align-items: center; justify-content: center;
}

/* ---------- Responsive ------------------------------------------------- */
@media (max-width: 960px) {
  .workbench {
    grid-template-columns: var(--activitybar-w) minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    top: calc(var(--titlebar-h) + var(--menubar-h));
    left: var(--activitybar-w);
    height: var(--workbench-h);
    width: var(--sidebar-w);
    z-index: 25;
    transform: translateX(-110%);
    transition: transform 0.18s ease;
  }

  .sidebar.is-open { transform: translateX(0); }
  .sidebar-toggle { display: inline-flex; }

  .editor-body {
    padding: 16px;
    max-width: none;
    width: 100%;
  }

  .post-card { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .paging { justify-content: center; }
  .titlebar-sub { display: none; }
}

@media (max-width: 600px) {
  .menubar { overflow-x: auto; }
  .titlebar-actions { display: none; }
}