@charset "UTF-8";

/* ══════════════════════════════════════════════════════════════
   안개숲 도서관 - 전용 글쓰기 에디터 스타일 (css/editor.css)
   ══════════════════════════════════════════════════════════════ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.editor-body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #fbfcfc;
  color: #191f28;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── 1. 에디터 상단 고정 헤더 바 (2줄 컴팩트 70px 구조) ── */
.editor-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e8eb;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.editor-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}

/* 1행: 관리 바 (높이 약 38px) */
.editor-header-row.top-row {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f2f4f6;
  gap: 12px;
}

.editor-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-exit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  height: 28px;
  background: transparent;
  border: 1px solid #dcdfe4;
  border-radius: 5px;
  font-size: 12px;
  color: #4e5968;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-exit:hover {
  background: #f2f4f6;
  color: #191f28;
  border-color: #abb3ba;
}

/* 2단 카테고리 셀렉터 (80% 슬림화) */
.category-selectors {
  display: flex;
  align-items: center;
}

.category-select {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  color: #333d4b;
  background-color: #f8fafb;
  border: 1px solid #dcdfe4;
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  min-width: 180px;
}

.category-select:focus {
  border-color: #1b736e;
  background-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(27, 115, 110, 0.12);
}

.category-select optgroup {
  font-weight: 700;
  color: #191f28;
  background: #f8fafb;
  padding: 2px 0;
}

.category-select option {
  font-weight: 500;
  color: #333d4b;
  background: #ffffff;
  padding: 2px 6px;
}

.editor-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.draft-btn-group {
  display: inline-flex;
  align-items: stretch;
  height: 28px;
  background: #ffffff;
  border: 1px solid #dcdfe4;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}

.draft-btn-group:hover {
  border-color: #abb3ba;
}

.btn-draft-save,
.btn-draft {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  height: 100%;
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: #4e5968;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-draft-save:hover,
.btn-draft:hover {
  background: #f2f4f6;
  color: #191f28;
}

.btn-draft-save:active,
.btn-draft:active {
  background: #e5e8eb;
}

.btn-draft-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  height: 100%;
  background: transparent;
  border: none;
  border-left: 1px solid #eef1f4;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-draft-open:hover {
  background: #f2f4f6;
}

.btn-draft-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  background: #e5e8eb;
  color: #4e5968;
  line-height: 1;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-draft-badge.has-drafts {
  background: #1b736e;
  color: #ffffff;
}

.btn-draft-open:hover .btn-draft-badge.has-drafts {
  background: #135854;
  transform: scale(1.08);
}

.btn-publish {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 13px;
  height: 28px;
  background: #1b736e;
  border: none;
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(27, 115, 110, 0.2);
  transition: all 0.15s ease;
}

.btn-publish:hover {
  background: #135854;
  box-shadow: 0 2px 6px rgba(27, 115, 110, 0.3);
}

/* 2행: 맞춤형 서식 툴바 행 (높이 약 33px) */
.editor-header-row.toolbar-row {
  height: 33px;
  display: flex;
  align-items: center;
  overflow: visible !important; /* 드롭다운 팝업창 잘림 방지 */
}

.editor-custom-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  margin-bottom: 0;
  width: 100%;
  overflow: visible !important;
}

.toolbar-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  height: 25px;
  background: #ffffff;
  border: 1px solid #dcdfe4;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #333d4b;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.toolbar-action-btn:hover {
  background: #e9f4f3;
  border-color: #1b736e;
  color: #1b736e;
}

.toolbar-action-btn.primary-highlight {
  background: #e9f4f3;
  border-color: #8dc5c1;
  color: #1b736e;
}

.toolbar-action-btn.primary-highlight:hover {
  background: #d6ecea;
  border-color: #1b736e;
}

.toolbar-divider {
  width: 1px;
  height: 16px;
  background: #dcdfe4;
  margin: 0 4px;
  flex-shrink: 0;
}

/* ── 서재풍 구분선 드롭다운 메뉴 ── */
.divider-menu-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.divider-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 236px;
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  padding: 8px;
  z-index: 1000;
  display: none;
  flex-direction: column;
  gap: 4px;
}

.divider-dropdown-menu.show {
  display: flex;
  animation: dividerMenuFadeIn 0.15s ease-out;
}

@keyframes dividerMenuFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.divider-dropdown-header {
  font-size: 11.5px;
  font-weight: 700;
  color: #6b7684;
  padding: 4px 8px 6px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 2px;
}

.divider-opt-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.12s ease;
}

.divider-opt-btn:hover {
  background: #f4f8f7;
  border-color: #c9e3e0;
}

.divider-opt-label {
  font-size: 12px;
  font-weight: 600;
  color: #333d4b;
}

