/* ==========================================================================
   아이참소아치과 독립 게시판 & 갤러리 스타일 (board.css)
   아이참 갤러리 카드 & 스마트 리치 에디터 스타일
   ========================================================================== */

:root {
  --board-primary: #0d9488;
  --board-primary-hover: #0f766e;
  --board-primary-light: #f0fdfa;
  --board-accent: #f97316;
  --board-dark: #0f172a;
  --board-body: #334155;
  --board-muted: #64748b;
  --board-bg: #f8fafc;
  --board-card-bg: #ffffff;
  --board-border: #e2e8f0;
  --board-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --board-shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --board-shadow-hover: 0 20px 30px -10px rgba(13, 148, 136, 0.15), 0 10px 15px -5px rgba(15, 23, 42, 0.06);
  --board-radius-sm: 8px;
  --board-radius-md: 14px;
  --board-radius-lg: 20px;
}

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

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--board-bg);
  color: var(--board-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.board-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   1. 상단 네비게이션 바
   ========================================================================== */
.board-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--board-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 74px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-brand img {
  height: 38px;
  width: auto;
  max-width: none;
  aspect-ratio: 266 / 61;
  object-fit: contain;
  flex-shrink: 0;
}

.header-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-header-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: #ffffff;
  border: 1.5px solid var(--board-border);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--board-body);
  transition: all 0.2s;
}

.btn-header-home:hover {
  border-color: var(--board-primary);
  color: var(--board-primary);
  background: var(--board-primary-light);
}

.btn-header-booking {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  background: #03c75a;
  color: #ffffff;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(3, 199, 90, 0.25);
  transition: all 0.2s;
}

.btn-header-booking:hover {
  background: #02b150;
  transform: translateY(-1px);
}

.btn-header-tel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--board-primary);
  padding: 8px 14px;
  white-space: nowrap;
}

.nav-text-mobile,
.tel-text-mobile {
  display: none;
}

/* ==========================================================================
   2. 히어로 배너 (아이참 치과 스토리 & 칼럼)
   ========================================================================== */
.board-hero {
  background: linear-gradient(135deg, #f0fdfa 0%, #fff7ed 50%, #eff6ff 100%);
  border-bottom: 1px solid #e2e8f0;
  padding: 60px 0 50px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.board-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 133, 51, 0.12);
  color: #ea580c;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 133, 51, 0.2);
}

