/* ============================================================
   style.css - 홍보 웹사이트 전체 스타일
   베이지/브라운 테마, 반응형 (모바일 + PC 동일 DOM)
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── 검색엔진(SEO) 크롤러 및 웹접근성(스크린리더) 전용 숨김 스타일 ── */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ── Lucide / Inline SVG 아이콘 ── */
.lc-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.nav-icon .lc-icon    { width: 22px; height: 22px; }
.nav-icon [data-lucide] { width: 22px; height: 22px; }
[data-lucide] {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
svg[data-lucide] {
  display: inline-block;
  vertical-align: middle;
}
.icon [data-lucide]   { width: 18px; height: 18px; }
.bottom-nav-item [data-lucide] { width: 22px; height: 22px; }
.mobile-header-btn [data-lucide] { width: 22px; height: 22px; }
.post-action-btn [data-lucide]   { width: 18px; height: 18px; }
.post-more-btn [data-lucide]     { width: 18px; height: 18px; }
.write-section-title [data-lucide] { width: 18px; height: 18px; }
.profile-contact-item [data-lucide] { width: 15px; height: 15px; }
.profile-tab [data-lucide] { width: 16px; height: 16px; }

/* 로고 아이콘 */
.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: transparent;
  flex-shrink: 0;
}
.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── CSS Variables ── */
:root {
  --bg:            #FAF8F4;
  --bg-2:          #F5F0E8;
  --bg-3:          #EDE8DC;
  --bg-4:          #E5DDD0;
  --border:        #D4C5A9;
  --border-light:  #E8E0D0;
  --accent:        #8B6E4F;
  --accent-dark:   #6B5040;
  --accent-light:  #C4B49A;
  --accent-pale:   #F0EAE0;
  --text:          #3D2B1F;
  --text-2:        #7A6553;
  --text-3:        #A89880;
  --white:         #FFFFFF;
  --error:         #C0392B;
  --success:       #27AE60;
  --info:          #2980B9;

  --sidebar-w:     240px;
  --right-w:       300px;
  --feed-w:        640px;
  --header-h:      56px;
  --bottom-nav-h:  60px;

  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --radius-full:   9999px;

  --shadow-sm:     0 1px 4px rgba(61,43,31,.08);
  --shadow-md:     0 4px 16px rgba(61,43,31,.12);
  --shadow-lg:     0 8px 32px rgba(61,43,31,.16);

  --trans:         .2s ease;
  --font:          'Noto Sans KR', 'Inter', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-y: scroll !important; scrollbar-gutter: stable; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-light); }

/* ================================================================
   LAYOUT
   ================================================================ */

/* 앱 래퍼 */
.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* ── 사이드바 (PC) ── */
.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  background: var(--white);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--trans);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  cursor: pointer;
}
.sidebar-logo img {
  height: 38px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
}
.sidebar-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: -0.5px;
}
.sidebar-logo-sub { font-size: 11px; color: var(--text-3); margin-top: -2px; }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.auth-only-menu, .auth-only-nav { display: none; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 400;
  transition: background var(--trans), color var(--trans);
  cursor: pointer;
  white-space: nowrap;
}
.nav-item:hover { background: var(--bg-2); color: var(--text); }
.nav-item.active { background: var(--accent-pale); color: var(--accent-dark); font-weight: 600; }
.nav-item .nav-icon { font-size: 22px; width: 24px; text-align: center; flex-shrink: 0; }
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
  padding: 2px 7px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  margin-top: 8px;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--trans);
}
.sidebar-user:hover { background: var(--bg-2); }
.sidebar-user-avatar {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border);
}
.sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.sidebar-user-handle { font-size: 12px; color: var(--text-3); }

/* ── 메인 콘텐츠 영역 ── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 16px;
  padding: 0 16px;
}

.feed-area {
  width: 100%;
  max-width: var(--feed-w);
  padding: 20px 0 40px;
  flex-shrink: 0;
}

/* ── 우측 패널 (PC) ── */
.right-panel {
  width: var(--right-w);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 20px 0 40px;
  flex-shrink: 0;
}

/* ── 상단 헤더 (모바일) ── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 200;
}
.mobile-header-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-dark);
}
.mobile-header-actions { display: flex; gap: 12px; align-items: center; }
.mobile-header-btn {
  font-size: 22px;
  color: var(--text);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: background var(--trans);
}
.mobile-header-btn:hover { background: var(--bg-2); }
.mobile-header-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent);
  color: #FFFFFF !important;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(107, 80, 64, 0.25);
  transition: all var(--trans);
  white-space: nowrap;
}
.mobile-header-login-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}
.mobile-header-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-3);
  color: var(--text-2) !important;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--trans);
  white-space: nowrap;
}
.mobile-header-logout-btn:hover {
  background: var(--border-light);
  color: var(--text) !important;
}

/* ── 하단 네비게이션 (모바일) ── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: var(--white);
  border-top: 1px solid var(--border-light);
  align-items: center;
  justify-content: space-around;
  z-index: 200;
  padding: 0 8px;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  color: var(--text-3);
  font-size: 20px;
  cursor: pointer;
  transition: color var(--trans);
  position: relative;
}
.bottom-nav-item.active { color: var(--accent-dark); }
.bottom-nav-item .bottom-nav-label { font-size: 10px; }
.bottom-nav-item .nav-dot {
  position: absolute;
  top: 6px; right: 12px;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: var(--radius-full);
  border: 2px solid var(--white);
}

/* ================================================================
   COMPONENTS
   ================================================================ */

/* ── 카드 ── */
.card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* ── 버튼 ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--trans);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-pale); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-ghost:hover { background: var(--bg-2); color: var(--text); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-full { width: 100%; }
.btn-loading { pointer-events: none; opacity: 0.7; }

/* ── 입력 필드 ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-2);
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--trans), box-shadow var(--trans);
  outline: none;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,110,79,.12); background: var(--white); }
.form-input::placeholder { color: var(--text-3); }
.form-input.error { border-color: var(--error); }
.form-error { font-size: 12px; color: var(--error); }
.form-hint { font-size: 12px; color: var(--text-3); }

.form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-2);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: border-color var(--trans);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%238B6E4F' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,110,79,.12); background-color: var(--white); }

textarea.form-input { resize: vertical; min-height: 100px; }

/* ── 아바타 ── */
.avatar {
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
  background-color: var(--white);
}
.avatar-sm  { width: 32px;  height: 32px;  }
.avatar-md  { width: 44px;  height: 44px;  }
.avatar-lg  { width: 64px;  height: 64px;  }
.avatar-xl  { width: 88px;  height: 88px;  }
.avatar-xxl { width: 120px; height: 120px; }

.avatar-ring {
  padding: 0;
  background: transparent;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.avatar-ring .avatar { border: 1px solid var(--border-light); }

/* ── 배지/태그 ── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-3);
  color: var(--text-2);
  transition: background var(--trans);
}
.tag:hover { background: var(--border); }
.tag-accent { background: var(--accent-pale); color: var(--accent-dark); }
.tag-outline { background: transparent; border: 1px solid var(--border); }

/* ── 섹션 헤더 ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-title { font-size: 14px; font-weight: 700; color: var(--text); }
.section-action { font-size: 12px; font-weight: 600; color: var(--accent); cursor: pointer; }
.section-action:hover { color: var(--accent-dark); }

/* ── 구분선 ── */
.divider {
  height: 1px;
  background: var(--border-light);
  margin: 16px 0;
}

/* ── 로딩 스피너 ── */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: var(--radius-full);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

/* ── 스켈레톤 로딩 ── */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-2) 50%, var(--bg-3) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── 토스트 알림 ── */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--text);
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease forwards;
  pointer-events: all;
  white-space: nowrap;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--error); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateY(-10px); }
}

