/* Fit-Blind Premium CSS Design System */
:root {
  /* Light Mode Tokens (Default - White background) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.9);
  --border-color: rgba(0, 0, 0, 0.08);
  --text-main: #0f172a;
  --text-sub: #475569;
  --text-muted: #94a3b8;
  --shadow-main: 0 8px 30px rgba(0, 0, 0, 0.06);
  --glass-glow: rgba(124, 58, 237, 0.03);

  /* Brand Accents (Vibrant Purple matching custom logo) */
  --accent: #7c3aed; 
  --accent-rgb: 124, 58, 237;
  --accent-hover: #6d28d9;
  --accent-red: #ff477e;
  --accent-blue: #3b82f6;
  --accent-pink: #ec4899;

  --font-family: 'Outfit', 'Noto Sans KR', sans-serif;
  --transition-speed: 0.25s;
}

[data-theme="dark"] {
  /* Dark Mode Tokens (Option) */
  --bg-primary: #0b0f19;
  --bg-secondary: #131a2c;
  --bg-tertiary: #1e2640;
  --bg-card: rgba(25, 34, 57, 0.6);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-main: #f3f4f6;
  --text-sub: #a3aed0;
  --text-muted: #626f93;
  --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glass-glow: rgba(124, 58, 237, 0.05);
  
  --accent: #a78bfa; 
  --accent-rgb: 167, 139, 250;
  --accent-hover: #8b5cf6;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  overflow-x: hidden;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* App Header & Layout Shell */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Dual Preview Header */
.preview-control-bar {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(var(--accent-rgb), 0.15);
  transition: all 0.3s ease;
}
.logo-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(var(--accent-rgb), 0.3);
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--text-main) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.controls-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-toggle-view {
  background-color: var(--bg-tertiary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-speed) ease;
}

.btn-toggle-view.active {
  background-color: var(--accent);
  color: #000000;
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.3);
}

.btn-icon-only {
  background-color: var(--bg-tertiary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  width: 38px;
  height: 38px;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed) ease;
}

.btn-icon-only:hover {
  background-color: var(--bg-secondary);
  border-color: var(--text-muted);
}

/* Master Layout Grid */
.layout-content {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
  width: 100%;
}

/* ==========================================
   1. WEB VIEW LAYOUT
   ========================================== */
.web-layout {
  display: grid;
  grid-template-columns: 240px 1fr 340px;
  max-width: 1280px;
  width: 100%;
  padding: 24px;
  gap: 24px;
}

/* Navigation Left Sidebar */
.left-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nav-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-main);
  backdrop-filter: blur(10px);
}

.nav-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-sub);
  transition: all var(--transition-speed) ease;
}

.nav-item:hover, .nav-item.active {
  color: var(--text-main);
  background-color: var(--bg-tertiary);
}

.nav-item.active {
  border-left: 3px solid var(--accent);
  border-radius: 4px 10px 10px 4px;
  background: linear-gradient(90deg, var(--glass-glow) 0%, transparent 100%);
}

/* Web Feed Centered Area */
.feed-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0; /* Prevents flex items breaking layout */
}

/* Right Widgets Sidebar */
.right-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.widget {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-main);
  backdrop-filter: blur(10px);
}

.widget-header {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trending-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.trending-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.trending-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.trending-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.trending-title:hover {
  color: var(--accent);
}

/* ==========================================
   2. MOBILE APP VIEW (NO FRAME)
   ========================================== */
.mobile-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  background-color: var(--bg-primary);
  min-height: calc(100vh - 57px);
}


.phone-mockup {
  width: 100%;
  max-width: 480px;
  min-height: calc(100vh - 57px);
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  position: relative;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

/* Hidden: phone hardware decorations removed */
.phone-notch {
  display: none;
}

.phone-camera {
  display: none;
}

.phone-speaker {
  display: none;
}

/* Phone Screen Contents */
.phone-screen {
  flex: 1;
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Hidden home indicator */
.phone-home-indicator {
  display: none;
}


/* Mobile Application Header */
.app-header {
  height: 48px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: relative;
  z-index: 10;
}

.app-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Mobile Bottom Tab Bar */
.app-tab-bar {
  height: 54px;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 10;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  transition: color var(--transition-speed) ease;
}

.tab-item.active {
  color: var(--accent);
}

/* ==========================================
   3. SHARED COMPONENTS & INTERFACES
   ========================================== */

/* Search and Submenus */
.search-filter-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-main);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
}

.search-field {
  width: 100%;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 10px 12px 10px 38px;
  border-radius: 10px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-speed);
}

.search-field:focus {
  border-color: var(--accent);
}

/* Region Selector Selector */
.region-selectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dropdown-select {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 10px;
  font-family: var(--font-family);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

/* Board Type Tabs (자유 vs 나의 특화게시판) */
.board-type-tabs {
  display: flex;
  border-bottom: 2px solid var(--bg-tertiary);
  margin-top: 5px;
}

.board-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-speed);
}

.board-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ==========================================
   MOBILE 2단계 카테고리 NAV
   ========================================== */

/* 카테고리 스크롤 래퍼 — 세로로 두 행 쌓임 */
.category-nav-scroll {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

/* 그룹 탭 행 (상단: 홈/운동/평가/시설/커뮤니티/마이) */
.app-cat-group-row {
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border-color);
}
.app-cat-group-row::-webkit-scrollbar { display: none; }

.app-cat-group-tab {
  padding: 9px 13px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  flex-shrink: 0;
  letter-spacing: -0.2px;
}
.app-cat-group-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.04);
}
.app-cat-group-tab:hover {
  color: var(--text-main);
  background: var(--bg-tertiary);
}

/* 서브 칩 행 (하단: 각 그룹의 세부 카테고리) */
.app-cat-sub-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 7px 12px;
}
.app-cat-sub-row::-webkit-scrollbar { display: none; }

.chip-sub {
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s;
  flex-shrink: 0;
}
.chip-sub.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  box-shadow: 0 3px 8px rgba(var(--accent-rgb), 0.3);
}
.chip-sub:hover {
  border-color: var(--accent);
  color: var(--text-main);
}

/* 기존 chip-category 호환 유지 */
.chip-category {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  flex-shrink: 0;
}
.chip-category.active {
  background-color: var(--accent);
  color: #000;
  border-color: var(--accent);
  box-shadow: 0 4px 10px rgba(var(--accent-rgb), 0.2);
}

/* Post Cards */
.post-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  transition: transform var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
  box-shadow: var(--shadow-main);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 10px rgba(var(--accent-rgb), 0.05);
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge-group {
  display: flex;
  gap: 6px;
}

.badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-category {
  background-color: var(--bg-tertiary);
  color: var(--accent);
}

.badge-region {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-sub);
}

.badge-type-special {
  background-color: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.post-time {
  font-size: 11px;
  color: var(--text-muted);
}

.post-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
}

.post-excerpt {
  display: none !important; /* 목록 피드에서는 제목만 깔끔하게 보이고 본문 내용은 상세 클릭 시에만 표출 */
}

.post-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.post-author {
  font-weight: 500;
  color: var(--text-sub);
}

.footer-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-item i {
  font-size: 14px;
}

.stat-item.active {
  color: var(--accent-red);
}

/* ==========================================
   4. SPECIAL CARD DESIGNS
   ========================================== */

/* PT / Pilates: InBody Body Profile Grid Layout */
.profile-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* For mobile app view, grid should be 1 column or 2 column depending on frame width */
.phone-screen .profile-grid-container {
  grid-template-columns: 1fr;
}

.body-profile-card,
.workout-diet-card {
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-main);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.body-profile-card:hover,
.workout-diet-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
}

/* 이미지 영역 */
.wdc-image-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  background: #0f172a;
  flex-shrink: 0;
}

.wdc-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
  display: block;
}

.workout-diet-card:hover .wdc-image,
.body-profile-card:hover .wdc-image {
  transform: scale(1.06);
}

/* 이미지 하단 그라데이션 오버레이 */
.wdc-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.25) 0%,
    transparent 40%,
    rgba(0,0,0,0.55) 100%
  );
  pointer-events: none;
}

/* 이미지 위 상단 배지 행 */
.wdc-top-row {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 3;
  gap: 4px;
}

/* 이미지 위 지표 배지 행 */
.wdc-metric-badges {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  z-index: 3;
}

