/* ==========================================================================
   Figma Marketing Design System for Korea CampSync (Robust & Readable)
   Based on DESIGN.md Specifications
   ========================================================================== */

/* --- Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&family=Outfit:wght@400;600;800&display=swap');

/* --- System Design Tokens --- */
:root {
  /* Monochrome System Core */
  --colors-primary: #000000;
  --colors-on-primary: #ffffff;
  --colors-canvas: #ffffff;
  --colors-inverse-canvas: #0f172a;
  --colors-surface-soft: #f8fafc;
  --colors-hairline: rgba(0, 0, 0, 0.12);
  --colors-hairline-soft: rgba(0, 0, 0, 0.06);
  --colors-ink: #000000;
  --colors-inverse-ink: #ffffff;

  /* Signature Pastel Color Blocks */
  --colors-block-lime: #e2f675;   /* Systems & Gear Section */
  --colors-block-lilac: #e9d5ff;  /* Hero / Alert Section */
  --colors-block-cream: #fefce8;  /* Secondary Cards & Guides */
  --colors-block-mint: #d1fae5;   /* Filters Section */
  --colors-block-pink: #fce7f3;   /* Highlights */
  --colors-block-coral: #fed7aa;  /* Interactive Highlights */
  --colors-block-navy: #0f172a;   /* Dark Story Blocks */

  /* Typography */
  --font-sans: 'Inter', 'Outfit', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', menlo, monospace;

  /* Border Radius Scale */
  --rounded-xs: 2px;
  --rounded-sm: 6px;
  --rounded-md: 10px;
  --rounded-lg: 24px;
  --rounded-xl: 32px;
  --rounded-pill: 9999px;
  --rounded-full: 9999px;

  /* Spacing Scale */
  --spacing-hair: 1px;
  --spacing-xxs: 4px;
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 48px;
  --spacing-section: 96px;

  --color-text-main: #000000;
  --color-text-muted: #475569;
}

/* --- Dark Mode Safe Variables --- */
body.dark-theme {
  --colors-canvas: #0f172a;
  --colors-surface-soft: #1e293b;
  --colors-ink: #f8fafc;
  --colors-hairline: rgba(255, 255, 255, 0.15);
  --color-text-main: #f8fafc;
  --color-text-muted: #94a3b8;

  /* Color Blocks preserve strong readable contrast */
  --colors-block-lime: #1e3a1e;
  --colors-block-lilac: #2e1065;
  --colors-block-cream: #332107;
  --colors-block-mint: #064e3b;
}

/* --- Global Reset & Body --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--colors-canvas);
  color: var(--colors-ink);
  line-height: 1.45;
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Typography System --- */
h1, h2, h3, h4, .display-xl, .display-lg {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: inherit;
}

.eyebrow, .caption, .mono-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* --- Floating Theme Switcher Pill --- */
.floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: var(--rounded-full);
  background-color: #000000;
  color: #ffffff;
  border: 1px solid var(--colors-hairline);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 9999;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.dark-theme .floating-btn {
  background-color: #ffffff;
  color: #000000;
}

.floating-btn:hover {
  transform: scale(1.1);
}

/* --- Container --- */
.app-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 20px 96px 20px;
}

/* --- Header (Monochrome Chrome) --- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  background-color: var(--colors-surface-soft);
  border: 1px solid var(--colors-hairline);
  border-radius: var(--rounded-lg);
  margin-bottom: 24px;
  box-sizing: border-box;
  width: 100%;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  background-color: #000000;
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: var(--rounded-pill);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.3rem;
}

body.dark-theme .logo-icon {
  background-color: #ffffff;
  color: #000000;
}

.logo-text h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--colors-ink);
}

.logo-text p {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--colors-ink);
  opacity: 0.7;
}

.header-stats {
  display: flex;
  gap: 12px;
}

.stat-badge {
  background: var(--colors-canvas);
  border: 1px solid var(--colors-hairline);
  padding: 10px 18px;
  border-radius: var(--rounded-pill);
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--colors-ink);
  opacity: 0.7;
}

.stat-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--colors-ink);
}

/* --- Layout Grid & Sticky Sidebar --- */
.dashboard-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.sidebar-panel,
.content-panel {
  min-width: 0;
  width: 100%;
}

