/* =========================================================
   북로그 컴포넌트 CSS
   ========================================================= */

:root {
  --bl-text:    var(--text, #0F172A);
  --bl-muted:   var(--muted, #6B7280);
  --bl-panel:   var(--panel, #FFFFFF);
  --bl-border:  var(--line, #E5E7EB);
  --bl-brand:   var(--brand, #635BFF);
  --bl-brand-100: #EEF2FF;
  --bl-shadow:  var(--shadow, 0 4px 20px rgba(17,24,39,.08));
  --bl-radius:  var(--radius, 16px);
  --bl-yellow:  #fff9c4;
  --bl-rule:    #e0e0e0;
  --bl-spine:   #ff8a80;
}

* { box-sizing: border-box; }

/* ===== 래퍼 ===== */
.booklog-wrap { color: var(--bl-text); line-height: 1.5; }
.booklog-container { max-width: 1400px; margin: 0 auto; padding: 0 16px; }

/* ===== 카드 ===== */
.bl-card {
  background: var(--bl-panel);
  border: 1px solid var(--bl-border);
  border-radius: var(--bl-radius);
  padding: 20px;
  box-shadow: var(--bl-shadow);
}

/* ===== [섹션 A] 상단 : 개인정보 + 글쓰기 영역 (3:7) ===== */
.bl-top-section {
  display: flex;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 24px;
}

/* 왼쪽 개인 영역 (3) */
.bl-profile-panel {
  flex: 0 0 30%;
  width: 30%;
  display: flex;
  flex-direction: column;
  /* align-self: stretch 로 글쓰기 영역 높이에 맞춰 늘어남 */
  align-self: stretch;
}

/* 오른쪽 글쓰기 영역 (7) */
.bl-write-panel {
  flex: 1 1 auto;
  width: calc(70% - 20px);
  display: flex;
  flex-direction: column;
}

/* 개인 프로필 카드 */
.bl-profile-card {
  background: var(--bl-panel);
  border: 1px solid var(--bl-border);
  border-radius: var(--bl-radius);
  padding: 20px;
  box-shadow: var(--bl-shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;                /* 부모(bl-profile-panel) 높이를 가득 채움 */
  position: relative;
  overflow: visible;
}

/* 사이트 제목 - 기존 유지(fallback) */
.bl-site-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--bl-text);
  margin: 0;
  line-height: 1.3;
  border-bottom: 2px solid var(--bl-brand);
  padding-bottom: 10px;
}

/* ===== BOOK LOG 배너 ===== */
.bl-brand-banner {
  background: var(--bl-brand);
  /* 카드 패딩 상쇄로 좌우·상단 꽉 채움 */
  margin: -20px -20px 0;
  border-radius: 16px 16px 0 0;
  /* 하단 패딩 = 아바타 반지름(40px) + 여백(12px) */
  padding: 0 20px 52px;
  /* 남은 세로 공간을 모두 차지 */
  flex: 1;
  /* BOOK LOG 텍스트를 세로 중앙에 배치 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;             /* 아바타 absolute 기준 */
  min-height: 140px;              /* 최소 높이 보장 */
}

/* 1줄: 큰 타이틀 */
.bl-brand-book {
  display: block;
  font-size: clamp(36px, 3.6vw, 36px);
  font-weight: 900;
  letter-spacing: -0.05em;
  color: #fff;
  line-height: 1.1;
  padding-top: 0px;
}

/* 2줄: 작은 서브타이틀 */
.bl-brand-log {
  display: block;
  font-size: clamp(14px, 1.4vw, 14px);
  font-weight: 500;
  letter-spacing: 0em;
  color: rgba(255,255,255,.8);
  line-height: 1.5;
  padding-top: 10px;
}

/* ===== 아바타: 배너·바디 경계에 걸침 ===== */
.bl-avatar-bridge {
  position: absolute;
  bottom: -40px;                  /* 아바타 반지름만큼 아래로 튀어나옴 */
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(99,91,255,.25);
  z-index: 2;
}

.bl-avatar-bridge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.bl-avatar-initial {
  font-size: 30px;
  font-weight: 700;
  color: var(--bl-brand);
}

/* ===== 닉네임 영역: 아바타 높이 절반 공간 확보 ===== */
.bl-user-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 35px;              /* 아바타 반지름(40px) + 여백(8px) */
  gap: 0;
}

.bl-user-name-lg {
  font-size: 17px;
  font-weight: 800;
  color: var(--bl-text);
  text-align: center;
}

/* 더 이상 사용하지 않지만 호환 유지 */
.bl-user-level-sm { display: none; }
.bl-badge-admin   { display: none; }

/* 기존 bl-avatar-lg (fallback) */
.bl-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--bl-brand);
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(99,91,255,.2);
}

.bl-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* 기존 bl-user-row (사용 시 호환) */
.bl-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bl-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--bl-border);
  flex-shrink: 0;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.bl-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.bl-user-info {
  flex: 1;
  min-width: 0;
}

