/* ==========================================================================
   요양24 - Component Styles (Premium — surpassing CareDoc quality)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Facility Card — Vertical Layout with Large Image (yoyang24 Style)
   -------------------------------------------------------------------------- */
.facility-card {
  display: flex;
  flex-direction: column;
  background-color: var(--card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
}

.facility-card:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.12);
  transform: translateY(-4px);
  color: inherit;
}

.facility-card:active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Image section - Large vertical image */
.facility-card-image {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
}

.facility-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease-out;
}

.facility-card:hover .facility-card-image img {
  transform: scale(1.05);
}

/* Image overlay gradient */
.facility-card-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
  pointer-events: none;
}

/* Badges on image */
.facility-card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 2;
}

.facility-card-badges-left {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.facility-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #A5B4FC;
}

.facility-card-placeholder svg { opacity: 0.5; }

/* Info section */
.facility-card-info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.facility-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 2px;
}

.facility-type-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  background-color: var(--primary-light);
  color: var(--primary);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.facility-card-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  letter-spacing: -0.02em;
}

.facility-card-region {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}

.facility-card-address {
  font-size: 13.5px;
  color: var(--subtext);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 4px;
}

.facility-card-address::before {
  content: '';
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.facility-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.facility-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.facility-card-capacity {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.capacity-text {
  font-size: 12px;
  color: var(--subtext);
  font-weight: 500;
}

/* Availability indicator */
.facility-card-availability {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.facility-card-availability--open {
  color: #fff;
  background: rgba(16, 185, 129, 0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.facility-card-availability--full {
  color: #fff;
  background: rgba(239, 68, 68, 0.85);
}

.facility-card-availability-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.facility-card-availability--open .facility-card-availability-dot {
  animation: fc-pulse 2s ease-in-out infinite;
}

@keyframes fc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.facility-card-cost {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
}

.cost-text {
  font-size: 13px;
  color: var(--primary, #2563EB);
  font-weight: 700;
}

.facility-card-established {
  display: flex;
  align-items: center;
}

.established-text {
  font-size: 12px;
  color: var(--text-tertiary, #94a3b8);
  font-weight: 500;
}

/* Rating styles */
.stars-small {
  color: #FBBF24;
  font-size: 13px;
}

.rating-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.review-count {
  font-size: 12px;
  color: var(--subtext);
}

/* Grid & List — 1 column on small mobile, 2 on mobile+, 3 on desktop */
.facility-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 480px) {
  .facility-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.facility-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.facility-list-item { position: relative; }

/* Premium Badge */
.badge-premium {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
  box-shadow: 0 2px 4px rgba(217, 119, 6, 0.3);
  z-index: 1;
}


/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  background: linear-gradient(165deg, #1E3A8A 0%, #2563EB 50%, #3B82F6 100%);
  padding: 60px var(--space-4) 52px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* 배경 비디오 */
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}

/* 비디오 위 어둡고 파란 오버레이 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, rgba(30, 58, 138, 0.75) 0%, rgba(37, 99, 235, 0.65) 50%, rgba(59, 130, 246, 0.60) 100%);
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -120px;
  left: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
}

.hero-inner {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--space-5);
  letter-spacing: 0.01em;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hero-title {
  font-size: 30px;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: var(--space-3);
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.hero-subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--space-7);
  font-weight: 400;
  line-height: 1.5;
}

.hero-search {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
}

.hero-search-row {
  display: flex;
  gap: var(--space-2);
}

.hero-select {
  flex: 1;
  height: 50px;
  border: none;
  border-radius: var(--radius-lg);
  padding: 0 var(--space-4);
  font-size: 15px;
  font-weight: 500;
  background-color: #FFFFFF;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.hero-select:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25), 0 2px 6px rgba(0, 0, 0, 0.06);
}

.hero-input {
  flex: 1;
  height: 50px;
  border: none;
  border-radius: var(--radius-lg);
  padding: 0 var(--space-4);
  font-size: 15px;
  font-weight: 500;
  background-color: #FFFFFF;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s;
}

.hero-input::placeholder { color: #9CA3AF; font-weight: 400; }
.hero-input:focus { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25), 0 2px 6px rgba(0, 0, 0, 0.06); }

.hero-btn {
  height: 50px;
  padding: 0 24px;
  background-color: #FFFFFF;
  color: var(--primary);
  border: none;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.hero-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.hero-btn svg { width: 18px; height: 18px; }


/* --------------------------------------------------------------------------
   Stats Bar — 신뢰 통계
   -------------------------------------------------------------------------- */
.stats-bar {
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  padding: var(--space-6) 0;
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 var(--space-4);
}

.stat-number {
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-number small {
  font-size: 16px;
  font-weight: 600;
  color: var(--subtext);
}

.stat-label {
  font-size: 13px;
  color: var(--subtext);
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background-color: var(--border);
}


/* --------------------------------------------------------------------------
   Quick Actions — 서비스 유형
   -------------------------------------------------------------------------- */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-3);
  background-color: var(--card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s;
}

.quick-action-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.10);
  transform: translateY(-4px);
  color: var(--text);
}

.quick-action-card:active { transform: translateY(-1px); }

.quick-action-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: linear-gradient(135deg, #EEF2FF, #DBEAFE);
}

.quick-action-label {
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  color: var(--text);
  letter-spacing: -0.02em;
}

.quick-action-desc {
  font-size: 12px;
  color: var(--subtext);
  font-weight: 500;
}


/* --------------------------------------------------------------------------
   Region Chips — 인기 지역
   -------------------------------------------------------------------------- */
.region-chips {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding: var(--space-1) 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.region-chips::-webkit-scrollbar { display: none; }

.region-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background-color: var(--bg-elevated);
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.region-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}

.region-chip.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--text-inverse);
}


/* --------------------------------------------------------------------------
   Review Item
   -------------------------------------------------------------------------- */
.review-item {
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--border-light);
}

.review-item:first-child { padding-top: 0; }
.review-item:last-child { border-bottom: none; padding-bottom: 0; }

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.review-user {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.review-user-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.review-relation {
  font-size: 11px;
  color: var(--subtext);
  padding: 2px 8px;
  background-color: var(--border-light);
  border-radius: var(--radius-full);
  font-weight: 500;
}

.review-date { font-size: 12px; color: #9CA3AF; }

.review-facility-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-2);
}

.review-facility-link:hover { text-decoration: underline; }

.review-rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.review-period {
  display: inline-block;
  font-size: 12px;
  color: var(--subtext);
  margin-bottom: var(--space-2);
  font-weight: 500;
}

.review-content {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.75;
  margin-bottom: var(--space-2);
}

.review-sub-ratings {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-light);
}

.sub-rating {
  font-size: 12px;
  color: var(--subtext);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: 500;
}

.sub-rating-stars { color: var(--accent); font-size: 12px; }

.review-list { display: flex; flex-direction: column; }

.review-form-card {
  background-color: var(--card);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
  border: 1px solid var(--border);
}

.star-select {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin-bottom: var(--space-4);
}

.star-btn {
  font-size: 36px;
  color: var(--border);
  cursor: pointer;
  transition: color 0.1s, transform 0.15s;
  line-height: 1;
  padding: 4px;
  background: none;
  border: none;
}

.star-btn:hover { transform: scale(1.15); }
.star-btn.selected { color: var(--accent); }


/* --------------------------------------------------------------------------
   Guide Cards — 요양 가이드
   -------------------------------------------------------------------------- */
.guide-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.guide-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  background-color: var(--card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
}

.guide-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
  color: inherit;
}

.guide-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: linear-gradient(135deg, #EEF2FF, #DBEAFE);
  flex-shrink: 0;
}

.guide-card-body { flex: 1; min-width: 0; }

.guide-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.guide-card-desc {
  font-size: 13px;
  color: var(--subtext);
  line-height: 1.5;
}

.guide-card-arrow {
  color: var(--border);
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}

.guide-card:hover .guide-card-arrow {
  color: var(--primary);
  transform: translateX(3px);
}


/* --------------------------------------------------------------------------
   Trust Banner — 신뢰 배너
   -------------------------------------------------------------------------- */
.trust-banner {
  background: linear-gradient(135deg, #1E3A8A 0%, #1E40AF 100%);
  padding: var(--space-9) 0;
  text-align: center;
}

.trust-inner {
  max-width: 560px;
  margin: 0 auto;
}

.trust-title {
  font-size: 22px;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}

.trust-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

.trust-badges {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
}


/* --------------------------------------------------------------------------
   Search Page
   -------------------------------------------------------------------------- */
div.search-page {
  display: flex;
  flex-direction: column;
}

.search-content { padding: var(--space-4); }

/* Filter Bar (mobile) */
.filter-bar {
  position: sticky;
  top: var(--header-height);
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  z-index: var(--z-sticky);
  padding: var(--space-2) var(--space-4);
}

.filter-chips {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar { display: none; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background-color: var(--bg-elevated);
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 44px;
}

.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background-color: var(--primary); border-color: var(--primary); color: var(--text-inverse); }
.filter-chip svg { width: 14px; height: 14px; }

/* Filter Sidebar (desktop) */
.filter-sidebar { display: none; }

.filter-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.filter-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

@media (min-width: 1024px) {
  div.search-page { flex-direction: row; gap: var(--space-6); }
  .filter-bar { display: none; }
  .filter-sidebar {
    display: block;
    width: 280px;
    flex-shrink: 0;
    padding: var(--space-5);
    background-color: var(--card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    position: sticky;
    top: calc(var(--header-height) + var(--space-4));
    max-height: calc(100vh - var(--header-height) - var(--space-8));
    overflow-y: auto;
    align-self: flex-start;
  }
  .search-content { flex: 1; min-width: 0; }
}

.search-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  background: var(--bg-elevated);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.result-header-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.result-count { font-size: 15px; color: var(--text); font-weight: 600; }

.result-filter-badges {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.result-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
}

/* Filter Sidebar Header */
.filter-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}

.filter-sidebar-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.filter-reset {
  font-size: 13px;
  font-weight: 600;
  color: var(--subtext);
  transition: color 0.15s;
}

.filter-reset:hover { color: var(--primary); }

.filter-form .filter-group {
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-light);
}

.filter-form .filter-group:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.filter-form .btn-block {
  min-height: 48px;
  font-size: 15px;
  font-weight: 700;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--space-10) var(--space-5);
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
}

.empty-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: var(--space-4);
  opacity: 0.7;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.empty-state p {
  font-size: 14px;
  color: var(--subtext);
}
.result-count strong { color: var(--primary); font-weight: 800; }

.view-toggle { display: flex; gap: var(--space-1); }

.view-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-elevated);
  color: var(--subtext);
  cursor: pointer;
  transition: all 0.15s;
}

.view-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--text-inverse);
}

.compare-float {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + var(--space-4));
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-sticky);
  display: flex;
  gap: var(--space-2);
  align-items: center;
  background: var(--card);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  border: 1px solid var(--border);
}

.compare-check {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--subtext);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 2;
  transition: all 0.2s ease;
}

.compare-check:hover {
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.compare-check input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}


/* --------------------------------------------------------------------------
   Facility Detail Page
   -------------------------------------------------------------------------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-3) var(--space-4);
  font-size: 13px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  color: #9CA3AF;
}

.breadcrumb::-webkit-scrollbar { display: none; }
.breadcrumb a { color: #9CA3AF; text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: var(--primary); }

.bookmarked { color: var(--error) !important; }

/* Detail Hero */
.detail-hero {
  background: linear-gradient(180deg, #F8FAFC 0%, var(--card) 100%);
  padding: var(--space-5) 0 var(--space-6);
  border-bottom: 1px solid var(--border);
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.detail-hero-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

/* Grade Badge (small - for cards) */
.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
}
.grade-badge.grade-a { background-color: var(--grade-a); }
.grade-badge.grade-b { background-color: var(--grade-b); }
.grade-badge.grade-c { background-color: var(--grade-c); }
.grade-badge.grade-d { background-color: var(--grade-d); }
.grade-badge.grade-e { background-color: var(--grade-e); }
.grade-badge.grade-none { background-color: #94A3B8; }

/* Grade Badge (large) */
.grade-badge-lg {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.grade-badge-lg.grade-a { background-color: var(--grade-a); }
.grade-badge-lg.grade-b { background-color: var(--grade-b); }
.grade-badge-lg.grade-c { background-color: var(--grade-c); }
.grade-badge-lg.grade-d { background-color: var(--grade-d); }
.grade-badge-lg.grade-e { background-color: var(--grade-e); }

.badge-premium-inline {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
}

.detail-hero-name {
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: var(--space-3);
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.detail-hero-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--subtext);
}

.detail-meta-item strong {
  font-weight: 700;
  color: var(--text);
}

/* Contact List */
.detail-contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.detail-contact-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 14px;
  color: var(--subtext);
  line-height: 1.5;
}

.detail-contact-row svg { flex-shrink: 0; }

.detail-phone-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.detail-phone-link:hover { text-decoration: underline; }

/* CTA Row */
.detail-cta-row {
  display: flex;
  gap: var(--space-2);
}

.detail-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.detail-cta-call {
  background-color: var(--primary);
  color: #fff;
  flex: 1;
}
.detail-cta-call:hover { background-color: var(--primary-dark); }

.detail-cta-consult {
  background-color: var(--secondary);
  color: #fff;
  flex: 1;
}
.detail-cta-consult:hover { opacity: 0.9; }

.detail-cta-bookmark {
  background-color: var(--card);
  color: var(--subtext);
  border: 1px solid var(--border);
  padding: 12px 16px;
}
.detail-cta-bookmark:hover { border-color: var(--error); color: var(--error); }
.detail-cta-bookmark.bookmarked { color: var(--error); border-color: var(--error); background-color: var(--error-light); }

/* Grade Gauge Card */
.detail-hero-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
}