.wdc-badge {
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  color: #f0f0f0;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* 하단 텍스트 푸터 */
.wdc-footer {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wdc-footer-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wdc-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* Glowing aesthetic overlay */
.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(var(--accent-rgb), 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.profile-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 2;
}

.profile-metrics {
  z-index: 2;
  background: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}

.metric-box {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 9px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.metric-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.profile-author-info {
  display: flex;
  flex-direction: column;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.profile-author-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Course Sharing Special Card */
.course-card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background-color: var(--bg-tertiary);
  padding: 10px;
  border-radius: 10px;
  margin: 6px 0;
}

.course-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.course-stat-label {
  font-size: 9px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.course-stat-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

/* Map Path Preview Render inside cards */
.course-map-preview {
  height: 80px;
  background-color: rgba(11, 15, 25, 0.8);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.course-map-preview svg {
  width: 100%;
  height: 100%;
}

.course-difficulty-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.difficulty-easy { background-color: rgba(16, 185, 129, 0.15); color: #10b981; }
.difficulty-medium { background-color: rgba(249, 115, 22, 0.15); color: #f97316; }
.difficulty-hard { background-color: rgba(239, 68, 68, 0.15); color: #ef6868; }

/* ==========================================
   5. DETAIL VIEW & MODALS
   ========================================== */

/* Main Detail View Pane */
.post-detail-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-main);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.phone-screen .post-detail-container {
  border: none;
  background-color: transparent;
  padding: 0;
  box-shadow: none;
}

.detail-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #000;
}

.author-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.author-name {
  font-size: 14px;
  font-weight: 600;
}

.post-meta-info {
  font-size: 11px;
  color: var(--text-muted);
}

.detail-content {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-main);
  white-space: pre-line;
}

/* InBody comparison visualization on Detail */
.inbody-detail-display {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: var(--bg-secondary);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.inbody-row-compare {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inbody-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.inbody-bar-label {
  width: 70px;
  font-weight: 600;
}

.inbody-bar-track {
  flex: 1;
  height: 10px;
  background-color: var(--bg-tertiary);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.inbody-bar-progress {
  height: 100%;
  border-radius: 5px;
  transition: width 0.8s ease-in-out;
}

.bar-before {
  background-color: var(--text-muted);
}

.bar-after {
  background-color: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.5);
}

.inbody-val-label {
  width: 70px;
  text-align: right;
  font-weight: 700;
}

/* Map Canvas Render on Detail */
.course-detail-map-wrapper {
  background-color: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-map-canvas-container {
  height: 250px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background-color: #0b0f19;
}

.detail-map-canvas-container canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Comments Section */
.comments-section {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comments-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-input-form {
  display: flex;
  gap: 10px;
}

.comment-input-field {
  flex: 1;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: 10px;
  outline: none;
  font-family: var(--font-family);
  font-size: 13px;
}

.btn-comment-submit {
  background-color: var(--accent);
  color: #000;
  border: none;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comment-node {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comment-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-author-name {
  font-size: 12px;
  font-weight: 600;
}

.comment-time {
  font-size: 10px;
  color: var(--text-muted);
}

.comment-content {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-sub);
}

/* Modals (Generic Popup) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-speed) ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 550px;
  max-height: 90vh;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform var(--transition-speed) ease;
}

.modal-overlay.active .modal-window {
  transform: translateY(0);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.form-input, .form-textarea {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 12px;
  border-radius: 10px;
  font-family: var(--font-family);
  font-size: 14px;
  outline: none;
}

.form-textarea {
  height: 120px;
  resize: vertical;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent);
}

/* Floating Action Button (FAB) for Mobile */
.mobile-fab {
  position: absolute;
  bottom: 90px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: var(--accent);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(var(--accent-rgb), 0.35);
  cursor: pointer;
  z-index: 100;
  border: none;
  font-size: 20px;
  opacity: 0.88;
}

/* Draw Map Interactive Canvas inside Create Post Modal */
.course-drawer-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.canvas-map-board {
  height: 220px;
  background-color: #0b111e;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  cursor: crosshair;
}

.canvas-map-board canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-instruction {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.btn-canvas-reset {
  background: none;
  border: none;
  color: var(--accent-red);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.course-metrics-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Inbody sliders in form */
.inbody-input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: var(--bg-tertiary);
  padding: 14px;
  border-radius: 10px;
}

.inbody-slider-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.slider-val {
  font-weight: 700;
  color: var(--accent);
}

.slider-control {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: var(--bg-secondary);
  outline: none;
}

.slider-control::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.5);
}

/* Floating Web Write Button (Desktop view only) */
.web-write-btn {
  background-color: var(--accent);
  color: #000;
  font-weight: 700;
  border: none;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.25);
  margin-top: 10px;
  transition: all var(--transition-speed);
}

.web-write-btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

/* Generic Button */
.btn-primary {
  background-color: var(--accent);
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color var(--transition-speed);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* App Install / Info Banner for Desktop */
.pwa-banner {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-main);
  backdrop-filter: blur(10px);
}

.pwa-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pwa-icon {
  background-color: var(--accent);
  color: #000;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.pwa-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pwa-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.pwa-desc {
  font-size: 11px;
  color: var(--text-sub);
}

.btn-install {
  background-color: var(--accent);
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .web-layout {
    grid-template-columns: 200px 1fr;
  }
  .right-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .web-layout {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 16px;
  }
  .left-sidebar {
    display: none;
  }
  .preview-control-bar {
    padding: 10px 16px;
  }
}

/* ==========================================
   6. INSTRUCTOR REVIEW STYLES (강사평가)
   ========================================== */

/* Star Rating Display */
.star-rating {
  display: flex;
  gap: 2px;
}

.star-rating .star {
  color: var(--text-muted);
  font-size: 14px;
}

.star-rating .star.filled {
  color: #fbbf24;
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
}

/* Review Card */
.review-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  transition: transform var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
  box-shadow: var(--shadow-main);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-card:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 10px rgba(251, 191, 36, 0.05);
}

.review-instructor-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(var(--accent-rgb), 0.04) 100%);
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.15);
}

.instructor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #000;
  flex-shrink: 0;
}

.instructor-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.instructor-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.instructor-gym {
  font-size: 11px;
  color: var(--text-sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-overall-rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rating-number {
  font-size: 20px;
  font-weight: 800;
  color: #fbbf24;
}

/* Review Detail Metrics Grid */
.review-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  background-color: var(--bg-secondary);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.review-metric-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.review-metric-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.review-metric-bar {
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.review-metric-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
  transition: width 0.6s ease;
}

.review-metric-fill.low {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.review-metric-fill.medium {
  background: linear-gradient(90deg, #f97316 0%, #fb923c 100%);
}

.review-metric-fill.high {
  background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

.review-metric-fill.excellent {
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.review-metric-score {
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

/* Recommendation Badge */
.badge-recommend {
  background-color: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-not-recommend {
  background-color: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Review Form Inputs in Create Post Modal */
.review-input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: var(--bg-tertiary);
  padding: 14px;
  border-radius: 10px;
}

.review-rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.review-rating-row label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
}

.star-selector {
  display: flex;
  gap: 4px;
  cursor: pointer;
}

.star-selector {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.star-selector .star-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.star-selector .star-btn:hover {
  transform: scale(1.22);
}

.star-selector .star-btn.filled .bb-plate-filled {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

/* ==========================================
   7. AUTH STYLES (로그인 / 회원가입)
   ========================================== */

.btn-auth-header {
  background: linear-gradient(135deg, var(--accent) 0%, #10b981 100%);
  color: #000;
  border: none;
  padding: 7px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-speed);
  white-space: nowrap;
}

.btn-auth-header:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.35);
}

.header-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 4px 12px 4px 4px;
}

.header-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #000;
  background: linear-gradient(135deg, var(--accent) 0%, #10b981 100%);
}

.header-user-nickname {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.btn-auth-header-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 50%;
  transition: color var(--transition-speed);
}

.btn-auth-header-logout:hover {
  color: var(--accent-red);
}

.auth-tab {
  background: none;
  border: none;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-speed);
  font-family: var(--font-family);
}

.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.auth-logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.auth-error {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
}

/* ==========================================
   8. CHAT STYLES (1:1 대화)
   ========================================== */

/* Chat tab badge */
.chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--accent-red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.tab-item {
  position: relative;
}

/* Chat Modal Window */
.chat-modal-window {
  max-width: 480px;
  height: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

/* Chat Room List */
.chat-room-list {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  min-height: 100px;
}

.chat-room-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-speed);
}

.chat-room-item:hover {
  background-color: var(--bg-tertiary);
}

.chat-room-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #000;
  flex-shrink: 0;
}

.chat-room-info {
  flex: 1;
  min-width: 0;
}

.chat-room-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.chat-room-last-msg {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.chat-room-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.chat-room-time {
  font-size: 10px;
  color: var(--text-muted);
}

.chat-unread-badge {
  background-color: var(--accent);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* Chat Messages Area */
.chat-messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: var(--bg-primary);
  min-height: 0;
}

.chat-bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-bubble-row.me {
  flex-direction: row-reverse;
}

.chat-bubble-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}

.chat-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.chat-bubble-row.me .chat-bubble {
  background: linear-gradient(135deg, var(--accent) 0%, #10b981 100%);
  color: #000;
  border-radius: 18px 18px 4px 18px;
}

.chat-bubble-row.other .chat-bubble {
  background-color: var(--bg-tertiary);
  color: var(--text-main);
  border-radius: 18px 18px 18px 4px;
}

.chat-bubble-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

/* Chat Input Bar */
.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

.chat-message-input {
  flex: 1;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: 24px;
  font-family: var(--font-family);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition-speed);
}

.chat-message-input:focus {
  border-color: var(--accent);
}

.btn-send-chat {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #10b981 100%);
  color: #000;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-speed);
  flex-shrink: 0;
}

.btn-send-chat:hover {
  transform: scale(1.08);
}

/* Chat partner avatar in modal header */
.chat-partner-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #000;
}

/* Chat empty state */
.chat-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* DM button on post detail */
.btn-dm {
  background-color: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-speed);
}

.btn-dm:hover {
  background-color: rgba(var(--accent-rgb), 0.2);
}

/* App body chat screen */
.chat-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.chat-screen-room-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  flex: 1;
}

.chat-screen-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

/* Login required nudge in write button */
.login-required-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 6px;
}

/* ==========================================
   9. ADMIN STYLES (관리자)
   ========================================== */

.btn-admin-header {
  background: linear-gradient(135deg, #ff477e 0%, #f97316 100%);
  color: #fff;
  border: none;
  padding: 5px 12px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-speed);
  white-space: nowrap;
}

.btn-admin-header:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 71, 126, 0.35);
}

/* Admin Panel Window */
.admin-panel-window {
  max-width: 620px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.admin-content-area {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 0;
  min-height: 200px;
}

.admin-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-speed);
}

.admin-list-row:hover {
  background-color: var(--bg-tertiary);
}

.admin-row-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.admin-row-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-row-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 12px;
}

.admin-row-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed);
}

.admin-row-btn:hover {
  background-color: var(--bg-secondary);
  color: var(--text-main);
}

.admin-row-btn.pin-btn.active {
  background-color: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.3);
}

.admin-row-btn.del-btn:hover {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.admin-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Admin pin badge on post list */
.admin-pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background-color: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
}

/* Admin role badge */
.admin-role-badge {
  background: linear-gradient(135deg, #ff477e 0%, #f97316 100%);
  color: #fff;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
}

/* Admin user avatar */
.admin-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #000;
  flex-shrink: 0;
}

/* Admin controls on post detail */
.admin-post-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(255, 71, 126, 0.08) 0%, rgba(249, 115, 22, 0.05) 100%);
  border: 1px solid rgba(255, 71, 126, 0.2);
  border-radius: 10px;
  margin: 4px 0;
}

.admin-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #ff477e;
  margin-right: 4px;
}

.admin-ctrl-btn {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-speed);
  font-family: var(--font-family);
}

.admin-ctrl-btn:hover {
  background-color: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
}

.admin-ctrl-btn.active {
  background-color: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.4);
}

.admin-ctrl-btn.danger {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.admin-ctrl-btn.danger:hover {
  background-color: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.5);
}

/* Pinned post card indicator */
.post-card.pinned,
.review-card.pinned,
.body-profile-card.pinned {
  border-color: rgba(var(--accent-rgb), 0.4) !important;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.08) 0%, var(--bg-card) 100%) !important;
}


/* ==========================================
   10. GYM EXPLORE PLATFORM STYLES (시설 탐색 플랫폼)
   ========================================== */

/* Web sidebar mode switcher */
.sidebar-mode-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 4px;
}

.sidebar-mode-tab {
  flex: 1;
  padding: 8px 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  transition: all var(--transition-speed);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.sidebar-mode-tab.active {
  background: var(--accent);
  color: #000;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.4);
}

/* Gym explore main layout */
.gym-explore-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Type filter tabs (배민 카테고리 탭 스타일) */
.gym-type-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.3) rgba(255, 255, 255, 0.03);
}

.gym-type-tabs::-webkit-scrollbar {
  height: 4px;
  display: block;
}

.gym-type-tabs::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 2px;
}

.gym-type-tabs::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-rgb), 0.25);
  border-radius: 2px;
}

.gym-type-tabs::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.gym-type-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--transition-speed);
  white-space: nowrap;
  min-width: 76px;
  backdrop-filter: blur(8px);
}

