/* ========= 全局基础 ========= */
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { -webkit-font-smoothing: antialiased; }

/* 隐藏滚动条（Tab 横向滚动时使用） */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ========= 导航高亮 ========= */
.nav-link.active {
  background-color: #f9e7c8;
  color: #6b3612;
  font-weight: 700;
}

/* ========= 淡入动画（IntersectionObserver 触发） ========= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ========= 日期 Tab ========= */
.day-tab {
  flex: 0 0 auto;
  padding: 0.75rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid #f3c98a;
  background: #fff;
  color: #6b3612;
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: 140px;
  text-align: center;
}
.day-tab:hover {
  background: #fdf6ec;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -10px rgba(168,93,30,0.4);
}
.day-tab.active {
  background: linear-gradient(135deg, #c47d2c 0%, #8a4718 100%);
  color: #fff;
  border-color: #8a4718;
  box-shadow: 0 10px 25px -12px rgba(138,71,24,0.6);
}
.day-tab .tab-date { font-size: 0.75rem; opacity: 0.8; display: block; }
.day-tab .tab-title { font-size: 1rem; font-weight: 600; margin-top: 2px; }

/* ========= 时间轴 ========= */
.timeline {
  position: relative;
  padding-left: 2.25rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0.9rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(to bottom, #e5a24b, #c47d2c, #e5a24b);
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  padding-bottom: 1.75rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -2.25rem;
  top: 0.15rem;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: #fff;
  border: 2px solid #c47d2c;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a4718;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px -4px rgba(168,93,30,0.3);
  z-index: 2;
}
.timeline-item.highlight .timeline-dot {
  background: linear-gradient(135deg, #e5a24b, #8a4718);
  color: #fff;
  border-color: #8a4718;
}
.timeline-time {
  font-size: 0.8rem;
  color: #a85d1e;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.timeline-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #2b2019;
  margin: 0.2rem 0 0.35rem;
}
.timeline-desc {
  color: #6b5a4b;
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ========= 卡片通用 ========= */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -20px rgba(168,93,30,0.35);
}

/* ========= Day 概览卡片 ========= */
.day-overview-card {
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.25rem;
  border: 1px solid #f3c98a;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.day-overview-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(196,125,44,0.05), rgba(138,71,24,0.08));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.day-overview-card:hover::before { opacity: 1; }
.day-overview-card:hover {
  transform: translateY(-6px);
  border-color: #c47d2c;
  box-shadow: 0 18px 36px -16px rgba(168,93,30,0.35);
}

/* ========= 路线地图（SVG） ========= */
.route-svg {
  width: 100%;
  height: auto;
  max-height: 420px;
}
.route-point {
  transition: all 0.3s ease;
  cursor: pointer;
}
.route-point:hover circle { r: 10; }

/* ========= Checkbox 自定义 ========= */
.check-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.check-item:hover { background: #fdf6ec; }
.check-item input {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #c47d2c;
  border-radius: 0.35rem;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.check-item input:checked {
  background: #8a4718;
  border-color: #8a4718;
}
.check-item input:checked::after {
  content: '\2713';
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.check-item input:checked + .check-label {
  text-decoration: line-through;
  color: #a89583;
}
.check-label {
  font-size: 0.95rem;
  color: #3d2e24;
  transition: all 0.2s ease;
}

/* ========= 徽章 ========= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #fdf6ec;
  color: #8a4718;
  border: 1px solid #f3c98a;
}
.badge-must { background: #8a4718; color: #fff; border-color: #8a4718; }
.badge-opt  { background: #e6f4f1; color: #216b5c; border-color: #9cc8bf; }

/* ========= 美食卡片 ========= */
.food-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  background: #fdf6ec;
  border: 1px solid #f3c98a;
  border-radius: 9999px;
  font-size: 0.8rem;
  color: #6b3612;
  margin: 0.2rem;
  transition: all 0.2s ease;
}
.food-chip:hover {
  background: #f9e7c8;
  transform: translateY(-2px);
}

/* ========= 小屏优化 ========= */
@media (max-width: 640px) {
  .timeline { padding-left: 2rem; }
  .timeline::before { left: 0.75rem; }
  .timeline-dot { left: -2rem; width: 1.75rem; height: 1.75rem; font-size: 0.75rem; }
}

/* ========= 浮动分享按钮 ========= */
.share-fab {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #e5a24b 0%, #8a4718 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 12px 32px -8px rgba(138, 71, 24, 0.55),
              0 4px 10px -2px rgba(138, 71, 24, 0.35);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: fab-pulse 2.4s ease-in-out infinite;
}
.share-fab:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 18px 40px -10px rgba(138, 71, 24, 0.7);
}
.share-fab i { font-size: 1.1rem; }
.share-fab-text { letter-spacing: 0.05em; }

@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 12px 32px -8px rgba(138, 71, 24, 0.55), 0 0 0 0 rgba(229, 162, 75, 0.55); }
  50%      { box-shadow: 0 12px 32px -8px rgba(138, 71, 24, 0.55), 0 0 0 14px rgba(229, 162, 75, 0); }
}

@media (max-width: 640px) {
  .share-fab {
    right: 1rem;
    bottom: 1rem;
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
  }
  .share-fab-text { display: none; }
  .share-fab { padding: 0.9rem; }
  .share-fab i { font-size: 1.25rem; }
}

/* ========= 分享弹窗 ========= */
.share-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.share-modal.hidden { display: none; }

.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 20, 16, 0.55);
  backdrop-filter: blur(6px);
  animation: fade-in 0.25s ease;
}

.share-modal-panel {
  position: relative;
  width: 100%;
  max-width: 28rem;
  background: #fff;
  border-radius: 1.5rem;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45);
  animation: pop-in 0.35s cubic-bezier(0.22, 1.2, 0.36, 1);
  max-height: 92vh;
  overflow-y: auto;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.share-modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: #fdf6ec;
  color: #6b3612;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.share-modal-close:hover {
  background: #f9e7c8;
  transform: rotate(90deg);
}

.share-qr-box {
  background: linear-gradient(135deg, #fdf6ec 0%, #ffffff 100%);
  border: 1px solid #f3c98a;
  border-radius: 1.25rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.share-qr {
  padding: 0.75rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 6px 18px -6px rgba(138, 71, 24, 0.2);
}
.share-qr img, .share-qr canvas {
  display: block;
}

.share-link-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.share-link-input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid #f3c98a;
  border-radius: 0.75rem;
  background: #fdf6ec;
  color: #3d2e24;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.share-link-input:focus { border-color: #c47d2c; }

.share-copy-btn {
  flex-shrink: 0;
  padding: 0.7rem 1rem;
  background: linear-gradient(135deg, #c47d2c 0%, #8a4718 100%);
  color: #fff;
  border: none;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.share-copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -6px rgba(138, 71, 24, 0.45);
}
.share-copy-btn.copied {
  background: linear-gradient(135deg, #2d8f7c 0%, #216b5c 100%);
}

.share-tips {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
}

.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.share-action-btn {
  padding: 0.7rem 0.5rem;
  background: #fff;
  border: 1px solid #f3c98a;
  color: #6b3612;
  border-radius: 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}
.share-action-btn:hover {
  background: #fdf6ec;
  border-color: #c47d2c;
  transform: translateY(-1px);
}

.share-toast {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 20px);
  background: #1a1410;
  color: #fff;
  padding: 0.55rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}
.share-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 打印时隐藏浮动按钮与弹窗 */
@media print {
  .share-fab, .share-modal, #topNav { display: none !important; }
  body { background: #fff !important; }
}