/* ───────────────────────────────────────────────────────────
/* base — 공통 토큰·레이아웃·공용 컴포넌트
/* ───────────────────────────────────────────────────────────
/* style.css(base) 다음에 로드됩니다. 브랜드 토큰(:root)은 base에 있습니다.
/* ─────────────────────────────────────────────────────────── */

:root {
  /* ── Mongolia Brand Palette ──────────────────────────────────────
     통일된 몽골 여행 아이덴티티: 게르·사막(샌드/골드) + 초원(스텝) + 몽골 하늘(블루) + 밤하늘(딥 네이비)
     logo.png 의 골드/네이비와 일치. 모든 서피스(웹/어드민/Flutter)가 이 토큰을 공유한다.
     ─────────────────────────────────────────────────────────────── */
  --bg: #F6EFE1;            /* 사막 모래 크림 배경 */
  --surface: #FFFFFF;
  --surface-hover: #F7F1E4;
  --border: #E2D5BD;
  --border-light: #EDE3CF;

  --text-primary: #201D1B;
  --text-secondary: #6B6459;
  --text-tertiary: #A39A89;

  /* 골드(태양/게르) — 브랜드 액센트, logo.png 와 동일 계열 */
  --accent: #E09A2B;
  --accent-gradient: linear-gradient(135deg, #F5A623 0%, #D97706 100%);
  --accent-bg: #FBF0DD;
  --accent-text: #A86A08;

  /* 몽골 하늘 블루 / 초원 스텝 그린 / 절벽 선셋 레드 */
  --blue: #3478B6;
  --blue-bg: #E9F1F9;
  --green: #6E9552;
  --green-bg: #EEF4E6;
  --red: #D64545;
  --red-bg: #FBEEEC;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* ── Admin(Super Admin / 투어 관리자) 호환 별칭 ──────────────
     기존 어드민 페이지들이 참조하던 변수들을 정의해 렌더링 결함을 복구한다. */
  --color-primary: #E09A2B;
  --color-on-primary: #FFFFFF;
  --color-secondary: #3478B6;
  --color-steppe: #6E9552;
  --color-cliff: #D64545;
  --color-sky: #7FB3D9;
  --color-text: #201D1B;
  --color-text-muted: #6B6459;
  --color-text-inverse: #F6EFE1;
  --bg-dark: #0F172A;
  --bg-card: #FFFFFF;
  --bg-secondary: #F1E8D6;
  --border-color: #E2D5BD;
  --color-success: #6E9552;
  --color-warning: #E09A2B;
  --color-error: #D64545;
  --color-info: #3478B6;
  --font-main: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left { display: flex; align-items: center; gap: 10px; }

.logo {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.logo-img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}

.accent-text { color: var(--accent); }

.sub-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  padding: 0 16px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: 52px; /* app-header 높이 아래에 고정 */
  z-index: 90;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sub-nav::-webkit-scrollbar { display: none; }

.nav-tab {
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s;
}

.nav-tab:hover { color: var(--text-primary); }

.nav-tab.active {
  color: var(--text-primary);
  font-weight: 600;
  border-bottom-color: var(--text-primary);
}

.main-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 32px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 10px;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.section-action {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 3px;
}

.section-action:hover { color: var(--text-primary); }

.post-item {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  padding: 16px;
}

.post-item-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.post-item-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.2px;
  margin-bottom: 4px;
  line-height: 1.4;
}

.post-item-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.post-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-tertiary);
}

.post-item-footer-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.tag-region {
  background: var(--accent-bg);
  color: var(--accent-text);
}

.tag-count {
  background: var(--green-bg);
  color: var(--green);
}

