/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  background: #d4ede8;
  color: #1a202c;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #2b6cb0;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
}

/* === Topbar === */
#topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 20px;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* === Breadcrumbs === */
#breadcrumbs {
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.95em;
  overflow: hidden;
  white-space: nowrap;
}

#breadcrumbs a {
  color: #2b6cb0;
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}

#breadcrumbs a:hover {
  background: #edf2f7;
  text-decoration: none;
}

#breadcrumbs .separator {
  color: #a0aec0;
  font-size: 0.85em;
  user-select: none;
}

#breadcrumbs .current {
  color: #1a202c;
  font-weight: 600;
  padding: 4px 6px;
}

#path-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
  flex-shrink: 1;
  min-width: 200px;
  max-width: 400px;
}

#path-input {
  flex-grow: 1;
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-size: 0.85em;
  padding: 5px 10px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  outline: none;
  background: #f7fafc;
  color: #1a202c;
  width: 100%;
}

#path-input:focus {
  border-color: #2b6cb0;
  background: #ebf4ff;
  box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.15);
}

#path-go {
  padding: 5px 10px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  background: #2b6cb0;
  color: #fff;
  font-size: 0.85em;
  cursor: pointer;
  white-space: nowrap;
}

#path-go:hover {
  background: #2c5282;
}

/* === Actions === */
#actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

#upload-btn {
  background: #2b6cb0;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9em;
  transition: background 0.15s;
}

#upload-btn:hover {
  background: #2c5282;
}

#show-hidden-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85em;
  color: #718096;
  cursor: pointer;
  user-select: none;
}

#show-hidden-label input[type="checkbox"] {
  cursor: pointer;
}

/* === Content === */
#content {
  margin-top: 112px;
  padding: 0 20px 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* === File List === */
.file-entry {
  display: grid;
  grid-template-columns: 36px 1fr 90px 160px auto;
  padding: 10px 12px;
  border-bottom: 1px solid #edf2f7;
  align-items: center;
  gap: 8px;
  transition: background 0.1s;
}

.file-entry.has-checkbox {
  grid-template-columns: 28px 36px 1fr 90px 160px auto;
}

.file-entry.dragging {
  opacity: 0.45;
}

.file-entry.drop-target {
  outline: 2px dashed #2b6cb0;
  outline-offset: -3px;
  background: #ebf4ff !important;
}

#breadcrumbs a.drop-target {
  background: #2b6cb0;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  outline: none;
}

.file-entry.selected {
  background: #ebf4ff;
}

.checkbox-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-col input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #2b6cb0;
}

#selection-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #ebf4ff;
  border: 1px solid #bee3f8;
  border-radius: 8px;
  margin-bottom: 8px;
}

#selection-bar span {
  font-weight: 600;
  color: #2b6cb0;
  flex-grow: 1;
}

.file-entry:hover {
  background: #f7fafc;
}

.file-entry.header {
  font-weight: 600;
  color: #718096;
  font-size: 0.85em;
  border-bottom: 2px solid #e2e8f0;
  background: transparent;
}

.file-entry.header:hover {
  background: transparent;
}

.file-entry.header .sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

.file-entry.header .sortable:hover {
  color: #2b6cb0;
}

.file-entry .icon {
  font-size: 1.2em;
  text-align: center;
  line-height: 1;
}

.file-entry .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-entry .name a {
  color: #1a202c;
  text-decoration: none;
}

.file-entry .name a:hover {
  color: #2b6cb0;
  text-decoration: underline;
}

.file-entry .size,
.file-entry .date {
  color: #718096;
  font-size: 0.9em;
}

.file-entry .actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* === Action Buttons === */
.action-btn {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  transition: all 0.15s;
  white-space: nowrap;
}

.action-btn:hover {
  background: #edf2f7;
}

.action-btn.primary {
  background: #2b6cb0;
  color: #fff;
  border-color: #2b6cb0;
}

.action-btn.primary:hover {
  background: #2c5282;
  border-color: #2c5282;
}

/* === Viewer === */
#viewer {
  padding: 24px 0;
}

.viewer-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.viewer-toolbar button {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85em;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  transition: all 0.15s;
}

.viewer-toolbar button:hover {
  background: #edf2f7;
}

.viewer-toolbar button.pdf-btn,
.viewer-toolbar button[title="PDF로 다운로드"] {
  background: #e53e3e;
  color: #fff;
  border-color: #e53e3e;
}