/* ── 모달 ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(61,43,31,.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans);
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--trans);
}
.modal-overlay.show .modal { transform: translateY(0); }

/* ── 기간 빠른 선택 버튼 (1주일, 1개월, 3개월) ── */
.period-quick-btn {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--trans);
}
.period-quick-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-1);
}
.period-quick-btn.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  box-shadow: 0 2px 4px rgba(107, 80, 64, 0.2);
}

/* ================================================================
   STORIES (스토리 원형)
   ================================================================ */
.stories-wrap {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.stories-wrap::-webkit-scrollbar { display: none; }
.stories-list {
  display: flex;
  gap: 16px;
  width: max-content;
}
.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.story-ring {
  width: 58px; height: 58px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  padding: 2.5px;
  transition: transform var(--trans);
}
.story-ring:hover { transform: scale(1.05); }
.story-ring.seen { background: linear-gradient(135deg, var(--bg-3), var(--border)); }
.story-ring img {
  width: 100%; height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--white);
  background-color: var(--white);
}
.story-name {
  font-size: 11px;
  color: var(--text-2);
  max-width: 58px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ================================================================
   POST CARD (게시글 카드)
   ================================================================ */
.post-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--trans);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.post-card:hover { box-shadow: var(--shadow-md); }

/* 포스트 헤더 */
.post-header {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  gap: 10px;
}
.post-header-info { flex: 1; min-width: 0; }
.post-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.post-hospital-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.post-hospital-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.post-hospital-name:hover { color: var(--accent); }
.post-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: wrap;
}
.post-meta-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 420px;
}
.post-book-category {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: #6B5040;
  background: #F4EFE6;
  padding: 1px 7px;
  border-radius: 10px;
  border: 1px solid #D4C5A9;
  flex-shrink: 0;
}
.post-book-publisher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: #5C6B73;
  background: #EAEFF2;
  padding: 1px 7px;
  border-radius: 10px;
  border: 1px solid #CAD6DC;
  flex-shrink: 0;
}
.post-book-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.post-book-author {
  font-size: 12px;
  color: var(--text-3);
}
.post-date { font-size: 11px; color: var(--text-3); margin-left: auto; }
.post-more-btn {
  color: var(--text-3);
  font-size: 18px;
  padding: 4px;
  border-radius: var(--radius-full);
  transition: background var(--trans), color var(--trans);
}
.post-more-btn:hover { background: var(--bg-2); color: var(--text); }

/* post-header 바로 아래 이벤트 기간 바 */
.post-period-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #FAF6F0;
  border-top: 1px solid #F0E8DD;
  border-bottom: 1px solid #F0E8DD;
  font-size: 12px;
  color: #6B5040;
  box-sizing: border-box;
  width: 100%;
}
.post-period-label {
  font-weight: 600;
  color: #6B5040;
  white-space: nowrap;
}
.post-period-dates {
  font-weight: 700;
  color: #1A1410;
  letter-spacing: -0.2px;
  white-space: nowrap;
}
.post-period-status {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1.5px 7px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}
.post-period-status.status-active {
  color: #059669;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
}
.post-period-status.status-ended {
  color: #6B7280;
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
}

/* 포스트 더보기 드롭다운 메뉴 */
.post-more-dropdown-wrap {
  position: relative;
  display: inline-block;
}
.post-more-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  min-width: 120px;
  z-index: 100;
  display: none;
  padding: 4px 0;
}
.post-more-menu.show {
  display: block;
}
.post-more-menu-item {
  width: 100%;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background var(--trans);
  white-space: nowrap;
}
.post-more-menu-item:hover {
  background: var(--bg-2);
}
.post-more-menu-item.danger {
  color: var(--error);
}
.post-more-menu-item.danger:hover {
  background: rgba(231,76,60,0.08);
}

/* 포스트 이미지 */
.post-image-wrap {
  position: relative;
  width: calc(100% - 28px);
  margin: 6px 14px 14px 14px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-3);
  border: 1px solid var(--border-light);
  box-sizing: border-box;
}
.post-image-wrap.vertical-poster {
  aspect-ratio: 9 / 14;
  max-height: 580px;
}
/* ── 세로형 긴 포스터 접기 / 펼치기 ── */
.post-image-wrap.is-tall-poster {
  aspect-ratio: auto !important;
  max-height: 480px;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.post-image-wrap.is-tall-poster > img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: top center;
}
.post-image-wrap.is-tall-poster .carousel-track {
  height: 480px;
}
.post-image-wrap.is-tall-poster .carousel-dots {
  bottom: 50px;
}
.post-image-wrap.is-tall-poster.expanded {
  max-height: 5000px;
}
.post-image-wrap.is-tall-poster.expanded > img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  display: block;
}
.post-image-wrap.is-tall-poster.expanded .carousel-track {
  height: auto;
  min-height: 480px;
  position: relative;
}
.post-image-wrap.is-tall-poster.expanded .post-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.post-image-wrap.is-tall-poster.expanded .post-slide.active {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  height: auto;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.post-image-wrap.is-tall-poster.expanded .post-slide img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  display: block;
}
.post-image-wrap.is-tall-poster.expanded .carousel-dots {
  bottom: 55px;
}
.post-image-wrap.is-tall-poster.expanded:hover img {
  transform: none;
}
.poster-expand-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, rgba(16, 12, 10, 0.82) 0%, rgba(16, 12, 10, 0.45) 55%, rgba(16, 12, 10, 0) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14px;
  z-index: 6;
  pointer-events: none;
  transition: all 0.3s ease;
}
.post-image-wrap.is-tall-poster.expanded .poster-expand-overlay {
  position: relative;
  height: auto;
  background: none;
  padding: 12px 0 6px 0;
  pointer-events: auto;
}
.poster-expand-btn {
  pointer-events: auto;
  background: rgba(26, 20, 16, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  transition: all 0.2s ease;
}
.poster-expand-btn:hover {
  background: #000000;
  border-color: rgba(255, 255, 255, 0.55);
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}
.post-image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius-md);
  transition: transform .4s ease;
  cursor: zoom-in;
}
.post-image-wrap:hover img { transform: scale(1.02); }

/* ── 포스트 이미지 슬라이더 (카루셀) ── */
.post-carousel-container {
  user-select: none;
}
.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.post-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}
.post-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}
.post-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius-md);
}