.board-hero-title {
  font-size: 34px;
  font-weight: 900;
  color: var(--board-dark);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.board-hero-title span {
  color: #ff8533;
  background: linear-gradient(135deg, #ff8533 0%, #ff6b3d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.board-hero-desc {
  font-size: 16px;
  color: var(--board-muted);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ==========================================================================
   3. 카테고리 필터 탭 & 검색 컨트롤 바 (홈페이지 메인과 100% 디자인 통일)
   ========================================================================== */
.board-filter-section {
  padding: 36px 0 20px 0;
}

.board-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid #ede8e3;
}

.board-filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 18px;
  background: #f4efe9;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #444444;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-tab:hover {
  background: #fff7ed;
  color: #ea580c;
  border-color: #fed7aa;
}

.filter-tab.active {
  background: linear-gradient(135deg, #ff8533, #ff6b3d) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(255, 133, 51, 0.38) !important;
}

.filter-tab.tab-treatment {
  background: #f0f7ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.filter-tab.tab-treatment:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.filter-tab.tab-treatment.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
}

.board-search-box {
  display: flex;
  align-items: center;
  position: relative;
  background: #fdfbf7;
  border: 1.5px solid #e5ded6;
  border-radius: 999px;
  padding: 4px 6px 4px 16px;
  transition: all 0.2s;
}

.board-search-box:focus-within {
  border-color: #ff8533;
  box-shadow: 0 0 0 3px rgba(255, 133, 51, 0.15);
  background: #ffffff;
}

.board-search-input {
  width: 200px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 13.5px;
  color: var(--board-dark);
  outline: none;
}

.board-search-btn {
  background: linear-gradient(135deg, #ff8533, #ff6b3d);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(255, 133, 51, 0.3);
}

.board-search-btn:hover {
  background: linear-gradient(135deg, #ea580c, #c2410c);
  transform: scale(1.05);
}

.board-meta-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 28px 0;
  font-size: 13.5px;
  color: var(--board-muted);
}

.board-total-count strong {
  color: #ff8533;
  font-weight: 800;
}

/* ==========================================================================
   4. 카드 그리드 레이아웃 (아이참 3열 갤러리 카드)
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 60px;
}

/* ==========================================================================
   [시안 1] 3열 모던 매거진 카드 (Modern Magazine Card)
   ========================================================================== */
.post-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.25s ease;
  cursor: pointer;
  position: relative;
}

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 38px rgba(13, 148, 136, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
  border-color: #99f6e4;
}

/* 중요 공지 카드 골드/오렌지 하이라이트 */
.post-card.is-pinned-card {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #fffcf7 0%, #ffffff 60px);
}

.post-card.is-pinned-card:hover {
  border-color: #ff8533;
  box-shadow: 0 18px 38px rgba(255, 133, 51, 0.15);
}

/* 치료 임상 케이스 카드 퍼플 하이라이트 */
.post-card.card-treatment-case {
  border-color: #e9d5ff;
}

.post-card.card-treatment-case:hover {
  border-color: #a855f7;
  box-shadow: 0 18px 38px rgba(168, 85, 247, 0.14);
}

/* 카드 썸네일 래퍼 (16:10 황금비율로 텍스트 짤림 방지) */
.card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}

.card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card:hover .card-thumb-img {
  transform: scale(1.05);
}

/* 썸네일 상단 고정 뱃지 */
.card-badge-pin {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  color: #fef08a;
  font-size: 11.5px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  letter-spacing: -0.2px;
}

/* 카테고리 뱃지 (파스텔톤 글래스모피즘) */
.card-badge-cat {
  position: absolute;
  bottom: 12px;
  left: 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  z-index: 2;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  letter-spacing: -0.2px;
}

.card-badge-cat.badge-cat-notice {
  color: #0284c7;
  border: 1px solid rgba(186, 230, 253, 0.9);
}

.card-badge-cat.badge-cat-column {
  color: #ea580c;
  border: 1px solid rgba(254, 215, 170, 0.9);
}

.card-badge-cat.badge-cat-case {
  color: #7e22ce;
  border: 1px solid rgba(233, 213, 255, 0.9);
}

/* 우측 상단 콤팩트 회원공개 뱃지 (미니멀 글래스 필 - 세로 늘어남 방지 완벽 처리) */
.card-badge-lock {
  position: absolute;
  top: 14px;
  right: 14px;
  bottom: auto !important;
  left: auto !important;
  height: auto !important;
  max-height: 28px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fef08a;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  letter-spacing: -0.2px;
  border: 1px solid rgba(254, 240, 138, 0.35);
  pointer-events: none;
  line-height: 1.2;
  white-space: nowrap;
}

.card-badge-lock .lock-icon {
  font-size: 11px;
  line-height: 1;
}


/* 카드 본문 */
.card-body {
  padding: 22px 22px 18px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 17.5px;
  font-weight: 800;
  color: var(--board-dark);
  line-height: 1.48;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
  letter-spacing: -0.3px;
}

.post-card:hover .card-title {
  color: #0d9488;
}

.card-excerpt {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.65;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  font-size: 12.5px;
  color: #94a3b8;
}

.card-footer-author {
  font-weight: 700;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-footer-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

/* ==========================================================================
   5. 전용 본문 읽기 페이지 (blog-reading-view)
   - 팝업/모달이 아닌 온전한 단독 웹페이지 본문 읽기 뷰
   ========================================================================== */
.blog-reading-view {
  padding: 40px 0 80px 0;
  min-height: 80vh;
}

.blog-reading-container {
  max-width: 880px;
  margin: 0 auto;
}

/* 상단 컨트롤 바 */
.blog-view-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-back-to-list {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: #ffffff;
  border: 1.5px solid var(--board-border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--board-body);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--board-shadow-sm);
}

.btn-back-to-list:hover {
  border-color: var(--board-primary);
  color: var(--board-primary);
  background: var(--board-primary-light);
  transform: translateX(-3px);
}

.blog-view-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--board-muted);
}

.crumb-home {
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}

.crumb-sep {
  color: #cbd5e1;
}

.crumb-cat {
  font-weight: 800;
  color: var(--board-primary);
}