.sidebar-panel {
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding-right: 4px;
}

/* Custom subtle scrollbar for sidebar */
.sidebar-panel::-webkit-scrollbar {
  width: 5px;
}

.sidebar-panel::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--rounded-pill);
}

@media (max-width: 1100px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .sidebar-panel {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
}


/* --- Figma Signature Color-Block Cards --- */
.card {
  border-radius: var(--rounded-lg);
  padding: 28px;
  margin-bottom: 24px;
  border: 1px solid var(--colors-hairline);
}

/* Crisp Color Block Contrast */
.gear-card {
  background-color: var(--colors-block-lime);
  color: #000000;
}
body.dark-theme .gear-card { color: #ffffff; }

.filter-card {
  background-color: var(--colors-block-mint);
  color: #000000;
}
body.dark-theme .filter-card { color: #ffffff; }

.email-alert-card {
  background-color: var(--colors-block-lilac);
  color: #000000;
}
body.dark-theme .email-alert-card { color: #ffffff; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}

/* --- Form Inputs & Controls (Systematic Spacing Tokens) --- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: inherit;
  line-height: 1.4;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: inherit;
  line-height: 1.4;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.checkbox-container {
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  line-height: 1.4;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--rounded-md);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: #000000;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.5;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}

body.dark-theme input[type="text"],
body.dark-theme input[type="number"],
body.dark-theme select {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

select option {
  background-color: #ffffff;
  color: #000000;
  padding: 10px;
}

body.dark-theme select option {
  background-color: #1e293b;
  color: #ffffff;
}

.dimensions-grid, .region-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.input-unit {
  position: relative;
}

.input-unit input {
  padding-right: 36px;
}

.input-unit span {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  opacity: 0.6;
  pointer-events: none;
}

/* --- Pill Buttons (Signature Components) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--rounded-pill);
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap !important;
  word-break: keep-all;
  flex-shrink: 0;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background-color: #000000;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #262626;
}

body.dark-theme .btn-primary {
  background-color: #ffffff;
  color: #000000;
}

.btn-secondary {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

body.dark-theme .btn-secondary {
  background-color: #1e293b;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-kakao {
  background-color: #fee500;
  color: #000000;
  border: 1px solid #e5ce00;
  font-weight: 800;
}

.btn-kakao:hover {
  background-color: #fada0a;
}

.user-auth-badge {
  padding: 4px 6px;
  background: transparent;
  border: none;
}

.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--colors-canvas);
  border: 1px solid var(--colors-hairline);
  padding: 6px 14px;
  border-radius: var(--rounded-pill);
  font-size: 0.85rem;
  font-weight: 700;
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-xs { padding: 6px 12px; font-size: 0.75rem; }

/* --- Gear Visualizer Box (Compact Spacing) --- */
.gear-preview-box {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--rounded-md);
  padding: 12px 14px;
  margin-top: 8px;
  margin-bottom: 12px;
}

body.dark-theme .gear-preview-box {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

.gear-preview-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.7;
}

.gear-combo-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.tent-avatar, .tarp-avatar {
  background: #ffffff;
  border: 2px solid #000000;
  border-radius: var(--rounded-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #000000;
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  height: auto !important;
}

.tarp-avatar {
  border: 2px dashed #4b5563;
  background: rgba(255, 255, 255, 0.9);
}

/* --- Tab Switcher & Panes --- */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block !important;
}

.content-tabs {
  display: flex;
  background-color: var(--colors-surface-soft);
  padding: 6px;
  border-radius: var(--rounded-pill);
  border: 1px solid var(--colors-hairline);
  gap: 6px;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 24px;
  border-radius: var(--rounded-pill);
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--colors-ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background-color: #000000;
  color: #ffffff;
}

body.dark-theme .tab-btn.active {
  background-color: #ffffff;
  color: #000000;
}

/* --- Calendar Section (Pastel Cream Block) --- */
.calendar-wrapper {
  border-radius: var(--rounded-xl);
  padding: 24px;
  background-color: var(--colors-block-cream);
  color: #000000;
  border: 1px solid var(--colors-hairline);
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.dark-theme .calendar-wrapper {
  color: #ffffff;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.calendar-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.calendar-nav-btn {
  background: var(--colors-canvas);
  border: 1px solid var(--colors-hairline);
  width: 40px;
  height: 40px;
  border-radius: var(--rounded-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--colors-ink);
  transition: all 0.2s ease;
}

.calendar-nav-btn:hover {
  background: #000000;
  color: #ffffff;
}

.calendar-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.calendar-grid-header {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.7;
  width: 100%;
  box-sizing: border-box;
}

.calendar-grid-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.calendar-day {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--rounded-md);
  min-height: 105px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #000000;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

body.dark-theme .calendar-day {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.calendar-day:hover {
  border-color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.calendar-day.active {
  border: 2px solid #000000;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

body.dark-theme .calendar-day.active {
  border-color: #ffffff;
}

.calendar-day.other-month {
  opacity: 0.3;
}

.day-number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 4px;
  padding-left: 2px;
}

.calendar-day-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
  min-width: 0;
  width: 100%;
}

.cal-event-badge {
  font-size: 0.68rem;
  padding: 2px 5px;
  border-radius: var(--rounded-pill);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
  box-sizing: border-box;
}

.cal-more-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: var(--rounded-pill);
  font-weight: 700;
  background-color: #000000;
  color: #ffffff;
  text-align: center;
  margin-top: 2px;
  cursor: pointer;
  transition: transform 0.15s ease;
  display: block;
}

body.dark-theme .cal-more-badge {
  background-color: #ffffff;
  color: #000000;
}

.cal-more-badge:hover {
  transform: scale(1.05);
}

.cal-event-badge.priority {
  background-color: #dbeafe;
  color: #1e40af;
}

.cal-event-badge.general {
  background-color: #d1fae5;
  color: #065f46;
}

.cal-event-badge.pay {
  background-color: #ffedd5;
  color: #9a3412;
}

/* Day Detail Drawer Panel Below Calendar */
.day-detail-panel {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px dashed rgba(0, 0, 0, 0.15);
}

body.dark-theme .day-detail-panel {
  border-top-color: rgba(255, 255, 255, 0.15);
}

.day-detail-panel h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 16px;
}

/* --- Explorer Header & Location Badges --- */
.campsites-header-actions {
  margin-bottom: 25px;
  padding-bottom: 0;
}

.campsites-header-actions h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--colors-ink);
  line-height: 1.3;
}

.campsite-card-item {
  background: var(--colors-canvas);
  border: 1px solid var(--colors-hairline);
  border-radius: var(--rounded-lg);
  padding: 32px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.02);
  transition: transform 0.2s ease, border-color 0.2s ease;
  margin-bottom: 24px;
}

