/* ============================================================
   HalfTrip Hub — Design System
   Tropical / Ocean theme
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
  --primary: #0077B6;
  --primary-dark: #005F92;
  --secondary: #00B4D8;
  --accent: #FF6B6B;
  --accent-warm: #FFC107;
  --bg: #F0F9FF;
  --bg-alt: #E8F4FD;
  --text: #1E293B;
  --text-soft: #64748B;
  --card: #FFFFFF;
  --border: #BAE6FD;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,119,182,0.12);
  --shadow-lg: 0 8px 32px rgba(0,119,182,0.18);
  --radius: 14px;
  --radius-sm: 8px;
  --nav-h: 60px;
  --font-title: 'Sora', sans-serif;
  --font-body: 'Noto Sans KR', 'Sora', sans-serif;
  --transition: 0.2s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { display: block; max-width: 100%; }

ul { list-style: none; }

/* ---- Navigation ---- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}

.nav-logo {
  font-size: 22px;
  line-height: 1;
}

.nav-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 16px;
  color: var(--primary);
  white-space: nowrap;
}

.nav-trip-select {
  flex-shrink: 0;
}

.nav-trip-select select {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.nav-trip-select select:focus {
  border-color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  padding: 6px 10px;
  border-radius: 20px;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: rgba(0, 119, 182, 0.08);
  text-decoration: none;
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  margin-left: auto;
  transition: background var(--transition);
}

.nav-hamburger:hover { background: var(--bg-alt); }

/* Mobile nav */
@media (max-width: 768px) {
  .nav-inner {
    gap: 6px;
    padding: 0 12px;
    overflow: hidden;
  }

  /* 브랜드 축소 */
  .nav-brand { flex-shrink: 0; gap: 5px; }
  .nav-logo  { font-size: 18px; }
  .nav-title { font-size: 14px; }

  /* 여행 선택: 모바일에서 숨김 */
  .nav-trip-select { display: none; }

  /* 유저 pill: 가운데 공간에서 줄어들 수 있게 */
  .nav-user-pill {
    margin-left: auto;
    flex-shrink: 1;
    min-width: 0;
    padding: 3px 8px 3px 3px;
    gap: 5px;
  }
  .nav-user-avatar { width: 22px; height: 22px; flex-shrink: 0; }
  .nav-user-avatar-initial { width: 22px; height: 22px; font-size: 10px; }
  .nav-user-name {
    max-width: 52px;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .nav-signout-btn { width: 18px; height: 18px; font-size: 11px; flex-shrink: 0; }

  /* 햄버거: 항상 맨 오른쪽 */
  .nav-hamburger {
    display: block;
    flex-shrink: 0;
    margin-left: 0;
    font-size: 20px;
    padding: 4px 6px;
  }

  /* 드롭다운 메뉴 */
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px 14px;
    gap: 2px;
    box-shadow: var(--shadow-md);
    margin-left: 0;
    z-index: 99;
  }

  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-link { display: block; width: 100%; padding: 9px 12px; font-size: 14px; }
}

/* ---- Hero Section ---- */
.hero-section {
  position: relative;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding-top: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0077B6 0%, #00B4D8 50%, #48CAE4 100%);
  z-index: 0;
  transition: background 0.6s ease;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 56px 24px 32px;
}

.hero-left {
  flex: 1;
  min-width: 0;
}

.trip-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-title);
  letter-spacing: 0.03em;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
}

.hero-left h1 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(26px, 4vw, 42px);
  color: #fff;
  line-height: 1.2;
  margin-bottom: 14px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero-desc {
  color: rgba(255,255,255,0.88);
  font-size: 15px;
  max-width: 520px;
  margin-bottom: 12px;
  line-height: 1.7;
}

.hero-period {
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  font-weight: 500;
}

.hero-right {
  flex-shrink: 0;
}

/* ---- Countdown ---- */
.countdown-box {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  padding: 20px 24px;
  min-width: 280px;
  text-align: center;
}