.gym-type-tab-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed);
}

.gym-type-tab-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition-speed);
}

.gym-type-tab.active,
.gym-type-tab:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.07);
}

.gym-type-tab.active .gym-type-tab-label {
  color: var(--accent);
}

/* Gym search & sort bar */
.gym-search-sort-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.gym-sort-select {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  min-width: 110px;
}

/* Gym card grid */
.gym-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Individual gym card */
.gym-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  position: relative;
}

.gym-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), 0.3);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(var(--accent-rgb), 0.08);
}

.gym-card-thumb {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.gym-card-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.6) 100%);
}

.gym-card-thumb-icon {
  font-size: 48px;
  z-index: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.gym-card-thumb-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
}

.gym-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}

.gym-fav-btn:hover { transform: scale(1.2); }
.gym-fav-btn.active { background: rgba(255, 71, 126, 0.3); }

.gym-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gym-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.gym-card-slogan {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.gym-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.gym-stars {
  display: flex;
  gap: 1px;
  color: #fbbf24;
  font-size: 12px;
}

.gym-rating-num {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
}

.gym-review-count {
  color: var(--text-muted);
  font-size: 11px;
}

.gym-price-range {
  margin-left: auto;
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 2px;
}

.gym-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.gym-tag {
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.15);
  color: var(--text-sub);
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 500;
}

.gym-card-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.gym-amenity-icons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.gym-amenity-icon {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
}

/* ==========================================
   GYM DETAIL MODAL
   ========================================== */
.gym-detail-modal-window {
  max-width: 700px;
  width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  border-radius: 24px;
}

.gym-detail-hero {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.gym-detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
}

.gym-detail-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px;
  z-index: 2;
}

.gym-detail-hero-icon {
  font-size: 56px;
  z-index: 1;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.5));
}

.gym-detail-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}

.gym-detail-name {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.gym-detail-slogan {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  margin-top: 2px;
}

.gym-detail-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gym-detail-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

/* Info row in detail */
.gym-detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gym-detail-info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.gym-detail-info-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.gym-detail-info-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.gym-detail-info-value {
  font-size: 12px;
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.4;
}

/* Amenities strip */
.gym-detail-amenities {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gym-amenity-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid;
}

.gym-amenity-chip.available {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.25);
  color: var(--accent);
}

.gym-amenity-chip.unavailable {
  background: rgba(255,255,255,0.03);
  border-color: var(--border-color);
  color: var(--text-muted);
  opacity: 0.5;
  text-decoration: line-through;
}

/* Section header inside detail */
.gym-detail-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 12px;
}

/* Packages (배민 메뉴 카드 스타일) */
.gym-packages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gym-package-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.gym-package-card:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.04);
  transform: translateX(2px);
}

.gym-package-card.popular {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.05);
}

.gym-package-popular-badge {
  position: absolute;
  top: -1px;
  right: 12px;
  background: var(--accent);
  color: #000;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 0 0 8px 8px;
}

.gym-package-info {
  flex: 1;
}

.gym-package-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.gym-package-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.gym-package-price-block {
  text-align: right;
}

.gym-package-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
}

.gym-package-unit {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* CTA buttons in detail */
.gym-detail-cta-row {
  display: flex;
  gap: 10px;
}

.btn-gym-booking {
  flex: 1;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, #10b981 100%);
  color: #000;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-gym-booking:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.4);
}

.btn-gym-fav-detail {
  padding: 14px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--text-sub);
  font-size: 13px;
}

.btn-gym-fav-detail.active {
  border-color: #ff477e;
  background: rgba(255, 71, 126, 0.1);
  color: #ff477e;
}

/* Rating breakdown */
.gym-rating-overview {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 14px;
}

.gym-rating-big-num {
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gym-rating-stars-big {
  font-size: 18px;
  color: #fbbf24;
  display: flex;
  gap: 2px;
  margin: 4px 0;
}

.gym-rating-count {
  font-size: 11px;
  color: var(--text-muted);
}

.gym-rating-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gym-rating-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.gym-rating-bar-label {
  width: 60px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.gym-rating-bar-track {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}

.gym-rating-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #fbbf24, #f97316);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.gym-rating-bar-score {
  width: 24px;
  text-align: right;
  color: var(--text-sub);
  font-weight: 600;
}

/* Review cards */
.gym-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gym-review-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gym-review-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gym-review-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.gym-review-author-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.gym-review-date {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: auto;
}

.gym-review-stars {
  display: flex;
  gap: 2px;
  color: #fbbf24;
  font-size: 12px;
}

.gym-review-text {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
}

.gym-review-helpful {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: transparent;
  transition: all 0.2s;
}

.gym-review-helpful:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Review write form */
.gym-review-form {
  background: rgba(var(--accent-rgb), 0.03);
  border: 1px solid rgba(var(--accent-rgb), 0.15);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gym-review-rating-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gym-review-rating-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gym-review-rating-label {
  font-size: 11px;
  color: var(--text-muted);
}

.gym-star-selector {
  display: flex;
  gap: 3px;
}

.gym-star-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--border-color);
  transition: color 0.1s, transform 0.1s;
  padding: 0;
}

.gym-star-btn.active,
.gym-star-btn:hover { color: #fbbf24; transform: scale(1.15); }

/* Booking modal */
.gym-booking-modal-window {
  max-width: 480px;
  width: 95vw;
  border-radius: 24px;
}

.gym-booking-success {
  text-align: center;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.gym-booking-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #10b981 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Mobile explore screen */
.app-explore-screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px;
  height: 100%;
  overflow-y: auto;
}

.app-gym-type-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.3) rgba(255, 255, 255, 0.03);
  padding: 4px 0 8px;
  flex-shrink: 0;
}

.app-gym-type-scroll::-webkit-scrollbar {
  height: 4px;
  display: block;
}

.app-gym-type-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 2px;
}

.app-gym-type-scroll::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-rgb), 0.25);
  border-radius: 2px;
}

.app-gym-type-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.app-gym-type-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  min-width: 60px;
  background: var(--bg-card);
}

.app-gym-type-chip.active {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
}

.app-gym-type-chip span:first-child { font-size: 18px; }
.app-gym-type-chip span:last-child  { font-size: 9px; font-weight: 600; color: var(--text-muted); }
.app-gym-type-chip.active span:last-child { color: var(--accent); }

.app-gym-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.app-gym-card:active { transform: scale(0.98); }

.app-gym-card-thumb {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 36px;
}

.app-gym-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.app-gym-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.app-gym-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}


.empty-state-gym {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================
   11. MOBILE RESPONSIVE — REAL DEVICE STYLES
   (실제 모바일 기기에서 네이티브 앱처럼 보이기)
   ========================================== */

/* ── 실제 모바일 기기 전용 (JS로 is-mobile-device 클래스 주입) ── */

/* 1. 컨트롤 바(헤더) 완전 숨김 */
body.is-mobile-device .preview-control-bar {
  display: none !important;
}

/* 2. 앱 레이아웃 — 전체 화면 풀스크린 */
body.is-mobile-device #appViewContainer {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: var(--app-height, 100dvh);
  background: var(--bg-primary);
  overflow: hidden;
}

body.is-mobile-device #webViewContainer {
  display: none !important;
}

/* 3. 폰 목업 프레임 제거 → 전체 화면 실앱 */
body.is-mobile-device .mobile-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--bg-primary);
  padding: 0;
  width: 100%;
}

body.is-mobile-device .phone-mockup {
  max-width: 100%;
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-left: none;
  border-right: none;
  border-radius: 0;
  background: var(--bg-primary);
}

body.is-mobile-device .phone-screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;  /* 컨테이너는 overflow:hidden, 내부 app-body만 스크롤 */
  border-radius: 0;
}

/* 4. 앱 헤더 — 상단 Safe Area (노치/다이나믹아일랜드) */
body.is-mobile-device .app-header {
  flex-shrink: 0;
  height: auto;
  min-height: 52px;
  padding-top: max(env(safe-area-inset-top), 6px);
  padding-left: max(env(safe-area-inset-left), 16px);
  padding-right: max(env(safe-area-inset-right), 16px);
  padding-bottom: 6px;
  z-index: 100;
}

/* 5. 앱 바디 — 스크롤 영역 (핵심: flex:1 + min-height:0 + overflow-y:auto) */
body.is-mobile-device .app-body {
  flex: 1;
  min-height: 0;  /* flex 자식이 스크롤되려면 반드시 필요! */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 12px max(env(safe-area-inset-right), 12px) 16px max(env(safe-area-inset-left), 12px);
}

/* 6. 하단 탭 바 — 홈바 Safe Area */
body.is-mobile-device .app-tab-bar {
  flex-shrink: 0;
  height: auto;
  min-height: 54px;
  padding-bottom: max(env(safe-area-inset-bottom), 4px);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  z-index: 100;
}

/* 7. 탭 아이템 — 터치 최적화 (최소 44px) */
body.is-mobile-device .tab-item {
  min-height: 44px;
  padding: 6px 8px;
  gap: 3px;
  font-size: 9px;
}

body.is-mobile-device .tab-item i {
  width: 22px;
  height: 22px;
}