.grade-gauge-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  text-align: center;
  width: 100%;
  max-width: 220px;
  box-shadow: var(--shadow-sm);
}

.grade-gauge-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--subtext);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.grade-gauge-circle {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto var(--space-3);
  background: none !important;
}

.grade-gauge-svg {
  width: 100%;
  height: 100%;
}

.grade-gauge-fill { transition: stroke-dasharray 1s ease; }
.grade-stroke-a { stroke: var(--grade-a); }
.grade-stroke-b { stroke: var(--grade-b); }
.grade-stroke-c { stroke: var(--grade-c); }
.grade-stroke-d { stroke: var(--grade-d); }
.grade-stroke-e { stroke: var(--grade-e); }

.grade-gauge-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.grade-gauge-letter {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}
.grade-a .grade-gauge-letter { color: var(--grade-a); }
.grade-b .grade-gauge-letter { color: var(--grade-b); }
.grade-c .grade-gauge-letter { color: var(--grade-c); }
.grade-d .grade-gauge-letter { color: var(--grade-d); }
.grade-e .grade-gauge-letter { color: var(--grade-e); }

.grade-gauge-score {
  font-size: 13px;
  font-weight: 600;
  color: var(--subtext);
  margin-top: 2px;
}

.grade-gauge-date {
  font-size: 12px;
  color: #9CA3AF;
}

/* Photo Gallery */
.photo-gallery { margin-bottom: var(--space-4); }

.photo-scroll {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-3) var(--space-4);
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.photo-scroll::-webkit-scrollbar { display: none; }

.gallery-photo {
  flex-shrink: 0;
  width: 220px;
  height: 160px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  scroll-snap-align: start;
}

.gallery-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-photo:hover img { transform: scale(1.05); }

/* Info Grid & Cards */
.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.detail-info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}

.detail-info-card-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-light);
}

.detail-info-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.detail-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-light);
}

.detail-info-row:last-child { border-bottom: none; }

.detail-info-label {
  font-size: 14px;
  color: var(--subtext);
  font-weight: 500;
  flex-shrink: 0;
  min-width: 80px;
}

.detail-info-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
  text-align: right;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.occupancy-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.text-sub-sm {
  font-size: 12px;
  color: #9CA3AF;
  font-weight: 400;
}

.link-primary {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.link-primary:hover { text-decoration: underline; }

.detail-empty-inline {
  padding: var(--space-4);
  text-align: center;
  color: var(--subtext);
  font-size: 14px;
  background: var(--border-light);
  border-radius: var(--radius-lg);
}

/* Map Section */
.detail-map-section {
  margin-bottom: var(--space-4);
}

.detail-map-box {
  width: 100%;
  height: 250px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
  margin-bottom: var(--space-2);
}

.detail-map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: var(--space-2) 0;
}
.detail-map-link:hover { text-decoration: underline; }

/* Staff Grid */
.detail-staff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.detail-staff-item {
  background: var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
}

.detail-staff-type {
  display: block;
  font-size: 13px;
  color: var(--subtext);
  font-weight: 500;
  margin-bottom: var(--space-1);
}

.detail-staff-count {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.detail-staff-count small {
  font-size: 13px;
  font-weight: 500;
  color: var(--subtext);
}

.detail-staff-total {
  background: var(--primary-light);
}
.detail-staff-total .detail-staff-count { color: var(--primary); }

.detail-staff-ratio {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--info-light);
  border-radius: var(--radius-lg);
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
}
.detail-staff-ratio strong { color: var(--primary); font-weight: 800; }

/* Amenity Grid */
.detail-amenity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.detail-amenity-item {
  background: var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.detail-amenity-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-1);
}

.detail-amenity-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--subtext);
}

.detail-amenity-area {
  color: #9CA3AF;
}

/* Program List */
.detail-program-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.detail-program-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--border-light);
  border-radius: var(--radius-lg);
}

.detail-program-type {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
}

.detail-program-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* Fee List */
.detail-fee-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.detail-fee-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-light);
}
.detail-fee-item:last-child { border-bottom: none; }

.detail-fee-name {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
}

.detail-fee-amount {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.detail-fee-amount small {
  font-size: 13px;
  font-weight: 500;
  color: var(--subtext);
}

.detail-fee-unit {
  font-size: 13px;
  color: var(--subtext);
  margin-left: 2px;
}

.detail-fee-total {
  background: var(--primary-light);
  border-radius: var(--radius-lg);
  border-bottom: none;
  margin-top: var(--space-2);
}
.detail-fee-total .detail-fee-name { font-weight: 700; color: var(--primary); }
.detail-fee-total .detail-fee-amount { color: var(--primary); }

/* Empty State */
.detail-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-9) var(--space-5);
  text-align: center;
}

.detail-empty-state svg { margin-bottom: var(--space-3); }

.detail-empty-state p {
  font-size: 14px;
  color: var(--subtext);
  font-weight: 500;
}

/* Status Badges */
.detail-status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.detail-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.detail-status-positive {
  background: #ECFDF5;
  color: #059669;
}

.detail-status-negative {
  background: #FEF2F2;
  color: #DC2626;
}

.detail-status-info {
  background: #EFF6FF;
  color: #2563EB;
}

/* Admission Card */
.admission-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  width: 100%;
  max-width: 220px;
  box-shadow: var(--shadow-sm);
}

.admission-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--subtext);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.admission-stat-row {
  display: flex;
  justify-content: space-around;
  margin-bottom: var(--space-3);
}

.admission-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.admission-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.admission-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--subtext);
}

.admission-stat-highlight .admission-stat-value {
  color: var(--primary);
}

.admission-bar-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.admission-bar {
  flex: 1;
  height: 8px;
  background: #E5E7EB;
  border-radius: 4px;
  overflow: hidden;
}

.admission-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.admission-bar-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--subtext);
  flex-shrink: 0;
}

/* Summary Cards (기본정보 탭 상단) */
.detail-summary-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.detail-summary-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.detail-summary-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-summary-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.detail-summary-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--subtext);
}

.detail-summary-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

/* Staff Summary Banner */
.staff-summary-banner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-5);
  background: linear-gradient(135deg, #F0F9FF, #EFF6FF);
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-5);
}

.staff-summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.staff-summary-number {
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}

.staff-summary-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--subtext);
  white-space: nowrap;
}

.staff-summary-divider {
  width: 1px;
  height: 36px;
  background: #BFDBFE;
}

.staff-summary-badge {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.staff-badge-good {
  background: #ECFDF5;
  color: #059669;
}

.staff-badge-warn {
  background: #FEF2F2;
  color: #DC2626;
}

/* Staff Category Sections */
.staff-category {
  margin-bottom: var(--space-5);
}

.staff-category-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--border-light);
}

.staff-category-count {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--subtext);
}

.staff-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

/* Amenity Summary Banner */
.amenity-summary-banner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: var(--border-light);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-5);
}

.amenity-summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.amenity-summary-number {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.amenity-summary-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--subtext);
  white-space: nowrap;
}

.detail-amenity-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
}

/* Program Summary & Groups */
.program-summary-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, #FDF2F8, #FEF3C7);
  border: 1px solid #FBCFE8;
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-5);
}

.program-summary-count {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.program-type-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-left: auto;
}

.program-type-tag {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  color: var(--text-light);
  border: 1px solid #E5E7EB;
}

.program-group {
  margin-bottom: var(--space-5);
}

.program-group-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.program-group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
}

.program-group-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.program-group-list .detail-program-item {
  display: inline-flex;
  padding: var(--space-2) var(--space-4);
  background: var(--border-light);
  border-radius: var(--radius-full);
}

.program-group-list .detail-program-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
}

/* Fee Header Card & Table */
.fee-header-card {
  background: linear-gradient(135deg, #1E40AF, #2563EB);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  color: #fff;
  margin-bottom: var(--space-5);
  text-align: center;
}

.fee-header-label {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.8;
  margin-bottom: var(--space-2);
}

.fee-header-amount {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.fee-header-amount small {
  font-size: 18px;
  font-weight: 600;
  opacity: 0.8;
}

.fee-header-note {
  font-size: 12px;
  opacity: 0.6;
  margin-top: var(--space-2);
}

.fee-table {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.fee-table-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--border-light);
  font-size: 12px;
  font-weight: 700;
  color: var(--subtext);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fee-table-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-light);
  align-items: center;
}

.fee-table-row:last-child { border-bottom: none; }

.fee-table-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
}

.fee-table-amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}

.fee-table-unit {
  font-size: 13px;
  color: var(--subtext);
  text-align: right;
  min-width: 30px;
}

/* Desktop: 2-column layout for hero */
@media (min-width: 768px) {
  .detail-hero-grid {
    grid-template-columns: 1fr 260px;
    align-items: start;
  }

  .detail-info-grid {
    grid-template-columns: 1fr 1fr;
  }

  .staff-category-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .detail-amenity-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .detail-summary-cards {
    grid-template-columns: repeat(4, 1fr);
  }

  .fee-table-header,
  .fee-table-row {
    grid-template-columns: 1fr 120px 60px;
  }
}

.program-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  background-color: var(--border-light);
  color: var(--text-light);
  transition: background-color 0.15s;
}

/* Rating Summary */
.rating-summary {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-bottom: var(--space-5);
  padding: var(--space-5);
  background-color: var(--border-light);
  border-radius: var(--radius-xl);
}

.rating-summary-big { text-align: center; flex-shrink: 0; }

.rating-number {
  font-size: 48px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.03em;
}

.rating-stars {
  display: flex;
  justify-content: center;
  color: var(--accent);
  font-size: 18px;
}

.rating-total {
  font-size: 13px;
  color: var(--subtext);
  margin-top: var(--space-1);
  font-weight: 500;
}

.rating-breakdown { flex: 1; }

.rating-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 6px;
}

.rating-bar-label {
  font-size: 13px;
  color: var(--subtext);
  width: 24px;
  text-align: right;
  flex-shrink: 0;
  font-weight: 600;
}

.rating-bar {
  flex: 1;
  height: 8px;
  background-color: #E5E7EB;
  border-radius: 4px;
  overflow: hidden;
}

.rating-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #F59E0B);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.rating-bar-value {
  font-size: 12px;
  color: var(--subtext);
  width: 28px;
  flex-shrink: 0;
  font-weight: 500;
}


/* --------------------------------------------------------------------------
   Sub Rating Grid (Review Form)
   -------------------------------------------------------------------------- */
.sub-rating-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  background-color: var(--border-light);
  border-radius: var(--radius-lg);
}

.form-group-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.form-group-inline label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
}

.form-group-inline .form-select-sm {
  width: 160px;
  flex-shrink: 0;
}


/* --------------------------------------------------------------------------
   Auth Pages (Login / Register)
   -------------------------------------------------------------------------- */
.auth-card {
  max-width: 440px;
  margin: var(--space-8) auto;
  padding: var(--space-7);
  background-color: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-7);
}

.auth-logo-icon { font-size: 32px; }

.auth-logo-text {
  font-size: 24px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.02em;
}

.auth-logo-text span { color: var(--primary); }


/* --------------------------------------------------------------------------
   Tabs Container (Sticky) - Generic
   -------------------------------------------------------------------------- */
.tabs-container {
  position: sticky;
  top: var(--header-height);
  z-index: var(--z-sticky);
  background-color: var(--bg-elevated);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   Detail Page Tabs
   -------------------------------------------------------------------------- */
.detail-tabs-container {
  position: sticky;
  top: var(--header-height);
  z-index: var(--z-sticky);
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.detail-tabs {
  display: flex;
  gap: var(--space-1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: var(--space-3) 0;
}

.detail-tabs::-webkit-scrollbar { display: none; }

.detail-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--subtext);
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border: 1.5px solid transparent;
  border-radius: var(--radius-full);
  transition: all 0.2s;
  flex-shrink: 0;
}

.detail-tab svg {
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.detail-tab:hover {
  color: var(--text);
  background: var(--border-light);
}

.detail-tab:hover svg { opacity: 0.8; }

.detail-tab.active {
  color: var(--primary);
  background: var(--primary-light);
  border-color: var(--primary);
  font-weight: 700;
}

.detail-tab.active svg { opacity: 1; }

.detail-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  font-style: normal;
  background: var(--primary);
  color: #fff;
  line-height: 1;
}

.detail-tab.active .detail-tab-count {
  background: var(--primary);
  color: #fff;
}

.detail-tab-contents {
  padding: var(--space-6) 0;
  min-height: 300px;
}


/* --------------------------------------------------------------------------
   Bottom Sheet
   -------------------------------------------------------------------------- */
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-bottom-sheet);
  background-color: var(--bg-elevated);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
  max-height: 85vh;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
}

.bottom-sheet.open { transform: translateY(0); }

.bottom-sheet-handle {
  display: flex;
  justify-content: center;
  padding: var(--space-3) 0 var(--space-2);
  cursor: grab;
}

.bottom-sheet-handle::before {
  content: '';
  width: 40px;
  height: 4px;
  background-color: var(--border);
  border-radius: 2px;
}