.countdown-label {
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.countdown-unit {
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.countdown-num {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.countdown-lbl {
  font-size: 10px;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ---- Hero Stats ---- */
.hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.15);
  overflow-x: auto;
  scrollbar-width: none;
}

.hero-stats::-webkit-scrollbar { display: none; }

.hero-stat-item {
  flex: 1;
  min-width: 120px;
  padding: 14px 18px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.12);
}

.hero-stat-item:last-child { border-right: none; }

.hero-stat-label {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 4px;
}

.hero-stat-value {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Sections ---- */
.content-section {
  padding: 72px 0;
}

.alt-bg {
  background: var(--bg-alt);
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-header {
  margin-bottom: 36px;
}

.section-title {
  font-family: var(--font-title);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--border), transparent);
  border-radius: 99px;
}

.section-desc {
  color: var(--text-soft);
  font-size: 14px;
}

/* ---- Itinerary Timeline ---- */
.itinerary-timeline {
  position: relative;
  padding-left: 0;
}

.day-block {
  display: flex;
  gap: 24px;
  margin-bottom: 36px;
}

.day-block-left {
  flex-shrink: 0;
  width: 20px;
  position: relative;
}

.day-block-left::after {
  content: '';
  position: absolute;
  top: 26px;
  left: 8px;
  bottom: -36px;
  width: 2px;
  background: linear-gradient(to bottom, var(--secondary), var(--border));
}

.day-block:last-child .day-block-left::after { display: none; }

.day-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 2px var(--secondary);
  position: absolute;
  left: 2px;
  top: 14px;
}

.day-block-right {
  flex: 1;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.day-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: linear-gradient(90deg, var(--bg) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.day-emoji { font-size: 20px; flex-shrink: 0; }

.day-card-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.day-items { padding: 12px 0; }

.day-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  font-size: 14px;
  color: var(--text);
  transition: background var(--transition);
  border-bottom: 1px solid #f1f5f9;
}

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

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

.day-item-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--secondary);
  flex-shrink: 0;
}

.day-item-link {
  color: var(--text);
  transition: color var(--transition);
}

.day-item-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ---- Checklist ---- */
.checklist-progress-bar-wrap {
  margin-bottom: 28px;
}

.progress-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.progress-bar-bg {
  height: 10px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 99px;
  width: 0%;
  transition: width 0.5s ease;
}

.checklist-wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.checklist-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.checklist-card-header {
  padding: 10px 14px;
  background: linear-gradient(90deg, var(--bg) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 13px;
  color: var(--primary);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background var(--transition);
  user-select: none;
}

.checklist-item:last-child { border-bottom: none; }
.checklist-item:hover { background: var(--bg); }

.checklist-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.checklist-item-text {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  transition: color var(--transition);
}

.checklist-item.checked .checklist-item-text {
  color: var(--text-soft);
  text-decoration: line-through;
}

/* ---- Resource Grid ---- */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.resource-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.resource-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--secondary);
}

.resource-card-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.resource-card-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(0,119,182,0.08);
  border-radius: 20px;
  padding: 3px 10px;
  letter-spacing: 0.03em;
}

.resource-card-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.resource-links { padding: 8px 0; }

.resource-link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13.5px;
  color: var(--text);
  transition: background var(--transition);
  border-bottom: 1px solid #f8fafc;
}

.resource-link-item:last-child { border-bottom: none; }

.resource-link-item:hover { background: var(--bg); }

.resource-link-item a {
  color: var(--primary);
  font-weight: 500;
  transition: color var(--transition);
}

.resource-link-item a:hover { color: var(--primary-dark); }

.resource-link-arrow {
  margin-left: auto;
  color: var(--text-soft);
  font-size: 12px;
  flex-shrink: 0;
}