.campsite-card-item:hover {
  border-color: var(--colors-ink);
  transform: translateY(-2px);
}

.camp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--colors-hairline-soft);
}

.camp-card-top h3 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.camp-location-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--colors-surface-soft);
  border: 1px solid var(--colors-hairline);
  padding: 8px 18px;
  border-radius: var(--rounded-pill);
  white-space: nowrap !important;
  word-break: keep-all;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

/* --- Site Guide Pill Button next to Campground Title --- */
.btn-site-guide-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #000000;
  color: #ffffff;
  border: 1px solid var(--colors-hairline);
  padding: 6px 16px;
  border-radius: var(--rounded-pill);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  vertical-align: middle;
}

body.dark-theme .btn-site-guide-pill {
  background-color: #ffffff;
  color: #000000;
}

.btn-site-guide-pill:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  background-color: #1e293b;
}

body.dark-theme .btn-site-guide-pill:hover {
  background-color: #f1f5f9;
}

.site-list-table-wrapper {
  margin-top: 20px;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.campsite-card-item {
  background-color: var(--colors-canvas);
  border: 1px solid var(--colors-hairline);
  border-radius: var(--rounded-lg);
  padding: 24px;
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.camp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.site-list-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.site-list-table th, .site-list-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--colors-hairline-soft);
  vertical-align: middle;
}