.divider-preview-wrap {
  width: 100%;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-line.gradient {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #1b736e, transparent);
  border-radius: 1px;
}

.preview-line.classic {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: #1b736e;
}
.preview-line.classic::before,
.preview-line.classic::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #1b736e);
}
.preview-line.classic::after {
  background: linear-gradient(90deg, #1b736e, transparent);
}

.preview-line.leaf {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #1b736e;
}
.preview-line.leaf::before,
.preview-line.leaf::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #1b736e);
}
.preview-line.leaf::after {
  background: linear-gradient(90deg, #1b736e, transparent);
}

.preview-line.simple {
  width: 100%;
  height: 1px;
  background: #cbd5e1;
}

/* Quill 기본 툴바 커스텀 (24px 콤팩트 규격) */
#quill-toolbar {
  border: none !important;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1px;
  overflow: visible !important;
}

#quill-toolbar .ql-formats {
  margin-right: 4px !important;
  display: inline-flex;
  align-items: center;
  position: relative;
}

#quill-toolbar button.ql-header,
#quill-toolbar button {
  width: 24px !important;
  height: 24px !important;
  padding: 2px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 3px;
}

#quill-toolbar button svg {
  width: 14px !important;
  height: 14px !important;
}

/* Quill 글자색/배경색 선택기 버튼 수평 완벽 정렬 (윗첨자 버그 수정) */
#quill-toolbar .ql-picker {
  width: 24px !important;
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  float: none !important;
  vertical-align: middle !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
}

#quill-toolbar .ql-picker-label {
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid transparent !important;
  border-radius: 3px !important;
  outline: none !important;
  cursor: pointer;
  background: transparent;
}

#quill-toolbar .ql-picker-label:hover {
  background-color: #f2f4f6 !important;
  border-color: #dcdfe4 !important;
}

#quill-toolbar .ql-picker-label svg {
  width: 15px !important;
  height: 15px !important;
  position: static !important;
  float: none !important;
  margin: 0 !important;
  transform: none !important;
  display: block !important;
}

/* 색상 팔레트 드롭다운 옵션창 최상단 돌출 및 가림/잘림 방지 */
.ql-snow .ql-picker.ql-expanded .ql-picker-options {
  display: block !important;
  position: absolute !important;
  top: calc(100% + 4px) !important;
  left: 0 !important;
  z-index: 1000 !important;
  background: #ffffff !important;
  border: 1px solid #dcdfe4 !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
  padding: 6px !important;
  width: 156px !important;
}

/* ── 2. 에디터 메인 워크스페이스 컨테이너 ── */
.editor-workspace {
  max-width: 960px;
  width: 100%;
  margin: 24px auto 80px;
  padding: 0 24px;
  flex: 1;
}

.editor-card {
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
}

/* 제목 입력 영역 */
.editor-title-container {
  margin-bottom: 20px;
  border-bottom: 1px solid #eef1f4;
  padding-bottom: 18px;
}

.editor-title-input {
  width: 100%;
  border: none;
  outline: none;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #191f28;
  line-height: 1.4;
  letter-spacing: -0.5px;
  background: transparent;
}

.editor-title-input::placeholder {
  color: #abb3ba;
  font-weight: 500;
}

/* ── 4. Quill 에디터 본문 영역 ── */
#editor-container {
  min-height: 480px;
  font-family: "Pretendard", -apple-system, sans-serif;
  font-size: 16px;
  color: #333d4b;
  line-height: 1.85;
}

.ql-container.ql-snow {
  border: none !important;
  font-family: inherit !important;
  font-size: inherit !important;
}

.ql-editor {
  padding: 12px 4px 40px !important;
  min-height: 440px;
  outline: none;
}

.ql-editor.ql-blank::before {
  color: #abb3ba !important;
  font-style: normal !important;
  font-size: 16px;
  left: 4px !important;
}

/* 에디터 내부 본문 서식 일치 (메인 포스트 뷰와 완벽 동일 규격) */
.ql-editor {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 16px !important;
  color: #333d4b !important;
  line-height: 1.85 !important;
  letter-spacing: -0.2px !important;
}

.ql-editor p {
  font-size: 16px !important;
  color: #333d4b !important;
  line-height: 1.85 !important;
  letter-spacing: -0.2px !important;
  margin: 0 0 10px 0 !important;
  word-break: keep-all !important;
}

/* 카드/구분선/인용구 직전·직후의 불필요한 빈 문단(<p><br></p>) 여백을 숨겨 발행 화면과 100% 동일한 줄간격 유지 */
.ql-editor p:has(> br:only-child):has(+ .misty-divider-card),
.ql-editor p:has(> br:only-child):has(+ p:has(> br:only-child):has(+ .misty-divider-card)),
.ql-editor p:empty:has(+ .misty-divider-card),
.ql-editor p:has(> br:only-child):has(+ .postit-card),
.ql-editor p:has(> br:only-child):has(+ .simple-book-card),
.ql-editor p:has(> br:only-child):has(+ .inserted-book-card),
.ql-editor p:has(> br:only-child):has(+ .misty-quote-card),
.ql-editor p:has(> br:only-child):has(+ blockquote) {
  display: none !important;
}