/* 화살표 버튼 */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: #1A1410;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  opacity: 0.85;
}
.carousel-btn:hover {
  background: #FFFFFF;
  opacity: 1;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

/* 카운터 배지 및 인디케이터 도트 */
.carousel-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.65);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
  letter-spacing: 0.5px;
}
.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 5px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 8px;
  border-radius: 10px;
  backdrop-filter: blur(4px);
}
.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.25s ease;
  cursor: pointer;
}
.carousel-dot.active {
  width: 14px;
  border-radius: 4px;
  background: #FFFFFF;
}

.vertical-poster-badge {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  background: rgba(61,43,31,.75); color: var(--white);
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600; backdrop-filter: blur(4px);
  display: flex; align-items: center; gap: 4px;
}

/* 포스트 본문 */
.post-body {
  padding: 12px 14px;
  width: 100%;
  box-sizing: border-box;
}

.post-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  width: 100%;
  box-sizing: border-box;
  word-break: break-word;
}

.post-content {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  white-space: pre-line;
  width: 100%;
  box-sizing: border-box;
  word-break: break-word;
  position: relative;
}

.post-content.is-clamped,
.post-content:not(.expanded) {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.post-content.expanded {
  display: block !important;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
  text-overflow: unset !important;
}

.post-content-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 5px;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.post-content-more-btn:hover {
  color: var(--accent-dark);
  background: var(--accent-pale);
}

.post-info-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.post-price {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-pale);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.post-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.post-tag {
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
}
.post-tag:hover { color: var(--accent-dark); text-decoration: underline; }

/* 포스트 액션 버튼 */
.post-actions {
  display: flex;
  align-items: center;
  padding: 8px 14px 10px;
  gap: 4px;
}
.post-action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--trans), color var(--trans);
}
.post-action-btn:hover { background: var(--bg-2); color: var(--text); }
.post-action-btn .icon { font-size: 18px; }

.post-action-btn.liked .icon { color: var(--error); }
.post-action-btn.liked { color: var(--error); }
.post-action-btn.saved .icon { color: var(--accent); }

.post-action-btn.like-btn:active { animation: heartPop .2s ease; }
@keyframes heartPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.post-likes {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-3);
}

/* ================================================================
   PACKAGE ITEM BOX (10종 패키지 혜택 세부 시술 표)
   ================================================================ */
.pkg-box {
  margin: 12px 0;
  background: #F8F5EE;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}
.pkg-box-header {
  font-weight: 700;
  font-size: 13px;
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 6px;
}
.pkg-box-title {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pkg-box-title .lc-icon,
.pkg-box-title svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}
.pkg-box-badge {
  font-size: 10.5px;
  color: var(--error);
  font-weight: 700;
  background: #FDEDEC;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.pkg-list-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pkg-more-btn {
  width: 100%;
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.pkg-more-btn:hover {
  background: var(--border-light);
  border-color: var(--accent);
  color: var(--accent);
}
.pkg-item-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  font-size: 12px;
  gap: 6px 10px;
}
.pkg-item-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 150px;
  word-break: break-word;
}
.pkg-item-num {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}
.pkg-item-name {
  line-height: 1.35;
  flex: 1;
}
.pkg-item-count {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-pale);
  border: 1px solid var(--border-light);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.pkg-item-gender {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
  background: var(--bg-2);
  border: 1px solid var(--border-light);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.pkg-item-gender.gender-female {
  color: #DB2777;
  background: #FDF2F8;
  border-color: #FBCFE8;
}
.pkg-item-gender.gender-male {
  color: #2563EB;
  background: #EFF6FF;
  border-color: #BFDBFE;
}
.pkg-item-gender.gender-all {
  color: #78716C;
  background: #F5F5F4;
  border-color: #E7E5E4;
}
.pkg-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
.pkg-item-nprice {
  text-decoration: line-through;
  color: var(--text-3);
  font-size: 11px;
}
.pkg-item-eprice {
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 12.5px;
}
.pkg-item-discount {
  background: var(--error);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  white-space: nowrap;
}

/* 혜택 세부 시술 표 내 구분선 / 소제목 행 스타일 */
.pkg-divider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-pale, #FAF6F0);
  border: 1px solid #E8DFD1;
  border-left: 3.5px solid var(--accent);
  padding: 6px 10px;
  border-radius: 6px;
  margin-top: 5px;
  margin-bottom: 3px;
}
.pkg-divider-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 11px;
}
.pkg-divider-title {
  font-size: 12.5px;
  font-weight: 750;
  color: var(--accent-dark, #5C3D2E);
  letter-spacing: -0.2px;
}

/* 관리자 엑셀 그리드 구분선 행 스타일 */
.excel-divider-tr {
  background: #FDFBF7 !important;
  border-top: 1.5px solid var(--accent-light, #D4C5A9);
  border-bottom: 1.5px solid var(--accent-light, #D4C5A9);
}
.excel-divider-tr:hover {
  background: #F8F3EA !important;
}
.excel-divider-tr .row-divider-text:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(160, 114, 82, 0.15) !important;
}

/* ================================================================
   RIGHT PANEL - 이달의 인기 감상문
   ================================================================ */
.right-panel-section { margin-bottom: 24px; }

.suggested-list { display: flex; flex-direction: column; gap: 6px; }
.suggested-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background-color var(--trans), opacity var(--trans);
}
.suggested-item:hover {
  background-color: var(--bg-2);
  opacity: 0.95;
}
.popular-rank-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 800;
  flex-shrink: 0;
}
.popular-rank-badge.rank-1 {
  background: linear-gradient(135deg, #FFB800, #E08A00);
  color: #FFFFFF;
  box-shadow: 0 2px 4px rgba(224, 138, 0, 0.3);
}
.popular-rank-badge.rank-2 {
  background: linear-gradient(135deg, #B0BEC5, #78909C);
  color: #FFFFFF;
  box-shadow: 0 2px 4px rgba(120, 144, 156, 0.3);
}
.popular-rank-badge.rank-3 {
  background: linear-gradient(135deg, #D7A172, #A06535);
  color: #FFFFFF;
  box-shadow: 0 2px 4px rgba(160, 101, 53, 0.3);
}
.popular-rank-badge.rank-other {
  background: var(--bg-3);
  color: var(--text-3);
  font-weight: 600;
}
.popular-book-thumb {
  width: 36px;
  height: 48px;
  border-radius: 4px;
  overflow: hidden;
  background: #F0EBE1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.popular-book-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.suggested-item-info { flex: 1; min-width: 0; }
.suggested-item-name { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggested-item-sub  { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.popular-book-likes {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 700;
  color: #E05670;
  flex-shrink: 0;
}

.right-panel-footer {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.8;
  margin-top: 20px;
}
.right-panel-footer a { color: var(--text-3); }
.right-panel-footer a:hover { text-decoration: underline; }

/* ================================================================
   FILTER BAR (피드 필터)
   ================================================================ */
/* ================================================================
   FILTER PANEL (구조화된 고급 맞춤 필터)
   ================================================================ */
.filter-panel {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.filter-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.filter-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  flex: 1;
  min-width: 160px;
  transition: border-color var(--trans);
}
.filter-search-box:focus-within {
  border-color: var(--accent);
  background: var(--white);
}
.filter-search-box input {
  border: none;
  background: none;
  font-size: 13px;
  color: var(--text);
  outline: none;
  width: 100%;
}
.filter-search-box input::placeholder { color: var(--text-3); }

.filter-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-3);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--trans);
  white-space: nowrap;
}
.filter-reset-btn:hover {
  background: var(--border);
  color: var(--text);
}

.filter-grid-wrap {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-5 { grid-column: span 5; }
.col-span-6 { grid-column: span 6; }
.col-span-7 { grid-column: span 7; }
.col-span-12 { grid-column: span 12; }

.filter-group-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: -0.2px;
}

.filter-select {
  width: 100%;
  padding: 7px 28px 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='%238B6E4F' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color var(--trans), background-color var(--trans);
}
.filter-select:hover {
  border-color: var(--accent-light);
}
.filter-select:focus {
  border-color: var(--accent);
  background-color: var(--white);
}

.filter-input {
  width: 100%;
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  outline: none;
  background-image: none;
  transition: border-color var(--trans), background-color var(--trans);
}
.filter-input:hover {
  border-color: var(--accent-light);
}
.filter-input:focus {
  border-color: var(--accent);
  background-color: var(--white);
}

/* ================================================================
   UNIFIED SINGLE-CONDITION SEARCH BAR (대규모 사이트형 단일 조건 통합 검색)
   ================================================================ */
.search-category-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.search-category-tabs::-webkit-scrollbar {
  display: none;
}

.search-cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.search-cat-tab:hover {
  background: var(--bg-3);
  color: var(--accent);
  border-color: var(--accent-light);
}
.search-cat-tab.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(139, 110, 79, 0.25);
}
.search-cat-tab.active i {
  color: var(--white) !important;
}

.unified-search-bar {
  display: flex;
  align-items: stretch;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
}
.unified-search-bar:focus-within {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(139, 110, 79, 0.12);
}

.unified-search-type-wrapper {
  position: relative;
  border-right: 1px solid var(--border-light);
  background: var(--bg-3);
  flex-shrink: 0;
}
.unified-search-type-select {
  border: none;
  background: transparent;
  padding: 10px 28px 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%238B6E4F' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  height: 100%;
}

.unified-search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  padding: 0 12px;
}
.unified-search-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  padding: 9px 0;
  font-family: inherit;
}
.unified-search-input::placeholder {
  color: var(--text-3);
}