/* 8. 카드 및 버튼 터치 최적화 */
body.is-mobile-device .post-card,
body.is-mobile-device .review-card,
body.is-mobile-device .body-profile-card,
body.is-mobile-device .workout-diet-card,
body.is-mobile-device .gym-card,
body.is-mobile-device .app-gym-card {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* 9. 모달 — 모바일에서 바텀 시트처럼 */
body.is-mobile-device .modal-overlay {
  align-items: flex-end;
  padding: 0;
}

body.is-mobile-device .modal-window {
  border-radius: 20px 20px 0 0 !important;
  max-width: 100% !important;
  width: 100%;
  max-height: 92dvh;
  overflow-y: auto;
  padding-bottom: max(env(safe-area-inset-bottom), 20px);
}

body.is-mobile-device .gym-detail-modal-window {
  border-radius: 20px 20px 0 0 !important;
  max-height: 95dvh;
}

/* 10. 검색/필터 바 터치 최적화 */
body.is-mobile-device .search-field {
  font-size: 16px; /* iOS 줌 방지 */
  -webkit-appearance: none;
}

body.is-mobile-device .dropdown-select {
  font-size: 14px;
  min-height: 40px;
  -webkit-appearance: none;
}

body.is-mobile-device .form-input,
body.is-mobile-device .form-textarea,
body.is-mobile-device .chat-message-input {
  font-size: 16px; /* iOS 키보드 줌 방지 */
  -webkit-appearance: none;
}

/* 11. 게시물 카드 패딩 최적화 */
body.is-mobile-device .post-card {
  padding: 14px;
}

body.is-mobile-device .post-title {
  font-size: 15px;
}

/* 12. 시설 카드 그리드 — 모바일 1열 */
body.is-mobile-device .gym-card-grid {
  grid-template-columns: 1fr;
}

/* 13. 시설 상세 정보 그리드 — 1열 */
body.is-mobile-device .gym-detail-info-grid {
  grid-template-columns: 1fr;
}

/* 14. FAB 버튼 Safe Area */
body.is-mobile-device .mobile-fab {
  bottom: calc(max(env(safe-area-inset-bottom), 4px) + 60px);
  right: 16px;
}

/* 15. 카테고리 칩 터치 최적화 */
body.is-mobile-device .category-chip,
body.is-mobile-device .gym-type-tab {
  min-height: 40px;
  -webkit-tap-highlight-color: transparent;
}

/* ── 미디어 쿼리 (CSS-only 폴백) ── */
/* 640px 이하: 실제 모바일 화면 (UA 감지 없이도 적용) */
@media screen and (max-width: 640px) {
  .preview-control-bar {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* 뷰 토글 버튼 숨김 — 모바일에서 앱 뷰만 노출 */
  #toggleWebMode,
  #toggleAppMode {
    display: none !important;
  }

  /* 앱 레이아웃 전체 화면 */
  #appViewContainer {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: var(--app-height, 100dvh);
    overflow: hidden;
  }

  #webViewContainer {
    display: none !important;
  }

  .mobile-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    background: var(--bg-primary);
    padding: 0;
    width: 100%;
  }

  .phone-mockup {
    max-width: 100%;
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-left: none;
    border-right: none;
    border-radius: 0;
  }

  .phone-screen {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0;
  }

  /* 앱 헤더 */
  .app-header {
    flex-shrink: 0;
    z-index: 100;
  }

  /* 하단 탭 바 고정 */
  .app-tab-bar {
    flex-shrink: 0;
    z-index: 100;
  }

  /* 핵심: 앱 바디 스크롤 오버라이드 */
  .app-body {
    flex: 1;
    min-height: 0;  /* flex 자식 스크롤 필수 속성 */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  /* 탭 아이템 터치 친화적 */
  .tab-item {
    min-height: 44px;
    font-size: 9px;
    padding: 5px 4px;
  }

  /* 모달 바텀 시트 */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-window {
    border-radius: 20px 20px 0 0 !important;
    max-width: 100% !important;
    width: 100%;
    max-height: 92dvh;
    overflow-y: auto;
  }

  .gym-detail-modal-window {
    border-radius: 20px 20px 0 0 !important;
    max-height: 95dvh;
  }

  /* 입력 필드 iOS 줌 방지 */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px !important;
  }

  /* 시설 그리드 1열 */
  .gym-card-grid {
    grid-template-columns: 1fr;
  }

  /* 시설 상세 1열 */
  .gym-detail-info-grid {
    grid-template-columns: 1fr;
  }

  /* body 가로 스크롤 방지만 (세로 스크롤은 app-body 내부에서) */
  body {
    overflow-x: hidden;
  }

  /* 컨트롤 바 높이 줄임 */
  .preview-control-bar {
    min-height: 52px;
  }

  /* FAB 위치 탭바 위 */
  .mobile-fab {
    bottom: 70px;
    right: 14px;
    width: 52px;
    height: 52px;
    font-size: 22px;
  }

  /* 게시물 카드 */
  .post-card {
    padding: 14px;
    border-radius: 12px;
  }

  .post-title {
    font-size: 15px;
  }

  /* 카테고리 스크롤 */
  .category-nav-scroll {
    padding-bottom: 2px;
  }
}

/* 480px 이하: 아이폰 SE 등 소형 폰 추가 최적화 */
@media screen and (max-width: 480px) {
  .tab-item span {
    font-size: 8px;
  }

  .tab-item i {
    width: 20px;
    height: 20px;
  }

  .app-body {
    gap: 10px;
  }

  .post-card {
    padding: 12px;
  }

  .gym-card-thumb {
    height: 120px;
  }

  .gym-detail-hero {
    height: 160px;
  }
}

/* ==========================================
   11. BAPR GENDER TABS STYLES (바프인증 성별 탭)
   ========================================== */
.bapr-gender-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.gender-tab {
  flex: 1;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  border-radius: 9px;
  cursor: pointer;
  transition: all var(--transition-speed);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.gender-tab.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gender-tab[data-gender="female"].active {
  color: #ff477e;
  border-color: rgba(255, 71, 126, 0.3);
  background: rgba(255, 71, 126, 0.08);
}

.gender-tab[data-gender="male"].active {
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.08);
}

.gender-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-sub);
}

/* ==========================================
   12. SOCIAL LOGIN STYLES (네이버/카카오 간편가입)
   ========================================== */
.social-auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.social-auth-divider::before,
.social-auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.social-auth-divider:not(:empty)::before {
  margin-right: .5em;
}

.social-auth-divider:not(:empty)::after {
  margin-left: .5em;
}

.social-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.btn-social {
  width: 100%;
  height: 46px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition-speed);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-social:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.btn-social:active {
  transform: translateY(1px);
}

.btn-naver {
  background-color: #03c75a !important;
  color: #ffffff !important;
}

.btn-naver:hover {
  background-color: #02b14e !important;
}

.btn-kakao {
  background-color: #fee500 !important;
  color: #191919 !important;
}

.btn-kakao:hover {
  background-color: #fada0a !important;
}

.social-icon {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-weight: 800;
}

.naver-icon {
  background: #ffffff;
  color: #03c75a;
  font-size: 13px;
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.kakao-icon {
  font-size: 18px;
}

/* Social Mockup Popup Overlay */
.social-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.social-popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.social-popup-window {
  background: #ffffff;
  color: #000000;
  width: 380px;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.social-popup-overlay.active .social-popup-window {
  transform: scale(1);
}

.social-popup-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eeeeee;
}

.social-popup-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
}

.social-popup-body {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.social-brand-logo-large {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.naver-logo-large {
  background: #03c75a;
  color: #ffffff;
}

.kakao-logo-large {
  background: #fee500;
  color: #191919;
}

.social-consent-box {
  background: #f7f7f7;
  border-radius: 12px;
  padding: 14px;
  font-size: 13px;
  border: 1px solid #e5e5e5;
  color: #333333;
}

.social-consent-title {
  font-weight: 700;
  margin-bottom: 8px;
  color: #000000;
}

.social-consent-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.social-consent-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.social-consent-item::before {
  content: '✓';
  color: #22c55e;
  font-weight: bold;
}

.social-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.social-input-label {
  font-size: 12px;
  font-weight: 700;
  color: #666666;
}

.social-popup-input {
  width: 100%;
  height: 42px;
  border-radius: 8px;
  border: 1px solid #cccccc;
  padding: 0 12px;
  font-size: 14px;
  color: #000000;
  background: #ffffff;
  box-sizing: border-box;
}

.social-popup-input:focus {
  border-color: #000000;
  outline: none;
}

.btn-social-submit {
  width: 100%;
  height: 46px;
  border-radius: 8px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  color: #ffffff;
}

.naver-btn-submit {
  background: #03c75a;
}
.naver-btn-submit:hover {
  background: #02b14e;
}

.kakao-btn-submit {
  background: #fee500;
  color: #191919;
}
.kakao-btn-submit:hover {
  background: #fada0a;
}

.btn-social-cancel {
  background: none;
  border: none;
  color: #666666;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  margin-top: 4px;
}

.btn-social-cancel:hover {
  text-decoration: underline;
}

/* Spinner and Success Checkmark */
.social-popup-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 20px;
}

.social-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f3f3f3;
  border-radius: 50%;
  animation: social-spin 1s linear infinite;
}

.naver-spinner {
  border-top: 4px solid #03c75a;
  border-left: 4px solid #03c75a;
}

.kakao-spinner {
  border-top: 4px solid #fee500;
  border-left: 4px solid #fee500;
}

@keyframes social-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.checkmark-container {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: block;
  stroke-width: 4;
  stroke: #ffffff;
  stroke-miterlimit: 10;
  box-shadow: inset 0px 0px 0px #22c55e;
  animation: check-fill .4s ease-in-out .4s forwards, check-scale .3s ease-in-out .9s both;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 4;
  stroke-miterlimit: 10;
  stroke: #22c55e;
  fill: none;
  animation: check-stroke .6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: check-stroke .3s cubic-bezier(0.65, 0, 0.45, 1) .8s forwards;
}

@keyframes check-stroke {
  100% { stroke-dashoffset: 0; }
}

@keyframes check-fill {
  100% { box-shadow: inset 0px 0px 0px 30px #22c55e; }
}

@keyframes check-scale {
  0%, 100% { transform: none; }
  50% { transform: scale3d(1.1, 1.1, 1); }
}

/* Interest Type Card Styles */
.interest-type-card {
  border: 1px solid var(--border-color);
  background: transparent;
  transition: all 0.2s ease;
}
.interest-type-card:hover {
  border-color: var(--text-muted);
}

/* Profile Preset & Color Styles */
.color-picker-btn {
  transition: all 0.2s ease;
}
.color-picker-btn.active {
  border-color: #fff !important;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  transform: scale(1.15);
}
.preset-avatar-chip {
  transition: all 0.2s ease;
}
.preset-avatar-chip.active {
  border-color: var(--accent) !important;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
  transform: scale(1.08);
}

/* ==========================================
   11. PROFILE SYSTEM STYLES (프로필 상세 관리)
   ========================================== */

/* Profile Tab Bar & Buttons */
.profile-tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  padding: 0 8px;
}

.profile-tab-btn {
  flex: 1;
  padding: 12px 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.profile-tab-btn.active {
  border-bottom: 2px solid var(--accent) !important;
  color: var(--accent) !important;
  font-weight: 700;
}

/* Tab Panels */
.profile-tab-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.profile-tab-panel.active {
  display: flex !important;
}

/* Tag Chips */
.profile-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.profile-chip {
  padding: 6px 14px;
  background: var(--bg-tertiary, #1f2937);
  border: 1px solid var(--border-color);
  color: var(--text-sub, #9ca3af);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.profile-chip:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  color: var(--text-main);
  background: rgba(var(--accent-rgb), 0.05);
}

.profile-chip.active {
  background: rgba(var(--accent-rgb), 0.15) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.2);
}

/* Body profile Photo Slots */
.bapr-photo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.bapr-photo-slot {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border-color);
  background: rgba(0,0,0,0.15);
}

.bapr-photo-slot.has-image {
  border: 1px solid var(--border-color);
}

.bapr-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bapr-photo-slot.empty:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.05);
}

.bapr-photo-slot.empty:hover i {
  color: var(--accent) !important;
}

/* Remove button overlay on photo slots */
.bapr-photo-slot-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s ease;
}

