/* ==========================================================================
   Japanese Modern Luxury Itinerary CSS - Light Washi & Amber Gold
   方案 A：和風珍珠白與琥珀金（星野度假村 / 頂級料亭手冊風格）
   高對比、極致清晰、手機直式閱讀毫不吃力
   ========================================================================== */

:root {
  /* 主色調：和紙珍珠白與純淨雪白 */
  --bg-main: #f7f8fa;
  --bg-washi: #faf8f5;
  --bg-card: #ffffff;
  --bg-card-glass: rgba(255, 255, 255, 0.94);
  --bg-card-subtle: #f8fafc;
  --bg-elevated: #ffffff;

  /* 琥珀金 / 琉璃暖金 (高對比) */
  --gold: #b48a28;
  --gold-dark: #8c6815;
  --gold-light: #fef3c7;
  --gold-border: #fde68a;
  --gold-gradient: linear-gradient(135deg, #c59b27 0%, #9a7312 100%);
  --gold-glow: rgba(180, 138, 40, 0.18);

  /* 傳統御所朱紅 (料理與重點) */
  --vermilion: #dc2626;
  --vermilion-soft: #fef2f2;
  --vermilion-border: #fecaca;
  --vermilion-text: #991b1b;

  /* 文字對比度全面提升 (墨黑與炭灰) */
  --text-main: #111827;       /* 大標題與主文字：沉穩墨黑 */
  --text-sub: #374151;        /* 內文描述：高清晰炭黑 */
  --text-muted: #6b7280;      /* 次要資訊：清爽中灰 */
  --text-gold: #92400e;       /* 金色文字：深琥珀色，清晰不淡化 */

  /* 邊框與卡片陰影 */
  --border-light: #e5e7eb;
  --border-glass: rgba(0, 0, 0, 0.08);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 4px 16px rgba(180, 138, 40, 0.2);

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --radius-full: 9999px;

  --font-serif: "Noto Serif TC", "Yu Mincho", "Hiragino Mincho ProN", "Songti TC", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Hiragino Sans GB", "Microsoft JhengHei", Roboto, sans-serif;
}

/* 全域重置與基礎樣式 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
  background-color: var(--bg-main);
}

body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--bg-main);
  background-image: 
    radial-gradient(ellipse at 80% 0%, rgba(180, 138, 40, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 40%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(180, 138, 40, 0.04) 0%, transparent 60%);
  background-attachment: fixed;
  line-height: 1.65;
  overflow-x: hidden;
  letter-spacing: 0.015em;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--gold-dark);
  text-decoration: none;
  transition: all 0.2s ease;
}

/* ==========================================================================
   Header & Mobile Navigation (吸頂導覽與天數膠囊)
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.header-top {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.05em;
}

.brand-badge .crest {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--gold-gradient);
  color: #ffffff;
  font-size: 0.8rem;
  border-radius: 50%;
  font-weight: 900;
  box-shadow: 0 2px 8px var(--gold-glow);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-header {
  padding: 6px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-sub);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-header:hover, .btn-header:active {
  border-color: var(--gold);
  color: var(--gold-dark);
  background: #fffdf5;
}

.btn-header.primary {
  border-color: var(--gold-border);
  color: var(--text-gold);
  background: var(--gold-light);
}

/* Day Rail (橫向滑動天數列 - 珍珠白底配深色膠囊) */
.day-rail-container {
  border-top: 1px solid #f3f4f6;
  background: #ffffff;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 12px;
}

.day-rail-container::-webkit-scrollbar {
  display: none;
}

.day-rail {
  display: flex;
  gap: 8px;
  max-width: 960px;
  margin: 0 auto;
  white-space: nowrap;
}

.rail-tab {
  padding: 6px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-full);
  background: #f8fafc;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 68px;
  text-align: center;
}