.unified-category-select {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  padding: 9px 24px 9px 0;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%238B6E4F' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
}

.search-input-clear-btn {
  border: none;
  background: var(--border);
  color: var(--text-2);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin-left: 6px;
  flex-shrink: 0;
  transition: background 0.15s;
}
.search-input-clear-btn:hover {
  background: var(--text-3);
  color: var(--white);
}

.unified-search-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 18px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  border: none;
}

.active-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  background: rgba(139, 110, 79, 0.06);
  border: 1px solid rgba(139, 110, 79, 0.18);
  border-radius: var(--radius-md);
  font-size: 12.5px;
}
.active-filter-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.active-filter-prefix {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--text-2);
  font-size: 12px;
}
.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.chip-type {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(139, 110, 79, 0.1);
  padding: 1px 6px;
  border-radius: 10px;
}
.chip-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.chip-remove-btn {
  border: none;
  background: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.15s;
}
.chip-remove-btn:hover {
  color: #e53935;
}
.active-filter-reset-btn {
  border: none;
  background: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: color 0.15s;
}
.active-filter-reset-btn:hover {
  color: var(--text);
}

@media (max-width: 600px) {
  .unified-search-type-select {
    padding: 8px 20px 8px 8px;
    font-size: 12px;
  }
  .unified-search-input {
    font-size: 12.5px;
    padding: 8px 0;
  }
  .unified-category-select {
    font-size: 12.5px;
    padding: 8px 20px 8px 0;
  }
  .unified-search-submit-btn span {
    display: none;
  }
  .unified-search-submit-btn {
    padding: 0 12px;
  }
}

@media (max-width: 768px) {
  html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  .filter-panel {
    padding: 12px 10px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .filter-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .filter-header-row > div[style*="display:flex"] {
    width: 100%;
    justify-content: flex-end;
  }
  .filter-search-box {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }
  .filter-select {
    min-width: 0;
    font-size: 12px;
    padding: 6px 18px 6px 6px;
    box-sizing: border-box;
    text-overflow: ellipsis;
  }
  .filter-grid-wrap {
    grid-template-columns: repeat(12, 1fr);
    gap: 8px 6px;
  }
  .filter-grid-wrap .filter-group {
    grid-column: span 12 !important;
  }
  .filter-group div[style*="display:flex"] {
    gap: 4px !important;
    flex-wrap: wrap !important;
  }
  .filter-group div[style*="display:flex"] > select {
    min-width: 0 !important;
    flex: 1 1 30% !important;
  }
  .filter-group input[type="date"] {
    min-width: 0;
    flex: 1;
    font-size: 11px;
    padding: 4px;
    box-sizing: border-box;
  }
  .filter-action-btns {
    margin-left: 0 !important;
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}
@media (max-width: 480px) {
  .filter-panel { padding: 12px 10px; }
  .filter-grid-wrap .filter-group { grid-column: span 12; }
  .filter-select { font-size: 12px; padding-left: 6px; }
  .filter-group div[style*="display:flex"] > select {
    flex: 1 1 100% !important;
  }
}

/* ================================================================
   PROFILE PAGE
   ================================================================ */
.profile-page {
  width: 100%;
  max-width: 760px;
  margin: 0;
  padding: 20px 0 60px;
  box-sizing: border-box;
}

.profile-header {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.profile-avatar-wrap { flex-shrink: 0; }
.profile-avatar-wrap .avatar-ring { cursor: pointer; }

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

.profile-username-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.profile-username { font-size: 22px; font-weight: 400; color: var(--text); }
.profile-verified { color: var(--info); font-size: 18px; }

.profile-stats-row {
  display: flex;
  gap: 28px;
  margin-bottom: 14px;
}
.profile-stat { text-align: center; }
.profile-stat-num { font-size: 16px; font-weight: 700; color: var(--text); display: block; }
.profile-stat-label { font-size: 12px; color: var(--text-3); }

.profile-bio-section { margin-bottom: 14px; }
.profile-hospital-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.profile-bio { font-size: 13px; color: var(--text-2); margin-bottom: 8px; line-height: 1.6; }

.profile-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.profile-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--bg-2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}
.profile-contact-item .icon { color: var(--accent); font-size: 15px; }
.profile-contact-item a { color: var(--accent); font-weight: 500; }
.profile-contact-item a:hover { text-decoration: underline; }

.profile-specialty-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  background: var(--accent);
  color: var(--white);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* 프로필 탭 */
.profile-tabs {
  display: flex;
  border-top: 1px solid var(--border-light);
  margin-bottom: 16px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tab {
  flex: 1 1 0;
  width: 33.333%;
  min-width: 0;
  text-align: center;
  padding: 14px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  border-top: 2px solid transparent;
  margin-top: -1px;
  transition: color var(--trans), border-color var(--trans);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.profile-tab.active { color: var(--text); border-top-color: var(--text); }
.profile-tab:hover { color: var(--text-2); }

/* 프로필 그리드 */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  position: relative;
  min-height: 200px;
}
.profile-grid-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-3);
}
.profile-grid-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.profile-grid-item:hover img { transform: scale(1.05); }
.profile-grid-item-overlay {
  position: absolute; inset: 0;
  background: rgba(61,43,31,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  transition: opacity var(--trans);
}
.profile-grid-item:hover .profile-grid-item-overlay { opacity: 1; }
.profile-grid-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
}

/* ================================================================
   AUTH PAGES (로그인, 회원가입, 비밀번호찾기)
   ================================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.auth-container {
  width: 100%;
  max-width: 860px;
  display: flex;
  gap: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}

.auth-visual {
  width: 420px;
  flex-shrink: 0;
  background: linear-gradient(145deg, #FBF8F3 0%, #F4ECE1 60%, #EADECF 100%);
  border-right: 1px solid var(--border-light);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-visual::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  background: rgba(139, 115, 85, 0.06);
  border-radius: var(--radius-full);
}
.auth-visual::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 220px; height: 220px;
  background: rgba(139, 115, 85, 0.05);
  border-radius: var(--radius-full);
}
.auth-visual-logo {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
  margin-bottom: 12px;
  position: relative; z-index: 1;
}
.auth-visual-sub { font-size: 15px; color: var(--text-2); font-weight: 600; margin-bottom: 40px; position: relative; z-index: 1; }
.auth-visual-features { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; }
.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 600;
  font-size: 13.5px;
}
.auth-feature-icon-wrap, .auth-feature-item .feature-icon {
  width: 38px; height: 38px;
  background: var(--accent-dark);
  color: #ffffff;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(61, 43, 31, 0.15);
}

.auth-form-wrap {
  flex: 1;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}
.auth-form-header { margin-bottom: 28px; }
.auth-form-title { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.auth-form-sub { font-size: 14px; color: var(--text-3); }

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1;
  height: 1px; background: var(--border-light);
}
.auth-divider-text { font-size: 12px; color: var(--text-3); white-space: nowrap; }

.auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-3);
}
.auth-links a { color: var(--accent); font-weight: 600; }
.auth-links a:hover { color: var(--accent-dark); text-decoration: underline; }

/* 비밀번호 입력 래퍼 */
.password-wrap { position: relative; }
.password-wrap .form-input { padding-right: 44px; }
.password-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}
.password-toggle:hover { color: var(--text); }