.bl-user-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--bl-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bl-user-level {
  font-size: 12px;
  color: var(--bl-muted);
  margin-top: 2px;
}

/* ===== 라운지 + 설정 버튼 나란히 ===== */
.bl-tool-row {
  display: flex;
  gap: 6px;
}

.bl-tool-half {
  flex: 1;
  justify-content: center;
  text-align: center;
}

/* 통계 */
.bl-stats-row {
  display: flex;
  gap: 8px;
}

.bl-stat-box {
  flex: 1;
  background: #f9fafb;
  border: 1px solid var(--bl-border);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
}

.bl-stat-label {
  font-size: 10px;
  color: var(--bl-muted);
  display: block;
  margin-bottom: 2px;
}

.bl-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--bl-text);
  line-height: 1;
}

.bl-stat-value.accent { color: var(--bl-brand); }

/* 검색 */
.bl-search-row {
  display: flex;
  gap: 6px;
}

.bl-search-input {
  flex: 1;
  border: 1px solid var(--bl-border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  background: var(--bl-panel);
  transition: .12s;
}

.bl-search-input:focus {
  border-color: var(--bl-brand);
  box-shadow: 0 0 0 2px var(--bl-brand-100);
}

.bl-search-btn {
  border: 1px solid var(--bl-border);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--bl-panel);
  cursor: pointer;
  font-size: 14px;
  transition: .12s;
}

.bl-search-btn:hover { background: #f3f4f6; }

/* 도구 버튼들 */
.bl-tool-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bl-tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--bl-border);
  border-radius: 10px;
  background: var(--bl-panel);
  font-size: 13px;
  color: var(--bl-text);
  text-decoration: none;
  cursor: pointer;
  transition: .12s;
  width: 100%;
  text-align: center;
}

.bl-tool-btn:hover {
  background: var(--bl-brand-100);
  border-color: var(--bl-brand);
  color: var(--bl-brand);
}

.bl-tool-btn.is-settings {
  background: var(--bl-brand);
  border-color: var(--bl-brand);
  color: #fff;
}

.bl-tool-btn.is-settings:hover {
  filter: brightness(0.9);
  color: #fff;
}

/* 레벨 뱃지 */
.bl-level-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--bl-muted);
  text-align: center;
  margin-top: 2px;
  letter-spacing: 0.01em;
}

/* 로그인 회원 강조 배지 (전체) */
.bl-level-badge.is-member {
  display: inline-block;
  background: #f59e0b;
  color: #fff;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  margin-top: 4px;
}

/* 내 글만 보기 (버튼 행 인라인) */
.bl-myonly-label {
  gap: 5px !important;
  font-size: 12px !important;
}

.bl-myonly-chk:checked ~ span,
.bl-myonly-label:has(.bl-myonly-chk:checked) {
  color: var(--bl-brand) !important;
  font-weight: 700;
  background: var(--bl-brand-100) !important;
  border-color: var(--bl-brand) !important;
}

/* ===== 글쓰기 카드 ===== */
.bl-write-card {
  background: var(--bl-panel);
  border: 1px solid var(--bl-border);
  border-radius: var(--bl-radius);
  padding: 20px;
  box-shadow: var(--bl-shadow);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bl-write-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--bl-text);
  margin: 0;
}

.bl-inspiration {
  font-size: 13px;
  color: var(--bl-muted);
  line-height: 1.6;
  padding: 10px 12px;
  background: #f9fafb;
  border-radius: 10px;
  border-left: 3px solid var(--bl-brand);
}

/* 기분 선택 */
.bl-mood-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bl-mood-btn {
  border: 1px solid var(--bl-border);
  border-radius: 10px;
  padding: 6px 10px;
  background: var(--bl-panel);
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  transition: .12s;
}

.bl-mood-btn.active {
  border-color: var(--bl-brand);
  background: var(--bl-brand-100);
  box-shadow: 0 0 0 2px var(--bl-brand-100);
}