/* ---- Budget ---- */
.budget-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.budget-table-card,
.budget-chart-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.budget-card-header {
  padding: 14px 20px;
  background: linear-gradient(90deg, var(--bg) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.budget-table {
  width: 100%;
  border-collapse: collapse;
}

.budget-table th,
.budget-table td {
  padding: 11px 20px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.budget-table th {
  font-weight: 700;
  color: var(--text-soft);
  font-size: 12px;
  background: var(--bg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.budget-table tr:last-child td { border-bottom: none; }

.budget-table .total-row td {
  font-weight: 700;
  color: var(--primary);
  font-size: 15px;
  border-top: 2px solid var(--border);
  background: rgba(0,119,182,0.04);
}

.budget-total-highlight {
  display: block;
  text-align: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
  margin: 12px 16px;
  border-radius: var(--radius-sm);
}

.budget-total-highlight small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.85;
  margin-bottom: 4px;
}

.budget-chart-body { padding: 16px 20px; }

.budget-bar-row {
  margin-bottom: 14px;
}

.budget-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 5px;
  color: var(--text);
}

.budget-bar-bg {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.budget-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  width: 0%;
  transition: width 0.8s ease;
}

.budget-note {
  padding: 12px 20px;
  font-size: 12px;
  color: var(--text-soft);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ---- Budget PC 2-Panel Layout ---- */
.budget-pc-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: start;
}

.budget-pc-left {
  background: linear-gradient(160deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.budget-stat-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.budget-stat-block:last-of-type { border-bottom: none; }

.budget-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.72);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.budget-stat-value {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 16px;
  color: #fff;
}

.budget-stat-highlight .budget-stat-value {
  font-size: 20px;
}

.budget-stat-items-total {
  margin-top: 6px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 12px;
  border: none !important;
}

.budget-note-left {
  margin-top: 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

.budget-pc-right {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.budget-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(90deg, var(--bg) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.budget-card-subtitle {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 400;
  font-family: var(--font-body);
}

.budget-items-body { padding: 4px 0; }

.budget-item-row {
  padding: 11px 20px;
  border-bottom: 1px solid #f1f5f9;
}

.budget-item-row:last-child { border-bottom: none; }

.budget-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.budget-item-name {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.budget-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.budget-item-share {
  font-size: 11px;
  color: var(--text-soft);
  background: var(--bg-alt);
  border-radius: 99px;
  padding: 1px 7px;
}

.budget-item-amount {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
  min-width: 90px;
  text-align: right;
}

/* ---- Album ---- */
.album-actions-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 99px;
  transition: opacity var(--transition), transform var(--transition);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,119,182,0.25);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}

.storage-info {
  font-size: 12px;
  color: var(--text-soft);
}

.album-upload-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 28px;
}

.upload-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.upload-tab {
  flex: 1;
  padding: 12px 16px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}

.upload-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(0,119,182,0.03);
}

.upload-tab:hover:not(.active) {
  background: var(--bg);
  color: var(--text);
}

.album-form { padding: 18px 20px; }

.tab-panel { display: none; margin-bottom: 14px; }
.tab-panel.active { display: block; }

.file-drop-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 30px 20px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.file-drop-area:hover {
  border-color: var(--secondary);
  background: rgba(0,180,216,0.04);
}

.file-drop-area.dragover {
  border-color: var(--primary);
  background: rgba(0,119,182,0.06);
}

.drop-icon { font-size: 32px; }

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

.drop-sub {
  font-size: 12px;
  color: var(--text-soft);
}

.file-preview {
  margin-top: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.file-preview img {
  max-height: 180px;
  width: 100%;
  object-fit: cover;
}

.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.form-input {
  flex: 1;
  min-width: 140px;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.form-input:focus { border-color: var(--primary); }
.form-input::placeholder { color: var(--text-soft); }

.btn-submit {
  flex-shrink: 0;
  padding: 9px 22px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: 0 2px 8px rgba(0,119,182,0.25);
}

.btn-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ---- Album Grid (Masonry) ---- */
.album-grid {
  columns: 3;
  column-gap: 10px;
  margin-top: 8px;
}

.album-photo {
  break-inside: avoid;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.album-photo:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.album-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.album-photo-meta {
  padding: 8px 10px;
  background: var(--card);
}

.album-photo-caption {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-photo-author {
  font-size: 11px;
  color: var(--text-soft);
}

.album-photo-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(255,107,107,0.85);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  backdrop-filter: blur(4px);
}

.album-photo:hover .album-photo-delete { opacity: 1; }

@media (max-width: 768px) {
  .album-grid { columns: 2; }
}

@media (max-width: 480px) {
  .album-grid { columns: 1; }
}

/* ---- Members ---- */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.member-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.member-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.member-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,119,182,0.3);
}

.member-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.member-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
}

.member-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.member-pill.ok {
  background: rgba(16,185,129,0.12);
  color: #059669;
  border: 1px solid rgba(16,185,129,0.25);
}

.member-pill.ng {
  background: rgba(239,68,68,0.08);
  color: #DC2626;
  border: 1px solid rgba(239,68,68,0.18);
}

/* ---- Transport Section ---- */
.transport-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.transport-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.transport-card-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  background: linear-gradient(90deg, var(--bg) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.transport-label {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 15px;
  color: var(--primary);
}

.transport-subtitle {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 500;
}

.transport-steps { padding: 14px 18px; display: flex; flex-direction: column; gap: 0; }

.transport-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.transport-step-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 48px;
}

.transport-step-time {
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  padding-top: 2px;
}

.transport-step-line {
  width: 2px;
  flex: 1;
  min-height: 20px;
  background: linear-gradient(to bottom, var(--secondary), var(--border));
  margin: 4px 0;
  border-radius: 99px;
}

.transport-step-line.last { display: none; }

.transport-step-body {
  display: flex;
  gap: 10px;
  padding-bottom: 16px;
  flex: 1;
  min-width: 0;
}

.transport-step:last-child .transport-step-body { padding-bottom: 4px; }

.transport-step-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.transport-step-content { flex: 1; min-width: 0; }

.transport-step-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.transport-step-note {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .transport-wrap { grid-template-columns: 1fr; }
}

/* ---- Member Summary Bar ---- */
.member-summary {
  margin-bottom: 20px;
  padding: 14px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.member-summary-text {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.member-summary-text strong { color: var(--primary); }

.member-summary-bar-bg {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.member-summary-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 99px;
  transition: width 0.6s ease;
}

/* ---- Member Name Row + Badges ---- */
.member-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.member-organizer-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-radius: 99px;
  letter-spacing: 0.03em;
}

.member-card-absent {
  opacity: 0.55;
  background: #f8fafc !important;
  border-style: dashed !important;
}

.member-avatar-absent {
  background: #cbd5e1 !important;
  box-shadow: none !important;
}

.member-absent-badge {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 600;
  margin-top: 4px;
  padding: 3px 10px;
  background: #f1f5f9;
  border-radius: 99px;
}

.member-card-ready {
  border-color: #a7f3d0;
  background: linear-gradient(135deg, #f0fdf4, #fff);
}

.member-avatar-ready {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  box-shadow: 0 2px 8px rgba(16,185,129,0.4) !important;
}

.member-ready-count {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 500;
}

/* ---- Personal Budget Tracker ---- */
.pbudget-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.pbudget-tab {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text-soft);
  cursor: pointer;
  transition: all var(--transition);
}

.pbudget-tab:hover:not([disabled]) {
  border-color: var(--primary);
  color: var(--primary);
}

.pbudget-tab.active {
  background: var(--primary);
  color: #ffffff !important;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 119, 182, 0.35);
}

.pbudget-tab-blocked {
  opacity: 0.4;
  cursor: not-allowed !important;
  text-decoration: line-through;
  border-style: dashed;
}

.pbudget-blocked-mark { font-size: 12px; }

.pbudget-panel {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.pbudget-section-title {
  padding: 12px 20px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.01em;
}

.pbudget-rows { padding: 4px 0; }

.pbudget-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid #f8fafc;
  font-size: 14px;
}

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

.pbudget-cat {
  flex: 1;
  color: var(--text);
  font-weight: 500;
}

.pbudget-amount {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.pbudget-amount.shared { color: var(--primary); }
.pbudget-amount.personal { color: #d97706; }

.pbudget-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  background: rgba(0,119,182,0.08);
  color: var(--primary);
  border-radius: 99px;
}

.pbudget-note {
  font-size: 12px;
  color: var(--text-soft);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pbudget-del {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  opacity: 0.5;
}

.pbudget-del:hover { opacity: 1; background: rgba(239,68,68,0.08); }

.pbudget-empty {
  padding: 14px 20px;
  font-size: 13px;
  color: var(--text-soft);
}

.pbudget-divider { height: 1px; background: var(--border); margin: 4px 0; }

.pbudget-add-form {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  flex-wrap: wrap;
  background: rgba(0,119,182,0.02);
  border-top: 1px solid var(--border);
}

.pbudget-input {
  flex: 1;
  min-width: 120px;
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.pbudget-input:focus { border-color: var(--primary); }
.pbudget-input::placeholder { color: var(--text-soft); }
.pbudget-input-num { max-width: 130px; }

.pbudget-add-btn {
  flex-shrink: 0;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,119,182,0.2);
  transition: opacity var(--transition);
}

.pbudget-add-btn:hover { opacity: 0.88; }

.pbudget-total-row {
  padding: 14px 20px;
  border-top: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg);
}

.pbudget-total-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-soft);
}

.pbudget-total-line span:last-child {
  font-weight: 600;
  color: var(--text);
}

.pbudget-total-line.grand {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.pbudget-total-line.grand span:last-child {
  color: var(--primary);
  font-family: var(--font-title);
  font-size: 18px;
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(90vw, 900px);
  max-height: 92vh;
  border: none;
  border-radius: var(--radius);
  background: #0f1923;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  padding: 0;
  overflow: hidden;
  display: none;
  flex-direction: column;
  align-items: center;
}

.lightbox[open] {
  display: flex;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background var(--transition);
}

.lightbox-close:hover { background: rgba(255,255,255,0.25); }

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 90px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-caption {
  width: 100%;
  padding: 14px 20px;
  background: rgba(0,0,0,0.4);
  text-align: center;
}

.lightbox-caption p {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.lightbox-caption small {
  color: rgba(255,255,255,0.55);
  font-size: 12px;
}

/* ---- Calendar Modal ---- */
.calendar-modal {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  width: min(380px, 95vw);
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  overflow: hidden;
}
.calendar-modal::backdrop { background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); }

.calendar-close {
  position: absolute;
  top: 10px; right: 12px;
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  font-size: 16px;
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}

.calendar-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 20px 20px 16px;
  text-align: center;
}

.cal-month-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  margin-bottom: 4px;
}

.cal-trip-label {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
}

.cal-day-names {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.cal-day-names span {
  text-align: center;
  padding: 8px 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
}

.cal-day-names span:first-child { color: #ef4444; }
.cal-day-names span:last-child { color: var(--primary); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 8px;
  gap: 2px;
  background: #fff;
}

.cal-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  position: relative;
}

.cal-empty { background: transparent; }

.cal-trip {
  background: rgba(0,180,216,0.15);
  color: var(--primary);
  font-weight: 700;
}

.cal-trip-start, .cal-trip-end {
  background: var(--primary) !important;
  color: #fff !important;
}

.cal-label {
  font-size: 8px;
  display: block;
  color: rgba(255,255,255,0.85);
  margin-top: 1px;
  line-height: 1;
}

/* ---- Completed Trip Card ---- */
.completed-trip-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 48px 24px;
}

.completed-emoji { font-size: 52px; line-height: 1; }

.completed-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 99px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
}

.completed-title {
  font-family: var(--font-title);
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.completed-summary {
  color: rgba(255,255,255,0.88);
  font-size: 16px;
  line-height: 1.6;
  max-width: 480px;
}

.completed-note {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
}

/* ---- Day Badge in Itinerary Card ---- */
.day-badge {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  background: var(--primary);
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.day-date-label {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 500;
}

/* ---- Budget Fund Banner ---- */
.budget-fund-banner {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 20px;
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}

.budget-fund-row {
  flex: 1;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 16px;
  border-right: 1px solid rgba(255,255,255,0.2);
}

.budget-fund-row:first-child { padding-left: 0; }
.budget-fund-row:last-child { border-right: none; }

.budget-fund-row span {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.budget-fund-row strong {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.budget-fund-per strong {
  font-size: 20px;
}

/* ---- Album Video ---- */
.album-video-wrap {
  width: 100%;
  background: #000;
}

.album-video-wrap video {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  display: block;
}

.album-video-lost {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
}

.album-video-hint {
  font-size: 12px;
  color: var(--text-soft);
  padding: 8px 0 0;
}

.video-drop-area {
  border-color: #a78bfa;
}

.video-drop-area:hover, .video-drop-area.dragover {
  border-color: #7c3aed;
  background: rgba(124,58,237,0.04);
}

.video-file-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(124,58,237,0.08);
  border: 1px solid #c4b5fd;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 8px;
  font-size: 13px;
  color: #5b21b6;
}

.video-file-icon { flex-shrink: 0; }

.video-file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.video-clear-btn {
  background: none;
  border: none;
  color: #7c3aed;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.video-clear-btn:hover { background: rgba(124,58,237,0.12); }

.video-or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 8px;
  color: var(--text-soft);
  font-size: 12px;
}

.video-or-divider::before,
.video-or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---- Strip chip as button ---- */
.strip-chip-btn {
  background: none;
  font-family: var(--font-body);
  cursor: pointer;
}

/* ---- Checklist User Selector (compact) ---- */
.checklist-user-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.checklist-user-label {
  font-size: 12px;
  color: var(--text-soft);
}

.checklist-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 4px 10px 4px 6px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.checklist-user-chip:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,119,182,0.1);
}

.chip-empty {
  border-color: var(--accent);
  color: var(--accent);
  padding: 4px 12px;
}

.chip-avatar {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.chip-arrow {
  font-size: 10px;
  color: var(--text-soft);
}

.checklist-locked {
  text-align: center;
  color: var(--text-soft);
  font-size: 14px;
  padding: 32px 20px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 2px dashed var(--border);
}

/* ---- Name Picker Modal ---- */
.name-picker-modal {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  width: min(400px, 95vw);
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  overflow: hidden;
}

.name-picker-modal::backdrop {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}

.name-picker-inner { position: relative; }

.name-picker-close {
  position: absolute;
  top: 10px; right: 12px;
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  font-size: 16px;
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}

.name-picker-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 24px 20px 20px;
  text-align: center;
}

.name-picker-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  margin-bottom: 6px;
}

.name-picker-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.78);
}