.bapr-photo-slot-remove:hover {
  background: var(--accent-red, #ff477e) !important;
  transform: scale(1.1);
}

/* Preset library image styles */
.preset-bapr-lib-img {
  transition: all 0.2s ease;
}

.preset-bapr-lib-img:hover {
  transform: scale(1.05);
  border-color: var(--accent) !important;
}

/* ==========================================
   11. IMAGE UPLOAD & PREVIEW SYSTEM STYLES
   ========================================== */
#imagePreviewContainer {
  position: relative;
  width: 100%;
  max-height: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed var(--border-color);
  display: none;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
  box-sizing: border-box;
}

#imagePreviewContainer img {
  max-height: 200px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
}

#btnRemoveUploadedImage {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ef4444 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: all var(--transition-speed);
  backdrop-filter: blur(4px);
  z-index: 10;
}

#btnRemoveUploadedImage:hover {
  background: #ef4444;
  color: #fff !important;
  transform: scale(1.1);
}

#btnTriggerImageUpload {
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.03);
  color: var(--text-main);
  transition: all var(--transition-speed);
}

#btnTriggerImageUpload:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.15);
}

/* Thumbnail and full image wrappers */
.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.detail-post-image-container img {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-post-image-container img:hover {
  transform: scale(1.02);
}


/* ==========================================
   11. POINT SYSTEM STYLES (포인트 시스템)
   ========================================== */

/* 헤더 포인트 배지 버튼 */
.point-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(79, 70, 229, 0.15) 100%);
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 20px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: #a78bfa;
  transition: all 0.2s;
  white-space: nowrap;
}

.point-badge-btn:hover {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.3) 0%, rgba(79, 70, 229, 0.3) 100%);
  border-color: rgba(124, 58, 237, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* 포인트 패키지 카드 */
.point-package-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.point-package-card:hover {
  border-color: rgba(124, 58, 237, 0.5);
  background: rgba(124, 58, 237, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.2);
}

.point-package-card.best {
  border-color: rgba(124, 58, 237, 0.4);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(79, 70, 229, 0.05) 100%);
}

.point-package-card.best::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.point-package-card.vip {
  border-color: rgba(251, 191, 36, 0.4);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.06) 0%, rgba(245, 158, 11, 0.04) 100%);
}

.point-package-card.vip:hover {
  border-color: rgba(251, 191, 36, 0.7);
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.2);
}

.pkg-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pkg-gem {
  font-size: 20px;
}

.pkg-pts {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.pkg-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pkg-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

.pkg-buy-btn {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.point-package-card:hover .pkg-buy-btn {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}

.point-package-card.vip .pkg-buy-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* 배지들 */
.pkg-badge-best {
  font-size: 10px;
  font-weight: 800;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  padding: 2px 7px;
  border-radius: 10px;
}

.pkg-badge-save {
  font-size: 10px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: 10px;
}

.pkg-badge-vip {
  font-size: 10px;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  padding: 2px 7px;
  border-radius: 10px;
}

/* 포인트 토스트 슬라이드인 애니메이션 */
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ==========================================
   12. GYMZ PASS STYLES (체험권 구매 카드)
   ========================================== */

/* 체험권 카드 */
.gymz-pass-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.gymz-pass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 1.5px solid transparent;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
              linear-gradient(135deg, var(--pass-accent, var(--accent)) 0%, transparent 100%) border-box;
  transition: opacity 0.25s;
  opacity: 0;
}

.gymz-pass-card:hover::before { opacity: 1; }

.gymz-pass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* 인기 배지 */
.gymz-pass-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 9px;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  padding: 2px 7px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.gymz-pass-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.gymz-pass-emoji {
  font-size: 24px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.gymz-pass-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

.gymz-pass-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.gymz-pass-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.gymz-pass-price {
  font-size: 15px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.gymz-pass-buy-btn {
  background: linear-gradient(135deg, var(--pass-accent, var(--accent)), #4f46e5);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}

.gymz-pass-buy-btn:hover {
  transform: scale(1.07);
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

/* 결제 수단 선택 라디오 카드 */
.gymz-pay-method {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.gymz-pay-method:hover {
  border-color: rgba(124, 58, 237, 0.4);
  background: rgba(124, 58, 237, 0.04);
}

.gymz-pay-method.selected {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.08);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.gymz-pay-method.selected::after {
  content: '✓';
  margin-left: auto;
  color: var(--accent);
  font-weight: 800;
  font-size: 14px;
}

/* ==========================================
   13. SPORT TAG STYLES (종목 선택 태그)
   ========================================== */

/* 종목 선택 컨테이너 */
.sport-tag-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* 종목 칩 */
.sport-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  line-height: 1;
}

.sport-tag-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.07);
  transform: translateY(-1px);
}

.sport-tag-chip.selected {
  background: rgba(var(--accent-rgb), 0.15);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 800;
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.15);
}

/* 배지 (포스트 카드 / 상세) */
.badge-sport-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 8px;
  letter-spacing: 0.2px;
}

/* ==========================================
   14. CASCADING REGION PICKER (지역 선택기)
   ========================================== */

.cascading-region-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Step 1: 권역 버튼 행 */
.crp-area-row {
  display: flex;
  gap: 8px;
}

.crp-area-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  cursor: pointer;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: -0.2px;
}

.crp-area-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
  transform: translateY(-2px);
}

.crp-area-btn.active {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.15);
}

.crp-area-icon {
  font-size: 20px;
  line-height: 1;
}

/* Step 2: 세부 지역 칩 패널 */
.crp-chips-panel {
  transform: translateY(-6px);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.crp-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crp-chip {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.crp-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.07);
  transform: translateY(-1px);
}

.crp-chip.active {
  background: rgba(var(--accent-rgb), 0.15);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 800;
}

/* 최종 선택 결과 태그 */
.crp-selected-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1.5px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 12px;
  animation: crpFadeIn 0.2s ease;
}

.crp-selected-icon {
  font-size: 16px;
}

.crp-selected-text {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  flex: 1;
}

.crp-reset-btn {
  background: none;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.crp-reset-btn:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

@keyframes crpFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   15. COMMUNITY FILTER CRP (필터 바 캐스케이딩)
   ========================================== */

.filter-crp {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 권역 버튼 행 */
.filter-crp-area-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-crp-area-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.filter-crp-area-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
}

.filter-crp-area-btn.active {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 800;
}

/* 세부 지역 칩 패널 */
.filter-crp-chips-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  animation: crpFadeIn 0.2s ease;
}

.filter-crp-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
}

.filter-crp-chip {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.filter-crp-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.07);
}

.filter-crp-chip.active {
  background: rgba(var(--accent-rgb), 0.15);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 800;
}

/* 전체보기 초기화 버튼 */
.filter-crp-reset-btn {
  background: none;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-crp-reset-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 앱/모바일 필터용 소형 스타일 */
.filter-crp-app .filter-crp-area-btn {
  font-size: 11px;
  padding: 5px 10px;
}

.filter-crp-app .filter-crp-chip {
  font-size: 10px;
  padding: 3px 8px;
}

/* ==========================================
   16. RFS - REGION FILTER SWAP (지역 탭 교체)
   ========================================== */

/* 컨테이너 */
.rfs {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* VIEW 공통 */
.rfs-view {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* 권역 탭 (서울/수도권/지방) */
.rfs-area-tab {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.rfs-area-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
  transform: translateY(-1px);
}

.rfs-area-tab.active {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 800;
}

/* 세부 지역 뷰 */
.rfs-sub-view {
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 0 2px;
}

/* ← 뒤로 버튼 */
.rfs-back-btn {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.rfs-back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 세부 지역 칩 컨테이너 */
.rfs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
}

/* 세부 지역 칩 */
.rfs-chip {
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.rfs-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.07);
  transform: translateY(-1px);
}

.rfs-chip.active {
  background: rgba(var(--accent-rgb), 0.15);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 800;
}

/* [지역 전체] 특수 칩 */
.rfs-chip-all {
  font-weight: 800;
  border-color: rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
}

.rfs-chip-all:hover,
.rfs-chip-all.active {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: var(--accent);
}

/* 모바일용 소형 스타일 */
.rfs-app .rfs-area-tab {
  font-size: 11px;
  padding: 5px 12px;
}

.rfs-app .rfs-chip {
  font-size: 10px;
  padding: 3px 9px;
}

.rfs-app .rfs-back-btn {
  font-size: 10px;
  padding: 4px 8px;
}

/* ==========================================
   11. GOOGLE MAPS & GPS TRACKING STYLES (지도 및 GPS 추적 디자인)
   ========================================== */

/* Map container stylings */
.writing-map-container,
.detail-map-google-container {
  border: 1px solid var(--border-color);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
  background: var(--bg-tertiary);
  transition: border-color var(--transition-speed);
}

.writing-map-container:focus-within {
  border-color: var(--accent);
}

/* Map mode buttons styling */
.btn-map-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9px;
  cursor: pointer;
  transition: all var(--transition-speed);
  padding: 8px 14px;
}

.btn-map-control:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.btn-map-control:active {
  transform: translateY(0);
}

.btn-map-control.active {
  box-shadow: 0 4px 10px rgba(var(--accent-rgb), 0.35);
}

/* GPS pulse dot style */
@keyframes gps-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* RFS Container */
.rfs {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* VIEW 공통 */
.rfs-view {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* 권역 탭 (서울/수도권/지방) */
.rfs-area-tab {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.rfs-area-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
  transform: translateY(-1px);
}

.rfs-area-tab.active {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 800;
}

/* 세부 지역 뷰 */
.rfs-sub-view {
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 0 2px;
}

/* ← 뒤로 버튼 */
.rfs-back-btn {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.rfs-back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 세부 지역 칩 컨테이너 */
.rfs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
}

/* 세부 지역 칩 */
.rfs-chip {
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.rfs-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.07);
  transform: translateY(-1px);
}

.rfs-chip.active {
  background: rgba(var(--accent-rgb), 0.15);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 800;
}

/* [지역 전체] 특수 칩 */
.rfs-chip-all {
  font-weight: 800;
  border-color: rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
}

.rfs-chip-all:hover,
.rfs-chip-all.active {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: var(--accent);
}

/* 모바일용 소형 스타일 */
.rfs-app .rfs-area-tab {
  font-size: 11px;
  padding: 5px 12px;
}

.rfs-app .rfs-chip {
  font-size: 10px;
  padding: 3px 9px;
}

.rfs-app .rfs-back-btn {
  font-size: 10px;
  padding: 4px 8px;
}

/* ==========================================
   11. GOOGLE MAPS & GPS TRACKING STYLES (지도 및 GPS 추적 디자인)
   ========================================== */

/* Map container stylings */
.writing-map-container,
.detail-map-google-container {
  border: 1px solid var(--border-color);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
  background: var(--bg-tertiary);
  transition: border-color var(--transition-speed);
}

.writing-map-container:focus-within {
  border-color: var(--accent);
}

/* Map mode buttons styling */
.btn-map-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9px;
  cursor: pointer;
  transition: all var(--transition-speed);
  padding: 8px 14px;
}

.btn-map-control:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.btn-map-control:active {
  transform: translateY(0);
}

.btn-map-control.active {
  box-shadow: 0 4px 10px rgba(var(--accent-rgb), 0.35);
}

/* GPS pulse dot style */
@keyframes gps-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Spinning loader keyframes */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 1.2s linear infinite;
}