.blog-view-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-blog-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid var(--board-border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--board-body);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-blog-action:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* 본문 카드 메인 래퍼 */
.blog-article-card {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid var(--board-border);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  margin-bottom: 36px;
}

/* 블로그 헤더 */
.blog-post-header {
  padding: 44px 50px 30px 50px;
  border-bottom: 1px solid #f1f5f9;
}

.blog-cat-tag-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.blog-cat-badge {
  display: inline-block;
  padding: 5px 14px;
  background: var(--board-primary-light);
  color: var(--board-primary);
  font-size: 13px;
  font-weight: 800;
  border-radius: 6px;
}

.blog-pin-badge {
  display: inline-block;
  padding: 5px 12px;
  background: #fef3c7;
  color: #b45309;
  font-size: 12px;
  font-weight: 800;
  border-radius: 6px;
}

.blog-post-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--board-dark);
  line-height: 1.4;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

/* 작성자 프로필 바 */
.blog-author-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid #f8fafc;
}

.author-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  object-fit: contain;
  background: #f8fafc;
  padding: 4px;
}

.author-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--board-dark);
}

.author-role-tag {
  font-size: 11px;
  font-weight: 700;
  background: #e0f2fe;
  color: #0369a1;
  padding: 2px 7px;
  border-radius: 4px;
}

.author-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--board-muted);
  margin-top: 3px;
}

.meta-dot {
  color: #cbd5e1;
}

.btn-tel-quick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #f0fdfa;
  color: var(--board-primary);
  border: 1px solid #ccfbf1;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

/* 본문 콘텐츠 */
.blog-post-content {
  padding: 44px 50px;
  font-size: 16.5px;
  line-height: 1.9;
  color: #334155;
  word-break: keep-all;
}

.blog-post-content p {
  margin-bottom: 20px;
}

.blog-post-content img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
  cursor: zoom-in;
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog-post-content>img {
  margin: 32px auto;
}

.blog-post-content img:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.blog-post-content .blog-media-box {
  margin: 28px 0;
  clear: both;
}