.name-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  padding: 20px;
  background: #fff;
}

.name-picker-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  position: relative;
}

.name-picker-member:hover {
  border-color: var(--primary);
  background: rgba(0,119,182,0.04);
  transform: translateY(-2px);
}

.name-picker-member.active {
  border-color: var(--primary);
  background: rgba(0,119,182,0.08);
}

.name-picker-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

.name-picker-member.active .name-picker-avatar {
  background: var(--secondary);
  box-shadow: 0 0 0 3px rgba(0,180,216,0.3);
}

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

.name-picker-org-badge {
  font-size: 10px;
  background: var(--accent-warm);
  color: #7c4a00;
  border-radius: 99px;
  padding: 1px 7px;
  font-weight: 700;
}

.name-picker-check {
  position: absolute;
  top: 6px; right: 8px;
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 24px 20px;
  font-size: 13px;
}

/* ---- Fade-in Animation ---- */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Pinned Info Strip ---- */
.pinned-strip {
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,119,182,0.07);
}

.pinned-strip-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.pinned-strip-inner::-webkit-scrollbar { display: none; }

.strip-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-right: 1px solid var(--border);
  text-decoration: none;
  transition: background var(--transition);
  flex-shrink: 0;
  min-width: 0;
}

.strip-chip:last-child { border-right: none; }