.bl-mood-btn.is-disabled { opacity: .6; pointer-events: none; }

/* 텍스트에어리어 - 노트 스타일 */
.bl-textarea {
  width: 100%;
  flex: 1;
  min-height: 140px;
  padding: 16px 12px 12px 46px !important;
  background-color: var(--bl-yellow) !important;
  background-image:
    linear-gradient(90deg, transparent 39px, var(--bl-spine) 39px, var(--bl-spine) 41px, transparent 41px),
    linear-gradient(var(--bl-rule) 1px, transparent 1px);
  background-position: 0 0, 0 1.1em;
  background-size: 100% 100%, 100% 1.5em;
  line-height: 1.5em !important;
  font-size: 15px;
  font-family: 'Nanum Gothic', sans-serif;
  border: 1px solid var(--bl-rule);
  border-radius: 10px;
  outline: none;
  resize: none;
  box-sizing: border-box;
  transition: .12s;
}

.bl-textarea:focus {
  box-shadow: 0 0 0 2px var(--bl-brand-100);
  border-color: #BFDBFE;
}

.bl-textarea:disabled { opacity: .6; cursor: not-allowed; background-color: #f9f9f9 !important; }

.bl-char-count {
  text-align: right;
  font-size: 12px;
  color: var(--bl-muted);
  margin-top: 2px;
}

/* 제출 버튼 */
.bl-submit {
  width: 100%;
  border: none;
  background: var(--bl-brand);
  color: #fff;
  border-radius: 12px;
  padding: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: .15s;
  margin-top: auto;
}

.bl-submit:hover { filter: brightness(0.95); }
.bl-submit:active { transform: scale(.99); }
.bl-submit.is-disabled { background: #333; cursor: not-allowed; opacity: .7; }

/* ===== [섹션 B] 게시물 목록 ===== */
.bl-list-section {
  margin-bottom: 20px;
}

.bl-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.bl-list-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.bl-page-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bl-page-btn {
  border: 1px solid var(--bl-border);
  border-radius: 8px;
  padding: 6px 12px;
  background: var(--bl-panel);
  font-size: 14px;
  cursor: pointer;
  transition: .12s;
  color: var(--bl-text);
}

.bl-page-btn:hover { background: #f3f4f6; }
.bl-page-btn:disabled { opacity: .4; cursor: not-allowed; }
.bl-page-btn.active { background: var(--bl-brand); color: #fff; border-color: var(--bl-brand); }

.bl-page-info {
  font-size: 13px;
  color: var(--bl-muted);
  white-space: nowrap;
}

/* Masonry 그리드 */
.bl-masonry {
  column-count: 3;
  column-gap: 16px;
}

.bl-masonry.cols-1 { column-count: 1; }
.bl-masonry.cols-2 { column-count: 2; }
.bl-masonry.cols-3 { column-count: 3; }
.bl-masonry.cols-4 { column-count: 4; }

/* 게시물 카드 - 노트 스타일 */
.bl-post-card {
  break-inside: avoid;
  margin-bottom: 16px;
  width: 100%;
  padding: 16px 12px 40px 46px !important;
  background-color: var(--bl-yellow) !important;
  background-image:
    linear-gradient(90deg, transparent 39px, var(--bl-spine) 39px, var(--bl-spine) 41px, transparent 41px),
    linear-gradient(var(--bl-rule) 1px, transparent 1px);
  background-position: 0 0, 0 1.1em;
  background-size: 100% 100%, 100% 1.5em;
  line-height: 1.5em !important;
  font-size: 15px;
  border: 1px solid var(--bl-rule);
  border-radius: 10px;
  position: relative;
  box-shadow: 2px 2px 6px rgba(0,0,0,.06);
  transition: transform .15s, box-shadow .15s;
}

.bl-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 12px rgba(0,0,0,.1);
}

/* 카드 상단 메타 */
.bl-post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.bl-post-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #ddd;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.bl-post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bl-post-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--bl-text);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bl-post-date {
  font-size: 11px;
  color: var(--bl-muted);
  margin-left: auto;
  white-space: nowrap;
}

/* 카드 본문 */
.bl-post-content {
  font-size: 14px;
  color: var(--bl-text);
  white-space: pre-wrap;
  word-break: break-all;
  text-align: justify;
  /* line-height: 1.5em; */
  margin-top: 14px;
}

/* 카드 하단 버튼 */
.bl-post-btns {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  z-index: 2;
}

.bl-post-edit,
.bl-post-del {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  transition: .12s;
}

.bl-post-edit { color: #007bff; }
.bl-post-del  { color: #ff5a5a; }

.bl-post-edit:hover { background: var(--bl-brand); color: #fff; border-color: var(--bl-brand); }
.bl-post-del:hover  { background: #ef4444; color: #fff; border-color: #ef4444; }

/* 관리자 시간 수정 버튼 */
.bl-time-edit {
  font-size: 12px;
  color: #bbb;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-left: 2px;
}
.bl-time-edit:hover { color: var(--bl-brand); }

/* 비어있을 때 */
.bl-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background-color: var(--bl-yellow) !important;
  background-image:
    linear-gradient(90deg, transparent 39px, var(--bl-spine) 39px, var(--bl-spine) 41px, transparent 41px),
    linear-gradient(var(--bl-rule) 1px, transparent 1px);
  background-position: 0 0, 0 1.1em;
  background-size: 100% 100%, 100% 1.5em;
  line-height: 1.5em !important;
  border: 1px solid var(--bl-rule);
  border-radius: 10px;
  font-size: 16px;
  color: var(--bl-muted);
}

/* ===== [섹션 C] 더보기 버튼 ===== */
.bl-more-section {
  text-align: center;
  padding: 10px 0 30px;
}

.bl-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border: 2px solid var(--bl-brand);
  border-radius: 999px;
  background: var(--bl-panel);
  color: var(--bl-brand);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s;
}

.bl-more-btn:hover {
  background: var(--bl-brand);
  color: #fff;
}

.bl-more-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  border-color: var(--bl-border);
  color: var(--bl-muted);
}

/* ===== 모달 ===== */
.bl-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

.bl-modal.show { display: flex; }

.bl-modal-dlg {
  width: min(640px, 94vw);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow-y: auto;
}

.bl-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--bl-border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.bl-modal-head h3 { margin: 0; font-size: 18px; }

.bl-modal-close {
  border: 0;
  background: #f3f4f6;
  border-radius: 10px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 16px;
}

.bl-modal-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }

.bl-modal-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--bl-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bl-set-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.bl-set-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--bl-muted);
}