/* ==========================================
   11. HOME DASHBOARD STYLES (홈 대시보드)
   ========================================== */
.home-dashboard-wrapper {
  animation: fadeIn 0.3s ease-out;
  padding: 4px;
}

.home-section-header {
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
}

.home-section-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.home-more-btn {
  transition: transform 0.2s, color 0.2s;
}
.home-more-btn:hover {
  color: var(--text-main) !important;
  transform: translateX(3px);
}

.home-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.home-list-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 40px;
}
@media (min-width: 1024px) {
  .home-list-layout {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================
   11. MYPAGE DASHBOARD SYSTEM (마이페이지 종합 대시보드)
   ========================================== */

/* 웹 마이페이지 2컬럼 레이아웃 */
.mypage-sidebar {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
}

.mypage-menu-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-speed);
}

.mypage-menu-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.mypage-menu-btn.active {
  background: rgba(var(--accent-rgb), 0.1) !important;
  color: var(--accent) !important;
}

/* 마이페이지 서브 리스트 카드 */
.mypage-post-item {
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background-color 0.2s;
}

.mypage-post-item:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.02);
}

/* 모바일 마이페이지 메뉴 카드 */
.app-mypage-menu-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

.app-mypage-menu-card:active {
  transform: scale(0.98);
  background: var(--bg-tertiary);
}

.app-mypage-menu-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-mypage-menu-arrow {
  color: var(--text-muted);
  font-size: 14px;
}

/* ==========================================
   11. ENHANCED PROFILE & WORKOUT STATS (프로필 카드 강화 & 운동 통계)
   ========================================== */
.profile-hero-card {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.profile-stat-item {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  backdrop-filter: blur(8px);
}

.profile-stat-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
}

.profile-stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

/* 운동 통계 리포트 전용 스타일 */
.workout-stats-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.workout-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-main);
}

.workout-progress-bar-track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.workout-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #10b981 100%);
  border-radius: 8px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.streak-blocks-row {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  overflow-x: auto;
}

.streak-block {
  flex: 1;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.streak-block.active {
  background: var(--accent);
  color: #000;
}

.streak-block.inactive {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}


/* ==========================================
   CLEAN TEXT TABS (상단 텍스트 탭 & 보라색 하단 라인)
   ========================================== */
.app-cat-group-tab,
.top-nav-tab,
.nav-tab-clean {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #555555 !important;
  padding: 10px 18px !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

[data-theme="dark"] .app-cat-group-tab,
[data-theme="dark"] .top-nav-tab,
[data-theme="dark"] .nav-tab-clean {
  color: #94a3b8 !important;
}

.app-cat-group-tab.active,
.top-nav-tab.active,
.nav-tab-clean.active {
  color: var(--accent, #8b5cf6) !important;
  font-weight: 800 !important;
  border-bottom: 3px solid var(--accent, #8b5cf6) !important;
  background: transparent !important;
}

.app-cat-group-tab:hover,
.top-nav-tab:hover,
.nav-tab-clean:hover {
  color: var(--accent, #8b5cf6) !important;
}

.app-cat-group-scroll {
  display: flex !important;
  gap: 4px !important;
  border-bottom: 1px solid var(--border-color) !important;
  background: var(--bg-secondary) !important;
  padding-bottom: 0 !important;
}


/* ==========================================
   PURE TEXT TAB BAR (보라색 하단 라인 탭 리뉴얼)
   ========================================== */
.app-cat-group-row,
.app-cat-group-scroll,
.top-nav-tabs-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: var(--bg-card, #ffffff) !important;
  border-bottom: 1px solid var(--border-color, #e5e7eb) !important;
  padding: 0 12px !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}

.app-cat-group-row::-webkit-scrollbar,
.app-cat-group-scroll::-webkit-scrollbar {
  display: none !important;
}

.app-cat-group-tab,
.top-nav-tab,
.nav-tab-item {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #555555 !important;
  padding: 12px 14px !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  transition: color 0.15s ease, border-color 0.15s ease !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

[data-theme="dark"] .app-cat-group-tab,
[data-theme="dark"] .top-nav-tab,
[data-theme="dark"] .nav-tab-item {
  color: #a1a1aa !important;
}

.app-cat-group-tab.active,
.top-nav-tab.active,
.nav-tab-item.active {
  color: var(--accent, #8b5cf6) !important;
  font-weight: 800 !important;
  border-bottom: 3px solid var(--accent, #8b5cf6) !important;
  background: transparent !important;
}

.app-cat-group-tab:hover,
.top-nav-tab:hover,
.nav-tab-item:hover {
  color: var(--accent, #8b5cf6) !important;
}


/* ==========================================
   MOBILE RESPONSIVE PROFILE MODAL (모바일 프로필 모달 튜닝)
   ========================================== */
@media (max-width: 768px) {
  #profileModal .modal-window {
    flex-direction: column !important;
    width: 95vw !important;
    height: 88vh !important;
    max-height: 88vh !important;
    border-radius: 20px !important;
    overflow-y: auto !important;
  }

  .modal-left-sidebar {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    flex-shrink: 0 !important;
  }

  #profileModal .modal-window > div:last-child {
    width: 100% !important;
    flex: 1 !important;
  }

  .profile-stat-grid-modal {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
  }

  .profile-stat-grid-modal > div {
    padding: 8px 4px !important;
  }

  .profile-stat-grid-modal > div > div:first-child {
    font-size: 13px !important;
  }

  .profile-stat-grid-modal > div > div:last-child {
    font-size: 9px !important;
  }

  /* 모바일 메뉴 버튼 리스트 가로 칩 형태 또는 콤팩트 스크롤 */
  .modal-left-sidebar > div:last-child {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding: 8px 12px !important;
    gap: 6px !important;
    scrollbar-width: none !important;
  }

  .modal-left-sidebar > div:last-child::-webkit-scrollbar {
    display: none !important;
  }

  .modal-left-sidebar > div:last-child > div {
    display: none !important; /* 구분 소제목 텍스트 모바일에서 숨김 */
  }

  .mypage-menu-btn {
    white-space: nowrap !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid var(--border-color) !important;
  }

  .mypage-menu-btn.active {
    background: var(--accent) !important;
    color: #000 !important;
    border-color: var(--accent) !important;
  }

  .mypage-menu-btn.active i {
    color: #000 !important;
  }
}


/* ==========================================
   MINIMAL FLAT POST CARD DESIGN (눈 피로 최소화 미니멀 피드 카드)
   ========================================== */
.clean-post-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 18px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  position: relative;
}

.clean-post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.cpc-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.cpc-tags {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cpc-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  line-height: 1;
}

.cpc-badge.badge-instructor { background: #fef08a; color: #854d0e; }
.cpc-badge.badge-lounge { background: #bfdbfe; color: #1e40af; }
.cpc-badge.badge-workout { background: #dcfce7; color: #166534; }
.cpc-badge.badge-diet { background: #e0e7ff; color: #3730a3; }
.cpc-badge.badge-facility_review { background: #ffedd5; color: #9a3412; }
.cpc-badge.badge-notice { background: #f3e8ff; color: #6b21a8; }
.cpc-badge.badge-inquiry { background: #ffe4e6; color: #9f1239; }

.cpc-location {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub, #64748b);
}

.cpc-rec-chip {
  background: #dcfce7;
  color: #15803d;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.cpc-date {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  font-weight: 500;
}

.cpc-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  line-height: 1.4;
  letter-spacing: -0.3px;
  margin: 2px 0;
}

.cpc-review-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
}

.cpc-avatar-small {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
}

.cpc-review-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.cpc-instructor-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main, #0f172a);
}

.cpc-gym-name {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
}

.cpc-stars-block {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.cpc-stars {
  color: #fbbf24;
  font-size: 14px;
  letter-spacing: 1px;
}

.cpc-rating-num {
  font-size: 14px;
  font-weight: 900;
  color: var(--text-main, #0f172a);
  margin-left: 2px;
}

.cpc-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 4px;
}

.cpc-author-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cpc-lvl-badge {
  font-size: 10px;
  font-weight: 800;
  color: #7c3aed;
  background: #f3e8ff;
  padding: 2px 6px;
  border-radius: 6px;
}

.cpc-title-chip {
  font-size: 10px;
  font-weight: 700;
  color: #10b981;
  background: #d1fae5;
  padding: 2px 6px;
  border-radius: 6px;
}

.cpc-author-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub, #475569);
}

.cpc-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
}

.cpc-stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cpc-stat-item.stat-like {
  color: #f43f5e;
}


/* ==========================================
   WORKOUT DIET CARD OVERLAY FIX (사진/글씨 겹침 완전 차단)
   ========================================== */
.workout-diet-card {
  display: flex !important;
  flex-direction: column !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  position: relative !important;
}

.wdc-image-wrap {
  position: relative !important;
  width: 100% !important;
  height: 180px !important;
  overflow: hidden !important;
  background: #0f172a !important;
  flex-shrink: 0 !important;
}

.wdc-image-wrap .wdc-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.wdc-metrics-bar {
  position: absolute !important;
  bottom: 10px !important;
  left: 10px !important;
  right: 10px !important;
  display: flex !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  z-index: 3 !important;
}

.wdc-metrics-bar .wdc-badge {
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(8px) !important;
  color: #ffffff !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  line-height: 1.2 !important;
}

.wdc-content {
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  background: var(--bg-card) !important;
  box-sizing: border-box !important;
}


/* ==========================================
   CPC AUTHOR INFO NOWRAP FIX (닉네임 줄바꿈 방지)
   ========================================== */
.cpc-author-info {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
}

.cpc-author-name {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--text-sub, #475569) !important;
  white-space: nowrap !important;
}


/* ==========================================
   11. YOGI-STYLE CATEGORY GRID (여기어때 스타일 8개 아이콘 그리드)
   ========================================== */
.yogi-cat-section {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 20px;
  padding: 18px 16px 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.yogi-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 10px;
}

.yogi-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 4px;
}

.yogi-cat-item:hover {
  transform: translateY(-4px) scale(1.05);
}

.yogi-cat-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
  position: relative;
}

.yogi-cat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  text-align: center;
  line-height: 1.2;
  letter-spacing: -0.2px;
}

/* ==========================================
   12. INTEGRATED SEARCH SCREEN (게시글 통합 검색 뷰)
   ========================================== */
.app-search-screen {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px 4px;
  height: 100%;
}

.search-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 2px solid var(--accent, #8b5cf6);
  border-radius: 16px;
  padding: 8px 14px;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.15);
}

.search-input-field {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
}

.search-btn-action {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.search-btn-action:hover {
  transform: scale(1.05);
}

.search-tags-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
}

.search-tags-header {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-tag-chip {
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-tag-chip:hover {
  background: var(--accent);
  color: #000;
}

/* ==========================================
   13. NEARBY GYM EXPLORE SCREEN (내 위치 기반 주변 운동시설 싹다보기)
   ========================================== */
.app-nearby-screen {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 10px 4px;
}

.geo-location-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.12) 0%, rgba(16, 185, 129, 0.12) 100%);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 16px;
  padding: 12px 16px;
}

.geo-location-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
}

.geo-change-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
}

.nearby-filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.nearby-filter-chips::-webkit-scrollbar { display: none; }

.nearby-filter-chip {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  cursor: pointer;
  white-space: nowrap;
}

.nearby-filter-chip.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.gym-nearby-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.03);
}

.gym-nearby-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  border-color: rgba(var(--accent-rgb), 0.4);
}

