/* ===== CSS Variables ===== */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f7f7f5;
  --bg-sidebar: #f7f7f5;
  --bg-hover: #efefef;
  --bg-active: #e5e5e5;
  --bg-editor: #ffffff;
  --text-primary: #37352f;
  --text-secondary: #787774;
  --text-muted: #9b9a97;
  --border-color: #e9e9e7;
  --accent: #2383e2;
  --accent-hover: #1a6bc4;
  --danger: #eb5757;
  --success: #0f9d58;
  --code-bg: #f1f1ef;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --sidebar-width: 260px;
  --topbar-height: 48px;
  --transition: 0.2s ease;
}
[data-theme="dark"] {
  --bg-primary: #191919;
  --bg-secondary: #202020;
  --bg-sidebar: #202020;
  --bg-hover: #2d2d2d;
  --bg-active: #373737;
  --bg-editor: #191919;
  --text-primary: #e6e6e5;
  --text-secondary: #9b9a97;
  --text-muted: #6f6e6b;
  --border-color: #373737;
  --accent: #529cca;
  --accent-hover: #6ab0d8;
  --danger: #ff6b6b;
  --success: #4caf82;
  --code-bg: #282a2e;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif; }
body { background: var(--bg-primary); color: var(--text-primary); overflow: hidden; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== Layout ===== */
#app { display: flex; height: 100vh; }

/* ===== Sidebar ===== */
#sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width var(--transition), opacity var(--transition);
  overflow: hidden;
  position: relative;
  z-index: 10;
}
#sidebar.collapsed { width: 0; border-right: none; }

#sidebar-header {
  padding: 12px 8px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.sidebar-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  white-space: nowrap;
}
.sidebar-logo .logo-icon {
  background: linear-gradient(135deg, #f6c90e, #f0a500);
  color: #333;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  flex-shrink: 0;
}

/* Search */
#sidebar-search {
  padding: 4px 8px 8px;
  flex-shrink: 0;
}
#search-input {
  width: 100%;
  padding: 6px 10px 6px 30px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
  position: relative;
}
#search-input:focus { border-color: var(--accent); }
.search-wrapper {
  position: relative;
}
.search-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 12px;
  pointer-events: none;
}

/* Nav tree */
#nav-tree {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.nav-section {
  margin-bottom: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-primary);
  user-select: none;
  white-space: nowrap;
  position: relative;
  margin: 1px 4px;
  transition: background var(--transition);
  min-height: 30px;
}
.nav-item:hover { background: var(--bg-hover); }
.nav-item.active { background: var(--bg-active); color: var(--accent); }
.nav-item.leaf.active { background: var(--bg-active); }

.nav-item .toggle-btn {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  flex-shrink: 0;
  font-size: 10px;
  color: var(--text-muted);
  transition: transform var(--transition);
  margin-right: 2px;
}
.nav-item .toggle-btn:hover { background: var(--bg-active); color: var(--text-primary); }
.nav-item .toggle-btn.open { transform: rotate(90deg); }

.nav-item .item-icon {
  margin-right: 6px;
  font-size: 14px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  color: var(--text-secondary);
}

.nav-item .item-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item .updated-badge {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-children {
  display: none;
  margin-left: 12px;
  border-left: 1px solid var(--border-color);
  padding-left: 4px;
}
.nav-children.open { display: block; }

/* Sidebar footer */
#sidebar-footer {
  padding: 8px;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}
.admin-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--transition);
}
.admin-indicator:hover { background: var(--bg-hover); }
.admin-indicator .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}
.admin-indicator.logged-in .dot { background: var(--success); }

/* ===== Main area ===== */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* Topbar */
#topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  background: var(--bg-primary);
}

.topbar-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 16px;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.topbar-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

#breadcrumb {
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}
.breadcrumb-item { color: var(--text-secondary); white-space: nowrap; }
.breadcrumb-sep { color: var(--text-muted); }
.breadcrumb-item:last-child { color: var(--text-primary); font-weight: 500; }

#topbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.edit-btn {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  background: var(--accent);
  color: white;
  transition: background var(--transition);
}
.edit-btn:hover { background: var(--accent-hover); }
.save-btn {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  background: var(--success);
  color: white;
  transition: opacity var(--transition);
}
.save-btn:hover { opacity: 0.85; }
.cancel-btn {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: background var(--transition);
}
.cancel-btn:hover { background: var(--bg-hover); }