.bottom-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4) var(--space-3);
  border-bottom: 1px solid var(--border);
}

.bottom-sheet-header h3 { font-size: 18px; font-weight: 800; }

.bottom-sheet-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--subtext);
  cursor: pointer;
  background: none;
  border: none;
  font-size: 20px;
  transition: background-color 0.15s;
}

.bottom-sheet-close:hover { background-color: var(--border-light); }

.bottom-sheet-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-4);
}


/* --------------------------------------------------------------------------
   Compare Page
   -------------------------------------------------------------------------- */
.compare-table {
  min-width: 600px;
  border-collapse: collapse;
  width: 100%;
}

.compare-table th,
.compare-table td {
  padding: var(--space-3) var(--space-4);
  font-size: 14px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  vertical-align: top;
}

.compare-table th {
  font-weight: 700;
  color: var(--subtext);
  background-color: var(--border-light);
  white-space: nowrap;
}

.compare-label-col { width: 100px; min-width: 100px; }
.compare-facility-col { min-width: 180px; text-align: center; }

.compare-facility-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: var(--space-1);
}


/* --------------------------------------------------------------------------
   Match Request Page
   -------------------------------------------------------------------------- */
.step-progress { padding: var(--space-4); }

.step-progress-bar {
  height: 6px;
  background-color: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.step-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #60A5FA);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.step-progress-labels { display: flex; justify-content: space-between; }

.step-label { font-size: 12px; color: var(--subtext); font-weight: 500; }
.step-label.active { color: var(--primary); font-weight: 800; }

.step-panel { display: none; }
.step-panel.active { display: block; animation: fadeIn 0.2s ease; }


/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--space-7) 0 var(--space-6);
}

.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--subtext);
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.page-btn:hover { background-color: var(--border-light); color: var(--text); }
.page-btn.active {
  background-color: var(--primary);
  color: var(--text-inverse);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }


/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0;
  position: relative;
}

.footer-accent {
  height: 2px;
  background: linear-gradient(90deg, var(--primary), #6366F1, var(--primary));
}

.footer > .container {
  padding-top: var(--space-9);
  padding-bottom: var(--space-7);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-7) var(--space-5);
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-brand { grid-column: 1 / -1; }

.footer-title {
  font-size: 14px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
  position: relative;
  padding-bottom: var(--space-2);
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.footer-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s, text-decoration-color 0.2s;
  font-weight: 500;
  text-decoration: underline transparent;
  text-underline-offset: 3px;
}

.footer-links a:hover {
  color: #FFFFFF;
  text-decoration-color: rgba(255, 255, 255, 0.3);
}

.footer-business {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.8;
}

.footer-bottom {
  margin-top: var(--space-4);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.footer-copyright {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.15s;
}

.footer-legal a:hover { color: #FFFFFF; }

.footer-legal-sep {
  color: rgba(255, 255, 255, 0.15);
  font-size: 11px;
}


/* --------------------------------------------------------------------------
   Map Container
   -------------------------------------------------------------------------- */
.map-container {
  width: 100%;
  height: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
}


/* --------------------------------------------------------------------------
   Skeleton Loading
   -------------------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, #E8EAED 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius-md);
}


/* --------------------------------------------------------------------------
   Responsive: Tablet (min-width: 768px)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .facility-list { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
  .facility-card-image { height: 200px; }
  .facility-card-name { font-size: 18px; }

  .hero { padding: 72px var(--space-6) 60px; }
  .hero-title { font-size: 36px; }
  .hero-subtitle { font-size: 16px; }
  .hero-search { padding: var(--space-5); }

  .quick-actions { grid-template-columns: repeat(4, 1fr); }

  .stats-grid { gap: var(--space-8); }
  .stat-number { font-size: 32px; }

  .guide-cards { display: grid; grid-template-columns: repeat(3, 1fr); }

  .facility-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }

  .gallery-photo { width: 260px; height: 180px; }
  .detail-name { font-size: 28px; }
  .map-container, .map-box { height: 350px; }

  .sub-rating-grid { grid-template-columns: 1fr 1fr; }
  .auth-card { margin: var(--space-10) auto; }
  .rating-bar-label { width: 70px; }
  .rating-summary { padding: var(--space-6); }

  .trust-title { font-size: 26px; }
}


/* --------------------------------------------------------------------------
   Responsive: Desktop (min-width: 1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .facility-list { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
  .facility-card-image { height: 220px; }
  .facility-card-name { font-size: 18px; }

  .hero { padding: 80px var(--space-7) 68px; }
  .hero-title { font-size: 42px; }
  .hero-inner { max-width: 640px; }
  .hero-search { padding: var(--space-5); }
  .hero-search-row { gap: var(--space-3); }
  .hero-select, .hero-input { height: 54px; font-size: 16px; }
  .hero-btn { height: 54px; padding: 0 28px; font-size: 16px; }

  .quick-actions { gap: var(--space-4); }
  .quick-action-card { padding: var(--space-7) var(--space-4); }
  .quick-action-icon { width: 68px; height: 68px; font-size: 34px; border-radius: 20px; }
  .quick-action-label { font-size: 16px; }

  .facility-grid { grid-template-columns: repeat(2, 1fr); }

  .detail-name { font-size: 32px; }
  .detail-header { padding: var(--space-5) 0 var(--space-6); }
  .detail-actions .btn { min-height: 50px; font-size: 15px; }

  .sub-rating-grid { grid-template-columns: repeat(3, 1fr); }

  .stats-grid { gap: var(--space-10); }
  .stat-number { font-size: 36px; }

  .trust-title { font-size: 28px; }

  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}

/* Services page CSS is now inline in the template (svc- prefix) */

/* Service Apply Page */
.service-apply-header {
  text-align: center;
  margin-bottom: var(--space-6);
}
.service-apply-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.service-apply-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--muted);
  border-radius: var(--radius-lg);
  margin-top: var(--space-4);
}
.service-apply-note p {
  font-size: 13px;
  color: var(--subtext);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Alert / Flash Messages
   -------------------------------------------------------------------------- */
.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
}
.alert-error {
  background: var(--error-light);
  color: #991B1B;
  border: 1px solid #FECACA;
}
.alert-success {
  background: var(--success-light);
  color: #065F46;
  border: 1px solid #A7F3D0;
}
.alert-warning {
  background: var(--warning-light);
  color: #92400E;
  border: 1px solid #FDE68A;
}
.alert-info {
  background: var(--info-light);
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

/* Desktop - Services */
@media (min-width: 768px) {
  .services-hero-title { font-size: 36px; }
  .services-trust-grid { grid-template-columns: repeat(3, 1fr); }
  .service-detail-grid { grid-template-columns: 1fr 1fr; }
  .services-cta h2 { font-size: 26px; }
}

/* --------------------------------------------------------------------------
   Vacancy Dashboard (빈자리 현황)
   -------------------------------------------------------------------------- */
.vacancy-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 100%);
  color: #fff;
  padding: var(--space-10) 0 var(--space-8);
  text-align: center;
}
.vacancy-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 16px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22C55E;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
.vacancy-hero-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: var(--space-2);
}
.vacancy-hero-sub {
  font-size: 15px;
  opacity: 0.8;
  margin-bottom: var(--space-6);
}
.vacancy-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  max-width: 600px;
  margin: 0 auto;
}
.vacancy-stat-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-3);
}
.vacancy-stat-card.accent {
  background: rgba(37,99,235,0.3);
  border-color: rgba(37,99,235,0.5);
}
.vacancy-stat-number {
  display: block;
  font-size: 26px;
  font-weight: 800;
}
.vacancy-stat-label {
  display: block;
  font-size: 12px;
  opacity: 0.7;
  margin-top: 2px;
}

/* Region Bar */
.vacancy-region-bar {
  padding: var(--space-5) 0;
  background: var(--muted);
}
.vacancy-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--heading);
}
.vacancy-region-grid {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  scrollbar-width: none;
}
.vacancy-region-grid::-webkit-scrollbar { display: none; }
.vacancy-region-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-2) var(--space-3);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  min-width: 70px;
}
.vacancy-region-card:hover, .vacancy-region-card.active {
  border-color: var(--primary);
  background: #EFF6FF;
  color: var(--primary);
}
.vacancy-region-name { font-size: 13px; font-weight: 600; }
.vacancy-region-count { font-size: 11px; color: var(--subtext); }