/* 하단 병원 배너 */
.blog-clinic-banner {
  margin: 40px 50px;
  padding: 26px 30px;
  background: linear-gradient(135deg, #f0fdfa 0%, #fff7ed 100%);
  border: 1.5px solid #ccfbf1;
  border-radius: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.clinic-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 280px;
}

.clinic-banner-icon {
  font-size: 38px;
}

.clinic-banner-text h4 {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.clinic-banner-text p {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.clinic-banner-btn-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 이전 글 / 다음 글 네비게이션 */
.blog-prev-next-nav {
  margin: 0 50px 36px 50px;
  border: 1px solid var(--board-border);
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}

.nav-row-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  gap: 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.nav-row-item:hover {
  background: #f1f5f9;
}

.nav-row-item:first-child {
  border-bottom: 1px solid var(--board-border);
}

.nav-row-label {
  font-weight: 800;
  color: var(--board-primary);
  width: 75px;
  flex-shrink: 0;
}

.nav-row-title {
  color: var(--board-body);
  font-weight: 600;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-row-date {
  color: #94a3b8;
  font-size: 12.5px;
  flex-shrink: 0;
}

/* 하단 목록 버튼 바 */
.blog-bottom-bar {
  text-align: center;
  margin: 32px 0 50px 0;
}

.btn-return-list {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 34px;
  background: #ffffff;
  border: 1.5px solid var(--board-border);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  color: var(--board-body);
  cursor: pointer;
  box-shadow: var(--board-shadow-sm);
  transition: all 0.2s;
}

.btn-return-list:hover {
  border-color: var(--board-primary);
  color: var(--board-primary);
  background: var(--board-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--board-shadow-md);
}

/* 관련 글 3열 미니 그리드 */
.blog-related-section {
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--board-border);
}

.related-section-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--board-dark);
  margin-bottom: 20px;
}

/* ==========================================================================
   6. 푸터
   ========================================================================== */
.board-footer {
  background: #ffffff;
  border-top: 1px solid var(--board-border);
  padding: 40px 0;
  margin-top: 60px;
  text-align: center;
  font-size: 13px;
  color: var(--board-muted);
}

.board-footer-copyright {
  margin-top: 8px;
  cursor: pointer;
}

/* 반응형 모바일 */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* 태블릿 & 모바일 네비게이션 최적화 (900px 이하) */
@media (max-width: 900px) {
  .board-container {
    padding: 0 14px !important;
  }

  .header-inner {
    height: 62px;
  }

  .header-brand img {
    height: 30px;
  }

  .header-nav-actions {
    gap: 6px;
  }

  .nav-text-desktop,
  .tel-text-desktop {
    display: none !important;
  }

  .nav-text-mobile,
  .tel-text-mobile {
    display: inline !important;
  }
}

/* 스마트폰 모바일 헤더 네비게이션 최적화 (예약 버튼 및 홈 버튼 잘림 방지) */
@media (max-width: 680px) {
  .board-header {
    width: 100%;
    overflow: hidden;
  }

  .board-header .board-container {
    padding: 0 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .header-inner {
    height: 56px !important;
    padding: 0 !important;
    gap: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
  }

  .header-brand {
    flex-shrink: 1 !important;
    min-width: 0 !important;
    gap: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  .header-brand a {
    display: flex !important;
    align-items: center !important;
  }

  .header-brand img {
    height: 24px !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    display: block !important;
  }

  .header-nav-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
  }

  .btn-header-auth,
  .btn-header-tel,
  .btn-header-home,
  .btn-header-booking {
    padding: 5px 8px !important;
    font-size: 11.5px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
  }

  .btn-header-home {
    background: #ffffff !important;
    border: 1px solid var(--board-border) !important;
    color: var(--board-body) !important;
    flex-shrink: 0 !important;
  }

  .btn-header-booking {
    background: #03c75a !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border: 1px solid #02b150 !important;
    box-shadow: 0 2px 6px rgba(3, 199, 90, 0.25) !important;
    padding: 5px 9px !important;
    flex-shrink: 0 !important;
  }

  .btn-header-booking span:first-child {
    font-size: 10px !important;
  }

  .btn-header-tel {
    background: #f0fdfa !important;
    border: 1px solid #ccfbf1 !important;
    color: var(--board-primary) !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
  }

  .btn-header-auth {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
  }

  .user-logged-wrap {
    padding: 3px 6px !important;
    gap: 4px !important;
    border-radius: 999px !important;
  }

  .user-logged-wrap .user-greeting {
    font-size: 11px !important;
  }

  .btn-header-logout {
    padding: 2px 6px !important;
    font-size: 10px !important;
  }
}

/* 430px 이하 스마트폰 화면 최적화 */
@media (max-width: 430px) {
  .board-header .board-container {
    padding: 0 6px !important;
  }

  .header-inner {
    gap: 3px !important;
  }

  .header-brand img {
    height: 22px !important;
    max-width: 85px !important;
  }

  .header-nav-actions {
    gap: 3px !important;
  }

  .btn-header-auth,
  .btn-header-tel,
  .btn-header-home,
  .btn-header-booking {
    padding: 4px 6px !important;
    font-size: 11px !important;
    gap: 2px !important;
  }

  /* 전화 버튼은 아이콘만 표시하여 가로 여백 25px 확보 */
  .btn-header-tel .tel-text-mobile {
    display: none !important;
  }

  .btn-header-tel {
    padding: 4px 6px !important;
  }
}

/* 380px 이하 (아이폰 SE, 갤럭시 기본형 등) */
@media (max-width: 380px) {
  .board-header .board-container {
    padding: 0 4px !important;
  }

  .header-inner {
    gap: 2px !important;
  }

  .header-brand img {
    height: 20px !important;
    max-width: 70px !important;
  }

  .header-nav-actions {
    gap: 2px !important;
  }

  /* 로그인 버튼도 아이콘만 표시하여 여백 추가 확보 */
  .btn-header-auth .nav-text-mobile {
    display: none !important;
  }

  .btn-header-auth {
    padding: 4px 5px !important;
  }

  .btn-header-home,
  .btn-header-booking {
    padding: 4px 5px !important;
    font-size: 10.5px !important;
  }

  .user-logged-wrap {
    padding: 2px 4px !important;
  }

  .user-logged-wrap .user-greeting {
    display: none !important;
  }
}

/* 330px 이하 초소형 화면 */
@media (max-width: 330px) {
  .header-brand img {
    display: none !important;
  }

  .header-inner {
    justify-content: center !important;
  }

  .header-nav-actions {
    margin-left: 0 !important;
    width: 100% !important;
    justify-content: space-around !important;
  }
}

/* 768px 이하 모바일 화면 최적화 */
@media (max-width: 768px) {
.blog-author-bar {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.author-actions {
  width: 100%;
}

.btn-tel-quick {
  width: 100%;
  justify-content: center;
  white-space: nowrap !important;
  padding: 10px;
  font-size: 13.5px;
}

.clinic-banner-btn-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clinic-banner-btn-wrap a {
  width: 100%;
  text-align: center;
  justify-content: center;
  white-space: nowrap !important;
}

.gallery-grid {
  grid-template-columns: 1fr;
  gap: 20px;
}

.board-hero-title {
  font-size: 26px;
}

.blog-post-header,
.blog-post-content {
  padding: 26px 20px;
}

.blog-post-title {
  font-size: 22px;
}

.blog-clinic-banner {
  margin: 20px;
  padding: 20px;
}

.blog-prev-next-nav {
  margin: 0 20px 24px 20px;
}
}

/* ==========================================================================
   7. 스마트 에디터 툴바 & 타이포그래피 보강
   ========================================================================== */
.smart-editor-toolbar .ed-select-block {
  font-weight: 700;
  color: var(--board-primary);
  background: #f0fdfa;
  border-color: #99f6e4;
  min-width: 110px;
}

.font-size-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

.btn-font-step {
  padding: 0 8px;
  min-width: 28px;
  height: 32px;
  font-size: 13px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-font-step:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.editor-sub-tip {
  font-size: 12px;
  color: #0d9488;
  font-weight: 600;
  background: #f0fdfa;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid #ccfbf1;
}

/* 감성 제목 및 단락 타이포그래피 (에디터 캔버스 & 본문 뷰 공통) */
.smart-editor-canvas h2,
.blog-post-content h2 {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin: 32px 0 14px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
  line-height: 1.45;
  letter-spacing: -0.3px;
}

.smart-editor-canvas h3,
.blog-post-content h3 {
  font-size: 21px;
  font-weight: 800;
  color: #1e293b;
  margin: 26px 0 12px 0;
  line-height: 1.5;
  letter-spacing: -0.2px;
}

.smart-editor-canvas h4,
.blog-post-content h4 {
  font-size: 18px;
  font-weight: 700;
  color: #334155;
  margin: 20px 0 10px 0;
  line-height: 1.55;
}

.smart-editor-canvas p,
.blog-post-content p {
  margin: 0 0 16px 0;
  line-height: 1.9;
  color: #334155;
}

/* 감성 인용구 4종 스타일 보강 (에디터 & 본문 뷰 공통) */
.quote-line,
.naver-quote-line {
  margin: 24px 0;
  padding: 14px 20px;
  border-left: 4px solid var(--board-primary);
  background: #f0fdfa;
  color: #0f766e;
  border-radius: 0 8px 8px 0;
  font-size: 16px;
}

.quote-quote,
.naver-quote-quote {
  position: relative;
  margin: 32px auto;
  padding: 24px 28px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  text-align: center;
  max-width: 580px;
}

.quote-quote::before,
.naver-quote-quote::before {
  content: "“";
  display: block;
  font-size: 40px;
  line-height: 1;
  color: #94a3b8;
  font-family: Georgia, serif;
  margin-bottom: 6px;
}

.quote-quote p,
.naver-quote-quote p {
  margin: 0;
  font-size: 17.5px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.7;
}

.quote-box,
.naver-quote-box {
  position: relative;
  margin: 30px auto;
  padding: 26px 28px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 6px;
  text-align: center;
  max-width: 560px;
}

.quote-box p,
.naver-quote-box p {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.7;
}

/* 코너 프레임형 인용구 (┌ ┘) */
.quote-corner,
.naver-quote-corner {
  position: relative;
  margin: 34px auto;
  padding: 28px 32px;
  max-width: 520px;
  text-align: center;
  background: transparent;
}

.quote-corner::before,
.naver-quote-corner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  border-top: 2.5px solid #334155;
  border-left: 2.5px solid #334155;
}

.quote-corner::after,
.naver-quote-corner::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  border-bottom: 2.5px solid #334155;
  border-right: 2.5px solid #334155;
}

.quote-corner p,
.naver-quote-corner p {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #334155;
  line-height: 1.9;
}

/* 인용구 공통 하단 출처 표시 */
.quote-source {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: #94a3b8;
  margin-top: 14px;
  font-style: normal;
  letter-spacing: -0.3px;
}

.quote-memo,
.naver-quote-memo {
  margin: 24px auto;
  padding: 20px 24px;
  border: 1.5px solid #fef08a;
  background: #fefce8;
  border-radius: 12px;
  color: #854d0e;
  box-shadow: 0 4px 12px rgba(254, 240, 138, 0.25);
  font-size: 15.5px;
  max-width: 580px;
}

/* 4단계 검진 주기 원형 뱃지 인포그래픽 카드 */
.post-stages-card {
  margin: 32px auto;
  padding: 26px 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  max-width: 600px;
  text-align: center;
}

.post-stages-header {
  margin-bottom: 20px;
}

.post-stages-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
}

.post-stages-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.post-stages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.post-stage-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 8px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.post-stage-badge {
  width: 50px;
  height: 50px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
}

.post-stage-age {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.post-stage-months {
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
}

@media (max-width: 600px) {
  .post-stages-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* 감성 사선 구분선 */
.hr-slash {
  margin: 36px auto;
  text-align: center;
  color: #cbd5e1;
  font-size: 22px;
  letter-spacing: 4px;
  user-select: none;
}

/* 치과 플레이스 / 위치 정보 카드 */
.post-place-card {
  margin: 36px auto;
  padding: 24px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  max-width: 600px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.post-place-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.post-place-name {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.post-place-badge {
  background: #03c75a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-decoration: none;
}

.post-place-addr {
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 16px 0;
}

.post-place-actions {
  display: flex;
  gap: 10px;
}

.post-place-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.post-place-btn-primary {
  background: #03c75a;
  color: #ffffff;
}

.post-place-btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

/* 동영상 툴바 버튼 & 반응형 비디오 래퍼 */
.ed-tool-btn.btn-video-upload {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-weight: 700;
}

.ed-tool-btn.btn-video-upload:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.blog-video-container {
  max-width: 100%;
  margin: 32px auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  background: #000000;
}

.blog-video-container iframe,
.blog-video-container video {
  display: block;
  border-radius: 16px;
}

/* ==========================================================================
   치료이야기 (의료법 제56조 준수 회원 전용) 특화 탭, 뱃지, 모달 스타일
   ========================================================================== */

/* 1. 카테고리 필터 탭 특화 */
.filter-tab.tab-treatment {
  border-color: #c7d2fe;
  color: #4338ca;
  background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%);
  position: relative;
}

.filter-tab.tab-treatment:hover {
  border-color: #818cf8;
  background: #ede9fe;
  color: #3730a3;
}

.filter-tab.tab-treatment.active {
  background: linear-gradient(135deg, #4f46e5 0%, #0d9488 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

/* 2. 카드 뱃지 */
.badge-treatment-cat {
  background: rgba(245, 243, 255, 0.95) !important;
  color: #4f46e5 !important;
  border: 1px solid #c7d2fe !important;
}


.card-treatment-case {
  border-color: #e0e7ff;
}

.card-treatment-case:hover {
  border-color: #818cf8;
  box-shadow: 0 16px 32px rgba(99, 102, 241, 0.12);
}

/* 3. 의료법 회원 전용 안내 모달 (treatmentMemberModal) */
.treatment-modal-dialog {
  max-width: 520px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 34px 28px 30px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  border: 1px solid #e2e8f0;
  text-align: center;
  box-sizing: border-box;
}

.treatment-modal-header {
  margin-bottom: 20px;
}

.treatment-lock-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
  border: 2px solid #c7d2fe;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.15);
}

.treatment-lock-icon {
  font-size: 30px;
}

.treatment-law-badge {
  display: inline-block;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}

.treatment-modal-title {
  font-size: 21px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.treatment-modal-subtitle {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.treatment-post-preview-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  text-align: left;
}

.treatment-preview-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #6366f1;
  margin-bottom: 4px;
}

.treatment-preview-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  line-height: 1.45;
}

.treatment-notice-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 20px;
  text-align: left;
}

.treatment-notice-text {
  font-size: 13px;
  color: #1e3a8a;
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.treatment-notice-text strong {
  color: #1d4ed8;
}

.treatment-prep-box {
  display: flex;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 10px 12px;
  align-items: flex-start;
}

.treatment-prep-box .prep-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.treatment-prep-box .prep-text-wrap strong {
  display: block;
  font-size: 12.5px;
  color: #0f172a;
  margin-bottom: 3px;
}

.treatment-prep-box .prep-text-wrap p {
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

.treatment-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.btn-treatment-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.btn-treatment-call:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.35);
  color: #ffffff;
}

.btn-treatment-booking {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  background: #03c75a;
  color: #ffffff;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(3, 199, 90, 0.2);
  transition: transform 0.2s;
  box-sizing: border-box;
}

.btn-treatment-booking:hover {
  transform: translateY(-1px);
  background: #02b350;
  color: #ffffff;
}

.btn-treatment-close {
  width: 100%;
  height: 42px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  box-sizing: border-box;
}

.btn-treatment-close:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.btn-treatment-login-now {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.btn-treatment-login-now:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.35);
}

.btn-treatment-reg-now {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  background: #ffffff;
  border: 1.5px solid #0d9488;
  color: #0f766e;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.btn-treatment-reg-now:hover {
  background: #f0fdfa;
  color: #0d9488;
  border-color: #0f766e;
}

/* ==========================================================================
   Header Auth Badge & Member Status
   ========================================================================== */
.header-auth-badge {
  display: inline-flex;
  align-items: center;
}

.btn-header-auth {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 9999px;
  background: #f0fdfa;
  border: 1.5px solid #0d9488;
  color: #0f766e;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-header-auth:hover {
  background: #0d9488;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

.user-logged-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 4px 8px 4px 12px;
  border-radius: 9999px;
}

.user-logged-wrap .user-greeting {
  font-size: 13px;
  color: #0f172a;
  font-weight: 600;
}

.user-logged-wrap .user-greeting strong {
  color: #0d9488;
  font-weight: 800;
}

.btn-header-logout {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-header-logout:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* ==========================================================================
   아이참 Case 열람 전용 회원가입 & 로그인 모달 (caseAuthModal)
   ========================================================================== */
.case-auth-dialog {
  max-width: 480px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 20px;
  padding: 30px 26px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  position: relative;
  box-sizing: border-box;
  animation: authModalSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.case-auth-header {
  text-align: center;
  margin-bottom: 22px;
}

.case-auth-pill {
  display: inline-block;
  background: #f0fdfa;
  border: 1px solid #5eead4;
  color: #0f766e;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}

.case-auth-title {
  font-size: 21px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.case-auth-subtitle {
  font-size: 13px;
  color: #64748b;
  line-height: 1.55;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 6px;
  text-align: left;
}

.case-auth-subtitle strong {
  color: #0f172a;
}

.case-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
  margin-bottom: 22px;
}

.auth-tab-btn {
  height: 42px;
  border: none;
  background: transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: #0d9488;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  font-weight: 800;
}

.case-auth-form .form-group {
  margin-bottom: 16px;
}

.case-auth-form .form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.case-auth-form .form-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  color: #0f172a;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  background: #ffffff;
}

.case-auth-form .form-input:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.auth-tip-text {
  display: block;
  font-size: 11.5px;
  color: #64748b;
  margin-top: 5px;
  line-height: 1.4;
}

.auth-terms-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 16px;
}

.terms-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
  cursor: pointer;
}

.terms-label input[type="checkbox"] {
  margin-top: 2px;
  accent-color: #0d9488;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.auth-error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.btn-auth-submit {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
  transition: all 0.2s ease;
  margin-top: 4px;
}

.btn-auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.35);
}