/* ===== Content area ===== */
#content-area {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Page content */
#page-container {
  flex: 1;
  overflow-y: auto;
  padding: 60px 96px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 768px) {
  #page-container { padding: 40px 24px; }
}

/* TOC panel */
#toc-panel {
  width: 220px;
  flex-shrink: 0;
  border-left: 1px solid var(--border-color);
  padding: 20px 12px;
  overflow-y: auto;
  display: none;
}
#toc-panel.visible { display: block; }
#toc-panel h3 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 8px;
}
.toc-item {
  display: block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background var(--transition), color var(--transition);
}
.toc-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.toc-item.level-2 { padding-left: 20px; }
.toc-item.level-3 { padding-left: 32px; }

/* ===== Page view ===== */
.page-title {
  font-size: 40px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  outline: none;
  border: none;
  background: transparent;
  width: 100%;
  line-height: 1.2;
  resize: none;
  overflow: hidden;
}
.page-title::placeholder { color: var(--text-muted); }

.page-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-meta .meta-item { display: flex; align-items: center; gap: 4px; }

/* ===== Blocks ===== */
.blocks-container { min-height: 200px; }

.block {
  position: relative;
  margin-bottom: 2px;
}

/* Block handle (edit mode) */
.block-handle {
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  transition: opacity var(--transition);
}
.block:hover .block-handle,
.block:focus-within .block-handle { opacity: 1; }
.block-handle button {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.block-handle button:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Block type menu */
.block-type-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}
.block-type-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Block add button */
.block-add-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  opacity: 0;
  transition: opacity var(--transition);
  cursor: text;
}
.block-add-row:hover { opacity: 1; }
.block-add-btn {
  width: 20px; height: 20px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.block-add-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Block content elements */
.block-h1, .block-h2, .block-h3,
.block-p, .block-callout .callout-text,
.block-quote blockquote,
.block-li { outline: none; min-height: 1.5em; }

.block-h1 { font-size: 30px; font-weight: 700; line-height: 1.3; color: var(--text-primary); margin: 16px 0 4px; }
.block-h2 { font-size: 22px; font-weight: 600; line-height: 1.3; color: var(--text-primary); margin: 14px 0 4px; }
.block-h3 { font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--text-primary); margin: 12px 0 2px; }
.block-p { font-size: 15px; line-height: 1.7; color: var(--text-primary); }

/* List block */
.block-list { padding-left: 0; }
.block-li-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 2px 0;
}
.block-bullet { flex-shrink: 0; color: var(--text-secondary); margin-top: 2px; font-size: 13px; }
.block-li { flex: 1; font-size: 15px; line-height: 1.6; color: var(--text-primary); }

/* Ordered list */
.block-ol-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 2px 0;
  counter-increment: ol-counter;
}
.block-ol-num {
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 13px;
  min-width: 20px;
  margin-top: 2px;
}

/* Code block */
.block-code-wrapper {
  background: var(--code-bg);
  border-radius: 8px;
  overflow: hidden;
  margin: 8px 0;
}
.block-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(0,0,0,0.06);
  border-bottom: 1px solid var(--border-color);
}
[data-theme="dark"] .block-code-header { background: rgba(255,255,255,0.04); }
.code-lang {
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'SF Mono', Monaco, monospace;
}
.code-copy-btn {
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.code-copy-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.block-code-content {
  padding: 14px;
  font-family: 'SF Mono', 'Fira Code', Monaco, monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre;
  overflow-x: auto;
  outline: none;
  min-height: 40px;
  tab-size: 2;
}
pre { margin: 0; }

/* Callout block */
.block-callout {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent);
  margin: 6px 0;
}
.callout-icon { font-size: 18px; flex-shrink: 0; }
.callout-text { flex: 1; font-size: 14px; line-height: 1.6; color: var(--text-primary); }

/* Quote block */
.block-quote {
  border-left: 3px solid var(--text-muted);
  padding: 4px 0 4px 16px;
  margin: 6px 0;
}
.block-quote blockquote {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
}

/* Divider block */
.block-divider {
  height: 2px;
  background: var(--border-color);
  border-radius: 2px;
  margin: 16px 0;
}