/* Filters */
.vacancy-filter-section {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}
.vacancy-filters {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.vacancy-filters .form-select {
  flex: 1;
  min-width: 120px;
  max-width: 200px;
}
.vacancy-result-count {
  margin-top: var(--space-3);
  font-size: 14px;
  color: var(--subtext);
}

/* Vacancy List */
.vacancy-list-section { padding: var(--space-5) 0; }
.vacancy-list { display: flex; flex-direction: column; gap: var(--space-2); }

.vacancy-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.vacancy-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(37,99,235,0.08);
  color: inherit;
}
.vacancy-item-rank {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--subtext);
  flex-shrink: 0;
}
.vacancy-item-body { flex: 1; min-width: 0; }
.vacancy-item-header {
  display: flex; align-items: center; gap: var(--space-2);
  flex-wrap: wrap;
}
.vacancy-item-name {
  font-size: 15px; font-weight: 600; color: var(--heading);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vacancy-grade-badge {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700;
}
.vacancy-grade-badge.grade-a { background: #DCFCE7; color: #166534; }
.vacancy-grade-badge.grade-b { background: #DBEAFE; color: #1E40AF; }
.vacancy-grade-badge.grade-c { background: #FEF3C7; color: #92400E; }
.vacancy-grade-badge.grade-d { background: #FEE2E2; color: #991B1B; }

.vacancy-item-address {
  font-size: 13px; color: var(--subtext);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.vacancy-item-meta {
  display: flex; gap: var(--space-3); margin-top: 4px;
  font-size: 12px; color: var(--subtext);
}
.vacancy-item-stats {
  text-align: center;
  flex-shrink: 0;
  min-width: 70px;
}
.vacancy-count-big { display: flex; align-items: baseline; justify-content: center; gap: 2px; }
.vacancy-number { font-size: 22px; font-weight: 800; color: var(--primary); }
.vacancy-unit { font-size: 12px; color: var(--subtext); }
.vacancy-bar-mini {
  height: 4px;
  background: var(--muted);
  border-radius: 2px;
  margin: 4px 0 2px;
  overflow: hidden;
}
.vacancy-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s;
}
.vacancy-occupancy { font-size: 11px; color: var(--subtext); }

.vacancy-empty {
  text-align: center;
  padding: var(--space-10);
  color: var(--subtext);
}

/* Vacancy CTA */
.vacancy-cta {
  text-align: center;
  padding: var(--space-8);
  background: linear-gradient(135deg, var(--primary) 0%, #1D4ED8 100%);
  border-radius: var(--radius-xl);
  margin: var(--space-6) 0;
  color: #fff;
}
.vacancy-cta h2 { font-size: 22px; font-weight: 800; margin-bottom: var(--space-2); }
.vacancy-cta p { font-size: 14px; opacity: 0.9; margin-bottom: var(--space-5); }
.vacancy-cta-actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }
.btn-white {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: #fff; color: var(--primary);
  border-radius: var(--radius-lg); font-weight: 600; font-size: 14px;
  text-decoration: none; transition: background 0.2s, transform 0.2s;
}
.btn-white:hover { background: #F8FAFC; transform: translateY(-1px); color: var(--primary); }
.btn-outline-white {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-lg); font-weight: 600; font-size: 14px;
  text-decoration: none; transition: background 0.2s;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* --------------------------------------------------------------------------
   Analytics (지역별 분석)
   -------------------------------------------------------------------------- */
.analytics-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #fff;
  padding: var(--space-10) 0 var(--space-8);
  text-align: center;
}
.analytics-hero-title {
  font-size: 28px; font-weight: 800; margin-bottom: var(--space-2);
}
.analytics-hero-sub {
  font-size: 15px; opacity: 0.8; margin-bottom: var(--space-6);
}
.analytics-breadcrumb {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  margin-bottom: var(--space-4);
  font-size: 13px;
}
.analytics-breadcrumb a {
  color: rgba(255,255,255,0.7); text-decoration: none;
}
.analytics-breadcrumb a:hover { color: #fff; }
.analytics-breadcrumb span { color: #fff; font-weight: 600; }

.analytics-region-switch {
  display: flex; flex-wrap: wrap; gap: var(--space-1);
  justify-content: center;
  margin-bottom: var(--space-6);
}
.analytics-region-chip {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all 0.2s;
}
.analytics-region-chip:hover { background: rgba(255,255,255,0.15); color: #fff; }
.analytics-region-chip.active { background: var(--primary); color: #fff; }

.analytics-summary-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  max-width: 700px;
  margin: 0 auto;
}
.analytics-summary-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-3);
  text-align: center;
}
.analytics-summary-icon { font-size: 24px; margin-bottom: var(--space-1); }
.analytics-summary-number {
  display: block; font-size: 24px; font-weight: 800;
}
.analytics-summary-label {
  display: block; font-size: 12px; opacity: 0.7; margin-top: 2px;
}

/* Analytics Sections */
.analytics-section {
  padding: var(--space-8) 0;
}
.analytics-section-title {
  font-size: 20px; font-weight: 800; color: var(--heading);
  margin-bottom: var(--space-1);
}
.analytics-section-sub {
  font-size: 14px; color: var(--subtext);
  margin-bottom: var(--space-5);
}

/* Analytics Table */
.analytics-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}
.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.analytics-table thead th {
  padding: var(--space-3) var(--space-4);
  background: var(--muted);
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--subtext);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.analytics-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
  white-space: nowrap;
}
.analytics-row {
  cursor: pointer;
  transition: background 0.15s;
}
.analytics-row:hover {
  background: #F8FAFC;
}
.analytics-rank {
  font-weight: 700; color: var(--subtext);
  text-align: center;
}
.analytics-region-name strong {
  color: var(--heading);
}
.analytics-a-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: #DCFCE7;
  color: #166534;
  font-size: 12px; font-weight: 600;
}
.analytics-vacancy-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: #DBEAFE;
  color: #1E40AF;
  font-size: 12px; font-weight: 600;
}
.analytics-no-vacancy {
  color: var(--subtext);
}
.analytics-bar-cell {
  display: flex; align-items: center; gap: var(--space-2);
}
.analytics-mini-bar {
  width: 60px; height: 6px;
  background: var(--muted);
  border-radius: 3px;
  overflow: hidden;
}
.analytics-mini-fill {
  height: 100%;
  background: #22C55E;
  border-radius: 3px;
}

/* Analytics Ranking */
.analytics-ranking {
  display: flex; flex-direction: column; gap: var(--space-2);
}
.analytics-rank-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  text-decoration: none; color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.analytics-rank-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(37,99,235,0.08);
  color: inherit;
}
.analytics-rank-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--subtext);
  flex-shrink: 0;
}
.analytics-rank-num.top3 {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
}
.analytics-rank-body { flex: 1; min-width: 0; }
.analytics-rank-name {
  font-size: 15px; font-weight: 600; color: var(--heading);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.analytics-rank-address {
  font-size: 13px; color: var(--subtext);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.analytics-rank-badges {
  display: flex; gap: var(--space-1); flex-shrink: 0; flex-wrap: wrap;
}
.analytics-score-badge {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--muted);
  font-size: 11px; font-weight: 600; color: var(--text);
}

/* Analytics Source */
.analytics-source {
  padding: var(--space-6) 0;
}
.analytics-source-card {
  padding: var(--space-5);
  background: var(--muted);
  border-radius: var(--radius-xl);
  text-align: center;
}
.analytics-source-card h3 {
  font-size: 16px; font-weight: 700; margin-bottom: var(--space-2);
}
.analytics-source-card p {
  font-size: 13px; color: var(--subtext); margin-bottom: var(--space-3);
}
.analytics-source-badges {
  display: flex; gap: var(--space-2); justify-content: center; flex-wrap: wrap;
}

/* Home - Vacancy Banner */
.home-vacancy-banner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 100%);
  border-radius: var(--radius-xl);
  color: #fff;
  flex-wrap: wrap;
}
.home-vacancy-stat { text-align: center; flex: 1; min-width: 100px; }
.home-vacancy-number { display: block; font-size: 28px; font-weight: 800; }
.home-vacancy-label { display: block; font-size: 12px; opacity: 0.7; margin-top: 2px; }
.home-vacancy-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.2); }
.home-vacancy-btn {
  display: inline-flex; align-items: center;
  padding: var(--space-3) var(--space-5);
  background: var(--primary);
  color: #fff; font-weight: 600; font-size: 14px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}
.home-vacancy-btn:hover { background: #1D4ED8; transform: translateY(-1px); color: #fff; }

/* Home - Region Grid */
.home-region-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
.home-region-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.home-region-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(37,99,235,0.08);
  transform: translateY(-2px);
  color: inherit;
}
.home-region-name { font-size: 16px; font-weight: 700; color: var(--heading); }
.home-region-total { font-size: 13px; color: var(--subtext); }
.home-region-badges { display: flex; gap: var(--space-1); flex-wrap: wrap; margin-top: var(--space-1); }
.home-region-badge {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600;
}
.home-region-badge.badge-a { background: #DCFCE7; color: #166534; }
.home-region-badge.badge-v { background: #DBEAFE; color: #1E40AF; }

/* --------------------------------------------------------------------------
   Facility Admin Dashboard (시설 관리자)
   -------------------------------------------------------------------------- */
.fadmin-hero {
  background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
  color: #fff;
  padding: var(--space-8) 0;
  text-align: center;
}
.fadmin-hero-title { font-size: 24px; font-weight: 800; margin-bottom: var(--space-1); }
.fadmin-hero-sub { font-size: 15px; opacity: 0.8; }

.fadmin-stats-section { padding: var(--space-5) 0; }
.fadmin-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
.fadmin-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  text-align: center;
}
.fadmin-stat-card.accent {
  border-color: var(--primary);
  background: #EFF6FF;
}
.fadmin-stat-icon { font-size: 20px; margin-bottom: var(--space-1); }
.fadmin-stat-number { display: block; font-size: 24px; font-weight: 800; color: var(--heading); }
.fadmin-stat-label { display: block; font-size: 12px; color: var(--subtext); margin-top: 2px; }

.fadmin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
.fadmin-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}
.fadmin-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--space-4);
}
.fadmin-card-header h2 { font-size: 16px; font-weight: 700; }
.fadmin-edit-btn {
  padding: 4px 14px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.fadmin-edit-btn:hover { background: #1D4ED8; color: #fff; }

.fadmin-info-list { display: flex; flex-direction: column; gap: var(--space-2); }
.fadmin-info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
}
.fadmin-info-label { font-size: 13px; color: var(--subtext); font-weight: 500; }
.fadmin-info-value { font-size: 14px; color: var(--heading); font-weight: 600; text-align: right; }
.fadmin-view-link {
  display: block;
  margin-top: var(--space-4);
  text-align: center;
  font-size: 14px; color: var(--primary);
  text-decoration: none; font-weight: 600;
}
.fadmin-view-link:hover { text-decoration: underline; }

.fadmin-quick-form { display: flex; flex-direction: column; gap: var(--space-3); }
.fadmin-quick-row label { margin-bottom: var(--space-1); }
.fadmin-quick-help { font-size: 12px; color: var(--subtext); margin: 0; }

.fadmin-section-title {
  font-size: 18px; font-weight: 700; color: var(--heading);
  margin-bottom: var(--space-4);
}

.fadmin-consultations { display: flex; flex-direction: column; gap: var(--space-3); }
.fadmin-consult-item {
  padding: var(--space-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}
.fadmin-consult-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--space-2);
}
.fadmin-consult-name { font-size: 15px; font-weight: 600; color: var(--heading); }
.fadmin-consult-status {
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600;
}
.fadmin-consult-status.status-new { background: #FEE2E2; color: #991B1B; }
.fadmin-consult-status.status-contacted { background: #FEF3C7; color: #92400E; }
.fadmin-consult-status.status-completed { background: #DCFCE7; color: #166534; }
.fadmin-consult-phone { font-size: 13px; color: var(--subtext); margin-bottom: var(--space-1); }
.fadmin-consult-msg {
  font-size: 14px; color: var(--text);
  background: var(--muted);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
}
.fadmin-consult-footer {
  display: flex; justify-content: space-between; align-items: center;
}
.fadmin-consult-date { font-size: 12px; color: var(--subtext); }
.fadmin-consult-btn {
  padding: 4px 14px;
  border-radius: var(--radius-full);
  background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 600;
  border: none; cursor: pointer;
  transition: background 0.2s;
}
.fadmin-consult-btn:hover { background: #1D4ED8; }

.fadmin-empty, .fadmin-empty-small {
  text-align: center; padding: var(--space-8); color: var(--subtext);
}
.fadmin-empty h2 { font-size: 18px; color: var(--heading); margin-bottom: var(--space-2); }

.fadmin-edit-form { display: flex; flex-direction: column; gap: var(--space-4); }
.fadmin-edit-form .form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3);
}
.fadmin-edit-actions {
  display: flex; gap: var(--space-3); justify-content: flex-end;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

/* Desktop - All sections */
@media (min-width: 768px) {
  .vacancy-hero-title { font-size: 36px; }
  .vacancy-stats { max-width: 700px; }
  .vacancy-stat-number { font-size: 32px; }
  .vacancy-filters { flex-wrap: nowrap; }
  .analytics-hero-title { font-size: 36px; }
  .analytics-summary-cards { grid-template-columns: repeat(4, 1fr); }
  .analytics-summary-number { font-size: 28px; }
  .home-region-grid { grid-template-columns: repeat(4, 1fr); }
  .home-vacancy-banner { flex-wrap: nowrap; }
  .fadmin-stats-grid { grid-template-columns: repeat(4, 1fr); }
  .fadmin-grid { grid-template-columns: 1fr 1fr; }
  .fadmin-hero-title { font-size: 28px; }
}


/* ==========================================================================
   Facility Detail — 케어닥 스타일 카드 기반 디자인 (fd- prefix)
   ========================================================================== */

/* ---- CSS Variables for Facility Detail ---- */
:root {
  --fd-gradient-start: #1E3A8A;
  --fd-gradient-end: #3B82F6;
  --fd-overlay: rgba(0,0,0,0.6);
  --fd-glass: rgba(255,255,255,0.95);
  --fd-grade-a: #166534;
  --fd-grade-b: #1E40AF;
  --fd-grade-c: #92400E;
  --fd-grade-d: #9A3412;
  --fd-grade-e: #991B1B;
}

/* ---- Hero Image Gallery (CareDoc Style - Centered & Clean) ---- */
.fd-hero {
  position: relative;
  background: #F8FAFC;
}
.fd-slider {
  position: relative;
  overflow: hidden;
  background: #F1F5F9;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 0;
}
/* 모바일: 4:3 비율 */
@media (max-width: 767px) {
  .fd-slider {
    aspect-ratio: 4 / 3;
    max-height: 320px;
  }
}
/* 태블릿/데스크탑: 16:9 비율, 중앙 정렬 */
@media (min-width: 768px) {
  .fd-hero {
    padding: 16px 16px 0;
  }
  .fd-slider {
    aspect-ratio: 16 / 9;
    max-height: 500px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  }
}
@media (min-width: 1024px) {
  .fd-hero {
    padding: 24px 24px 0;
  }
  .fd-slider {
    max-height: 540px;
    border-radius: 20px;
  }
}
.fd-slider-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  height: 100%;
}
.fd-slide {
  flex: 0 0 100%;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F1F5F9;
}
.fd-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.fd-slide-error img {
  object-fit: contain;
  background: #F1F5F9;
}

/* Hero Overlay with Gradient - CareDoc style */
.fd-slider-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px 20px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  pointer-events: none;
  z-index: 5;
}
@media (min-width: 768px) {
  .fd-slider-overlay {
    padding: 60px 28px 24px;
    border-radius: 0 0 16px 16px;
  }
}
@media (min-width: 1024px) {
  .fd-slider-overlay {
    padding: 80px 32px 28px;
    border-radius: 0 0 20px 20px;
  }
}
.fd-hero-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  pointer-events: auto;
}
.fd-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.fd-hero-badge-grade {
  background: rgba(255,255,255,0.95);
}
.fd-hero-badge-grade-a { color: var(--fd-grade-a); }
.fd-hero-badge-grade-b { color: var(--fd-grade-b); }
.fd-hero-badge-grade-c { color: var(--fd-grade-c); }
.fd-hero-badge-grade-d { color: var(--fd-grade-d); }
.fd-hero-badge-grade-e { color: var(--fd-grade-e); }
.fd-hero-badge-type {
  background: rgba(37, 99, 235, 0.9);
  color: #fff;
}
.fd-hero-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  line-height: 1.3;
}
.fd-hero-address {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  margin: 0;
}
.fd-hero-address svg {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

/* Slider Controls */
.fd-slider-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 6px 14px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  letter-spacing: 0.5px;
  z-index: 10;
}
.fd-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #1E293B;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  opacity: 0;
  transition: all 0.25s;
  z-index: 10;
}
.fd-slider:hover .fd-slider-arrow { opacity: 1; }
.fd-slider-prev { left: 12px; }
.fd-slider-next { right: 12px; }
.fd-slider-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.fd-slider-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

/* Slider Dots */
.fd-slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}
.fd-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.2s;
}
.fd-slider-dot.active {
  background: #fff;
  width: 24px;
  border-radius: 4px;
}

/* Gallery Empty State */
.fd-gallery-empty {
  padding: var(--space-9) var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  color: #64748B;
  background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
  aspect-ratio: 4 / 3;
  max-height: 50vh;
  justify-content: center;
}
.fd-gallery-empty svg {
  opacity: 0.5;
}
.fd-gallery-empty p {
  font-size: 15px;
  margin: 0;
  font-weight: 500;
}

/* Simple Hero (no photos) */
.fd-hero-simple {
  background: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 100%);
  padding: 36px 16px;
}
.fd-hero-simple-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.fd-hero-simple .fd-hero-badges {
  margin-bottom: 14px;
}
.fd-hero-simple .fd-hero-badge-grade {
  background: #fff;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.fd-hero-simple .fd-hero-badge-type {
  background: var(--primary);
}
.fd-hero-simple .fd-hero-title {
  font-size: 24px;
  text-shadow: none;
  color: var(--text);
}
.fd-hero-simple .fd-hero-address {
  color: #64748B;
}
@media (min-width: 768px) {
  .fd-hero-simple { padding: 52px 24px; }
  .fd-hero-simple .fd-hero-title { font-size: 30px; }
}
@media (min-width: 1024px) {
  .fd-hero-simple { padding: 60px 32px; }
  .fd-hero-simple .fd-hero-title { font-size: 32px; }
}