.viewer-toolbar button[title="PDF로 다운로드"]:hover {
  background: #c53030;
  border-color: #c53030;
}

.viewer-toolbar button[title="PDF로 다운로드"]:disabled,
.viewer-toolbar button[title="HTML로 다운로드"]:disabled {
  background: #a0aec0;
  border-color: #a0aec0;
  cursor: wait;
}

.viewer-toolbar button[title="HTML로 다운로드"] {
  background: #38a169;
  color: #fff;
  border-color: #38a169;
}

.viewer-toolbar button[title="HTML로 다운로드"]:hover {
  background: #2f855a;
  border-color: #2f855a;
}

.viewer-toolbar .filename {
  flex-grow: 1;
  font-weight: 600;
  font-size: 1.1em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === Markdown Body === */
.markdown-body {
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  line-height: 1.7;
  word-wrap: break-word;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.markdown-body h1 {
  font-size: 2em;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

.markdown-body h2 {
  font-size: 1.5em;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #edf2f7;
}

.markdown-body h3 {
  font-size: 1.25em;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}

.markdown-body h4 {
  font-size: 1.1em;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
}

.markdown-body h5 {
  font-size: 1em;
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 8px;
}

.markdown-body h6 {
  font-size: 0.9em;
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 8px;
  color: #718096;
}

.markdown-body p {
  margin-bottom: 16px;
}

.markdown-body pre {
  background: #f7fafc;
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 16px;
  border: 1px solid #edf2f7;
}

.markdown-body pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 0.9em;
}

.markdown-body code {
  background: #f0f4f8;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
}

.markdown-body blockquote {
  border-left: 4px solid #2b6cb0;
  margin-left: 0;
  margin-bottom: 16px;
  padding: 8px 16px;
  color: #4a5568;
  background: #f7fafc;
  border-radius: 0 4px 4px 0;
}

.markdown-body blockquote p:last-child {
  margin-bottom: 0;
}

.markdown-body table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 16px;
}

.markdown-body th,
.markdown-body td {
  border: 1px solid #e2e8f0;
  padding: 8px 12px;
  text-align: left;
}

.markdown-body th {
  background: #f7fafc;
  font-weight: 600;
}

.markdown-body ul,
.markdown-body ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.markdown-body li {
  margin-bottom: 4px;
}

.markdown-body li > ul,
.markdown-body li > ol {
  margin-bottom: 0;
  margin-top: 4px;
}

.markdown-body a {
  color: #2b6cb0;
  text-decoration: none;
}

.markdown-body a:hover {
  text-decoration: underline;
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 8px 0;
}

.markdown-body hr {
  border: none;
  border-top: 2px solid #e2e8f0;
  margin: 24px 0;
}

/* === Viewer iframe === */
#viewer iframe {
  width: 100%;
  height: calc(100vh - 220px);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

#viewer.fullscreen-viewer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: #fff;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

#viewer.fullscreen-viewer .viewer-toolbar {
  border-radius: 0;
  margin-bottom: 0;
}

#viewer.fullscreen-viewer iframe {
  height: calc(100vh - 52px);
  border: none;
  border-radius: 0;
}

/* === Editor === */
#editor-container {
  padding: 0;
}

#editor-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

#editor-toolbar button {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85em;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  transition: all 0.15s;
}

#editor-toolbar button:hover {
  background: #edf2f7;
}

#editor-toolbar button.save-btn {
  background: #2b6cb0;
  color: #fff;
  border-color: #2b6cb0;
}

#editor-toolbar button.save-btn:hover {
  background: #2c5282;
  border-color: #2c5282;
}

#editor-toolbar .filename {
  flex-grow: 1;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#editor-toolbar .status {
  font-size: 0.85em;
  color: #718096;
}

.rename-input {
  flex-grow: 1;
  font-weight: 600;
  font-size: 1em;
  font-family: inherit;
  padding: 4px 8px;
  border: 2px solid #2b6cb0;
  border-radius: 4px;
  outline: none;
  background: #ebf4ff;
  color: #1a202c;
}

.cm-editor {
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 8px 8px;
  min-height: 500px;
  font-size: 14px;
}

.cm-editor.cm-focused {
  outline: none;
  border-color: #2b6cb0;
}

.cm-editor .cm-scroller {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
}

/* === Upload Modal === */
#upload-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  z-index: 1;
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  width: 480px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
  margin-bottom: 16px;
  font-size: 1.2em;
}