.ql-editor .misty-divider-card + p:has(> br:only-child):not(:last-child),
.ql-editor .misty-divider-card + p:has(> br:only-child) + p:has(> br:only-child):not(:last-child),
.ql-editor .misty-divider-card + p:empty:not(:last-child),
.ql-editor .postit-card + p:has(> br:only-child):not(:last-child),
.ql-editor .simple-book-card + p:has(> br:only-child):not(:last-child),
.ql-editor .inserted-book-card + p:has(> br:only-child):not(:last-child),
.ql-editor .misty-quote-card + p:has(> br:only-child):not(:last-child),
.ql-editor blockquote + p:has(> br:only-child):not(:last-child) {
  display: none !important;
}

.ql-editor h1,
.ql-editor h2 {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  color: #191f28;
  margin: 24px 0 10px;
}

.ql-editor h2 {
  font-size: 20px;
  border-bottom: 1px solid #f0f2f4;
  padding-bottom: 6px;
}

.ql-editor h3 {
  font-family: "Pretendard", -apple-system, sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #191f28;
  margin: 20px 0 8px;
}

/* ── 본문 내 인용구 (Quill 기본 blockquote 및 시그니처 단일 블록 - 가로 70% 적용) ── */
.ql-editor blockquote {
  width: 70% !important;
  max-width: 70% !important;
  margin: 20px auto !important;
  padding: 18px 24px !important;
  background: #f1f7f6 !important;
  border: none !important;
  border-left: 4px solid #1b736e !important;
  border-radius: 0 8px 8px 0 !important;
  font-family: "Nanum Myeongjo", serif;
  font-size: 16px;
  font-style: italic;
  color: #113c39;
  line-height: 1.75;
  box-sizing: border-box !important;
}

/* 연속된 기본 blockquote가 있을 경우 한 블록처럼 자연스럽게 이어지도록 처리 */
.ql-editor blockquote + blockquote {
  margin-top: -20px !important;
  padding-top: 4px !important;
  border-top-right-radius: 0 !important;
  border-top-left-radius: 0 !important;
}

/* ── 안개숲 시그니처 인용구 카드 (인용구 상단 + 저자정보 하단 우측 정렬 단일 블록) ── */
.ql-editor .misty-quote-card {
  position: relative !important;
  width: 70% !important;
  max-width: 70% !important;
  margin: 20px auto !important;
  padding: 22px 28px 18px 26px !important;
  background: #f1f7f6 !important;
  border: none !important;
  border-left: 4px solid #1b736e !important;
  border-radius: 0 10px 10px 0 !important;
  box-sizing: border-box !important;
  display: block !important;
  box-shadow: 0 2px 10px rgba(27, 115, 110, 0.05);
}

.ql-editor .misty-quote-body {
  width: 100%;
}

.ql-editor .misty-quote-text {
  font-family: "Nanum Myeongjo", serif;
  font-size: 16px;
  font-style: italic;
  color: #113c39;
  line-height: 1.8;
  word-break: keep-all;
  outline: none;
  min-height: 24px;
  cursor: text;
}

.ql-editor .misty-quote-text:focus {
  background: rgba(27, 115, 110, 0.04);
  border-radius: 4px;
}

.ql-editor .misty-quote-author {
  margin-top: 12px;
  text-align: right;
  font-family: "Pretendard", -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: #1b736e;
  font-style: normal;
  outline: none;
  min-height: 20px;
  cursor: text;
}

.ql-editor .misty-quote-author:focus {
  background: rgba(27, 115, 110, 0.04);
  border-radius: 4px;
}

/* ── 인용구 및 저자정보 예시 문구 (회색톤 처리 & 입력 시 즉각 전환) ── */
.ql-editor .misty-quote-text.is-placeholder {
  color: #8fa095 !important;
  font-style: italic !important;
}

.ql-editor .misty-quote-author.is-placeholder {
  color: #8fa095 !important;
  font-style: normal !important;
  font-weight: 400 !important;
}

/* 인용구 삭제 버튼 (에디터 내) */
.ql-editor .misty-quote-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #c9d8ce;
  background: #ffffff;
  color: #8b95a1;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: all 0.2s ease;
  padding: 0;
  user-select: none;
}

.ql-editor .misty-quote-delete-btn:hover {
  opacity: 1;
  background: #e15241;
  border-color: #e15241;
  color: #ffffff;
}

@media (max-width: 768px) {
  .ql-editor blockquote,
  .ql-editor .misty-quote-card {
    width: 92% !important;
    max-width: 92% !important;
    padding: 18px 20px 14px 20px !important;
    margin: 20px auto !important;
  }
}