/* ---- Multi-Image Gallery (CareDoc Style) ---- */
.fd-gallery-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 180px 180px;
  gap: 4px;
  border-radius: 16px;
  overflow: hidden;
  max-width: 1200px;
  margin: 0 auto;
  background: #F1F5F9;
}
@media (max-width: 767px) {
  .fd-gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 120px;
  }
}
.fd-gallery-grid .fd-gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.fd-gallery-grid .fd-gallery-item:first-child {
  grid-row: 1 / 3;
}
@media (max-width: 767px) {
  .fd-gallery-grid .fd-gallery-item:first-child {
    grid-row: 1 / 2;
    grid-column: 1 / 3;
  }
}
.fd-gallery-grid .fd-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease-out;
}
.fd-gallery-grid .fd-gallery-item:hover .fd-gallery-img {
  transform: scale(1.03);
}
.fd-gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.25s;
}
.fd-gallery-item:hover .fd-gallery-overlay,
.fd-gallery-overlay.fd-gallery-more {
  opacity: 1;
}
.fd-gallery-overlay.fd-gallery-more {
  background: rgba(0, 0, 0, 0.6);
}

/* ---- Staff Section (CareDoc Style) ---- */
.fd-staff-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.fd-staff-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.fd-staff-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: #DBEAFE;
  color: #1E40AF;
  transition: all 0.2s;
}
.fd-staff-tag:hover {
  background: #BFDBFE;
  transform: translateY(-1px);
}
.fd-staff-tag--green {
  background: #DCFCE7;
  color: #166534;
}
.fd-staff-category {
  margin-bottom: 20px;
}
.fd-staff-category:last-child {
  margin-bottom: 0;
}
.fd-staff-cat-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}
.fd-staff-cat-header--medical { color: #059669; border-left-color: #10B981; }
.fd-staff-cat-header--care { color: #1E40AF; border-left-color: #3B82F6; }
.fd-staff-cat-header--rehab { color: #7C3AED; border-left-color: #8B5CF6; }
.fd-staff-cat-header--admin { color: #64748B; border-left-color: #94A3B8; }
.fd-staff-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.fd-staff-table thead th {
  background: #F8FAFC;
  color: #64748B;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 10px 14px;
  border-bottom: 2px solid #E2E8F0;
  text-align: left;
}
.fd-staff-table thead th:last-child {
  text-align: center;
  width: 100px;
}
.fd-staff-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}
.fd-staff-table tbody tr:last-child td {
  border-bottom: none;
}
.fd-staff-table tbody tr:hover td {
  background: #F8FAFC;
}
.fd-staff-table tbody td:last-child {
  text-align: center;
  font-weight: 700;
  color: var(--primary);
}

/* ---- Facility Status Section (CareDoc Style) ---- */
.fd-facility-status {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.fd-fs-category {
  margin-bottom: 16px;
}
.fd-fs-category:last-child {
  margin-bottom: 0;
}
.fd-fs-cat-header {
  font-size: 14px;
  font-weight: 700;
  color: #0891B2;
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 3px solid #22D3EE;
}
.fd-fs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 640px) {
  .fd-fs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1024px) {
  .fd-fs-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.fd-fs-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  text-align: center;
  transition: all 0.2s;
}
.fd-fs-item:hover {
  border-color: #BFDBFE;
  background: #F0F7FF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}
.fd-fs-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #DBEAFE;
  color: #1E40AF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.fd-fs-icon svg {
  width: 20px;
  height: 20px;
}
.fd-fs-name {
  font-size: 13px;
  color: #64748B;
  font-weight: 500;
  margin-bottom: 4px;
}
.fd-fs-count {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}
.fd-fs-count small {
  font-size: 13px;
  font-weight: 500;
  color: #94A3B8;
}

/* ---- Transportation/Parking (CareDoc Style) ---- */
.fd-access-card {
  background: linear-gradient(135deg, #FAFBFC 0%, #F8FAFC 100%);
  border: 1px solid #E8ECF1;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}
.fd-access-card:last-child {
  margin-bottom: 0;
}
.fd-access-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #E8ECF1;
}
.fd-access-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fd-access-icon svg {
  width: 18px;
  height: 18px;
}
.fd-access-icon--transport { background: #DBEAFE; color: #1E40AF; }
.fd-access-icon--parking { background: #DCFCE7; color: #166534; }
.fd-access-icon--direction { background: #FEF3C7; color: #92400E; }
.fd-access-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.fd-access-content {
  font-size: 14px;
  color: #64748B;
  line-height: 1.7;
  white-space: pre-line;
}

/* ---- Map Section (CareDoc Style) ---- */
.fd-map-card {
  background: var(--card);
  border: 1px solid #E8ECF1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.fd-card.fd-map-card {
  padding: 0;
}
.fd-card.fd-map-card .fd-card-title {
  padding: 18px 20px;
  margin: 0;
  border-bottom: 1px solid #F1F5F9;
}
.fd-map-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid #F1F5F9;
}
.fd-map-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #FEE2E2;
  color: #DC2626;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fd-map-card-icon svg {
  width: 16px;
  height: 16px;
}
.fd-map-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.fd-map-card .fd-map {
  border-radius: 0;
  height: 280px;
}
@media (min-width: 1024px) {
  .fd-map-card .fd-map {
    height: 320px;
  }
}

/* Map Card - New Structure */
.fd-map-wrapper {
  border-bottom: 1px solid #F1F5F9;
  padding: 16px;
  background: #F8FAFC;
}
.fd-map-wrapper .fd-map {
  width: 100%;
  height: 300px;
  border: none;
  border-radius: 12px;
  display: block;
}
@media (min-width: 768px) {
  .fd-map-wrapper .fd-map {
    height: 360px;
  }
}
@media (min-width: 1024px) {
  .fd-map-wrapper .fd-map {
    height: 420px;
  }
}
.fd-map-info {
  padding: 16px 20px;
  background: #FAFBFC;
  border-bottom: 1px solid #F1F5F9;
}
.fd-map-addr-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.fd-map-addr-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #FEE2E2;
  color: #DC2626;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fd-map-addr-text {
  flex: 1;
  min-width: 0;
}
.fd-map-addr-main {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}
.fd-map-actions {
  display: flex;
  gap: 10px;
}
.fd-map-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  background: white;
  text-decoration: none;
  transition: all 0.2s;
}
.fd-map-btn:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}
.fd-map-btn-primary {
  background: linear-gradient(135deg, #3B82F6, #1E40AF);
  border: none;
  color: white;
}
.fd-map-btn-primary:hover {
  background: linear-gradient(135deg, #2563EB, #1E3A8A);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Access Grid */
.fd-access-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px 20px;
}
.fd-access-grid .fd-access-card {
  background: #F8FAFC;
  border: 1px solid #E8ECF1;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.fd-access-grid .fd-access-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.fd-access-icon--bus {
  background: #DBEAFE;
  color: #1E40AF;
}
.fd-access-icon--car {
  background: #DCFCE7;
  color: #166534;
}
.fd-access-grid .fd-access-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.fd-access-grid .fd-access-title {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
}
.fd-access-grid .fd-access-desc {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fd-access-grid .fd-access-desc--detail {
  white-space: pre-line;
  overflow: visible;
  text-overflow: unset;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  color: #475569;
}
.fd-access-card--detail {
  grid-column: 1 / -1;
}
.fd-access-card--detail .fd-access-icon {
  align-self: flex-start;
  margin-top: 2px;
}
@media (max-width: 479px) {
  .fd-access-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 16px;
  }
  .fd-map-info {
    padding: 14px 16px;
  }
  .fd-map-actions {
    flex-direction: column;
    gap: 8px;
  }
  .fd-map-btn {
    height: 40px;
  }
}

/* ---- Quick Stats Section ---- */
.fd-quick-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border-light);
  max-width: 1200px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .fd-quick-stats {
    margin: 20px auto;
    border-radius: 20px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 24px;
  }
}
@media (min-width: 1024px) {
  .fd-quick-stats {
    margin: 24px auto;
    padding: 28px 32px;
  }
}
.fd-qs-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 14px;
  background: linear-gradient(135deg, #FAFBFC 0%, #F8FAFC 100%);
  border-radius: 14px;
  border: 1px solid #E2E8F0;
  text-align: center;
  transition: all 0.25s;
}
.fd-qs-card:hover {
  border-color: #BFDBFE;
  background: linear-gradient(135deg, #F0F7FF 0%, #F8FAFC 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}

/* Circular Gauge for Grade */
.fd-gauge {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(var(--gauge-color, var(--primary)) calc(var(--pct, 0) * 1%), #E2E8F0 0);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.fd-gauge-inner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}
.fd-gauge-letter {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}
.fd-gauge-score {
  font-size: 10px;
  font-weight: 600;
  color: #64748B;
  margin-top: 2px;
}
.fd-gauge-grade-a { --gauge-color: #22C55E; }
.fd-gauge-grade-a .fd-gauge-letter { color: var(--fd-grade-a); }
.fd-gauge-grade-b { --gauge-color: #3B82F6; }
.fd-gauge-grade-b .fd-gauge-letter { color: var(--fd-grade-b); }
.fd-gauge-grade-c { --gauge-color: #F59E0B; }
.fd-gauge-grade-c .fd-gauge-letter { color: var(--fd-grade-c); }
.fd-gauge-grade-d { --gauge-color: #F97316; }
.fd-gauge-grade-d .fd-gauge-letter { color: var(--fd-grade-d); }
.fd-gauge-grade-e { --gauge-color: #EF4444; }
.fd-gauge-grade-e .fd-gauge-letter { color: var(--fd-grade-e); }

/* Grade Hero Card — Enhanced Evaluation Display */
.fd-qs-grade-hero {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #F0F7FF 0%, #FAFBFC 100%);
  border: 1.5px solid #BFDBFE;
  padding: 20px;
}
.fd-qs-grade-hero:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.12);
}

.fd-grade-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
}

.fd-grade-score-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fd-grade-score-big {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.fd-grade-score-big small {
  font-size: 16px;
  font-weight: 600;
  color: #64748B;
}

.fd-grade-compare {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #E2E8F0;
}

.fd-grade-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fd-grade-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fd-grade-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  min-width: 64px;
  flex-shrink: 0;
  white-space: nowrap;
}

.fd-grade-bar-track {
  flex: 1;
  height: 8px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
}

.fd-grade-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease-out;
}

.fd-grade-bar-fill--facility {
  background: linear-gradient(90deg, var(--primary) 0%, #60A5FA 100%);
}

.fd-grade-bar-fill--region {
  background: #CBD5E1;
}

.fd-grade-bar-val {
  font-size: 13px;
  font-weight: 700;
  color: #94A3B8;
  min-width: 32px;
  text-align: right;
  flex-shrink: 0;
}

.fd-grade-bar-val--facility {
  color: var(--primary);
}

.fd-grade-diff {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.fd-grade-diff--up {
  background: #DCFCE7;
  color: #15803D;
}

.fd-grade-diff--down {
  background: #FEF2F2;
  color: #DC2626;
}

@media (min-width: 768px) {
  .fd-qs-grade-hero {
    grid-column: span 2;
    padding: 24px;
  }
  .fd-grade-score-big {
    font-size: 36px;
  }
  .fd-grade-bar-label {
    min-width: 80px;
    font-size: 13px;
  }
}

@media (min-width: 1200px) {
  .fd-qs-grade-hero {
    grid-column: span 2;
  }
}

.fd-qs-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 4px;
}
.fd-qs-number small {
  font-size: 14px;
  font-weight: 600;
  color: #94A3B8;
}
.fd-qs-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
}
.fd-qs-sub {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 2px;
}
.fd-qs-sub.fd-vacancy {
  color: var(--primary);
  font-weight: 600;
}

/* Vacancy Pulse Animation */
@keyframes fd-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
}
.fd-vacancy-pulse {
  animation: fd-pulse 2s ease-in-out infinite;
}
.fd-qs-card.fd-qs-vacancy {
  border-color: #BFDBFE;
  background: #EFF6FF;
}
.fd-qs-card.fd-qs-vacancy .fd-qs-number {
  color: var(--primary);
}

/* ---- Header ---- */
.fd-header-wrap {
  background: var(--card);
  padding: 20px 16px 16px;
  border-bottom: 1px solid #E8ECF1;
}
.fd-header-wrap .container {
  max-width: 1200px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .fd-header-wrap {
    padding: 28px 24px 24px;
  }
}
@media (min-width: 1024px) {
  .fd-header-wrap {
    padding: 32px 32px 28px;
  }
}
.fd-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: 10px;
}
.fd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fd-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.fd-badge-type {
  background: var(--primary-light);
  color: var(--primary);
}
.fd-badge-grade {
  background: var(--border-light);
  color: var(--text);
}
.fd-badge-grade em { font-style: normal; font-weight: 600; opacity: 0.7; }
.fd-badge-grade-a { background: #DCFCE7; color: #166534; }
.fd-badge-grade-b { background: #DBEAFE; color: #1E40AF; }
.fd-badge-grade-c { background: #FEF3C7; color: #92400E; }
.fd-badge-grade-d { background: #FFEDD5; color: #9A3412; }
.fd-badge-grade-e { background: #FEE2E2; color: #991B1B; }
.fd-badge-grade-none { background: var(--border-light); color: var(--subtext); }
.fd-badge-year {
  background: #F1F5F9;
  color: #64748B;
}
.fd-badge-premium {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
}
.fd-updated {
  font-size: 11px;
  color: #94A3B8;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Title Row */
.fd-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}
.fd-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin: 0;
  flex: 1;
  min-width: 0;
}
.fd-title-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 2px;
}
.fd-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.fd-icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.fd-icon-btn.active {
  color: #EF4444;
  border-color: #FCA5A5;
  background: #FEF2F2;
}

/* Address */
.fd-address {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #64748B;
  margin: 10px 0 0;
  line-height: 1.5;
}
.fd-address svg { flex-shrink: 0; color: #94A3B8; }


/* ---- Feature Tags ---- */
.fd-features-wrap {
  background: var(--card);
  border-bottom: 1px solid var(--border-light);
  padding: 0 16px 16px;
}
.fd-features-wrap .container {
  max-width: 1200px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .fd-features-wrap {
    padding: 0 24px 20px;
  }
}
.fd-features {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 4px;
}
.fd-features::-webkit-scrollbar { display: none; }
.fd-feat {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 16px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  transition: all 0.2s;
}
.fd-feat:hover {
  border-color: #CBD5E1;
  background: #F1F5F9;
}
.fd-feat-accent {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1D4ED8;
}
.fd-feat-accent:hover {
  background: #DBEAFE;
}
.fd-feat-good {
  background: #F0FDF4;
  border-color: #BBF7D0;
  color: #166534;
}
.fd-feat-good:hover {
  background: #DCFCE7;
}
.fd-feat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #E2E8F0;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.fd-feat-icon svg { width: 16px; height: 16px; }
.fd-feat-accent .fd-feat-icon { background: #BFDBFE; color: #1E40AF; }
.fd-feat-good .fd-feat-icon { background: #BBF7D0; color: #166534; }
.fd-feat-grade-a { background: #DCFCE7; color: #166534; }
.fd-feat-grade-b { background: #DBEAFE; color: #1E40AF; }
.fd-feat-grade-c { background: #FEF3C7; color: #92400E; }
.fd-feat-grade-d { background: #FFEDD5; color: #9A3412; }
.fd-feat-grade-e { background: #FEE2E2; color: #991B1B; }
.fd-feat-grade-none { background: #E2E8F0; color: #64748B; }
.fd-feat-text {
  font-weight: 600;
}


/* ---- Sticky Navigation with Animated Underline ---- */
.fd-nav {
  position: sticky;
  top: 56px;
  z-index: 90;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.fd-nav .container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 768px) {
  .fd-nav .container {
    padding: 0 24px;
  }
}
.fd-nav-scroll {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.fd-nav-scroll::-webkit-scrollbar { display: none; }
.fd-nav-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #94A3B8;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s;
  position: relative;
}
.fd-nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
  transform: scaleX(0);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.fd-nav-item:hover {
  color: var(--primary);
}
.fd-nav-item.active {
  color: var(--primary);
}
.fd-nav-item.active::after {
  transform: scaleX(1);
}
.fd-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}


/* ---- Body / Layout ---- */
.fd-body {
  padding: 16px 0 100px;
  background: #F8FAFC;
}
.fd-body .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 768px) {
  .fd-body {
    padding: 24px 0 80px;
  }
  .fd-body .container {
    padding: 0 24px;
  }
}
.fd-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.fd-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}


/* ---- Card (main content container) ---- */
.fd-card {
  background: var(--card);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid #E8ECF1;
  transition: box-shadow 0.2s, transform 0.2s;
}
.fd-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.fd-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 24px;
  letter-spacing: -0.02em;
  padding-bottom: 16px;
  border-bottom: 1px solid #F1F5F9;
}
.fd-card-title svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
  flex-shrink: 0;
}
.fd-card-count {
  font-size: 14px;
  font-weight: 600;
  color: #94A3B8;
  margin-left: auto;
}

/* Glass Card Style */
.fd-glass-card {
  background: var(--fd-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
}


/* ---- Info Grid with Icons ---- */
.fd-info-grid {
  display: flex;
  flex-direction: column;
}
.fd-info-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #F1F5F9;
}
.fd-info-item:last-child { border-bottom: none; }
.fd-info-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}
.fd-info-icon svg {
  width: 20px;
  height: 20px;
}
.fd-info-icon-green { background: #DCFCE7; color: #166534; }
.fd-info-icon-amber { background: #FEF3C7; color: #92400E; }
.fd-info-icon-blue { background: #DBEAFE; color: #1E40AF; }
.fd-info-icon-slate { background: #F1F5F9; color: #475569; }
.fd-info-content {
  flex: 1;
  min-width: 0;
}
.fd-info-label {
  font-size: 12px;
  color: #94A3B8;
  font-weight: 500;
  margin-bottom: 2px;
}
.fd-info-value {
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
  word-break: break-all;
}
.fd-info-value a {
  color: var(--primary);
  text-decoration: none;
}
.fd-info-value a:hover {
  text-decoration: underline;
}

/* Legacy Info Row (for backward compatibility) */
.fd-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #F1F5F9;
  gap: 16px;
}
.fd-info-row:first-child { padding-top: 4px; }
.fd-info-row:last-child { border-bottom: none; padding-bottom: 4px; }
.fd-info-key {
  font-size: 14px;
  color: #64748B;
  font-weight: 500;
  flex-shrink: 0;
  min-width: 80px;
}
.fd-info-val {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}
.fd-info-val a { color: var(--primary); text-decoration: none; font-weight: 600; }
.fd-info-val a:hover { text-decoration: underline; }


/* ---- Status Grid (입소현황) ---- */
.fd-status-grid {
  display: flex;
  gap: 0;
  text-align: center;
  margin-bottom: 16px;
}
.fd-status-item {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-right: 1px solid #F1F5F9;
}
.fd-status-item:last-child { border-right: none; }
.fd-status-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.fd-status-num small {
  font-size: 14px;
  font-weight: 600;
  color: #94A3B8;
}
.fd-status-label {
  font-size: 12px;
  color: #94A3B8;
  font-weight: 500;
}
.fd-status-avail .fd-status-num { color: var(--primary); }
.fd-status-avail .fd-status-label { color: var(--primary); }

/* Occupancy Bar */
.fd-occ-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.fd-occ-bar {
  flex: 1;
  height: 8px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
}
.fd-occ-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--primary);
  transition: width 0.6s ease;
}
.fd-occ-pct {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
  min-width: 38px;
  text-align: right;
}

/* Cost Inline (inside status card) */
.fd-cost-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #F8FAFC;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
}
.fd-cost-inline-label {
  font-size: 14px;
  color: #64748B;
  font-weight: 500;
}
.fd-cost-inline-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.fd-cost-inline-val small {
  font-size: 13px;
  font-weight: 500;
  color: #94A3B8;
}


/* ---- Staff Section with Bar Chart ---- */
.fd-staff-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.fd-staff-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fd-staff-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}
.fd-staff-stat-label {
  font-size: 11px;
  color: #94A3B8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.fd-staff-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-left: auto;
}
.fd-staff-badge-good { background: #DCFCE7; color: #166534; }
.fd-staff-badge-warn { background: #FEE2E2; color: #991B1B; }

/* Staff Bar Chart */
.fd-staff-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fd-staff-chart-row {
  display: grid;
  grid-template-columns: 90px 1fr 40px;
  align-items: center;
  gap: 12px;
}
.fd-staff-chart-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fd-staff-bar {
  height: 28px;
  background: #F1F5F9;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.fd-staff-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #60A5FA 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  min-width: 32px;
  transition: width 0.5s ease-out;
}
.fd-staff-bar-fill span {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.fd-staff-chart-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}

/* Legacy Staff Table (for backward compatibility) */
.fd-staff-table {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.fd-staff-cat {
  border-bottom: 1px solid #F1F5F9;
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.fd-staff-cat:last-child { border-bottom: none; margin-bottom: 0; }
.fd-staff-cat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 6px;
}
.fd-staff-cat-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.fd-staff-cat-total {
  font-size: 13px;
  font-weight: 600;
  color: #94A3B8;
}
.fd-staff-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 8px 12px;
}
.fd-staff-type {
  font-size: 14px;
  color: #475569;
  font-weight: 500;
}
.fd-staff-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* Staff Detail Accordion */
.fd-staff-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}
.fd-staff-detail-group {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.fd-staff-detail-group[open] {
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.fd-staff-detail-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: #FAFBFC;
  transition: background 0.15s;
}
.fd-staff-detail-summary::-webkit-details-marker { display: none; }
.fd-staff-detail-summary:hover { background: #F1F5F9; }
.fd-staff-detail-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.fd-staff-detail-cat {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.fd-staff-detail-total {
  font-size: 13px;
  font-weight: 600;
  color: #94A3B8;
  margin-left: auto;
}
.fd-staff-detail-arrow {
  flex-shrink: 0;
  color: #94A3B8;
  transition: transform 0.2s;
}
.fd-staff-detail-group[open] .fd-staff-detail-arrow {
  transform: rotate(180deg);
}
.fd-staff-detail-list {
  padding: 4px 16px 12px;
  background: #fff;
}
.fd-staff-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 8px 9px 20px;
  border-bottom: 1px solid #F1F5F9;
}
.fd-staff-detail-row:last-child {
  border-bottom: none;
}
.fd-staff-detail-type {
  font-size: 14px;
  color: #475569;
  font-weight: 500;
}
.fd-staff-detail-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  min-width: 50px;
  text-align: right;
}
/* Color accents for summary borders */
.fd-staff-detail-summary--medical { border-left: 3px solid #10B981; }
.fd-staff-detail-summary--care { border-left: 3px solid #3B82F6; }
.fd-staff-detail-summary--rehab { border-left: 3px solid #8B5CF6; }
.fd-staff-detail-summary--admin { border-left: 3px solid #94A3B8; }


/* ---- Amenity List ---- */
.fd-amenity-list {
  display: flex;
  flex-direction: column;
}
.fd-amenity-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #F1F5F9;
}
.fd-amenity-row:last-child { border-bottom: none; }
.fd-amenity-name {
  font-size: 14px;
  font-weight: 500;
  color: #475569;
}
.fd-amenity-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}


/* ---- Program Section (CareDoc Style) ---- */
.fd-prog-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  .fd-prog-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .fd-prog-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}
.fd-prog-group {
  background: linear-gradient(135deg, #FAFBFC 0%, #F8FAFC 100%);
  border: 1px solid #E8ECF1;
  border-radius: 16px;
  padding: 20px;
  transition: all 0.25s;
}
.fd-prog-group:hover {
  border-color: #DBEAFE;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
}
.fd-prog-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #E8ECF1;
}
.fd-prog-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fd-prog-icon svg {
  width: 22px;
  height: 22px;
}
/* Category-specific colors */
.fd-prog-group[data-category="인지기능"] .fd-prog-icon { background: #DBEAFE; color: #1E40AF; }
.fd-prog-group[data-category="신체기능"] .fd-prog-icon { background: #DCFCE7; color: #166534; }
.fd-prog-group[data-category="정서지원"] .fd-prog-icon { background: #FEF3C7; color: #92400E; }
.fd-prog-group[data-category="여가활동"] .fd-prog-icon { background: #FCE7F3; color: #9D174D; }
.fd-prog-group[data-category="일상생활"] .fd-prog-icon { background: #E0E7FF; color: #4338CA; }
.fd-prog-group[data-category="기타"] .fd-prog-icon,
.fd-prog-group:not([data-category]) .fd-prog-icon { background: #F1F5F9; color: #475569; }

.fd-prog-label {
  flex: 1;
}
.fd-prog-label-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
}
.fd-prog-label-count {
  font-size: 12px;
  font-weight: 500;
  color: #94A3B8;
}
.fd-prog-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fd-prog-chip {
  padding: 8px 14px;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #E2E8F0;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fd-prog-chip:hover {
  border-color: #BFDBFE;
  background: #F0F7FF;
  color: #1E40AF;
}
.fd-prog-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
}
/* Legacy fallback for old structure (without fd-prog-container) */
.fd-card > .fd-prog-group {
  margin-bottom: 20px;
  background: linear-gradient(135deg, #FAFBFC 0%, #F8FAFC 100%);
  border: 1px solid #E8ECF1;
  border-radius: 16px;
  padding: 20px;
}
.fd-card > .fd-prog-group:last-child { margin-bottom: 0; }
.fd-card > .fd-prog-group > h4.fd-prog-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #E8ECF1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fd-card > .fd-prog-group > h4.fd-prog-label span {
  font-size: 12px;
  font-weight: 500;
  color: #94A3B8;
  background: #F1F5F9;
  padding: 2px 8px;
  border-radius: 10px;
}


/* ---- Cost Section ---- */
.fd-cost-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.fd-cost-box {
  padding: 16px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fd-cost-box-label {
  font-size: 12px;
  color: #64748B;
  font-weight: 500;
}
.fd-cost-box-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.fd-cost-box-val small {
  font-size: 13px;
  font-weight: 500;
  color: #94A3B8;
}

/* Fee List */
.fd-fee-list {
  display: flex;
  flex-direction: column;
}
.fd-fee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #F1F5F9;
}
.fd-fee-row:last-child { border-bottom: none; }
.fd-fee-name {
  font-size: 14px;
  color: #475569;
  font-weight: 500;
}
.fd-fee-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.fd-fee-val small {
  font-size: 12px;
  font-weight: 500;
  color: #94A3B8;
  margin-left: 2px;
}
.fd-fee-total {
  background: #F0FDF4;
  border-radius: 8px;
  padding: 12px;
  margin-top: 4px;
  border-bottom: none;
}
.fd-fee-total .fd-fee-name { color: #166534; font-weight: 700; }
.fd-fee-total .fd-fee-val { color: #166534; }


/* ---- Map Section ---- */
.fd-map {
  width: 100%;
  height: 240px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
}
.fd-map-addr {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text);
}
.fd-map-addr svg { flex-shrink: 0; color: #94A3B8; }
.fd-map-addr span { flex: 1; }
.fd-map-addr a {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  flex-shrink: 0;
}
.fd-map-addr a:hover { text-decoration: underline; }


/* ---- Review Section with Bubble Cards ---- */
.fd-review-summary {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px;
  background: linear-gradient(135deg, #FAFBFF 0%, #F8FAFC 100%);
  border: 1px solid #E8ECF1;
  border-radius: 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.fd-rs-score {
  text-align: center;
  padding: 20px 0;
}
.fd-rs-num {
  font-size: 56px;
  font-weight: 800;
  color: var(--text);
  display: block;
  line-height: 1;
  background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.fd-rs-stars {
  color: #FBBF24;
  font-size: 22px;
  letter-spacing: 3px;
  margin-top: 8px;
}
.fd-rs-total {
  display: block;
  font-size: 13px;
  color: #94A3B8;
  margin-top: 8px;
  font-weight: 500;
}
.fd-rs-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fd-rb-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fd-rb-label {
  font-size: 13px;
  font-weight: 500;
  color: #64748B;
  width: 70px;
  flex-shrink: 0;
}
.fd-rb-bar {
  flex: 1;
  height: 8px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
}
.fd-rb-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #60A5FA 100%);
  border-radius: 4px;
  transition: width 0.6s ease-out;
}
.fd-rb-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

.fd-review-actions { margin-bottom: 20px; }
.fd-write-review-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  transition: all 0.2s;
}
.fd-write-review-btn:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.fd-write-review-outline {
  background: var(--card);
  color: var(--primary);
  border: 2px solid var(--primary);
}
.fd-write-review-outline:hover {
  background: var(--primary-light);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: none;
}

.fd-review-form-wrap {
  padding: 24px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  margin-bottom: 20px;
}

/* Simple Review Form */
.fd-simple-review-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.fd-rating-select {
  text-align: center;
}
.fd-rating-select label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 12px;
}
.fd-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.fd-star {
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s;
}
.fd-star svg {
  width: 100%;
  height: 100%;
  fill: #E2E8F0;
  stroke: #E2E8F0;
  transition: all 0.15s;
}
.fd-star.active svg,
.fd-star:hover svg {
  fill: #FBBF24;
  stroke: #FBBF24;
}
.fd-star:hover {
  transform: scale(1.15);
}
.fd-rating-text {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.fd-review-textarea textarea {
  width: 100%;
  padding: 16px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.2s;
}
.fd-review-textarea textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.fd-review-textarea textarea::placeholder {
  color: #94A3B8;
}
.fd-submit-review {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.fd-submit-review:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Review Bubble Card Style */
.fd-review-card {
  background: #FAFBFC;
  border-radius: 18px 18px 18px 4px;
  padding: 22px;
  position: relative;
  margin-bottom: 16px;
  border: 1px solid #E8ECF1;
  transition: all 0.25s;
}
.fd-review-card:hover {
  border-color: #DBEAFE;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.06);
  transform: translateY(-2px);
}
.fd-review-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 14px;
  height: 14px;
  background: #FAFBFC;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.fd-review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.fd-review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #DBEAFE 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 700;
  font-size: 16px;
}
.fd-review-meta {
  flex: 1;
}
.fd-review-author {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.fd-review-info {
  font-size: 12px;
  color: #94A3B8;
}
.fd-review-rating {
  color: #FBBF24;
  font-size: 14px;
  letter-spacing: 1px;
}
.fd-review-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}
.fd-review-photos {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
}
.fd-review-photo {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.fd-review-date {
  font-size: 12px;
  color: #94A3B8;
  margin-top: 12px;
}

.fd-empty-state {
  text-align: center;
  padding: 48px 16px;
  color: #94A3B8;
}
.fd-empty-state svg { margin-bottom: 16px; opacity: 0.6; }
.fd-empty-state p { font-size: 16px; margin: 0 0 6px; font-weight: 600; color: var(--text); }
.fd-empty-state span { font-size: 14px; color: #94A3B8; }

/* Grade Colors */
.fd-text-grade-a { color: var(--grade-a); }
.fd-text-grade-b { color: var(--grade-b); }
.fd-text-grade-c { color: var(--grade-c); }
.fd-text-grade-d { color: var(--grade-d); }
.fd-text-grade-e { color: var(--grade-e); }
.fd-text-grade-none { color: var(--subtext); }


/* ---- Sidebar (aside) ---- */
.fd-aside { display: none; }
.fd-aside-sticky {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fd-aside-card {
  background: var(--card);
  border: 1px solid #E8ECF1;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s, transform 0.2s;
}
.fd-aside-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.fd-aside-cta-card {
  background: linear-gradient(135deg, #FAFBFF 0%, #FFFFFF 100%);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
  border-color: #DBEAFE;
}
.fd-aside-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}
.fd-aside-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 8px;
}
.fd-aside-open { background: #F0FDF4; color: #166534; }
.fd-aside-open strong { color: #166534; }
.fd-aside-closed { background: #FEE2E2; color: #991B1B; }
@keyframes fdPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.fd-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  animation: fdPulse 2s infinite;
}
.fd-aside-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s;
  width: 100%;
}
.fd-aside-btn-primary {
  background: linear-gradient(135deg, #2563EB 0%, #1E40AF 100%);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.fd-aside-btn-primary:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #1E3A8A 100%);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}
.fd-aside-btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
}
.fd-aside-btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #F8FAFF;
}
.fd-aside-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #F1F5F9;
}
.fd-aside-row:last-child { border-bottom: none; }
.fd-aside-label {
  font-size: 13px;
  color: #64748B;
}
.fd-aside-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.fd-aside-val em {
  font-style: normal;
  font-weight: 500;
  color: #94A3B8;
  font-size: 12px;
}
.fd-aside-val a { color: var(--primary); text-decoration: none; }


/* ---- Mobile CTA Bar with Pulse Effect ---- */
.fd-mobile-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 950;
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 -6px 24px rgba(0,0,0,0.12);
  transform: translateY(0);
  transition: transform 0.3s ease-out;
}

/* 모바일에서 하단 CTA 바 높이만큼 여백 추가 */
@media (max-width: 1023px) {
  body.facility-detail-page,
  body.match-request-page {
    padding-bottom: 90px;
  }
}
/* CTA bar always visible on mobile - do not auto-hide */
.fd-mob-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 16px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  letter-spacing: -0.02em;
  min-height: 56px;
}
.fd-mob-call {
  background: var(--card);
  color: var(--primary);
  border: 2px solid var(--primary);
  flex: 0 0 auto;
  padding: 16px 24px;
}
.fd-mob-call:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.fd-mob-consult {
  background: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}
.fd-mob-consult:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}
.fd-mob-consult.fd-vacancy-pulse {
  animation: fd-cta-pulse 2s ease-in-out infinite;
}
@keyframes fd-cta-pulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }
  50% { box-shadow: 0 4px 20px rgba(37, 99, 235, 0.5), 0 0 0 6px rgba(37, 99, 235, 0.1); }
}
.fd-mob-vacancy-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}


/* ---- Lightbox ---- */
.fd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.fd-lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.fd-lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}
.fd-lb-close:hover { background: rgba(255,255,255,0.3); }
.fd-lb-prev,
.fd-lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}
.fd-lb-prev { left: 12px; }
.fd-lb-next { right: 12px; }
.fd-lb-prev:hover,
.fd-lb-next:hover { background: rgba(255,255,255,0.3); }
.fd-lb-img {
  max-width: 92%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}
.fd-lb-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 600;
}


/* ---- Responsive: Tablet (768px) ---- */
@media (min-width: 768px) {
  .fd-hero-title { font-size: 28px; }
  .fd-title { font-size: 26px; }
  .fd-card { padding: 28px 24px; border-radius: 20px; }
  .fd-card-title { font-size: 19px; margin-bottom: 28px; padding-bottom: 18px; }
  .fd-quick-stats { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .fd-qs-card { padding: 22px 18px; border-radius: 16px; }
  .fd-gauge { width: 80px; height: 80px; }
  .fd-gauge-inner { width: 64px; height: 64px; }
  .fd-gauge-letter { font-size: 24px; }
  .fd-review-summary { flex-direction: row; align-items: flex-start; gap: 24px; }
  .fd-rs-score { min-width: 130px; flex-shrink: 0; padding: 0; }
  .fd-rs-bars { flex: 1; }
  .fd-map { height: 320px; border-radius: 16px; }
  .fd-staff-chart-row { grid-template-columns: 100px 1fr 50px; }
}


/* ---- Responsive: Desktop (1024px) ---- */
@media (min-width: 1024px) {
  .fd-hero-title { font-size: 32px; }
  .fd-slider-overlay { padding: 100px 32px 28px; }
  .fd-title { font-size: 28px; }
  .fd-card { padding: 32px 28px; border-radius: 24px; }
  .fd-card-title { font-size: 20px; gap: 14px; margin-bottom: 32px; padding-bottom: 20px; }
  .fd-body { padding: 28px 0 60px; }
  .fd-layout { gap: 32px; }
  .fd-map { height: 380px; border-radius: 20px; }
  .fd-qs-card { padding: 26px 22px; border-radius: 18px; }
  .fd-gauge { width: 88px; height: 88px; }
  .fd-gauge-inner { width: 72px; height: 72px; }
  .fd-gauge-letter { font-size: 28px; }
  .fd-qs-number { font-size: 32px; }

  .fd-aside {
    display: block;
    width: 340px;
    flex-shrink: 0;
  }

  .fd-mobile-cta { display: none; }
}

/* ---- Responsive: Large Desktop (1280px) ---- */
@media (min-width: 1280px) {
  .fd-layout { gap: 40px; }
  .fd-aside { width: 360px; }
  .fd-card { padding: 36px 32px; }
  .fd-card-title { font-size: 21px; }
}


/* ==========================================================================
   공지사항 & 시설현황(방 정보) 스타일
   ========================================================================== */

/* 공지사항 리스트 */
.fd-notice-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fd-notice-item {
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.fd-notice-item:hover {
  background: var(--bg);
}

.fd-notice-item:last-child {
  border-bottom: none;
}

.fd-notice-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
}

.fd-notice-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--subtext);
}

.fd-notice-badge.fd-notice-pinned {
  background: var(--primary-light);
  color: var(--primary);
}

.fd-notice-title {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fd-notice-date {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--subtext);
}

.fd-notice-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--subtext);
  transition: transform var(--transition-fast);
}

.fd-notice-item.expanded .fd-notice-arrow {
  transform: rotate(180deg);
}

.fd-notice-content {
  padding: 0 0 16px 0;
  border-top: 1px solid var(--border-light);
  margin-top: -1px;
  background: var(--bg);
  padding: 16px;
  margin: 0 -20px;
  width: calc(100% + 40px);
}

.fd-notice-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-light);
  white-space: pre-wrap;
}

.fd-notice-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--subtext);
}

.fd-notice-attach {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--primary);
}


/* 시설현황 방 정보 */
.fd-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.fd-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}

.fd-room-group {
  margin-bottom: 16px;
}

.fd-room-group:last-child {
  margin-bottom: 0;
}

.fd-room-cat {
  font-size: 13px;
  font-weight: 600;
  color: var(--subtext);
  margin-bottom: 8px;
  padding-left: 2px;
}

.fd-room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.fd-room-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius-md);
  font-size: 13px;
}

.fd-room-name {
  color: var(--text-light);
}

.fd-room-val {
  font-weight: 600;
  color: var(--text);
}

/* 반응형 조정 */
@media (min-width: 768px) {
  .fd-notice-content {
    margin: 0;
    width: 100%;
    border-radius: var(--radius-md);
  }

  .fd-room-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* --------------------------------------------------------------------------
   Care Service Cards — 돌봄 서비스 바로 신청
   -------------------------------------------------------------------------- */
.care-service-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.care-service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 16px 24px;
  background: var(--card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-xl, 16px);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.care-service-card:hover {
  border-color: var(--primary, #2563EB);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
  transform: translateY(-4px);
  color: inherit;
}

.care-service-icon {
  font-size: 40px;
  margin-bottom: 12px;
  line-height: 1;
}

.care-service-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text, #1e293b);
}

.care-service-desc {
  font-size: 13px;
  color: var(--text-muted, #64748b);
  line-height: 1.4;
}

/* Tablet: 3 columns */
@media (max-width: 1024px) {
  .care-service-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile: 2-column grid */
@media (max-width: 640px) {
  .care-service-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .care-service-card {
    padding: 20px 12px 18px;
  }

  .care-service-icon {
    font-size: 32px;
    margin-bottom: 8px;
  }

  .care-service-name {
    font-size: 14px;
  }

  .care-service-desc {
    font-size: 12px;
  }
}

/* --------------------------------------------------------------------------
   Caregiver Recruit Banner — Homepage
   -------------------------------------------------------------------------- */
.caregiver-recruit-banner {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-radius: var(--radius-xl, 16px);
  padding: 32px 28px;
  color: #fff;
}

.recruit-content {
  max-width: 480px;
}

.recruit-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
}

.recruit-desc {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 16px;
  line-height: 1.5;
}

.recruit-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recruit-benefits li {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  padding-left: 20px;
  position: relative;
}

.recruit-benefits li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: #86efac;
  font-weight: 700;
}

.recruit-btn {
  display: inline-block;
  background: #fff;
  color: #1d4ed8;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.recruit-btn:hover {
  background: #f0f4ff;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .caregiver-recruit-banner {
    padding: 24px 20px;
  }
  .recruit-title {
    font-size: 19px;
  }
}

/* --------------------------------------------------------------------------
   Mypage — Premium Dashboard
   -------------------------------------------------------------------------- */

/* Profile Hero Card */
.mp-profile {
  background: var(--card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 28px 24px;
  text-align: center;
}

.mp-profile__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.mp-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.mp-profile__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.mp-name {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.mp-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 20px;
  margin-top: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  width: 100%;
}

.mp-contact__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--subtext);
  margin: 0;
}

.mp-contact__item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--subtext);
}