.strip-chip-green { background: rgba(16,185,129,0.04); }
.strip-chip-green:hover { background: rgba(16,185,129,0.08); }

.strip-chip-blue { background: rgba(0,119,182,0.03); }
.strip-chip-amber { background: rgba(245,158,11,0.04); }

.strip-chip-subtle { background: transparent; flex-wrap: wrap; gap: 6px; padding: 10px 20px; }

.strip-chip-icon { font-size: 18px; flex-shrink: 0; }

.strip-chip-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.strip-chip-text strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.strip-chip-text small {
  font-size: 11px;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.strip-chip-green .strip-chip-text strong { color: #065f46; }
.strip-chip-green .strip-chip-text small { color: #059669; }

.strip-chip-arrow {
  margin-left: 4px;
  color: #059669;
  font-size: 12px;
  flex-shrink: 0;
}

.strip-chip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.strip-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  background: rgba(0,119,182,0.08);
  color: var(--primary);
  border-radius: 99px;
  white-space: nowrap;
}

/* ---- Back to Top ---- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,119,182,0.35);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, background var(--transition);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover { background: var(--primary-dark); }

/* ---- Hero Wave Divider ---- */
.hero-wave {
  position: relative;
  z-index: 1;
  line-height: 0;
  margin-top: -1px;
}

.hero-wave svg {
  width: 100%;
  height: 48px;
  display: block;
}

/* ---- Accommodation Highlight Styles ---- */
.hero-stat-link {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.5);
  text-underline-offset: 2px;
  transition: text-decoration-color var(--transition);
  font-weight: 600;
}

.hero-stat-link:hover {
  text-decoration-color: #fff;
  color: #fff;
}

.hero-stat-confirmed {
  background: rgba(16, 185, 129, 0.15);
}

.hero-stat-confirmed .hero-stat-label {
  color: rgba(110, 231, 183, 0.9);
}

.resource-card-confirmed {
  border-color: #6ee7b7;
  box-shadow: 0 0 0 1px rgba(16,185,129,0.2), var(--shadow-sm);
}

.resource-card-confirmed .resource-card-header {
  background: linear-gradient(90deg, rgba(16,185,129,0.08) 0%, transparent 100%);
  border-bottom-color: #a7f3d0;
}

.resource-confirmed-badge {
  display: inline-block;
  background: #10b981;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.04em;
  margin-left: 8px;
  vertical-align: middle;
}

.resource-link-highlight {
  background: rgba(16,185,129,0.06);
  border-bottom: 1px solid rgba(16,185,129,0.15) !important;
}

.resource-link-highlight a {
  color: #059669;
  font-weight: 700;
}

.resource-link-highlight:hover {
  background: rgba(16,185,129,0.1);
}

/* ---- Member Live Tag ---- */
.member-live-tag {
  display: inline-block;
  font-size: 10px;
  color: #059669;
  font-weight: 600;
  background: rgba(5,150,105,0.1);
  border-radius: 99px;
  padding: 1px 6px;
  margin-left: 4px;
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 900px) {
  .budget-pc-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    padding: 40px 20px 24px;
  }

  .hero-right { width: 100%; }

  .countdown-box { min-width: unset; }

  .checklist-wrap { grid-template-columns: 1fr; }

  .day-block { gap: 16px; }

  .day-block-left { width: 70px; }

  .form-row { flex-direction: column; }
  .btn-submit { width: 100%; }

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

  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
  .hero-stat-item { border-right: 1px solid rgba(255,255,255,0.12); border-bottom: 1px solid rgba(255,255,255,0.12); }

  .resource-grid { grid-template-columns: 1fr; }

  .pinned-strip-inner { padding: 0 12px; }
  .strip-chip { padding: 12px 14px; }
  .strip-chip-text small { max-width: 120px; }

  .back-to-top { bottom: 20px; right: 16px; width: 40px; height: 40px; font-size: 16px; }

  /* Transport */
  .transport-wrap { grid-template-columns: 1fr; }

  /* Budget fund banner */
  .budget-fund-banner { flex-direction: column; gap: 12px; }
  .budget-fund-row { padding: 0; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 12px; }
  .budget-fund-row:last-child { border-bottom: none; padding-bottom: 0; }

  /* Personal budget tabs */
  .pbudget-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .pbudget-tab { white-space: nowrap; flex-shrink: 0; }

  /* Checklist user banner */
  .checklist-user-banner { gap: 8px; }

  /* Calendar modal */
  .calendar-modal { width: 95vw; }

  /* Name picker grid */
  .name-picker-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px; }

  /* Day card header */
  .day-card-header { gap: 6px; }
}