.bl-set-input,
.bl-set-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--bl-border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  transition: .12s;
}

.bl-set-input:focus, .bl-set-select:focus {
  border-color: var(--bl-brand);
  box-shadow: 0 0 0 2px var(--bl-brand-100);
}

.bl-set-divider {
  border: 0;
  border-top: 1px dashed var(--bl-border);
  margin: 4px 0;
}

.bl-radio-group {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.bl-radio-group label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  cursor: pointer;
}

.bl-radio-group input[type="radio"] {
  display: inline-block !important;
  appearance: auto !important;
  -webkit-appearance: radio !important;
  width: 15px !important;
  height: 15px !important;
  margin: 0 !important;
  cursor: pointer !important;
}

.bl-btn {
  border: 1px solid var(--bl-border);
  background: var(--bl-panel);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: .12s;
}

.bl-btn:hover { background: #f3f4f6; }

.bl-btn-primary {
  background: var(--bl-brand);
  color: #fff;
  border-color: var(--bl-brand);
}

.bl-btn-primary:hover { filter: brightness(0.9); background: var(--bl-brand); }

.bl-btn-success {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
}

.bl-btn-success:hover { filter: brightness(0.9); background: #28a745; }

.bl-hint {
  font-size: 11px;
  color: #aaa;
  margin: 4px 0 0;
}

/* ===== 수정 모달 ===== */
#bl-editModal .bl-modal-dlg {
  max-width: 520px;
}

/* ===== 접근 차단 화면 ===== */
.bl-access-denied {
  text-align: center;
  padding: 80px 20px;
}

.bl-access-denied .icon { font-size: 60px; margin-bottom: 20px; }
.bl-access-denied h2 { font-size: 22px; margin-bottom: 10px; }
.bl-access-denied p { color: var(--bl-muted); margin-bottom: 24px; }

.bl-login-btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--bl-brand);
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: .15s;
}

.bl-login-btn:hover { filter: brightness(0.9); }

/* ===== 반응형 ===== */
@media (max-width: 900px) {
  .bl-top-section { flex-direction: column; }
  .bl-profile-panel, .bl-write-panel { width: 100%; flex: none; }
  .bl-masonry { column-count: 2 !important; }
}