/* Stats Grid */
.mp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 16px;
  width: 100%;
}

.mp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 4px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background-color 0.15s;
}

.mp-stat:hover {
  background-color: var(--bg);
}

.mp-stat__count {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.mp-stat__label {
  font-size: 12px;
  color: var(--subtext);
  white-space: nowrap;
}

/* Action Buttons */
.mp-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  width: 100%;
}

.mp-actions__btn {
  padding: 8px 20px;
  font-size: 14px;
  border-radius: var(--radius-button);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
}

.mp-actions__btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}

.mp-actions__btn--ghost {
  border-color: transparent;
  color: var(--subtext);
}

.mp-actions__btn--ghost:hover {
  border-color: var(--border);
  color: var(--error);
  background-color: var(--error-light, #FEF2F2);
}

/* Tab Badge */
.mp-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  margin-left: 4px;
  background-color: var(--border-light, #F3F4F6);
  color: var(--subtext);
  vertical-align: middle;
}

.tab.active .mp-tab-badge {
  background-color: var(--primary);
  color: #fff;
}

/* Card (Match / Consultation) */
.mp-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 20px;
  transition: border-color 0.15s;
}

.mp-card:hover {
  border-color: var(--primary);
}

.mp-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mp-card__date {
  font-size: 13px;
  color: var(--subtext);
}