.site-list-table td:first-child {
  white-space: nowrap !important;
  word-break: keep-all;
}

.site-list-table th {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
  white-space: nowrap !important;
  word-break: keep-all;
  background-color: rgba(0, 0, 0, 0.02);
}

body.dark-theme .site-list-table th {
  background-color: rgba(255, 255, 255, 0.03);
}

/* Modals (Fixed Hidden State) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: none; /* Crucial: default hidden */
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.modal-overlay.active,
.modal-overlay.show,
.modal-overlay[style*="display: flex"] {
  display: flex !important;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--colors-ink);
  cursor: pointer;
  z-index: 10;
}

.modal-content {
  background-color: var(--colors-block-navy);
  color: #ffffff;
  border-radius: var(--rounded-xl);
  padding: 40px;
  max-width: 560px;
  width: 90%;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.modal-content h3 { color: #ffffff; font-size: 1.6rem; margin-bottom: 12px; }
.modal-content p { color: #94a3b8; font-size: 0.95rem; margin-bottom: 24px; }

/* --- Footer --- */
.app-footer {
  margin-top: var(--spacing-section);
  padding-top: 48px;
  border-top: 1px solid var(--colors-hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--colors-ink);
}

.footer-links {
  display: flex;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--colors-ink);
}

.footer-links a {
  color: inherit;
  opacity: 0.7;
  text-decoration: none;
}

.footer-links a:hover { opacity: 1; }

/* --- Comprehensive Responsive & Overflow Protection --- */
@media (max-width: 1100px) {
  .app-container {
    padding: 16px 16px 64px 16px;
  }
}

@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
  }

  .header-stats {
    flex-wrap: wrap;
    width: 100%;
    gap: 8px;
  }

  .stat-badge {
    flex: 1 1 auto;
    justify-content: center;
  }

  .card {
    padding: 20px;
  }

  .region-select-grid,
  .dimensions-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .content-tabs {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* --- Sites Table Layout & Badge Status Styles --- */
.sites-table-wrapper {
  width: 100%;
  overflow-x: visible;
  min-width: 0;
  box-sizing: border-box;
}

.sites-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-top: 12px;
  box-sizing: border-box;
}

.sites-table th,
.sites-table td {
  padding: 6px 2px;
  vertical-align: middle;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.76rem;
  letter-spacing: -0.02em;
  box-sizing: border-box;
}

.sites-table th {
  font-weight: 700;
  opacity: 0.75;
  border-bottom: 2px solid var(--colors-hairline);
  font-size: 0.76rem;
}

.sites-table tr {
  border-bottom: 1px solid var(--colors-hairline);
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--rounded-pill);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.3;
}

.status-badge.fit-ok {
  background-color: #d1fae5 !important;
  color: #065f46 !important;
  border: 1px solid #a7f3d0 !important;
}

.status-badge.fit-warn {
  background-color: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
}

.status-badge.fit-no {
  background-color: #fee2e2 !important;
  color: #991b1b !important;
  border: 1px solid #fca5a5 !important;
}

  .tab-btn {
    flex: 1 1 100%;
    text-align: center;
    justify-content: center;
  }

  .app-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* --- Guide Pills (Layout Map & Discount Info) --- */