/* ── 에디터 내 서재풍 구분선 (Misty Divider) ── */
.ql-editor .misty-divider-card {
  position: relative;
  margin: 20px auto !important;
  width: 90% !important;
  max-width: 640px !important;
  text-align: center;
  user-select: none;
  cursor: default;
  clear: both;
}

.ql-editor .misty-divider-card.style-gradient .misty-divider-line {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(27, 115, 110, 0.5) 50%, transparent 100%);
  border: none;
}

.ql-editor .misty-divider-card.style-simple .misty-divider-line {
  height: 1px;
  background: #e2e8f0;
  border: none;
}

.ql-editor .misty-divider-card.style-classic .misty-divider-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.ql-editor .misty-divider-card.style-classic .misty-divider-inner::before,
.ql-editor .misty-divider-card.style-classic .misty-divider-inner::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(27, 115, 110, 0.4));
}
.ql-editor .misty-divider-card.style-classic .misty-divider-inner::after {
  background: linear-gradient(90deg, rgba(27, 115, 110, 0.4), transparent);
}
.ql-editor .misty-divider-card.style-classic .misty-divider-decor {
  font-size: 13px;
  letter-spacing: 4px;
  color: #1b736e;
  opacity: 0.85;
}

.ql-editor .misty-divider-card.style-leaf .misty-divider-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.ql-editor .misty-divider-card.style-leaf .misty-divider-inner::before,
.ql-editor .misty-divider-card.style-leaf .misty-divider-inner::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45, 122, 110, 0.35));
}
.ql-editor .misty-divider-card.style-leaf .misty-divider-inner::after {
  background: linear-gradient(90deg, rgba(45, 122, 110, 0.35), transparent);
}
.ql-editor .misty-divider-card.style-leaf .misty-divider-leaf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f0f7f5;
  color: #1b736e;
}

/* 에디터 호버 시 삭제 버튼 */
.ql-editor .misty-divider-delete-btn {
  position: absolute;
  top: -12px;
  right: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #dcdfe4;
  color: #8b95a1;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
  z-index: 10;
}
.ql-editor .misty-divider-card:hover .misty-divider-delete-btn {
  display: flex;
}
.ql-editor .misty-divider-delete-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
}

/* ── 파스텔 포스트잇 메모 카드 (왼쪽 상단 접힌 종이 효과) ── */
.postit-card {
  position: relative;
  width: 360px;
  max-width: 100%;
  min-height: 180px;
  height: auto;
  margin: 20px auto;
  padding: 32px 28px 26px 36px;
  border-radius: 0 4px 6px 6px;
  font-family: "Nanum Myeongjo", "Pretendard", serif;
  font-size: 15.5px;
  line-height: 1.85;
  box-shadow: 2px 5px 15px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: text;
  box-sizing: border-box;
  display: block;
}

/* 왼쪽 상단 귀퉁이 접힌 삼각형 플랩 (정밀 매칭) */
.postit-card .postit-fold {
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--postit-fold-light) 0%, var(--postit-fold) 100%);
  clip-path: polygon(100% 0%, 0% 100%, 100% 100%);
  filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.22));
  border-bottom-right-radius: 2px;
  z-index: 2;
}

.postit-body {
  color: var(--postit-text);
  word-break: keep-all;
}

/* 에디터 내 삭제 버튼 */
.postit-delete-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 22px;
  height: 22px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  color: #6b7280;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s ease;
}

.postit-card:hover .postit-delete-btn {
  opacity: 1;
}

.postit-delete-btn:hover {
  background: rgba(224, 49, 49, 0.15);
  color: #e03131;
}