/* Image block */
.block-image { margin: 8px 0; }
.block-image img {
  max-width: 100%;
  border-radius: 6px;
  display: block;
}
.block-image figcaption {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
  outline: none;
}
.image-drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  transition: border-color var(--transition), background var(--transition);
}
.image-drop-zone:hover { border-color: var(--accent); background: var(--bg-secondary); }
.image-drop-zone.dragover { border-color: var(--accent); background: var(--bg-secondary); }

/* ===== Block type menu popup ===== */
#block-type-menu {
  position: fixed;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  padding: 6px;
  width: 200px;
  display: none;
}
#block-type-menu.visible { display: block; }
.type-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  transition: background var(--transition);
}
.type-menu-item:hover { background: var(--bg-hover); }
.type-menu-item .type-icon {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.type-menu-item .type-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* ===== Toolbar (edit mode, floating) ===== */
#format-toolbar {
  position: fixed;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  padding: 4px;
  display: none;
  align-items: center;
  gap: 2px;
  z-index: 500;
}
#format-toolbar.visible { display: flex; }
.fmt-btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}
.fmt-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.fmt-btn.active { background: var(--bg-active); color: var(--accent); }
.fmt-sep { width: 1px; height: 20px; background: var(--border-color); margin: 0 2px; }

/* ===== Modals ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-overlay.hidden { display: none; }

.modal-box {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 28px;
  width: 380px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}
.modal-box h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.modal-field label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}
.modal-field input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 7px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}
.modal-field input:focus { border-color: var(--accent); }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
.modal-btn-primary {
  padding: 8px 20px;
  border-radius: 7px;
  background: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition);
}
.modal-btn-primary:hover { background: var(--accent-hover); }
.modal-btn-secondary {
  padding: 8px 16px;
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: 14px;
  transition: background var(--transition);
}
.modal-btn-secondary:hover { background: var(--bg-hover); }
.modal-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 8px;
  display: none;
}
.modal-error.visible { display: block; }

/* ===== Search overlay ===== */
#search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  backdrop-filter: blur(2px);
}
#search-overlay.hidden { display: none; }
#search-box {
  background: var(--bg-primary);
  border-radius: 12px;
  width: 560px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
}
#search-query {
  width: 100%;
  padding: 16px 20px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
  border-bottom: 1px solid var(--border-color);
}
#search-results { max-height: 360px; overflow-y: auto; padding: 8px; }
.search-result-item {
  padding: 10px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: background var(--transition);
}
.search-result-item:hover { background: var(--bg-hover); }
.search-result-title { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.search-result-path { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.search-result-preview { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
mark { background: rgba(35, 131, 226, 0.2); color: var(--accent); border-radius: 2px; padding: 0 2px; }
#search-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== Welcome page ===== */
#welcome-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 40px;
}
.welcome-icon { font-size: 64px; margin-bottom: 16px; }
.welcome-title { font-size: 28px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.welcome-sub { font-size: 15px; color: var(--text-secondary); max-width: 400px; }

/* ===== Toast ===== */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  white-space: nowrap;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Loading ===== */
.loading-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Drag resize handle ===== */
#sidebar-resize {
  width: 4px;
  cursor: col-resize;
  background: transparent;
  flex-shrink: 0;
  transition: background var(--transition);
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
}
#sidebar-resize:hover, #sidebar-resize.dragging { background: var(--accent); }

/* Highlight.js theme override */
[data-theme="light"] .hljs { background: var(--code-bg); }
[data-theme="dark"] .hljs { background: var(--code-bg); }

/* Edit mode indicator */
.edit-mode-bar {
  background: rgba(35, 131, 226, 0.08);
  border-bottom: 1px solid rgba(35, 131, 226, 0.2);
  padding: 6px 16px;
  font-size: 12px;
  color: var(--accent);
  display: none;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.edit-mode-bar.visible { display: flex; }
.edit-mode-bar .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Slash command menu */
#slash-menu {
  position: fixed;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  padding: 6px;
  width: 220px;
  display: none;
}
#slash-menu.visible { display: block; }
.slash-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  transition: background var(--transition);
}
.slash-item:hover, .slash-item.selected { background: var(--bg-hover); }
.slash-icon {
  width: 28px; height: 28px;
  border-radius: 5px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

/* Inline code */
code.inline-code {
  background: var(--code-bg);
  color: #e74c3c;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.875em;
}
[data-theme="dark"] code.inline-code { color: #ff8080; }