.rail-tab .d-num {
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.rail-tab .d-tag {
  font-size: 0.68rem;
  opacity: 0.9;
}

.rail-tab:hover {
  border-color: var(--gold);
  color: var(--text-main);
  background: #ffffff;
}

.rail-tab.active {
  background: var(--gold-gradient);
  color: #ffffff;
  font-weight: 700;
  border-color: transparent;
  box-shadow: 0 3px 12px rgba(180, 138, 40, 0.4);
}

.rail-tab.active .d-tag {
  opacity: 1;
  font-weight: 600;
}

/* ==========================================================================
   Hero Cover Section (高對比明亮封面)
   ========================================================================== */

.hero-section {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  padding: 40px 20px 48px;
  overflow: hidden;
  background: #111827;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.68) saturate(1.1);
  transform: scale(1.02);
  transition: transform 12s ease-out;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(17, 24, 39, 0.75) 60%,
    var(--bg-main) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.hero-tag {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--gold-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-tag.red {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 5.5vw, 2.85rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  color: #ffffff;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.85);
  letter-spacing: 0.02em;
}

.hero-title span {
  color: #ffffff;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: #f3f4f6;
  margin-bottom: 22px;
  line-height: 1.55;
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.meta-box {
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.meta-box .meta-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
  font-weight: 600;
}

.meta-box .meta-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */

.page-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

/* Flight Summary Cards (白底清爽航班卡) */
.flight-card-container {
  margin-bottom: 32px;
}

.section-label {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 20px;
  background: var(--gold-gradient);
  border-radius: 2px;
}

.flight-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 640px) {
  .flight-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.flight-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.flight-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gold-gradient);
}

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

.flight-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.flight-airline {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.flight-route-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 8px 0;
}

.airport-block .code {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.05em;
}

.airport-block .time {
  font-size: 0.92rem;
  color: var(--gold-dark);
  font-weight: 700;
  margin-top: 2px;
}

.flight-arrow-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.flight-arrow-mid .plane-icon {
  font-size: 1.25rem;
  color: var(--gold);
  margin-bottom: 2px;
}

/* ==========================================================================
   Daily Cards (每日專屬白底卡片)
   ========================================================================== */

.day-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-bottom: 36px;
  position: relative;
  box-shadow: var(--shadow-card);
  scroll-margin-top: 130px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.day-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-hover);
}

.day-card-header {
  margin-bottom: 18px;
}

.day-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.day-number-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: var(--gold-gradient);
  color: #ffffff;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  box-shadow: 0 3px 10px rgba(180, 138, 40, 0.35);
}

.day-date-tag {
  font-size: 0.88rem;
  color: var(--text-gold);
  font-weight: 700;
  background: var(--gold-light);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--gold-border);
}

.day-title {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 3.8vw, 1.7rem);
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-main);
  margin-top: 8px;
}