@media (max-width: 480px) {
  .content-section { padding: 48px 0; }
  .member-grid { grid-template-columns: 1fr 1fr; }
  .countdown-num { font-size: 22px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }

  /* Day block timeline hidden on very small */
  .day-block-left { display: none; }
  .day-block { gap: 0; }

  /* Transport step time column */
  .transport-step-time { font-size: 11px; min-width: 44px; }

  /* Budget fund smaller font */
  .budget-fund-row strong { font-size: 16px; }
  .budget-fund-per strong { font-size: 18px; }

  /* Name picker grid 2 columns on very small */
  .name-picker-grid { grid-template-columns: repeat(2, 1fr); }

  /* Personal budget form */
  .pbudget-add-form { flex-direction: column; }
  .pbudget-input-num { width: 100%; }
}

/* ================================================================
   Firebase Auth Overlay
   ================================================================ */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.auth-logo {
  font-size: 48px;
  margin-bottom: 12px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}

.auth-desc {
  font-size: 14px;
  color: var(--text-soft);
  margin: 0 0 28px;
  line-height: 1.7;
}

.auth-google-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #1f1f1f;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.auth-google-btn:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.28);
  transform: translateY(-1px);
}

.auth-error {
  margin-top: 14px;
  font-size: 13px;
  color: #f87171;
  min-height: 18px;
}