/* 회원가입 단계 */
.signup-steps {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
}
.signup-step {
  height: 4px;
  flex: 1;
  background: var(--bg-3);
  border-radius: var(--radius-full);
  transition: background .3s ease;
}
.signup-step.done,
.signup-step.active { background: var(--accent); }

.signup-step-label {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 20px;
}
.signup-step-label span { color: var(--accent); font-weight: 600; }

/* ================================================================
   WRITE PAGE (게시글 작성)
   ================================================================ */
.write-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

.write-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.write-title { font-size: 20px; font-weight: 700; color: var(--text); }

.write-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.write-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}
.write-section:last-child { border-bottom: none; }

.write-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.write-section-title .icon { color: var(--accent); font-size: 16px; }

/* 이미지 업로드 */
.image-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--trans);
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
.image-upload-area:hover { border-color: var(--accent); background: var(--accent-pale); }
.image-upload-area.drag-over { border-color: var(--accent); background: var(--accent-pale); }
.upload-icon { font-size: 40px; margin-bottom: 10px; color: var(--accent-light); }
.upload-text { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.upload-hint { font-size: 12px; color: var(--text-3); }
#image-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.image-preview-wrap {
  position: relative;
  margin-top: 12px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: none;
}
.image-preview-wrap img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}
.image-preview-remove {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,.6);
  color: var(--white);
  border-radius: var(--radius-full);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--trans);
}
.image-preview-remove:hover { background: rgba(0,0,0,.8); }

/* 필터 그리드 */
.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* 태그 입력 */
.tags-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-2);
  min-height: 48px;
  cursor: text;
  transition: border-color var(--trans);
}
.tags-input-wrap:focus-within { border-color: var(--accent); background: var(--white); }
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-pale);
  color: var(--accent-dark);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
}
.tag-chip-remove {
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: var(--accent-light);
}
.tag-chip-remove:hover { color: var(--accent-dark); }
.tags-input {
  border: none;
  background: none;
  outline: none;
  font-size: 13px;
  color: var(--text);
  flex: 1;
  min-width: 80px;
}

/* ================================================================
   VIRTUAL SCROLL SENTINEL
   ================================================================ */
.scroll-sentinel {
  height: 1px;
  width: 100%;
}
.scroll-end-msg {
  text-align: center;
  padding: 20px;
  color: var(--text-3);
  font-size: 13px;
}
.fetch-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  font-size: 13px;
  color: var(--text-3);
}

/* ================================================================
   MEDIA QUERIES - 반응형
   ================================================================ */

/* ── 태블릿 / 작은 PC (1024px 이하) ── */
@media (max-width: 1024px) {
  .right-panel { display: none !important; }
  .main-content { margin-left: var(--sidebar-w); justify-content: flex-start; padding: 0 12px; gap: 0; }
  .feed-area { width: 100%; max-width: 100%; flex-shrink: 1; }
}