.gym-nearby-thumb {
  height: 130px;
  position: relative;
  overflow: hidden;
}

.gym-nearby-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gym-dist-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.gym-nearby-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gym-nearby-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.gym-nearby-addr {
  font-size: 11px;
  color: var(--text-muted);
}

.gym-facility-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.gym-facility-chip {
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}


/* ==========================================
   UNIFIED BRAND PURPLE TONE & MANNER (단일 보라색 톤앤매너 배지 & 칩)
   ========================================== */
.cpc-badge {
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  line-height: 1 !important;
  background: rgba(139, 92, 246, 0.1) !important;
  color: #7c3aed !important;
  border: 1px solid rgba(139, 92, 246, 0.22) !important;
}

/* 모든 알록달록 카테고리 색상을 고급스러운 브랜드 퍼플 톤으로 단일 통일 */
.cpc-badge.badge-instructor,
.cpc-badge.badge-lounge,
.cpc-badge.badge-workout,
.cpc-badge.badge-diet,
.cpc-badge.badge-facility_review,
.cpc-badge.badge-notice,
.cpc-badge.badge-inquiry {
  background: rgba(139, 92, 246, 0.1) !important;
  color: #7c3aed !important;
  border: 1px solid rgba(139, 92, 246, 0.22) !important;
}

[data-theme="dark"] .cpc-badge {
  background: rgba(139, 92, 246, 0.2) !important;
  color: #a78bfa !important;
  border-color: rgba(139, 92, 246, 0.35) !important;
}

.cpc-rec-chip {
  background: rgba(139, 92, 246, 0.12) !important;
  color: #6d28d9 !important;
  border: 1px solid rgba(139, 92, 246, 0.25) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  padding: 3px 9px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
}

.cpc-lvl-badge {
  font-size: 10px !important;
  font-weight: 800 !important;
  color: #7c3aed !important;
  background: rgba(139, 92, 246, 0.08) !important;
  border: 1px solid rgba(139, 92, 246, 0.2) !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
}

.cpc-title-chip {
  font-size: 10px !important;
  font-weight: 800 !important;
  color: #6d28d9 !important;
  background: rgba(139, 92, 246, 0.08) !important;
  border: 1px solid rgba(139, 92, 246, 0.2) !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
}

.cpc-stats {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  font-size: 11px !important;
  color: var(--text-muted, #94a3b8) !important;
  font-weight: 600 !important;
}

.cpc-stat-item.stat-like {
  color: #7c3aed !important;
}


/* ==========================================
   UNIFIED EMOJI ICON BACKGROUND COLOR (단일 보라색 이모지 배경 통일)
   ========================================== */
.yogi-cat-icon-box {
  width: 52px !important;
  height: 52px !important;
  border-radius: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
  background: rgba(139, 92, 246, 0.08) !important;
  border: 1px solid rgba(139, 92, 246, 0.16) !important;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.06) !important;
  transition: all 0.2s ease !important;
}

[data-theme="dark"] .yogi-cat-icon-box {
  background: rgba(139, 92, 246, 0.18) !important;
  border-color: rgba(139, 92, 246, 0.3) !important;
}

.yogi-cat-item:hover .yogi-cat-icon-box {
  background: rgba(139, 92, 246, 0.18) !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.15) !important;
}

/* DB 헤더 배지 버튼 원천 박멸 */
#headerDbSettingsBtn,
#appHeaderDbSettingsBtn,
[title="DB 설정"],
[title="DB 연동 설정"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 🛢️ DB 설정 상단 헤더 글씨 100% 완전 차단 */
#headerDbSettingsBtn,
#appHeaderDbSettingsBtn,
button[title*="DB"],
.btn-admin-header[title*="DB"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}


/* ==========================================
   27. RELEASE STICKY FOR CATEGORY EMOJI GRID & PURGE MOBILE DB ICON
   ========================================== */
.yogi-cat-section,
#appCategoryGridContainer,
.yogi-cat-grid,
.app-gym-type-scroll {
  position: relative !important;
  top: auto !important;
  z-index: 1 !important;
}

/* 모바일 헤더 DB 아이콘 100% 소탕 */
#appHeaderDbSettingsBtn,
button[title*="DB"] {
  display: none !important;
  visibility: hidden !important;
}


/* ==========================================
   28. MOBILE FULL SCROLL FOR CATEGORY GRID & EXPLORE FEED
   ========================================== */
.app-screen-body {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 100% !important;
}

#appCategoryGridContainer,
.yogi-cat-section,
.region-selectors,
#appExploreContainer {
  position: static !important;
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  flex-shrink: 0 !important;
}

.app-explore-screen {
  overflow-y: visible !important;
  height: auto !important;
}

/* ==========================================
   FAB + 버튼 하단 여백 보완
   게시글 카드가 FAB에 가려지지 않도록
   ========================================== */

#appPostContainer {
  padding-bottom: 140px !important;
}

.mobile-fab svg,
.mobile-fab i {
  width: 18px !important;
  height: 18px !important;
}

/* ==========================================
   프로필 토글 스위치 (iOS 스타일)
   ========================================== */
.switch-container input:checked + .switch-slider {
  background-color: var(--accent) !important;
}

.switch-container input:checked + .switch-slider:before {
  transform: translateX(20px);
}

.switch-slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ==========================================
   미니 프로필 카드 및 효과
   ========================================== */
.clickable-nick:hover {
  text-decoration: underline;
  opacity: 0.9;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUpFade {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================================
   GYMZ APP SPLASH SCREEN (앱 첫 로딩 화면)
   ========================================== */
.gymz-splash-screen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background-color: #0b0f19;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
  user-select: none;
}

.gymz-splash-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gymz-splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  max-width: 320px;
}

.gymz-splash-logo-wrap {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(var(--accent-rgb), 0.25);
  animation: splashLogoPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.gymz-splash-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gymz-splash-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.gymz-splash-title {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  animation: splashFadeUp 0.8s ease 0.2s both;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.gymz-splash-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  letter-spacing: -0.3px;
  line-height: 1.4;
  animation: splashFadeUp 0.8s ease 0.35s both;
  word-break: keep-all;
}

@keyframes splashLogoPop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes splashFadeUp {
  0% {
    transform: translateY(14px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==========================================
   GPS RUN TRACKER (런데이 스타일)
   ========================================== */

/* 풀스크린 모달 오버레이 */
.run-tracker-modal {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: #0b0f19;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh; /* 구형 모바일 브라우저 fallback */
  height: 100dvh;
  height: var(--run-viewport-height, 100dvh);
  min-height: 0;
  max-height: var(--run-viewport-height, 100dvh);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

/* 트래킹 화면 레이아웃 */
.run-tracking-screen {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

/* 상단 바 */
.run-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top, 12px));
  background: #0b0f19;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  z-index: 10;
}

.run-top-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.run-icon-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.run-icon-btn:active { background: rgba(255,255,255,0.15); }
.run-icon-btn i, .run-icon-btn svg { width: 18px; height: 18px; }

/* 상단 실시간 통계 */
.run-stats-top {
  background: #0b0f19;
  padding: 10px 18px 12px;
  flex-shrink: 0;
  text-align: center;
}

.run-stat-main {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
}

.run-stat-value {
  font-size: 46px;
  font-weight: 900;
  color: #d4ff3f;
  font-family: 'Outfit', -apple-system, sans-serif;
  letter-spacing: -2px;
  line-height: 1;
}

.run-stat-unit {
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  letter-spacing: -0.5px;
}

.run-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.run-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.run-stat-val-sm {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  font-family: 'Outfit', -apple-system, sans-serif;
  letter-spacing: -0.5px;
}

.run-stat-lbl {
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.run-stat-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
  margin: 0 4px;
}

/* 상단 실시간 GPS 서브바 (초슬림 뱃지) */
.run-stats-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
}

.run-gps-live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  color: #10b981;
}

.run-gps-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: gpsPulse 1.8s infinite;
}

@keyframes gpsPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 10px #10b981; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.run-gps-mode-tag {
  font-size: 9.5px;
  font-weight: 700;
  color: #d4ff3f;
  background: rgba(212,255,63,0.12);
  padding: 2px 7px;
  border-radius: 8px;
}

/* 시작 전 꿀팁 배너 (시작 시 자동 숨김) */
.run-bg-notice-banner {
  background: rgba(255, 255, 255, 0.035);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 6px 12px;
  margin: 0 14px 6px;
  font-size: 10.5px;
  color: #94a3b8;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

/* Leaflet 지도 컨테이너 (여백 가득 채움 & 절대 어두운 구멍 안 생김) */
.run-map-container {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
  min-height: 240px;
  width: 100%;
  background: #e2e8f0;
}

.run-leaflet-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #e2e8f0;
}

.run-leaflet-map .leaflet-tile-container {
  will-change: transform;
}

/* Leaflet 기본 z-index 보정 */
.run-leaflet-map .leaflet-control-container { z-index: 400; }

/* 속도 색상 범례 */
.run-pace-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 500;
  background: rgba(11,15,25,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 6px 9px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
}

.run-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  color: rgba(255,255,255,0.85);
  font-weight: 600;
}

.run-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* 현재 위치 중심 버튼 */
.run-center-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 500;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(11,15,25,0.88);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  transition: transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.run-center-btn:active { transform: scale(0.92); }
.run-center-btn i, .run-center-btn svg { width: 20px; height: 20px; }

/* 컨트롤 영역 (모바일 하단 safe-area 완벽 대응) */
.run-controls {
  background: #0b0f19;
  padding: 12px 18px;
  padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 100;
  position: relative;
}

.run-start-area,
.run-active-area,
.run-paused-area {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

/* 시작 (단독 원형 버튼) */
.run-start-area {
  gap: 0;
}

.run-btn-start {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #d4ff3f, #a8cc00);
  color: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(212,255,63,0.4);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}

.run-btn-start:active { transform: scale(0.92); }
.run-btn-start i, .run-btn-start svg { width: 22px; height: 22px; }

/* 트래킹 중 활성 버튼 3종 (종료, 일시정지, 주머니 잠금) */
.run-active-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.run-active-btn {
  height: 52px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  transition: all 0.15s ease;
  white-space: nowrap;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.run-active-btn:active { transform: scale(0.95); }

/* 종료 버튼 */
.run-btn-stop-active {
  flex: 1;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239,68,68,0.3);
}

/* 일시정지 버튼 */
.run-btn-pause-active {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.22);
  color: #fff;
}