.btn-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-footer-prompt {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: #64748b;
}

.btn-text-link {
  background: none;
  border: none;
  color: #0d9488;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0 4px;
  font-size: 13px;
}

.btn-text-link:hover {
  color: #0f766e;
}

/* Ensure modal overlays display reliably and do not block clicks when closed */
.modal-overlay {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.modal-overlay.active .modal-dialog {
  transform: translateY(0) !important;
}

/* ==========================================================================
   콘텐츠 불펌 방지 & 보안 스타일 (Anti-Theft & Security Guard)
   ========================================================================== */
/* 모든 이미지 무단 드래그 다운로드 방지 */
img,
.post-card-thumb,
.blog-article-card img,
.gallery-slide-img {
  -webkit-user-drag: none !important;
  -khtml-user-drag: none !important;
  -moz-user-drag: none !important;
  -o-user-drag: none !important;
  user-drag: none !important;
}

/* 본문 및 환자 임상 데이터 텍스트 선택 방지 */
.blog-post-content,
.treatment-modal-dialog,
.blog-article-card {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 관리자 입력 폼 및 정상 사용자 입력창은 정상 텍스트 선택/입력 허용 */
input,
textarea,
[contenteditable="true"],
.smart-editor-canvas,
.form-input,
.case-auth-dialog input {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* ==========================================================================
   아이참 관리자 모드 - 방문자 분석 & 통계 대시보드 스타일
   ========================================================================== */
.stat-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-kpi-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 18px 20px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.stat-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.stat-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.stat-kpi-card.card-today::before {
  background: linear-gradient(90deg, #10b981, #059669);
}

.stat-kpi-card.card-yesterday::before {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.stat-kpi-card.card-month::before {
  background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.stat-kpi-card.card-total::before {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.stat-kpi-label {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.stat-kpi-num {
  font-size: 30px;
  font-weight: 900;
  color: #1e293b;
  line-height: 1.1;
}

.stat-kpi-sub {
  font-size: 12.5px;
  color: #94a3b8;
  margin-top: 6px;
  font-weight: 500;
}

.stat-box {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
  overflow: hidden;
  min-width: 0;
}

.stat-box-title {
  font-size: 15px;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 175px;
  padding-top: 25px;
  padding-bottom: 5px;
  border-bottom: 1.5px solid #cbd5e1;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  min-width: 0;
}

.stat-bar-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

.stat-bar-col:hover .stat-bar-tooltip {
  opacity: 1;
  transform: translateY(-4px);
  pointer-events: auto;
}

.stat-bar-pillar {
  width: 100%;
  max-width: 28px;
  background: linear-gradient(180deg, #0d9488, #14b8a6);
  border-radius: 6px 6px 0 0;
  transition: height 0.4s ease-out, background 0.2s;
  cursor: pointer;
}

.stat-bar-pillar.today-bar {
  background: linear-gradient(180deg, #f59e0b, #fbbf24);
}

.stat-bar-pillar:hover {
  background: #0f766e;
  filter: brightness(1.1);
}

.stat-bar-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  margin-top: 8px;
  white-space: nowrap;
}

.stat-bar-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  background: #1e293b;
  color: #ffffff;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.stat-bar-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: #1e293b transparent transparent transparent;
}

.stat-progress-item {
  margin-bottom: 14px;
}

.stat-progress-item:last-child {
  margin-bottom: 0;
}

.stat-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.stat-progress-track {
  height: 9px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.stat-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

.fill-mobile {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.fill-desktop {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.fill-tablet {
  background: linear-gradient(90deg, #a855f7, #c084fc);
}

.fill-teal {
  background: linear-gradient(90deg, #0d9488, #2dd4bf);
}

.fill-amber {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.stat-table-compact {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.stat-table-compact th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1.5px solid #e2e8f0;
}

.stat-table-compact td {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.stat-table-compact tr:hover td {
  background: #f8fafc;
}

/* ==========================================================================
   스마트 에디터 글자색 및 배경색 팔레트 레이아웃 보완
   ========================================================================== */
.smart-editor-toolbar .color-group {
  position: relative;
}

.smart-editor-toolbar .ed-palette-popup {
  position: absolute;
  top: calc(100% + 6px);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.16), 0 4px 10px -2px rgba(15, 23, 42, 0.06);
  padding: 12px 14px;
  z-index: 150;
  width: 278px;
  box-sizing: border-box;
}

.smart-editor-toolbar #textColorPalette {
  left: -20px;
}

.smart-editor-toolbar #bgColorPalette {
  left: auto;
  right: -10px;
}

.smart-editor-toolbar .ed-palette-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.smart-editor-toolbar .ed-palette-head-title {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.smart-editor-toolbar .btn-color-reset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.smart-editor-toolbar .btn-color-reset:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.smart-editor-toolbar .btn-color-reset.btn-bg-clear {
  color: #ef4444;
  background: #fef2f2;
  border-color: #fecaca;
}

.smart-editor-toolbar .btn-color-reset.btn-bg-clear:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}