.mp-card__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text);
}

.mp-card__subtitle {
  font-size: 14px;
  color: var(--subtext);
  margin: 0;
}

.mp-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.mp-card__link:hover {
  color: var(--primary-dark);
}

.mp-card__link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s;
}

.mp-card__link:hover svg {
  transform: translateX(2px);
}

.mp-card__details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mp-card__detail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--subtext);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.mp-card__detail svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.mp-card__message {
  margin-top: 10px;
  font-size: 14px;
  color: var(--subtext);
  line-height: 1.5;
}

.mp-card__action {
  margin-top: 14px;
}

.mp-btn-cancel {
  color: var(--error);
  border-color: var(--error);
  background: transparent;
}

.mp-btn-cancel:hover {
  background-color: var(--error-light, #FEF2F2);
  color: var(--error);
}

/* Responsive */
@media (min-width: 768px) {
  .mp-profile {
    padding: 32px;
  }

  .mp-avatar {
    width: 88px;
    height: 88px;
    font-size: 34px;
  }

  .mp-name {
    font-size: 24px;
  }

  .mp-stat__count {
    font-size: 26px;
  }

  .mp-stat__label {
    font-size: 13px;
  }
}

@media (min-width: 1024px) {
  .mp-avatar {
    width: 96px;
    height: 96px;
    font-size: 38px;
  }

  .mp-profile__top {
    flex-direction: row;
    text-align: left;
    gap: 20px;
  }

  .mp-profile__info {
    align-items: flex-start;
  }

  .mp-contact {
    justify-content: flex-start;
  }

  .mp-stats {
    max-width: 480px;
  }
}

/* --------------------------------------------------------------------------
   Guide Pages — Premium Article Layout
   -------------------------------------------------------------------------- */

/* Hero Banner */
.gd-hero {
  background: linear-gradient(135deg, #EEF2FF 0%, #DBEAFE 50%, #E0F2FE 100%);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 32px;
}

.gd-hero__icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 12px;
}

.gd-hero__title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.gd-hero__desc {
  font-size: 15px;
  color: var(--subtext);
  margin: 0;
  line-height: 1.6;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* Article Section */
.gd-section {
  margin-bottom: 36px;
}

.gd-section__title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.gd-section__intro {
  font-size: 15px;
  color: var(--subtext);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Step Cards */
.gd-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gd-step {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gd-step:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.gd-step__num {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gd-step__body {
  flex: 1;
  min-width: 0;
}

.gd-step__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}

.gd-step__desc {
  font-size: 14px;
  color: var(--subtext);
  line-height: 1.6;
  margin: 0;
}

/* Info List (replaces inline ul styles) */
.gd-list {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
}

.gd-list li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.gd-list--numbered {
  list-style: decimal;
}

.gd-list__sub {
  font-size: 14px;
  color: var(--subtext);
  margin-top: 2px;
}

/* Info Card */
.gd-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 12px;
}

.gd-card__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

/* Hint Text */
.gd-hint {
  font-size: 13px;
  color: var(--subtext);
  margin-top: 8px;
  padding-left: 4px;
}

/* Guide Index Cards */
.gd-index-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gd-index-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 20px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.gd-index-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
  color: inherit;
}

.gd-index-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #EEF2FF, #DBEAFE);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.gd-index-card__body {
  flex: 1;
  min-width: 0;
}

.gd-index-card__title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}