/* ── 모바일 (768px 이하) ── */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
  }

  .sidebar { display: none !important; }
  .right-panel { display: none !important; }
  .mobile-header { display: flex; }
  .bottom-nav { display: flex; }

  /* ── 모바일 기본 폰트 크기 상향 ── */
  body { font-size: 15px; }

  .app-layout {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .main-content, .profile-wrap, .edit-wrap, .group-wrap, .write-wrap {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    padding-top: var(--header-h) !important;
    padding-bottom: var(--bottom-nav-h) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .feed-area {
    width: 100% !important;
    max-width: 100% !important;
    flex-shrink: 1 !important;
    padding: 8px 0 24px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* ── 포스트 카드 ── */
  .post-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-bottom: 10px;
    box-shadow: none;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .post-header {
    padding: 14px 16px;
    gap: 12px;
  }

  /* 아바타 크기 모바일에서 더 크게 */
  .post-header .avatar-md { width: 48px; height: 48px; }

  .post-hospital-name { font-size: 15px; }
  .post-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .post-hospital-badges {
    width: 100%;
    margin-top: 1px;
    margin-bottom: 2px;
  }

  .post-meta { gap: 6px; margin-top: 3px; }
  .post-region       { font-size: 13px; }
  .post-procedure-tag { font-size: 12px; padding: 2px 9px; }
  .post-date         { font-size: 12px; }

  .post-body { padding: 14px 16px; }
  .post-title   { font-size: 16px; line-height: 1.5; margin-bottom: 6px; }
  .post-content { font-size: 14px; line-height: 1.7; }

  .post-info-row { margin-top: 10px; gap: 8px; }
  .post-price   { font-size: 13px; padding: 3px 10px; }
  .tag          { font-size: 13px; padding: 4px 12px; }
  .tag-accent   { font-size: 13px; }

  .post-tags { margin-top: 10px; gap: 6px; }
  .post-tag  { font-size: 13px; }

  .post-actions { padding: 10px 12px 14px; gap: 4px; }
  .post-action-btn {
    font-size: 14px;
    padding: 8px 12px;
    gap: 6px;
  }
  .post-action-btn .lc-icon,
  .post-action-btn svg.lc-icon { width: 20px; height: 20px; }

  /* ── 스토리 ── */
  .stories-wrap {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-bottom: 10px;
    padding: 14px 16px;
  }
  .story-ring { width: 64px; height: 64px; }
  .story-name { font-size: 12px; max-width: 64px; }

  /* ── 필터 바 ── */
  .filter-bar {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-bottom: 10px;
    padding: 10px 14px;
    gap: 8px;
  }
  .filter-bar select,
  .filter-search input { font-size: 14px; }
  .filter-bar-label { font-size: 13px; }

  /* ── Auth ── */
  .auth-container { max-width: 100% !important; flex-direction: column !important; }
  .auth-visual { display: none !important; }
  .auth-form-wrap { padding: 32px 20px !important; width: 100% !important; box-sizing: border-box !important; }
  .auth-form-title  { font-size: 24px; }
  .auth-form-sub    { font-size: 14px; }
  .form-label       { font-size: 14px; }
  .form-input       { font-size: 15px; padding: 13px 14px; }
  .form-error       { font-size: 13px; }
  .btn-lg           { font-size: 16px; padding: 14px 20px; }

  /* ── 모바일 헤더 ── */
  .mobile-header { height: 56px; }
  .mobile-header-logo { font-size: 17px; }

  /* ── 하단 네비 ── */
  .bottom-nav-label { font-size: 11px; margin-top: 4px; }
  .bottom-nav-item [data-lucide] { width: 24px; height: 24px; }

  /* ── Profile ── */
  .profile-page { padding: 12px 16px 80px; }
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: var(--radius-md);
    margin: 0 0 16px;
    padding: 24px 16px;
  }
  .profile-tabs { margin: 0 0 16px; }
  .profile-username     { font-size: 20px; }
  .profile-stat-num     { font-size: 20px; }
  .profile-stat-label   { font-size: 13px; }
  .profile-stats-row    { justify-content: center; gap: 32px; }
  .profile-contact-grid { grid-template-columns: 1fr; }
  .profile-username-row { justify-content: center; }
  .profile-contact-item { font-size: 14px; }
  .profile-bio          { font-size: 14px; line-height: 1.7; }

  /* ── Write ── */
  .write-page { padding: 16px 16px 80px; }
  .write-header { padding: 0 16px; }
  .write-card { border-radius: 0; }
  .write-section { padding: 18px 16px; }
  .write-section-title { font-size: 15px; }
  .filter-grid { grid-template-columns: 1fr; }
  .form-select { font-size: 15px; padding: 13px 14px; }

  .event-top-bar,
  .write-top-bar,
  .edit-top-bar { display: none !important; }

  .toast-container { bottom: calc(var(--bottom-nav-h) + 16px); }
  .toast { font-size: 14px; padding: 12px 20px; }
}

/* ── 소형 모바일 (480px 이하) ── */
@media (max-width: 480px) {
  .profile-header { padding: 16px; }
  .auth-form-wrap { padding: 24px 18px; }
  .post-title   { font-size: 15px; }
  .post-content { font-size: 14px; }
  .post-action-btn { padding: 8px 10px; font-size: 13px; }
}

/* ── 대형 PC (1440px 이상) ── */
@media (min-width: 1440px) {
  :root { --feed-w: 680px; --right-w: 320px; }
}

/* ================================================================
   PAGE TRANSITION
   ================================================================ */
.page-enter {
  animation: pageIn .25s ease forwards;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   UTILITY CLASSES
   ================================================================ */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mt-4   { margin-top: 4px; }
.mt-8   { margin-top: 8px; }
.mt-12  { margin-top: 12px; }
.mt-16  { margin-top: 16px; }
.mb-8   { margin-bottom: 8px; }
.mb-16  { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--text-3); }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.visible { display: block !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================================================================
   GLOBAL MODAL POPUP STYLES (popupCall 전용)
   ================================================================ */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(20, 16, 12, 0.55);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}
.modal-box {
  background: #FFFFFF !important;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  border: 1px solid #D4C5A9;
  box-shadow: 0 24px 48px rgba(0,0,0,0.22);
  overflow: hidden;
  transform: scale(0.92) translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.show .modal-box {
  transform: scale(1) translateY(0);
}
.modal-header {
  padding: 20px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #E8E0D0;
  background: #FFFFFF;
  flex-shrink: 0;
}
.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-title {
  font-size: 16.5px;
  font-weight: 700;
  color: #1A1410 !important;
}
.modal-close-btn {
  background: none;
  border: none;
  color: #524336;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.modal-close-btn:hover {
  color: #1A1410;
  background: #F5F0E8;
}
.modal-body {
  padding: 24px;
  font-size: 14px;
  color: #1A1410 !important;
  line-height: 1.65;
  background: #FFFFFF;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}
.modal-notice-box {
  background: #FAF6F0 !important;
  border: 1px solid #C4B49A !important;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 16px 0;
  font-size: 13px;
  color: #1A1410 !important;
}

/* 기본 시술 등록 테이블 모바일 개행 반응형 */
@media (max-width: 768px) {
  .responsive-form-table,
  .responsive-form-table thead,
  .responsive-form-table tbody,
  .responsive-form-table tr,
  .responsive-form-table td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .responsive-form-table thead {
    display: none !important;
  }
  .responsive-form-table tr {
    margin-bottom: 0;
  }
  .responsive-form-table td {
    padding: 8px 12px !important;
    border: none !important;
    text-align: left !important;
  }
  .responsive-form-table td .field-label-mobile {
    display: block !important;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-2);
    margin-bottom: 6px;
  }
  .responsive-form-table td.btn-td {
    margin-top: 8px;
    text-align: right !important;
  }
  .responsive-form-table td.btn-td .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 10px !important;
    font-size: 13px !important;
  }
}

@media (min-width: 769px) {
  .responsive-form-table .field-label-mobile {
    display: none !important;
  }
}
.modal-email-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #6B5040 !important;
  color: #FFFFFF !important;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 13px;
  margin-top: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.modal-footer {
  padding: 16px 24px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid #E8E0D0;
  background: #FAF8F4;
}

/* 로그인/미로그인 버튼 깜빡임 방지 (Anti-Flicker) CSS */
html.is-authenticated .unauth-only-btn,
html.is-authenticated .unauth-only-nav,
html.is-authenticated .unauth-only-menu {
  display: none !important;
}

html.is-authenticated .auth-only-btn,
html.is-authenticated .auth-only-nav,
html.is-authenticated .auth-only-menu {
  display: flex !important;
}

html.is-unauthenticated .auth-only-btn,
html.is-unauthenticated .auth-only-nav,
html.is-unauthenticated .auth-only-menu {
  display: none !important;
}

html.is-unauthenticated .unauth-only-btn,
html.is-unauthenticated .unauth-only-nav,
html.is-unauthenticated .unauth-only-menu {
  display: flex !important;
}

/* ══════════════════════════════════════
   이미지 원본 확대 라이트박스 모달 (Image Lightbox)
══════════════════════════════════════ */
.image-lightbox-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(12, 10, 8, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
}
.image-lightbox-backdrop.show {
  opacity: 1;
  visibility: visible;
}
.image-lightbox-container {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: scale(0.94);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.image-lightbox-backdrop.show .image-lightbox-container {
  transform: scale(1);
}
.image-lightbox-img-wrap {
  max-width: 92vw;
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.image-lightbox-img-wrap img {
  max-width: 92vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 48px rgba(0,0,0,0.55);
  user-select: none;
  background: rgba(0,0,0,0.2);
}
.image-lightbox-close-btn {
  position: absolute;
  top: -46px;
  right: 0;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.image-lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
}
.image-lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}
.image-lightbox-nav-btn:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: translateY(-50%) scale(1.08);
}
.image-lightbox-nav-btn.prev {
  left: -64px;
}
.image-lightbox-nav-btn.next {
  right: -64px;
}
@media (max-width: 768px) {
  .image-lightbox-nav-btn.prev { left: 8px; }
  .image-lightbox-nav-btn.next { right: 8px; }
  .image-lightbox-close-btn { top: -42px; right: 4px; }
}
.image-lightbox-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.image-lightbox-counter {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.55);
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.image-lightbox-orig-btn {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.16);
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.image-lightbox-orig-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
}