/* 주머니 잠금 버튼 */
.run-btn-lock-active {
  flex: 1.35;
  background: rgba(16,185,129,0.16);
  border: 1.5px solid #10b981;
  color: #10b981;
  box-shadow: 0 4px 14px rgba(16,185,129,0.25);
}

/* 일시정지 상태 (종료, 재개) */
.run-paused-area {
  gap: 10px;
  width: 100%;
}

.run-paused-area .run-active-btn {
  flex: 1;
  height: 52px;
}

.run-btn-resume-active {
  flex: 1.25;
  background: linear-gradient(135deg, #d4ff3f, #a8cc00);
  color: #000;
  box-shadow: 0 4px 16px rgba(212,255,63,0.35);
}

/* ==========================================
   결과 화면
   ========================================== */
.run-result-screen {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  background: #0b0f19;
  padding: 0 0 max(20px, env(safe-area-inset-bottom, 20px));
}

.run-result-header {
  text-align: center;
  padding: 28px 20px 16px;
  padding-top: max(28px, env(safe-area-inset-top, 28px));
  background: linear-gradient(180deg, rgba(212,255,63,0.06) 0%, transparent 100%);
}

.run-result-title {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 4px 0;
  letter-spacing: -0.5px;
}

.run-result-date {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin: 0;
}

/* 결과 통계 */
.run-result-stats {
  padding: 16px 20px;
}

.run-result-stat-main {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}

.run-result-big {
  font-size: 60px;
  font-weight: 900;
  color: #d4ff3f;
  font-family: 'Outfit', -apple-system, sans-serif;
  letter-spacing: -2px;
  line-height: 1;
}

.run-result-unit {
  font-size: 22px;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
}

.run-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.run-result-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.run-result-val {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  font-family: 'Outfit', -apple-system, sans-serif;
  letter-spacing: -0.5px;
}

.run-result-lbl {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
}

/* 결과 미니맵 */
.run-result-map-wrap {
  margin: 0 20px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}

.run-result-map {
  width: 100%;
  height: 200px;
  background: #1a1f2e;
}

/* 결과 액션 버튼 */
.run-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 20px;
  padding-bottom: max(18px, env(safe-area-inset-bottom, 18px));
}

.run-btn-register,
.run-btn-share {
  min-width: 0;
  padding: 14px 10px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.run-btn-register {
  border: 1px solid rgba(212,255,63,0.45);
  background: rgba(212,255,63,0.10);
  color: #d4ff3f;
}

.run-btn-register:active { background: rgba(212,255,63,0.18); }
.run-btn-register:disabled {
  border-color: rgba(16,185,129,0.35);
  background: rgba(16,185,129,0.10);
  color: #34d399;
  cursor: default;
  opacity: 1;
}

.run-btn-share {
  border: none;
  background: linear-gradient(135deg, #d4ff3f, #a8cc00);
  color: #000;
}

.run-btn-share:active { opacity: 0.85; }
.run-btn-register i, .run-btn-register svg,
.run-btn-share i, .run-btn-share svg { width: 16px; height: 16px; }

.run-btn-discard {
  grid-column: 1 / -1;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid rgba(239,68,68,0.25);
  background: rgba(239,68,68,0.06);
  color: #ef4444;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.run-btn-discard:active { background: rgba(239,68,68,0.18); }
.run-btn-discard i, .run-btn-discard svg { width: 15px; height: 15px; }

/* 러닝 코스 등록 바텀시트 */
.run-course-sheet {
  position: absolute;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.run-course-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(3px);
}

.run-course-sheet-card {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: calc(var(--run-viewport-height, 100dvh) - 24px);
  overflow-y: auto;
  background: #111827;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 22px 22px 0 0;
  padding: 10px 18px max(20px, env(safe-area-inset-bottom, 20px));
  box-shadow: 0 -18px 50px rgba(0,0,0,0.45);
}

.run-course-sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
  margin: 2px auto 14px;
}

.run-course-sheet-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.run-course-sheet-eyebrow {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.1px;
  color: rgba(212,255,63,0.70);
  margin-bottom: 4px;
}

.run-course-sheet-title {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.run-course-sheet-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.75);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.run-course-sheet-summary {
  margin: 14px 0 16px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(212,255,63,0.07);
  border: 1px solid rgba(212,255,63,0.16);
  color: rgba(255,255,255,0.72);
  font-size: 11px;
  line-height: 1.5;
}

.run-course-field-label {
  display: block;
  margin: 0 0 7px;
  color: rgba(255,255,255,0.78);
  font-size: 11px;
  font-weight: 700;
}
.run-course-field-label span { color: #d4ff3f; }

.run-course-field {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.055);
  color: #fff;
  padding: 12px 13px;
  font-size: 13px;
  outline: none;
}

.run-course-field:focus {
  border-color: rgba(212,255,63,0.55);
  box-shadow: 0 0 0 3px rgba(212,255,63,0.08);
}

.run-course-textarea {
  min-height: 78px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

.run-course-sheet-actions {
  display: grid;
  grid-template-columns: 0.85fr 1.4fr;
  gap: 10px;
  margin-top: 2px;
}

.run-course-cancel-btn,
.run-course-confirm-btn {
  border-radius: 13px;
  padding: 13px 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.run-course-cancel-btn {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.72);
}

.run-course-confirm-btn {
  border: none;
  background: linear-gradient(135deg, #d4ff3f, #a8cc00);
  color: #000;
}

@media (max-height: 640px) {
  .run-stats-top { padding-top: 8px; padding-bottom: 10px; }
  .run-stat-value { font-size: 42px; }
  .run-controls { padding-top: 10px; padding-bottom: max(12px, env(safe-area-inset-bottom, 12px)); }
  .run-btn-start, .run-btn-pause, .run-btn-stop { width: 62px; height: 62px; }
}

/* 런닝 게시글 상세 - 경로 미니맵 */
.run-track-detail-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  margin: 12px 0;
}

.run-track-detail-map {
  width: 100%;
  height: 200px;
  background: #1a1f2e;
}

.run-track-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border-color);
}

.run-track-stat {
  padding: 10px 8px;
  text-align: center;
  border-right: 1px solid var(--border-color);
}

.run-track-stat:last-child { border-right: none; }

.run-track-stat-val {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.3px;
}

.run-track-stat-lbl {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}


/* ==========================================
   ANTI-FLICKER & STABLE LAYOUT PATCH
   화면 깜박임 + 레이아웃 점프 완전 방지
   ========================================== */

/* GPU 레이어로 올려서 repaint 최소화 */
body.is-mobile-device #appViewContainer,
body.is-mobile-device .phone-screen,
body.is-mobile-device .app-body {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* 스크롤 컨테이너가 새로 렌더링될 때 위치 점프 방지 */
body.is-mobile-device .app-body {
  scroll-behavior: auto !important; /* 스무스 스크롤 비활성 — 잔상 방지 */
  will-change: scroll-position;
}

/* 검색 화면 — 탭 전환 시 기본 여백 제거 */
body.is-mobile-device .app-search-screen {
  padding-top: 4px;
  min-height: auto;
  height: auto;
}

/* yogi 카테고리 그리드 절대 위치 오버라이드 방지 */
body.is-mobile-device .yogi-cat-section {
  position: relative !important;
  top: auto !important;
  flex-shrink: 0;
}

/* 탭 전환 시 컨텐츠가 순간적으로 빈 상태로 보이는 flicker 방지
   - #appPostContainer가 이미 비어있는 동안 min-height 유지 */
body.is-mobile-device #appPostContainer:empty {
  min-height: 200px;
}

/* ==========================================
   BARBELL WEIGHT PLATE RATING SYSTEM (바벨 원판 평점 스타일)
   ========================================== */
.bb-plate-row {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
}

.bb-plate {
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.15s ease, filter 0.15s ease;
  flex-shrink: 0;
}

.bb-plate-filled {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.bb-plate-filled:hover {
  transform: scale(1.12);
}

.cpc-stars-block {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.cpc-rating-num {
  font-size: 14px;
  font-weight: 900;
  color: #475569;
  margin-left: 2px;
}

[data-theme="dark"] .cpc-rating-num {
  color: #cbd5e1;
}

.gym-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.gym-star-btn {
  background: none;
  border: none;
  padding: 3px;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.gym-star-btn:hover,
.gym-star-btn.active {
  transform: scale(1.18);
}


/* ==========================================
   POCKET TOUCH LOCK OVERLAY (OLED 완전 절전 & 안심 주머니 잠금)
   깜빡임/끊김 원천 차단: 하드웨어 가속 충돌 및 contain 제거, 순수 뷰포트 오버레이
   ========================================== */
.run-touch-lock-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 999999 !important;
  background-color: #000000 !important;
  display: none;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 24px 16px !important;
  box-sizing: border-box !important;
  user-select: none;
  -webkit-user-select: none;
  contain: none !important;
  isolation: auto !important;
  transform: none !important;
  will-change: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.run-touch-lock-overlay * {
  contain: none !important;
  isolation: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.run-touch-lock-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  border: 2px solid #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.run-touch-lock-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.run-touch-lock-dist {
  font-size: 46px;
  font-weight: 900;
  color: #d4ff3f;
  margin: 4px 0 2px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -1px;
}

.run-touch-lock-time {
  font-size: 22px;
  color: #ffffff;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.run-touch-lock-pts {
  font-size: 13px;
  color: #10b981;
  font-weight: 700;
  margin-bottom: 22px;
}

.run-touch-lock-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 290px;
}

.run-unlock-btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: 16px;
  padding: 15px 30px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.run-unlock-btn:active,
.run-unlock-btn.pressing {
  transform: scale(0.96);
  opacity: 0.88;
}

.run-unlock-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.run-unlock-text {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}


/* ==========================================
   FACILITY REGULAR MEMBERSHIP & INQUIRY STYLES (시설 정규 이용권 안내 및 업체 문의)
   ========================================== */
.gym-official-packages-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gym-official-package-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 4px 0;
  transition: opacity 0.2s ease;
}

.gym-official-inquiry-btn {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
  user-select: none;
}

.gym-official-inquiry-btn:hover {
  color: var(--accent) !important;
  text-decoration: underline;
  transform: translateY(-1px);
}

.gym-official-inquiry-btn:active {
  transform: translateY(1px);
}

.app-install-badge-btn {
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  border-radius: 14px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.app-install-badge-btn:hover {
  background: rgba(var(--accent-rgb), 0.22);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.app-install-badge-btn:active {
  transform: scale(0.96);
}