/* ================================================================
   Nav User Pill (Firebase Auth)
   ================================================================ */
.nav-user-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 4px 10px 4px 4px;
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-user-avatar-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.nav-user-name {
  font-weight: 600;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-signout-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  padding: 0;
  transition: background 0.15s;
}

.nav-signout-btn:hover {
  background: rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
  .nav-user-name { max-width: 56px; }
}

/* ================================================================
   첫 로그인 멤버 선택 (Identity Picker)
   ================================================================ */
.identity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 8px;
}

.identity-member-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--card-alt, #1e2230);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 8px 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

.identity-member-btn:hover {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb, 0,119,182), 0.12);
  transform: translateY(-2px);
}

.identity-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

@media (max-width: 480px) {
  .identity-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ================================================================
   모바일 전용 — 햄버거 메뉴 내 여행 선택
   ================================================================ */
.nav-mobile-trip-item {
  display: none;  /* 기본: 숨김 (PC에서는 상단 select 사용) */
  padding: 8px 0 4px;
}

.nav-trip-select-mobile {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--primary);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  outline: none;
}

@media (max-width: 768px) {
  .nav-mobile-trip-item { display: block; }
}

/* ================================================================
   히어로 소개글 PC / 모바일 분기
   ================================================================ */
.summary-mobile { display: none; }
.summary-pc     { display: inline; }

@media (max-width: 768px) {
  .summary-pc     { display: none; }
  .summary-mobile { display: inline; }
}