/* ================================================================
   MY BOOKSHELF (내 책장) STYLES
   ================================================================ */
.bookshelf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.bookshelf-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bookshelf-filter-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--trans);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.bookshelf-filter-btn:hover {
  color: var(--text);
  background: var(--bg-3);
}
.bookshelf-filter-btn.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  font-weight: 700;
}
.bookshelf-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* 책장 카드 그리드 */
.bookshelf-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  position: relative;
  width: 100%;
}

@media (max-width: 1100px) {
  .bookshelf-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}
@media (max-width: 768px) {
  .bookshelf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .bookshelf-toolbar {
    padding: 10px 12px;
  }
  .bookshelf-filter-btn {
    padding: 5px 10px;
    font-size: 12px;
  }
}
@media (max-width: 480px) {
  .bookshelf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* 개별 도서 카드 */
.bookshelf-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.bookshelf-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* 도서 커버 배경 컨테이너 */
.bookshelf-cover-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 4.9;
  background: #ECE5D8;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px;
  box-sizing: border-box;
  min-width: 0;
}

/* 도서 3D 표지 이미지 */
.bookshelf-cover-img {
  max-width: 75%;
  max-height: 86%;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: -5px 6px 14px rgba(0, 0, 0, 0.28), 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s ease;
}
.bookshelf-card:hover .bookshelf-cover-img {
  transform: scale(1.03);
}

/* 상태 뱃지 (좌측 상단) */
.bookshelf-status-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  line-height: 1.3;
}
.bookshelf-status-badge.status-reading {
  background: #F59E0B; /* 주황/앰버 */
}
.bookshelf-status-badge.status-want {
  background: #52616B; /* 다크 그레이/슬레이트 */
}
.bookshelf-status-badge.status-completed {
  background: #10B981; /* 에메랄드/그린 */
}

/* 도서 액션 버튼 그룹 (수정/삭제) */
.bookshelf-card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 5px;
}
.bookshelf-card-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.15s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.bookshelf-card:hover .bookshelf-card-action-btn {
  opacity: 1;
}
.bookshelf-card-action-btn:hover {
  transform: scale(1.08);
  background: #FFFFFF;
}
.bookshelf-card-action-btn.edit-btn:hover {
  color: var(--accent);
}
.bookshelf-card-action-btn.del-btn:hover {
  color: var(--error);
}

/* 도서 삭제 버튼 레거시 호환용 */
.bookshelf-card-del-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.bookshelf-card:hover .bookshelf-card-del-btn {
  opacity: 1;
}
.bookshelf-card-del-btn:hover {
  color: var(--error);
  background: #FFFFFF;
}

@media (max-width: 768px), (hover: none) {
  .bookshelf-card-action-btn {
    opacity: 0.92;
  }
}

/* 도서 상세 텍스트 정보 */
.bookshelf-info {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.bookshelf-book-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  word-break: break-all;
  overflow-wrap: anywhere;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.bookshelf-book-meta {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: break-all;
  overflow-wrap: anywhere;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.bookshelf-rating {
  color: #F59E0B;
  font-size: 13px;
  letter-spacing: 1px;
  margin-top: 3px;
  line-height: 1;
  min-width: 0;
}
.bookshelf-rating .empty-star {
  color: #E8E0D0;
}
.bookshelf-quote {
  font-size: 12px;
  color: #524336;
  font-style: italic;
  background: #FAF7F2;
  padding: 6px 8px;
  border-radius: 8px;
  margin-top: 6px;
  line-height: 1.4;
  border-left: 2px solid #D4C5A9;
  word-break: break-all;
  overflow-wrap: anywhere;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

/* 모달 내부 별점 및 라디오 칩 스타일 */
.book-modal-cover-preview {
  width: 90px;
  height: 120px;
  background: #ECE5D8;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.book-modal-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.book-status-radio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.book-status-radio-label {
  cursor: pointer;
  display: inline-flex;
}
.book-status-radio-label input[type="radio"] {
  display: none;
}
.book-status-chip {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--bg-2);
  color: var(--text-2);
  border: 1.5px solid transparent;
  transition: all var(--trans);
  display: inline-flex;
  align-items: center;
}
.book-status-radio-label input[type="radio"]:checked + .chip-want {
  background: #52616B;
  color: #FFFFFF;
  border-color: #52616B;
  font-weight: 700;
}
.book-status-radio-label input[type="radio"]:checked + .chip-reading {
  background: #F59E0B;
  color: #FFFFFF;
  border-color: #F59E0B;
  font-weight: 700;
}
.book-status-radio-label input[type="radio"]:checked + .chip-completed {
  background: #10B981;
  color: #FFFFFF;
  border-color: #10B981;
  font-weight: 700;
}

.book-star-rating-input {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 22px;
  color: #D4C5A9;
  cursor: pointer;
}
.book-star-rating-input .star {
  transition: color 0.15s ease, transform 0.15s ease;
  user-select: none;
}
.book-star-rating-input .star:hover {
  transform: scale(1.15);
}
.book-star-rating-input .star.active {
  color: #F59E0B;
}

/* ════════════════════════════════════════════════════════════
   [반응형 댓글 드로어] 모바일: 아래->위 / PC: 우측->좌측
   ════════════════════════════════════════════════════════════ */
.comment-drawer-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(20, 16, 12, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.comment-drawer-backdrop.show {
  opacity: 1;
  visibility: visible;
}

/* PC 버전 (기본): 우측에서 좌측으로 슬라이드인 패널 */
@media (min-width: 769px) {
  .comment-drawer-container {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 440px;
    max-width: 100%;
    background: #FFFFFF;
    box-shadow: -8px 0 32px rgba(0,0,0,0.16);
    border-left: 1px solid #E8DFD3;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10001;
  }
  .comment-drawer-backdrop.show .comment-drawer-container {
    transform: translateX(0);
  }
  .comment-drawer-drag-bar {
    display: none;
  }
}

/* 모바일 버전: 아래에서 위로 슬라이드업 바텀시트 */
@media (max-width: 768px) {
  .comment-drawer-container {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    height: 75vh;
    max-height: 85vh;
    background: #FFFFFF;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -12px 36px rgba(0,0,0,0.2);
    border-top: 1px solid #E8DFD3;
    border-left: none;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10001;
  }
  .comment-drawer-backdrop.show .comment-drawer-container {
    transform: translateY(0);
  }
  .comment-drawer-drag-bar {
    width: 36px;
    height: 4px;
    background: #D4C5A9;
    border-radius: 2px;
    margin: 8px auto 2px;
    display: block;
    flex-shrink: 0;
  }
}

.comment-drawer-header {
  padding: 10px 18px;
  border-bottom: 1px solid #F0EAE1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  flex-shrink: 0;
}

.comment-drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-drawer-title {
  font-size: 16px;
  font-weight: 700;
  color: #1A1410;
}

.comment-count-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  background: #F4EFE6;
  padding: 2px 8px;
  border-radius: 12px;
}

.comment-drawer-close-btn {
  background: none;
  border: none;
  color: #6B5040;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.comment-drawer-close-btn:hover {
  background: #F4EFE6;
}

.comment-drawer-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #FAF8F5;
}

.comment-loading-state,
.comment-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 16px;
  color: #8C7A6B;
  font-size: 13.5px;
  text-align: center;
}