.btn-site-guide-pill {
  background: #1e293b;
  color: #ffffff;
  border: 1px solid #334155;
  padding: 4px 12px;
  border-radius: var(--rounded-pill);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-site-guide-pill:hover {
  background: #0f172a;
  transform: translateY(-1px);
}

.btn-discount-guide-pill {
  background: #0f766e;
  color: #ffffff;
  border: 1px solid #0d9488;
  padding: 4px 12px;
  border-radius: var(--rounded-pill);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-discount-guide-pill:hover {
  background: #115e59;
  transform: translateY(-1px);
}

.btn-directions-guide-pill {
  background: #1d4ed8;
  color: #ffffff;
  border: 1px solid #2563eb;
  padding: 4px 12px;
  border-radius: var(--rounded-pill);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-directions-guide-pill:hover {
  background: #1e40af;
  transform: translateY(-1px);
}

.btn-gallery-guide-pill {
  background: #7c3aed;
  color: #ffffff;
  border: 1px solid #8b5cf6;
  padding: 4px 12px;
  border-radius: var(--rounded-pill);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-gallery-guide-pill:hover {
  background: #6d28d9;
  transform: translateY(-1px);
}

/* --- Dark/Light Mode Compatible Discount Drawer Styles --- */
.campsite-discount-drawer {
  margin-bottom: 20px;
  padding: 20px;
  background: var(--colors-surface-soft);
  border-radius: var(--rounded-md);
  border: 1px solid var(--colors-hairline);
  color: var(--colors-ink);
}

.discount-banner-box {
  background: var(--colors-surface);
  color: var(--colors-ink);
  padding: 12px 16px;
  border-radius: var(--rounded-sm);
  margin-bottom: 14px;
  border: 1px solid var(--colors-hairline);
  border-left: 4px solid #0d9488;
  font-size: 0.84rem;
  line-height: 1.5;
}

.discount-card-item {
  padding: 12px;
  background: var(--colors-surface);
  color: var(--colors-ink);
  border-radius: var(--rounded-sm);
  border: 1px solid var(--colors-hairline);
}

.discount-card-item .disc-title {
  font-weight: 700;
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--colors-ink);
}

.discount-card-item .disc-desc {
  font-size: 0.78rem;
  color: var(--colors-ink);
  opacity: 0.8;
  margin-top: 2px;
}

/* Table Overflow Container */
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 12px;
}

/* ==========================================================================
   Price Accordion (비수기 평일 / 비수기 주말·공휴일 / 성수기 3단 요금)
   ========================================================================== */
.price-accordion-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border: 1px solid var(--colors-hairline);
  border-radius: var(--rounded-pill);
  background: var(--colors-surface-soft);
  color: var(--colors-ink);
  font-family: inherit;
  font-size: 0.8rem;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.price-accordion-btn:hover,
.price-accordion-btn:focus-visible {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.45);
}

.price-accordion-btn .price-from {
  font-size: 0.72rem;
  opacity: 0.6;
  margin-left: -2px;
}

.price-accordion-btn .price-caret {
  font-size: 0.62rem;
  opacity: 0.55;
  transition: transform 0.18s ease;
}

.price-accordion-btn.is-open .price-caret {
  transform: rotate(180deg);
}

.price-breakdown {
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--colors-hairline-soft);
  border-radius: var(--rounded-sm);
  background: var(--colors-surface-soft);
  text-align: left;
  white-space: normal;
  width: 100%;
  box-sizing: border-box;
}

.price-breakdown[hidden] {
  display: none;
}

.price-tier-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 0.74rem;
  padding: 2px 0;
}

.price-tier-row + .price-tier-row {
  border-top: 1px dashed var(--colors-hairline-soft);
}

.price-tier-label {
  opacity: 0.75;
}

.price-tier-value {
  font-weight: 800;
  white-space: nowrap;
}

.price-tier-note {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid var(--colors-hairline-soft);
  font-size: 0.68rem;
  opacity: 0.6;
}

/* --- Notification Toggle Button --- */
.btn-outline-primary {
  background-color: transparent;
  color: var(--colors-ink);
  border: 1px solid var(--colors-ink);
}

.btn-outline-primary:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

body.dark-theme .btn-outline-primary {
  border-color: #ffffff;
  color: #ffffff;
}

body.dark-theme .btn-outline-primary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-alert-active {
  background-color: #3b82f6 !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
}

body.dark-theme .btn-alert-active {
  background-color: #3b82f6 !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
}