#drop-zone {
  height: 160px;
  border: 2px dashed #cbd5e0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #718096;
  font-size: 1.1em;
  transition: all 0.2s;
  margin-bottom: 16px;
}

#drop-zone:hover {
  border-color: #a0aec0;
  background: #f7fafc;
}

#drop-zone.dragover {
  border-color: #2b6cb0;
  background: #ebf4ff;
  color: #2b6cb0;
}

#upload-progress {
  max-height: 200px;
  overflow-y: auto;
}

.upload-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 0.9em;
}

.upload-item .upload-filename {
  width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
  color: #4a5568;
}

.upload-item .progress-bar-container {
  flex-grow: 1;
  height: 6px;
  background: #edf2f7;
  border-radius: 3px;
  overflow: hidden;
}

.upload-item .progress-bar {
  height: 100%;
  background: #2b6cb0;
  border-radius: 3px;
  transition: width 0.3s;
  width: 0%;
}

.upload-item .upload-percent {
  width: 40px;
  text-align: right;
  font-size: 0.85em;
  color: #718096;
  flex-shrink: 0;
}

.upload-item.complete .progress-bar {
  background: #38a169;
}

.upload-item.complete .upload-percent {
  color: #38a169;
}

.upload-item.error .progress-bar {
  background: #e53e3e;
}

.upload-item.error .upload-percent {
  color: #e53e3e;
}

#close-upload {
  margin-top: 16px;
  width: 100%;
  padding: 10px;
  background: #edf2f7;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
  color: #4a5568;
  transition: background 0.15s;
}

#close-upload:hover {
  background: #e2e8f0;
}

/* === Notifications === */
#notification-area {
  position: fixed;
  top: 64px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.notification {
  padding: 12px 20px;
  border-radius: 8px;
  color: #fff;
  font-size: 0.9em;
  animation: slideIn 0.3s ease-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  max-width: 360px;
  word-wrap: break-word;
}

.notification.success {
  background: #38a169;
}

.notification.error {
  background: #e53e3e;
}

.notification.info {
  background: #3182ce;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.notification.removing {
  animation: slideOut 0.2s ease-in forwards;
}

/* === Loading === */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  color: #718096;
  font-size: 1em;
}

.loading::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-top-color: #2b6cb0;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #a0aec0;
}

.empty-state .empty-icon {
  font-size: 3em;
  margin-bottom: 12px;
}

.empty-state .empty-text {
  font-size: 1.1em;
}

/* === Utility === */
.hidden {
  display: none !important;
}

/* === Favorites Bar === */
#favorites-bar {
  position: fixed;
  top: 96px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 20px;
  background: #edf2f7;
  border-bottom: 1px solid #e2e8f0;
  z-index: 99;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 0.85em;
}

#favorites-bar .fav-label {
  color: #718096;
  font-weight: 600;
  flex-shrink: 0;
  margin-right: 4px;
}

#favorites-bar .fav-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #2b6cb0;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  flex-shrink: 0;
}

#favorites-bar .fav-item:hover {
  background: #ebf4ff;
  border-color: #bee3f8;
  text-decoration: none;
}

#favorites-bar .fav-item .fav-remove {
  color: #a0aec0;
  font-size: 1.1em;
  line-height: 1;
  cursor: pointer;
  margin-left: 2px;
}

#favorites-bar .fav-item .fav-remove:hover {
  color: #e53e3e;
}

.fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1em;
  padding: 2px 4px;
  line-height: 1;
  color: #cbd5e0;
  transition: color 0.15s;
}

.fav-btn:hover {
  color: #ecc94b;
}

.fav-btn.is-fav {
  color: #ecc94b;
}

/* === Search === */
#search-bar {
  position: fixed;
  top: 52px;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 20px;
  z-index: 98;
  display: flex;
  align-items: center;
  gap: 8px;
}

#search-bar.search-bar-hidden {
  display: none;
}

#search-input {
  flex-grow: 1;
  font-size: 0.9em;
  padding: 8px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-family: inherit;
  outline: none;
  background: #fff;
  color: #1a202c;
}

#search-input:focus {
  border-color: #2b6cb0;
  box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.15);
}

.search-type-toggle {
  display: flex;
  gap: 0;
  flex-shrink: 0;
}

.search-type-toggle input[type="radio"] {
  display: none;
}

.search-type-toggle label {
  padding: 6px 14px;
  border: 1px solid #cbd5e0;
  cursor: pointer;
  background: #fff;
  color: #4a5568;
  font-size: 0.85em;
  user-select: none;
  transition: all 0.15s;
}