.day-summary-box {
  background: var(--bg-washi);
  border-left: 4px solid var(--gold);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 22px;
  font-size: 0.95rem;
  color: var(--text-sub);
  line-height: 1.68;
  border-top: 1px solid rgba(0, 0, 0, 0.03);
  border-right: 1px solid rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

/* Route Timeline Flow (彩色高對比路線節點 - 完全不吃力) */
.route-timeline {
  margin-bottom: 24px;
  padding: 16px 18px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
}

.route-timeline-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.route-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.route-node {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* 景點：純白底 + 墨黑字 */
.route-node.spot {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #1f2937;
}

/* 航班：柔藍底 + 深藍字 */
.route-node.flight {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

/* 美食：粉紅底 + 深紅字 */
.route-node.meal {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* 飯店：暖米底 + 深棕字 */
.route-node.hotel {
  background: #fefce8;
  border: 1px solid #fef08a;
  color: #854d0e;
}

/* 觀光鐵道 / 遊船：清新綠底 + 深綠字 */
.route-node.train, .route-node.boat {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

/* 茶會：優雅紫粉底 + 深紫字 */
.route-node.tea {
  background: #fdf4ff;
  border: 1px solid #f5d0fe;
  color: #86198f;
}

.route-arrow {
  color: #9ca3af;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Photo Gallery & Touch Grid (實景相片精選網格) */
.gallery-section {
  margin-bottom: 26px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .gallery-item:first-child:nth-last-child(4),
  .gallery-item:first-child:nth-last-child(5),
  .gallery-item:first-child:nth-last-child(7),
  .gallery-item:first-child:nth-last-child(8) {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f1f5f9;
  cursor: pointer;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.3s ease;
}

.gallery-item:hover img, .gallery-item:active img {
  transform: scale(1.05);
  filter: brightness(1.03);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.05) 55%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 10px 12px;
  pointer-events: none;
}

.gallery-caption {
  font-size: 0.78rem;
  color: #ffffff;
  font-weight: 600;
  line-height: 1.35;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-zoom-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  color: #111827;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Dining & Stay Callout Cards (美饌與宿所專屬卡片) */
.cards-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 720px) {
  .cards-row {
    grid-template-columns: 1fr 1fr;
  }
}

.info-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.info-card.gourmet {
  border-top: 4px solid var(--vermilion);
}

.info-card.hotel {
  border-top: 4px solid var(--gold);
}

.info-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.info-card-type {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.budget-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--vermilion-soft);
  color: var(--vermilion-text);
  border: 1px solid var(--vermilion-border);
  white-space: nowrap;
}

.hotel-tag-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--gold-light);
  color: var(--text-gold);
  border: 1px solid var(--gold-border);
  white-space: nowrap;
}

.info-card-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.35;
}

.info-card-provider {
  font-size: 0.85rem;
  color: var(--gold-dark);
  font-weight: 600;
  margin-bottom: 10px;
}

.info-card-desc {
  font-size: 0.88rem;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.btn-external-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: var(--text-main);
  width: 100%;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-external-link:hover, .btn-external-link:active {
  background: var(--gold-gradient);
  border-color: transparent;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(180, 138, 40, 0.3);
}

/* ==========================================================================
   Photo Lightbox Modal (全螢幕燈箱 - 沉浸黑底襯托照片細節)
   ========================================================================== */

.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 12, 16, 0.95);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 1.3rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 1002;
  transition: all 0.2s;
}

.lightbox-close-btn:hover {
  background: var(--gold);
  color: #fff;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 72vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

.lightbox-caption {
  color: #f1f5f9;
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 14px;
  text-align: center;
  max-width: 600px;
  line-height: 1.45;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 1.5rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.2s;
}

.lightbox-nav-btn:hover {
  background: var(--gold);
  color: #fff;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

/* ==========================================================================
   Trip Switcher Drawer / Modal (白底清爽行程切換)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 990;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.trip-modal {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: 500px;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px 20px 36px;
  z-index: 995;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
}

.trip-modal.active {
  transform: translate(-50%, 0);
}

.modal-drag-handle {
  width: 40px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 2px;
  margin: 0 auto 16px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--text-main);
  margin-bottom: 16px;
  text-align: center;
}

.trip-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trip-item-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid var(--border-light);
  transition: all 0.2s;
}

.trip-item-link:hover, .trip-item-link.current {
  border-color: var(--gold-border);
  background: #fffdf5;
  box-shadow: 0 2px 8px rgba(180, 138, 40, 0.12);
}

.trip-item-link .title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.trip-item-link .meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.trip-item-link .badge {
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--gold-light);
  color: var(--text-gold);
  border: 1px solid var(--gold-border);
  font-weight: 700;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.app-footer {
  border-top: 1px solid var(--border-light);
  background: #ffffff;
  padding: 40px 20px;
  text-align: center;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
}

.footer-crest {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-main);
  margin-bottom: 8px;
  font-weight: 700;
}

.footer-note {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Back to Top Floating Button */
.fab-top {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 80;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
}

.fab-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.fab-top:hover {
  background: var(--gold-gradient);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-3px);
}

/* ==========================================================================
   Print Style
   ========================================================================== */

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .app-header, .day-rail-container, .fab-top, .lightbox-modal, .trip-modal, .btn-external-link {
    display: none !important;
  }
  .day-card {
    page-break-inside: avoid;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
}