.gd-index-card__desc {
  font-size: 14px;
  color: var(--subtext);
  line-height: 1.5;
  margin: 0 0 10px;
}

.gd-index-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.gd-index-card__tags li {
  font-size: 12px;
  padding: 3px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-weight: 600;
}

.gd-index-card__arrow {
  flex-shrink: 0;
  color: var(--subtext);
  margin-top: 8px;
  transition: transform 0.2s, color 0.2s;
}

.gd-index-card:hover .gd-index-card__arrow {
  color: var(--primary);
  transform: translateX(3px);
}

/* Section Divider */
.gd-divider {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.gd-divider__sub {
  font-size: 14px;
  color: var(--subtext);
  margin: 0 0 16px;
}

/* CTA Card */
.gd-cta {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  text-align: center;
  margin-top: 32px;
}

.gd-cta__title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.gd-cta__desc {
  font-size: 14px;
  color: var(--subtext);
  margin: 0 0 16px;
  line-height: 1.5;
}

/* Bottom Action Buttons */
.gd-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* Checklist Progress */
.gd-progress {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.gd-progress__bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.gd-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #60A5FA);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.gd-progress__text {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

/* Checklist Items */
.gd-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gd-checklist__item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light, #F3F4F6);
}

.gd-checklist__item:last-child {
  border-bottom: none;
}

/* Responsive */
@media (min-width: 768px) {
  .gd-hero {
    padding: 40px 32px;
  }
  .gd-hero__title {
    font-size: 30px;
  }
  .gd-hero__icon {
    font-size: 56px;
  }
  .gd-step {
    padding: 24px;
  }
  .gd-index-card {
    padding: 28px 24px;
  }
}


/* --------------------------------------------------------------------------
   Legal Pages (이용약관 / 개인정보처리방침)
   -------------------------------------------------------------------------- */
.legal-page {
  padding: var(--space-8) 0 var(--space-12);
}

.legal-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.legal-updated {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: var(--space-6);
}

.legal-content h2 {
  font-size: 16px;
  font-weight: 600;
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

.legal-content p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.legal-content ul {
  padding-left: var(--space-5);
  margin-bottom: var(--space-3);
}

.legal-content li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.legal-company-info {
  margin-top: var(--space-8);
  padding: var(--space-4);
  background: var(--surface-secondary);
  border-radius: var(--radius-md);
}

.legal-company-info p {
  margin-bottom: var(--space-1);
}

/* ─── AI 챗봇 ─── */
.chatbot-fab {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 9998;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37,99,235,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
.chatbot-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(37,99,235,0.5);
}
.chatbot-fab:active { transform: scale(0.95); }
.chatbot-fab-icon { width: 28px; height: 28px; transition: opacity 0.2s, transform 0.3s; }
.chatbot-fab-icon--close { position: absolute; opacity: 0; transform: rotate(-90deg); }
.chatbot-fab--active .chatbot-fab-icon--chat { opacity: 0; transform: rotate(90deg); }
.chatbot-fab--active .chatbot-fab-icon--close { opacity: 1; transform: rotate(0); }
.chatbot-fab-badge {
  position: absolute;
  top: -2px; right: -2px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  line-height: 1.2;
}

/* 패널 */
.chatbot-panel {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 9999;
  width: 380px;
  max-width: calc(100vw - 24px);
  height: 560px;
  max-height: calc(100vh - 160px);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}
.chatbot-panel--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* 헤더 */
.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  background: linear-gradient(135deg, #2563EB 0%, #1d4ed8 100%);
  color: #fff;
}
.chatbot-header-info { display: flex; align-items: center; gap: 10px; }
.chatbot-avatar { width: 36px; height: 36px; flex-shrink: 0; }
.chatbot-avatar svg { width: 36px; height: 36px; }
.chatbot-header-title { font-size: 15px; font-weight: 700; }
.chatbot-header-status { font-size: 11px; opacity: 0.85; margin-top: 2px; }
.chatbot-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.chatbot-close:hover { background: rgba(255,255,255,0.3); }
.chatbot-close svg { width: 18px; height: 18px; }

/* 메시지 영역 */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f8fafc;
  scroll-behavior: smooth;
}
.chatbot-msg { display: flex; gap: 8px; max-width: 100%; }
.chatbot-msg--user { flex-direction: row-reverse; }
.chatbot-msg-avatar { width: 28px; height: 28px; flex-shrink: 0; margin-top: 2px; }
.chatbot-msg-avatar svg { width: 28px; height: 28px; }
.chatbot-msg-content { max-width: 85%; min-width: 0; }
.chatbot-msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}
.chatbot-msg--bot .chatbot-msg-bubble {
  background: #fff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
}
.chatbot-msg--user .chatbot-msg-bubble {
  background: #2563EB;
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* 타이핑 애니메이션 */
.chatbot-typing {
  display: flex;
  gap: 4px;
  padding: 14px 18px;
}
.chatbot-typing span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  animation: chatbotBounce 1.4s infinite ease-in-out;
}
.chatbot-typing span:nth-child(1) { animation-delay: -0.32s; }
.chatbot-typing span:nth-child(2) { animation-delay: -0.16s; }
@keyframes chatbotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* 시설 카드 */
.chatbot-facility-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.chatbot-facility-card {
  display: block;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chatbot-facility-card:hover {
  border-color: #2563EB;
  box-shadow: 0 2px 8px rgba(37,99,235,0.12);
}
.chatbot-facility-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.chatbot-facility-name {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chatbot-facility-grade {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  flex-shrink: 0;
}
.chatbot-grade--a { background: #dcfce7; color: #166534; }
.chatbot-grade--b { background: #dbeafe; color: #1e40af; }
.chatbot-grade--c { background: #fef9c3; color: #854d0e; }
.chatbot-grade--d { background: #fed7aa; color: #9a3412; }
.chatbot-grade--e { background: #fecaca; color: #991b1b; }
.chatbot-facility-info {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 12px;
  color: #64748b;
}
.chatbot-facility-phone {
  font-size: 12px;
  color: #2563EB;
  margin-top: 4px;
  font-weight: 600;
}

/* 추천 질문 */
.chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.chatbot-suggestion-btn {
  background: #eff6ff;
  color: #2563EB;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.chatbot-suggestion-btn:hover {
  background: #dbeafe;
}

/* 입력 영역 */
.chatbot-input-area {
  padding: 12px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}
.chatbot-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border-radius: 24px;
  padding: 4px 4px 4px 16px;
}
.chatbot-input {
  flex: 1;
  border: none;
  background: none;
  font-size: 14px;
  color: #1e293b;
  outline: none;
  padding: 8px 0;
  min-width: 0;
  font-family: inherit;
}
.chatbot-input::placeholder { color: #94a3b8; }
.chatbot-send-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #2563EB;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, opacity 0.2s;
}
.chatbot-send-btn:disabled { opacity: 0.4; cursor: default; }
.chatbot-send-btn:not(:disabled):hover { background: #1d4ed8; }
.chatbot-send-btn svg { width: 18px; height: 18px; }
.chatbot-footer-note {
  text-align: center;
  font-size: 10px;
  color: #94a3b8;
  margin-top: 6px;
}

/* 모바일 */
@media (max-width: 480px) {
  .chatbot-fab { bottom: 80px; right: 14px; width: 54px; height: 54px; }
  .chatbot-fab-icon { width: 24px; height: 24px; }
  .chatbot-panel {
    bottom: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .chatbot-panel--open + .chatbot-fab { display: none; }
}