@media (max-width: 500px) {
  .bl-masonry { column-count: 1 !important; }
  .bl-set-grid { grid-template-columns: 1fr 1fr; }
  .bl-list-header { flex-direction: column; align-items: flex-start; }

  /* 달력 전체: 세로 적층 */
  .booklog-wrap .bl-cal-wrap2 {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  /* 년/월 + ◀▶: 가로 한 줄, 양끝 정렬 */
  .booklog-wrap .bl-cal-ym-nav {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 16px !important;
    gap: 8px !important;
    min-width: unset !important;
  }

  /* ◀▶ 버튼 가로 나란히 */
  .booklog-wrap .bl-cal-nav-row {
    flex-direction: row !important;
    gap: 6px !important;
  }

  /* 날짜 그리드: 여백 확대 */
  .booklog-wrap .bl-cal-grid {
    padding: 10px 8px !important;
    gap: 5px !important;
  }

  /* 날짜 셀 크기 */
  .booklog-wrap .bl-cal-date span {
    height: 24px !important;
    line-height: 24px !important;
    width: 24px !important;
  }

  /* 마감일 + D-xx: 가로 한 줄 */
  .booklog-wrap .bl-cal-dday {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 10px 16px !important;
  }

  .booklog-wrap .bl-cal-dday .dday-label {
    font-size: 13px !important;
  }

  .booklog-wrap .bl-cal-dday .dday-val {
    font-size: 18px !important;
    padding: 3px 12px !important;
  }

  /* BOOK LOG 배너 상단 여백 */
  .booklog-wrap .bl-brand-banner {
    padding-top: 50px !important;
    padding-bottom: 70px !important;
  }
}

/* ===== 로딩 스피너 ===== */
.bl-loading {
  text-align: center;
  padding: 40px;
  color: var(--bl-muted);
  font-size: 14px;
}

/* ===== 스크롤바 ===== */
.bl-modal-dlg::-webkit-scrollbar { width: 6px; }
.bl-modal-dlg::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 6px; }


/* 그누보드 전역 input 스타일 충돌 방지 */
.booklog-wrap input[type="checkbox"],
.booklog-wrap input[type="radio"] {
  position: relative !important;
  display: inline-block !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;
}

/* =========================================================
   추가 컴포넌트 스타일
   ========================================================= */

/* ── 달력 ── */
.bl-mini-cal { margin-bottom: 6px; }

/* 전체 래퍼: 가로 한 줄, 패딩 없이 구역별 배경으로 구분 */
.bl-cal-wrap2 {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--bl-border);
  border-radius: 10px;
  overflow: hidden;
}

/* 왼쪽: 년.월 + ◀▶ — 배경색 구분, PC에서 더 넓게 */
.bl-cal-ym-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 22px;
  background: var(--bl-brand);
  min-width: 100px;
}

.bl-cal-ym {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: .02em;
}

.bl-cal-nav-row {
  display: flex;
  gap: 6px;
}

.bl-cal-nav {
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.15);
  cursor: pointer;
  font-size: 8px;
  color: #fff;
  padding: 4px 7px;
  border-radius: 5px;
  line-height: 1.3;
  transition: .12s;
}
.bl-cal-nav:hover {
  background: rgba(255,255,255,.35);
}

/* 가운데: 날짜 2줄 그리드 */
.bl-cal-grid {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  padding: 8px 6px;
  background: #f9fafb;
}

.bl-cal-row {
  display: flex;
  gap: 1px;
}

.bl-cal-cell { flex: 1; text-align: center; }

.bl-cal-date {
  font-size: 11px;
  color: var(--bl-text);
  cursor: default;
}
.bl-cal-date span {
  display: block;
  height: 20px;
  line-height: 20px;
  width: 20px;
  border-radius: 50%;
  margin: 0 auto;
}