/* 5가지 서재 파스텔 톤 팔레트 (사용자 예시 피치 톤 정밀 반영) */
.postit-card.color-peach {
  --postit-bg: #fde5d6;
  --postit-fold: #e89b76;
  --postit-fold-light: #f3b192;
  --postit-text: #3d2314;
  background: linear-gradient(135deg, transparent 19.8px, #fde5d6 20.2px);
}

.postit-card.color-yellow {
  --postit-bg: #fef8c8;
  --postit-fold: #f4d048;
  --postit-fold-light: #fbe078;
  --postit-text: #3d3008;
  background: linear-gradient(135deg, transparent 19.8px, #fef8c8 20.2px);
}

.postit-card.color-mint {
  --postit-bg: #def4e4;
  --postit-fold: #8dd8a3;
  --postit-fold-light: #a9e4bb;
  --postit-text: #133921;
  background: linear-gradient(135deg, transparent 19.8px, #def4e4 20.2px);
}

.postit-card.color-lavender {
  --postit-bg: #f2e8fa;
  --postit-fold: #c9a7ea;
  --postit-fold-light: #d8bcf4;
  --postit-text: #351c50;
  background: linear-gradient(135deg, transparent 19.8px, #f2e8fa 20.2px);
}

.postit-card.color-sky {
  --postit-bg: #e1f1fc;
  --postit-fold: #86c4f3;
  --postit-fold-light: #a7d6f8;
  --postit-text: #10344d;
  background: linear-gradient(135deg, transparent 19.8px, #e1f1fc 20.2px);
}

/* 아날로그 미세 회전 (Tilt) */
.postit-card.tilt-1 { transform: rotate(-0.8deg); }
.postit-card.tilt-2 { transform: rotate(0.7deg); }
.postit-card.tilt-3 { transform: rotate(-0.5deg); }
.postit-card.tilt-4 { transform: rotate(0.6deg); }

.postit-card:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 2px 8px 20px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* 인라인 코드 및 코드 블록 서식 */
.ql-editor code {
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 14px;
  background: #f1f3f5;
  color: #b35436;
  padding: 2px 6px;
  border-radius: 4px;
}

.ql-editor pre.ql-syntax {
  background: #1e242c;
  color: #e6edf3;
  padding: 16px 20px;
  border-radius: 8px;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: auto;
  margin: 18px 0;
}

/* 윈도우 탐색기 파일 드래그오버 시각적 피드백 */
.ql-editor.drag-over {
  outline: 2px dashed #1b736e !important;
  background-color: rgba(27, 115, 110, 0.04) !important;
  border-radius: 8px;
}

/* 에디터 본문 내 삽입된 이미지 */
.ql-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* 단독 1장 이미지 (문단 내 이미지가 1장일 때) */
.ql-editor p:not(:has(img:nth-of-type(2))) img {
  display: block;
  margin: 18px auto;
}

/* 2장 이상 나란히 있는 문단 컨테이너 공통 */
.ql-editor p:has(img:nth-of-type(2)) {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

/* [2장 나란히] 정확히 2장일 때 (50% : 50%) */
.ql-editor p:has(img:nth-of-type(2)):not(:has(img:nth-of-type(3))) img {
  display: inline-block !important;
  flex: 1 1 calc(50% - 10px);
  max-width: calc(50% - 5px) !important;
  width: calc(50% - 5px) !important;
  height: auto;
  margin: 0 !important;
  object-fit: cover;
  border-radius: 8px;
}

/* [3장 나란히] 3장 이상일 때 (33.3% : 33.3% : 33.3%) */
.ql-editor p:has(img:nth-of-type(3)) img {
  display: inline-block !important;
  flex: 1 1 calc(33.333% - 10px);
  max-width: calc(33.333% - 7px) !important;
  width: calc(33.333% - 7px) !important;
  height: auto;
  margin: 0 !important;
  object-fit: cover;
  border-radius: 8px;
}

/* 본문에 삽입된 도서 정보 카드 서식 (상세뷰와 일치) */
.inserted-book-card {
  background: #f8fafb;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
  margin: 20px auto;
  user-select: none;
  position: relative;
}

.inserted-book-card .card-delete-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: #ffffff;
  border: 1px solid #dcdfe4;
  border-radius: 4px;
  color: #8b95a1;
  font-size: 11px;
  padding: 2px 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inserted-book-card .card-delete-btn:hover {
  background: #fef0f2;
  color: #e03131;
  border-color: #f7a8b8;
}

.inserted-book-cover {
  width: 90px;
  height: 125px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #dee2e6;
}

.inserted-book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.inserted-book-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inserted-book-title {
  font-family: "Nanum Myeongjo", serif;
  font-size: 17px;
  font-weight: 700;
  color: #191f28;
}

.inserted-book-author {
  font-size: 13.5px;
  color: #333d4b;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
}

.inserted-book-publisher {
  font-size: 13px;
  color: #6b7684;
  line-height: 1.4;
  margin: 0;
}

.inserted-book-stars {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 2px !important;
  line-height: 1 !important;
  margin: 4px 0 !important;
}

.book-stars-visual {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 2px !important;
}

.star-icon {
  display: inline-block;
  color: #dcdfe4;
  font-size: 15px;
  line-height: 1;
}

.star-icon.full {
  color: #f59f00;
}

.star-icon.half {
  position: relative;
  display: inline-block;
  color: #dcdfe4;
}

.star-icon.half::before {
  content: '★';
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  overflow: hidden;
  color: #f59f00;
}

.star-icon.empty {
  color: #dcdfe4;
}

.inserted-book-quote {
  font-size: 12.5px;
  color: #6b7684;
  line-height: 1.5;
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #edf0f2;
  margin-top: 4px;
}

/* ── 본문 내 심플 사각 도서 정보 카드 서식 (에디터 내 서식) ── */
.ql-editor .simple-book-card,
.simple-book-card {
  position: relative;
  display: block;
  width: 580px;
  max-width: 100%;
  border: 1.5px solid #dcdfe4;
  border-radius: 10px;
  background-color: #ffffff;
  padding: 22px 28px;
  margin: 20px auto;
  box-sizing: border-box;
  text-align: left;
  user-select: none;
  cursor: default;
}

.ql-editor .simple-book-card .book-card-body,
.simple-book-card .book-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ql-editor .simple-book-card .book-card-row,
.simple-book-card .book-card-row {
  display: flex;
  align-items: baseline;
  font-size: 15px;
  line-height: 1.6;
  color: #333d4b;
}

.ql-editor .simple-book-card .book-card-label,
.simple-book-card .book-card-label {
  display: inline-flex;
  justify-content: space-between;
  width: 52px;
  flex-shrink: 0;
  font-weight: 500;
  color: #333d4b;
  letter-spacing: 0;
  user-select: none;
}

.ql-editor .simple-book-card .book-card-colon,
.simple-book-card .book-card-colon {
  margin-left: 6px;
  margin-right: 12px;
  flex-shrink: 0;
  font-weight: 500;
  color: #333d4b;
  user-select: none;
}

.ql-editor .simple-book-card .book-card-val,
.simple-book-card .book-card-val {
  flex: 1;
  color: #191f28;
  font-weight: 400;
  word-break: break-word;
  user-select: text;
}

.ql-editor .simple-book-card .book-card-delete-btn,
.simple-book-card .book-card-delete-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #dcdfe4;
  background: #ffffff;
  color: #8b95a1;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
  padding: 0;
  user-select: none;
  z-index: 10;
  pointer-events: auto !important;
}

.ql-editor .simple-book-card:hover .book-card-delete-btn,
.simple-book-card:hover .book-card-delete-btn {
  display: flex;
}

.ql-editor .simple-book-card .book-card-delete-btn:hover,
.simple-book-card .book-card-delete-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
}

@media (max-width: 768px) {
  .ql-editor .simple-book-card,
  .simple-book-card {
    width: 100%;
    padding: 18px 20px;
    margin: 20px auto;
  }
}

/* ── 5. 하단 태그 입력 영역 ── */
.editor-tag-section {
  border-top: 1px solid #eef1f4;
  padding-top: 20px;
  margin-top: 20px;
}

.tag-input-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #e9f4f3;
  color: #1b736e;
  border-radius: 16px;
  font-size: 12.5px;
  font-weight: 600;
}

.tag-badge button {
  background: transparent;
  border: none;
  color: #1b736e;
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
}

.tag-input {
  border: none;
  outline: none;
  font-size: 13.5px;
  color: #191f28;
  padding: 6px 4px;
  min-width: 180px;
  flex: 1;
  font-family: inherit;
}

.tag-input::placeholder {
  color: #abb3ba;
}

/* ── 하단 사진 첨부 안내 팁 & 샘플 버튼 ── */
.editor-guide-tip {
  margin-top: 20px;
  padding: 12px 18px;
  background: #f8fafb;
  border: 1px dashed #dcdfe4;
  border-radius: 8px;
  font-size: 13px;
  color: #4e5968;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.editor-guide-tip strong {
  color: #1b736e;
}

.btn-sample-test {
  background: #ffffff;
  border: 1px solid #dcdfe4;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #333d4b;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-sample-test:hover {
  background: #e9f4f3;
  border-color: #1b736e;
  color: #1b736e;
}

/* ── 6. 도서 정보 첨부 모달 팝업 ── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transform: translateY(15px);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #eef1f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #191f28;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 20px;
  color: #8b95a1;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 70vh;
  overflow-y: auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #333d4b;
}

.form-input {
  height: 38px;
  padding: 0 12px;
  font-size: 13.5px;
  border: 1px solid #dcdfe4;
  border-radius: 6px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.form-input:focus {
  border-color: #1b736e;
}

.form-textarea {
  padding: 10px 12px;
  font-size: 13px;
  border: 1px solid #dcdfe4;
  border-radius: 6px;
  outline: none;
  resize: vertical;
  height: 70px;
  font-family: inherit;
}

.form-textarea:focus {
  border-color: #1b736e;
}

.form-row {
  display: flex;
  gap: 12px;
}

@media (max-width: 480px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}



.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #eef1f4;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #fbfcfc;
}

.btn-modal-cancel {
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid #dcdfe4;
  border-radius: 6px;
  font-size: 13px;
  color: #4e5968;
  font-weight: 600;
  cursor: pointer;
}

.btn-modal-submit {
  padding: 8px 20px;
  background: #1b736e;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-modal-submit:hover {
  background: #135854;
}

/* ── 포스트잇 모달 & 컬러 칩 ── */
.postit-modal-card {
  max-width: 500px;
}

.postit-color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.postit-color-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f8fafb;
  border: 1px solid #dcdfe4;
  border-radius: 6px;
  font-size: 13px;
  color: #4e5968;
  cursor: pointer;
  transition: all 0.15s ease;
}

.postit-color-opt:hover {
  background: #f2f4f6;
}

.postit-color-opt.active {
  background: #ffffff;
  border-color: #1b736e;
  color: #1b736e;
  font-weight: 600;
  box-shadow: 0 0 0 2px rgba(27, 115, 110, 0.15);
}

.postit-color-opt input[type="radio"] {
  display: none;
}

.postit-color-opt .chip {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.postit-color-opt .chip-yellow { background-color: #fef08a; }
.postit-color-opt .chip-mint { background-color: #bbf7d0; }
.postit-color-opt .chip-peach { background-color: #fed7aa; }
.postit-color-opt .chip-lavender { background-color: #e9d5ff; }
.postit-color-opt .chip-sky { background-color: #bae6fd; }

/* ════════ 임시저장 목록 모달 팝업 스타일 (최대 30개 보관) ════════ */
.draft-modal-card {
  max-width: 640px;
  width: 92%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.draft-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.draft-count-tag {
  font-size: 12px;
  font-weight: 700;
  color: #1b736e;
  background: #e9f4f3;
  padding: 2px 9px;
  border-radius: 12px;
  letter-spacing: -0.2px;
}

.draft-modal-body {
  padding: 16px 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.draft-modal-notice {
  font-size: 12.5px;
  color: #6b7684;
  line-height: 1.5;
  background: #f8fafb;
  border: 1px solid #eef1f4;
  padding: 10px 14px;
  border-radius: 7px;
  flex-shrink: 0;
}

.draft-modal-notice strong {
  color: #1b736e;
  font-weight: 600;
}

.draft-list-container {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  padding-right: 4px;
}

.draft-list-container::-webkit-scrollbar {
  width: 6px;
}

.draft-list-container::-webkit-scrollbar-thumb {
  background: #dcdfe4;
  border-radius: 4px;
}

.draft-list-container::-webkit-scrollbar-thumb:hover {
  background: #abb3ba;
}

.draft-item {
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 8px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: all 0.15s ease;
  position: relative;
}

.draft-item:hover {
  border-color: #1b736e;
  box-shadow: 0 2px 8px rgba(27, 115, 110, 0.08);
}

.draft-item.active-editing {
  border-color: #1b736e;
  background: #fafdfc;
  box-shadow: inset 3px 0 0 #1b736e;
}

.draft-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.draft-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.draft-item-category {
  font-weight: 600;
  color: #1b736e;
  background: #e9f4f3;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11.5px;
}

.draft-item-time {
  color: #8b95a1;
  font-size: 12px;
}

.draft-item-active-tag {
  font-size: 11px;
  font-weight: 600;
  color: #1b736e;
  background: rgba(27, 115, 110, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.draft-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-draft-load {
  background: #1b736e;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-draft-load:hover {
  background: #135854;
}

.btn-draft-delete {
  background: transparent;
  color: #8b95a1;
  border: 1px solid #dcdfe4;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  font-size: 15px;
  line-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  padding: 0;
}

.btn-draft-delete:hover {
  background: #fef0f2;
  color: #e03131;
  border-color: #f7a8b8;
}

.draft-item-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #191f28;
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.15s ease;
}

.draft-item-title:hover {
  color: #1b736e;
  text-decoration: underline;
}

.draft-item-snippet {
  font-size: 12.5px;
  color: #6b7684;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.draft-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.draft-tag-chip {
  font-size: 11px;
  color: #6b7684;
  background: #f2f4f6;
  padding: 1px 6px;
  border-radius: 3px;
}

.draft-empty-state {
  text-align: center;
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.draft-empty-icon {
  margin-bottom: 2px;
}

.draft-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: #4e5968;
}

.draft-empty-desc {
  font-size: 13px;
  color: #8b95a1;
  max-width: 320px;
  line-height: 1.5;
}

.draft-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid #eef1f4;
  background: #fafbfb;
}

.btn-draft-clear-all {
  background: transparent;
  border: 1px solid #e5e8eb;
  border-radius: 5px;
  color: #e03131;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-draft-clear-all:hover {
  background: #fef0f2;
  border-color: #f7a8b8;
}

.btn-draft-clear-all:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: transparent;
  border-color: #e5e8eb;
  color: #abb3ba;
}

/* ── 에디터 전용 플로팅 토스트 알림 (비차단형 자동 소멸) ── */
.editor-toast {
  position: fixed;
  top: 48px;
  left: 50%;
  transform: translateX(-50%) translateY(-15px);
  background: #1b736e;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  opacity: 0;
  visibility: hidden;
  transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2000;
  pointer-events: none;
  white-space: nowrap;
}

.editor-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

/* ════════ 작성 중인 글 임시저장 보호 확인 모달 스타일 ════════ */
.draft-protect-card {
  max-width: 480px;
  width: 90%;
}

.draft-protect-body {
  padding: 24px 24px 20px;
}

.draft-protect-heading {
  font-size: 16px;
  color: #191f28;
  line-height: 1.55;
  margin-bottom: 8px;
}

.draft-protect-heading strong {
  color: #1b736e;
  font-weight: 700;
}

.draft-protect-desc {
  font-size: 13px;
  color: #6b7684;
  line-height: 1.5;
}

.draft-protect-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  background: #fafbfb;
  border-top: 1px solid #eef1f4;
  gap: 10px;
}

.btn-protect-cancel {
  background: transparent;
  border: 1px solid #dcdfe4;
  border-radius: 5px;
  color: #6b7684;
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-protect-cancel:hover {
  background: #f2f4f6;
  color: #191f28;
}

.draft-protect-right-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-protect-discard {
  background: #ffffff;
  border: 1px solid #dcdfe4;
  border-radius: 5px;
  color: #4e5968;
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-protect-discard:hover {
  background: #fef0f2;
  color: #e03131;
  border-color: #f7a8b8;
}

.btn-protect-save {
  background: #1b736e;
  border: none;
  border-radius: 5px;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(27, 115, 110, 0.2);
  font-family: inherit;
}

.btn-protect-save:hover {
  background: #135854;
}

/* ════════ 임시저장/예약 글 모달 탭 바 ════════ */
.draft-modal-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid #eef1f4;
  background: #f8fafb;
  padding: 0 20px;
}

.draft-tab-btn {
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 600;
  color: #6b7684;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 4px;
}

.draft-tab-btn:hover {
  color: #191f28;
}

.draft-tab-btn.active {
  color: #1b736e;
  border-bottom-color: #1b736e;
  background: #ffffff;
}

/* 예약 발행 글 목록 컨테이너 및 아이템 */
.scheduled-list-container {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  padding-right: 4px;
}

.scheduled-item {
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-left: 3px solid #1b736e;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.15s ease;
}

.scheduled-item:hover {
  border-color: #1b736e;
  box-shadow: 0 2px 8px rgba(27, 115, 110, 0.08);
}

.scheduled-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scheduled-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e9f4f3;
  color: #1b736e;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.scheduled-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-scheduled-now {
  background: #ffffff;
  color: #1b736e;
  border: 1px solid #1b736e;
  border-radius: 4px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-scheduled-now:hover {
  background: #1b736e;
  color: #ffffff;
}

/* ════════ 발행 옵션 설정 모달 스타일 ════════ */
.publish-modal-card {
  max-width: 500px;
  width: 90%;
}

.publish-modal-body {
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 라디오 카드 선택기 */
.publish-mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.publish-mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 14px 14px;
  background: #f8fafb;
  border: 1.5px solid #dcdfe4;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.publish-mode-card:hover {
  background: #ffffff;
  border-color: #abb3ba;
}

.publish-mode-card.active {
  background: #ffffff;
  border-color: #1b736e;
  box-shadow: 0 0 0 2px rgba(27, 115, 110, 0.15);
}

.publish-mode-card input[type="radio"] {
  position: absolute;
  top: 12px;
  right: 12px;
  accent-color: #1b736e;
}

.publish-mode-title {
  font-size: 14px;
  font-weight: 700;
  color: #191f28;
  margin-bottom: 4px;
  display: block;
}

.publish-mode-desc {
  font-size: 12px;
  color: #6b7684;
  line-height: 1.4;
  display: block;
}

/* 예약 일시 세부 패널 */
.schedule-settings-panel {
  background: #f8fafb;
  border: 1px solid #eef1f4;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.2s ease;
}

.schedule-custom-digits-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid #dcdfe4;
  border-radius: 8px;
  padding: 12px 14px;
  justify-content: space-around;
}

.digit-unit-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.digit-input {
  width: 56px;
  height: 42px;
  border: 1.5px solid #dcdfe4;
  border-radius: 6px;
  background: #f8fafb;
  font-size: 17px;
  font-weight: 700;
  color: #191f28;
  text-align: center;
  font-family: inherit;
  transition: all 0.15s ease;
  -moz-appearance: textfield;
}

.digit-input::-webkit-outer-spin-button,
.digit-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.digit-input:focus {
  outline: none;
  background: #ffffff;
  border-color: #1b736e;
  box-shadow: 0 0 0 3px rgba(27, 115, 110, 0.15);
}

.digit-label {
  font-size: 14px;
  font-weight: 700;
  color: #333d4b;
  user-select: none;
}

.schedule-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-preset-time {
  background: #ffffff;
  border: 1px solid #dcdfe4;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: #4e5968;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-preset-time:hover {
  background: #e9f4f3;
  color: #1b736e;
  border-color: #1b736e;
}

.schedule-guide-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #1b736e;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid rgba(27, 115, 110, 0.2);
  padding: 8px 12px;
  border-radius: 6px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .editor-header-inner {
    padding: 0 16px;
  }
  .editor-workspace {
    padding: 0 12px;
    margin: 16px auto 40px;
  }
  .editor-card {
    padding: 24px 20px;
  }
  .editor-title-input {
    font-size: 22px;
  }
  .category-selectors {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