.comment-empty-state i {
  color: #C4B49A;
}

.comment-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid #EDE5D8;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
}

.comment-item:hover {
  border-color: #D4C5A9;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #E8DFD3;
}

.comment-content-box {
  flex: 1;
  min-width: 0;
}

.comment-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-author-name {
  font-size: 13px;
  font-weight: 700;
  color: #2C221A;
  text-decoration: none;
}

.comment-author-name:hover {
  color: var(--accent);
}

.comment-created-at {
  font-size: 11px;
  color: #A89B8C;
}

.comment-text {
  font-size: 13.5px;
  color: #1A1410;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
}

.comment-delete-btn {
  background: none;
  border: none;
  color: #B5A797;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.comment-delete-btn:hover {
  color: #DC2626;
  background: #FEF2F2;
}

.comment-drawer-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid #F0EAE1;
  background: #FFFFFF;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .comment-drawer-footer {
    padding: 14px 16px 36px;
    padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
  }
}

.comment-input-field {
  width: 100%;
  border: 1px solid #D4C5A9;
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 13.5px;
  color: #1A1410;
  outline: none;
  background: #FAF8F5;
  transition: border-color 0.2s, background 0.2s;
}

.comment-input-field:focus {
  border-color: var(--accent);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(107, 80, 64, 0.1);
}

.comment-submit-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s, background 0.2s;
}

.comment-submit-btn:hover {
  background: var(--accent-dark);
  transform: scale(1.05);
}

.comment-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================
   독서 리포트 & 완독 책탑 (Reading Report & Book Tower) 스타일
   ============================================================ */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  width: 100%;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

.stat-label {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 4px;
  font-weight: 600;
  text-align: center;
}

.stat-value {
  font-size: 22px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

/* Stats Dashboard Grid (2단 그리드: 좌-장르분석, 우-책탑) */
.stats-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.stats-card-box {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.stats-card-header, .book-tower-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  width: 100%;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 장르 분석 리스트 */
.genre-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: visible;
  padding-right: 0;
}

.genre-bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.genre-bar-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.genre-bar-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.genre-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.genre-bar-outer {
  width: 100%;
  height: 9px;
  background-color: var(--bg-2, #F4EFE6);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.genre-bar-inner {
  height: 100%;
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.genre-bar-percent {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
}

/* 완독 책탑 (Book Stack Tower) */
.tower-period-selectors {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tower-date-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.tower-date-input {
  border: none;
  background: transparent;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  font-family: inherit;
  padding: 2px 0;
  cursor: pointer;
}

.tower-date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
  margin-left: 2px;
}

.tower-date-sep {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  padding: 0 1px;
}

.tower-year-select {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  outline: none;
  cursor: pointer;
  font-family: inherit;
}

.book-tower-wrapper-outer {
  position: relative;
  padding: 16px 16px 0 16px;
  height: 290px;
  min-height: 290px;
  max-height: 290px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #FAF6EE;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  overflow: hidden;
  box-sizing: border-box;
  transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), height 0.4s ease;
}

.book-tower-wrapper-outer.is-expanded {
  height: auto;
  min-height: 290px;
  max-height: 5000px;
  overflow: visible;
}

.book-tower {
  display: flex;
  flex-direction: column-reverse; /* 아래에서 위로 책 쌓기 */
  align-items: center;
  width: 100%;
  max-width: 290px;
  gap: 2px;
  z-index: 2;
  padding-bottom: 2px;
  margin-top: auto; /* 아래쪽 기준 정렬 및 스크롤 시 상단 잘림 방지 */
}

.book-spine {
  width: 100%;
  height: 34px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: #2E2520;
  box-shadow: 0 2px 5px rgba(60, 45, 35, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.6), inset 0 -1px 1px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(80, 60, 45, 0.14);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: dropIn 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.book-spine:hover {
  transform: scale(1.025) translateY(-2px);
  box-shadow: 0 6px 12px rgba(60, 45, 35, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  z-index: 10;
}

.book-spine-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
  font-weight: 700;
  color: #241C18;
}

.book-spine-author {
  font-size: 11px;
  opacity: 0.82;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 28%;
  font-weight: 600;
  color: #4A3C35;
}

.book-tower-shelf {
  width: 100%;
  max-width: 320px;
  height: 12px;
  background: linear-gradient(to bottom, #A68A64, #7A5F38);
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
  z-index: 1;
  margin-top: -2px;
  flex-shrink: 0;
}

.challenge-footer {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-2);
}

.challenge-footer strong {
  color: var(--text);
  font-weight: 700;
}

@keyframes dropIn {
  0% {
    transform: translateY(-80px) scaleY(1.1);
    opacity: 0;
  }
  60% {
    transform: translateY(4px) scaleY(0.96);
  }
  80% {
    transform: translateY(-2px) scaleY(1.01);
  }
  100% {
    transform: translateY(0) scaleY(1);
    opacity: 1;
  }
}

@media (max-width: 992px) {
  .stats-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .stats-overview {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
  }
  .stat-card {
    padding: 10px 8px;
  }
  .stat-label {
    font-size: 11.5px;
    margin-bottom: 2px;
  }
  .stat-value {
    font-size: 18px;
  }
  .stats-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .book-tower-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .tower-period-selectors {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Interest Genre Checkboxes */
.genre-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 6px;
}
.genre-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: all var(--trans);
  user-select: none;
}
.genre-check-label:hover {
  border-color: var(--accent-light);
  background: var(--white);
}
.genre-check-label:has(input:checked),
.genre-check-label.is-checked {
  border-color: var(--accent);
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-weight: 700;
}
.genre-check-label input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}