.tag-keyword {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.tag-required {
  background: var(--red-bg);
  color: var(--red);
  font-size: 10px;
  padding: 1px 6px;
}

.tag-optional {
  background: var(--accent-bg);
  color: var(--accent-text);
  font-size: 10px;
  padding: 1px 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.12s;
  border: none;
  background: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
}

.btn-primary:hover { opacity: 0.92; }

.btn-ghost {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.btn-ghost:hover { background: var(--surface-hover); color: var(--text-primary); }

.btn-chat {
  color: var(--blue);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
}

.btn-chat:hover { background: var(--blue-bg); }

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-primary-sm {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.btn-primary-sm:hover { opacity: 0.92; }

.cl-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  background: var(--surface);
  transition: all 0.1s;
}

.cl-chip:hover { border-color: var(--accent); color: var(--accent-text); }

.cl-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
  font-size: 14px;
  line-height: 1.6;
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.form-control {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
}

.form-control:focus {
  border-color: var(--accent);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal-card {
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 640px;
  padding: 20px 20px 32px;
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 0 auto 16px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.close-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
}

.close-btn:hover { background: var(--border-light); }

.login-error {
  font-size: 13px;
  color: var(--red);
  margin-top: 12px;
  text-align: center;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-text);
}

.user-name {
  font-size: 13px;
  font-weight: 500;
}

.btn-logout {
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: none;
  cursor: pointer;
  font-family: var(--font);
}

.btn-logout:hover { background: var(--surface-hover); color: var(--text-secondary); }

.gm-ui-hover-effect { display: none !important; }

.modal-body { max-height: 60vh; overflow-y: auto; }

.app-hero {
  position: relative;
  overflow: hidden;
  height: clamp(180px, 22vw, 280px);
  background: linear-gradient(180deg, #16304F 0%, #2B5B8C 38%, #5E8FB8 62%, #E8A33D 88%, #E8A33D 100%);
}

.hero-sky { position: absolute; inset: 0; }

.hero-photo {
  position: absolute;
  inset: 0;
  /* 저작권 무료 몽골 풍경/하늘 사진. 로드 실패 시에도 아래 그라데이션(석양 하늘)이 유지된다. */
  background-image:
    linear-gradient(180deg, rgba(22,48,79,0.25) 0%, rgba(232,163,61,0.25) 100%),
    url('https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1920&h=520&q=70');
  background-size: cover;
  background-position: center;
  opacity: 0.6;
  mix-blend-mode: luminosity;
}

.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.hero-logo {
  width: clamp(56px, 7vw, 76px);
  height: clamp(56px, 7vw, 76px);
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(15,23,42,0.45), 0 0 0 2px rgba(245,166,35,0.5);
  margin-bottom: 10px;
}

.hero-title {
  font-size: clamp(20px, 3.2vw, 30px);
  font-weight: 900;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 18px rgba(15,23,42,0.5);
}

.hero-sub {
  margin-top: 6px;
  font-size: clamp(12px, 1.6vw, 14px);
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 10px rgba(15,23,42,0.45);
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}

.hero-pills span {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-text);
  background: rgba(255,255,255,0.92);
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(15,23,42,0.2);
}

.feed-grid {
  display: grid;
  gap: 12px;
}

.feed-grid .post-item {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

@media (min-width: 1024px) {
	
	  .feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 16px; }
}

@media (min-width: 1024px) {
	
	  .feed-grid .post-item { border-radius: var(--radius-lg); box-shadow: 0 1px 3px rgba(160,130,60,0.08); }
}

@media (min-width: 1024px) {
	
	  .feed-grid .post-item:hover { background: var(--surface-hover); transform: translateY(-2px); }
}

@media (min-width: 1024px) {
	
	  .feed-grid .post-item { transition: background 0.15s, transform 0.15s, box-shadow 0.15s; }
}

@media (min-width: 1024px) {
	
	  .section-header { padding: 24px 24px 12px; }
}

@media (min-width: 1024px) {
	
	
	  /* 데스크톱에서 내비/헤더 중앙 정렬 */
	  .app-header { padding: 0 24px; }
}

@media (min-width: 1024px) {
	
	  .sub-nav { justify-content: center; padding: 0; }
}

@media (min-width: 1024px) {
	
	  .sub-nav .nav-tab { padding: 13px 20px; }
}

@media (max-width: 600px) {
	
	  .app-header { padding: 0 12px; }
}

@media (max-width: 600px) {
	
	  .sub-nav { padding: 0 12px; }
}

@media (max-width: 600px) {
	
	  .section-header { padding: 16px 12px 8px; }
}

@media (max-width: 600px) {
	
	  .post-item { padding: 14px 12px; }
}

@media (max-width: 600px) {
	
	  .modal-card { padding: 16px 16px 24px; }
}

@media (max-width: 600px) {
	
	  .nav-tab { padding: 10px 12px; font-size: 13px; }
}

.tag-theme {
  background: var(--blue-bg);
  color: var(--blue);
  border: 1px solid rgba(52,120,182,0.3);
  font-weight: 600;
}

.tag-cat { background: var(--accent-bg); color: var(--accent-text); font-weight: 600; }

.feed-grid .post-item { cursor: pointer; }

/* ── 공용 컴포넌트 (여러 기능이 공유) ───────────────────────────────── */
.cp-detail-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--border-light);
}

.cl-filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.cl-filter-label {
  font-size: 11px;
  color: var(--text-tertiary);
  width: 36px;
  flex-shrink: 0;
  font-weight: 500;
}

.cp-filters {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cp-filters .cl-filter-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.cp-filters .cl-filter-label { font-size: 12px; color: var(--text-secondary); min-width: 32px; }

.cp-filters .cl-filter-chip {
  font-size: 12px; padding: 5px 12px; border-radius: 20px;
  border: 1px solid var(--border); color: var(--text-secondary);
  cursor: pointer; background: var(--surface);
}

.cp-filters .cl-filter-chip.active {
  background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600;
}