.bl-cal-date.sun { color: #ef4444; }
.bl-cal-date.sat { color: #3b82f6; }

/* 글 쓴 날 */
.bl-cal-date.has-post span {
  background: var(--bl-brand);
  color: #fff;
  font-weight: 700;
}
.bl-cal-date.sun.has-post span { background: #ef4444; color: #fff; }
.bl-cal-date.sat.has-post span { background: #3b82f6; color: #fff; }

/* 오늘 — 굵게만 */
.bl-cal-date.is-today span { font-weight: 900; }
.bl-cal-date.is-today.has-post span {
  font-weight: 900;
  outline: 2px solid rgba(0,0,0,.2);
  outline-offset: -1px;
}

.bl-cal-date.empty { visibility: hidden; }

/* 오른쪽: 마감일 — 배경색 구분 */
.bl-cal-dday {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 3px;
  padding: 8px 18px;
  background: #fff5f5;
  line-height: 1.5;
}
.bl-cal-dday .dday-label {
  font-size: 11px;
  color: #ef4444;
  font-weight: 600;
  line-height: 1.5;
}
.bl-cal-dday .dday-val {
  font-size: 18px;
  font-weight: 900;
  color: #ef4444;
  border: 2px solid #ef4444;
  border-radius: 6px;
  padding: 2px 10px;
  line-height: 1.5;
  white-space: nowrap;
  background: #fff;
}

/* ── 인라인 수정 패널 ── */
.bl-edit-panel {
  margin-bottom: 24px;
}

.bl-edit-panel-inner {
  background: var(--bl-panel);
  border: 2px solid var(--bl-brand);
  border-radius: var(--bl-radius);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(99,91,255,.12);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bl-edit-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  color: var(--bl-brand);
}

.bl-edit-cancel-btn {
  border: 1px solid var(--bl-border);
  background: var(--bl-panel);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--bl-muted);
  transition: .12s;
}
.bl-edit-cancel-btn:hover { background: #f3f4f6; color: var(--bl-text); }

/* 관리자 전용 수정 옵션 */
.bl-edit-admin-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid var(--bl-border);
  border-radius: 10px;
}

.bl-edit-admin-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.bl-edit-pick-row { gap: 8px; }

.bl-edit-pick-input {
  border: 1px solid var(--bl-border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 13px;
  width: 130px;
  outline: none;
}
.bl-edit-pick-input:focus { border-color: var(--bl-brand); }

.bl-edit-pick-color {
  width: 36px;
  height: 30px;
  border: 1px solid var(--bl-border);
  border-radius: 6px;
  cursor: pointer;
  padding: 2px;
}

.bl-edit-textarea {
  min-height: 160px;
  height: 160px;
}

.bl-edit-panel-foot {
  display: flex;
  justify-content: flex-end;
}

/* ── 게시물 카드: 좋아요 / 공지 / PICK 영역 ── */
.bl-post-card {
  position: relative;
  padding-left: 52px !important; /* 세로 배지 공간 */
}

/* 빨간 세로선 (notebook spine과 구분) */
.bl-post-card::before {
  content: '';
  position: absolute;
  left: 40px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--bl-spine);
  border-radius: 1px;
}

/* PICK 세로 배지 */
.bl-pick-side {
  position: absolute;
  left: 0;
  top: 12px;
  width: 36px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  padding: 6px 2px;
  border-radius: 0 6px 6px 0;
  text-align: center;
  letter-spacing: .05em;
  max-height: 80px;
  overflow: hidden;
}

/* 공지 세로 배지 (PICK 없을 때) */
.bl-pin-side {
  position: absolute;
  left: 2px;
  top: 10px;
  width: 32px;
  text-align: center;
  font-size: 14px;
}

/* 공지 카드 강조 */
.bl-post-card.is-pinned {
  box-shadow: 0 0 0 2px var(--bl-brand), 2px 2px 10px rgba(99,91,255,.15);
}

.bl-pin-badge {
  font-size: 12px;
  margin-right: 4px;
}

/* 게시물 하단 버튼 행 */
.bl-post-btns {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.bl-post-actions {
  display: flex;
  gap: 4px;
}

/* 좋아요 버튼 */
.bl-like-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  border: 1px solid #fca5a5;
  background: #fff;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: .15s;
  color: #999;
}
.bl-like-btn:hover:not(:disabled) { background: #fff0f0; border-color: #ef4444; color: #ef4444; }
.bl-like-btn.liked { background: #fff0f0; border-color: #ef4444; color: #ef4444; font-weight: 700; }
.bl-like-btn:disabled { opacity: .5; cursor: not-allowed; }

.bl-like-cnt { font-size: 12px; font-weight: 600; }

/*-------------------------- 리빌더와 충돌해 추가함 ONWEB 2026.04.27 -------------------------*/
.booklog-wrap input[type="checkbox"], input[type="radio"] {
position: relative; !important; 

/* ── 자동저장 상태 표시 ── */
.bl-autosave-status {
  margin-left: 10px;
  font-size: 11px;
  font-weight: 500;
  transition: color .3s, opacity .3s;
  vertical-align: middle;
}