.search-type-toggle label:first-of-type {
  border-radius: 6px 0 0 6px;
}

.search-type-toggle label:last-of-type {
  border-radius: 0 6px 6px 0;
  border-left: none;
}

.search-type-toggle input[type="radio"]:checked + label {
  background: #2b6cb0;
  color: #fff;
  border-color: #2b6cb0;
}

#search-clear {
  background: none;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  color: #a0aec0;
  padding: 4px;
  transition: color 0.15s;
}

#search-clear:hover {
  color: #e53e3e;
}

.search-shortcut {
  font-size: 0.75em;
  color: #a0aec0;
  padding: 2px 6px;
  background: #edf2f7;
  border-radius: 4px;
  white-space: nowrap;
}

.search-result-header {
  padding: 12px 16px;
  background: #f7fafc;
  border-bottom: 1px solid #edf2f7;
  color: #4a5568;
  font-size: 0.9em;
  font-weight: 600;
}

.search-result-path {
  font-size: 0.8em;
  color: #a0aec0;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-match-lines {
  margin-top: 6px;
  padding: 8px 12px;
  background: #f7fafc;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
  font-size: 0.82em;
  line-height: 1.6;
}

.search-match-line {
  display: flex;
  gap: 8px;
}

.search-line-num {
  color: #a0aec0;
  min-width: 40px;
  text-align: right;
  user-select: none;
  flex-shrink: 0;
}

.search-line-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-match-lines mark {
  background: #fefcbf;
  padding: 1px 2px;
  border-radius: 2px;
}

.search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  color: #718096;
  font-size: 1em;
}

.search-loading::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-top-color: #2b6cb0;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 10px;
}

/* Search results mark highlight */
.file-entry mark,
.search-result-header mark {
  background: #fefcbf;
  padding: 1px 2px;
  border-radius: 2px;
}

/* Search results container tweaks */
.search-results-container .file-entry .name {
  white-space: normal;
  overflow: visible;
}

/* === Notion Modal === */
#notion-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notion-modal-content {
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}

.notion-file-info {
  font-size: 0.9em;
  color: #718096;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #f7fafc;
  border-radius: 6px;
  font-family: 'SF Mono', Consolas, monospace;
}

#notion-search {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.95em;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.15s;
}
#notion-search:focus {
  border-color: #2b6cb0;
  box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.15);
}

.notion-page-list {
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
  margin-bottom: 16px;
}

.notion-page-item {
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.95em;
}

.notion-page-item:hover {
  background: #ebf4ff;
  border-color: #2b6cb0;
  color: #2b6cb0;
}

.notion-actions {
  display: flex;
  justify-content: flex-end;
}

.notion-actions button {
  padding: 8px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #edf2f7;
  cursor: pointer;
  font-size: 0.9em;
  transition: background 0.15s;
}

.notion-actions button:hover {
  background: #e2e8f0;
}

.viewer-toolbar button[title="Notion에 업로드"] {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

.viewer-toolbar button[title="Notion에 업로드"]:hover {
  background: #333;
  border-color: #333;
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  color: #718096;
  font-size: 1em;
}

/* === Responsive === */
@media (max-width: 768px) {
  .search-type-toggle label {
    font-size: 0.8em;
    padding: 4px 10px;
  }

  .file-entry {
    grid-template-columns: 36px 1fr 90px 80px;
  }

  .file-entry.has-checkbox {
    grid-template-columns: 28px 36px 1fr 90px 80px;
  }

  .file-entry .date {
    display: none;
  }

  .file-entry.header .date {
    display: none;
  }

  #content {
    padding: 0 12px 40px;
    margin-top: 104px;
  }

  #topbar {
    padding: 0 12px;
  }

  .markdown-body {
    padding: 20px;
  }

  .viewer-toolbar {
    flex-wrap: wrap;
  }

  .modal-content {
    padding: 16px;
  }

  #drop-zone {
    height: 120px;
  }
}

@media (max-width: 480px) {
  .file-entry {
    grid-template-columns: 30px 1fr 60px;
  }

  .file-entry.has-checkbox {
    grid-template-columns: 28px 30px 1fr 60px;
  }

  .file-entry .date {
    display: none;
  }

  .file-entry .actions {
    display: none;
  }

  .file-entry.header .date,
  .file-entry.header .actions {
    display: none;
  }

  .search-shortcut {
    display: none;
  }
}
